difit 4.0.0 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +15 -14
- package/README.ko.md +15 -14
- package/README.md +15 -14
- package/README.zh.md +15 -14
- package/dist/cli/index.js +18 -0
- package/dist/cli/index.test.js +148 -38
- package/dist/cli/tuiDeprecation.d.ts +3 -0
- package/dist/cli/tuiDeprecation.js +16 -0
- package/dist/cli/tuiDeprecation.test.d.ts +1 -0
- package/dist/cli/tuiDeprecation.test.js +16 -0
- package/dist/cli/utils.d.ts +1 -0
- package/dist/cli/utils.js +17 -0
- package/dist/client/assets/_basePickBy-hOr-yGsE.js +1 -0
- package/dist/client/assets/_baseUniq-b7bzdUSn.js +1 -0
- package/dist/client/assets/arc-D65wG9gm.js +1 -0
- package/dist/client/assets/architecture-PBZL5I3N-DFdrPtRG.js +1 -0
- package/dist/client/assets/architectureDiagram-2XIMDMQ5-CXJTJFYJ.js +36 -0
- package/dist/client/assets/array-DOVTz2Mq.js +1 -0
- package/dist/client/assets/blockDiagram-WCTKOSBZ-B60owdAn.js +132 -0
- package/dist/client/assets/c4Diagram-IC4MRINW-4tg2D_Vt.js +10 -0
- package/dist/client/assets/channel-DogeU0Wo.js +1 -0
- package/dist/client/assets/chunk-4BX2VUAB-CW45MZFx.js +1 -0
- package/dist/client/assets/chunk-55IACEB6-Busc3sfI.js +1 -0
- package/dist/client/assets/chunk-7E7YKBS2-BVR-8Pma.js +1 -0
- package/dist/client/assets/chunk-7R4GIKGN-DneC7PwP.js +80 -0
- package/dist/client/assets/chunk-C72U2L5F-CJr98gus.js +1 -0
- package/dist/client/assets/chunk-EGIJ26TM-iD_CSqpR.js +1 -0
- package/dist/client/assets/{chunk-FMBD7UC4-CrKv7ndg.js → chunk-FMBD7UC4-BSsJVlRg.js} +2 -2
- package/dist/client/assets/chunk-GEFDOKGD-eDUrsRgt.js +2 -0
- package/dist/client/assets/chunk-GLR3WWYH-NUOKNaxd.js +2 -0
- package/dist/client/assets/chunk-HHEYEP7N-DhuxpkmW.js +1 -0
- package/dist/client/assets/chunk-JSJVCQXG-UCJub_Eo.js +1 -0
- package/dist/client/assets/chunk-KX2RTZJC-DrhxxMOx.js +1 -0
- package/dist/client/assets/chunk-KYZI473N-Brv52ZeO.js +53 -0
- package/dist/client/assets/chunk-L3YUKLVL-BkBigLhQ.js +1 -0
- package/dist/client/assets/chunk-MX3YWQON-DHRoNbgW.js +1 -0
- package/dist/client/assets/chunk-NQ4KR5QH-BZ86r2qK.js +220 -0
- package/dist/client/assets/chunk-O4XLMI2P-Sr33dk8c.js +7 -0
- package/dist/client/assets/chunk-OZEHJAEY-3F2ff7sj.js +1 -0
- package/dist/client/assets/chunk-PQ6SQG4A-C9acTu_E.js +1 -0
- package/dist/client/assets/chunk-PU5JKC2W-PQmA4K_y.js +70 -0
- package/dist/client/assets/chunk-QZHKN3VN-DMRW-mur.js +1 -0
- package/dist/client/assets/chunk-R5LLSJPH-ChexuO_S.js +1 -0
- package/dist/client/assets/chunk-WL4C6EOR-oxNV_hhM.js +189 -0
- package/dist/client/assets/chunk-XIRO2GV7-C9gOnffv.js +1 -0
- package/dist/client/assets/chunk-XPW4576I-CcqR6BsE.js +32 -0
- package/dist/client/assets/chunk-XZSTWKYB-C5JJ0TZR.js +94 -0
- package/dist/client/assets/chunk-YBOYWFTD-B6kAkNgH.js +1 -0
- package/dist/client/assets/classDiagram-VBA2DB6C-DlDUg6JI.js +1 -0
- package/dist/client/assets/classDiagram-v2-RAHNMMFH-BxzJfV1S.js +1 -0
- package/dist/client/assets/clone-DuY6BQEm.js +1 -0
- package/dist/client/assets/cose-bilkent-S5V4N54A-hlDud6Ym.js +1 -0
- package/dist/client/assets/cytoscape.esm-B3gzQ1NF.js +321 -0
- package/dist/client/assets/dagre-BwDYerGQ.js +1 -0
- package/dist/client/assets/dagre-KLK3FWXG-KnkMUlUE.js +4 -0
- package/dist/client/assets/defaultLocale-Ck2Xxk-C.js +1 -0
- package/dist/client/assets/diagram-E7M64L7V-DcTCIFUG.js +24 -0
- package/dist/client/assets/diagram-IFDJBPK2-COcDQunj.js +43 -0
- package/dist/client/assets/diagram-P4PSJMXO-DmgET9pD.js +24 -0
- package/dist/client/assets/dist-v55TM3-O.js +1 -0
- package/dist/client/assets/erDiagram-INFDFZHY-ByL02DP-.js +70 -0
- package/dist/client/assets/flowDiagram-PKNHOUZH-CW-lseYE.js +162 -0
- package/dist/client/assets/ganttDiagram-A5KZAMGK-BxLjKRld.js +292 -0
- package/dist/client/assets/gitGraph-HDMCJU4V-CjAGJiCH.js +1 -0
- package/dist/client/assets/gitGraphDiagram-K3NZZRJ6-DLEDjokx.js +65 -0
- package/dist/client/assets/graphlib-WkJoBgka.js +1 -0
- package/dist/client/assets/index-CizZxdOT.js +79 -0
- package/dist/client/assets/index-Cn4K2uvR.css +2 -0
- package/dist/client/assets/info-3K5VOQVL-CB6KpH1K.js +1 -0
- package/dist/client/assets/infoDiagram-LFFYTUFH-CnmYkyCb.js +2 -0
- package/dist/client/assets/init-Bft5Ffpj.js +1 -0
- package/dist/client/assets/isArrayLikeObject-icl0H0jo.js +1 -0
- package/dist/client/assets/isEmpty-Du8sNmkE.js +1 -0
- package/dist/client/assets/ishikawaDiagram-PHBUUO56-zycn1mVK.js +70 -0
- package/dist/client/assets/journeyDiagram-4ABVD52K-aRoH36nV.js +139 -0
- package/dist/client/assets/kanban-definition-K7BYSVSG-BGtGv5yb.js +89 -0
- package/dist/client/assets/katex-BJrMXEjr.js +261 -0
- package/dist/client/assets/line-Cm3ZuldI.js +1 -0
- package/dist/client/assets/linear-HJOLPv7E.js +1 -0
- package/dist/client/assets/math-CNhlSIO3.js +1 -0
- package/dist/client/assets/mermaid-parser.core-BvMqHn4b.js +4 -0
- package/dist/client/assets/mermaid.core-C4SvQTx9.js +11 -0
- package/dist/client/assets/mindmap-definition-YRQLILUH-B8jMe7ir.js +68 -0
- package/dist/client/assets/ordinal-DIg8h6NI.js +1 -0
- package/dist/client/assets/packet-RMMSAZCW-CzbC-tXD.js +1 -0
- package/dist/client/assets/path-DfRbCp9y.js +1 -0
- package/dist/client/assets/pie-UPGHQEXC-CmhYIo8p.js +1 -0
- package/dist/client/assets/pieDiagram-SKSYHLDU-CGWbtgxq.js +30 -0
- package/dist/client/assets/{prism-bash-DTkDXsAh.js → prism-bash-6uMTC0Q2.js} +1 -1
- package/dist/client/assets/prism-csharp-Dkc2OSmh.js +1 -0
- package/dist/client/assets/prism-dart-iZy_wlz-.js +1 -0
- package/dist/client/assets/prism-elixir-BIzI9WJK.js +1 -0
- package/dist/client/assets/prism-hcl-Bx2FGBKG.js +1 -0
- package/dist/client/assets/prism-java-DBXf7fH0.js +1 -0
- package/dist/client/assets/prism-markup-templating-DS0ksKLt.js +1 -0
- package/dist/client/assets/prism-perl-BlhPiMfT.js +1 -0
- package/dist/client/assets/prism-php-DVtOAJsW.js +1 -0
- package/dist/client/assets/{prism-protobuf-DiQ_z8B5.js → prism-protobuf-BUsrNVvv.js} +1 -1
- package/dist/client/assets/prism-ruby-Saes64I6.js +1 -0
- package/dist/client/assets/{prism-scala-BjNo2HkN.js → prism-scala-ANOINMog.js} +1 -1
- package/dist/client/assets/prism-solidity-C5Mx5y66.js +1 -0
- package/dist/client/assets/{prism-sql-AgAyy5H_.js → prism-sql-D5pwK0Dp.js} +1 -1
- package/dist/client/assets/{prism-vim-uciLQ2PQ.js → prism-vim-BSZSu-gX.js} +1 -1
- package/dist/client/assets/quadrantDiagram-337W2JSQ-CQ1QKsru.js +7 -0
- package/dist/client/assets/radar-KQ55EAFF-BCa9lsCc.js +1 -0
- package/dist/client/assets/requirementDiagram-Z7DCOOCP-Co1LyL5T.js +73 -0
- package/dist/client/assets/rough.esm-KjoEK0it.js +1 -0
- package/dist/client/assets/sankeyDiagram-WA2Y5GQK-BQVbT6bS.js +10 -0
- package/dist/client/assets/sequenceDiagram-2WXFIKYE-DGIEkdPm.js +145 -0
- package/dist/client/assets/src-DsmFf7gO.js +1 -0
- package/dist/client/assets/stateDiagram-RAJIS63D-DgjKbXnG.js +1 -0
- package/dist/client/assets/stateDiagram-v2-FVOUBMTO-gPrpjL74.js +1 -0
- package/dist/client/assets/timeline-definition-YZTLITO2-Dz2dVWjY.js +61 -0
- package/dist/client/assets/treemap-KZPCXAKY-DXiPfAB6.js +1 -0
- package/dist/client/assets/vennDiagram-LZ73GAT5-IIH5S1B6.js +34 -0
- package/dist/client/assets/xychartDiagram-JWTSCODW-DeYZhM2j.js +7 -0
- package/dist/client/index.html +2 -2
- package/dist/server/git-diff-tui.d.ts +1 -1
- package/dist/server/git-diff-tui.js +7 -5
- package/dist/server/git-diff-tui.test.d.ts +1 -0
- package/dist/server/git-diff-tui.test.js +60 -0
- package/dist/server/git-diff.d.ts +3 -1
- package/dist/server/git-diff.js +40 -3
- package/dist/server/git-diff.test.js +20 -0
- package/dist/server/server.d.ts +1 -0
- package/dist/server/server.js +4 -3
- package/dist/server/server.test.js +32 -0
- package/dist/tui/App.d.ts +1 -0
- package/dist/tui/App.js +2 -2
- package/dist/types/diff.d.ts +1 -0
- package/dist/utils/commentImports.js +3 -2
- package/dist/utils/createId.d.ts +1 -0
- package/dist/utils/createId.js +5 -0
- package/dist/utils/createId.test.d.ts +1 -0
- package/dist/utils/createId.test.js +48 -0
- package/package.json +5 -5
- package/dist/client/assets/_basePickBy-B9N-f0iT.js +0 -1
- package/dist/client/assets/_baseUniq-tbL7nVvN.js +0 -1
- package/dist/client/assets/arc-BOY-7mep.js +0 -1
- package/dist/client/assets/architectureDiagram-2XIMDMQ5-59AvHaSB.js +0 -36
- package/dist/client/assets/blockDiagram-WCTKOSBZ-DXIlumQk.js +0 -132
- package/dist/client/assets/c4Diagram-IC4MRINW-BbfZ0uRn.js +0 -10
- package/dist/client/assets/channel-cZXsTJxA.js +0 -1
- package/dist/client/assets/chunk-4BX2VUAB-l7rcB2IW.js +0 -1
- package/dist/client/assets/chunk-55IACEB6-CrZL3qv9.js +0 -1
- package/dist/client/assets/chunk-JSJVCQXG-DyBDhAEM.js +0 -1
- package/dist/client/assets/chunk-KX2RTZJC-By5mkZmU.js +0 -1
- package/dist/client/assets/chunk-NQ4KR5QH-C30p9xRx.js +0 -220
- package/dist/client/assets/chunk-QZHKN3VN-DVlhR2wU.js +0 -1
- package/dist/client/assets/chunk-WL4C6EOR-Cn7a6CO3.js +0 -189
- package/dist/client/assets/classDiagram-VBA2DB6C-B_coIPEy.js +0 -1
- package/dist/client/assets/classDiagram-v2-RAHNMMFH-B_coIPEy.js +0 -1
- package/dist/client/assets/clone-BjaT2HOk.js +0 -1
- package/dist/client/assets/cose-bilkent-S5V4N54A-LyauIk_9.js +0 -1
- package/dist/client/assets/cytoscape.esm-5J0xJHOV.js +0 -321
- package/dist/client/assets/dagre-KLK3FWXG-DRWb2KE3.js +0 -4
- package/dist/client/assets/defaultLocale-DX6XiGOO.js +0 -1
- package/dist/client/assets/diagram-E7M64L7V-ChT6mNWK.js +0 -24
- package/dist/client/assets/diagram-IFDJBPK2-CqbTduoP.js +0 -43
- package/dist/client/assets/diagram-P4PSJMXO-Bzv5Z3ri.js +0 -24
- package/dist/client/assets/erDiagram-INFDFZHY-CvXfUZ4L.js +0 -70
- package/dist/client/assets/flowDiagram-PKNHOUZH-CxmpNUKq.js +0 -162
- package/dist/client/assets/ganttDiagram-A5KZAMGK-9LpZCsg6.js +0 -292
- package/dist/client/assets/gitGraphDiagram-K3NZZRJ6-C6yZOrQJ.js +0 -65
- package/dist/client/assets/graph-bUZ7uHLW.js +0 -1
- package/dist/client/assets/index-BLNN1bfE.js +0 -98
- package/dist/client/assets/index-VxkpzDXr.css +0 -1
- package/dist/client/assets/infoDiagram-LFFYTUFH-Djdy3W21.js +0 -2
- package/dist/client/assets/init-Gi6I4Gst.js +0 -1
- package/dist/client/assets/ishikawaDiagram-PHBUUO56-oOdwCpeS.js +0 -70
- package/dist/client/assets/journeyDiagram-4ABVD52K-DTb_nGAw.js +0 -139
- package/dist/client/assets/kanban-definition-K7BYSVSG-CMtP7pHA.js +0 -89
- package/dist/client/assets/katex-C-M49wc6.js +0 -261
- package/dist/client/assets/layout-CXr5MatK.js +0 -1
- package/dist/client/assets/linear-pOMS9pjV.js +0 -1
- package/dist/client/assets/mermaid.core-DV5JJ1Ie.js +0 -249
- package/dist/client/assets/mindmap-definition-YRQLILUH-DN-sbonc.js +0 -68
- package/dist/client/assets/ordinal-Cboi1Yqb.js +0 -1
- package/dist/client/assets/pieDiagram-SKSYHLDU-tAHCkgh1.js +0 -30
- package/dist/client/assets/prism-csharp-5CQ0RcEE.js +0 -1
- package/dist/client/assets/prism-dart-MjriiaMt.js +0 -1
- package/dist/client/assets/prism-elixir-BSOTyVg2.js +0 -1
- package/dist/client/assets/prism-hcl-BYvi1mtM.js +0 -1
- package/dist/client/assets/prism-java-DMU2FM4X.js +0 -1
- package/dist/client/assets/prism-markup-templating-Ct1xsyfA.js +0 -1
- package/dist/client/assets/prism-perl-CpfvaEQk.js +0 -1
- package/dist/client/assets/prism-php-SC920LoD.js +0 -1
- package/dist/client/assets/prism-ruby-DZph-YiO.js +0 -1
- package/dist/client/assets/prism-solidity-qTLbmiAT.js +0 -1
- package/dist/client/assets/quadrantDiagram-337W2JSQ-B0wODmgR.js +0 -7
- package/dist/client/assets/requirementDiagram-Z7DCOOCP-A3aeHC06.js +0 -73
- package/dist/client/assets/sankeyDiagram-WA2Y5GQK-BWa6kZhG.js +0 -10
- package/dist/client/assets/sequenceDiagram-2WXFIKYE-Cx_COX9G.js +0 -145
- package/dist/client/assets/stateDiagram-RAJIS63D-BXGnN6rZ.js +0 -1
- package/dist/client/assets/stateDiagram-v2-FVOUBMTO-CMw3xNha.js +0 -1
- package/dist/client/assets/timeline-definition-YZTLITO2-DbqaUm9k.js +0 -61
- package/dist/client/assets/treemap-KZPCXAKY-CfEujPCR.js +0 -162
- package/dist/client/assets/vennDiagram-LZ73GAT5-CqJE8CAD.js +0 -34
- package/dist/client/assets/xychartDiagram-JWTSCODW-CfdDvzHC.js +0 -7
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
function oS(e,n){for(var i=0;i<n.length;i++){const l=n[i];if(typeof l!="string"&&!Array.isArray(l)){for(const o in l)if(o!=="default"&&!(o in e)){const u=Object.getOwnPropertyDescriptor(l,o);u&&Object.defineProperty(e,o,u.get?u:{enumerable:!0,get:()=>l[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))l(o);new MutationObserver(o=>{for(const u of o)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&l(c)}).observe(document,{childList:!0,subtree:!0});function i(o){const u={};return o.integrity&&(u.integrity=o.integrity),o.referrerPolicy&&(u.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?u.credentials="include":o.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function l(o){if(o.ep)return;o.ep=!0;const u=i(o);fetch(o.href,u)}})();const b1="data-theme",sS={"--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)"},uS={"--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)"},cS={dark:sS,light:uS},Gd="reviewit-appearance-settings",fS=e=>e==="light"||e==="dark"||e==="auto",dS=e=>e==="normal"||e==="deuteranopia",hS=e=>e==="light"||e==="dark",kh=()=>{if(!(typeof window>"u"))try{return window.localStorage}catch{return}},Eh=()=>{if(!(typeof window>"u"))return window};function y1(e=kh()){if(!e)return null;try{const n=e.getItem(Gd);if(!n)return null;const i=JSON.parse(n);if(i&&typeof i=="object"){const l={},o=i;return fS(o.theme)&&(l.theme=o.theme),dS(o.colorVision)&&(l.colorVision=o.colorVision),l}}catch{return null}return null}function Ch(e=Eh()){return e?.matchMedia("(prefers-color-scheme: dark)").matches??!0?"dark":"light"}function $s(e,n=Ch()){return e==="light"||e==="dark"?e:n}function Zb(e=typeof document>"u"?void 0:document,n=kh(),i=Eh()){const l=e?.documentElement.getAttribute(b1)??null;return hS(l)?l:$s(y1(n)?.theme,Ch(i))}const pS={"--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"},mS={"--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"},gS={dark:pS,light:mS};function x1(e,n="normal",i=document){const l=i.documentElement;l.setAttribute(b1,e),l.setAttribute("data-color-vision",n);const o=cS[e];if(Object.entries(o).forEach(([u,c])=>{l.style.setProperty(u,c)}),n==="deuteranopia"){const u=gS[e];Object.entries(u).forEach(([c,f])=>{l.style.setProperty(c,f)})}i.body&&(i.body.style.backgroundColor="var(--color-github-bg-primary)",i.body.style.color="var(--color-github-text-primary)")}function bS(e=typeof document>"u"?void 0:document,n=kh(),i=Eh()){if(!e)return null;const l=y1(n),o=$s(l?.theme,Ch(i)),u=l?.colorVision??"normal";return x1(o,u,e),o}bS();function Su(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function A_(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var n=e.default;if(typeof n=="function"){var i=function l(){var o=!1;try{o=this instanceof l}catch{}return o?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};i.prototype=n.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach(function(l){var o=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(i,l,o.get?o:{enumerable:!0,get:function(){return e[l]}})}),i}var Jf={exports:{}},Ia={};var Kb;function yS(){if(Kb)return Ia;Kb=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function i(l,o,u){var c=null;if(u!==void 0&&(c=""+u),o.key!==void 0&&(c=""+o.key),"key"in o){u={};for(var f in o)f!=="key"&&(u[f]=o[f])}else u=o;return o=u.ref,{$$typeof:e,type:l,key:c,ref:o!==void 0?o:null,props:u}}return Ia.Fragment=n,Ia.jsx=i,Ia.jsxs=i,Ia}var Qb;function xS(){return Qb||(Qb=1,Jf.exports=yS()),Jf.exports}var y=xS(),ed={exports:{}},De={};var Wb;function vS(){if(Wb)return De;Wb=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),v=Symbol.iterator;function x(j){return j===null||typeof j!="object"?null:(j=v&&j[v]||j["@@iterator"],typeof j=="function"?j:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,A={};function C(j,B,T){this.props=j,this.context=B,this.refs=A,this.updater=T||w}C.prototype.isReactComponent={},C.prototype.setState=function(j,B){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,B,"setState")},C.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function E(){}E.prototype=C.prototype;function R(j,B,T){this.props=j,this.context=B,this.refs=A,this.updater=T||w}var z=R.prototype=new E;z.constructor=R,S(z,C.prototype),z.isPureReactComponent=!0;var $=Array.isArray;function _(){}var F={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function O(j,B,T){var J=T.ref;return{$$typeof:e,type:j,key:B,ref:J!==void 0?J:null,props:T}}function L(j,B){return O(j.type,B,j.props)}function I(j){return typeof j=="object"&&j!==null&&j.$$typeof===e}function q(j){var B={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(T){return B[T]})}var K=/\/+/g;function U(j,B){return typeof j=="object"&&j!==null&&j.key!=null?q(""+j.key):B.toString(36)}function G(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(_,_):(j.status="pending",j.then(function(B){j.status==="pending"&&(j.status="fulfilled",j.value=B)},function(B){j.status==="pending"&&(j.status="rejected",j.reason=B)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function H(j,B,T,J,W){var ie=typeof j;(ie==="undefined"||ie==="boolean")&&(j=null);var de=!1;if(j===null)de=!0;else switch(ie){case"bigint":case"string":case"number":de=!0;break;case"object":switch(j.$$typeof){case e:case n:de=!0;break;case b:return de=j._init,H(de(j._payload),B,T,J,W)}}if(de)return W=W(j),de=J===""?"."+U(j,0):J,$(W)?(T="",de!=null&&(T=de.replace(K,"$&/")+"/"),H(W,B,T,"",function(Se){return Se})):W!=null&&(I(W)&&(W=L(W,T+(W.key==null||j&&j.key===W.key?"":(""+W.key).replace(K,"$&/")+"/")+de)),B.push(W)),1;de=0;var me=J===""?".":J+":";if($(j))for(var ye=0;ye<j.length;ye++)J=j[ye],ie=me+U(J,ye),de+=H(J,B,T,ie,W);else if(ye=x(j),typeof ye=="function")for(j=ye.call(j),ye=0;!(J=j.next()).done;)J=J.value,ie=me+U(J,ye++),de+=H(J,B,T,ie,W);else if(ie==="object"){if(typeof j.then=="function")return H(G(j),B,T,J,W);throw B=String(j),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return de}function X(j,B,T){if(j==null)return j;var J=[],W=0;return H(j,J,"","",function(ie){return B.call(T,ie,W++)}),J}function Y(j){if(j._status===-1){var B=j._result;B=B(),B.then(function(T){(j._status===0||j._status===-1)&&(j._status=1,j._result=T)},function(T){(j._status===0||j._status===-1)&&(j._status=2,j._result=T)}),j._status===-1&&(j._status=0,j._result=B)}if(j._status===1)return j._result.default;throw j._result}var ne=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},M={map:X,forEach:function(j,B,T){X(j,function(){B.apply(this,arguments)},T)},count:function(j){var B=0;return X(j,function(){B++}),B},toArray:function(j){return X(j,function(B){return B})||[]},only:function(j){if(!I(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return De.Activity=g,De.Children=M,De.Component=C,De.Fragment=i,De.Profiler=o,De.PureComponent=R,De.StrictMode=l,De.Suspense=h,De.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,De.__COMPILER_RUNTIME={__proto__:null,c:function(j){return F.H.useMemoCache(j)}},De.cache=function(j){return function(){return j.apply(null,arguments)}},De.cacheSignal=function(){return null},De.cloneElement=function(j,B,T){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var J=S({},j.props),W=j.key;if(B!=null)for(ie in B.key!==void 0&&(W=""+B.key),B)!P.call(B,ie)||ie==="key"||ie==="__self"||ie==="__source"||ie==="ref"&&B.ref===void 0||(J[ie]=B[ie]);var ie=arguments.length-2;if(ie===1)J.children=T;else if(1<ie){for(var de=Array(ie),me=0;me<ie;me++)de[me]=arguments[me+2];J.children=de}return O(j.type,W,J)},De.createContext=function(j){return j={$$typeof:c,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:u,_context:j},j},De.createElement=function(j,B,T){var J,W={},ie=null;if(B!=null)for(J in B.key!==void 0&&(ie=""+B.key),B)P.call(B,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(W[J]=B[J]);var de=arguments.length-2;if(de===1)W.children=T;else if(1<de){for(var me=Array(de),ye=0;ye<de;ye++)me[ye]=arguments[ye+2];W.children=me}if(j&&j.defaultProps)for(J in de=j.defaultProps,de)W[J]===void 0&&(W[J]=de[J]);return O(j,ie,W)},De.createRef=function(){return{current:null}},De.forwardRef=function(j){return{$$typeof:f,render:j}},De.isValidElement=I,De.lazy=function(j){return{$$typeof:b,_payload:{_status:-1,_result:j},_init:Y}},De.memo=function(j,B){return{$$typeof:p,type:j,compare:B===void 0?null:B}},De.startTransition=function(j){var B=F.T,T={};F.T=T;try{var J=j(),W=F.S;W!==null&&W(T,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(_,ne)}catch(ie){ne(ie)}finally{B!==null&&T.types!==null&&(B.types=T.types),F.T=B}},De.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},De.use=function(j){return F.H.use(j)},De.useActionState=function(j,B,T){return F.H.useActionState(j,B,T)},De.useCallback=function(j,B){return F.H.useCallback(j,B)},De.useContext=function(j){return F.H.useContext(j)},De.useDebugValue=function(){},De.useDeferredValue=function(j,B){return F.H.useDeferredValue(j,B)},De.useEffect=function(j,B){return F.H.useEffect(j,B)},De.useEffectEvent=function(j){return F.H.useEffectEvent(j)},De.useId=function(){return F.H.useId()},De.useImperativeHandle=function(j,B,T){return F.H.useImperativeHandle(j,B,T)},De.useInsertionEffect=function(j,B){return F.H.useInsertionEffect(j,B)},De.useLayoutEffect=function(j,B){return F.H.useLayoutEffect(j,B)},De.useMemo=function(j,B){return F.H.useMemo(j,B)},De.useOptimistic=function(j,B){return F.H.useOptimistic(j,B)},De.useReducer=function(j,B,T){return F.H.useReducer(j,B,T)},De.useRef=function(j){return F.H.useRef(j)},De.useState=function(j){return F.H.useState(j)},De.useSyncExternalStore=function(j,B,T){return F.H.useSyncExternalStore(j,B,T)},De.useTransition=function(){return F.H.useTransition()},De.version="19.2.4",De}var Jb;function Ah(){return Jb||(Jb=1,ed.exports=vS()),ed.exports}var N=Ah();const Wt=Su(N),v1=oS({__proto__:null,default:Wt},[N]);var td={exports:{}},Fa={},nd={exports:{}},rd={};var ey;function wS(){return ey||(ey=1,(function(e){function n(H,X){var Y=H.length;H.push(X);e:for(;0<Y;){var ne=Y-1>>>1,M=H[ne];if(0<o(M,X))H[ne]=X,H[Y]=M,Y=ne;else break e}}function i(H){return H.length===0?null:H[0]}function l(H){if(H.length===0)return null;var X=H[0],Y=H.pop();if(Y!==X){H[0]=Y;e:for(var ne=0,M=H.length,j=M>>>1;ne<j;){var B=2*(ne+1)-1,T=H[B],J=B+1,W=H[J];if(0>o(T,Y))J<M&&0>o(W,T)?(H[ne]=W,H[J]=Y,ne=J):(H[ne]=T,H[B]=Y,ne=B);else if(J<M&&0>o(W,Y))H[ne]=W,H[J]=Y,ne=J;else break e}}return X}function o(H,X){var Y=H.sortIndex-X.sortIndex;return Y!==0?Y:H.id-X.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var h=[],p=[],b=1,g=null,v=3,x=!1,w=!1,S=!1,A=!1,C=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function z(H){for(var X=i(p);X!==null;){if(X.callback===null)l(p);else if(X.startTime<=H)l(p),X.sortIndex=X.expirationTime,n(h,X);else break;X=i(p)}}function $(H){if(S=!1,z(H),!w)if(i(h)!==null)w=!0,_||(_=!0,q());else{var X=i(p);X!==null&&G($,X.startTime-H)}}var _=!1,F=-1,P=5,O=-1;function L(){return A?!0:!(e.unstable_now()-O<P)}function I(){if(A=!1,_){var H=e.unstable_now();O=H;var X=!0;try{e:{w=!1,S&&(S=!1,E(F),F=-1),x=!0;var Y=v;try{t:{for(z(H),g=i(h);g!==null&&!(g.expirationTime>H&&L());){var ne=g.callback;if(typeof ne=="function"){g.callback=null,v=g.priorityLevel;var M=ne(g.expirationTime<=H);if(H=e.unstable_now(),typeof M=="function"){g.callback=M,z(H),X=!0;break t}g===i(h)&&l(h),z(H)}else l(h);g=i(h)}if(g!==null)X=!0;else{var j=i(p);j!==null&&G($,j.startTime-H),X=!1}}break e}finally{g=null,v=Y,x=!1}X=void 0}}finally{X?q():_=!1}}}var q;if(typeof R=="function")q=function(){R(I)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,U=K.port2;K.port1.onmessage=I,q=function(){U.postMessage(null)}}else q=function(){C(I,0)};function G(H,X){F=C(function(){H(e.unstable_now())},X)}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(H){H.callback=null},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(H){switch(v){case 1:case 2:case 3:var X=3;break;default:X=v}var Y=v;v=X;try{return H()}finally{v=Y}},e.unstable_requestPaint=function(){A=!0},e.unstable_runWithPriority=function(H,X){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var Y=v;v=H;try{return X()}finally{v=Y}},e.unstable_scheduleCallback=function(H,X,Y){var ne=e.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?ne+Y:ne):Y=ne,H){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=Y+M,H={id:b++,callback:X,priorityLevel:H,startTime:Y,expirationTime:M,sortIndex:-1},Y>ne?(H.sortIndex=Y,n(p,H),i(h)===null&&H===i(p)&&(S?(E(F),F=-1):S=!0,G($,Y-ne))):(H.sortIndex=M,n(h,H),w||x||(w=!0,_||(_=!0,q()))),H},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(H){var X=v;return function(){var Y=v;v=X;try{return H.apply(this,arguments)}finally{v=Y}}}})(rd)),rd}var ty;function SS(){return ty||(ty=1,nd.exports=wS()),nd.exports}var id={exports:{}},Ht={};var ny;function kS(){if(ny)return Ht;ny=1;var e=Ah();function n(h){var p="https://react.dev/errors/"+h;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)p+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+h+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var l={d:{f:i,r:function(){throw Error(n(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function u(h,p,b){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:h,containerInfo:p,implementation:b}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,p){if(h==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Ht.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,Ht.createPortal=function(h,p){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(n(299));return u(h,p,null,b)},Ht.flushSync=function(h){var p=c.T,b=l.p;try{if(c.T=null,l.p=2,h)return h()}finally{c.T=p,l.p=b,l.d.f()}},Ht.preconnect=function(h,p){typeof h=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,l.d.C(h,p))},Ht.prefetchDNS=function(h){typeof h=="string"&&l.d.D(h)},Ht.preinit=function(h,p){if(typeof h=="string"&&p&&typeof p.as=="string"){var b=p.as,g=f(b,p.crossOrigin),v=typeof p.integrity=="string"?p.integrity:void 0,x=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;b==="style"?l.d.S(h,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:g,integrity:v,fetchPriority:x}):b==="script"&&l.d.X(h,{crossOrigin:g,integrity:v,fetchPriority:x,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Ht.preinitModule=function(h,p){if(typeof h=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var b=f(p.as,p.crossOrigin);l.d.M(h,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&l.d.M(h)},Ht.preload=function(h,p){if(typeof h=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var b=p.as,g=f(b,p.crossOrigin);l.d.L(h,b,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Ht.preloadModule=function(h,p){if(typeof h=="string")if(p){var b=f(p.as,p.crossOrigin);l.d.m(h,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else l.d.m(h)},Ht.requestFormReset=function(h){l.d.r(h)},Ht.unstable_batchedUpdates=function(h,p){return h(p)},Ht.useFormState=function(h,p,b){return c.H.useFormState(h,p,b)},Ht.useFormStatus=function(){return c.H.useHostTransitionStatus()},Ht.version="19.2.4",Ht}var ry;function w1(){if(ry)return id.exports;ry=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),id.exports=kS(),id.exports}var iy;function ES(){if(iy)return Fa;iy=1;var e=SS(),n=Ah(),i=w1();function l(t){var r="https://react.dev/errors/"+t;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)r+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function u(t){var r=t,a=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,(r.flags&4098)!==0&&(a=r.return),t=r.return;while(t)}return r.tag===3?a:null}function c(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function f(t){if(t.tag===31){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function h(t){if(u(t)!==t)throw Error(l(188))}function p(t){var r=t.alternate;if(!r){if(r=u(t),r===null)throw Error(l(188));return r!==t?null:t}for(var a=t,s=r;;){var d=a.return;if(d===null)break;var m=d.alternate;if(m===null){if(s=d.return,s!==null){a=s;continue}break}if(d.child===m.child){for(m=d.child;m;){if(m===a)return h(d),t;if(m===s)return h(d),r;m=m.sibling}throw Error(l(188))}if(a.return!==s.return)a=d,s=m;else{for(var k=!1,D=d.child;D;){if(D===a){k=!0,a=d,s=m;break}if(D===s){k=!0,s=d,a=m;break}D=D.sibling}if(!k){for(D=m.child;D;){if(D===a){k=!0,a=m,s=d;break}if(D===s){k=!0,s=m,a=d;break}D=D.sibling}if(!k)throw Error(l(189))}}if(a.alternate!==s)throw Error(l(190))}if(a.tag!==3)throw Error(l(188));return a.stateNode.current===a?t:r}function b(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t;for(t=t.child;t!==null;){if(r=b(t),r!==null)return r;t=t.sibling}return null}var g=Object.assign,v=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),R=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),O=Symbol.for("react.activity"),L=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function q(t){return t===null||typeof t!="object"?null:(t=I&&t[I]||t["@@iterator"],typeof t=="function"?t:null)}var K=Symbol.for("react.client.reference");function U(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===K?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case S:return"Fragment";case C:return"Profiler";case A:return"StrictMode";case $:return"Suspense";case _:return"SuspenseList";case O:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case w:return"Portal";case R:return t.displayName||"Context";case E:return(t._context.displayName||"Context")+".Consumer";case z:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case F:return r=t.displayName||null,r!==null?r:U(t.type)||"Memo";case P:r=t._payload,t=t._init;try{return U(t(r))}catch{}}return null}var G=Array.isArray,H=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},ne=[],M=-1;function j(t){return{current:t}}function B(t){0>M||(t.current=ne[M],ne[M]=null,M--)}function T(t,r){M++,ne[M]=t.current,t.current=r}var J=j(null),W=j(null),ie=j(null),de=j(null);function me(t,r){switch(T(ie,r),T(W,t),T(J,null),r.nodeType){case 9:case 11:t=(t=r.documentElement)&&(t=t.namespaceURI)?yb(t):0;break;default:if(t=r.tagName,r=r.namespaceURI)r=yb(r),t=xb(r,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}B(J),T(J,t)}function ye(){B(J),B(W),B(ie)}function Se(t){t.memoizedState!==null&&T(de,t);var r=J.current,a=xb(r,t.type);r!==a&&(T(W,t),T(J,a))}function Le(t){W.current===t&&(B(J),B(W)),de.current===t&&(B(de),Da._currentValue=Y)}var be,xe;function he(t){if(be===void 0)try{throw Error()}catch(a){var r=a.stack.trim().match(/\n( *(at )?)/);be=r&&r[1]||"",xe=-1<a.stack.indexOf(`
|
|
2
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+be+t+xe}var ve=!1;function Ce(t,r){if(!t||ve)return"";ve=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(r){var fe=function(){throw Error()};if(Object.defineProperty(fe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fe,[])}catch(le){var re=le}Reflect.construct(t,[],fe)}else{try{fe.call()}catch(le){re=le}t.call(fe.prototype)}}else{try{throw Error()}catch(le){re=le}(fe=t())&&typeof fe.catch=="function"&&fe.catch(function(){})}}catch(le){if(le&&re&&typeof le.stack=="string")return[le.stack,re.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=s.DetermineComponentFrameRoot(),k=m[0],D=m[1];if(k&&D){var V=k.split(`
|
|
4
|
-
`),te=D.split(`
|
|
5
|
-
`);for(d=s=0;s<V.length&&!V[s].includes("DetermineComponentFrameRoot");)s++;for(;d<te.length&&!te[d].includes("DetermineComponentFrameRoot");)d++;if(s===V.length||d===te.length)for(s=V.length-1,d=te.length-1;1<=s&&0<=d&&V[s]!==te[d];)d--;for(;1<=s&&0<=d;s--,d--)if(V[s]!==te[d]){if(s!==1||d!==1)do if(s--,d--,0>d||V[s]!==te[d]){var se=`
|
|
6
|
-
`+V[s].replace(" at new "," at ");return t.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",t.displayName)),se}while(1<=s&&0<=d);break}}}finally{ve=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?he(a):""}function Ne(t,r){switch(t.tag){case 26:case 27:case 5:return he(t.type);case 16:return he("Lazy");case 13:return t.child!==r&&r!==null?he("Suspense Fallback"):he("Suspense");case 19:return he("SuspenseList");case 0:case 15:return Ce(t.type,!1);case 11:return Ce(t.type.render,!1);case 1:return Ce(t.type,!0);case 31:return he("Activity");default:return""}}function pt(t){try{var r="",a=null;do r+=Ne(t,a),a=t,t=t.return;while(t);return r}catch(s){return`
|
|
7
|
-
Error generating stack: `+s.message+`
|
|
8
|
-
`+s.stack}}var bt=Object.prototype.hasOwnProperty,mt=e.unstable_scheduleCallback,Yt=e.unstable_cancelCallback,yt=e.unstable_shouldYield,Bt=e.unstable_requestPaint,at=e.unstable_now,rr=e.unstable_getCurrentPriorityLevel,ae=e.unstable_ImmediatePriority,ge=e.unstable_UserBlockingPriority,Re=e.unstable_NormalPriority,Ie=e.unstable_LowPriority,$e=e.unstable_IdlePriority,Xt=e.log,Cn=e.unstable_setDisableYieldValue,Mt=null,gt=null;function _t(t){if(typeof Xt=="function"&&Cn(t),gt&&typeof gt.setStrictMode=="function")try{gt.setStrictMode(Mt,t)}catch{}}var We=Math.clz32?Math.clz32:$u,Vn=Math.log,Jt=Math.LN2;function $u(t){return t>>>=0,t===0?32:31-(Vn(t)/Jt|0)|0}var $i=256,qi=262144,Pi=4194304;function Fn(t){var r=t&42;if(r!==0)return r;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Rr(t,r,a){var s=t.pendingLanes;if(s===0)return 0;var d=0,m=t.suspendedLanes,k=t.pingedLanes;t=t.warmLanes;var D=s&134217727;return D!==0?(s=D&~m,s!==0?d=Fn(s):(k&=D,k!==0?d=Fn(k):a||(a=D&~t,a!==0&&(d=Fn(a))))):(D=s&~m,D!==0?d=Fn(D):k!==0?d=Fn(k):a||(a=s&~t,a!==0&&(d=Fn(a)))),d===0?0:r!==0&&r!==d&&(r&m)===0&&(m=d&-d,a=r&-r,m>=a||m===32&&(a&4194048)!==0)?r:d}function pi(t,r){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&r)===0}function Gl(t,r){switch(t){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 Vi(){var t=Pi;return Pi<<=1,(Pi&62914560)===0&&(Pi=4194304),t}function mi(t){for(var r=[],a=0;31>a;a++)r.push(t);return r}function Gn(t,r){t.pendingLanes|=r,r!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function qu(t,r,a,s,d,m){var k=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var D=t.entanglements,V=t.expirationTimes,te=t.hiddenUpdates;for(a=k&~a;0<a;){var se=31-We(a),fe=1<<se;D[se]=0,V[se]=-1;var re=te[se];if(re!==null)for(te[se]=null,se=0;se<re.length;se++){var le=re[se];le!==null&&(le.lane&=-536870913)}a&=~fe}s!==0&&Yl(t,s,0),m!==0&&d===0&&t.tag!==0&&(t.suspendedLanes|=m&~(k&~r))}function Yl(t,r,a){t.pendingLanes|=r,t.suspendedLanes&=~r;var s=31-We(r);t.entangledLanes|=r,t.entanglements[s]=t.entanglements[s]|1073741824|a&261930}function Gi(t,r){var a=t.entangledLanes|=r;for(t=t.entanglements;a;){var s=31-We(a),d=1<<s;d&r|t[s]&r&&(t[s]|=r),a&=~d}}function ho(t,r){var a=r&-r;return a=(a&42)!==0?1:Yi(a),(a&(t.suspendedLanes|r))!==0?0:a}function Yi(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Xi(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function en(){var t=X.p;return t!==0?t:(t=window.event,t===void 0?32:$b(t.type))}function po(t,r){var a=X.p;try{return X.p=t,r()}finally{X.p=a}}var Bn=Math.random().toString(36).slice(2),dt="__reactFiber$"+Bn,Ut="__reactProps$"+Bn,jr="__reactContainer$"+Bn,Zi="__reactEvents$"+Bn,Pu="__reactListeners$"+Bn,gi="__reactHandles$"+Bn,Xl="__reactResources$"+Bn,_r="__reactMarker$"+Bn;function Zl(t){delete t[dt],delete t[Ut],delete t[Zi],delete t[Pu],delete t[gi]}function Yn(t){var r=t[dt];if(r)return r;for(var a=t.parentNode;a;){if(r=a[jr]||a[dt]){if(a=r.alternate,r.child!==null||a!==null&&a.child!==null)for(t=Ab(t);t!==null;){if(a=t[dt])return a;t=Ab(t)}return r}t=a,a=t.parentNode}return null}function ir(t){if(t=t[dt]||t[jr]){var r=t.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return t}return null}function bi(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t.stateNode;throw Error(l(33))}function Lr(t){var r=t[Xl];return r||(r=t[Xl]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function kt(t){t[_r]=!0}var mo=new Set,go={};function oe(t,r){we(t,r),we(t+"Capture",r)}function we(t,r){for(go[t]=r,t=0;t<r.length;t++)mo.add(r[t])}var _e=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]*$"),Qe={},qe={};function tn(t){return bt.call(qe,t)?!0:bt.call(Qe,t)?!1:_e.test(t)?qe[t]=!0:(Qe[t]=!0,!1)}function lr(t,r,a){if(tn(r))if(a===null)t.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(r);return;case"boolean":var s=r.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){t.removeAttribute(r);return}}t.setAttribute(r,""+a)}}function bo(t,r,a){if(a===null)t.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}t.setAttribute(r,""+a)}}function ar(t,r,a,s){if(s===null)t.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(r,a,""+s)}}function An(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function cp(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function ew(t,r,a){var s=Object.getOwnPropertyDescriptor(t.constructor.prototype,r);if(!t.hasOwnProperty(r)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var d=s.get,m=s.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return d.call(this)},set:function(k){a=""+k,m.call(this,k)}}),Object.defineProperty(t,r,{enumerable:s.enumerable}),{getValue:function(){return a},setValue:function(k){a=""+k},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function Vu(t){if(!t._valueTracker){var r=cp(t)?"checked":"value";t._valueTracker=ew(t,r,""+t[r])}}function fp(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var a=r.getValue(),s="";return t&&(s=cp(t)?t.checked?"true":"false":t.value),t=s,t!==a?(r.setValue(t),!0):!1}function yo(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var tw=/[\n"\\]/g;function Nn(t){return t.replace(tw,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Gu(t,r,a,s,d,m,k,D){t.name="",k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?t.type=k:t.removeAttribute("type"),r!=null?k==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+An(r)):t.value!==""+An(r)&&(t.value=""+An(r)):k!=="submit"&&k!=="reset"||t.removeAttribute("value"),r!=null?Yu(t,k,An(r)):a!=null?Yu(t,k,An(a)):s!=null&&t.removeAttribute("value"),d==null&&m!=null&&(t.defaultChecked=!!m),d!=null&&(t.checked=d&&typeof d!="function"&&typeof d!="symbol"),D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?t.name=""+An(D):t.removeAttribute("name")}function dp(t,r,a,s,d,m,k,D){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(t.type=m),r!=null||a!=null){if(!(m!=="submit"&&m!=="reset"||r!=null)){Vu(t);return}a=a!=null?""+An(a):"",r=r!=null?""+An(r):a,D||r===t.value||(t.value=r),t.defaultValue=r}s=s??d,s=typeof s!="function"&&typeof s!="symbol"&&!!s,t.checked=D?t.checked:!!s,t.defaultChecked=!!s,k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(t.name=k),Vu(t)}function Yu(t,r,a){r==="number"&&yo(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function Ki(t,r,a,s){if(t=t.options,r){r={};for(var d=0;d<a.length;d++)r["$"+a[d]]=!0;for(a=0;a<t.length;a++)d=r.hasOwnProperty("$"+t[a].value),t[a].selected!==d&&(t[a].selected=d),d&&s&&(t[a].defaultSelected=!0)}else{for(a=""+An(a),r=null,d=0;d<t.length;d++){if(t[d].value===a){t[d].selected=!0,s&&(t[d].defaultSelected=!0);return}r!==null||t[d].disabled||(r=t[d])}r!==null&&(r.selected=!0)}}function hp(t,r,a){if(r!=null&&(r=""+An(r),r!==t.value&&(t.value=r),a==null)){t.defaultValue!==r&&(t.defaultValue=r);return}t.defaultValue=a!=null?""+An(a):""}function pp(t,r,a,s){if(r==null){if(s!=null){if(a!=null)throw Error(l(92));if(G(s)){if(1<s.length)throw Error(l(93));s=s[0]}a=s}a==null&&(a=""),r=a}a=An(r),t.defaultValue=a,s=t.textContent,s===a&&s!==""&&s!==null&&(t.value=s),Vu(t)}function Qi(t,r){if(r){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=r;return}}t.textContent=r}var nw=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 mp(t,r,a){var s=r.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?s?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="":s?t.setProperty(r,a):typeof a!="number"||a===0||nw.has(r)?r==="float"?t.cssFloat=a:t[r]=(""+a).trim():t[r]=a+"px"}function gp(t,r,a){if(r!=null&&typeof r!="object")throw Error(l(62));if(t=t.style,a!=null){for(var s in a)!a.hasOwnProperty(s)||r!=null&&r.hasOwnProperty(s)||(s.indexOf("--")===0?t.setProperty(s,""):s==="float"?t.cssFloat="":t[s]="");for(var d in r)s=r[d],r.hasOwnProperty(d)&&a[d]!==s&&mp(t,d,s)}else for(var m in r)r.hasOwnProperty(m)&&mp(t,m,r[m])}function Xu(t){if(t.indexOf("-")===-1)return!1;switch(t){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 rw=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"]]),iw=/^[\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 xo(t){return iw.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function or(){}var Zu=null;function Ku(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Wi=null,Ji=null;function bp(t){var r=ir(t);if(r&&(t=r.stateNode)){var a=t[Ut]||null;e:switch(t=r.stateNode,r.type){case"input":if(Gu(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),r=a.name,a.type==="radio"&&r!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Nn(""+r)+'"][type="radio"]'),r=0;r<a.length;r++){var s=a[r];if(s!==t&&s.form===t.form){var d=s[Ut]||null;if(!d)throw Error(l(90));Gu(s,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(r=0;r<a.length;r++)s=a[r],s.form===t.form&&fp(s)}break e;case"textarea":hp(t,a.value,a.defaultValue);break e;case"select":r=a.value,r!=null&&Ki(t,!!a.multiple,r,!1)}}}var Qu=!1;function yp(t,r,a){if(Qu)return t(r,a);Qu=!0;try{var s=t(r);return s}finally{if(Qu=!1,(Wi!==null||Ji!==null)&&(as(),Wi&&(r=Wi,t=Ji,Ji=Wi=null,bp(r),t)))for(r=0;r<t.length;r++)bp(t[r])}}function Kl(t,r){var a=t.stateNode;if(a===null)return null;var s=a[Ut]||null;if(s===null)return null;a=s[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(t=t.type,s=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!s;break e;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error(l(231,r,typeof a));return a}var sr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Wu=!1;if(sr)try{var Ql={};Object.defineProperty(Ql,"passive",{get:function(){Wu=!0}}),window.addEventListener("test",Ql,Ql),window.removeEventListener("test",Ql,Ql)}catch{Wu=!1}var Dr=null,Ju=null,vo=null;function xp(){if(vo)return vo;var t,r=Ju,a=r.length,s,d="value"in Dr?Dr.value:Dr.textContent,m=d.length;for(t=0;t<a&&r[t]===d[t];t++);var k=a-t;for(s=1;s<=k&&r[a-s]===d[m-s];s++);return vo=d.slice(t,1<s?1-s:void 0)}function wo(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function So(){return!0}function vp(){return!1}function nn(t){function r(a,s,d,m,k){this._reactName=a,this._targetInst=d,this.type=s,this.nativeEvent=m,this.target=k,this.currentTarget=null;for(var D in t)t.hasOwnProperty(D)&&(a=t[D],this[D]=a?a(m):m[D]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?So:vp,this.isPropagationStopped=vp,this}return g(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=So)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=So)},persist:function(){},isPersistent:So}),r}var yi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ko=nn(yi),Wl=g({},yi,{view:0,detail:0}),lw=nn(Wl),ec,tc,Jl,Eo=g({},Wl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rc,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Jl&&(Jl&&t.type==="mousemove"?(ec=t.screenX-Jl.screenX,tc=t.screenY-Jl.screenY):tc=ec=0,Jl=t),ec)},movementY:function(t){return"movementY"in t?t.movementY:tc}}),wp=nn(Eo),aw=g({},Eo,{dataTransfer:0}),ow=nn(aw),sw=g({},Wl,{relatedTarget:0}),nc=nn(sw),uw=g({},yi,{animationName:0,elapsedTime:0,pseudoElement:0}),cw=nn(uw),fw=g({},yi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),dw=nn(fw),hw=g({},yi,{data:0}),Sp=nn(hw),pw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mw={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"},gw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bw(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=gw[t])?!!r[t]:!1}function rc(){return bw}var yw=g({},Wl,{key:function(t){if(t.key){var r=pw[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=wo(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?mw[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rc,charCode:function(t){return t.type==="keypress"?wo(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?wo(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),xw=nn(yw),vw=g({},Eo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),kp=nn(vw),ww=g({},Wl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rc}),Sw=nn(ww),kw=g({},yi,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ew=nn(kw),Cw=g({},Eo,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Aw=nn(Cw),Nw=g({},yi,{newState:0,oldState:0}),Tw=nn(Nw),Rw=[9,13,27,32],ic=sr&&"CompositionEvent"in window,ea=null;sr&&"documentMode"in document&&(ea=document.documentMode);var jw=sr&&"TextEvent"in window&&!ea,Ep=sr&&(!ic||ea&&8<ea&&11>=ea),Cp=" ",Ap=!1;function Np(t,r){switch(t){case"keyup":return Rw.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Tp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var el=!1;function _w(t,r){switch(t){case"compositionend":return Tp(r);case"keypress":return r.which!==32?null:(Ap=!0,Cp);case"textInput":return t=r.data,t===Cp&&Ap?null:t;default:return null}}function Lw(t,r){if(el)return t==="compositionend"||!ic&&Np(t,r)?(t=xp(),vo=Ju=Dr=null,el=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Ep&&r.locale!=="ko"?null:r.data;default:return null}}var Dw={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 Rp(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!Dw[t.type]:r==="textarea"}function jp(t,r,a,s){Wi?Ji?Ji.push(s):Ji=[s]:Wi=s,r=hs(r,"onChange"),0<r.length&&(a=new ko("onChange","change",null,a,s),t.push({event:a,listeners:r}))}var ta=null,na=null;function Mw(t){db(t,0)}function Co(t){var r=bi(t);if(fp(r))return t}function _p(t,r){if(t==="change")return r}var Lp=!1;if(sr){var lc;if(sr){var ac="oninput"in document;if(!ac){var Dp=document.createElement("div");Dp.setAttribute("oninput","return;"),ac=typeof Dp.oninput=="function"}lc=ac}else lc=!1;Lp=lc&&(!document.documentMode||9<document.documentMode)}function Mp(){ta&&(ta.detachEvent("onpropertychange",Op),na=ta=null)}function Op(t){if(t.propertyName==="value"&&Co(na)){var r=[];jp(r,na,t,Ku(t)),yp(Mw,r)}}function Ow(t,r,a){t==="focusin"?(Mp(),ta=r,na=a,ta.attachEvent("onpropertychange",Op)):t==="focusout"&&Mp()}function zw(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Co(na)}function Iw(t,r){if(t==="click")return Co(r)}function Fw(t,r){if(t==="input"||t==="change")return Co(r)}function Bw(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var hn=typeof Object.is=="function"?Object.is:Bw;function ra(t,r){if(hn(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var a=Object.keys(t),s=Object.keys(r);if(a.length!==s.length)return!1;for(s=0;s<a.length;s++){var d=a[s];if(!bt.call(r,d)||!hn(t[d],r[d]))return!1}return!0}function zp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Ip(t,r){var a=zp(t);t=0;for(var s;a;){if(a.nodeType===3){if(s=t+a.textContent.length,t<=r&&s>=r)return{node:a,offset:r-t};t=s}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=zp(a)}}function Fp(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?Fp(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function Bp(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var r=yo(t.document);r instanceof t.HTMLIFrameElement;){try{var a=typeof r.contentWindow.location.href=="string"}catch{a=!1}if(a)t=r.contentWindow;else break;r=yo(t.document)}return r}function oc(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}var Uw=sr&&"documentMode"in document&&11>=document.documentMode,tl=null,sc=null,ia=null,uc=!1;function Up(t,r,a){var s=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;uc||tl==null||tl!==yo(s)||(s=tl,"selectionStart"in s&&oc(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),ia&&ra(ia,s)||(ia=s,s=hs(sc,"onSelect"),0<s.length&&(r=new ko("onSelect","select",null,r,a),t.push({event:r,listeners:s}),r.target=tl)))}function xi(t,r){var a={};return a[t.toLowerCase()]=r.toLowerCase(),a["Webkit"+t]="webkit"+r,a["Moz"+t]="moz"+r,a}var nl={animationend:xi("Animation","AnimationEnd"),animationiteration:xi("Animation","AnimationIteration"),animationstart:xi("Animation","AnimationStart"),transitionrun:xi("Transition","TransitionRun"),transitionstart:xi("Transition","TransitionStart"),transitioncancel:xi("Transition","TransitionCancel"),transitionend:xi("Transition","TransitionEnd")},cc={},Hp={};sr&&(Hp=document.createElement("div").style,"AnimationEvent"in window||(delete nl.animationend.animation,delete nl.animationiteration.animation,delete nl.animationstart.animation),"TransitionEvent"in window||delete nl.transitionend.transition);function vi(t){if(cc[t])return cc[t];if(!nl[t])return t;var r=nl[t],a;for(a in r)if(r.hasOwnProperty(a)&&a in Hp)return cc[t]=r[a];return t}var $p=vi("animationend"),qp=vi("animationiteration"),Pp=vi("animationstart"),Hw=vi("transitionrun"),$w=vi("transitionstart"),qw=vi("transitioncancel"),Vp=vi("transitionend"),Gp=new Map,fc="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(" ");fc.push("scrollEnd");function Un(t,r){Gp.set(t,r),oe(r,[t])}var Ao=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Tn=[],rl=0,dc=0;function No(){for(var t=rl,r=dc=rl=0;r<t;){var a=Tn[r];Tn[r++]=null;var s=Tn[r];Tn[r++]=null;var d=Tn[r];Tn[r++]=null;var m=Tn[r];if(Tn[r++]=null,s!==null&&d!==null){var k=s.pending;k===null?d.next=d:(d.next=k.next,k.next=d),s.pending=d}m!==0&&Yp(a,d,m)}}function To(t,r,a,s){Tn[rl++]=t,Tn[rl++]=r,Tn[rl++]=a,Tn[rl++]=s,dc|=s,t.lanes|=s,t=t.alternate,t!==null&&(t.lanes|=s)}function hc(t,r,a,s){return To(t,r,a,s),Ro(t)}function wi(t,r){return To(t,null,null,r),Ro(t)}function Yp(t,r,a){t.lanes|=a;var s=t.alternate;s!==null&&(s.lanes|=a);for(var d=!1,m=t.return;m!==null;)m.childLanes|=a,s=m.alternate,s!==null&&(s.childLanes|=a),m.tag===22&&(t=m.stateNode,t===null||t._visibility&1||(d=!0)),t=m,m=m.return;return t.tag===3?(m=t.stateNode,d&&r!==null&&(d=31-We(a),t=m.hiddenUpdates,s=t[d],s===null?t[d]=[r]:s.push(r),r.lane=a|536870912),m):null}function Ro(t){if(50<Aa)throw Aa=0,kf=null,Error(l(185));for(var r=t.return;r!==null;)t=r,r=t.return;return t.tag===3?t.stateNode:null}var il={};function Pw(t,r,a,s){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pn(t,r,a,s){return new Pw(t,r,a,s)}function pc(t){return t=t.prototype,!(!t||!t.isReactComponent)}function ur(t,r){var a=t.alternate;return a===null?(a=pn(t.tag,r,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=r,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&65011712,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,r=t.dependencies,a.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a}function Xp(t,r){t.flags&=65011714;var a=t.alternate;return a===null?(t.childLanes=0,t.lanes=r,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=a.childLanes,t.lanes=a.lanes,t.child=a.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=a.memoizedProps,t.memoizedState=a.memoizedState,t.updateQueue=a.updateQueue,t.type=a.type,r=a.dependencies,t.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),t}function jo(t,r,a,s,d,m){var k=0;if(s=t,typeof t=="function")pc(t)&&(k=1);else if(typeof t=="string")k=Z2(t,a,J.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case O:return t=pn(31,a,r,d),t.elementType=O,t.lanes=m,t;case S:return Si(a.children,d,m,r);case A:k=8,d|=24;break;case C:return t=pn(12,a,r,d|2),t.elementType=C,t.lanes=m,t;case $:return t=pn(13,a,r,d),t.elementType=$,t.lanes=m,t;case _:return t=pn(19,a,r,d),t.elementType=_,t.lanes=m,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case R:k=10;break e;case E:k=9;break e;case z:k=11;break e;case F:k=14;break e;case P:k=16,s=null;break e}k=29,a=Error(l(130,t===null?"null":typeof t,"")),s=null}return r=pn(k,a,r,d),r.elementType=t,r.type=s,r.lanes=m,r}function Si(t,r,a,s){return t=pn(7,t,s,r),t.lanes=a,t}function mc(t,r,a){return t=pn(6,t,null,r),t.lanes=a,t}function Zp(t){var r=pn(18,null,null,0);return r.stateNode=t,r}function gc(t,r,a){return r=pn(4,t.children!==null?t.children:[],t.key,r),r.lanes=a,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}var Kp=new WeakMap;function Rn(t,r){if(typeof t=="object"&&t!==null){var a=Kp.get(t);return a!==void 0?a:(r={value:t,source:r,stack:pt(r)},Kp.set(t,r),r)}return{value:t,source:r,stack:pt(r)}}var ll=[],al=0,_o=null,la=0,jn=[],_n=0,Mr=null,Xn=1,Zn="";function cr(t,r){ll[al++]=la,ll[al++]=_o,_o=t,la=r}function Qp(t,r,a){jn[_n++]=Xn,jn[_n++]=Zn,jn[_n++]=Mr,Mr=t;var s=Xn;t=Zn;var d=32-We(s)-1;s&=~(1<<d),a+=1;var m=32-We(r)+d;if(30<m){var k=d-d%5;m=(s&(1<<k)-1).toString(32),s>>=k,d-=k,Xn=1<<32-We(r)+d|a<<d|s,Zn=m+t}else Xn=1<<m|a<<d|s,Zn=t}function bc(t){t.return!==null&&(cr(t,1),Qp(t,1,0))}function yc(t){for(;t===_o;)_o=ll[--al],ll[al]=null,la=ll[--al],ll[al]=null;for(;t===Mr;)Mr=jn[--_n],jn[_n]=null,Zn=jn[--_n],jn[_n]=null,Xn=jn[--_n],jn[_n]=null}function Wp(t,r){jn[_n++]=Xn,jn[_n++]=Zn,jn[_n++]=Mr,Xn=r.id,Zn=r.overflow,Mr=t}var Ot=null,ct=null,Ge=!1,Or=null,Ln=!1,xc=Error(l(519));function zr(t){var r=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw aa(Rn(r,t)),xc}function Jp(t){var r=t.stateNode,a=t.type,s=t.memoizedProps;switch(r[dt]=t,r[Ut]=s,a){case"dialog":Be("cancel",r),Be("close",r);break;case"iframe":case"object":case"embed":Be("load",r);break;case"video":case"audio":for(a=0;a<Ta.length;a++)Be(Ta[a],r);break;case"source":Be("error",r);break;case"img":case"image":case"link":Be("error",r),Be("load",r);break;case"details":Be("toggle",r);break;case"input":Be("invalid",r),dp(r,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Be("invalid",r);break;case"textarea":Be("invalid",r),pp(r,s.value,s.defaultValue,s.children)}a=s.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||r.textContent===""+a||s.suppressHydrationWarning===!0||gb(r.textContent,a)?(s.popover!=null&&(Be("beforetoggle",r),Be("toggle",r)),s.onScroll!=null&&Be("scroll",r),s.onScrollEnd!=null&&Be("scrollend",r),s.onClick!=null&&(r.onclick=or),r=!0):r=!1,r||zr(t,!0)}function em(t){for(Ot=t.return;Ot;)switch(Ot.tag){case 5:case 31:case 13:Ln=!1;return;case 27:case 3:Ln=!0;return;default:Ot=Ot.return}}function ol(t){if(t!==Ot)return!1;if(!Ge)return em(t),Ge=!0,!1;var r=t.tag,a;if((a=r!==3&&r!==27)&&((a=r===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||Ff(t.type,t.memoizedProps)),a=!a),a&&ct&&zr(t),em(t),r===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));ct=Cb(t)}else if(r===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));ct=Cb(t)}else r===27?(r=ct,Kr(t.type)?(t=qf,qf=null,ct=t):ct=r):ct=Ot?Mn(t.stateNode.nextSibling):null;return!0}function ki(){ct=Ot=null,Ge=!1}function vc(){var t=Or;return t!==null&&(on===null?on=t:on.push.apply(on,t),Or=null),t}function aa(t){Or===null?Or=[t]:Or.push(t)}var wc=j(null),Ei=null,fr=null;function Ir(t,r,a){T(wc,r._currentValue),r._currentValue=a}function dr(t){t._currentValue=wc.current,B(wc)}function Sc(t,r,a){for(;t!==null;){var s=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,s!==null&&(s.childLanes|=r)):s!==null&&(s.childLanes&r)!==r&&(s.childLanes|=r),t===a)break;t=t.return}}function kc(t,r,a,s){var d=t.child;for(d!==null&&(d.return=t);d!==null;){var m=d.dependencies;if(m!==null){var k=d.child;m=m.firstContext;e:for(;m!==null;){var D=m;m=d;for(var V=0;V<r.length;V++)if(D.context===r[V]){m.lanes|=a,D=m.alternate,D!==null&&(D.lanes|=a),Sc(m.return,a,t),s||(k=null);break e}m=D.next}}else if(d.tag===18){if(k=d.return,k===null)throw Error(l(341));k.lanes|=a,m=k.alternate,m!==null&&(m.lanes|=a),Sc(k,a,t),k=null}else k=d.child;if(k!==null)k.return=d;else for(k=d;k!==null;){if(k===t){k=null;break}if(d=k.sibling,d!==null){d.return=k.return,k=d;break}k=k.return}d=k}}function sl(t,r,a,s){t=null;for(var d=r,m=!1;d!==null;){if(!m){if((d.flags&524288)!==0)m=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var k=d.alternate;if(k===null)throw Error(l(387));if(k=k.memoizedProps,k!==null){var D=d.type;hn(d.pendingProps.value,k.value)||(t!==null?t.push(D):t=[D])}}else if(d===de.current){if(k=d.alternate,k===null)throw Error(l(387));k.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(t!==null?t.push(Da):t=[Da])}d=d.return}t!==null&&kc(r,t,a,s),r.flags|=262144}function Lo(t){for(t=t.firstContext;t!==null;){if(!hn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Ci(t){Ei=t,fr=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function zt(t){return tm(Ei,t)}function Do(t,r){return Ei===null&&Ci(t),tm(t,r)}function tm(t,r){var a=r._currentValue;if(r={context:r,memoizedValue:a,next:null},fr===null){if(t===null)throw Error(l(308));fr=r,t.dependencies={lanes:0,firstContext:r},t.flags|=524288}else fr=fr.next=r;return a}var Vw=typeof AbortController<"u"?AbortController:function(){var t=[],r=this.signal={aborted:!1,addEventListener:function(a,s){t.push(s)}};this.abort=function(){r.aborted=!0,t.forEach(function(a){return a()})}},Gw=e.unstable_scheduleCallback,Yw=e.unstable_NormalPriority,Et={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ec(){return{controller:new Vw,data:new Map,refCount:0}}function oa(t){t.refCount--,t.refCount===0&&Gw(Yw,function(){t.controller.abort()})}var sa=null,Cc=0,ul=0,cl=null;function Xw(t,r){if(sa===null){var a=sa=[];Cc=0,ul=Rf(),cl={status:"pending",value:void 0,then:function(s){a.push(s)}}}return Cc++,r.then(nm,nm),r}function nm(){if(--Cc===0&&sa!==null){cl!==null&&(cl.status="fulfilled");var t=sa;sa=null,ul=0,cl=null;for(var r=0;r<t.length;r++)(0,t[r])()}}function Zw(t,r){var a=[],s={status:"pending",value:null,reason:null,then:function(d){a.push(d)}};return t.then(function(){s.status="fulfilled",s.value=r;for(var d=0;d<a.length;d++)(0,a[d])(r)},function(d){for(s.status="rejected",s.reason=d,d=0;d<a.length;d++)(0,a[d])(void 0)}),s}var rm=H.S;H.S=function(t,r){Ug=at(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&Xw(t,r),rm!==null&&rm(t,r)};var Ai=j(null);function Ac(){var t=Ai.current;return t!==null?t:it.pooledCache}function Mo(t,r){r===null?T(Ai,Ai.current):T(Ai,r.pool)}function im(){var t=Ac();return t===null?null:{parent:Et._currentValue,pool:t}}var fl=Error(l(460)),Nc=Error(l(474)),Oo=Error(l(542)),zo={then:function(){}};function lm(t){return t=t.status,t==="fulfilled"||t==="rejected"}function am(t,r,a){switch(a=t[a],a===void 0?t.push(r):a!==r&&(r.then(or,or),r=a),r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,sm(t),t;default:if(typeof r.status=="string")r.then(or,or);else{if(t=it,t!==null&&100<t.shellSuspendCounter)throw Error(l(482));t=r,t.status="pending",t.then(function(s){if(r.status==="pending"){var d=r;d.status="fulfilled",d.value=s}},function(s){if(r.status==="pending"){var d=r;d.status="rejected",d.reason=s}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,sm(t),t}throw Ti=r,fl}}function Ni(t){try{var r=t._init;return r(t._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Ti=a,fl):a}}var Ti=null;function om(){if(Ti===null)throw Error(l(459));var t=Ti;return Ti=null,t}function sm(t){if(t===fl||t===Oo)throw Error(l(483))}var dl=null,ua=0;function Io(t){var r=ua;return ua+=1,dl===null&&(dl=[]),am(dl,t,r)}function ca(t,r){r=r.props.ref,t.ref=r!==void 0?r:null}function Fo(t,r){throw r.$$typeof===v?Error(l(525)):(t=Object.prototype.toString.call(r),Error(l(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t)))}function um(t){function r(Q,Z){if(t){var ee=Q.deletions;ee===null?(Q.deletions=[Z],Q.flags|=16):ee.push(Z)}}function a(Q,Z){if(!t)return null;for(;Z!==null;)r(Q,Z),Z=Z.sibling;return null}function s(Q){for(var Z=new Map;Q!==null;)Q.key!==null?Z.set(Q.key,Q):Z.set(Q.index,Q),Q=Q.sibling;return Z}function d(Q,Z){return Q=ur(Q,Z),Q.index=0,Q.sibling=null,Q}function m(Q,Z,ee){return Q.index=ee,t?(ee=Q.alternate,ee!==null?(ee=ee.index,ee<Z?(Q.flags|=67108866,Z):ee):(Q.flags|=67108866,Z)):(Q.flags|=1048576,Z)}function k(Q){return t&&Q.alternate===null&&(Q.flags|=67108866),Q}function D(Q,Z,ee,ue){return Z===null||Z.tag!==6?(Z=mc(ee,Q.mode,ue),Z.return=Q,Z):(Z=d(Z,ee),Z.return=Q,Z)}function V(Q,Z,ee,ue){var Ae=ee.type;return Ae===S?se(Q,Z,ee.props.children,ue,ee.key):Z!==null&&(Z.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===P&&Ni(Ae)===Z.type)?(Z=d(Z,ee.props),ca(Z,ee),Z.return=Q,Z):(Z=jo(ee.type,ee.key,ee.props,null,Q.mode,ue),ca(Z,ee),Z.return=Q,Z)}function te(Q,Z,ee,ue){return Z===null||Z.tag!==4||Z.stateNode.containerInfo!==ee.containerInfo||Z.stateNode.implementation!==ee.implementation?(Z=gc(ee,Q.mode,ue),Z.return=Q,Z):(Z=d(Z,ee.children||[]),Z.return=Q,Z)}function se(Q,Z,ee,ue,Ae){return Z===null||Z.tag!==7?(Z=Si(ee,Q.mode,ue,Ae),Z.return=Q,Z):(Z=d(Z,ee),Z.return=Q,Z)}function fe(Q,Z,ee){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Z=mc(""+Z,Q.mode,ee),Z.return=Q,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case x:return ee=jo(Z.type,Z.key,Z.props,null,Q.mode,ee),ca(ee,Z),ee.return=Q,ee;case w:return Z=gc(Z,Q.mode,ee),Z.return=Q,Z;case P:return Z=Ni(Z),fe(Q,Z,ee)}if(G(Z)||q(Z))return Z=Si(Z,Q.mode,ee,null),Z.return=Q,Z;if(typeof Z.then=="function")return fe(Q,Io(Z),ee);if(Z.$$typeof===R)return fe(Q,Do(Q,Z),ee);Fo(Q,Z)}return null}function re(Q,Z,ee,ue){var Ae=Z!==null?Z.key:null;if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return Ae!==null?null:D(Q,Z,""+ee,ue);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case x:return ee.key===Ae?V(Q,Z,ee,ue):null;case w:return ee.key===Ae?te(Q,Z,ee,ue):null;case P:return ee=Ni(ee),re(Q,Z,ee,ue)}if(G(ee)||q(ee))return Ae!==null?null:se(Q,Z,ee,ue,null);if(typeof ee.then=="function")return re(Q,Z,Io(ee),ue);if(ee.$$typeof===R)return re(Q,Z,Do(Q,ee),ue);Fo(Q,ee)}return null}function le(Q,Z,ee,ue,Ae){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return Q=Q.get(ee)||null,D(Z,Q,""+ue,Ae);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case x:return Q=Q.get(ue.key===null?ee:ue.key)||null,V(Z,Q,ue,Ae);case w:return Q=Q.get(ue.key===null?ee:ue.key)||null,te(Z,Q,ue,Ae);case P:return ue=Ni(ue),le(Q,Z,ee,ue,Ae)}if(G(ue)||q(ue))return Q=Q.get(ee)||null,se(Z,Q,ue,Ae,null);if(typeof ue.then=="function")return le(Q,Z,ee,Io(ue),Ae);if(ue.$$typeof===R)return le(Q,Z,ee,Do(Z,ue),Ae);Fo(Z,ue)}return null}function ke(Q,Z,ee,ue){for(var Ae=null,Xe=null,Ee=Z,Oe=Z=0,Ve=null;Ee!==null&&Oe<ee.length;Oe++){Ee.index>Oe?(Ve=Ee,Ee=null):Ve=Ee.sibling;var Ze=re(Q,Ee,ee[Oe],ue);if(Ze===null){Ee===null&&(Ee=Ve);break}t&&Ee&&Ze.alternate===null&&r(Q,Ee),Z=m(Ze,Z,Oe),Xe===null?Ae=Ze:Xe.sibling=Ze,Xe=Ze,Ee=Ve}if(Oe===ee.length)return a(Q,Ee),Ge&&cr(Q,Oe),Ae;if(Ee===null){for(;Oe<ee.length;Oe++)Ee=fe(Q,ee[Oe],ue),Ee!==null&&(Z=m(Ee,Z,Oe),Xe===null?Ae=Ee:Xe.sibling=Ee,Xe=Ee);return Ge&&cr(Q,Oe),Ae}for(Ee=s(Ee);Oe<ee.length;Oe++)Ve=le(Ee,Q,Oe,ee[Oe],ue),Ve!==null&&(t&&Ve.alternate!==null&&Ee.delete(Ve.key===null?Oe:Ve.key),Z=m(Ve,Z,Oe),Xe===null?Ae=Ve:Xe.sibling=Ve,Xe=Ve);return t&&Ee.forEach(function(ti){return r(Q,ti)}),Ge&&cr(Q,Oe),Ae}function je(Q,Z,ee,ue){if(ee==null)throw Error(l(151));for(var Ae=null,Xe=null,Ee=Z,Oe=Z=0,Ve=null,Ze=ee.next();Ee!==null&&!Ze.done;Oe++,Ze=ee.next()){Ee.index>Oe?(Ve=Ee,Ee=null):Ve=Ee.sibling;var ti=re(Q,Ee,Ze.value,ue);if(ti===null){Ee===null&&(Ee=Ve);break}t&&Ee&&ti.alternate===null&&r(Q,Ee),Z=m(ti,Z,Oe),Xe===null?Ae=ti:Xe.sibling=ti,Xe=ti,Ee=Ve}if(Ze.done)return a(Q,Ee),Ge&&cr(Q,Oe),Ae;if(Ee===null){for(;!Ze.done;Oe++,Ze=ee.next())Ze=fe(Q,Ze.value,ue),Ze!==null&&(Z=m(Ze,Z,Oe),Xe===null?Ae=Ze:Xe.sibling=Ze,Xe=Ze);return Ge&&cr(Q,Oe),Ae}for(Ee=s(Ee);!Ze.done;Oe++,Ze=ee.next())Ze=le(Ee,Q,Oe,Ze.value,ue),Ze!==null&&(t&&Ze.alternate!==null&&Ee.delete(Ze.key===null?Oe:Ze.key),Z=m(Ze,Z,Oe),Xe===null?Ae=Ze:Xe.sibling=Ze,Xe=Ze);return t&&Ee.forEach(function(aS){return r(Q,aS)}),Ge&&cr(Q,Oe),Ae}function rt(Q,Z,ee,ue){if(typeof ee=="object"&&ee!==null&&ee.type===S&&ee.key===null&&(ee=ee.props.children),typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case x:e:{for(var Ae=ee.key;Z!==null;){if(Z.key===Ae){if(Ae=ee.type,Ae===S){if(Z.tag===7){a(Q,Z.sibling),ue=d(Z,ee.props.children),ue.return=Q,Q=ue;break e}}else if(Z.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===P&&Ni(Ae)===Z.type){a(Q,Z.sibling),ue=d(Z,ee.props),ca(ue,ee),ue.return=Q,Q=ue;break e}a(Q,Z);break}else r(Q,Z);Z=Z.sibling}ee.type===S?(ue=Si(ee.props.children,Q.mode,ue,ee.key),ue.return=Q,Q=ue):(ue=jo(ee.type,ee.key,ee.props,null,Q.mode,ue),ca(ue,ee),ue.return=Q,Q=ue)}return k(Q);case w:e:{for(Ae=ee.key;Z!==null;){if(Z.key===Ae)if(Z.tag===4&&Z.stateNode.containerInfo===ee.containerInfo&&Z.stateNode.implementation===ee.implementation){a(Q,Z.sibling),ue=d(Z,ee.children||[]),ue.return=Q,Q=ue;break e}else{a(Q,Z);break}else r(Q,Z);Z=Z.sibling}ue=gc(ee,Q.mode,ue),ue.return=Q,Q=ue}return k(Q);case P:return ee=Ni(ee),rt(Q,Z,ee,ue)}if(G(ee))return ke(Q,Z,ee,ue);if(q(ee)){if(Ae=q(ee),typeof Ae!="function")throw Error(l(150));return ee=Ae.call(ee),je(Q,Z,ee,ue)}if(typeof ee.then=="function")return rt(Q,Z,Io(ee),ue);if(ee.$$typeof===R)return rt(Q,Z,Do(Q,ee),ue);Fo(Q,ee)}return typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint"?(ee=""+ee,Z!==null&&Z.tag===6?(a(Q,Z.sibling),ue=d(Z,ee),ue.return=Q,Q=ue):(a(Q,Z),ue=mc(ee,Q.mode,ue),ue.return=Q,Q=ue),k(Q)):a(Q,Z)}return function(Q,Z,ee,ue){try{ua=0;var Ae=rt(Q,Z,ee,ue);return dl=null,Ae}catch(Ee){if(Ee===fl||Ee===Oo)throw Ee;var Xe=pn(29,Ee,null,Q.mode);return Xe.lanes=ue,Xe.return=Q,Xe}}}var Ri=um(!0),cm=um(!1),Fr=!1;function Tc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Rc(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Br(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Ur(t,r,a){var s=t.updateQueue;if(s===null)return null;if(s=s.shared,(Ke&2)!==0){var d=s.pending;return d===null?r.next=r:(r.next=d.next,d.next=r),s.pending=r,r=Ro(t),Yp(t,null,a),r}return To(t,s,r,a),Ro(t)}function fa(t,r,a){if(r=r.updateQueue,r!==null&&(r=r.shared,(a&4194048)!==0)){var s=r.lanes;s&=t.pendingLanes,a|=s,r.lanes=a,Gi(t,a)}}function jc(t,r){var a=t.updateQueue,s=t.alternate;if(s!==null&&(s=s.updateQueue,a===s)){var d=null,m=null;if(a=a.firstBaseUpdate,a!==null){do{var k={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};m===null?d=m=k:m=m.next=k,a=a.next}while(a!==null);m===null?d=m=r:m=m.next=r}else d=m=r;a={baseState:s.baseState,firstBaseUpdate:d,lastBaseUpdate:m,shared:s.shared,callbacks:s.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=r:t.next=r,a.lastBaseUpdate=r}var _c=!1;function da(){if(_c){var t=cl;if(t!==null)throw t}}function ha(t,r,a,s){_c=!1;var d=t.updateQueue;Fr=!1;var m=d.firstBaseUpdate,k=d.lastBaseUpdate,D=d.shared.pending;if(D!==null){d.shared.pending=null;var V=D,te=V.next;V.next=null,k===null?m=te:k.next=te,k=V;var se=t.alternate;se!==null&&(se=se.updateQueue,D=se.lastBaseUpdate,D!==k&&(D===null?se.firstBaseUpdate=te:D.next=te,se.lastBaseUpdate=V))}if(m!==null){var fe=d.baseState;k=0,se=te=V=null,D=m;do{var re=D.lane&-536870913,le=re!==D.lane;if(le?(Pe&re)===re:(s&re)===re){re!==0&&re===ul&&(_c=!0),se!==null&&(se=se.next={lane:0,tag:D.tag,payload:D.payload,callback:null,next:null});e:{var ke=t,je=D;re=r;var rt=a;switch(je.tag){case 1:if(ke=je.payload,typeof ke=="function"){fe=ke.call(rt,fe,re);break e}fe=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=je.payload,re=typeof ke=="function"?ke.call(rt,fe,re):ke,re==null)break e;fe=g({},fe,re);break e;case 2:Fr=!0}}re=D.callback,re!==null&&(t.flags|=64,le&&(t.flags|=8192),le=d.callbacks,le===null?d.callbacks=[re]:le.push(re))}else le={lane:re,tag:D.tag,payload:D.payload,callback:D.callback,next:null},se===null?(te=se=le,V=fe):se=se.next=le,k|=re;if(D=D.next,D===null){if(D=d.shared.pending,D===null)break;le=D,D=le.next,le.next=null,d.lastBaseUpdate=le,d.shared.pending=null}}while(!0);se===null&&(V=fe),d.baseState=V,d.firstBaseUpdate=te,d.lastBaseUpdate=se,m===null&&(d.shared.lanes=0),Vr|=k,t.lanes=k,t.memoizedState=fe}}function fm(t,r){if(typeof t!="function")throw Error(l(191,t));t.call(r)}function dm(t,r){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)fm(a[t],r)}var hl=j(null),Bo=j(0);function hm(t,r){t=wr,T(Bo,t),T(hl,r),wr=t|r.baseLanes}function Lc(){T(Bo,wr),T(hl,hl.current)}function Dc(){wr=Bo.current,B(hl),B(Bo)}var mn=j(null),Dn=null;function Hr(t){var r=t.alternate;T(wt,wt.current&1),T(mn,t),Dn===null&&(r===null||hl.current!==null||r.memoizedState!==null)&&(Dn=t)}function Mc(t){T(wt,wt.current),T(mn,t),Dn===null&&(Dn=t)}function pm(t){t.tag===22?(T(wt,wt.current),T(mn,t),Dn===null&&(Dn=t)):$r()}function $r(){T(wt,wt.current),T(mn,mn.current)}function gn(t){B(mn),Dn===t&&(Dn=null),B(wt)}var wt=j(0);function Uo(t){for(var r=t;r!==null;){if(r.tag===13){var a=r.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Hf(a)||$f(a)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var hr=0,Me=null,tt=null,Ct=null,Ho=!1,pl=!1,ji=!1,$o=0,pa=0,ml=null,Kw=0;function xt(){throw Error(l(321))}function Oc(t,r){if(r===null)return!1;for(var a=0;a<r.length&&a<t.length;a++)if(!hn(t[a],r[a]))return!1;return!0}function zc(t,r,a,s,d,m){return hr=m,Me=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,H.H=t===null||t.memoizedState===null?Qm:Qc,ji=!1,m=a(s,d),ji=!1,pl&&(m=gm(r,a,s,d)),mm(t),m}function mm(t){H.H=ba;var r=tt!==null&&tt.next!==null;if(hr=0,Ct=tt=Me=null,Ho=!1,pa=0,ml=null,r)throw Error(l(300));t===null||At||(t=t.dependencies,t!==null&&Lo(t)&&(At=!0))}function gm(t,r,a,s){Me=t;var d=0;do{if(pl&&(ml=null),pa=0,pl=!1,25<=d)throw Error(l(301));if(d+=1,Ct=tt=null,t.updateQueue!=null){var m=t.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}H.H=Wm,m=r(a,s)}while(pl);return m}function Qw(){var t=H.H,r=t.useState()[0];return r=typeof r.then=="function"?ma(r):r,t=t.useState()[0],(tt!==null?tt.memoizedState:null)!==t&&(Me.flags|=1024),r}function Ic(){var t=$o!==0;return $o=0,t}function Fc(t,r,a){r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~a}function Bc(t){if(Ho){for(t=t.memoizedState;t!==null;){var r=t.queue;r!==null&&(r.pending=null),t=t.next}Ho=!1}hr=0,Ct=tt=Me=null,pl=!1,pa=$o=0,ml=null}function Zt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ct===null?Me.memoizedState=Ct=t:Ct=Ct.next=t,Ct}function St(){if(tt===null){var t=Me.alternate;t=t!==null?t.memoizedState:null}else t=tt.next;var r=Ct===null?Me.memoizedState:Ct.next;if(r!==null)Ct=r,tt=t;else{if(t===null)throw Me.alternate===null?Error(l(467)):Error(l(310));tt=t,t={memoizedState:tt.memoizedState,baseState:tt.baseState,baseQueue:tt.baseQueue,queue:tt.queue,next:null},Ct===null?Me.memoizedState=Ct=t:Ct=Ct.next=t}return Ct}function qo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ma(t){var r=pa;return pa+=1,ml===null&&(ml=[]),t=am(ml,t,r),r=Me,(Ct===null?r.memoizedState:Ct.next)===null&&(r=r.alternate,H.H=r===null||r.memoizedState===null?Qm:Qc),t}function Po(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return ma(t);if(t.$$typeof===R)return zt(t)}throw Error(l(438,String(t)))}function Uc(t){var r=null,a=Me.updateQueue;if(a!==null&&(r=a.memoCache),r==null){var s=Me.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(r={data:s.data.map(function(d){return d.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),a===null&&(a=qo(),Me.updateQueue=a),a.memoCache=r,a=r.data[r.index],a===void 0)for(a=r.data[r.index]=Array(t),s=0;s<t;s++)a[s]=L;return r.index++,a}function pr(t,r){return typeof r=="function"?r(t):r}function Vo(t){var r=St();return Hc(r,tt,t)}function Hc(t,r,a){var s=t.queue;if(s===null)throw Error(l(311));s.lastRenderedReducer=a;var d=t.baseQueue,m=s.pending;if(m!==null){if(d!==null){var k=d.next;d.next=m.next,m.next=k}r.baseQueue=d=m,s.pending=null}if(m=t.baseState,d===null)t.memoizedState=m;else{r=d.next;var D=k=null,V=null,te=r,se=!1;do{var fe=te.lane&-536870913;if(fe!==te.lane?(Pe&fe)===fe:(hr&fe)===fe){var re=te.revertLane;if(re===0)V!==null&&(V=V.next={lane:0,revertLane:0,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),fe===ul&&(se=!0);else if((hr&re)===re){te=te.next,re===ul&&(se=!0);continue}else fe={lane:0,revertLane:te.revertLane,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},V===null?(D=V=fe,k=m):V=V.next=fe,Me.lanes|=re,Vr|=re;fe=te.action,ji&&a(m,fe),m=te.hasEagerState?te.eagerState:a(m,fe)}else re={lane:fe,revertLane:te.revertLane,gesture:te.gesture,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},V===null?(D=V=re,k=m):V=V.next=re,Me.lanes|=fe,Vr|=fe;te=te.next}while(te!==null&&te!==r);if(V===null?k=m:V.next=D,!hn(m,t.memoizedState)&&(At=!0,se&&(a=cl,a!==null)))throw a;t.memoizedState=m,t.baseState=k,t.baseQueue=V,s.lastRenderedState=m}return d===null&&(s.lanes=0),[t.memoizedState,s.dispatch]}function $c(t){var r=St(),a=r.queue;if(a===null)throw Error(l(311));a.lastRenderedReducer=t;var s=a.dispatch,d=a.pending,m=r.memoizedState;if(d!==null){a.pending=null;var k=d=d.next;do m=t(m,k.action),k=k.next;while(k!==d);hn(m,r.memoizedState)||(At=!0),r.memoizedState=m,r.baseQueue===null&&(r.baseState=m),a.lastRenderedState=m}return[m,s]}function bm(t,r,a){var s=Me,d=St(),m=Ge;if(m){if(a===void 0)throw Error(l(407));a=a()}else a=r();var k=!hn((tt||d).memoizedState,a);if(k&&(d.memoizedState=a,At=!0),d=d.queue,Vc(vm.bind(null,s,d,t),[t]),d.getSnapshot!==r||k||Ct!==null&&Ct.memoizedState.tag&1){if(s.flags|=2048,gl(9,{destroy:void 0},xm.bind(null,s,d,a,r),null),it===null)throw Error(l(349));m||(hr&127)!==0||ym(s,r,a)}return a}function ym(t,r,a){t.flags|=16384,t={getSnapshot:r,value:a},r=Me.updateQueue,r===null?(r=qo(),Me.updateQueue=r,r.stores=[t]):(a=r.stores,a===null?r.stores=[t]:a.push(t))}function xm(t,r,a,s){r.value=a,r.getSnapshot=s,wm(r)&&Sm(t)}function vm(t,r,a){return a(function(){wm(r)&&Sm(t)})}function wm(t){var r=t.getSnapshot;t=t.value;try{var a=r();return!hn(t,a)}catch{return!0}}function Sm(t){var r=wi(t,2);r!==null&&sn(r,t,2)}function qc(t){var r=Zt();if(typeof t=="function"){var a=t;if(t=a(),ji){_t(!0);try{a()}finally{_t(!1)}}}return r.memoizedState=r.baseState=t,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pr,lastRenderedState:t},r}function km(t,r,a,s){return t.baseState=a,Hc(t,tt,typeof s=="function"?s:pr)}function Ww(t,r,a,s,d){if(Xo(t))throw Error(l(485));if(t=r.action,t!==null){var m={payload:d,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(k){m.listeners.push(k)}};H.T!==null?a(!0):m.isTransition=!1,s(m),a=r.pending,a===null?(m.next=r.pending=m,Em(r,m)):(m.next=a.next,r.pending=a.next=m)}}function Em(t,r){var a=r.action,s=r.payload,d=t.state;if(r.isTransition){var m=H.T,k={};H.T=k;try{var D=a(d,s),V=H.S;V!==null&&V(k,D),Cm(t,r,D)}catch(te){Pc(t,r,te)}finally{m!==null&&k.types!==null&&(m.types=k.types),H.T=m}}else try{m=a(d,s),Cm(t,r,m)}catch(te){Pc(t,r,te)}}function Cm(t,r,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(s){Am(t,r,s)},function(s){return Pc(t,r,s)}):Am(t,r,a)}function Am(t,r,a){r.status="fulfilled",r.value=a,Nm(r),t.state=a,r=t.pending,r!==null&&(a=r.next,a===r?t.pending=null:(a=a.next,r.next=a,Em(t,a)))}function Pc(t,r,a){var s=t.pending;if(t.pending=null,s!==null){s=s.next;do r.status="rejected",r.reason=a,Nm(r),r=r.next;while(r!==s)}t.action=null}function Nm(t){t=t.listeners;for(var r=0;r<t.length;r++)(0,t[r])()}function Tm(t,r){return r}function Rm(t,r){if(Ge){var a=it.formState;if(a!==null){e:{var s=Me;if(Ge){if(ct){t:{for(var d=ct,m=Ln;d.nodeType!==8;){if(!m){d=null;break t}if(d=Mn(d.nextSibling),d===null){d=null;break t}}m=d.data,d=m==="F!"||m==="F"?d:null}if(d){ct=Mn(d.nextSibling),s=d.data==="F!";break e}}zr(s)}s=!1}s&&(r=a[0])}}return a=Zt(),a.memoizedState=a.baseState=r,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Tm,lastRenderedState:r},a.queue=s,a=Xm.bind(null,Me,s),s.dispatch=a,s=qc(!1),m=Kc.bind(null,Me,!1,s.queue),s=Zt(),d={state:r,dispatch:null,action:t,pending:null},s.queue=d,a=Ww.bind(null,Me,d,m,a),d.dispatch=a,s.memoizedState=t,[r,a,!1]}function jm(t){var r=St();return _m(r,tt,t)}function _m(t,r,a){if(r=Hc(t,r,Tm)[0],t=Vo(pr)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var s=ma(r)}catch(k){throw k===fl?Oo:k}else s=r;r=St();var d=r.queue,m=d.dispatch;return a!==r.memoizedState&&(Me.flags|=2048,gl(9,{destroy:void 0},Jw.bind(null,d,a),null)),[s,m,t]}function Jw(t,r){t.action=r}function Lm(t){var r=St(),a=tt;if(a!==null)return _m(r,a,t);St(),r=r.memoizedState,a=St();var s=a.queue.dispatch;return a.memoizedState=t,[r,s,!1]}function gl(t,r,a,s){return t={tag:t,create:a,deps:s,inst:r,next:null},r=Me.updateQueue,r===null&&(r=qo(),Me.updateQueue=r),a=r.lastEffect,a===null?r.lastEffect=t.next=t:(s=a.next,a.next=t,t.next=s,r.lastEffect=t),t}function Dm(){return St().memoizedState}function Go(t,r,a,s){var d=Zt();Me.flags|=t,d.memoizedState=gl(1|r,{destroy:void 0},a,s===void 0?null:s)}function Yo(t,r,a,s){var d=St();s=s===void 0?null:s;var m=d.memoizedState.inst;tt!==null&&s!==null&&Oc(s,tt.memoizedState.deps)?d.memoizedState=gl(r,m,a,s):(Me.flags|=t,d.memoizedState=gl(1|r,m,a,s))}function Mm(t,r){Go(8390656,8,t,r)}function Vc(t,r){Yo(2048,8,t,r)}function e2(t){Me.flags|=4;var r=Me.updateQueue;if(r===null)r=qo(),Me.updateQueue=r,r.events=[t];else{var a=r.events;a===null?r.events=[t]:a.push(t)}}function Om(t){var r=St().memoizedState;return e2({ref:r,nextImpl:t}),function(){if((Ke&2)!==0)throw Error(l(440));return r.impl.apply(void 0,arguments)}}function zm(t,r){return Yo(4,2,t,r)}function Im(t,r){return Yo(4,4,t,r)}function Fm(t,r){if(typeof r=="function"){t=t();var a=r(t);return function(){typeof a=="function"?a():r(null)}}if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function Bm(t,r,a){a=a!=null?a.concat([t]):null,Yo(4,4,Fm.bind(null,r,t),a)}function Gc(){}function Um(t,r){var a=St();r=r===void 0?null:r;var s=a.memoizedState;return r!==null&&Oc(r,s[1])?s[0]:(a.memoizedState=[t,r],t)}function Hm(t,r){var a=St();r=r===void 0?null:r;var s=a.memoizedState;if(r!==null&&Oc(r,s[1]))return s[0];if(s=t(),ji){_t(!0);try{t()}finally{_t(!1)}}return a.memoizedState=[s,r],s}function Yc(t,r,a){return a===void 0||(hr&1073741824)!==0&&(Pe&261930)===0?t.memoizedState=r:(t.memoizedState=a,t=$g(),Me.lanes|=t,Vr|=t,a)}function $m(t,r,a,s){return hn(a,r)?a:hl.current!==null?(t=Yc(t,a,s),hn(t,r)||(At=!0),t):(hr&42)===0||(hr&1073741824)!==0&&(Pe&261930)===0?(At=!0,t.memoizedState=a):(t=$g(),Me.lanes|=t,Vr|=t,r)}function qm(t,r,a,s,d){var m=X.p;X.p=m!==0&&8>m?m:8;var k=H.T,D={};H.T=D,Kc(t,!1,r,a);try{var V=d(),te=H.S;if(te!==null&&te(D,V),V!==null&&typeof V=="object"&&typeof V.then=="function"){var se=Zw(V,s);ga(t,r,se,xn(t))}else ga(t,r,s,xn(t))}catch(fe){ga(t,r,{then:function(){},status:"rejected",reason:fe},xn())}finally{X.p=m,k!==null&&D.types!==null&&(k.types=D.types),H.T=k}}function t2(){}function Xc(t,r,a,s){if(t.tag!==5)throw Error(l(476));var d=Pm(t).queue;qm(t,d,r,Y,a===null?t2:function(){return Vm(t),a(s)})}function Pm(t){var r=t.memoizedState;if(r!==null)return r;r={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pr,lastRenderedState:Y},next:null};var a={};return r.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pr,lastRenderedState:a},next:null},t.memoizedState=r,t=t.alternate,t!==null&&(t.memoizedState=r),r}function Vm(t){var r=Pm(t);r.next===null&&(r=t.alternate.memoizedState),ga(t,r.next.queue,{},xn())}function Zc(){return zt(Da)}function Gm(){return St().memoizedState}function Ym(){return St().memoizedState}function n2(t){for(var r=t.return;r!==null;){switch(r.tag){case 24:case 3:var a=xn();t=Br(a);var s=Ur(r,t,a);s!==null&&(sn(s,r,a),fa(s,r,a)),r={cache:Ec()},t.payload=r;return}r=r.return}}function r2(t,r,a){var s=xn();a={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Xo(t)?Zm(r,a):(a=hc(t,r,a,s),a!==null&&(sn(a,t,s),Km(a,r,s)))}function Xm(t,r,a){var s=xn();ga(t,r,a,s)}function ga(t,r,a,s){var d={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Xo(t))Zm(r,d);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=r.lastRenderedReducer,m!==null))try{var k=r.lastRenderedState,D=m(k,a);if(d.hasEagerState=!0,d.eagerState=D,hn(D,k))return To(t,r,d,0),it===null&&No(),!1}catch{}if(a=hc(t,r,d,s),a!==null)return sn(a,t,s),Km(a,r,s),!0}return!1}function Kc(t,r,a,s){if(s={lane:2,revertLane:Rf(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Xo(t)){if(r)throw Error(l(479))}else r=hc(t,a,s,2),r!==null&&sn(r,t,2)}function Xo(t){var r=t.alternate;return t===Me||r!==null&&r===Me}function Zm(t,r){pl=Ho=!0;var a=t.pending;a===null?r.next=r:(r.next=a.next,a.next=r),t.pending=r}function Km(t,r,a){if((a&4194048)!==0){var s=r.lanes;s&=t.pendingLanes,a|=s,r.lanes=a,Gi(t,a)}}var ba={readContext:zt,use:Po,useCallback:xt,useContext:xt,useEffect:xt,useImperativeHandle:xt,useLayoutEffect:xt,useInsertionEffect:xt,useMemo:xt,useReducer:xt,useRef:xt,useState:xt,useDebugValue:xt,useDeferredValue:xt,useTransition:xt,useSyncExternalStore:xt,useId:xt,useHostTransitionStatus:xt,useFormState:xt,useActionState:xt,useOptimistic:xt,useMemoCache:xt,useCacheRefresh:xt};ba.useEffectEvent=xt;var Qm={readContext:zt,use:Po,useCallback:function(t,r){return Zt().memoizedState=[t,r===void 0?null:r],t},useContext:zt,useEffect:Mm,useImperativeHandle:function(t,r,a){a=a!=null?a.concat([t]):null,Go(4194308,4,Fm.bind(null,r,t),a)},useLayoutEffect:function(t,r){return Go(4194308,4,t,r)},useInsertionEffect:function(t,r){Go(4,2,t,r)},useMemo:function(t,r){var a=Zt();r=r===void 0?null:r;var s=t();if(ji){_t(!0);try{t()}finally{_t(!1)}}return a.memoizedState=[s,r],s},useReducer:function(t,r,a){var s=Zt();if(a!==void 0){var d=a(r);if(ji){_t(!0);try{a(r)}finally{_t(!1)}}}else d=r;return s.memoizedState=s.baseState=d,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:d},s.queue=t,t=t.dispatch=r2.bind(null,Me,t),[s.memoizedState,t]},useRef:function(t){var r=Zt();return t={current:t},r.memoizedState=t},useState:function(t){t=qc(t);var r=t.queue,a=Xm.bind(null,Me,r);return r.dispatch=a,[t.memoizedState,a]},useDebugValue:Gc,useDeferredValue:function(t,r){var a=Zt();return Yc(a,t,r)},useTransition:function(){var t=qc(!1);return t=qm.bind(null,Me,t.queue,!0,!1),Zt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,r,a){var s=Me,d=Zt();if(Ge){if(a===void 0)throw Error(l(407));a=a()}else{if(a=r(),it===null)throw Error(l(349));(Pe&127)!==0||ym(s,r,a)}d.memoizedState=a;var m={value:a,getSnapshot:r};return d.queue=m,Mm(vm.bind(null,s,m,t),[t]),s.flags|=2048,gl(9,{destroy:void 0},xm.bind(null,s,m,a,r),null),a},useId:function(){var t=Zt(),r=it.identifierPrefix;if(Ge){var a=Zn,s=Xn;a=(s&~(1<<32-We(s)-1)).toString(32)+a,r="_"+r+"R_"+a,a=$o++,0<a&&(r+="H"+a.toString(32)),r+="_"}else a=Kw++,r="_"+r+"r_"+a.toString(32)+"_";return t.memoizedState=r},useHostTransitionStatus:Zc,useFormState:Rm,useActionState:Rm,useOptimistic:function(t){var r=Zt();r.memoizedState=r.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=a,r=Kc.bind(null,Me,!0,a),a.dispatch=r,[t,r]},useMemoCache:Uc,useCacheRefresh:function(){return Zt().memoizedState=n2.bind(null,Me)},useEffectEvent:function(t){var r=Zt(),a={impl:t};return r.memoizedState=a,function(){if((Ke&2)!==0)throw Error(l(440));return a.impl.apply(void 0,arguments)}}},Qc={readContext:zt,use:Po,useCallback:Um,useContext:zt,useEffect:Vc,useImperativeHandle:Bm,useInsertionEffect:zm,useLayoutEffect:Im,useMemo:Hm,useReducer:Vo,useRef:Dm,useState:function(){return Vo(pr)},useDebugValue:Gc,useDeferredValue:function(t,r){var a=St();return $m(a,tt.memoizedState,t,r)},useTransition:function(){var t=Vo(pr)[0],r=St().memoizedState;return[typeof t=="boolean"?t:ma(t),r]},useSyncExternalStore:bm,useId:Gm,useHostTransitionStatus:Zc,useFormState:jm,useActionState:jm,useOptimistic:function(t,r){var a=St();return km(a,tt,t,r)},useMemoCache:Uc,useCacheRefresh:Ym};Qc.useEffectEvent=Om;var Wm={readContext:zt,use:Po,useCallback:Um,useContext:zt,useEffect:Vc,useImperativeHandle:Bm,useInsertionEffect:zm,useLayoutEffect:Im,useMemo:Hm,useReducer:$c,useRef:Dm,useState:function(){return $c(pr)},useDebugValue:Gc,useDeferredValue:function(t,r){var a=St();return tt===null?Yc(a,t,r):$m(a,tt.memoizedState,t,r)},useTransition:function(){var t=$c(pr)[0],r=St().memoizedState;return[typeof t=="boolean"?t:ma(t),r]},useSyncExternalStore:bm,useId:Gm,useHostTransitionStatus:Zc,useFormState:Lm,useActionState:Lm,useOptimistic:function(t,r){var a=St();return tt!==null?km(a,tt,t,r):(a.baseState=t,[t,a.queue.dispatch])},useMemoCache:Uc,useCacheRefresh:Ym};Wm.useEffectEvent=Om;function Wc(t,r,a,s){r=t.memoizedState,a=a(s,r),a=a==null?r:g({},r,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var Jc={enqueueSetState:function(t,r,a){t=t._reactInternals;var s=xn(),d=Br(s);d.payload=r,a!=null&&(d.callback=a),r=Ur(t,d,s),r!==null&&(sn(r,t,s),fa(r,t,s))},enqueueReplaceState:function(t,r,a){t=t._reactInternals;var s=xn(),d=Br(s);d.tag=1,d.payload=r,a!=null&&(d.callback=a),r=Ur(t,d,s),r!==null&&(sn(r,t,s),fa(r,t,s))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var a=xn(),s=Br(a);s.tag=2,r!=null&&(s.callback=r),r=Ur(t,s,a),r!==null&&(sn(r,t,a),fa(r,t,a))}};function Jm(t,r,a,s,d,m,k){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(s,m,k):r.prototype&&r.prototype.isPureReactComponent?!ra(a,s)||!ra(d,m):!0}function eg(t,r,a,s){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(a,s),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(a,s),r.state!==t&&Jc.enqueueReplaceState(r,r.state,null)}function _i(t,r){var a=r;if("ref"in r){a={};for(var s in r)s!=="ref"&&(a[s]=r[s])}if(t=t.defaultProps){a===r&&(a=g({},a));for(var d in t)a[d]===void 0&&(a[d]=t[d])}return a}function tg(t){Ao(t)}function ng(t){console.error(t)}function rg(t){Ao(t)}function Zo(t,r){try{var a=t.onUncaughtError;a(r.value,{componentStack:r.stack})}catch(s){setTimeout(function(){throw s})}}function ig(t,r,a){try{var s=t.onCaughtError;s(a.value,{componentStack:a.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function ef(t,r,a){return a=Br(a),a.tag=3,a.payload={element:null},a.callback=function(){Zo(t,r)},a}function lg(t){return t=Br(t),t.tag=3,t}function ag(t,r,a,s){var d=a.type.getDerivedStateFromError;if(typeof d=="function"){var m=s.value;t.payload=function(){return d(m)},t.callback=function(){ig(r,a,s)}}var k=a.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(t.callback=function(){ig(r,a,s),typeof d!="function"&&(Gr===null?Gr=new Set([this]):Gr.add(this));var D=s.stack;this.componentDidCatch(s.value,{componentStack:D!==null?D:""})})}function i2(t,r,a,s,d){if(a.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(r=a.alternate,r!==null&&sl(r,a,d,!0),a=mn.current,a!==null){switch(a.tag){case 31:case 13:return Dn===null?os():a.alternate===null&&vt===0&&(vt=3),a.flags&=-257,a.flags|=65536,a.lanes=d,s===zo?a.flags|=16384:(r=a.updateQueue,r===null?a.updateQueue=new Set([s]):r.add(s),Af(t,s,d)),!1;case 22:return a.flags|=65536,s===zo?a.flags|=16384:(r=a.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([s])},a.updateQueue=r):(a=r.retryQueue,a===null?r.retryQueue=new Set([s]):a.add(s)),Af(t,s,d)),!1}throw Error(l(435,a.tag))}return Af(t,s,d),os(),!1}if(Ge)return r=mn.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=d,s!==xc&&(t=Error(l(422),{cause:s}),aa(Rn(t,a)))):(s!==xc&&(r=Error(l(423),{cause:s}),aa(Rn(r,a))),t=t.current.alternate,t.flags|=65536,d&=-d,t.lanes|=d,s=Rn(s,a),d=ef(t.stateNode,s,d),jc(t,d),vt!==4&&(vt=2)),!1;var m=Error(l(520),{cause:s});if(m=Rn(m,a),Ca===null?Ca=[m]:Ca.push(m),vt!==4&&(vt=2),r===null)return!0;s=Rn(s,a),a=r;do{switch(a.tag){case 3:return a.flags|=65536,t=d&-d,a.lanes|=t,t=ef(a.stateNode,s,t),jc(a,t),!1;case 1:if(r=a.type,m=a.stateNode,(a.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Gr===null||!Gr.has(m))))return a.flags|=65536,d&=-d,a.lanes|=d,d=lg(d),ag(d,t,a,s),jc(a,d),!1}a=a.return}while(a!==null);return!1}var tf=Error(l(461)),At=!1;function It(t,r,a,s){r.child=t===null?cm(r,null,a,s):Ri(r,t.child,a,s)}function og(t,r,a,s,d){a=a.render;var m=r.ref;if("ref"in s){var k={};for(var D in s)D!=="ref"&&(k[D]=s[D])}else k=s;return Ci(r),s=zc(t,r,a,k,m,d),D=Ic(),t!==null&&!At?(Fc(t,r,d),mr(t,r,d)):(Ge&&D&&bc(r),r.flags|=1,It(t,r,s,d),r.child)}function sg(t,r,a,s,d){if(t===null){var m=a.type;return typeof m=="function"&&!pc(m)&&m.defaultProps===void 0&&a.compare===null?(r.tag=15,r.type=m,ug(t,r,m,s,d)):(t=jo(a.type,null,s,r,r.mode,d),t.ref=r.ref,t.return=r,r.child=t)}if(m=t.child,!cf(t,d)){var k=m.memoizedProps;if(a=a.compare,a=a!==null?a:ra,a(k,s)&&t.ref===r.ref)return mr(t,r,d)}return r.flags|=1,t=ur(m,s),t.ref=r.ref,t.return=r,r.child=t}function ug(t,r,a,s,d){if(t!==null){var m=t.memoizedProps;if(ra(m,s)&&t.ref===r.ref)if(At=!1,r.pendingProps=s=m,cf(t,d))(t.flags&131072)!==0&&(At=!0);else return r.lanes=t.lanes,mr(t,r,d)}return nf(t,r,a,s,d)}function cg(t,r,a,s){var d=s.children,m=t!==null?t.memoizedState:null;if(t===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((r.flags&128)!==0){if(m=m!==null?m.baseLanes|a:a,t!==null){for(s=r.child=t.child,d=0;s!==null;)d=d|s.lanes|s.childLanes,s=s.sibling;s=d&~m}else s=0,r.child=null;return fg(t,r,m,a,s)}if((a&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},t!==null&&Mo(r,m!==null?m.cachePool:null),m!==null?hm(r,m):Lc(),pm(r);else return s=r.lanes=536870912,fg(t,r,m!==null?m.baseLanes|a:a,a,s)}else m!==null?(Mo(r,m.cachePool),hm(r,m),$r(),r.memoizedState=null):(t!==null&&Mo(r,null),Lc(),$r());return It(t,r,d,a),r.child}function ya(t,r){return t!==null&&t.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function fg(t,r,a,s,d){var m=Ac();return m=m===null?null:{parent:Et._currentValue,pool:m},r.memoizedState={baseLanes:a,cachePool:m},t!==null&&Mo(r,null),Lc(),pm(r),t!==null&&sl(t,r,s,!0),r.childLanes=d,null}function Ko(t,r){return r=Wo({mode:r.mode,children:r.children},t.mode),r.ref=t.ref,t.child=r,r.return=t,r}function dg(t,r,a){return Ri(r,t.child,null,a),t=Ko(r,r.pendingProps),t.flags|=2,gn(r),r.memoizedState=null,t}function l2(t,r,a){var s=r.pendingProps,d=(r.flags&128)!==0;if(r.flags&=-129,t===null){if(Ge){if(s.mode==="hidden")return t=Ko(r,s),r.lanes=536870912,ya(null,t);if(Mc(r),(t=ct)?(t=Eb(t,Ln),t=t!==null&&t.data==="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:Mr!==null?{id:Xn,overflow:Zn}:null,retryLane:536870912,hydrationErrors:null},a=Zp(t),a.return=r,r.child=a,Ot=r,ct=null)):t=null,t===null)throw zr(r);return r.lanes=536870912,null}return Ko(r,s)}var m=t.memoizedState;if(m!==null){var k=m.dehydrated;if(Mc(r),d)if(r.flags&256)r.flags&=-257,r=dg(t,r,a);else if(r.memoizedState!==null)r.child=t.child,r.flags|=128,r=null;else throw Error(l(558));else if(At||sl(t,r,a,!1),d=(a&t.childLanes)!==0,At||d){if(s=it,s!==null&&(k=ho(s,a),k!==0&&k!==m.retryLane))throw m.retryLane=k,wi(t,k),sn(s,t,k),tf;os(),r=dg(t,r,a)}else t=m.treeContext,ct=Mn(k.nextSibling),Ot=r,Ge=!0,Or=null,Ln=!1,t!==null&&Wp(r,t),r=Ko(r,s),r.flags|=4096;return r}return t=ur(t.child,{mode:s.mode,children:s.children}),t.ref=r.ref,r.child=t,t.return=r,t}function Qo(t,r){var a=r.ref;if(a===null)t!==null&&t.ref!==null&&(r.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(l(284));(t===null||t.ref!==a)&&(r.flags|=4194816)}}function nf(t,r,a,s,d){return Ci(r),a=zc(t,r,a,s,void 0,d),s=Ic(),t!==null&&!At?(Fc(t,r,d),mr(t,r,d)):(Ge&&s&&bc(r),r.flags|=1,It(t,r,a,d),r.child)}function hg(t,r,a,s,d,m){return Ci(r),r.updateQueue=null,a=gm(r,s,a,d),mm(t),s=Ic(),t!==null&&!At?(Fc(t,r,m),mr(t,r,m)):(Ge&&s&&bc(r),r.flags|=1,It(t,r,a,m),r.child)}function pg(t,r,a,s,d){if(Ci(r),r.stateNode===null){var m=il,k=a.contextType;typeof k=="object"&&k!==null&&(m=zt(k)),m=new a(s,m),r.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Jc,r.stateNode=m,m._reactInternals=r,m=r.stateNode,m.props=s,m.state=r.memoizedState,m.refs={},Tc(r),k=a.contextType,m.context=typeof k=="object"&&k!==null?zt(k):il,m.state=r.memoizedState,k=a.getDerivedStateFromProps,typeof k=="function"&&(Wc(r,a,k,s),m.state=r.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(k=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),k!==m.state&&Jc.enqueueReplaceState(m,m.state,null),ha(r,s,m,d),da(),m.state=r.memoizedState),typeof m.componentDidMount=="function"&&(r.flags|=4194308),s=!0}else if(t===null){m=r.stateNode;var D=r.memoizedProps,V=_i(a,D);m.props=V;var te=m.context,se=a.contextType;k=il,typeof se=="object"&&se!==null&&(k=zt(se));var fe=a.getDerivedStateFromProps;se=typeof fe=="function"||typeof m.getSnapshotBeforeUpdate=="function",D=r.pendingProps!==D,se||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(D||te!==k)&&eg(r,m,s,k),Fr=!1;var re=r.memoizedState;m.state=re,ha(r,s,m,d),da(),te=r.memoizedState,D||re!==te||Fr?(typeof fe=="function"&&(Wc(r,a,fe,s),te=r.memoizedState),(V=Fr||Jm(r,a,V,s,re,te,k))?(se||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(r.flags|=4194308)):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=s,r.memoizedState=te),m.props=s,m.state=te,m.context=k,s=V):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),s=!1)}else{m=r.stateNode,Rc(t,r),k=r.memoizedProps,se=_i(a,k),m.props=se,fe=r.pendingProps,re=m.context,te=a.contextType,V=il,typeof te=="object"&&te!==null&&(V=zt(te)),D=a.getDerivedStateFromProps,(te=typeof D=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(k!==fe||re!==V)&&eg(r,m,s,V),Fr=!1,re=r.memoizedState,m.state=re,ha(r,s,m,d),da();var le=r.memoizedState;k!==fe||re!==le||Fr||t!==null&&t.dependencies!==null&&Lo(t.dependencies)?(typeof D=="function"&&(Wc(r,a,D,s),le=r.memoizedState),(se=Fr||Jm(r,a,se,s,re,le,V)||t!==null&&t.dependencies!==null&&Lo(t.dependencies))?(te||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(s,le,V),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(s,le,V)),typeof m.componentDidUpdate=="function"&&(r.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof m.componentDidUpdate!="function"||k===t.memoizedProps&&re===t.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||k===t.memoizedProps&&re===t.memoizedState||(r.flags|=1024),r.memoizedProps=s,r.memoizedState=le),m.props=s,m.state=le,m.context=V,s=se):(typeof m.componentDidUpdate!="function"||k===t.memoizedProps&&re===t.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||k===t.memoizedProps&&re===t.memoizedState||(r.flags|=1024),s=!1)}return m=s,Qo(t,r),s=(r.flags&128)!==0,m||s?(m=r.stateNode,a=s&&typeof a.getDerivedStateFromError!="function"?null:m.render(),r.flags|=1,t!==null&&s?(r.child=Ri(r,t.child,null,d),r.child=Ri(r,null,a,d)):It(t,r,a,d),r.memoizedState=m.state,t=r.child):t=mr(t,r,d),t}function mg(t,r,a,s){return ki(),r.flags|=256,It(t,r,a,s),r.child}var rf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function lf(t){return{baseLanes:t,cachePool:im()}}function af(t,r,a){return t=t!==null?t.childLanes&~a:0,r&&(t|=yn),t}function gg(t,r,a){var s=r.pendingProps,d=!1,m=(r.flags&128)!==0,k;if((k=m)||(k=t!==null&&t.memoizedState===null?!1:(wt.current&2)!==0),k&&(d=!0,r.flags&=-129),k=(r.flags&32)!==0,r.flags&=-33,t===null){if(Ge){if(d?Hr(r):$r(),(t=ct)?(t=Eb(t,Ln),t=t!==null&&t.data!=="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:Mr!==null?{id:Xn,overflow:Zn}:null,retryLane:536870912,hydrationErrors:null},a=Zp(t),a.return=r,r.child=a,Ot=r,ct=null)):t=null,t===null)throw zr(r);return $f(t)?r.lanes=32:r.lanes=536870912,null}var D=s.children;return s=s.fallback,d?($r(),d=r.mode,D=Wo({mode:"hidden",children:D},d),s=Si(s,d,a,null),D.return=r,s.return=r,D.sibling=s,r.child=D,s=r.child,s.memoizedState=lf(a),s.childLanes=af(t,k,a),r.memoizedState=rf,ya(null,s)):(Hr(r),of(r,D))}var V=t.memoizedState;if(V!==null&&(D=V.dehydrated,D!==null)){if(m)r.flags&256?(Hr(r),r.flags&=-257,r=sf(t,r,a)):r.memoizedState!==null?($r(),r.child=t.child,r.flags|=128,r=null):($r(),D=s.fallback,d=r.mode,s=Wo({mode:"visible",children:s.children},d),D=Si(D,d,a,null),D.flags|=2,s.return=r,D.return=r,s.sibling=D,r.child=s,Ri(r,t.child,null,a),s=r.child,s.memoizedState=lf(a),s.childLanes=af(t,k,a),r.memoizedState=rf,r=ya(null,s));else if(Hr(r),$f(D)){if(k=D.nextSibling&&D.nextSibling.dataset,k)var te=k.dgst;k=te,s=Error(l(419)),s.stack="",s.digest=k,aa({value:s,source:null,stack:null}),r=sf(t,r,a)}else if(At||sl(t,r,a,!1),k=(a&t.childLanes)!==0,At||k){if(k=it,k!==null&&(s=ho(k,a),s!==0&&s!==V.retryLane))throw V.retryLane=s,wi(t,s),sn(k,t,s),tf;Hf(D)||os(),r=sf(t,r,a)}else Hf(D)?(r.flags|=192,r.child=t.child,r=null):(t=V.treeContext,ct=Mn(D.nextSibling),Ot=r,Ge=!0,Or=null,Ln=!1,t!==null&&Wp(r,t),r=of(r,s.children),r.flags|=4096);return r}return d?($r(),D=s.fallback,d=r.mode,V=t.child,te=V.sibling,s=ur(V,{mode:"hidden",children:s.children}),s.subtreeFlags=V.subtreeFlags&65011712,te!==null?D=ur(te,D):(D=Si(D,d,a,null),D.flags|=2),D.return=r,s.return=r,s.sibling=D,r.child=s,ya(null,s),s=r.child,D=t.child.memoizedState,D===null?D=lf(a):(d=D.cachePool,d!==null?(V=Et._currentValue,d=d.parent!==V?{parent:V,pool:V}:d):d=im(),D={baseLanes:D.baseLanes|a,cachePool:d}),s.memoizedState=D,s.childLanes=af(t,k,a),r.memoizedState=rf,ya(t.child,s)):(Hr(r),a=t.child,t=a.sibling,a=ur(a,{mode:"visible",children:s.children}),a.return=r,a.sibling=null,t!==null&&(k=r.deletions,k===null?(r.deletions=[t],r.flags|=16):k.push(t)),r.child=a,r.memoizedState=null,a)}function of(t,r){return r=Wo({mode:"visible",children:r},t.mode),r.return=t,t.child=r}function Wo(t,r){return t=pn(22,t,null,r),t.lanes=0,t}function sf(t,r,a){return Ri(r,t.child,null,a),t=of(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function bg(t,r,a){t.lanes|=r;var s=t.alternate;s!==null&&(s.lanes|=r),Sc(t.return,r,a)}function uf(t,r,a,s,d,m){var k=t.memoizedState;k===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:s,tail:a,tailMode:d,treeForkCount:m}:(k.isBackwards=r,k.rendering=null,k.renderingStartTime=0,k.last=s,k.tail=a,k.tailMode=d,k.treeForkCount=m)}function yg(t,r,a){var s=r.pendingProps,d=s.revealOrder,m=s.tail;s=s.children;var k=wt.current,D=(k&2)!==0;if(D?(k=k&1|2,r.flags|=128):k&=1,T(wt,k),It(t,r,s,a),s=Ge?la:0,!D&&t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&bg(t,a,r);else if(t.tag===19)bg(t,a,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(d){case"forwards":for(a=r.child,d=null;a!==null;)t=a.alternate,t!==null&&Uo(t)===null&&(d=a),a=a.sibling;a=d,a===null?(d=r.child,r.child=null):(d=a.sibling,a.sibling=null),uf(r,!1,d,a,m,s);break;case"backwards":case"unstable_legacy-backwards":for(a=null,d=r.child,r.child=null;d!==null;){if(t=d.alternate,t!==null&&Uo(t)===null){r.child=d;break}t=d.sibling,d.sibling=a,a=d,d=t}uf(r,!0,a,null,m,s);break;case"together":uf(r,!1,null,null,void 0,s);break;default:r.memoizedState=null}return r.child}function mr(t,r,a){if(t!==null&&(r.dependencies=t.dependencies),Vr|=r.lanes,(a&r.childLanes)===0)if(t!==null){if(sl(t,r,a,!1),(a&r.childLanes)===0)return null}else return null;if(t!==null&&r.child!==t.child)throw Error(l(153));if(r.child!==null){for(t=r.child,a=ur(t,t.pendingProps),r.child=a,a.return=r;t.sibling!==null;)t=t.sibling,a=a.sibling=ur(t,t.pendingProps),a.return=r;a.sibling=null}return r.child}function cf(t,r){return(t.lanes&r)!==0?!0:(t=t.dependencies,!!(t!==null&&Lo(t)))}function a2(t,r,a){switch(r.tag){case 3:me(r,r.stateNode.containerInfo),Ir(r,Et,t.memoizedState.cache),ki();break;case 27:case 5:Se(r);break;case 4:me(r,r.stateNode.containerInfo);break;case 10:Ir(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,Mc(r),null;break;case 13:var s=r.memoizedState;if(s!==null)return s.dehydrated!==null?(Hr(r),r.flags|=128,null):(a&r.child.childLanes)!==0?gg(t,r,a):(Hr(r),t=mr(t,r,a),t!==null?t.sibling:null);Hr(r);break;case 19:var d=(t.flags&128)!==0;if(s=(a&r.childLanes)!==0,s||(sl(t,r,a,!1),s=(a&r.childLanes)!==0),d){if(s)return yg(t,r,a);r.flags|=128}if(d=r.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),T(wt,wt.current),s)break;return null;case 22:return r.lanes=0,cg(t,r,a,r.pendingProps);case 24:Ir(r,Et,t.memoizedState.cache)}return mr(t,r,a)}function xg(t,r,a){if(t!==null)if(t.memoizedProps!==r.pendingProps)At=!0;else{if(!cf(t,a)&&(r.flags&128)===0)return At=!1,a2(t,r,a);At=(t.flags&131072)!==0}else At=!1,Ge&&(r.flags&1048576)!==0&&Qp(r,la,r.index);switch(r.lanes=0,r.tag){case 16:e:{var s=r.pendingProps;if(t=Ni(r.elementType),r.type=t,typeof t=="function")pc(t)?(s=_i(t,s),r.tag=1,r=pg(null,r,t,s,a)):(r.tag=0,r=nf(null,r,t,s,a));else{if(t!=null){var d=t.$$typeof;if(d===z){r.tag=11,r=og(null,r,t,s,a);break e}else if(d===F){r.tag=14,r=sg(null,r,t,s,a);break e}}throw r=U(t)||t,Error(l(306,r,""))}}return r;case 0:return nf(t,r,r.type,r.pendingProps,a);case 1:return s=r.type,d=_i(s,r.pendingProps),pg(t,r,s,d,a);case 3:e:{if(me(r,r.stateNode.containerInfo),t===null)throw Error(l(387));s=r.pendingProps;var m=r.memoizedState;d=m.element,Rc(t,r),ha(r,s,null,a);var k=r.memoizedState;if(s=k.cache,Ir(r,Et,s),s!==m.cache&&kc(r,[Et],a,!0),da(),s=k.element,m.isDehydrated)if(m={element:s,isDehydrated:!1,cache:k.cache},r.updateQueue.baseState=m,r.memoizedState=m,r.flags&256){r=mg(t,r,s,a);break e}else if(s!==d){d=Rn(Error(l(424)),r),aa(d),r=mg(t,r,s,a);break e}else for(t=r.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,ct=Mn(t.firstChild),Ot=r,Ge=!0,Or=null,Ln=!0,a=cm(r,null,s,a),r.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(ki(),s===d){r=mr(t,r,a);break e}It(t,r,s,a)}r=r.child}return r;case 26:return Qo(t,r),t===null?(a=jb(r.type,null,r.pendingProps,null))?r.memoizedState=a:Ge||(a=r.type,t=r.pendingProps,s=ps(ie.current).createElement(a),s[dt]=r,s[Ut]=t,Ft(s,a,t),kt(s),r.stateNode=s):r.memoizedState=jb(r.type,t.memoizedProps,r.pendingProps,t.memoizedState),null;case 27:return Se(r),t===null&&Ge&&(s=r.stateNode=Nb(r.type,r.pendingProps,ie.current),Ot=r,Ln=!0,d=ct,Kr(r.type)?(qf=d,ct=Mn(s.firstChild)):ct=d),It(t,r,r.pendingProps.children,a),Qo(t,r),t===null&&(r.flags|=4194304),r.child;case 5:return t===null&&Ge&&((d=s=ct)&&(s=z2(s,r.type,r.pendingProps,Ln),s!==null?(r.stateNode=s,Ot=r,ct=Mn(s.firstChild),Ln=!1,d=!0):d=!1),d||zr(r)),Se(r),d=r.type,m=r.pendingProps,k=t!==null?t.memoizedProps:null,s=m.children,Ff(d,m)?s=null:k!==null&&Ff(d,k)&&(r.flags|=32),r.memoizedState!==null&&(d=zc(t,r,Qw,null,null,a),Da._currentValue=d),Qo(t,r),It(t,r,s,a),r.child;case 6:return t===null&&Ge&&((t=a=ct)&&(a=I2(a,r.pendingProps,Ln),a!==null?(r.stateNode=a,Ot=r,ct=null,t=!0):t=!1),t||zr(r)),null;case 13:return gg(t,r,a);case 4:return me(r,r.stateNode.containerInfo),s=r.pendingProps,t===null?r.child=Ri(r,null,s,a):It(t,r,s,a),r.child;case 11:return og(t,r,r.type,r.pendingProps,a);case 7:return It(t,r,r.pendingProps,a),r.child;case 8:return It(t,r,r.pendingProps.children,a),r.child;case 12:return It(t,r,r.pendingProps.children,a),r.child;case 10:return s=r.pendingProps,Ir(r,r.type,s.value),It(t,r,s.children,a),r.child;case 9:return d=r.type._context,s=r.pendingProps.children,Ci(r),d=zt(d),s=s(d),r.flags|=1,It(t,r,s,a),r.child;case 14:return sg(t,r,r.type,r.pendingProps,a);case 15:return ug(t,r,r.type,r.pendingProps,a);case 19:return yg(t,r,a);case 31:return l2(t,r,a);case 22:return cg(t,r,a,r.pendingProps);case 24:return Ci(r),s=zt(Et),t===null?(d=Ac(),d===null&&(d=it,m=Ec(),d.pooledCache=m,m.refCount++,m!==null&&(d.pooledCacheLanes|=a),d=m),r.memoizedState={parent:s,cache:d},Tc(r),Ir(r,Et,d)):((t.lanes&a)!==0&&(Rc(t,r),ha(r,null,null,a),da()),d=t.memoizedState,m=r.memoizedState,d.parent!==s?(d={parent:s,cache:s},r.memoizedState=d,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=d),Ir(r,Et,s)):(s=m.cache,Ir(r,Et,s),s!==d.cache&&kc(r,[Et],a,!0))),It(t,r,r.pendingProps.children,a),r.child;case 29:throw r.pendingProps}throw Error(l(156,r.tag))}function gr(t){t.flags|=4}function ff(t,r,a,s,d){if((r=(t.mode&32)!==0)&&(r=!1),r){if(t.flags|=16777216,(d&335544128)===d)if(t.stateNode.complete)t.flags|=8192;else if(Gg())t.flags|=8192;else throw Ti=zo,Nc}else t.flags&=-16777217}function vg(t,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Ob(r))if(Gg())t.flags|=8192;else throw Ti=zo,Nc}function Jo(t,r){r!==null&&(t.flags|=4),t.flags&16384&&(r=t.tag!==22?Vi():536870912,t.lanes|=r,vl|=r)}function xa(t,r){if(!Ge)switch(t.tailMode){case"hidden":r=t.tail;for(var a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:s.sibling=null}}function ft(t){var r=t.alternate!==null&&t.alternate.child===t.child,a=0,s=0;if(r)for(var d=t.child;d!==null;)a|=d.lanes|d.childLanes,s|=d.subtreeFlags&65011712,s|=d.flags&65011712,d.return=t,d=d.sibling;else for(d=t.child;d!==null;)a|=d.lanes|d.childLanes,s|=d.subtreeFlags,s|=d.flags,d.return=t,d=d.sibling;return t.subtreeFlags|=s,t.childLanes=a,r}function o2(t,r,a){var s=r.pendingProps;switch(yc(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ft(r),null;case 1:return ft(r),null;case 3:return a=r.stateNode,s=null,t!==null&&(s=t.memoizedState.cache),r.memoizedState.cache!==s&&(r.flags|=2048),dr(Et),ye(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(ol(r)?gr(r):t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,vc())),ft(r),null;case 26:var d=r.type,m=r.memoizedState;return t===null?(gr(r),m!==null?(ft(r),vg(r,m)):(ft(r),ff(r,d,null,s,a))):m?m!==t.memoizedState?(gr(r),ft(r),vg(r,m)):(ft(r),r.flags&=-16777217):(t=t.memoizedProps,t!==s&&gr(r),ft(r),ff(r,d,t,s,a)),null;case 27:if(Le(r),a=ie.current,d=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==s&&gr(r);else{if(!s){if(r.stateNode===null)throw Error(l(166));return ft(r),null}t=J.current,ol(r)?Jp(r):(t=Nb(d,s,a),r.stateNode=t,gr(r))}return ft(r),null;case 5:if(Le(r),d=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==s&&gr(r);else{if(!s){if(r.stateNode===null)throw Error(l(166));return ft(r),null}if(m=J.current,ol(r))Jp(r);else{var k=ps(ie.current);switch(m){case 1:m=k.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:m=k.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":m=k.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":m=k.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":m=k.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof s.is=="string"?k.createElement("select",{is:s.is}):k.createElement("select"),s.multiple?m.multiple=!0:s.size&&(m.size=s.size);break;default:m=typeof s.is=="string"?k.createElement(d,{is:s.is}):k.createElement(d)}}m[dt]=r,m[Ut]=s;e:for(k=r.child;k!==null;){if(k.tag===5||k.tag===6)m.appendChild(k.stateNode);else if(k.tag!==4&&k.tag!==27&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===r)break e;for(;k.sibling===null;){if(k.return===null||k.return===r)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}r.stateNode=m;e:switch(Ft(m,d,s),d){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&gr(r)}}return ft(r),ff(r,r.type,t===null?null:t.memoizedProps,r.pendingProps,a),null;case 6:if(t&&r.stateNode!=null)t.memoizedProps!==s&&gr(r);else{if(typeof s!="string"&&r.stateNode===null)throw Error(l(166));if(t=ie.current,ol(r)){if(t=r.stateNode,a=r.memoizedProps,s=null,d=Ot,d!==null)switch(d.tag){case 27:case 5:s=d.memoizedProps}t[dt]=r,t=!!(t.nodeValue===a||s!==null&&s.suppressHydrationWarning===!0||gb(t.nodeValue,a)),t||zr(r,!0)}else t=ps(t).createTextNode(s),t[dt]=r,r.stateNode=t}return ft(r),null;case 31:if(a=r.memoizedState,t===null||t.memoizedState!==null){if(s=ol(r),a!==null){if(t===null){if(!s)throw Error(l(318));if(t=r.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(557));t[dt]=r}else ki(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;ft(r),t=!1}else a=vc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),t=!0;if(!t)return r.flags&256?(gn(r),r):(gn(r),null);if((r.flags&128)!==0)throw Error(l(558))}return ft(r),null;case 13:if(s=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(d=ol(r),s!==null&&s.dehydrated!==null){if(t===null){if(!d)throw Error(l(318));if(d=r.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(l(317));d[dt]=r}else ki(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;ft(r),d=!1}else d=vc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=d),d=!0;if(!d)return r.flags&256?(gn(r),r):(gn(r),null)}return gn(r),(r.flags&128)!==0?(r.lanes=a,r):(a=s!==null,t=t!==null&&t.memoizedState!==null,a&&(s=r.child,d=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(d=s.alternate.memoizedState.cachePool.pool),m=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(m=s.memoizedState.cachePool.pool),m!==d&&(s.flags|=2048)),a!==t&&a&&(r.child.flags|=8192),Jo(r,r.updateQueue),ft(r),null);case 4:return ye(),t===null&&Df(r.stateNode.containerInfo),ft(r),null;case 10:return dr(r.type),ft(r),null;case 19:if(B(wt),s=r.memoizedState,s===null)return ft(r),null;if(d=(r.flags&128)!==0,m=s.rendering,m===null)if(d)xa(s,!1);else{if(vt!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(m=Uo(t),m!==null){for(r.flags|=128,xa(s,!1),t=m.updateQueue,r.updateQueue=t,Jo(r,t),r.subtreeFlags=0,t=a,a=r.child;a!==null;)Xp(a,t),a=a.sibling;return T(wt,wt.current&1|2),Ge&&cr(r,s.treeForkCount),r.child}t=t.sibling}s.tail!==null&&at()>is&&(r.flags|=128,d=!0,xa(s,!1),r.lanes=4194304)}else{if(!d)if(t=Uo(m),t!==null){if(r.flags|=128,d=!0,t=t.updateQueue,r.updateQueue=t,Jo(r,t),xa(s,!0),s.tail===null&&s.tailMode==="hidden"&&!m.alternate&&!Ge)return ft(r),null}else 2*at()-s.renderingStartTime>is&&a!==536870912&&(r.flags|=128,d=!0,xa(s,!1),r.lanes=4194304);s.isBackwards?(m.sibling=r.child,r.child=m):(t=s.last,t!==null?t.sibling=m:r.child=m,s.last=m)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=at(),t.sibling=null,a=wt.current,T(wt,d?a&1|2:a&1),Ge&&cr(r,s.treeForkCount),t):(ft(r),null);case 22:case 23:return gn(r),Dc(),s=r.memoizedState!==null,t!==null?t.memoizedState!==null!==s&&(r.flags|=8192):s&&(r.flags|=8192),s?(a&536870912)!==0&&(r.flags&128)===0&&(ft(r),r.subtreeFlags&6&&(r.flags|=8192)):ft(r),a=r.updateQueue,a!==null&&Jo(r,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),s=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),s!==a&&(r.flags|=2048),t!==null&&B(Ai),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),r.memoizedState.cache!==a&&(r.flags|=2048),dr(Et),ft(r),null;case 25:return null;case 30:return null}throw Error(l(156,r.tag))}function s2(t,r){switch(yc(r),r.tag){case 1:return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return dr(Et),ye(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 26:case 27:case 5:return Le(r),null;case 31:if(r.memoizedState!==null){if(gn(r),r.alternate===null)throw Error(l(340));ki()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 13:if(gn(r),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(l(340));ki()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return B(wt),null;case 4:return ye(),null;case 10:return dr(r.type),null;case 22:case 23:return gn(r),Dc(),t!==null&&B(Ai),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 24:return dr(Et),null;case 25:return null;default:return null}}function wg(t,r){switch(yc(r),r.tag){case 3:dr(Et),ye();break;case 26:case 27:case 5:Le(r);break;case 4:ye();break;case 31:r.memoizedState!==null&&gn(r);break;case 13:gn(r);break;case 19:B(wt);break;case 10:dr(r.type);break;case 22:case 23:gn(r),Dc(),t!==null&&B(Ai);break;case 24:dr(Et)}}function va(t,r){try{var a=r.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var d=s.next;a=d;do{if((a.tag&t)===t){s=void 0;var m=a.create,k=a.inst;s=m(),k.destroy=s}a=a.next}while(a!==d)}}catch(D){et(r,r.return,D)}}function qr(t,r,a){try{var s=r.updateQueue,d=s!==null?s.lastEffect:null;if(d!==null){var m=d.next;s=m;do{if((s.tag&t)===t){var k=s.inst,D=k.destroy;if(D!==void 0){k.destroy=void 0,d=r;var V=a,te=D;try{te()}catch(se){et(d,V,se)}}}s=s.next}while(s!==m)}}catch(se){et(r,r.return,se)}}function Sg(t){var r=t.updateQueue;if(r!==null){var a=t.stateNode;try{dm(r,a)}catch(s){et(t,t.return,s)}}}function kg(t,r,a){a.props=_i(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(s){et(t,r,s)}}function wa(t,r){try{var a=t.ref;if(a!==null){switch(t.tag){case 26:case 27:case 5:var s=t.stateNode;break;case 30:s=t.stateNode;break;default:s=t.stateNode}typeof a=="function"?t.refCleanup=a(s):a.current=s}}catch(d){et(t,r,d)}}function Kn(t,r){var a=t.ref,s=t.refCleanup;if(a!==null)if(typeof s=="function")try{s()}catch(d){et(t,r,d)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(d){et(t,r,d)}else a.current=null}function Eg(t){var r=t.type,a=t.memoizedProps,s=t.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":a.autoFocus&&s.focus();break e;case"img":a.src?s.src=a.src:a.srcSet&&(s.srcset=a.srcSet)}}catch(d){et(t,t.return,d)}}function df(t,r,a){try{var s=t.stateNode;j2(s,t.type,a,r),s[Ut]=r}catch(d){et(t,t.return,d)}}function Cg(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Kr(t.type)||t.tag===4}function hf(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Cg(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Kr(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function pf(t,r,a){var s=t.tag;if(s===5||s===6)t=t.stateNode,r?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(t,r):(r=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,r.appendChild(t),a=a._reactRootContainer,a!=null||r.onclick!==null||(r.onclick=or));else if(s!==4&&(s===27&&Kr(t.type)&&(a=t.stateNode,r=null),t=t.child,t!==null))for(pf(t,r,a),t=t.sibling;t!==null;)pf(t,r,a),t=t.sibling}function es(t,r,a){var s=t.tag;if(s===5||s===6)t=t.stateNode,r?a.insertBefore(t,r):a.appendChild(t);else if(s!==4&&(s===27&&Kr(t.type)&&(a=t.stateNode),t=t.child,t!==null))for(es(t,r,a),t=t.sibling;t!==null;)es(t,r,a),t=t.sibling}function Ag(t){var r=t.stateNode,a=t.memoizedProps;try{for(var s=t.type,d=r.attributes;d.length;)r.removeAttributeNode(d[0]);Ft(r,s,a),r[dt]=t,r[Ut]=a}catch(m){et(t,t.return,m)}}var br=!1,Nt=!1,mf=!1,Ng=typeof WeakSet=="function"?WeakSet:Set,Lt=null;function u2(t,r){if(t=t.containerInfo,zf=ws,t=Bp(t),oc(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.ownerDocument)&&a.defaultView||window;var s=a.getSelection&&a.getSelection();if(s&&s.rangeCount!==0){a=s.anchorNode;var d=s.anchorOffset,m=s.focusNode;s=s.focusOffset;try{a.nodeType,m.nodeType}catch{a=null;break e}var k=0,D=-1,V=-1,te=0,se=0,fe=t,re=null;t:for(;;){for(var le;fe!==a||d!==0&&fe.nodeType!==3||(D=k+d),fe!==m||s!==0&&fe.nodeType!==3||(V=k+s),fe.nodeType===3&&(k+=fe.nodeValue.length),(le=fe.firstChild)!==null;)re=fe,fe=le;for(;;){if(fe===t)break t;if(re===a&&++te===d&&(D=k),re===m&&++se===s&&(V=k),(le=fe.nextSibling)!==null)break;fe=re,re=fe.parentNode}fe=le}a=D===-1||V===-1?null:{start:D,end:V}}else a=null}a=a||{start:0,end:0}}else a=null;for(If={focusedElem:t,selectionRange:a},ws=!1,Lt=r;Lt!==null;)if(r=Lt,t=r.child,(r.subtreeFlags&1028)!==0&&t!==null)t.return=r,Lt=t;else for(;Lt!==null;){switch(r=Lt,m=r.alternate,t=r.flags,r.tag){case 0:if((t&4)!==0&&(t=r.updateQueue,t=t!==null?t.events:null,t!==null))for(a=0;a<t.length;a++)d=t[a],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&m!==null){t=void 0,a=r,d=m.memoizedProps,m=m.memoizedState,s=a.stateNode;try{var ke=_i(a.type,d);t=s.getSnapshotBeforeUpdate(ke,m),s.__reactInternalSnapshotBeforeUpdate=t}catch(je){et(a,a.return,je)}}break;case 3:if((t&1024)!==0){if(t=r.stateNode.containerInfo,a=t.nodeType,a===9)Uf(t);else if(a===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Uf(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(l(163))}if(t=r.sibling,t!==null){t.return=r.return,Lt=t;break}Lt=r.return}}function Tg(t,r,a){var s=a.flags;switch(a.tag){case 0:case 11:case 15:xr(t,a),s&4&&va(5,a);break;case 1:if(xr(t,a),s&4)if(t=a.stateNode,r===null)try{t.componentDidMount()}catch(k){et(a,a.return,k)}else{var d=_i(a.type,r.memoizedProps);r=r.memoizedState;try{t.componentDidUpdate(d,r,t.__reactInternalSnapshotBeforeUpdate)}catch(k){et(a,a.return,k)}}s&64&&Sg(a),s&512&&wa(a,a.return);break;case 3:if(xr(t,a),s&64&&(t=a.updateQueue,t!==null)){if(r=null,a.child!==null)switch(a.child.tag){case 27:case 5:r=a.child.stateNode;break;case 1:r=a.child.stateNode}try{dm(t,r)}catch(k){et(a,a.return,k)}}break;case 27:r===null&&s&4&&Ag(a);case 26:case 5:xr(t,a),r===null&&s&4&&Eg(a),s&512&&wa(a,a.return);break;case 12:xr(t,a);break;case 31:xr(t,a),s&4&&_g(t,a);break;case 13:xr(t,a),s&4&&Lg(t,a),s&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=y2.bind(null,a),F2(t,a))));break;case 22:if(s=a.memoizedState!==null||br,!s){r=r!==null&&r.memoizedState!==null||Nt,d=br;var m=Nt;br=s,(Nt=r)&&!m?vr(t,a,(a.subtreeFlags&8772)!==0):xr(t,a),br=d,Nt=m}break;case 30:break;default:xr(t,a)}}function Rg(t){var r=t.alternate;r!==null&&(t.alternate=null,Rg(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&Zl(r)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var ht=null,rn=!1;function yr(t,r,a){for(a=a.child;a!==null;)jg(t,r,a),a=a.sibling}function jg(t,r,a){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(Mt,a)}catch{}switch(a.tag){case 26:Nt||Kn(a,r),yr(t,r,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Nt||Kn(a,r);var s=ht,d=rn;Kr(a.type)&&(ht=a.stateNode,rn=!1),yr(t,r,a),ja(a.stateNode),ht=s,rn=d;break;case 5:Nt||Kn(a,r);case 6:if(s=ht,d=rn,ht=null,yr(t,r,a),ht=s,rn=d,ht!==null)if(rn)try{(ht.nodeType===9?ht.body:ht.nodeName==="HTML"?ht.ownerDocument.body:ht).removeChild(a.stateNode)}catch(m){et(a,r,m)}else try{ht.removeChild(a.stateNode)}catch(m){et(a,r,m)}break;case 18:ht!==null&&(rn?(t=ht,Sb(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),Tl(t)):Sb(ht,a.stateNode));break;case 4:s=ht,d=rn,ht=a.stateNode.containerInfo,rn=!0,yr(t,r,a),ht=s,rn=d;break;case 0:case 11:case 14:case 15:qr(2,a,r),Nt||qr(4,a,r),yr(t,r,a);break;case 1:Nt||(Kn(a,r),s=a.stateNode,typeof s.componentWillUnmount=="function"&&kg(a,r,s)),yr(t,r,a);break;case 21:yr(t,r,a);break;case 22:Nt=(s=Nt)||a.memoizedState!==null,yr(t,r,a),Nt=s;break;default:yr(t,r,a)}}function _g(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Tl(t)}catch(a){et(r,r.return,a)}}}function Lg(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Tl(t)}catch(a){et(r,r.return,a)}}function c2(t){switch(t.tag){case 31:case 13:case 19:var r=t.stateNode;return r===null&&(r=t.stateNode=new Ng),r;case 22:return t=t.stateNode,r=t._retryCache,r===null&&(r=t._retryCache=new Ng),r;default:throw Error(l(435,t.tag))}}function ts(t,r){var a=c2(t);r.forEach(function(s){if(!a.has(s)){a.add(s);var d=x2.bind(null,t,s);s.then(d,d)}})}function ln(t,r){var a=r.deletions;if(a!==null)for(var s=0;s<a.length;s++){var d=a[s],m=t,k=r,D=k;e:for(;D!==null;){switch(D.tag){case 27:if(Kr(D.type)){ht=D.stateNode,rn=!1;break e}break;case 5:ht=D.stateNode,rn=!1;break e;case 3:case 4:ht=D.stateNode.containerInfo,rn=!0;break e}D=D.return}if(ht===null)throw Error(l(160));jg(m,k,d),ht=null,rn=!1,m=d.alternate,m!==null&&(m.return=null),d.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Dg(r,t),r=r.sibling}var Hn=null;function Dg(t,r){var a=t.alternate,s=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:ln(r,t),an(t),s&4&&(qr(3,t,t.return),va(3,t),qr(5,t,t.return));break;case 1:ln(r,t),an(t),s&512&&(Nt||a===null||Kn(a,a.return)),s&64&&br&&(t=t.updateQueue,t!==null&&(s=t.callbacks,s!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?s:a.concat(s))));break;case 26:var d=Hn;if(ln(r,t),an(t),s&512&&(Nt||a===null||Kn(a,a.return)),s&4){var m=a!==null?a.memoizedState:null;if(s=t.memoizedState,a===null)if(s===null)if(t.stateNode===null){e:{s=t.type,a=t.memoizedProps,d=d.ownerDocument||d;t:switch(s){case"title":m=d.getElementsByTagName("title")[0],(!m||m[_r]||m[dt]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=d.createElement(s),d.head.insertBefore(m,d.querySelector("head > title"))),Ft(m,s,a),m[dt]=t,kt(m),s=m;break e;case"link":var k=Db("link","href",d).get(s+(a.href||""));if(k){for(var D=0;D<k.length;D++)if(m=k[D],m.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&m.getAttribute("rel")===(a.rel==null?null:a.rel)&&m.getAttribute("title")===(a.title==null?null:a.title)&&m.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){k.splice(D,1);break t}}m=d.createElement(s),Ft(m,s,a),d.head.appendChild(m);break;case"meta":if(k=Db("meta","content",d).get(s+(a.content||""))){for(D=0;D<k.length;D++)if(m=k[D],m.getAttribute("content")===(a.content==null?null:""+a.content)&&m.getAttribute("name")===(a.name==null?null:a.name)&&m.getAttribute("property")===(a.property==null?null:a.property)&&m.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&m.getAttribute("charset")===(a.charSet==null?null:a.charSet)){k.splice(D,1);break t}}m=d.createElement(s),Ft(m,s,a),d.head.appendChild(m);break;default:throw Error(l(468,s))}m[dt]=t,kt(m),s=m}t.stateNode=s}else Mb(d,t.type,t.stateNode);else t.stateNode=Lb(d,s,t.memoizedProps);else m!==s?(m===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):m.count--,s===null?Mb(d,t.type,t.stateNode):Lb(d,s,t.memoizedProps)):s===null&&t.stateNode!==null&&df(t,t.memoizedProps,a.memoizedProps)}break;case 27:ln(r,t),an(t),s&512&&(Nt||a===null||Kn(a,a.return)),a!==null&&s&4&&df(t,t.memoizedProps,a.memoizedProps);break;case 5:if(ln(r,t),an(t),s&512&&(Nt||a===null||Kn(a,a.return)),t.flags&32){d=t.stateNode;try{Qi(d,"")}catch(ke){et(t,t.return,ke)}}s&4&&t.stateNode!=null&&(d=t.memoizedProps,df(t,d,a!==null?a.memoizedProps:d)),s&1024&&(mf=!0);break;case 6:if(ln(r,t),an(t),s&4){if(t.stateNode===null)throw Error(l(162));s=t.memoizedProps,a=t.stateNode;try{a.nodeValue=s}catch(ke){et(t,t.return,ke)}}break;case 3:if(bs=null,d=Hn,Hn=ms(r.containerInfo),ln(r,t),Hn=d,an(t),s&4&&a!==null&&a.memoizedState.isDehydrated)try{Tl(r.containerInfo)}catch(ke){et(t,t.return,ke)}mf&&(mf=!1,Mg(t));break;case 4:s=Hn,Hn=ms(t.stateNode.containerInfo),ln(r,t),an(t),Hn=s;break;case 12:ln(r,t),an(t);break;case 31:ln(r,t),an(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,ts(t,s)));break;case 13:ln(r,t),an(t),t.child.flags&8192&&t.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(rs=at()),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,ts(t,s)));break;case 22:d=t.memoizedState!==null;var V=a!==null&&a.memoizedState!==null,te=br,se=Nt;if(br=te||d,Nt=se||V,ln(r,t),Nt=se,br=te,an(t),s&8192)e:for(r=t.stateNode,r._visibility=d?r._visibility&-2:r._visibility|1,d&&(a===null||V||br||Nt||Li(t)),a=null,r=t;;){if(r.tag===5||r.tag===26){if(a===null){V=a=r;try{if(m=V.stateNode,d)k=m.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none";else{D=V.stateNode;var fe=V.memoizedProps.style,re=fe!=null&&fe.hasOwnProperty("display")?fe.display:null;D.style.display=re==null||typeof re=="boolean"?"":(""+re).trim()}}catch(ke){et(V,V.return,ke)}}}else if(r.tag===6){if(a===null){V=r;try{V.stateNode.nodeValue=d?"":V.memoizedProps}catch(ke){et(V,V.return,ke)}}}else if(r.tag===18){if(a===null){V=r;try{var le=V.stateNode;d?kb(le,!0):kb(V.stateNode,!1)}catch(ke){et(V,V.return,ke)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===t)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;a===r&&(a=null),r=r.return}a===r&&(a=null),r.sibling.return=r.return,r=r.sibling}s&4&&(s=t.updateQueue,s!==null&&(a=s.retryQueue,a!==null&&(s.retryQueue=null,ts(t,a))));break;case 19:ln(r,t),an(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,ts(t,s)));break;case 30:break;case 21:break;default:ln(r,t),an(t)}}function an(t){var r=t.flags;if(r&2){try{for(var a,s=t.return;s!==null;){if(Cg(s)){a=s;break}s=s.return}if(a==null)throw Error(l(160));switch(a.tag){case 27:var d=a.stateNode,m=hf(t);es(t,m,d);break;case 5:var k=a.stateNode;a.flags&32&&(Qi(k,""),a.flags&=-33);var D=hf(t);es(t,D,k);break;case 3:case 4:var V=a.stateNode.containerInfo,te=hf(t);pf(t,te,V);break;default:throw Error(l(161))}}catch(se){et(t,t.return,se)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function Mg(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var r=t;Mg(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),t=t.sibling}}function xr(t,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Tg(t,r.alternate,r),r=r.sibling}function Li(t){for(t=t.child;t!==null;){var r=t;switch(r.tag){case 0:case 11:case 14:case 15:qr(4,r,r.return),Li(r);break;case 1:Kn(r,r.return);var a=r.stateNode;typeof a.componentWillUnmount=="function"&&kg(r,r.return,a),Li(r);break;case 27:ja(r.stateNode);case 26:case 5:Kn(r,r.return),Li(r);break;case 22:r.memoizedState===null&&Li(r);break;case 30:Li(r);break;default:Li(r)}t=t.sibling}}function vr(t,r,a){for(a=a&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var s=r.alternate,d=t,m=r,k=m.flags;switch(m.tag){case 0:case 11:case 15:vr(d,m,a),va(4,m);break;case 1:if(vr(d,m,a),s=m,d=s.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(te){et(s,s.return,te)}if(s=m,d=s.updateQueue,d!==null){var D=s.stateNode;try{var V=d.shared.hiddenCallbacks;if(V!==null)for(d.shared.hiddenCallbacks=null,d=0;d<V.length;d++)fm(V[d],D)}catch(te){et(s,s.return,te)}}a&&k&64&&Sg(m),wa(m,m.return);break;case 27:Ag(m);case 26:case 5:vr(d,m,a),a&&s===null&&k&4&&Eg(m),wa(m,m.return);break;case 12:vr(d,m,a);break;case 31:vr(d,m,a),a&&k&4&&_g(d,m);break;case 13:vr(d,m,a),a&&k&4&&Lg(d,m);break;case 22:m.memoizedState===null&&vr(d,m,a),wa(m,m.return);break;case 30:break;default:vr(d,m,a)}r=r.sibling}}function gf(t,r){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(t=r.memoizedState.cachePool.pool),t!==a&&(t!=null&&t.refCount++,a!=null&&oa(a))}function bf(t,r){t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&oa(t))}function $n(t,r,a,s){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Og(t,r,a,s),r=r.sibling}function Og(t,r,a,s){var d=r.flags;switch(r.tag){case 0:case 11:case 15:$n(t,r,a,s),d&2048&&va(9,r);break;case 1:$n(t,r,a,s);break;case 3:$n(t,r,a,s),d&2048&&(t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&oa(t)));break;case 12:if(d&2048){$n(t,r,a,s),t=r.stateNode;try{var m=r.memoizedProps,k=m.id,D=m.onPostCommit;typeof D=="function"&&D(k,r.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(V){et(r,r.return,V)}}else $n(t,r,a,s);break;case 31:$n(t,r,a,s);break;case 13:$n(t,r,a,s);break;case 23:break;case 22:m=r.stateNode,k=r.alternate,r.memoizedState!==null?m._visibility&2?$n(t,r,a,s):Sa(t,r):m._visibility&2?$n(t,r,a,s):(m._visibility|=2,bl(t,r,a,s,(r.subtreeFlags&10256)!==0||!1)),d&2048&&gf(k,r);break;case 24:$n(t,r,a,s),d&2048&&bf(r.alternate,r);break;default:$n(t,r,a,s)}}function bl(t,r,a,s,d){for(d=d&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var m=t,k=r,D=a,V=s,te=k.flags;switch(k.tag){case 0:case 11:case 15:bl(m,k,D,V,d),va(8,k);break;case 23:break;case 22:var se=k.stateNode;k.memoizedState!==null?se._visibility&2?bl(m,k,D,V,d):Sa(m,k):(se._visibility|=2,bl(m,k,D,V,d)),d&&te&2048&&gf(k.alternate,k);break;case 24:bl(m,k,D,V,d),d&&te&2048&&bf(k.alternate,k);break;default:bl(m,k,D,V,d)}r=r.sibling}}function Sa(t,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var a=t,s=r,d=s.flags;switch(s.tag){case 22:Sa(a,s),d&2048&&gf(s.alternate,s);break;case 24:Sa(a,s),d&2048&&bf(s.alternate,s);break;default:Sa(a,s)}r=r.sibling}}var ka=8192;function yl(t,r,a){if(t.subtreeFlags&ka)for(t=t.child;t!==null;)zg(t,r,a),t=t.sibling}function zg(t,r,a){switch(t.tag){case 26:yl(t,r,a),t.flags&ka&&t.memoizedState!==null&&K2(a,Hn,t.memoizedState,t.memoizedProps);break;case 5:yl(t,r,a);break;case 3:case 4:var s=Hn;Hn=ms(t.stateNode.containerInfo),yl(t,r,a),Hn=s;break;case 22:t.memoizedState===null&&(s=t.alternate,s!==null&&s.memoizedState!==null?(s=ka,ka=16777216,yl(t,r,a),ka=s):yl(t,r,a));break;default:yl(t,r,a)}}function Ig(t){var r=t.alternate;if(r!==null&&(t=r.child,t!==null)){r.child=null;do r=t.sibling,t.sibling=null,t=r;while(t!==null)}}function Ea(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var s=r[a];Lt=s,Bg(s,t)}Ig(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Fg(t),t=t.sibling}function Fg(t){switch(t.tag){case 0:case 11:case 15:Ea(t),t.flags&2048&&qr(9,t,t.return);break;case 3:Ea(t);break;case 12:Ea(t);break;case 22:var r=t.stateNode;t.memoizedState!==null&&r._visibility&2&&(t.return===null||t.return.tag!==13)?(r._visibility&=-3,ns(t)):Ea(t);break;default:Ea(t)}}function ns(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var s=r[a];Lt=s,Bg(s,t)}Ig(t)}for(t=t.child;t!==null;){switch(r=t,r.tag){case 0:case 11:case 15:qr(8,r,r.return),ns(r);break;case 22:a=r.stateNode,a._visibility&2&&(a._visibility&=-3,ns(r));break;default:ns(r)}t=t.sibling}}function Bg(t,r){for(;Lt!==null;){var a=Lt;switch(a.tag){case 0:case 11:case 15:qr(8,a,r);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var s=a.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:oa(a.memoizedState.cache)}if(s=a.child,s!==null)s.return=a,Lt=s;else e:for(a=t;Lt!==null;){s=Lt;var d=s.sibling,m=s.return;if(Rg(s),s===a){Lt=null;break e}if(d!==null){d.return=m,Lt=d;break e}Lt=m}}}var f2={getCacheForType:function(t){var r=zt(Et),a=r.data.get(t);return a===void 0&&(a=t(),r.data.set(t,a)),a},cacheSignal:function(){return zt(Et).controller.signal}},d2=typeof WeakMap=="function"?WeakMap:Map,Ke=0,it=null,Fe=null,Pe=0,Je=0,bn=null,Pr=!1,xl=!1,yf=!1,wr=0,vt=0,Vr=0,Di=0,xf=0,yn=0,vl=0,Ca=null,on=null,vf=!1,rs=0,Ug=0,is=1/0,ls=null,Gr=null,Rt=0,Yr=null,wl=null,Sr=0,wf=0,Sf=null,Hg=null,Aa=0,kf=null;function xn(){return(Ke&2)!==0&&Pe!==0?Pe&-Pe:H.T!==null?Rf():en()}function $g(){if(yn===0)if((Pe&536870912)===0||Ge){var t=qi;qi<<=1,(qi&3932160)===0&&(qi=262144),yn=t}else yn=536870912;return t=mn.current,t!==null&&(t.flags|=32),yn}function sn(t,r,a){(t===it&&(Je===2||Je===9)||t.cancelPendingCommit!==null)&&(Sl(t,0),Xr(t,Pe,yn,!1)),Gn(t,a),((Ke&2)===0||t!==it)&&(t===it&&((Ke&2)===0&&(Di|=a),vt===4&&Xr(t,Pe,yn,!1)),Qn(t))}function qg(t,r,a){if((Ke&6)!==0)throw Error(l(327));var s=!a&&(r&127)===0&&(r&t.expiredLanes)===0||pi(t,r),d=s?m2(t,r):Cf(t,r,!0),m=s;do{if(d===0){xl&&!s&&Xr(t,r,0,!1);break}else{if(a=t.current.alternate,m&&!h2(a)){d=Cf(t,r,!1),m=!1;continue}if(d===2){if(m=r,t.errorRecoveryDisabledLanes&m)var k=0;else k=t.pendingLanes&-536870913,k=k!==0?k:k&536870912?536870912:0;if(k!==0){r=k;e:{var D=t;d=Ca;var V=D.current.memoizedState.isDehydrated;if(V&&(Sl(D,k).flags|=256),k=Cf(D,k,!1),k!==2){if(yf&&!V){D.errorRecoveryDisabledLanes|=m,Di|=m,d=4;break e}m=on,on=d,m!==null&&(on===null?on=m:on.push.apply(on,m))}d=k}if(m=!1,d!==2)continue}}if(d===1){Sl(t,0),Xr(t,r,0,!0);break}e:{switch(s=t,m=d,m){case 0:case 1:throw Error(l(345));case 4:if((r&4194048)!==r)break;case 6:Xr(s,r,yn,!Pr);break e;case 2:on=null;break;case 3:case 5:break;default:throw Error(l(329))}if((r&62914560)===r&&(d=rs+300-at(),10<d)){if(Xr(s,r,yn,!Pr),Rr(s,0,!0)!==0)break e;Sr=r,s.timeoutHandle=vb(Pg.bind(null,s,a,on,ls,vf,r,yn,Di,vl,Pr,m,"Throttled",-0,0),d);break e}Pg(s,a,on,ls,vf,r,yn,Di,vl,Pr,m,null,-0,0)}}break}while(!0);Qn(t)}function Pg(t,r,a,s,d,m,k,D,V,te,se,fe,re,le){if(t.timeoutHandle=-1,fe=r.subtreeFlags,fe&8192||(fe&16785408)===16785408){fe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:or},zg(r,m,fe);var ke=(m&62914560)===m?rs-at():(m&4194048)===m?Ug-at():0;if(ke=Q2(fe,ke),ke!==null){Sr=m,t.cancelPendingCommit=ke(Wg.bind(null,t,r,m,a,s,d,k,D,V,se,fe,null,re,le)),Xr(t,m,k,!te);return}}Wg(t,r,m,a,s,d,k,D,V)}function h2(t){for(var r=t;;){var a=r.tag;if((a===0||a===11||a===15)&&r.flags&16384&&(a=r.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var s=0;s<a.length;s++){var d=a[s],m=d.getSnapshot;d=d.value;try{if(!hn(m(),d))return!1}catch{return!1}}if(a=r.child,r.subtreeFlags&16384&&a!==null)a.return=r,r=a;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Xr(t,r,a,s){r&=~xf,r&=~Di,t.suspendedLanes|=r,t.pingedLanes&=~r,s&&(t.warmLanes|=r),s=t.expirationTimes;for(var d=r;0<d;){var m=31-We(d),k=1<<m;s[m]=-1,d&=~k}a!==0&&Yl(t,a,r)}function as(){return(Ke&6)===0?(Na(0),!1):!0}function Ef(){if(Fe!==null){if(Je===0)var t=Fe.return;else t=Fe,fr=Ei=null,Bc(t),dl=null,ua=0,t=Fe;for(;t!==null;)wg(t.alternate,t),t=t.return;Fe=null}}function Sl(t,r){var a=t.timeoutHandle;a!==-1&&(t.timeoutHandle=-1,D2(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),Sr=0,Ef(),it=t,Fe=a=ur(t.current,null),Pe=r,Je=0,bn=null,Pr=!1,xl=pi(t,r),yf=!1,vl=yn=xf=Di=Vr=vt=0,on=Ca=null,vf=!1,(r&8)!==0&&(r|=r&32);var s=t.entangledLanes;if(s!==0)for(t=t.entanglements,s&=r;0<s;){var d=31-We(s),m=1<<d;r|=t[d],s&=~m}return wr=r,No(),a}function Vg(t,r){Me=null,H.H=ba,r===fl||r===Oo?(r=om(),Je=3):r===Nc?(r=om(),Je=4):Je=r===tf?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,bn=r,Fe===null&&(vt=1,Zo(t,Rn(r,t.current)))}function Gg(){var t=mn.current;return t===null?!0:(Pe&4194048)===Pe?Dn===null:(Pe&62914560)===Pe||(Pe&536870912)!==0?t===Dn:!1}function Yg(){var t=H.H;return H.H=ba,t===null?ba:t}function Xg(){var t=H.A;return H.A=f2,t}function os(){vt=4,Pr||(Pe&4194048)!==Pe&&mn.current!==null||(xl=!0),(Vr&134217727)===0&&(Di&134217727)===0||it===null||Xr(it,Pe,yn,!1)}function Cf(t,r,a){var s=Ke;Ke|=2;var d=Yg(),m=Xg();(it!==t||Pe!==r)&&(ls=null,Sl(t,r)),r=!1;var k=vt;e:do try{if(Je!==0&&Fe!==null){var D=Fe,V=bn;switch(Je){case 8:Ef(),k=6;break e;case 3:case 2:case 9:case 6:mn.current===null&&(r=!0);var te=Je;if(Je=0,bn=null,kl(t,D,V,te),a&&xl){k=0;break e}break;default:te=Je,Je=0,bn=null,kl(t,D,V,te)}}p2(),k=vt;break}catch(se){Vg(t,se)}while(!0);return r&&t.shellSuspendCounter++,fr=Ei=null,Ke=s,H.H=d,H.A=m,Fe===null&&(it=null,Pe=0,No()),k}function p2(){for(;Fe!==null;)Zg(Fe)}function m2(t,r){var a=Ke;Ke|=2;var s=Yg(),d=Xg();it!==t||Pe!==r?(ls=null,is=at()+500,Sl(t,r)):xl=pi(t,r);e:do try{if(Je!==0&&Fe!==null){r=Fe;var m=bn;t:switch(Je){case 1:Je=0,bn=null,kl(t,r,m,1);break;case 2:case 9:if(lm(m)){Je=0,bn=null,Kg(r);break}r=function(){Je!==2&&Je!==9||it!==t||(Je=7),Qn(t)},m.then(r,r);break e;case 3:Je=7;break e;case 4:Je=5;break e;case 7:lm(m)?(Je=0,bn=null,Kg(r)):(Je=0,bn=null,kl(t,r,m,7));break;case 5:var k=null;switch(Fe.tag){case 26:k=Fe.memoizedState;case 5:case 27:var D=Fe;if(k?Ob(k):D.stateNode.complete){Je=0,bn=null;var V=D.sibling;if(V!==null)Fe=V;else{var te=D.return;te!==null?(Fe=te,ss(te)):Fe=null}break t}}Je=0,bn=null,kl(t,r,m,5);break;case 6:Je=0,bn=null,kl(t,r,m,6);break;case 8:Ef(),vt=6;break e;default:throw Error(l(462))}}g2();break}catch(se){Vg(t,se)}while(!0);return fr=Ei=null,H.H=s,H.A=d,Ke=a,Fe!==null?0:(it=null,Pe=0,No(),vt)}function g2(){for(;Fe!==null&&!yt();)Zg(Fe)}function Zg(t){var r=xg(t.alternate,t,wr);t.memoizedProps=t.pendingProps,r===null?ss(t):Fe=r}function Kg(t){var r=t,a=r.alternate;switch(r.tag){case 15:case 0:r=hg(a,r,r.pendingProps,r.type,void 0,Pe);break;case 11:r=hg(a,r,r.pendingProps,r.type.render,r.ref,Pe);break;case 5:Bc(r);default:wg(a,r),r=Fe=Xp(r,wr),r=xg(a,r,wr)}t.memoizedProps=t.pendingProps,r===null?ss(t):Fe=r}function kl(t,r,a,s){fr=Ei=null,Bc(r),dl=null,ua=0;var d=r.return;try{if(i2(t,d,r,a,Pe)){vt=1,Zo(t,Rn(a,t.current)),Fe=null;return}}catch(m){if(d!==null)throw Fe=d,m;vt=1,Zo(t,Rn(a,t.current)),Fe=null;return}r.flags&32768?(Ge||s===1?t=!0:xl||(Pe&536870912)!==0?t=!1:(Pr=t=!0,(s===2||s===9||s===3||s===6)&&(s=mn.current,s!==null&&s.tag===13&&(s.flags|=16384))),Qg(r,t)):ss(r)}function ss(t){var r=t;do{if((r.flags&32768)!==0){Qg(r,Pr);return}t=r.return;var a=o2(r.alternate,r,wr);if(a!==null){Fe=a;return}if(r=r.sibling,r!==null){Fe=r;return}Fe=r=t}while(r!==null);vt===0&&(vt=5)}function Qg(t,r){do{var a=s2(t.alternate,t);if(a!==null){a.flags&=32767,Fe=a;return}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!r&&(t=t.sibling,t!==null)){Fe=t;return}Fe=t=a}while(t!==null);vt=6,Fe=null}function Wg(t,r,a,s,d,m,k,D,V){t.cancelPendingCommit=null;do us();while(Rt!==0);if((Ke&6)!==0)throw Error(l(327));if(r!==null){if(r===t.current)throw Error(l(177));if(m=r.lanes|r.childLanes,m|=dc,qu(t,a,m,k,D,V),t===it&&(Fe=it=null,Pe=0),wl=r,Yr=t,Sr=a,wf=m,Sf=d,Hg=s,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,v2(Re,function(){return rb(),null})):(t.callbackNode=null,t.callbackPriority=0),s=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||s){s=H.T,H.T=null,d=X.p,X.p=2,k=Ke,Ke|=4;try{u2(t,r,a)}finally{Ke=k,X.p=d,H.T=s}}Rt=1,Jg(),eb(),tb()}}function Jg(){if(Rt===1){Rt=0;var t=Yr,r=wl,a=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||a){a=H.T,H.T=null;var s=X.p;X.p=2;var d=Ke;Ke|=4;try{Dg(r,t);var m=If,k=Bp(t.containerInfo),D=m.focusedElem,V=m.selectionRange;if(k!==D&&D&&D.ownerDocument&&Fp(D.ownerDocument.documentElement,D)){if(V!==null&&oc(D)){var te=V.start,se=V.end;if(se===void 0&&(se=te),"selectionStart"in D)D.selectionStart=te,D.selectionEnd=Math.min(se,D.value.length);else{var fe=D.ownerDocument||document,re=fe&&fe.defaultView||window;if(re.getSelection){var le=re.getSelection(),ke=D.textContent.length,je=Math.min(V.start,ke),rt=V.end===void 0?je:Math.min(V.end,ke);!le.extend&&je>rt&&(k=rt,rt=je,je=k);var Q=Ip(D,je),Z=Ip(D,rt);if(Q&&Z&&(le.rangeCount!==1||le.anchorNode!==Q.node||le.anchorOffset!==Q.offset||le.focusNode!==Z.node||le.focusOffset!==Z.offset)){var ee=fe.createRange();ee.setStart(Q.node,Q.offset),le.removeAllRanges(),je>rt?(le.addRange(ee),le.extend(Z.node,Z.offset)):(ee.setEnd(Z.node,Z.offset),le.addRange(ee))}}}}for(fe=[],le=D;le=le.parentNode;)le.nodeType===1&&fe.push({element:le,left:le.scrollLeft,top:le.scrollTop});for(typeof D.focus=="function"&&D.focus(),D=0;D<fe.length;D++){var ue=fe[D];ue.element.scrollLeft=ue.left,ue.element.scrollTop=ue.top}}ws=!!zf,If=zf=null}finally{Ke=d,X.p=s,H.T=a}}t.current=r,Rt=2}}function eb(){if(Rt===2){Rt=0;var t=Yr,r=wl,a=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||a){a=H.T,H.T=null;var s=X.p;X.p=2;var d=Ke;Ke|=4;try{Tg(t,r.alternate,r)}finally{Ke=d,X.p=s,H.T=a}}Rt=3}}function tb(){if(Rt===4||Rt===3){Rt=0,Bt();var t=Yr,r=wl,a=Sr,s=Hg;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?Rt=5:(Rt=0,wl=Yr=null,nb(t,t.pendingLanes));var d=t.pendingLanes;if(d===0&&(Gr=null),Xi(a),r=r.stateNode,gt&&typeof gt.onCommitFiberRoot=="function")try{gt.onCommitFiberRoot(Mt,r,void 0,(r.current.flags&128)===128)}catch{}if(s!==null){r=H.T,d=X.p,X.p=2,H.T=null;try{for(var m=t.onRecoverableError,k=0;k<s.length;k++){var D=s[k];m(D.value,{componentStack:D.stack})}}finally{H.T=r,X.p=d}}(Sr&3)!==0&&us(),Qn(t),d=t.pendingLanes,(a&261930)!==0&&(d&42)!==0?t===kf?Aa++:(Aa=0,kf=t):Aa=0,Na(0)}}function nb(t,r){(t.pooledCacheLanes&=r)===0&&(r=t.pooledCache,r!=null&&(t.pooledCache=null,oa(r)))}function us(){return Jg(),eb(),tb(),rb()}function rb(){if(Rt!==5)return!1;var t=Yr,r=wf;wf=0;var a=Xi(Sr),s=H.T,d=X.p;try{X.p=32>a?32:a,H.T=null,a=Sf,Sf=null;var m=Yr,k=Sr;if(Rt=0,wl=Yr=null,Sr=0,(Ke&6)!==0)throw Error(l(331));var D=Ke;if(Ke|=4,Fg(m.current),Og(m,m.current,k,a),Ke=D,Na(0,!1),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(Mt,m)}catch{}return!0}finally{X.p=d,H.T=s,nb(t,r)}}function ib(t,r,a){r=Rn(a,r),r=ef(t.stateNode,r,2),t=Ur(t,r,2),t!==null&&(Gn(t,2),Qn(t))}function et(t,r,a){if(t.tag===3)ib(t,t,a);else for(;r!==null;){if(r.tag===3){ib(r,t,a);break}else if(r.tag===1){var s=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Gr===null||!Gr.has(s))){t=Rn(a,t),a=lg(2),s=Ur(r,a,2),s!==null&&(ag(a,s,r,t),Gn(s,2),Qn(s));break}}r=r.return}}function Af(t,r,a){var s=t.pingCache;if(s===null){s=t.pingCache=new d2;var d=new Set;s.set(r,d)}else d=s.get(r),d===void 0&&(d=new Set,s.set(r,d));d.has(a)||(yf=!0,d.add(a),t=b2.bind(null,t,r,a),r.then(t,t))}function b2(t,r,a){var s=t.pingCache;s!==null&&s.delete(r),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,it===t&&(Pe&a)===a&&(vt===4||vt===3&&(Pe&62914560)===Pe&&300>at()-rs?(Ke&2)===0&&Sl(t,0):xf|=a,vl===Pe&&(vl=0)),Qn(t)}function lb(t,r){r===0&&(r=Vi()),t=wi(t,r),t!==null&&(Gn(t,r),Qn(t))}function y2(t){var r=t.memoizedState,a=0;r!==null&&(a=r.retryLane),lb(t,a)}function x2(t,r){var a=0;switch(t.tag){case 31:case 13:var s=t.stateNode,d=t.memoizedState;d!==null&&(a=d.retryLane);break;case 19:s=t.stateNode;break;case 22:s=t.stateNode._retryCache;break;default:throw Error(l(314))}s!==null&&s.delete(r),lb(t,a)}function v2(t,r){return mt(t,r)}var cs=null,El=null,Nf=!1,fs=!1,Tf=!1,Zr=0;function Qn(t){t!==El&&t.next===null&&(El===null?cs=El=t:El=El.next=t),fs=!0,Nf||(Nf=!0,S2())}function Na(t,r){if(!Tf&&fs){Tf=!0;do for(var a=!1,s=cs;s!==null;){if(t!==0){var d=s.pendingLanes;if(d===0)var m=0;else{var k=s.suspendedLanes,D=s.pingedLanes;m=(1<<31-We(42|t)+1)-1,m&=d&~(k&~D),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(a=!0,ub(s,m))}else m=Pe,m=Rr(s,s===it?m:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(m&3)===0||pi(s,m)||(a=!0,ub(s,m));s=s.next}while(a);Tf=!1}}function w2(){ab()}function ab(){fs=Nf=!1;var t=0;Zr!==0&&L2()&&(t=Zr);for(var r=at(),a=null,s=cs;s!==null;){var d=s.next,m=ob(s,r);m===0?(s.next=null,a===null?cs=d:a.next=d,d===null&&(El=a)):(a=s,(t!==0||(m&3)!==0)&&(fs=!0)),s=d}Rt!==0&&Rt!==5||Na(t),Zr!==0&&(Zr=0)}function ob(t,r){for(var a=t.suspendedLanes,s=t.pingedLanes,d=t.expirationTimes,m=t.pendingLanes&-62914561;0<m;){var k=31-We(m),D=1<<k,V=d[k];V===-1?((D&a)===0||(D&s)!==0)&&(d[k]=Gl(D,r)):V<=r&&(t.expiredLanes|=D),m&=~D}if(r=it,a=Pe,a=Rr(t,t===r?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s=t.callbackNode,a===0||t===r&&(Je===2||Je===9)||t.cancelPendingCommit!==null)return s!==null&&s!==null&&Yt(s),t.callbackNode=null,t.callbackPriority=0;if((a&3)===0||pi(t,a)){if(r=a&-a,r===t.callbackPriority)return r;switch(s!==null&&Yt(s),Xi(a)){case 2:case 8:a=ge;break;case 32:a=Re;break;case 268435456:a=$e;break;default:a=Re}return s=sb.bind(null,t),a=mt(a,s),t.callbackPriority=r,t.callbackNode=a,r}return s!==null&&s!==null&&Yt(s),t.callbackPriority=2,t.callbackNode=null,2}function sb(t,r){if(Rt!==0&&Rt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(us()&&t.callbackNode!==a)return null;var s=Pe;return s=Rr(t,t===it?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s===0?null:(qg(t,s,r),ob(t,at()),t.callbackNode!=null&&t.callbackNode===a?sb.bind(null,t):null)}function ub(t,r){if(us())return null;qg(t,r,!0)}function S2(){M2(function(){(Ke&6)!==0?mt(ae,w2):ab()})}function Rf(){if(Zr===0){var t=ul;t===0&&(t=$i,$i<<=1,($i&261888)===0&&($i=256)),Zr=t}return Zr}function cb(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:xo(""+t)}function fb(t,r){var a=r.ownerDocument.createElement("input");return a.name=r.name,a.value=r.value,t.id&&a.setAttribute("form",t.id),r.parentNode.insertBefore(a,r),t=new FormData(t),a.parentNode.removeChild(a),t}function k2(t,r,a,s,d){if(r==="submit"&&a&&a.stateNode===d){var m=cb((d[Ut]||null).action),k=s.submitter;k&&(r=(r=k[Ut]||null)?cb(r.formAction):k.getAttribute("formAction"),r!==null&&(m=r,k=null));var D=new ko("action","action",null,s,d);t.push({event:D,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Zr!==0){var V=k?fb(d,k):new FormData(d);Xc(a,{pending:!0,data:V,method:d.method,action:m},null,V)}}else typeof m=="function"&&(D.preventDefault(),V=k?fb(d,k):new FormData(d),Xc(a,{pending:!0,data:V,method:d.method,action:m},m,V))},currentTarget:d}]})}}for(var jf=0;jf<fc.length;jf++){var _f=fc[jf],E2=_f.toLowerCase(),C2=_f[0].toUpperCase()+_f.slice(1);Un(E2,"on"+C2)}Un($p,"onAnimationEnd"),Un(qp,"onAnimationIteration"),Un(Pp,"onAnimationStart"),Un("dblclick","onDoubleClick"),Un("focusin","onFocus"),Un("focusout","onBlur"),Un(Hw,"onTransitionRun"),Un($w,"onTransitionStart"),Un(qw,"onTransitionCancel"),Un(Vp,"onTransitionEnd"),we("onMouseEnter",["mouseout","mouseover"]),we("onMouseLeave",["mouseout","mouseover"]),we("onPointerEnter",["pointerout","pointerover"]),we("onPointerLeave",["pointerout","pointerover"]),oe("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),oe("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),oe("onBeforeInput",["compositionend","keypress","textInput","paste"]),oe("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),oe("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),oe("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ta="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(" "),A2=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ta));function db(t,r){r=(r&4)!==0;for(var a=0;a<t.length;a++){var s=t[a],d=s.event;s=s.listeners;e:{var m=void 0;if(r)for(var k=s.length-1;0<=k;k--){var D=s[k],V=D.instance,te=D.currentTarget;if(D=D.listener,V!==m&&d.isPropagationStopped())break e;m=D,d.currentTarget=te;try{m(d)}catch(se){Ao(se)}d.currentTarget=null,m=V}else for(k=0;k<s.length;k++){if(D=s[k],V=D.instance,te=D.currentTarget,D=D.listener,V!==m&&d.isPropagationStopped())break e;m=D,d.currentTarget=te;try{m(d)}catch(se){Ao(se)}d.currentTarget=null,m=V}}}}function Be(t,r){var a=r[Zi];a===void 0&&(a=r[Zi]=new Set);var s=t+"__bubble";a.has(s)||(hb(r,t,2,!1),a.add(s))}function Lf(t,r,a){var s=0;r&&(s|=4),hb(a,t,s,r)}var ds="_reactListening"+Math.random().toString(36).slice(2);function Df(t){if(!t[ds]){t[ds]=!0,mo.forEach(function(a){a!=="selectionchange"&&(A2.has(a)||Lf(a,!1,t),Lf(a,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[ds]||(r[ds]=!0,Lf("selectionchange",!1,r))}}function hb(t,r,a,s){switch($b(r)){case 2:var d=eS;break;case 8:d=tS;break;default:d=Xf}a=d.bind(null,r,a,t),d=void 0,!Wu||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(d=!0),s?d!==void 0?t.addEventListener(r,a,{capture:!0,passive:d}):t.addEventListener(r,a,!0):d!==void 0?t.addEventListener(r,a,{passive:d}):t.addEventListener(r,a,!1)}function Mf(t,r,a,s,d){var m=s;if((r&1)===0&&(r&2)===0&&s!==null)e:for(;;){if(s===null)return;var k=s.tag;if(k===3||k===4){var D=s.stateNode.containerInfo;if(D===d)break;if(k===4)for(k=s.return;k!==null;){var V=k.tag;if((V===3||V===4)&&k.stateNode.containerInfo===d)return;k=k.return}for(;D!==null;){if(k=Yn(D),k===null)return;if(V=k.tag,V===5||V===6||V===26||V===27){s=m=k;continue e}D=D.parentNode}}s=s.return}yp(function(){var te=m,se=Ku(a),fe=[];e:{var re=Gp.get(t);if(re!==void 0){var le=ko,ke=t;switch(t){case"keypress":if(wo(a)===0)break e;case"keydown":case"keyup":le=xw;break;case"focusin":ke="focus",le=nc;break;case"focusout":ke="blur",le=nc;break;case"beforeblur":case"afterblur":le=nc;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":le=wp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":le=ow;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":le=Sw;break;case $p:case qp:case Pp:le=cw;break;case Vp:le=Ew;break;case"scroll":case"scrollend":le=lw;break;case"wheel":le=Aw;break;case"copy":case"cut":case"paste":le=dw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":le=kp;break;case"toggle":case"beforetoggle":le=Tw}var je=(r&4)!==0,rt=!je&&(t==="scroll"||t==="scrollend"),Q=je?re!==null?re+"Capture":null:re;je=[];for(var Z=te,ee;Z!==null;){var ue=Z;if(ee=ue.stateNode,ue=ue.tag,ue!==5&&ue!==26&&ue!==27||ee===null||Q===null||(ue=Kl(Z,Q),ue!=null&&je.push(Ra(Z,ue,ee))),rt)break;Z=Z.return}0<je.length&&(re=new le(re,ke,null,a,se),fe.push({event:re,listeners:je}))}}if((r&7)===0){e:{if(re=t==="mouseover"||t==="pointerover",le=t==="mouseout"||t==="pointerout",re&&a!==Zu&&(ke=a.relatedTarget||a.fromElement)&&(Yn(ke)||ke[jr]))break e;if((le||re)&&(re=se.window===se?se:(re=se.ownerDocument)?re.defaultView||re.parentWindow:window,le?(ke=a.relatedTarget||a.toElement,le=te,ke=ke?Yn(ke):null,ke!==null&&(rt=u(ke),je=ke.tag,ke!==rt||je!==5&&je!==27&&je!==6)&&(ke=null)):(le=null,ke=te),le!==ke)){if(je=wp,ue="onMouseLeave",Q="onMouseEnter",Z="mouse",(t==="pointerout"||t==="pointerover")&&(je=kp,ue="onPointerLeave",Q="onPointerEnter",Z="pointer"),rt=le==null?re:bi(le),ee=ke==null?re:bi(ke),re=new je(ue,Z+"leave",le,a,se),re.target=rt,re.relatedTarget=ee,ue=null,Yn(se)===te&&(je=new je(Q,Z+"enter",ke,a,se),je.target=ee,je.relatedTarget=rt,ue=je),rt=ue,le&&ke)t:{for(je=N2,Q=le,Z=ke,ee=0,ue=Q;ue;ue=je(ue))ee++;ue=0;for(var Ae=Z;Ae;Ae=je(Ae))ue++;for(;0<ee-ue;)Q=je(Q),ee--;for(;0<ue-ee;)Z=je(Z),ue--;for(;ee--;){if(Q===Z||Z!==null&&Q===Z.alternate){je=Q;break t}Q=je(Q),Z=je(Z)}je=null}else je=null;le!==null&&pb(fe,re,le,je,!1),ke!==null&&rt!==null&&pb(fe,rt,ke,je,!0)}}e:{if(re=te?bi(te):window,le=re.nodeName&&re.nodeName.toLowerCase(),le==="select"||le==="input"&&re.type==="file")var Xe=_p;else if(Rp(re))if(Lp)Xe=Fw;else{Xe=zw;var Ee=Ow}else le=re.nodeName,!le||le.toLowerCase()!=="input"||re.type!=="checkbox"&&re.type!=="radio"?te&&Xu(te.elementType)&&(Xe=_p):Xe=Iw;if(Xe&&(Xe=Xe(t,te))){jp(fe,Xe,a,se);break e}Ee&&Ee(t,re,te),t==="focusout"&&te&&re.type==="number"&&te.memoizedProps.value!=null&&Yu(re,"number",re.value)}switch(Ee=te?bi(te):window,t){case"focusin":(Rp(Ee)||Ee.contentEditable==="true")&&(tl=Ee,sc=te,ia=null);break;case"focusout":ia=sc=tl=null;break;case"mousedown":uc=!0;break;case"contextmenu":case"mouseup":case"dragend":uc=!1,Up(fe,a,se);break;case"selectionchange":if(Uw)break;case"keydown":case"keyup":Up(fe,a,se)}var Oe;if(ic)e:{switch(t){case"compositionstart":var Ve="onCompositionStart";break e;case"compositionend":Ve="onCompositionEnd";break e;case"compositionupdate":Ve="onCompositionUpdate";break e}Ve=void 0}else el?Np(t,a)&&(Ve="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(Ve="onCompositionStart");Ve&&(Ep&&a.locale!=="ko"&&(el||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&el&&(Oe=xp()):(Dr=se,Ju="value"in Dr?Dr.value:Dr.textContent,el=!0)),Ee=hs(te,Ve),0<Ee.length&&(Ve=new Sp(Ve,t,null,a,se),fe.push({event:Ve,listeners:Ee}),Oe?Ve.data=Oe:(Oe=Tp(a),Oe!==null&&(Ve.data=Oe)))),(Oe=jw?_w(t,a):Lw(t,a))&&(Ve=hs(te,"onBeforeInput"),0<Ve.length&&(Ee=new Sp("onBeforeInput","beforeinput",null,a,se),fe.push({event:Ee,listeners:Ve}),Ee.data=Oe)),k2(fe,t,te,a,se)}db(fe,r)})}function Ra(t,r,a){return{instance:t,listener:r,currentTarget:a}}function hs(t,r){for(var a=r+"Capture",s=[];t!==null;){var d=t,m=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||m===null||(d=Kl(t,a),d!=null&&s.unshift(Ra(t,d,m)),d=Kl(t,r),d!=null&&s.push(Ra(t,d,m))),t.tag===3)return s;t=t.return}return[]}function N2(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function pb(t,r,a,s,d){for(var m=r._reactName,k=[];a!==null&&a!==s;){var D=a,V=D.alternate,te=D.stateNode;if(D=D.tag,V!==null&&V===s)break;D!==5&&D!==26&&D!==27||te===null||(V=te,d?(te=Kl(a,m),te!=null&&k.unshift(Ra(a,te,V))):d||(te=Kl(a,m),te!=null&&k.push(Ra(a,te,V)))),a=a.return}k.length!==0&&t.push({event:r,listeners:k})}var T2=/\r\n?/g,R2=/\u0000|\uFFFD/g;function mb(t){return(typeof t=="string"?t:""+t).replace(T2,`
|
|
9
|
-
`).replace(R2,"")}function gb(t,r){return r=mb(r),mb(t)===r}function nt(t,r,a,s,d,m){switch(a){case"children":typeof s=="string"?r==="body"||r==="textarea"&&s===""||Qi(t,s):(typeof s=="number"||typeof s=="bigint")&&r!=="body"&&Qi(t,""+s);break;case"className":bo(t,"class",s);break;case"tabIndex":bo(t,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":bo(t,a,s);break;case"style":gp(t,s,m);break;case"data":if(r!=="object"){bo(t,"data",s);break}case"src":case"href":if(s===""&&(r!=="a"||a!=="href")){t.removeAttribute(a);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(a);break}s=xo(""+s),t.setAttribute(a,s);break;case"action":case"formAction":if(typeof s=="function"){t.setAttribute(a,"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 m=="function"&&(a==="formAction"?(r!=="input"&&nt(t,r,"name",d.name,d,null),nt(t,r,"formEncType",d.formEncType,d,null),nt(t,r,"formMethod",d.formMethod,d,null),nt(t,r,"formTarget",d.formTarget,d,null)):(nt(t,r,"encType",d.encType,d,null),nt(t,r,"method",d.method,d,null),nt(t,r,"target",d.target,d,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(a);break}s=xo(""+s),t.setAttribute(a,s);break;case"onClick":s!=null&&(t.onclick=or);break;case"onScroll":s!=null&&Be("scroll",t);break;case"onScrollEnd":s!=null&&Be("scrollend",t);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(a=s.__html,a!=null){if(d.children!=null)throw Error(l(60));t.innerHTML=a}}break;case"multiple":t.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":t.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){t.removeAttribute("xlink:href");break}a=xo(""+s),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(a,""+s):t.removeAttribute(a);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":s&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":s===!0?t.setAttribute(a,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(a,s):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?t.setAttribute(a,s):t.removeAttribute(a);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?t.removeAttribute(a):t.setAttribute(a,s);break;case"popover":Be("beforetoggle",t),Be("toggle",t),lr(t,"popover",s);break;case"xlinkActuate":ar(t,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":ar(t,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":ar(t,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":ar(t,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":ar(t,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":ar(t,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":ar(t,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":ar(t,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":ar(t,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":lr(t,"is",s);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=rw.get(a)||a,lr(t,a,s))}}function Of(t,r,a,s,d,m){switch(a){case"style":gp(t,s,m);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(a=s.__html,a!=null){if(d.children!=null)throw Error(l(60));t.innerHTML=a}}break;case"children":typeof s=="string"?Qi(t,s):(typeof s=="number"||typeof s=="bigint")&&Qi(t,""+s);break;case"onScroll":s!=null&&Be("scroll",t);break;case"onScrollEnd":s!=null&&Be("scrollend",t);break;case"onClick":s!=null&&(t.onclick=or);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!go.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(d=a.endsWith("Capture"),r=a.slice(2,d?a.length-7:void 0),m=t[Ut]||null,m=m!=null?m[a]:null,typeof m=="function"&&t.removeEventListener(r,m,d),typeof s=="function")){typeof m!="function"&&m!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(r,s,d);break e}a in t?t[a]=s:s===!0?t.setAttribute(a,""):lr(t,a,s)}}}function Ft(t,r,a){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Be("error",t),Be("load",t);var s=!1,d=!1,m;for(m in a)if(a.hasOwnProperty(m)){var k=a[m];if(k!=null)switch(m){case"src":s=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,r));default:nt(t,r,m,k,a,null)}}d&&nt(t,r,"srcSet",a.srcSet,a,null),s&&nt(t,r,"src",a.src,a,null);return;case"input":Be("invalid",t);var D=m=k=d=null,V=null,te=null;for(s in a)if(a.hasOwnProperty(s)){var se=a[s];if(se!=null)switch(s){case"name":d=se;break;case"type":k=se;break;case"checked":V=se;break;case"defaultChecked":te=se;break;case"value":m=se;break;case"defaultValue":D=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(l(137,r));break;default:nt(t,r,s,se,a,null)}}dp(t,m,D,V,te,k,d,!1);return;case"select":Be("invalid",t),s=k=m=null;for(d in a)if(a.hasOwnProperty(d)&&(D=a[d],D!=null))switch(d){case"value":m=D;break;case"defaultValue":k=D;break;case"multiple":s=D;default:nt(t,r,d,D,a,null)}r=m,a=k,t.multiple=!!s,r!=null?Ki(t,!!s,r,!1):a!=null&&Ki(t,!!s,a,!0);return;case"textarea":Be("invalid",t),m=d=s=null;for(k in a)if(a.hasOwnProperty(k)&&(D=a[k],D!=null))switch(k){case"value":s=D;break;case"defaultValue":d=D;break;case"children":m=D;break;case"dangerouslySetInnerHTML":if(D!=null)throw Error(l(91));break;default:nt(t,r,k,D,a,null)}pp(t,s,d,m);return;case"option":for(V in a)a.hasOwnProperty(V)&&(s=a[V],s!=null)&&(V==="selected"?t.selected=s&&typeof s!="function"&&typeof s!="symbol":nt(t,r,V,s,a,null));return;case"dialog":Be("beforetoggle",t),Be("toggle",t),Be("cancel",t),Be("close",t);break;case"iframe":case"object":Be("load",t);break;case"video":case"audio":for(s=0;s<Ta.length;s++)Be(Ta[s],t);break;case"image":Be("error",t),Be("load",t);break;case"details":Be("toggle",t);break;case"embed":case"source":case"link":Be("error",t),Be("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(te in a)if(a.hasOwnProperty(te)&&(s=a[te],s!=null))switch(te){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,r));default:nt(t,r,te,s,a,null)}return;default:if(Xu(r)){for(se in a)a.hasOwnProperty(se)&&(s=a[se],s!==void 0&&Of(t,r,se,s,a,void 0));return}}for(D in a)a.hasOwnProperty(D)&&(s=a[D],s!=null&&nt(t,r,D,s,a,null))}function j2(t,r,a,s){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,m=null,k=null,D=null,V=null,te=null,se=null;for(le in a){var fe=a[le];if(a.hasOwnProperty(le)&&fe!=null)switch(le){case"checked":break;case"value":break;case"defaultValue":V=fe;default:s.hasOwnProperty(le)||nt(t,r,le,null,s,fe)}}for(var re in s){var le=s[re];if(fe=a[re],s.hasOwnProperty(re)&&(le!=null||fe!=null))switch(re){case"type":m=le;break;case"name":d=le;break;case"checked":te=le;break;case"defaultChecked":se=le;break;case"value":k=le;break;case"defaultValue":D=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(l(137,r));break;default:le!==fe&&nt(t,r,re,le,s,fe)}}Gu(t,k,D,V,te,se,m,d);return;case"select":le=k=D=re=null;for(m in a)if(V=a[m],a.hasOwnProperty(m)&&V!=null)switch(m){case"value":break;case"multiple":le=V;default:s.hasOwnProperty(m)||nt(t,r,m,null,s,V)}for(d in s)if(m=s[d],V=a[d],s.hasOwnProperty(d)&&(m!=null||V!=null))switch(d){case"value":re=m;break;case"defaultValue":D=m;break;case"multiple":k=m;default:m!==V&&nt(t,r,d,m,s,V)}r=D,a=k,s=le,re!=null?Ki(t,!!a,re,!1):!!s!=!!a&&(r!=null?Ki(t,!!a,r,!0):Ki(t,!!a,a?[]:"",!1));return;case"textarea":le=re=null;for(D in a)if(d=a[D],a.hasOwnProperty(D)&&d!=null&&!s.hasOwnProperty(D))switch(D){case"value":break;case"children":break;default:nt(t,r,D,null,s,d)}for(k in s)if(d=s[k],m=a[k],s.hasOwnProperty(k)&&(d!=null||m!=null))switch(k){case"value":re=d;break;case"defaultValue":le=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(l(91));break;default:d!==m&&nt(t,r,k,d,s,m)}hp(t,re,le);return;case"option":for(var ke in a)re=a[ke],a.hasOwnProperty(ke)&&re!=null&&!s.hasOwnProperty(ke)&&(ke==="selected"?t.selected=!1:nt(t,r,ke,null,s,re));for(V in s)re=s[V],le=a[V],s.hasOwnProperty(V)&&re!==le&&(re!=null||le!=null)&&(V==="selected"?t.selected=re&&typeof re!="function"&&typeof re!="symbol":nt(t,r,V,re,s,le));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 je in a)re=a[je],a.hasOwnProperty(je)&&re!=null&&!s.hasOwnProperty(je)&&nt(t,r,je,null,s,re);for(te in s)if(re=s[te],le=a[te],s.hasOwnProperty(te)&&re!==le&&(re!=null||le!=null))switch(te){case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(l(137,r));break;default:nt(t,r,te,re,s,le)}return;default:if(Xu(r)){for(var rt in a)re=a[rt],a.hasOwnProperty(rt)&&re!==void 0&&!s.hasOwnProperty(rt)&&Of(t,r,rt,void 0,s,re);for(se in s)re=s[se],le=a[se],!s.hasOwnProperty(se)||re===le||re===void 0&&le===void 0||Of(t,r,se,re,s,le);return}}for(var Q in a)re=a[Q],a.hasOwnProperty(Q)&&re!=null&&!s.hasOwnProperty(Q)&&nt(t,r,Q,null,s,re);for(fe in s)re=s[fe],le=a[fe],!s.hasOwnProperty(fe)||re===le||re==null&&le==null||nt(t,r,fe,re,s,le)}function bb(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function _2(){if(typeof performance.getEntriesByType=="function"){for(var t=0,r=0,a=performance.getEntriesByType("resource"),s=0;s<a.length;s++){var d=a[s],m=d.transferSize,k=d.initiatorType,D=d.duration;if(m&&D&&bb(k)){for(k=0,D=d.responseEnd,s+=1;s<a.length;s++){var V=a[s],te=V.startTime;if(te>D)break;var se=V.transferSize,fe=V.initiatorType;se&&bb(fe)&&(V=V.responseEnd,k+=se*(V<D?1:(D-te)/(V-te)))}if(--s,r+=8*(m+k)/(d.duration/1e3),t++,10<t)break}}if(0<t)return r/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var zf=null,If=null;function ps(t){return t.nodeType===9?t:t.ownerDocument}function yb(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function xb(t,r){if(t===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&r==="foreignObject"?0:t}function Ff(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Bf=null;function L2(){var t=window.event;return t&&t.type==="popstate"?t===Bf?!1:(Bf=t,!0):(Bf=null,!1)}var vb=typeof setTimeout=="function"?setTimeout:void 0,D2=typeof clearTimeout=="function"?clearTimeout:void 0,wb=typeof Promise=="function"?Promise:void 0,M2=typeof queueMicrotask=="function"?queueMicrotask:typeof wb<"u"?function(t){return wb.resolve(null).then(t).catch(O2)}:vb;function O2(t){setTimeout(function(){throw t})}function Kr(t){return t==="head"}function Sb(t,r){var a=r,s=0;do{var d=a.nextSibling;if(t.removeChild(a),d&&d.nodeType===8)if(a=d.data,a==="/$"||a==="/&"){if(s===0){t.removeChild(d),Tl(r);return}s--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")s++;else if(a==="html")ja(t.ownerDocument.documentElement);else if(a==="head"){a=t.ownerDocument.head,ja(a);for(var m=a.firstChild;m;){var k=m.nextSibling,D=m.nodeName;m[_r]||D==="SCRIPT"||D==="STYLE"||D==="LINK"&&m.rel.toLowerCase()==="stylesheet"||a.removeChild(m),m=k}}else a==="body"&&ja(t.ownerDocument.body);a=d}while(a);Tl(r)}function kb(t,r){var a=t;t=0;do{var s=a.nextSibling;if(a.nodeType===1?r?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(r?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),s&&s.nodeType===8)if(a=s.data,a==="/$"){if(t===0)break;t--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||t++;a=s}while(a)}function Uf(t){var r=t.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var a=r;switch(r=r.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Uf(a),Zl(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function z2(t,r,a,s){for(;t.nodeType===1;){var d=a;if(t.nodeName.toLowerCase()!==r.toLowerCase()){if(!s&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(s){if(!t[_r])switch(r){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(m=t.getAttribute("rel"),m==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(m!==d.rel||t.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||t.getAttribute("title")!==(d.title==null?null:d.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(m=t.getAttribute("src"),(m!==(d.src==null?null:d.src)||t.getAttribute("type")!==(d.type==null?null:d.type)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&m&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(r==="input"&&t.type==="hidden"){var m=d.name==null?null:""+d.name;if(d.type==="hidden"&&t.getAttribute("name")===m)return t}else return t;if(t=Mn(t.nextSibling),t===null)break}return null}function I2(t,r,a){if(r==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=Mn(t.nextSibling),t===null))return null;return t}function Eb(t,r){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!r||(t=Mn(t.nextSibling),t===null))return null;return t}function Hf(t){return t.data==="$?"||t.data==="$~"}function $f(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function F2(t,r){var a=t.ownerDocument;if(t.data==="$~")t._reactRetry=r;else if(t.data!=="$?"||a.readyState!=="loading")r();else{var s=function(){r(),a.removeEventListener("DOMContentLoaded",s)};a.addEventListener("DOMContentLoaded",s),t._reactRetry=s}}function Mn(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return t}var qf=null;function Cb(t){t=t.nextSibling;for(var r=0;t;){if(t.nodeType===8){var a=t.data;if(a==="/$"||a==="/&"){if(r===0)return Mn(t.nextSibling);r--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||r++}t=t.nextSibling}return null}function Ab(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(r===0)return t;r--}else a!=="/$"&&a!=="/&"||r++}t=t.previousSibling}return null}function Nb(t,r,a){switch(r=ps(a),t){case"html":if(t=r.documentElement,!t)throw Error(l(452));return t;case"head":if(t=r.head,!t)throw Error(l(453));return t;case"body":if(t=r.body,!t)throw Error(l(454));return t;default:throw Error(l(451))}}function ja(t){for(var r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Zl(t)}var On=new Map,Tb=new Set;function ms(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var kr=X.d;X.d={f:B2,r:U2,D:H2,C:$2,L:q2,m:P2,X:G2,S:V2,M:Y2};function B2(){var t=kr.f(),r=as();return t||r}function U2(t){var r=ir(t);r!==null&&r.tag===5&&r.type==="form"?Vm(r):kr.r(t)}var Cl=typeof document>"u"?null:document;function Rb(t,r,a){var s=Cl;if(s&&typeof r=="string"&&r){var d=Nn(r);d='link[rel="'+t+'"][href="'+d+'"]',typeof a=="string"&&(d+='[crossorigin="'+a+'"]'),Tb.has(d)||(Tb.add(d),t={rel:t,crossOrigin:a,href:r},s.querySelector(d)===null&&(r=s.createElement("link"),Ft(r,"link",t),kt(r),s.head.appendChild(r)))}}function H2(t){kr.D(t),Rb("dns-prefetch",t,null)}function $2(t,r){kr.C(t,r),Rb("preconnect",t,r)}function q2(t,r,a){kr.L(t,r,a);var s=Cl;if(s&&t&&r){var d='link[rel="preload"][as="'+Nn(r)+'"]';r==="image"&&a&&a.imageSrcSet?(d+='[imagesrcset="'+Nn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(d+='[imagesizes="'+Nn(a.imageSizes)+'"]')):d+='[href="'+Nn(t)+'"]';var m=d;switch(r){case"style":m=Al(t);break;case"script":m=Nl(t)}On.has(m)||(t=g({rel:"preload",href:r==="image"&&a&&a.imageSrcSet?void 0:t,as:r},a),On.set(m,t),s.querySelector(d)!==null||r==="style"&&s.querySelector(_a(m))||r==="script"&&s.querySelector(La(m))||(r=s.createElement("link"),Ft(r,"link",t),kt(r),s.head.appendChild(r)))}}function P2(t,r){kr.m(t,r);var a=Cl;if(a&&t){var s=r&&typeof r.as=="string"?r.as:"script",d='link[rel="modulepreload"][as="'+Nn(s)+'"][href="'+Nn(t)+'"]',m=d;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Nl(t)}if(!On.has(m)&&(t=g({rel:"modulepreload",href:t},r),On.set(m,t),a.querySelector(d)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(La(m)))return}s=a.createElement("link"),Ft(s,"link",t),kt(s),a.head.appendChild(s)}}}function V2(t,r,a){kr.S(t,r,a);var s=Cl;if(s&&t){var d=Lr(s).hoistableStyles,m=Al(t);r=r||"default";var k=d.get(m);if(!k){var D={loading:0,preload:null};if(k=s.querySelector(_a(m)))D.loading=5;else{t=g({rel:"stylesheet",href:t,"data-precedence":r},a),(a=On.get(m))&&Pf(t,a);var V=k=s.createElement("link");kt(V),Ft(V,"link",t),V._p=new Promise(function(te,se){V.onload=te,V.onerror=se}),V.addEventListener("load",function(){D.loading|=1}),V.addEventListener("error",function(){D.loading|=2}),D.loading|=4,gs(k,r,s)}k={type:"stylesheet",instance:k,count:1,state:D},d.set(m,k)}}}function G2(t,r){kr.X(t,r);var a=Cl;if(a&&t){var s=Lr(a).hoistableScripts,d=Nl(t),m=s.get(d);m||(m=a.querySelector(La(d)),m||(t=g({src:t,async:!0},r),(r=On.get(d))&&Vf(t,r),m=a.createElement("script"),kt(m),Ft(m,"link",t),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},s.set(d,m))}}function Y2(t,r){kr.M(t,r);var a=Cl;if(a&&t){var s=Lr(a).hoistableScripts,d=Nl(t),m=s.get(d);m||(m=a.querySelector(La(d)),m||(t=g({src:t,async:!0,type:"module"},r),(r=On.get(d))&&Vf(t,r),m=a.createElement("script"),kt(m),Ft(m,"link",t),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},s.set(d,m))}}function jb(t,r,a,s){var d=(d=ie.current)?ms(d):null;if(!d)throw Error(l(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(r=Al(a.href),a=Lr(d).hoistableStyles,s=a.get(r),s||(s={type:"style",instance:null,count:0,state:null},a.set(r,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=Al(a.href);var m=Lr(d).hoistableStyles,k=m.get(t);if(k||(d=d.ownerDocument||d,k={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(t,k),(m=d.querySelector(_a(t)))&&!m._p&&(k.instance=m,k.state.loading=5),On.has(t)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},On.set(t,a),m||X2(d,t,a,k.state))),r&&s===null)throw Error(l(528,""));return k}if(r&&s!==null)throw Error(l(529,""));return null;case"script":return r=a.async,a=a.src,typeof a=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=Nl(a),a=Lr(d).hoistableScripts,s=a.get(r),s||(s={type:"script",instance:null,count:0,state:null},a.set(r,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,t))}}function Al(t){return'href="'+Nn(t)+'"'}function _a(t){return'link[rel="stylesheet"]['+t+"]"}function _b(t){return g({},t,{"data-precedence":t.precedence,precedence:null})}function X2(t,r,a,s){t.querySelector('link[rel="preload"][as="style"]['+r+"]")?s.loading=1:(r=t.createElement("link"),s.preload=r,r.addEventListener("load",function(){return s.loading|=1}),r.addEventListener("error",function(){return s.loading|=2}),Ft(r,"link",a),kt(r),t.head.appendChild(r))}function Nl(t){return'[src="'+Nn(t)+'"]'}function La(t){return"script[async]"+t}function Lb(t,r,a){if(r.count++,r.instance===null)switch(r.type){case"style":var s=t.querySelector('style[data-href~="'+Nn(a.href)+'"]');if(s)return r.instance=s,kt(s),s;var d=g({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return s=(t.ownerDocument||t).createElement("style"),kt(s),Ft(s,"style",d),gs(s,a.precedence,t),r.instance=s;case"stylesheet":d=Al(a.href);var m=t.querySelector(_a(d));if(m)return r.state.loading|=4,r.instance=m,kt(m),m;s=_b(a),(d=On.get(d))&&Pf(s,d),m=(t.ownerDocument||t).createElement("link"),kt(m);var k=m;return k._p=new Promise(function(D,V){k.onload=D,k.onerror=V}),Ft(m,"link",s),r.state.loading|=4,gs(m,a.precedence,t),r.instance=m;case"script":return m=Nl(a.src),(d=t.querySelector(La(m)))?(r.instance=d,kt(d),d):(s=a,(d=On.get(m))&&(s=g({},a),Vf(s,d)),t=t.ownerDocument||t,d=t.createElement("script"),kt(d),Ft(d,"link",s),t.head.appendChild(d),r.instance=d);case"void":return null;default:throw Error(l(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(s=r.instance,r.state.loading|=4,gs(s,a.precedence,t));return r.instance}function gs(t,r,a){for(var s=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=s.length?s[s.length-1]:null,m=d,k=0;k<s.length;k++){var D=s[k];if(D.dataset.precedence===r)m=D;else if(m!==d)break}m?m.parentNode.insertBefore(t,m.nextSibling):(r=a.nodeType===9?a.head:a,r.insertBefore(t,r.firstChild))}function Pf(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.title==null&&(t.title=r.title)}function Vf(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.integrity==null&&(t.integrity=r.integrity)}var bs=null;function Db(t,r,a){if(bs===null){var s=new Map,d=bs=new Map;d.set(a,s)}else d=bs,s=d.get(a),s||(s=new Map,d.set(a,s));if(s.has(t))return s;for(s.set(t,null),a=a.getElementsByTagName(t),d=0;d<a.length;d++){var m=a[d];if(!(m[_r]||m[dt]||t==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var k=m.getAttribute(r)||"";k=t+k;var D=s.get(k);D?D.push(m):s.set(k,[m])}}return s}function Mb(t,r,a){t=t.ownerDocument||t,t.head.insertBefore(a,r==="title"?t.querySelector("head > title"):null)}function Z2(t,r,a){if(a===1||r.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;return r.rel==="stylesheet"?(t=r.disabled,typeof r.precedence=="string"&&t==null):!0;case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function Ob(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function K2(t,r,a,s){if(a.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var d=Al(s.href),m=r.querySelector(_a(d));if(m){r=m._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(t.count++,t=ys.bind(t),r.then(t,t)),a.state.loading|=4,a.instance=m,kt(m);return}m=r.ownerDocument||r,s=_b(s),(d=On.get(d))&&Pf(s,d),m=m.createElement("link"),kt(m);var k=m;k._p=new Promise(function(D,V){k.onload=D,k.onerror=V}),Ft(m,"link",s),a.instance=m}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(a,r),(r=a.state.preload)&&(a.state.loading&3)===0&&(t.count++,a=ys.bind(t),r.addEventListener("load",a),r.addEventListener("error",a))}}var Gf=0;function Q2(t,r){return t.stylesheets&&t.count===0&&vs(t,t.stylesheets),0<t.count||0<t.imgCount?function(a){var s=setTimeout(function(){if(t.stylesheets&&vs(t,t.stylesheets),t.unsuspend){var m=t.unsuspend;t.unsuspend=null,m()}},6e4+r);0<t.imgBytes&&Gf===0&&(Gf=62500*_2());var d=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&vs(t,t.stylesheets),t.unsuspend)){var m=t.unsuspend;t.unsuspend=null,m()}},(t.imgBytes>Gf?50:800)+r);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(s),clearTimeout(d)}}:null}function ys(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)vs(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var xs=null;function vs(t,r){t.stylesheets=null,t.unsuspend!==null&&(t.count++,xs=new Map,r.forEach(W2,t),xs=null,ys.call(t))}function W2(t,r){if(!(r.state.loading&4)){var a=xs.get(t);if(a)var s=a.get(null);else{a=new Map,xs.set(t,a);for(var d=t.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<d.length;m++){var k=d[m];(k.nodeName==="LINK"||k.getAttribute("media")!=="not all")&&(a.set(k.dataset.precedence,k),s=k)}s&&a.set(null,s)}d=r.instance,k=d.getAttribute("data-precedence"),m=a.get(k)||s,m===s&&a.set(null,d),a.set(k,d),this.count++,s=ys.bind(this),d.addEventListener("load",s),d.addEventListener("error",s),m?m.parentNode.insertBefore(d,m.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(d,t.firstChild)),r.state.loading|=4}}var Da={$$typeof:R,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function J2(t,r,a,s,d,m,k,D,V){this.tag=1,this.containerInfo=t,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=mi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mi(0),this.hiddenUpdates=mi(null),this.identifierPrefix=s,this.onUncaughtError=d,this.onCaughtError=m,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=V,this.incompleteTransitions=new Map}function zb(t,r,a,s,d,m,k,D,V,te,se,fe){return t=new J2(t,r,a,k,V,te,se,fe,D),r=1,m===!0&&(r|=24),m=pn(3,null,null,r),t.current=m,m.stateNode=t,r=Ec(),r.refCount++,t.pooledCache=r,r.refCount++,m.memoizedState={element:s,isDehydrated:a,cache:r},Tc(m),t}function Ib(t){return t?(t=il,t):il}function Fb(t,r,a,s,d,m){d=Ib(d),s.context===null?s.context=d:s.pendingContext=d,s=Br(r),s.payload={element:a},m=m===void 0?null:m,m!==null&&(s.callback=m),a=Ur(t,s,r),a!==null&&(sn(a,t,r),fa(a,t,r))}function Bb(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<r?a:r}}function Yf(t,r){Bb(t,r),(t=t.alternate)&&Bb(t,r)}function Ub(t){if(t.tag===13||t.tag===31){var r=wi(t,67108864);r!==null&&sn(r,t,67108864),Yf(t,67108864)}}function Hb(t){if(t.tag===13||t.tag===31){var r=xn();r=Yi(r);var a=wi(t,r);a!==null&&sn(a,t,r),Yf(t,r)}}var ws=!0;function eS(t,r,a,s){var d=H.T;H.T=null;var m=X.p;try{X.p=2,Xf(t,r,a,s)}finally{X.p=m,H.T=d}}function tS(t,r,a,s){var d=H.T;H.T=null;var m=X.p;try{X.p=8,Xf(t,r,a,s)}finally{X.p=m,H.T=d}}function Xf(t,r,a,s){if(ws){var d=Zf(s);if(d===null)Mf(t,r,s,Ss,a),qb(t,s);else if(rS(d,t,r,a,s))s.stopPropagation();else if(qb(t,s),r&4&&-1<nS.indexOf(t)){for(;d!==null;){var m=ir(d);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var k=Fn(m.pendingLanes);if(k!==0){var D=m;for(D.pendingLanes|=2,D.entangledLanes|=2;k;){var V=1<<31-We(k);D.entanglements[1]|=V,k&=~V}Qn(m),(Ke&6)===0&&(is=at()+500,Na(0))}}break;case 31:case 13:D=wi(m,2),D!==null&&sn(D,m,2),as(),Yf(m,2)}if(m=Zf(s),m===null&&Mf(t,r,s,Ss,a),m===d)break;d=m}d!==null&&s.stopPropagation()}else Mf(t,r,s,null,a)}}function Zf(t){return t=Ku(t),Kf(t)}var Ss=null;function Kf(t){if(Ss=null,t=Yn(t),t!==null){var r=u(t);if(r===null)t=null;else{var a=r.tag;if(a===13){if(t=c(r),t!==null)return t;t=null}else if(a===31){if(t=f(r),t!==null)return t;t=null}else if(a===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null)}}return Ss=t,null}function $b(t){switch(t){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(rr()){case ae:return 2;case ge:return 8;case Re:case Ie:return 32;case $e:return 268435456;default:return 32}default:return 32}}var Qf=!1,Qr=null,Wr=null,Jr=null,Ma=new Map,Oa=new Map,ei=[],nS="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 qb(t,r){switch(t){case"focusin":case"focusout":Qr=null;break;case"dragenter":case"dragleave":Wr=null;break;case"mouseover":case"mouseout":Jr=null;break;case"pointerover":case"pointerout":Ma.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Oa.delete(r.pointerId)}}function za(t,r,a,s,d,m){return t===null||t.nativeEvent!==m?(t={blockedOn:r,domEventName:a,eventSystemFlags:s,nativeEvent:m,targetContainers:[d]},r!==null&&(r=ir(r),r!==null&&Ub(r)),t):(t.eventSystemFlags|=s,r=t.targetContainers,d!==null&&r.indexOf(d)===-1&&r.push(d),t)}function rS(t,r,a,s,d){switch(r){case"focusin":return Qr=za(Qr,t,r,a,s,d),!0;case"dragenter":return Wr=za(Wr,t,r,a,s,d),!0;case"mouseover":return Jr=za(Jr,t,r,a,s,d),!0;case"pointerover":var m=d.pointerId;return Ma.set(m,za(Ma.get(m)||null,t,r,a,s,d)),!0;case"gotpointercapture":return m=d.pointerId,Oa.set(m,za(Oa.get(m)||null,t,r,a,s,d)),!0}return!1}function Pb(t){var r=Yn(t.target);if(r!==null){var a=u(r);if(a!==null){if(r=a.tag,r===13){if(r=c(a),r!==null){t.blockedOn=r,po(t.priority,function(){Hb(a)});return}}else if(r===31){if(r=f(a),r!==null){t.blockedOn=r,po(t.priority,function(){Hb(a)});return}}else if(r===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function ks(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var a=Zf(t.nativeEvent);if(a===null){a=t.nativeEvent;var s=new a.constructor(a.type,a);Zu=s,a.target.dispatchEvent(s),Zu=null}else return r=ir(a),r!==null&&Ub(r),t.blockedOn=a,!1;r.shift()}return!0}function Vb(t,r,a){ks(t)&&a.delete(r)}function iS(){Qf=!1,Qr!==null&&ks(Qr)&&(Qr=null),Wr!==null&&ks(Wr)&&(Wr=null),Jr!==null&&ks(Jr)&&(Jr=null),Ma.forEach(Vb),Oa.forEach(Vb)}function Es(t,r){t.blockedOn===r&&(t.blockedOn=null,Qf||(Qf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,iS)))}var Cs=null;function Gb(t){Cs!==t&&(Cs=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Cs===t&&(Cs=null);for(var r=0;r<t.length;r+=3){var a=t[r],s=t[r+1],d=t[r+2];if(typeof s!="function"){if(Kf(s||a)===null)continue;break}var m=ir(a);m!==null&&(t.splice(r,3),r-=3,Xc(m,{pending:!0,data:d,method:a.method,action:s},s,d))}}))}function Tl(t){function r(V){return Es(V,t)}Qr!==null&&Es(Qr,t),Wr!==null&&Es(Wr,t),Jr!==null&&Es(Jr,t),Ma.forEach(r),Oa.forEach(r);for(var a=0;a<ei.length;a++){var s=ei[a];s.blockedOn===t&&(s.blockedOn=null)}for(;0<ei.length&&(a=ei[0],a.blockedOn===null);)Pb(a),a.blockedOn===null&&ei.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(s=0;s<a.length;s+=3){var d=a[s],m=a[s+1],k=d[Ut]||null;if(typeof m=="function")k||Gb(a);else if(k){var D=null;if(m&&m.hasAttribute("formAction")){if(d=m,k=m[Ut]||null)D=k.formAction;else if(Kf(d)!==null)continue}else D=k.action;typeof D=="function"?a[s+1]=D:(a.splice(s,3),s-=3),Gb(a)}}}function Yb(){function t(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(k){return d=k})},focusReset:"manual",scroll:"manual"})}function r(){d!==null&&(d(),d=null),s||setTimeout(a,20)}function a(){if(!s&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,d=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(a,100),function(){s=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),d!==null&&(d(),d=null)}}}function Wf(t){this._internalRoot=t}As.prototype.render=Wf.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(l(409));var a=r.current,s=xn();Fb(a,s,t,r,null,null)},As.prototype.unmount=Wf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;Fb(t.current,2,null,t,null,null),as(),r[jr]=null}};function As(t){this._internalRoot=t}As.prototype.unstable_scheduleHydration=function(t){if(t){var r=en();t={blockedOn:null,target:t,priority:r};for(var a=0;a<ei.length&&r!==0&&r<ei[a].priority;a++);ei.splice(a,0,t),a===0&&Pb(t)}};var Xb=n.version;if(Xb!=="19.2.4")throw Error(l(527,Xb,"19.2.4"));X.findDOMNode=function(t){var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(l(188)):(t=Object.keys(t).join(","),Error(l(268,t)));return t=p(r),t=t!==null?b(t):null,t=t===null?null:t.stateNode,t};var lS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ns=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ns.isDisabled&&Ns.supportsFiber)try{Mt=Ns.inject(lS),gt=Ns}catch{}}return Fa.createRoot=function(t,r){if(!o(t))throw Error(l(299));var a=!1,s="",d=tg,m=ng,k=rg;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(s=r.identifierPrefix),r.onUncaughtError!==void 0&&(d=r.onUncaughtError),r.onCaughtError!==void 0&&(m=r.onCaughtError),r.onRecoverableError!==void 0&&(k=r.onRecoverableError)),r=zb(t,1,!1,null,null,a,s,null,d,m,k,Yb),t[jr]=r.current,Df(t),new Wf(r)},Fa.hydrateRoot=function(t,r,a){if(!o(t))throw Error(l(299));var s=!1,d="",m=tg,k=ng,D=rg,V=null;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(d=a.identifierPrefix),a.onUncaughtError!==void 0&&(m=a.onUncaughtError),a.onCaughtError!==void 0&&(k=a.onCaughtError),a.onRecoverableError!==void 0&&(D=a.onRecoverableError),a.formState!==void 0&&(V=a.formState)),r=zb(t,1,!0,r,a??null,s,d,V,m,k,D,Yb),r.context=Ib(null),a=r.current,s=xn(),s=Yi(s),d=Br(s),d.callback=null,Ur(a,d,s),a=s,r.current.lanes=a,Gn(r,a),Qn(r),t[jr]=r.current,Df(t),new As(r)},Fa.version="19.2.4",Fa}var ly;function CS(){if(ly)return td.exports;ly=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),td.exports=ES(),td.exports}var AS=CS();const NS=Su(AS),S1=["shift","alt","meta","mod","ctrl","control"],TS={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 ci(e){return(TS[e.trim()]||e.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function k1(e){return S1.includes(e)}function ld(e,n=","){return e.toLowerCase().split(n)}function ad(e,n="+",i=">",l=!1,o,u){let c=[],f=!1;e=e.trim(),e.includes(i)?(f=!0,c=e.toLocaleLowerCase().split(i).map(b=>ci(b))):c=e.toLocaleLowerCase().split(n).map(b=>ci(b));const h={alt:c.includes("alt"),ctrl:c.includes("ctrl")||c.includes("control"),shift:c.includes("shift"),meta:c.includes("meta"),mod:c.includes("mod"),useKey:l},p=c.filter(b=>!S1.includes(b));return{...h,keys:p,description:o,isSequence:f,hotkey:e,metadata:u}}typeof document<"u"&&(document.addEventListener("keydown",e=>{e.code!==void 0&&E1([ci(e.code)])}),document.addEventListener("keyup",e=>{e.code!==void 0&&C1([ci(e.code)])})),typeof window<"u"&&(window.addEventListener("blur",()=>{Cr.clear()}),window.addEventListener("contextmenu",()=>{setTimeout(()=>{Cr.clear()},0)}));const Cr=new Set;function Nh(e){return Array.isArray(e)}function RS(e,n=","){return(Nh(e)?e:e.split(n)).every(i=>Cr.has(i.trim().toLowerCase()))}function E1(e){const n=Array.isArray(e)?e:[e];Cr.has("meta")&&Cr.forEach(i=>{k1(i)||Cr.delete(i.toLowerCase())}),n.forEach(i=>{Cr.add(i.toLowerCase())})}function C1(e){const n=Array.isArray(e)?e:[e];e==="meta"?Cr.clear():n.forEach(i=>{Cr.delete(i.toLowerCase())})}function jS(e,n,i){(typeof i=="function"&&i(e,n)||i===!0)&&e.preventDefault()}function _S(e,n,i){return typeof i=="function"?i(e,n):i===!0||i===void 0}const LS=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"];function DS(e){return A1(e,LS)}function A1(e,n=!1){const{target:i,composed:l}=e;let o,u;return MS(i)&&l?(o=e.composedPath()[0]&&e.composedPath()[0].tagName,u=e.composedPath()[0]&&e.composedPath()[0].role):(o=i&&i.tagName,u=i&&i.role),Nh(n)?!!(o&&n&&n.some(c=>c.toLowerCase()===o.toLowerCase()||c===u)):!!(o&&n&&n)}function MS(e){return!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-")}function OS(e,n){return e.length===0&&n?!1:n?e.some(i=>n.includes(i))||e.includes("*"):!0}const zS=(e,n,i=!1)=>{const{alt:l,meta:o,mod:u,shift:c,ctrl:f,keys:h,useKey:p}=n,{code:b,key:g,ctrlKey:v,metaKey:x,shiftKey:w,altKey:S}=e,A=ci(b);if(p&&h?.length===1&&h.includes(g.toLowerCase()))return!0;if(!h?.includes(A)&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(A))return!1;if(!i){if(l!==S&&A!=="alt"||c!==w&&A!=="shift")return!1;if(u){if(!x&&!v)return!1}else if(o!==x&&A!=="meta"&&A!=="os"||f!==v&&A!=="ctrl"&&A!=="control")return!1}return h&&h.length===1&&h.includes(A)?!0:h&&h.length>0?h.includes(A)?RS(h):!1:!h||h.length===0},N1=N.createContext(void 0),IS=()=>N.useContext(N1);function FS({addHotkey:e,removeHotkey:n,children:i}){return y.jsx(N1.Provider,{value:{addHotkey:e,removeHotkey:n},children:i})}function Th(e,n){return e&&n&&typeof e=="object"&&typeof n=="object"?Object.keys(e).length===Object.keys(n).length&&Object.keys(e).reduce((i,l)=>i&&Th(e[l],n[l]),!0):e===n}const T1=N.createContext({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),io=()=>N.useContext(T1),BS=({initiallyActiveScopes:e=["*"],children:n})=>{const[i,l]=N.useState(e),[o,u]=N.useState([]),c=N.useCallback(g=>{l(v=>v.includes("*")?[g]:Array.from(new Set([...v,g])))},[]),f=N.useCallback(g=>{l(v=>v.filter(x=>x!==g))},[]),h=N.useCallback(g=>{l(v=>v.includes(g)?v.filter(x=>x!==g):v.includes("*")?[g]:Array.from(new Set([...v,g])))},[]),p=N.useCallback(g=>{u(v=>[...v,g])},[]),b=N.useCallback(g=>{u(v=>v.filter(x=>!Th(x,g)))},[]);return y.jsx(T1.Provider,{value:{activeScopes:i,hotkeys:o,enableScope:c,disableScope:f,toggleScope:h},children:y.jsx(FS,{addHotkey:p,removeHotkey:b,children:n})})};function US(e){const n=N.useRef(void 0);return Th(n.current,e)||(n.current=e),n.current}const ay=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},HS=typeof window<"u"?N.useLayoutEffect:N.useEffect;function ot(e,n,i,l){const o=N.useRef(null),u=N.useRef(!1),c=Array.isArray(i)?Array.isArray(l)?void 0:l:i,f=Nh(e)?e.join(c?.delimiter):e,h=Array.isArray(i)?i:Array.isArray(l)?l:void 0,p=N.useCallback(n,h??[]),b=N.useRef(p);h?b.current=p:b.current=n;const g=US(c),{activeScopes:v}=io(),x=IS();return HS(()=>{if(g?.enabled===!1||!OS(v,g?.scopes))return;let w=[],S;const A=(z,$=!1)=>{if(!(DS(z)&&!A1(z,g?.enableOnFormTags))){if(o.current!==null){const _=o.current.getRootNode();if((_ instanceof Document||_ instanceof ShadowRoot)&&_.activeElement!==o.current&&!o.current.contains(_.activeElement)){ay(z);return}}z.target?.isContentEditable&&!g?.enableOnContentEditable||ld(f,g?.delimiter).forEach(_=>{if(_.includes(g?.splitKey??"+")&&_.includes(g?.sequenceSplitKey??">")){console.warn(`Hotkey ${_} contains both ${g?.splitKey??"+"} and ${g?.sequenceSplitKey??">"} which is not supported.`);return}const F=ad(_,g?.splitKey,g?.sequenceSplitKey,g?.useKey,g?.description,g?.metadata);if(F.isSequence){S=setTimeout(()=>{w=[]},g?.sequenceTimeoutMs??1e3);const P=F.useKey?z.key:ci(z.code);if(k1(P.toLowerCase()))return;w.push(P);const O=F.keys?.[w.length-1];if(P!==O){w=[],S&&clearTimeout(S);return}w.length===F.keys?.length&&(b.current(z,F),S&&clearTimeout(S),w=[])}else if(zS(z,F,g?.ignoreModifiers)||F.keys?.includes("*")){if(g?.ignoreEventWhen?.(z)||$&&u.current)return;if(jS(z,F,g?.preventDefault),!_S(z,F,g?.enabled)){ay(z);return}b.current(z,F),$||(u.current=!0)}})}},C=z=>{z.code!==void 0&&(E1(ci(z.code)),(g?.keydown===void 0&&g?.keyup!==!0||g?.keydown)&&A(z))},E=z=>{z.code!==void 0&&(C1(ci(z.code)),u.current=!1,g?.keyup&&A(z,!0))},R=o.current||c?.document||document;return R.addEventListener("keyup",E,c?.eventListenerOptions),R.addEventListener("keydown",C,c?.eventListenerOptions),x&&ld(f,g?.delimiter).forEach(z=>{x.addHotkey(ad(z,g?.splitKey,g?.sequenceSplitKey,g?.useKey,g?.description,g?.metadata))}),()=>{R.removeEventListener("keyup",E,c?.eventListenerOptions),R.removeEventListener("keydown",C,c?.eventListenerOptions),x&&ld(f,g?.delimiter).forEach(z=>{x.removeHotkey(ad(z,g?.splitKey,g?.sequenceSplitKey,g?.useKey,g?.description,g?.metadata))}),w=[],S&&clearTimeout(S)}},[f,g,v]),o}const R1=(...e)=>e.filter((n,i,l)=>!!n&&n.trim()!==""&&l.indexOf(n)===i).join(" ").trim();const $S=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const qS=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,i,l)=>l?l.toUpperCase():i.toLowerCase());const oy=e=>{const n=qS(e);return n.charAt(0).toUpperCase()+n.slice(1)};var PS={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"};const VS=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1};const GS=N.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:i=2,absoluteStrokeWidth:l,className:o="",children:u,iconNode:c,...f},h)=>N.createElement("svg",{ref:h,...PS,width:n,height:n,stroke:e,strokeWidth:l?Number(i)*24/Number(n):i,className:R1("lucide",o),...!u&&!VS(f)&&{"aria-hidden":"true"},...f},[...c.map(([p,b])=>N.createElement(p,b)),...Array.isArray(u)?u:[u]]));const He=(e,n)=>{const i=N.forwardRef(({className:l,...o},u)=>N.createElement(GS,{ref:u,iconNode:n,className:R1(`lucide-${$S(oy(e))}`,`lucide-${e}`,l),...o}));return i.displayName=oy(e),i};const YS=[["path",{d:"M19 3H5",key:"1236rx"}],["path",{d:"M12 21V7",key:"gj6g52"}],["path",{d:"m6 15 6 6 6-6",key:"h15q88"}]],XS=He("arrow-down-from-line",YS);const ZS=[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]],KS=He("arrow-up-from-line",ZS);const QS=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Wa=He("check",QS);const WS=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ul=He("chevron-down",WS);const JS=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],ek=He("chevron-left",JS);const tk=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],j1=He("chevron-right",tk);const nk=[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]],rk=He("chevrons-down-up",nk);const ik=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],lk=He("chevrons-up-down",ik);const ak=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],ok=He("code",ak);const sk=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],uk=He("columns-2",sk);const ck=[["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"}]],Rh=He("copy",ck);const fk=[["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"}]],dk=He("eraser",fk);const hk=[["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"}]],pk=He("external-link",hk);const mk=[["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"}]],qs=He("eye",mk);const gk=[["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"}]],ku=He("file-diff",gk);const bk=[["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"}]],_1=He("file-pen",bk);const yk=[["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"}]],L1=He("file-plus",yk);const xk=[["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"}]],D1=He("file-x",xk);const vk=[["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"}]],wk=He("folder-open",vk);const Sk=[["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"}]],kk=He("folder",Sk);const Ek=[["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"}]],Ck=He("git-branch",Ek);const Ak=[["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"}]],Nk=He("keyboard",Ak);const Tk=[["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"}]],Rk=He("list",Tk);const jk=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],_k=He("loader-circle",jk);const Lk=[["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"}]],Dk=He("message-square-reply",Lk);const Mk=[["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"}]],M1=He("message-square",Mk);const Ok=[["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"}]],zk=He("panel-left-close",Ok);const Ik=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],Fk=He("panel-left",Ik);const Bk=[["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"}]],Uk=He("pen",Bk);const Hk=[["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"}]],$k=He("refresh-cw",Hk);const qk=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Pk=He("search",qk);const Vk=[["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"}]],O1=He("settings",Vk);const Gk=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Yk=He("square",Gk);const Xk=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],Zk=He("text-align-start",Xk);const Kk=[["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"}]],Qk=He("trash-2",Kk);const Wk=[["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"}]],Jk=He("unfold-vertical",Wk);const eE=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Eu=He("x",eE),lo="split";function tE(e){switch(e){case"split":case"side-by-side":return"split";case"unified":case"inline":return"unified";default:return lo}}function z1({checked:e,onChange:n,label:i,className:l="",title:o}){const u=f=>{f.stopPropagation(),n(!e)},c=f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),f.stopPropagation(),n(!e))};return y.jsxs("div",{className:`flex items-center gap-2 text-xs text-github-text-primary cursor-pointer ${l}`,title:o,onClick:u,onKeyDown:c,role:"checkbox","aria-checked":e,tabIndex:0,children:[y.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&&y.jsx(Wa,{size:10,className:"text-white"})}),i&&y.jsx("span",{className:"select-none",children:i})]})}function sy({commentsCount:e,isCopiedAll:n,onCopyAll:i,onDeleteAll:l,onViewAll:o,direction:u="down",compact:c=!1}){const[f,h]=N.useState(!1),p=N.useRef(null),b=c,g=u==="up";N.useEffect(()=>{const A=C=>{p.current&&!p.current.contains(C.target)&&h(!1)};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[]);const v=()=>{i(),h(!1)},x=()=>{l(),h(!1)},w=()=>{o?.(),h(!1)},S=b?n?"Copied":`Copy All (${e})`:n?"Copied All!":`Copy All Prompt (${e})`;return y.jsxs("div",{className:"relative",ref:p,children:[y.jsxs("div",{className:"flex",children:[y.jsxs("button",{onClick:v,className:`text-xs px-3 py-1.5 pr-2 rounded-l transition-all flex items-center gap-1.5 ${b?"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:A=>{A.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",A.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:A=>{A.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",A.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},title:`Copy all ${e} comments to AI coding agent`,children:[n?y.jsx(Wa,{size:12}):y.jsx(Rh,{size:12}),S]}),y.jsx("button",{onClick:()=>h(!f),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:A=>{A.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",A.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:A=>{A.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",A.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},title:"More options",children:y.jsx(Ul,{size:12,className:`transition-transform duration-200 ${f?"rotate-180":""}`})})]}),f&&y.jsxs("div",{className:`absolute left-0 right-0 bg-github-bg-primary border border-github-border z-50 pb-px ${g?"bottom-full rounded-t":"top-full rounded-b"}`,style:{borderTop:g?void 0:"none",borderBottom:g?"none":void 0},children:[o&&y.jsxs("button",{onClick:w,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:[y.jsx(Rk,{size:12}),"View All Comments"]}),y.jsxs("button",{onClick:x,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:[y.jsx(dk,{size:12}),"Cleanup All Prompt"]})]})]})}function I1(e){return/```suggestion\n([\s\S]*?)```/.test(e)}function F1(e){const n=[],i=/```suggestion\n([\s\S]*?)```/g;let l;for(;(l=i.exec(e))!==null;)n.push({suggestedCode:l[1].replace(/\n$/,""),startIndex:l.index,endIndex:l.index+l[0].length});return n}function nE(e){return`\`\`\`suggestion
|
|
10
|
-
${e.endsWith(`
|
|
11
|
-
`)?e:e+`
|
|
12
|
-
`}\`\`\``}const rE=2,iE=100;function lE(e){return!(e.length<rE||e.length>iE)}function uy(e){return e.toLowerCase()}function cy(e){const n=e.trim();return n?n.match(/^\w+$/)!==null&&lE(n):!1}const aE=200,B1=N.createContext(void 0);function oE({children:e}){const[n,i]=N.useState(null),l=N.useRef(null),o=N.useCallback(()=>{l.current&&(clearTimeout(l.current),l.current=null)},[]),u=N.useCallback(p=>{const b=p.target;if(!b.classList.contains("word-token"))return;o();const g=b.getAttribute("data-word");g&&(l.current=setTimeout(()=>{i(g)},aE))},[o]),c=N.useCallback(()=>{o(),i(null)},[o]),f=N.useCallback(p=>n?uy(p)===uy(n):!1,[n]);N.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]);const h=N.useMemo(()=>({highlightedWord:n,handleMouseOver:u,handleMouseOut:c,isWordHighlighted:f}),[n,u,c,f]);return y.jsx(B1.Provider,{value:h,children:e})}function sE(){const e=N.useContext(B1);if(!e)throw new Error("useWordHighlight must be used within a WordHighlightProvider");return e}function U1(e){var n,i,l="";if(typeof e=="string"||typeof e=="number")l+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(n=0;n<o;n++)e[n]&&(i=U1(e[n]))&&(l&&(l+=" "),l+=i)}else for(i in e)e[i]&&(l&&(l+=" "),l+=i);return l}function H1(){for(var e,n,i=0,l="",o=arguments.length;i<o;i++)(e=arguments[i])&&(n=U1(e))&&(l&&(l+=" "),l+=n);return l}var uE=Object.create,Cu=Object.defineProperty,cE=Object.defineProperties,fE=Object.getOwnPropertyDescriptor,dE=Object.getOwnPropertyDescriptors,$1=Object.getOwnPropertyNames,Ps=Object.getOwnPropertySymbols,hE=Object.getPrototypeOf,jh=Object.prototype.hasOwnProperty,q1=Object.prototype.propertyIsEnumerable,fy=(e,n,i)=>n in e?Cu(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i,Jn=(e,n)=>{for(var i in n||(n={}))jh.call(n,i)&&fy(e,i,n[i]);if(Ps)for(var i of Ps(n))q1.call(n,i)&&fy(e,i,n[i]);return e},Au=(e,n)=>cE(e,dE(n)),P1=(e,n)=>{var i={};for(var l in e)jh.call(e,l)&&n.indexOf(l)<0&&(i[l]=e[l]);if(e!=null&&Ps)for(var l of Ps(e))n.indexOf(l)<0&&q1.call(e,l)&&(i[l]=e[l]);return i},pE=(e,n)=>function(){return n||(0,e[$1(e)[0]])((n={exports:{}}).exports,n),n.exports},mE=(e,n)=>{for(var i in n)Cu(e,i,{get:n[i],enumerable:!0})},gE=(e,n,i,l)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of $1(n))!jh.call(e,o)&&o!==i&&Cu(e,o,{get:()=>n[o],enumerable:!(l=fE(n,o))||l.enumerable});return e},bE=(e,n,i)=>(i=e!=null?uE(hE(e)):{},gE(!e||!e.__esModule?Cu(i,"default",{value:e,enumerable:!0}):i,e)),yE=pE({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,n){var i=(function(){var l=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,u={},c={util:{encode:function w(S){return S instanceof f?new f(S.type,w(S.content),S.alias):Array.isArray(S)?S.map(w):S.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(w){return Object.prototype.toString.call(w).slice(8,-1)},objId:function(w){return w.__id||Object.defineProperty(w,"__id",{value:++o}),w.__id},clone:function w(S,A){A=A||{};var C,E;switch(c.util.type(S)){case"Object":if(E=c.util.objId(S),A[E])return A[E];C={},A[E]=C;for(var R in S)S.hasOwnProperty(R)&&(C[R]=w(S[R],A));return C;case"Array":return E=c.util.objId(S),A[E]?A[E]:(C=[],A[E]=C,S.forEach(function(z,$){C[$]=w(z,A)}),C);default:return S}},getLanguage:function(w){for(;w;){var S=l.exec(w.className);if(S)return S[1].toLowerCase();w=w.parentElement}return"none"},setLanguage:function(w,S){w.className=w.className.replace(RegExp(l,"gi"),""),w.classList.add("language-"+S)},isActive:function(w,S,A){for(var C="no-"+S;w;){var E=w.classList;if(E.contains(S))return!0;if(E.contains(C))return!1;w=w.parentElement}return!!A}},languages:{plain:u,plaintext:u,text:u,txt:u,extend:function(w,S){var A=c.util.clone(c.languages[w]);for(var C in S)A[C]=S[C];return A},insertBefore:function(w,S,A,C){C=C||c.languages;var E=C[w],R={};for(var z in E)if(E.hasOwnProperty(z)){if(z==S)for(var $ in A)A.hasOwnProperty($)&&(R[$]=A[$]);A.hasOwnProperty(z)||(R[z]=E[z])}var _=C[w];return C[w]=R,c.languages.DFS(c.languages,function(F,P){P===_&&F!=w&&(this[F]=R)}),R},DFS:function w(S,A,C,E){E=E||{};var R=c.util.objId;for(var z in S)if(S.hasOwnProperty(z)){A.call(S,z,S[z],C||z);var $=S[z],_=c.util.type($);_==="Object"&&!E[R($)]?(E[R($)]=!0,w($,A,null,E)):_==="Array"&&!E[R($)]&&(E[R($)]=!0,w($,A,z,E))}}},plugins:{},highlight:function(w,S,A){var C={code:w,grammar:S,language:A};if(c.hooks.run("before-tokenize",C),!C.grammar)throw new Error('The language "'+C.language+'" has no grammar.');return C.tokens=c.tokenize(C.code,C.grammar),c.hooks.run("after-tokenize",C),f.stringify(c.util.encode(C.tokens),C.language)},tokenize:function(w,S){var A=S.rest;if(A){for(var C in A)S[C]=A[C];delete S.rest}var E=new b;return g(E,E.head,w),p(w,E,S,E.head,0),x(E)},hooks:{all:{},add:function(w,S){var A=c.hooks.all;A[w]=A[w]||[],A[w].push(S)},run:function(w,S){var A=c.hooks.all[w];if(!(!A||!A.length))for(var C=0,E;E=A[C++];)E(S)}},Token:f};function f(w,S,A,C){this.type=w,this.content=S,this.alias=A,this.length=(C||"").length|0}f.stringify=function w(S,A){if(typeof S=="string")return S;if(Array.isArray(S)){var C="";return S.forEach(function(_){C+=w(_,A)}),C}var E={type:S.type,content:w(S.content,A),tag:"span",classes:["token",S.type],attributes:{},language:A},R=S.alias;R&&(Array.isArray(R)?Array.prototype.push.apply(E.classes,R):E.classes.push(R)),c.hooks.run("wrap",E);var z="";for(var $ in E.attributes)z+=" "+$+'="'+(E.attributes[$]||"").replace(/"/g,""")+'"';return"<"+E.tag+' class="'+E.classes.join(" ")+'"'+z+">"+E.content+"</"+E.tag+">"};function h(w,S,A,C){w.lastIndex=S;var E=w.exec(A);if(E&&C&&E[1]){var R=E[1].length;E.index+=R,E[0]=E[0].slice(R)}return E}function p(w,S,A,C,E,R){for(var z in A)if(!(!A.hasOwnProperty(z)||!A[z])){var $=A[z];$=Array.isArray($)?$:[$];for(var _=0;_<$.length;++_){if(R&&R.cause==z+","+_)return;var F=$[_],P=F.inside,O=!!F.lookbehind,L=!!F.greedy,I=F.alias;if(L&&!F.pattern.global){var q=F.pattern.toString().match(/[imsuy]*$/)[0];F.pattern=RegExp(F.pattern.source,q+"g")}for(var K=F.pattern||F,U=C.next,G=E;U!==S.tail&&!(R&&G>=R.reach);G+=U.value.length,U=U.next){var H=U.value;if(S.length>w.length)return;if(!(H instanceof f)){var X=1,Y;if(L){if(Y=h(K,G,w,O),!Y||Y.index>=w.length)break;var B=Y.index,ne=Y.index+Y[0].length,M=G;for(M+=U.value.length;B>=M;)U=U.next,M+=U.value.length;if(M-=U.value.length,G=M,U.value instanceof f)continue;for(var j=U;j!==S.tail&&(M<ne||typeof j.value=="string");j=j.next)X++,M+=j.value.length;X--,H=w.slice(G,M),Y.index-=G}else if(Y=h(K,0,H,O),!Y)continue;var B=Y.index,T=Y[0],J=H.slice(0,B),W=H.slice(B+T.length),ie=G+H.length;R&&ie>R.reach&&(R.reach=ie);var de=U.prev;J&&(de=g(S,de,J),G+=J.length),v(S,de,X);var me=new f(z,P?c.tokenize(T,P):T,I,T);if(U=g(S,de,me),W&&g(S,U,W),X>1){var ye={cause:z+","+_,reach:ie};p(w,S,A,U.prev,G,ye),R&&ye.reach>R.reach&&(R.reach=ye.reach)}}}}}}function b(){var w={value:null,prev:null,next:null},S={value:null,prev:w,next:null};w.next=S,this.head=w,this.tail=S,this.length=0}function g(w,S,A){var C=S.next,E={value:A,prev:S,next:C};return S.next=E,C.prev=E,w.length++,E}function v(w,S,A){for(var C=S.next,E=0;E<A&&C!==w.tail;E++)C=C.next;S.next=C,C.prev=S,w.length-=E}function x(w){for(var S=[],A=w.head.next;A!==w.tail;)S.push(A.value),A=A.next;return S}return c})();n.exports=i,i.default=i}}),ce=bE(yE());ce.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]},ce.languages.markup.tag.inside["attr-value"].inside.entity=ce.languages.markup.entity,ce.languages.markup.doctype.inside["internal-subset"].inside=ce.languages.markup,ce.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(ce.languages.markup.tag,"addInlined",{value:function(e,l){var i={},i=(i["language-"+l]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:ce.languages[l]},i.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:i}}),l=(i["language-"+l]={pattern:/[\s\S]+/,inside:ce.languages[l]},{});l[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:i},ce.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(ce.languages.markup.tag,"addAttribute",{value:function(e,n){ce.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:ce.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),ce.languages.html=ce.languages.markup,ce.languages.mathml=ce.languages.markup,ce.languages.svg=ce.languages.markup,ce.languages.xml=ce.languages.extend("markup",{}),ce.languages.ssml=ce.languages.xml,ce.languages.atom=ce.languages.xml,ce.languages.rss=ce.languages.xml,(function(e){var n={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},i=/\\(?: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]|.)/,l="(?:[^\\\\-]|"+i.source+")",l=RegExp(l+"-"+l),o={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:l,inside:{escape:i,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":n,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:i}},"special-escape":n,"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":o}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:i,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":o}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}})(ce),ce.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:/[{}[\];(),.:]/},ce.languages.javascript=ce.languages.extend("clike",{"class-name":[ce.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$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),ce.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,ce.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:ce.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:ce.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:ce.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:ce.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:ce.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),ce.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:ce.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"}}),ce.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),ce.languages.markup&&(ce.languages.markup.tag.addInlined("script","javascript"),ce.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)/.source,"javascript")),ce.languages.js=ce.languages.javascript,ce.languages.actionscript=ce.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:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),ce.languages.actionscript["class-name"].alias="function",delete ce.languages.actionscript.parameter,delete ce.languages.actionscript["literal-property"],ce.languages.markup&&ce.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:ce.languages.markup}}),(function(e){var n=/#(?!\{).+/,i={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:n,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:i}}],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:n,interpolation:i}}}),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:i}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript})(ce),(function(e){var n=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(n,"addSupport",{value:function(i,l){(i=typeof i=="string"?[i]:i).forEach(function(o){var u=function(g){g.inside||(g.inside={}),g.inside.rest=l},c="doc-comment";if(f=e.languages[o]){var f,h=f[c];if((h=h||(f=e.languages.insertBefore(o,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[c])instanceof RegExp&&(h=f[c]={pattern:h}),Array.isArray(h))for(var p=0,b=h.length;p<b;p++)h[p]instanceof RegExp&&(h[p]={pattern:h[p]}),u(h[p]);else u(h)}})}}),n.addSupport(["java","javascript","php"],n)})(ce),(function(e){var n=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,n=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+n.source+")*?"+/(?:;|(?=\s*\{))/.source),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\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+n.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:n,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);n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(ce),(function(e){var n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,n=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:n={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp(`\\[(?:[^[\\]"']|`+n.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":[n,{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=n,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}),i={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:n,number:i,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:n,number:i})})(ce),(function(e){var n=/[*&][^\s[\]{},]+/,i=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,l="(?:"+i.source+"(?:[ ]+"+n.source+")?|"+n.source+"(?:[ ]+"+i.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),u=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function c(f,h){h=(h||"").replace(/m/g,"")+"m";var p=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return l}).replace(/<<value>>/g,function(){return f});return RegExp(p,h)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return l})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return l}).replace(/<<key>>/g,function(){return"(?:"+o+"|"+u+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:c(/\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*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:c(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:c(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:c(u),lookbehind:!0,greedy:!0},number:{pattern:c(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:i,important:n,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml})(ce),(function(e){var n=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function i(p){return p=p.replace(/<inner>/g,function(){return n}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+p+")")}var l=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return l}),u=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,c=(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("^"+o+u+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+u+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(l),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+u+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(l),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:i(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:i(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:i(/(~~?)(?:(?!~)<inner>)+\2/.source),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:i(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),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(p){["url","bold","italic","strike","code-snippet"].forEach(function(b){p!==b&&(e.languages.markdown[p].inside.content.inside[b]=e.languages.markdown[b])})}),e.hooks.add("after-tokenize",function(p){p.language!=="markdown"&&p.language!=="md"||(function b(g){if(g&&typeof g!="string")for(var v=0,x=g.length;v<x;v++){var w,S=g[v];S.type!=="code"?b(S.content):(w=S.content[1],S=S.content[3],w&&S&&w.type==="code-language"&&S.type==="code-block"&&typeof w.content=="string"&&(w=w.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),w="language-"+(w=(/[a-z][\w-]*/i.exec(w)||[""])[0].toLowerCase()),S.alias?typeof S.alias=="string"?S.alias=[S.alias,w]:S.alias.push(w):S.alias=[w]))}})(p.tokens)}),e.hooks.add("wrap",function(p){if(p.type==="code-block"){for(var b="",g=0,v=p.classes.length;g<v;g++){var x=p.classes[g],x=/language-(.+)/.exec(x);if(x){b=x[1];break}}var w,S=e.languages[b];S?p.content=e.highlight((function(A){return A=A.replace(c,""),A=A.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(C,E){var R;return(E=E.toLowerCase())[0]==="#"?(R=E[1]==="x"?parseInt(E.slice(2),16):Number(E.slice(1)),h(R)):f[E]||C})})(p.content),S,b):b&&b!=="none"&&e.plugins.autoloader&&(w="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random()),p.attributes.id=w,e.plugins.autoloader.loadLanguages(b,function(){var A=document.getElementById(w);A&&(A.innerHTML=e.highlight(A.textContent,e.languages[b],b))}))}}),RegExp(e.languages.markup.tag.pattern.source,"gi")),f={amp:"&",lt:"<",gt:">",quot:'"'},h=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown})(ce),ce.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:ce.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+/},ce.hooks.add("after-tokenize",function(e){if(e.language==="graphql")for(var n=e.tokens.filter(function(w){return typeof w!="string"&&w.type!=="comment"&&w.type!=="scalar"}),i=0;i<n.length;){var l=n[i++];if(l.type==="keyword"&&l.content==="mutation"){var o=[];if(g(["definition-mutation","punctuation"])&&b(1).content==="("){i+=2;var u=v(/^\($/,/^\)$/);if(u===-1)continue;for(;i<u;i++){var c=b(0);c.type==="variable"&&(x(c,"variable-input"),o.push(c.content))}i=u+1}if(g(["punctuation","property-query"])&&b(0).content==="{"&&(i++,x(b(0),"property-mutation"),0<o.length)){var f=v(/^\{$/,/^\}$/);if(f!==-1)for(var h=i;h<f;h++){var p=n[h];p.type==="variable"&&0<=o.indexOf(p.content)&&x(p,"variable-input")}}}}function b(w){return n[i+w]}function g(w,S){S=S||0;for(var A=0;A<w.length;A++){var C=b(A+S);if(!C||C.type!==w[A])return}return 1}function v(w,S){for(var A=1,C=i;C<n.length;C++){var E=n[C],R=E.content;if(E.type==="punctuation"&&typeof R=="string"){if(w.test(R))A++;else if(S.test(R)&&--A===0)return C}}return-1}function x(w,S){var A=w.alias;A?Array.isArray(A)||(w.alias=A=[A]):w.alias=A=[],A.push(S)}}),ce.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 n=e.languages.javascript["template-string"],i=n.pattern.source,l=n.inside.interpolation,o=l.inside["interpolation-punctuation"],u=l.pattern.source;function c(g,v){if(e.languages[g])return{pattern:RegExp("((?:"+v+")\\s*)"+i),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:g}}}}function f(g,v,x){return g={code:g,grammar:v,language:x},e.hooks.run("before-tokenize",g),g.tokens=e.tokenize(g.code,g.grammar),e.hooks.run("after-tokenize",g),g.tokens}function h(g,v,x){var A=e.tokenize(g,{interpolation:{pattern:RegExp(u),lookbehind:!0}}),w=0,S={},A=f(A.map(function(E){if(typeof E=="string")return E;for(var R,z,E=E.content;g.indexOf((z=w++,R="___"+x.toUpperCase()+"_"+z+"___"))!==-1;);return S[R]=E,R}).join(""),v,x),C=Object.keys(S);return w=0,(function E(R){for(var z=0;z<R.length;z++){if(w>=C.length)return;var $,_,F,P,O,L,I,q=R[z];typeof q=="string"||typeof q.content=="string"?($=C[w],(I=(L=typeof q=="string"?q:q.content).indexOf($))!==-1&&(++w,_=L.substring(0,I),O=S[$],F=void 0,(P={})["interpolation-punctuation"]=o,(P=e.tokenize(O,P)).length===3&&((F=[1,1]).push.apply(F,f(P[1],e.languages.javascript,"javascript")),P.splice.apply(P,F)),F=new e.Token("interpolation",P,l.alias,O),P=L.substring(I+$.length),O=[],_&&O.push(_),O.push(F),P&&(E(L=[P]),O.push.apply(O,L)),typeof q=="string"?(R.splice.apply(R,[z,1].concat(O)),z+=O.length-1):q.content=O)):(I=q.content,Array.isArray(I)?E(I):E([I]))}})(A),new e.Token(x,A,"language-"+x,g)}e.languages.javascript["template-string"]=[c("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),c("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),c("svg",/\bsvg/.source),c("markdown",/\b(?:markdown|md)/.source),c("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),c("sql",/\bsql/.source),n].filter(Boolean);var p={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function b(g){return typeof g=="string"?g:Array.isArray(g)?g.map(b).join(""):b(g.content)}e.hooks.add("after-tokenize",function(g){g.language in p&&(function v(x){for(var w=0,S=x.length;w<S;w++){var A,C,E,R=x[w];typeof R!="string"&&(A=R.content,Array.isArray(A)?R.type==="template-string"?(R=A[1],A.length===3&&typeof R!="string"&&R.type==="embedded-code"&&(C=b(R),R=R.alias,R=Array.isArray(R)?R[0]:R,E=e.languages[R])&&(A[1]=h(C,E,R))):v(A):typeof A!="string"&&v([A]))}})(g.tokens)})})(ce),(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 n=e.languages.extend("typescript",{});delete n["class-name"],e.languages.typescript["class-name"].inside=n,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:n}}}}),e.languages.ts=e.languages.typescript})(ce),(function(e){var n=e.languages.javascript,i=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,l="(@(?:arg|argument|param|property)\\s+(?:"+i+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(l+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(l+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:n,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*)*/.source.replace(/<TYPE>/g,function(){return i})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+i),lookbehind:!0,inside:{string:n.string,number:n.number,boolean:n.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:n,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)})(ce),(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})})(ce),ce.languages.n4js=ce.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/}),ce.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),ce.languages.n4jsd=ce.languages.n4js,(function(e){function n(c,f){return RegExp(c.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),f)}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:n(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:n(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),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:n(/(\.\s*)#?<ID>/.source),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 i=["function","function-variable","method","method-variable","property-access"],l=0;l<i.length;l++){var u=i[l],o=e.languages.javascript[u],u=(o=e.util.type(o)==="RegExp"?e.languages.javascript[u]={pattern:o}:o).inside||{};(o.inside=u)["maybe-class-name"]=/^[A-Z][\s\S]*/}})(ce),(function(e){var n=e.util.clone(e.languages.javascript),i=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,l=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function u(h,p){return h=h.replace(/<S>/g,function(){return i}).replace(/<BRACES>/g,function(){return l}).replace(/<SPREAD>/g,function(){return o}),RegExp(h,p)}o=u(o).source,e.languages.jsx=e.languages.extend("markup",n),e.languages.jsx.tag.pattern=u(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),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=n.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:u(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:u(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);function c(h){for(var p=[],b=0;b<h.length;b++){var g=h[b],v=!1;typeof g!="string"&&(g.type==="tag"&&g.content[0]&&g.content[0].type==="tag"?g.content[0].content[0].content==="</"?0<p.length&&p[p.length-1].tagName===f(g.content[0].content[1])&&p.pop():g.content[g.content.length-1].content!=="/>"&&p.push({tagName:f(g.content[0].content[1]),openedBraces:0}):0<p.length&&g.type==="punctuation"&&g.content==="{"?p[p.length-1].openedBraces++:0<p.length&&0<p[p.length-1].openedBraces&&g.type==="punctuation"&&g.content==="}"?p[p.length-1].openedBraces--:v=!0),(v||typeof g=="string")&&0<p.length&&p[p.length-1].openedBraces===0&&(v=f(g),b<h.length-1&&(typeof h[b+1]=="string"||h[b+1].type==="plain-text")&&(v+=f(h[b+1]),h.splice(b+1,1)),0<b&&(typeof h[b-1]=="string"||h[b-1].type==="plain-text")&&(v=f(h[b-1])+v,h.splice(b-1,1),b--),h[b]=new e.Token("plain-text",v,null,v)),g.content&&typeof g.content!="string"&&c(g.content)}}var f=function(h){return h?typeof h=="string"?h:typeof h.content=="string"?h.content:h.content.map(f).join(""):""};e.hooks.add("after-tokenize",function(h){h.language!=="jsx"&&h.language!=="tsx"||c(h.tokens)})})(ce),(function(e){var n=e.util.clone(e.languages.typescript),n=(e.languages.tsx=e.languages.extend("jsx",n),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag);n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0})(ce),ce.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),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:/[{}[\]();,.:\\]/},ce.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=ce.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 n={"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:n},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:n},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})(ce),ce.languages.c=ce.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|[?:~]|[-+*/%&|^!=<>]=?/}),ce.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),ce.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},ce.languages.c.string],char:ce.languages.c.char,comment:ce.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:ce.languages.c}}}}),ce.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 ce.languages.c.boolean,ce.languages.objectivec=ce.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 ce.languages.objectivec["class-name"],ce.languages.objc=ce.languages.objectivec,ce.languages.reason=ce.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/}),ce.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 ce.languages.reason.function,(function(e){for(var n=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,i=0;i<2;i++)n=n.replace(/<self>/g,function(){return n});n=n.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+n),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})(ce),ce.languages.go=ce.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/}),ce.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete ce.languages.go["class-name"],(function(e){var n=/\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/,i=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return n.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return n.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:n,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+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return i})+")"),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"])})(ce),ce.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://,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:/[{}[\];(),.:]/},ce.languages.python["string-interpolation"].inside.interpolation.inside.rest=ce.languages.python,ce.languages.py=ce.languages.python,ce.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"}},ce.languages.webmanifest=ce.languages.json;var wn={};mE(wn,{dracula:()=>vE,duotoneDark:()=>SE,duotoneLight:()=>EE,github:()=>AE,gruvboxMaterialDark:()=>tC,gruvboxMaterialLight:()=>rC,jettwaveDark:()=>YE,jettwaveLight:()=>ZE,nightOwl:()=>TE,nightOwlLight:()=>jE,oceanicNext:()=>LE,okaidia:()=>ME,oneDark:()=>QE,oneLight:()=>JE,palenight:()=>zE,shadesOfPurple:()=>FE,synthwave84:()=>UE,ultramin:()=>$E,vsDark:()=>V1,vsLight:()=>VE});var xE={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)"}}]},vE=xE,wE={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"}}]},SE=wE,kE={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"}}]},EE=kE,CE={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"}}]},AE=CE,NE={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)"}}]},TE=NE,RE={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)"}}]},jE=RE,vn={char:"#D8DEE9",comment:"#999999",keyword:"#c5a5c5",primitive:"#5a9bcf",string:"#8dc891",variable:"#d7deea",boolean:"#ff8b50",tag:"#fc929e",function:"#79b6f2",className:"#FAC863"},_E={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:vn.keyword}},{types:["attr-value"],style:{color:vn.string}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:vn.comment}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:vn.primitive}},{types:["boolean"],style:{color:vn.boolean}},{types:["tag"],style:{color:vn.tag}},{types:["string"],style:{color:vn.string}},{types:["punctuation"],style:{color:vn.string}},{types:["selector","char","builtin","inserted"],style:{color:vn.char}},{types:["function"],style:{color:vn.function}},{types:["operator","entity","url","variable"],style:{color:vn.variable}},{types:["keyword"],style:{color:vn.keyword}},{types:["atrule","class-name"],style:{color:vn.className}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},LE=_E,DE={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"}}]},ME=DE,OE={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)"}}]},zE=OE,IE={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)"}}]},FE=IE,BE={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"}}]},UE=BE,HE={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)"}}]},$E=HE,qE={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)"}}]},V1=qE,PE={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)"}}]},VE=PE,GE={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"}}]},YE=GE,XE={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"}}]},ZE=XE,KE={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%)"}}]},QE=KE,WE={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%)"}}]},JE=WE,eC={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"}}]},tC=eC,nC={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"}}]},rC=nC,iC=e=>N.useCallback(n=>{var i=n,{className:l,style:o,line:u}=i,c=P1(i,["className","style","line"]);const f=Au(Jn({},c),{className:H1("token-line",l)});return typeof e=="object"&&"plain"in e&&(f.style=e.plain),typeof o=="object"&&(f.style=Jn(Jn({},f.style||{}),o)),f},[e]),lC=e=>{const n=N.useCallback(({types:i,empty:l})=>{if(e!=null){{if(i.length===1&&i[0]==="plain")return l!=null?{display:"inline-block"}:void 0;if(i.length===1&&l!=null)return e[i[0]]}return Object.assign(l!=null?{display:"inline-block"}:{},...i.map(o=>e[o]))}},[e]);return N.useCallback(i=>{var l=i,{token:o,className:u,style:c}=l,f=P1(l,["token","className","style"]);const h=Au(Jn({},f),{className:H1("token",...o.types,u),children:o.content,style:n(o)});return c!=null&&(h.style=Jn(Jn({},h.style||{}),c)),h},[n])},aC=/\r\n|\r|\n/,dy=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)},hy=(e,n)=>{const i=e.length;return i>0&&e[i-1]===n?e:e.concat(n)},oC=e=>{const n=[[]],i=[e],l=[0],o=[e.length];let u=0,c=0,f=[];const h=[f];for(;c>-1;){for(;(u=l[c]++)<o[c];){let p,b=n[c];const v=i[c][u];if(typeof v=="string"?(b=c>0?b:["plain"],p=v):(b=hy(b,v.type),v.alias&&(b=hy(b,v.alias)),p=v.content),typeof p!="string"){c++,n.push(b),i.push(p),l.push(0),o.push(p.length);continue}const x=p.split(aC),w=x.length;f.push({types:b,content:x[0]});for(let S=1;S<w;S++)dy(f),h.push(f=[]),f.push({types:b,content:x[S]})}c--,n.pop(),i.pop(),l.pop(),o.pop()}return dy(f),h},py=oC,sC=({prism:e,code:n,grammar:i,language:l})=>N.useMemo(()=>{if(i==null)return py([n]);const o={code:n,grammar:i,language:l,tokens:[]};return e.hooks.run("before-tokenize",o),o.tokens=e.tokenize(n,i),e.hooks.run("after-tokenize",o),py(o.tokens)},[n,i,l,e]),uC=(e,n)=>{const{plain:i}=e,l=e.styles.reduce((o,u)=>{const{languages:c,style:f}=u;return c&&!c.includes(n)||u.types.forEach(h=>{const p=Jn(Jn({},o[h]),f);o[h]=p}),o},{});return l.root=i,l.plain=Au(Jn({},i),{backgroundColor:void 0}),l},cC=uC,fC=({children:e,language:n,code:i,theme:l,prism:o})=>{const u=n.toLowerCase(),c=cC(l,u),f=iC(c),h=lC(c),p=o.languages[u],b=sC({prism:o,language:u,code:i,grammar:p});return e({tokens:b,className:`prism-code language-${u}`,style:c!=null?c.root:{},getLineProps:f,getTokenProps:h})},dC=e=>N.createElement(fC,Au(Jn({},e),{prism:e.prism||ce,theme:e.theme||V1,code:e.code,language:e.language}));const hC="modulepreload",pC=function(e){return"/"+e},my={},Dt=function(n,i,l){let o=Promise.resolve();if(i&&i.length>0){let h=function(p){return Promise.all(p.map(b=>Promise.resolve(b).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=c?.nonce||c?.getAttribute("nonce");o=h(i.map(p=>{if(p=pC(p),p in my)return;my[p]=!0;const b=p.endsWith(".css"),g=b?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${g}`))return;const v=document.createElement("link");if(v.rel=b?"stylesheet":hC,b||(v.as="script"),v.crossOrigin="",v.href=p,f&&v.setAttribute("nonce",f),document.head.appendChild(v),b)return new Promise((x,w)=>{v.addEventListener("load",x),v.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${p}`)))})}))}function u(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return o.then(c=>{for(const f of c||[])f.status==="rejected"&&u(f.reason);return n().catch(u)})},Ts={};function G1(e){if(!Ts[e]){const i={bash:()=>Dt(()=>import("./prism-bash-DTkDXsAh.js"),[]),sh:()=>Dt(()=>import("./prism-bash-DTkDXsAh.js"),[]),shell:()=>Dt(()=>import("./prism-bash-DTkDXsAh.js"),[]),php:async()=>(await Dt(()=>import("./prism-markup-templating-Ct1xsyfA.js"),[]),Dt(()=>import("./prism-php-SC920LoD.js").then(l=>l.p),[])),sql:()=>Dt(()=>import("./prism-sql-AgAyy5H_.js"),[]),ruby:()=>Dt(()=>import("./prism-ruby-DZph-YiO.js").then(l=>l.p),[]),java:()=>Dt(()=>import("./prism-java-DMU2FM4X.js").then(l=>l.p),[]),scala:async()=>(await G1("java"),Dt(()=>import("./prism-scala-BjNo2HkN.js"),[])),solidity:()=>Dt(()=>import("./prism-solidity-qTLbmiAT.js").then(l=>l.p),[]),vim:()=>Dt(()=>import("./prism-vim-uciLQ2PQ.js"),[]),dart:()=>Dt(()=>import("./prism-dart-MjriiaMt.js"),[]),csharp:()=>Dt(()=>import("./prism-csharp-5CQ0RcEE.js").then(l=>l.p),[]),protobuf:()=>Dt(()=>import("./prism-protobuf-DiQ_z8B5.js"),[]),hcl:()=>Dt(()=>import("./prism-hcl-BYvi1mtM.js").then(l=>l.p),[]),perl:()=>Dt(()=>import("./prism-perl-CpfvaEQk.js").then(l=>l.p),[]),elixir:()=>Dt(()=>import("./prism-elixir-BSOTyVg2.js").then(l=>l.p),[])}[e];if(!i)return console.warn(`No loader available for language: ${e}`),Promise.reject(new Error(`Unsupported language: ${e}`));Ts[e]=i().then(()=>{}).catch(l=>{throw delete Ts[e],console.warn(`Failed to load language: ${e}`,l),l})}return Ts[e]}typeof global<"u"?global.Prism=ce:typeof window<"u"&&(window.Prism=ce);const gy=["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"];function mC(e,n){const[i,l]=N.useState(()=>gy.includes(n)||!!ce.languages[n]);return N.useEffect(()=>{if(!i){if(gy.includes(n)){l(!0);return}G1(n).then(()=>{l(!0)}).catch(()=>{l(!1)})}},[n,i]),{ready:i,actualLang:i?n:"text"}}function ao(e){return e&&e.split(".").pop()?.toLowerCase()||null}function gC(e){return e&&e.split("/").pop()||""}const bC={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"},yC={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"},xC={dockerfile:"docker",makefile:"makefile",".gitignore":"git",".env":"bash",".bashrc":"bash",".zshrc":"bash",".bash_profile":"bash",".profile":"bash"};function Y1(e,n){if(e)return n[e.toLowerCase()]}function vC(e){return Y1(ao(e),bC)}function wC(e){const n=gC(e).toLowerCase(),i=xC[n];return i||Y1(ao(e),yC)||"text"}function SC(e){return{...e,styles:e.styles.map(n=>({...n,style:{...n.style,background:void 0,backgroundColor:void 0}}))}}function kC(e){let n;switch(e){case"github":n=wn.github;break;case"vsLight":n=wn.vsLight;break;case"oneLight":n=wn.oneLight;break;case"gruvboxMaterialLight":n=wn.gruvboxMaterialLight;break;case"nightOwlLight":n=wn.nightOwlLight;break;case"vsDark":n=wn.vsDark;break;case"oneDark":n=wn.oneDark;break;case"gruvboxMaterialDark":n=wn.gruvboxMaterialDark;break;case"nightOwl":n=wn.nightOwl;break;case"dracula":n=wn.dracula;break;case"okaidia":n=wn.okaidia;break;default:n=wn.vsDark}return SC(n)}const _h=Wt.memo(function({code:n,language:i,className:l,syntaxTheme:o="vsDark",filename:u="",renderToken:c,onMouseOver:f,onMouseOut:h}){const p=i||(u?wC(u):"text"),{actualLang:b}=mC(n,p),g=kC(o),v=N.useCallback(({style:x,tokens:w,getLineProps:S,getTokenProps:A})=>y.jsx("span",{className:l,style:{...x,background:"transparent",backgroundColor:"transparent"},onMouseOver:f,onMouseOut:h,children:w.map((C,E)=>y.jsx("span",{...S({line:C}),children:C.map((R,z)=>c?c(R,z,A):y.jsx("span",{...A({token:R})},z))},E))}),[l,f,h,c]);return y.jsx(dC,{code:n,language:b,theme:g,prism:ce,children:v})}),Ja=Wt.memo(function(n){const{handleMouseOver:i,handleMouseOut:l,isWordHighlighted:o}=sE(),u=N.useCallback((c,f,h)=>{const p=h({token:c}),b=c.content.split(/( +)/);if(b.length===1&&b[0]&&!cy(b[0]))return y.jsx("span",{...p},f);const g=b.map((v,x)=>{if(!v)return null;if(cy(v)){const w=v.trim(),S=o(w);return y.jsx("span",{className:`word-token ${S?"word-highlight":""}`,"data-word":w,children:v},`${f}-${x}`)}return y.jsx("span",{children:v},`${f}-${x}`)});return y.jsx("span",{...p,children:g},f)},[o]);return y.jsx(_h,{...n,renderToken:u,onMouseOver:i,onMouseOut:l})}),Yd=Wt.memo(function({segments:n,className:i=""}){const l=N.useMemo(()=>n.map((o,u)=>{const c=o.type==="added"?"word-diff-added":o.type==="removed"?"word-diff-removed":"";return y.jsx("span",{className:c,children:o.value},u)}),[n]);return y.jsx("span",{className:i,children:l})}),EC=e=>{switch(e){case"add":return"+";case"delete":return"-";default:return" "}},CC=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 X1({line:e,syntaxTheme:n,filename:i,diffSegments:l,showPrefixBorder:o=!0}){return y.jsxs("div",{className:"flex items-center relative min-h-[16px]",children:[y.jsx("span",{className:`w-5 text-center flex-shrink-0 ${o?"border-r border-github-border":""} ${CC(e.type)}`,children:EC(e.type)}),l?y.jsx(Yd,{segments:l,className:"flex-1 px-3 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text"}):y.jsx(Ja,{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:n,filename:i})]})}const AC=e=>e==="add"?"bg-diff-addition-bg":"bg-diff-deletion-bg",NC=(e,n)=>({type:e,content:n});function by({code:e,type:n,filename:i,keyPrefix:l,syntaxTheme:o}){return y.jsx(y.Fragment,{children:e.split(`
|
|
15
|
-
`).map((u,c)=>y.jsx("div",{className:AC(n),children:y.jsx(X1,{line:NC(n,u),filename:i,syntaxTheme:o,showPrefixBorder:!1})},`${l}-${c}`))})}function TC(e){return I1(e)}function Z1({body:e,originalCode:n,filename:i,syntaxTheme:l}){const o=N.useMemo(()=>{const u=F1(e);if(u.length===0)return[{type:"text",content:e}];const c=[];let f=0;for(const h of u)h.startIndex>f&&c.push({type:"text",content:e.slice(f,h.startIndex)}),c.push({type:"suggestion",code:h.suggestedCode,original:n||""}),f=h.endIndex;return f<e.length&&c.push({type:"text",content:e.slice(f)}),c},[e,n]);return y.jsx("div",{className:"text-github-text-primary text-sm leading-6",children:o.map((u,c)=>u.type==="text"?y.jsx("span",{className:"whitespace-pre-wrap",children:u.content},c):y.jsx("div",{className:"my-2 border border-github-border rounded-md overflow-hidden",children:y.jsxs("div",{className:"font-mono text-sm",children:[u.original&&y.jsx(by,{code:u.original,type:"delete",filename:i,keyPrefix:`orig-${c}`,syntaxTheme:l}),y.jsx(by,{code:u.code,type:"add",filename:i,keyPrefix:`sugg-${c}`,syntaxTheme:l})]})},c))})}const RC="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 jC({selectedCode:e,value:n,onChange:i,textareaRef:l,className:o=RC}){if(!e)return null;const u=()=>{const c=nE(e),f=l?.current;if(!f){i(`${n}${n?`
|
|
16
|
-
|
|
17
|
-
`:""}${c}
|
|
18
|
-
|
|
19
|
-
`);return}const h=f.selectionStart,p=f.selectionEnd,b=n.slice(0,h),g=n.slice(p),x=`${b?`
|
|
20
|
-
|
|
21
|
-
`:""}${c}
|
|
22
|
-
|
|
23
|
-
`,w=b+x+g;i(w);const S=b.length+x.length;requestAnimationFrame(()=>{f.focus(),f.setSelectionRange(S,S)})};return y.jsxs("button",{type:"button",onClick:u,className:o,title:"Add code suggestion",children:[y.jsx(ok,{size:12}),"Add suggestion"]})}function Nu({onSubmit:e,onCancel:n,selectedCode:i,syntaxTheme:l,filename:o,initialValue:u="",embedded:c=!1,title:f="Add a comment",submitLabel:h="Submit",placeholder:p="Leave a comment..."}){const[b,g]=N.useState(u),[v,x]=N.useState(!1),[w,S]=N.useState("edit"),A=N.useRef(null),C=TC(b),E=C?w:"edit",R=async $=>{if($.preventDefault(),!!b.trim()){x(!0);try{await e(b.trim()),g(""),S("edit")}catch(_){console.error("Failed to submit comment:",_)}finally{x(!1)}}},z=$=>{$.key==="Enter"&&($.metaKey||$.ctrlKey)?R($):$.key==="Escape"&&n()};return y.jsxs("form",{className:c?"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:R,onClick:$=>$.stopPropagation(),"data-empty":!b.trim(),children:[y.jsxs("div",{className:"flex items-center justify-between mb-2",children:[y.jsx("span",{className:"text-sm font-medium",style:{color:"var(--color-yellow-path-text)"},children:f}),C?y.jsxs("div",{className:"flex items-center border border-github-border rounded-md overflow-hidden",children:[y.jsx("button",{type:"button",onClick:()=>S("edit"),className:`text-xs px-2.5 py-1.5 ${E==="edit"?"bg-github-bg-tertiary text-github-text-primary":"bg-github-bg-secondary text-github-text-secondary"} transition-colors`,children:"Edit"}),y.jsx("button",{type:"button",onClick:()=>S("preview"),className:`text-xs px-2.5 py-1.5 border-l border-github-border ${E==="preview"?"bg-github-bg-tertiary text-github-text-primary":"bg-github-bg-secondary text-github-text-secondary"} transition-colors`,children:"Preview"})]}):y.jsx(jC,{selectedCode:i,value:b,onChange:g,textareaRef:A})]}),C&&E==="preview"?y.jsx("div",{className:"min-h-[60px] mb-2 bg-github-bg-secondary border border-github-border rounded px-3 py-2",children:y.jsx(Z1,{body:b,originalCode:i,filename:o,syntaxTheme:l})}):y.jsx("textarea",{ref:A,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:b,onChange:$=>g($.target.value),onKeyDown:z,placeholder:p,rows:Math.max(3,b.split(`
|
|
24
|
-
`).length),autoFocus:!0,disabled:v}),y.jsxs("div",{className:"flex gap-2 justify-end",children:[y.jsx("button",{type:"button",onClick:n,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:v,children:"Cancel"}),y.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:$=>{$.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",$.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:$=>{$.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",$.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},disabled:!b.trim()||v,children:v?"Submitting...":h})]})]})}function yy({message:e,isRootMessage:n=!1,showAuthorBadge:i,syntaxTheme:l,filename:o,originalCode:u,onUpdate:c,onResolveOrDelete:f,actionLabel:h,confirmMessage:p,onClick:b}){const[g,v]=N.useState(!1),x=i&&!!e.author,w=e.author?.trim()==="User",S=E=>{E.stopPropagation(),v(!0)},A=()=>{v(!1)},C=E=>(E!==e.body&&c(E),v(!1),Promise.resolve());return y.jsx("div",{className:g?"":"flex min-w-0 items-start gap-3",onClick:b,children:g?y.jsx(Nu,{onSubmit:C,onCancel:A,selectedCode:u,syntaxTheme:l,filename:o,initialValue:e.body,embedded:!0,title:"Edit comment",submitLabel:"Save",placeholder:"Edit your message..."}):y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"min-w-0 flex-1",children:[x&&y.jsx("div",{className:"mb-2 flex min-w-0 items-center gap-2 pr-2 text-xs text-github-text-secondary",children:y.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})}),y.jsx(Z1,{body:e.body,originalCode:u,filename:o,syntaxTheme:l})]}),(n||w)&&y.jsxs("div",{className:"flex shrink-0 items-start gap-2 pt-0.5",children:[w&&y.jsx("button",{type:"button",onClick:S,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:y.jsx(Uk,{size:12})}),y.jsx("button",{type:"button",onClick:E=>{E.stopPropagation(),!(p&&!confirm(p))&&f()},className:`rounded border border-github-border bg-github-bg-tertiary p-1.5 transition-all hover:bg-github-bg-primary ${n?"text-green-700 hover:text-green-800":"text-github-danger"}`,title:h,"aria-label":h,children:n?y.jsx(Wa,{size:12}):y.jsx(Qk,{size:12})})]})]})})}function Lh({thread:e,showAuthorBadges:n=!1,confirmRootAction:i=!0,onGeneratePrompt:l,onRemoveThread:o,onReplyToThread:u,onRemoveMessage:c,onUpdateMessage:f,onClick:h,syntaxTheme:p}){const[b,g]=N.useState(!1),[v,x]=N.useState(!1),w=Array.isArray(e.line)?`${e.line[0]}-${e.line[1]}`:e.line,S=async C=>{C.stopPropagation();try{const E=l(e);await navigator.clipboard.writeText(E),g(!0),setTimeout(()=>g(!1),2e3)}catch(E){console.error("Failed to copy thread prompt:",E)}},A=e.messages[0];return A?y.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 ${h?"cursor-pointer hover:shadow-md":""}`,onClick:h,children:[y.jsxs("div",{className:"mb-3 flex items-center justify-between gap-3",children:[y.jsx("div",{className:"flex min-w-0 items-center gap-2 text-xs text-github-text-secondary",children:y.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,":",w]})}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("button",{type:"button",onClick:S,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:y.jsxs("span",{className:"inline-flex items-center gap-1",children:[y.jsx(Rh,{size:12}),b?"Copied!":"Copy Prompt"]})}),y.jsx("button",{type:"button",onClick:C=>{C.stopPropagation(),x(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:y.jsx(Dk,{size:14})})]})]}),y.jsxs("div",{className:"space-y-3",children:[y.jsx(yy,{message:A,isRootMessage:!0,showAuthorBadge:n,syntaxTheme:p,filename:e.file,originalCode:e.codeContent,onUpdate:C=>f(e.id,A.id,C),onResolveOrDelete:()=>o(e.id),actionLabel:"Resolve thread",confirmMessage:i?`Resolve this thread?
|
|
25
|
-
|
|
26
|
-
"${A.body}"`:void 0}),e.messages.slice(1).map(C=>y.jsx("div",{className:"ml-4 border-l border-github-border pl-3",children:y.jsx(yy,{message:C,showAuthorBadge:n,syntaxTheme:p,filename:e.file,originalCode:e.codeContent,onUpdate:E=>f(e.id,C.id,E),onResolveOrDelete:()=>c(e.id,C.id),actionLabel:"Delete reply",confirmMessage:`Delete this reply?
|
|
27
|
-
|
|
28
|
-
"${C.body}"`})},C.id)),v&&y.jsx("div",{className:"ml-4 border-l border-github-border pl-3",onClick:C=>C.stopPropagation(),children:y.jsx(Nu,{onSubmit:async C=>{await u(e.id,C),x(!1)},onCancel:()=>x(!1),selectedCode:e.codeContent,syntaxTheme:p,filename:e.file,embedded:!0,title:"Reply to thread",submitLabel:"Reply",placeholder:"Write a reply..."})})]})]}):null}function _C({isOpen:e,onClose:n,onNavigate:i,comments:l,showAuthorBadges:o=!1,onRemoveThread:u,onGenerateThreadPrompt:c,onReplyToThread:f,onRemoveMessage:h,onUpdateMessage:p,syntaxTheme:b}){const[g,v]=N.useState(0),x=N.useRef([]),{enableScope:w,disableScope:S}=io(),A=[...l].sort((z,$)=>{const _=z.file.localeCompare($.file);if(_!==0)return _;const F=Array.isArray(z.line)?z.line[0]:z.line,P=Array.isArray($.line)?$.line[0]:$.line;return F!==P?F-P:z.createdAt.localeCompare($.createdAt)}),C=N.useCallback(z=>{i(z),n()},[n,i]),E=N.useCallback(z=>{const $=z.messages[0]?.body||"";confirm(`Resolve this thread?
|
|
29
|
-
|
|
30
|
-
"${$}"`)&&(u(z.id),g>=A.length-1&&g>0&&v(g-1))},[u,g,A.length]);N.useEffect(()=>(e?(w("comments-list"),S("navigation")):(w("navigation"),S("comments-list"),v(0)),()=>{w("navigation"),S("comments-list")}),[S,w,e]);const R={scopes:"comments-list",enableOnFormTags:!1};return ot("escape",()=>n(),R,[n]),ot("j, down",()=>v(z=>Math.min(z+1,A.length-1)),R,[A.length]),ot("k, up",()=>v(z=>Math.max(z-1,0)),R,[]),ot("enter",()=>{A[g]&&C(A[g])},R,[C,g,A]),ot("d",()=>{A[g]&&E(A[g])},R,[E,g,A]),N.useEffect(()=>{x.current[g]&&x.current[g]?.scrollIntoView({behavior:"smooth",block:"nearest"})},[g]),e?y.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[y.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:n}),y.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:[y.jsxs("div",{className:"sticky top-0 border-b border-github-border bg-github-bg-primary px-6 py-4",children:[y.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[y.jsx("h2",{className:"text-lg font-semibold text-github-text-primary",children:"All Comments"}),y.jsx("button",{onClick:n,className:"text-github-text-secondary transition-colors hover:text-github-text-primary","aria-label":"Close comments list",children:y.jsx(Eu,{size:20})})]}),y.jsxs("div",{className:"text-xs text-github-text-secondary",children:[y.jsx("span",{className:"font-mono",children:"j/k"})," or ",y.jsx("span",{className:"font-mono",children:"↑/↓"})," to navigate • ",y.jsx("span",{className:"font-mono",children:"Enter"})," to jump •"," ",y.jsx("span",{className:"font-mono",children:"d"})," to resolve • ",y.jsx("span",{className:"font-mono",children:"Esc"})," ","to close"]})]}),y.jsx("div",{className:"max-h-[calc(80vh-120px)] overflow-y-auto",children:y.jsx("div",{className:"p-6",children:A.length===0?y.jsx("p",{className:"text-center text-github-text-secondary",children:"No comments yet"}):y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"space-y-2",children:A.map((z,$)=>y.jsx("div",{ref:_=>{x.current[$]=_},className:g===$?"rounded ring-2 ring-blue-500":"",children:y.jsx(Lh,{thread:z,showAuthorBadges:o,confirmRootAction:!1,onGeneratePrompt:c,onRemoveThread:_=>{_===z.id&&E(z)},onReplyToThread:f,onRemoveMessage:h,onUpdateMessage:p,syntaxTheme:b,onClick:_=>{_.stopPropagation(),v($),C(z)}})},z.id))}),y.jsxs("div",{className:"mt-4 border-t border-github-border pt-4 text-center text-xs text-github-text-secondary",children:[g+1," of ",A.length," threads"]})]})})})]})]}):null}function Tu(){return typeof window<"u"}function di(e){return Dh(e)?(e.nodeName||"").toLowerCase():"#document"}function fn(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function tr(e){var n;return(n=(Dh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function Dh(e){return Tu()?e instanceof Node||e instanceof fn(e).Node:!1}function ut(e){return Tu()?e instanceof Element||e instanceof fn(e).Element:!1}function jt(e){return Tu()?e instanceof HTMLElement||e instanceof fn(e).HTMLElement:!1}function eo(e){return!Tu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof fn(e).ShadowRoot}function oo(e){const{overflow:n,overflowX:i,overflowY:l,display:o}=In(e);return/auto|scroll|overlay|hidden|clip/.test(n+l+i)&&o!=="inline"&&o!=="contents"}function LC(e){return/^(table|td|th)$/.test(di(e))}function Ru(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const DC=/transform|translate|scale|rotate|perspective|filter/,MC=/paint|layout|strict|content/,Mi=e=>!!e&&e!=="none";let od;function Mh(e){const n=ut(e)?In(e):e;return Mi(n.transform)||Mi(n.translate)||Mi(n.scale)||Mi(n.rotate)||Mi(n.perspective)||!ju()&&(Mi(n.backdropFilter)||Mi(n.filter))||DC.test(n.willChange||"")||MC.test(n.contain||"")}function OC(e){let n=Nr(e);for(;jt(n)&&!Ar(n);){if(Mh(n))return n;if(Ru(n))return null;n=Nr(n)}return null}function ju(){return od==null&&(od=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),od}function Ar(e){return/^(html|body|#document)$/.test(di(e))}function In(e){return fn(e).getComputedStyle(e)}function _u(e){return ut(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Nr(e){if(di(e)==="html")return e;const n=e.assignedSlot||e.parentNode||eo(e)&&e.host||tr(e);return eo(n)?n.host:n}function K1(e){const n=Nr(e);return Ar(n)?e.ownerDocument?e.ownerDocument.body:e.body:jt(n)&&oo(n)?n:K1(n)}function fi(e,n,i){var l;n===void 0&&(n=[]),i===void 0&&(i=!0);const o=K1(e),u=o===((l=e.ownerDocument)==null?void 0:l.body),c=fn(o);if(u){const f=Xd(c);return n.concat(c,c.visualViewport||[],oo(o)?o:[],f&&i?fi(f):[])}else return n.concat(o,fi(o,[],i))}function Xd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Vs=Math.min,zi=Math.max,Gs=Math.round,Rs=Math.floor,er=e=>({x:e,y:e}),zC={left:"right",right:"left",bottom:"top",top:"bottom"};function xy(e,n,i){return zi(e,Vs(n,i))}function Lu(e,n){return typeof e=="function"?e(n):e}function Ii(e){return e.split("-")[0]}function Du(e){return e.split("-")[1]}function Q1(e){return e==="x"?"y":"x"}function W1(e){return e==="y"?"height":"width"}function si(e){const n=e[0];return n==="t"||n==="b"?"y":"x"}function J1(e){return Q1(si(e))}function IC(e,n,i){i===void 0&&(i=!1);const l=Du(e),o=J1(e),u=W1(o);let c=o==="x"?l===(i?"end":"start")?"right":"left":l==="start"?"bottom":"top";return n.reference[u]>n.floating[u]&&(c=Ys(c)),[c,Ys(c)]}function FC(e){const n=Ys(e);return[Zd(e),n,Zd(n)]}function Zd(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const vy=["left","right"],wy=["right","left"],BC=["top","bottom"],UC=["bottom","top"];function HC(e,n,i){switch(e){case"top":case"bottom":return i?n?wy:vy:n?vy:wy;case"left":case"right":return n?BC:UC;default:return[]}}function $C(e,n,i,l){const o=Du(e);let u=HC(Ii(e),i==="start",l);return o&&(u=u.map(c=>c+"-"+o),n&&(u=u.concat(u.map(Zd)))),u}function Ys(e){const n=Ii(e);return zC[n]+e.slice(n.length)}function qC(e){return{top:0,right:0,bottom:0,left:0,...e}}function PC(e){return typeof e!="number"?qC(e):{top:e,right:e,bottom:e,left:e}}function Xs(e){const{x:n,y:i,width:l,height:o}=e;return{width:l,height:o,top:i,left:n,right:n+l,bottom:i+o,x:n,y:i}}var VC=["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] *)"],Zs=VC.join(","),e0=typeof Element>"u",Hl=e0?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ks=!e0&&Element.prototype.getRootNode?function(e){var n;return e==null||(n=e.getRootNode)===null||n===void 0?void 0:n.call(e)}:function(e){return e?.ownerDocument},Qs=function(n,i){var l;i===void 0&&(i=!0);var o=n==null||(l=n.getAttribute)===null||l===void 0?void 0:l.call(n,"inert"),u=o===""||o==="true",c=u||i&&n&&(typeof n.closest=="function"?n.closest("[inert]"):Qs(n.parentNode));return c},GC=function(n){var i,l=n==null||(i=n.getAttribute)===null||i===void 0?void 0:i.call(n,"contenteditable");return l===""||l==="true"},t0=function(n,i,l){if(Qs(n))return[];var o=Array.prototype.slice.apply(n.querySelectorAll(Zs));return i&&Hl.call(n,Zs)&&o.unshift(n),o=o.filter(l),o},Ws=function(n,i,l){for(var o=[],u=Array.from(n);u.length;){var c=u.shift();if(!Qs(c,!1))if(c.tagName==="SLOT"){var f=c.assignedElements(),h=f.length?f:c.children,p=Ws(h,!0,l);l.flatten?o.push.apply(o,p):o.push({scopeParent:c,candidates:p})}else{var b=Hl.call(c,Zs);b&&l.filter(c)&&(i||!n.includes(c))&&o.push(c);var g=c.shadowRoot||typeof l.getShadowRoot=="function"&&l.getShadowRoot(c),v=!Qs(g,!1)&&(!l.shadowRootFilter||l.shadowRootFilter(c));if(g&&v){var x=Ws(g===!0?c.children:g.children,!0,l);l.flatten?o.push.apply(o,x):o.push({scopeParent:c,candidates:x})}else u.unshift.apply(u,c.children)}}return o},n0=function(n){return!isNaN(parseInt(n.getAttribute("tabindex"),10))},r0=function(n){if(!n)throw new Error("No node provided");return n.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(n.tagName)||GC(n))&&!n0(n)?0:n.tabIndex},YC=function(n,i){var l=r0(n);return l<0&&i&&!n0(n)?0:l},XC=function(n,i){return n.tabIndex===i.tabIndex?n.documentOrder-i.documentOrder:n.tabIndex-i.tabIndex},i0=function(n){return n.tagName==="INPUT"},ZC=function(n){return i0(n)&&n.type==="hidden"},KC=function(n){var i=n.tagName==="DETAILS"&&Array.prototype.slice.apply(n.children).some(function(l){return l.tagName==="SUMMARY"});return i},QC=function(n,i){for(var l=0;l<n.length;l++)if(n[l].checked&&n[l].form===i)return n[l]},WC=function(n){if(!n.name)return!0;var i=n.form||Ks(n),l=function(f){return i.querySelectorAll('input[type="radio"][name="'+f+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=l(window.CSS.escape(n.name));else try{o=l(n.name)}catch(c){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",c.message),!1}var u=QC(o,n.form);return!u||u===n},JC=function(n){return i0(n)&&n.type==="radio"},e3=function(n){return JC(n)&&!WC(n)},t3=function(n){var i,l=n&&Ks(n),o=(i=l)===null||i===void 0?void 0:i.host,u=!1;if(l&&l!==n){var c,f,h;for(u=!!((c=o)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(o)||n!=null&&(h=n.ownerDocument)!==null&&h!==void 0&&h.contains(n));!u&&o;){var p,b,g;l=Ks(o),o=(p=l)===null||p===void 0?void 0:p.host,u=!!((b=o)!==null&&b!==void 0&&(g=b.ownerDocument)!==null&&g!==void 0&&g.contains(o))}}return u},Sy=function(n){var i=n.getBoundingClientRect(),l=i.width,o=i.height;return l===0&&o===0},n3=function(n,i){var l=i.displayCheck,o=i.getShadowRoot;if(l==="full-native"&&"checkVisibility"in n){var u=n.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!u}if(getComputedStyle(n).visibility==="hidden")return!0;var c=Hl.call(n,"details>summary:first-of-type"),f=c?n.parentElement:n;if(Hl.call(f,"details:not([open]) *"))return!0;if(!l||l==="full"||l==="full-native"||l==="legacy-full"){if(typeof o=="function"){for(var h=n;n;){var p=n.parentElement,b=Ks(n);if(p&&!p.shadowRoot&&o(p)===!0)return Sy(n);n.assignedSlot?n=n.assignedSlot:!p&&b!==n.ownerDocument?n=b.host:n=p}n=h}if(t3(n))return!n.getClientRects().length;if(l!=="legacy-full")return!0}else if(l==="non-zero-area")return Sy(n);return!1},r3=function(n){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(n.tagName))for(var i=n.parentElement;i;){if(i.tagName==="FIELDSET"&&i.disabled){for(var l=0;l<i.children.length;l++){var o=i.children.item(l);if(o.tagName==="LEGEND")return Hl.call(i,"fieldset[disabled] *")?!0:!o.contains(n)}return!0}i=i.parentElement}return!1},Kd=function(n,i){return!(i.disabled||ZC(i)||n3(i,n)||KC(i)||r3(i))},Qd=function(n,i){return!(e3(i)||r0(i)<0||!Kd(n,i))},i3=function(n){var i=parseInt(n.getAttribute("tabindex"),10);return!!(isNaN(i)||i>=0)},l0=function(n){var i=[],l=[];return n.forEach(function(o,u){var c=!!o.scopeParent,f=c?o.scopeParent:o,h=YC(f,c),p=c?l0(o.candidates):f;h===0?c?i.push.apply(i,p):i.push(f):l.push({documentOrder:u,tabIndex:h,item:o,isScope:c,content:p})}),l.sort(XC).reduce(function(o,u){return u.isScope?o.push.apply(o,u.content):o.push(u.content),o},[]).concat(i)},Mu=function(n,i){i=i||{};var l;return i.getShadowRoot?l=Ws([n],i.includeContainer,{filter:Qd.bind(null,i),flatten:!1,getShadowRoot:i.getShadowRoot,shadowRootFilter:i3}):l=t0(n,i.includeContainer,Qd.bind(null,i)),l0(l)},l3=function(n,i){i=i||{};var l;return i.getShadowRoot?l=Ws([n],i.includeContainer,{filter:Kd.bind(null,i),flatten:!0,getShadowRoot:i.getShadowRoot}):l=t0(n,i.includeContainer,Kd.bind(null,i)),l},a0=function(n,i){if(i=i||{},!n)throw new Error("No node provided");return Hl.call(n,Zs)===!1?!1:Qd(i,n)};function o0(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function s0(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(n=>{let{brand:i,version:l}=n;return i+"/"+l}).join(" "):navigator.userAgent}function u0(){return/apple/i.test(navigator.vendor)}function Wd(){const e=/android/i;return e.test(o0())||e.test(s0())}function a3(){return o0().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function c0(){return s0().includes("jsdom/")}const ky="data-floating-ui-focusable",o3="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function ai(e){let n=e.activeElement;for(;((i=n)==null||(i=i.shadowRoot)==null?void 0:i.activeElement)!=null;){var i;n=n.shadowRoot.activeElement}return n}function $t(e,n){if(!e||!n)return!1;const i=n.getRootNode==null?void 0:n.getRootNode();if(e.contains(n))return!0;if(i&&eo(i)){let l=n;for(;l;){if(e===l)return!0;l=l.parentNode||l.host}}return!1}function Er(e){return"composedPath"in e?e.composedPath()[0]:e.target}function sd(e,n){if(n==null)return!1;if("composedPath"in e)return e.composedPath().includes(n);const i=e;return i.target!=null&&n.contains(i.target)}function s3(e){return e.matches("html,body")}function qt(e){return e?.ownerDocument||document}function Oh(e){return jt(e)&&e.matches(o3)}function Ey(e){return e?e.getAttribute("role")==="combobox"&&Oh(e):!1}function u3(e){if(!e||c0())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Jd(e){return e?e.hasAttribute(ky)?e:e.querySelector("["+ky+"]")||e:null}function zl(e,n,i){return i===void 0&&(i=!0),e.filter(o=>{var u;return o.parentId===n&&(!i||((u=o.context)==null?void 0:u.open))}).flatMap(o=>[o,...zl(e,o.id,i)])}function Cy(e,n){var i;let l=[],o=(i=e.find(u=>u.id===n))==null?void 0:i.parentId;for(;o;){const u=e.find(c=>c.id===o);o=u?.parentId,u&&(l=l.concat(u))}return l}function ud(e){e.preventDefault(),e.stopPropagation()}function c3(e){return"nativeEvent"in e}function f3(e){return e.mozInputSource===0&&e.isTrusted?!0:Wd()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function d3(e){return c0()?!1:!Wd()&&e.width===0&&e.height===0||Wd()&&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 to(e,n){const i=["mouse","pen"];return n||i.push("",void 0),i.includes(e)}var h3=typeof document<"u",p3=function(){},Pt=h3?N.useLayoutEffect:p3;const m3={...v1};function qn(e){const n=N.useRef(e);return Pt(()=>{n.current=e}),n}const g3=m3.useInsertionEffect,b3=g3||(e=>e());function cn(e){const n=N.useRef(()=>{});return b3(()=>{n.current=e}),N.useCallback(function(){for(var i=arguments.length,l=new Array(i),o=0;o<i;o++)l[o]=arguments[o];return n.current==null?void 0:n.current(...l)},[])}const so=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function f0(e,n){const i=Mu(e,so()),l=i.length;if(l===0)return;const o=ai(qt(e)),u=i.indexOf(o),c=u===-1?n===1?0:l-1:u+n;return i[c]}function d0(e){return f0(qt(e).body,1)||e}function h0(e){return f0(qt(e).body,-1)||e}function Ya(e,n){const i=n||e.currentTarget,l=e.relatedTarget;return!l||!$t(i,l)}function y3(e){Mu(e,so()).forEach(i=>{i.dataset.tabindex=i.getAttribute("tabindex")||"",i.setAttribute("tabindex","-1")})}function Ay(e){e.querySelectorAll("[data-tabindex]").forEach(i=>{const l=i.dataset.tabindex;delete i.dataset.tabindex,l?i.setAttribute("tabindex",l):i.removeAttribute("tabindex")})}var zh=w1();function Ny(e,n,i){let{reference:l,floating:o}=e;const u=si(n),c=J1(n),f=W1(c),h=Ii(n),p=u==="y",b=l.x+l.width/2-o.width/2,g=l.y+l.height/2-o.height/2,v=l[f]/2-o[f]/2;let x;switch(h){case"top":x={x:b,y:l.y-o.height};break;case"bottom":x={x:b,y:l.y+l.height};break;case"right":x={x:l.x+l.width,y:g};break;case"left":x={x:l.x-o.width,y:g};break;default:x={x:l.x,y:l.y}}switch(Du(n)){case"start":x[c]-=v*(i&&p?-1:1);break;case"end":x[c]+=v*(i&&p?-1:1);break}return x}async function x3(e,n){var i;n===void 0&&(n={});const{x:l,y:o,platform:u,rects:c,elements:f,strategy:h}=e,{boundary:p="clippingAncestors",rootBoundary:b="viewport",elementContext:g="floating",altBoundary:v=!1,padding:x=0}=Lu(n,e),w=PC(x),A=f[v?g==="floating"?"reference":"floating":g],C=Xs(await u.getClippingRect({element:(i=await(u.isElement==null?void 0:u.isElement(A)))==null||i?A:A.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(f.floating)),boundary:p,rootBoundary:b,strategy:h})),E=g==="floating"?{x:l,y:o,width:c.floating.width,height:c.floating.height}:c.reference,R=await(u.getOffsetParent==null?void 0:u.getOffsetParent(f.floating)),z=await(u.isElement==null?void 0:u.isElement(R))?await(u.getScale==null?void 0:u.getScale(R))||{x:1,y:1}:{x:1,y:1},$=Xs(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:E,offsetParent:R,strategy:h}):E);return{top:(C.top-$.top+w.top)/z.y,bottom:($.bottom-C.bottom+w.bottom)/z.y,left:(C.left-$.left+w.left)/z.x,right:($.right-C.right+w.right)/z.x}}const v3=50,w3=async(e,n,i)=>{const{placement:l="bottom",strategy:o="absolute",middleware:u=[],platform:c}=i,f=c.detectOverflow?c:{...c,detectOverflow:x3},h=await(c.isRTL==null?void 0:c.isRTL(n));let p=await c.getElementRects({reference:e,floating:n,strategy:o}),{x:b,y:g}=Ny(p,l,h),v=l,x=0;const w={};for(let S=0;S<u.length;S++){const A=u[S];if(!A)continue;const{name:C,fn:E}=A,{x:R,y:z,data:$,reset:_}=await E({x:b,y:g,initialPlacement:l,placement:v,strategy:o,middlewareData:w,rects:p,platform:f,elements:{reference:e,floating:n}});b=R??b,g=z??g,w[C]={...w[C],...$},_&&x<v3&&(x++,typeof _=="object"&&(_.placement&&(v=_.placement),_.rects&&(p=_.rects===!0?await c.getElementRects({reference:e,floating:n,strategy:o}):_.rects),{x:b,y:g}=Ny(p,v,h)),S=-1)}return{x:b,y:g,placement:v,strategy:o,middlewareData:w}},S3=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var i,l;const{placement:o,middlewareData:u,rects:c,initialPlacement:f,platform:h,elements:p}=n,{mainAxis:b=!0,crossAxis:g=!0,fallbackPlacements:v,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:S=!0,...A}=Lu(e,n);if((i=u.arrow)!=null&&i.alignmentOffset)return{};const C=Ii(o),E=si(f),R=Ii(f)===f,z=await(h.isRTL==null?void 0:h.isRTL(p.floating)),$=v||(R||!S?[Ys(f)]:FC(f)),_=w!=="none";!v&&_&&$.push(...$C(f,S,w,z));const F=[f,...$],P=await h.detectOverflow(n,A),O=[];let L=((l=u.flip)==null?void 0:l.overflows)||[];if(b&&O.push(P[C]),g){const U=IC(o,c,z);O.push(P[U[0]],P[U[1]])}if(L=[...L,{placement:o,overflows:O}],!O.every(U=>U<=0)){var I,q;const U=(((I=u.flip)==null?void 0:I.index)||0)+1,G=F[U];if(G&&(!(g==="alignment"?E!==si(G):!1)||L.every(Y=>si(Y.placement)===E?Y.overflows[0]>0:!0)))return{data:{index:U,overflows:L},reset:{placement:G}};let H=(q=L.filter(X=>X.overflows[0]<=0).sort((X,Y)=>X.overflows[1]-Y.overflows[1])[0])==null?void 0:q.placement;if(!H)switch(x){case"bestFit":{var K;const X=(K=L.filter(Y=>{if(_){const ne=si(Y.placement);return ne===E||ne==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(ne=>ne>0).reduce((ne,M)=>ne+M,0)]).sort((Y,ne)=>Y[1]-ne[1])[0])==null?void 0:K[0];X&&(H=X);break}case"initialPlacement":H=f;break}if(o!==H)return{reset:{placement:H}}}return{}}}},k3=new Set(["left","top"]);async function E3(e,n){const{placement:i,platform:l,elements:o}=e,u=await(l.isRTL==null?void 0:l.isRTL(o.floating)),c=Ii(i),f=Du(i),h=si(i)==="y",p=k3.has(c)?-1:1,b=u&&h?-1:1,g=Lu(n,e);let{mainAxis:v,crossAxis:x,alignmentAxis:w}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return f&&typeof w=="number"&&(x=f==="end"?w*-1:w),h?{x:x*b,y:v*p}:{x:v*p,y:x*b}}const C3=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var i,l;const{x:o,y:u,placement:c,middlewareData:f}=n,h=await E3(n,e);return c===((i=f.offset)==null?void 0:i.placement)&&(l=f.arrow)!=null&&l.alignmentOffset?{}:{x:o+h.x,y:u+h.y,data:{...h,placement:c}}}}},A3=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:i,y:l,placement:o,platform:u}=n,{mainAxis:c=!0,crossAxis:f=!1,limiter:h={fn:C=>{let{x:E,y:R}=C;return{x:E,y:R}}},...p}=Lu(e,n),b={x:i,y:l},g=await u.detectOverflow(n,p),v=si(Ii(o)),x=Q1(v);let w=b[x],S=b[v];if(c){const C=x==="y"?"top":"left",E=x==="y"?"bottom":"right",R=w+g[C],z=w-g[E];w=xy(R,w,z)}if(f){const C=v==="y"?"top":"left",E=v==="y"?"bottom":"right",R=S+g[C],z=S-g[E];S=xy(R,S,z)}const A=h.fn({...n,[x]:w,[v]:S});return{...A,data:{x:A.x-i,y:A.y-l,enabled:{[x]:c,[v]:f}}}}}};function p0(e){const n=In(e);let i=parseFloat(n.width)||0,l=parseFloat(n.height)||0;const o=jt(e),u=o?e.offsetWidth:i,c=o?e.offsetHeight:l,f=Gs(i)!==u||Gs(l)!==c;return f&&(i=u,l=c),{width:i,height:l,$:f}}function Ih(e){return ut(e)?e:e.contextElement}function Il(e){const n=Ih(e);if(!jt(n))return er(1);const i=n.getBoundingClientRect(),{width:l,height:o,$:u}=p0(n);let c=(u?Gs(i.width):i.width)/l,f=(u?Gs(i.height):i.height)/o;return(!c||!Number.isFinite(c))&&(c=1),(!f||!Number.isFinite(f))&&(f=1),{x:c,y:f}}const N3=er(0);function m0(e){const n=fn(e);return!ju()||!n.visualViewport?N3:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function T3(e,n,i){return n===void 0&&(n=!1),!i||n&&i!==fn(e)?!1:n}function Fi(e,n,i,l){n===void 0&&(n=!1),i===void 0&&(i=!1);const o=e.getBoundingClientRect(),u=Ih(e);let c=er(1);n&&(l?ut(l)&&(c=Il(l)):c=Il(e));const f=T3(u,i,l)?m0(u):er(0);let h=(o.left+f.x)/c.x,p=(o.top+f.y)/c.y,b=o.width/c.x,g=o.height/c.y;if(u){const v=fn(u),x=l&&ut(l)?fn(l):l;let w=v,S=Xd(w);for(;S&&l&&x!==w;){const A=Il(S),C=S.getBoundingClientRect(),E=In(S),R=C.left+(S.clientLeft+parseFloat(E.paddingLeft))*A.x,z=C.top+(S.clientTop+parseFloat(E.paddingTop))*A.y;h*=A.x,p*=A.y,b*=A.x,g*=A.y,h+=R,p+=z,w=fn(S),S=Xd(w)}}return Xs({width:b,height:g,x:h,y:p})}function Ou(e,n){const i=_u(e).scrollLeft;return n?n.left+i:Fi(tr(e)).left+i}function g0(e,n){const i=e.getBoundingClientRect(),l=i.left+n.scrollLeft-Ou(e,i),o=i.top+n.scrollTop;return{x:l,y:o}}function R3(e){let{elements:n,rect:i,offsetParent:l,strategy:o}=e;const u=o==="fixed",c=tr(l),f=n?Ru(n.floating):!1;if(l===c||f&&u)return i;let h={scrollLeft:0,scrollTop:0},p=er(1);const b=er(0),g=jt(l);if((g||!g&&!u)&&((di(l)!=="body"||oo(c))&&(h=_u(l)),g)){const x=Fi(l);p=Il(l),b.x=x.x+l.clientLeft,b.y=x.y+l.clientTop}const v=c&&!g&&!u?g0(c,h):er(0);return{width:i.width*p.x,height:i.height*p.y,x:i.x*p.x-h.scrollLeft*p.x+b.x+v.x,y:i.y*p.y-h.scrollTop*p.y+b.y+v.y}}function j3(e){return Array.from(e.getClientRects())}function _3(e){const n=tr(e),i=_u(e),l=e.ownerDocument.body,o=zi(n.scrollWidth,n.clientWidth,l.scrollWidth,l.clientWidth),u=zi(n.scrollHeight,n.clientHeight,l.scrollHeight,l.clientHeight);let c=-i.scrollLeft+Ou(e);const f=-i.scrollTop;return In(l).direction==="rtl"&&(c+=zi(n.clientWidth,l.clientWidth)-o),{width:o,height:u,x:c,y:f}}const Ty=25;function L3(e,n){const i=fn(e),l=tr(e),o=i.visualViewport;let u=l.clientWidth,c=l.clientHeight,f=0,h=0;if(o){u=o.width,c=o.height;const b=ju();(!b||b&&n==="fixed")&&(f=o.offsetLeft,h=o.offsetTop)}const p=Ou(l);if(p<=0){const b=l.ownerDocument,g=b.body,v=getComputedStyle(g),x=b.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,w=Math.abs(l.clientWidth-g.clientWidth-x);w<=Ty&&(u-=w)}else p<=Ty&&(u+=p);return{width:u,height:c,x:f,y:h}}function D3(e,n){const i=Fi(e,!0,n==="fixed"),l=i.top+e.clientTop,o=i.left+e.clientLeft,u=jt(e)?Il(e):er(1),c=e.clientWidth*u.x,f=e.clientHeight*u.y,h=o*u.x,p=l*u.y;return{width:c,height:f,x:h,y:p}}function Ry(e,n,i){let l;if(n==="viewport")l=L3(e,i);else if(n==="document")l=_3(tr(e));else if(ut(n))l=D3(n,i);else{const o=m0(e);l={x:n.x-o.x,y:n.y-o.y,width:n.width,height:n.height}}return Xs(l)}function b0(e,n){const i=Nr(e);return i===n||!ut(i)||Ar(i)?!1:In(i).position==="fixed"||b0(i,n)}function M3(e,n){const i=n.get(e);if(i)return i;let l=fi(e,[],!1).filter(f=>ut(f)&&di(f)!=="body"),o=null;const u=In(e).position==="fixed";let c=u?Nr(e):e;for(;ut(c)&&!Ar(c);){const f=In(c),h=Mh(c);!h&&f.position==="fixed"&&(o=null),(u?!h&&!o:!h&&f.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||oo(c)&&!h&&b0(e,c))?l=l.filter(b=>b!==c):o=f,c=Nr(c)}return n.set(e,l),l}function O3(e){let{element:n,boundary:i,rootBoundary:l,strategy:o}=e;const c=[...i==="clippingAncestors"?Ru(n)?[]:M3(n,this._c):[].concat(i),l],f=Ry(n,c[0],o);let h=f.top,p=f.right,b=f.bottom,g=f.left;for(let v=1;v<c.length;v++){const x=Ry(n,c[v],o);h=zi(x.top,h),p=Vs(x.right,p),b=Vs(x.bottom,b),g=zi(x.left,g)}return{width:p-g,height:b-h,x:g,y:h}}function z3(e){const{width:n,height:i}=p0(e);return{width:n,height:i}}function I3(e,n,i){const l=jt(n),o=tr(n),u=i==="fixed",c=Fi(e,!0,u,n);let f={scrollLeft:0,scrollTop:0};const h=er(0);function p(){h.x=Ou(o)}if(l||!l&&!u)if((di(n)!=="body"||oo(o))&&(f=_u(n)),l){const x=Fi(n,!0,u,n);h.x=x.x+n.clientLeft,h.y=x.y+n.clientTop}else o&&p();u&&!l&&o&&p();const b=o&&!l&&!u?g0(o,f):er(0),g=c.left+f.scrollLeft-h.x-b.x,v=c.top+f.scrollTop-h.y-b.y;return{x:g,y:v,width:c.width,height:c.height}}function cd(e){return In(e).position==="static"}function jy(e,n){if(!jt(e)||In(e).position==="fixed")return null;if(n)return n(e);let i=e.offsetParent;return tr(e)===i&&(i=i.ownerDocument.body),i}function y0(e,n){const i=fn(e);if(Ru(e))return i;if(!jt(e)){let o=Nr(e);for(;o&&!Ar(o);){if(ut(o)&&!cd(o))return o;o=Nr(o)}return i}let l=jy(e,n);for(;l&&LC(l)&&cd(l);)l=jy(l,n);return l&&Ar(l)&&cd(l)&&!Mh(l)?i:l||OC(e)||i}const F3=async function(e){const n=this.getOffsetParent||y0,i=this.getDimensions,l=await i(e.floating);return{reference:I3(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}};function B3(e){return In(e).direction==="rtl"}const U3={convertOffsetParentRelativeRectToViewportRelativeRect:R3,getDocumentElement:tr,getClippingRect:O3,getOffsetParent:y0,getElementRects:F3,getClientRects:j3,getDimensions:z3,getScale:Il,isElement:ut,isRTL:B3};function x0(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function H3(e,n){let i=null,l;const o=tr(e);function u(){var f;clearTimeout(l),(f=i)==null||f.disconnect(),i=null}function c(f,h){f===void 0&&(f=!1),h===void 0&&(h=1),u();const p=e.getBoundingClientRect(),{left:b,top:g,width:v,height:x}=p;if(f||n(),!v||!x)return;const w=Rs(g),S=Rs(o.clientWidth-(b+v)),A=Rs(o.clientHeight-(g+x)),C=Rs(b),R={rootMargin:-w+"px "+-S+"px "+-A+"px "+-C+"px",threshold:zi(0,Vs(1,h))||1};let z=!0;function $(_){const F=_[0].intersectionRatio;if(F!==h){if(!z)return c();F?c(!1,F):l=setTimeout(()=>{c(!1,1e-7)},1e3)}F===1&&!x0(p,e.getBoundingClientRect())&&c(),z=!1}try{i=new IntersectionObserver($,{...R,root:o.ownerDocument})}catch{i=new IntersectionObserver($,R)}i.observe(e)}return c(!0),u}function Js(e,n,i,l){l===void 0&&(l={});const{ancestorScroll:o=!0,ancestorResize:u=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:h=!1}=l,p=Ih(e),b=o||u?[...p?fi(p):[],...n?fi(n):[]]:[];b.forEach(C=>{o&&C.addEventListener("scroll",i,{passive:!0}),u&&C.addEventListener("resize",i)});const g=p&&f?H3(p,i):null;let v=-1,x=null;c&&(x=new ResizeObserver(C=>{let[E]=C;E&&E.target===p&&x&&n&&(x.unobserve(n),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var R;(R=x)==null||R.observe(n)})),i()}),p&&!h&&x.observe(p),n&&x.observe(n));let w,S=h?Fi(e):null;h&&A();function A(){const C=Fi(e);S&&!x0(S,C)&&i(),S=C,w=requestAnimationFrame(A)}return i(),()=>{var C;b.forEach(E=>{o&&E.removeEventListener("scroll",i),u&&E.removeEventListener("resize",i)}),g?.(),(C=x)==null||C.disconnect(),x=null,h&&cancelAnimationFrame(w)}}const $3=C3,q3=A3,P3=S3,V3=(e,n,i)=>{const l=new Map,o={platform:U3,...i},u={...o.platform,_c:l};return w3(e,n,{...o,platform:u})};var G3=typeof document<"u",Y3=function(){},Bs=G3?N.useLayoutEffect:Y3;function eu(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let i,l,o;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(i=e.length,i!==n.length)return!1;for(l=i;l--!==0;)if(!eu(e[l],n[l]))return!1;return!0}if(o=Object.keys(e),i=o.length,i!==Object.keys(n).length)return!1;for(l=i;l--!==0;)if(!{}.hasOwnProperty.call(n,o[l]))return!1;for(l=i;l--!==0;){const u=o[l];if(!(u==="_owner"&&e.$$typeof)&&!eu(e[u],n[u]))return!1}return!0}return e!==e&&n!==n}function v0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _y(e,n){const i=v0(e);return Math.round(n*i)/i}function fd(e){const n=N.useRef(e);return Bs(()=>{n.current=e}),n}function X3(e){e===void 0&&(e={});const{placement:n="bottom",strategy:i="absolute",middleware:l=[],platform:o,elements:{reference:u,floating:c}={},transform:f=!0,whileElementsMounted:h,open:p}=e,[b,g]=N.useState({x:0,y:0,strategy:i,placement:n,middlewareData:{},isPositioned:!1}),[v,x]=N.useState(l);eu(v,l)||x(l);const[w,S]=N.useState(null),[A,C]=N.useState(null),E=N.useCallback(Y=>{Y!==_.current&&(_.current=Y,S(Y))},[]),R=N.useCallback(Y=>{Y!==F.current&&(F.current=Y,C(Y))},[]),z=u||w,$=c||A,_=N.useRef(null),F=N.useRef(null),P=N.useRef(b),O=h!=null,L=fd(h),I=fd(o),q=fd(p),K=N.useCallback(()=>{if(!_.current||!F.current)return;const Y={placement:n,strategy:i,middleware:v};I.current&&(Y.platform=I.current),V3(_.current,F.current,Y).then(ne=>{const M={...ne,isPositioned:q.current!==!1};U.current&&!eu(P.current,M)&&(P.current=M,zh.flushSync(()=>{g(M)}))})},[v,n,i,I,q]);Bs(()=>{p===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,g(Y=>({...Y,isPositioned:!1})))},[p]);const U=N.useRef(!1);Bs(()=>(U.current=!0,()=>{U.current=!1}),[]),Bs(()=>{if(z&&(_.current=z),$&&(F.current=$),z&&$){if(L.current)return L.current(z,$,K);K()}},[z,$,K,L,O]);const G=N.useMemo(()=>({reference:_,floating:F,setReference:E,setFloating:R}),[E,R]),H=N.useMemo(()=>({reference:z,floating:$}),[z,$]),X=N.useMemo(()=>{const Y={position:i,left:0,top:0};if(!H.floating)return Y;const ne=_y(H.floating,b.x),M=_y(H.floating,b.y);return f?{...Y,transform:"translate("+ne+"px, "+M+"px)",...v0(H.floating)>=1.5&&{willChange:"transform"}}:{position:i,left:ne,top:M}},[i,f,H.floating,b.x,b.y]);return N.useMemo(()=>({...b,update:K,refs:G,elements:H,floatingStyles:X}),[b,K,G,H,X])}const tu=(e,n)=>{const i=$3(e);return{name:i.name,fn:i.fn,options:[e,n]}},nu=(e,n)=>{const i=q3(e);return{name:i.name,fn:i.fn,options:[e,n]}},ru=(e,n)=>{const i=P3(e);return{name:i.name,fn:i.fn,options:[e,n]}},Z3="data-floating-ui-focusable",Ly="active",Dy="selected",K3={...v1};let My=!1,Q3=0;const Oy=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Q3++;function W3(){const[e,n]=N.useState(()=>My?Oy():void 0);return Pt(()=>{e==null&&n(Oy())},[]),N.useEffect(()=>{My=!0},[]),e}const J3=K3.useId,Fh=J3||W3;function eA(){const e=new Map;return{emit(n,i){var l;(l=e.get(n))==null||l.forEach(o=>o(i))},on(n,i){e.has(n)||e.set(n,new Set),e.get(n).add(i)},off(n,i){var l;(l=e.get(n))==null||l.delete(i)}}}const tA=N.createContext(null),nA=N.createContext(null),Bh=()=>{var e;return((e=N.useContext(tA))==null?void 0:e.id)||null},zu=()=>N.useContext(nA);function Bi(e){return"data-floating-ui-"+e}function Kt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const zy=Bi("safe-polygon");function dd(e,n,i){if(i&&!to(i))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const l=e();return typeof l=="number"?l:l?.[n]}return e?.[n]}function hd(e){return typeof e=="function"?e():e}function iu(e,n){n===void 0&&(n={});const{open:i,onOpenChange:l,dataRef:o,events:u,elements:c}=e,{enabled:f=!0,delay:h=0,handleClose:p=null,mouseOnly:b=!1,restMs:g=0,move:v=!0}=n,x=zu(),w=Bh(),S=qn(p),A=qn(h),C=qn(i),E=qn(g),R=N.useRef(),z=N.useRef(-1),$=N.useRef(),_=N.useRef(-1),F=N.useRef(!0),P=N.useRef(!1),O=N.useRef(()=>{}),L=N.useRef(!1),I=cn(()=>{var X;const Y=(X=o.current.openEvent)==null?void 0:X.type;return Y?.includes("mouse")&&Y!=="mousedown"});N.useEffect(()=>{if(!f)return;function X(Y){let{open:ne}=Y;ne||(Kt(z),Kt(_),F.current=!0,L.current=!1)}return u.on("openchange",X),()=>{u.off("openchange",X)}},[f,u]),N.useEffect(()=>{if(!f||!S.current||!i)return;function X(ne){I()&&l(!1,ne,"hover")}const Y=qt(c.floating).documentElement;return Y.addEventListener("mouseleave",X),()=>{Y.removeEventListener("mouseleave",X)}},[c.floating,i,l,f,S,I]);const q=N.useCallback(function(X,Y,ne){Y===void 0&&(Y=!0),ne===void 0&&(ne="hover");const M=dd(A.current,"close",R.current);M&&!$.current?(Kt(z),z.current=window.setTimeout(()=>l(!1,X,ne),M)):Y&&(Kt(z),l(!1,X,ne))},[A,l]),K=cn(()=>{O.current(),$.current=void 0}),U=cn(()=>{if(P.current){const X=qt(c.floating).body;X.style.pointerEvents="",X.removeAttribute(zy),P.current=!1}}),G=cn(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);N.useEffect(()=>{if(!f)return;function X(B){if(Kt(z),F.current=!1,b&&!to(R.current)||hd(E.current)>0&&!dd(A.current,"open"))return;const T=dd(A.current,"open",R.current);T?z.current=window.setTimeout(()=>{C.current||l(!0,B,"hover")},T):i||l(!0,B,"hover")}function Y(B){if(G()){U();return}O.current();const T=qt(c.floating);if(Kt(_),L.current=!1,S.current&&o.current.floatingContext){i||Kt(z),$.current=S.current({...o.current.floatingContext,tree:x,x:B.clientX,y:B.clientY,onClose(){U(),K(),G()||q(B,!0,"safe-polygon")}});const W=$.current;T.addEventListener("mousemove",W),O.current=()=>{T.removeEventListener("mousemove",W)};return}(R.current!=="touch"||!$t(c.floating,B.relatedTarget))&&q(B)}function ne(B){G()||o.current.floatingContext&&(S.current==null||S.current({...o.current.floatingContext,tree:x,x:B.clientX,y:B.clientY,onClose(){U(),K(),G()||q(B)}})(B))}function M(){Kt(z)}function j(B){G()||q(B,!1)}if(ut(c.domReference)){const B=c.domReference,T=c.floating;return i&&B.addEventListener("mouseleave",ne),v&&B.addEventListener("mousemove",X,{once:!0}),B.addEventListener("mouseenter",X),B.addEventListener("mouseleave",Y),T&&(T.addEventListener("mouseleave",ne),T.addEventListener("mouseenter",M),T.addEventListener("mouseleave",j)),()=>{i&&B.removeEventListener("mouseleave",ne),v&&B.removeEventListener("mousemove",X),B.removeEventListener("mouseenter",X),B.removeEventListener("mouseleave",Y),T&&(T.removeEventListener("mouseleave",ne),T.removeEventListener("mouseenter",M),T.removeEventListener("mouseleave",j))}}},[c,f,e,b,v,q,K,U,l,i,C,x,A,S,o,G,E]),Pt(()=>{var X;if(f&&i&&(X=S.current)!=null&&(X=X.__options)!=null&&X.blockPointerEvents&&I()){P.current=!0;const ne=c.floating;if(ut(c.domReference)&&ne){var Y;const M=qt(c.floating).body;M.setAttribute(zy,"");const j=c.domReference,B=x==null||(Y=x.nodesRef.current.find(T=>T.id===w))==null||(Y=Y.context)==null?void 0:Y.elements.floating;return B&&(B.style.pointerEvents=""),M.style.pointerEvents="none",j.style.pointerEvents="auto",ne.style.pointerEvents="auto",()=>{M.style.pointerEvents="",j.style.pointerEvents="",ne.style.pointerEvents=""}}}},[f,i,w,c,x,S,I]),Pt(()=>{i||(R.current=void 0,L.current=!1,K(),U())},[i,K,U]),N.useEffect(()=>()=>{K(),Kt(z),Kt(_),U()},[f,c.domReference,K,U]);const H=N.useMemo(()=>{function X(Y){R.current=Y.pointerType}return{onPointerDown:X,onPointerEnter:X,onMouseMove(Y){const{nativeEvent:ne}=Y;function M(){!F.current&&!C.current&&l(!0,ne,"hover")}b&&!to(R.current)||i||hd(E.current)===0||L.current&&Y.movementX**2+Y.movementY**2<2||(Kt(_),R.current==="touch"?M():(L.current=!0,_.current=window.setTimeout(M,hd(E.current))))}}},[b,l,i,C,E]);return N.useMemo(()=>f?{reference:H}:{},[f,H])}let Iy=0;function Rl(e,n){n===void 0&&(n={});const{preventScroll:i=!1,cancelPrevious:l=!0,sync:o=!1}=n;l&&cancelAnimationFrame(Iy);const u=()=>e?.focus({preventScroll:i});o?u():Iy=requestAnimationFrame(u)}function pd(e,n){if(!e||!n)return!1;const i=n.getRootNode==null?void 0:n.getRootNode();if(e.contains(n))return!0;if(i&&eo(i)){let l=n;for(;l;){if(e===l)return!0;l=l.parentNode||l.host}}return!1}function rA(e){return"composedPath"in e?e.composedPath()[0]:e.target}function iA(e){return e?.ownerDocument||document}const Fl={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Fy(e){return e==="inert"?Fl.inert:e==="aria-hidden"?Fl["aria-hidden"]:Fl.none}let js=new WeakSet,_s={},md=0;const lA=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype;function w0(e){return e?eo(e)?e.host:w0(e.parentNode):null}const aA=(e,n)=>n.map(i=>{if(e.contains(i))return i;const l=w0(i);return e.contains(l)?l:null}).filter(i=>i!=null);function oA(e,n,i,l){const o="data-floating-ui-inert",u=l?"inert":i?"aria-hidden":null,c=aA(n,e),f=new Set,h=new Set(c),p=[];_s[o]||(_s[o]=new WeakMap);const b=_s[o];c.forEach(g),v(n),f.clear();function g(x){!x||f.has(x)||(f.add(x),x.parentNode&&g(x.parentNode))}function v(x){!x||h.has(x)||[].forEach.call(x.children,w=>{if(di(w)!=="script")if(f.has(w))v(w);else{const S=u?w.getAttribute(u):null,A=S!==null&&S!=="false",C=Fy(u),E=(C.get(w)||0)+1,R=(b.get(w)||0)+1;C.set(w,E),b.set(w,R),p.push(w),E===1&&A&&js.add(w),R===1&&w.setAttribute(o,""),!A&&u&&w.setAttribute(u,u==="inert"?"":"true")}})}return md++,()=>{p.forEach(x=>{const w=Fy(u),A=(w.get(x)||0)-1,C=(b.get(x)||0)-1;w.set(x,A),b.set(x,C),A||(!js.has(x)&&u&&x.removeAttribute(u),js.delete(x)),C||x.removeAttribute(o)}),md--,md||(Fl.inert=new WeakMap,Fl["aria-hidden"]=new WeakMap,Fl.none=new WeakMap,js=new WeakSet,_s={})}}function By(e,n,i){n===void 0&&(n=!1),i===void 0&&(i=!1);const l=iA(e[0]).body;return oA(e.concat(Array.from(l.querySelectorAll('[aria-live],[role="status"],output'))),l,n,i)}const Uh={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},lu=N.forwardRef(function(n,i){const[l,o]=N.useState();Pt(()=>{u0()&&o("button")},[]);const u={ref:i,tabIndex:0,role:l,"aria-hidden":l?void 0:!0,[Bi("focus-guard")]:"",style:Uh};return y.jsx("span",{...n,...u})}),sA={clipPath:"inset(50%)",position:"fixed",top:0,left:0},S0=N.createContext(null),Uy=Bi("portal");function uA(e){e===void 0&&(e={});const{id:n,root:i}=e,l=Fh(),o=k0(),[u,c]=N.useState(null),f=N.useRef(null);return Pt(()=>()=>{u?.remove(),queueMicrotask(()=>{f.current=null})},[u]),Pt(()=>{if(!l||f.current)return;const h=n?document.getElementById(n):null;if(!h)return;const p=document.createElement("div");p.id=l,p.setAttribute(Uy,""),h.appendChild(p),f.current=p,c(p)},[n,l]),Pt(()=>{if(i===null||!l||f.current)return;let h=i||o?.portalNode;h&&!Dh(h)&&(h=h.current),h=h||document.body;let p=null;n&&(p=document.createElement("div"),p.id=n,h.appendChild(p));const b=document.createElement("div");b.id=l,b.setAttribute(Uy,""),h=p||h,h.appendChild(b),f.current=b,c(b)},[n,i,l,o]),u}function au(e){const{children:n,id:i,root:l,preserveTabOrder:o=!0}=e,u=uA({id:i,root:l}),[c,f]=N.useState(null),h=N.useRef(null),p=N.useRef(null),b=N.useRef(null),g=N.useRef(null),v=c?.modal,x=c?.open,w=!!c&&!c.modal&&c.open&&o&&!!(l||u);return N.useEffect(()=>{if(!u||!o||v)return;function S(A){u&&Ya(A)&&(A.type==="focusin"?Ay:y3)(u)}return u.addEventListener("focusin",S,!0),u.addEventListener("focusout",S,!0),()=>{u.removeEventListener("focusin",S,!0),u.removeEventListener("focusout",S,!0)}},[u,o,v]),N.useEffect(()=>{u&&(x||Ay(u))},[x,u]),y.jsxs(S0.Provider,{value:N.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:h,afterOutsideRef:p,beforeInsideRef:b,afterInsideRef:g,portalNode:u,setFocusManagerState:f}),[o,u]),children:[w&&u&&y.jsx(lu,{"data-type":"outside",ref:h,onFocus:S=>{if(Ya(S,u)){var A;(A=b.current)==null||A.focus()}else{const C=c?c.domReference:null,E=h0(C);E?.focus()}}}),w&&u&&y.jsx("span",{"aria-owns":u.id,style:sA}),u&&zh.createPortal(n,u),w&&u&&y.jsx(lu,{"data-type":"outside",ref:p,onFocus:S=>{if(Ya(S,u)){var A;(A=g.current)==null||A.focus()}else{const C=c?c.domReference:null,E=d0(C);E?.focus(),c?.closeOnFocusOut&&c?.onOpenChange(!1,S.nativeEvent,"focus-out")}}})]})}const k0=()=>N.useContext(S0);function Hy(e){return N.useMemo(()=>n=>{e.forEach(i=>{i&&(i.current=n)})},e)}const $y=20;let ui=[];function Hh(){ui=ui.filter(e=>{var n;return(n=e.deref())==null?void 0:n.isConnected})}function cA(e){Hh(),e&&di(e)!=="body"&&(ui.push(new WeakRef(e)),ui.length>$y&&(ui=ui.slice(-$y)))}function qy(){Hh();const e=ui[ui.length-1];return e?.deref()}function fA(e){const n=so();return a0(e,n)?e:Mu(e,n)[0]||e}function Py(e,n){var i;if(!n.current.includes("floating")&&!((i=e.getAttribute("role"))!=null&&i.includes("dialog")))return;const l=so(),u=l3(e,l).filter(f=>{const h=f.getAttribute("data-tabindex")||"";return a0(f,l)||f.hasAttribute("data-tabindex")&&!h.startsWith("-")}),c=e.getAttribute("tabindex");n.current.includes("floating")||u.length===0?c!=="0"&&e.setAttribute("tabindex","0"):(c!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const dA=N.forwardRef(function(n,i){return y.jsx("button",{...n,type:"button",ref:i,tabIndex:-1,style:Uh})});function hA(e){const{context:n,children:i,disabled:l=!1,order:o=["content"],guards:u=!0,initialFocus:c=0,returnFocus:f=!0,restoreFocus:h=!1,modal:p=!0,visuallyHiddenDismiss:b=!1,closeOnFocusOut:g=!0,outsideElementsInert:v=!1,getInsideElements:x=()=>[]}=e,{open:w,onOpenChange:S,events:A,dataRef:C,elements:{domReference:E,floating:R}}=n,z=cn(()=>{var be;return(be=C.current.floatingContext)==null?void 0:be.nodeId}),$=cn(x),_=typeof c=="number"&&c<0,F=Ey(E)&&_,P=lA(),O=P?u:!0,L=!O||P&&v,I=qn(o),q=qn(c),K=qn(f),U=zu(),G=k0(),H=N.useRef(null),X=N.useRef(null),Y=N.useRef(!1),ne=N.useRef(!1),M=N.useRef(-1),j=N.useRef(-1),B=G!=null,T=Jd(R),J=cn(function(be){return be===void 0&&(be=T),be?Mu(be,so()):[]}),W=cn(be=>{const xe=J(be);return I.current.map(he=>E&&he==="reference"?E:T&&he==="floating"?T:xe).filter(Boolean).flat()});N.useEffect(()=>{if(l||!p)return;function be(he){if(he.key==="Tab"){$t(T,ai(qt(T)))&&J().length===0&&!F&&ud(he);const ve=W(),Ce=Er(he);I.current[0]==="reference"&&Ce===E&&(ud(he),he.shiftKey?Rl(ve[ve.length-1]):Rl(ve[1])),I.current[1]==="floating"&&Ce===T&&he.shiftKey&&(ud(he),Rl(ve[0]))}}const xe=qt(T);return xe.addEventListener("keydown",be),()=>{xe.removeEventListener("keydown",be)}},[l,E,T,p,I,F,J,W]),N.useEffect(()=>{if(l||!R)return;function be(xe){const he=Er(xe),Ce=J().indexOf(he);Ce!==-1&&(M.current=Ce)}return R.addEventListener("focusin",be),()=>{R.removeEventListener("focusin",be)}},[l,R,J]),N.useEffect(()=>{if(l||!g)return;function be(){ne.current=!0,setTimeout(()=>{ne.current=!1})}function xe(Ce){const Ne=Ce.relatedTarget,pt=Ce.currentTarget,bt=Er(Ce);queueMicrotask(()=>{const mt=z(),Yt=!($t(E,Ne)||$t(R,Ne)||$t(Ne,R)||$t(G?.portalNode,Ne)||Ne!=null&&Ne.hasAttribute(Bi("focus-guard"))||U&&(zl(U.nodesRef.current,mt).find(yt=>{var Bt,at;return $t((Bt=yt.context)==null?void 0:Bt.elements.floating,Ne)||$t((at=yt.context)==null?void 0:at.elements.domReference,Ne)})||Cy(U.nodesRef.current,mt).find(yt=>{var Bt,at,rr;return[(Bt=yt.context)==null?void 0:Bt.elements.floating,Jd((at=yt.context)==null?void 0:at.elements.floating)].includes(Ne)||((rr=yt.context)==null?void 0:rr.elements.domReference)===Ne})));if(pt===E&&T&&Py(T,I),h&&pt!==E&&!(bt!=null&&bt.isConnected)&&ai(qt(T))===qt(T).body){jt(T)&&T.focus();const yt=M.current,Bt=J(),at=Bt[yt]||Bt[Bt.length-1]||T;jt(at)&&at.focus()}if(C.current.insideReactTree){C.current.insideReactTree=!1;return}(F||!p)&&Ne&&Yt&&!ne.current&&Ne!==qy()&&(Y.current=!0,S(!1,Ce,"focus-out"))})}const he=!!(!U&&G);function ve(){Kt(j),C.current.insideReactTree=!0,j.current=window.setTimeout(()=>{C.current.insideReactTree=!1})}if(R&&jt(E))return E.addEventListener("focusout",xe),E.addEventListener("pointerdown",be),R.addEventListener("focusout",xe),he&&R.addEventListener("focusout",ve,!0),()=>{E.removeEventListener("focusout",xe),E.removeEventListener("pointerdown",be),R.removeEventListener("focusout",xe),he&&R.removeEventListener("focusout",ve,!0)}},[l,E,R,T,p,U,G,S,g,h,J,F,z,I,C]);const ie=N.useRef(null),de=N.useRef(null),me=Hy([ie,G?.beforeInsideRef]),ye=Hy([de,G?.afterInsideRef]);N.useEffect(()=>{var be,xe;if(l||!R)return;const he=Array.from((G==null||(be=G.portalNode)==null?void 0:be.querySelectorAll("["+Bi("portal")+"]"))||[]),Ce=(xe=(U?Cy(U.nodesRef.current,z()):[]).find(bt=>{var mt;return Ey(((mt=bt.context)==null?void 0:mt.elements.domReference)||null)}))==null||(xe=xe.context)==null?void 0:xe.elements.domReference,Ne=[R,Ce,...he,...$(),H.current,X.current,ie.current,de.current,G?.beforeOutsideRef.current,G?.afterOutsideRef.current,I.current.includes("reference")||F?E:null].filter(bt=>bt!=null),pt=p||F?By(Ne,!L,L):By(Ne);return()=>{pt()}},[l,E,R,p,I,G,F,O,L,U,z,$]),Pt(()=>{if(l||!jt(T))return;const be=qt(T),xe=ai(be);queueMicrotask(()=>{const he=W(T),ve=q.current,Ce=(typeof ve=="number"?he[ve]:ve.current)||T,Ne=$t(T,xe);!_&&!Ne&&w&&Rl(Ce,{preventScroll:Ce===T})})},[l,w,T,_,W,q]),Pt(()=>{if(l||!T)return;const be=qt(T),xe=ai(be);cA(xe);function he(Ne){let{reason:pt,event:bt,nested:mt}=Ne;if(["hover","safe-polygon"].includes(pt)&&bt.type==="mouseleave"&&(Y.current=!0),pt==="outside-press")if(mt)Y.current=!1;else if(f3(bt)||d3(bt))Y.current=!1;else{let Yt=!1;document.createElement("div").focus({get preventScroll(){return Yt=!0,!1}}),Yt?Y.current=!1:Y.current=!0}}A.on("openchange",he);const ve=be.createElement("span");ve.setAttribute("tabindex","-1"),ve.setAttribute("aria-hidden","true"),Object.assign(ve.style,Uh),B&&E&&E.insertAdjacentElement("afterend",ve);function Ce(){if(typeof K.current=="boolean"){const Ne=E||qy();return Ne&&Ne.isConnected?Ne:ve}return K.current.current||ve}return()=>{A.off("openchange",he);const Ne=ai(be),pt=$t(R,Ne)||U&&zl(U.nodesRef.current,z(),!1).some(mt=>{var Yt;return $t((Yt=mt.context)==null?void 0:Yt.elements.floating,Ne)}),bt=Ce();queueMicrotask(()=>{const mt=fA(bt);K.current&&!Y.current&&jt(mt)&&(!(mt!==Ne&&Ne!==be.body)||pt)&&mt.focus({preventScroll:!0}),ve.remove()})}},[l,R,T,K,C,A,U,B,E,z]),N.useEffect(()=>(queueMicrotask(()=>{Y.current=!1}),()=>{queueMicrotask(Hh)}),[l]),Pt(()=>{if(!l&&G)return G.setFocusManagerState({modal:p,closeOnFocusOut:g,open:w,onOpenChange:S,domReference:E}),()=>{G.setFocusManagerState(null)}},[l,G,p,w,S,g,E]),Pt(()=>{l||T&&Py(T,I)},[l,T,I]);function Se(be){return l||!b||!p?null:y.jsx(dA,{ref:be==="start"?H:X,onClick:xe=>S(!1,xe.nativeEvent),children:typeof b=="string"?b:"Dismiss"})}const Le=!l&&O&&(p?!F:!0)&&(B||p);return y.jsxs(y.Fragment,{children:[Le&&y.jsx(lu,{"data-type":"inside",ref:me,onFocus:be=>{if(p){const he=W();Rl(o[0]==="reference"?he[0]:he[he.length-1])}else if(G!=null&&G.preserveTabOrder&&G.portalNode)if(Y.current=!1,Ya(be,G.portalNode)){const he=d0(E);he?.focus()}else{var xe;(xe=G.beforeOutsideRef.current)==null||xe.focus()}}}),!F&&Se("start"),i,Se("end"),Le&&y.jsx(lu,{"data-type":"inside",ref:ye,onFocus:be=>{if(p)Rl(W()[0]);else if(G!=null&&G.preserveTabOrder&&G.portalNode)if(g&&(Y.current=!0),Ya(be,G.portalNode)){const he=h0(E);he?.focus()}else{var xe;(xe=G.afterOutsideRef.current)==null||xe.focus()}}})]})}function Vy(e){return jt(e.target)&&e.target.tagName==="BUTTON"}function pA(e){return jt(e.target)&&e.target.tagName==="A"}function Gy(e){return Oh(e)}function eh(e,n){n===void 0&&(n={});const{open:i,onOpenChange:l,dataRef:o,elements:{domReference:u}}=e,{enabled:c=!0,event:f="click",toggle:h=!0,ignoreMouse:p=!1,keyboardHandlers:b=!0,stickIfOpen:g=!0}=n,v=N.useRef(),x=N.useRef(!1),w=N.useMemo(()=>({onPointerDown(S){v.current=S.pointerType},onMouseDown(S){const A=v.current;S.button===0&&f!=="click"&&(to(A,!0)&&p||(i&&h&&(!(o.current.openEvent&&g)||o.current.openEvent.type==="mousedown")?l(!1,S.nativeEvent,"click"):(S.preventDefault(),l(!0,S.nativeEvent,"click"))))},onClick(S){const A=v.current;if(f==="mousedown"&&v.current){v.current=void 0;return}to(A,!0)&&p||(i&&h&&(!(o.current.openEvent&&g)||o.current.openEvent.type==="click")?l(!1,S.nativeEvent,"click"):l(!0,S.nativeEvent,"click"))},onKeyDown(S){v.current=void 0,!(S.defaultPrevented||!b||Vy(S))&&(S.key===" "&&!Gy(u)&&(S.preventDefault(),x.current=!0),!pA(S)&&S.key==="Enter"&&l(!(i&&h),S.nativeEvent,"click"))},onKeyUp(S){S.defaultPrevented||!b||Vy(S)||Gy(u)||S.key===" "&&x.current&&(x.current=!1,l(!(i&&h),S.nativeEvent,"click"))}}),[o,u,f,p,b,l,i,g,h]);return N.useMemo(()=>c?{reference:w}:{},[c,w])}const mA={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},gA={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Yy=e=>{var n,i;return{escapeKey:typeof e=="boolean"?e:(n=e?.escapeKey)!=null?n:!1,outsidePress:typeof e=="boolean"?e:(i=e?.outsidePress)!=null?i:!0}};function ou(e,n){n===void 0&&(n={});const{open:i,onOpenChange:l,elements:o,dataRef:u}=e,{enabled:c=!0,escapeKey:f=!0,outsidePress:h=!0,outsidePressEvent:p="pointerdown",referencePress:b=!1,referencePressEvent:g="pointerdown",ancestorScroll:v=!1,bubbles:x,capture:w}=n,S=zu(),A=cn(typeof h=="function"?h:()=>!1),C=typeof h=="function"?A:h,E=N.useRef(!1),{escapeKey:R,outsidePress:z}=Yy(x),{escapeKey:$,outsidePress:_}=Yy(w),F=N.useRef(!1),P=cn(U=>{var G;if(!i||!c||!f||U.key!=="Escape"||F.current)return;const H=(G=u.current.floatingContext)==null?void 0:G.nodeId,X=S?zl(S.nodesRef.current,H):[];if(!R&&(U.stopPropagation(),X.length>0)){let Y=!0;if(X.forEach(ne=>{var M;if((M=ne.context)!=null&&M.open&&!ne.context.dataRef.current.__escapeKeyBubbles){Y=!1;return}}),!Y)return}l(!1,c3(U)?U.nativeEvent:U,"escape-key")}),O=cn(U=>{var G;const H=()=>{var X;P(U),(X=Er(U))==null||X.removeEventListener("keydown",H)};(G=Er(U))==null||G.addEventListener("keydown",H)}),L=cn(U=>{var G;const H=u.current.insideReactTree;u.current.insideReactTree=!1;const X=E.current;if(E.current=!1,p==="click"&&X||H||typeof C=="function"&&!C(U))return;const Y=Er(U),ne="["+Bi("inert")+"]",M=qt(o.floating).querySelectorAll(ne);let j=ut(Y)?Y:null;for(;j&&!Ar(j);){const W=Nr(j);if(Ar(W)||!ut(W))break;j=W}if(M.length&&ut(Y)&&!s3(Y)&&!$t(Y,o.floating)&&Array.from(M).every(W=>!$t(j,W)))return;if(jt(Y)&&K){const W=Ar(Y),ie=In(Y),de=/auto|scroll/,me=W||de.test(ie.overflowX),ye=W||de.test(ie.overflowY),Se=me&&Y.clientWidth>0&&Y.scrollWidth>Y.clientWidth,Le=ye&&Y.clientHeight>0&&Y.scrollHeight>Y.clientHeight,be=ie.direction==="rtl",xe=Le&&(be?U.offsetX<=Y.offsetWidth-Y.clientWidth:U.offsetX>Y.clientWidth),he=Se&&U.offsetY>Y.clientHeight;if(xe||he)return}const B=(G=u.current.floatingContext)==null?void 0:G.nodeId,T=S&&zl(S.nodesRef.current,B).some(W=>{var ie;return sd(U,(ie=W.context)==null?void 0:ie.elements.floating)});if(sd(U,o.floating)||sd(U,o.domReference)||T)return;const J=S?zl(S.nodesRef.current,B):[];if(J.length>0){let W=!0;if(J.forEach(ie=>{var de;if((de=ie.context)!=null&&de.open&&!ie.context.dataRef.current.__outsidePressBubbles){W=!1;return}}),!W)return}l(!1,U,"outside-press")}),I=cn(U=>{var G;const H=()=>{var X;L(U),(X=Er(U))==null||X.removeEventListener(p,H)};(G=Er(U))==null||G.addEventListener(p,H)});N.useEffect(()=>{if(!i||!c)return;u.current.__escapeKeyBubbles=R,u.current.__outsidePressBubbles=z;let U=-1;function G(M){l(!1,M,"ancestor-scroll")}function H(){window.clearTimeout(U),F.current=!0}function X(){U=window.setTimeout(()=>{F.current=!1},ju()?5:0)}const Y=qt(o.floating);f&&(Y.addEventListener("keydown",$?O:P,$),Y.addEventListener("compositionstart",H),Y.addEventListener("compositionend",X)),C&&Y.addEventListener(p,_?I:L,_);let ne=[];return v&&(ut(o.domReference)&&(ne=fi(o.domReference)),ut(o.floating)&&(ne=ne.concat(fi(o.floating))),!ut(o.reference)&&o.reference&&o.reference.contextElement&&(ne=ne.concat(fi(o.reference.contextElement)))),ne=ne.filter(M=>{var j;return M!==((j=Y.defaultView)==null?void 0:j.visualViewport)}),ne.forEach(M=>{M.addEventListener("scroll",G,{passive:!0})}),()=>{f&&(Y.removeEventListener("keydown",$?O:P,$),Y.removeEventListener("compositionstart",H),Y.removeEventListener("compositionend",X)),C&&Y.removeEventListener(p,_?I:L,_),ne.forEach(M=>{M.removeEventListener("scroll",G)}),window.clearTimeout(U)}},[u,o,f,C,p,i,l,v,c,R,z,P,$,O,L,_,I]),N.useEffect(()=>{u.current.insideReactTree=!1},[u,C,p]);const q=N.useMemo(()=>({onKeyDown:P,...b&&{[mA[g]]:U=>{l(!1,U.nativeEvent,"reference-press")},...g!=="click"&&{onClick(U){l(!1,U.nativeEvent,"reference-press")}}}}),[P,l,b,g]),K=N.useMemo(()=>{function U(G){G.button===0&&(E.current=!0)}return{onKeyDown:P,onMouseDown:U,onMouseUp:U,[gA[p]]:()=>{u.current.insideReactTree=!0}}},[P,p,u]);return N.useMemo(()=>c?{reference:q,floating:K}:{},[c,q,K])}function bA(e){const{open:n=!1,onOpenChange:i,elements:l}=e,o=Fh(),u=N.useRef({}),[c]=N.useState(()=>eA()),f=Bh()!=null,[h,p]=N.useState(l.reference),b=cn((x,w,S)=>{u.current.openEvent=x?w:void 0,c.emit("openchange",{open:x,event:w,reason:S,nested:f}),i?.(x,w,S)}),g=N.useMemo(()=>({setPositionReference:p}),[]),v=N.useMemo(()=>({reference:h||l.reference||null,floating:l.floating||null,domReference:l.reference}),[h,l.reference,l.floating]);return N.useMemo(()=>({dataRef:u,open:n,onOpenChange:b,elements:v,events:c,floatingId:o,refs:g}),[n,b,v,c,o,g])}function su(e){e===void 0&&(e={});const{nodeId:n}=e,i=bA({...e,elements:{reference:null,floating:null,...e.elements}}),l=e.rootContext||i,o=l.elements,[u,c]=N.useState(null),[f,h]=N.useState(null),b=o?.domReference||u,g=N.useRef(null),v=zu();Pt(()=>{b&&(g.current=b)},[b]);const x=X3({...e,elements:{...o,...f&&{reference:f}}}),w=N.useCallback(R=>{const z=ut(R)?{getBoundingClientRect:()=>R.getBoundingClientRect(),getClientRects:()=>R.getClientRects(),contextElement:R}:R;h(z),x.refs.setReference(z)},[x.refs]),S=N.useCallback(R=>{(ut(R)||R===null)&&(g.current=R,c(R)),(ut(x.refs.reference.current)||x.refs.reference.current===null||R!==null&&!ut(R))&&x.refs.setReference(R)},[x.refs]),A=N.useMemo(()=>({...x.refs,setReference:S,setPositionReference:w,domReference:g}),[x.refs,S,w]),C=N.useMemo(()=>({...x.elements,domReference:b}),[x.elements,b]),E=N.useMemo(()=>({...x,...l,refs:A,elements:C,nodeId:n}),[x,A,C,n,l]);return Pt(()=>{l.dataRef.current.floatingContext=E;const R=v?.nodesRef.current.find(z=>z.id===n);R&&(R.context=E)}),N.useMemo(()=>({...x,context:E,refs:A,elements:C}),[x,A,C,E])}function gd(){return a3()&&u0()}function E0(e,n){n===void 0&&(n={});const{open:i,onOpenChange:l,events:o,dataRef:u,elements:c}=e,{enabled:f=!0,visibleOnly:h=!0}=n,p=N.useRef(!1),b=N.useRef(-1),g=N.useRef(!0);N.useEffect(()=>{if(!f)return;const x=fn(c.domReference);function w(){!i&&jt(c.domReference)&&c.domReference===ai(qt(c.domReference))&&(p.current=!0)}function S(){g.current=!0}function A(){g.current=!1}return x.addEventListener("blur",w),gd()&&(x.addEventListener("keydown",S,!0),x.addEventListener("pointerdown",A,!0)),()=>{x.removeEventListener("blur",w),gd()&&(x.removeEventListener("keydown",S,!0),x.removeEventListener("pointerdown",A,!0))}},[c.domReference,i,f]),N.useEffect(()=>{if(!f)return;function x(w){let{reason:S}=w;(S==="reference-press"||S==="escape-key")&&(p.current=!0)}return o.on("openchange",x),()=>{o.off("openchange",x)}},[o,f]),N.useEffect(()=>()=>{Kt(b)},[]);const v=N.useMemo(()=>({onMouseLeave(){p.current=!1},onFocus(x){if(p.current)return;const w=Er(x.nativeEvent);if(h&&ut(w)){if(gd()&&!x.relatedTarget){if(!g.current&&!Oh(w))return}else if(!u3(w))return}l(!0,x.nativeEvent,"focus")},onBlur(x){p.current=!1;const w=x.relatedTarget,S=x.nativeEvent,A=ut(w)&&w.hasAttribute(Bi("focus-guard"))&&w.getAttribute("data-type")==="outside";b.current=window.setTimeout(()=>{var C;const E=ai(c.domReference?c.domReference.ownerDocument:document);!w&&E===c.domReference||$t((C=u.current.floatingContext)==null?void 0:C.refs.floating.current,E)||$t(c.domReference,E)||A||l(!1,S,"focus")})}}),[u,c.domReference,l,h]);return N.useMemo(()=>f?{reference:v}:{},[f,v])}function bd(e,n,i){const l=new Map,o=i==="item";let u=e;if(o&&e){const{[Ly]:c,[Dy]:f,...h}=e;u=h}return{...i==="floating"&&{tabIndex:-1,[Z3]:""},...u,...n.map(c=>{const f=c?c[i]:null;return typeof f=="function"?e?f(e):null:f}).concat(e).reduce((c,f)=>(f&&Object.entries(f).forEach(h=>{let[p,b]=h;if(!(o&&[Ly,Dy].includes(p)))if(p.indexOf("on")===0){if(l.has(p)||l.set(p,[]),typeof b=="function"){var g;(g=l.get(p))==null||g.push(b),c[p]=function(){for(var v,x=arguments.length,w=new Array(x),S=0;S<x;S++)w[S]=arguments[S];return(v=l.get(p))==null?void 0:v.map(A=>A(...w)).find(A=>A!==void 0)}}}else c[p]=b}),c),{})}}function uu(e){e===void 0&&(e=[]);const n=e.map(f=>f?.reference),i=e.map(f=>f?.floating),l=e.map(f=>f?.item),o=N.useCallback(f=>bd(f,e,"reference"),n),u=N.useCallback(f=>bd(f,e,"floating"),i),c=N.useCallback(f=>bd(f,e,"item"),l);return N.useMemo(()=>({getReferenceProps:o,getFloatingProps:u,getItemProps:c}),[o,u,c])}const yA=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function cu(e,n){var i,l;n===void 0&&(n={});const{open:o,elements:u,floatingId:c}=e,{enabled:f=!0,role:h="dialog"}=n,p=Fh(),b=((i=u.domReference)==null?void 0:i.id)||p,g=N.useMemo(()=>{var E;return((E=Jd(u.floating))==null?void 0:E.id)||c},[u.floating,c]),v=(l=yA.get(h))!=null?l:h,w=Bh()!=null,S=N.useMemo(()=>v==="tooltip"||h==="label"?{["aria-"+(h==="label"?"labelledby":"describedby")]:o?g:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":v==="alertdialog"?"dialog":v,"aria-controls":o?g:void 0,...v==="listbox"&&{role:"combobox"},...v==="menu"&&{id:b},...v==="menu"&&w&&{role:"menuitem"},...h==="select"&&{"aria-autocomplete":"none"},...h==="combobox"&&{"aria-autocomplete":"list"}},[v,g,w,o,b,h]),A=N.useMemo(()=>{const E={id:g,...v&&{role:v}};return v==="tooltip"||h==="label"?E:{...E,...v==="menu"&&{"aria-labelledby":b}}},[v,g,b,h]),C=N.useCallback(E=>{let{active:R,selected:z}=E;const $={role:"option",...R&&{id:g+"-fui-option"}};switch(h){case"select":case"combobox":return{...$,"aria-selected":z}}return{}},[g,h]);return N.useMemo(()=>f?{reference:S,floating:A,item:C}:{},[f,S,A,C])}const Xy=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(n,i)=>(i?"-":"")+n.toLowerCase());function jl(e,n){return typeof e=="function"?e(n):e}function xA(e,n){const[i,l]=N.useState(e);return e&&!i&&l(!0),N.useEffect(()=>{if(!e&&i){const o=setTimeout(()=>l(!1),n);return()=>clearTimeout(o)}},[e,i,n]),i}function vA(e,n){n===void 0&&(n={});const{open:i,elements:{floating:l}}=e,{duration:o=250}=n,c=(typeof o=="number"?o:o.close)||0,[f,h]=N.useState("unmounted"),p=xA(i,c);return!p&&f==="close"&&h("unmounted"),Pt(()=>{if(l){if(i){h("initial");const b=requestAnimationFrame(()=>{zh.flushSync(()=>{h("open")})});return()=>{cancelAnimationFrame(b)}}h("close")}},[i,l]),{isMounted:p,status:f}}function wA(e,n){n===void 0&&(n={});const{initial:i={opacity:0},open:l,close:o,common:u,duration:c=250}=n,f=e.placement,h=f.split("-")[0],p=N.useMemo(()=>({side:h,placement:f}),[h,f]),b=typeof c=="number",g=(b?c:c.open)||0,v=(b?c:c.close)||0,[x,w]=N.useState(()=>({...jl(u,p),...jl(i,p)})),{isMounted:S,status:A}=vA(e,{duration:c}),C=qn(i),E=qn(l),R=qn(o),z=qn(u);return Pt(()=>{const $=jl(C.current,p),_=jl(R.current,p),F=jl(z.current,p),P=jl(E.current,p)||Object.keys($).reduce((O,L)=>(O[L]="",O),{});if(A==="initial"&&w(O=>({transitionProperty:O.transitionProperty,...F,...$})),A==="open"&&w({transitionProperty:Object.keys(P).map(Xy).join(","),transitionDuration:g+"ms",...F,...P}),A==="close"){const O=_||$;w({transitionProperty:Object.keys(O).map(Xy).join(","),transitionDuration:v+"ms",...F,...O})}},[v,R,C,E,z,g,A,p]),{isMounted:S,styles:x}}function C0(e,n,i){return i===void 0&&(i=!0),e.filter(o=>{var u;return o.parentId===n&&(!i||((u=o.context)==null?void 0:u.open))}).flatMap(o=>[o,...C0(e,o.id,i)])}function Zy(e,n){const[i,l]=e;let o=!1;const u=n.length;for(let c=0,f=u-1;c<u;f=c++){const[h,p]=n[c]||[0,0],[b,g]=n[f]||[0,0];p>=l!=g>=l&&i<=(b-h)*(l-p)/(g-p)+h&&(o=!o)}return o}function SA(e,n){return e[0]>=n.x&&e[0]<=n.x+n.width&&e[1]>=n.y&&e[1]<=n.y+n.height}function th(e){e===void 0&&(e={});const{buffer:n=.5,blockPointerEvents:i=!1,requireIntent:l=!0}=e,o={current:-1};let u=!1,c=null,f=null,h=typeof performance<"u"?performance.now():0;function p(g,v){const x=performance.now(),w=x-h;if(c===null||f===null||w===0)return c=g,f=v,h=x,null;const S=g-c,A=v-f,E=Math.sqrt(S*S+A*A)/w;return c=g,f=v,h=x,E}const b=g=>{let{x:v,y:x,placement:w,elements:S,onClose:A,nodeId:C,tree:E}=g;return function(z){function $(){Kt(o),A()}if(Kt(o),!S.domReference||!S.floating||w==null||v==null||x==null)return;const{clientX:_,clientY:F}=z,P=[_,F],O=rA(z),L=z.type==="mouseleave",I=pd(S.floating,O),q=pd(S.domReference,O),K=S.domReference.getBoundingClientRect(),U=S.floating.getBoundingClientRect(),G=w.split("-")[0],H=v>U.right-U.width/2,X=x>U.bottom-U.height/2,Y=SA(P,K),ne=U.width>K.width,M=U.height>K.height,j=(ne?K:U).left,B=(ne?K:U).right,T=(M?K:U).top,J=(M?K:U).bottom;if(I&&(u=!0,!L))return;if(q&&(u=!1),q&&!L){u=!0;return}if(L&&ut(z.relatedTarget)&&pd(S.floating,z.relatedTarget)||E&&C0(E.nodesRef.current,C).length)return;if(G==="top"&&x>=K.bottom-1||G==="bottom"&&x<=K.top+1||G==="left"&&v>=K.right-1||G==="right"&&v<=K.left+1)return $();let W=[];switch(G){case"top":W=[[j,K.top+1],[j,U.bottom-1],[B,U.bottom-1],[B,K.top+1]];break;case"bottom":W=[[j,U.top+1],[j,K.bottom-1],[B,K.bottom-1],[B,U.top+1]];break;case"left":W=[[U.right-1,J],[U.right-1,T],[K.left+1,T],[K.left+1,J]];break;case"right":W=[[K.right-1,J],[K.right-1,T],[U.left+1,T],[U.left+1,J]];break}function ie(de){let[me,ye]=de;switch(G){case"top":{const Se=[ne?me+n/2:H?me+n*4:me-n*4,ye+n+1],Le=[ne?me-n/2:H?me+n*4:me-n*4,ye+n+1],be=[[U.left,H||ne?U.bottom-n:U.top],[U.right,H?ne?U.bottom-n:U.top:U.bottom-n]];return[Se,Le,...be]}case"bottom":{const Se=[ne?me+n/2:H?me+n*4:me-n*4,ye-n],Le=[ne?me-n/2:H?me+n*4:me-n*4,ye-n],be=[[U.left,H||ne?U.top+n:U.bottom],[U.right,H?ne?U.top+n:U.bottom:U.top+n]];return[Se,Le,...be]}case"left":{const Se=[me+n+1,M?ye+n/2:X?ye+n*4:ye-n*4],Le=[me+n+1,M?ye-n/2:X?ye+n*4:ye-n*4];return[...[[X||M?U.right-n:U.left,U.top],[X?M?U.right-n:U.left:U.right-n,U.bottom]],Se,Le]}case"right":{const Se=[me-n,M?ye+n/2:X?ye+n*4:ye-n*4],Le=[me-n,M?ye-n/2:X?ye+n*4:ye-n*4],be=[[X||M?U.left+n:U.right,U.top],[X?M?U.left+n:U.right:U.left+n,U.bottom]];return[Se,Le,...be]}}}if(!Zy([_,F],W)){if(u&&!Y)return $();if(!L&&l){const de=p(z.clientX,z.clientY);if(de!==null&&de<.1)return $()}Zy([_,F],ie([v,x]))?!u&&l&&(o.current=window.setTimeout($,40)):$()}}};return b.__options={blockPointerEvents:i},b}const kA={".":"Uncommitted Changes",staged:"Staging Area",working:"Working Directory"},EA=new Set([".","staged","working"]),CA=e=>{const n=!e||EA.has(e)?"HEAD":`${e}^`;return{base:`${n}^`,target:n}},Ky=(e,n)=>!!n&&e===`${n}^`,Ls=(e,n)=>e?e===n.shortHash||e===n.hash:!1,Qy=(e,n)=>n?`${e.shortHash}^`:e.shortHash,Wy=(e,n,i)=>{if(!n)return"Select...";const l=n.endsWith("^"),o=l?n.slice(0,-1):n;if(o.startsWith("HEAD"))return n;const u=kA[n];if(u)return u;const c=e.specialOptions.find(p=>p.value===n);if(c)return c.label;const f=e.branches.find(p=>p.name===o);if(f)return l?`${f.name}^`:f.name;const h=e.commits.find(p=>p.shortHash===o||p.hash===o);if(h)return Qy(h,l);if(i){const p=e.commits.find(b=>b.shortHash===i||b.hash===i);if(p)return Qy(p,!1)}return n};function AA({options:e,baseRevision:n,targetRevision:i,resolvedBaseRevision:l,resolvedTargetRevision:o,onSelectDiff:u,onOpenAdvanced:c,compact:f=!1}){const[h,p]=N.useState(!1),[b,g]=N.useState(!1),v=f,{refs:x,floatingStyles:w,context:S}=su({open:h||b,onOpenChange:W=>{!W&&b||p(W)},placement:"bottom-end",middleware:[tu(6),ru(),nu({padding:8})],whileElementsMounted:Js}),A=iu(S,{handleClose:th()}),C=eh(S),E=ou(S),R=cu(S,{role:"menu"}),{getReferenceProps:z,getFloatingProps:$}=uu([A,C,E,R]),{refs:_,floatingStyles:F,context:P}=su({open:b,onOpenChange:W=>{W&&p(!0),g(W)},placement:"left-start",middleware:[tu(0),ru(),nu({padding:8})],whileElementsMounted:Js}),O=iu(P,{handleClose:th()}),L=eh(P),I=ou(P),q=cu(P,{role:"menu"}),{getReferenceProps:K,getFloatingProps:U}=uu([O,L,I,q]);N.useEffect(()=>{h||g(!1)},[h]);const G=N.useMemo(()=>{const W=Ky(n,i),ie=e.commits.find(ye=>W?Ls(i,ye)||Ls(o,ye):!1);if(ie)return`${ie.shortHash} ${ie.message}`;const de=Wy(e,n,l),me=Wy(e,i,o);return`${de}...${me}`},[e,n,i,l,o]),H=N.useMemo(()=>e.branches.find(W=>W.name==="main")||e.branches.find(W=>W.name==="master"),[e.branches]),X=!!H,Y=N.useMemo(()=>({base:"HEAD^",target:"HEAD"}),[]),ne=N.useMemo(()=>CA(i),[i]),M=(W,ie)=>{u(W,ie),g(!1),p(!1)},j=()=>{g(!1),p(!1),c()},B=(W,ie)=>["w-full text-left px-3 py-2 text-xs focus:outline-none transition-colors",W?"hover:bg-diff-selected-bg focus:bg-diff-selected-bg":"hover:bg-github-bg-tertiary focus:bg-github-bg-tertiary",W?"bg-diff-selected-bg border-l-4 border-l-diff-selected-border font-semibold pl-2":"",ie?"opacity-50 cursor-not-allowed":"cursor-pointer"].join(" "),T=(W,ie)=>n===W&&i===ie,J=W=>Ky(n,i)?Ls(i,W)||Ls(o,W):!1;return y.jsxs("div",{className:"relative",children:[y.jsx("button",{ref:x.setReference,type:"button",className:"flex items-center gap-1.5 cursor-pointer group","aria-haspopup":"menu","aria-expanded":h,"aria-label":`Revision menu: ${G}`,title:G,...z(),children:v?y.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:[y.jsx(Ck,{size:14,className:"text-github-text-secondary"}),y.jsx(Ul,{size:12,className:"text-github-text-secondary group-hover:text-github-text-primary transition-colors"})]}):y.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:[y.jsx("code",{className:"text-xs text-github-text-primary",children:G}),y.jsx(Ul,{size:12,className:"text-github-text-secondary group-hover:text-github-text-primary transition-colors"})]})}),h&&y.jsx(au,{children:y.jsxs("div",{ref:x.setFloating,style:w,className:"bg-github-bg-secondary border border-github-border rounded shadow-lg z-50 w-[260px] max-h-[360px] overflow-y-auto",...$(),children:[y.jsxs("div",{className:"border-b border-github-border",children:[y.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary",children:"Quick Diffs"}),y.jsx("button",{onClick:()=>M("HEAD","."),className:B(T("HEAD","."),!1),children:"HEAD...Uncommitted"}),X&&H&&y.jsx(y.Fragment,{children:y.jsxs("button",{onClick:()=>M(H.name,"."),className:B(T(H.name,"."),!1),children:[H.name,"...Uncommitted"]})}),y.jsx("button",{onClick:()=>M(Y.base,Y.target),className:B(T(Y.base,Y.target),!1),children:"HEAD"})]}),y.jsx("div",{className:"border-b border-github-border",children:y.jsx("button",{onClick:()=>M(ne.base,ne.target),className:B(T(ne.base,ne.target),!1),type:"button",children:"Previous commit"})}),y.jsx("div",{className:"border-b border-github-border",children:y.jsx("button",{ref:e.commits.length>0?_.setReference:void 0,className:B(!1,e.commits.length===0),...e.commits.length>0?K():{},disabled:e.commits.length===0,type:"button",children:y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(ek,{size:12,className:"text-github-text-secondary"}),y.jsx("span",{children:"Pick Commit..."})]})})}),y.jsx("div",{children:y.jsx("button",{onClick:j,className:B(!1,!1),type:"button",children:"Detailed..."})})]})}),b&&e.commits.length>0&&y.jsx(au,{children:y.jsxs("div",{ref:_.setFloating,style:F,className:"bg-github-bg-secondary border border-github-border rounded shadow-lg z-50 w-[360px] max-h-[360px] overflow-y-auto",...U(),children:[y.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(W=>y.jsx("button",{onClick:()=>M(`${W.shortHash}^`,W.shortHash),className:B(J(W),!1),type:"button",children:y.jsxs("div",{className:"flex items-start gap-2",children:[y.jsx("code",{className:"text-xs text-github-text-primary font-mono whitespace-nowrap",children:W.shortHash}),y.jsx("span",{className:"text-xs text-github-text-secondary flex-1 break-words",children:W.message})]})},W.hash))]})})]})}const NA=["jpg","jpeg","png","gif","bmp","svg","webp","ico","tiff","tif","avif","heic","heif"];function TA(e){if(!e)return!1;const n=ao(e);return n?NA.includes(n):!1}const RA=["md","markdown"];function jA(e){if(!e)return!1;const n=ao(e);return n?RA.includes(n):!1}const _A=["ipynb"];function LA(e){if(!e)return!1;const n=ao(e);return n?_A.includes(n):!1}function DA({file:e,diffMode:n,baseCommitish:i,targetCommitish:l}){const o=n??lo,u=e.status==="deleted",c=e.status==="added",f=e.status==="modified"||e.status==="renamed",h=i||"HEAD~1",p=l||"HEAD",[b,g]=N.useState({}),[v,x]=N.useState({}),w=async(E,R)=>{try{const z=E.naturalWidth,$=E.naturalHeight,P=(await(await fetch(E.src)).blob()).size;R({width:z,height:$,size:P})}catch(z){console.error("Failed to get image info:",z)}},S=E=>E?E<1024?`${E} B`:E<1024*1024?`${(E/1024).toFixed(1)} KB`:`${(E/(1024*1024)).toFixed(1)} MB`:"",A=E=>!E.width||!E.height?"":`W: ${E.width}px | H: ${E.height}px`,C={backgroundImage:`
|
|
31
|
-
linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%),
|
|
32
|
-
linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%)
|
|
33
|
-
`,backgroundSize:"20px 20px",backgroundPosition:"0 0, 10px 10px",backgroundColor:"white"};return u?y.jsx("div",{className:"bg-github-bg-primary p-4",children:y.jsxs("div",{className:"text-center",children:[y.jsx("div",{className:"mb-2",children:y.jsx("span",{className:"text-github-danger font-medium",children:"Deleted Image"})}),y.jsxs("div",{className:"inline-block border border-github-border rounded-md p-4 bg-github-bg-secondary",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Previous version:"}),y.jsx("img",{src:`/api/blob/${e.oldPath||e.path}?ref=${h}`,alt:`Previous version of ${e.oldPath||e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:C,onLoad:E=>w(E.currentTarget,g),onError:E=>{const R=E.target;R.style.display="none",R.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(b.width||b.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[A(b),A(b)&&S(b.size)&&" | ",S(b.size)]})]})]})}):c?y.jsx("div",{className:"bg-github-bg-primary p-4",children:y.jsxs("div",{className:"text-center",children:[y.jsx("div",{className:"mb-2",children:y.jsx("span",{className:"text-github-accent font-medium",children:"Added Image"})}),y.jsxs("div",{className:"inline-block border border-github-border rounded-md p-4 bg-github-bg-secondary",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"New file:"}),y.jsx("img",{src:`/api/blob/${e.path}?ref=${p}`,alt:`New image ${e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:C,onLoad:E=>w(E.currentTarget,x),onError:E=>{const R=E.target;R.style.display="none",R.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(v.width||v.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[A(v),A(v)&&S(v.size)&&" | ",S(v.size)]})]})]})}):f?o==="split"?y.jsxs("div",{className:"bg-github-bg-primary p-4",children:[y.jsx("div",{className:"text-center mb-4",children:y.jsx("span",{className:"text-github-text-primary font-medium",children:"Modified Image"})}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx("div",{className:"text-center",children:y.jsxs("div",{className:"border border-github-border rounded-md p-4 bg-github-bg-secondary",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Previous version:"}),y.jsx("img",{src:`/api/blob/${e.oldPath||e.path}?ref=${h}`,alt:`Previous version of ${e.oldPath||e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:C,onLoad:E=>w(E.currentTarget,g),onError:E=>{const R=E.target;R.style.display="none",R.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(b.width||b.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[A(b),A(b)&&S(b.size)&&" | ",S(b.size)]})]})}),y.jsx("div",{className:"text-center",children:y.jsxs("div",{className:"border border-github-border rounded-md p-4 bg-github-bg-secondary",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Current version:"}),y.jsx("img",{src:`/api/blob/${e.path}?ref=${p}`,alt:`Current version of ${e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:C,onLoad:E=>w(E.currentTarget,x),onError:E=>{const R=E.target;R.style.display="none",R.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(v.width||v.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[A(v),A(v)&&S(v.size)&&" | ",S(v.size)]})]})})]})]}):y.jsxs("div",{className:"bg-github-bg-primary p-4",children:[y.jsx("div",{className:"text-center mb-4",children:y.jsx("span",{className:"text-github-text-primary font-medium",children:"Modified Image"})}),y.jsxs("div",{className:"space-y-6",children:[y.jsx("div",{className:"text-center",children:y.jsxs("div",{className:"border border-github-border rounded-md p-4 bg-github-bg-secondary inline-block",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Previous version:"}),y.jsx("img",{src:`/api/blob/${e.oldPath||e.path}?ref=${h}`,alt:`Previous version of ${e.oldPath||e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:C,onLoad:E=>w(E.currentTarget,g),onError:E=>{const R=E.target;R.style.display="none",R.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(b.width||b.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[A(b),A(b)&&S(b.size)&&" | ",S(b.size)]})]})}),y.jsx("div",{className:"text-center",children:y.jsxs("div",{className:"border border-github-border rounded-md p-4 bg-github-bg-secondary inline-block",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Current version:"}),y.jsx("img",{src:`/api/blob/${e.path}?ref=${p}`,alt:`Current version of ${e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:C,onLoad:E=>w(E.currentTarget,x),onError:E=>{const R=E.target;R.style.display="none",R.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(v.width||v.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[A(v),A(v)&&S(v.size)&&" | ",S(v.size)]})]})})]})]}):null}function MA(e,n){const i={};return(e[e.length-1]===""?[...e,""]:e).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const OA=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,zA=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,IA={};function Jy(e,n){return(IA.jsx?zA:OA).test(e)}const FA=/[ \t\n\f\r]/g;function BA(e){return typeof e=="object"?e.type==="text"?ex(e.value):!1:ex(e)}function ex(e){return e.replace(FA,"")===""}class uo{constructor(n,i,l){this.normal=i,this.property=n,l&&(this.space=l)}}uo.prototype.normal={};uo.prototype.property={};uo.prototype.space=void 0;function A0(e,n){const i={},l={};for(const o of e)Object.assign(i,o.property),Object.assign(l,o.normal);return new uo(i,l,n)}function nh(e){return e.toLowerCase()}class dn{constructor(n,i){this.attribute=i,this.property=n}}dn.prototype.attribute="";dn.prototype.booleanish=!1;dn.prototype.boolean=!1;dn.prototype.commaOrSpaceSeparated=!1;dn.prototype.commaSeparated=!1;dn.prototype.defined=!1;dn.prototype.mustUseProperty=!1;dn.prototype.number=!1;dn.prototype.overloadedBoolean=!1;dn.prototype.property="";dn.prototype.spaceSeparated=!1;dn.prototype.space=void 0;let UA=0;const ze=Hi(),Tt=Hi(),rh=Hi(),pe=Hi(),st=Hi(),Bl=Hi(),Sn=Hi();function Hi(){return 2**++UA}const ih=Object.freeze(Object.defineProperty({__proto__:null,boolean:ze,booleanish:Tt,commaOrSpaceSeparated:Sn,commaSeparated:Bl,number:pe,overloadedBoolean:rh,spaceSeparated:st},Symbol.toStringTag,{value:"Module"})),yd=Object.keys(ih);class $h extends dn{constructor(n,i,l,o){let u=-1;if(super(n,i),tx(this,"space",o),typeof l=="number")for(;++u<yd.length;){const c=yd[u];tx(this,yd[u],(l&ih[c])===ih[c])}}}$h.prototype.defined=!0;function tx(e,n,i){i&&(e[n]=i)}function Pl(e){const n={},i={};for(const[l,o]of Object.entries(e.properties)){const u=new $h(l,e.transform(e.attributes||{},l),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(l)&&(u.mustUseProperty=!0),n[l]=u,i[nh(l)]=l,i[nh(u.attribute)]=l}return new uo(n,i,e.space)}const N0=Pl({properties:{ariaActiveDescendant:null,ariaAtomic:Tt,ariaAutoComplete:null,ariaBusy:Tt,ariaChecked:Tt,ariaColCount:pe,ariaColIndex:pe,ariaColSpan:pe,ariaControls:st,ariaCurrent:null,ariaDescribedBy:st,ariaDetails:null,ariaDisabled:Tt,ariaDropEffect:st,ariaErrorMessage:null,ariaExpanded:Tt,ariaFlowTo:st,ariaGrabbed:Tt,ariaHasPopup:null,ariaHidden:Tt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:st,ariaLevel:pe,ariaLive:null,ariaModal:Tt,ariaMultiLine:Tt,ariaMultiSelectable:Tt,ariaOrientation:null,ariaOwns:st,ariaPlaceholder:null,ariaPosInSet:pe,ariaPressed:Tt,ariaReadOnly:Tt,ariaRelevant:null,ariaRequired:Tt,ariaRoleDescription:st,ariaRowCount:pe,ariaRowIndex:pe,ariaRowSpan:pe,ariaSelected:Tt,ariaSetSize:pe,ariaSort:null,ariaValueMax:pe,ariaValueMin:pe,ariaValueNow:pe,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function T0(e,n){return n in e?e[n]:n}function R0(e,n){return T0(e,n.toLowerCase())}const HA=Pl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Bl,acceptCharset:st,accessKey:st,action:null,allow:null,allowFullScreen:ze,allowPaymentRequest:ze,allowUserMedia:ze,alt:null,as:null,async:ze,autoCapitalize:null,autoComplete:st,autoFocus:ze,autoPlay:ze,blocking:st,capture:null,charSet:null,checked:ze,cite:null,className:st,cols:pe,colSpan:null,content:null,contentEditable:Tt,controls:ze,controlsList:st,coords:pe|Bl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ze,defer:ze,dir:null,dirName:null,disabled:ze,download:rh,draggable:Tt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ze,formTarget:null,headers:st,height:pe,hidden:rh,high:pe,href:null,hrefLang:null,htmlFor:st,httpEquiv:st,id:null,imageSizes:null,imageSrcSet:null,inert:ze,inputMode:null,integrity:null,is:null,isMap:ze,itemId:null,itemProp:st,itemRef:st,itemScope:ze,itemType:st,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ze,low:pe,manifest:null,max:null,maxLength:pe,media:null,method:null,min:null,minLength:pe,multiple:ze,muted:ze,name:null,nonce:null,noModule:ze,noValidate:ze,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:ze,optimum:pe,pattern:null,ping:st,placeholder:null,playsInline:ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ze,referrerPolicy:null,rel:st,required:ze,reversed:ze,rows:pe,rowSpan:pe,sandbox:st,scope:null,scoped:ze,seamless:ze,selected:ze,shadowRootClonable:ze,shadowRootDelegatesFocus:ze,shadowRootMode:null,shape:null,size:pe,sizes:null,slot:null,span:pe,spellCheck:Tt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:pe,step:null,style:null,tabIndex:pe,target:null,title:null,translate:null,type:null,typeMustMatch:ze,useMap:null,value:Tt,width:pe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:st,axis:null,background:null,bgColor:null,border:pe,borderColor:null,bottomMargin:pe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ze,declare:ze,event:null,face:null,frame:null,frameBorder:null,hSpace:pe,leftMargin:pe,link:null,longDesc:null,lowSrc:null,marginHeight:pe,marginWidth:pe,noResize:ze,noHref:ze,noShade:ze,noWrap:ze,object:null,profile:null,prompt:null,rev:null,rightMargin:pe,rules:null,scheme:null,scrolling:Tt,standby:null,summary:null,text:null,topMargin:pe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:pe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ze,disableRemotePlayback:ze,prefix:null,property:null,results:pe,security:null,unselectable:null},space:"html",transform:R0}),$A=Pl({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:Sn,accentHeight:pe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:pe,amplitude:pe,arabicForm:null,ascent:pe,attributeName:null,attributeType:null,azimuth:pe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:pe,by:null,calcMode:null,capHeight:pe,className:st,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:pe,diffuseConstant:pe,direction:null,display:null,dur:null,divisor:pe,dominantBaseline:null,download:ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:pe,enableBackground:null,end:null,event:null,exponent:pe,externalResourcesRequired:null,fill:null,fillOpacity:pe,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:Bl,g2:Bl,glyphName:Bl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:pe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:pe,horizOriginX:pe,horizOriginY:pe,id:null,ideographic:pe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:pe,k:pe,k1:pe,k2:pe,k3:pe,k4:pe,kernelMatrix:Sn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:pe,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:pe,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:pe,overlineThickness:pe,paintOrder:null,panose1:null,path:null,pathLength:pe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:st,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:pe,pointsAtY:pe,pointsAtZ:pe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Sn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Sn,rev:Sn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Sn,requiredFeatures:Sn,requiredFonts:Sn,requiredFormats:Sn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:pe,specularExponent:pe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:pe,strikethroughThickness:pe,string:null,stroke:null,strokeDashArray:Sn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:pe,strokeOpacity:pe,strokeWidth:null,style:null,surfaceScale:pe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Sn,tabIndex:pe,tableValues:null,target:null,targetX:pe,targetY:pe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Sn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:pe,underlineThickness:pe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:pe,values:null,vAlphabetic:pe,vMathematical:pe,vectorEffect:null,vHanging:pe,vIdeographic:pe,version:null,vertAdvY:pe,vertOriginX:pe,vertOriginY:pe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:pe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:T0}),j0=Pl({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),_0=Pl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:R0}),L0=Pl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),qA={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"},PA=/[A-Z]/g,nx=/-[a-z]/g,VA=/^data[-\w.:]+$/i;function GA(e,n){const i=nh(n);let l=n,o=dn;if(i in e.normal)return e.property[e.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&VA.test(n)){if(n.charAt(4)==="-"){const u=n.slice(5).replace(nx,XA);l="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=n.slice(4);if(!nx.test(u)){let c=u.replace(PA,YA);c.charAt(0)!=="-"&&(c="-"+c),n="data"+c}}o=$h}return new o(l,n)}function YA(e){return"-"+e.toLowerCase()}function XA(e){return e.charAt(1).toUpperCase()}const ZA=A0([N0,HA,j0,_0,L0],"html"),qh=A0([N0,$A,j0,_0,L0],"svg");function KA(e){return e.join(" ").trim()}var _l={},xd,rx;function QA(){if(rx)return xd;rx=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,i=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,h=`
|
|
34
|
-
`,p="/",b="*",g="",v="comment",x="declaration";function w(A,C){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];C=C||{};var E=1,R=1;function z(U){var G=U.match(n);G&&(E+=G.length);var H=U.lastIndexOf(h);R=~H?U.length-H:R+U.length}function $(){var U={line:E,column:R};return function(G){return G.position=new _(U),O(),G}}function _(U){this.start=U,this.end={line:E,column:R},this.source=C.source}_.prototype.content=A;function F(U){var G=new Error(C.source+":"+E+":"+R+": "+U);if(G.reason=U,G.filename=C.source,G.line=E,G.column=R,G.source=A,!C.silent)throw G}function P(U){var G=U.exec(A);if(G){var H=G[0];return z(H),A=A.slice(H.length),G}}function O(){P(i)}function L(U){var G;for(U=U||[];G=I();)G!==!1&&U.push(G);return U}function I(){var U=$();if(!(p!=A.charAt(0)||b!=A.charAt(1))){for(var G=2;g!=A.charAt(G)&&(b!=A.charAt(G)||p!=A.charAt(G+1));)++G;if(G+=2,g===A.charAt(G-1))return F("End of comment missing");var H=A.slice(2,G-2);return R+=2,z(H),A=A.slice(G),R+=2,U({type:v,comment:H})}}function q(){var U=$(),G=P(l);if(G){if(I(),!P(o))return F("property missing ':'");var H=P(u),X=U({type:x,property:S(G[0].replace(e,g)),value:H?S(H[0].replace(e,g)):g});return P(c),X}}function K(){var U=[];L(U);for(var G;G=q();)G!==!1&&(U.push(G),L(U));return U}return O(),K()}function S(A){return A?A.replace(f,g):g}return xd=w,xd}var ix;function WA(){if(ix)return _l;ix=1;var e=_l&&_l.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(_l,"__esModule",{value:!0}),_l.default=i;const n=e(QA());function i(l,o){let u=null;if(!l||typeof l!="string")return u;const c=(0,n.default)(l),f=typeof o=="function";return c.forEach(h=>{if(h.type!=="declaration")return;const{property:p,value:b}=h;f?o(p,b,h):b&&(u=u||{},u[p]=b)}),u}return _l}var Ba={},lx;function JA(){if(lx)return Ba;lx=1,Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,i=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,u=function(p){return!p||i.test(p)||e.test(p)},c=function(p,b){return b.toUpperCase()},f=function(p,b){return"".concat(b,"-")},h=function(p,b){return b===void 0&&(b={}),u(p)?p:(p=p.toLowerCase(),b.reactCompat?p=p.replace(o,f):p=p.replace(l,f),p.replace(n,c))};return Ba.camelCase=h,Ba}var Ua,ax;function e4(){if(ax)return Ua;ax=1;var e=Ua&&Ua.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},n=e(WA()),i=JA();function l(o,u){var c={};return!o||typeof o!="string"||(0,n.default)(o,function(f,h){f&&h&&(c[(0,i.camelCase)(f,u)]=h)}),c}return l.default=l,Ua=l,Ua}var t4=e4();const n4=Su(t4),D0=M0("end"),Ph=M0("start");function M0(e){return n;function n(i){const l=i&&i.position&&i.position[e]||{};if(typeof l.line=="number"&&l.line>0&&typeof l.column=="number"&&l.column>0)return{line:l.line,column:l.column,offset:typeof l.offset=="number"&&l.offset>-1?l.offset:void 0}}}function r4(e){const n=Ph(e),i=D0(e);if(n&&i)return{start:n,end:i}}function Xa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ox(e.position):"start"in e||"end"in e?ox(e):"line"in e||"column"in e?lh(e):""}function lh(e){return sx(e&&e.line)+":"+sx(e&&e.column)}function ox(e){return lh(e&&e.start)+"-"+lh(e&&e.end)}function sx(e){return e&&typeof e=="number"?e:1}class Gt extends Error{constructor(n,i,l){super(),typeof i=="string"&&(l=i,i=void 0);let o="",u={},c=!1;if(i&&("line"in i&&"column"in i?u={place:i}:"start"in i&&"end"in i?u={place:i}:"type"in i?u={ancestors:[i],place:i.position}:u={...i}),typeof n=="string"?o=n:!u.cause&&n&&(c=!0,o=n.message,u.cause=n),!u.ruleId&&!u.source&&typeof l=="string"){const h=l.indexOf(":");h===-1?u.ruleId=l:(u.source=l.slice(0,h),u.ruleId=l.slice(h+1))}if(!u.place&&u.ancestors&&u.ancestors){const h=u.ancestors[u.ancestors.length-1];h&&(u.place=h.position)}const f=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=f?f.line:void 0,this.name=Xa(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=c&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Gt.prototype.file="";Gt.prototype.name="";Gt.prototype.reason="";Gt.prototype.message="";Gt.prototype.stack="";Gt.prototype.column=void 0;Gt.prototype.line=void 0;Gt.prototype.ancestors=void 0;Gt.prototype.cause=void 0;Gt.prototype.fatal=void 0;Gt.prototype.place=void 0;Gt.prototype.ruleId=void 0;Gt.prototype.source=void 0;const Vh={}.hasOwnProperty,i4=new Map,l4=/[A-Z]/g,a4=new Set(["table","tbody","thead","tfoot","tr"]),o4=new Set(["td","th"]),O0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function s4(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=n.filePath||void 0;let l;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");l=g4(i,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");l=m4(i,n.jsx,n.jsxs)}const o={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:l,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?qh:ZA,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},u=z0(o,e,void 0);return u&&typeof u!="string"?u:o.create(e,o.Fragment,{children:u||void 0},void 0)}function z0(e,n,i){if(n.type==="element")return u4(e,n,i);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return c4(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return d4(e,n,i);if(n.type==="mdxjsEsm")return f4(e,n);if(n.type==="root")return h4(e,n,i);if(n.type==="text")return p4(e,n)}function u4(e,n,i){const l=e.schema;let o=l;n.tagName.toLowerCase()==="svg"&&l.space==="html"&&(o=qh,e.schema=o),e.ancestors.push(n);const u=F0(e,n.tagName,!1),c=b4(e,n);let f=Yh(e,n);return a4.has(n.tagName)&&(f=f.filter(function(h){return typeof h=="string"?!BA(h):!0})),I0(e,c,u,n),Gh(c,f),e.ancestors.pop(),e.schema=l,e.create(n,u,c,i)}function c4(e,n){if(n.data&&n.data.estree&&e.evaluater){const l=n.data.estree.body[0];return l.type,e.evaluater.evaluateExpression(l.expression)}no(e,n.position)}function f4(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);no(e,n.position)}function d4(e,n,i){const l=e.schema;let o=l;n.name==="svg"&&l.space==="html"&&(o=qh,e.schema=o),e.ancestors.push(n);const u=n.name===null?e.Fragment:F0(e,n.name,!0),c=y4(e,n),f=Yh(e,n);return I0(e,c,u,n),Gh(c,f),e.ancestors.pop(),e.schema=l,e.create(n,u,c,i)}function h4(e,n,i){const l={};return Gh(l,Yh(e,n)),e.create(n,e.Fragment,l,i)}function p4(e,n){return n.value}function I0(e,n,i,l){typeof i!="string"&&i!==e.Fragment&&e.passNode&&(n.node=l)}function Gh(e,n){if(n.length>0){const i=n.length>1?n:n[0];i&&(e.children=i)}}function m4(e,n,i){return l;function l(o,u,c,f){const p=Array.isArray(c.children)?i:n;return f?p(u,c,f):p(u,c)}}function g4(e,n){return i;function i(l,o,u,c){const f=Array.isArray(u.children),h=Ph(l);return n(o,u,c,f,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function b4(e,n){const i={};let l,o;for(o in n.properties)if(o!=="children"&&Vh.call(n.properties,o)){const u=x4(e,o,n.properties[o]);if(u){const[c,f]=u;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&o4.has(n.tagName)?l=f:i[c]=f}}if(l){const u=i.style||(i.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=l}return i}function y4(e,n){const i={};for(const l of n.attributes)if(l.type==="mdxJsxExpressionAttribute")if(l.data&&l.data.estree&&e.evaluater){const u=l.data.estree.body[0];u.type;const c=u.expression;c.type;const f=c.properties[0];f.type,Object.assign(i,e.evaluater.evaluateExpression(f.argument))}else no(e,n.position);else{const o=l.name;let u;if(l.value&&typeof l.value=="object")if(l.value.data&&l.value.data.estree&&e.evaluater){const f=l.value.data.estree.body[0];f.type,u=e.evaluater.evaluateExpression(f.expression)}else no(e,n.position);else u=l.value===null?!0:l.value;i[o]=u}return i}function Yh(e,n){const i=[];let l=-1;const o=e.passKeys?new Map:i4;for(;++l<n.children.length;){const u=n.children[l];let c;if(e.passKeys){const h=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(h){const p=o.get(h)||0;c=h+"-"+p,o.set(h,p+1)}}const f=z0(e,u,c);f!==void 0&&i.push(f)}return i}function x4(e,n,i){const l=GA(e.schema,n);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=l.commaSeparated?MA(i):KA(i)),l.property==="style"){let o=typeof i=="object"?i:v4(e,String(i));return e.stylePropertyNameCase==="css"&&(o=w4(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&l.space?qA[l.property]||l.property:l.attribute,i]}}function v4(e,n){try{return n4(n,{reactCompat:!0})}catch(i){if(e.ignoreInvalidStyle)return{};const l=i,o=new Gt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:l,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=O0+"#cannot-parse-style-attribute",o}}function F0(e,n,i){let l;if(!i)l={type:"Literal",value:n};else if(n.includes(".")){const o=n.split(".");let u=-1,c;for(;++u<o.length;){const f=Jy(o[u])?{type:"Identifier",name:o[u]}:{type:"Literal",value:o[u]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(u&&f.type==="Literal"),optional:!1}:f}l=c}else l=Jy(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(l.type==="Literal"){const o=l.value;return Vh.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(l);no(e)}function no(e,n){const i=new Gt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=O0+"#cannot-handle-mdx-estrees-without-createevaluater",i}function w4(e){const n={};let i;for(i in e)Vh.call(e,i)&&(n[S4(i)]=e[i]);return n}function S4(e){let n=e.replace(l4,k4);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function k4(e){return"-"+e.toLowerCase()}const vd={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"]},E4={};function Xh(e,n){const i=E4,l=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,o=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return B0(e,l,o)}function B0(e,n,i){if(C4(e)){if("value"in e)return e.type==="html"&&!i?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ux(e.children,n,i)}return Array.isArray(e)?ux(e,n,i):""}function ux(e,n,i){const l=[];let o=-1;for(;++o<e.length;)l[o]=B0(e[o],n,i);return l.join("")}function C4(e){return!!(e&&typeof e=="object")}const cx=document.createElement("i");function Zh(e){const n="&"+e+";";cx.innerHTML=n;const i=cx.textContent;return i.charCodeAt(i.length-1)===59&&e!=="semi"||i===n?!1:i}function En(e,n,i,l){const o=e.length;let u=0,c;if(n<0?n=-n>o?0:o+n:n=n>o?o:n,i=i>0?i:0,l.length<1e4)c=Array.from(l),c.unshift(n,i),e.splice(...c);else for(i&&e.splice(n,i);u<l.length;)c=l.slice(u,u+1e4),c.unshift(n,0),e.splice(...c),u+=1e4,n+=1e4}function zn(e,n){return e.length>0?(En(e,e.length,0,n),e):n}const fx={}.hasOwnProperty;function U0(e){const n={};let i=-1;for(;++i<e.length;)A4(n,e[i]);return n}function A4(e,n){let i;for(i in n){const o=(fx.call(e,i)?e[i]:void 0)||(e[i]={}),u=n[i];let c;if(u)for(c in u){fx.call(o,c)||(o[c]=[]);const f=u[c];N4(o[c],Array.isArray(f)?f:f?[f]:[])}}}function N4(e,n){let i=-1;const l=[];for(;++i<n.length;)(n[i].add==="after"?e:l).push(n[i]);En(e,0,0,l)}function H0(e,n){const i=Number.parseInt(e,n);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function Pn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Qt=hi(/[A-Za-z]/),Vt=hi(/[\dA-Za-z]/),T4=hi(/[#-'*+\--9=?A-Z^-~]/);function fu(e){return e!==null&&(e<32||e===127)}const ah=hi(/\d/),R4=hi(/[\dA-Fa-f]/),j4=hi(/[!-/:-@[-`{-~]/);function Te(e){return e!==null&&e<-2}function lt(e){return e!==null&&(e<0||e===32)}function Ue(e){return e===-2||e===-1||e===32}const Iu=hi(new RegExp("\\p{P}|\\p{S}","u")),Ui=hi(/\s/);function hi(e){return n;function n(i){return i!==null&&i>-1&&e.test(String.fromCharCode(i))}}function Vl(e){const n=[];let i=-1,l=0,o=0;for(;++i<e.length;){const u=e.charCodeAt(i);let c="";if(u===37&&Vt(e.charCodeAt(i+1))&&Vt(e.charCodeAt(i+2)))o=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(c=String.fromCharCode(u));else if(u>55295&&u<57344){const f=e.charCodeAt(i+1);u<56320&&f>56319&&f<57344?(c=String.fromCharCode(u,f),o=1):c="�"}else c=String.fromCharCode(u);c&&(n.push(e.slice(l,i),encodeURIComponent(c)),l=i+o+1,c=""),o&&(i+=o,o=0)}return n.join("")+e.slice(l)}function Ye(e,n,i,l){const o=l?l-1:Number.POSITIVE_INFINITY;let u=0;return c;function c(h){return Ue(h)?(e.enter(i),f(h)):n(h)}function f(h){return Ue(h)&&u++<o?(e.consume(h),f):(e.exit(i),n(h))}}const _4={tokenize:L4};function L4(e){const n=e.attempt(this.parser.constructs.contentInitial,l,o);let i;return n;function l(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ye(e,n,"linePrefix")}function o(f){return e.enter("paragraph"),u(f)}function u(f){const h=e.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=h),i=h,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Te(f)?(e.consume(f),e.exit("chunkText"),u):(e.consume(f),c)}}const D4={tokenize:M4},dx={tokenize:O4};function M4(e){const n=this,i=[];let l=0,o,u,c;return f;function f(R){if(l<i.length){const z=i[l];return n.containerState=z[1],e.attempt(z[0].continuation,h,p)(R)}return p(R)}function h(R){if(l++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,o&&E();const z=n.events.length;let $=z,_;for(;$--;)if(n.events[$][0]==="exit"&&n.events[$][1].type==="chunkFlow"){_=n.events[$][1].end;break}C(l);let F=z;for(;F<n.events.length;)n.events[F][1].end={..._},F++;return En(n.events,$+1,0,n.events.slice(z)),n.events.length=F,p(R)}return f(R)}function p(R){if(l===i.length){if(!o)return v(R);if(o.currentConstruct&&o.currentConstruct.concrete)return w(R);n.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(dx,b,g)(R)}function b(R){return o&&E(),C(l),v(R)}function g(R){return n.parser.lazy[n.now().line]=l!==i.length,c=n.now().offset,w(R)}function v(R){return n.containerState={},e.attempt(dx,x,w)(R)}function x(R){return l++,i.push([n.currentConstruct,n.containerState]),v(R)}function w(R){if(R===null){o&&E(),C(0),e.consume(R);return}return o=o||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:u}),S(R)}function S(R){if(R===null){A(e.exit("chunkFlow"),!0),C(0),e.consume(R);return}return Te(R)?(e.consume(R),A(e.exit("chunkFlow")),l=0,n.interrupt=void 0,f):(e.consume(R),S)}function A(R,z){const $=n.sliceStream(R);if(z&&$.push(null),R.previous=u,u&&(u.next=R),u=R,o.defineSkip(R.start),o.write($),n.parser.lazy[R.start.line]){let _=o.events.length;for(;_--;)if(o.events[_][1].start.offset<c&&(!o.events[_][1].end||o.events[_][1].end.offset>c))return;const F=n.events.length;let P=F,O,L;for(;P--;)if(n.events[P][0]==="exit"&&n.events[P][1].type==="chunkFlow"){if(O){L=n.events[P][1].end;break}O=!0}for(C(l),_=F;_<n.events.length;)n.events[_][1].end={...L},_++;En(n.events,P+1,0,n.events.slice(F)),n.events.length=_}}function C(R){let z=i.length;for(;z-- >R;){const $=i[z];n.containerState=$[1],$[0].exit.call(n,e)}i.length=R}function E(){o.write([null]),u=void 0,o=void 0,n.containerState._closeFlow=void 0}}function O4(e,n,i){return Ye(e,e.attempt(this.parser.constructs.document,n,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function $l(e){if(e===null||lt(e)||Ui(e))return 1;if(Iu(e))return 2}function Fu(e,n,i){const l=[];let o=-1;for(;++o<e.length;){const u=e[o].resolveAll;u&&!l.includes(u)&&(n=u(n,i),l.push(u))}return n}const oh={name:"attention",resolveAll:z4,tokenize:I4};function z4(e,n){let i=-1,l,o,u,c,f,h,p,b;for(;++i<e.length;)if(e[i][0]==="enter"&&e[i][1].type==="attentionSequence"&&e[i][1]._close){for(l=i;l--;)if(e[l][0]==="exit"&&e[l][1].type==="attentionSequence"&&e[l][1]._open&&n.sliceSerialize(e[l][1]).charCodeAt(0)===n.sliceSerialize(e[i][1]).charCodeAt(0)){if((e[l][1]._close||e[i][1]._open)&&(e[i][1].end.offset-e[i][1].start.offset)%3&&!((e[l][1].end.offset-e[l][1].start.offset+e[i][1].end.offset-e[i][1].start.offset)%3))continue;h=e[l][1].end.offset-e[l][1].start.offset>1&&e[i][1].end.offset-e[i][1].start.offset>1?2:1;const g={...e[l][1].end},v={...e[i][1].start};hx(g,-h),hx(v,h),c={type:h>1?"strongSequence":"emphasisSequence",start:g,end:{...e[l][1].end}},f={type:h>1?"strongSequence":"emphasisSequence",start:{...e[i][1].start},end:v},u={type:h>1?"strongText":"emphasisText",start:{...e[l][1].end},end:{...e[i][1].start}},o={type:h>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[l][1].end={...c.start},e[i][1].start={...f.end},p=[],e[l][1].end.offset-e[l][1].start.offset&&(p=zn(p,[["enter",e[l][1],n],["exit",e[l][1],n]])),p=zn(p,[["enter",o,n],["enter",c,n],["exit",c,n],["enter",u,n]]),p=zn(p,Fu(n.parser.constructs.insideSpan.null,e.slice(l+1,i),n)),p=zn(p,[["exit",u,n],["enter",f,n],["exit",f,n],["exit",o,n]]),e[i][1].end.offset-e[i][1].start.offset?(b=2,p=zn(p,[["enter",e[i][1],n],["exit",e[i][1],n]])):b=0,En(e,l-1,i-l+3,p),i=l+p.length-b-2;break}}for(i=-1;++i<e.length;)e[i][1].type==="attentionSequence"&&(e[i][1].type="data");return e}function I4(e,n){const i=this.parser.constructs.attentionMarkers.null,l=this.previous,o=$l(l);let u;return c;function c(h){return u=h,e.enter("attentionSequence"),f(h)}function f(h){if(h===u)return e.consume(h),f;const p=e.exit("attentionSequence"),b=$l(h),g=!b||b===2&&o||i.includes(h),v=!o||o===2&&b||i.includes(l);return p._open=!!(u===42?g:g&&(o||!v)),p._close=!!(u===42?v:v&&(b||!g)),n(h)}}function hx(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const F4={name:"autolink",tokenize:B4};function B4(e,n,i){let l=0;return o;function o(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(x){return Qt(x)?(e.consume(x),c):x===64?i(x):p(x)}function c(x){return x===43||x===45||x===46||Vt(x)?(l=1,f(x)):p(x)}function f(x){return x===58?(e.consume(x),l=0,h):(x===43||x===45||x===46||Vt(x))&&l++<32?(e.consume(x),f):(l=0,p(x))}function h(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),n):x===null||x===32||x===60||fu(x)?i(x):(e.consume(x),h)}function p(x){return x===64?(e.consume(x),b):T4(x)?(e.consume(x),p):i(x)}function b(x){return Vt(x)?g(x):i(x)}function g(x){return x===46?(e.consume(x),l=0,b):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),n):v(x)}function v(x){if((x===45||Vt(x))&&l++<63){const w=x===45?v:g;return e.consume(x),w}return i(x)}}const co={partial:!0,tokenize:U4};function U4(e,n,i){return l;function l(u){return Ue(u)?Ye(e,o,"linePrefix")(u):o(u)}function o(u){return u===null||Te(u)?n(u):i(u)}}const $0={continuation:{tokenize:$4},exit:q4,name:"blockQuote",tokenize:H4};function H4(e,n,i){const l=this;return o;function o(c){if(c===62){const f=l.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),u}return i(c)}function u(c){return Ue(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(c))}}function $4(e,n,i){const l=this;return o;function o(c){return Ue(c)?Ye(e,u,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):u(c)}function u(c){return e.attempt($0,n,i)(c)}}function q4(e){e.exit("blockQuote")}const q0={name:"characterEscape",tokenize:P4};function P4(e,n,i){return l;function l(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),o}function o(u){return j4(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):i(u)}}const P0={name:"characterReference",tokenize:V4};function V4(e,n,i){const l=this;let o=0,u,c;return f;function f(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),h}function h(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),u=31,c=Vt,b(g))}function p(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,c=R4,b):(e.enter("characterReferenceValue"),u=7,c=ah,b(g))}function b(g){if(g===59&&o){const v=e.exit("characterReferenceValue");return c===Vt&&!Zh(l.sliceSerialize(v))?i(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return c(g)&&o++<u?(e.consume(g),b):i(g)}}const px={partial:!0,tokenize:Y4},mx={concrete:!0,name:"codeFenced",tokenize:G4};function G4(e,n,i){const l=this,o={partial:!0,tokenize:$};let u=0,c=0,f;return h;function h(_){return p(_)}function p(_){const F=l.events[l.events.length-1];return u=F&&F[1].type==="linePrefix"?F[2].sliceSerialize(F[1],!0).length:0,f=_,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),b(_)}function b(_){return _===f?(c++,e.consume(_),b):c<3?i(_):(e.exit("codeFencedFenceSequence"),Ue(_)?Ye(e,g,"whitespace")(_):g(_))}function g(_){return _===null||Te(_)?(e.exit("codeFencedFence"),l.interrupt?n(_):e.check(px,S,z)(_)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(_))}function v(_){return _===null||Te(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(_)):Ue(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ye(e,x,"whitespace")(_)):_===96&&_===f?i(_):(e.consume(_),v)}function x(_){return _===null||Te(_)?g(_):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(_))}function w(_){return _===null||Te(_)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(_)):_===96&&_===f?i(_):(e.consume(_),w)}function S(_){return e.attempt(o,z,A)(_)}function A(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),C}function C(_){return u>0&&Ue(_)?Ye(e,E,"linePrefix",u+1)(_):E(_)}function E(_){return _===null||Te(_)?e.check(px,S,z)(_):(e.enter("codeFlowValue"),R(_))}function R(_){return _===null||Te(_)?(e.exit("codeFlowValue"),E(_)):(e.consume(_),R)}function z(_){return e.exit("codeFenced"),n(_)}function $(_,F,P){let O=0;return L;function L(G){return _.enter("lineEnding"),_.consume(G),_.exit("lineEnding"),I}function I(G){return _.enter("codeFencedFence"),Ue(G)?Ye(_,q,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G):q(G)}function q(G){return G===f?(_.enter("codeFencedFenceSequence"),K(G)):P(G)}function K(G){return G===f?(O++,_.consume(G),K):O>=c?(_.exit("codeFencedFenceSequence"),Ue(G)?Ye(_,U,"whitespace")(G):U(G)):P(G)}function U(G){return G===null||Te(G)?(_.exit("codeFencedFence"),F(G)):P(G)}}}function Y4(e,n,i){const l=this;return o;function o(c){return c===null?i(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u)}function u(c){return l.parser.lazy[l.now().line]?i(c):n(c)}}const wd={name:"codeIndented",tokenize:Z4},X4={partial:!0,tokenize:K4};function Z4(e,n,i){const l=this;return o;function o(p){return e.enter("codeIndented"),Ye(e,u,"linePrefix",5)(p)}function u(p){const b=l.events[l.events.length-1];return b&&b[1].type==="linePrefix"&&b[2].sliceSerialize(b[1],!0).length>=4?c(p):i(p)}function c(p){return p===null?h(p):Te(p)?e.attempt(X4,c,h)(p):(e.enter("codeFlowValue"),f(p))}function f(p){return p===null||Te(p)?(e.exit("codeFlowValue"),c(p)):(e.consume(p),f)}function h(p){return e.exit("codeIndented"),n(p)}}function K4(e,n,i){const l=this;return o;function o(c){return l.parser.lazy[l.now().line]?i(c):Te(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):Ye(e,u,"linePrefix",5)(c)}function u(c){const f=l.events[l.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(c):Te(c)?o(c):i(c)}}const Q4={name:"codeText",previous:J4,resolve:W4,tokenize:eN};function W4(e){let n=e.length-4,i=3,l,o;if((e[i][1].type==="lineEnding"||e[i][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(l=i;++l<n;)if(e[l][1].type==="codeTextData"){e[i][1].type="codeTextPadding",e[n][1].type="codeTextPadding",i+=2,n-=2;break}}for(l=i-1,n++;++l<=n;)o===void 0?l!==n&&e[l][1].type!=="lineEnding"&&(o=l):(l===n||e[l][1].type==="lineEnding")&&(e[o][1].type="codeTextData",l!==o+2&&(e[o][1].end=e[l-1][1].end,e.splice(o+2,l-o-2),n-=l-o-2,l=o+2),o=void 0);return e}function J4(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function eN(e,n,i){let l=0,o,u;return c;function c(g){return e.enter("codeText"),e.enter("codeTextSequence"),f(g)}function f(g){return g===96?(e.consume(g),l++,f):(e.exit("codeTextSequence"),h(g))}function h(g){return g===null?i(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),h):g===96?(u=e.enter("codeTextSequence"),o=0,b(g)):Te(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),h):(e.enter("codeTextData"),p(g))}function p(g){return g===null||g===32||g===96||Te(g)?(e.exit("codeTextData"),h(g)):(e.consume(g),p)}function b(g){return g===96?(e.consume(g),o++,b):o===l?(e.exit("codeTextSequence"),e.exit("codeText"),n(g)):(u.type="codeTextData",p(g))}}class tN{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,i){const l=i??Number.POSITIVE_INFINITY;return l<this.left.length?this.left.slice(n,l):n>this.left.length?this.right.slice(this.right.length-l+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-l+this.left.length).reverse())}splice(n,i,l){const o=i||0;this.setCursor(Math.trunc(n));const u=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return l&&Ha(this.left,l),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Ha(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Ha(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const i=this.left.splice(n,Number.POSITIVE_INFINITY);Ha(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Ha(this.left,i.reverse())}}}function Ha(e,n){let i=0;if(n.length<1e4)e.push(...n);else for(;i<n.length;)e.push(...n.slice(i,i+1e4)),i+=1e4}function V0(e){const n={};let i=-1,l,o,u,c,f,h,p;const b=new tN(e);for(;++i<b.length;){for(;i in n;)i=n[i];if(l=b.get(i),i&&l[1].type==="chunkFlow"&&b.get(i-1)[1].type==="listItemPrefix"&&(h=l[1]._tokenizer.events,u=0,u<h.length&&h[u][1].type==="lineEndingBlank"&&(u+=2),u<h.length&&h[u][1].type==="content"))for(;++u<h.length&&h[u][1].type!=="content";)h[u][1].type==="chunkText"&&(h[u][1]._isInFirstContentOfListItem=!0,u++);if(l[0]==="enter")l[1].contentType&&(Object.assign(n,nN(b,i)),i=n[i],p=!0);else if(l[1]._container){for(u=i,o=void 0;u--;)if(c=b.get(u),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(b.get(o)[1].type="lineEndingBlank"),c[1].type="lineEnding",o=u);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;o&&(l[1].end={...b.get(o)[1].start},f=b.slice(o,i),f.unshift(l),b.splice(o,i-o+1,f))}}return En(e,0,Number.POSITIVE_INFINITY,b.slice(0)),!p}function nN(e,n){const i=e.get(n)[1],l=e.get(n)[2];let o=n-1;const u=[];let c=i._tokenizer;c||(c=l.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,h=[],p={};let b,g,v=-1,x=i,w=0,S=0;const A=[S];for(;x;){for(;e.get(++o)[1]!==x;);u.push(o),x._tokenizer||(b=l.sliceStream(x),x.next||b.push(null),g&&c.defineSkip(x.start),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(b),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),g=x,x=x.next}for(x=i;++v<f.length;)f[v][0]==="exit"&&f[v-1][0]==="enter"&&f[v][1].type===f[v-1][1].type&&f[v][1].start.line!==f[v][1].end.line&&(S=v+1,A.push(S),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(c.events=[],x?(x._tokenizer=void 0,x.previous=void 0):A.pop(),v=A.length;v--;){const C=f.slice(A[v],A[v+1]),E=u.pop();h.push([E,E+C.length-1]),e.splice(E,2,C)}for(h.reverse(),v=-1;++v<h.length;)p[w+h[v][0]]=w+h[v][1],w+=h[v][1]-h[v][0]-1;return p}const rN={resolve:lN,tokenize:aN},iN={partial:!0,tokenize:oN};function lN(e){return V0(e),e}function aN(e,n){let i;return l;function l(f){return e.enter("content"),i=e.enter("chunkContent",{contentType:"content"}),o(f)}function o(f){return f===null?u(f):Te(f)?e.check(iN,c,u)(f):(e.consume(f),o)}function u(f){return e.exit("chunkContent"),e.exit("content"),n(f)}function c(f){return e.consume(f),e.exit("chunkContent"),i.next=e.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,o}}function oN(e,n,i){const l=this;return o;function o(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ye(e,u,"linePrefix")}function u(c){if(c===null||Te(c))return i(c);const f=l.events[l.events.length-1];return!l.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(c):e.interrupt(l.parser.constructs.flow,i,n)(c)}}function G0(e,n,i,l,o,u,c,f,h){const p=h||Number.POSITIVE_INFINITY;let b=0;return g;function g(C){return C===60?(e.enter(l),e.enter(o),e.enter(u),e.consume(C),e.exit(u),v):C===null||C===32||C===41||fu(C)?i(C):(e.enter(l),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),S(C))}function v(C){return C===62?(e.enter(u),e.consume(C),e.exit(u),e.exit(o),e.exit(l),n):(e.enter(f),e.enter("chunkString",{contentType:"string"}),x(C))}function x(C){return C===62?(e.exit("chunkString"),e.exit(f),v(C)):C===null||C===60||Te(C)?i(C):(e.consume(C),C===92?w:x)}function w(C){return C===60||C===62||C===92?(e.consume(C),x):x(C)}function S(C){return!b&&(C===null||C===41||lt(C))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(l),n(C)):b<p&&C===40?(e.consume(C),b++,S):C===41?(e.consume(C),b--,S):C===null||C===32||C===40||fu(C)?i(C):(e.consume(C),C===92?A:S)}function A(C){return C===40||C===41||C===92?(e.consume(C),S):S(C)}}function Y0(e,n,i,l,o,u){const c=this;let f=0,h;return p;function p(x){return e.enter(l),e.enter(o),e.consume(x),e.exit(o),e.enter(u),b}function b(x){return f>999||x===null||x===91||x===93&&!h||x===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?i(x):x===93?(e.exit(u),e.enter(o),e.consume(x),e.exit(o),e.exit(l),n):Te(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),b):(e.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===null||x===91||x===93||Te(x)||f++>999?(e.exit("chunkString"),b(x)):(e.consume(x),h||(h=!Ue(x)),x===92?v:g)}function v(x){return x===91||x===92||x===93?(e.consume(x),f++,g):g(x)}}function X0(e,n,i,l,o,u){let c;return f;function f(v){return v===34||v===39||v===40?(e.enter(l),e.enter(o),e.consume(v),e.exit(o),c=v===40?41:v,h):i(v)}function h(v){return v===c?(e.enter(o),e.consume(v),e.exit(o),e.exit(l),n):(e.enter(u),p(v))}function p(v){return v===c?(e.exit(u),h(c)):v===null?i(v):Te(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),Ye(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),b(v))}function b(v){return v===c||v===null||Te(v)?(e.exit("chunkString"),p(v)):(e.consume(v),v===92?g:b)}function g(v){return v===c||v===92?(e.consume(v),b):b(v)}}function Za(e,n){let i;return l;function l(o){return Te(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i=!0,l):Ue(o)?Ye(e,l,i?"linePrefix":"lineSuffix")(o):n(o)}}const sN={name:"definition",tokenize:cN},uN={partial:!0,tokenize:fN};function cN(e,n,i){const l=this;let o;return u;function u(x){return e.enter("definition"),c(x)}function c(x){return Y0.call(l,e,f,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function f(x){return o=Pn(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),h):i(x)}function h(x){return lt(x)?Za(e,p)(x):p(x)}function p(x){return G0(e,b,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function b(x){return e.attempt(uN,g,g)(x)}function g(x){return Ue(x)?Ye(e,v,"whitespace")(x):v(x)}function v(x){return x===null||Te(x)?(e.exit("definition"),l.parser.defined.push(o),n(x)):i(x)}}function fN(e,n,i){return l;function l(f){return lt(f)?Za(e,o)(f):i(f)}function o(f){return X0(e,u,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function u(f){return Ue(f)?Ye(e,c,"whitespace")(f):c(f)}function c(f){return f===null||Te(f)?n(f):i(f)}}const dN={name:"hardBreakEscape",tokenize:hN};function hN(e,n,i){return l;function l(u){return e.enter("hardBreakEscape"),e.consume(u),o}function o(u){return Te(u)?(e.exit("hardBreakEscape"),n(u)):i(u)}}const pN={name:"headingAtx",resolve:mN,tokenize:gN};function mN(e,n){let i=e.length-2,l=3,o,u;return e[l][1].type==="whitespace"&&(l+=2),i-2>l&&e[i][1].type==="whitespace"&&(i-=2),e[i][1].type==="atxHeadingSequence"&&(l===i-1||i-4>l&&e[i-2][1].type==="whitespace")&&(i-=l+1===i?2:4),i>l&&(o={type:"atxHeadingText",start:e[l][1].start,end:e[i][1].end},u={type:"chunkText",start:e[l][1].start,end:e[i][1].end,contentType:"text"},En(e,l,i-l+1,[["enter",o,n],["enter",u,n],["exit",u,n],["exit",o,n]])),e}function gN(e,n,i){let l=0;return o;function o(b){return e.enter("atxHeading"),u(b)}function u(b){return e.enter("atxHeadingSequence"),c(b)}function c(b){return b===35&&l++<6?(e.consume(b),c):b===null||lt(b)?(e.exit("atxHeadingSequence"),f(b)):i(b)}function f(b){return b===35?(e.enter("atxHeadingSequence"),h(b)):b===null||Te(b)?(e.exit("atxHeading"),n(b)):Ue(b)?Ye(e,f,"whitespace")(b):(e.enter("atxHeadingText"),p(b))}function h(b){return b===35?(e.consume(b),h):(e.exit("atxHeadingSequence"),f(b))}function p(b){return b===null||b===35||lt(b)?(e.exit("atxHeadingText"),f(b)):(e.consume(b),p)}}const bN=["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"],gx=["pre","script","style","textarea"],yN={concrete:!0,name:"htmlFlow",resolveTo:wN,tokenize:SN},xN={partial:!0,tokenize:EN},vN={partial:!0,tokenize:kN};function wN(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function SN(e,n,i){const l=this;let o,u,c,f,h;return p;function p(T){return b(T)}function b(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),g}function g(T){return T===33?(e.consume(T),v):T===47?(e.consume(T),u=!0,S):T===63?(e.consume(T),o=3,l.interrupt?n:M):Qt(T)?(e.consume(T),c=String.fromCharCode(T),A):i(T)}function v(T){return T===45?(e.consume(T),o=2,x):T===91?(e.consume(T),o=5,f=0,w):Qt(T)?(e.consume(T),o=4,l.interrupt?n:M):i(T)}function x(T){return T===45?(e.consume(T),l.interrupt?n:M):i(T)}function w(T){const J="CDATA[";return T===J.charCodeAt(f++)?(e.consume(T),f===J.length?l.interrupt?n:q:w):i(T)}function S(T){return Qt(T)?(e.consume(T),c=String.fromCharCode(T),A):i(T)}function A(T){if(T===null||T===47||T===62||lt(T)){const J=T===47,W=c.toLowerCase();return!J&&!u&&gx.includes(W)?(o=1,l.interrupt?n(T):q(T)):bN.includes(c.toLowerCase())?(o=6,J?(e.consume(T),C):l.interrupt?n(T):q(T)):(o=7,l.interrupt&&!l.parser.lazy[l.now().line]?i(T):u?E(T):R(T))}return T===45||Vt(T)?(e.consume(T),c+=String.fromCharCode(T),A):i(T)}function C(T){return T===62?(e.consume(T),l.interrupt?n:q):i(T)}function E(T){return Ue(T)?(e.consume(T),E):L(T)}function R(T){return T===47?(e.consume(T),L):T===58||T===95||Qt(T)?(e.consume(T),z):Ue(T)?(e.consume(T),R):L(T)}function z(T){return T===45||T===46||T===58||T===95||Vt(T)?(e.consume(T),z):$(T)}function $(T){return T===61?(e.consume(T),_):Ue(T)?(e.consume(T),$):R(T)}function _(T){return T===null||T===60||T===61||T===62||T===96?i(T):T===34||T===39?(e.consume(T),h=T,F):Ue(T)?(e.consume(T),_):P(T)}function F(T){return T===h?(e.consume(T),h=null,O):T===null||Te(T)?i(T):(e.consume(T),F)}function P(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||lt(T)?$(T):(e.consume(T),P)}function O(T){return T===47||T===62||Ue(T)?R(T):i(T)}function L(T){return T===62?(e.consume(T),I):i(T)}function I(T){return T===null||Te(T)?q(T):Ue(T)?(e.consume(T),I):i(T)}function q(T){return T===45&&o===2?(e.consume(T),H):T===60&&o===1?(e.consume(T),X):T===62&&o===4?(e.consume(T),j):T===63&&o===3?(e.consume(T),M):T===93&&o===5?(e.consume(T),ne):Te(T)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(xN,B,K)(T)):T===null||Te(T)?(e.exit("htmlFlowData"),K(T)):(e.consume(T),q)}function K(T){return e.check(vN,U,B)(T)}function U(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),G}function G(T){return T===null||Te(T)?K(T):(e.enter("htmlFlowData"),q(T))}function H(T){return T===45?(e.consume(T),M):q(T)}function X(T){return T===47?(e.consume(T),c="",Y):q(T)}function Y(T){if(T===62){const J=c.toLowerCase();return gx.includes(J)?(e.consume(T),j):q(T)}return Qt(T)&&c.length<8?(e.consume(T),c+=String.fromCharCode(T),Y):q(T)}function ne(T){return T===93?(e.consume(T),M):q(T)}function M(T){return T===62?(e.consume(T),j):T===45&&o===2?(e.consume(T),M):q(T)}function j(T){return T===null||Te(T)?(e.exit("htmlFlowData"),B(T)):(e.consume(T),j)}function B(T){return e.exit("htmlFlow"),n(T)}}function kN(e,n,i){const l=this;return o;function o(c){return Te(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):i(c)}function u(c){return l.parser.lazy[l.now().line]?i(c):n(c)}}function EN(e,n,i){return l;function l(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(co,n,i)}}const CN={name:"htmlText",tokenize:AN};function AN(e,n,i){const l=this;let o,u,c;return f;function f(M){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(M),h}function h(M){return M===33?(e.consume(M),p):M===47?(e.consume(M),$):M===63?(e.consume(M),R):Qt(M)?(e.consume(M),P):i(M)}function p(M){return M===45?(e.consume(M),b):M===91?(e.consume(M),u=0,w):Qt(M)?(e.consume(M),E):i(M)}function b(M){return M===45?(e.consume(M),x):i(M)}function g(M){return M===null?i(M):M===45?(e.consume(M),v):Te(M)?(c=g,X(M)):(e.consume(M),g)}function v(M){return M===45?(e.consume(M),x):g(M)}function x(M){return M===62?H(M):M===45?v(M):g(M)}function w(M){const j="CDATA[";return M===j.charCodeAt(u++)?(e.consume(M),u===j.length?S:w):i(M)}function S(M){return M===null?i(M):M===93?(e.consume(M),A):Te(M)?(c=S,X(M)):(e.consume(M),S)}function A(M){return M===93?(e.consume(M),C):S(M)}function C(M){return M===62?H(M):M===93?(e.consume(M),C):S(M)}function E(M){return M===null||M===62?H(M):Te(M)?(c=E,X(M)):(e.consume(M),E)}function R(M){return M===null?i(M):M===63?(e.consume(M),z):Te(M)?(c=R,X(M)):(e.consume(M),R)}function z(M){return M===62?H(M):R(M)}function $(M){return Qt(M)?(e.consume(M),_):i(M)}function _(M){return M===45||Vt(M)?(e.consume(M),_):F(M)}function F(M){return Te(M)?(c=F,X(M)):Ue(M)?(e.consume(M),F):H(M)}function P(M){return M===45||Vt(M)?(e.consume(M),P):M===47||M===62||lt(M)?O(M):i(M)}function O(M){return M===47?(e.consume(M),H):M===58||M===95||Qt(M)?(e.consume(M),L):Te(M)?(c=O,X(M)):Ue(M)?(e.consume(M),O):H(M)}function L(M){return M===45||M===46||M===58||M===95||Vt(M)?(e.consume(M),L):I(M)}function I(M){return M===61?(e.consume(M),q):Te(M)?(c=I,X(M)):Ue(M)?(e.consume(M),I):O(M)}function q(M){return M===null||M===60||M===61||M===62||M===96?i(M):M===34||M===39?(e.consume(M),o=M,K):Te(M)?(c=q,X(M)):Ue(M)?(e.consume(M),q):(e.consume(M),U)}function K(M){return M===o?(e.consume(M),o=void 0,G):M===null?i(M):Te(M)?(c=K,X(M)):(e.consume(M),K)}function U(M){return M===null||M===34||M===39||M===60||M===61||M===96?i(M):M===47||M===62||lt(M)?O(M):(e.consume(M),U)}function G(M){return M===47||M===62||lt(M)?O(M):i(M)}function H(M){return M===62?(e.consume(M),e.exit("htmlTextData"),e.exit("htmlText"),n):i(M)}function X(M){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),Y}function Y(M){return Ue(M)?Ye(e,ne,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):ne(M)}function ne(M){return e.enter("htmlTextData"),c(M)}}const Kh={name:"labelEnd",resolveAll:jN,resolveTo:_N,tokenize:LN},NN={tokenize:DN},TN={tokenize:MN},RN={tokenize:ON};function jN(e){let n=-1;const i=[];for(;++n<e.length;){const l=e[n][1];if(i.push(e[n]),l.type==="labelImage"||l.type==="labelLink"||l.type==="labelEnd"){const o=l.type==="labelImage"?4:2;l.type="data",n+=o}}return e.length!==i.length&&En(e,0,e.length,i),e}function _N(e,n){let i=e.length,l=0,o,u,c,f;for(;i--;)if(o=e[i][1],u){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[i][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(c){if(e[i][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(u=i,o.type!=="labelLink")){l=2;break}}else o.type==="labelEnd"&&(c=i);const h={type:e[u][1].type==="labelLink"?"link":"image",start:{...e[u][1].start},end:{...e[e.length-1][1].end}},p={type:"label",start:{...e[u][1].start},end:{...e[c][1].end}},b={type:"labelText",start:{...e[u+l+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",h,n],["enter",p,n]],f=zn(f,e.slice(u+1,u+l+3)),f=zn(f,[["enter",b,n]]),f=zn(f,Fu(n.parser.constructs.insideSpan.null,e.slice(u+l+4,c-3),n)),f=zn(f,[["exit",b,n],e[c-2],e[c-1],["exit",p,n]]),f=zn(f,e.slice(c+1)),f=zn(f,[["exit",h,n]]),En(e,u,e.length,f),e}function LN(e,n,i){const l=this;let o=l.events.length,u,c;for(;o--;)if((l.events[o][1].type==="labelImage"||l.events[o][1].type==="labelLink")&&!l.events[o][1]._balanced){u=l.events[o][1];break}return f;function f(v){return u?u._inactive?g(v):(c=l.parser.defined.includes(Pn(l.sliceSerialize({start:u.end,end:l.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),h):i(v)}function h(v){return v===40?e.attempt(NN,b,c?b:g)(v):v===91?e.attempt(TN,b,c?p:g)(v):c?b(v):g(v)}function p(v){return e.attempt(RN,b,g)(v)}function b(v){return n(v)}function g(v){return u._balanced=!0,i(v)}}function DN(e,n,i){return l;function l(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),o}function o(g){return lt(g)?Za(e,u)(g):u(g)}function u(g){return g===41?b(g):G0(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return lt(g)?Za(e,h)(g):b(g)}function f(g){return i(g)}function h(g){return g===34||g===39||g===40?X0(e,p,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):b(g)}function p(g){return lt(g)?Za(e,b)(g):b(g)}function b(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),n):i(g)}}function MN(e,n,i){const l=this;return o;function o(f){return Y0.call(l,e,u,c,"reference","referenceMarker","referenceString")(f)}function u(f){return l.parser.defined.includes(Pn(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)))?n(f):i(f)}function c(f){return i(f)}}function ON(e,n,i){return l;function l(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),o}function o(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),n):i(u)}}const zN={name:"labelStartImage",resolveAll:Kh.resolveAll,tokenize:IN};function IN(e,n,i){const l=this;return o;function o(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),u}function u(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):i(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in l.parser.constructs?i(f):n(f)}}const FN={name:"labelStartLink",resolveAll:Kh.resolveAll,tokenize:BN};function BN(e,n,i){const l=this;return o;function o(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),u}function u(c){return c===94&&"_hiddenFootnoteSupport"in l.parser.constructs?i(c):n(c)}}const Sd={name:"lineEnding",tokenize:UN};function UN(e,n){return i;function i(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Ye(e,n,"linePrefix")}}const Us={name:"thematicBreak",tokenize:HN};function HN(e,n,i){let l=0,o;return u;function u(p){return e.enter("thematicBreak"),c(p)}function c(p){return o=p,f(p)}function f(p){return p===o?(e.enter("thematicBreakSequence"),h(p)):l>=3&&(p===null||Te(p))?(e.exit("thematicBreak"),n(p)):i(p)}function h(p){return p===o?(e.consume(p),l++,h):(e.exit("thematicBreakSequence"),Ue(p)?Ye(e,f,"whitespace")(p):f(p))}}const un={continuation:{tokenize:VN},exit:YN,name:"list",tokenize:PN},$N={partial:!0,tokenize:XN},qN={partial:!0,tokenize:GN};function PN(e,n,i){const l=this,o=l.events[l.events.length-1];let u=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,c=0;return f;function f(x){const w=l.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!l.containerState.marker||x===l.containerState.marker:ah(x)){if(l.containerState.type||(l.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(Us,i,p)(x):p(x);if(!l.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(x)}return i(x)}function h(x){return ah(x)&&++c<10?(e.consume(x),h):(!l.interrupt||c<2)&&(l.containerState.marker?x===l.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),p(x)):i(x)}function p(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),l.containerState.marker=l.containerState.marker||x,e.check(co,l.interrupt?i:b,e.attempt($N,v,g))}function b(x){return l.containerState.initialBlankLine=!0,u++,v(x)}function g(x){return Ue(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),v):i(x)}function v(x){return l.containerState.size=u+l.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(x)}}function VN(e,n,i){const l=this;return l.containerState._closeFlow=void 0,e.check(co,o,u);function o(f){return l.containerState.furtherBlankLines=l.containerState.furtherBlankLines||l.containerState.initialBlankLine,Ye(e,n,"listItemIndent",l.containerState.size+1)(f)}function u(f){return l.containerState.furtherBlankLines||!Ue(f)?(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,c(f)):(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,e.attempt(qN,n,c)(f))}function c(f){return l.containerState._closeFlow=!0,l.interrupt=void 0,Ye(e,e.attempt(un,n,i),"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function GN(e,n,i){const l=this;return Ye(e,o,"listItemIndent",l.containerState.size+1);function o(u){const c=l.events[l.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===l.containerState.size?n(u):i(u)}}function YN(e){e.exit(this.containerState.type)}function XN(e,n,i){const l=this;return Ye(e,o,"listItemPrefixWhitespace",l.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(u){const c=l.events[l.events.length-1];return!Ue(u)&&c&&c[1].type==="listItemPrefixWhitespace"?n(u):i(u)}}const bx={name:"setextUnderline",resolveTo:ZN,tokenize:KN};function ZN(e,n){let i=e.length,l,o,u;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){l=i;break}e[i][1].type==="paragraph"&&(o=i)}else e[i][1].type==="content"&&e.splice(i,1),!u&&e[i][1].type==="definition"&&(u=i);const c={type:"setextHeading",start:{...e[l][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",u?(e.splice(o,0,["enter",c,n]),e.splice(u+1,0,["exit",e[l][1],n]),e[l][1].end={...e[u][1].end}):e[l][1]=c,e.push(["exit",c,n]),e}function KN(e,n,i){const l=this;let o;return u;function u(p){let b=l.events.length,g;for(;b--;)if(l.events[b][1].type!=="lineEnding"&&l.events[b][1].type!=="linePrefix"&&l.events[b][1].type!=="content"){g=l.events[b][1].type==="paragraph";break}return!l.parser.lazy[l.now().line]&&(l.interrupt||g)?(e.enter("setextHeadingLine"),o=p,c(p)):i(p)}function c(p){return e.enter("setextHeadingLineSequence"),f(p)}function f(p){return p===o?(e.consume(p),f):(e.exit("setextHeadingLineSequence"),Ue(p)?Ye(e,h,"lineSuffix")(p):h(p))}function h(p){return p===null||Te(p)?(e.exit("setextHeadingLine"),n(p)):i(p)}}const QN={tokenize:WN};function WN(e){const n=this,i=e.attempt(co,l,e.attempt(this.parser.constructs.flowInitial,o,Ye(e,e.attempt(this.parser.constructs.flow,o,e.attempt(rN,o)),"linePrefix")));return i;function l(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),n.currentConstruct=void 0,i}function o(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),n.currentConstruct=void 0,i}}const JN={resolveAll:K0()},eT=Z0("string"),tT=Z0("text");function Z0(e){return{resolveAll:K0(e==="text"?nT:void 0),tokenize:n};function n(i){const l=this,o=this.parser.constructs[e],u=i.attempt(o,c,f);return c;function c(b){return p(b)?u(b):f(b)}function f(b){if(b===null){i.consume(b);return}return i.enter("data"),i.consume(b),h}function h(b){return p(b)?(i.exit("data"),u(b)):(i.consume(b),h)}function p(b){if(b===null)return!0;const g=o[b];let v=-1;if(g)for(;++v<g.length;){const x=g[v];if(!x.previous||x.previous.call(l,l.previous))return!0}return!1}}}function K0(e){return n;function n(i,l){let o=-1,u;for(;++o<=i.length;)u===void 0?i[o]&&i[o][1].type==="data"&&(u=o,o++):(!i[o]||i[o][1].type!=="data")&&(o!==u+2&&(i[u][1].end=i[o-1][1].end,i.splice(u+2,o-u-2),o=u+2),u=void 0);return e?e(i,l):i}}function nT(e,n){let i=0;for(;++i<=e.length;)if((i===e.length||e[i][1].type==="lineEnding")&&e[i-1][1].type==="data"){const l=e[i-1][1],o=n.sliceStream(l);let u=o.length,c=-1,f=0,h;for(;u--;){const p=o[u];if(typeof p=="string"){for(c=p.length;p.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(p===-2)h=!0,f++;else if(p!==-1){u++;break}}if(n._contentTypeTextTrailing&&i===e.length&&(f=0),f){const p={type:i===e.length||h||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?c:l.start._bufferIndex+c,_index:l.start._index+u,line:l.end.line,column:l.end.column-f,offset:l.end.offset-f},end:{...l.end}};l.end={...p.start},l.start.offset===l.end.offset?Object.assign(l,p):(e.splice(i,0,["enter",p,n],["exit",p,n]),i+=2)}i++}return e}const rT={42:un,43:un,45:un,48:un,49:un,50:un,51:un,52:un,53:un,54:un,55:un,56:un,57:un,62:$0},iT={91:sN},lT={[-2]:wd,[-1]:wd,32:wd},aT={35:pN,42:Us,45:[bx,Us],60:yN,61:bx,95:Us,96:mx,126:mx},oT={38:P0,92:q0},sT={[-5]:Sd,[-4]:Sd,[-3]:Sd,33:zN,38:P0,42:oh,60:[F4,CN],91:FN,92:[dN,q0],93:Kh,95:oh,96:Q4},uT={null:[oh,JN]},cT={null:[42,95]},fT={null:[]},dT=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:cT,contentInitial:iT,disable:fT,document:rT,flow:aT,flowInitial:lT,insideSpan:uT,string:oT,text:sT},Symbol.toStringTag,{value:"Module"}));function hT(e,n,i){let l={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const o={},u=[];let c=[],f=[];const h={attempt:F($),check:F(_),consume:E,enter:R,exit:z,interrupt:F(_,{interrupt:!0})},p={code:null,containerState:{},defineSkip:S,events:[],now:w,parser:e,previous:null,sliceSerialize:v,sliceStream:x,write:g};let b=n.tokenize.call(p,h);return n.resolveAll&&u.push(n),p;function g(I){return c=zn(c,I),A(),c[c.length-1]!==null?[]:(P(n,0),p.events=Fu(u,p.events,p),p.events)}function v(I,q){return mT(x(I),q)}function x(I){return pT(c,I)}function w(){const{_bufferIndex:I,_index:q,line:K,column:U,offset:G}=l;return{_bufferIndex:I,_index:q,line:K,column:U,offset:G}}function S(I){o[I.line]=I.column,L()}function A(){let I;for(;l._index<c.length;){const q=c[l._index];if(typeof q=="string")for(I=l._index,l._bufferIndex<0&&(l._bufferIndex=0);l._index===I&&l._bufferIndex<q.length;)C(q.charCodeAt(l._bufferIndex));else C(q)}}function C(I){b=b(I)}function E(I){Te(I)?(l.line++,l.column=1,l.offset+=I===-3?2:1,L()):I!==-1&&(l.column++,l.offset++),l._bufferIndex<0?l._index++:(l._bufferIndex++,l._bufferIndex===c[l._index].length&&(l._bufferIndex=-1,l._index++)),p.previous=I}function R(I,q){const K=q||{};return K.type=I,K.start=w(),p.events.push(["enter",K,p]),f.push(K),K}function z(I){const q=f.pop();return q.end=w(),p.events.push(["exit",q,p]),q}function $(I,q){P(I,q.from)}function _(I,q){q.restore()}function F(I,q){return K;function K(U,G,H){let X,Y,ne,M;return Array.isArray(U)?B(U):"tokenize"in U?B([U]):j(U);function j(ie){return de;function de(me){const ye=me!==null&&ie[me],Se=me!==null&&ie.null,Le=[...Array.isArray(ye)?ye:ye?[ye]:[],...Array.isArray(Se)?Se:Se?[Se]:[]];return B(Le)(me)}}function B(ie){return X=ie,Y=0,ie.length===0?H:T(ie[Y])}function T(ie){return de;function de(me){return M=O(),ne=ie,ie.partial||(p.currentConstruct=ie),ie.name&&p.parser.constructs.disable.null.includes(ie.name)?W():ie.tokenize.call(q?Object.assign(Object.create(p),q):p,h,J,W)(me)}}function J(ie){return I(ne,M),G}function W(ie){return M.restore(),++Y<X.length?T(X[Y]):H}}}function P(I,q){I.resolveAll&&!u.includes(I)&&u.push(I),I.resolve&&En(p.events,q,p.events.length-q,I.resolve(p.events.slice(q),p)),I.resolveTo&&(p.events=I.resolveTo(p.events,p))}function O(){const I=w(),q=p.previous,K=p.currentConstruct,U=p.events.length,G=Array.from(f);return{from:U,restore:H};function H(){l=I,p.previous=q,p.currentConstruct=K,p.events.length=U,f=G,L()}}function L(){l.line in o&&l.column<2&&(l.column=o[l.line],l.offset+=o[l.line]-1)}}function pT(e,n){const i=n.start._index,l=n.start._bufferIndex,o=n.end._index,u=n.end._bufferIndex;let c;if(i===o)c=[e[i].slice(l,u)];else{if(c=e.slice(i,o),l>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(l):c.shift()}u>0&&c.push(e[o].slice(0,u))}return c}function mT(e,n){let i=-1;const l=[];let o;for(;++i<e.length;){const u=e[i];let c;if(typeof u=="string")c=u;else switch(u){case-5:{c="\r";break}case-4:{c=`
|
|
35
|
-
`;break}case-3:{c=`\r
|
|
36
|
-
`;break}case-2:{c=n?" ":" ";break}case-1:{if(!n&&o)continue;c=" ";break}default:c=String.fromCharCode(u)}o=u===-2,l.push(c)}return l.join("")}function gT(e){const l={constructs:U0([dT,...(e||{}).extensions||[]]),content:o(_4),defined:[],document:o(D4),flow:o(QN),lazy:{},string:o(eT),text:o(tT)};return l;function o(u){return c;function c(f){return hT(l,u,f)}}}function bT(e){for(;!V0(e););return e}const yx=/[\0\t\n\r]/g;function yT(){let e=1,n="",i=!0,l;return o;function o(u,c,f){const h=[];let p,b,g,v,x;for(u=n+(typeof u=="string"?u.toString():new TextDecoder(c||void 0).decode(u)),g=0,n="",i&&(u.charCodeAt(0)===65279&&g++,i=void 0);g<u.length;){if(yx.lastIndex=g,p=yx.exec(u),v=p&&p.index!==void 0?p.index:u.length,x=u.charCodeAt(v),!p){n=u.slice(g);break}if(x===10&&g===v&&l)h.push(-3),l=void 0;else switch(l&&(h.push(-5),l=void 0),g<v&&(h.push(u.slice(g,v)),e+=v-g),x){case 0:{h.push(65533),e++;break}case 9:{for(b=Math.ceil(e/4)*4,h.push(-2);e++<b;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:l=!0,e=1}g=v+1}return f&&(l&&h.push(-5),n&&h.push(n),h.push(null)),h}}const xT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function vT(e){return e.replace(xT,wT)}function wT(e,n,i){if(n)return n;if(i.charCodeAt(0)===35){const o=i.charCodeAt(1),u=o===120||o===88;return H0(i.slice(u?2:1),u?16:10)}return Zh(i)||e}const Q0={}.hasOwnProperty;function ST(e,n,i){return typeof n!="string"&&(i=n,n=void 0),kT(i)(bT(gT(i).document().write(yT()(e,n,!0))))}function kT(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(bt),autolinkProtocol:O,autolinkEmail:O,atxHeading:u(ve),blockQuote:u(Se),characterEscape:O,characterReference:O,codeFenced:u(Le),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:u(Le,c),codeText:u(be,c),codeTextData:O,data:O,codeFlowValue:O,definition:u(xe),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:u(he),hardBreakEscape:u(Ce),hardBreakTrailing:u(Ce),htmlFlow:u(Ne,c),htmlFlowData:O,htmlText:u(Ne,c),htmlTextData:O,image:u(pt),label:c,link:u(bt),listItem:u(Yt),listItemValue:v,listOrdered:u(mt,g),listUnordered:u(mt),paragraph:u(yt),reference:T,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:u(ve),strong:u(Bt),thematicBreak:u(rr)},exit:{atxHeading:h(),atxHeadingSequence:$,autolink:h(),autolinkEmail:ye,autolinkProtocol:me,blockQuote:h(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:W,characterReferenceMarkerNumeric:W,characterReferenceValue:ie,characterReference:de,codeFenced:h(A),codeFencedFence:S,codeFencedFenceInfo:x,codeFencedFenceMeta:w,codeFlowValue:L,codeIndented:h(C),codeText:h(G),codeTextData:L,data:L,definition:h(),definitionDestinationString:z,definitionLabelString:E,definitionTitleString:R,emphasis:h(),hardBreakEscape:h(q),hardBreakTrailing:h(q),htmlFlow:h(K),htmlFlowData:L,htmlText:h(U),htmlTextData:L,image:h(X),label:ne,labelText:Y,lineEnding:I,link:h(H),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:J,resourceDestinationString:M,resourceTitleString:j,resource:B,setextHeading:h(P),setextHeadingLineSequence:F,setextHeadingText:_,strong:h(),thematicBreak:h()}};W0(n,(e||{}).mdastExtensions||[]);const i={};return l;function l(ae){let ge={type:"root",children:[]};const Re={stack:[ge],tokenStack:[],config:n,enter:f,exit:p,buffer:c,resume:b,data:i},Ie=[];let $e=-1;for(;++$e<ae.length;)if(ae[$e][1].type==="listOrdered"||ae[$e][1].type==="listUnordered")if(ae[$e][0]==="enter")Ie.push($e);else{const Xt=Ie.pop();$e=o(ae,Xt,$e)}for($e=-1;++$e<ae.length;){const Xt=n[ae[$e][0]];Q0.call(Xt,ae[$e][1].type)&&Xt[ae[$e][1].type].call(Object.assign({sliceSerialize:ae[$e][2].sliceSerialize},Re),ae[$e][1])}if(Re.tokenStack.length>0){const Xt=Re.tokenStack[Re.tokenStack.length-1];(Xt[1]||xx).call(Re,void 0,Xt[0])}for(ge.position={start:ni(ae.length>0?ae[0][1].start:{line:1,column:1,offset:0}),end:ni(ae.length>0?ae[ae.length-2][1].end:{line:1,column:1,offset:0})},$e=-1;++$e<n.transforms.length;)ge=n.transforms[$e](ge)||ge;return ge}function o(ae,ge,Re){let Ie=ge-1,$e=-1,Xt=!1,Cn,Mt,gt,_t;for(;++Ie<=Re;){const We=ae[Ie];switch(We[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{We[0]==="enter"?$e++:$e--,_t=void 0;break}case"lineEndingBlank":{We[0]==="enter"&&(Cn&&!_t&&!$e&&!gt&&(gt=Ie),_t=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:_t=void 0}if(!$e&&We[0]==="enter"&&We[1].type==="listItemPrefix"||$e===-1&&We[0]==="exit"&&(We[1].type==="listUnordered"||We[1].type==="listOrdered")){if(Cn){let Vn=Ie;for(Mt=void 0;Vn--;){const Jt=ae[Vn];if(Jt[1].type==="lineEnding"||Jt[1].type==="lineEndingBlank"){if(Jt[0]==="exit")continue;Mt&&(ae[Mt][1].type="lineEndingBlank",Xt=!0),Jt[1].type="lineEnding",Mt=Vn}else if(!(Jt[1].type==="linePrefix"||Jt[1].type==="blockQuotePrefix"||Jt[1].type==="blockQuotePrefixWhitespace"||Jt[1].type==="blockQuoteMarker"||Jt[1].type==="listItemIndent"))break}gt&&(!Mt||gt<Mt)&&(Cn._spread=!0),Cn.end=Object.assign({},Mt?ae[Mt][1].start:We[1].end),ae.splice(Mt||Ie,0,["exit",Cn,We[2]]),Ie++,Re++}if(We[1].type==="listItemPrefix"){const Vn={type:"listItem",_spread:!1,start:Object.assign({},We[1].start),end:void 0};Cn=Vn,ae.splice(Ie,0,["enter",Vn,We[2]]),Ie++,Re++,gt=void 0,_t=!0}}}return ae[ge][1]._spread=Xt,Re}function u(ae,ge){return Re;function Re(Ie){f.call(this,ae(Ie),Ie),ge&&ge.call(this,Ie)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(ae,ge,Re){this.stack[this.stack.length-1].children.push(ae),this.stack.push(ae),this.tokenStack.push([ge,Re||void 0]),ae.position={start:ni(ge.start),end:void 0}}function h(ae){return ge;function ge(Re){ae&&ae.call(this,Re),p.call(this,Re)}}function p(ae,ge){const Re=this.stack.pop(),Ie=this.tokenStack.pop();if(Ie)Ie[0].type!==ae.type&&(ge?ge.call(this,ae,Ie[0]):(Ie[1]||xx).call(this,ae,Ie[0]));else throw new Error("Cannot close `"+ae.type+"` ("+Xa({start:ae.start,end:ae.end})+"): it’s not open");Re.position.end=ni(ae.end)}function b(){return Xh(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function v(ae){if(this.data.expectingFirstListItemValue){const ge=this.stack[this.stack.length-2];ge.start=Number.parseInt(this.sliceSerialize(ae),10),this.data.expectingFirstListItemValue=void 0}}function x(){const ae=this.resume(),ge=this.stack[this.stack.length-1];ge.lang=ae}function w(){const ae=this.resume(),ge=this.stack[this.stack.length-1];ge.meta=ae}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const ae=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ae.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const ae=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ae.replace(/(\r?\n|\r)$/g,"")}function E(ae){const ge=this.resume(),Re=this.stack[this.stack.length-1];Re.label=ge,Re.identifier=Pn(this.sliceSerialize(ae)).toLowerCase()}function R(){const ae=this.resume(),ge=this.stack[this.stack.length-1];ge.title=ae}function z(){const ae=this.resume(),ge=this.stack[this.stack.length-1];ge.url=ae}function $(ae){const ge=this.stack[this.stack.length-1];if(!ge.depth){const Re=this.sliceSerialize(ae).length;ge.depth=Re}}function _(){this.data.setextHeadingSlurpLineEnding=!0}function F(ae){const ge=this.stack[this.stack.length-1];ge.depth=this.sliceSerialize(ae).codePointAt(0)===61?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function O(ae){const Re=this.stack[this.stack.length-1].children;let Ie=Re[Re.length-1];(!Ie||Ie.type!=="text")&&(Ie=at(),Ie.position={start:ni(ae.start),end:void 0},Re.push(Ie)),this.stack.push(Ie)}function L(ae){const ge=this.stack.pop();ge.value+=this.sliceSerialize(ae),ge.position.end=ni(ae.end)}function I(ae){const ge=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Re=ge.children[ge.children.length-1];Re.position.end=ni(ae.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(ge.type)&&(O.call(this,ae),L.call(this,ae))}function q(){this.data.atHardBreak=!0}function K(){const ae=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ae}function U(){const ae=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ae}function G(){const ae=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ae}function H(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=ge,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function X(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=ge,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function Y(ae){const ge=this.sliceSerialize(ae),Re=this.stack[this.stack.length-2];Re.label=vT(ge),Re.identifier=Pn(ge).toLowerCase()}function ne(){const ae=this.stack[this.stack.length-1],ge=this.resume(),Re=this.stack[this.stack.length-1];if(this.data.inReference=!0,Re.type==="link"){const Ie=ae.children;Re.children=Ie}else Re.alt=ge}function M(){const ae=this.resume(),ge=this.stack[this.stack.length-1];ge.url=ae}function j(){const ae=this.resume(),ge=this.stack[this.stack.length-1];ge.title=ae}function B(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function J(ae){const ge=this.resume(),Re=this.stack[this.stack.length-1];Re.label=ge,Re.identifier=Pn(this.sliceSerialize(ae)).toLowerCase(),this.data.referenceType="full"}function W(ae){this.data.characterReferenceType=ae.type}function ie(ae){const ge=this.sliceSerialize(ae),Re=this.data.characterReferenceType;let Ie;Re?(Ie=H0(ge,Re==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ie=Zh(ge);const $e=this.stack[this.stack.length-1];$e.value+=Ie}function de(ae){const ge=this.stack.pop();ge.position.end=ni(ae.end)}function me(ae){L.call(this,ae);const ge=this.stack[this.stack.length-1];ge.url=this.sliceSerialize(ae)}function ye(ae){L.call(this,ae);const ge=this.stack[this.stack.length-1];ge.url="mailto:"+this.sliceSerialize(ae)}function Se(){return{type:"blockquote",children:[]}}function Le(){return{type:"code",lang:null,meta:null,value:""}}function be(){return{type:"inlineCode",value:""}}function xe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function he(){return{type:"emphasis",children:[]}}function ve(){return{type:"heading",depth:0,children:[]}}function Ce(){return{type:"break"}}function Ne(){return{type:"html",value:""}}function pt(){return{type:"image",title:null,url:"",alt:null}}function bt(){return{type:"link",title:null,url:"",children:[]}}function mt(ae){return{type:"list",ordered:ae.type==="listOrdered",start:null,spread:ae._spread,children:[]}}function Yt(ae){return{type:"listItem",spread:ae._spread,checked:null,children:[]}}function yt(){return{type:"paragraph",children:[]}}function Bt(){return{type:"strong",children:[]}}function at(){return{type:"text",value:""}}function rr(){return{type:"thematicBreak"}}}function ni(e){return{line:e.line,column:e.column,offset:e.offset}}function W0(e,n){let i=-1;for(;++i<n.length;){const l=n[i];Array.isArray(l)?W0(e,l):ET(e,l)}}function ET(e,n){let i;for(i in n)if(Q0.call(n,i))switch(i){case"canContainEols":{const l=n[i];l&&e[i].push(...l);break}case"transforms":{const l=n[i];l&&e[i].push(...l);break}case"enter":case"exit":{const l=n[i];l&&Object.assign(e[i],l);break}}}function xx(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Xa({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Xa({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Xa({start:n.start,end:n.end})+") is still open")}function CT(e){const n=this;n.parser=i;function i(l){return ST(l,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function AT(e,n){const i={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,i),e.applyData(n,i)}function NT(e,n){const i={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,i),[e.applyData(n,i),{type:"text",value:`
|
|
37
|
-
`}]}function TT(e,n){const i=n.value?n.value+`
|
|
38
|
-
`:"",l={},o=n.lang?n.lang.split(/\s+/):[];o.length>0&&(l.className=["language-"+o[0]]);let u={type:"element",tagName:"code",properties:l,children:[{type:"text",value:i}]};return n.meta&&(u.data={meta:n.meta}),e.patch(n,u),u=e.applyData(n,u),u={type:"element",tagName:"pre",properties:{},children:[u]},e.patch(n,u),u}function RT(e,n){const i={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function jT(e,n){const i={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function _T(e,n){const i=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",l=String(n.identifier).toUpperCase(),o=Vl(l.toLowerCase()),u=e.footnoteOrder.indexOf(l);let c,f=e.footnoteCounts.get(l);f===void 0?(f=0,e.footnoteOrder.push(l),c=e.footnoteOrder.length):c=u+1,f+=1,e.footnoteCounts.set(l,f);const h={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+o,id:i+"fnref-"+o+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(n,h);const p={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(n,p),e.applyData(n,p)}function LT(e,n){const i={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function DT(e,n){if(e.options.allowDangerousHtml){const i={type:"raw",value:n.value};return e.patch(n,i),e.applyData(n,i)}}function J0(e,n){const i=n.referenceType;let l="]";if(i==="collapsed"?l+="[]":i==="full"&&(l+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+l}];const o=e.all(n),u=o[0];u&&u.type==="text"?u.value="["+u.value:o.unshift({type:"text",value:"["});const c=o[o.length-1];return c&&c.type==="text"?c.value+=l:o.push({type:"text",value:l}),o}function MT(e,n){const i=String(n.identifier).toUpperCase(),l=e.definitionById.get(i);if(!l)return J0(e,n);const o={src:Vl(l.url||""),alt:n.alt};l.title!==null&&l.title!==void 0&&(o.title=l.title);const u={type:"element",tagName:"img",properties:o,children:[]};return e.patch(n,u),e.applyData(n,u)}function OT(e,n){const i={src:Vl(n.url)};n.alt!==null&&n.alt!==void 0&&(i.alt=n.alt),n.title!==null&&n.title!==void 0&&(i.title=n.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,l),e.applyData(n,l)}function zT(e,n){const i={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,i);const l={type:"element",tagName:"code",properties:{},children:[i]};return e.patch(n,l),e.applyData(n,l)}function IT(e,n){const i=String(n.identifier).toUpperCase(),l=e.definitionById.get(i);if(!l)return J0(e,n);const o={href:Vl(l.url||"")};l.title!==null&&l.title!==void 0&&(o.title=l.title);const u={type:"element",tagName:"a",properties:o,children:e.all(n)};return e.patch(n,u),e.applyData(n,u)}function FT(e,n){const i={href:Vl(n.url)};n.title!==null&&n.title!==void 0&&(i.title=n.title);const l={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function BT(e,n,i){const l=e.all(n),o=i?UT(i):ev(n),u={},c=[];if(typeof n.checked=="boolean"){const b=l[0];let g;b&&b.type==="element"&&b.tagName==="p"?g=b:(g={type:"element",tagName:"p",properties:{},children:[]},l.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let f=-1;for(;++f<l.length;){const b=l[f];(o||f!==0||b.type!=="element"||b.tagName!=="p")&&c.push({type:"text",value:`
|
|
39
|
-
`}),b.type==="element"&&b.tagName==="p"&&!o?c.push(...b.children):c.push(b)}const h=l[l.length-1];h&&(o||h.type!=="element"||h.tagName!=="p")&&c.push({type:"text",value:`
|
|
40
|
-
`});const p={type:"element",tagName:"li",properties:u,children:c};return e.patch(n,p),e.applyData(n,p)}function UT(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const i=e.children;let l=-1;for(;!n&&++l<i.length;)n=ev(i[l])}return n}function ev(e){const n=e.spread;return n??e.children.length>1}function HT(e,n){const i={},l=e.all(n);let o=-1;for(typeof n.start=="number"&&n.start!==1&&(i.start=n.start);++o<l.length;){const c=l[o];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const u={type:"element",tagName:n.ordered?"ol":"ul",properties:i,children:e.wrap(l,!0)};return e.patch(n,u),e.applyData(n,u)}function $T(e,n){const i={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function qT(e,n){const i={type:"root",children:e.wrap(e.all(n))};return e.patch(n,i),e.applyData(n,i)}function PT(e,n){const i={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function VT(e,n){const i=e.all(n),l=i.shift(),o=[];if(l){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([l],!0)};e.patch(n.children[0],c),o.push(c)}if(i.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(i,!0)},f=Ph(n.children[1]),h=D0(n.children[n.children.length-1]);f&&h&&(c.position={start:f,end:h}),o.push(c)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(n,u),e.applyData(n,u)}function GT(e,n,i){const l=i?i.children:void 0,u=(l?l.indexOf(n):1)===0?"th":"td",c=i&&i.type==="table"?i.align:void 0,f=c?c.length:n.children.length;let h=-1;const p=[];for(;++h<f;){const g=n.children[h],v={},x=c?c[h]:void 0;x&&(v.align=x);let w={type:"element",tagName:u,properties:v,children:[]};g&&(w.children=e.all(g),e.patch(g,w),w=e.applyData(g,w)),p.push(w)}const b={type:"element",tagName:"tr",properties:{},children:e.wrap(p,!0)};return e.patch(n,b),e.applyData(n,b)}function YT(e,n){const i={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}const vx=9,wx=32;function XT(e){const n=String(e),i=/\r?\n|\r/g;let l=i.exec(n),o=0;const u=[];for(;l;)u.push(Sx(n.slice(o,l.index),o>0,!0),l[0]),o=l.index+l[0].length,l=i.exec(n);return u.push(Sx(n.slice(o),o>0,!1)),u.join("")}function Sx(e,n,i){let l=0,o=e.length;if(n){let u=e.codePointAt(l);for(;u===vx||u===wx;)l++,u=e.codePointAt(l)}if(i){let u=e.codePointAt(o-1);for(;u===vx||u===wx;)o--,u=e.codePointAt(o-1)}return o>l?e.slice(l,o):""}function ZT(e,n){const i={type:"text",value:XT(String(n.value))};return e.patch(n,i),e.applyData(n,i)}function KT(e,n){const i={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,i),e.applyData(n,i)}const QT={blockquote:AT,break:NT,code:TT,delete:RT,emphasis:jT,footnoteReference:_T,heading:LT,html:DT,imageReference:MT,image:OT,inlineCode:zT,linkReference:IT,link:FT,listItem:BT,list:HT,paragraph:$T,root:qT,strong:PT,table:VT,tableCell:YT,tableRow:GT,text:ZT,thematicBreak:KT,toml:Ds,yaml:Ds,definition:Ds,footnoteDefinition:Ds};function Ds(){}const tv=-1,Bu=0,Ka=1,du=2,Qh=3,Wh=4,Jh=5,ep=6,nv=7,rv=8,kx=typeof self=="object"?self:globalThis,WT=(e,n)=>{const i=(o,u)=>(e.set(u,o),o),l=o=>{if(e.has(o))return e.get(o);const[u,c]=n[o];switch(u){case Bu:case tv:return i(c,o);case Ka:{const f=i([],o);for(const h of c)f.push(l(h));return f}case du:{const f=i({},o);for(const[h,p]of c)f[l(h)]=l(p);return f}case Qh:return i(new Date(c),o);case Wh:{const{source:f,flags:h}=c;return i(new RegExp(f,h),o)}case Jh:{const f=i(new Map,o);for(const[h,p]of c)f.set(l(h),l(p));return f}case ep:{const f=i(new Set,o);for(const h of c)f.add(l(h));return f}case nv:{const{name:f,message:h}=c;return i(new kx[f](h),o)}case rv:return i(BigInt(c),o);case"BigInt":return i(Object(BigInt(c)),o);case"ArrayBuffer":return i(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return i(new DataView(f),c)}}return i(new kx[u](c),o)};return l},Ex=e=>WT(new Map,e)(0),Ll="",{toString:JT}={},{keys:e6}=Object,$a=e=>{const n=typeof e;if(n!=="object"||!e)return[Bu,n];const i=JT.call(e).slice(8,-1);switch(i){case"Array":return[Ka,Ll];case"Object":return[du,Ll];case"Date":return[Qh,Ll];case"RegExp":return[Wh,Ll];case"Map":return[Jh,Ll];case"Set":return[ep,Ll];case"DataView":return[Ka,i]}return i.includes("Array")?[Ka,i]:i.includes("Error")?[nv,i]:[du,i]},Ms=([e,n])=>e===Bu&&(n==="function"||n==="symbol"),t6=(e,n,i,l)=>{const o=(c,f)=>{const h=l.push(c)-1;return i.set(f,h),h},u=c=>{if(i.has(c))return i.get(c);let[f,h]=$a(c);switch(f){case Bu:{let b=c;switch(h){case"bigint":f=rv,b=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);b=null;break;case"undefined":return o([tv],c)}return o([f,b],c)}case Ka:{if(h){let v=c;return h==="DataView"?v=new Uint8Array(c.buffer):h==="ArrayBuffer"&&(v=new Uint8Array(c)),o([h,[...v]],c)}const b=[],g=o([f,b],c);for(const v of c)b.push(u(v));return g}case du:{if(h)switch(h){case"BigInt":return o([h,c.toString()],c);case"Boolean":case"Number":case"String":return o([h,c.valueOf()],c)}if(n&&"toJSON"in c)return u(c.toJSON());const b=[],g=o([f,b],c);for(const v of e6(c))(e||!Ms($a(c[v])))&&b.push([u(v),u(c[v])]);return g}case Qh:return o([f,c.toISOString()],c);case Wh:{const{source:b,flags:g}=c;return o([f,{source:b,flags:g}],c)}case Jh:{const b=[],g=o([f,b],c);for(const[v,x]of c)(e||!(Ms($a(v))||Ms($a(x))))&&b.push([u(v),u(x)]);return g}case ep:{const b=[],g=o([f,b],c);for(const v of c)(e||!Ms($a(v)))&&b.push(u(v));return g}}const{message:p}=c;return o([f,{name:h,message:p}],c)};return u},Cx=(e,{json:n,lossy:i}={})=>{const l=[];return t6(!(n||i),!!n,new Map,l)(e),l},hu=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?Ex(Cx(e,n)):structuredClone(e):(e,n)=>Ex(Cx(e,n));function n6(e,n){const i=[{type:"text",value:"↩"}];return n>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),i}function r6(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function i6(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=e.options.footnoteBackContent||n6,l=e.options.footnoteBackLabel||r6,o=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let h=-1;for(;++h<e.footnoteOrder.length;){const p=e.footnoteById.get(e.footnoteOrder[h]);if(!p)continue;const b=e.all(p),g=String(p.identifier).toUpperCase(),v=Vl(g.toLowerCase());let x=0;const w=[],S=e.footnoteCounts.get(g);for(;S!==void 0&&++x<=S;){w.length>0&&w.push({type:"text",value:" "});let E=typeof i=="string"?i:i(h,x);typeof E=="string"&&(E={type:"text",value:E}),w.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+v+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof l=="string"?l:l(h,x),className:["data-footnote-backref"]},children:Array.isArray(E)?E:[E]})}const A=b[b.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const E=A.children[A.children.length-1];E&&E.type==="text"?E.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(...w)}else b.push(...w);const C={type:"element",tagName:"li",properties:{id:n+"fn-"+v},children:e.wrap(b,!0)};e.patch(p,C),f.push(C)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...hu(c),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
41
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
42
|
-
`}]}}const Uu=(function(e){if(e==null)return s6;if(typeof e=="function")return Hu(e);if(typeof e=="object")return Array.isArray(e)?l6(e):a6(e);if(typeof e=="string")return o6(e);throw new Error("Expected function, string, or object as test")});function l6(e){const n=[];let i=-1;for(;++i<e.length;)n[i]=Uu(e[i]);return Hu(l);function l(...o){let u=-1;for(;++u<n.length;)if(n[u].apply(this,o))return!0;return!1}}function a6(e){const n=e;return Hu(i);function i(l){const o=l;let u;for(u in e)if(o[u]!==n[u])return!1;return!0}}function o6(e){return Hu(n);function n(i){return i&&i.type===e}}function Hu(e){return n;function n(i,l,o){return!!(u6(i)&&e.call(this,i,typeof l=="number"?l:void 0,o||void 0))}}function s6(){return!0}function u6(e){return e!==null&&typeof e=="object"&&"type"in e}const iv=[],c6=!0,sh=!1,f6="skip";function lv(e,n,i,l){let o;typeof n=="function"&&typeof i!="function"?(l=i,i=n):o=n;const u=Uu(o),c=l?-1:1;f(e,void 0,[])();function f(h,p,b){const g=h&&typeof h=="object"?h:{};if(typeof g.type=="string"){const x=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(h.type+(x?"<"+x+">":""))+")"})}return v;function v(){let x=iv,w,S,A;if((!n||u(h,p,b[b.length-1]||void 0))&&(x=d6(i(h,b)),x[0]===sh))return x;if("children"in h&&h.children){const C=h;if(C.children&&x[0]!==f6)for(S=(l?C.children.length:-1)+c,A=b.concat(C);S>-1&&S<C.children.length;){const E=C.children[S];if(w=f(E,S,A)(),w[0]===sh)return w;S=typeof w[1]=="number"?w[1]:S+c}}return x}}}function d6(e){return Array.isArray(e)?e:typeof e=="number"?[c6,e]:e==null?iv:[e]}function tp(e,n,i,l){let o,u,c;typeof n=="function"&&typeof i!="function"?(u=void 0,c=n,o=i):(u=n,c=i,o=l),lv(e,u,f,o);function f(h,p){const b=p[p.length-1],g=b?b.children.indexOf(h):void 0;return c(h,g,b)}}const uh={}.hasOwnProperty,h6={};function p6(e,n){const i=n||h6,l=new Map,o=new Map,u=new Map,c={...QT,...i.handlers},f={all:p,applyData:g6,definitionById:l,footnoteById:o,footnoteCounts:u,footnoteOrder:[],handlers:c,one:h,options:i,patch:m6,wrap:y6};return tp(e,function(b){if(b.type==="definition"||b.type==="footnoteDefinition"){const g=b.type==="definition"?l:o,v=String(b.identifier).toUpperCase();g.has(v)||g.set(v,b)}}),f;function h(b,g){const v=b.type,x=f.handlers[v];if(uh.call(f.handlers,v)&&x)return x(f,b,g);if(f.options.passThrough&&f.options.passThrough.includes(v)){if("children"in b){const{children:S,...A}=b,C=hu(A);return C.children=f.all(b),C}return hu(b)}return(f.options.unknownHandler||b6)(f,b,g)}function p(b){const g=[];if("children"in b){const v=b.children;let x=-1;for(;++x<v.length;){const w=f.one(v[x],b);if(w){if(x&&v[x-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=Ax(w.value)),!Array.isArray(w)&&w.type==="element")){const S=w.children[0];S&&S.type==="text"&&(S.value=Ax(S.value))}Array.isArray(w)?g.push(...w):g.push(w)}}}return g}}function m6(e,n){e.position&&(n.position=r4(e))}function g6(e,n){let i=n;if(e&&e.data){const l=e.data.hName,o=e.data.hChildren,u=e.data.hProperties;if(typeof l=="string")if(i.type==="element")i.tagName=l;else{const c="children"in i?i.children:[i];i={type:"element",tagName:l,properties:{},children:c}}i.type==="element"&&u&&Object.assign(i.properties,hu(u)),"children"in i&&i.children&&o!==null&&o!==void 0&&(i.children=o)}return i}function b6(e,n){const i=n.data||{},l="value"in n&&!(uh.call(i,"hProperties")||uh.call(i,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function y6(e,n){const i=[];let l=-1;for(n&&i.push({type:"text",value:`
|
|
43
|
-
`});++l<e.length;)l&&i.push({type:"text",value:`
|
|
44
|
-
`}),i.push(e[l]);return n&&e.length>0&&i.push({type:"text",value:`
|
|
45
|
-
`}),i}function Ax(e){let n=0,i=e.charCodeAt(n);for(;i===9||i===32;)n++,i=e.charCodeAt(n);return e.slice(n)}function Nx(e,n){const i=p6(e,n),l=i.one(e,void 0),o=i6(i),u=Array.isArray(l)?{type:"root",children:l}:l||{type:"root",children:[]};return o&&u.children.push({type:"text",value:`
|
|
46
|
-
`},o),u}function x6(e,n){return e&&"run"in e?async function(i,l){const o=Nx(i,{file:l,...n});await e.run(o,l)}:function(i,l){return Nx(i,{file:l,...e||n})}}function Tx(e){if(e)throw e}var kd,Rx;function v6(){if(Rx)return kd;Rx=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,i=Object.defineProperty,l=Object.getOwnPropertyDescriptor,o=function(p){return typeof Array.isArray=="function"?Array.isArray(p):n.call(p)==="[object Array]"},u=function(p){if(!p||n.call(p)!=="[object Object]")return!1;var b=e.call(p,"constructor"),g=p.constructor&&p.constructor.prototype&&e.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!b&&!g)return!1;var v;for(v in p);return typeof v>"u"||e.call(p,v)},c=function(p,b){i&&b.name==="__proto__"?i(p,b.name,{enumerable:!0,configurable:!0,value:b.newValue,writable:!0}):p[b.name]=b.newValue},f=function(p,b){if(b==="__proto__")if(e.call(p,b)){if(l)return l(p,b).value}else return;return p[b]};return kd=function h(){var p,b,g,v,x,w,S=arguments[0],A=1,C=arguments.length,E=!1;for(typeof S=="boolean"&&(E=S,S=arguments[1]||{},A=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});A<C;++A)if(p=arguments[A],p!=null)for(b in p)g=f(S,b),v=f(p,b),S!==v&&(E&&v&&(u(v)||(x=o(v)))?(x?(x=!1,w=g&&o(g)?g:[]):w=g&&u(g)?g:{},c(S,{name:b,newValue:h(E,w,v)})):typeof v<"u"&&c(S,{name:b,newValue:v}));return S},kd}var w6=v6();const Ed=Su(w6);function ch(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function S6(){const e=[],n={run:i,use:l};return n;function i(...o){let u=-1;const c=o.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...o);function f(h,...p){const b=e[++u];let g=-1;if(h){c(h);return}for(;++g<o.length;)(p[g]===null||p[g]===void 0)&&(p[g]=o[g]);o=p,b?k6(b,f)(...p):c(null,...p)}}function l(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),n}}function k6(e,n){let i;return l;function l(...c){const f=e.length>c.length;let h;f&&c.push(o);try{h=e.apply(this,c)}catch(p){const b=p;if(f&&i)throw b;return o(b)}f||(h&&h.then&&typeof h.then=="function"?h.then(u,o):h instanceof Error?o(h):u(h))}function o(c,...f){i||(i=!0,n(c,...f))}function u(c){o(null,c)}}const Wn={basename:E6,dirname:C6,extname:A6,join:N6,sep:"/"};function E6(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');fo(e);let i=0,l=-1,o=e.length,u;if(n===void 0||n.length===0||n.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(u){i=o+1;break}}else l<0&&(u=!0,l=o+1);return l<0?"":e.slice(i,l)}if(n===e)return"";let c=-1,f=n.length-1;for(;o--;)if(e.codePointAt(o)===47){if(u){i=o+1;break}}else c<0&&(u=!0,c=o+1),f>-1&&(e.codePointAt(o)===n.codePointAt(f--)?f<0&&(l=o):(f=-1,l=c));return i===l?l=c:l<0&&(l=e.length),e.slice(i,l)}function C6(e){if(fo(e),e.length===0)return".";let n=-1,i=e.length,l;for(;--i;)if(e.codePointAt(i)===47){if(l){n=i;break}}else l||(l=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function A6(e){fo(e);let n=e.length,i=-1,l=0,o=-1,u=0,c;for(;n--;){const f=e.codePointAt(n);if(f===47){if(c){l=n+1;break}continue}i<0&&(c=!0,i=n+1),f===46?o<0?o=n:u!==1&&(u=1):o>-1&&(u=-1)}return o<0||i<0||u===0||u===1&&o===i-1&&o===l+1?"":e.slice(o,i)}function N6(...e){let n=-1,i;for(;++n<e.length;)fo(e[n]),e[n]&&(i=i===void 0?e[n]:i+"/"+e[n]);return i===void 0?".":T6(i)}function T6(e){fo(e);const n=e.codePointAt(0)===47;let i=R6(e,!n);return i.length===0&&!n&&(i="."),i.length>0&&e.codePointAt(e.length-1)===47&&(i+="/"),n?"/"+i:i}function R6(e,n){let i="",l=0,o=-1,u=0,c=-1,f,h;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(o===c-1||u===1))if(o!==c-1&&u===2){if(i.length<2||l!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(h=i.lastIndexOf("/"),h!==i.length-1){h<0?(i="",l=0):(i=i.slice(0,h),l=i.length-1-i.lastIndexOf("/")),o=c,u=0;continue}}else if(i.length>0){i="",l=0,o=c,u=0;continue}}n&&(i=i.length>0?i+"/..":"..",l=2)}else i.length>0?i+="/"+e.slice(o+1,c):i=e.slice(o+1,c),l=c-o-1;o=c,u=0}else f===46&&u>-1?u++:u=-1}return i}function fo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const j6={cwd:_6};function _6(){return"/"}function fh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function L6(e){if(typeof e=="string")e=new URL(e);else if(!fh(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return D6(e)}function D6(e){if(e.hostname!==""){const l=new TypeError('File URL host must be "localhost" or empty on darwin');throw l.code="ERR_INVALID_FILE_URL_HOST",l}const n=e.pathname;let i=-1;for(;++i<n.length;)if(n.codePointAt(i)===37&&n.codePointAt(i+1)===50){const l=n.codePointAt(i+2);if(l===70||l===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(n)}const Cd=["history","path","basename","stem","extname","dirname"];class av{constructor(n){let i;n?fh(n)?i={path:n}:typeof n=="string"||M6(n)?i={value:n}:i=n:i={},this.cwd="cwd"in i?"":j6.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let l=-1;for(;++l<Cd.length;){const u=Cd[l];u in i&&i[u]!==void 0&&i[u]!==null&&(this[u]=u==="history"?[...i[u]]:i[u])}let o;for(o in i)Cd.includes(o)||(this[o]=i[o])}get basename(){return typeof this.path=="string"?Wn.basename(this.path):void 0}set basename(n){Nd(n,"basename"),Ad(n,"basename"),this.path=Wn.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?Wn.dirname(this.path):void 0}set dirname(n){jx(this.basename,"dirname"),this.path=Wn.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?Wn.extname(this.path):void 0}set extname(n){if(Ad(n,"extname"),jx(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Wn.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){fh(n)&&(n=L6(n)),Nd(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?Wn.basename(this.path,this.extname):void 0}set stem(n){Nd(n,"stem"),Ad(n,"stem"),this.path=Wn.join(this.dirname||"",n+(this.extname||""))}fail(n,i,l){const o=this.message(n,i,l);throw o.fatal=!0,o}info(n,i,l){const o=this.message(n,i,l);return o.fatal=void 0,o}message(n,i,l){const o=new Gt(n,i,l);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function Ad(e,n){if(e&&e.includes(Wn.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+Wn.sep+"`")}function Nd(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function jx(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function M6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const O6=(function(e){const l=this.constructor.prototype,o=l[e],u=function(){return o.apply(u,arguments)};return Object.setPrototypeOf(u,l),u}),z6={}.hasOwnProperty;class np extends O6{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=S6()}copy(){const n=new np;let i=-1;for(;++i<this.attachers.length;){const l=this.attachers[i];n.use(...l)}return n.data(Ed(!0,{},this.namespace)),n}data(n,i){return typeof n=="string"?arguments.length===2?(jd("data",this.frozen),this.namespace[n]=i,this):z6.call(this.namespace,n)&&this.namespace[n]||void 0:n?(jd("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...l]=this.attachers[this.freezeIndex];if(l[0]===!1)continue;l[0]===!0&&(l[0]=void 0);const o=i.call(n,...l);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const i=Os(n),l=this.parser||this.Parser;return Td("parse",l),l(String(i),i)}process(n,i){const l=this;return this.freeze(),Td("process",this.parser||this.Parser),Rd("process",this.compiler||this.Compiler),i?o(void 0,i):new Promise(o);function o(u,c){const f=Os(n),h=l.parse(f);l.run(h,f,function(b,g,v){if(b||!g||!v)return p(b);const x=g,w=l.stringify(x,v);B6(w)?v.value=w:v.result=w,p(b,v)});function p(b,g){b||!g?c(b):u?u(g):i(void 0,g)}}}processSync(n){let i=!1,l;return this.freeze(),Td("processSync",this.parser||this.Parser),Rd("processSync",this.compiler||this.Compiler),this.process(n,o),Lx("processSync","process",i),l;function o(u,c){i=!0,Tx(u),l=c}}run(n,i,l){_x(n),this.freeze();const o=this.transformers;return!l&&typeof i=="function"&&(l=i,i=void 0),l?u(void 0,l):new Promise(u);function u(c,f){const h=Os(i);o.run(n,h,p);function p(b,g,v){const x=g||n;b?f(b):c?c(x):l(void 0,x,v)}}}runSync(n,i){let l=!1,o;return this.run(n,i,u),Lx("runSync","run",l),o;function u(c,f){Tx(c),o=f,l=!0}}stringify(n,i){this.freeze();const l=Os(i),o=this.compiler||this.Compiler;return Rd("stringify",o),_x(n),o(n,l)}use(n,...i){const l=this.attachers,o=this.namespace;if(jd("use",this.frozen),n!=null)if(typeof n=="function")h(n,i);else if(typeof n=="object")Array.isArray(n)?f(n):c(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function u(p){if(typeof p=="function")h(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[b,...g]=p;h(b,g)}else c(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function c(p){if(!("plugins"in p)&&!("settings"in p))throw new 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");f(p.plugins),p.settings&&(o.settings=Ed(!0,o.settings,p.settings))}function f(p){let b=-1;if(p!=null)if(Array.isArray(p))for(;++b<p.length;){const g=p[b];u(g)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function h(p,b){let g=-1,v=-1;for(;++g<l.length;)if(l[g][0]===p){v=g;break}if(v===-1)l.push([p,...b]);else if(b.length>0){let[x,...w]=b;const S=l[v][1];ch(S)&&ch(x)&&(x=Ed(!0,S,x)),l[v]=[p,x,...w]}}}}const I6=new np().freeze();function Td(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Rd(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function jd(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function _x(e){if(!ch(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Lx(e,n,i){if(!i)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Os(e){return F6(e)?e:new av(e)}function F6(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function B6(e){return typeof e=="string"||U6(e)}function U6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const H6="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Dx=[],Mx={allowDangerousHtml:!0},$6=/^(https?|ircs?|mailto|xmpp)$/i,q6=[{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 rp(e){const n=P6(e),i=V6(e);return G6(n.runSync(n.parse(i),i),e)}function P6(e){const n=e.rehypePlugins||Dx,i=e.remarkPlugins||Dx,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Mx}:Mx;return I6().use(CT).use(i).use(x6,l).use(n)}function V6(e){const n=e.children||"",i=new av;return typeof n=="string"&&(i.value=n),i}function G6(e,n){const i=n.allowedElements,l=n.allowElement,o=n.components,u=n.disallowedElements,c=n.skipHtml,f=n.unwrapDisallowed,h=n.urlTransform||Y6;for(const b of q6)Object.hasOwn(n,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+H6+b.id,void 0);return tp(e,p),s4(e,{Fragment:y.Fragment,components:o,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function p(b,g,v){if(b.type==="raw"&&v&&typeof g=="number")return c?v.children.splice(g,1):v.children[g]={type:"text",value:b.value},g;if(b.type==="element"){let x;for(x in vd)if(Object.hasOwn(vd,x)&&Object.hasOwn(b.properties,x)){const w=b.properties[x],S=vd[x];(S===null||S.includes(b.tagName))&&(b.properties[x]=h(String(w||""),x,b))}}if(b.type==="element"){let x=i?!i.includes(b.tagName):u?u.includes(b.tagName):!1;if(!x&&l&&typeof g=="number"&&(x=!l(b,g,v)),x&&v&&typeof g=="number")return f&&b.children?v.children.splice(g,1,...b.children):v.children.splice(g,1),g}}}function Y6(e){const n=e.indexOf(":"),i=e.indexOf("?"),l=e.indexOf("#"),o=e.indexOf("/");return n===-1||o!==-1&&n>o||i!==-1&&n>i||l!==-1&&n>l||$6.test(e.slice(0,n))?e:""}function Ox(e,n){const i=String(e);if(typeof n!="string")throw new TypeError("Expected character");let l=0,o=i.indexOf(n);for(;o!==-1;)l++,o=i.indexOf(n,o+n.length);return l}function X6(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Z6(e,n,i){const o=Uu((i||{}).ignore||[]),u=K6(n);let c=-1;for(;++c<u.length;)lv(e,"text",f);function f(p,b){let g=-1,v;for(;++g<b.length;){const x=b[g],w=v?v.children:void 0;if(o(x,w?w.indexOf(x):void 0,v))return;v=x}if(v)return h(p,b)}function h(p,b){const g=b[b.length-1],v=u[c][0],x=u[c][1];let w=0;const A=g.children.indexOf(p);let C=!1,E=[];v.lastIndex=0;let R=v.exec(p.value);for(;R;){const z=R.index,$={index:R.index,input:R.input,stack:[...b,p]};let _=x(...R,$);if(typeof _=="string"&&(_=_.length>0?{type:"text",value:_}:void 0),_===!1?v.lastIndex=z+1:(w!==z&&E.push({type:"text",value:p.value.slice(w,z)}),Array.isArray(_)?E.push(..._):_&&E.push(_),w=z+R[0].length,C=!0),!v.global)break;R=v.exec(p.value)}return C?(w<p.value.length&&E.push({type:"text",value:p.value.slice(w)}),g.children.splice(A,1,...E)):E=[p],A+E.length}}function K6(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const i=!e[0]||Array.isArray(e[0])?e:[e];let l=-1;for(;++l<i.length;){const o=i[l];n.push([Q6(o[0]),W6(o[1])])}return n}function Q6(e){return typeof e=="string"?new RegExp(X6(e),"g"):e}function W6(e){return typeof e=="function"?e:function(){return e}}const _d="phrasing",Ld=["autolink","link","image","label"];function J6(){return{transforms:[a5],enter:{literalAutolink:t5,literalAutolinkEmail:Dd,literalAutolinkHttp:Dd,literalAutolinkWww:Dd},exit:{literalAutolink:l5,literalAutolinkEmail:i5,literalAutolinkHttp:n5,literalAutolinkWww:r5}}}function e5(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:_d,notInConstruct:Ld},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:_d,notInConstruct:Ld},{character:":",before:"[ps]",after:"\\/",inConstruct:_d,notInConstruct:Ld}]}}function t5(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Dd(e){this.config.enter.autolinkProtocol.call(this,e)}function n5(e){this.config.exit.autolinkProtocol.call(this,e)}function r5(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function i5(e){this.config.exit.autolinkEmail.call(this,e)}function l5(e){this.exit(e)}function a5(e){Z6(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,o5],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),s5]],{ignore:["link","linkReference"]})}function o5(e,n,i,l,o){let u="";if(!ov(o)||(/^w/i.test(n)&&(i=n+i,n="",u="http://"),!u5(i)))return!1;const c=c5(i+l);if(!c[0])return!1;const f={type:"link",title:null,url:u+n+c[0],children:[{type:"text",value:n+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function s5(e,n,i,l){return!ov(l,!0)||/[-\d_]$/.test(i)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+i,children:[{type:"text",value:n+"@"+i}]}}function u5(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function c5(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let i=n[0],l=i.indexOf(")");const o=Ox(e,"(");let u=Ox(e,")");for(;l!==-1&&o>u;)e+=i.slice(0,l+1),i=i.slice(l+1),l=i.indexOf(")"),u++;return[e,i]}function ov(e,n){const i=e.input.charCodeAt(e.index-1);return(e.index===0||Ui(i)||Iu(i))&&(!n||i!==47)}sv.peek=x5;function f5(){this.buffer()}function d5(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function h5(){this.buffer()}function p5(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function m5(e){const n=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=Pn(this.sliceSerialize(e)).toLowerCase(),i.label=n}function g5(e){this.exit(e)}function b5(e){const n=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=Pn(this.sliceSerialize(e)).toLowerCase(),i.label=n}function y5(e){this.exit(e)}function x5(){return"["}function sv(e,n,i,l){const o=i.createTracker(l);let u=o.move("[^");const c=i.enter("footnoteReference"),f=i.enter("reference");return u+=o.move(i.safe(i.associationId(e),{after:"]",before:u})),f(),c(),u+=o.move("]"),u}function v5(){return{enter:{gfmFootnoteCallString:f5,gfmFootnoteCall:d5,gfmFootnoteDefinitionLabelString:h5,gfmFootnoteDefinition:p5},exit:{gfmFootnoteCallString:m5,gfmFootnoteCall:g5,gfmFootnoteDefinitionLabelString:b5,gfmFootnoteDefinition:y5}}}function w5(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:i,footnoteReference:sv},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function i(l,o,u,c){const f=u.createTracker(c);let h=f.move("[^");const p=u.enter("footnoteDefinition"),b=u.enter("label");return h+=f.move(u.safe(u.associationId(l),{before:h,after:"]"})),b(),h+=f.move("]:"),l.children&&l.children.length>0&&(f.shift(4),h+=f.move((n?`
|
|
47
|
-
`:" ")+u.indentLines(u.containerFlow(l,f.current()),n?uv:S5))),p(),h}}function S5(e,n,i){return n===0?e:uv(e,n,i)}function uv(e,n,i){return(i?"":" ")+e}const k5=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];cv.peek=T5;function E5(){return{canContainEols:["delete"],enter:{strikethrough:A5},exit:{strikethrough:N5}}}function C5(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:k5}],handlers:{delete:cv}}}function A5(e){this.enter({type:"delete",children:[]},e)}function N5(e){this.exit(e)}function cv(e,n,i,l){const o=i.createTracker(l),u=i.enter("strikethrough");let c=o.move("~~");return c+=i.containerPhrasing(e,{...o.current(),before:c,after:"~"}),c+=o.move("~~"),u(),c}function T5(){return"~"}function R5(e){return e.length}function j5(e,n){const i=n||{},l=(i.align||[]).concat(),o=i.stringLength||R5,u=[],c=[],f=[],h=[];let p=0,b=-1;for(;++b<e.length;){const S=[],A=[];let C=-1;for(e[b].length>p&&(p=e[b].length);++C<e[b].length;){const E=_5(e[b][C]);if(i.alignDelimiters!==!1){const R=o(E);A[C]=R,(h[C]===void 0||R>h[C])&&(h[C]=R)}S.push(E)}c[b]=S,f[b]=A}let g=-1;if(typeof l=="object"&&"length"in l)for(;++g<p;)u[g]=zx(l[g]);else{const S=zx(l);for(;++g<p;)u[g]=S}g=-1;const v=[],x=[];for(;++g<p;){const S=u[g];let A="",C="";S===99?(A=":",C=":"):S===108?A=":":S===114&&(C=":");let E=i.alignDelimiters===!1?1:Math.max(1,h[g]-A.length-C.length);const R=A+"-".repeat(E)+C;i.alignDelimiters!==!1&&(E=A.length+E+C.length,E>h[g]&&(h[g]=E),x[g]=E),v[g]=R}c.splice(1,0,v),f.splice(1,0,x),b=-1;const w=[];for(;++b<c.length;){const S=c[b],A=f[b];g=-1;const C=[];for(;++g<p;){const E=S[g]||"";let R="",z="";if(i.alignDelimiters!==!1){const $=h[g]-(A[g]||0),_=u[g];_===114?R=" ".repeat($):_===99?$%2?(R=" ".repeat($/2+.5),z=" ".repeat($/2-.5)):(R=" ".repeat($/2),z=R):z=" ".repeat($)}i.delimiterStart!==!1&&!g&&C.push("|"),i.padding!==!1&&!(i.alignDelimiters===!1&&E==="")&&(i.delimiterStart!==!1||g)&&C.push(" "),i.alignDelimiters!==!1&&C.push(R),C.push(E),i.alignDelimiters!==!1&&C.push(z),i.padding!==!1&&C.push(" "),(i.delimiterEnd!==!1||g!==p-1)&&C.push("|")}w.push(i.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return w.join(`
|
|
48
|
-
`)}function _5(e){return e==null?"":String(e)}function zx(e){const n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function L5(e,n,i,l){const o=i.enter("blockquote"),u=i.createTracker(l);u.move("> "),u.shift(2);const c=i.indentLines(i.containerFlow(e,u.current()),D5);return o(),c}function D5(e,n,i){return">"+(i?"":" ")+e}function M5(e,n){return Ix(e,n.inConstruct,!0)&&!Ix(e,n.notInConstruct,!1)}function Ix(e,n,i){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return i;let l=-1;for(;++l<n.length;)if(e.includes(n[l]))return!0;return!1}function Fx(e,n,i,l){let o=-1;for(;++o<i.unsafe.length;)if(i.unsafe[o].character===`
|
|
49
|
-
`&&M5(i.stack,i.unsafe[o]))return/[ \t]/.test(l.before)?"":" ";return`\\
|
|
50
|
-
`}function O5(e,n){const i=String(e);let l=i.indexOf(n),o=l,u=0,c=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;l!==-1;)l===o?++u>c&&(c=u):u=1,o=l+n.length,l=i.indexOf(n,o);return c}function z5(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function I5(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function F5(e,n,i,l){const o=I5(i),u=e.value||"",c=o==="`"?"GraveAccent":"Tilde";if(z5(e,i)){const g=i.enter("codeIndented"),v=i.indentLines(u,B5);return g(),v}const f=i.createTracker(l),h=o.repeat(Math.max(O5(u,o)+1,3)),p=i.enter("codeFenced");let b=f.move(h);if(e.lang){const g=i.enter(`codeFencedLang${c}`);b+=f.move(i.safe(e.lang,{before:b,after:" ",encode:["`"],...f.current()})),g()}if(e.lang&&e.meta){const g=i.enter(`codeFencedMeta${c}`);b+=f.move(" "),b+=f.move(i.safe(e.meta,{before:b,after:`
|
|
51
|
-
`,encode:["`"],...f.current()})),g()}return b+=f.move(`
|
|
52
|
-
`),u&&(b+=f.move(u+`
|
|
53
|
-
`)),b+=f.move(h),p(),b}function B5(e,n,i){return(i?"":" ")+e}function ip(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function U5(e,n,i,l){const o=ip(i),u=o==='"'?"Quote":"Apostrophe",c=i.enter("definition");let f=i.enter("label");const h=i.createTracker(l);let p=h.move("[");return p+=h.move(i.safe(i.associationId(e),{before:p,after:"]",...h.current()})),p+=h.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=i.enter("destinationLiteral"),p+=h.move("<"),p+=h.move(i.safe(e.url,{before:p,after:">",...h.current()})),p+=h.move(">")):(f=i.enter("destinationRaw"),p+=h.move(i.safe(e.url,{before:p,after:e.title?" ":`
|
|
54
|
-
`,...h.current()}))),f(),e.title&&(f=i.enter(`title${u}`),p+=h.move(" "+o),p+=h.move(i.safe(e.title,{before:p,after:o,...h.current()})),p+=h.move(o),f()),c(),p}function H5(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function ro(e){return"&#x"+e.toString(16).toUpperCase()+";"}function pu(e,n,i){const l=$l(e),o=$l(n);return l===void 0?o===void 0?i==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:l===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}fv.peek=$5;function fv(e,n,i,l){const o=H5(i),u=i.enter("emphasis"),c=i.createTracker(l),f=c.move(o);let h=c.move(i.containerPhrasing(e,{after:o,before:f,...c.current()}));const p=h.charCodeAt(0),b=pu(l.before.charCodeAt(l.before.length-1),p,o);b.inside&&(h=ro(p)+h.slice(1));const g=h.charCodeAt(h.length-1),v=pu(l.after.charCodeAt(0),g,o);v.inside&&(h=h.slice(0,-1)+ro(g));const x=c.move(o);return u(),i.attentionEncodeSurroundingInfo={after:v.outside,before:b.outside},f+h+x}function $5(e,n,i){return i.options.emphasis||"*"}function q5(e,n){let i=!1;return tp(e,function(l){if("value"in l&&/\r?\n|\r/.test(l.value)||l.type==="break")return i=!0,sh}),!!((!e.depth||e.depth<3)&&Xh(e)&&(n.options.setext||i))}function P5(e,n,i,l){const o=Math.max(Math.min(6,e.depth||1),1),u=i.createTracker(l);if(q5(e,i)){const b=i.enter("headingSetext"),g=i.enter("phrasing"),v=i.containerPhrasing(e,{...u.current(),before:`
|
|
55
|
-
`,after:`
|
|
56
|
-
`});return g(),b(),v+`
|
|
57
|
-
`+(o===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(`
|
|
58
|
-
`))+1))}const c="#".repeat(o),f=i.enter("headingAtx"),h=i.enter("phrasing");u.move(c+" ");let p=i.containerPhrasing(e,{before:"# ",after:`
|
|
59
|
-
`,...u.current()});return/^[\t ]/.test(p)&&(p=ro(p.charCodeAt(0))+p.slice(1)),p=p?c+" "+p:c,i.options.closeAtx&&(p+=" "+c),h(),f(),p}dv.peek=V5;function dv(e){return e.value||""}function V5(){return"<"}hv.peek=G5;function hv(e,n,i,l){const o=ip(i),u=o==='"'?"Quote":"Apostrophe",c=i.enter("image");let f=i.enter("label");const h=i.createTracker(l);let p=h.move("![");return p+=h.move(i.safe(e.alt,{before:p,after:"]",...h.current()})),p+=h.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=i.enter("destinationLiteral"),p+=h.move("<"),p+=h.move(i.safe(e.url,{before:p,after:">",...h.current()})),p+=h.move(">")):(f=i.enter("destinationRaw"),p+=h.move(i.safe(e.url,{before:p,after:e.title?" ":")",...h.current()}))),f(),e.title&&(f=i.enter(`title${u}`),p+=h.move(" "+o),p+=h.move(i.safe(e.title,{before:p,after:o,...h.current()})),p+=h.move(o),f()),p+=h.move(")"),c(),p}function G5(){return"!"}pv.peek=Y5;function pv(e,n,i,l){const o=e.referenceType,u=i.enter("imageReference");let c=i.enter("label");const f=i.createTracker(l);let h=f.move("![");const p=i.safe(e.alt,{before:h,after:"]",...f.current()});h+=f.move(p+"]["),c();const b=i.stack;i.stack=[],c=i.enter("reference");const g=i.safe(i.associationId(e),{before:h,after:"]",...f.current()});return c(),i.stack=b,u(),o==="full"||!p||p!==g?h+=f.move(g+"]"):o==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function Y5(){return"!"}mv.peek=X5;function mv(e,n,i){let l=e.value||"",o="`",u=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(l);)o+="`";for(/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^`|`$/.test(l))&&(l=" "+l+" ");++u<i.unsafe.length;){const c=i.unsafe[u],f=i.compilePattern(c);let h;if(c.atBreak)for(;h=f.exec(l);){let p=h.index;l.charCodeAt(p)===10&&l.charCodeAt(p-1)===13&&p--,l=l.slice(0,p)+" "+l.slice(h.index+1)}}return o+l+o}function X5(){return"`"}function gv(e,n){const i=Xh(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(i===e.url||"mailto:"+i===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}bv.peek=Z5;function bv(e,n,i,l){const o=ip(i),u=o==='"'?"Quote":"Apostrophe",c=i.createTracker(l);let f,h;if(gv(e,i)){const b=i.stack;i.stack=[],f=i.enter("autolink");let g=c.move("<");return g+=c.move(i.containerPhrasing(e,{before:g,after:">",...c.current()})),g+=c.move(">"),f(),i.stack=b,g}f=i.enter("link"),h=i.enter("label");let p=c.move("[");return p+=c.move(i.containerPhrasing(e,{before:p,after:"](",...c.current()})),p+=c.move("]("),h(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(h=i.enter("destinationLiteral"),p+=c.move("<"),p+=c.move(i.safe(e.url,{before:p,after:">",...c.current()})),p+=c.move(">")):(h=i.enter("destinationRaw"),p+=c.move(i.safe(e.url,{before:p,after:e.title?" ":")",...c.current()}))),h(),e.title&&(h=i.enter(`title${u}`),p+=c.move(" "+o),p+=c.move(i.safe(e.title,{before:p,after:o,...c.current()})),p+=c.move(o),h()),p+=c.move(")"),f(),p}function Z5(e,n,i){return gv(e,i)?"<":"["}yv.peek=K5;function yv(e,n,i,l){const o=e.referenceType,u=i.enter("linkReference");let c=i.enter("label");const f=i.createTracker(l);let h=f.move("[");const p=i.containerPhrasing(e,{before:h,after:"]",...f.current()});h+=f.move(p+"]["),c();const b=i.stack;i.stack=[],c=i.enter("reference");const g=i.safe(i.associationId(e),{before:h,after:"]",...f.current()});return c(),i.stack=b,u(),o==="full"||!p||p!==g?h+=f.move(g+"]"):o==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function K5(){return"["}function lp(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function Q5(e){const n=lp(e),i=e.options.bulletOther;if(!i)return n==="*"?"-":"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(i===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+i+"`) to be different");return i}function W5(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function xv(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function J5(e,n,i,l){const o=i.enter("list"),u=i.bulletCurrent;let c=e.ordered?W5(i):lp(i);const f=e.ordered?c==="."?")":".":Q5(i);let h=n&&i.bulletLastUsed?c===i.bulletLastUsed:!1;if(!e.ordered){const b=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&b&&(!b.children||!b.children[0])&&i.stack[i.stack.length-1]==="list"&&i.stack[i.stack.length-2]==="listItem"&&i.stack[i.stack.length-3]==="list"&&i.stack[i.stack.length-4]==="listItem"&&i.indexStack[i.indexStack.length-1]===0&&i.indexStack[i.indexStack.length-2]===0&&i.indexStack[i.indexStack.length-3]===0&&(h=!0),xv(i)===c&&b){let g=-1;for(;++g<e.children.length;){const v=e.children[g];if(v&&v.type==="listItem"&&v.children&&v.children[0]&&v.children[0].type==="thematicBreak"){h=!0;break}}}}h&&(c=f),i.bulletCurrent=c;const p=i.containerFlow(e,l);return i.bulletLastUsed=c,i.bulletCurrent=u,o(),p}function e8(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function t8(e,n,i,l){const o=e8(i);let u=i.bulletCurrent||lp(i);n&&n.type==="list"&&n.ordered&&(u=(typeof n.start=="number"&&n.start>-1?n.start:1)+(i.options.incrementListMarker===!1?0:n.children.indexOf(e))+u);let c=u.length+1;(o==="tab"||o==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=i.createTracker(l);f.move(u+" ".repeat(c-u.length)),f.shift(c);const h=i.enter("listItem"),p=i.indentLines(i.containerFlow(e,f.current()),b);return h(),p;function b(g,v,x){return v?(x?"":" ".repeat(c))+g:(x?u:u+" ".repeat(c-u.length))+g}}function n8(e,n,i,l){const o=i.enter("paragraph"),u=i.enter("phrasing"),c=i.containerPhrasing(e,l);return u(),o(),c}const r8=Uu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function i8(e,n,i,l){return(e.children.some(function(c){return r8(c)})?i.containerPhrasing:i.containerFlow).call(i,e,l)}function l8(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}vv.peek=a8;function vv(e,n,i,l){const o=l8(i),u=i.enter("strong"),c=i.createTracker(l),f=c.move(o+o);let h=c.move(i.containerPhrasing(e,{after:o,before:f,...c.current()}));const p=h.charCodeAt(0),b=pu(l.before.charCodeAt(l.before.length-1),p,o);b.inside&&(h=ro(p)+h.slice(1));const g=h.charCodeAt(h.length-1),v=pu(l.after.charCodeAt(0),g,o);v.inside&&(h=h.slice(0,-1)+ro(g));const x=c.move(o+o);return u(),i.attentionEncodeSurroundingInfo={after:v.outside,before:b.outside},f+h+x}function a8(e,n,i){return i.options.strong||"*"}function o8(e,n,i,l){return i.safe(e.value,l)}function s8(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function u8(e,n,i){const l=(xv(i)+(i.options.ruleSpaces?" ":"")).repeat(s8(i));return i.options.ruleSpaces?l.slice(0,-1):l}const wv={blockquote:L5,break:Fx,code:F5,definition:U5,emphasis:fv,hardBreak:Fx,heading:P5,html:dv,image:hv,imageReference:pv,inlineCode:mv,link:bv,linkReference:yv,list:J5,listItem:t8,paragraph:n8,root:i8,strong:vv,text:o8,thematicBreak:u8};function c8(){return{enter:{table:f8,tableData:Bx,tableHeader:Bx,tableRow:h8},exit:{codeText:p8,table:d8,tableData:Md,tableHeader:Md,tableRow:Md}}}function f8(e){const n=e._align;this.enter({type:"table",align:n.map(function(i){return i==="none"?null:i}),children:[]},e),this.data.inTable=!0}function d8(e){this.exit(e),this.data.inTable=void 0}function h8(e){this.enter({type:"tableRow",children:[]},e)}function Md(e){this.exit(e)}function Bx(e){this.enter({type:"tableCell",children:[]},e)}function p8(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,m8));const i=this.stack[this.stack.length-1];i.type,i.value=n,this.exit(e)}function m8(e,n){return n==="|"?n:e}function g8(e){const n=e||{},i=n.tableCellPadding,l=n.tablePipeAlign,o=n.stringLength,u=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
60
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:c,tableCell:h,tableRow:f}};function c(x,w,S,A){return p(b(x,S,A),x.align)}function f(x,w,S,A){const C=g(x,S,A),E=p([C]);return E.slice(0,E.indexOf(`
|
|
61
|
-
`))}function h(x,w,S,A){const C=S.enter("tableCell"),E=S.enter("phrasing"),R=S.containerPhrasing(x,{...A,before:u,after:u});return E(),C(),R}function p(x,w){return j5(x,{align:w,alignDelimiters:l,padding:i,stringLength:o})}function b(x,w,S){const A=x.children;let C=-1;const E=[],R=w.enter("table");for(;++C<A.length;)E[C]=g(A[C],w,S);return R(),E}function g(x,w,S){const A=x.children;let C=-1;const E=[],R=w.enter("tableRow");for(;++C<A.length;)E[C]=h(A[C],x,w,S);return R(),E}function v(x,w,S){let A=wv.inlineCode(x,w,S);return S.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function b8(){return{exit:{taskListCheckValueChecked:Ux,taskListCheckValueUnchecked:Ux,paragraph:x8}}}function y8(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:v8}}}function Ux(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function x8(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const i=this.stack[this.stack.length-1];i.type;const l=i.children[0];if(l&&l.type==="text"){const o=n.children;let u=-1,c;for(;++u<o.length;){const f=o[u];if(f.type==="paragraph"){c=f;break}}c===i&&(l.value=l.value.slice(1),l.value.length===0?i.children.shift():i.position&&l.position&&typeof l.position.start.offset=="number"&&(l.position.start.column++,l.position.start.offset++,i.position.start=Object.assign({},l.position.start)))}}this.exit(e)}function v8(e,n,i,l){const o=e.children[0],u=typeof e.checked=="boolean"&&o&&o.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=i.createTracker(l);u&&f.move(c);let h=wv.listItem(e,n,i,{...l,...f.current()});return u&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),h;function p(b){return b+c}}function w8(){return[J6(),v5(),E5(),c8(),b8()]}function S8(e){return{extensions:[e5(),w5(e),C5(),g8(e),y8()]}}const k8={tokenize:R8,partial:!0},Sv={tokenize:j8,partial:!0},kv={tokenize:_8,partial:!0},Ev={tokenize:L8,partial:!0},E8={tokenize:D8,partial:!0},Cv={name:"wwwAutolink",tokenize:N8,previous:Nv},Av={name:"protocolAutolink",tokenize:T8,previous:Tv},Tr={name:"emailAutolink",tokenize:A8,previous:Rv},nr={};function C8(){return{text:nr}}let Oi=48;for(;Oi<123;)nr[Oi]=Tr,Oi++,Oi===58?Oi=65:Oi===91&&(Oi=97);nr[43]=Tr;nr[45]=Tr;nr[46]=Tr;nr[95]=Tr;nr[72]=[Tr,Av];nr[104]=[Tr,Av];nr[87]=[Tr,Cv];nr[119]=[Tr,Cv];function A8(e,n,i){const l=this;let o,u;return c;function c(g){return!dh(g)||!Rv.call(l,l.previous)||ap(l.events)?i(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(g))}function f(g){return dh(g)?(e.consume(g),f):g===64?(e.consume(g),h):i(g)}function h(g){return g===46?e.check(E8,b,p)(g):g===45||g===95||Vt(g)?(u=!0,e.consume(g),h):b(g)}function p(g){return e.consume(g),o=!0,h}function b(g){return u&&o&&Qt(l.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(g)):i(g)}}function N8(e,n,i){const l=this;return o;function o(c){return c!==87&&c!==119||!Nv.call(l,l.previous)||ap(l.events)?i(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(k8,e.attempt(Sv,e.attempt(kv,u),i),i)(c))}function u(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(c)}}function T8(e,n,i){const l=this;let o="",u=!1;return c;function c(g){return(g===72||g===104)&&Tv.call(l,l.previous)&&!ap(l.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(g),e.consume(g),f):i(g)}function f(g){if(Qt(g)&&o.length<5)return o+=String.fromCodePoint(g),e.consume(g),f;if(g===58){const v=o.toLowerCase();if(v==="http"||v==="https")return e.consume(g),h}return i(g)}function h(g){return g===47?(e.consume(g),u?p:(u=!0,h)):i(g)}function p(g){return g===null||fu(g)||lt(g)||Ui(g)||Iu(g)?i(g):e.attempt(Sv,e.attempt(kv,b),i)(g)}function b(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(g)}}function R8(e,n,i){let l=0;return o;function o(c){return(c===87||c===119)&&l<3?(l++,e.consume(c),o):c===46&&l===3?(e.consume(c),u):i(c)}function u(c){return c===null?i(c):n(c)}}function j8(e,n,i){let l,o,u;return c;function c(p){return p===46||p===95?e.check(Ev,h,f)(p):p===null||lt(p)||Ui(p)||p!==45&&Iu(p)?h(p):(u=!0,e.consume(p),c)}function f(p){return p===95?l=!0:(o=l,l=void 0),e.consume(p),c}function h(p){return o||l||!u?i(p):n(p)}}function _8(e,n){let i=0,l=0;return o;function o(c){return c===40?(i++,e.consume(c),o):c===41&&l<i?u(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(Ev,n,u)(c):c===null||lt(c)||Ui(c)?n(c):(e.consume(c),o)}function u(c){return c===41&&l++,e.consume(c),o}}function L8(e,n,i){return l;function l(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),l):f===38?(e.consume(f),u):f===93?(e.consume(f),o):f===60||f===null||lt(f)||Ui(f)?n(f):i(f)}function o(f){return f===null||f===40||f===91||lt(f)||Ui(f)?n(f):l(f)}function u(f){return Qt(f)?c(f):i(f)}function c(f){return f===59?(e.consume(f),l):Qt(f)?(e.consume(f),c):i(f)}}function D8(e,n,i){return l;function l(u){return e.consume(u),o}function o(u){return Vt(u)?i(u):n(u)}}function Nv(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||lt(e)}function Tv(e){return!Qt(e)}function Rv(e){return!(e===47||dh(e))}function dh(e){return e===43||e===45||e===46||e===95||Vt(e)}function ap(e){let n=e.length,i=!1;for(;n--;){const l=e[n][1];if((l.type==="labelLink"||l.type==="labelImage")&&!l._balanced){i=!0;break}if(l._gfmAutolinkLiteralWalkedInto){i=!1;break}}return e.length>0&&!i&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),i}const M8={tokenize:$8,partial:!0};function O8(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:B8,continuation:{tokenize:U8},exit:H8}},text:{91:{name:"gfmFootnoteCall",tokenize:F8},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:z8,resolveTo:I8}}}}function z8(e,n,i){const l=this;let o=l.events.length;const u=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let c;for(;o--;){const h=l.events[o][1];if(h.type==="labelImage"){c=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return f;function f(h){if(!c||!c._balanced)return i(h);const p=Pn(l.sliceSerialize({start:c.end,end:l.now()}));return p.codePointAt(0)!==94||!u.includes(p.slice(1))?i(h):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),n(h))}}function I8(e,n){let i=e.length;for(;i--;)if(e[i][1].type==="labelImage"&&e[i][0]==="enter"){e[i][1];break}e[i+1][1].type="data",e[i+3][1].type="gfmFootnoteCallLabelMarker";const l={type:"gfmFootnoteCall",start:Object.assign({},e[i+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[i+3][1].end),end:Object.assign({},e[i+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},f=[e[i+1],e[i+2],["enter",l,n],e[i+3],e[i+4],["enter",o,n],["exit",o,n],["enter",u,n],["enter",c,n],["exit",c,n],["exit",u,n],e[e.length-2],e[e.length-1],["exit",l,n]];return e.splice(i,e.length-i+1,...f),e}function F8(e,n,i){const l=this,o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let u=0,c;return f;function f(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),h}function h(g){return g!==94?i(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",p)}function p(g){if(u>999||g===93&&!c||g===null||g===91||lt(g))return i(g);if(g===93){e.exit("chunkString");const v=e.exit("gfmFootnoteCallString");return o.includes(Pn(l.sliceSerialize(v)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):i(g)}return lt(g)||(c=!0),u++,e.consume(g),g===92?b:p}function b(g){return g===91||g===92||g===93?(e.consume(g),u++,p):p(g)}}function B8(e,n,i){const l=this,o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let u,c=0,f;return h;function h(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(w){return w===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",b):i(w)}function b(w){if(c>999||w===93&&!f||w===null||w===91||lt(w))return i(w);if(w===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return u=Pn(l.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),v}return lt(w)||(f=!0),c++,e.consume(w),w===92?g:b}function g(w){return w===91||w===92||w===93?(e.consume(w),c++,b):b(w)}function v(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),o.includes(u)||o.push(u),Ye(e,x,"gfmFootnoteDefinitionWhitespace")):i(w)}function x(w){return n(w)}}function U8(e,n,i){return e.check(co,n,e.attempt(M8,n,i))}function H8(e){e.exit("gfmFootnoteDefinition")}function $8(e,n,i){const l=this;return Ye(e,o,"gfmFootnoteDefinitionIndent",5);function o(u){const c=l.events[l.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?n(u):i(u)}}function q8(e){let i=(e||{}).singleTilde;const l={name:"strikethrough",tokenize:u,resolveAll:o};return i==null&&(i=!0),{text:{126:l},insideSpan:{null:[l]},attentionMarkers:{null:[126]}};function o(c,f){let h=-1;for(;++h<c.length;)if(c[h][0]==="enter"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._close){let p=h;for(;p--;)if(c[p][0]==="exit"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._open&&c[h][1].end.offset-c[h][1].start.offset===c[p][1].end.offset-c[p][1].start.offset){c[h][1].type="strikethroughSequence",c[p][1].type="strikethroughSequence";const b={type:"strikethrough",start:Object.assign({},c[p][1].start),end:Object.assign({},c[h][1].end)},g={type:"strikethroughText",start:Object.assign({},c[p][1].end),end:Object.assign({},c[h][1].start)},v=[["enter",b,f],["enter",c[p][1],f],["exit",c[p][1],f],["enter",g,f]],x=f.parser.constructs.insideSpan.null;x&&En(v,v.length,0,Fu(x,c.slice(p+1,h),f)),En(v,v.length,0,[["exit",g,f],["enter",c[h][1],f],["exit",c[h][1],f],["exit",b,f]]),En(c,p-1,h-p+3,v),h=p+v.length-2;break}}for(h=-1;++h<c.length;)c[h][1].type==="strikethroughSequenceTemporary"&&(c[h][1].type="data");return c}function u(c,f,h){const p=this.previous,b=this.events;let g=0;return v;function v(w){return p===126&&b[b.length-1][1].type!=="characterEscape"?h(w):(c.enter("strikethroughSequenceTemporary"),x(w))}function x(w){const S=$l(p);if(w===126)return g>1?h(w):(c.consume(w),g++,x);if(g<2&&!i)return h(w);const A=c.exit("strikethroughSequenceTemporary"),C=$l(w);return A._open=!C||C===2&&!!S,A._close=!S||S===2&&!!C,f(w)}}}class P8{constructor(){this.map=[]}add(n,i,l){V8(this,n,i,l)}consume(n){if(this.map.sort(function(u,c){return u[0]-c[0]}),this.map.length===0)return;let i=this.map.length;const l=[];for(;i>0;)i-=1,l.push(n.slice(this.map[i][0]+this.map[i][1]),this.map[i][2]),n.length=this.map[i][0];l.push(n.slice()),n.length=0;let o=l.pop();for(;o;){for(const u of o)n.push(u);o=l.pop()}this.map.length=0}}function V8(e,n,i,l){let o=0;if(!(i===0&&l.length===0)){for(;o<e.map.length;){if(e.map[o][0]===n){e.map[o][1]+=i,e.map[o][2].push(...l);return}o+=1}e.map.push([n,i,l])}}function G8(e,n){let i=!1;const l=[];for(;n<e.length;){const o=e[n];if(i){if(o[0]==="enter")o[1].type==="tableContent"&&l.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const u=l.length-1;l[u]=l[u]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(i=!0);n+=1}return l}function Y8(){return{flow:{null:{name:"table",tokenize:X8,resolveAll:Z8}}}}function X8(e,n,i){const l=this;let o=0,u=0,c;return f;function f(L){let I=l.events.length-1;for(;I>-1;){const U=l.events[I][1].type;if(U==="lineEnding"||U==="linePrefix")I--;else break}const q=I>-1?l.events[I][1].type:null,K=q==="tableHead"||q==="tableRow"?_:h;return K===_&&l.parser.lazy[l.now().line]?i(L):K(L)}function h(L){return e.enter("tableHead"),e.enter("tableRow"),p(L)}function p(L){return L===124||(c=!0,u+=1),b(L)}function b(L){return L===null?i(L):Te(L)?u>1?(u=0,l.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),x):i(L):Ue(L)?Ye(e,b,"whitespace")(L):(u+=1,c&&(c=!1,o+=1),L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),c=!0,b):(e.enter("data"),g(L)))}function g(L){return L===null||L===124||lt(L)?(e.exit("data"),b(L)):(e.consume(L),L===92?v:g)}function v(L){return L===92||L===124?(e.consume(L),g):g(L)}function x(L){return l.interrupt=!1,l.parser.lazy[l.now().line]?i(L):(e.enter("tableDelimiterRow"),c=!1,Ue(L)?Ye(e,w,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):w(L))}function w(L){return L===45||L===58?A(L):L===124?(c=!0,e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),S):$(L)}function S(L){return Ue(L)?Ye(e,A,"whitespace")(L):A(L)}function A(L){return L===58?(u+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),C):L===45?(u+=1,C(L)):L===null||Te(L)?z(L):$(L)}function C(L){return L===45?(e.enter("tableDelimiterFiller"),E(L)):$(L)}function E(L){return L===45?(e.consume(L),E):L===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),R):(e.exit("tableDelimiterFiller"),R(L))}function R(L){return Ue(L)?Ye(e,z,"whitespace")(L):z(L)}function z(L){return L===124?w(L):L===null||Te(L)?!c||o!==u?$(L):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(L)):$(L)}function $(L){return i(L)}function _(L){return e.enter("tableRow"),F(L)}function F(L){return L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),F):L===null||Te(L)?(e.exit("tableRow"),n(L)):Ue(L)?Ye(e,F,"whitespace")(L):(e.enter("data"),P(L))}function P(L){return L===null||L===124||lt(L)?(e.exit("data"),F(L)):(e.consume(L),L===92?O:P)}function O(L){return L===92||L===124?(e.consume(L),P):P(L)}}function Z8(e,n){let i=-1,l=!0,o=0,u=[0,0,0,0],c=[0,0,0,0],f=!1,h=0,p,b,g;const v=new P8;for(;++i<e.length;){const x=e[i],w=x[1];x[0]==="enter"?w.type==="tableHead"?(f=!1,h!==0&&(Hx(v,n,h,p,b),b=void 0,h=0),p={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},v.add(i,0,[["enter",p,n]])):w.type==="tableRow"||w.type==="tableDelimiterRow"?(l=!0,g=void 0,u=[0,0,0,0],c=[0,i+1,0,0],f&&(f=!1,b={type:"tableBody",start:Object.assign({},w.start),end:Object.assign({},w.end)},v.add(i,0,[["enter",b,n]])),o=w.type==="tableDelimiterRow"?2:b?3:1):o&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(l=!1,c[2]===0&&(u[1]!==0&&(c[0]=c[1],g=zs(v,n,u,o,void 0,g),u=[0,0,0,0]),c[2]=i)):w.type==="tableCellDivider"&&(l?l=!1:(u[1]!==0&&(c[0]=c[1],g=zs(v,n,u,o,void 0,g)),u=c,c=[u[1],i,0,0])):w.type==="tableHead"?(f=!0,h=i):w.type==="tableRow"||w.type==="tableDelimiterRow"?(h=i,u[1]!==0?(c[0]=c[1],g=zs(v,n,u,o,i,g)):c[1]!==0&&(g=zs(v,n,c,o,i,g)),o=0):o&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(c[3]=i)}for(h!==0&&Hx(v,n,h,p,b),v.consume(n.events),i=-1;++i<n.events.length;){const x=n.events[i];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=G8(n.events,i))}return e}function zs(e,n,i,l,o,u){const c=l===1?"tableHeader":l===2?"tableDelimiter":"tableData",f="tableContent";i[0]!==0&&(u.end=Object.assign({},Ol(n.events,i[0])),e.add(i[0],0,[["exit",u,n]]));const h=Ol(n.events,i[1]);if(u={type:c,start:Object.assign({},h),end:Object.assign({},h)},e.add(i[1],0,[["enter",u,n]]),i[2]!==0){const p=Ol(n.events,i[2]),b=Ol(n.events,i[3]),g={type:f,start:Object.assign({},p),end:Object.assign({},b)};if(e.add(i[2],0,[["enter",g,n]]),l!==2){const v=n.events[i[2]],x=n.events[i[3]];if(v[1].end=Object.assign({},x[1].end),v[1].type="chunkText",v[1].contentType="text",i[3]>i[2]+1){const w=i[2]+1,S=i[3]-i[2]-1;e.add(w,S,[])}}e.add(i[3]+1,0,[["exit",g,n]])}return o!==void 0&&(u.end=Object.assign({},Ol(n.events,o)),e.add(o,0,[["exit",u,n]]),u=void 0),u}function Hx(e,n,i,l,o){const u=[],c=Ol(n.events,i);o&&(o.end=Object.assign({},c),u.push(["exit",o,n])),l.end=Object.assign({},c),u.push(["exit",l,n]),e.add(i+1,0,u)}function Ol(e,n){const i=e[n],l=i[0]==="enter"?"start":"end";return i[1][l]}const K8={name:"tasklistCheck",tokenize:W8};function Q8(){return{text:{91:K8}}}function W8(e,n,i){const l=this;return o;function o(h){return l.previous!==null||!l._gfmTasklistFirstContentOfListItem?i(h):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),u)}function u(h){return lt(h)?(e.enter("taskListCheckValueUnchecked"),e.consume(h),e.exit("taskListCheckValueUnchecked"),c):h===88||h===120?(e.enter("taskListCheckValueChecked"),e.consume(h),e.exit("taskListCheckValueChecked"),c):i(h)}function c(h){return h===93?(e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):i(h)}function f(h){return Te(h)?n(h):Ue(h)?e.check({tokenize:J8},n,i)(h):i(h)}}function J8(e,n,i){return Ye(e,l,"whitespace");function l(o){return o===null?i(o):n(o)}}function eR(e){return U0([C8(),O8(),q8(e),Y8(),Q8()])}const tR={};function op(e){const n=this,i=e||tR,l=n.data(),o=l.micromarkExtensions||(l.micromarkExtensions=[]),u=l.fromMarkdownExtensions||(l.fromMarkdownExtensions=[]),c=l.toMarkdownExtensions||(l.toMarkdownExtensions=[]);o.push(eR(i)),u.push(w8()),c.push(S8(i))}let $x=null;const nR=()=>($x??=Dt(()=>import("./mermaid.core-DV5JJ1Ie.js").then(e=>e.bF),[]),$x),rR=e=>e==="light"?"default":"dark";function iR({chart:e}){const n=N.useRef(null),i=N.useId().replace(/:/g,"-"),[l,o]=N.useState(()=>Zb()),[u,c]=N.useState(null),f=rR(l);return N.useEffect(()=>{const h=document.documentElement,p=()=>{const g=Zb();o(v=>v===g?v:g)};p();const b=new MutationObserver(g=>{g.some(v=>v.attributeName==="data-theme")&&p()});return b.observe(h,{attributes:!0,attributeFilter:["data-theme"]}),()=>{b.disconnect()}},[]),N.useEffect(()=>{let h=!1;const p=n.current;return(async()=>{if(p){p.innerHTML="",c(null);try{const{default:g}=await nR();g.initialize({startOnLoad:!1,securityLevel:"strict",theme:f});const{svg:v,bindFunctions:x}=await g.render(`mermaid-diagram-${i}`,e);if(h)return;p.innerHTML=v,x?.(p)}catch(g){if(h)return;p.innerHTML="",c(g instanceof Error?g.message:"Failed to render Mermaid diagram")}}})(),()=>{h=!0,p&&(p.innerHTML="")}},[e,i,f]),u?y.jsxs("div",{className:"space-y-2",children:[y.jsx("div",{className:"text-sm text-github-danger",title:u,children:"Unable to render Mermaid diagram."}),y.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})]}):y.jsx("div",{ref:n,"aria-label":"Mermaid diagram",className:"mermaid-diagram overflow-x-auto rounded border border-github-border bg-github-bg-secondary p-3"})}class sp{diff(n,i,l={}){let o;typeof l=="function"?(o=l,l={}):"callback"in l&&(o=l.callback);const u=this.castInput(n,l),c=this.castInput(i,l),f=this.removeEmpty(this.tokenize(u,l)),h=this.removeEmpty(this.tokenize(c,l));return this.diffWithOptionsObj(f,h,l,o)}diffWithOptionsObj(n,i,l,o){var u;const c=E=>{if(E=this.postProcess(E,l),o){setTimeout(function(){o(E)},0);return}else return E},f=i.length,h=n.length;let p=1,b=f+h;l.maxEditLength!=null&&(b=Math.min(b,l.maxEditLength));const g=(u=l.timeout)!==null&&u!==void 0?u:1/0,v=Date.now()+g,x=[{oldPos:-1,lastComponent:void 0}];let w=this.extractCommon(x[0],i,n,0,l);if(x[0].oldPos+1>=h&&w+1>=f)return c(this.buildValues(x[0].lastComponent,i,n));let S=-1/0,A=1/0;const C=()=>{for(let E=Math.max(S,-p);E<=Math.min(A,p);E+=2){let R;const z=x[E-1],$=x[E+1];z&&(x[E-1]=void 0);let _=!1;if($){const P=$.oldPos-E;_=$&&0<=P&&P<f}const F=z&&z.oldPos+1<h;if(!_&&!F){x[E]=void 0;continue}if(!F||_&&z.oldPos<$.oldPos?R=this.addToPath($,!0,!1,0,l):R=this.addToPath(z,!1,!0,1,l),w=this.extractCommon(R,i,n,E,l),R.oldPos+1>=h&&w+1>=f)return c(this.buildValues(R.lastComponent,i,n))||!0;x[E]=R,R.oldPos+1>=h&&(A=Math.min(A,E-1)),w+1>=f&&(S=Math.max(S,E+1))}p++};if(o)(function E(){setTimeout(function(){if(p>b||Date.now()>v)return o(void 0);C()||E()},0)})();else for(;p<=b&&Date.now()<=v;){const E=C();if(E)return E}}addToPath(n,i,l,o,u){const c=n.lastComponent;return c&&!u.oneChangePerToken&&c.added===i&&c.removed===l?{oldPos:n.oldPos+o,lastComponent:{count:c.count+1,added:i,removed:l,previousComponent:c.previousComponent}}:{oldPos:n.oldPos+o,lastComponent:{count:1,added:i,removed:l,previousComponent:c}}}extractCommon(n,i,l,o,u){const c=i.length,f=l.length;let h=n.oldPos,p=h-o,b=0;for(;p+1<c&&h+1<f&&this.equals(l[h+1],i[p+1],u);)p++,h++,b++,u.oneChangePerToken&&(n.lastComponent={count:1,previousComponent:n.lastComponent,added:!1,removed:!1});return b&&!u.oneChangePerToken&&(n.lastComponent={count:b,previousComponent:n.lastComponent,added:!1,removed:!1}),n.oldPos=h,p}equals(n,i,l){return l.comparator?l.comparator(n,i):n===i||!!l.ignoreCase&&n.toLowerCase()===i.toLowerCase()}removeEmpty(n){const i=[];for(let l=0;l<n.length;l++)n[l]&&i.push(n[l]);return i}castInput(n,i){return n}tokenize(n,i){return Array.from(n)}join(n){return n.join("")}postProcess(n,i){return n}get useLongestToken(){return!1}buildValues(n,i,l){const o=[];let u;for(;n;)o.push(n),u=n.previousComponent,delete n.previousComponent,n=u;o.reverse();const c=o.length;let f=0,h=0,p=0;for(;f<c;f++){const b=o[f];if(b.removed)b.value=this.join(l.slice(p,p+b.count)),p+=b.count;else{if(!b.added&&this.useLongestToken){let g=i.slice(h,h+b.count);g=g.map(function(v,x){const w=l[p+x];return w.length>v.length?w:v}),b.value=this.join(g)}else b.value=this.join(i.slice(h,h+b.count));h+=b.count,b.added||(p+=b.count)}}return o}}function qx(e,n){let i;for(i=0;i<e.length&&i<n.length;i++)if(e[i]!=n[i])return e.slice(0,i);return e.slice(0,i)}function Px(e,n){let i;if(!e||!n||e[e.length-1]!=n[n.length-1])return"";for(i=0;i<e.length&&i<n.length;i++)if(e[e.length-(i+1)]!=n[n.length-(i+1)])return e.slice(-i);return e.slice(-i)}function hh(e,n,i){if(e.slice(0,n.length)!=n)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(n)}; this is a bug`);return i+e.slice(n.length)}function ph(e,n,i){if(!n)return e+i;if(e.slice(-n.length)!=n)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(n)}; this is a bug`);return e.slice(0,-n.length)+i}function qa(e,n){return hh(e,n,"")}function Is(e,n){return ph(e,n,"")}function Vx(e,n){return n.slice(0,lR(e,n))}function lR(e,n){let i=0;e.length>n.length&&(i=e.length-n.length);let l=n.length;e.length<n.length&&(l=e.length);const o=Array(l);let u=0;o[0]=0;for(let c=1;c<l;c++){for(n[c]==n[u]?o[c]=o[u]:o[c]=u;u>0&&n[c]!=n[u];)u=o[u];n[c]==n[u]&&u++}u=0;for(let c=i;c<e.length;c++){for(;u>0&&e[c]!=n[u];)u=o[u];e[c]==n[u]&&u++}return u}function Pa(e){let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function ri(e){const n=e.match(/^\s*/);return n?n[0]:""}const mu="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}",aR=new RegExp(`[${mu}]+|\\s+|[^${mu}]`,"ug");class oR extends sp{equals(n,i,l){return l.ignoreCase&&(n=n.toLowerCase(),i=i.toLowerCase()),n.trim()===i.trim()}tokenize(n,i={}){let l;if(i.intlSegmenter){const c=i.intlSegmenter;if(c.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');l=[];for(const f of Array.from(c.segment(n))){const h=f.segment;l.length&&/\s/.test(l[l.length-1])&&/\s/.test(h)?l[l.length-1]+=h:l.push(h)}}else l=n.match(aR)||[];const o=[];let u=null;return l.forEach(c=>{/\s/.test(c)?u==null?o.push(c):o.push(o.pop()+c):u!=null&&/\s/.test(u)?o[o.length-1]==u?o.push(o.pop()+c):o.push(u+c):o.push(c),u=c}),o}join(n){return n.map((i,l)=>l==0?i:i.replace(/^\s+/,"")).join("")}postProcess(n,i){if(!n||i.oneChangePerToken)return n;let l=null,o=null,u=null;return n.forEach(c=>{c.added?o=c:c.removed?u=c:((o||u)&&Gx(l,u,o,c),l=c,o=null,u=null)}),(o||u)&&Gx(l,u,o,null),n}}const sR=new oR;function uR(e,n,i){return sR.diff(e,n,i)}function Gx(e,n,i,l){if(n&&i){const o=ri(n.value),u=Pa(n.value),c=ri(i.value),f=Pa(i.value);if(e){const h=qx(o,c);e.value=ph(e.value,c,h),n.value=qa(n.value,h),i.value=qa(i.value,h)}if(l){const h=Px(u,f);l.value=hh(l.value,f,h),n.value=Is(n.value,h),i.value=Is(i.value,h)}}else if(i){if(e){const o=ri(i.value);i.value=i.value.substring(o.length)}if(l){const o=ri(l.value);l.value=l.value.substring(o.length)}}else if(e&&l){const o=ri(l.value),u=ri(n.value),c=Pa(n.value),f=qx(o,u);n.value=qa(n.value,f);const h=Px(qa(o,f),c);n.value=Is(n.value,h),l.value=hh(l.value,o,h),e.value=ph(e.value,o,o.slice(0,o.length-h.length))}else if(l){const o=ri(l.value),u=Pa(n.value),c=Vx(u,o);n.value=Is(n.value,c)}else if(e){const o=Pa(e.value),u=ri(n.value),c=Vx(o,u);n.value=qa(n.value,c)}}class cR extends sp{tokenize(n){const i=new RegExp(`(\\r?\\n)|[${mu}]+|[^\\S\\n\\r]+|[^${mu}]`,"ug");return n.match(i)||[]}}const fR=new cR;function dR(e,n,i){return fR.diff(e,n,i)}class hR extends sp{constructor(){super(...arguments),this.tokenize=gR}equals(n,i,l){return l.ignoreWhitespace?((!l.newlineIsToken||!n.includes(`
|
|
62
|
-
`))&&(n=n.trim()),(!l.newlineIsToken||!i.includes(`
|
|
63
|
-
`))&&(i=i.trim())):l.ignoreNewlineAtEof&&!l.newlineIsToken&&(n.endsWith(`
|
|
64
|
-
`)&&(n=n.slice(0,-1)),i.endsWith(`
|
|
65
|
-
`)&&(i=i.slice(0,-1))),super.equals(n,i,l)}}const pR=new hR;function mR(e,n,i){return pR.diff(e,n,i)}function gR(e,n){n.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
66
|
-
`));const i=[],l=e.split(/(\n|\r\n)/);l[l.length-1]||l.pop();for(let o=0;o<l.length;o++){const u=l[o];o%2&&!n.newlineIsToken?i[i.length-1]+=u:i.push(u)}return i}function jv(e,n){const i=dR(e,n),l=[],o=[];for(const u of i)u.added?o.push({value:u.value,type:"added"}):u.removed?l.push({value:u.value,type:"removed"}):(l.push({value:u.value,type:"unchanged"}),o.push({value:u.value,type:"unchanged"}));return{oldSegments:l,newSegments:o}}function _v(e,n){if(!e.trim()||!n.trim()||e===n)return!1;const i=uR(e,n);let l=0,o=0;for(const c of i)o+=c.value.length,!c.added&&!c.removed&&(l+=c.value.length);return l/o>=.2}const gu=Wt.memo(({onMouseDown:e,onMouseUp:n,title:i="Add a comment"})=>y.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:l=>{l.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",l.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:l=>{l.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",l.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},onMouseDown:e,onMouseUp:n,title:i,children:y.jsx(M1,{className:"w-4 h-4"})}));gu.displayName="CommentButton";const bu=Wt.memo(({onClick:e,title:n="Open in editor",className:i})=>y.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 ${i||""}`,"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:l=>{l.currentTarget.style.backgroundColor="var(--color-editor-btn-hover-bg)",l.currentTarget.style.borderColor="var(--color-editor-btn-hover-border)"},onMouseLeave:l=>{l.currentTarget.style.backgroundColor="var(--color-editor-btn-bg)",l.currentTarget.style.borderColor="var(--color-editor-btn-border)"},onMouseDown:l=>{l.stopPropagation()},onClick:l=>{l.stopPropagation(),e(l)},title:n,children:y.jsx(pk,{className:"w-4 h-4 opacity-80"})}));bu.displayName="OpenInEditorButton";const bR=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"}},Lv=Wt.memo(({line:e,index:n,lineId:i,isCurrentLine:l=!1,hoveredLineIndex:o,selectedLineStyle:u,onMouseEnter:c,onMouseLeave:f,onMouseMove:h,onCommentButtonMouseDown:p,onCommentButtonMouseUp:b,onOpenInEditor:g,syntaxTheme:v,onClick:x,filename:w,diffSegments:S})=>{const A=e.newLineNumber||e.oldLineNumber,C=o===n&&A,E=l?"keyboard-cursor":"";return y.jsxs("tr",{id:i,className:`group ${bR(e)} relative ${u} ${E} cursor-pointer`,onMouseEnter:c,onMouseLeave:f,onMouseMove:h,onClick:x,children:[y.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||""}),y.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:[y.jsx("span",{children:e.newLineNumber||""}),C&&y.jsxs(y.Fragment,{children:[g&&y.jsx(bu,{onClick:g}),y.jsx(gu,{onMouseDown:p,onMouseUp:b})]})]}),y.jsx("td",{className:"p-0 w-full relative align-top",children:y.jsx(X1,{line:e,syntaxTheme:v,filename:w,diffSegments:S})})]})});Lv.displayName="DiffLineRow";const Yx=e=>e!==void 0&&"isExpanded"in e&&e.isExpanded===!0,Xx=(e,n)=>n?"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 yR({chunk:e,chunkIndex:n,threads:i,showAuthorBadges:l=!1,onAddComment:o,onGenerateThreadPrompt:u,onRemoveThread:c,onReplyToThread:f,onRemoveMessage:h,onUpdateMessage:p,syntaxTheme:b,cursor:g=null,fileIndex:v=0,onLineClick:x,commentTrigger:w,onCommentTriggerHandled:S,filename:A,onOpenInEditor:C}){const[E,R]=N.useState(null),[z,$]=N.useState(null),[_,F]=N.useState(!1),[P,O]=N.useState(null),[L,I]=N.useState(null);N.useEffect(()=>{if(w?.lineIndex!==void 0){const j=e.lines[w.lineIndex];if(j&&j.type!=="delete"){const B=j.newLineNumber;B&&(O({side:"new",lineNumber:B}),S?.())}}},[w,e.lines,S]),N.useEffect(()=>{if(_){const j=()=>{F(!1),R(null),$(null)};return document.addEventListener("mouseup",j),()=>{document.removeEventListener("mouseup",j)}}},[_]);const q=N.useCallback((j,B)=>{P?.side===j&&P?.lineNumber===B?O(null):O({side:j,lineNumber:B})},[P]),K=N.useCallback(()=>{O(null)},[]),U=N.useCallback(()=>{if(!P)return"";const{side:j,lineNumber:B}=P,T=e.lines;if(typeof B=="number")return T.find(W=>j==="old"?W.oldLineNumber===B:W.newLineNumber===B)?.content?.replace(/^[+-]/,"")||"";{const[J,W]=B;return T.filter(de=>{const me=j==="old"?de.oldLineNumber:de.newLineNumber;return me!==void 0&&me>=J&&me<=W}).map(de=>de.content?.replace(/^[+-]/,"")||"").join(`
|
|
67
|
-
`)}},[P,e.lines]),G=N.useCallback(async j=>{if(P!==null){const B=U();await o(P.lineNumber,j,B||void 0,P.side),O(null)}},[P,o,U]),H=(j,B)=>i.filter(T=>{const J=Array.isArray(T.line)?T.line[1]===j:T.line===j,W=!T.side||T.side===B;return J&&W}).sort((T,J)=>T.createdAt.localeCompare(J.createdAt)),X=j=>j.oldLine?.type==="delete"&&j.newLine?.type==="add"?j.newLineNumber?"right":"left":j.oldLine?.type==="delete"?"left":j.newLine?.type==="add"?"right":"full",Y=(j,B)=>{const T=j==="old"?B.oldLineNumber:B.newLineNumber;if(!T)return"";if(_&&E&&z&&E.side===j&&z.side===j){const J=Math.min(E.lineNumber,z.lineNumber),W=Math.max(E.lineNumber,z.lineNumber);if(T>=J&&T<=W){let ie="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 T===J&&(ie+=" after:border-t-2"),T===W&&(ie+=" after:border-b-2"),ie}}if(P&&P.side===j){const J=Array.isArray(P.lineNumber)?P.lineNumber:[P.lineNumber,P.lineNumber],W=J[0],ie=J[1];if(W!==void 0&&ie!==void 0&&T>=W&&T<=ie)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""},ne=N.useCallback(j=>{const B=[];let T=e.oldStart,J=e.newStart,W=0;for(;W<j.length;){const ie=j[W];if(!ie){W++;continue}if(ie.type==="normal")B.push({oldLine:ie,newLine:{...ie},oldLineNumber:ie.oldLineNumber??T,newLineNumber:ie.newLineNumber??J,oldLineOriginalIndex:W,newLineOriginalIndex:W}),T++,J++,W++;else if(ie.type==="delete"){let de=W+1;for(;de<j.length&&j[de]?.type==="delete";)de++;const me=j.slice(W,de),ye=W,Se=[],Le=de;for(;de<j.length&&j[de]?.type==="add";){const xe=j[de];xe&&Se.push(xe),de++}const be=Math.max(me.length,Se.length);for(let xe=0;xe<be;xe++){const he=me[xe],ve=Se[xe];let Ce;he&&ve&&_v(he.content,ve.content)&&(Ce=jv(he.content,ve.content)),B.push({oldLine:he,newLine:ve,oldLineNumber:he?he.oldLineNumber??T+xe:void 0,newLineNumber:ve?ve.newLineNumber??J+xe:void 0,oldLineOriginalIndex:he?ye+xe:void 0,newLineOriginalIndex:ve?Le+xe:void 0,wordLevelDiff:Ce})}T+=me.length,J+=Se.length,W=de}else ie.type==="add"&&(B.push({newLine:ie,newLineNumber:ie.newLineNumber??J,newLineOriginalIndex:W}),J++,W++)}return B},[e.oldStart,e.newStart]),M=N.useMemo(()=>ne(e.lines),[e.lines,ne]);return y.jsx("div",{className:"bg-github-bg-primary overflow-hidden",children:y.jsx("table",{className:"w-full table-fixed border-collapse font-mono text-sm leading-5",children:y.jsx("tbody",{children:M.map((j,B)=>{const T=j.oldLineNumber?H(j.oldLineNumber,"old"):[],J=j.newLineNumber?H(j.newLineNumber,"new"):[],W=[...T,...J],ie=j.oldLineOriginalIndex??-1,de=j.newLineOriginalIndex??-1,me=g?g.side==="left"&&ie>=0?g.chunkIndex===n&&g.lineIndex===ie:g.side==="right"&&de>=0?g.chunkIndex===n&&g.lineIndex===de:!1:!1,ye=ie>=0?`file-${v}-chunk-${n}-line-${ie}-left`:void 0,Se=de>=0?`file-${v}-chunk-${n}-line-${de}-right`:void 0,Le=me&&g?.side==="left",be=me&&g?.side==="right",xe="keyboard-cursor";return y.jsxs(Wt.Fragment,{children:[y.jsxs("tr",{className:"group cursor-pointer",onClick:he=>{if(!_){const ve=he.target;if(!(ve instanceof HTMLElement))return;const Ce=ve.closest("td:nth-child(1)")||ve.closest("td:nth-child(2)"),Ne=ve.closest("td:nth-child(3)")||ve.closest("td:nth-child(4)");Ce&&ie>=0?x?.(v,n,ie,"left"):Ne&&de>=0&&x?.(v,n,de,"right")}},onMouseEnter:he=>{const ve=he.target;if(!(ve instanceof HTMLElement))return;const Ce=ve.closest("td:nth-child(1)")||ve.closest("td:nth-child(2)"),Ne=ve.closest("td:nth-child(3)")||ve.closest("td:nth-child(4)");Ce&&j.oldLineNumber?I({side:"old",lineNumber:j.oldLineNumber}):Ne&&j.newLineNumber&&I({side:"new",lineNumber:j.newLineNumber})},onMouseMove:he=>{const ve=he.target;if(!(ve instanceof HTMLElement))return;const Ce=ve.closest("td:nth-child(1)")||ve.closest("td:nth-child(2)"),Ne=ve.closest("td:nth-child(3)")||ve.closest("td:nth-child(4)");Ce&&j.oldLineNumber?(L?.side!=="old"||L?.lineNumber!==j.oldLineNumber)&&I({side:"old",lineNumber:j.oldLineNumber}):Ne&&j.newLineNumber&&(L?.side!=="new"||L?.lineNumber!==j.newLineNumber)&&I({side:"new",lineNumber:j.newLineNumber}),_&&E&&(E.side==="old"&&j.oldLineNumber?$({side:"old",lineNumber:j.oldLineNumber}):E.side==="new"&&j.newLineNumber&&$({side:"new",lineNumber:j.newLineNumber}))},onMouseLeave:()=>I(null),children:[y.jsxs("td",{id:ye,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 ${Le?xe:""}`,children:[y.jsx("span",{children:j.oldLineNumber||""}),L?.side==="old"&&L?.lineNumber===j.oldLineNumber&&y.jsxs(y.Fragment,{children:[C&&A&&j.oldLine?.type!=="delete"&&j.newLineNumber!==void 0&&y.jsx(bu,{onClick:()=>{const he=j.newLineNumber;!A||he===void 0||C(A,he)}}),y.jsx(gu,{onMouseDown:he=>{he.stopPropagation(),j.oldLineNumber&&(R({side:"old",lineNumber:j.oldLineNumber}),$({side:"old",lineNumber:j.oldLineNumber}),F(!0))},onMouseUp:he=>{if(he.stopPropagation(),!j.oldLineNumber||!E){F(!1),R(null),$(null);return}const ve=z&&z.side==="old"?z.lineNumber:j.oldLineNumber;if(E.side!=="old"||E.lineNumber===ve)q("old",j.oldLineNumber);else{const Ce=Math.min(E.lineNumber,ve),Ne=Math.max(E.lineNumber,ve);q("old",[Ce,Ne])}F(!1),R(null),$(null)}})]})]}),y.jsx("td",{className:`w-1/2 p-0 align-top border-r border-github-border relative ${Xx(j.oldLine,Yx(j.oldLine))} ${Y("old",j)} ${Le?xe:""}`,children:j.oldLine&&y.jsx("div",{className:"flex items-center relative min-h-[20px] px-3",children:j.wordLevelDiff?y.jsx(Yd,{segments:j.wordLevelDiff.oldSegments,className:"flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text"}):y.jsx(Ja,{code:j.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:b,filename:A})})}),y.jsxs("td",{id:Se,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 ${be?xe:""}`,children:[y.jsx("span",{children:j.newLineNumber||""}),L?.side==="new"&&L?.lineNumber===j.newLineNumber&&y.jsxs(y.Fragment,{children:[C&&A&&j.newLineNumber!==void 0&&y.jsx(bu,{onClick:()=>{const he=j.newLineNumber;!A||he===void 0||C(A,he)}}),y.jsx(gu,{onMouseDown:he=>{he.stopPropagation(),j.newLineNumber&&(R({side:"new",lineNumber:j.newLineNumber}),$({side:"new",lineNumber:j.newLineNumber}),F(!0))},onMouseUp:he=>{if(he.stopPropagation(),!j.newLineNumber||!E){F(!1),R(null),$(null);return}const ve=z&&z.side==="new"?z.lineNumber:j.newLineNumber;if(E.side!=="new"||E.lineNumber===ve)q("new",j.newLineNumber);else{const Ce=Math.min(E.lineNumber,ve),Ne=Math.max(E.lineNumber,ve);q("new",[Ce,Ne])}F(!1),R(null),$(null)}})]})]}),y.jsx("td",{className:`w-1/2 p-0 align-top relative ${Xx(j.newLine,Yx(j.newLine))} ${Y("new",j)} ${be?xe:""}`,children:j.newLine&&y.jsx("div",{className:"flex items-center relative min-h-[20px] px-3",children:j.wordLevelDiff?y.jsx(Yd,{segments:j.wordLevelDiff.newSegments,className:"flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text"}):y.jsx(Ja,{code:j.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:b,filename:A})})})]}),W.length>0&&y.jsx("tr",{className:"bg-github-bg-secondary",children:y.jsx("td",{colSpan:4,className:"p-0 border-t border-github-border",children:W.map(he=>{const ve=he.side||"new";let Ce;return ve==="old"&&j.oldLineNumber?Ce="left":ve==="new"&&j.newLineNumber?Ce="right":Ce=X(j),y.jsx("div",{className:`flex ${Ce==="left"?"justify-start":Ce==="right"?"justify-end":"justify-center"}`,children:y.jsx("div",{className:`${Ce==="full"?"w-full":"w-1/2"}`,children:y.jsx("div",{className:"m-2 mx-3",children:y.jsx(Lh,{thread:he,showAuthorBadges:l,onGeneratePrompt:u,onRemoveThread:c,onReplyToThread:f,onRemoveMessage:h,onUpdateMessage:p,syntaxTheme:b})})})},he.id)})})}),P&&(P.side==="old"&&P.lineNumber===j.oldLineNumber||P.side==="new"&&P.lineNumber===j.newLineNumber||Array.isArray(P.lineNumber)&&(P.side==="new"&&P.lineNumber[1]===j.newLineNumber||P.side==="old"&&P.lineNumber[1]===j.oldLineNumber))&&y.jsx("tr",{className:"bg-github-bg-secondary",children:y.jsx("td",{colSpan:4,className:"p-0",children:y.jsx("div",{className:`flex ${P.side==="old"?"justify-start":P.side==="new"?"justify-end":"justify-center"}`,children:y.jsx("div",{className:"w-1/2",children:y.jsx(Nu,{onSubmit:G,onCancel:K,selectedCode:U(),syntaxTheme:b,filename:A})})})})})]},B)})})})})}const xR=N.memo(function({chunk:n,chunkIndex:i,threads:l,showAuthorBadges:o=!1,onAddComment:u,onGenerateThreadPrompt:c,onRemoveThread:f,onReplyToThread:h,onRemoveMessage:p,onUpdateMessage:b,mode:g=lo,syntaxTheme:v,cursor:x=null,fileIndex:w=0,onLineClick:S,commentTrigger:A,onCommentTriggerHandled:C,filename:E,onOpenInEditor:R}){const[z,$]=N.useState(null),[_,F]=N.useState(null),[P,O]=N.useState(!1),[L,I]=N.useState(null),[q,K]=N.useState(null);N.useEffect(()=>{if(A?.lineIndex!==void 0){const B=n.lines[A.lineIndex];if(B){const T=B.newLineNumber||B.oldLineNumber,J=B.type==="delete"?"old":"new";T&&(I({side:J,lineNumber:T}),C?.())}}},[A,n.lines,C]),N.useEffect(()=>{if(P){const B=()=>{O(!1),$(null),F(null)};return document.addEventListener("mouseup",B),()=>{document.removeEventListener("mouseup",B)}}},[P]);const U=N.useCallback((B,T)=>{L?.side===B&&L?.lineNumber===T?I(null):I({side:B,lineNumber:T})},[L]),G=N.useCallback(()=>{I(null)},[]),H=N.useCallback(()=>{if(!L)return"";const{side:B,lineNumber:T}=L,J=n.lines;if(typeof T=="number")return J.find(ie=>B==="old"?ie.oldLineNumber===T:ie.newLineNumber===T)?.content?.replace(/^[+-]/,"")||"";{const[W,ie]=T;return J.filter(me=>{const ye=B==="old"?me.oldLineNumber:me.newLineNumber;return ye!==void 0&&ye>=W&&ye<=ie}).map(me=>me.content?.replace(/^[+-]/,"")||"").join(`
|
|
68
|
-
`)}},[L,n.lines]),X=N.useCallback(async B=>{if(L!==null){const T=H();await u(L.lineNumber,B,T||void 0,L.side),I(null)}},[L,u,H]),Y=(B,T)=>l.filter(J=>{const W=Array.isArray(J.line)?J.line[1]===B:J.line===B,ie=!J.side||J.side===T;return W&&ie}).sort((J,W)=>J.createdAt.localeCompare(W.createdAt)),ne=B=>{if(g==="unified")return"full";switch(B.type){case"delete":return"left";case"add":return"right";default:return"full"}},M=(B,T)=>{if(!B)return"";if(P&&z&&_){const J=Math.min(z,_),W=Math.max(z,_);if(B>=J&&B<=W){let ie="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 B===J&&(ie+=" after:border-t-2"),B===W&&(ie+=" after:border-b-2"),ie}}if(L&&L.side===T){const J=Array.isArray(L.lineNumber)?L.lineNumber[0]:L.lineNumber,W=Array.isArray(L.lineNumber)?L.lineNumber[1]:L.lineNumber;if(B>=J&&B<=W)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""},j=N.useMemo(()=>{const B=new Map,T=n.lines;let J=0;for(;J<T.length;){const W=T[J];if(!W){J++;continue}if(W.type==="delete"){let ie=J+1;for(;ie<T.length&&T[ie]?.type==="delete";)ie++;const de=T.slice(J,ie),me=J,ye=[];for(;ie<T.length&&T[ie]?.type==="add";){const Le=T[ie];Le&&ye.push({line:Le,index:ie}),ie++}const Se=Math.max(de.length,ye.length);for(let Le=0;Le<Se;Le++){const be=de[Le],xe=ye[Le];if(be&&xe&&_v(be.content,xe.line.content)){const he=jv(be.content,xe.line.content);B.set(me+Le,he.oldSegments),B.set(xe.index,he.newSegments)}}J=ie}else J++}return B},[n.lines]);return g==="split"?y.jsx(yR,{chunk:n,chunkIndex:i,threads:l,showAuthorBadges:o,onAddComment:u,onGenerateThreadPrompt:c,onRemoveThread:f,onReplyToThread:h,onRemoveMessage:p,onUpdateMessage:b,onOpenInEditor:R,syntaxTheme:v,cursor:x,fileIndex:w,onLineClick:S,filename:E,commentTrigger:A,onCommentTriggerHandled:C}):y.jsx("div",{className:"bg-github-bg-primary",children:y.jsx("table",{className:"w-full table-fixed border-collapse font-mono text-sm leading-5",children:y.jsx("tbody",{children:n.lines.map((B,T)=>{const J=B.newLineNumber||B.oldLineNumber||0,W=B.type==="delete"?"old":"new",ie=L?Array.isArray(L.lineNumber)?L.lineNumber[1]:L.lineNumber:null,de=B.type==="delete"?B.oldLineNumber:B.newLineNumber,me=B.type==="delete"?"old":"new",ye=de?Y(de,me):[],Se=`file-${w}-chunk-${i}-line-${T}`,Le=x&&x.chunkIndex===i&&x.lineIndex===T;return y.jsxs(Wt.Fragment,{children:[y.jsx(Lv,{line:B,index:T,lineId:Se,isCurrentLine:Le||!1,hoveredLineIndex:q,selectedLineStyle:M(B.newLineNumber||B.oldLineNumber,B.type==="delete"?"old":"new"),onMouseEnter:()=>{K(T)},onMouseLeave:()=>K(null),onMouseMove:()=>{if(P&&z){const be=B.newLineNumber||B.oldLineNumber;be&&F(be)}},onCommentButtonMouseDown:be=>{be.stopPropagation();const xe=B.newLineNumber||B.oldLineNumber;xe&&($(xe),F(xe),O(!0))},onCommentButtonMouseUp:be=>{be.stopPropagation();const xe=B.newLineNumber||B.oldLineNumber,he=B.type==="delete"?"old":"new";if(!xe||!z){O(!1),$(null),F(null);return}const ve=_||xe;if(z===ve)U(he,xe);else{const Ce=Math.min(z,ve),Ne=Math.max(z,ve);U(he,[Ce,Ne])}O(!1),$(null),F(null)},onOpenInEditor:R&&E&&B.type!=="delete"&&(B.newLineNumber||B.oldLineNumber)?()=>{const be=B.newLineNumber||B.oldLineNumber;be&&E&&R(E,be)}:void 0,syntaxTheme:v,filename:E,diffSegments:j.get(T),onClick:()=>{const be=B.type==="delete"?"left":"right";S?.(w,i,T,be)}}),ye.map(be=>{const xe=ne(B);return y.jsx("tr",{className:"bg-github-bg-secondary",children:y.jsx("td",{colSpan:3,className:"p-0 border-t border-github-border",children:y.jsx("div",{className:`flex ${xe==="left"?"justify-start":xe==="right"?"justify-end":"justify-center"}`,children:y.jsx("div",{className:`${xe==="full"?"w-full":"w-1/2"} m-2 mx-4`,children:y.jsx(Lh,{thread:be,showAuthorBadges:o,onGeneratePrompt:c,onRemoveThread:f,onReplyToThread:h,onRemoveMessage:p,onUpdateMessage:b,syntaxTheme:v})})})})},be.id)}),L&&L.side===W&&ie===J&&y.jsx("tr",{className:"bg-[var(--bg-secondary)]",children:y.jsx("td",{colSpan:3,className:"p-0",children:y.jsx("div",{className:`flex ${ne(B)==="left"?"justify-start":ne(B)==="right"?"justify-end":"justify-center"}`,children:y.jsx("div",{className:`${ne(B)==="full"?"w-full":"w-1/2"}`,children:y.jsx(Nu,{onSubmit:X,onCancel:G,selectedCode:H(),syntaxTheme:v,filename:E})})})})})]},T)})})})})}),Od=20,zd=N.memo(function({direction:n,hiddenLines:i,onExpandUp:l,onExpandDown:o,onExpandAll:u,isLoading:c=!1}){if(i<=0)return null;const f=`${i} ${i===1?"line":"lines"}`,h=i<=Od,p="grid-cols-[var(--line-number-width)_1fr]",b="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",g=[];return h?g.push({key:"all",onClick:u,ariaLabel:`Expand all ${i} hidden lines`,icon:y.jsx(Jk,{size:16,"aria-hidden":"true"})}):((n==="up"||n==="both")&&g.push({key:"up",onClick:l,ariaLabel:`Expand ${Od} hidden lines above`,icon:y.jsx(KS,{size:12,"aria-hidden":"true",className:"translate-y-0.5"})}),(n==="down"||n==="both")&&g.push({key:"down",onClick:o,ariaLabel:`Expand ${Od} hidden lines below`,icon:y.jsx(XS,{size:12,"aria-hidden":"true",className:"-translate-y-0.5"})})),y.jsxs("div",{className:`grid w-full border-l border-r border-github-border bg-github-bg-tertiary text-sm ${p}`,children:[y.jsx("div",{className:"flex flex-col items-stretch justify-center gap-0.5 border-r border-github-border",children:c?y.jsx(_k,{size:14,className:"animate-spin text-github-text-muted self-center","aria-hidden":"true"}):g.map(v=>y.jsx("button",{type:"button",onClick:v.onClick,disabled:c||!v.onClick,className:b,title:v.ariaLabel,"aria-label":v.ariaLabel,children:v.icon},v.key))}),y.jsx("div",{className:"flex items-center justify-start px-3 py-1.5 font-mono text-github-text-muted select-none",children:f})]})});function yu({file:e,threads:n,showAuthorBadges:i,diffMode:l,syntaxTheme:o,cursor:u,fileIndex:c,mergedChunks:f,isExpandLoading:h,expandHiddenLines:p,expandAllBetweenChunks:b,onAddComment:g,onGenerateThreadPrompt:v,onRemoveThread:x,onReplyToThread:w,onRemoveMessage:S,onUpdateMessage:A,onLineClick:C,onOpenInEditor:E,commentTrigger:R,onCommentTriggerHandled:z}){const $=(_,F,P,O)=>_==="top"&&F.hiddenLinesBefore>0?y.jsx(zd,{direction:"down",hiddenLines:F.hiddenLinesBefore,onExpandDown:()=>p(e,P,"up"),onExpandAll:()=>b(e,P,F.hiddenLinesBefore),isLoading:h}):_==="middle"&&F.hiddenLinesBefore>0?y.jsx(zd,{direction:"both",hiddenLines:F.hiddenLinesBefore,onExpandUp:()=>p(e,P-1,"down"),onExpandDown:()=>p(e,P,"up"),onExpandAll:()=>b(e,P,F.hiddenLinesBefore),isLoading:h}):_==="bottom"&&F.hiddenLinesAfter>0?y.jsx(zd,{direction:"up",hiddenLines:F.hiddenLinesAfter,onExpandUp:()=>p(e,O,"down"),onExpandAll:()=>p(e,O,"down",F.hiddenLinesAfter),isLoading:h}):null;return y.jsx(y.Fragment,{children:f.map((_,F)=>{const P=F===0,O=F===f.length-1,L=_.originalIndices[0]??0,I=_.originalIndices[_.originalIndices.length-1]??0;return y.jsxs(Wt.Fragment,{children:[P&&$("top",_,L,I),!P&&$("middle",_,L,I),y.jsx("div",{id:`chunk-${e.path.replace(/[^a-zA-Z0-9]/g,"-")}-${F}`,children:y.jsx(xR,{chunk:_,chunkIndex:F,threads:n,showAuthorBadges:i,onAddComment:g,onGenerateThreadPrompt:v,onRemoveThread:x,onReplyToThread:w,onRemoveMessage:S,onUpdateMessage:A,onOpenInEditor:E,mode:l,syntaxTheme:o,cursor:u&&u.chunkIndex===F?u:null,fileIndex:c,onLineClick:C,commentTrigger:R&&R.chunkIndex===F?R:null,onCommentTriggerHandled:z,filename:e.path})}),O&&$("bottom",_,L,I)]},F)})})}const vR=e=>!!(e&&e!=="stdin"),Dl=["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"],wR=e=>e.type==="delete"||e.type==="remove",SR=e=>e.type==="normal"||e.type==="context",xu=e=>/^(https?:|mailto:|#|\.{0,2}\/|\/)/i.test(e.trim()),mh=(e,n,i)=>{const l=e[e.length-1];if(l&&l.type===n){l.lines.push(i);return}e.push({type:n,lines:[i]})},Id=(e,n)=>{n.forEach(i=>mh(e,"delete",i)),n.length=0},kR=e=>{const n=[],i=[];let l=!1;return e.forEach(o=>{o.lines.forEach(u=>{if(!(u.type==="header"||u.type==="hunk")){if(wR(u)){i.push(u.content);return}if(u.type==="add"){i.length>0&&(Id(n,i),l=!0),mh(n,l?"change":"add",u.content);return}SR(u)&&(Id(n,i),l=!1,mh(n,"context",u.content))}}),Id(n,i),l=!1}),n},ER=e=>Wt.isValidElement(e),CR=e=>Wt.isValidElement(e),gh=e=>e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(gh).join(""):ER(e)?gh(e.props.children):"",Dv=e=>({h1:({children:n})=>y.jsx("h1",{className:`${Dl[0]} mt-6 mb-2 first:mt-0`,children:n}),h2:({children:n})=>y.jsx("h2",{className:`${Dl[1]} mt-6 mb-2 first:mt-0`,children:n}),h3:({children:n})=>y.jsx("h3",{className:`${Dl[2]} mt-6 mb-2 first:mt-0`,children:n}),h4:({children:n})=>y.jsx("h4",{className:`${Dl[3]} mt-6 mb-2 first:mt-0`,children:n}),h5:({children:n})=>y.jsx("h5",{className:`${Dl[4]} mt-6 mb-2 first:mt-0`,children:n}),h6:({children:n})=>y.jsx("h6",{className:`${Dl[5]} mt-6 mb-2 first:mt-0`,children:n}),p:({children:n})=>y.jsx("p",{className:"text-base leading-7",children:n}),ul:({children:n})=>y.jsx("ul",{className:"list-disc pl-6 text-base space-y-1",children:n}),ol:({children:n})=>y.jsx("ol",{className:"list-decimal pl-6 text-base space-y-1",children:n}),li:({children:n})=>y.jsx("li",{children:n}),blockquote:({children:n})=>y.jsx("blockquote",{className:"border-l-4 border-github-border pl-4 text-github-text-muted italic",children:n}),hr:()=>y.jsx("hr",{className:"border-github-border"}),a:({href:n,children:i})=>{const l=n??"";if(!l||!xu(l))return y.jsx("span",{children:i});const o=l.startsWith("http");return y.jsx("a",{href:l,target:o?"_blank":void 0,rel:o?"noreferrer":void 0,className:"text-sky-400 hover:text-sky-300 underline underline-offset-4",children:i})},img:({src:n,alt:i})=>{const l=n??"";return!l||!xu(l)?null:y.jsx("img",{src:l,alt:i??"",loading:"lazy",className:"max-w-full rounded border border-github-border"})},pre:({children:n})=>{const l=(Array.isArray(n)?n:[n]).find(CR),o=gh(l??n),c=/language-(\S+)/.exec(l?.props.className??"")?.[1],f=o.replace(/\n$/,"");return c==="mermaid"&&f.trim()?y.jsx(iR,{chart:f}):o.trim()?y.jsx("pre",{className:"markdown-preview-code border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-sm",children:y.jsx(_h,{code:f,language:c,syntaxTheme:e,className:"font-mono text-github-text-primary"})}):y.jsx("pre",{className:"markdown-preview-code border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-sm",children:n})},code:({className:n,children:i})=>n?y.jsx("code",{className:n,children:i}):y.jsx("code",{className:"px-1 py-0.5 rounded bg-github-bg-tertiary border border-github-border text-sm font-mono",children:i})}),AR=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"}},NR=e=>/^\s*\[[^\]]+\]:\s+\S+/.test(e),TR=e=>/^\s*\[\^[^\]]+\]:\s+/.test(e),RR=e=>{const n=e.trim();return n.length>=7&&n.startsWith("<!--")&&n.endsWith("-->")},jR=e=>e.trim()===""||NR(e)||TR(e)||RR(e),_R=e=>e.every(jR),LR=e=>{const n=e.match(/^\s{0,3}(`{3,}|~{3,})(.*)$/);if(!n)return null;const i=n[1];return i?{marker:i[0],length:i.length,raw:e}:null},DR=(e,n)=>{const i=e.match(/^\s{0,3}(`{3,}|~{3,})\s*$/);return i?.[1]?i[1][0]===n.marker&&i[1].length>=n.length:!1},MR=e=>{const n=[];let i=null,l=null;const o=()=>{i&&(n.push(i),i=null)},u=(f,h)=>{if(i?.type===f){i.lines.push(h);return}o(),i={kind:"markdown",type:f,lines:[h]}},c=f=>{if(!l)return;const h=l.lines.every(p=>p.type==="context");f&&h?(u("context",l.fence.raw),l.lines.forEach(p=>{u("context",p.content)}),u("context",f)):(o(),n.push({kind:"fenced-code",lines:l.lines})),l=null};return e.forEach(f=>{f.lines.forEach(h=>{if(l){if(DR(h,l.fence)){c(h);return}l.lines.push({type:f.type,content:h});return}const p=LR(h);if(p){o(),l={fence:p,lines:[]};return}u(f.type,h)})}),c(),o(),n},OR=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"}},zR=({blocks:e,syntaxTheme:n})=>{const i=N.useMemo(()=>Dv(n),[n]),l=N.useMemo(()=>MR(e),[e]);return y.jsx("div",{className:"space-y-4",children:l.map((o,u)=>{if(o.kind==="fenced-code")return y.jsx("div",{className:"px-4",children:y.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:o.lines.map((p,b)=>y.jsx("div",{className:`${OR(p.type)} whitespace-pre px-3 py-1`,children:p.content||" "},`preview-code-line-${u}-${b}`))})},`preview-block-${u}`);const f=o.lines.join(`
|
|
69
|
-
`).trim();if(!f)return null;const h=_R(o.lines);return y.jsx("div",{className:`px-4 ${AR(o.type)}`,children:h?y.jsx("pre",{className:"whitespace-pre-wrap text-sm text-github-text-primary font-mono",children:f}):y.jsx(rp,{remarkPlugins:[op],urlTransform:p=>xu(p)?p:"",components:i,children:f})},`preview-block-${u}`)})})},IR=({content:e,syntaxTheme:n})=>{const i=N.useMemo(()=>Dv(n),[n]);return y.jsx("div",{className:"space-y-4",children:y.jsx(rp,{remarkPlugins:[op],urlTransform:l=>xu(l)?l:"",components:i,children:e})})};function FR(e){const{file:n,baseCommitish:i,targetCommitish:l,mergedChunks:o,syntaxTheme:u}=e,[c,f]=N.useState("diff"),[h,p]=N.useState(null),[b,g]=N.useState(!1),[v,x]=N.useState(null),[w,S]=N.useState(null),A=N.useMemo(()=>kR(o),[o]),C=N.useMemo(()=>!i&&!l?null:n.status==="added"?l?{path:n.path,ref:l}:null:n.status==="deleted"?i?{path:n.oldPath||n.path,ref:i}:null:l?{path:n.path,ref:l}:i?{path:n.oldPath||n.path,ref:i}:null,[i,l,n.path,n.oldPath,n.status]),E=N.useMemo(()=>C?`${C.ref}:${C.path}`:null,[C]);N.useEffect(()=>{if(!C||!E||!vR(C.ref)){p(null),S(null),x(null),g(!1);return}let z=!1;return(E!==w||h===null)&&(async()=>{E!==w&&p(null),g(!0),x(null);try{const _=encodeURIComponent(C.path),F=await fetch(`/api/blob/${_}?ref=${encodeURIComponent(C.ref)}`);if(!F.ok)throw new Error(`Failed to fetch preview: ${F.statusText}`);const P=await F.text();z||(p(P),S(E))}catch(_){z||(p(null),S(null),x(_ instanceof Error?_.message:"Failed to load preview"))}finally{z||g(!1)}})(),()=>{z=!0}},[h,w,C,E]);const R=N.useMemo(()=>E===w&&h!==null,[h,w,E]);return N.useEffect(()=>{c==="full-preview"&&!R&&f("diff-preview")},[R,c]),y.jsxs("div",{className:"bg-github-bg-primary",children:[y.jsx("div",{className:"flex items-center justify-between border-b border-github-border px-4 py-2",children:y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsxs("button",{onClick:()=>f("diff"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${c==="diff"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Code Diff",children:[y.jsx(ku,{size:14}),"Diff"]}),y.jsxs("button",{onClick:()=>f("diff-preview"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${c==="diff-preview"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Diff Preview",children:[y.jsx(qs,{size:14}),"Diff Preview"]}),R&&y.jsxs("button",{onClick:()=>f("full-preview"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${c==="full-preview"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Full Preview",children:[y.jsx(qs,{size:14}),"Full Preview"]})]})}),c==="diff"&&y.jsx(yu,{...e}),c==="diff-preview"&&y.jsx("div",{className:"p-4",children:y.jsx(zR,{blocks:A,syntaxTheme:u})}),c==="full-preview"&&y.jsxs("div",{className:"p-4",children:[b&&y.jsx("div",{className:"text-sm text-github-text-muted mb-3",children:"Loading preview..."}),v&&y.jsx("div",{className:"text-sm text-github-danger mb-3",children:v}),!b&&!v&&h!==null&&y.jsx(IR,{content:h,syntaxTheme:u}),!b&&!v&&h===null&&y.jsx("div",{className:"text-sm text-github-text-muted",children:"Preview unavailable."})]})]})}const Ml=["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"],Mv={markdown:"Markdown",code:"Code",raw:"Raw",unknown:"Cell"},BR=/"cell_type"\s*:\s*"([^"]+)"/,Zx=/"source"\s*:/,UR=/"execution_count"\s*:\s*(null|[0-9]+)/,HR=/"id"\s*:\s*"([^"]+)"/,$R=e=>e.type==="delete"||e.type==="remove",qR=e=>e.type==="normal"||e.type==="context",Ov=e=>e.type==="add"?"add":$R(e)?"delete":qR(e)?"context":null,zv=e=>e==="markdown"||e==="code"||e==="raw"?e:"unknown",PR=e=>{const n=e.trim();if(!n.startsWith('"'))return null;let i=n;i.endsWith(",")&&(i=i.slice(0,-1));try{const l=JSON.parse(i);return typeof l=="string"?l:null}catch{return i.replace(/^"/,"").replace(/"$/,"").replace(/\\n/g,`
|
|
70
|
-
`).replace(/\\t/g," ").replace(/\\"/g,'"').replace(/\\\\/g,"\\")}},VR=e=>{const n=e.indexOf('"source"');if(n===-1)return null;const i=e.indexOf(":",n);if(i===-1)return null;let l=e.slice(i+1).trim();if(!l)return null;if(l.endsWith(",")&&(l=l.slice(0,-1).trim()),l.startsWith("[")){const o=l.lastIndexOf("]");if(o===-1)return null;const u=l.slice(0,o+1);try{const c=JSON.parse(u);if(Array.isArray(c))return c.filter(f=>typeof f=="string")}catch{return null}return[]}if(l.startsWith('"'))try{const o=JSON.parse(l);return typeof o=="string"?[o]:null}catch{return null}return null},GR=e=>{const n=YR(e);if(n)return n;const i=[];let l=null,o=!1,u=!1,c=!1;const f=()=>{l&&(l.status=o&&u?"change":o?"add":u?"delete":"context",i.push(l),l=null,o=!1,u=!1,c=!1)},h=p=>{f(),l={cellType:p,sourceLines:[],status:"context"}};return e.forEach(p=>{p.lines.forEach(b=>{const g=Ov(b);if(!g)return;const v=b.content.match(BR);if(v?h(zv(v[1]??"")):!l&&Zx.test(b.content)&&h("unknown"),!l)return;if(g==="add"&&(o=!0),g==="delete"&&(u=!0),!l.id){const S=b.content.match(HR);S&&(l.id=S[1])}if(l.executionCount===void 0){const S=b.content.match(UR);S&&(l.executionCount=S[1]==="null"?null:S[1])}if(Zx.test(b.content)){const S=VR(b.content);if(S){S.forEach(A=>{l?.sourceLines.push({type:g,content:A})}),c=!1;return}c=!0;return}if(!c)return;if(b.content.trim().startsWith("]")){c=!1;return}const w=PR(b.content);w!==null&&l.sourceLines.push({type:g,content:w})})}),f(),{cells:i}},YR=e=>{const n=Kx(e,["add","context"]),i=Kx(e,["delete","context"]),l=Qa(n),o=Qa(i);if(!l&&!o||l&&l.cells.length===0&&!o)return null;const u=l?.language??o?.language;return{cells:Iv(o?.cells??[],l?.cells??[]),language:u}},Kx=(e,n)=>e.flatMap(i=>i.lines).map(i=>{const l=Ov(i);return!l||!n.includes(l)?null:i.content}).filter(i=>i!==null).join(`
|
|
71
|
-
`),Qa=e=>{if(!e.trim())return null;try{const n=JSON.parse(e);if(!n||typeof n!="object"||!("cells"in n))return null;const i=n.cells;if(!Array.isArray(i))return null;const l=n.metadata,o=XR(l);return{cells:i.map(u=>ZR(u)),language:o}}catch{return null}},XR=e=>{if(!e||typeof e!="object")return;const n=e,i=n.language_info;if(i&&typeof i=="object"){const o=i.name;if(typeof o=="string"&&o.trim())return o}const l=n.kernelspec;if(l&&typeof l=="object"){const o=l.language;if(typeof o=="string"&&o.trim())return o}},ZR=e=>{const n=typeof e=="object"&&e?e:{},i=typeof n.cell_type=="string"?n.cell_type:"",l=zv(i),o=typeof n.id=="string"?n.id:void 0,u=n.execution_count,c=u===null?null:typeof u=="number"?String(u):typeof u=="string"?u:void 0,f=KR(n.source);return{cellType:l,sourceText:f,id:o,executionCount:c}},KR=e=>typeof e=="string"?e:Array.isArray(e)?e.filter(n=>typeof n=="string").join(""):"",Iv=(e,n)=>{const i=[];if(e.some(u=>!!u.id)||n.some(u=>!!u.id)){const u=new Map;e.forEach((f,h)=>{f.id&&u.set(f.id,{cell:f,index:h})});const c=new Set;return n.forEach(f=>{const h=f.id?u.get(f.id):void 0;h&&c.add(h.index),i.push(Fd(h?.cell??null,f))}),e.forEach((f,h)=>{c.has(h)||i.push(Fd(f,null))}),i}const o=Math.max(e.length,n.length);for(let u=0;u<o;u+=1){const c=e[u]??null,f=n[u]??null;i.push(Fd(c,f))}return i},Fd=(e,n)=>{if(!n&&e)return{cellType:e.cellType,sourceLines:Va(e.sourceText,"delete"),status:"delete",id:e.id,executionCount:e.executionCount};if(n&&!e)return{cellType:n.cellType,sourceLines:Va(n.sourceText,"add"),status:"add",id:n.id,executionCount:n.executionCount};const i=e?.sourceText??"",l=n?.sourceText??"",o=n?.cellType??e?.cellType??"unknown",u=n?.id??e?.id,c=n?.executionCount??e?.executionCount;return i===l&&(e?.cellType??"")===(n?.cellType??"")?{cellType:o,sourceLines:Va(l,"context"),status:"context",id:u,executionCount:c}:{cellType:o,sourceLines:[...Va(i,"delete"),...Va(l,"add")],status:"change",id:u,executionCount:c}},Va=(e,n)=>e?[{type:n,content:e}]:[],Bd=e=>!!(e&&e!=="stdin"),Ud=async(e,n)=>{const i=encodeURIComponent(e),l=await fetch(`/api/blob/${i}?ref=${encodeURIComponent(n)}`);return l.ok?l.text():null},ql=(e,n)=>e.filter(i=>n.includes(i.type)).map(i=>i.content).join(""),Hd=e=>{if(!e)return[];const n=e.split(`
|
|
72
|
-
`);return n.length>0&&n[n.length-1]===""&&n.pop(),n},Fv=(e,n)=>!e&&!n?[]:e?n?mR(e,n).flatMap(i=>{const l=i.added?"add":i.removed?"delete":"context";return Hd(i.value).map(o=>({type:l,content:o}))}):Hd(e).map(i=>({type:"delete",content:i})):Hd(n).map(i=>({type:"add",content:i})),QR=e=>Wt.isValidElement(e),WR=e=>Wt.isValidElement(e),bh=e=>e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(bh).join(""):QR(e)?bh(e.props.children):"",JR=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"}},Qx=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"}},ej=e=>{switch(e){case"add":return"bg-diff-addition-bg";case"delete":return"bg-diff-deletion-bg";default:return"bg-transparent"}},tj=e=>{switch(e){case"add":return"+";case"delete":return"-";default:return" "}},nj=e=>{switch(e){case"add":return"text-github-accent";case"delete":return"text-github-danger";default:return"text-github-text-muted"}},yh=e=>/^(https?:|mailto:|#|\.{0,2}\/|\/)/i.test(e.trim()),rj=e=>({h1:({children:n})=>y.jsx("h1",{className:`${Ml[0]} mb-2`,children:n}),h2:({children:n})=>y.jsx("h2",{className:`${Ml[1]} mb-2`,children:n}),h3:({children:n})=>y.jsx("h3",{className:`${Ml[2]} mb-2`,children:n}),h4:({children:n})=>y.jsx("h4",{className:`${Ml[3]} mb-2`,children:n}),h5:({children:n})=>y.jsx("h5",{className:`${Ml[4]} mb-2`,children:n}),h6:({children:n})=>y.jsx("h6",{className:`${Ml[5]} mb-2`,children:n}),p:({children:n})=>y.jsx("p",{className:"text-sm leading-7",children:n}),ul:({children:n})=>y.jsx("ul",{className:"list-disc pl-6 text-sm space-y-1",children:n}),ol:({children:n})=>y.jsx("ol",{className:"list-decimal pl-6 text-sm space-y-1",children:n}),li:({children:n})=>y.jsx("li",{children:n}),blockquote:({children:n})=>y.jsx("blockquote",{className:"border-l-4 border-github-border pl-4 text-github-text-muted italic",children:n}),hr:()=>y.jsx("hr",{className:"border-github-border"}),a:({href:n,children:i})=>{const l=n??"";if(!l||!yh(l))return y.jsx("span",{children:i});const o=l.startsWith("http");return y.jsx("a",{href:l,target:o?"_blank":void 0,rel:o?"noreferrer":void 0,className:"text-sky-400 hover:text-sky-300 underline underline-offset-4",children:i})},img:({src:n,alt:i})=>{const l=n??"";return!l||!yh(l)?null:y.jsx("img",{src:l,alt:i??"",loading:"lazy",className:"max-w-full rounded border border-github-border"})},pre:({children:n})=>{const l=(Array.isArray(n)?n:[n]).find(WR),o=bh(l??n),c=/language-(\S+)/.exec(l?.props.className??"")?.[1];return o.trim()?y.jsx("pre",{className:"border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-xs",children:y.jsx(_h,{code:o.replace(/\n$/,""),language:c,syntaxTheme:e,className:"font-mono text-github-text-primary [&_.token-line]:block [&_.token-line]:whitespace-pre"})}):y.jsx("pre",{className:"border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-xs",children:n})},code:({className:n,children:i})=>n?y.jsx("code",{className:n,children:i}):y.jsx("code",{className:"px-1 py-0.5 rounded bg-github-bg-tertiary border border-github-border text-xs font-mono",children:i}),table:({children:n})=>y.jsx("div",{className:"overflow-x-auto",children:y.jsx("table",{className:"min-w-full border border-github-border",children:n})}),th:({children:n})=>y.jsx("th",{className:"border border-github-border px-2 py-1 bg-github-bg-tertiary text-sm",children:n}),td:({children:n})=>y.jsx("td",{className:"border border-github-border px-2 py-1 text-sm",children:n})}),ij=e=>{const n=ql(e.sourceLines,["context","delete"]),i=ql(e.sourceLines,["context","add"]),l=[];return e.status==="change"?(n.trim()&&l.push({label:"Before",content:n,tone:"before"}),i.trim()&&l.push({label:"After",content:i,tone:"after"}),l.length===0&&l.push({label:"After",content:i,tone:"after"}),l):e.status==="delete"?(l.push({label:"Before",content:n||i,tone:"before"}),l):(l.push({label:"After",content:i||n,tone:"after"}),l)},Bv=(e,n,i,l)=>{if(!n.trim())return y.jsx("span",{className:"text-xs text-github-text-muted",children:"Empty cell"});if(e==="markdown"){const o=rj(i);return y.jsx(rp,{remarkPlugins:[op],urlTransform:u=>yh(u)?u:"",components:o,children:n})}return e==="raw"?y.jsx("pre",{className:"whitespace-pre-wrap break-words text-xs font-mono text-github-text-primary",children:n}):y.jsx("pre",{className:"overflow-x-auto text-xs",children:y.jsx(Ja,{code:n.replace(/\n$/,""),language:l||"python",syntaxTheme:i,className:"font-mono text-github-text-primary [&_.token-line]:block [&_.token-line]:whitespace-pre"})})},lj=({lines:e,syntaxTheme:n,language:i})=>e.length===0?y.jsx("span",{className:"text-xs text-github-text-muted",children:"Empty cell"}):y.jsx("div",{className:"overflow-x-auto",children:y.jsx("div",{className:"font-mono text-xs",children:e.map((l,o)=>y.jsxs("div",{className:`flex items-start min-h-[16px] ${ej(l.type)}`,children:[y.jsx("span",{className:`w-5 text-center flex-shrink-0 select-none ${nj(l.type)}`,children:tj(l.type)}),y.jsx(Ja,{code:l.content||" ",language:i||"python",syntaxTheme:n,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-${o}`))})}),aj=({cells:e,syntaxTheme:n,language:i})=>y.jsx("div",{className:"space-y-4",children:e.map((l,o)=>{const u=ij(l),c=l.cellType==="code"&&l.executionCount!==void 0?`In[${l.executionCount??" "}]`:null,f=l.cellType==="code",h=f?Fv(ql(l.sourceLines,["context","delete"]),ql(l.sourceLines,["context","add"])).filter(p=>p.type!=="context"):[];return f&&h.length===0?null:y.jsxs("div",{className:`rounded border border-github-border bg-github-bg-secondary/40 p-4 ${JR(l.status)}`,children:[y.jsx("div",{className:"flex flex-wrap items-center justify-between gap-2 mb-3",children:y.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[y.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-github-text-muted",children:Mv[l.cellType]}),c&&y.jsx("span",{className:"text-xs font-mono text-github-text-secondary",children:c}),l.id&&y.jsx("span",{className:"text-xs font-mono text-github-text-muted",children:l.id})]})}),y.jsx("div",{className:"space-y-3",children:f?y.jsx("div",{className:`px-4 py-3 ${Qx(l.status==="delete"?"before":"after")}`,children:y.jsx(lj,{lines:h,syntaxTheme:n,language:i})}):u.map((p,b)=>y.jsx("div",{className:`px-4 py-3 ${Qx(p.tone)}`,children:y.jsx("div",{className:"text-sm text-github-text-primary",children:Bv(l.cellType,p.content,n,i)})},`notebook-cell-${o}-section-${b}`))})]},`notebook-cell-${o}`)})}),oj=({cells:e,syntaxTheme:n,language:i})=>y.jsx("div",{className:"space-y-4",children:e.map((l,o)=>{const u=l.cellType==="code"&&l.executionCount!==void 0?`In[${l.executionCount??" "}]`:null;return y.jsxs("div",{className:"rounded border border-github-border bg-github-bg-secondary/40 p-4",children:[y.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-3",children:[y.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-github-text-muted",children:Mv[l.cellType]}),u&&y.jsx("span",{className:"text-xs font-mono text-github-text-secondary",children:u}),l.id&&y.jsx("span",{className:"text-xs font-mono text-github-text-muted",children:l.id})]}),y.jsx("div",{className:"text-sm text-github-text-primary",children:Bv(l.cellType,l.sourceText,n,i)})]},`notebook-full-cell-${o}`)})});function sj(e){const{file:n,baseCommitish:i,targetCommitish:l}=e,[o,u]=N.useState("diff"),c=N.useMemo(()=>GR(e.mergedChunks),[e.mergedChunks]),[f,h]=N.useState({status:"idle",cells:c.cells,language:c.language}),p=N.useMemo(()=>f.cells.filter(_=>_.status==="context"?!1:_.cellType!=="code"?!0:Fv(ql(_.sourceLines,["context","delete"]),ql(_.sourceLines,["context","add"])).filter(P=>P.type!=="context").length>0),[f.cells]),[b,g]=N.useState(null),[v,x]=N.useState(c.language),[w,S]=N.useState(!1),[A,C]=N.useState(null),[E,R]=N.useState(null),z=N.useMemo(()=>!i&&!l?null:n.status==="added"?l?{path:n.path,ref:l}:null:n.status==="deleted"?i?{path:n.oldPath||n.path,ref:i}:null:l?{path:n.path,ref:l}:i?{path:n.oldPath||n.path,ref:i}:null,[i,l,n.oldPath,n.path,n.status]),$=N.useMemo(()=>z?`${z.ref}:${z.path}`:null,[z]);return N.useEffect(()=>{let _=!1;return(async()=>{const P=i||"HEAD~1",O=l||"HEAD",L=n.oldPath||n.path,I=n.status!=="added"&&Bd(P),q=n.status!=="deleted"&&Bd(O);if(!I&&!q){h({status:"ready",cells:c.cells,language:c.language,source:"diff",message:"Notebook content could not be loaded, falling back to diff preview."});return}h(K=>({...K,status:"loading"}));try{const[K,U]=await Promise.all([I?Ud(L,P):Promise.resolve(null),q?Ud(n.path,O):Promise.resolve(null)]),G=K?Qa(K):null,H=U?Qa(U):null;if(!G&&!H){_||h({status:"ready",cells:c.cells,language:c.language,source:"diff",message:"Notebook content could not be parsed, falling back to diff preview."});return}const X=H?.language??G?.language??c.language,Y=Iv(G?.cells??[],H?.cells??[]);_||h({status:"ready",cells:Y,source:"blob",language:X})}catch(K){_||h({status:"error",cells:c.cells,language:c.language,source:"diff",message:K instanceof Error?K.message:"Failed to load notebook preview."})}})(),()=>{_=!0}},[i,n.oldPath,n.path,n.status,e.mergedChunks,l,c]),N.useEffect(()=>{if(o!=="full-preview")return;if(!z||!$||!Bd(z.ref)){g(null),R(null),C(null),S(!1);return}let _=!1;return($!==E||!b)&&(async()=>{$!==E&&g(null),S(!0),C(null);try{const P=await Ud(z.path,z.ref);if(!P)throw new Error("Failed to load preview.");const O=Qa(P);if(!O)throw new Error("Notebook content could not be parsed.");_||(g(O.cells),x(O.language??c.language),R($))}catch(P){_||(g(null),R(null),C(P instanceof Error?P.message:"Failed to load preview"))}finally{_||S(!1)}})(),()=>{_=!0}},[c.language,b,E,o,z,$]),y.jsxs("div",{className:"bg-github-bg-primary",children:[y.jsx("div",{className:"flex items-center justify-between border-b border-github-border px-4 py-2",children:y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsxs("button",{onClick:()=>u("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:[y.jsx(ku,{size:14}),"Diff"]}),y.jsxs("button",{onClick:()=>u("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:[y.jsx(qs,{size:14}),"Diff Preview"]}),y.jsxs("button",{onClick:()=>u("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:[y.jsx(qs,{size:14}),"Full Preview"]})]})}),o==="diff"&&y.jsx(yu,{...e}),o==="diff-preview"&&y.jsxs("div",{className:"p-4",children:[f.status==="loading"&&y.jsx("div",{className:"text-xs text-github-text-muted mb-3",children:"Loading notebook preview…"}),f.message&&y.jsx("div",{className:"text-xs text-github-text-muted mb-3",children:f.message}),p.length===0?y.jsxs("div",{children:[y.jsx("div",{className:"text-xs text-github-text-muted mb-3",children:"No changed notebook cells were found. Showing raw diff instead."}),y.jsx(yu,{...e})]}):y.jsx(aj,{cells:p,syntaxTheme:e.syntaxTheme,language:f.language})]}),o==="full-preview"&&y.jsxs("div",{className:"p-4",children:[w&&y.jsx("div",{className:"text-sm text-github-text-muted mb-3",children:"Loading preview..."}),A&&y.jsx("div",{className:"text-sm text-github-danger mb-3",children:A}),!w&&!A&&b&&y.jsx(oj,{cells:b,syntaxTheme:e.syntaxTheme,language:v??c.language}),!w&&!A&&!b&&y.jsx("div",{className:"text-sm text-github-text-muted",children:"Preview unavailable."})]})]})}const $d=[{id:"image",match:e=>TA(e.path),Component:DA,canExpandHiddenLines:()=>!1},{id:"markdown",match:e=>jA(e.path),Component:FR,canExpandHiddenLines:e=>e.status!=="added"&&e.status!=="deleted"},{id:"notebook",match:e=>LA(e.path),Component:sj,canExpandHiddenLines:e=>e.status!=="added"&&e.status!=="deleted"},{id:"default",match:()=>!0,Component:yu,canExpandHiddenLines:e=>e.status!=="added"&&e.status!=="deleted"}],uj=e=>{const n=$d[$d.length-1];if(!n)throw new Error("No diff viewers registered");return $d.find(i=>i.match(e))??n},cj=e=>{switch(e){case"added":return y.jsx(L1,{size:16,className:"text-github-accent"});case"deleted":return y.jsx(D1,{size:16,className:"text-github-danger"});case"renamed":return y.jsx(_1,{size:16,className:"text-github-warning"});default:return y.jsx(ku,{size:16,className:"text-github-text-secondary"})}},fj=({file:e,isCollapsed:n,isReviewed:i,onToggleCollapsed:l,onToggleAllCollapsed:o,onToggleReviewed:u})=>{const[c,f]=N.useState(!1);return y.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:[y.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[y.jsx("button",{onClick:h=>{h.altKey?o(!n):l(e.path)},className:"text-github-text-muted hover:text-github-text-primary transition-colors cursor-pointer",title:n?"Expand file (Alt+Click to expand all)":"Collapse file (Alt+Click to collapse all)",children:n?y.jsx(j1,{size:16}):y.jsx(Ul,{size:16})}),cj(e.status),y.jsx("h2",{className:"text-sm font-mono text-github-text-primary m-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e.path}),y.jsx("button",{className:`bg-transparent border-none cursor-pointer px-1.5 py-1 rounded text-sm transition-all hover:bg-github-bg-tertiary ${c?"text-github-accent":"text-github-text-secondary hover:text-github-text-primary"}`,onClick:()=>{navigator.clipboard.writeText(e.path).then(()=>{console.log("File path copied to clipboard:",e.path),f(!0),setTimeout(()=>f(!1),2e3)}).catch(h=>{console.error("Failed to copy file path:",h)})},title:"Copy file path",children:c?y.jsx(Wa,{size:14}):y.jsx(Rh,{size:14})}),e.oldPath&&e.oldPath!==e.path&&y.jsxs("span",{className:"text-xs text-github-text-muted italic",children:["(renamed from ",e.oldPath,")"]})]}),y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[y.jsxs("span",{className:"font-medium px-1 py-0.5 rounded text-github-accent bg-green-100/10",children:["+",e.additions]}),y.jsxs("span",{className:"font-medium px-1 py-0.5 rounded text-github-danger bg-red-100/10",children:["-",e.deletions]})]}),y.jsxs("button",{onClick:()=>u(e.path),className:`flex items-center gap-2 px-3 py-1.5 rounded-md text-sm font-medium transition-all duration-200 ${i?"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:i?"Mark as not reviewed":"Mark as reviewed",children:[i?y.jsx(Wa,{size:14}):y.jsx(Yk,{size:14}),"Viewed"]})]})]})},dj=e=>{const n={old:[],new:[]};return e.forEach(i=>{const l=i.side??"new",[o,u]=Array.isArray(i.line)?[i.line[0],i.line[1]]:[i.line,i.line];o<=0||u<=0||n[l].push({start:Math.min(o,u),end:Math.max(o,u)})}),n},hj=(e,n)=>e.chunks.map((i,l)=>{const o=n==="old"?i.oldStart:i.newStart,u=n==="old"?i.oldLines:i.newLines;return!o||u<=0?null:{start:o,end:o+u-1,index:l}}).filter(i=>!!i),pj=e=>{const n=[],i=e[0];if(!i)return n;i.start>1&&n.push({type:"before",start:1,end:i.start-1,nextChunkIndex:i.index});for(let o=1;o<e.length;o+=1){const u=e[o-1],c=e[o];!u||!c||c.start>u.end+1&&n.push({type:"between",start:u.end+1,end:c.start-1,prevChunkIndex:u.index,nextChunkIndex:c.index})}const l=e[e.length-1];return l&&n.push({type:"after",start:l.end+1,end:Number.POSITIVE_INFINITY,prevChunkIndex:l.index}),n},mj=e=>{const n=new Map;return e.forEach(i=>{const l=i.originalIndices[0];l!==void 0&&n.set(l,i)}),n},gj=e=>{const n=e[e.length-1];return n?.originalIndices[n.originalIndices.length-1]??null},bj=N.memo(function({file:n,threads:i,showAuthorBadges:l=!1,diffMode:o,reviewedFiles:u,onToggleReviewed:c,collapsedFiles:f,onToggleCollapsed:h,onToggleAllCollapsed:p,onAddComment:b,onGenerateThreadPrompt:g,onRemoveThread:v,onReplyToThread:x,onRemoveMessage:w,onUpdateMessage:S,onOpenInEditor:A,syntaxTheme:C,baseCommitish:E,targetCommitish:R,cursor:z=null,fileIndex:$=0,onLineClick:_,commentTrigger:F,onCommentTriggerHandled:P,mergedChunks:O,expandLines:L,expandAllBetweenChunks:I,prefetchFileContent:q,isExpandLoading:K}){const U=f.has(n.path),G=N.useRef(null),[H,X]=N.useState(!1),Y=uj(n),ne=Y.canExpandHiddenLines?.(n)??!1;N.useEffect(()=>{if(!ne)return;const J=G.current;if(!J)return;const W=new IntersectionObserver(([ie])=>{ie?.isIntersecting&&X(!0)},{rootMargin:"200px"});return W.observe(J),()=>W.disconnect()},[ne]),N.useEffect(()=>{H&&!U&&ne&&q(n)},[H,U,ne,n,q]);const M=N.useCallback(async(J,W,ie,de)=>{try{await b(n.path,J,W,ie,de)}catch(me){console.error("Failed to add comment:",me)}},[n.path,b]);N.useEffect(()=>{if(U||K||!ne||i.length===0||n.chunks.length===0||O.length===0)return;const J=dj(i),W=mj(O),ie=gj(O),de=O[O.length-1],me=new Set,ye=(Se,Le)=>{me.has(Se)||(me.add(Se),Le())};["old","new"].forEach(Se=>{const Le=J[Se];if(Le.length===0)return;const be=hj(n,Se);pj(be).forEach(he=>{if(!Le.some(pt=>pt.start<=he.end&&pt.end>=he.start))return;if(he.type==="after"&&de&&ie!==null){de.hiddenLinesAfter>0&&ye(`after-${ie}`,()=>{L(n,ie,"down",de.hiddenLinesAfter)});return}const Ce=he.nextChunkIndex;if(Ce===void 0)return;const Ne=W.get(Ce);!Ne||Ne.hiddenLinesBefore<=0||(he.type==="before"?ye(`before-${Ce}`,()=>{L(n,Ce,"up",Ne.hiddenLinesBefore)}):he.type==="between"&&ye(`between-${Ce}`,()=>{I(n,Ce,Ne.hiddenLinesBefore)}))})})},[i,I,L,n,U,K,O,ne]);const j="4em",B=Y.Component,T={file:n,threads:i,showAuthorBadges:l,diffMode:o,syntaxTheme:C,baseCommitish:E,targetCommitish:R,cursor:z,fileIndex:$,mergedChunks:O,isExpandLoading:K,expandHiddenLines:L,expandAllBetweenChunks:I,onAddComment:M,onGenerateThreadPrompt:g,onRemoveThread:v,onReplyToThread:x,onRemoveMessage:w,onUpdateMessage:S,onOpenInEditor:A,onLineClick:_,commentTrigger:F,onCommentTriggerHandled:P};return y.jsxs("div",{ref:G,className:"bg-github-bg-primary",style:{"--line-number-width":j},children:[y.jsx(fj,{file:n,isCollapsed:U,isReviewed:u.has(n.path),onToggleCollapsed:h,onToggleAllCollapsed:p,onToggleReviewed:c}),!U&&y.jsx("div",{className:"overflow-y-auto",children:y.jsx(B,{...T})})]})});function xh(e){if(!e.isDirectory||!e.children)return[];const n=[];return e.path&&n.push(e.path),e.children.forEach(i=>{n.push(...xh(i))}),n}function yj(e){const n={name:"",path:"",isDirectory:!0,children:[]};e.forEach(l=>{const o=l.path.split("/");let u=n;for(let c=0;c<o.length;c++){const f=o[c];if(!f)continue;const h=c===o.length-1,p=o.slice(0,c+1).join("/");u.children||(u.children=[]);let b=u.children.find(g=>g.name===f);b||(b={name:f,path:p,isDirectory:!h,children:h?void 0:[],file:h?l:void 0},u.children.push(b)),u=b}});const i=l=>{if(!l.isDirectory||!l.children)return l;if(l.children=l.children.map(i),l.children.length===1&&l.children[0]?.isDirectory&&l.children[0]?.children){const o=l.children[0];if(o)return l.name?{...l,name:`${l.name}/${o.name}`,path:o.path,children:o.children}:l}return l};return i(n)}function xj({files:e,onScrollToFile:n,onFileSelected:i,comments:l,reviewedFiles:o,onToggleReviewed:u,selectedFileIndex:c}){const f=N.useMemo(()=>yj(e),[e]),h=N.useRef(null),p=N.useRef(new Map),b={"--dir-row-height":"calc(var(--spacing, 0.25rem) * 9)"},[g,v]=N.useState(()=>new Set(xh(f))),[x,w]=N.useState(""),S=N.useMemo(()=>{const O=new Map;return l.forEach(L=>{O.set(L.file,(O.get(L.file)??0)+1)}),O},[l]),A=N.useMemo(()=>{const O=new Map;return e.forEach((L,I)=>{O.set(L.path,I)}),O},[e]),C=N.useMemo(()=>{const O=x.trim().toLowerCase(),L=I=>{if(!O)return I;if(I.isDirectory&&I.children){const q=I.children.map(K=>L(K)).filter(K=>K!==null);return q.length>0?{...I,children:q}:null}else if(I.file)return I.file.path.toLowerCase().includes(O)?I:null;return null};return L(f)||{...f,children:[]}},[f,x]),E=O=>{switch(O){case"added":return y.jsx(L1,{size:16,className:"text-github-accent"});case"deleted":return y.jsx(D1,{size:16,className:"text-github-danger"});case"renamed":return y.jsx(_1,{size:16,className:"text-github-warning"});default:return y.jsx(ku,{size:16,className:"text-github-text-secondary"})}},R=O=>{v(L=>{const I=new Set(L);return I.has(O)?I.delete(O):I.add(O),I})},z=N.useMemo(()=>xh(f),[f]),$=g.size===z.length&&z.length>0,_=()=>{v($?new Set:new Set(z))},F=(O,L)=>{const I=h.current,q=O.currentTarget;if(!I){R(L);return}const K=I.getBoundingClientRect(),U=q.getBoundingClientRect(),G=Number.parseFloat(getComputedStyle(q).top||"0");if(U.top-K.top<=G+1){const ne=p.current.get(L)?.querySelector('[data-tree-row="true"]:not([data-dir-header="true"])'),M=q.getBoundingClientRect().height||0,j=ne??q,B=Number.parseInt(j.dataset.depth||q.dataset.depth||"0",10),T=M*B,J=Math.max(0,j.offsetTop-T);if(Math.abs(I.scrollTop-J)<=1){R(L);return}I.scrollTo({top:J,behavior:"smooth"});return}R(L)},P=(O,L=0)=>{if(O.isDirectory&&O.children){const I=g.has(O.path);return y.jsxs("div",{"data-dir-container":O.path||void 0,ref:q=>{O.path&&(q?p.current.set(O.path,q):p.current.delete(O.path))},children:[O.name&&y.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":L,style:{paddingLeft:`${L*16+16}px`,top:`calc(${L} * var(--dir-row-height))`,zIndex:1e3-L},onClick:q=>F(q,O.path),children:[I?y.jsx(Ul,{size:16}):y.jsx(j1,{size:16}),I?y.jsx(wk,{size:16,className:"text-github-text-secondary"}):y.jsx(kk,{size:16,className:"text-github-text-secondary"}),y.jsx("span",{className:"text-sm text-github-text-primary font-medium flex-1 overflow-hidden text-ellipsis whitespace-nowrap",title:O.name,children:O.name})]}),(I||!O.name)&&O.children.map(q=>P(q,O.name?L+1:L))]},O.path)}else if(O.file){const I=O.file,q=S.get(I.path)??0,K=o.has(I.path),U=A.get(I.path)??-1,G=c!==null&&c===U;return y.jsxs("div",{className:`flex items-center gap-2 px-4 py-2 hover:bg-github-bg-tertiary cursor-pointer transition-colors ${K?"opacity-70":""} ${G?"bg-github-bg-tertiary":""}`,"data-file-row":"true","data-tree-row":"true","data-depth":L,style:{paddingLeft:`${L*16+16}px`},onClick:()=>{n(I.path),i?.()},children:[y.jsx(z1,{checked:K,onChange:()=>{u(I.path)},title:K?"Mark as not reviewed":"Mark as reviewed",className:"z-10"}),E(O.file.status),y.jsx("span",{className:`text-sm text-github-text-primary flex-1 overflow-hidden text-ellipsis whitespace-nowrap ${K?"line-through text-github-text-muted":""}`,title:O.file.path,children:O.name}),q>0&&y.jsxs("span",{className:"text-github-warning text-sm font-medium ml-auto flex items-center gap-1",children:[y.jsx(M1,{size:14}),q]})]},I.path)}return null};return y.jsxs("div",{className:"h-full flex flex-col",children:[y.jsxs("div",{className:"px-4 py-3 border-b border-github-border bg-github-bg-tertiary",children:[y.jsxs("div",{className:"flex items-center justify-between mb-3",children:[y.jsxs("h3",{className:"text-sm font-semibold text-github-text-primary m-0",children:["Files changed (",e.length,")"]}),y.jsx("button",{onClick:_,className:"p-1 hover:bg-github-bg-primary rounded transition-colors",title:$?"Collapse all":"Expand all",children:$?y.jsx(rk,{size:16,className:"text-github-text-secondary"}):y.jsx(lk,{size:16,className:"text-github-text-secondary"})})]}),y.jsxs("div",{className:"relative",children:[y.jsx(Pk,{size:16,className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-github-text-muted"}),y.jsx("input",{type:"text",placeholder:"Filter files...",value:x,onChange:O=>w(O.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"})]})]}),y.jsx("div",{className:"flex-1 overflow-y-auto relative z-0",style:b,ref:h,children:C.children?.map(O=>P(O))})]})}function vj({style:e}){return y.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:y.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 wj({isOpen:e,onClose:n}){const{enableScope:i,disableScope:l}=io();return ot("escape",()=>n(),{enabled:e},[n,e]),N.useEffect(()=>(e?l("navigation"):i("navigation"),()=>{i("navigation")}),[e,i,l]),e?y.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[y.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:n}),y.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:[y.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:[y.jsx("h2",{className:"text-lg font-semibold text-github-text-primary",children:"Keyboard Shortcuts"}),y.jsx("button",{onClick:n,className:"text-github-text-secondary hover:text-github-text-primary transition-colors","aria-label":"Close help modal",children:y.jsx(Eu,{size:20})})]}),y.jsxs("div",{className:"px-6 py-4 grid grid-cols-1 lg:grid-cols-2 gap-6",children:[y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Line Navigation"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"j"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"↓"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Next line"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"k"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"↑"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Previous line"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"File Navigation"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"]"}),y.jsx("span",{className:"text-github-text-secondary",children:"Next file"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"["}),y.jsx("span",{className:"text-github-text-secondary",children:"Previous file"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"["})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Jump to first file"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"]"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Jump to last file"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Chunk Navigation"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"n"}),y.jsx("span",{className:"text-github-text-secondary",children:"Next change chunk (added/deleted lines)"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"p"}),y.jsx("span",{className:"text-github-text-secondary",children:"Previous change chunk (added/deleted lines)"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Comment Navigation"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"N"}),y.jsx("span",{className:"text-github-text-secondary",children:"Next comment"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"P"}),y.jsx("span",{className:"text-github-text-secondary",children:"Previous comment"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Side Navigation (Side-by-side mode)"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"h"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"←"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Focus left side"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"l"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"→"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Focus right side"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Comment Management"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"L"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"View all comments list"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"C"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Copy all comments prompt"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"D"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Delete all comments"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Actions"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"v"}),y.jsx("span",{className:"text-github-text-secondary",children:"Toggle viewed state of current file"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"R"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Refresh diff when changes detected"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"c"}),y.jsx("span",{className:"text-github-text-secondary",children:"Add comment at current line"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"."}),y.jsx("span",{className:"text-github-text-secondary",children:"Move cursor to center of viewport"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"?"}),y.jsx("span",{className:"text-github-text-secondary",children:"Show/hide this help"})]})]})]}),y.jsx("div",{className:"pt-4 border-t border-github-border lg:col-span-2",children:y.jsx("p",{className:"text-xs text-github-text-secondary",children:"Shortcuts are disabled when typing in input fields."})})]})]})]}):null}function Sj({style:e}){return y.jsxs("svg",{style:e,viewBox:"0 0 720 190",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":"difit",role:"img",children:[y.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"}),y.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 kj({shouldReload:e,isReloading:n,onReload:i,changeType:l,className:o="",compact:u=!1}){if(!e)return null;const c=()=>{switch(l){case"commit":return"New commits available";case"staging":return"Staging changes detected";case"file":return"File changes detected";default:return"Changes detected"}};return y.jsxs("button",{onClick:i,disabled:n,className:`
|
|
73
|
-
flex items-center gap-1.5 text-xs rounded-md border ${o} ${u?"px-2 py-2":"px-3 py-1.5"}
|
|
74
|
-
${n?"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"}
|
|
75
|
-
`,title:`${c()} - Click to refresh`,"aria-label":u?"Refresh":void 0,children:[y.jsx($k,{size:12,className:`${n?"animate-spin":""}`}),u?y.jsx("span",{className:"sr-only",children:"Refresh"}):"Refresh"]})}function Wx({label:e,value:n,resolvedValue:i,onChange:l,options:o,disabledValues:u=[]}){const[c,f]=N.useState(!1),{refs:h,floatingStyles:p,context:b}=su({open:c,onOpenChange:f,middleware:[tu(4),ru(),nu({padding:8})],whileElementsMounted:Js}),g=iu(b,{handleClose:th()}),v=eh(b),x=E0(b),w=ou(b),S=cu(b),{getReferenceProps:A,getFloatingProps:C}=uu([g,v,x,w,S]),E=n==="working"&&u.includes("staged")||n==="staged"&&u.includes("working"),R=()=>{const O=o.specialOptions.find(q=>q.value===n);if(O)return O.label;const L=o.branches.find(q=>q.name===n);if(L)return`${L.name}${L.current?" (current)":""}`;const I=o.commits.find(q=>q.shortHash===n||q.hash===n);return I?`${I.shortHash} - ${I.message}`:n||"Select..."},z=O=>{l(O),f(!1)},$=O=>u.includes(O),_=(O,L)=>["w-full text-left px-3 py-2 text-xs focus:outline-none transition-colors",O?"hover:bg-diff-selected-bg focus:bg-diff-selected-bg":"hover:bg-github-bg-tertiary focus:bg-github-bg-tertiary",O?"bg-diff-selected-bg border-l-4 border-l-diff-selected-border font-semibold pl-2":"",L?"opacity-50 cursor-not-allowed":"cursor-pointer"].join(" "),F=(O,L)=>O===n||L===n?!0:i?O===i||L===i:!1,P=()=>{let O=0;const L=o.specialOptions.findIndex(I=>I.value===n);if(L!==-1)return L;if(O+=o.specialOptions.length,!E){const I=o.commits.findIndex(K=>K.shortHash===n);if(I!==-1)return O+I;O+=o.commits.length;const q=o.branches.findIndex(K=>K.name===n);if(q!==-1)return O+q}return 0};return y.jsxs(y.Fragment,{children:[y.jsxs("button",{ref:h.setReference,type:"button",className:"flex items-center gap-1.5 cursor-pointer group","aria-haspopup":"listbox","aria-expanded":c,...A(),children:[y.jsxs("span",{className:"text-xs text-github-text-secondary",children:[e,":"]}),y.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:[y.jsx("code",{className:"text-xs text-github-text-primary max-w-[150px] truncate",children:R()}),y.jsx(Ul,{size:12,className:"text-github-text-secondary group-hover:text-github-text-primary transition-colors"})]})]}),c&&y.jsx(au,{children:y.jsx(hA,{context:b,modal:!1,initialFocus:P(),children:y.jsxs("div",{ref:h.setFloating,style:p,className:"bg-github-bg-secondary border border-github-border rounded shadow-lg z-50 w-[360px] max-h-[400px] overflow-y-auto",...C(),children:[o.specialOptions.length>0&&y.jsxs("div",{className:"border-b border-github-border",children:[y.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary",children:"Special"}),o.specialOptions.map(O=>y.jsx("button",{onClick:()=>z(O.value),disabled:$(O.value),className:_(O.value===n,$(O.value)),children:O.label},O.value))]}),!E&&o.commits.length>0&&y.jsxs("div",{className:"border-b border-github-border",children:[y.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary",children:"Recent Commits"}),o.commits.map(O=>y.jsx("button",{onClick:()=>z(O.shortHash),disabled:$(O.shortHash),className:_(F(O.shortHash,O.hash),$(O.shortHash)),children:y.jsxs("div",{className:"flex items-start gap-2",children:[y.jsx("code",{className:"text-xs text-github-text-primary font-mono whitespace-nowrap",children:O.shortHash}),y.jsx("span",{className:"text-xs text-github-text-secondary flex-1 break-words",children:O.message})]})},O.hash))]}),!E&&o.branches.length>0&&y.jsxs("div",{children:[y.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary",children:"Branches"}),o.branches.map(O=>y.jsx("button",{onClick:()=>z(O.name),disabled:$(O.name),className:_(O.name===n,$(O.name)),children:y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"text-github-text-primary",children:O.name}),O.current&&y.jsx("span",{className:"text-xs text-github-text-muted",children:"(current)"})]})},O.name))]})]})})})]})}function Ej({isOpen:e,onClose:n,options:i,baseRevision:l,targetRevision:o,resolvedBaseRevision:u,resolvedTargetRevision:c,onApply:f}){const[h,p]=N.useState(l),[b,g]=N.useState(o),{enableScope:v,disableScope:x}=io();N.useEffect(()=>(e?x("navigation"):v("navigation"),()=>{v("navigation")}),[e,v,x]);const w=N.useMemo(()=>{const C=c||b,E=i.commits.findIndex(z=>z.shortHash===C||z.hash===C);if(E===-1)return b?[b]:[];const R=i.commits.slice(0,E+1).map(z=>z.shortHash);return b&&!R.includes(b)&&R.push(b),R.includes("working")||R.push("working"),R},[b,c,i.commits]),S=N.useMemo(()=>{const C=u||h,E=i.commits.findIndex(z=>z.shortHash===C||z.hash===C);if(E===-1)return h?[h]:[];const R=i.commits.slice(E).map(z=>z.shortHash);return h&&!R.includes(h)&&R.push(h),R},[h,u,i.commits]);if(!e)return null;const A=()=>{f(h,b),n()};return y.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[y.jsx("div",{className:"absolute inset-0 bg-black/40",onClick:n}),y.jsxs("div",{className:"relative bg-github-bg-secondary border border-github-border rounded-lg shadow-lg w-full max-w-lg mx-4",children:[y.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-github-border",children:[y.jsx("h2",{className:"text-lg font-semibold text-github-text-primary",children:"Detailed Diff"}),y.jsx("button",{onClick:n,className:"text-github-text-secondary hover:text-github-text-primary p-1","aria-label":"Close detailed diff",children:y.jsx(Eu,{size:18})})]}),y.jsxs("div",{className:"p-4 space-y-4",children:[y.jsxs("div",{className:"flex items-center justify-center gap-3",children:[y.jsx(Wx,{label:"Base",value:h,resolvedValue:u,onChange:p,options:i,disabledValues:w}),y.jsx("span",{className:"text-github-text-muted",children:"..."}),y.jsx(Wx,{label:"Target",value:b,resolvedValue:c,onChange:g,options:i,disabledValues:S})]}),y.jsxs("div",{className:"flex justify-end gap-2",children:[y.jsx("button",{onClick:n,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"}),y.jsx("button",{onClick:A,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"})]})]})]})]})}const Cj=[{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"]}],Uv="vscode";function vu(e){return e.replaceAll("\\","/").replace(/^\.\/+/,"")}function Aj(e){return e.replace(/[|\\{}()[\]^$+?.]/g,"\\$&")}function Hv(e){const n=new Set;return e.forEach(i=>{const l=i.trim();l&&n.add(vu(l))}),[...n]}function Jx(e){return vu(e).split("/").filter(n=>n.length>0)}function $v(e,n){let i="^";for(const l of n){if(l==="*"){i+=".*";continue}if(l==="?"){i+=".";continue}i+=Aj(l)}return i+="$",new RegExp(i).test(e)}function vh(e,n,i=0,l=0){if(l>=n.length)return i>=e.length;const o=n[l];if(!o)return i>=e.length;if(o==="**"){const c=l+1;if(c>=n.length)return!0;for(let f=i;f<=e.length;f+=1)if(vh(e,n,f,c))return!0;return!1}const u=e[i];return!u||!$v(u,o)?!1:vh(e,n,i+1,l+1)}function up(e){return Array.isArray(e)?Hv(e.filter(n=>typeof n=="string")):[]}function Nj(e){return Hv(e.split(/\r?\n/))}function e1(e){return up(e).join(`
|
|
76
|
-
`)}function Tj(e,n){const i=vu(n.trim());if(!i)return!1;const l=vu(e);if(!i.includes("/")){const o=l.split("/").pop()??l;return $v(o,i)}return vh(Jx(l),Jx(i))}function Rj(e,n){return up(n).some(i=>Tj(e,i))}const t1=[{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"}],n1=[{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"}],r1=e=>e==="top"?"translateY(4px)":e==="bottom"?"translateY(-4px)":e==="left"?"translateX(4px)":"translateX(-4px)",jj=(e,n)=>{if(typeof e=="function"){e(n);return}e&&"current"in e&&(e.current=n)};function _j({content:e,children:n,placement:i="top",className:l=""}){const[o,u]=N.useState(!1),c=N.useId(),{refs:f,floatingStyles:h,context:p}=su({open:o,onOpenChange:u,placement:i,middleware:[tu(8),ru(),nu({padding:8})],whileElementsMounted:Js}),b=iu(p,{move:!1}),g=E0(p),v=ou(p),x=cu(p,{role:"tooltip"}),{isMounted:w,styles:S}=wA(p,{duration:{open:180,close:120},initial:({side:$})=>({opacity:0,transform:r1($)}),open:{opacity:1,transform:"translate(0, 0)"},close:({side:$})=>({opacity:0,transform:r1($)}),common:{willChange:"opacity, transform"}}),{getReferenceProps:A,getFloatingProps:C}=uu([b,g,v,x]),E=n.props,R=A({...E,"aria-describedby":o?c:void 0}),z=["w-64 rounded-md border border-github-border bg-github-bg-primary px-3 py-2 text-xs text-github-text-primary",l].filter(Boolean).join(" ");return y.jsxs(y.Fragment,{children:[N.cloneElement(n,{...R,ref:$=>{jj(E.ref,$),f.setReference($)}}),w?y.jsx(au,{children:y.jsx("div",{ref:f.setFloating,...C(),id:c,style:h,className:"z-[60]",children:y.jsx("div",{style:S,className:z,children:e})})}):null]})}const ii={fontSize:14,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif',theme:"dark",syntaxTheme:"vsDark",editor:Uv,colorVision:"normal",autoViewedPatterns:[]},Lj=[{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'}],Dj=[{id:"normal",label:"Normal"},{id:"deuteranopia",label:"Deuteranopia",tooltip:"Deuteranopia mode uses blue/orange instead of green/red for diffs."}],Mj=[{id:"appearance",label:"Appearance"},{id:"system",label:"System"}];function Oj({isOpen:e,onClose:n,settings:i,onSettingsChange:l}){const[o,u]=N.useState(e1(i.autoViewedPatterns)),[c,f]=N.useState("appearance"),{enableScope:h,disableScope:p}=io();N.useEffect(()=>(e?p("navigation"):h("navigation"),()=>{h("navigation")}),[e,h,p]);const b=()=>i.theme==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":i.theme,g=()=>b()==="light"?t1:n1,v=w=>{const S={...i,theme:w},C=(w==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":w)==="light"?t1:n1;if(!C.some(R=>R.id===i.syntaxTheme)&&C.length>0){const R=C[0];R&&(S.syntaxTheme=R.id)}l(S)},x=()=>{if(c==="appearance"){l({...i,fontSize:ii.fontSize,fontFamily:ii.fontFamily,theme:ii.theme,syntaxTheme:ii.syntaxTheme,colorVision:ii.colorVision});return}l({...i,editor:ii.editor,autoViewedPatterns:ii.autoViewedPatterns}),u(e1(ii.autoViewedPatterns))};return e?y.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-50 pointer-events-none",children:y.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:[y.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-github-border",children:[y.jsxs("h2",{className:"text-lg font-semibold text-github-text-primary flex items-center gap-2",children:[y.jsx(O1,{size:20}),"Settings"]}),y.jsx("button",{onClick:n,className:"text-github-text-secondary hover:text-github-text-primary p-1",children:y.jsx(Eu,{size:18})})]}),y.jsxs("div",{className:"flex flex-col sm:flex-row min-h-[420px]",children:[y.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:y.jsx("div",{className:"flex sm:flex-col gap-1",children:Mj.map(w=>{const S=w.id===c;return y.jsx("button",{type:"button",onClick:()=>f(w.id),"aria-pressed":S,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 ${S?"text-github-text-primary border-github-accent":"text-github-text-secondary border-transparent hover:text-github-text-primary"}`,children:w.label},w.id)})})}),y.jsxs("div",{className:"flex-1 p-4 sm:p-6 overflow-y-auto",children:[c==="appearance"&&y.jsxs("div",{className:"space-y-6",children:[y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Font Size"}),y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx("input",{type:"range",min:"10",max:"20",step:"1",value:i.fontSize,onChange:w=>l({...i,fontSize:Number.parseInt(w.target.value,10)}),className:"flex-1 accent-github-accent"}),y.jsxs("span",{className:"text-sm text-github-text-secondary w-8 text-right",children:[i.fontSize,"px"]})]})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Font Family"}),y.jsx("select",{value:i.fontFamily,onChange:w=>l({...i,fontFamily:w.target.value}),className:"w-full p-2 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm",children:Lj.map(w=>y.jsx("option",{value:w.value,children:w.name},w.value))})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Theme"}),y.jsx("div",{className:"flex gap-2",children:["light","dark","auto"].map(w=>y.jsx("button",{type:"button",onClick:()=>v(w),className:`px-3 py-2 text-sm rounded border transition-colors ${i.theme===w?"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:w.charAt(0).toUpperCase()+w.slice(1)},w))})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Color Vision"}),y.jsx("div",{className:"flex gap-2",children:Dj.map(w=>{const S=(i.colorVision??"normal")===w.id,A=y.jsx("button",{type:"button",onClick:()=>l({...i,colorVision:w.id}),className:`px-3 py-2 text-sm rounded border transition-colors ${S?"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:w.label},w.id);return"tooltip"in w?y.jsx(_j,{content:w.tooltip,children:A},w.id):A})})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Syntax Highlighting Theme"}),y.jsx("select",{value:i.syntaxTheme,onChange:w=>l({...i,syntaxTheme:w.target.value}),className:"w-full p-2 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm",children:g().map(w=>y.jsx("option",{value:w.id,children:w.label},w.id))})]})]}),c==="system"&&y.jsxs("div",{className:"space-y-6",children:[y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Open In Editor"}),y.jsx("select",{value:i.editor,onChange:w=>l({...i,editor:w.target.value}),className:"w-full p-2 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm",children:Cj.map(w=>y.jsx("option",{value:w.id,children:w.label},w.id))})]}),y.jsxs("div",{children:[y.jsx("label",{htmlFor:"auto-viewed-patterns",className:"block text-sm font-medium text-github-text-primary mb-2",children:"Auto-Mark Viewed Patterns"}),y.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."}),y.jsx("textarea",{id:"auto-viewed-patterns",value:o,onChange:w=>{u(w.target.value),l({...i,autoViewedPatterns:Nj(w.target.value)})},rows:6,spellCheck:!1,placeholder:`*.test.ts
|
|
77
|
-
*.stories.tsx
|
|
78
|
-
src/generated/**`,className:"w-full p-3 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm font-mono"})]})]})]})]}),y.jsxs("div",{className:"flex items-center justify-between p-4 border-t border-github-border",children:[y.jsx("button",{onClick:x,className:"px-3 py-2 text-sm text-github-text-secondary hover:text-github-text-primary",children:c==="appearance"?"Reset Appearance Defaults":"Reset System Defaults"}),y.jsx("button",{onClick:n,className:"px-4 py-2 text-sm bg-github-accent text-white rounded hover:bg-green-600",children:"Close"})]})]})}):null}const i1={position:"absolute",fontSize:"16px",pointerEvents:"none",zIndex:100,transform:"translateY(20px) scale(0.5)",opacity:0},zj=({isActive:e})=>e?y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"animate-sparkle-rise",style:{...i1,left:"-12px",animationDelay:"0s"},children:"✨"}),y.jsx("div",{className:"animate-sparkle-rise",style:{...i1,right:"-12px",animationDelay:"0.3s"},children:"✨"})]}):null,l1={fontSize:14,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif',theme:"dark",syntaxTheme:"vsDark",editor:Uv,colorVision:"normal",autoViewedPatterns:[]};function Ij(){const[e,n]=N.useState(()=>{try{const o=localStorage.getItem(Gd);if(o){const u=JSON.parse(o);return{...l1,...u,autoViewedPatterns:up(u.autoViewedPatterns)}}}catch(o){console.warn("Failed to load appearance settings from localStorage:",o)}return l1}),i=N.useCallback((o,u="normal")=>{x1(o,u)},[]);return N.useEffect(()=>{const o=document.documentElement;o.style.setProperty("--app-font-size",`${e.fontSize}px`),o.style.setProperty("--app-font-family",e.fontFamily);const u=e.colorVision??"normal";if(e.theme==="auto"){const c=window.matchMedia("(prefers-color-scheme: dark)");i($s("auto",c.matches?"dark":"light"),u);const f=h=>{i($s("auto",h.matches?"dark":"light"),u)};return c.addEventListener("change",f),()=>c.removeEventListener("change",f)}else{i(e.theme,u);return}},[e,i]),{settings:e,updateSettings:o=>{n(o);try{localStorage.setItem(Gd,JSON.stringify(o))}catch(u){console.warn("Failed to save appearance settings to localStorage:",u)}}}}function Fj(e){return typeof e=="number"?`L${e}`:`L${e[0]}-L${e[1]}`}function a1(e,n){if(I1(e)){const i=F1(e);if(i.length>0){let l="",o=0;for(const c of i){const f=e.slice(o,c.startIndex).trim();f&&(l+=`${l?`
|
|
79
|
-
`:""}${f}`),n&&(l+=`${l?`
|
|
80
|
-
`:""}ORIGINAL:
|
|
81
|
-
\`\`\`
|
|
82
|
-
${n}
|
|
83
|
-
\`\`\``),l+=`${l?`
|
|
84
|
-
`:""}SUGGESTED:
|
|
85
|
-
\`\`\`
|
|
86
|
-
${c.suggestedCode}
|
|
87
|
-
\`\`\``,o=c.endIndex}const u=e.slice(o).trim();return u&&(l+=`${l?`
|
|
88
|
-
`:""}${u}`),l}}return e}function qv(e){const n=[`${e.file||"<unknown file>"}:${Fj(e.line)}`];return e.messages.forEach((i,l)=>{if(l===0){n.push(a1(i.body,e.codeContent));return}const o=l,u=i.author?.trim()||"Unknown";n.push(`Reply ${o} (${u})`),n.push(a1(i.body,e.codeContent))}),n.filter(Boolean).join(`
|
|
89
|
-
`)}function Bj(e){return e.length===0?"":e.map(n=>qv(n)).join(`
|
|
90
|
-
=====
|
|
91
|
-
`)}function wh(e){return typeof e.line=="number"?`${e.side}:${e.line}`:`${e.side}:${e.line.start}-${e.line.end}`}function Pv(e,n){return wh(e)===wh(n)}function o1(e){return e?.trim()||""}function Vv(e,n,i=!0){return i&&n.id&&e.id===n.id?!0:!(o1(e.author)!==o1(n.author)||e.body!==n.body||n.createdAt&&e.createdAt!==n.createdAt)}function Uj(e,n){if(n.id&&e.id===n.id)return!0;if(e.filePath!==n.filePath||!Pv(e.position,n.position))return!1;const i=e.messages[0];return i?Vv(i,n,!0):!1}function Gv(e,n){const i=e.createdAt??n,l=e.updatedAt??i;return{createdAt:i,updatedAt:l}}function Hj(e,n){return e.localeCompare(n)>=0?e:n}function $j(e,n){return n.updatedAt.localeCompare(e.updatedAt)}function qj(e,n){const{createdAt:i,updatedAt:l}=Gv(e,n),o=e.id??crypto.randomUUID();return{id:o,filePath:e.filePath,createdAt:i,updatedAt:l,position:e.position,codeSnapshot:e.codeSnapshot,messages:[{id:e.id??o,body:e.body,author:e.author,createdAt:i,updatedAt:l}]}}function Pj(e,n){const{createdAt:i,updatedAt:l}=Gv(e,n);return{id:e.id??crypto.randomUUID(),body:e.body,author:e.author,createdAt:i,updatedAt:l}}function Vj(e,n){const i=[...e],l=[];for(const o of n){const u=new Date().toISOString();if(o.type==="thread"){if(i.some(g=>Uj(g,o)))continue;i.push(qj(o,u));continue}const f=i.filter(b=>b.filePath===o.filePath&&Pv(b.position,o.position)).sort($j)[0];if(!f){l.push(`Skipped reply import for ${o.filePath}:${wh(o.position)} because no matching thread was found.`);continue}if(f.messages.some(b=>Vv(b,o,!0)))continue;const p=Pj(o,u);f.messages=[...f.messages,p],f.updatedAt=Hj(f.updatedAt,p.updatedAt)}return{threads:i,warnings:l}}const Fs="difit-storage-v1";function s1(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 Gj(e){const n=e.messages[0];return n?{id:e.id,filePath:e.filePath,body:n.body,author:n.author,createdAt:n.createdAt,updatedAt:n.updatedAt,position:e.position,codeSnapshot:e.codeSnapshot}:null}class Yj{generateStorageKey(n,i){const l=o=>o.replace(/[^a-zA-Z0-9-_]/g,u=>`_${u.charCodeAt(0).toString(16)}_`);return`${l(n)}-${l(i)}`}normalizeCommitish(n,i,l){if(n==="."||n==="working")return"WORKING";if(n==="staged")return"STAGED";if((n==="HEAD"||n==="@")&&i)return i;if(l?.has(n)){const o=l.get(n);if(o)return o}return(n.startsWith("@")||n.includes("^")||n.includes("~")||n.includes("HEAD"))&&console.warn(`[StorageService] Cannot normalize symbolic ref '${n}' - may cause key collision. currentCommitHash=${i}`),n}getStorageKey(n,i,l,o,u){let c,f;i==="."||i==="working"?(c=l||n,f="WORKING"):i==="staged"?(c=l||n,f="STAGED"):(c=this.normalizeCommitish(n,l,o),f=this.normalizeCommitish(i,l,o));const h=this.generateStorageKey(c,f);return u?`${Fs}/${u}/${h}`:`${Fs}/${h}`}getDiffContextData(n,i,l,o,u){try{const c=this.getStorageKey(n,i,l,o,u),f=localStorage.getItem(c);if(!f)return null;const h=JSON.parse(f);return h.version===2&&"threads"in h?h:h.version===1&&"comments"in h?{version:2,baseCommitish:h.baseCommitish,targetCommitish:h.targetCommitish,createdAt:h.createdAt,lastModifiedAt:h.lastModifiedAt,threads:h.comments.map(s1),viewedFiles:h.viewedFiles,appliedCommentImportIds:[]}:(console.warn(`Unknown storage version: ${String(h.version)}`),null)}catch(c){return console.error("Error reading diff context data:",c),null}}saveDiffContextData(n,i,l,o,u,c){try{const f=this.getStorageKey(n,i,o,u,c),h={...l,version:2,baseCommitish:n,targetCommitish:i,lastModifiedAt:new Date().toISOString(),appliedCommentImportIds:l.appliedCommentImportIds||[]};localStorage.setItem(f,JSON.stringify(h))}catch(f){f instanceof DOMException&&f.name==="QuotaExceededError"?console.error("localStorage quota exceeded"):console.error("Error saving diff context data:",f)}}getCommentThreads(n,i,l,o,u){return this.getDiffContextData(n,i,l,o,u)?.threads||[]}getComments(n,i,l,o,u){return this.getCommentThreads(n,i,l,o,u).map(c=>Gj(c)).filter(c=>c!==null)}saveCommentThreads(n,i,l,o,u,c){const h=this.getDiffContextData(n,i,o,u,c)||{version:2,baseCommitish:n,targetCommitish:i,createdAt:new Date().toISOString(),lastModifiedAt:new Date().toISOString(),threads:[],viewedFiles:[],appliedCommentImportIds:[]};h.threads=l,this.saveDiffContextData(n,i,h,o,u,c)}saveComments(n,i,l,o,u,c){this.saveCommentThreads(n,i,l.map(s1),o,u,c)}getViewedFiles(n,i,l,o,u){return this.getDiffContextData(n,i,l,o,u)?.viewedFiles||[]}saveViewedFiles(n,i,l,o,u,c){const h=this.getDiffContextData(n,i,o,u,c)||{version:2,baseCommitish:n,targetCommitish:i,createdAt:new Date().toISOString(),lastModifiedAt:new Date().toISOString(),threads:[],viewedFiles:[],appliedCommentImportIds:[]};h.viewedFiles=l,this.saveDiffContextData(n,i,h,o,u,c)}cleanupOldData(n){const i=new Date;i.setDate(i.getDate()-n);const l=i.getTime(),o=[];for(let u=0;u<localStorage.length;u++){const c=localStorage.key(u);if(c?.startsWith(Fs))try{const f=localStorage.getItem(c);if(!f)continue;const h=JSON.parse(f);new Date(h.lastModifiedAt).getTime()<l&&o.push(c)}catch{}}o.forEach(u=>localStorage.removeItem(u))}getStorageSize(){let n=0;for(let i=0;i<localStorage.length;i++){const l=localStorage.key(i);if(!l?.startsWith(Fs))continue;const o=localStorage.getItem(l);o&&(n+=(l.length+o.length)*2)}return n}}const oi=new Yj;async function u1(e){try{const i=new TextEncoder().encode(e),l=await crypto.subtle.digest("SHA-256",i);return Array.from(new Uint8Array(l)).map(u=>u.toString(16).padStart(2,"0")).join("")}catch{return console.warn("Crypto API not available, using fallback hash"),Xj(e)}}function Xj(e){let n=0;for(let i=0;i<e.length;i++){const l=e.charCodeAt(i);n=(n<<5)-n+l,n=n&n}return Math.abs(n).toString(16)}function c1(e){const n=e.chunks.map(i=>{const l=i.lines.filter(o=>o.type!=="hunk"&&o.type!=="header").map(o=>`${o.type}:${o.content}`).join(`
|
|
92
|
-
`);return`${i.header}
|
|
93
|
-
${l}`}).join(`
|
|
94
|
-
|
|
95
|
-
`);return`${e.path}
|
|
96
|
-
${e.status}
|
|
97
|
-
${n}`}function f1(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 d1(e){const n=e.messages[0];return n?{id:e.id,filePath:e.filePath,body:n.body,author:n.author,createdAt:n.createdAt,updatedAt:n.updatedAt,position:e.position,codeSnapshot:e.codeSnapshot}:null}function Zj(e,n,i,l,o){const[u,c]=N.useState([]),f=N.useCallback(()=>!e||!n?null:oi.getDiffContextData(e,n,i,l,o),[e,n,i,l,o]),h=N.useCallback(()=>{if(!e||!n)return null;const O=new Date().toISOString();return{version:2,baseCommitish:e,targetCommitish:n,createdAt:O,lastModifiedAt:O,threads:[],viewedFiles:[],appliedCommentImportIds:[]}},[e,n]);N.useEffect(()=>{if(!e||!n)return;const O=f()?.threads||oi.getCommentThreads(e,n,i,l,o);c(O)},[e,n,i,l,o,f]);const p=N.useCallback(O=>{!e||!n||(oi.saveCommentThreads(e,n,O,i,l,o),c(O))},[e,n,i,l,o]),b=N.useCallback(O=>{const L=new Date().toISOString(),I=crypto.randomUUID(),q={id:I,filePath:O.filePath,createdAt:L,updatedAt:L,position:{side:O.side,line:O.line},codeSnapshot:O.codeSnapshot||{content:"",language:vC(O.filePath)},messages:[{id:I,body:O.body,author:"User",createdAt:L,updatedAt:L}]},K=[...u,q];return p(K),q},[p,u]),g=N.useCallback(O=>{const L=b(O),I=d1(L);if(!I)throw new Error("Failed to create root comment");return I},[b]),v=N.useCallback(({threadId:O,body:L})=>{const I=new Date().toISOString(),q=u.map(K=>K.id===O?{...K,updatedAt:I,messages:[...K.messages,{id:crypto.randomUUID(),body:L,author:"User",createdAt:I,updatedAt:I}]}:K);p(q)},[p,u]),x=N.useCallback(O=>{const L=u.filter(I=>I.id!==O);p(L)},[p,u]),w=N.useCallback(O=>{x(O)},[x]),S=N.useCallback((O,L)=>{const I=u.find(G=>G.id===O);if(!I)return;const q=I.messages.findIndex(G=>G.id===L);if(q<0)return;if(q===0){x(O);return}const K=new Date().toISOString(),U=u.map(G=>G.id===O?{...G,updatedAt:K,messages:G.messages.filter(H=>H.id!==L)}:G);p(U)},[x,p,u]),A=N.useCallback((O,L,I)=>{const q=new Date().toISOString(),K=u.map(U=>U.id===O?{...U,updatedAt:q,messages:U.messages.map(G=>G.id===L?{...G,body:I,updatedAt:q}:G)}:U);p(K)},[p,u]),C=N.useCallback((O,L)=>{A(O,O,L)},[A]),E=N.useCallback(()=>{p([])},[p]),R=N.useCallback(O=>{if(!O?.resetAppliedCommentImportIds){E();return}const L=f()||h();if(!L||!e||!n)return;const I={...L,threads:[],appliedCommentImportIds:[]};oi.saveDiffContextData(e,n,I,i,l,o),c([])},[e,n,l,E,h,i,f,o]),z=N.useCallback((O,L)=>{if(!e||!n||O.length===0||L.length===0)return[];const I=f()||h();if(!I)return[];if(I.appliedCommentImportIds.includes(L))return c(I.threads),[];const q=Vj(I.threads,O),K={...I,threads:q.threads,appliedCommentImportIds:[...I.appliedCommentImportIds,L]};return oi.saveDiffContextData(e,n,K,i,l,o),c(q.threads),q.warnings},[e,n,l,h,i,f,o]),$=N.useCallback(O=>{const L=u.find(I=>I.id===O);return L?qv(f1(L)):""},[u]),_=N.useCallback(O=>$(O),[$]),F=N.useCallback(()=>Bj(u.map(f1)),[u]);return{comments:u.map(O=>d1(O)).filter(O=>O!==null),threads:u,addComment:g,addThread:b,removeComment:w,replyToThread:v,removeThread:x,updateComment:C,removeMessage:S,updateMessage:A,clearAllComments:R,applyCommentImports:z,generatePrompt:_,generateThreadPrompt:$,generateAllCommentsPrompt:F}}const Kj=20;async function h1(e,n){const i=encodeURIComponent(e),l=await fetch(`/api/blob/${i}?ref=${encodeURIComponent(n)}`);if(!l.ok)throw new Error(`Failed to fetch file content: ${l.statusText}`);const u=(await l.text()).split(`
|
|
98
|
-
`);return u.length>0&&u[u.length-1]===""&&u.pop(),{lines:u,totalLines:u.length}}async function Qj(e,n,i,l){const o=encodeURIComponent(e),u=new URLSearchParams;n&&u.set("oldRef",n),i&&u.set("newRef",i),l&&l!==e&&u.set("oldPath",l);const c=await fetch(`/api/line-count/${o}?${u}`);if(!c.ok)throw new Error(`Failed to fetch line count: ${c.statusText}`);return c.json()}function Wj({baseCommitish:e,targetCommitish:n}){const[i,l]=N.useState({}),[o,u]=N.useState(!1),[c,f]=N.useState(null),[h,p]=N.useState(0),b=N.useRef(new Map),g=N.useRef({});g.current=i;const v=N.useCallback(async _=>{const F=b.current.get(_.path);if(F)return F;const P=(async()=>{const O=g.current[_.path];if(O?.oldContent&&O?.newContent)return O;const L={...O,expandedRanges:O?.expandedRanges||[]};if(_.status!=="added"&&e){const I=_.oldPath||_.path;try{const{lines:q,totalLines:K}=await h1(I,e);L.oldContent=q,L.oldTotalLines=K}catch(q){console.error("Failed to fetch old file content:",q),L.oldContent=[],L.oldTotalLines=0}}if(_.status!=="deleted"&&n)try{const{lines:I,totalLines:q}=await h1(_.path,n);L.newContent=I,L.newTotalLines=q}catch(I){console.error("Failed to fetch new file content:",I),L.newContent=[],L.newTotalLines=0}return L})();b.current.set(_.path,P);try{return await P}finally{b.current.delete(_.path)}},[e,n]),x=N.useCallback(_=>{f(_),p(F=>F+1)},[]),w=N.useCallback(async(_,F,P,O=Kj)=>{u(!0);try{const L=await v(_);l(I=>{const q=I[_.path],K=q?.expandedRanges||L.expandedRanges||[],U=K.findIndex(H=>H.chunkIndex===F&&H.direction===P),G=[...K];if(U>=0&&G[U]){const H=G[U];G[U]={chunkIndex:H.chunkIndex,direction:H.direction,count:H.count+O}}else G.push({chunkIndex:F,direction:P,count:O});return{...I,[_.path]:{oldContent:q?.oldContent??L.oldContent,newContent:q?.newContent??L.newContent,oldTotalLines:q?.oldTotalLines??L.oldTotalLines,newTotalLines:q?.newTotalLines??L.newTotalLines,expandedRanges:G}}}),x(_.path)}finally{u(!1)}},[v,x]),S=N.useCallback(async(_,F,P)=>{u(!0);try{const O=await v(_);l(L=>{const I=L[_.path],K=[...I?.expandedRanges||O.expandedRanges||[]],U=K.findIndex(j=>j.chunkIndex===F&&j.direction==="up"),G=K.findIndex(j=>j.chunkIndex===F-1&&j.direction==="down");let H=0,X=0;U>=0&&K[U]&&(H=K[U].count),G>=0&&K[G]&&(X=K[G].count);const Y=H+X+P,ne=K.filter(j=>!(j.chunkIndex===F-1&&j.direction==="down")),M=ne.findIndex(j=>j.chunkIndex===F&&j.direction==="up");return M>=0&&ne[M]?ne[M]={chunkIndex:F,direction:"up",count:Y}:ne.push({chunkIndex:F,direction:"up",count:Y}),{...L,[_.path]:{oldContent:I?.oldContent??O.oldContent,newContent:I?.newContent??O.newContent,oldTotalLines:I?.oldTotalLines??O.oldTotalLines,newTotalLines:I?.newTotalLines??O.newTotalLines,expandedRanges:ne}}}),x(_.path)}finally{u(!1)}},[v,x]),A=N.useCallback(async _=>{const F=g.current[_.path];if(F?.oldTotalLines!==void 0||F?.newTotalLines!==void 0)return;const P=_.status!=="added"?e:void 0,O=_.status!=="deleted"?n:void 0;if(!(!P&&!O))try{const{oldLineCount:L,newLineCount:I}=await Qj(_.path,P,O,_.oldPath);l(q=>{const K=q[_.path];return K?.oldTotalLines!==void 0||K?.newTotalLines!==void 0?q:{...q,[_.path]:{...K,expandedRanges:K?.expandedRanges||[],oldTotalLines:L,newTotalLines:I}}}),x(_.path)}catch(L){console.error("Failed to prefetch line count:",L)}},[e,n,x]),C=N.useCallback((_,F,P)=>{const O=i[_];return O&&O.expandedRanges.find(I=>I.chunkIndex===F&&I.direction===P)?.count||0},[i]),E=N.useCallback((_,F,P)=>{if(_.status==="added"||_.status==="deleted")return 0;const O=_.chunks[P-1];let L;if(!O)L=F.oldStart-1;else{const K=O.oldStart+O.oldLines;L=F.oldStart-K}const I=C(_.path,P,"up"),q=P>0?C(_.path,P-1,"down"):0;return Math.max(0,L-I-q)},[C]),R=N.useCallback((_,F,P)=>{if(_.status==="added"||_.status==="deleted")return 0;const O=i[_.path],L=O?.oldTotalLines||O?.newTotalLines;if(L===void 0)return _.chunks[P+1]?0:-1;if(_.chunks[P+1])return 0;const q=F.oldStart+F.oldLines-1,K=L-q,U=C(_.path,P,"down");return Math.max(0,K-U)},[i,C]),z=N.useCallback((_,F,P)=>{const O=i[_.path];if(!O)return F;const L=C(_.path,P,"up"),I=C(_.path,P,"down");if(L===0&&I===0)return F;const q=O.oldContent||[],K=O.newContent||[],U=[];if(L>0){const X=_.chunks[P-1];let Y;X?Y=X.oldStart+X.oldLines-1:Y=Math.max(0,F.oldStart-1-L);const ne=F.oldStart-1,M=F.newStart-1,j=Math.min(L,ne-Y),B=ne-j,T=M-j;for(let J=0;J<j;J++){const W=B+J+1,ie=T+J+1,de=q[W-1]??K[ie-1]??"";U.push({type:"normal",content:de,oldLineNumber:W,newLineNumber:ie,isExpanded:!0})}}if(U.push(...F.lines),I>0){const X=F.oldStart+F.oldLines-1,Y=F.newStart+F.newLines-1,ne=_.chunks[P+1],M=ne?ne.oldStart-1:O.oldTotalLines||X,j=Math.min(I,M-X);for(let B=0;B<j;B++){const T=X+B+1,J=Y+B+1,W=q[T-1]??K[J-1]??"";U.push({type:"normal",content:W,oldLineNumber:T,newLineNumber:J,isExpanded:!0})}}const G=U[0],H=U[U.length-1];return{...F,lines:U,oldStart:G?.oldLineNumber??F.oldStart,newStart:G?.newLineNumber??F.newStart,oldLines:(H?.oldLineNumber??F.oldStart+F.oldLines-1)-(G?.oldLineNumber??F.oldStart)+1,newLines:(H?.newLineNumber??F.newStart+F.newLines-1)-(G?.newLineNumber??F.newStart)+1}},[i,C]),$=N.useCallback(_=>{const F=[];for(let P=0;P<_.chunks.length;P++){const O=_.chunks[P];if(!O)continue;const L=z(_,O,P),I=E(_,O,P),q=R(_,O,P),K=F[F.length-1];if(K&&I===0){K.lines=[...K.lines,...L.lines],K.originalIndices.push(P),K.hiddenLinesAfter=q;const U=K.lines[K.lines.length-1];K.oldLines=(U?.oldLineNumber??K.oldStart+K.oldLines-1)-K.oldStart+1,K.newLines=(U?.newLineNumber??K.newStart+K.newLines-1)-K.newStart+1}else F.push({...L,originalIndices:[P],hiddenLinesBefore:I,hiddenLinesAfter:q})}return F},[z,E,R]);return{expandedState:i,isLoading:o,lastUpdatedFilePath:c,lastUpdatedAt:h,expandLines:w,expandAllBetweenChunks:S,prefetchFileContent:A,getMergedChunks:$,getHiddenLinesBefore:E,getHiddenLinesAfter:R}}var Yv=(e=>(e.DEFAULT="default",e.WORKING="working",e.STAGED="staged",e.DOT="dot",e.SPECIFIC="specific",e))(Yv||{});function Jj(e){const n=N.useRef(null),i=N.useRef(null),l=N.useRef(0),o=5,u=3e3,[c,f]=N.useState({isWatchEnabled:!1,diffMode:Yv.DEFAULT,shouldReload:!1,isReloading:!1,lastChangeTime:null,lastChangeType:null,connectionStatus:"disconnected"}),[h,p]=N.useState(null),b=N.useCallback(()=>{if(!n.current)try{const x=new EventSource("/api/watch");n.current=x,x.onopen=()=>{console.log("Connected to file watch service"),f(w=>({...w,connectionStatus:"connected"})),l.current=0,p(null)},x.onmessage=w=>{try{const S=JSON.parse(w.data);switch(S.type){case"connected":f(A=>({...A,isWatchEnabled:!0,diffMode:S.diffMode,connectionStatus:"connected"}));break;case"reload":console.log("File changes detected, showing reload button:",S.changeType),f(A=>({...A,shouldReload:!0,lastChangeTime:new Date,lastChangeType:S.changeType}));break;case"error":console.error("File watch error:",S.message),p(S.message||"File watch error occurred");break}}catch(S){console.error("Error parsing watch event:",S)}},x.onerror=()=>{console.log("File watch connection lost"),f(w=>({...w,connectionStatus:"disconnected"})),n.current&&(n.current.close(),n.current=null),l.current<o?(f(w=>({...w,connectionStatus:"reconnecting"})),l.current+=1,i.current=setTimeout(()=>{console.log(`Attempting to reconnect to file watch service (${l.current}/${o})...`),b()},u)):(console.error("Max reconnection attempts reached"),p("Lost connection to file watch service"))}}catch(x){console.error("Failed to connect to file watch service:",x),p("Failed to connect to file watch service")}},[o,u]),g=N.useCallback(async()=>{if(!c.isReloading){f(x=>({...x,isReloading:!0}));try{e&&await e(),f(x=>({...x,shouldReload:!1,isReloading:!1,lastChangeTime:null,lastChangeType:null}))}catch(x){console.error("Reload failed:",x),p("Failed to reload diff data"),f(w=>({...w,isReloading:!1}))}}},[e,c.isReloading]),v=()=>{n.current&&(n.current.close(),n.current=null),i.current&&(clearTimeout(i.current),i.current=null)};return N.useEffect(()=>(b(),v),[b]),N.useEffect(()=>v,[]),{shouldReload:c.shouldReload,isConnected:c.connectionStatus==="connected",error:h,reload:g,watchState:c}}const Sh={SCROLL_CONTAINER:"main.overflow-y-auto"};function li(e,n){const i=`file-${e.fileIndex}-chunk-${e.chunkIndex}-line-${e.lineIndex}`;return n==="split"?`${i}-${e.side}`:i}function Ga(e,n,i){return`${e}:${n}:${i??"any"}`}function e_(e,n){const i=n[e.fileIndex]?.chunks[e.chunkIndex]?.lines[e.lineIndex];return i&&(i.type==="add"||i.type==="delete"||i.type==="normal")?i.type:null}function kn(e,n){const i=e_(e,n);return i?i==="normal"?!0:i==="delete"?e.side==="left":i==="add"?e.side==="right":!1:!1}function Xv(e,n){return kn(e,n)?e:{...e,side:e.side==="left"?"right":"left"}}const p1={VIEWPORT_OFFSET_RATIO:1/3};function t_(e,n,i){const l=[];return n.oldLineNumber!==void 0&&(l.push(Ga(e,n.oldLineNumber,"old")),l.push(Ga(e,n.oldLineNumber))),n.newLineNumber!==void 0&&(l.push(Ga(e,n.newLineNumber,"new")),l.push(Ga(e,n.newLineNumber))),l.some(o=>i.has(o))}function n_(e,n,i,l){return{line:o=>{const u=e[o.fileIndex];return!u||l?.has(u.path)?!1:i==="unified"||kn(o,e)},chunk:o=>{const u=e[o.fileIndex];if(!u||l?.has(u.path))return!1;const c=u.chunks[o.chunkIndex]?.lines[o.lineIndex];if(!c||c.type==="normal")return!1;if(o.lineIndex===0)return!0;const f=u.chunks[o.chunkIndex]?.lines[o.lineIndex-1];return!f||f.type==="normal"},comment:o=>{const u=e[o.fileIndex];if(!u||l?.has(u.path))return!1;const c=u.chunks[o.chunkIndex]?.lines[o.lineIndex];return c?t_(u.path,c,n):!1},file:o=>o.chunkIndex===0&&o.lineIndex===0}}function r_(){return e=>{const n=document.getElementById(e);if(!n)return;const i=document.querySelector(Sh.SCROLL_CONTAINER);if(!i)throw new Error(`Scrollable container (${Sh.SCROLL_CONTAINER}) not found`);const l=n.getBoundingClientRect(),o=i.getBoundingClientRect(),u=i.clientHeight,c=i.scrollTop,f=Math.max(o.top,0),h=Math.min(o.bottom,window.innerHeight);if(!(l.top>=f&&l.bottom<=h)){const S=i_(n,i)-u*p1.VIEWPORT_OFFSET_RATIO;i.scrollTop=Math.max(0,S);return}const b=l.bottom>Math.min(o.bottom,window.innerHeight),v=n.offsetTop-i.offsetTop-u*p1.VIEWPORT_OFFSET_RATIO,x=v>c;b&&x&&(i.scrollTop=Math.max(0,v))}}function i_(e,n){let i=e,l=0;for(;i&&i!==n&&i.offsetParent;)l+=i.offsetTop,i=i.offsetParent;return i&&i!==n&&(l+=i.offsetTop),l}function l_(e){return e||{fileIndex:0,chunkIndex:0,lineIndex:-1,side:"right"}}function a_(e,n,i){return i&&e.fileIndex===n.fileIndex&&e.chunkIndex===n.chunkIndex&&e.lineIndex===n.lineIndex}function o_(e,n,i){let{fileIndex:l,chunkIndex:o,lineIndex:u}=e;const c=i.length;let f=0;if(n==="next")for(u++;f<c;){if(i[l]?.chunks[o]?.lines[u])return{...e,fileIndex:l,chunkIndex:o,lineIndex:u};o++,u=0,i[l]?.chunks[o]||(l++,o=0,u=0,l>=c&&(l=0,f++))}else for(u--;f<c;){if(u<0)if(o--,o<0){l--,l<0&&(l=c-1,f++);const h=i[l];if(h&&h.chunks.length>0){o=h.chunks.length-1;const p=h.chunks[o];u=p&&p.lines.length>0?p.lines.length-1:-1}else o=-1,u=-1}else{const h=i[l]?.chunks[o];u=h&&h.lines.length>0?h.lines.length-1:-1}if(u>=0&&i[l]?.chunks[o]?.lines[u])return{...e,fileIndex:l,chunkIndex:o,lineIndex:u};u<0||u--}return null}function s_(e,n,i,l,o){let u=e,c=!1;for(;u;){const f=o_(u,n,l);if(!f||(u=f,a_(u,e,c)))break;if(c=!0,i(u,l)){const h=Xv(u,l);return{position:h,scrollTarget:li(h,o)}}}return{position:null,scrollTarget:null}}function u_({files:e,comments:n,viewMode:i=lo,reviewedFiles:l,onToggleReviewed:o,onCreateComment:u,onCopyAllComments:c,onDeleteAllComments:f,onShowCommentsList:h,onRefresh:p}){const[b,g]=N.useState(null),[v,x]=N.useState(!1),w=N.useMemo(()=>r_(),[]),S=N.useMemo(()=>{const I=new Map;return n.forEach(q=>{const K=Array.isArray(q.line)?q.line[0]:q.line,U=Ga(q.file,K,q.side);I.has(U)||I.set(U,[]),I.get(U)?.push(q)}),I},[n]),A=N.useMemo(()=>n_(e,S,i,l),[e,S,i,l]),C=N.useCallback((I,q)=>{if(e.length===0)return{position:null,scrollTarget:null};const K=l_(b);return s_(K,I,q,e,i)},[b,e,i]),E=N.useCallback(I=>q=>{const K=C(q,I);K.position&&(g(K.position),K.scrollTarget&&w(K.scrollTarget))},[C,w]),R=N.useMemo(()=>E(A.line),[E,A.line]),z=N.useMemo(()=>E(A.chunk),[E,A.chunk]),$=N.useMemo(()=>E(A.file),[E,A.file]),_=N.useMemo(()=>E(A.comment),[E,A.comment]),F=N.useCallback(I=>{if(!b||i!=="split")return;let q={...b,side:I};const K=e[b.fileIndex]?.chunks[b.chunkIndex]?.lines[b.lineIndex];if(K){if(I==="left"&&K.type==="add"&&b.lineIndex>0){if(e[b.fileIndex]?.chunks[b.chunkIndex]?.lines[b.lineIndex-1]?.type==="delete"){q={...q,lineIndex:b.lineIndex-1},g(q),w(li(q,i));return}}else if(I==="right"&&K.type==="delete"&&e[b.fileIndex]?.chunks[b.chunkIndex]?.lines[b.lineIndex+1]?.type==="add"){q={...q,lineIndex:b.lineIndex+1},g(q),w(li(q,i));return}}if(!kn(q,e)){const U=e[b.fileIndex];if(!U)return;const G=U.chunks[b.chunkIndex];if(G){for(let H=b.lineIndex+1;H<G.lines.length;H++){const X={...q,lineIndex:H};if(kn(X,e)){q=X;break}}if(!kn(q,e))for(let H=b.lineIndex-1;H>=0;H--){const X={...q,lineIndex:H};if(kn(X,e)){q=X;break}}}if(!kn(q,e)){for(let H=b.chunkIndex+1;H<U.chunks.length;H++){const X=U.chunks[H];if(X){for(let Y=0;Y<X.lines.length;Y++){const ne={...q,chunkIndex:H,lineIndex:Y};if(kn(ne,e)){q=ne;break}}if(kn(q,e))break}}if(!kn(q,e))for(let H=b.chunkIndex-1;H>=0;H--){const X=U.chunks[H];if(X){for(let Y=X.lines.length-1;Y>=0;Y--){const ne={...q,chunkIndex:H,lineIndex:Y};if(kn(ne,e)){q=ne;break}}if(kn(q,e))break}}}}g(q),w(li(q,i))},[b,i,w,e]),P=N.useCallback(()=>{const I=document.querySelector(Sh.SCROLL_CONTAINER);if(!I)return;const q=I.getBoundingClientRect(),K=q.top+q.height/2;let U=1/0,G=null;e.forEach((H,X)=>{H.chunks.forEach((Y,ne)=>{Y.lines.forEach((M,j)=>{const B=i==="split"?["left","right"]:["right"];for(const T of B){const J={fileIndex:X,chunkIndex:ne,lineIndex:j,side:T};if(i==="split"&&!kn(J,e))continue;const W=li(J,i),ie=document.getElementById(W);if(ie){const de=ie.getBoundingClientRect(),me=de.top+de.height/2,ye=Math.abs(me-K);de.top<q.bottom&&de.bottom>q.top&&ye<U&&(U=ye,G=J)}}})})}),G&&g(G)},[e,i,g]),O=N.useCallback(I=>{if(!I){g(null);return}const q=Xv(I,e);g(q),w(li(q,i))},[e,i,w]),L={scopes:"navigation",enableOnFormTags:!1,preventDefault:!0};return ot("j, down",()=>R("next"),L,[R]),ot("k, up",()=>R("prev"),L,[R]),ot("n",()=>z("next"),L,[z]),ot("p",()=>z("prev"),L,[z]),ot("shift+n",()=>_("next"),L,[_]),ot("shift+p",()=>_("prev"),L,[_]),ot("]",()=>$("next"),{...L,useKey:!0},[$]),ot("[",()=>$("prev"),{...L,useKey:!0},[$]),ot("{",()=>{e.length>0&&(g({fileIndex:0,chunkIndex:0,lineIndex:0,side:i==="split"?"left":"right"}),w(li({fileIndex:0,chunkIndex:0,lineIndex:0,side:i==="split"?"left":"right"},i)))},{...L,useKey:!0},[e,i,w]),ot("}",()=>{if(e.length>0){const I=e.length-1,q=e[I];q&&q.chunks.length>0&&(g({fileIndex:I,chunkIndex:0,lineIndex:0,side:i==="split"?"left":"right"}),w(li({fileIndex:I,chunkIndex:0,lineIndex:0,side:i==="split"?"left":"right"},i)))}},{...L,useKey:!0},[e,i,w]),ot("h, left",()=>F("left"),{...L,enabled:i==="split"},[F,i]),ot("l, right",()=>F("right"),{...L,enabled:i==="split"},[F,i]),ot("v",()=>{if(b){const I=e[b.fileIndex];I&&o(I.path)}},L,[b,e,o]),ot("shift+r",()=>{p&&p()},L,[p]),ot("c",()=>{if(b&&u){const I=e[b.fileIndex]?.chunks[b.chunkIndex]?.lines[b.lineIndex];I&&I.type!=="delete"&&u()}},L,[b,e,u]),ot("?",()=>x(!v),{...L,useKey:!0},[v]),ot(".",I=>{I.ctrlKey||I.altKey||I.shiftKey||I.metaKey||(P(),I.preventDefault())},{...L,useKey:!0,preventDefault:!1},[P]),ot("shift+c",()=>{c&&c()},{...L,scopes:["navigation","comments-list"]},[c]),ot("shift+d",()=>{f&&f()},{...L,scopes:["navigation","comments-list"]},[f]),ot("shift+l",()=>{h&&h()},L,[h]),{cursor:b,isHelpOpen:v,setIsHelpOpen:x,setCursorPosition:O}}const qd=new Map;let c_=0;function Hs(e){return qd.has(e)||qd.set(e,`file-${++c_}`),qd.get(e)??""}const f_=8,d_="1200px 0px",m1=60,h_=180;function p_({diffData:e,diffScrollContainerRef:n,setDiffData:i}){const[l,o]=N.useState(new Set),u=N.useRef(new Set),c=N.useRef(null),f=N.useRef(new Map),h=N.useRef(new Set),p=N.useRef(null),b=N.useRef(0);N.useEffect(()=>{if(!e){const E=new Set;u.current=E,o(E),h.current.clear(),p.current=null;return}const S=`${e.requestedBaseCommitish??""}:${e.requestedTargetCommitish??""}`;if(p.current===S)return;p.current=S;const A=e.files.slice(0,f_).map(E=>E.path),C=new Set(A);u.current=C,o(C),h.current.clear()},[e]);const g=N.useCallback(S=>{const A=f.current.get(S);A&&c.current&&c.current.unobserve(A),o(C=>{if(C.has(S))return C;const E=new Set(C);return E.add(S),u.current=E,E})},[]),v=N.useCallback((S,A)=>{const C=c.current,E=f.current.get(S);if(E&&C&&C.unobserve(E),!A){f.current.delete(S);return}f.current.set(S,A),!(u.current.has(S)||!C)&&C.observe(A)},[]);N.useEffect(()=>{if(c.current&&c.current.disconnect(),!e){c.current=null;return}const S=new IntersectionObserver(A=>{o(C=>{let E=!1;const R=new Set(C);return A.forEach(z=>{if(!z.isIntersecting)return;const $=z.target.dataset.filePath;!$||R.has($)||(R.add($),S.unobserve(z.target),E=!0)}),E&&(u.current=R),E?R:C})},{root:n.current,rootMargin:d_});return c.current=S,f.current.forEach((A,C)=>{u.current.has(C)||S.observe(A)}),()=>{S.disconnect(),c.current=null}},[e,n]);const x=N.useCallback(S=>{if(!e)return;const A=e.files.findIndex(E=>E.path===S);if(A<0)return;const C=c.current;o(E=>{let R=!1;const z=new Set(E);for(let $=0;$<=A;$++){const _=e.files[$]?.path;if(_&&!z.has(_)){z.add(_),R=!0;const F=f.current.get(_);F&&C&&C.unobserve(F)}}return R&&(u.current=z),R?z:E})},[e]),w=N.useCallback(S=>{x(S);const A=e?.files.findIndex(F=>F.path===S)??-1,C=e&&A>=0?e.files.slice(0,A+1).map(F=>Hs(F.path)):[Hs(S)],E=b.current+1;b.current=E;const R=()=>{for(const F of C){const P=document.getElementById(F);if(!P||P.dataset.rendered!=="true")return!1}return!0},z=F=>{const P=n.current,O=document.getElementById(Hs(S));if(!P||!O)return!1;const L=P.getBoundingClientRect(),I=O.getBoundingClientRect(),q=P.scrollTop+(I.top-L.top);return P.scrollTo({top:Math.max(0,q),behavior:F}),!0};let $=0;const _=()=>{requestAnimationFrame(()=>{if(b.current===E){if(!R()){$<m1&&($++,_());return}if(!z("smooth")){$<m1&&($++,_());return}window.setTimeout(()=>{b.current===E&&z("smooth")},h_)}})};_()},[e,n,x]);return N.useEffect(()=>{if(!e||e.targetCommitish==="stdin")return;const S=e.targetCommitish||"HEAD",A=`${e.requestedBaseCommitish??""}...${e.requestedTargetCommitish??""}`;e.files.forEach(C=>{if(!l.has(C.path)||C.isGenerated!==!1||C.status==="deleted")return;const E=`${A}:${S}:${C.path}`;if(h.current.has(E))return;h.current.add(E);const R=encodeURIComponent(C.path);fetch(`/api/generated-status/${R}?ref=${encodeURIComponent(S)}`).then(z=>z.ok?z.json():null).then(z=>{!z||z.isGenerated!==!0||i($=>{if(!$||$.requestedBaseCommitish!==e.requestedBaseCommitish||$.requestedTargetCommitish!==e.requestedTargetCommitish)return $;let _=!1;const F=$.files.map(P=>P.path!==C.path||P.isGenerated?P:(_=!0,{...P,isGenerated:!0}));return _?{...$,files:F}:$})}).catch(()=>{})})},[e,l,i]),{renderedFilePaths:l,ensureFileRendered:g,ensureFilesRenderedUpTo:x,registerLazyFileContainer:v,scrollFileIntoDiffContainer:w}}function m_(e,n,i,l,o,u,c=[]){const[f,h]=N.useState([]),[p,b]=N.useState(null),[g,v]=N.useState(new Map),x=e&&n?`${u??"default"}:${e}:${n}:${i??"no-commit"}`:null,w=x!==null&&p===x;N.useEffect(()=>{if(!e||!n||!x)return;let _=!1;const F=oi.getViewedFiles(e,n,i,l,u);return(async()=>{if(o&&o.length>0){const O=[],L=new Set(F.map(I=>I.filePath));for(const I of o)if((I.isGenerated||I.status==="deleted"||Rj(I.path,c))&&!L.has(I.path))try{const K=c1(I),U=await u1(K),G={filePath:I.path,viewedAt:new Date().toISOString(),diffContentHash:U};O.push(G)}catch(K){console.error("Failed to generate hash for auto-collapsed file:",K)}if(O.length>0){const I=[...F,...O];oi.saveViewedFiles(e,n,I,i,l,u),_||(h(I),b(x));return}}_||(h(F),b(x))})(),()=>{_=!0}},[e,n,i,l,u,x]);const S=N.useCallback(_=>{!e||!n||(oi.saveViewedFiles(e,n,_,i,l,u),h(_))},[e,n,i,l,u]),A=N.useMemo(()=>new Set(f.map(_=>_.filePath)),[f]),C=N.useCallback(_=>f.find(F=>F.filePath===_),[f]),E=N.useCallback(async _=>{const F=g.get(_.path);if(F)return F;const P=c1(_),O=await u1(P);return v(L=>new Map(L).set(_.path,O)),O},[g]),R=N.useCallback(async(_,F)=>{const P=C(_);if(!P)return!1;const O=await E(F);return P.diffContentHash!==O},[C,E]),z=N.useCallback(async(_,F)=>{if(C(_)){const O=f.filter(L=>L.filePath!==_);S(O)}else{const O=await E(F),L={filePath:_,viewedAt:new Date().toISOString(),diffContentHash:O},I=[...f,L];S(I)}},[f,C,E,S]),$=N.useCallback(()=>{S([]),v(new Map)},[S]);return{viewedFiles:A,hasLoadedInitialViewedFiles:w,toggleFileViewed:z,isFileContentChanged:R,getViewedFileRecord:C,clearViewedFiles:$}}const g1={mobileMax:767,desktopMin:1024},wu={mobile:`(max-width: ${g1.mobileMax}px)`,desktop:`(min-width: ${g1.desktopMin}px)`},g_=()=>typeof window>"u"?{isMobile:!1,isDesktop:!0}:{isMobile:window.matchMedia(wu.mobile).matches,isDesktop:window.matchMedia(wu.desktop).matches};function b_(){const[e,n]=N.useState(()=>g_());return N.useEffect(()=>{if(typeof window>"u")return;const i=window.matchMedia(wu.mobile),l=window.matchMedia(wu.desktop),o=()=>{n({isMobile:i.matches,isDesktop:l.matches})};return o(),i.addEventListener("change",o),l.addEventListener("change",o),()=>{i.removeEventListener("change",o),l.removeEventListener("change",o)}},[]),e}function y_(e){const n=new Set;return e.forEach(i=>{const l=i.author?.trim();l&&n.add(l)}),[...n]}function x_(e){return y_(e).length>=2}function Pd(e,n,i,l){for(let o=0;o<e.chunks.length;o++){const u=e.chunks[o];if(u)for(let c=0;c<u.lines.length;c++){const f=u.lines[c];if(!f)continue;if((l==="old"?f.oldLineNumber:l==="new"?f.newLineNumber:f.newLineNumber??f.oldLineNumber)===i)return{fileIndex:n,chunkIndex:o,lineIndex:c,side:l==="old"?"left":l==="new"||f.newLineNumber?"right":"left"}}}return null}function v_(e,n){const i=n.findIndex(c=>c.path===e.file);if(i===-1)return null;const l=n[i];if(!l)return null;const o=Array.isArray(e.line)?e.line[1]:e.line,u=e.side;return Pd(l,i,o,u)||Pd(l,i,o,"new")||Pd(l,i,o,"old")}const w_=[],S_=[],Zv="difit.sidebarWidth",Kv="difit.sidebarOpen",Qv=200,Wv=600,Vd=280,k_=()=>{if(typeof window>"u")return Vd;const e=window.localStorage.getItem(Zv);if(!e)return Vd;const n=Number.parseInt(e,10);return Number.isFinite(n)?Math.min(Wv,Math.max(Qv,n)):Vd},E_=()=>{if(typeof window>"u")return!0;const e=window.localStorage.getItem(Kv);return e===null||e==="true"?!0:e!=="false"};function C_(){const[e,n]=N.useState(null),[i,l]=N.useState(lo),o=N.useRef(!1),[u,c]=N.useState(!0),[f,h]=N.useState(!0),[p,b]=N.useState(null),[g,v]=N.useState(!1),[x,w]=N.useState(k_),[S,A]=N.useState(!1),[C,E]=N.useState(E_),[R,z]=N.useState(!1),[$,_]=N.useState(!1),[F,P]=N.useState(!1),[O,L]=N.useState(!1),[I,q]=N.useState(!1),[K,U]=N.useState(new Set),G=N.useRef(!1),H=N.useRef(null),[X,Y]=N.useState(null),[ne,M]=N.useState(""),[j,B]=N.useState(""),[T,J]=N.useState(""),[W,ie]=N.useState(""),de=N.useRef(!1),{settings:me,updateSettings:ye}=Ij(),{isMobile:Se,isDesktop:Le}=b_(),{threads:be,addThread:xe,replyToThread:he,removeThread:ve,removeMessage:Ce,updateMessage:Ne,clearAllComments:pt,applyCommentImports:bt,generateThreadPrompt:mt,generateAllCommentsPrompt:Yt}=Zj(e?.baseCommitish,e?.targetCommitish,e?.commit,void 0,e?.repositoryId),yt=N.useMemo(()=>be.map(oe=>({id:oe.id,file:oe.filePath,line:typeof oe.position.line=="number"?oe.position.line:[oe.position.line.start,oe.position.line.end],side:oe.position.side,createdAt:oe.createdAt,updatedAt:oe.updatedAt,codeContent:oe.codeSnapshot?.content,messages:oe.messages})),[be]),Bt=N.useMemo(()=>x_(yt.flatMap(oe=>oe.messages)),[yt]),at=N.useMemo(()=>{const oe=new Map;return yt.forEach(we=>{const _e=oe.get(we.file);_e?_e.push(we):oe.set(we.file,[we])}),oe},[yt]),rr=Se&&be.length>0,{viewedFiles:ae,hasLoadedInitialViewedFiles:ge,toggleFileViewed:Re,clearViewedFiles:Ie}=m_(e?.baseCommitish,e?.targetCommitish,e?.commit,void 0,e?.files,e?.repositoryId,me.autoViewedPatterns);N.useEffect(()=>{G.current=!1},[e?.repositoryId,e?.baseCommitish,e?.targetCommitish,e?.commit]),N.useEffect(()=>{!G.current&&ge&&(U(new Set(ae)),G.current=!0)},[ae,ge]);const{renderedFilePaths:$e,ensureFileRendered:Xt,ensureFilesRenderedUpTo:Cn,registerLazyFileContainer:Mt,scrollFileIntoDiffContainer:gt}=p_({diffData:e,diffScrollContainerRef:H,setDiffData:n}),_t=N.useCallback(async oe=>{if(!e)return;const we=e.files.find(Qe=>Qe.path===oe);if(!we)return;const _e=ae.has(oe);await Re(oe,we),U(Qe=>{const qe=new Set(Qe);return _e?qe.delete(oe):qe.add(oe),qe}),_e||setTimeout(()=>{gt(oe)},100)},[e,gt,Re,ae]),We=N.useCallback(oe=>{U(we=>{const _e=new Set(we);return _e.has(oe)?_e.delete(oe):_e.add(oe),_e})},[]),Vn=N.useCallback(oe=>{e&&U(oe?new Set(e.files.map(we=>we.path)):new Set)},[e]),Jt=N.useCallback(oe=>{o.current=!0,l(oe)},[]),{isLoading:$u,expandLines:$i,expandAllBetweenChunks:qi,prefetchFileContent:Pi,getMergedChunks:Fn,lastUpdatedFilePath:Rr,lastUpdatedAt:pi}=Wj({baseCommitish:e?.baseCommitish,targetCommitish:e?.targetCommitish}),Gl=N.useRef(Fn);N.useEffect(()=>{Gl.current=Fn},[Fn]);const[Vi,mi]=N.useState(new Map),Gn=N.useMemo(()=>{const oe=new Map;return e?.files.forEach(we=>{oe.set(we.path,we)}),oe},[e]);N.useEffect(()=>{if(!e){mi(new Map);return}mi(oe=>{let we=!1;const _e=new Map(oe),Qe=new Set(e.files.map(qe=>qe.path));return _e.forEach((qe,tn)=>{Qe.has(tn)||(_e.delete(tn),we=!0)}),$e.forEach(qe=>{if(_e.has(qe))return;const tn=Gn.get(qe);tn&&(_e.set(qe,Gl.current(tn)),we=!0)}),we?_e:oe})},[e,Gn,$e]),N.useEffect(()=>{if(!e||!Rr)return;const oe=Gn.get(Rr);oe&&mi(we=>{if(!we.has(oe.path))return we;const _e=new Map(we);return _e.set(oe.path,Gl.current(oe)),_e})},[e,Gn,Rr,pi]);const qu=N.useMemo(()=>e?e.files.map(oe=>({...oe,chunks:Vi.get(oe.path)||oe.chunks})):[],[e,Vi]),[Yl,Gi]=N.useState(null),{shouldReload:ho,reload:Yi,watchState:Xi}=Jj(async()=>{await gi()}),{cursor:en,isHelpOpen:po,setIsHelpOpen:Bn,setCursorPosition:dt}=u_({files:qu,comments:yt,viewMode:i,reviewedFiles:ae,onToggleReviewed:_t,onCreateComment:()=>{en&&Gi({fileIndex:en.fileIndex,chunkIndex:en.chunkIndex,lineIndex:en.lineIndex})},onCopyAllComments:()=>{be.length>0&&Yn()},onDeleteAllComments:()=>{be.length>0&&confirm("Delete all comments?")&&pt()},onShowCommentsList:()=>{L(!0)},onRefresh:()=>{Yi()}});N.useEffect(()=>{if(!e||!en)return;const oe=e.files[en.fileIndex]?.path;!oe||$e.has(oe)||(Cn(oe),requestAnimationFrame(()=>{dt(en)}))},[en,e,Cn,$e,dt]);const Ut=N.useCallback((oe,we,_e,Qe)=>{dt({fileIndex:oe,chunkIndex:we,lineIndex:_e,side:Qe})},[dt]),jr=N.useCallback(()=>{Gi(null)},[Gi]),Zi=N.useCallback(oe=>mt(oe.id),[mt]),Pu=oe=>{oe.preventDefault(),z(!0);const we=oe.clientX,_e=x,Qe=tn=>{const lr=Math.max(Qv,Math.min(Wv,_e+(tn.clientX-we)));w(lr)},qe=()=>{z(!1),document.removeEventListener("mousemove",Qe),document.removeEventListener("mouseup",qe)};document.addEventListener("mousemove",Qe),document.addEventListener("mouseup",qe)},gi=N.useCallback(async(oe,we)=>{try{const _e=new URLSearchParams({ignoreWhitespace:String(u)});oe&&_e.set("base",oe),we&&_e.set("target",we);const Qe=await fetch(`/api/diff?${_e}`);if(!Qe.ok)throw new Error("Failed to fetch diff data");const qe=await Qe.json();if(n(qe),qe.baseCommitish&&J(qe.baseCommitish),qe.targetCommitish&&ie(qe.targetCommitish),!de.current){const tn=qe.requestedBaseCommitish??qe.baseCommitish,lr=qe.requestedTargetCommitish??qe.targetCommitish;tn&&M(tn),lr&&B(lr)}qe.mode&&!o.current&&l(tE(qe.mode))}catch(_e){b(_e instanceof Error?_e.message:"Unknown error")}finally{h(!1)}},[u]);N.useEffect(()=>{gi()},[gi]),N.useEffect(()=>{Se&&i!=="unified"&&l("unified")},[i,Se]),N.useEffect(()=>{try{window.localStorage.setItem(Zv,String(x))}catch{}},[x]),N.useEffect(()=>{try{window.localStorage.setItem(Kv,String(C))}catch{}},[C]),N.useEffect(()=>{fetch("/api/revisions").then(oe=>oe.ok?oe.json():null).then(oe=>{Y(oe),oe?.resolvedBase&&J(we=>we||oe.resolvedBase||""),oe?.resolvedTarget&&ie(we=>we||oe.resolvedTarget||"")}).catch(()=>Y(null))},[]);const Xl=N.useCallback(async(oe,we)=>{oe===ne&&we===j||(de.current=!0,M(oe),B(we),h(!0),b(null),await gi(oe,we))},[ne,j,gi]),_r=N.useRef(!1);N.useEffect(()=>{e?.clearComments&&!_r.current&&(_r.current=!0,pt({resetAppliedCommentImportIds:!0}),Ie(),console.log("✅ All existing comments and viewed files cleared as requested via --clean flag"))},[e?.clearComments,pt,Ie]),N.useEffect(()=>{if(!e?.commentImportId||!e.commentImports?.length)return;bt(e.commentImports,e.commentImportId).forEach(we=>console.warn(we))},[bt,e?.commentImportId,e?.commentImports]),N.useEffect(()=>{e&&(ae.size<e.files.length?P(!1):ae.size===e.files.length&&!F&&(_(!0),P(!0),setTimeout(()=>{_(!1)},1e3)))},[ae.size,e,F]),N.useEffect(()=>{const oe=JSON.stringify({threads:yt});fetch("/api/comments",{method:"POST",headers:{"Content-Type":"application/json"},body:oe}).catch(_e=>{console.error("Failed to sync comments:",_e)});const we=()=>{navigator.sendBeacon("/api/comments",oe)};return window.addEventListener("beforeunload",we),()=>{window.removeEventListener("beforeunload",we)}},[yt]),N.useEffect(()=>{const oe=new EventSource("/api/heartbeat");return oe.onopen=()=>{console.log("Connected to server heartbeat")},oe.onerror=()=>{console.log("Server connection lost"),oe.close()},()=>{oe.close()}},[]);const Zl=N.useCallback((oe,we,_e,Qe,qe)=>(xe({filePath:oe,body:_e,side:qe||"new",line:typeof we=="number"?we:{start:we[0],end:we[1]},codeSnapshot:Qe?{content:Qe,language:void 0}:void 0}),Promise.resolve()),[xe]),Yn=async()=>{try{const oe=Yt();await navigator.clipboard.writeText(oe),v(!0),setTimeout(()=>v(!1),2e3)}catch(oe){console.error("Failed to copy all comments prompt:",oe)}},ir=N.useCallback((oe,we)=>(he({threadId:oe,body:we}),Promise.resolve()),[he]),bi=oe=>{if(!e)return;const we=v_(oe,e.files);we&&dt(we)},Lr=N.useCallback(async(oe,we)=>{try{const _e=await fetch("/api/open-in-editor",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filePath:oe,line:we,editor:me.editor})});if(!_e.ok){const Qe=await _e.json().catch(()=>null);let qe=_e.statusText;Qe&&typeof Qe=="object"&&"error"in Qe&&typeof Qe.error=="string"&&(qe=Qe.error),console.error("Failed to open file in editor:",qe)}}catch(_e){console.error("Failed to open file in editor:",_e)}},[me.editor]),kt=oe=>{dt(null);const we=oe.target,_e=we.closest('[data-comment-button="true"]'),Qe=we.closest('[data-open-in-editor-button="true"]');!_e&&!Qe&&mo(oe)},mo=oe=>{document.querySelectorAll('form[data-empty="true"]').forEach(_e=>{_e.contains(oe.target)||_e.querySelector('button[type="button"]')?.click()})};if(f)return y.jsx("div",{className:"flex items-center justify-center h-screen bg-github-bg-primary",children:y.jsx("div",{className:"text-github-text-secondary text-base",children:"Loading diff..."})});if(p)return y.jsxs("div",{className:"flex flex-col items-center justify-center h-screen bg-github-bg-primary text-center gap-2",children:[y.jsx("h2",{className:"text-github-danger text-2xl mb-2",children:"Error"}),y.jsx("p",{className:"text-github-text-secondary text-base",children:p})]});if(!e)return y.jsxs("div",{className:"flex flex-col items-center justify-center h-screen bg-github-bg-primary text-center gap-2",children:[y.jsx("h2",{className:"text-github-danger text-2xl mb-2",children:"No data"}),y.jsx("p",{className:"text-github-text-secondary text-base",children:"No diff data available"})]});const go=me.editor!=="none"&&e.openInEditorAvailable!==!1;return y.jsx(oE,{children:y.jsxs("div",{className:"h-screen flex flex-col",onClickCapture:kt,children:[y.jsxs("header",{className:`bg-github-bg-secondary border-b border-github-border flex ${Se?"flex-col":"flex-row items-center"}`,children:[y.jsxs("div",{className:`flex items-center justify-between w-full ${Se?"px-3 py-2 gap-3":"px-4 py-3 gap-4 w-auto"} ${R?"":"!transition-all !duration-300 !ease-in-out"}`,style:{width:Se?"100%":C?`${x}px`:"auto",minWidth:Se?"0px":C?"200px":"auto",maxWidth:Se?"none":C?"600px":"none"},children:[y.jsx("h1",{children:y.jsx(Sj,{style:{height:"18px",color:"var(--color-github-text-secondary)"}})}),y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("button",{onClick:()=>E(!C),className:"p-2 text-github-text-secondary hover:text-github-text-primary hover:bg-github-bg-tertiary rounded transition-colors",title:C?"Collapse file tree":"Expand file tree","aria-expanded":C,"aria-controls":"file-tree-panel","aria-label":"Toggle file tree panel",children:C?y.jsx(zk,{size:18}):y.jsx(Fk,{size:18})}),y.jsx("button",{onClick:()=>A(!0),className:"p-2 text-github-text-secondary hover:text-github-text-primary hover:bg-github-bg-tertiary rounded transition-colors",title:"Settings",children:y.jsx(O1,{size:18})})]})]}),!Se&&y.jsx("div",{className:`border-r border-github-border ${R?"":"!transition-all !duration-300 !ease-in-out"}`,style:{width:C?"4px":"0px",height:"calc(100% - 16px)",margin:"8px 0",transform:"translateX(-2px)"}}),y.jsxs("div",{className:`flex-1 flex flex-wrap items-center justify-between ${Se?"px-3 pb-2 gap-3":"px-4 py-3 gap-4"}`,children:[y.jsxs("div",{className:`flex flex-wrap items-center ${Se?"gap-2":"gap-3"}`,children:[!Se&&y.jsxs("div",{className:"flex bg-github-bg-tertiary border border-github-border rounded-md p-1",children:[y.jsxs("button",{onClick:()=>Jt("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:[y.jsx(uk,{size:14}),"Split"]}),y.jsxs("button",{onClick:()=>Jt("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:[y.jsx(Zk,{size:14}),"Unified"]})]}),y.jsx(z1,{checked:u,onChange:c,label:"Ignore Whitespace",title:u?"Show whitespace changes":"Ignore whitespace changes"}),y.jsx(kj,{shouldReload:ho,isReloading:Xi.isReloading,onReload:Yi,changeType:Xi.lastChangeType,compact:Se})]}),y.jsxs("div",{className:`flex flex-wrap items-center text-sm text-github-text-secondary ${Se?"gap-3":"gap-4"}`,children:[!Se&&be.length>0&&y.jsx(sy,{commentsCount:be.length,isCopiedAll:g,onCopyAll:Yn,onDeleteAll:pt,onViewAll:()=>L(!0)}),y.jsxs("div",{className:"flex flex-col gap-1 items-center",children:[y.jsxs("div",{className:"text-xs relative",children:[ae.size===e.files.length?"All diffs difit-ed!":`${ae.size} / ${e.files.length} files viewed`,y.jsx(zj,{isActive:$})]}),y.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:y.jsx("div",{className:"absolute top-0 right-0 h-full transition-all duration-300 ease-out",style:{width:`${(e.files.length-ae.size)/e.files.length*100}%`,backgroundColor:(()=>{const oe=(e.files.length-ae.size)/e.files.length*100;return oe>50?"var(--color-github-accent)":oe>20?"var(--color-github-warning)":"var(--color-github-danger)"})()}})})]}),X?y.jsx(AA,{options:X,baseRevision:ne,targetRevision:j,resolvedBaseRevision:T,resolvedTargetRevision:W,onSelectDiff:(oe,we)=>{Xl(oe,we)},onOpenAdvanced:()=>q(!0),compact:!Le}):y.jsxs("span",{className:"text-xs",children:["Reviewing:"," ",y.jsx("code",{className:"bg-github-bg-tertiary px-1.5 py-0.5 rounded text-xs text-github-text-primary",children:e.commit.includes("...")?y.jsxs(y.Fragment,{children:[y.jsxs("span",{className:"text-github-text-secondary font-medium",children:[e.commit.split("...")[0],"..."]}),y.jsx("span",{className:"font-medium",children:e.commit.split("...")[1]})]}):e.commit})]})]})]})]}),X&&y.jsx(Ej,{isOpen:I,onClose:()=>q(!1),options:X,baseRevision:ne,targetRevision:j,resolvedBaseRevision:T,resolvedTargetRevision:W,onApply:(oe,we)=>{Xl(oe,we)}},I?`${ne}:${j}`:"closed"),Se&&C&&y.jsx("button",{type:"button","aria-label":"Close file tree",className:"fixed inset-0 bg-black/40 z-30",onClick:()=>E(!1)}),y.jsxs("div",{className:"flex flex-1 overflow-hidden relative",children:[y.jsx("div",{className:`relative overflow-hidden ${R?"":"!transition-all !duration-300 !ease-in-out"}`,style:{width:Se?"0px":C?`${x}px`:"0px"},children:y.jsxs("aside",{id:"file-tree-panel",className:`bg-github-bg-secondary overflow-y-auto flex flex-col ${Se?"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:Se?"min(85vw, 360px)":`${x}px`,minWidth:Se?"0px":"200px",maxWidth:Se?"none":"600px",height:"100%",transform:Se?C?"translateX(0)":"translateX(100%)":void 0},children:[y.jsx("div",{className:"flex-1 overflow-y-auto",children:y.jsx(xj,{files:e.files,onScrollToFile:gt,onFileSelected:Se?()=>E(!1):void 0,comments:yt,reviewedFiles:ae,onToggleReviewed:_t,selectedFileIndex:en?.fileIndex??null})}),!Se&&y.jsxs("div",{className:"p-4 border-t border-github-border flex justify-between items-center",children:[y.jsxs("button",{onClick:()=>Bn(!0),className:"flex items-center gap-1.5 text-github-text-secondary hover:text-github-text-primary transition-colors",title:"Keyboard shortcuts (Shift+?)",children:[y.jsx(Nk,{size:16}),y.jsx("span",{className:"text-sm",children:"Shortcuts"})]}),y.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:[y.jsx("span",{className:"text-sm",children:"Star on GitHub"}),y.jsx(vj,{style:{height:"18px",width:"18px"}})]})]})]})}),!Se&&y.jsx("div",{className:`bg-github-border hover:bg-github-text-muted cursor-col-resize ${R?"":"!transition-all !duration-300 !ease-in-out"}`,style:{width:C?"4px":"0px"},onMouseDown:Pu,title:"Drag to resize file list"}),y.jsx("main",{ref:H,className:`flex-1 overflow-y-auto ${rr?"pb-16":""}`,children:e.files.map((oe,we)=>{const _e=at.get(oe.path)??w_,Qe=Vi.get(oe.path)??S_,qe=$e.has(oe.path);return y.jsx("div",{id:Hs(oe.path),"data-file-path":oe.path,"data-rendered":qe?"true":"false",ref:tn=>Mt(oe.path,tn),className:"mb-6",children:qe?y.jsx(bj,{file:oe,threads:_e,showAuthorBadges:Bt,diffMode:i,reviewedFiles:ae,onToggleReviewed:_t,collapsedFiles:K,onToggleCollapsed:We,onToggleAllCollapsed:Vn,onAddComment:Zl,onGenerateThreadPrompt:Zi,onRemoveThread:ve,onReplyToThread:ir,onRemoveMessage:Ce,onUpdateMessage:Ne,onOpenInEditor:go?Lr:void 0,syntaxTheme:me.syntaxTheme,baseCommitish:e.baseCommitish,targetCommitish:e.targetCommitish,cursor:en?.fileIndex===we?en:null,fileIndex:we,onLineClick:Ut,commentTrigger:Yl?.fileIndex===we?Yl:null,onCommentTriggerHandled:jr,mergedChunks:Qe,expandLines:$i,expandAllBetweenChunks:qi,prefetchFileContent:Pi,isExpandLoading:$u}):y.jsx("div",{className:"bg-github-bg-secondary border border-github-border rounded-md px-4 py-3",children:y.jsxs("div",{className:"flex items-center justify-between gap-3",children:[y.jsxs("div",{className:"min-w-0",children:[y.jsx("div",{className:"text-xs uppercase tracking-wide text-github-text-muted",children:"Deferred Rendering"}),y.jsx("div",{className:"text-sm font-mono text-github-text-primary truncate",children:oe.path})]}),y.jsx("button",{type:"button",onClick:()=>Xt(oe.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"})]})})},oe.path)})})]}),rr&&y.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:y.jsx(sy,{commentsCount:be.length,isCopiedAll:g,onCopyAll:Yn,onDeleteAll:pt,onViewAll:()=>L(!0),direction:"up",compact:!0})}),S&&y.jsx(Oj,{isOpen:S,onClose:()=>A(!1),settings:me,onSettingsChange:ye}),y.jsx(wj,{isOpen:po,onClose:()=>Bn(!1)}),y.jsx(_C,{isOpen:O,onClose:()=>L(!1),onNavigate:bi,comments:yt,showAuthorBadges:Bt,onRemoveThread:ve,onGenerateThreadPrompt:Zi,onReplyToThread:ir,onRemoveMessage:Ce,onUpdateMessage:Ne,syntaxTheme:me.syntaxTheme})]})})}const Jv=document.getElementById("root");if(!Jv)throw new Error("Root element not found");NS.createRoot(Jv).render(y.jsx(Wt.StrictMode,{children:y.jsx(BS,{initiallyActiveScopes:["navigation"],children:y.jsx(C_,{})})}));export{Dt as _,A_ as a,Su as g};
|