@hienlh/ppm 0.8.63 → 0.8.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/bun.lock +5 -0
  3. package/dist/web/assets/{_basePickBy-CZovQgWd.js → _basePickBy-CrBYAu1z.js} +1 -1
  4. package/dist/web/assets/{_baseUniq-ClnvscgW.js → _baseUniq-PMQMCyd4.js} +1 -1
  5. package/dist/web/assets/{api-settings--eVrUeZM.js → api-settings-Cj0OeEMH.js} +1 -1
  6. package/dist/web/assets/{arc-C2Qaz-ch.js → arc-Bx6TKJWg.js} +1 -1
  7. package/dist/web/assets/architecture-PBZL5I3N-DyGQgfy0.js +1 -0
  8. package/dist/web/assets/{architectureDiagram-2XIMDMQ5-Jq91S_rs.js → architectureDiagram-2XIMDMQ5-Dinq4Kbf.js} +1 -1
  9. package/dist/web/assets/arrow-up--LjUXLEt.js +1 -0
  10. package/dist/web/assets/{blockDiagram-WCTKOSBZ-CKGufRTy.js → blockDiagram-WCTKOSBZ-CXh2T4Mt.js} +1 -1
  11. package/dist/web/assets/{browser-tab-CjjWgPDL.js → browser-tab-BT8iJmIO.js} +1 -1
  12. package/dist/web/assets/{c4Diagram-IC4MRINW-BNP2L9r_.js → c4Diagram-IC4MRINW-BCqRHxU0.js} +1 -1
  13. package/dist/web/assets/channel-GxJZ6KAL.js +1 -0
  14. package/dist/web/assets/chat-tab-B5tNFtvt.js +7 -0
  15. package/dist/web/assets/chevron-right-DeV0ehiG.js +1 -0
  16. package/dist/web/assets/{chunk-4BX2VUAB-BptTlTyl.js → chunk-4BX2VUAB-BNc3BCto.js} +1 -1
  17. package/dist/web/assets/{chunk-55IACEB6-C4mUdyio.js → chunk-55IACEB6-NTU3iwXh.js} +1 -1
  18. package/dist/web/assets/{chunk-7E7YKBS2-6xAQfBwa.js → chunk-7E7YKBS2-B3LDS0kJ.js} +1 -1
  19. package/dist/web/assets/{chunk-7R4GIKGN-DXaGAn_K.js → chunk-7R4GIKGN-Y5Bg-bKJ.js} +2 -2
  20. package/dist/web/assets/{chunk-C72U2L5F-DOtEiN5f.js → chunk-C72U2L5F-0CMBXF9Y.js} +1 -1
  21. package/dist/web/assets/{chunk-EGIJ26TM-D0KJTa_T.js → chunk-EGIJ26TM-BATHdF9E.js} +1 -1
  22. package/dist/web/assets/{chunk-FMBD7UC4-C_1aG0eb.js → chunk-FMBD7UC4-BrH-Lnio.js} +1 -1
  23. package/dist/web/assets/{chunk-GEFDOKGD-DwVPiYfW.js → chunk-GEFDOKGD-_UEQ_Hqk.js} +1 -1
  24. package/dist/web/assets/chunk-GLR3WWYH-BWjkRp6S.js +2 -0
  25. package/dist/web/assets/chunk-HHEYEP7N-DhIRtWNx.js +1 -0
  26. package/dist/web/assets/{chunk-JSJVCQXG-BSrqCL_3.js → chunk-JSJVCQXG-LNOdgWAh.js} +1 -1
  27. package/dist/web/assets/{chunk-KX2RTZJC-BCxGmbzy.js → chunk-KX2RTZJC-AniEyPkm.js} +1 -1
  28. package/dist/web/assets/{chunk-KYZI473N-BKO5gMeU.js → chunk-KYZI473N-drU3HQZZ.js} +1 -1
  29. package/dist/web/assets/{chunk-L3YUKLVL-3wBgkSvL.js → chunk-L3YUKLVL-GJ3l4AXc.js} +1 -1
  30. package/dist/web/assets/{chunk-MX3YWQON-BgjSEzus.js → chunk-MX3YWQON-OOf6bZzK.js} +1 -1
  31. package/dist/web/assets/{chunk-NQ4KR5QH-DLrZwBEm.js → chunk-NQ4KR5QH-DoAhAAPR.js} +1 -1
  32. package/dist/web/assets/{chunk-O4XLMI2P-BurQy8tt.js → chunk-O4XLMI2P-BBFcNFB_.js} +1 -1
  33. package/dist/web/assets/{chunk-OZEHJAEY-YTn24bGg.js → chunk-OZEHJAEY-CxBlPGUC.js} +1 -1
  34. package/dist/web/assets/{chunk-PQ6SQG4A-BxtUGYhW.js → chunk-PQ6SQG4A-DZGwvbzy.js} +1 -1
  35. package/dist/web/assets/{chunk-PU5JKC2W-B66ELkQm.js → chunk-PU5JKC2W-CCXYoac7.js} +1 -1
  36. package/dist/web/assets/chunk-QZHKN3VN-CzG4AaJv.js +1 -0
  37. package/dist/web/assets/{chunk-R5LLSJPH-euR2RxLN.js → chunk-R5LLSJPH-BTcrDJ0u.js} +1 -1
  38. package/dist/web/assets/{chunk-WL4C6EOR-_2CBOJdI.js → chunk-WL4C6EOR-BkioZxSz.js} +1 -1
  39. package/dist/web/assets/{chunk-XIRO2GV7-kqQ0g6wW.js → chunk-XIRO2GV7-BojyzPX8.js} +1 -1
  40. package/dist/web/assets/{chunk-XPW4576I-CtcaMb09.js → chunk-XPW4576I-no3g3yPs.js} +1 -1
  41. package/dist/web/assets/{chunk-XZSTWKYB-BYxFzZwS.js → chunk-XZSTWKYB-DTNisBJo.js} +1 -1
  42. package/dist/web/assets/{chunk-YBOYWFTD-Dx_fX35n.js → chunk-YBOYWFTD-DGKGjR6H.js} +1 -1
  43. package/dist/web/assets/classDiagram-VBA2DB6C-D3WeZMpV.js +1 -0
  44. package/dist/web/assets/classDiagram-v2-RAHNMMFH-CuONv6uF.js +1 -0
  45. package/dist/web/assets/clone-BGvnD7V5.js +1 -0
  46. package/dist/web/assets/code-editor-4UczMI-T.js +2 -0
  47. package/dist/web/assets/{cose-bilkent-S5V4N54A-CHHjH2dV.js → cose-bilkent-S5V4N54A-zoeAORzo.js} +1 -1
  48. package/dist/web/assets/csv-preview-CgHOY6hR.js +9 -0
  49. package/dist/web/assets/{dagre-CNtSxiE_.js → dagre-Bh_0hC-U.js} +1 -1
  50. package/dist/web/assets/{dagre-KLK3FWXG-ChenfPp1.js → dagre-KLK3FWXG-C5SfvcWS.js} +1 -1
  51. package/dist/web/assets/database-viewer-CUjlWuu_.js +1 -0
  52. package/dist/web/assets/{diagram-E7M64L7V-CzKYZM0Y.js → diagram-E7M64L7V-CZUkePtj.js} +1 -1
  53. package/dist/web/assets/{diagram-IFDJBPK2-ChB_paPo.js → diagram-IFDJBPK2-C_f4KWUQ.js} +1 -1
  54. package/dist/web/assets/{diagram-P4PSJMXO-D1eW1dkL.js → diagram-P4PSJMXO-DCIgnRzg.js} +1 -1
  55. package/dist/web/assets/diff-viewer-B4lDAzWv.js +4 -0
  56. package/dist/web/assets/dist-B21lOVUR.js +1 -0
  57. package/dist/web/assets/dist-DylI9XxN.js +13 -0
  58. package/dist/web/assets/dist-lF8CoYII.js +41 -0
  59. package/dist/web/assets/{erDiagram-INFDFZHY-mCvUFSn6.js → erDiagram-INFDFZHY-BmVZ3V1Q.js} +1 -1
  60. package/dist/web/assets/{flowDiagram-PKNHOUZH-14ohZ1M1.js → flowDiagram-PKNHOUZH-DQVk-izW.js} +1 -1
  61. package/dist/web/assets/{ganttDiagram-A5KZAMGK-DIX0pLbk.js → ganttDiagram-A5KZAMGK-BesueWL2.js} +1 -1
  62. package/dist/web/assets/git-graph-BTZTGZdP.js +1 -0
  63. package/dist/web/assets/gitGraph-HDMCJU4V-sd3XYN52.js +1 -0
  64. package/dist/web/assets/{gitGraphDiagram-K3NZZRJ6-yEWZbdf_.js → gitGraphDiagram-K3NZZRJ6-BnKRAgIF.js} +1 -1
  65. package/dist/web/assets/{graphlib-DhOZxqsh.js → graphlib-BZkhmhks.js} +1 -1
  66. package/dist/web/assets/index-DPI-YVJI.css +2 -0
  67. package/dist/web/assets/index-hxAJJHpg.js +37 -0
  68. package/dist/web/assets/info-3K5VOQVL-DdzKhhLF.js +1 -0
  69. package/dist/web/assets/infoDiagram-LFFYTUFH-CnHorrOf.js +2 -0
  70. package/dist/web/assets/input-Bid961xi.js +1 -0
  71. package/dist/web/assets/{isEmpty-C0YYdhYj.js → isEmpty-CauZBoL-.js} +1 -1
  72. package/dist/web/assets/{ishikawaDiagram-PHBUUO56-olazD6dZ.js → ishikawaDiagram-PHBUUO56-Proo1Zyp.js} +1 -1
  73. package/dist/web/assets/{journeyDiagram-4ABVD52K-CttDH9bb.js → journeyDiagram-4ABVD52K-86MYRgHA.js} +1 -1
  74. package/dist/web/assets/{kanban-definition-K7BYSVSG-BBXbI37U.js → kanban-definition-K7BYSVSG-lsZmnsv1.js} +1 -1
  75. package/dist/web/assets/keybindings-store-BHUZp2i1.js +1 -0
  76. package/dist/web/assets/lib-Dmwceoh0.js +4 -0
  77. package/dist/web/assets/{line-DBLLF7lH.js → line-CNR7Z1Dm.js} +1 -1
  78. package/dist/web/assets/{linear-BLFWatDe.js → linear-CGDVbc3k.js} +1 -1
  79. package/dist/web/assets/markdown-renderer-ljVdhEEq.js +69 -0
  80. package/dist/web/assets/{mermaid-parser.core-BKiGOTjR.js → mermaid-parser.core-C3bmPvHW.js} +2 -2
  81. package/dist/web/assets/{mindmap-definition-YRQLILUH-DoT7m4Sz.js → mindmap-definition-YRQLILUH-BqZbwYh4.js} +1 -1
  82. package/dist/web/assets/{ordinal-CCj7PWgZ.js → ordinal-D8VwtNz9.js} +1 -1
  83. package/dist/web/assets/packet-RMMSAZCW-BJANCvjY.js +1 -0
  84. package/dist/web/assets/pie-UPGHQEXC-DM2KFfMP.js +1 -0
  85. package/dist/web/assets/{pieDiagram-SKSYHLDU-Bkh2E4zE.js → pieDiagram-SKSYHLDU-CysZmHF5.js} +1 -1
  86. package/dist/web/assets/postgres-viewer-Dlkyzslt.js +1 -0
  87. package/dist/web/assets/{quadrantDiagram-337W2JSQ-B7zgALOL.js → quadrantDiagram-337W2JSQ-B1KHH43M.js} +1 -1
  88. package/dist/web/assets/radar-KQ55EAFF-BB-ywBD0.js +1 -0
  89. package/dist/web/assets/react-dom-Bpkvzu3U.js +1 -0
  90. package/dist/web/assets/{requirementDiagram-Z7DCOOCP-D_5GXNRo.js → requirementDiagram-Z7DCOOCP-DpYZNbHV.js} +1 -1
  91. package/dist/web/assets/{sankeyDiagram-WA2Y5GQK-BA9EFAAe.js → sankeyDiagram-WA2Y5GQK-1QhDzoqT.js} +1 -1
  92. package/dist/web/assets/{sequenceDiagram-2WXFIKYE-fyWIrHiG.js → sequenceDiagram-2WXFIKYE-yoBahL9m.js} +1 -1
  93. package/dist/web/assets/settings-tab-BSfQh_HW.js +1 -0
  94. package/dist/web/assets/sqlite-viewer-DraX5cHB.js +1 -0
  95. package/dist/web/assets/{stateDiagram-RAJIS63D-DfRBcaBu.js → stateDiagram-RAJIS63D-c6UuHXom.js} +1 -1
  96. package/dist/web/assets/stateDiagram-v2-FVOUBMTO-0R9EtHx1.js +1 -0
  97. package/dist/web/assets/{tab-store-DcIBZTD4.js → tab-store-Ck-9RsH-.js} +1 -1
  98. package/dist/web/assets/{terminal-tab-B0TAHXjw.js → terminal-tab-C_jOKXBm.js} +2 -2
  99. package/dist/web/assets/{timeline-definition-YZTLITO2-DYfwJ1jM.js → timeline-definition-YZTLITO2-BayV-4fk.js} +1 -1
  100. package/dist/web/assets/treemap-KZPCXAKY-DGHYomZ7.js +1 -0
  101. package/dist/web/assets/use-monaco-theme-BHp8EuUZ.js +11 -0
  102. package/dist/web/assets/{vennDiagram-LZ73GAT5-DqbKNRD9.js → vennDiagram-LZ73GAT5-B_s6kymD.js} +1 -1
  103. package/dist/web/assets/{xychartDiagram-JWTSCODW-DhUL86qT.js → xychartDiagram-JWTSCODW-PwVoWxs2.js} +1 -1
  104. package/dist/web/index.html +13 -10
  105. package/dist/web/sw.js +1 -1
  106. package/docs/codebase-summary.md +9 -3
  107. package/docs/design-guidelines.md +21 -0
  108. package/package.json +2 -1
  109. package/src/providers/claude-agent-sdk.ts +14 -2
  110. package/src/server/index.ts +4 -0
  111. package/src/server/routes/browser-preview.ts +2 -2
  112. package/src/server/routes/chat.ts +4 -2
  113. package/src/server/ws/chat.ts +12 -6
  114. package/src/services/account-selector.service.ts +8 -2
  115. package/src/services/claude-usage.service.ts +37 -11
  116. package/src/services/db.service.ts +45 -6
  117. package/src/web/components/editor/code-editor.tsx +36 -26
  118. package/src/web/components/editor/csv-preview.tsx +207 -0
  119. package/src/web/components/editor/editor-breadcrumb.tsx +225 -0
  120. package/src/web/components/editor/editor-toolbar.tsx +74 -0
  121. package/src/web/lib/csv-parser.ts +134 -0
  122. package/dist/web/assets/architecture-PBZL5I3N-ChOahOB7.js +0 -1
  123. package/dist/web/assets/channel-w7yboq56.js +0 -1
  124. package/dist/web/assets/chat-tab--hD0r5RS.js +0 -7
  125. package/dist/web/assets/chunk-GLR3WWYH-D9pZakqr.js +0 -2
  126. package/dist/web/assets/chunk-HHEYEP7N-Dld5BpGB.js +0 -1
  127. package/dist/web/assets/chunk-QZHKN3VN-DwSXwtjH.js +0 -1
  128. package/dist/web/assets/classDiagram-VBA2DB6C-BpJ6Oog2.js +0 -1
  129. package/dist/web/assets/classDiagram-v2-RAHNMMFH-Bj8gIhkP.js +0 -1
  130. package/dist/web/assets/clone-BSi6cgDh.js +0 -1
  131. package/dist/web/assets/code-editor-EG9sb3gL.js +0 -1
  132. package/dist/web/assets/database-viewer-h1Zb9cFF.js +0 -1
  133. package/dist/web/assets/diff-viewer-DrTqG6RM.js +0 -4
  134. package/dist/web/assets/dist-T0Vhi0Mh.js +0 -16
  135. package/dist/web/assets/git-graph-Bx3h7BK1.js +0 -1
  136. package/dist/web/assets/gitGraph-HDMCJU4V-CEee2FCA.js +0 -1
  137. package/dist/web/assets/index-Beb248lR.css +0 -2
  138. package/dist/web/assets/index-DmfRyMpE.js +0 -37
  139. package/dist/web/assets/info-3K5VOQVL-ce_pi3En.js +0 -1
  140. package/dist/web/assets/infoDiagram-LFFYTUFH-BzqyoqXw.js +0 -2
  141. package/dist/web/assets/input-Brjz2Vv-.js +0 -41
  142. package/dist/web/assets/keybindings-store-BScuugqK.js +0 -1
  143. package/dist/web/assets/markdown-renderer-DwmzGpNI.js +0 -69
  144. package/dist/web/assets/packet-RMMSAZCW-CdYSLjRL.js +0 -1
  145. package/dist/web/assets/pie-UPGHQEXC-Bm5LiD-6.js +0 -1
  146. package/dist/web/assets/postgres-viewer-Bp6mOne8.js +0 -1
  147. package/dist/web/assets/radar-KQ55EAFF-C4PnyG7_.js +0 -1
  148. package/dist/web/assets/settings-store-Bbhg_ptG.js +0 -2
  149. package/dist/web/assets/settings-tab-8lfbaK4W.js +0 -1
  150. package/dist/web/assets/sqlite-viewer-Cenucoym.js +0 -1
  151. package/dist/web/assets/stateDiagram-v2-FVOUBMTO-CMN4M2Em.js +0 -1
  152. package/dist/web/assets/treemap-KZPCXAKY-2_y-mhkz.js +0 -1
  153. package/dist/web/assets/use-monaco-theme-vwto-Vlf.js +0 -11
  154. /package/dist/web/assets/{api-client-DpGMOZNf.js → api-client-DniUYaIY.js} +0 -0
  155. /package/dist/web/assets/{array-BGFCBI0e.js → array-Bxr4Uw0G.js} +0 -0
  156. /package/dist/web/assets/{columns-2-ChOTgl3e.js → columns-2-DpsNbZOc.js} +0 -0
  157. /package/dist/web/assets/{cytoscape.esm-Ccan6xou.js → cytoscape.esm-zgx_RusX.js} +0 -0
  158. /package/dist/web/assets/{defaultLocale-CRZydyG6.js → defaultLocale-BbBFINez.js} +0 -0
  159. /package/dist/web/assets/{dist-Cce3efmT.js → dist-CBQJF0q0.js} +0 -0
  160. /package/dist/web/assets/{init-B8gtcn7T.js → init-C9S7-8pU.js} +0 -0
  161. /package/dist/web/assets/{isArrayLikeObject-B4pdpV8V.js → isArrayLikeObject-sCNOrnc2.js} +0 -0
  162. /package/dist/web/assets/{katex-Bbu770d9.js → katex-C10ndCVt.js} +0 -0
  163. /package/dist/web/assets/{math-DwgHI-Cu.js → math-DO7stL4-.js} +0 -0
  164. /package/dist/web/assets/{path-DZF-JdEe.js → path-DPMyyJeP.js} +0 -0
  165. /package/dist/web/assets/{preload-helper-qlgyTAkD.js → preload-helper-uTix4PVD.js} +0 -0
  166. /package/dist/web/assets/{react-BGf7KNLk.js → react-ER-4DN55.js} +0 -0
  167. /package/dist/web/assets/{rough.esm-VLpapkIG.js → rough.esm-BWqoIFNR.js} +0 -0
  168. /package/dist/web/assets/{src-BoSBNdA_.js → src-BYKCXnff.js} +0 -0
  169. /package/dist/web/assets/{table-Yo02WRH-.js → table-C7X5UAEI.js} +0 -0
  170. /package/dist/web/assets/{tag-CaC1ng2E.js → tag-CCtdV063.js} +0 -0
  171. /package/dist/web/assets/{utils-btZ8C8-R.js → utils-BcFEFg4m.js} +0 -0
@@ -0,0 +1,41 @@
1
+ import{o as e}from"./chunk-CFjPhJqf.js";import{t}from"./react-nm2Ru1Pt.js";import{t as n}from"./react-dom-Bpkvzu3U.js";import{t as r}from"./jsx-runtime-BRW_vwa9.js";var i=e(t(),1);function a(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function o(...e){return t=>{let n=!1,r=e.map(e=>{let r=a(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():a(e[t],null)}}}}function s(...e){return i.useCallback(o(...e),e)}var c=r();function l(e){let t=d(e),n=i.forwardRef((e,n)=>{let{children:r,...a}=e,o=i.Children.toArray(r),s=o.find(m);if(s){let e=s.props.children,r=o.map(t=>t===s?i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null:t);return(0,c.jsx)(t,{...a,ref:n,children:i.isValidElement(e)?i.cloneElement(e,void 0,r):null})}return(0,c.jsx)(t,{...a,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var u=l(`Slot`);function d(e){let t=i.forwardRef((e,t)=>{let{children:n,...r}=e;if(i.isValidElement(n)){let e=g(n),a=h(r,n.props);return n.type!==i.Fragment&&(a.ref=t?o(t,e):e),i.cloneElement(n,a)}return i.Children.count(n)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var f=Symbol(`radix.slottable`);function p(e){let t=({children:e})=>(0,c.jsx)(c.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=f,t}function m(e){return i.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===f}function h(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function g(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var _=e(n(),1),v=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=l(`Primitive.${t}`),r=i.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,c.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function y(e,t){e&&_.flushSync(()=>e.dispatchEvent(t))}function b(e,t){let n=i.createContext(t),r=e=>{let{children:t,...r}=e,a=i.useMemo(()=>r,Object.values(r));return(0,c.jsx)(n.Provider,{value:a,children:t})};r.displayName=e+`Provider`;function a(r){let a=i.useContext(n);if(a)return a;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,a]}function x(e,t=[]){let n=[];function r(t,r){let a=i.createContext(r),o=n.length;n=[...n,r];let s=t=>{let{scope:n,children:r,...s}=t,l=n?.[e]?.[o]||a,u=i.useMemo(()=>s,Object.values(s));return(0,c.jsx)(l.Provider,{value:u,children:r})};s.displayName=t+`Provider`;function l(n,s){let c=s?.[e]?.[o]||a,l=i.useContext(c);if(l)return l;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[s,l]}let a=()=>{let t=n.map(e=>i.createContext(e));return function(n){let r=n?.[e]||t;return i.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return a.scopeName=e,[r,S(a,...t)]}function S(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function C(e){let t=e+`CollectionProvider`,[n,r]=x(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),u=e=>{let{scope:t,children:n}=e,r=i.useRef(null),o=i.useRef(new Map).current;return(0,c.jsx)(a,{scope:t,itemMap:o,collectionRef:r,children:n})};u.displayName=t;let d=e+`CollectionSlot`,f=l(d),p=i.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,c.jsx)(f,{ref:s(t,o(d,n).collectionRef),children:r})});p.displayName=d;let m=e+`CollectionItemSlot`,h=`data-radix-collection-item`,g=l(m),_=i.forwardRef((e,t)=>{let{scope:n,children:r,...a}=e,l=i.useRef(null),u=s(t,l),d=o(m,n);return i.useEffect(()=>(d.itemMap.set(l,{ref:l,...a}),()=>void d.itemMap.delete(l))),(0,c.jsx)(g,{[h]:``,ref:u,children:r})});_.displayName=m;function v(t){let n=o(e+`CollectionConsumer`,t);return i.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${h}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:u,Slot:p,ItemSlot:_},v,r]}typeof window<`u`&&window.document&&window.document.createElement;function w(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var T=globalThis?.document?i.useLayoutEffect:()=>{},E=i.useInsertionEffect||T;function D({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[a,o,s]=O({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:a;{let t=i.useRef(e!==void 0);i.useEffect(()=>{let e=t.current;if(e!==c){let t=e?`controlled`:`uncontrolled`,n=c?`controlled`:`uncontrolled`;console.warn(`${r} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=c},[c,r])}return[l,i.useCallback(t=>{if(c){let n=k(t)?t(e):t;n!==e&&s.current?.(n)}else o(t)},[c,e,o,s])]}function O({defaultProp:e,onChange:t}){let[n,r]=i.useState(e),a=i.useRef(n),o=i.useRef(t);return E(()=>{o.current=t},[t]),i.useEffect(()=>{a.current!==n&&(o.current?.(n),a.current=n)},[n,a]),[n,r,o]}function k(e){return typeof e==`function`}function A(e,t){return i.useReducer((e,n)=>t[e][n]??e,e)}var j=e=>{let{present:t,children:n}=e,r=M(t),a=typeof n==`function`?n({present:r.isPresent}):i.Children.only(n),o=s(r.ref,P(a));return typeof n==`function`||r.isPresent?i.cloneElement(a,{ref:o}):null};j.displayName=`Presence`;function M(e){let[t,n]=i.useState(),r=i.useRef(null),a=i.useRef(e),o=i.useRef(`none`),[s,c]=A(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return i.useEffect(()=>{let e=N(r.current);o.current=s===`mounted`?e:`none`},[s]),T(()=>{let t=r.current,n=a.current;if(n!==e){let r=o.current,i=N(t);e?c(`MOUNT`):i===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==i?`ANIMATION_OUT`:`UNMOUNT`),a.current=e}},[e,c]),T(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,i=i=>{let o=N(r.current).includes(CSS.escape(i.animationName));if(i.target===t&&o&&(c(`ANIMATION_END`),!a.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},s=e=>{e.target===t&&(o.current=N(r.current))};return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,i),t.addEventListener(`animationend`,i),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,i),t.removeEventListener(`animationend`,i)}}else c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:i.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function N(e){return e?.animationName||`none`}function P(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ee=i.useId||(()=>void 0),te=0;function ne(e){let[t,n]=i.useState(ee());return T(()=>{e||n(e=>e??String(te++))},[e]),e||(t?`radix-${t}`:``)}var re=i.createContext(void 0);function F(e){let t=i.useContext(re);return e||t||`ltr`}function I(e){let t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...e)=>t.current?.(...e),[])}function ie(e,t=globalThis?.document){let n=I(e);i.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var ae=`DismissableLayer`,oe=`dismissableLayer.update`,se=`dismissableLayer.pointerDownOutside`,ce=`dismissableLayer.focusOutside`,le,ue=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),de=i.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:l,onDismiss:u,...d}=e,f=i.useContext(ue),[p,m]=i.useState(null),h=p?.ownerDocument??globalThis?.document,[,g]=i.useState({}),_=s(t,e=>m(e)),y=Array.from(f.layers),[b]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),x=y.indexOf(b),S=p?y.indexOf(p):-1,C=f.layersWithOutsidePointerEventsDisabled.size>0,T=S>=x,E=me(e=>{let t=e.target,n=[...f.branches].some(e=>e.contains(t));!T||n||(a?.(e),l?.(e),e.defaultPrevented||u?.())},h),D=he(e=>{let t=e.target;[...f.branches].some(e=>e.contains(t))||(o?.(e),l?.(e),e.defaultPrevented||u?.())},h);return ie(e=>{S===f.layers.size-1&&(r?.(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))},h),i.useEffect(()=>{if(p)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(le=h.body.style.pointerEvents,h.body.style.pointerEvents=`none`),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),ge(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=le)}},[p,h,n,f]),i.useEffect(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),ge())},[p,f]),i.useEffect(()=>{let e=()=>g({});return document.addEventListener(oe,e),()=>document.removeEventListener(oe,e)},[]),(0,c.jsx)(v.div,{...d,ref:_,style:{pointerEvents:C?T?`auto`:`none`:void 0,...e.style},onFocusCapture:w(e.onFocusCapture,D.onFocusCapture),onBlurCapture:w(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:w(e.onPointerDownCapture,E.onPointerDownCapture)})});de.displayName=ae;var fe=`DismissableLayerBranch`,pe=i.forwardRef((e,t)=>{let n=i.useContext(ue),r=i.useRef(null),a=s(t,r);return i.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,c.jsx)(v.div,{...e,ref:a})});pe.displayName=fe;function me(e,t=globalThis?.document){let n=I(e),r=i.useRef(!1),a=i.useRef(()=>{});return i.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){_e(se,n,i,{discrete:!0})},i={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,a.current),a.current=r,t.addEventListener(`click`,a.current,{once:!0})):r()}else t.removeEventListener(`click`,a.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(i),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function he(e,t=globalThis?.document){let n=I(e),r=i.useRef(!1);return i.useEffect(()=>{let e=e=>{e.target&&!r.current&&_e(ce,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ge(){let e=new CustomEvent(oe);document.dispatchEvent(e)}function _e(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?y(i,a):i.dispatchEvent(a)}var ve=`focusScope.autoFocusOnMount`,ye=`focusScope.autoFocusOnUnmount`,be={bubbles:!1,cancelable:!0},xe=`FocusScope`,Se=i.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...l}=e,[u,d]=i.useState(null),f=I(a),p=I(o),m=i.useRef(null),h=s(t,e=>d(e)),g=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(r){let e=function(e){if(g.paused||!u)return;let t=e.target;u.contains(t)?m.current=t:L(m.current,{select:!0})},t=function(e){if(g.paused||!u)return;let t=e.relatedTarget;t!==null&&(u.contains(t)||L(m.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&L(u)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return u&&r.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,u,g.paused]),i.useEffect(()=>{if(u){ke.add(g);let e=document.activeElement;if(!u.contains(e)){let t=new CustomEvent(ve,be);u.addEventListener(ve,f),u.dispatchEvent(t),t.defaultPrevented||(Ce(Me(Te(u)),{select:!0}),document.activeElement===e&&L(u))}return()=>{u.removeEventListener(ve,f),setTimeout(()=>{let t=new CustomEvent(ye,be);u.addEventListener(ye,p),u.dispatchEvent(t),t.defaultPrevented||L(e??document.body,{select:!0}),u.removeEventListener(ye,p),ke.remove(g)},0)}}},[u,f,p,g]);let _=i.useCallback(e=>{if(!n&&!r||g.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=we(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&L(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&L(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,g.paused]);return(0,c.jsx)(v.div,{tabIndex:-1,...l,ref:h,onKeyDown:_})});Se.displayName=xe;function Ce(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(L(r,{select:t}),document.activeElement!==n)return}function we(e){let t=Te(e);return[Ee(t,e),Ee(t.reverse(),e)]}function Te(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ee(e,t){for(let n of e)if(!De(n,{upTo:t}))return n}function De(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function Oe(e){return e instanceof HTMLInputElement&&`select`in e}function L(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Oe(e)&&t&&e.select()}}var ke=Ae();function Ae(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=je(e,t),e.unshift(t)},remove(t){e=je(e,t),e[0]?.resume()}}}function je(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Me(e){return e.filter(e=>e.tagName!==`A`)}var Ne=`Portal`,Pe=i.forwardRef((e,t)=>{let{container:n,...r}=e,[a,o]=i.useState(!1);T(()=>o(!0),[]);let s=n||a&&globalThis?.document?.body;return s?_.createPortal((0,c.jsx)(v.div,{...r,ref:t}),s):null});Pe.displayName=Ne;var Fe=0;function Ie(){i.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??Le()),document.body.insertAdjacentElement(`beforeend`,e[1]??Le()),Fe++,()=>{Fe===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),Fe--}},[])}function Le(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var R=function(){return R=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},R.apply(this,arguments)};function Re(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function ze(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Be=`right-scroll-bar-position`,Ve=`width-before-scroll-bar`,He=`with-scroll-bars-hidden`,Ue=`--removed-body-scroll-bar-size`;function We(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Ge(e,t){var n=(0,i.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Ke=typeof window<`u`?i.useLayoutEffect:i.useEffect,qe=new WeakMap;function Je(e,t){var n=Ge(t||null,function(t){return e.forEach(function(e){return We(e,t)})});return Ke(function(){var t=qe.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||We(e,null)}),i.forEach(function(e){r.has(e)||We(e,a)})}qe.set(n,e)},[e]),n}function Ye(e){return e}function Xe(e,t){t===void 0&&(t=Ye);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Ze(e){e===void 0&&(e={});var t=Xe(null);return t.options=R({async:!0,ssr:!1},e),t}var Qe=function(e){var t=e.sideCar,n=Re(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return i.createElement(r,R({},n))};Qe.isSideCarExport=!0;function $e(e,t){return e.useMedium(t),Qe}var et=Ze(),tt=function(){},nt=i.forwardRef(function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:tt,onWheelCapture:tt,onTouchMoveCapture:tt}),a=r[0],o=r[1],s=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=Re(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=Je([n,t]),w=R(R({},x),a);return i.createElement(i.Fragment,null,d&&i.createElement(S,{sideCar:et,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:o,allowPinchZoom:!!_,lockRef:n,gapMode:b}),s?i.cloneElement(i.Children.only(c),R(R({},w),{ref:C})):i.createElement(y,R({},w,{className:l,ref:C}),c))});nt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},nt.classNames={fullWidth:Ve,zeroRight:Be};var rt,it=function(){if(rt)return rt;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function at(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=it();return t&&e.setAttribute(`nonce`,t),e}function ot(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function st(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var ct=function(){var e=0,t=null;return{add:function(n){e==0&&(t=at())&&(ot(t,n),st(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},lt=function(){var e=ct();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ut=function(){var e=lt();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},dt={left:0,top:0,right:0,gap:0},ft=function(e){return parseInt(e||``,10)||0},pt=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[ft(n),ft(r),ft(i)]},mt=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return dt;var t=pt(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},ht=ut(),gt=`data-scroll-locked`,_t=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
2
+ .${He} {
3
+ overflow: hidden ${r};
4
+ padding-right: ${s}px ${r};
5
+ }
6
+ body[${gt}] {
7
+ overflow: hidden ${r};
8
+ overscroll-behavior: contain;
9
+ ${[t&&`position: relative ${r};`,n===`margin`&&`
10
+ padding-left: ${i}px;
11
+ padding-top: ${a}px;
12
+ padding-right: ${o}px;
13
+ margin-left:0;
14
+ margin-top:0;
15
+ margin-right: ${s}px ${r};
16
+ `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
17
+ }
18
+
19
+ .${Be} {
20
+ right: ${s}px ${r};
21
+ }
22
+
23
+ .${Ve} {
24
+ margin-right: ${s}px ${r};
25
+ }
26
+
27
+ .${Be} .${Be} {
28
+ right: 0 ${r};
29
+ }
30
+
31
+ .${Ve} .${Ve} {
32
+ margin-right: 0 ${r};
33
+ }
34
+
35
+ body[${gt}] {
36
+ ${Ue}: ${s}px;
37
+ }
38
+ `},vt=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},yt=function(){i.useEffect(function(){return document.body.setAttribute(gt,(vt()+1).toString()),function(){var e=vt()-1;e<=0?document.body.removeAttribute(gt):document.body.setAttribute(gt,e.toString())}},[])},bt=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?`margin`:r;yt();var o=i.useMemo(function(){return mt(a)},[a]);return i.createElement(ht,{styles:_t(o,!t,a,n?``:`!important`)})},xt=!1;if(typeof window<`u`)try{var St=Object.defineProperty({},`passive`,{get:function(){return xt=!0,!0}});window.addEventListener(`test`,St,St),window.removeEventListener(`test`,St,St)}catch{xt=!1}var Ct=xt?{passive:!1}:!1,wt=function(e){return e.tagName===`TEXTAREA`},Tt=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!wt(e)&&n[t]===`visible`)},Et=function(e){return Tt(e,`overflowY`)},Dt=function(e){return Tt(e,`overflowX`)},Ot=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),jt(e,r)){var i=Mt(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},kt=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},At=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},jt=function(e,t){return e===`v`?Et(t):Dt(t)},Mt=function(e,t){return e===`v`?kt(t):At(t)},Nt=function(e,t){return e===`h`&&t===`rtl`?-1:1},Pt=function(e,t,n,r,i){var a=Nt(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Mt(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&jt(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Ft=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},It=function(e){return[e.deltaX,e.deltaY]},Lt=function(e){return e&&`current`in e?e.current:e},Rt=function(e,t){return e[0]===t[0]&&e[1]===t[1]},zt=function(e){return`
39
+ .block-interactivity-${e} {pointer-events: none;}
40
+ .allow-interactivity-${e} {pointer-events: all;}
41
+ `},Bt=0,Vt=[];function Ht(e){var t=i.useRef([]),n=i.useRef([0,0]),r=i.useRef(),a=i.useState(Bt++)[0],o=i.useState(ut)[0],s=i.useRef(e);i.useEffect(function(){s.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${a}`);var t=ze([e.lockRef.current],(e.shards||[]).map(Lt),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${a}`)}),function(){document.body.classList.remove(`block-interactivity-${a}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${a}`)})}}},[e.inert,e.lockRef.current,e.shards]);var c=i.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!s.current.allowPinchZoom;var i=Ft(e),a=n.current,o=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(o)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Ot(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Ot(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(o||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Pt(h,t,e,h===`h`?o:c,!0)},[]),l=i.useCallback(function(e){var n=e;if(!(!Vt.length||Vt[Vt.length-1]!==o)){var r=`deltaY`in n?It(n):Ft(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Rt(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var a=(s.current.shards||[]).map(Lt).filter(Boolean).filter(function(e){return e.contains(n.target)});(a.length>0?c(n,a[0]):!s.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),u=i.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Ut(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=i.useCallback(function(e){n.current=Ft(e),r.current=void 0},[]),f=i.useCallback(function(t){u(t.type,It(t),t.target,c(t,e.lockRef.current))},[]),p=i.useCallback(function(t){u(t.type,Ft(t),t.target,c(t,e.lockRef.current))},[]);i.useEffect(function(){return Vt.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,l,Ct),document.addEventListener(`touchmove`,l,Ct),document.addEventListener(`touchstart`,d,Ct),function(){Vt=Vt.filter(function(e){return e!==o}),document.removeEventListener(`wheel`,l,Ct),document.removeEventListener(`touchmove`,l,Ct),document.removeEventListener(`touchstart`,d,Ct)}},[]);var m=e.removeScrollBar,h=e.inert;return i.createElement(i.Fragment,null,h?i.createElement(o,{styles:zt(a)}):null,m?i.createElement(bt,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ut(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Wt=$e(et,Ht),Gt=i.forwardRef(function(e,t){return i.createElement(nt,R({},e,{ref:t,sideCar:Wt}))});Gt.classNames=nt.classNames;var Kt=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},qt=new WeakMap,Jt=new WeakMap,Yt={},Xt=0,Zt=function(e){return e&&(e.host||Zt(e.parentNode))},Qt=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Zt(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},$t=function(e,t,n,r){var i=Qt(t,Array.isArray(e)?e:[e]);Yt[n]||(Yt[n]=new WeakMap);var a=Yt[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(qt.get(e)||0)+1,l=(a.get(e)||0)+1;qt.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Jt.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Xt++,function(){o.forEach(function(e){var t=qt.get(e)-1,i=a.get(e)-1;qt.set(e,t),a.set(e,i),t||(Jt.has(e)||e.removeAttribute(r),Jt.delete(e)),i||e.removeAttribute(n)}),Xt--,Xt||(qt=new WeakMap,qt=new WeakMap,Jt=new WeakMap,Yt={})}},en=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Kt(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),$t(r,i,n,`aria-hidden`)):function(){return null}};function tn(e){let[t,n]=i.useState(void 0);return T(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var nn=[`top`,`right`,`bottom`,`left`],z=Math.min,B=Math.max,rn=Math.round,an=Math.floor,V=e=>({x:e,y:e}),on={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function sn(e,t,n){return B(e,z(t,n))}function H(e,t){return typeof e==`function`?e(t):e}function U(e){return e.split(`-`)[0]}function W(e){return e.split(`-`)[1]}function cn(e){return e===`x`?`y`:`x`}function ln(e){return e===`y`?`height`:`width`}function G(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function un(e){return cn(G(e))}function dn(e,t,n){n===void 0&&(n=!1);let r=W(e),i=un(e),a=ln(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=bn(o)),[o,bn(o)]}function fn(e){let t=bn(e);return[pn(e),t,pn(t)]}function pn(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var mn=[`left`,`right`],hn=[`right`,`left`],gn=[`top`,`bottom`],_n=[`bottom`,`top`];function vn(e,t,n){switch(e){case`top`:case`bottom`:return n?t?hn:mn:t?mn:hn;case`left`:case`right`:return t?gn:_n;default:return[]}}function yn(e,t,n,r){let i=W(e),a=vn(U(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(pn)))),a}function bn(e){let t=U(e);return on[t]+e.slice(t.length)}function xn(e){return{top:0,right:0,bottom:0,left:0,...e}}function Sn(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:xn(e)}function Cn(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function wn(e,t,n){let{reference:r,floating:i}=e,a=G(t),o=un(t),s=ln(o),c=U(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(W(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function Tn(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=H(t,e),p=Sn(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Cn(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Cn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var En=50,Dn=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Tn},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=wn(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<En&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=wn(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},On=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=H(e,t)||{};if(l==null)return{};let d=Sn(u),f={x:n,y:r},p=un(i),m=ln(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=z(d[_],T),D=z(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=sn(O,A,k),M=!c.arrow&&W(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),kn=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=H(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=U(r),_=G(o),v=U(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[bn(o)]:fn(o)),x=p!==`none`;!d&&x&&b.push(...yn(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=dn(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==G(t))||T.every(e=>G(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=G(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function An(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function jn(e){return nn.some(t=>e[t]>=0)}var Mn=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=H(e,t);switch(i){case`referenceHidden`:{let e=An(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:jn(e)}}}case`escaped`:{let e=An(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:jn(e)}}}default:return{}}}}},Nn=new Set([`left`,`top`]);async function Pn(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=U(n),s=W(n),c=G(n)===`y`,l=Nn.has(o)?-1:1,u=a&&c?-1:1,d=H(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Fn=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Pn(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},In=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=H(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=G(U(i)),p=cn(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=sn(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=sn(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Ln=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=H(e,t),u={x:n,y:r},d=G(i),f=cn(d),p=u[f],m=u[d],h=H(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Nn.has(U(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Rn=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=H(e,t),u=await o.detectOverflow(t,l),d=U(i),f=W(i),p=G(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=z(h-u[g],v),x=z(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=B(u.left,0),t=B(u.right,0),n=B(u.top,0),r=B(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:B(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:B(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function zn(){return typeof window<`u`}function Bn(e){return Vn(e)?(e.nodeName||``).toLowerCase():`#document`}function K(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function q(e){return((Vn(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Vn(e){return zn()?e instanceof Node||e instanceof K(e).Node:!1}function J(e){return zn()?e instanceof Element||e instanceof K(e).Element:!1}function Y(e){return zn()?e instanceof HTMLElement||e instanceof K(e).HTMLElement:!1}function Hn(e){return!zn()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof K(e).ShadowRoot}function Un(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Z(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Wn(e){return/^(table|td|th)$/.test(Bn(e))}function Gn(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Kn=/transform|translate|scale|rotate|perspective|filter/,qn=/paint|layout|strict|content/,X=e=>!!e&&e!==`none`,Jn;function Yn(e){let t=J(e)?Z(e):e;return X(t.transform)||X(t.translate)||X(t.scale)||X(t.rotate)||X(t.perspective)||!Zn()&&(X(t.backdropFilter)||X(t.filter))||Kn.test(t.willChange||``)||qn.test(t.contain||``)}function Xn(e){let t=Q(e);for(;Y(t)&&!Qn(t);){if(Yn(t))return t;if(Gn(t))return null;t=Q(t)}return null}function Zn(){return Jn??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Jn}function Qn(e){return/^(html|body|#document)$/.test(Bn(e))}function Z(e){return K(e).getComputedStyle(e)}function $n(e){return J(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Q(e){if(Bn(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Hn(e)&&e.host||q(e);return Hn(t)?t.host:t}function er(e){let t=Q(e);return Qn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Y(t)&&Un(t)?t:er(t)}function tr(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=er(e),i=r===e.ownerDocument?.body,a=K(r);if(i){let e=nr(a);return t.concat(a,a.visualViewport||[],Un(r)?r:[],e&&n?tr(e):[])}else return t.concat(r,tr(r,[],n))}function nr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function rr(e){let t=Z(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Y(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=rn(n)!==a||rn(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function ir(e){return J(e)?e:e.contextElement}function ar(e){let t=ir(e);if(!Y(t))return V(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=rr(t),o=(a?rn(n.width):n.width)/r,s=(a?rn(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var or=V(0);function sr(e){let t=K(e);return!Zn()||!t.visualViewport?or:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function cr(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==K(e)?!1:t}function $(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=ir(e),o=V(1);t&&(r?J(r)&&(o=ar(r)):o=ar(e));let s=cr(a,n,r)?sr(a):V(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=K(a),t=r&&J(r)?K(r):r,n=e,i=nr(n);for(;i&&r&&t!==n;){let e=ar(i),t=i.getBoundingClientRect(),r=Z(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=K(i),i=nr(n)}}return Cn({width:u,height:d,x:c,y:l})}function lr(e,t){let n=$n(e).scrollLeft;return t?t.left+n:$(q(e)).left+n}function ur(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-lr(e,n),y:n.top+t.scrollTop}}function dr(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=q(r),s=t?Gn(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=V(1),u=V(0),d=Y(r);if((d||!d&&!a)&&((Bn(r)!==`body`||Un(o))&&(c=$n(r)),d)){let e=$(r);l=ar(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?ur(o,c):V(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function fr(e){return Array.from(e.getClientRects())}function pr(e){let t=q(e),n=$n(e),r=e.ownerDocument.body,i=B(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=B(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+lr(e),s=-n.scrollTop;return Z(r).direction===`rtl`&&(o+=B(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var mr=25;function hr(e,t){let n=K(e),r=q(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Zn();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=lr(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=mr&&(a-=o)}else l<=mr&&(a+=l);return{width:a,height:o,x:s,y:c}}function gr(e,t){let n=$(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Y(e)?ar(e):V(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function _r(e,t,n){let r;if(t===`viewport`)r=hr(e,n);else if(t===`document`)r=pr(q(e));else if(J(t))r=gr(t,n);else{let n=sr(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Cn(r)}function vr(e,t){let n=Q(e);return n===t||!J(n)||Qn(n)?!1:Z(n).position===`fixed`||vr(n,t)}function yr(e,t){let n=t.get(e);if(n)return n;let r=tr(e,[],!1).filter(e=>J(e)&&Bn(e)!==`body`),i=null,a=Z(e).position===`fixed`,o=a?Q(e):e;for(;J(o)&&!Qn(o);){let t=Z(o),n=Yn(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Un(o)&&!n&&vr(e,o))?r=r.filter(e=>e!==o):i=t,o=Q(o)}return t.set(e,r),r}function br(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Gn(t)?[]:yr(t,this._c):[].concat(n),r],o=_r(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=_r(t,a[e],i);s=B(n.top,s),c=z(n.right,c),l=z(n.bottom,l),u=B(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function xr(e){let{width:t,height:n}=rr(e);return{width:t,height:n}}function Sr(e,t,n){let r=Y(t),i=q(t),a=n===`fixed`,o=$(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=V(0);function l(){c.x=lr(i)}if(r||!r&&!a)if((Bn(t)!==`body`||Un(i))&&(s=$n(t)),r){let e=$(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?ur(i,s):V(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Cr(e){return Z(e).position===`static`}function wr(e,t){if(!Y(e)||Z(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return q(e)===n&&(n=n.ownerDocument.body),n}function Tr(e,t){let n=K(e);if(Gn(e))return n;if(!Y(e)){let t=Q(e);for(;t&&!Qn(t);){if(J(t)&&!Cr(t))return t;t=Q(t)}return n}let r=wr(e,t);for(;r&&Wn(r)&&Cr(r);)r=wr(r,t);return r&&Qn(r)&&Cr(r)&&!Yn(r)?n:r||Xn(e)||n}var Er=async function(e){let t=this.getOffsetParent||Tr,n=this.getDimensions,r=await n(e.floating);return{reference:Sr(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Dr(e){return Z(e).direction===`rtl`}var Or={convertOffsetParentRelativeRectToViewportRelativeRect:dr,getDocumentElement:q,getClippingRect:br,getOffsetParent:Tr,getElementRects:Er,getClientRects:fr,getDimensions:xr,getScale:ar,isElement:J,isRTL:Dr};function kr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ar(e,t){let n=null,r,i=q(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=an(d),h=an(i.clientWidth-(u+f)),g=an(i.clientHeight-(d+p)),_=an(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:B(0,z(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!kr(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function jr(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=ir(e),u=i||a?[...l?tr(l):[],...t?tr(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Ar(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?$(e):null;c&&g();function g(){let t=$(e);h&&!kr(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Mr=Fn,Nr=In,Pr=kn,Fr=Rn,Ir=Mn,Lr=On,Rr=Ln,zr=(e,t,n)=>{let r=new Map,i={platform:Or,...n},a={...i.platform,_c:r};return Dn(e,t,{...i,platform:a})},Br=typeof document<`u`?i.useLayoutEffect:function(){};function Vr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Vr(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Vr(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Hr(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ur(e,t){let n=Hr(e);return Math.round(t*n)/n}function Wr(e){let t=i.useRef(e);return Br(()=>{t.current=e}),t}function Gr(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:a,elements:{reference:o,floating:s}={},transform:c=!0,whileElementsMounted:l,open:u}=e,[d,f]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=i.useState(r);Vr(p,r)||m(r);let[h,g]=i.useState(null),[v,y]=i.useState(null),b=i.useCallback(e=>{e!==w.current&&(w.current=e,g(e))},[]),x=i.useCallback(e=>{e!==T.current&&(T.current=e,y(e))},[]),S=o||h,C=s||v,w=i.useRef(null),T=i.useRef(null),E=i.useRef(d),D=l!=null,O=Wr(l),k=Wr(a),A=Wr(u),j=i.useCallback(()=>{if(!w.current||!T.current)return;let e={placement:t,strategy:n,middleware:p};k.current&&(e.platform=k.current),zr(w.current,T.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!Vr(E.current,t)&&(E.current=t,_.flushSync(()=>{f(t)}))})},[p,t,n,k,A]);Br(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);let M=i.useRef(!1);Br(()=>(M.current=!0,()=>{M.current=!1}),[]),Br(()=>{if(S&&(w.current=S),C&&(T.current=C),S&&C){if(O.current)return O.current(S,C,j);j()}},[S,C,j,O,D]);let N=i.useMemo(()=>({reference:w,floating:T,setReference:b,setFloating:x}),[b,x]),P=i.useMemo(()=>({reference:S,floating:C}),[S,C]),ee=i.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=Ur(P.floating,d.x),r=Ur(P.floating,d.y);return c?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Hr(P.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,c,P.floating,d.x,d.y]);return i.useMemo(()=>({...d,update:j,refs:N,elements:P,floatingStyles:ee}),[d,j,N,P,ee])}var Kr=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Lr({element:r.current,padding:i}).fn(n):r?Lr({element:r,padding:i}).fn(n):{}}}},qr=(e,t)=>{let n=Mr(e);return{name:n.name,fn:n.fn,options:[e,t]}},Jr=(e,t)=>{let n=Nr(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yr=(e,t)=>({fn:Rr(e).fn,options:[e,t]}),Xr=(e,t)=>{let n=Pr(e);return{name:n.name,fn:n.fn,options:[e,t]}},Zr=(e,t)=>{let n=Fr(e);return{name:n.name,fn:n.fn,options:[e,t]}},Qr=(e,t)=>{let n=Ir(e);return{name:n.name,fn:n.fn,options:[e,t]}},$r=(e,t)=>{let n=Kr(e);return{name:n.name,fn:n.fn,options:[e,t]}},ei=`Arrow`,ti=i.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,c.jsx)(v.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,c.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});ti.displayName=ei;var ni=ti,ri=`Popper`,[ii,ai]=x(ri),[oi,si]=ii(ri),ci=e=>{let{__scopePopper:t,children:n}=e,[r,a]=i.useState(null);return(0,c.jsx)(oi,{scope:t,anchor:r,onAnchorChange:a,children:n})};ci.displayName=ri;var li=`PopperAnchor`,ui=i.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...a}=e,o=si(li,n),l=i.useRef(null),u=s(t,l),d=i.useRef(null);return i.useEffect(()=>{let e=d.current;d.current=r?.current||l.current,e!==d.current&&o.onAnchorChange(d.current)}),r?null:(0,c.jsx)(v.div,{...a,ref:u})});ui.displayName=li;var di=`PopperContent`,[fi,pi]=ii(di),mi=i.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:a=0,align:o=`center`,alignOffset:l=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:m=`partial`,hideWhenDetached:h=!1,updatePositionStrategy:g=`optimized`,onPlaced:_,...y}=e,b=si(di,n),[x,S]=i.useState(null),C=s(t,e=>S(e)),[w,E]=i.useState(null),D=tn(w),O=D?.width??0,k=D?.height??0,A=r+(o===`center`?``:`-`+o),j=typeof p==`number`?p:{top:0,right:0,bottom:0,left:0,...p},M=Array.isArray(f)?f:[f],N=M.length>0,P={padding:j,boundary:M.filter(vi),altBoundary:N},{refs:ee,floatingStyles:te,placement:ne,isPositioned:re,middlewareData:F}=Gr({strategy:`fixed`,placement:A,whileElementsMounted:(...e)=>jr(...e,{animationFrame:g===`always`}),elements:{reference:b.anchor},middleware:[qr({mainAxis:a+k,alignmentAxis:l}),d&&Jr({mainAxis:!0,crossAxis:!1,limiter:m===`partial`?Yr():void 0,...P}),d&&Xr({...P}),Zr({...P,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),w&&$r({element:w,padding:u}),yi({arrowWidth:O,arrowHeight:k}),h&&Qr({strategy:`referenceHidden`,...P})]}),[ie,ae]=bi(ne),oe=I(_);T(()=>{re&&oe?.()},[re,oe]);let se=F.arrow?.x,ce=F.arrow?.y,le=F.arrow?.centerOffset!==0,[ue,de]=i.useState();return T(()=>{x&&de(window.getComputedStyle(x).zIndex)},[x]),(0,c.jsx)(`div`,{ref:ee.setFloating,"data-radix-popper-content-wrapper":``,style:{...te,transform:re?te.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ue,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(` `),...F.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,c.jsx)(fi,{scope:n,placedSide:ie,onArrowChange:E,arrowX:se,arrowY:ce,shouldHideArrow:le,children:(0,c.jsx)(v.div,{"data-side":ie,"data-align":ae,...y,ref:C,style:{...y.style,animation:re?void 0:`none`}})})})});mi.displayName=di;var hi=`PopperArrow`,gi={top:`bottom`,right:`left`,bottom:`top`,left:`right`},_i=i.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=pi(hi,n),a=gi[i.placedSide];return(0,c.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,c.jsx)(ni,{...r,ref:t,style:{...r.style,display:`block`}})})});_i.displayName=hi;function vi(e){return e!==null}var yi=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=bi(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function bi(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var xi=ci,Si=ui,Ci=mi,wi=_i;export{v as C,p as D,l as E,o as O,x as S,u as T,D as _,ai as a,C as b,Gt as c,Se as d,de as f,j as g,ne as h,xi as i,s as k,Ie as l,F as m,wi as n,tn as o,I as p,Ci as r,en as s,Si as t,Pe as u,T as v,y as w,b as x,w as y};
@@ -1,4 +1,4 @@
1
- import{h as e,s as t}from"./chunk-GEFDOKGD-DwVPiYfW.js";import{g as n,h as r,m as i,p as a}from"./src-BoSBNdA_.js";import{B as o,C as s,V as c,W as l,_ as u,a as d,b as f,nt as p,v as m}from"./chunk-7R4GIKGN-DXaGAn_K.js";import{t as h}from"./channel-w7yboq56.js";import"./dist-Cce3efmT.js";import"./chunk-PU5JKC2W-B66ELkQm.js";import"./chunk-MX3YWQON-BgjSEzus.js";import"./chunk-YBOYWFTD-Dx_fX35n.js";import{t as g}from"./chunk-55IACEB6-C4mUdyio.js";import{t as _}from"./chunk-KX2RTZJC-BCxGmbzy.js";import"./chunk-PQ6SQG4A-BxtUGYhW.js";import"./chunk-KYZI473N-BKO5gMeU.js";import"./chunk-O4XLMI2P-BurQy8tt.js";import{r as v,t as y}from"./chunk-GLR3WWYH-D9pZakqr.js";var b=(function(){var e=r(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],n=[1,10],i=[1,11],a=[1,12],o=[1,13],s=[1,23],c=[1,24],l=[1,25],u=[1,26],d=[1,27],f=[1,19],p=[1,28],m=[1,29],h=[1,20],g=[1,18],_=[1,21],v=[1,22],y=[1,36],b=[1,37],x=[1,38],S=[1,39],C=[1,40],w=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,65,66,67,68,69],T=[1,45],E=[1,46],D=[1,55],O=[40,48,50,51,52,70,71],k=[1,66],A=[1,64],j=[1,61],M=[1,65],N=[1,67],P=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],F=[65,66,67,68,69],I=[1,84],L=[1,83],R=[1,81],z=[1,82],B=[6,10,42,47],V=[6,10,13,41,42,47,48,49],H=[1,92],U=[1,91],W=[1,90],G=[19,58],K=[1,101],q=[1,100],J=[19,58,60,62],Y={trace:r(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,attributeKeyType:59,",":60,ATTRIBUTE_KEY:61,COMMENT:62,cardinality:63,relType:64,ZERO_OR_ONE:65,ZERO_OR_MORE:66,ONE_OR_MORE:67,ONLY_ONE:68,MD_PARENT:69,NON_IDENTIFYING:70,IDENTIFYING:71,WORD:72,$accept:0,$end:1},terminals_:{2:`error`,4:`ER_DIAGRAM`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,13:`COLON`,15:`STYLE_SEPARATOR`,17:`BLOCK_START`,19:`BLOCK_STOP`,20:`SQS`,21:`SQE`,22:`title`,23:`title_value`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`direction_tb`,34:`direction_bt`,35:`direction_rl`,36:`direction_lr`,37:`CLASSDEF`,40:`UNICODE_TEXT`,41:`STYLE_TEXT`,42:`COMMA`,43:`CLASS`,44:`STYLE`,47:`SEMI`,48:`NUM`,49:`BRKT`,50:`ENTITY_NAME`,51:`DECIMAL_NUM`,52:`ENTITY_ONE`,58:`ATTRIBUTE_WORD`,60:`,`,61:`ATTRIBUTE_KEY`,62:`COMMENT`,65:`ZERO_OR_ONE`,66:`ZERO_OR_MORE`,67:`ONE_OR_MORE`,68:`ONLY_ONE`,69:`MD_PARENT`,70:`NON_IDENTIFYING`,71:`IDENTIFYING`,72:`WORD`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[55,1],[56,1],[56,3],[59,1],[57,1],[12,3],[63,1],[63,1],[63,1],[63,1],[63,1],[64,1],[64,1],[14,1],[14,1],[14,1]],performAction:r(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 9:r.addEntity(a[s-8]),r.addEntity(a[s-4]),r.addRelationship(a[s-8],a[s],a[s-4],a[s-5]),r.setClass([a[s-8]],a[s-6]),r.setClass([a[s-4]],a[s-2]);break;case 10:r.addEntity(a[s-6]),r.addEntity(a[s-2]),r.addRelationship(a[s-6],a[s],a[s-2],a[s-3]),r.setClass([a[s-6]],a[s-4]);break;case 11:r.addEntity(a[s-6]),r.addEntity(a[s-4]),r.addRelationship(a[s-6],a[s],a[s-4],a[s-5]),r.setClass([a[s-4]],a[s-2]);break;case 12:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]);break;case 13:r.addEntity(a[s-5]),r.addAttributes(a[s-5],a[s-1]),r.setClass([a[s-5]],a[s-3]);break;case 14:r.addEntity(a[s-2]);break;case 15:r.addEntity(a[s-4]),r.setClass([a[s-4]],a[s-2]);break;case 16:r.addEntity(a[s]);break;case 17:r.addEntity(a[s-2]),r.setClass([a[s-2]],a[s]);break;case 18:r.addEntity(a[s-6],a[s-4]),r.addAttributes(a[s-6],a[s-1]);break;case 19:r.addEntity(a[s-8],a[s-6]),r.addAttributes(a[s-8],a[s-1]),r.setClass([a[s-8]],a[s-3]);break;case 20:r.addEntity(a[s-5],a[s-3]);break;case 21:r.addEntity(a[s-7],a[s-5]),r.setClass([a[s-7]],a[s-2]);break;case 22:r.addEntity(a[s-3],a[s-1]);break;case 23:r.addEntity(a[s-5],a[s-3]),r.setClass([a[s-5]],a[s]);break;case 24:case 25:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection(`TB`);break;case 33:r.setDirection(`BT`);break;case 34:r.setDirection(`RL`);break;case 35:r.setDirection(`LR`);break;case 36:this.$=a[s-3],r.addClass(a[s-2],a[s-1]);break;case 37:case 38:case 59:case 67:this.$=[a[s]];break;case 39:case 40:this.$=a[s-2].concat([a[s]]);break;case 41:this.$=a[s-2],r.setClass(a[s-1],a[s]);break;case 42:this.$=a[s-3],r.addCssStyles(a[s-2],a[s-1]);break;case 43:this.$=[a[s]];break;case 44:a[s-2].push(a[s]),this.$=a[s-2];break;case 46:this.$=a[s-1]+a[s];break;case 54:case 79:case 80:this.$=a[s].replace(/"/g,``);break;case 55:case 56:case 57:case 58:case 81:this.$=a[s];break;case 60:a[s].push(a[s-1]),this.$=a[s];break;case 61:this.$={type:a[s-1],name:a[s]};break;case 62:this.$={type:a[s-2],name:a[s-1],keys:a[s]};break;case 63:this.$={type:a[s-2],name:a[s-1],comment:a[s]};break;case 64:this.$={type:a[s-3],name:a[s-2],keys:a[s-1],comment:a[s]};break;case 65:case 66:case 69:this.$=a[s];break;case 68:a[s-2].push(a[s]),this.$=a[s-2];break;case 70:this.$=a[s].replace(/"/g,``);break;case 71:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 72:this.$=r.Cardinality.ZERO_OR_ONE;break;case 73:this.$=r.Cardinality.ZERO_OR_MORE;break;case 74:this.$=r.Cardinality.ONE_OR_MORE;break;case 75:this.$=r.Cardinality.ONLY_ONE;break;case 76:this.$=r.Cardinality.MD_PARENT;break;case 77:this.$=r.Identification.NON_IDENTIFYING;break;case 78:this.$=r.Identification.IDENTIFYING;break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:n,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,48:h,50:g,51:_,52:v},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:30,11:9,22:n,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,48:h,50:g,51:_,52:v},e(t,[2,5]),e(t,[2,6]),e(t,[2,16],{12:31,63:35,15:[1,32],17:[1,33],20:[1,34],65:y,66:b,67:x,68:S,69:C}),{23:[1,41]},{25:[1,42]},{27:[1,43]},e(t,[2,27]),e(t,[2,28]),e(t,[2,29]),e(t,[2,30]),e(t,[2,31]),e(w,[2,54]),e(w,[2,55]),e(w,[2,56]),e(w,[2,57]),e(w,[2,58]),e(t,[2,32]),e(t,[2,33]),e(t,[2,34]),e(t,[2,35]),{16:44,40:T,41:E},{16:47,40:T,41:E},{16:48,40:T,41:E},e(t,[2,4]),{11:49,40:f,48:h,50:g,51:_,52:v},{16:50,40:T,41:E},{18:51,19:[1,52],53:53,54:54,58:D},{11:56,40:f,48:h,50:g,51:_,52:v},{64:57,70:[1,58],71:[1,59]},e(O,[2,72]),e(O,[2,73]),e(O,[2,74]),e(O,[2,75]),e(O,[2,76]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),{13:k,38:60,41:A,42:j,45:62,46:63,48:M,49:N},e(P,[2,37]),e(P,[2,38]),{16:68,40:T,41:E,42:j},{13:k,38:69,41:A,42:j,45:62,46:63,48:M,49:N},{13:[1,70],15:[1,71]},e(t,[2,17],{63:35,12:72,17:[1,73],42:j,65:y,66:b,67:x,68:S,69:C}),{19:[1,74]},e(t,[2,14]),{18:75,19:[2,59],53:53,54:54,58:D},{55:76,58:[1,77]},{58:[2,65]},{21:[1,78]},{63:79,65:y,66:b,67:x,68:S,69:C},e(F,[2,77]),e(F,[2,78]),{6:I,10:L,39:80,42:R,47:z},{40:[1,85],41:[1,86]},e(B,[2,43],{46:87,13:k,41:A,48:M,49:N}),e(V,[2,45]),e(V,[2,50]),e(V,[2,51]),e(V,[2,52]),e(V,[2,53]),e(t,[2,41],{42:j}),{6:I,10:L,39:88,42:R,47:z},{14:89,40:H,50:U,72:W},{16:93,40:T,41:E},{11:94,40:f,48:h,50:g,51:_,52:v},{18:95,19:[1,96],53:53,54:54,58:D},e(t,[2,12]),{19:[2,60]},e(G,[2,61],{56:97,57:98,59:99,61:K,62:q}),e([19,58,61,62],[2,66]),e(t,[2,22],{15:[1,103],17:[1,102]}),e([40,48,50,51,52],[2,71]),e(t,[2,36]),{13:k,41:A,45:104,46:63,48:M,49:N},e(t,[2,47]),e(t,[2,48]),e(t,[2,49]),e(P,[2,39]),e(P,[2,40]),e(V,[2,46]),e(t,[2,42]),e(t,[2,8]),e(t,[2,79]),e(t,[2,80]),e(t,[2,81]),{13:[1,105],42:j},{13:[1,107],15:[1,106]},{19:[1,108]},e(t,[2,15]),e(G,[2,62],{57:109,60:[1,110],62:q}),e(G,[2,63]),e(J,[2,67]),e(G,[2,70]),e(J,[2,69]),{18:111,19:[1,112],53:53,54:54,58:D},{16:113,40:T,41:E},e(B,[2,44],{46:87,13:k,41:A,48:M,49:N}),{14:114,40:H,50:U,72:W},{16:115,40:T,41:E},{14:116,40:H,50:U,72:W},e(t,[2,13]),e(G,[2,64]),{59:117,61:K},{19:[1,118]},e(t,[2,20]),e(t,[2,23],{17:[1,119],42:j}),e(t,[2,11]),{13:[1,120],42:j},e(t,[2,10]),e(J,[2,68]),e(t,[2,18]),{18:121,19:[1,122],53:53,54:54,58:D},{14:123,40:H,50:U,72:W},{19:[1,124]},e(t,[2,21]),e(t,[2,9]),e(t,[2,19])],defaultActions:{55:[2,65],75:[2,60]},parseError:r(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:r(function(e){var t=this,n=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,a.length-=e,o.length-=e}r(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}r(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{h as e,s as t}from"./chunk-GEFDOKGD-_UEQ_Hqk.js";import{g as n,h as r,m as i,p as a}from"./src-BYKCXnff.js";import{B as o,C as s,V as c,W as l,_ as u,a as d,b as f,nt as p,v as m}from"./chunk-7R4GIKGN-Y5Bg-bKJ.js";import{t as h}from"./channel-GxJZ6KAL.js";import"./dist-CBQJF0q0.js";import"./chunk-PU5JKC2W-CCXYoac7.js";import"./chunk-MX3YWQON-OOf6bZzK.js";import"./chunk-YBOYWFTD-DGKGjR6H.js";import{t as g}from"./chunk-55IACEB6-NTU3iwXh.js";import{t as _}from"./chunk-KX2RTZJC-AniEyPkm.js";import"./chunk-PQ6SQG4A-DZGwvbzy.js";import"./chunk-KYZI473N-drU3HQZZ.js";import"./chunk-O4XLMI2P-BBFcNFB_.js";import{r as v,t as y}from"./chunk-GLR3WWYH-BWjkRp6S.js";var b=(function(){var e=r(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],n=[1,10],i=[1,11],a=[1,12],o=[1,13],s=[1,23],c=[1,24],l=[1,25],u=[1,26],d=[1,27],f=[1,19],p=[1,28],m=[1,29],h=[1,20],g=[1,18],_=[1,21],v=[1,22],y=[1,36],b=[1,37],x=[1,38],S=[1,39],C=[1,40],w=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,65,66,67,68,69],T=[1,45],E=[1,46],D=[1,55],O=[40,48,50,51,52,70,71],k=[1,66],A=[1,64],j=[1,61],M=[1,65],N=[1,67],P=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],F=[65,66,67,68,69],I=[1,84],L=[1,83],R=[1,81],z=[1,82],B=[6,10,42,47],V=[6,10,13,41,42,47,48,49],H=[1,92],U=[1,91],W=[1,90],G=[19,58],K=[1,101],q=[1,100],J=[19,58,60,62],Y={trace:r(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,attributeKeyType:59,",":60,ATTRIBUTE_KEY:61,COMMENT:62,cardinality:63,relType:64,ZERO_OR_ONE:65,ZERO_OR_MORE:66,ONE_OR_MORE:67,ONLY_ONE:68,MD_PARENT:69,NON_IDENTIFYING:70,IDENTIFYING:71,WORD:72,$accept:0,$end:1},terminals_:{2:`error`,4:`ER_DIAGRAM`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,13:`COLON`,15:`STYLE_SEPARATOR`,17:`BLOCK_START`,19:`BLOCK_STOP`,20:`SQS`,21:`SQE`,22:`title`,23:`title_value`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`direction_tb`,34:`direction_bt`,35:`direction_rl`,36:`direction_lr`,37:`CLASSDEF`,40:`UNICODE_TEXT`,41:`STYLE_TEXT`,42:`COMMA`,43:`CLASS`,44:`STYLE`,47:`SEMI`,48:`NUM`,49:`BRKT`,50:`ENTITY_NAME`,51:`DECIMAL_NUM`,52:`ENTITY_ONE`,58:`ATTRIBUTE_WORD`,60:`,`,61:`ATTRIBUTE_KEY`,62:`COMMENT`,65:`ZERO_OR_ONE`,66:`ZERO_OR_MORE`,67:`ONE_OR_MORE`,68:`ONLY_ONE`,69:`MD_PARENT`,70:`NON_IDENTIFYING`,71:`IDENTIFYING`,72:`WORD`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[55,1],[56,1],[56,3],[59,1],[57,1],[12,3],[63,1],[63,1],[63,1],[63,1],[63,1],[64,1],[64,1],[14,1],[14,1],[14,1]],performAction:r(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 9:r.addEntity(a[s-8]),r.addEntity(a[s-4]),r.addRelationship(a[s-8],a[s],a[s-4],a[s-5]),r.setClass([a[s-8]],a[s-6]),r.setClass([a[s-4]],a[s-2]);break;case 10:r.addEntity(a[s-6]),r.addEntity(a[s-2]),r.addRelationship(a[s-6],a[s],a[s-2],a[s-3]),r.setClass([a[s-6]],a[s-4]);break;case 11:r.addEntity(a[s-6]),r.addEntity(a[s-4]),r.addRelationship(a[s-6],a[s],a[s-4],a[s-5]),r.setClass([a[s-4]],a[s-2]);break;case 12:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]);break;case 13:r.addEntity(a[s-5]),r.addAttributes(a[s-5],a[s-1]),r.setClass([a[s-5]],a[s-3]);break;case 14:r.addEntity(a[s-2]);break;case 15:r.addEntity(a[s-4]),r.setClass([a[s-4]],a[s-2]);break;case 16:r.addEntity(a[s]);break;case 17:r.addEntity(a[s-2]),r.setClass([a[s-2]],a[s]);break;case 18:r.addEntity(a[s-6],a[s-4]),r.addAttributes(a[s-6],a[s-1]);break;case 19:r.addEntity(a[s-8],a[s-6]),r.addAttributes(a[s-8],a[s-1]),r.setClass([a[s-8]],a[s-3]);break;case 20:r.addEntity(a[s-5],a[s-3]);break;case 21:r.addEntity(a[s-7],a[s-5]),r.setClass([a[s-7]],a[s-2]);break;case 22:r.addEntity(a[s-3],a[s-1]);break;case 23:r.addEntity(a[s-5],a[s-3]),r.setClass([a[s-5]],a[s]);break;case 24:case 25:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection(`TB`);break;case 33:r.setDirection(`BT`);break;case 34:r.setDirection(`RL`);break;case 35:r.setDirection(`LR`);break;case 36:this.$=a[s-3],r.addClass(a[s-2],a[s-1]);break;case 37:case 38:case 59:case 67:this.$=[a[s]];break;case 39:case 40:this.$=a[s-2].concat([a[s]]);break;case 41:this.$=a[s-2],r.setClass(a[s-1],a[s]);break;case 42:this.$=a[s-3],r.addCssStyles(a[s-2],a[s-1]);break;case 43:this.$=[a[s]];break;case 44:a[s-2].push(a[s]),this.$=a[s-2];break;case 46:this.$=a[s-1]+a[s];break;case 54:case 79:case 80:this.$=a[s].replace(/"/g,``);break;case 55:case 56:case 57:case 58:case 81:this.$=a[s];break;case 60:a[s].push(a[s-1]),this.$=a[s];break;case 61:this.$={type:a[s-1],name:a[s]};break;case 62:this.$={type:a[s-2],name:a[s-1],keys:a[s]};break;case 63:this.$={type:a[s-2],name:a[s-1],comment:a[s]};break;case 64:this.$={type:a[s-3],name:a[s-2],keys:a[s-1],comment:a[s]};break;case 65:case 66:case 69:this.$=a[s];break;case 68:a[s-2].push(a[s]),this.$=a[s-2];break;case 70:this.$=a[s].replace(/"/g,``);break;case 71:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 72:this.$=r.Cardinality.ZERO_OR_ONE;break;case 73:this.$=r.Cardinality.ZERO_OR_MORE;break;case 74:this.$=r.Cardinality.ONE_OR_MORE;break;case 75:this.$=r.Cardinality.ONLY_ONE;break;case 76:this.$=r.Cardinality.MD_PARENT;break;case 77:this.$=r.Identification.NON_IDENTIFYING;break;case 78:this.$=r.Identification.IDENTIFYING;break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:n,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,48:h,50:g,51:_,52:v},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:30,11:9,22:n,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,48:h,50:g,51:_,52:v},e(t,[2,5]),e(t,[2,6]),e(t,[2,16],{12:31,63:35,15:[1,32],17:[1,33],20:[1,34],65:y,66:b,67:x,68:S,69:C}),{23:[1,41]},{25:[1,42]},{27:[1,43]},e(t,[2,27]),e(t,[2,28]),e(t,[2,29]),e(t,[2,30]),e(t,[2,31]),e(w,[2,54]),e(w,[2,55]),e(w,[2,56]),e(w,[2,57]),e(w,[2,58]),e(t,[2,32]),e(t,[2,33]),e(t,[2,34]),e(t,[2,35]),{16:44,40:T,41:E},{16:47,40:T,41:E},{16:48,40:T,41:E},e(t,[2,4]),{11:49,40:f,48:h,50:g,51:_,52:v},{16:50,40:T,41:E},{18:51,19:[1,52],53:53,54:54,58:D},{11:56,40:f,48:h,50:g,51:_,52:v},{64:57,70:[1,58],71:[1,59]},e(O,[2,72]),e(O,[2,73]),e(O,[2,74]),e(O,[2,75]),e(O,[2,76]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),{13:k,38:60,41:A,42:j,45:62,46:63,48:M,49:N},e(P,[2,37]),e(P,[2,38]),{16:68,40:T,41:E,42:j},{13:k,38:69,41:A,42:j,45:62,46:63,48:M,49:N},{13:[1,70],15:[1,71]},e(t,[2,17],{63:35,12:72,17:[1,73],42:j,65:y,66:b,67:x,68:S,69:C}),{19:[1,74]},e(t,[2,14]),{18:75,19:[2,59],53:53,54:54,58:D},{55:76,58:[1,77]},{58:[2,65]},{21:[1,78]},{63:79,65:y,66:b,67:x,68:S,69:C},e(F,[2,77]),e(F,[2,78]),{6:I,10:L,39:80,42:R,47:z},{40:[1,85],41:[1,86]},e(B,[2,43],{46:87,13:k,41:A,48:M,49:N}),e(V,[2,45]),e(V,[2,50]),e(V,[2,51]),e(V,[2,52]),e(V,[2,53]),e(t,[2,41],{42:j}),{6:I,10:L,39:88,42:R,47:z},{14:89,40:H,50:U,72:W},{16:93,40:T,41:E},{11:94,40:f,48:h,50:g,51:_,52:v},{18:95,19:[1,96],53:53,54:54,58:D},e(t,[2,12]),{19:[2,60]},e(G,[2,61],{56:97,57:98,59:99,61:K,62:q}),e([19,58,61,62],[2,66]),e(t,[2,22],{15:[1,103],17:[1,102]}),e([40,48,50,51,52],[2,71]),e(t,[2,36]),{13:k,41:A,45:104,46:63,48:M,49:N},e(t,[2,47]),e(t,[2,48]),e(t,[2,49]),e(P,[2,39]),e(P,[2,40]),e(V,[2,46]),e(t,[2,42]),e(t,[2,8]),e(t,[2,79]),e(t,[2,80]),e(t,[2,81]),{13:[1,105],42:j},{13:[1,107],15:[1,106]},{19:[1,108]},e(t,[2,15]),e(G,[2,62],{57:109,60:[1,110],62:q}),e(G,[2,63]),e(J,[2,67]),e(G,[2,70]),e(J,[2,69]),{18:111,19:[1,112],53:53,54:54,58:D},{16:113,40:T,41:E},e(B,[2,44],{46:87,13:k,41:A,48:M,49:N}),{14:114,40:H,50:U,72:W},{16:115,40:T,41:E},{14:116,40:H,50:U,72:W},e(t,[2,13]),e(G,[2,64]),{59:117,61:K},{19:[1,118]},e(t,[2,20]),e(t,[2,23],{17:[1,119],42:j}),e(t,[2,11]),{13:[1,120],42:j},e(t,[2,10]),e(J,[2,68]),e(t,[2,18]),{18:121,19:[1,122],53:53,54:54,58:D},{14:123,40:H,50:U,72:W},{19:[1,124]},e(t,[2,21]),e(t,[2,9]),e(t,[2,19])],defaultActions:{55:[2,65],75:[2,60]},parseError:r(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:r(function(e){var t=this,n=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,a.length-=e,o.length-=e}r(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}r(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),a.push(h.yytext),o.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};Y.lexer=(function(){return{EOF:1,parseError:r(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:r(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:r(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:r(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:r(function(){return this._more=!0,this},`more`),reject:r(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:r(function(e){this.unput(this.match.slice(e))},`less`),pastInput:r(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:r(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:r(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{h as e,s as t}from"./chunk-GEFDOKGD-DwVPiYfW.js";import{g as n,h as r,p as i}from"./src-BoSBNdA_.js";import{B as a,C as o,U as s,V as c,W as l,Z as u,_ as d,a as f,b as p,nt as m,s as h,u as g,v as _}from"./chunk-7R4GIKGN-DXaGAn_K.js";import{t as v}from"./channel-w7yboq56.js";import"./dist-Cce3efmT.js";import"./chunk-PU5JKC2W-B66ELkQm.js";import{t as ee}from"./chunk-FMBD7UC4-C_1aG0eb.js";import"./chunk-MX3YWQON-BgjSEzus.js";import"./chunk-YBOYWFTD-Dx_fX35n.js";import{t as te}from"./chunk-JSJVCQXG-BSrqCL_3.js";import{t as ne}from"./chunk-55IACEB6-C4mUdyio.js";import{t as y}from"./chunk-KX2RTZJC-BCxGmbzy.js";import"./chunk-PQ6SQG4A-BxtUGYhW.js";import{o as b}from"./chunk-KYZI473N-BKO5gMeU.js";import"./chunk-O4XLMI2P-BurQy8tt.js";import{r as x,t as S}from"./chunk-GLR3WWYH-D9pZakqr.js";import{n as C,t as w}from"./chunk-XPW4576I-CtcaMb09.js";var T=`flowchart-`,E=class{constructor(){this.vertexCounter=0,this.config=p(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=c,this.setAccDescription=a,this.setDiagramTitle=l,this.getAccTitle=_,this.getAccDescription=d,this.getDiagramTitle=o,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen(`gen-2`)}static{r(this,`FlowDB`)}sanitizeText(e){return h.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case`markdown`:case`string`:case`text`:return e;default:return`markdown`}}lookUpDomId(e){for(let t of this.vertices.values())if(t.id===e)return t.domId;return e}addVertex(e,t,n,r,i,a,o={},s){if(!e||e.trim().length===0)return;let c;if(s!==void 0){let e;e=s.includes(`
1
+ import{h as e,s as t}from"./chunk-GEFDOKGD-_UEQ_Hqk.js";import{g as n,h as r,p as i}from"./src-BYKCXnff.js";import{B as a,C as o,U as s,V as c,W as l,Z as u,_ as d,a as f,b as p,nt as m,s as h,u as g,v as _}from"./chunk-7R4GIKGN-Y5Bg-bKJ.js";import{t as v}from"./channel-GxJZ6KAL.js";import"./dist-CBQJF0q0.js";import"./chunk-PU5JKC2W-CCXYoac7.js";import{t as ee}from"./chunk-FMBD7UC4-BrH-Lnio.js";import"./chunk-MX3YWQON-OOf6bZzK.js";import"./chunk-YBOYWFTD-DGKGjR6H.js";import{t as te}from"./chunk-JSJVCQXG-LNOdgWAh.js";import{t as ne}from"./chunk-55IACEB6-NTU3iwXh.js";import{t as y}from"./chunk-KX2RTZJC-AniEyPkm.js";import"./chunk-PQ6SQG4A-DZGwvbzy.js";import{o as b}from"./chunk-KYZI473N-drU3HQZZ.js";import"./chunk-O4XLMI2P-BBFcNFB_.js";import{r as x,t as S}from"./chunk-GLR3WWYH-BWjkRp6S.js";import{n as C,t as w}from"./chunk-XPW4576I-no3g3yPs.js";var T=`flowchart-`,E=class{constructor(){this.vertexCounter=0,this.config=p(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=c,this.setAccDescription=a,this.setDiagramTitle=l,this.getAccTitle=_,this.getAccDescription=d,this.getDiagramTitle=o,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen(`gen-2`)}static{r(this,`FlowDB`)}sanitizeText(e){return h.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case`markdown`:case`string`:case`text`:return e;default:return`markdown`}}lookUpDomId(e){for(let t of this.vertices.values())if(t.id===e)return t.domId;return e}addVertex(e,t,n,r,i,a,o={},s){if(!e||e.trim().length===0)return;let c;if(s!==void 0){let e;e=s.includes(`
2
2
  `)?s+`
3
3
  `:`{
4
4
  `+s+`
@@ -1,4 +1,4 @@
1
- import{o as e,t}from"./chunk-CFjPhJqf.js";import{h as n}from"./chunk-GEFDOKGD-DwVPiYfW.js";import{a as r,c as i,d as a,f as o,g as s,h as c,i as l,p as u,s as d,u as f,v as p}from"./src-BoSBNdA_.js";import{B as m,C as h,V as g,W as _,_ as v,a as y,b,c as x,s as S,v as C}from"./chunk-7R4GIKGN-DXaGAn_K.js";import{a as w,i as T,n as E,r as D,t as O}from"./linear-BLFWatDe.js";import"./defaultLocale-CRZydyG6.js";import{t as k}from"./init-B8gtcn7T.js";import{t as ee}from"./dist-Cce3efmT.js";function A(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function te(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function ne(e){return e}var re=1,ie=2,ae=3,oe=4,se=1e-6;function ce(e){return`translate(`+e+`,0)`}function le(e){return`translate(0,`+e+`)`}function ue(e){return t=>+e(t)}function de(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function fe(){return!this.__axis}function pe(e,t){var n=[],r=null,i=null,a=6,o=6,s=3,c=typeof window<`u`&&window.devicePixelRatio>1?0:.5,l=e===re||e===oe?-1:1,u=e===oe||e===ie?`x`:`y`,d=e===re||e===ae?ce:le;function f(f){var p=r??(t.ticks?t.ticks.apply(t,n):t.domain()),m=i??(t.tickFormat?t.tickFormat.apply(t,n):ne),h=Math.max(a,0)+s,g=t.range(),_=+g[0]+c,v=+g[g.length-1]+c,y=(t.bandwidth?de:ue)(t.copy(),c),b=f.selection?f.selection():f,x=b.selectAll(`.domain`).data([null]),S=b.selectAll(`.tick`).data(p,t).order(),C=S.exit(),w=S.enter().append(`g`).attr(`class`,`tick`),T=S.select(`line`),E=S.select(`text`);x=x.merge(x.enter().insert(`path`,`.tick`).attr(`class`,`domain`).attr(`stroke`,`currentColor`)),S=S.merge(w),T=T.merge(w.append(`line`).attr(`stroke`,`currentColor`).attr(u+`2`,l*a)),E=E.merge(w.append(`text`).attr(`fill`,`currentColor`).attr(u,l*h).attr(`dy`,e===re?`0em`:e===ae?`0.71em`:`0.32em`)),f!==b&&(x=x.transition(f),S=S.transition(f),T=T.transition(f),E=E.transition(f),C=C.transition(f).attr(`opacity`,se).attr(`transform`,function(e){return isFinite(e=y(e))?d(e+c):this.getAttribute(`transform`)}),w.attr(`opacity`,se).attr(`transform`,function(e){var t=this.parentNode.__axis;return d((t&&isFinite(t=t(e))?t:y(e))+c)})),C.remove(),x.attr(`d`,e===oe||e===ie?o?`M`+l*o+`,`+_+`H`+c+`V`+v+`H`+l*o:`M`+c+`,`+_+`V`+v:o?`M`+_+`,`+l*o+`V`+c+`H`+v+`V`+l*o:`M`+_+`,`+c+`H`+v),S.attr(`opacity`,1).attr(`transform`,function(e){return d(y(e)+c)}),T.attr(u+`2`,l*a),E.attr(u,l*h).text(m),b.filter(fe).attr(`fill`,`none`).attr(`font-size`,10).attr(`font-family`,`sans-serif`).attr(`text-anchor`,e===ie?`start`:e===oe?`end`:`middle`),b.each(function(){this.__axis=y})}return f.scale=function(e){return arguments.length?(t=e,f):t},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(e){return arguments.length?(n=e==null?[]:Array.from(e),f):n.slice()},f.tickValues=function(e){return arguments.length?(r=e==null?null:Array.from(e),f):r&&r.slice()},f.tickFormat=function(e){return arguments.length?(i=e,f):i},f.tickSize=function(e){return arguments.length?(a=o=+e,f):a},f.tickSizeInner=function(e){return arguments.length?(a=+e,f):a},f.tickSizeOuter=function(e){return arguments.length?(o=+e,f):o},f.tickPadding=function(e){return arguments.length?(s=+e,f):s},f.offset=function(e){return arguments.length?(c=+e,f):c},f}function me(e){return pe(re,e)}function he(e){return pe(ae,e)}var ge=Math.PI/180,_e=180/Math.PI,ve=18,ye=.96422,be=1,xe=.82521,Se=4/29,Ce=6/29,we=3*Ce*Ce,Te=Ce*Ce*Ce;function Ee(e){if(e instanceof j)return new j(e.l,e.a,e.b,e.opacity);if(e instanceof M)return Pe(e);e instanceof i||(e=f(e));var t=je(e.r),n=je(e.g),r=je(e.b),a=Oe((.2225045*t+.7168786*n+.0606169*r)/be),o,s;return t===n&&n===r?o=s=a:(o=Oe((.4360747*t+.3850649*n+.1430804*r)/ye),s=Oe((.0139322*t+.0971045*n+.7141733*r)/xe)),new j(116*a-16,500*(o-a),200*(a-s),e.opacity)}function De(e,t,n,r){return arguments.length===1?Ee(e):new j(e,t,n,r??1)}function j(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}a(j,De,o(d,{brighter(e){return new j(this.l+ve*(e??1),this.a,this.b,this.opacity)},darker(e){return new j(this.l-ve*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=ye*ke(t),e=be*ke(e),n=xe*ke(n),new i(Ae(3.1338561*t-1.6168667*e-.4906146*n),Ae(-.9787684*t+1.9161415*e+.033454*n),Ae(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function Oe(e){return e>Te?e**(1/3):e/we+Se}function ke(e){return e>Ce?e*e*e:we*(e-Se)}function Ae(e){return 255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055)}function je(e){return(e/=255)<=.04045?e/12.92:((e+.055)/1.055)**2.4}function Me(e){if(e instanceof M)return new M(e.h,e.c,e.l,e.opacity);if(e instanceof j||(e=Ee(e)),e.a===0&&e.b===0)return new M(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*_e;return new M(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Ne(e,t,n,r){return arguments.length===1?Me(e):new M(e,t,n,r??1)}function M(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Pe(e){if(isNaN(e.h))return new j(e.l,0,0,e.opacity);var t=e.h*ge;return new j(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}a(M,Ne,o(d,{brighter(e){return new M(this.h,this.c,this.l+ve*(e??1),this.opacity)},darker(e){return new M(this.h,this.c,this.l-ve*(e??1),this.opacity)},rgb(){return Pe(this).rgb()}}));function Fe(e){return function(t,n){var i=e((t=Ne(t)).h,(n=Ne(n)).h),a=r(t.c,n.c),o=r(t.l,n.l),s=r(t.opacity,n.opacity);return function(e){return t.h=i(e),t.c=a(e),t.l=o(e),t.opacity=s(e),t+``}}}var Ie=Fe(l);function Le(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}var Re=new Date,ze=new Date;function N(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>N(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(Re.setTime(+t),ze.setTime(+r),e(Re),e(ze),Math.floor(n(Re,ze))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var P=N(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);P.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?N(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):P),P.range;var F=1e3,I=F*60,L=I*60,R=L*24,Be=R*7,Ve=R*30,He=R*365,z=N(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*F)},(e,t)=>(t-e)/F,e=>e.getUTCSeconds());z.range;var Ue=N(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*F)},(e,t)=>{e.setTime(+e+t*I)},(e,t)=>(t-e)/I,e=>e.getMinutes());Ue.range;var We=N(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*I)},(e,t)=>(t-e)/I,e=>e.getUTCMinutes());We.range;var Ge=N(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*F-e.getMinutes()*I)},(e,t)=>{e.setTime(+e+t*L)},(e,t)=>(t-e)/L,e=>e.getHours());Ge.range;var Ke=N(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*L)},(e,t)=>(t-e)/L,e=>e.getUTCHours());Ke.range;var B=N(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*I)/R,e=>e.getDate()-1);B.range;var qe=N(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/R,e=>e.getUTCDate()-1);qe.range;var Je=N(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/R,e=>Math.floor(e/R));Je.range;function V(e){return N(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*I)/Be)}var Ye=V(0),Xe=V(1),Ze=V(2),Qe=V(3),H=V(4),$e=V(5),et=V(6);Ye.range,Xe.range,Ze.range,Qe.range,H.range,$e.range,et.range;function U(e){return N(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/Be)}var tt=U(0),nt=U(1),rt=U(2),it=U(3),W=U(4),at=U(5),ot=U(6);tt.range,nt.range,rt.range,it.range,W.range,at.range,ot.range;var st=N(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());st.range;var ct=N(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());ct.range;var G=N(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());G.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:N(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),G.range;var K=N(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());K.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:N(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),K.range;function lt(e,t,n,r,i,a){let o=[[z,1,F],[z,5,5*F],[z,15,15*F],[z,30,30*F],[a,1,I],[a,5,5*I],[a,15,15*I],[a,30,30*I],[i,1,L],[i,3,3*L],[i,6,6*L],[i,12,12*L],[r,1,R],[r,2,2*R],[n,1,Be],[t,1,Ve],[t,3,3*Ve],[e,1,He]];function s(e,t,n){let r=t<e;r&&([e,t]=[t,e]);let i=n&&typeof n.range==`function`?n:c(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a}function c(t,n,r){let i=Math.abs(n-t)/r,a=w(([,,e])=>e).right(o,i);if(a===o.length)return e.every(T(t/He,n/He,r));if(a===0)return P.every(Math.max(T(t,n,r),1));let[s,c]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(c)}return[s,c]}var[ut,dt]=lt(K,ct,tt,Je,Ke,We),[ft,pt]=lt(G,st,Ye,B,Ge,Ue);function mt(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function ht(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function gt(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function _t(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=St(i),u=Ct(i),d=St(a),f=Ct(a),p=St(o),m=Ct(o),h=St(s),g=Ct(s),_=St(c),v=Ct(c),y={a:ne,A:re,b:ie,B:ae,c:null,d:Wt,e:Wt,f:Yt,g:sn,G:ln,H:Gt,I:Kt,j:qt,L:Jt,m:Xt,M:Zt,p:oe,q:se,Q:Mn,s:Nn,S:Qt,u:$t,U:en,V:nn,w:rn,W:an,x:null,X:null,y:on,Y:cn,Z:un,"%":jn},b={a:ce,A:le,b:ue,B:de,c:null,d:dn,e:dn,f:gn,g:Dn,G:kn,H:fn,I:pn,j:mn,L:hn,m:_n,M:vn,p:fe,q:pe,Q:Mn,s:Nn,S:yn,u:bn,U:xn,V:Cn,w:wn,W:Tn,x:null,X:null,y:En,Y:On,Z:An,"%":jn},x={a:E,A:D,b:O,B:k,c:ee,d:Pt,e:Pt,f:Bt,g:At,G:kt,H:It,I:It,j:Ft,L:zt,m:Nt,M:Lt,p:T,q:Mt,Q:Ht,s:Ut,S:Rt,u:Tt,U:Et,V:Dt,w:wt,W:Ot,x:A,X:te,y:At,Y:kt,Z:jt,"%":Vt};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=vt[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=gt(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=ht(gt(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?nt.ceil(a):nt(a),a=qe.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=mt(gt(r.y,0,1)),o=a.getDay(),a=o>4||o===0?Xe.ceil(a):Xe(a),a=B.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else (`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:`W`in r?1:0),o=`Z`in r?ht(gt(r.y,0,1)).getUTCDay():mt(gt(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,ht(r)):mt(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in vt?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function ee(e,n,r){return w(e,t,n,r)}function A(e,t,r){return w(e,n,t,r)}function te(e,t,n){return w(e,r,t,n)}function ne(e){return o[e.getDay()]}function re(e){return a[e.getDay()]}function ie(e){return c[e.getMonth()]}function ae(e){return s[e.getMonth()]}function oe(e){return i[+(e.getHours()>=12)]}function se(e){return 1+~~(e.getMonth()/3)}function ce(e){return o[e.getUTCDay()]}function le(e){return a[e.getUTCDay()]}function ue(e){return c[e.getUTCMonth()]}function de(e){return s[e.getUTCMonth()]}function fe(e){return i[+(e.getUTCHours()>=12)]}function pe(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var vt={"-":``,_:` `,0:`0`},q=/^\s*\d+/,yt=/^%/,bt=/[\\^$*+?|[\]().{}]/g;function J(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function xt(e){return e.replace(bt,`\\$&`)}function St(e){return RegExp(`^(?:`+e.map(xt).join(`|`)+`)`,`i`)}function Ct(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function wt(e,t,n){var r=q.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Tt(e,t,n){var r=q.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Et(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Dt(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Ot(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function kt(e,t,n){var r=q.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function At(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function jt(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function Mt(e,t,n){var r=q.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Nt(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Pt(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Ft(e,t,n){var r=q.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function It(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Lt(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Rt(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function zt(e,t,n){var r=q.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Bt(e,t,n){var r=q.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Vt(e,t,n){var r=yt.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Ht(e,t,n){var r=q.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Ut(e,t,n){var r=q.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Wt(e,t){return J(e.getDate(),t,2)}function Gt(e,t){return J(e.getHours(),t,2)}function Kt(e,t){return J(e.getHours()%12||12,t,2)}function qt(e,t){return J(1+B.count(G(e),e),t,3)}function Jt(e,t){return J(e.getMilliseconds(),t,3)}function Yt(e,t){return Jt(e,t)+`000`}function Xt(e,t){return J(e.getMonth()+1,t,2)}function Zt(e,t){return J(e.getMinutes(),t,2)}function Qt(e,t){return J(e.getSeconds(),t,2)}function $t(e){var t=e.getDay();return t===0?7:t}function en(e,t){return J(Ye.count(G(e)-1,e),t,2)}function tn(e){var t=e.getDay();return t>=4||t===0?H(e):H.ceil(e)}function nn(e,t){return e=tn(e),J(H.count(G(e),e)+(G(e).getDay()===4),t,2)}function rn(e){return e.getDay()}function an(e,t){return J(Xe.count(G(e)-1,e),t,2)}function on(e,t){return J(e.getFullYear()%100,t,2)}function sn(e,t){return e=tn(e),J(e.getFullYear()%100,t,2)}function cn(e,t){return J(e.getFullYear()%1e4,t,4)}function ln(e,t){var n=e.getDay();return e=n>=4||n===0?H(e):H.ceil(e),J(e.getFullYear()%1e4,t,4)}function un(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+J(t/60|0,`0`,2)+J(t%60,`0`,2)}function dn(e,t){return J(e.getUTCDate(),t,2)}function fn(e,t){return J(e.getUTCHours(),t,2)}function pn(e,t){return J(e.getUTCHours()%12||12,t,2)}function mn(e,t){return J(1+qe.count(K(e),e),t,3)}function hn(e,t){return J(e.getUTCMilliseconds(),t,3)}function gn(e,t){return hn(e,t)+`000`}function _n(e,t){return J(e.getUTCMonth()+1,t,2)}function vn(e,t){return J(e.getUTCMinutes(),t,2)}function yn(e,t){return J(e.getUTCSeconds(),t,2)}function bn(e){var t=e.getUTCDay();return t===0?7:t}function xn(e,t){return J(tt.count(K(e)-1,e),t,2)}function Sn(e){var t=e.getUTCDay();return t>=4||t===0?W(e):W.ceil(e)}function Cn(e,t){return e=Sn(e),J(W.count(K(e),e)+(K(e).getUTCDay()===4),t,2)}function wn(e){return e.getUTCDay()}function Tn(e,t){return J(nt.count(K(e)-1,e),t,2)}function En(e,t){return J(e.getUTCFullYear()%100,t,2)}function Dn(e,t){return e=Sn(e),J(e.getUTCFullYear()%100,t,2)}function On(e,t){return J(e.getUTCFullYear()%1e4,t,4)}function kn(e,t){var n=e.getUTCDay();return e=n>=4||n===0?W(e):W.ceil(e),J(e.getUTCFullYear()%1e4,t,4)}function An(){return`+0000`}function jn(){return`%`}function Mn(e){return+e}function Nn(e){return Math.floor(e/1e3)}var Pn,Fn;In({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function In(e){return Pn=_t(e),Fn=Pn.format,Pn.parse,Pn.utcFormat,Pn.utcParse,Pn}function Ln(e){return new Date(e)}function Rn(e){return e instanceof Date?+e:+new Date(+e)}function zn(e,t,n,r,i,a,o,s,c,l){var u=E(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e)<e?p:s(e)<e?m:o(e)<e?h:a(e)<e?g:r(e)<e?i(e)<e?_:v:n(e)<e?y:b)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,Rn)):f().map(Ln)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return t==null?x:l(t)},u.nice=function(e){var n=f();return(!e||typeof e.range!=`function`)&&(e=t(n[0],n[n.length-1],e??10)),e?f(Le(n,e)):u},u.copy=function(){return D(u,zn(e,t,n,r,i,a,o,s,c,l))},u}function Bn(){return k.apply(zn(ft,pt,G,st,Ye,B,Ge,Ue,z,Fn).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var Vn=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_isoWeek=r()})(e,(function(){var e=`day`;return function(t,n,r){var i=function(t){return t.add(4-t.isoWeekday(),e)},a=n.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var n,a,o,s,c=i(this),l=(n=this.isoWeekYear(),a=this.$u,o=(a?r.utc:r)().year(n).startOf(`year`),s=4-o.isoWeekday(),o.isoWeekday()>4&&(s+=7),o.add(s,e));return c.diff(l,`week`)+1},a.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var o=a.startOf;a.startOf=function(e,t){var n=this.$utils(),r=!!n.u(t)||t;return n.p(e)===`isoweek`?r?this.date(this.date()-(this.isoWeekday()-1)).startOf(`day`):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf(`day`):o.bind(this)(e,t)}}}))})),Hn=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(e,(function(){var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},c=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||={}).offset=function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n}(e)}],u=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,c(`seconds`)],ss:[i,c(`seconds`)],m:[i,c(`minutes`)],mm:[i,c(`minutes`)],H:[i,c(`hours`)],h:[i,c(`hours`)],HH:[i,c(`hours`)],hh:[i,c(`hours`)],D:[i,c(`day`)],DD:[r,c(`day`)],Do:[a,function(e){var t=o.ordinal;if(this.day=e.match(/\d+/)[0],t)for(var n=1;n<=31;n+=1)t(n).replace(/\[|\]/g,``)===e&&(this.day=n)}],w:[i,c(`week`)],ww:[r,c(`week`)],M:[i,c(`month`)],MM:[r,c(`month`)],MMM:[a,function(e){var t=u(`months`),n=(u(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[a,function(e){var t=u(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,c(`year`)],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,c(`year`)],Z:l,ZZ:l};function p(n){for(var r=n,i=o&&o.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,c=0;c<s;c+=1){var l=a[c],u=f[l],d=u&&u[0],p=u&&u[1];a[c]=p?{regex:d,parser:p}:l.replace(/^\[|\]$/g,``)}return function(e){for(var t={},n=0,r=0;n<s;n+=1){var i=a[n];if(typeof i==`string`)r+=i.length;else{var o=i.regex,c=i.parser,l=e.slice(r),u=o.exec(l)[0];c.call(t,u),e=e.replace(u,``)}}return function(e){var t=e.afternoon;if(t!==void 0){var n=e.hours;t?n<12&&(e.hours+=12):n===12&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(s=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,a=e.args;this.$u=r;var s=a[1];if(typeof s==`string`){var c=!0===a[2],l=!0===a[3],u=c||l,d=a[2];l&&(d=a[2]),o=this.$locale(),!c&&d&&(o=n.Ls[d]),this.$d=function(e,t,n,r){try{if([`x`,`X`].indexOf(t)>-1)return new Date((t===`X`?1e3:1)*e);var i=p(t)(e),a=i.year,o=i.month,s=i.day,c=i.hours,l=i.minutes,u=i.seconds,d=i.milliseconds,f=i.zone,m=i.week,h=new Date,g=s||(a||o?1:h.getDate()),_=a||h.getFullYear(),v=0;a&&!o||(v=o>0?o-1:h.getMonth());var y,b=c||0,x=l||0,S=u||0,C=d||0;return f?new Date(Date.UTC(_,v,g,b,x,S,C+60*f.offset*1e3)):n?new Date(Date.UTC(_,v,g,b,x,S,C)):(y=new Date(_,v,g,b,x,S,C),m&&(y=r(y).week(m).toDate()),y)}catch{return new Date(``)}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date(``)),o={}}else if(s instanceof Array)for(var f=s.length,m=1;m<=f;m+=1){a[1]=s[m-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(``))}else i.call(this,e)}}}))})),Un=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_advancedFormat=r()})(e,(function(){return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var i=this.$utils(),a=(e||`YYYY-MM-DDTHH:mm:ssZ`).replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case`Q`:return Math.ceil((t.$M+1)/3);case`Do`:return n.ordinal(t.$D);case`gggg`:return t.weekYear();case`GGGG`:return t.isoWeekYear();case`wo`:return n.ordinal(t.week(),`W`);case`w`:case`ww`:return i.s(t.week(),e===`w`?1:2,`0`);case`W`:case`WW`:return i.s(t.isoWeek(),e===`W`?1:2,`0`);case`k`:case`kk`:return i.s(String(t.$H===0?24:t.$H),e===`k`?1:2,`0`);case`X`:return Math.floor(t.$d.getTime()/1e3);case`x`:return t.$d.getTime();case`z`:return`[`+t.offsetName()+`]`;case`zzz`:return`[`+t.offsetName(`long`)+`]`;default:return e}}));return r.bind(this)(a)}}}))})),Wn=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_duration=r()})(e,(function(){var e,t,n=1e3,r=6e4,i=36e5,a=864e5,o=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,s=31536e6,c=2628e6,l=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,u={years:s,months:c,days:a,hours:i,minutes:r,seconds:n,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof v},f=function(e,t,n){return new v(e,n,t.$l)},p=function(e){return t.p(e)+`s`},m=function(e){return e<0},h=function(e){return m(e)?Math.ceil(e):Math.floor(e)},g=function(e){return Math.abs(e)},_=function(e,t){return e?m(e)?{negative:!0,format:``+g(e)+t}:{negative:!1,format:``+e+t}:{negative:!1,format:``}},v=function(){function m(e,t,n){var r=this;if(this.$d={},this.$l=n,e===void 0&&(this.$ms=0,this.parseFromMilliseconds()),t)return f(e*u[p(t)],this);if(typeof e==`number`)return this.$ms=e,this.parseFromMilliseconds(),this;if(typeof e==`object`)return Object.keys(e).forEach((function(t){r.$d[p(t)]=e[t]})),this.calMilliseconds(),this;if(typeof e==`string`){var i=e.match(l);if(i){var a=i.slice(2).map((function(e){return e==null?0:Number(e)}));return this.$d.years=a[0],this.$d.months=a[1],this.$d.weeks=a[2],this.$d.days=a[3],this.$d.hours=a[4],this.$d.minutes=a[5],this.$d.seconds=a[6],this.calMilliseconds(),this}}return this}var g=m.prototype;return g.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,n){return t+(e.$d[n]||0)*u[n]}),0)},g.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=h(e/s),e%=s,this.$d.months=h(e/c),e%=c,this.$d.days=h(e/a),e%=a,this.$d.hours=h(e/i),e%=i,this.$d.minutes=h(e/r),e%=r,this.$d.seconds=h(e/n),e%=n,this.$d.milliseconds=e},g.toISOString=function(){var e=_(this.$d.years,`Y`),t=_(this.$d.months,`M`),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=_(n,`D`),i=_(this.$d.hours,`H`),a=_(this.$d.minutes,`M`),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var s=_(o,`S`),c=e.negative||t.negative||r.negative||i.negative||a.negative||s.negative,l=i.format||a.format||s.format?`T`:``,u=(c?`-`:``)+`P`+e.format+t.format+r.format+l+i.format+a.format+s.format;return u===`P`||u===`-P`?`P0D`:u},g.toJSON=function(){return this.toISOString()},g.format=function(e){var n=e||`YYYY-MM-DDTHH:mm:ss`,r={Y:this.$d.years,YY:t.s(this.$d.years,2,`0`),YYYY:t.s(this.$d.years,4,`0`),M:this.$d.months,MM:t.s(this.$d.months,2,`0`),D:this.$d.days,DD:t.s(this.$d.days,2,`0`),H:this.$d.hours,HH:t.s(this.$d.hours,2,`0`),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,`0`),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,`0`),SSS:t.s(this.$d.milliseconds,3,`0`)};return n.replace(o,(function(e,t){return t||String(r[e])}))},g.as=function(e){return this.$ms/u[p(e)]},g.get=function(e){var t=this.$ms,n=p(e);return n===`milliseconds`?t%=1e3:t=n===`weeks`?h(t/u[n]):this.$d[n],t||0},g.add=function(e,t,n){var r;return r=t?e*u[p(t)]:d(e)?e.$ms:f(e,this).$ms,f(this.$ms+r*(n?-1:1),this)},g.subtract=function(e,t){return this.add(e,t,!0)},g.locale=function(e){var t=this.clone();return t.$l=e,t},g.clone=function(){return f(this.$ms,this)},g.humanize=function(t){return e().add(this.$ms,`ms`).locale(this.$l).fromNow(!t)},g.valueOf=function(){return this.asMilliseconds()},g.milliseconds=function(){return this.get(`milliseconds`)},g.asMilliseconds=function(){return this.as(`milliseconds`)},g.seconds=function(){return this.get(`seconds`)},g.asSeconds=function(){return this.as(`seconds`)},g.minutes=function(){return this.get(`minutes`)},g.asMinutes=function(){return this.as(`minutes`)},g.hours=function(){return this.get(`hours`)},g.asHours=function(){return this.as(`hours`)},g.days=function(){return this.get(`days`)},g.asDays=function(){return this.as(`days`)},g.weeks=function(){return this.get(`weeks`)},g.asWeeks=function(){return this.as(`weeks`)},g.months=function(){return this.get(`months`)},g.asMonths=function(){return this.as(`months`)},g.years=function(){return this.get(`years`)},g.asYears=function(){return this.as(`years`)},m}(),y=function(e,t,n){return e.add(t.years()*n,`y`).add(t.months()*n,`M`).add(t.days()*n,`d`).add(t.hours()*n,`h`).add(t.minutes()*n,`m`).add(t.seconds()*n,`s`).add(t.milliseconds()*n,`ms`)};return function(n,r,i){e=i,t=i().$utils(),i.duration=function(e,t){return f(e,{$l:i.locale()},t)},i.isDuration=d;var a=r.prototype.add,o=r.prototype.subtract;r.prototype.add=function(e,t){return d(e)?y(this,e,1):a.bind(this)(e,t)},r.prototype.subtract=function(e,t){return d(e)?y(this,e,-1):o.bind(this)(e,t)}}}))})),Gn=ee(),Y=e(p(),1),Kn=e(Vn(),1),qn=e(Hn(),1),Jn=e(Un(),1),Yn=e(Wn(),1),Xn=(function(){var e=c(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],a=[1,29],o=[1,30],s=[1,31],l=[1,32],u=[1,33],d=[1,34],f=[1,9],p=[1,10],m=[1,11],h=[1,12],g=[1,13],_=[1,14],v=[1,15],y=[1,16],b=[1,19],x=[1,20],S=[1,21],C=[1,22],w=[1,23],T=[1,25],E=[1,35],D={trace:c(function(){},`trace`),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:`error`,4:`gantt`,6:`EOF`,8:`SPACE`,10:`NL`,12:`weekday_monday`,13:`weekday_tuesday`,14:`weekday_wednesday`,15:`weekday_thursday`,16:`weekday_friday`,17:`weekday_saturday`,18:`weekday_sunday`,20:`weekend_friday`,21:`weekend_saturday`,22:`dateFormat`,23:`inclusiveEndDates`,24:`topAxis`,25:`axisFormat`,26:`tickInterval`,27:`excludes`,28:`includes`,29:`todayMarker`,30:`title`,31:`acc_title`,32:`acc_title_value`,33:`acc_descr`,34:`acc_descr_value`,35:`acc_descr_multiline_value`,36:`section`,38:`taskTxt`,39:`taskData`,40:`click`,41:`callbackname`,42:`callbackargs`,43:`href`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:c(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setWeekday(`monday`);break;case 9:r.setWeekday(`tuesday`);break;case 10:r.setWeekday(`wednesday`);break;case 11:r.setWeekday(`thursday`);break;case 12:r.setWeekday(`friday`);break;case 13:r.setWeekday(`saturday`);break;case 14:r.setWeekday(`sunday`);break;case 15:r.setWeekend(`friday`);break;case 16:r.setWeekend(`saturday`);break;case 17:r.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 18:r.enableInclusiveEndDates(),this.$=a[s].substr(18);break;case 19:r.TopAxis(),this.$=a[s].substr(8);break;case 20:r.setAxisFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 21:r.setTickInterval(a[s].substr(13)),this.$=a[s].substr(13);break;case 22:r.setExcludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 23:r.setIncludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 24:r.setTodayMarker(a[s].substr(12)),this.$=a[s].substr(12);break;case 27:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 28:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 29:case 30:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 31:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 33:r.addTask(a[s-1],a[s]),this.$=`task`;break;case 34:this.$=a[s-1],r.setClickEvent(a[s-1],a[s],null);break;case 35:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 36:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],null),r.setLink(a[s-2],a[s]);break;case 37:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setLink(a[s-3],a[s]);break;case 38:this.$=a[s-2],r.setClickEvent(a[s-2],a[s],null),r.setLink(a[s-2],a[s-1]);break;case 39:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-1],a[s]),r.setLink(a[s-3],a[s-2]);break;case 40:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 41:case 47:this.$=a[s-1]+` `+a[s];break;case 42:case 43:case 45:this.$=a[s-2]+` `+a[s-1]+` `+a[s];break;case 44:case 46:this.$=a[s-3]+` `+a[s-2]+` `+a[s-1]+` `+a[s];break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:a,16:o,17:s,18:l,19:18,20:u,21:d,22:f,23:p,24:m,25:h,26:g,27:_,28:v,29:y,30:b,31:x,33:S,35:C,36:w,37:24,38:T,40:E},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:a,16:o,17:s,18:l,19:18,20:u,21:d,22:f,23:p,24:m,25:h,26:g,27:_,28:v,29:y,30:b,31:x,33:S,35:C,36:w,37:24,38:T,40:E},e(t,[2,5]),e(t,[2,6]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,20]),e(t,[2,21]),e(t,[2,22]),e(t,[2,23]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),e(t,[2,27]),{32:[1,37]},{34:[1,38]},e(t,[2,30]),e(t,[2,31]),e(t,[2,32]),{39:[1,39]},e(t,[2,8]),e(t,[2,9]),e(t,[2,10]),e(t,[2,11]),e(t,[2,12]),e(t,[2,13]),e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),{41:[1,40],43:[1,41]},e(t,[2,4]),e(t,[2,28]),e(t,[2,29]),e(t,[2,33]),e(t,[2,34],{42:[1,42],43:[1,43]}),e(t,[2,40],{41:[1,44]}),e(t,[2,35],{43:[1,45]}),e(t,[2,36]),e(t,[2,38],{42:[1,46]}),e(t,[2,37]),e(t,[2,39])],defaultActions:{},parseError:c(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:c(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;a.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}c(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}c(x,`lex`);for(var S,C,w,T,E,D={},O,k,ee,A;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var te=``;for(O in A=[],o[w])this.terminals_[O]&&O>f&&A.push(`'`+this.terminals_[O]+`'`);te=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{o as e,t}from"./chunk-CFjPhJqf.js";import{h as n}from"./chunk-GEFDOKGD-_UEQ_Hqk.js";import{a as r,c as i,d as a,f as o,g as s,h as c,i as l,p as u,s as d,u as f,v as p}from"./src-BYKCXnff.js";import{B as m,C as h,V as g,W as _,_ as v,a as y,b,c as x,s as S,v as C}from"./chunk-7R4GIKGN-Y5Bg-bKJ.js";import{a as w,i as T,n as E,r as D,t as O}from"./linear-CGDVbc3k.js";import"./defaultLocale-BbBFINez.js";import{t as k}from"./init-C9S7-8pU.js";import{t as ee}from"./dist-CBQJF0q0.js";function A(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function te(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function ne(e){return e}var re=1,ie=2,ae=3,oe=4,se=1e-6;function ce(e){return`translate(`+e+`,0)`}function le(e){return`translate(0,`+e+`)`}function ue(e){return t=>+e(t)}function de(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function fe(){return!this.__axis}function pe(e,t){var n=[],r=null,i=null,a=6,o=6,s=3,c=typeof window<`u`&&window.devicePixelRatio>1?0:.5,l=e===re||e===oe?-1:1,u=e===oe||e===ie?`x`:`y`,d=e===re||e===ae?ce:le;function f(f){var p=r??(t.ticks?t.ticks.apply(t,n):t.domain()),m=i??(t.tickFormat?t.tickFormat.apply(t,n):ne),h=Math.max(a,0)+s,g=t.range(),_=+g[0]+c,v=+g[g.length-1]+c,y=(t.bandwidth?de:ue)(t.copy(),c),b=f.selection?f.selection():f,x=b.selectAll(`.domain`).data([null]),S=b.selectAll(`.tick`).data(p,t).order(),C=S.exit(),w=S.enter().append(`g`).attr(`class`,`tick`),T=S.select(`line`),E=S.select(`text`);x=x.merge(x.enter().insert(`path`,`.tick`).attr(`class`,`domain`).attr(`stroke`,`currentColor`)),S=S.merge(w),T=T.merge(w.append(`line`).attr(`stroke`,`currentColor`).attr(u+`2`,l*a)),E=E.merge(w.append(`text`).attr(`fill`,`currentColor`).attr(u,l*h).attr(`dy`,e===re?`0em`:e===ae?`0.71em`:`0.32em`)),f!==b&&(x=x.transition(f),S=S.transition(f),T=T.transition(f),E=E.transition(f),C=C.transition(f).attr(`opacity`,se).attr(`transform`,function(e){return isFinite(e=y(e))?d(e+c):this.getAttribute(`transform`)}),w.attr(`opacity`,se).attr(`transform`,function(e){var t=this.parentNode.__axis;return d((t&&isFinite(t=t(e))?t:y(e))+c)})),C.remove(),x.attr(`d`,e===oe||e===ie?o?`M`+l*o+`,`+_+`H`+c+`V`+v+`H`+l*o:`M`+c+`,`+_+`V`+v:o?`M`+_+`,`+l*o+`V`+c+`H`+v+`V`+l*o:`M`+_+`,`+c+`H`+v),S.attr(`opacity`,1).attr(`transform`,function(e){return d(y(e)+c)}),T.attr(u+`2`,l*a),E.attr(u,l*h).text(m),b.filter(fe).attr(`fill`,`none`).attr(`font-size`,10).attr(`font-family`,`sans-serif`).attr(`text-anchor`,e===ie?`start`:e===oe?`end`:`middle`),b.each(function(){this.__axis=y})}return f.scale=function(e){return arguments.length?(t=e,f):t},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(e){return arguments.length?(n=e==null?[]:Array.from(e),f):n.slice()},f.tickValues=function(e){return arguments.length?(r=e==null?null:Array.from(e),f):r&&r.slice()},f.tickFormat=function(e){return arguments.length?(i=e,f):i},f.tickSize=function(e){return arguments.length?(a=o=+e,f):a},f.tickSizeInner=function(e){return arguments.length?(a=+e,f):a},f.tickSizeOuter=function(e){return arguments.length?(o=+e,f):o},f.tickPadding=function(e){return arguments.length?(s=+e,f):s},f.offset=function(e){return arguments.length?(c=+e,f):c},f}function me(e){return pe(re,e)}function he(e){return pe(ae,e)}var ge=Math.PI/180,_e=180/Math.PI,ve=18,ye=.96422,be=1,xe=.82521,Se=4/29,Ce=6/29,we=3*Ce*Ce,Te=Ce*Ce*Ce;function Ee(e){if(e instanceof j)return new j(e.l,e.a,e.b,e.opacity);if(e instanceof M)return Pe(e);e instanceof i||(e=f(e));var t=je(e.r),n=je(e.g),r=je(e.b),a=Oe((.2225045*t+.7168786*n+.0606169*r)/be),o,s;return t===n&&n===r?o=s=a:(o=Oe((.4360747*t+.3850649*n+.1430804*r)/ye),s=Oe((.0139322*t+.0971045*n+.7141733*r)/xe)),new j(116*a-16,500*(o-a),200*(a-s),e.opacity)}function De(e,t,n,r){return arguments.length===1?Ee(e):new j(e,t,n,r??1)}function j(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}a(j,De,o(d,{brighter(e){return new j(this.l+ve*(e??1),this.a,this.b,this.opacity)},darker(e){return new j(this.l-ve*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=ye*ke(t),e=be*ke(e),n=xe*ke(n),new i(Ae(3.1338561*t-1.6168667*e-.4906146*n),Ae(-.9787684*t+1.9161415*e+.033454*n),Ae(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function Oe(e){return e>Te?e**(1/3):e/we+Se}function ke(e){return e>Ce?e*e*e:we*(e-Se)}function Ae(e){return 255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055)}function je(e){return(e/=255)<=.04045?e/12.92:((e+.055)/1.055)**2.4}function Me(e){if(e instanceof M)return new M(e.h,e.c,e.l,e.opacity);if(e instanceof j||(e=Ee(e)),e.a===0&&e.b===0)return new M(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*_e;return new M(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Ne(e,t,n,r){return arguments.length===1?Me(e):new M(e,t,n,r??1)}function M(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Pe(e){if(isNaN(e.h))return new j(e.l,0,0,e.opacity);var t=e.h*ge;return new j(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}a(M,Ne,o(d,{brighter(e){return new M(this.h,this.c,this.l+ve*(e??1),this.opacity)},darker(e){return new M(this.h,this.c,this.l-ve*(e??1),this.opacity)},rgb(){return Pe(this).rgb()}}));function Fe(e){return function(t,n){var i=e((t=Ne(t)).h,(n=Ne(n)).h),a=r(t.c,n.c),o=r(t.l,n.l),s=r(t.opacity,n.opacity);return function(e){return t.h=i(e),t.c=a(e),t.l=o(e),t.opacity=s(e),t+``}}}var Ie=Fe(l);function Le(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}var Re=new Date,ze=new Date;function N(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>N(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(Re.setTime(+t),ze.setTime(+r),e(Re),e(ze),Math.floor(n(Re,ze))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var P=N(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);P.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?N(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):P),P.range;var F=1e3,I=F*60,L=I*60,R=L*24,Be=R*7,Ve=R*30,He=R*365,z=N(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*F)},(e,t)=>(t-e)/F,e=>e.getUTCSeconds());z.range;var Ue=N(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*F)},(e,t)=>{e.setTime(+e+t*I)},(e,t)=>(t-e)/I,e=>e.getMinutes());Ue.range;var We=N(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*I)},(e,t)=>(t-e)/I,e=>e.getUTCMinutes());We.range;var Ge=N(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*F-e.getMinutes()*I)},(e,t)=>{e.setTime(+e+t*L)},(e,t)=>(t-e)/L,e=>e.getHours());Ge.range;var Ke=N(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*L)},(e,t)=>(t-e)/L,e=>e.getUTCHours());Ke.range;var B=N(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*I)/R,e=>e.getDate()-1);B.range;var qe=N(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/R,e=>e.getUTCDate()-1);qe.range;var Je=N(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/R,e=>Math.floor(e/R));Je.range;function V(e){return N(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*I)/Be)}var Ye=V(0),Xe=V(1),Ze=V(2),Qe=V(3),H=V(4),$e=V(5),et=V(6);Ye.range,Xe.range,Ze.range,Qe.range,H.range,$e.range,et.range;function U(e){return N(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/Be)}var tt=U(0),nt=U(1),rt=U(2),it=U(3),W=U(4),at=U(5),ot=U(6);tt.range,nt.range,rt.range,it.range,W.range,at.range,ot.range;var st=N(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());st.range;var ct=N(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());ct.range;var G=N(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());G.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:N(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),G.range;var K=N(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());K.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:N(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),K.range;function lt(e,t,n,r,i,a){let o=[[z,1,F],[z,5,5*F],[z,15,15*F],[z,30,30*F],[a,1,I],[a,5,5*I],[a,15,15*I],[a,30,30*I],[i,1,L],[i,3,3*L],[i,6,6*L],[i,12,12*L],[r,1,R],[r,2,2*R],[n,1,Be],[t,1,Ve],[t,3,3*Ve],[e,1,He]];function s(e,t,n){let r=t<e;r&&([e,t]=[t,e]);let i=n&&typeof n.range==`function`?n:c(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a}function c(t,n,r){let i=Math.abs(n-t)/r,a=w(([,,e])=>e).right(o,i);if(a===o.length)return e.every(T(t/He,n/He,r));if(a===0)return P.every(Math.max(T(t,n,r),1));let[s,c]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(c)}return[s,c]}var[ut,dt]=lt(K,ct,tt,Je,Ke,We),[ft,pt]=lt(G,st,Ye,B,Ge,Ue);function mt(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function ht(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function gt(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function _t(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=St(i),u=Ct(i),d=St(a),f=Ct(a),p=St(o),m=Ct(o),h=St(s),g=Ct(s),_=St(c),v=Ct(c),y={a:ne,A:re,b:ie,B:ae,c:null,d:Wt,e:Wt,f:Yt,g:sn,G:ln,H:Gt,I:Kt,j:qt,L:Jt,m:Xt,M:Zt,p:oe,q:se,Q:Mn,s:Nn,S:Qt,u:$t,U:en,V:nn,w:rn,W:an,x:null,X:null,y:on,Y:cn,Z:un,"%":jn},b={a:ce,A:le,b:ue,B:de,c:null,d:dn,e:dn,f:gn,g:Dn,G:kn,H:fn,I:pn,j:mn,L:hn,m:_n,M:vn,p:fe,q:pe,Q:Mn,s:Nn,S:yn,u:bn,U:xn,V:Cn,w:wn,W:Tn,x:null,X:null,y:En,Y:On,Z:An,"%":jn},x={a:E,A:D,b:O,B:k,c:ee,d:Pt,e:Pt,f:Bt,g:At,G:kt,H:It,I:It,j:Ft,L:zt,m:Nt,M:Lt,p:T,q:Mt,Q:Ht,s:Ut,S:Rt,u:Tt,U:Et,V:Dt,w:wt,W:Ot,x:A,X:te,y:At,Y:kt,Z:jt,"%":Vt};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=vt[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=gt(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=ht(gt(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?nt.ceil(a):nt(a),a=qe.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=mt(gt(r.y,0,1)),o=a.getDay(),a=o>4||o===0?Xe.ceil(a):Xe(a),a=B.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else (`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:`W`in r?1:0),o=`Z`in r?ht(gt(r.y,0,1)).getUTCDay():mt(gt(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,ht(r)):mt(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in vt?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function ee(e,n,r){return w(e,t,n,r)}function A(e,t,r){return w(e,n,t,r)}function te(e,t,n){return w(e,r,t,n)}function ne(e){return o[e.getDay()]}function re(e){return a[e.getDay()]}function ie(e){return c[e.getMonth()]}function ae(e){return s[e.getMonth()]}function oe(e){return i[+(e.getHours()>=12)]}function se(e){return 1+~~(e.getMonth()/3)}function ce(e){return o[e.getUTCDay()]}function le(e){return a[e.getUTCDay()]}function ue(e){return c[e.getUTCMonth()]}function de(e){return s[e.getUTCMonth()]}function fe(e){return i[+(e.getUTCHours()>=12)]}function pe(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var vt={"-":``,_:` `,0:`0`},q=/^\s*\d+/,yt=/^%/,bt=/[\\^$*+?|[\]().{}]/g;function J(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function xt(e){return e.replace(bt,`\\$&`)}function St(e){return RegExp(`^(?:`+e.map(xt).join(`|`)+`)`,`i`)}function Ct(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function wt(e,t,n){var r=q.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Tt(e,t,n){var r=q.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Et(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Dt(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Ot(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function kt(e,t,n){var r=q.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function At(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function jt(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function Mt(e,t,n){var r=q.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Nt(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Pt(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Ft(e,t,n){var r=q.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function It(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Lt(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Rt(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function zt(e,t,n){var r=q.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Bt(e,t,n){var r=q.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Vt(e,t,n){var r=yt.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Ht(e,t,n){var r=q.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Ut(e,t,n){var r=q.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Wt(e,t){return J(e.getDate(),t,2)}function Gt(e,t){return J(e.getHours(),t,2)}function Kt(e,t){return J(e.getHours()%12||12,t,2)}function qt(e,t){return J(1+B.count(G(e),e),t,3)}function Jt(e,t){return J(e.getMilliseconds(),t,3)}function Yt(e,t){return Jt(e,t)+`000`}function Xt(e,t){return J(e.getMonth()+1,t,2)}function Zt(e,t){return J(e.getMinutes(),t,2)}function Qt(e,t){return J(e.getSeconds(),t,2)}function $t(e){var t=e.getDay();return t===0?7:t}function en(e,t){return J(Ye.count(G(e)-1,e),t,2)}function tn(e){var t=e.getDay();return t>=4||t===0?H(e):H.ceil(e)}function nn(e,t){return e=tn(e),J(H.count(G(e),e)+(G(e).getDay()===4),t,2)}function rn(e){return e.getDay()}function an(e,t){return J(Xe.count(G(e)-1,e),t,2)}function on(e,t){return J(e.getFullYear()%100,t,2)}function sn(e,t){return e=tn(e),J(e.getFullYear()%100,t,2)}function cn(e,t){return J(e.getFullYear()%1e4,t,4)}function ln(e,t){var n=e.getDay();return e=n>=4||n===0?H(e):H.ceil(e),J(e.getFullYear()%1e4,t,4)}function un(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+J(t/60|0,`0`,2)+J(t%60,`0`,2)}function dn(e,t){return J(e.getUTCDate(),t,2)}function fn(e,t){return J(e.getUTCHours(),t,2)}function pn(e,t){return J(e.getUTCHours()%12||12,t,2)}function mn(e,t){return J(1+qe.count(K(e),e),t,3)}function hn(e,t){return J(e.getUTCMilliseconds(),t,3)}function gn(e,t){return hn(e,t)+`000`}function _n(e,t){return J(e.getUTCMonth()+1,t,2)}function vn(e,t){return J(e.getUTCMinutes(),t,2)}function yn(e,t){return J(e.getUTCSeconds(),t,2)}function bn(e){var t=e.getUTCDay();return t===0?7:t}function xn(e,t){return J(tt.count(K(e)-1,e),t,2)}function Sn(e){var t=e.getUTCDay();return t>=4||t===0?W(e):W.ceil(e)}function Cn(e,t){return e=Sn(e),J(W.count(K(e),e)+(K(e).getUTCDay()===4),t,2)}function wn(e){return e.getUTCDay()}function Tn(e,t){return J(nt.count(K(e)-1,e),t,2)}function En(e,t){return J(e.getUTCFullYear()%100,t,2)}function Dn(e,t){return e=Sn(e),J(e.getUTCFullYear()%100,t,2)}function On(e,t){return J(e.getUTCFullYear()%1e4,t,4)}function kn(e,t){var n=e.getUTCDay();return e=n>=4||n===0?W(e):W.ceil(e),J(e.getUTCFullYear()%1e4,t,4)}function An(){return`+0000`}function jn(){return`%`}function Mn(e){return+e}function Nn(e){return Math.floor(e/1e3)}var Pn,Fn;In({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function In(e){return Pn=_t(e),Fn=Pn.format,Pn.parse,Pn.utcFormat,Pn.utcParse,Pn}function Ln(e){return new Date(e)}function Rn(e){return e instanceof Date?+e:+new Date(+e)}function zn(e,t,n,r,i,a,o,s,c,l){var u=E(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e)<e?p:s(e)<e?m:o(e)<e?h:a(e)<e?g:r(e)<e?i(e)<e?_:v:n(e)<e?y:b)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,Rn)):f().map(Ln)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return t==null?x:l(t)},u.nice=function(e){var n=f();return(!e||typeof e.range!=`function`)&&(e=t(n[0],n[n.length-1],e??10)),e?f(Le(n,e)):u},u.copy=function(){return D(u,zn(e,t,n,r,i,a,o,s,c,l))},u}function Bn(){return k.apply(zn(ft,pt,G,st,Ye,B,Ge,Ue,z,Fn).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var Vn=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_isoWeek=r()})(e,(function(){var e=`day`;return function(t,n,r){var i=function(t){return t.add(4-t.isoWeekday(),e)},a=n.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var n,a,o,s,c=i(this),l=(n=this.isoWeekYear(),a=this.$u,o=(a?r.utc:r)().year(n).startOf(`year`),s=4-o.isoWeekday(),o.isoWeekday()>4&&(s+=7),o.add(s,e));return c.diff(l,`week`)+1},a.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var o=a.startOf;a.startOf=function(e,t){var n=this.$utils(),r=!!n.u(t)||t;return n.p(e)===`isoweek`?r?this.date(this.date()-(this.isoWeekday()-1)).startOf(`day`):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf(`day`):o.bind(this)(e,t)}}}))})),Hn=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(e,(function(){var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},c=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||={}).offset=function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n}(e)}],u=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,c(`seconds`)],ss:[i,c(`seconds`)],m:[i,c(`minutes`)],mm:[i,c(`minutes`)],H:[i,c(`hours`)],h:[i,c(`hours`)],HH:[i,c(`hours`)],hh:[i,c(`hours`)],D:[i,c(`day`)],DD:[r,c(`day`)],Do:[a,function(e){var t=o.ordinal;if(this.day=e.match(/\d+/)[0],t)for(var n=1;n<=31;n+=1)t(n).replace(/\[|\]/g,``)===e&&(this.day=n)}],w:[i,c(`week`)],ww:[r,c(`week`)],M:[i,c(`month`)],MM:[r,c(`month`)],MMM:[a,function(e){var t=u(`months`),n=(u(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[a,function(e){var t=u(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,c(`year`)],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,c(`year`)],Z:l,ZZ:l};function p(n){for(var r=n,i=o&&o.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,c=0;c<s;c+=1){var l=a[c],u=f[l],d=u&&u[0],p=u&&u[1];a[c]=p?{regex:d,parser:p}:l.replace(/^\[|\]$/g,``)}return function(e){for(var t={},n=0,r=0;n<s;n+=1){var i=a[n];if(typeof i==`string`)r+=i.length;else{var o=i.regex,c=i.parser,l=e.slice(r),u=o.exec(l)[0];c.call(t,u),e=e.replace(u,``)}}return function(e){var t=e.afternoon;if(t!==void 0){var n=e.hours;t?n<12&&(e.hours+=12):n===12&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(s=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,a=e.args;this.$u=r;var s=a[1];if(typeof s==`string`){var c=!0===a[2],l=!0===a[3],u=c||l,d=a[2];l&&(d=a[2]),o=this.$locale(),!c&&d&&(o=n.Ls[d]),this.$d=function(e,t,n,r){try{if([`x`,`X`].indexOf(t)>-1)return new Date((t===`X`?1e3:1)*e);var i=p(t)(e),a=i.year,o=i.month,s=i.day,c=i.hours,l=i.minutes,u=i.seconds,d=i.milliseconds,f=i.zone,m=i.week,h=new Date,g=s||(a||o?1:h.getDate()),_=a||h.getFullYear(),v=0;a&&!o||(v=o>0?o-1:h.getMonth());var y,b=c||0,x=l||0,S=u||0,C=d||0;return f?new Date(Date.UTC(_,v,g,b,x,S,C+60*f.offset*1e3)):n?new Date(Date.UTC(_,v,g,b,x,S,C)):(y=new Date(_,v,g,b,x,S,C),m&&(y=r(y).week(m).toDate()),y)}catch{return new Date(``)}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date(``)),o={}}else if(s instanceof Array)for(var f=s.length,m=1;m<=f;m+=1){a[1]=s[m-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(``))}else i.call(this,e)}}}))})),Un=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_advancedFormat=r()})(e,(function(){return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var i=this.$utils(),a=(e||`YYYY-MM-DDTHH:mm:ssZ`).replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case`Q`:return Math.ceil((t.$M+1)/3);case`Do`:return n.ordinal(t.$D);case`gggg`:return t.weekYear();case`GGGG`:return t.isoWeekYear();case`wo`:return n.ordinal(t.week(),`W`);case`w`:case`ww`:return i.s(t.week(),e===`w`?1:2,`0`);case`W`:case`WW`:return i.s(t.isoWeek(),e===`W`?1:2,`0`);case`k`:case`kk`:return i.s(String(t.$H===0?24:t.$H),e===`k`?1:2,`0`);case`X`:return Math.floor(t.$d.getTime()/1e3);case`x`:return t.$d.getTime();case`z`:return`[`+t.offsetName()+`]`;case`zzz`:return`[`+t.offsetName(`long`)+`]`;default:return e}}));return r.bind(this)(a)}}}))})),Wn=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_duration=r()})(e,(function(){var e,t,n=1e3,r=6e4,i=36e5,a=864e5,o=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,s=31536e6,c=2628e6,l=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,u={years:s,months:c,days:a,hours:i,minutes:r,seconds:n,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof v},f=function(e,t,n){return new v(e,n,t.$l)},p=function(e){return t.p(e)+`s`},m=function(e){return e<0},h=function(e){return m(e)?Math.ceil(e):Math.floor(e)},g=function(e){return Math.abs(e)},_=function(e,t){return e?m(e)?{negative:!0,format:``+g(e)+t}:{negative:!1,format:``+e+t}:{negative:!1,format:``}},v=function(){function m(e,t,n){var r=this;if(this.$d={},this.$l=n,e===void 0&&(this.$ms=0,this.parseFromMilliseconds()),t)return f(e*u[p(t)],this);if(typeof e==`number`)return this.$ms=e,this.parseFromMilliseconds(),this;if(typeof e==`object`)return Object.keys(e).forEach((function(t){r.$d[p(t)]=e[t]})),this.calMilliseconds(),this;if(typeof e==`string`){var i=e.match(l);if(i){var a=i.slice(2).map((function(e){return e==null?0:Number(e)}));return this.$d.years=a[0],this.$d.months=a[1],this.$d.weeks=a[2],this.$d.days=a[3],this.$d.hours=a[4],this.$d.minutes=a[5],this.$d.seconds=a[6],this.calMilliseconds(),this}}return this}var g=m.prototype;return g.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,n){return t+(e.$d[n]||0)*u[n]}),0)},g.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=h(e/s),e%=s,this.$d.months=h(e/c),e%=c,this.$d.days=h(e/a),e%=a,this.$d.hours=h(e/i),e%=i,this.$d.minutes=h(e/r),e%=r,this.$d.seconds=h(e/n),e%=n,this.$d.milliseconds=e},g.toISOString=function(){var e=_(this.$d.years,`Y`),t=_(this.$d.months,`M`),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=_(n,`D`),i=_(this.$d.hours,`H`),a=_(this.$d.minutes,`M`),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var s=_(o,`S`),c=e.negative||t.negative||r.negative||i.negative||a.negative||s.negative,l=i.format||a.format||s.format?`T`:``,u=(c?`-`:``)+`P`+e.format+t.format+r.format+l+i.format+a.format+s.format;return u===`P`||u===`-P`?`P0D`:u},g.toJSON=function(){return this.toISOString()},g.format=function(e){var n=e||`YYYY-MM-DDTHH:mm:ss`,r={Y:this.$d.years,YY:t.s(this.$d.years,2,`0`),YYYY:t.s(this.$d.years,4,`0`),M:this.$d.months,MM:t.s(this.$d.months,2,`0`),D:this.$d.days,DD:t.s(this.$d.days,2,`0`),H:this.$d.hours,HH:t.s(this.$d.hours,2,`0`),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,`0`),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,`0`),SSS:t.s(this.$d.milliseconds,3,`0`)};return n.replace(o,(function(e,t){return t||String(r[e])}))},g.as=function(e){return this.$ms/u[p(e)]},g.get=function(e){var t=this.$ms,n=p(e);return n===`milliseconds`?t%=1e3:t=n===`weeks`?h(t/u[n]):this.$d[n],t||0},g.add=function(e,t,n){var r;return r=t?e*u[p(t)]:d(e)?e.$ms:f(e,this).$ms,f(this.$ms+r*(n?-1:1),this)},g.subtract=function(e,t){return this.add(e,t,!0)},g.locale=function(e){var t=this.clone();return t.$l=e,t},g.clone=function(){return f(this.$ms,this)},g.humanize=function(t){return e().add(this.$ms,`ms`).locale(this.$l).fromNow(!t)},g.valueOf=function(){return this.asMilliseconds()},g.milliseconds=function(){return this.get(`milliseconds`)},g.asMilliseconds=function(){return this.as(`milliseconds`)},g.seconds=function(){return this.get(`seconds`)},g.asSeconds=function(){return this.as(`seconds`)},g.minutes=function(){return this.get(`minutes`)},g.asMinutes=function(){return this.as(`minutes`)},g.hours=function(){return this.get(`hours`)},g.asHours=function(){return this.as(`hours`)},g.days=function(){return this.get(`days`)},g.asDays=function(){return this.as(`days`)},g.weeks=function(){return this.get(`weeks`)},g.asWeeks=function(){return this.as(`weeks`)},g.months=function(){return this.get(`months`)},g.asMonths=function(){return this.as(`months`)},g.years=function(){return this.get(`years`)},g.asYears=function(){return this.as(`years`)},m}(),y=function(e,t,n){return e.add(t.years()*n,`y`).add(t.months()*n,`M`).add(t.days()*n,`d`).add(t.hours()*n,`h`).add(t.minutes()*n,`m`).add(t.seconds()*n,`s`).add(t.milliseconds()*n,`ms`)};return function(n,r,i){e=i,t=i().$utils(),i.duration=function(e,t){return f(e,{$l:i.locale()},t)},i.isDuration=d;var a=r.prototype.add,o=r.prototype.subtract;r.prototype.add=function(e,t){return d(e)?y(this,e,1):a.bind(this)(e,t)},r.prototype.subtract=function(e,t){return d(e)?y(this,e,-1):o.bind(this)(e,t)}}}))})),Gn=ee(),Y=e(p(),1),Kn=e(Vn(),1),qn=e(Hn(),1),Jn=e(Un(),1),Yn=e(Wn(),1),Xn=(function(){var e=c(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],a=[1,29],o=[1,30],s=[1,31],l=[1,32],u=[1,33],d=[1,34],f=[1,9],p=[1,10],m=[1,11],h=[1,12],g=[1,13],_=[1,14],v=[1,15],y=[1,16],b=[1,19],x=[1,20],S=[1,21],C=[1,22],w=[1,23],T=[1,25],E=[1,35],D={trace:c(function(){},`trace`),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:`error`,4:`gantt`,6:`EOF`,8:`SPACE`,10:`NL`,12:`weekday_monday`,13:`weekday_tuesday`,14:`weekday_wednesday`,15:`weekday_thursday`,16:`weekday_friday`,17:`weekday_saturday`,18:`weekday_sunday`,20:`weekend_friday`,21:`weekend_saturday`,22:`dateFormat`,23:`inclusiveEndDates`,24:`topAxis`,25:`axisFormat`,26:`tickInterval`,27:`excludes`,28:`includes`,29:`todayMarker`,30:`title`,31:`acc_title`,32:`acc_title_value`,33:`acc_descr`,34:`acc_descr_value`,35:`acc_descr_multiline_value`,36:`section`,38:`taskTxt`,39:`taskData`,40:`click`,41:`callbackname`,42:`callbackargs`,43:`href`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:c(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setWeekday(`monday`);break;case 9:r.setWeekday(`tuesday`);break;case 10:r.setWeekday(`wednesday`);break;case 11:r.setWeekday(`thursday`);break;case 12:r.setWeekday(`friday`);break;case 13:r.setWeekday(`saturday`);break;case 14:r.setWeekday(`sunday`);break;case 15:r.setWeekend(`friday`);break;case 16:r.setWeekend(`saturday`);break;case 17:r.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 18:r.enableInclusiveEndDates(),this.$=a[s].substr(18);break;case 19:r.TopAxis(),this.$=a[s].substr(8);break;case 20:r.setAxisFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 21:r.setTickInterval(a[s].substr(13)),this.$=a[s].substr(13);break;case 22:r.setExcludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 23:r.setIncludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 24:r.setTodayMarker(a[s].substr(12)),this.$=a[s].substr(12);break;case 27:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 28:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 29:case 30:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 31:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 33:r.addTask(a[s-1],a[s]),this.$=`task`;break;case 34:this.$=a[s-1],r.setClickEvent(a[s-1],a[s],null);break;case 35:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 36:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],null),r.setLink(a[s-2],a[s]);break;case 37:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setLink(a[s-3],a[s]);break;case 38:this.$=a[s-2],r.setClickEvent(a[s-2],a[s],null),r.setLink(a[s-2],a[s-1]);break;case 39:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-1],a[s]),r.setLink(a[s-3],a[s-2]);break;case 40:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 41:case 47:this.$=a[s-1]+` `+a[s];break;case 42:case 43:case 45:this.$=a[s-2]+` `+a[s-1]+` `+a[s];break;case 44:case 46:this.$=a[s-3]+` `+a[s-2]+` `+a[s-1]+` `+a[s];break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:a,16:o,17:s,18:l,19:18,20:u,21:d,22:f,23:p,24:m,25:h,26:g,27:_,28:v,29:y,30:b,31:x,33:S,35:C,36:w,37:24,38:T,40:E},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:a,16:o,17:s,18:l,19:18,20:u,21:d,22:f,23:p,24:m,25:h,26:g,27:_,28:v,29:y,30:b,31:x,33:S,35:C,36:w,37:24,38:T,40:E},e(t,[2,5]),e(t,[2,6]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,20]),e(t,[2,21]),e(t,[2,22]),e(t,[2,23]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),e(t,[2,27]),{32:[1,37]},{34:[1,38]},e(t,[2,30]),e(t,[2,31]),e(t,[2,32]),{39:[1,39]},e(t,[2,8]),e(t,[2,9]),e(t,[2,10]),e(t,[2,11]),e(t,[2,12]),e(t,[2,13]),e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),{41:[1,40],43:[1,41]},e(t,[2,4]),e(t,[2,28]),e(t,[2,29]),e(t,[2,33]),e(t,[2,34],{42:[1,42],43:[1,43]}),e(t,[2,40],{41:[1,44]}),e(t,[2,35],{43:[1,45]}),e(t,[2,36]),e(t,[2,38],{42:[1,46]}),e(t,[2,37]),e(t,[2,39])],defaultActions:{},parseError:c(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:c(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;a.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}c(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}c(x,`lex`);for(var S,C,w,T,E,D={},O,k,ee,A;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var te=``;for(O in A=[],o[w])this.terminals_[O]&&O>f&&A.push(`'`+this.terminals_[O]+`'`);te=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+A.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(te,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:A})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),i.push(h.yytext),a.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,s=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),E=this.performAction.apply(D,[s,u,l,g.yy,T[1],i,a].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),a.push(D._$),ee=o[n[n.length-2]][n[n.length-1]],n.push(ee);break;case 3:return!0}}return!0},`parse`)};D.lexer=(function(){return{EOF:1,parseError:c(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:c(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:c(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:c(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:c(function(){return this._more=!0,this},`more`),reject:c(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:c(function(e){this.unput(this.match.slice(e))},`less`),pastInput:c(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:c(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:c(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -0,0 +1 @@
1
+ import{o as e}from"./chunk-CFjPhJqf.js";import{t}from"./react-nm2Ru1Pt.js";import"./react-dom-Bpkvzu3U.js";import{n,t as r}from"./jsx-runtime-BRW_vwa9.js";import{a as i,i as a,n as o,r as s,t as c}from"./input-Bid961xi.js";import{o as l,t as u}from"./tab-store-Ck-9RsH-.js";import{t as d}from"./tag-CCtdV063.js";import"./dist-lF8CoYII.js";import{t as f}from"./utils-BcFEFg4m.js";import{i as p,t as m}from"./api-client-DniUYaIY.js";import{B as h,C as g,H as _,I as v,R as y,S as b,T as x,V as S,Y as C,Z as w,at as T,b as E,g as D,h as O,ht as k,st as A,v as j,w as M,x as N,y as P}from"./index-hxAJJHpg.js";var ee=n(`cherry`,[[`path`,{d:`M2 17a5 5 0 0 0 10 0c0-2.76-2.5-5-5-3-2.5-2-5 .24-5 3Z`,key:`cvxqlc`}],[`path`,{d:`M12 17a5 5 0 0 0 10 0c0-2.76-2.5-5-5-3-2.5-2-5 .24-5 3Z`,key:`1ostrc`}],[`path`,{d:`M7 14c3.22-2.91 4.29-8.75 5-12 1.66 2.38 4.94 9 5 12`,key:`hqx58h`}],[`path`,{d:`M22 9c-4.29 0-7.14-2.33-10-7 5.71 0 10 4.67 10 7Z`,key:`eykp1o`}]]),F=n(`git-merge`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M6 21V9a9 9 0 0 0 9 9`,key:`7kw0sc`}]]),I=e(t(),1),L=[`#0085d9`,`#d73a49`,`#6f42c1`,`#2cbe4e`,`#e36209`,`#005cc5`,`#b31d28`,`#5a32a3`,`#22863a`,`#cb2431`];function te(e){let t=new Map;if(!e)return t;let n=new Set;for(let t of e.branches)if(!t.remote)for(let e of t.remotes)n.add(`remotes/${e}/${t.name}`);for(let r of e.branches)if(r.remote){if(n.has(r.name))continue;let e=t.get(r.commitHash)??[],i=r.name.replace(/^remotes\//,``);e.push({name:i,type:`branch`,remotes:[],current:!1}),t.set(r.commitHash,e)}else{let e=t.get(r.commitHash)??[];e.push({name:r.name,type:`branch`,remotes:r.remotes,current:r.current}),t.set(r.commitHash,e)}for(let n of e.commits)for(let e of n.refs)if(e.startsWith(`tag: `)){let r=e.replace(`tag: `,``),i=t.get(n.hash)??[];i.push({name:r,type:`tag`,remotes:[],current:!1}),t.set(n.hash,i)}return t}function ne(e){let t=new Map;if(!e)return{laneMap:t,maxLane:0,unloadedParentLanes:new Map};let n=0,r=0,i=new Map,a=new Set(e.commits.map(e=>e.hash)),o=[],s=()=>o.length>0?(o.sort((e,t)=>e-t),o.shift()):n++;for(let n of e.commits){let e=i.get(n.hash);e===void 0&&(e=s()),t.set(n.hash,e),e>r&&(r=e),i.delete(n.hash);let a=!1;for(let t=0;t<n.parents.length;t++){let o=n.parents[t];if(!i.has(o))if(t===0)i.set(o,e),a=!0;else{let e=s();i.set(o,e),e>r&&(r=e)}}a||o.push(e)}let c=new Map;for(let[e,t]of i)a.has(e)||c.set(e,t);return{laneMap:t,maxLane:r,unloadedParentLanes:c}}function re(e,t,n,r){if(!e)return[];let i=[],a=new Set(e.commits.map(e=>e.hash));for(let o=0;o<e.commits.length;o++){let s=e.commits[o],c=t.get(s.hash)??0,l=L[c%L.length];for(let u of s.parents){let d=e.commits.findIndex(e=>e.hash===u);if(d>=0){let e=t.get(u)??0,n=L[e%L.length],r=c*16+16/2,a=o*24+24/2,f=e*16+16/2,p=d*24+24/2,m,h=s.parents.indexOf(u)>0;if(r===f)m=`M ${r} ${a} L ${f} ${p}`;else if(h){let e=a+24;m=`M ${r} ${a} C ${r} ${e} ${f} ${a} ${f} ${e} L ${f} ${p}`}else{let e=p-24;m=`M ${r} ${a} L ${r} ${e} C ${r} ${p} ${f} ${e} ${f} ${p}`}let g=s.parents.indexOf(u)===0?l:n;i.push({d:m,color:g})}else if(!a.has(u)){let e=n.get(u)??c,t=L[e%L.length],a=c*16+16/2,s=o*24+24/2,d=e*16+16/2;if(a===d)i.push({d:`M ${a} ${s} L ${a} ${r}`,color:l});else{let e=s+24,n=`M ${a} ${s} C ${a} ${e} ${d} ${s} ${d} ${e} L ${d} ${r}`;i.push({d:n,color:t})}}}}return i}function R(e){let t=new Date(e),n=new Date().getTime()-t.getTime(),r=Math.floor(n/6e4);if(r<1)return`just now`;if(r<60)return`${r}m ago`;let i=Math.floor(r/60);if(i<24)return`${i}h ago`;let a=Math.floor(i/24);if(a<30)return`${a}d ago`;let o=Math.floor(a/30);return o<12?`${o}mo ago`:`${Math.floor(o/12)}y ago`}var z=200;function B(e){let[t,n]=(0,I.useState)(null),[r,i]=(0,I.useState)(!0),[a,o]=(0,I.useState)(!1),[s,c]=(0,I.useState)(!0),[l,d]=(0,I.useState)(null),[f,h]=(0,I.useState)(!1),[g,_]=(0,I.useState)(null),[v,y]=(0,I.useState)([]),[b,x]=(0,I.useState)(!1),[S,C]=(0,I.useState)(`__all__`),[w,T]=(0,I.useState)(``),[E,D]=(0,I.useState)(!1),{openTab:O}=u(),k=(0,I.useRef)(0),A=(0,I.useCallback)(async()=>{if(e)try{i(!0);let t=Math.max(z,k.current),r=await m.get(`${p(e)}/git/graph?max=${t}`);n(r),k.current=r.commits.length,c(r.commits.length>=t),d(null)}catch(e){d(e instanceof Error?e.message:`Failed to fetch graph`)}finally{i(!1)}},[e]),j=(0,I.useCallback)(async()=>{if(!(!e||a||!s))try{o(!0);let t=k.current,r=await m.get(`${p(e)}/git/graph?max=${z}&skip=${t}`);if(r.commits.length===0){c(!1);return}n(e=>{if(!e)return r;let t=new Set(e.commits.map(e=>e.hash)),n=r.commits.filter(e=>!t.has(e.hash)),i=new Set(e.branches.map(e=>e.name)),a=r.branches.filter(e=>!i.has(e.name));return{commits:[...e.commits,...n],branches:[...e.branches,...a],head:e.head}}),k.current=t+r.commits.length,c(r.commits.length>=z)}catch(e){d(e instanceof Error?e.message:`Failed to load more`)}finally{o(!1)}},[e,a,s]);(0,I.useEffect)(()=>{A();let e=setInterval(A,1e4);return()=>clearInterval(e)},[A]);let M=async(t,n)=>{if(e){h(!0);try{await m.post(`${p(e)}${t}`,n),await A()}catch(e){d(e instanceof Error?e.message:`Action failed`)}finally{h(!1)}}},N=()=>M(`/git/fetch`,{}),P=e=>M(`/git/checkout`,{ref:e}),ee=e=>M(`/git/cherry-pick`,{hash:e}),F=e=>M(`/git/revert`,{hash:e}),L=e=>M(`/git/merge`,{source:e}),R=e=>M(`/git/branch/delete`,{name:e}),B=e=>M(`/git/push`,{branch:e}),V=(e,t)=>M(`/git/tag`,{name:e,hash:t}),H=e=>navigator.clipboard.writeText(e),U=async(e,n)=>{if(t?.branches.some(t=>t.name===e||t.name.endsWith(`/${e}`))){if(!window.confirm(`Branch "${e}" already exists.\nDelete and recreate from this commit?`))return;await M(`/git/branch/delete`,{name:e})}await M(`/git/branch/create`,{name:e,from:n})},W=async t=>{if(e)try{let n=await m.get(`${p(e)}/git/pr-url?branch=${encodeURIComponent(t)}`);n.url&&window.open(n.url,`_blank`)}catch{}},G=async t=>{if(g?.hash===t.hash){_(null);return}_(t),x(!0);try{let n=t.parents[0]??``,r=n?`ref1=${encodeURIComponent(n)}&`:``,i=await m.get(`${p(e)}/git/diff-stat?${r}ref2=${encodeURIComponent(t.hash)}`);y(Array.isArray(i)?i:[])}catch{y([])}finally{x(!1)}},K=t=>O({type:`git-diff`,title:`Diff ${t.abbreviatedHash}`,closable:!0,metadata:{projectName:e,ref1:t.parents[0]??void 0,ref2:t.hash},projectId:e??null}),q=(0,I.useMemo)(()=>te(t),[t]),J=t?.branches.find(e=>e.current),Y=t?.head??``,X=(0,I.useMemo)(()=>{if(!t)return[];let e=t.commits;if(S!==`__all__`){let n=t.branches.find(e=>e.name===S);if(n){let r=new Set,i=[n.commitHash];for(;i.length>0;){let e=i.pop();if(r.has(e))continue;r.add(e);let n=t.commits.find(t=>t.hash===e);n&&i.push(...n.parents)}e=e.filter(e=>r.has(e.hash))}}if(w.trim()){let t=w.toLowerCase();e=e.filter(e=>e.subject.toLowerCase().includes(t)||e.authorName.toLowerCase().includes(t)||e.abbreviatedHash.includes(t)||e.hash.includes(t))}return e},[t,S,w]),Z=(0,I.useMemo)(()=>t?{...t,commits:X}:null,[t,X]),Q=(0,I.useMemo)(()=>ne(Z),[Z]),$=X.length*24+48;return{data:t,loading:r,loadingMore:a,hasMore:s,error:l,acting:f,selectedCommit:g,setSelectedCommit:_,commitFiles:v,loadingDetail:b,branchFilter:S,setBranchFilter:C,searchQuery:w,setSearchQuery:T,showSearch:E,setShowSearch:D,fetchGraph:A,fetchFromRemotes:N,loadMore:j,handleCheckout:P,handleCherryPick:ee,handleRevert:F,handleMerge:L,handleDeleteBranch:R,handlePushBranch:B,handleCreateBranch:U,handleCreateTag:V,handleCreatePr:W,copyHash:H,selectCommit:G,openDiffForCommit:K,commitLabels:q,currentBranch:J,headHash:Y,filteredCommits:X,filteredLanes:Q,svgHeight:$,svgPaths:(0,I.useMemo)(()=>re(Z,Q.laneMap,Q.unloadedParentLanes,$),[Z,Q.laneMap,Q.unloadedParentLanes,$])}}function V(e){let[t,n]=(0,I.useState)(e),r=(0,I.useRef)(e);r.current=t;let i=(0,I.useRef)(!1);return{widths:t,startResize:(e,t)=>{i.current=!0;let a=r.current[e]??80,o=r=>{if(!i.current)return;let o=`touches`in r?r.touches[0].clientX:r.clientX,s=Math.max(40,a+o-t);n(t=>({...t,[e]:s}))},s=()=>{i.current=!1,window.removeEventListener(`mousemove`,o),window.removeEventListener(`mouseup`,s),window.removeEventListener(`touchmove`,o),window.removeEventListener(`touchend`,s)};window.addEventListener(`mousemove`,o),window.addEventListener(`mouseup`,s),window.addEventListener(`touchmove`,o,{passive:!1}),window.addEventListener(`touchend`,s)}}}var H=r();function U({branches:e,branchFilter:t,onBranchFilterChange:n,searchQuery:r,onSearchQueryChange:i,showSearch:s,onToggleSearch:l,onFetch:u,onRefresh:d,onOpenSettings:f,loading:p,acting:m,projectName:g}){let y=e.filter(e=>!e.remote),[b,x]=(0,I.useState)(!1),[C,w]=(0,I.useState)(``),E=(0,I.useRef)(null);(0,I.useEffect)(()=>{if(!b)return;let e=e=>{E.current&&!E.current.contains(e.target)&&(x(!1),w(``))};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[b]);let D=C?y.filter(e=>e.name.toLowerCase().includes(C.toLowerCase())):y,O=t===`__all__`?`Show All`:y.find(e=>e.name===t)?.name??`Show All`;return(0,H.jsx)(`div`,{className:`border-b bg-background`,children:(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5 px-2 py-1.5`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-1 text-xs text-muted-foreground shrink-0`,children:[(0,H.jsx)(`span`,{className:`font-semibold`,children:`Repo:`}),(0,H.jsx)(`span`,{className:`font-medium text-foreground truncate max-w-[120px]`,children:g??`—`})]}),(0,H.jsx)(`div`,{className:`w-px h-4 bg-border mx-1`}),(0,H.jsxs)(`div`,{className:`relative shrink-0`,ref:E,children:[(0,H.jsxs)(`button`,{type:`button`,className:`flex items-center gap-1 h-6 px-2 text-xs border rounded-md bg-transparent hover:bg-muted/50`,onClick:()=>{x(e=>!e),w(``)},children:[(0,H.jsx)(`span`,{className:`font-semibold text-muted-foreground`,children:`Branches:`}),(0,H.jsx)(`span`,{className:`max-w-[100px] truncate`,children:O}),(0,H.jsx)(a,{className:`size-3 opacity-50`})]}),b&&(0,H.jsxs)(`div`,{className:`absolute top-full left-0 mt-1 z-50 w-[220px] rounded-md border bg-popover shadow-md`,children:[(0,H.jsx)(`div`,{className:`p-1.5`,children:(0,H.jsx)(c,{className:`h-6 text-xs px-2`,placeholder:`Filter branches...`,value:C,onChange:e=>w(e.target.value),autoFocus:!0})}),(0,H.jsxs)(`div`,{className:`max-h-[200px] overflow-y-auto p-1`,children:[(0,H.jsx)(W,{label:`Show All`,selected:t===`__all__`,onClick:()=>{n(`__all__`),x(!1)}}),D.map(e=>(0,H.jsx)(W,{label:e.name,current:e.current,selected:t===e.name,onClick:()=>{n(e.name),x(!1)}},e.name)),D.length===0&&C&&(0,H.jsx)(`div`,{className:`px-2 py-1.5 text-xs text-muted-foreground`,children:`No branches found`})]})]})]}),(0,H.jsx)(`div`,{className:`flex-1`}),s&&(0,H.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,H.jsx)(c,{className:`h-6 text-xs w-[160px] px-2`,placeholder:`Search commits...`,value:r,onChange:e=>i(e.target.value),autoFocus:!0}),(0,H.jsx)(o,{variant:`ghost`,size:`icon-xs`,onClick:l,children:(0,H.jsx)(v,{className:`size-3`})})]}),!s&&(0,H.jsx)(o,{variant:`ghost`,size:`icon-xs`,onClick:l,title:`Find`,children:(0,H.jsx)(S,{className:`size-3.5`})}),(0,H.jsx)(o,{variant:`ghost`,size:`icon-xs`,onClick:f,title:`Settings`,children:(0,H.jsx)(h,{className:`size-3.5`})}),(0,H.jsx)(o,{variant:`ghost`,size:`icon-xs`,onClick:u,disabled:m,title:`Fetch`,children:(0,H.jsx)(T,{className:`size-3.5`})}),(0,H.jsx)(o,{variant:`ghost`,size:`icon-xs`,onClick:d,disabled:m,title:`Refresh`,children:(0,H.jsx)(_,{className:`size-3.5 ${p?`animate-spin`:``}`})})]})})}function W({label:e,selected:t,current:n,onClick:r}){return(0,H.jsxs)(`button`,{type:`button`,className:`flex items-center gap-2 w-full px-2 py-1 text-xs rounded-sm hover:bg-accent hover:text-accent-foreground text-left`,onClick:r,children:[(0,H.jsx)(i,{className:`size-3 shrink-0 ${t?`opacity-100`:`opacity-0`}`}),(0,H.jsx)(`span`,{className:`truncate flex-1`,children:e}),n&&(0,H.jsx)(`span`,{className:`text-[10px] text-muted-foreground italic`,children:`current`})]})}function G({commits:e,laneMap:t,svgPaths:n,width:r,height:i,headHash:a}){return(0,H.jsxs)(`svg`,{width:r,height:i,children:[n.map((e,t)=>(0,H.jsx)(`path`,{d:e.d,stroke:e.color,strokeWidth:2,fill:`none`},t)),e.map((e,n)=>{let r=t.get(e.hash)??0,i=r*16+16/2,o=n*24+24/2,s=L[r%L.length],c=e.hash===a;return(0,H.jsx)(`circle`,{cx:i,cy:o,r:c?5:4,fill:s,stroke:c?`#000`:`none`,strokeWidth:c?2:0},e.hash)})]})}function K({name:e,type:t,remotes:n,isCurrent:r,color:i,currentBranch:a,onCheckout:o,onMerge:s,onPush:c,onCreatePr:u,onDelete:f}){return t===`tag`?(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-[10px] font-medium shrink-0 bg-amber-500/20 text-amber-500 border border-amber-500/30`,children:[(0,H.jsx)(d,{className:`size-2.5`}),e]}):(0,H.jsxs)(N,{children:[(0,H.jsx)(x,{asChild:!0,children:(0,H.jsxs)(`span`,{className:`inline-flex items-center rounded text-[10px] font-medium shrink-0 cursor-context-menu overflow-hidden`,style:{border:r?`1.5px solid ${i}`:`1px solid ${i}50`},children:[(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-0.5 px-1.5 py-0.5`,style:{backgroundColor:r?i:`${i}30`,color:r?`#fff`:i},children:[(0,H.jsx)(w,{className:`size-2.5`}),e]}),n.map(e=>(0,H.jsx)(`span`,{className:`px-1.5 py-0.5 italic opacity-70`,style:{borderLeft:`1px solid ${i}40`,color:i,backgroundColor:`${i}15`},children:e},e))]})}),(0,H.jsxs)(b,{children:[(0,H.jsx)(g,{onClick:()=>o(e),children:`Checkout`}),(0,H.jsxs)(g,{onClick:()=>s(e),disabled:e===a?.name,children:[(0,H.jsx)(F,{className:`size-3`}),`Merge into current`]}),(0,H.jsx)(M,{}),(0,H.jsxs)(g,{onClick:()=>c(e),children:[(0,H.jsx)(k,{className:`size-3`}),`Push`]}),(0,H.jsxs)(g,{onClick:()=>u(e),children:[(0,H.jsx)(l,{className:`size-3`}),`Create PR`]}),(0,H.jsx)(M,{}),(0,H.jsxs)(g,{variant:`destructive`,onClick:()=>f(e),disabled:e===a?.name,children:[(0,H.jsx)(y,{className:`size-3`}),`Delete`]})]})]})}function q({commit:e,lane:t,isSelected:n,isHead:r,labels:i,currentBranch:a,onSelect:o,onCheckout:c,onCherryPick:l,onRevert:u,onMerge:f,onDeleteBranch:p,onPushBranch:m,onCreatePr:h,onOpenCreateBranch:_,onOpenCreateTag:v,onOpenDiff:y,onCopyHash:S}){let C=L[t%L.length],T=i.filter(e=>e.type===`branch`),E=i.filter(e=>e.type===`tag`);return(0,H.jsxs)(N,{children:[(0,H.jsx)(x,{asChild:!0,children:(0,H.jsxs)(`tr`,{className:`hover:bg-muted/50 cursor-pointer border-b border-border/20 ${n?`bg-primary/10`:``} ${r?`font-medium`:``}`,style:{height:`24px`},onClick:o,children:[(0,H.jsx)(`td`,{className:`px-2 truncate max-w-0`,children:(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5 min-w-0`,children:[T.map(e=>(0,H.jsx)(K,{name:e.name,type:`branch`,remotes:e.remotes,isCurrent:e.current,color:C,currentBranch:a,onCheckout:c,onMerge:f,onPush:m,onCreatePr:h,onDelete:p},`branch-${e.name}`)),E.map(e=>(0,H.jsx)(K,{name:e.name,type:`tag`,remotes:[],isCurrent:!1,color:C,currentBranch:a,onCheckout:c,onMerge:f,onPush:m,onCreatePr:h,onDelete:p},`tag-${e.name}`)),(0,H.jsx)(`span`,{className:`truncate text-xs`,children:e.subject})]})}),(0,H.jsx)(`td`,{className:`px-2 text-xs text-muted-foreground whitespace-nowrap shrink-0`,children:R(e.authorDate)}),(0,H.jsx)(`td`,{className:`px-2 text-xs text-muted-foreground truncate max-w-[120px]`,children:e.authorName}),(0,H.jsx)(`td`,{className:`px-2 text-xs text-muted-foreground font-mono whitespace-nowrap`,children:e.abbreviatedHash})]})}),(0,H.jsxs)(b,{children:[(0,H.jsx)(g,{onClick:()=>c(e.hash),children:`Checkout`}),(0,H.jsxs)(g,{onClick:()=>_(e.hash),children:[(0,H.jsx)(w,{className:`size-3`}),`Create Branch...`]}),(0,H.jsx)(M,{}),(0,H.jsxs)(g,{onClick:()=>l(e.hash),children:[(0,H.jsx)(ee,{className:`size-3`}),`Cherry Pick`]}),(0,H.jsxs)(g,{onClick:()=>u(e.hash),children:[(0,H.jsx)(s,{className:`size-3`}),`Revert`]}),(0,H.jsxs)(g,{onClick:()=>v(e.hash),children:[(0,H.jsx)(d,{className:`size-3`}),`Create Tag...`]}),(0,H.jsx)(M,{}),(0,H.jsx)(g,{onClick:y,children:`View Diff`}),(0,H.jsxs)(g,{onClick:S,children:[(0,H.jsx)(A,{className:`size-3`}),`Copy Hash`]})]})]})}function J({commit:e,files:t,loadingDetail:n,projectName:r,onClose:i,copyHash:a}){let{openTab:s}=u();return(0,H.jsxs)(`div`,{className:`border-t bg-muted/30 max-h-[40%] overflow-auto`,children:[(0,H.jsxs)(`div`,{className:`px-3 py-2 border-b flex items-center justify-between`,children:[(0,H.jsxs)(`span`,{className:`text-sm font-medium truncate`,children:[e.abbreviatedHash,` — `,e.subject]}),(0,H.jsx)(o,{variant:`ghost`,size:`icon-xs`,onClick:i,children:`✕`})]}),(0,H.jsxs)(`div`,{className:`px-3 py-2 text-xs space-y-1`,children:[(0,H.jsxs)(`div`,{className:`flex gap-4`,children:[(0,H.jsx)(`span`,{className:`text-muted-foreground w-12 shrink-0`,children:`Author`}),(0,H.jsxs)(`span`,{children:[e.authorName,` <`,e.authorEmail,`>`]})]}),(0,H.jsxs)(`div`,{className:`flex gap-4`,children:[(0,H.jsx)(`span`,{className:`text-muted-foreground w-12 shrink-0`,children:`Date`}),(0,H.jsx)(`span`,{children:new Date(e.authorDate).toLocaleString()})]}),(0,H.jsxs)(`div`,{className:`flex gap-4`,children:[(0,H.jsx)(`span`,{className:`text-muted-foreground w-12 shrink-0`,children:`Hash`}),(0,H.jsx)(`span`,{className:`font-mono cursor-pointer hover:text-primary`,onClick:()=>a(e.hash),children:e.hash})]}),e.parents.length>0&&(0,H.jsxs)(`div`,{className:`flex gap-4`,children:[(0,H.jsx)(`span`,{className:`text-muted-foreground w-12 shrink-0`,children:`Parents`}),(0,H.jsx)(`span`,{className:`font-mono`,children:e.parents.map(e=>e.slice(0,7)).join(`, `)})]}),e.body&&(0,H.jsx)(`div`,{className:`mt-2 p-2 bg-background rounded text-xs whitespace-pre-wrap`,children:e.body})]}),(0,H.jsxs)(`div`,{className:`px-3 py-1 border-t`,children:[(0,H.jsx)(`div`,{className:`text-xs text-muted-foreground py-1`,children:n?`Loading files...`:`${t.length} file${t.length===1?``:`s`} changed`}),t.map(t=>(0,H.jsxs)(`div`,{className:`flex items-center gap-2 py-0.5 text-xs hover:bg-muted/50 rounded px-1 cursor-pointer`,onClick:()=>s({type:`git-diff`,title:`Diff ${f(t.path)}`,closable:!0,metadata:{projectName:r,ref1:e.parents[0]??void 0,ref2:e.hash,filePath:t.path},projectId:r}),children:[(0,H.jsx)(`span`,{className:`flex-1 truncate font-mono`,children:t.path}),t.additions>0&&(0,H.jsxs)(`span`,{className:`text-green-500`,children:[`+`,t.additions]}),t.deletions>0&&(0,H.jsxs)(`span`,{className:`text-red-500`,children:[`-`,t.deletions]})]},t.path))]})]})}function Y({type:e,hash:t,onClose:n,onCreateBranch:r,onCreateTag:i}){let[a,s]=(0,I.useState)(``),l=()=>{a.trim()&&(e===`branch`?r(a.trim(),t):i(a.trim(),t),n())};return(0,H.jsx)(O,{open:e!==null,onOpenChange:e=>{e||n()},children:(0,H.jsxs)(D,{children:[(0,H.jsx)(P,{children:(0,H.jsx)(E,{children:e===`branch`?`Create Branch`:`Create Tag`})}),(0,H.jsx)(c,{placeholder:e===`branch`?`Branch name`:`Tag name`,value:a,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&l()},autoFocus:!0}),(0,H.jsxs)(j,{children:[(0,H.jsx)(o,{variant:`outline`,onClick:n,children:`Cancel`}),(0,H.jsx)(o,{disabled:!a.trim(),onClick:l,children:`Create`})]})]})})}function X({open:e,onClose:t,projectName:n,branches:r}){let i=r.filter(e=>!e.remote),a=r.filter(e=>e.remote),o=new Map;for(let e of a){let t=e.name.replace(/^remotes\//,``),n=t.indexOf(`/`);if(n<0)continue;let r=t.slice(0,n),i=t.slice(n+1),a=o.get(r)??[];a.push(i),o.set(r,a)}return(0,H.jsx)(O,{open:e,onOpenChange:e=>{e||t()},children:(0,H.jsxs)(D,{className:`max-w-md`,children:[(0,H.jsx)(P,{children:(0,H.jsx)(E,{children:`Repository Settings`})}),(0,H.jsxs)(`div`,{className:`space-y-4 text-sm`,children:[(0,H.jsxs)(Z,{title:`General`,children:[(0,H.jsx)(Q,{label:`Name`,value:n}),(0,H.jsx)(Q,{label:`Branches`,value:`${i.length} local, ${a.length} remote`})]}),(0,H.jsx)(Z,{title:`Local Branches`,children:i.map(e=>(0,H.jsxs)(`div`,{className:`flex items-center gap-2 py-0.5`,children:[(0,H.jsx)(`span`,{className:`text-xs ${e.current?`font-semibold text-primary`:`text-foreground`}`,children:e.name}),e.current&&(0,H.jsx)(`span`,{className:`text-[10px] text-muted-foreground italic`,children:`HEAD`}),e.remotes.length>0&&(0,H.jsxs)(`span`,{className:`text-[10px] text-muted-foreground`,children:[`(`,e.remotes.join(`, `),`)`]})]},e.name))}),(0,H.jsxs)(Z,{title:`Remotes`,children:[[...o.entries()].map(([e,t])=>(0,H.jsxs)(`div`,{className:`py-0.5`,children:[(0,H.jsx)(`span`,{className:`text-xs font-medium`,children:e}),(0,H.jsxs)(`span`,{className:`text-[10px] text-muted-foreground ml-2`,children:[t.length,` branch`,t.length===1?``:`es`]})]},e)),o.size===0&&(0,H.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`No remotes configured`})]})]})]})})}function Z({title:e,children:t}){return(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h4`,{className:`text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-1.5`,children:e}),(0,H.jsx)(`div`,{className:`pl-1`,children:t})]})}function Q({label:e,value:t}){return(0,H.jsxs)(`div`,{className:`flex items-center gap-3 py-0.5`,children:[(0,H.jsx)(`span`,{className:`text-xs text-muted-foreground w-16 shrink-0`,children:e}),(0,H.jsx)(`span`,{className:`text-xs`,children:t})]})}function $({metadata:e}){let t=e?.projectName,n=B(t),[r,i]=(0,I.useState)({type:null}),[a,o]=(0,I.useState)(!1),s=(typeof window<`u`&&window.innerWidth<768?6:10)*16+16,[c,l]=(0,I.useState)(s),u=(0,I.useRef)(s);u.current=c;let d=(0,I.useRef)(!1),f=e=>{d.current=!0;let t=u.current,n=n=>{if(!d.current)return;let r=`touches`in n?n.touches[0].clientX:n.clientX;l(Math.max(40,t+r-e))},r=()=>{d.current=!1,window.removeEventListener(`mousemove`,n),window.removeEventListener(`mouseup`,r),window.removeEventListener(`touchmove`,n),window.removeEventListener(`touchend`,r)};window.addEventListener(`mousemove`,n),window.addEventListener(`mouseup`,r),window.addEventListener(`touchmove`,n,{passive:!1}),window.addEventListener(`touchend`,r)},{widths:p,startResize:m}=V({date:80,author:120,commit:70}),h=(0,I.useRef)(n.loadMore);h.current=n.loadMore;let g=(0,I.useCallback)(e=>{let t=e.currentTarget;t.scrollHeight-t.scrollTop-t.clientHeight<200&&h.current()},[]);return t?n.loading&&!n.data?(0,H.jsx)(oe,{}):n.error&&!n.data?(0,H.jsx)(se,{error:n.error,onRetry:n.fetchGraph}):(0,H.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,H.jsx)(U,{branches:n.data?.branches??[],branchFilter:n.branchFilter,onBranchFilterChange:n.setBranchFilter,searchQuery:n.searchQuery,onSearchQueryChange:n.setSearchQuery,showSearch:n.showSearch,onToggleSearch:()=>n.setShowSearch(!n.showSearch),onFetch:n.fetchFromRemotes,onRefresh:n.fetchGraph,onOpenSettings:()=>o(!0),loading:n.loading,acting:n.acting,projectName:t}),n.error&&(0,H.jsx)(`div`,{className:`px-3 py-1.5 text-xs text-destructive bg-destructive/10`,children:n.error}),(0,H.jsx)(`div`,{className:`flex-1 overflow-auto`,onScroll:g,children:(0,H.jsxs)(`div`,{className:`flex min-w-max md:min-w-0`,children:[(0,H.jsxs)(`div`,{className:`sticky left-0 z-10 shrink-0 bg-background relative overflow-hidden`,style:{width:`${c}px`},children:[(0,H.jsx)(`div`,{className:`text-[11px] font-semibold text-muted-foreground px-2 border-b bg-background sticky top-0 z-20`,style:{height:`24px`,lineHeight:`24px`},children:`Graph`}),(0,H.jsx)(G,{commits:n.filteredCommits,laneMap:n.filteredLanes.laneMap,svgPaths:n.svgPaths,width:(n.filteredLanes.maxLane+2)*16,height:n.svgHeight,headHash:n.headHash}),(0,H.jsx)(`div`,{className:`absolute top-0 right-0 w-1.5 h-full cursor-col-resize hover:bg-primary/30`,onMouseDown:e=>{e.preventDefault(),f(e.clientX)},onTouchStart:e=>f(e.touches[0].clientX)})]}),(0,H.jsxs)(`div`,{className:`flex-1 min-w-[400px]`,children:[(0,H.jsxs)(`table`,{className:`w-full border-collapse text-xs`,style:{tableLayout:`fixed`},children:[(0,H.jsxs)(`colgroup`,{children:[(0,H.jsx)(`col`,{}),(0,H.jsx)(`col`,{style:{width:`${p.date}px`}}),(0,H.jsx)(`col`,{style:{width:`${p.author}px`}}),(0,H.jsx)(`col`,{style:{width:`${p.commit}px`}})]}),(0,H.jsx)(`thead`,{className:`sticky top-0 z-10 bg-background`,children:(0,H.jsxs)(`tr`,{className:`border-b text-[11px] font-semibold text-muted-foreground`,style:{height:`24px`},children:[(0,H.jsx)(`th`,{className:`text-left px-2 font-semibold`,children:`Description`}),(0,H.jsx)(ie,{label:`Date`,colKey:`date`,onStartResize:m}),(0,H.jsx)(ie,{label:`Author`,colKey:`author`,onStartResize:m}),(0,H.jsx)(`th`,{className:`text-left px-2 font-semibold`,children:`Commit`})]})}),(0,H.jsx)(`tbody`,{children:n.filteredCommits.map(e=>(0,H.jsx)(q,{commit:e,lane:n.filteredLanes.laneMap.get(e.hash)??0,isSelected:n.selectedCommit?.hash===e.hash,isHead:e.hash===n.headHash,labels:n.commitLabels.get(e.hash)??[],currentBranch:n.currentBranch,onSelect:()=>n.selectCommit(e),onCheckout:n.handleCheckout,onCherryPick:n.handleCherryPick,onRevert:n.handleRevert,onMerge:n.handleMerge,onDeleteBranch:n.handleDeleteBranch,onPushBranch:n.handlePushBranch,onCreatePr:n.handleCreatePr,onOpenCreateBranch:e=>i({type:`branch`,hash:e}),onOpenCreateTag:e=>i({type:`tag`,hash:e}),onOpenDiff:()=>n.openDiffForCommit(e),onCopyHash:()=>n.copyHash(e.hash)},e.hash))})]}),n.loadingMore&&(0,H.jsxs)(`div`,{className:`flex items-center justify-center gap-2 py-3 text-xs text-muted-foreground`,children:[(0,H.jsx)(C,{className:`size-3.5 animate-spin`}),` Loading more commits...`]}),!n.hasMore&&n.data&&n.data.commits.length>0&&(0,H.jsxs)(`div`,{className:`text-center py-2 text-xs text-muted-foreground`,children:[n.data.commits.length,` commits loaded`]})]})]})}),n.selectedCommit&&t&&(0,H.jsx)(J,{commit:n.selectedCommit,files:n.commitFiles,loadingDetail:n.loadingDetail,projectName:t,onClose:()=>n.setSelectedCommit(null),copyHash:n.copyHash}),(0,H.jsx)(Y,{type:r.type,hash:r.hash,onClose:()=>i({type:null}),onCreateBranch:n.handleCreateBranch,onCreateTag:n.handleCreateTag}),(0,H.jsx)(X,{open:a,onClose:()=>o(!1),projectName:t,branches:n.data?.branches??[]})]}):(0,H.jsx)(ae,{msg:`No project selected.`})}function ie({label:e,colKey:t,onStartResize:n}){return(0,H.jsxs)(`th`,{className:`text-left px-2 font-semibold relative`,children:[e,(0,H.jsx)(`div`,{className:`absolute top-0 right-0 w-1.5 h-full cursor-col-resize hover:bg-primary/30`,onMouseDown:e=>{e.preventDefault(),n(t,e.clientX)},onTouchStart:e=>n(t,e.touches[0].clientX)})]})}function ae({msg:e}){return(0,H.jsx)(`div`,{className:`flex items-center justify-center h-full text-muted-foreground text-sm`,children:e})}function oe(){return(0,H.jsxs)(`div`,{className:`flex items-center justify-center h-full gap-2 text-muted-foreground`,children:[(0,H.jsx)(C,{className:`size-5 animate-spin`}),(0,H.jsx)(`span`,{className:`text-sm`,children:`Loading git graph...`})]})}function se({error:e,onRetry:t}){return(0,H.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full gap-2 text-destructive text-sm`,children:[(0,H.jsx)(`p`,{children:e}),(0,H.jsx)(o,{variant:`outline`,size:`sm`,onClick:t,children:`Retry`})]})}export{$ as GitGraph};
@@ -0,0 +1 @@
1
+ import"./chunk-XZSTWKYB-DTNisBJo.js";import{n as e}from"./chunk-7E7YKBS2-B3LDS0kJ.js";export{e as createGitGraphServices};
@@ -1,4 +1,4 @@
1
- import"./chunk-XZSTWKYB-BYxFzZwS.js";import{h as e,p as t,r as n}from"./chunk-GEFDOKGD-DwVPiYfW.js";import"./chunk-R5LLSJPH-euR2RxLN.js";import"./chunk-7E7YKBS2-6xAQfBwa.js";import"./chunk-EGIJ26TM-D0KJTa_T.js";import"./chunk-C72U2L5F-DOtEiN5f.js";import"./chunk-XIRO2GV7-kqQ0g6wW.js";import"./chunk-L3YUKLVL-3wBgkSvL.js";import"./chunk-OZEHJAEY-YTn24bGg.js";import{g as r,h as i,p as a}from"./src-BoSBNdA_.js";import{B as o,C as s,V as c,W as l,_ as u,a as d,d as f,q as ee,s as p,v as te,y as m}from"./chunk-7R4GIKGN-DXaGAn_K.js";import"./dist-Cce3efmT.js";import{t as h}from"./chunk-4BX2VUAB-BptTlTyl.js";import{t as g}from"./mermaid-parser.core-BKiGOTjR.js";import{t as ne}from"./chunk-QZHKN3VN-DwSXwtjH.js";var _={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},re=f.gitGraph,v=i(()=>n({...re,...m().gitGraph}),`getConfig`),y=new ne(()=>{let e=v(),t=e.mainBranchName,n=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:n}]]),branches:new Map([[t,null]]),currBranch:t,direction:`LR`,seq:0,options:{}}});function b(){return t({length:7})}i(b,`getID`);function x(e,t){let n=Object.create(null);return e.reduce((e,r)=>{let i=t(r);return n[i]||(n[i]=!0,e.push(r)),e},[])}i(x,`uniqBy`);var S=i(function(e){y.records.direction=e},`setDirection`),C=i(function(e){r.debug(`options str`,e),e=e?.trim(),e||=`{}`;try{y.records.options=JSON.parse(e)}catch(e){r.error(`error while parsing gitGraph options`,e.message)}},`setOptions`),ie=i(function(){return y.records.options},`getOptions`),ae=i(function(e){let t=e.msg,n=e.id,i=e.type,a=e.tags;r.info(`commit`,t,n,i,a),r.debug(`Entering commit:`,t,n,i,a);let o=v();n=p.sanitizeText(n,o),t=p.sanitizeText(t,o),a=a?.map(e=>p.sanitizeText(e,o));let s={id:n||y.records.seq+`-`+b(),message:t,seq:y.records.seq++,type:i??_.NORMAL,tags:a??[],parents:y.records.head==null?[]:[y.records.head.id],branch:y.records.currBranch};y.records.head=s,r.info(`main branch`,o.mainBranchName),y.records.commits.has(s.id)&&r.warn(`Commit ID ${s.id} already exists`),y.records.commits.set(s.id,s),y.records.branches.set(y.records.currBranch,s.id),r.debug(`in pushCommit `+s.id)},`commit`),oe=i(function(e){let t=e.name,n=e.order;if(t=p.sanitizeText(t,v()),y.records.branches.has(t))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);y.records.branches.set(t,y.records.head==null?null:y.records.head.id),y.records.branchConfig.set(t,{name:t,order:n}),w(t),r.debug(`in createBranch`)},`branch`),se=i(e=>{let t=e.branch,n=e.id,i=e.type,a=e.tags,o=v();t=p.sanitizeText(t,o),n&&=p.sanitizeText(n,o);let s=y.records.branches.get(y.records.currBranch),c=y.records.branches.get(t),l=s?y.records.commits.get(s):void 0,u=c?y.records.commits.get(c):void 0;if(l&&u&&l.branch===t)throw Error(`Cannot merge branch '${t}' into itself.`);if(y.records.currBranch===t){let e=Error(`Incorrect usage of "merge". Cannot merge a branch to itself`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(l===void 0||!l){let e=Error(`Incorrect usage of "merge". Current branch (${y.records.currBranch})has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`commit`]},e}if(!y.records.branches.has(t)){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) does not exist`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},e}if(u===void 0||!u){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`"commit"`]},e}if(l===u){let e=Error(`Incorrect usage of "merge". Both branches have same head`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(n&&y.records.commits.has(n)){let e=Error(`Incorrect usage of "merge". Commit with id:`+n+` already exists, use different custom id`);throw e.hash={text:`merge ${t} ${n} ${i} ${a?.join(` `)}`,token:`merge ${t} ${n} ${i} ${a?.join(` `)}`,expected:[`merge ${t} ${n}_UNIQUE ${i} ${a?.join(` `)}`]},e}let d=c||``,f={id:n||`${y.records.seq}-${b()}`,message:`merged branch ${t} into ${y.records.currBranch}`,seq:y.records.seq++,parents:y.records.head==null?[]:[y.records.head.id,d],branch:y.records.currBranch,type:_.MERGE,customType:i,customId:!!n,tags:a??[]};y.records.head=f,y.records.commits.set(f.id,f),y.records.branches.set(y.records.currBranch,f.id),r.debug(y.records.branches),r.debug(`in mergeBranch`)},`merge`),ce=i(function(e){let t=e.id,n=e.targetId,i=e.tags,a=e.parent;r.debug(`Entering cherryPick:`,t,n,i);let o=v();if(t=p.sanitizeText(t,o),n=p.sanitizeText(n,o),i=i?.map(e=>p.sanitizeText(e,o)),a=p.sanitizeText(a,o),!t||!y.records.commits.has(t)){let e=Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let s=y.records.commits.get(t);if(s===void 0||!s)throw Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);if(a&&!(Array.isArray(s.parents)&&s.parents.includes(a)))throw Error(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`);let c=s.branch;if(s.type===_.MERGE&&!a)throw Error(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`);if(!n||!y.records.commits.has(n)){if(c===y.records.currBranch){let e=Error(`Incorrect usage of "cherryPick". Source commit is already on current branch`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let e=y.records.branches.get(y.records.currBranch);if(e===void 0||!e){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${y.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let o=y.records.commits.get(e);if(o===void 0||!o){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${y.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let l={id:y.records.seq+`-`+b(),message:`cherry-picked ${s?.message} into ${y.records.currBranch}`,seq:y.records.seq++,parents:y.records.head==null?[]:[y.records.head.id,s.id],branch:y.records.currBranch,type:_.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${s.id}${s.type===_.MERGE?`|parent:${a}`:``}`]};y.records.head=l,y.records.commits.set(l.id,l),y.records.branches.set(y.records.currBranch,l.id),r.debug(y.records.branches),r.debug(`in cherryPick`)}},`cherryPick`),w=i(function(e){if(e=p.sanitizeText(e,v()),y.records.branches.has(e)){y.records.currBranch=e;let t=y.records.branches.get(y.records.currBranch);t===void 0||!t?y.records.head=null:y.records.head=y.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},`checkout`);function T(e,t,n){let r=e.indexOf(t);r===-1?e.push(n):e.splice(r,1,n)}i(T,`upsert`);function E(e){let t=e.reduce((e,t)=>e.seq>t.seq?e:t,e[0]),n=``;e.forEach(function(e){e===t?n+=` *`:n+=` |`});let i=[n,t.id,t.seq];for(let e in y.records.branches)y.records.branches.get(e)===t.id&&i.push(e);if(r.debug(i.join(` `)),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let n=y.records.commits.get(t.parents[0]);T(e,t,n),t.parents[1]&&e.push(y.records.commits.get(t.parents[1]))}else if(t.parents.length==0)return;else if(t.parents[0]){let n=y.records.commits.get(t.parents[0]);T(e,t,n)}e=x(e,e=>e.id),E(e)}i(E,`prettyPrintCommitHistory`);var le=i(function(){r.debug(y.records.commits);let e=D()[0];E([e])},`prettyPrint`),ue=i(function(){y.reset(),d()},`clear`),de=i(function(){return[...y.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},`getBranchesAsObjArray`),fe=i(function(){return y.records.branches},`getBranches`),pe=i(function(){return y.records.commits},`getCommits`),D=i(function(){let e=[...y.records.commits.values()];return e.forEach(function(e){r.debug(e.id)}),e.sort((e,t)=>e.seq-t.seq),e},`getCommitsArray`),O={commitType:_,getConfig:v,setDirection:S,setOptions:C,getOptions:ie,commit:ae,branch:oe,merge:se,cherryPick:ce,checkout:w,prettyPrint:le,clear:ue,getBranchesAsObjArray:de,getBranches:fe,getCommits:pe,getCommitsArray:D,getCurrentBranch:i(function(){return y.records.currBranch},`getCurrentBranch`),getDirection:i(function(){return y.records.direction},`getDirection`),getHead:i(function(){return y.records.head},`getHead`),setAccTitle:c,getAccTitle:te,getAccDescription:u,setAccDescription:o,setDiagramTitle:l,getDiagramTitle:s},k=i((e,t)=>{h(e,t),e.dir&&t.setDirection(e.dir);for(let n of e.statements)A(n,t)},`populate`),A=i((e,t)=>{let n={Commit:i(e=>t.commit(j(e)),`Commit`),Branch:i(e=>t.branch(M(e)),`Branch`),Merge:i(e=>t.merge(N(e)),`Merge`),Checkout:i(e=>t.checkout(P(e)),`Checkout`),CherryPicking:i(e=>t.cherryPick(F(e)),`CherryPicking`)}[e.$type];n?n(e):r.error(`Unknown statement type: ${e.$type}`)},`parseStatement`),j=i(e=>({id:e.id,msg:e.message??``,type:e.type===void 0?_.NORMAL:_[e.type],tags:e.tags??void 0}),`parseCommit`),M=i(e=>({name:e.name,order:e.order??0}),`parseBranch`),N=i(e=>({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:_[e.type],tags:e.tags??void 0}),`parseMerge`),P=i(e=>e.branch,`parseCheckout`),F=i(e=>({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),`parseCherryPicking`),I={parse:i(async e=>{let t=await g(`gitGraph`,e);r.debug(t),k(t,O)},`parse`)},L=10,R=40,z=4,B=2,V=8,H=new Map,U=new Map,W=30,G=new Map,K=[],q=0,J=`LR`,me=i(()=>{H.clear(),U.clear(),G.clear(),q=0,K=[],J=`LR`},`clear`),Y=i(e=>{let t=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);return(typeof e==`string`?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(e=>{let n=document.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);n.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`),n.setAttribute(`dy`,`1em`),n.setAttribute(`x`,`0`),n.setAttribute(`class`,`row`),n.textContent=e.trim(),t.appendChild(n)}),t},`drawText`),X=i(e=>{let t,n,r;return J===`BT`?(n=i((e,t)=>e<=t,`comparisonFunc`),r=1/0):(n=i((e,t)=>e>=t,`comparisonFunc`),r=0),e.forEach(e=>{let i=J===`TB`||J==`BT`?U.get(e)?.y:U.get(e)?.x;i!==void 0&&n(i,r)&&(t=e,r=i)}),t},`findClosestParent`),he=i(e=>{let t=``,n=1/0;return e.forEach(e=>{let r=U.get(e).y;r<=n&&(t=e,n=r)}),t||void 0},`findClosestParentBT`),ge=i((e,t,n)=>{let r=n,i=n,a=[];e.forEach(e=>{let n=t.get(e);if(!n)throw Error(`Commit not found for key ${e}`);n.parents.length?(r=ve(n),i=Math.max(r,i)):a.push(n),ye(n,r)}),r=i,a.forEach(e=>{be(e,r,n)}),e.forEach(e=>{let n=t.get(e);if(n?.parents.length){let e=he(n.parents);r=U.get(e).y-R,r<=i&&(i=r);let t=H.get(n.branch).pos,a=r-L;U.set(n.id,{x:t,y:a})}})},`setParallelBTPos`),_e=i(e=>{let t=X(e.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${e.id}`);let n=U.get(t)?.y;if(n===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return n},`findClosestParentPos`),ve=i(e=>_e(e)+R,`calculateCommitPosition`),ye=i((e,t)=>{let n=H.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let r=n.pos,i=t+L;return U.set(e.id,{x:r,y:i}),{x:r,y:i}},`setCommitPosition`),be=i((e,t,n)=>{let r=H.get(e.branch);if(!r)throw Error(`Branch not found for commit ${e.id}`);let i=t+n,a=r.pos;U.set(e.id,{x:a,y:i})},`setRootPosition`),xe=i((e,t,n,r,i,a)=>{if(a===_.HIGHLIGHT)e.append(`rect`).attr(`x`,n.x-10).attr(`y`,n.y-10).attr(`width`,20).attr(`height`,20).attr(`class`,`commit ${t.id} commit-highlight${i%V} ${r}-outer`),e.append(`rect`).attr(`x`,n.x-6).attr(`y`,n.y-6).attr(`width`,12).attr(`height`,12).attr(`class`,`commit ${t.id} commit${i%V} ${r}-inner`);else if(a===_.CHERRY_PICK)e.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,10).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x-3).attr(`cy`,n.y+2).attr(`r`,2.75).attr(`fill`,`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x+3).attr(`cy`,n.y+2).attr(`r`,2.75).attr(`fill`,`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x+3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x-3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,`#fff`).attr(`class`,`commit ${t.id} ${r}`);else{let o=e.append(`circle`);if(o.attr(`cx`,n.x),o.attr(`cy`,n.y),o.attr(`r`,t.type===_.MERGE?9:10),o.attr(`class`,`commit ${t.id} commit${i%V}`),a===_.MERGE){let a=e.append(`circle`);a.attr(`cx`,n.x),a.attr(`cy`,n.y),a.attr(`r`,6),a.attr(`class`,`commit ${r} ${t.id} commit${i%V}`)}a===_.REVERSE&&e.append(`path`).attr(`d`,`M ${n.x-5},${n.y-5}L${n.x+5},${n.y+5}M${n.x-5},${n.y+5}L${n.x+5},${n.y-5}`).attr(`class`,`commit ${r} ${t.id} commit${i%V}`)}},`drawCommitBullet`),Se=i((e,t,n,r,i)=>{if(t.type!==_.CHERRY_PICK&&(t.customId&&t.type===_.MERGE||t.type!==_.MERGE)&&i.showCommitLabel){let a=e.append(`g`),o=a.insert(`rect`).attr(`class`,`commit-label-bkg`),s=a.append(`text`).attr(`x`,r).attr(`y`,n.y+25).attr(`class`,`commit-label`).text(t.id),c=s.node()?.getBBox();if(c&&(o.attr(`x`,n.posWithOffset-c.width/2-B).attr(`y`,n.y+13.5).attr(`width`,c.width+2*B).attr(`height`,c.height+2*B),J===`TB`||J===`BT`?(o.attr(`x`,n.x-(c.width+4*z+5)).attr(`y`,n.y-12),s.attr(`x`,n.x-(c.width+4*z)).attr(`y`,n.y+c.height-12)):s.attr(`x`,n.posWithOffset-c.width/2),i.rotateCommitLabel))if(J===`TB`||J===`BT`)s.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`),o.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`);else{let e=-7.5-(c.width+10)/25*9.5,t=10+c.width/25*8.5;a.attr(`transform`,`translate(`+e+`, `+t+`) rotate(-45, `+r+`, `+n.y+`)`)}}},`drawCommitLabel`),Z=i((e,t,n,r)=>{if(t.tags.length>0){let i=0,a=0,o=0,s=[];for(let r of t.tags.reverse()){let t=e.insert(`polygon`),c=e.append(`circle`),l=e.append(`text`).attr(`y`,n.y-16-i).attr(`class`,`tag-label`).text(r),u=l.node()?.getBBox();if(!u)throw Error(`Tag bbox not found`);a=Math.max(a,u.width),o=Math.max(o,u.height),l.attr(`x`,n.posWithOffset-u.width/2),s.push({tag:l,hole:c,rect:t,yOffset:i}),i+=20}for(let{tag:e,hole:t,rect:i,yOffset:c}of s){let s=o/2,l=n.y-19.2-c;if(i.attr(`class`,`tag-label-bkg`).attr(`points`,`
1
+ import"./chunk-XZSTWKYB-DTNisBJo.js";import{h as e,p as t,r as n}from"./chunk-GEFDOKGD-_UEQ_Hqk.js";import"./chunk-R5LLSJPH-BTcrDJ0u.js";import"./chunk-7E7YKBS2-B3LDS0kJ.js";import"./chunk-EGIJ26TM-BATHdF9E.js";import"./chunk-C72U2L5F-0CMBXF9Y.js";import"./chunk-XIRO2GV7-BojyzPX8.js";import"./chunk-L3YUKLVL-GJ3l4AXc.js";import"./chunk-OZEHJAEY-CxBlPGUC.js";import{g as r,h as i,p as a}from"./src-BYKCXnff.js";import{B as o,C as s,V as c,W as l,_ as u,a as d,d as f,q as ee,s as p,v as te,y as m}from"./chunk-7R4GIKGN-Y5Bg-bKJ.js";import"./dist-CBQJF0q0.js";import{t as h}from"./chunk-4BX2VUAB-BNc3BCto.js";import{t as g}from"./mermaid-parser.core-C3bmPvHW.js";import{t as ne}from"./chunk-QZHKN3VN-CzG4AaJv.js";var _={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},re=f.gitGraph,v=i(()=>n({...re,...m().gitGraph}),`getConfig`),y=new ne(()=>{let e=v(),t=e.mainBranchName,n=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:n}]]),branches:new Map([[t,null]]),currBranch:t,direction:`LR`,seq:0,options:{}}});function b(){return t({length:7})}i(b,`getID`);function x(e,t){let n=Object.create(null);return e.reduce((e,r)=>{let i=t(r);return n[i]||(n[i]=!0,e.push(r)),e},[])}i(x,`uniqBy`);var S=i(function(e){y.records.direction=e},`setDirection`),C=i(function(e){r.debug(`options str`,e),e=e?.trim(),e||=`{}`;try{y.records.options=JSON.parse(e)}catch(e){r.error(`error while parsing gitGraph options`,e.message)}},`setOptions`),ie=i(function(){return y.records.options},`getOptions`),ae=i(function(e){let t=e.msg,n=e.id,i=e.type,a=e.tags;r.info(`commit`,t,n,i,a),r.debug(`Entering commit:`,t,n,i,a);let o=v();n=p.sanitizeText(n,o),t=p.sanitizeText(t,o),a=a?.map(e=>p.sanitizeText(e,o));let s={id:n||y.records.seq+`-`+b(),message:t,seq:y.records.seq++,type:i??_.NORMAL,tags:a??[],parents:y.records.head==null?[]:[y.records.head.id],branch:y.records.currBranch};y.records.head=s,r.info(`main branch`,o.mainBranchName),y.records.commits.has(s.id)&&r.warn(`Commit ID ${s.id} already exists`),y.records.commits.set(s.id,s),y.records.branches.set(y.records.currBranch,s.id),r.debug(`in pushCommit `+s.id)},`commit`),oe=i(function(e){let t=e.name,n=e.order;if(t=p.sanitizeText(t,v()),y.records.branches.has(t))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);y.records.branches.set(t,y.records.head==null?null:y.records.head.id),y.records.branchConfig.set(t,{name:t,order:n}),w(t),r.debug(`in createBranch`)},`branch`),se=i(e=>{let t=e.branch,n=e.id,i=e.type,a=e.tags,o=v();t=p.sanitizeText(t,o),n&&=p.sanitizeText(n,o);let s=y.records.branches.get(y.records.currBranch),c=y.records.branches.get(t),l=s?y.records.commits.get(s):void 0,u=c?y.records.commits.get(c):void 0;if(l&&u&&l.branch===t)throw Error(`Cannot merge branch '${t}' into itself.`);if(y.records.currBranch===t){let e=Error(`Incorrect usage of "merge". Cannot merge a branch to itself`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(l===void 0||!l){let e=Error(`Incorrect usage of "merge". Current branch (${y.records.currBranch})has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`commit`]},e}if(!y.records.branches.has(t)){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) does not exist`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},e}if(u===void 0||!u){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`"commit"`]},e}if(l===u){let e=Error(`Incorrect usage of "merge". Both branches have same head`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(n&&y.records.commits.has(n)){let e=Error(`Incorrect usage of "merge". Commit with id:`+n+` already exists, use different custom id`);throw e.hash={text:`merge ${t} ${n} ${i} ${a?.join(` `)}`,token:`merge ${t} ${n} ${i} ${a?.join(` `)}`,expected:[`merge ${t} ${n}_UNIQUE ${i} ${a?.join(` `)}`]},e}let d=c||``,f={id:n||`${y.records.seq}-${b()}`,message:`merged branch ${t} into ${y.records.currBranch}`,seq:y.records.seq++,parents:y.records.head==null?[]:[y.records.head.id,d],branch:y.records.currBranch,type:_.MERGE,customType:i,customId:!!n,tags:a??[]};y.records.head=f,y.records.commits.set(f.id,f),y.records.branches.set(y.records.currBranch,f.id),r.debug(y.records.branches),r.debug(`in mergeBranch`)},`merge`),ce=i(function(e){let t=e.id,n=e.targetId,i=e.tags,a=e.parent;r.debug(`Entering cherryPick:`,t,n,i);let o=v();if(t=p.sanitizeText(t,o),n=p.sanitizeText(n,o),i=i?.map(e=>p.sanitizeText(e,o)),a=p.sanitizeText(a,o),!t||!y.records.commits.has(t)){let e=Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let s=y.records.commits.get(t);if(s===void 0||!s)throw Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);if(a&&!(Array.isArray(s.parents)&&s.parents.includes(a)))throw Error(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`);let c=s.branch;if(s.type===_.MERGE&&!a)throw Error(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`);if(!n||!y.records.commits.has(n)){if(c===y.records.currBranch){let e=Error(`Incorrect usage of "cherryPick". Source commit is already on current branch`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let e=y.records.branches.get(y.records.currBranch);if(e===void 0||!e){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${y.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let o=y.records.commits.get(e);if(o===void 0||!o){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${y.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let l={id:y.records.seq+`-`+b(),message:`cherry-picked ${s?.message} into ${y.records.currBranch}`,seq:y.records.seq++,parents:y.records.head==null?[]:[y.records.head.id,s.id],branch:y.records.currBranch,type:_.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${s.id}${s.type===_.MERGE?`|parent:${a}`:``}`]};y.records.head=l,y.records.commits.set(l.id,l),y.records.branches.set(y.records.currBranch,l.id),r.debug(y.records.branches),r.debug(`in cherryPick`)}},`cherryPick`),w=i(function(e){if(e=p.sanitizeText(e,v()),y.records.branches.has(e)){y.records.currBranch=e;let t=y.records.branches.get(y.records.currBranch);t===void 0||!t?y.records.head=null:y.records.head=y.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},`checkout`);function T(e,t,n){let r=e.indexOf(t);r===-1?e.push(n):e.splice(r,1,n)}i(T,`upsert`);function E(e){let t=e.reduce((e,t)=>e.seq>t.seq?e:t,e[0]),n=``;e.forEach(function(e){e===t?n+=` *`:n+=` |`});let i=[n,t.id,t.seq];for(let e in y.records.branches)y.records.branches.get(e)===t.id&&i.push(e);if(r.debug(i.join(` `)),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let n=y.records.commits.get(t.parents[0]);T(e,t,n),t.parents[1]&&e.push(y.records.commits.get(t.parents[1]))}else if(t.parents.length==0)return;else if(t.parents[0]){let n=y.records.commits.get(t.parents[0]);T(e,t,n)}e=x(e,e=>e.id),E(e)}i(E,`prettyPrintCommitHistory`);var le=i(function(){r.debug(y.records.commits);let e=D()[0];E([e])},`prettyPrint`),ue=i(function(){y.reset(),d()},`clear`),de=i(function(){return[...y.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},`getBranchesAsObjArray`),fe=i(function(){return y.records.branches},`getBranches`),pe=i(function(){return y.records.commits},`getCommits`),D=i(function(){let e=[...y.records.commits.values()];return e.forEach(function(e){r.debug(e.id)}),e.sort((e,t)=>e.seq-t.seq),e},`getCommitsArray`),O={commitType:_,getConfig:v,setDirection:S,setOptions:C,getOptions:ie,commit:ae,branch:oe,merge:se,cherryPick:ce,checkout:w,prettyPrint:le,clear:ue,getBranchesAsObjArray:de,getBranches:fe,getCommits:pe,getCommitsArray:D,getCurrentBranch:i(function(){return y.records.currBranch},`getCurrentBranch`),getDirection:i(function(){return y.records.direction},`getDirection`),getHead:i(function(){return y.records.head},`getHead`),setAccTitle:c,getAccTitle:te,getAccDescription:u,setAccDescription:o,setDiagramTitle:l,getDiagramTitle:s},k=i((e,t)=>{h(e,t),e.dir&&t.setDirection(e.dir);for(let n of e.statements)A(n,t)},`populate`),A=i((e,t)=>{let n={Commit:i(e=>t.commit(j(e)),`Commit`),Branch:i(e=>t.branch(M(e)),`Branch`),Merge:i(e=>t.merge(N(e)),`Merge`),Checkout:i(e=>t.checkout(P(e)),`Checkout`),CherryPicking:i(e=>t.cherryPick(F(e)),`CherryPicking`)}[e.$type];n?n(e):r.error(`Unknown statement type: ${e.$type}`)},`parseStatement`),j=i(e=>({id:e.id,msg:e.message??``,type:e.type===void 0?_.NORMAL:_[e.type],tags:e.tags??void 0}),`parseCommit`),M=i(e=>({name:e.name,order:e.order??0}),`parseBranch`),N=i(e=>({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:_[e.type],tags:e.tags??void 0}),`parseMerge`),P=i(e=>e.branch,`parseCheckout`),F=i(e=>({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),`parseCherryPicking`),I={parse:i(async e=>{let t=await g(`gitGraph`,e);r.debug(t),k(t,O)},`parse`)},L=10,R=40,z=4,B=2,V=8,H=new Map,U=new Map,W=30,G=new Map,K=[],q=0,J=`LR`,me=i(()=>{H.clear(),U.clear(),G.clear(),q=0,K=[],J=`LR`},`clear`),Y=i(e=>{let t=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);return(typeof e==`string`?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(e=>{let n=document.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);n.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`),n.setAttribute(`dy`,`1em`),n.setAttribute(`x`,`0`),n.setAttribute(`class`,`row`),n.textContent=e.trim(),t.appendChild(n)}),t},`drawText`),X=i(e=>{let t,n,r;return J===`BT`?(n=i((e,t)=>e<=t,`comparisonFunc`),r=1/0):(n=i((e,t)=>e>=t,`comparisonFunc`),r=0),e.forEach(e=>{let i=J===`TB`||J==`BT`?U.get(e)?.y:U.get(e)?.x;i!==void 0&&n(i,r)&&(t=e,r=i)}),t},`findClosestParent`),he=i(e=>{let t=``,n=1/0;return e.forEach(e=>{let r=U.get(e).y;r<=n&&(t=e,n=r)}),t||void 0},`findClosestParentBT`),ge=i((e,t,n)=>{let r=n,i=n,a=[];e.forEach(e=>{let n=t.get(e);if(!n)throw Error(`Commit not found for key ${e}`);n.parents.length?(r=ve(n),i=Math.max(r,i)):a.push(n),ye(n,r)}),r=i,a.forEach(e=>{be(e,r,n)}),e.forEach(e=>{let n=t.get(e);if(n?.parents.length){let e=he(n.parents);r=U.get(e).y-R,r<=i&&(i=r);let t=H.get(n.branch).pos,a=r-L;U.set(n.id,{x:t,y:a})}})},`setParallelBTPos`),_e=i(e=>{let t=X(e.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${e.id}`);let n=U.get(t)?.y;if(n===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return n},`findClosestParentPos`),ve=i(e=>_e(e)+R,`calculateCommitPosition`),ye=i((e,t)=>{let n=H.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let r=n.pos,i=t+L;return U.set(e.id,{x:r,y:i}),{x:r,y:i}},`setCommitPosition`),be=i((e,t,n)=>{let r=H.get(e.branch);if(!r)throw Error(`Branch not found for commit ${e.id}`);let i=t+n,a=r.pos;U.set(e.id,{x:a,y:i})},`setRootPosition`),xe=i((e,t,n,r,i,a)=>{if(a===_.HIGHLIGHT)e.append(`rect`).attr(`x`,n.x-10).attr(`y`,n.y-10).attr(`width`,20).attr(`height`,20).attr(`class`,`commit ${t.id} commit-highlight${i%V} ${r}-outer`),e.append(`rect`).attr(`x`,n.x-6).attr(`y`,n.y-6).attr(`width`,12).attr(`height`,12).attr(`class`,`commit ${t.id} commit${i%V} ${r}-inner`);else if(a===_.CHERRY_PICK)e.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,10).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x-3).attr(`cy`,n.y+2).attr(`r`,2.75).attr(`fill`,`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x+3).attr(`cy`,n.y+2).attr(`r`,2.75).attr(`fill`,`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x+3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x-3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,`#fff`).attr(`class`,`commit ${t.id} ${r}`);else{let o=e.append(`circle`);if(o.attr(`cx`,n.x),o.attr(`cy`,n.y),o.attr(`r`,t.type===_.MERGE?9:10),o.attr(`class`,`commit ${t.id} commit${i%V}`),a===_.MERGE){let a=e.append(`circle`);a.attr(`cx`,n.x),a.attr(`cy`,n.y),a.attr(`r`,6),a.attr(`class`,`commit ${r} ${t.id} commit${i%V}`)}a===_.REVERSE&&e.append(`path`).attr(`d`,`M ${n.x-5},${n.y-5}L${n.x+5},${n.y+5}M${n.x-5},${n.y+5}L${n.x+5},${n.y-5}`).attr(`class`,`commit ${r} ${t.id} commit${i%V}`)}},`drawCommitBullet`),Se=i((e,t,n,r,i)=>{if(t.type!==_.CHERRY_PICK&&(t.customId&&t.type===_.MERGE||t.type!==_.MERGE)&&i.showCommitLabel){let a=e.append(`g`),o=a.insert(`rect`).attr(`class`,`commit-label-bkg`),s=a.append(`text`).attr(`x`,r).attr(`y`,n.y+25).attr(`class`,`commit-label`).text(t.id),c=s.node()?.getBBox();if(c&&(o.attr(`x`,n.posWithOffset-c.width/2-B).attr(`y`,n.y+13.5).attr(`width`,c.width+2*B).attr(`height`,c.height+2*B),J===`TB`||J===`BT`?(o.attr(`x`,n.x-(c.width+4*z+5)).attr(`y`,n.y-12),s.attr(`x`,n.x-(c.width+4*z)).attr(`y`,n.y+c.height-12)):s.attr(`x`,n.posWithOffset-c.width/2),i.rotateCommitLabel))if(J===`TB`||J===`BT`)s.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`),o.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`);else{let e=-7.5-(c.width+10)/25*9.5,t=10+c.width/25*8.5;a.attr(`transform`,`translate(`+e+`, `+t+`) rotate(-45, `+r+`, `+n.y+`)`)}}},`drawCommitLabel`),Z=i((e,t,n,r)=>{if(t.tags.length>0){let i=0,a=0,o=0,s=[];for(let r of t.tags.reverse()){let t=e.insert(`polygon`),c=e.append(`circle`),l=e.append(`text`).attr(`y`,n.y-16-i).attr(`class`,`tag-label`).text(r),u=l.node()?.getBBox();if(!u)throw Error(`Tag bbox not found`);a=Math.max(a,u.width),o=Math.max(o,u.height),l.attr(`x`,n.posWithOffset-u.width/2),s.push({tag:l,hole:c,rect:t,yOffset:i}),i+=20}for(let{tag:e,hole:t,rect:i,yOffset:c}of s){let s=o/2,l=n.y-19.2-c;if(i.attr(`class`,`tag-label-bkg`).attr(`points`,`
2
2
  ${r-a/2-z/2},${l+B}
3
3
  ${r-a/2-z/2},${l-B}
4
4
  ${n.posWithOffset-a/2-z},${l-s-B}