@kabmo-labs/kabmo 0.36.0 → 0.38.0

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 (292) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +547 -528
  3. package/dist/client/static/js/{CsvGrid-1h3bcak7.js → CsvGrid-90zfbn7f.js} +2 -2
  4. package/dist/client/static/js/{DocxView-ndca8jch.js → DocxView-vwq2rf16.js} +2 -2
  5. package/dist/client/static/js/{DrawioView-kpzd6y0b.js → DrawioView-bvx7eqcz.js} +2 -2
  6. package/dist/client/static/js/{ImageView-79prn3dg.js → ImageView-q6xfmbrq.js} +1 -1
  7. package/dist/client/static/js/{LayoutWrapper-v2wn2sb2.js → LayoutWrapper-qatdaw3n.js} +2 -2
  8. package/dist/client/static/js/{Modal-99j0zz3z.js → Modal-6jx1fvfb.js} +15 -15
  9. package/dist/client/static/js/{PdfView-2rjd87ay.js → PdfView-tkv2d2zs.js} +1 -1
  10. package/dist/client/static/js/{SessionsView-t7f3s71b.js → SessionsView-rbnecykz.js} +1 -1
  11. package/dist/client/static/js/{SheetView-ehb976st.js → SheetView-t08g8kdr.js} +4 -4
  12. package/dist/client/static/js/{SvgPreview-de2bbba6.js → SvgPreview-9vh6mdcp.js} +1 -1
  13. package/dist/client/static/js/{abnfDiagram-O67JEVCF-nx9jzn7m.js → abnfDiagram-O67JEVCF-bxcn33e1.js} +1 -1
  14. package/dist/client/static/js/architecture-7GRP2DOG-r8sz34h3.js +1 -0
  15. package/dist/client/static/js/{architectureDiagram-NJMV4G6O-170v67rr.js → architectureDiagram-NJMV4G6O-40ggw6e8.js} +2 -2
  16. package/dist/client/static/js/{astro-80bs6hvg.js → astro-p3f5p9p2.js} +1 -1
  17. package/dist/client/static/js/{blockDiagram-BEXU5L5S-16q285n1.js → blockDiagram-BEXU5L5S-k41cvjrd.js} +6 -6
  18. package/dist/client/static/js/c-jkdstn33.js +1 -0
  19. package/dist/client/static/js/{c4Diagram-YGBWAQC7-rn3qt45h.js → c4Diagram-YGBWAQC7-rdcmn6ac.js} +2 -2
  20. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-r26wg74e.js → classDiagram-v2-NBCMYWYE-txbmbkxv.js} +5 -5
  21. package/dist/client/static/js/{cose-bilkent-JH36ORCC-82kwe7ha.js → cose-bilkent-JH36ORCC-bxzh3qj1.js} +1 -1
  22. package/dist/client/static/js/cpp-9d3xdpe3.js +1 -0
  23. package/dist/client/static/js/css-r3wja1ze.js +1 -0
  24. package/dist/client/static/js/css-sebxkh5f.js +1 -0
  25. package/dist/client/static/js/cynefin-OW5HDTMX-w2f2vev7.js +1 -0
  26. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-tcxdn6pa.js → cynefinDiagram-VND7K2PF-abx5343b.js} +1 -1
  27. package/dist/client/static/js/{dagre-6A5THRUB-g833ata3.js → dagre-6A5THRUB-baj278kt.js} +2 -2
  28. package/dist/client/static/js/{diagram-22UHCM2B-f1fq8xec.js → diagram-22UHCM2B-vqvhdc5m.js} +7 -7
  29. package/dist/client/static/js/{diagram-3UASUU5V-6j2w016f.js → diagram-3UASUU5V-w328rfx0.js} +2 -2
  30. package/dist/client/static/js/{diagram-ATOU4E4O-6t2qxsk4.js → diagram-ATOU4E4O-zzcmwnm8.js} +2 -2
  31. package/dist/client/static/js/{diagram-CDSNMT55-7abar8s7.js → diagram-CDSNMT55-8yw39mmj.js} +1 -1
  32. package/dist/client/static/js/{diagram-MLGK6HIB-s68rgy16.js → diagram-MLGK6HIB-zgc386pv.js} +1 -1
  33. package/dist/client/static/js/{diagram-MPIPVDR6-azgkm6w8.js → diagram-MPIPVDR6-efmvvscm.js} +1 -1
  34. package/dist/client/static/js/{dockerfile-47e33kqa.js → dockerfile-bp5dre33.js} +1 -1
  35. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-esrjz750.js → ebnfDiagram-ZINNZB2B-p66h0dzq.js} +1 -1
  36. package/dist/client/static/js/{elixir-rpa1g4gy.js → elixir-jwphgp8j.js} +1 -1
  37. package/dist/client/static/js/{elk-276RUBZZ-fhr4b4jj.js → elk-276RUBZZ-g0jjxcqd.js} +1 -1
  38. package/dist/client/static/js/{erDiagram-OPXOYQCR-5r3fmdnz.js → erDiagram-OPXOYQCR-39gat96z.js} +4 -4
  39. package/dist/client/static/js/{erlang-bh5cbm8m.js → erlang-6m6tpt72.js} +1 -1
  40. package/dist/client/static/js/eventmodeling-NTZA5JFV-k5n61zzh.js +1 -0
  41. package/dist/client/static/js/flowDiagram-KWPJA3E3-f6jpcqyq.js +1 -0
  42. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-j4pf6rdn.js → ganttDiagram-FUAMR5RP-nsjv1zt4.js} +2 -2
  43. package/dist/client/static/js/gitGraph-4MIJSDKK-2gf053bx.js +1 -0
  44. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-x5epk0gr.js → gitGraphDiagram-X574FWY7-r4vnkcy3.js} +2 -2
  45. package/dist/client/static/js/graphql-p4cskvad.js +1 -0
  46. package/dist/client/static/js/html-f26r6vv5.js +1 -0
  47. package/dist/client/static/js/{index-c1j0xb0w.js → index-0kxqzafy.js} +1 -1
  48. package/dist/client/static/js/{index-3kgrcaq1.js → index-11bdd235.js} +1 -1
  49. package/dist/client/static/js/{index-b48p8d1j.js → index-1qszrvzk.js} +2 -2
  50. package/dist/client/static/js/{index-3vdmwpbh.js → index-24yyj78e.js} +2 -2
  51. package/dist/client/static/js/{index-63c6t75t.js → index-2drjp9ks.js} +1 -1
  52. package/dist/client/static/js/{index-d2km9egp.js → index-2ndq1ngv.js} +4 -4
  53. package/dist/client/static/js/{index-0j518hqm.js → index-3az1w5f8.js} +2 -2
  54. package/dist/client/static/js/{index-ye450a7z.js → index-50z4ek83.js} +1 -1
  55. package/dist/client/static/js/{index-60ceydzn.js → index-5ebhb94w.js} +1 -1
  56. package/dist/client/static/js/{index-ctgefatv.js → index-5y0bvq4q.js} +34 -34
  57. package/dist/client/static/js/{index-40ve7zzv.js → index-6ax2z70w.js} +1 -1
  58. package/dist/client/static/js/{index-9t82sx0w.js → index-6k3e5dph.js} +2 -2
  59. package/dist/client/static/js/{index-6xzfta4b.js → index-73jwm4d5.js} +1 -1
  60. package/dist/client/static/js/{index-8cy3x2y8.js → index-7fdp9c7m.js} +2 -2
  61. package/dist/client/static/js/{index-zvfvqvn9.js → index-9wd9y6m0.js} +2 -2
  62. package/dist/client/static/js/{index-q5t4sy22.js → index-9wtg6ywn.js} +4 -4
  63. package/dist/client/static/js/{index-nws03exw.js → index-a74k07z2.js} +2 -2
  64. package/dist/client/static/js/{index-982jyfsb.js → index-ashpbfqv.js} +2 -2
  65. package/dist/client/static/js/{index-zp73zexp.js → index-b9b2nwdd.js} +2 -2
  66. package/dist/client/static/js/{index-h1e1abpt.js → index-c15r8jd3.js} +2 -2
  67. package/dist/client/static/js/{index-5rzk1226.js → index-da10qpns.js} +2 -2
  68. package/dist/client/static/js/{index-ky0prc71.js → index-dfgdn3fj.js} +9 -9
  69. package/dist/client/static/js/{index-c09a5s1n.js → index-dkseg29t.js} +9 -9
  70. package/dist/client/static/js/{index-w3n97x4b.js → index-dt7e1328.js} +2 -2
  71. package/dist/client/static/js/{index-sar2ggde.js → index-e1pr3k50.js} +2 -2
  72. package/dist/client/static/js/{index-0b1kwsam.js → index-fghst0kd.js} +32 -32
  73. package/dist/client/static/js/{index-af24nes6.js → index-gbfg0anm.js} +2 -2
  74. package/dist/client/static/js/{index-vtbbfwx0.js → index-gr6jng0x.js} +2 -2
  75. package/dist/client/static/js/{index-44qrckd2.js → index-gwhx66f4.js} +1 -1
  76. package/dist/client/static/js/{index-55pqvh82.js → index-h7pn9qw6.js} +2 -2
  77. package/dist/client/static/js/{index-97t3mv1v.js → index-h8h5c2r8.js} +1 -1
  78. package/dist/client/static/js/{index-v5t761a1.js → index-ha75kff0.js} +2 -2
  79. package/dist/client/static/js/{index-ydvfc9td.js → index-hzx81cjq.js} +4 -4
  80. package/dist/client/static/js/{index-be6gevq8.js → index-k9xsvab3.js} +1 -1
  81. package/dist/client/static/js/{index-v8qd8ypc.js → index-nd4p98mc.js} +2 -2
  82. package/dist/client/static/js/{index-dmgawfhw.js → index-qkscve6n.js} +2 -2
  83. package/dist/client/static/js/{index-w7xbfv44.js → index-qn4pkjfh.js} +2 -2
  84. package/dist/client/static/js/{index-zdtsvnpq.js → index-r83kr4s5.js} +2 -2
  85. package/dist/client/static/js/{index-htt8qxm3.js → index-ra38ggke.js} +1 -1
  86. package/dist/client/static/js/{index-skm6k5w2.js → index-rf0p3v7q.js} +5 -5
  87. package/dist/client/static/js/{index-7r1hw2gd.js → index-rgp69pa8.js} +1 -1
  88. package/dist/client/static/js/{index-8e15fzax.js → index-rqrcw8nj.js} +2 -2
  89. package/dist/client/static/js/{index-63jbb4kf.js → index-sa9cp6km.js} +2 -2
  90. package/dist/client/static/js/{index-75haaj8g.js → index-st202rjv.js} +184 -184
  91. package/dist/client/static/js/{index-mm1rf116.js → index-t5t71dhp.js} +2 -2
  92. package/dist/client/static/js/{index-ktvbsj6w.js → index-tfsaj5d1.js} +2 -2
  93. package/dist/client/static/js/{index-k1xt92h4.js → index-tv61v3t3.js} +1 -1
  94. package/dist/client/static/js/index-tzm90bsz.js +1 -0
  95. package/dist/client/static/js/{index-z6g74h7g.js → index-vb6t44dw.js} +2 -2
  96. package/dist/client/static/js/{index-pyx8n25s.js → index-vnn7m9yp.js} +3 -3
  97. package/dist/client/static/js/{index-5kjpacvd.js → index-vxd4gykh.js} +2 -2
  98. package/dist/client/static/js/{index-r8pckaqe.js → index-xya34x4v.js} +2 -2
  99. package/dist/client/static/js/{index-a293pdg7.js → index-y3hdv561.js} +2 -2
  100. package/dist/client/static/js/{index-9gf8b73w.js → index-z0cpp5bc.js} +2 -2
  101. package/dist/client/static/js/info-A6RAGUB7-3tr0y3s6.js +1 -0
  102. package/dist/client/static/js/{infoDiagram-VRGFBTTK-ktc8nb8g.js → infoDiagram-VRGFBTTK-e39pvm4j.js} +1 -1
  103. package/dist/client/static/js/ini-cg0a5wm3.js +1 -0
  104. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-n3dk6227.js → ishikawaDiagram-OU5B5YK6-rqhszgvp.js} +2 -2
  105. package/dist/client/static/js/java-vcck089n.js +1 -0
  106. package/dist/client/static/js/javascript-nyf39d5r.js +1 -0
  107. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-f0p1h8qn.js → journeyDiagram-ZHPQQLJL-wgy5qrsv.js} +3 -3
  108. package/dist/client/static/js/jsx-ht9zyzwa.js +1 -0
  109. package/dist/client/static/js/{julia-73zjh2w6.js → julia-237yk557.js} +1 -1
  110. package/dist/client/static/js/{kanban-definition-PNTS6WVX-7jdt7dv1.js → kanban-definition-PNTS6WVX-b8bxn0h1.js} +3 -3
  111. package/dist/client/static/js/lua-86fjqj8v.js +1 -0
  112. package/dist/client/static/js/markdown-gwmsh53r.js +1 -0
  113. package/dist/client/static/js/{mermaid.core-e8rzrjt9.js → mermaid.core-vb5ehtre.js} +6 -6
  114. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-7shv6ge0.js → mindmap-definition-NLK3R4M7-t4p38s38.js} +3 -3
  115. package/dist/client/static/js/one-dark-pro-dhybn1ff.js +1 -0
  116. package/dist/client/static/js/one-light-bqg77ay0.js +1 -0
  117. package/dist/client/static/js/packet-AYTQ26CC-xbsyjzrh.js +1 -0
  118. package/dist/client/static/js/{pegDiagram-GJSIUBJH-17ak2zx3.js → pegDiagram-GJSIUBJH-3gp4madx.js} +1 -1
  119. package/dist/client/static/js/{perl-8z46dmze.js → perl-dvz4y1tb.js} +1 -1
  120. package/dist/client/static/js/{php-6qvnp2t6.js → php-n6y7dzhm.js} +1 -1
  121. package/dist/client/static/js/pie-WAS4IAKB-j2tpz0cs.js +1 -0
  122. package/dist/client/static/js/{pieDiagram-5QR66LMP-at4x1g4q.js → pieDiagram-5QR66LMP-0cbm773h.js} +2 -2
  123. package/dist/client/static/js/properties-mzvvbqg5.js +1 -0
  124. package/dist/client/static/js/python-3w64wsyd.js +1 -0
  125. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-apzhwrn4.js → quadrantDiagram-O4NWA36T-jwg7fc9f.js} +1 -1
  126. package/dist/client/static/js/r-32re2zwb.js +1 -0
  127. package/dist/client/static/js/radar-RG4KPBEZ-m3tsyfv0.js +1 -0
  128. package/dist/client/static/js/railroad-74A4TZTK-5p202a4q.js +1 -0
  129. package/dist/client/static/js/railroad-abnf-HS5TGJTU-hj0y9tgn.js +1 -0
  130. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-8c5dct8f.js +1 -0
  131. package/dist/client/static/js/railroad-peg-WCYAUIDC-3tx8z65q.js +1 -0
  132. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-rw8cj5f3.js → railroadDiagram-XR7U4H2S-38xh691s.js} +1 -1
  133. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-qyrse7mb.js → requirementDiagram-PLB6GJNP-gpddawxh.js} +4 -4
  134. package/dist/client/static/js/{ruby-qy8mhstq.js → ruby-7zye3g0e.js} +1 -1
  135. package/dist/client/static/js/{rust-fpshqnk0.js → rust-bx3ecv4n.js} +1 -1
  136. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-254qr59q.js → sankeyDiagram-IPEJSGJF-s6t6bbhk.js} +1 -1
  137. package/dist/client/static/js/{sass-kbwea482.js → sass-m0h9yzfb.js} +1 -1
  138. package/dist/client/static/js/{scss-zphrqp25.js → scss-2pwwfkvn.js} +1 -1
  139. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-y9xjxfc5.js → sequenceDiagram-PO4LG4MO-wkq51pmb.js} +3 -3
  140. package/dist/client/static/js/{sizeCapture-INFHLROL-sc5e60t3.js → sizeCapture-INFHLROL-xtwexf8k.js} +1 -1
  141. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-r134s4xr.js → stateDiagram-v2-GCMORJYK-jnwsqa7y.js} +3 -3
  142. package/dist/client/static/js/{svelte-mwtx07d9.js → svelte-x8f8c8hq.js} +1 -1
  143. package/dist/client/static/js/{swimlanes-2SLR337P-xc7rbawt.js → swimlanes-2SLR337P-mnkkqcbx.js} +1 -1
  144. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-6xmrz03n.js +8 -0
  145. package/dist/client/static/js/{timeline-definition-EJHVYXUP-cgjd8shk.js → timeline-definition-EJHVYXUP-rxq6heqh.js} +2 -2
  146. package/dist/client/static/js/treeView-Q6P3EWNA-mf0rb2yv.js +1 -0
  147. package/dist/client/static/js/treemap-WGGIJYW6-0x5gf06b.js +1 -0
  148. package/dist/client/static/js/typescript-5nmrzgkj.js +1 -0
  149. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-9qsmjhm6.js → usecaseDiagram-POWQR4AR-dz94f57t.js} +13 -13
  150. package/dist/client/static/js/{vennDiagram-UO4OBE2U-4grw9awx.js → vennDiagram-UO4OBE2U-5mmvkhsq.js} +1 -1
  151. package/dist/client/static/js/{vue-j8vb9d7r.js → vue-myjjd0gd.js} +1 -1
  152. package/dist/client/static/js/wardley-WFR3VGLG-x7ej8dms.js +1 -0
  153. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-8gxy0wat.js → wardleyDiagram-VNRHLVJA-dctdntpa.js} +1 -1
  154. package/dist/client/static/js/xml-3dd1pter.js +1 -0
  155. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-5sh7tdrx.js → xychartDiagram-PMCCYNJV-njyfrqkv.js} +2 -2
  156. package/dist/client/static/js/yaml-yssayv8a.js +1 -0
  157. package/package.json +1 -1
  158. package/src/client/components/common/ComposerPicker.tsx +24 -12
  159. package/src/client/components/common/ComposerTextarea.tsx +1 -0
  160. package/src/client/components/layout/session-sidebar/scheduler-modal/ModelFields.tsx +1 -1
  161. package/src/client/components/settings/apply-side-effects.test.ts +5 -4
  162. package/src/client/components/workspace/chat-timeline/chat-input/index.tsx +1 -1
  163. package/src/client/components/workspace/chat-timeline/index.tsx +3 -3
  164. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/FormAsk.test.tsx +210 -0
  165. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/FormAsk.tsx +342 -0
  166. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/LooseFieldAsk.tsx +44 -0
  167. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/OrphanAsks.test.tsx +44 -1
  168. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/OrphanAsks.tsx +10 -5
  169. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/PluginPendingInteractions.test.ts +1 -0
  170. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/drafts.ts +19 -0
  171. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/form-picks.ts +52 -0
  172. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/index.test.ts +2 -2
  173. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/index.tsx +53 -4
  174. package/src/client/components/workspace/model-dropdown/index.tsx +1 -1
  175. package/src/client/components/workspace/model-dropdown/use-catalog.ts +3 -32
  176. package/src/client/data/settings/omp-schema.json +55 -1
  177. package/src/client/hooks/chat/composer/harness-model-picker.ts +84 -0
  178. package/src/client/hooks/chat/composer/index.ts +26 -6
  179. package/src/client/hooks/chat/timeline/ask-frames.test.ts +80 -7
  180. package/src/client/hooks/chat/timeline/ask-frames.ts +95 -21
  181. package/src/client/hooks/models/use-harnesses.ts +15 -2
  182. package/src/client/hooks/ui/icon-style.ts +7 -4
  183. package/src/client/hooks/ui/style-attributes.test.ts +11 -11
  184. package/src/client/hooks/ui/surface-style.ts +8 -5
  185. package/src/server/lib/assets/shell-attributes.server.ts +12 -9
  186. package/src/server/lib/assets/shell-attributes.test.ts +18 -13
  187. package/src/server/lib/auth/agent-gate.server.ts +64 -0
  188. package/src/server/lib/auth/agent-tree-gate.test.ts +121 -0
  189. package/src/server/lib/auth/guard.test.ts +18 -18
  190. package/src/server/lib/auth/guard.ts +15 -11
  191. package/src/server/lib/auth/handover-guard.test.ts +1 -1
  192. package/src/server/lib/changes/attach.server.ts +57 -0
  193. package/src/server/lib/changes/attach.test.ts +94 -0
  194. package/src/server/lib/changes/blobs.server.ts +52 -0
  195. package/src/server/lib/changes/capture-bash.server.ts +106 -0
  196. package/src/server/lib/changes/capture-fs.server.ts +64 -0
  197. package/src/server/lib/changes/capture-runs.test.ts +136 -0
  198. package/src/server/lib/changes/capture-test-util.ts +46 -0
  199. package/src/server/lib/changes/capture-types.ts +62 -0
  200. package/src/server/lib/changes/capture.server.ts +333 -0
  201. package/src/server/lib/changes/capture.test.ts +245 -0
  202. package/src/server/lib/changes/classify-command.test.ts +172 -0
  203. package/src/server/lib/changes/classify-command.ts +272 -0
  204. package/src/server/lib/changes/classify-git.ts +88 -0
  205. package/src/server/lib/changes/classify-paths.ts +112 -0
  206. package/src/server/lib/changes/classify-tokenize.ts +185 -0
  207. package/src/server/lib/changes/journal.server.ts +183 -0
  208. package/src/server/lib/changes/journal.test.ts +125 -0
  209. package/src/server/lib/changes/merge.test.ts +137 -0
  210. package/src/server/lib/changes/paths.server.ts +37 -0
  211. package/src/server/lib/changes/purge.server.ts +32 -0
  212. package/src/server/lib/changes/reader.server.ts +322 -0
  213. package/src/server/lib/changes/reader.test.ts +137 -0
  214. package/src/server/lib/changes/records.ts +120 -0
  215. package/src/server/lib/changes/scan.server.ts +89 -0
  216. package/src/server/lib/harness/register.server.ts +3 -0
  217. package/src/server/lib/omp/rpc/event-fanout.test.ts +58 -0
  218. package/src/server/lib/omp/rpc/event-fanout.ts +19 -0
  219. package/src/server/lib/omp/rpc/manager.ts +4 -3
  220. package/src/server/lib/omp/rpc/session-registration.ts +5 -0
  221. package/src/server/lib/omp/rpc/session-registry.ts +4 -5
  222. package/src/server/lib/omp/session/delete.server.ts +4 -0
  223. package/src/server/lib/sessions/agent-token.server.test.ts +28 -5
  224. package/src/server/lib/sessions/agent-token.server.ts +42 -6
  225. package/src/server/lib/sessions/relation-access.server.test.ts +96 -0
  226. package/src/server/lib/sessions/relation-access.server.ts +71 -0
  227. package/src/server/routes/sessions/changes.ts +1 -1
  228. package/src/shared/lib/chat/ask-form/fields.ts +1 -0
  229. package/src/shared/lib/chat/ask-form/types.ts +6 -0
  230. package/src/shared/lib/chat/ask-questions.ts +56 -3
  231. package/src/shared/lib/chat/composer/delegation.ts +2 -13
  232. package/src/shared/lib/chat/composer/filter.test.ts +39 -0
  233. package/src/shared/lib/chat/composer/filter.ts +23 -13
  234. package/src/shared/lib/chat/composer/harness-model-items.test.ts +54 -0
  235. package/src/shared/lib/chat/composer/harness-model-items.ts +41 -0
  236. package/src/shared/lib/chat/composer/trigger.test.ts +50 -0
  237. package/src/shared/lib/chat/composer/trigger.ts +29 -1
  238. package/src/shared/lib/chat/timeline/changed-files.test.ts +16 -0
  239. package/src/shared/lib/chat/timeline/changed-files.ts +102 -25
  240. package/src/shared/lib/harness/catalog.ts +21 -0
  241. package/src/{client/components/workspace/model-dropdown/harness-models.test.ts → shared/lib/harness/models.test.ts} +1 -1
  242. package/src/shared/lib/icons/icon-paint-authority.ts +5 -3
  243. package/src/shared/lib/models/option.ts +46 -0
  244. package/src/shared/lib/omp/config/schema.test.ts +20 -0
  245. package/src/shared/lib/theme/icon-style.test.ts +8 -5
  246. package/src/shared/lib/theme/icon-style.ts +15 -7
  247. package/src/shared/lib/theme/surface-style.test.ts +8 -5
  248. package/src/shared/lib/theme/surface-style.ts +17 -7
  249. package/src/shared/lib/workspace/sidebar-style.test.ts +7 -8
  250. package/src/shared/lib/workspace/sidebar-style.ts +7 -8
  251. package/src/shared/types/chat.ts +12 -6
  252. package/src/shared/types/omp/agent.ts +9 -0
  253. package/src/shared/types/session-changes.ts +4 -0
  254. package/dist/client/static/js/architecture-7GRP2DOG-aqft2erp.js +0 -1
  255. package/dist/client/static/js/c-wkgxb1t1.js +0 -1
  256. package/dist/client/static/js/cpp-y0t6mynx.js +0 -1
  257. package/dist/client/static/js/css-r2nhvzff.js +0 -1
  258. package/dist/client/static/js/css-tf1s0nb7.js +0 -1
  259. package/dist/client/static/js/cynefin-OW5HDTMX-v2sz60t6.js +0 -1
  260. package/dist/client/static/js/eventmodeling-NTZA5JFV-8qbefe4m.js +0 -1
  261. package/dist/client/static/js/flowDiagram-KWPJA3E3-krsvgcq7.js +0 -1
  262. package/dist/client/static/js/gitGraph-4MIJSDKK-9bx1a38k.js +0 -1
  263. package/dist/client/static/js/graphql-xnpp5gn9.js +0 -1
  264. package/dist/client/static/js/html-pv88ny12.js +0 -1
  265. package/dist/client/static/js/index-dh1vd0d9.js +0 -1
  266. package/dist/client/static/js/info-A6RAGUB7-j51t7jhh.js +0 -1
  267. package/dist/client/static/js/ini-ygfyhprj.js +0 -1
  268. package/dist/client/static/js/java-gm49vw59.js +0 -1
  269. package/dist/client/static/js/javascript-4kw2j9t3.js +0 -1
  270. package/dist/client/static/js/jsx-ksxw1byz.js +0 -1
  271. package/dist/client/static/js/lua-53gzb9bx.js +0 -1
  272. package/dist/client/static/js/markdown-tk3cd3vs.js +0 -1
  273. package/dist/client/static/js/one-dark-pro-39bt34v9.js +0 -1
  274. package/dist/client/static/js/one-light-xec0sehr.js +0 -1
  275. package/dist/client/static/js/packet-AYTQ26CC-n83gfj2g.js +0 -1
  276. package/dist/client/static/js/pie-WAS4IAKB-5c5pctwz.js +0 -1
  277. package/dist/client/static/js/properties-2tcybqjk.js +0 -1
  278. package/dist/client/static/js/python-qph3dntq.js +0 -1
  279. package/dist/client/static/js/r-gd26x93y.js +0 -1
  280. package/dist/client/static/js/radar-RG4KPBEZ-52e5n99a.js +0 -1
  281. package/dist/client/static/js/railroad-74A4TZTK-44nqxxpy.js +0 -1
  282. package/dist/client/static/js/railroad-abnf-HS5TGJTU-25jxgwg7.js +0 -1
  283. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-64pqpf2y.js +0 -1
  284. package/dist/client/static/js/railroad-peg-WCYAUIDC-0p5sxzpx.js +0 -1
  285. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-kdcdamkj.js +0 -8
  286. package/dist/client/static/js/treeView-Q6P3EWNA-8j14nnd1.js +0 -1
  287. package/dist/client/static/js/treemap-WGGIJYW6-esf993kk.js +0 -1
  288. package/dist/client/static/js/typescript-0s2t05jj.js +0 -1
  289. package/dist/client/static/js/wardley-WFR3VGLG-v4dxm2sb.js +0 -1
  290. package/dist/client/static/js/xml-0py2vkw7.js +0 -1
  291. package/dist/client/static/js/yaml-vghdz0f0.js +0 -1
  292. /package/src/{client/components/workspace/model-dropdown/harness-models.ts → shared/lib/harness/models.ts} +0 -0
@@ -1,9 +1,9 @@
1
- import{t,Fd,l,x,te,R,L,z,O,U,j,G,p,h,Io,Tl,_o,vf,vn,vA,zi,ai,Es,W}from"./index-ctgefatv.js";import{fl,du,fd,pu,na}from"./index-9gf8b73w.js";import{on,yn}from"./index-zp73zexp.js";var dn=yn(function(Ke,tr){(function(e,r){typeof Ke=="object"&&typeof tr<"u"?tr.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_isoWeek=r()})(Ke,function(){var e="day";return function(r,n,i){var a=function(w){return w.add(4-w.isoWeekday(),e)},s=n.prototype;s.isoWeekYear=function(){return a(this).year()},s.isoWeek=function(w){if(!this.$utils().u(w))return this.add(7*(w-this.isoWeek()),e);var D,H,_,rt,N=a(this),Y=(D=this.isoWeekYear(),H=this.$u,_=(H?i.utc:i)().year(D).startOf("year"),rt=4-_.isoWeekday(),_.isoWeekday()>4&&(rt+=7),_.add(rt,e));return N.diff(Y,"week")+1},s.isoWeekday=function(w){return this.$utils().u(w)?this.day()||7:this.day(this.day()%7?w:w-7)};var c=s.startOf;s.startOf=function(w,D){var H=this.$utils(),_=!!H.u(D)||D;return H.p(w)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):c.bind(this)(w,D)}}})});var mn=yn(function(er,rr){(function(e,r){typeof er=="object"&&typeof rr<"u"?rr.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=r()})(er,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"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,i=/\d\d/,a=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,c={},w=function(A){return(A=+A)+(A>68?1900:2000)},D=function(A){return function(P){this[A]=+P}},H=[/[+-]\d\d:?(\d\d)?|Z/,function(A){(this.zone||(this.zone={})).offset=function(P){if(!P)return 0;if(P==="Z")return 0;var F=P.match(/([+-]|\d\d)/g),J=60*F[1]+(+F[2]||0);return J===0?0:F[0]==="+"?-J:J}(A)}],_=function(A){var P=c[A];return P&&(P.indexOf?P:P.s.concat(P.f))},rt=function(A,P){var F,J=c.meridiem;if(J){for(var lt=1;lt<=24;lt+=1)if(A.indexOf(J(lt,0,P))>-1){F=lt>12;break}}else F=A===(P?"pm":"PM");return F},N={A:[s,function(A){this.afternoon=rt(A,!1)}],a:[s,function(A){this.afternoon=rt(A,!0)}],Q:[n,function(A){this.month=3*(A-1)+1}],S:[n,function(A){this.milliseconds=100*+A}],SS:[i,function(A){this.milliseconds=10*+A}],SSS:[/\d{3}/,function(A){this.milliseconds=+A}],s:[a,D("seconds")],ss:[a,D("seconds")],m:[a,D("minutes")],mm:[a,D("minutes")],H:[a,D("hours")],h:[a,D("hours")],HH:[a,D("hours")],hh:[a,D("hours")],D:[a,D("day")],DD:[i,D("day")],Do:[s,function(A){var P=c.ordinal,F=A.match(/\d+/);if(this.day=F[0],P)for(var J=1;J<=31;J+=1)P(J).replace(/\[|\]/g,"")===A&&(this.day=J)}],w:[a,D("week")],ww:[i,D("week")],M:[a,D("month")],MM:[i,D("month")],MMM:[s,function(A){var P=_("months"),F=(_("monthsShort")||P.map(function(J){return J.slice(0,3)})).indexOf(A)+1;if(F<1)throw Error();this.month=F%12||F}],MMMM:[s,function(A){var P=_("months").indexOf(A)+1;if(P<1)throw Error();this.month=P%12||P}],Y:[/[+-]?\d+/,D("year")],YY:[i,function(A){this.year=w(A)}],YYYY:[/\d{4}/,D("year")],Z:H,ZZ:H};function Y(A){var P,F;P=A,F=c&&c.formats;for(var J=(A=P.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(tt,et,v){var S=v&&v.toUpperCase();return et||F[v]||e[v]||F[S].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(C,E,f){return E||f.slice(1)})})).match(r),lt=J.length,it=0;it<lt;it+=1){var V=J[it],M=N[V],u=M&&M[0],I=M&&M[1];J[it]=I?{regex:u,parser:I}:V.replace(/^\[|\]$/g,"")}return function(tt){for(var et={},v=0,S=0;v<lt;v+=1){var C=J[v];if(typeof C=="string")S+=C.length;else{var{regex:E,parser:f}=C,b=tt.slice(S),T=E.exec(b)[0];f.call(et,T),tt=tt.replace(T,"")}}return function(k){var X=k.afternoon;if(X!==void 0){var o=k.hours;X?o<12&&(k.hours+=12):o===12&&(k.hours=0),delete k.afternoon}}(et),et}}return function(A,P,F){F.p.customParseFormat=!0,A&&A.parseTwoDigitYear&&(w=A.parseTwoDigitYear);var J=P.prototype,lt=J.parse;J.parse=function(it){var{date:V,utc:M,args:u}=it;this.$u=M;var I=u[1];if(typeof I=="string"){var tt=u[2]===!0,et=u[3]===!0,v=tt||et,S=u[2];et&&(S=u[2]),c=this.$locale(),!tt&&S&&(c=F.Ls[S]),this.$d=function(b,T,k,X){try{if(["x","X"].indexOf(T)>-1)return new Date((T==="X"?1000:1)*b);var o=Y(T)(b),{year:q,month:m,day:dt,hours:d,minutes:Z,seconds:Q,milliseconds:ct,zone:ut,week:nt}=o,g=new Date,B=dt||(q||m?1:g.getDate()),K=q||g.getFullYear(),y=0;q&&!m||(y=m>0?m-1:g.getMonth());var mt,at=d||0,st=Z||0,ht=Q||0,yt=ct||0;return ut?new Date(Date.UTC(K,y,B,at,st,ht,yt+60*ut.offset*1000)):k?new Date(Date.UTC(K,y,B,at,st,ht,yt)):(mt=new Date(K,y,B,at,st,ht,yt),nt&&(mt=X(mt).week(nt).toDate()),mt)}catch(pt){return new Date("")}}(V,I,M,F),this.init(),S&&S!==!0&&(this.$L=this.locale(S).$L),v&&V!=this.format(I)&&(this.$d=new Date("")),c={}}else if(I instanceof Array)for(var C=I.length,E=1;E<=C;E+=1){u[1]=I[E-1];var f=F.apply(this,u);if(f.isValid()){this.$d=f.$d,this.$L=f.$L,this.init();break}E===C&&(this.$d=new Date(""))}else lt.call(this,it)}}})});var hn=yn(function(nr,ir){(function(e,r){typeof nr=="object"&&typeof ir<"u"?ir.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_advancedFormat=r()})(nr,function(){return function(e,r){var n=r.prototype,i=n.format;n.format=function(a){var s=this,c=this.$locale();if(!this.isValid())return i.bind(this)(a);var w=this.$utils(),D=(a||"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(H){switch(H){case"Q":return Math.ceil((s.$M+1)/3);case"Do":return c.ordinal(s.$D);case"gggg":return s.weekYear();case"GGGG":return s.isoWeekYear();case"wo":return c.ordinal(s.week(),"W");case"w":case"ww":return w.s(s.week(),H==="w"?1:2,"0");case"W":case"WW":return w.s(s.isoWeek(),H==="W"?1:2,"0");case"k":case"kk":return w.s(String(s.$H===0?24:s.$H),H==="k"?1:2,"0");case"X":return Math.floor(s.$d.getTime()/1000);case"x":return s.$d.getTime();case"z":return"["+s.offsetName()+"]";case"zzz":return"["+s.offsetName("long")+"]";default:return H}});return i.bind(this)(D)}}})});var gn=yn(function(ar,sr){(function(e,r){typeof ar=="object"&&typeof sr<"u"?sr.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_duration=r()})(ar,function(){var e,r,n=1000,i=60000,a=3600000,s=86400000,c=31536000000,w=2628000000,D=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,H=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,_={years:c,months:w,days:s,hours:a,minutes:i,seconds:n,milliseconds:1,weeks:604800000},rt=function(V){return V instanceof lt},N=function(V,M,u){return new lt(V,u,M.$l)},Y=function(V){return r.p(V)+"s"},A=function(V){return V<0},P=function(V){return A(V)?Math.ceil(V):Math.floor(V)},F=function(V){return Math.abs(V)},J=function(V,M){return V?A(V)?{negative:!0,format:""+F(V)+M}:{negative:!1,format:""+V+M}:{negative:!1,format:""}},lt=function(){function V(u,I,tt){var et=this;if(this.$d={},this.$l=tt,u===void 0&&(this.$ms=0,this.parseFromMilliseconds()),I)return N(u*_[Y(I)],this);if(typeof u=="number")return this.$ms=u,this.parseFromMilliseconds(),this;if(typeof u=="object")return Object.keys(u).forEach(function(C){et.$d[Y(C)]=u[C]}),this.calMilliseconds(),this;if(typeof u=="string"){var v=u.match(D);if(v){var S=v.slice(2).map(function(C){return C!=null?Number(C):0});return this.$d.years=S[0],this.$d.months=S[1],this.$d.weeks=S[2],this.$d.days=S[3],this.$d.hours=S[4],this.$d.minutes=S[5],this.$d.seconds=S[6],this.calMilliseconds(),this}}return this}var M=V.prototype;return M.calMilliseconds=function(){var u=this;this.$ms=Object.keys(this.$d).reduce(function(I,tt){return I+(u.$d[tt]||0)*_[tt]},0)},M.parseFromMilliseconds=function(){var u=this.$ms;this.$d.years=P(u/c),u%=c,this.$d.months=P(u/w),u%=w,this.$d.days=P(u/s),u%=s,this.$d.hours=P(u/a),u%=a,this.$d.minutes=P(u/i),u%=i,this.$d.seconds=P(u/n),u%=n,this.$d.milliseconds=u},M.toISOString=function(){var u=J(this.$d.years,"Y"),I=J(this.$d.months,"M"),tt=+this.$d.days||0;this.$d.weeks&&(tt+=7*this.$d.weeks);var et=J(tt,"D"),v=J(this.$d.hours,"H"),S=J(this.$d.minutes,"M"),C=this.$d.seconds||0;this.$d.milliseconds&&(C+=this.$d.milliseconds/1000,C=Math.round(1000*C)/1000);var E=J(C,"S"),f=u.negative||I.negative||et.negative||v.negative||S.negative||E.negative,b=v.format||S.format||E.format?"T":"",T=(f?"-":"")+"P"+u.format+I.format+et.format+b+v.format+S.format+E.format;return T==="P"||T==="-P"?"P0D":T},M.toJSON=function(){return this.toISOString()},M.format=function(u){var I=u||"YYYY-MM-DDTHH:mm:ss",tt={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return I.replace(H,function(et,v){return v||String(tt[et])})},M.as=function(u){return this.$ms/_[Y(u)]},M.get=function(u){var I=this.$ms,tt=Y(u);return tt==="milliseconds"?I%=1000:I=tt==="weeks"?P(I/_[tt]):this.$d[tt],I||0},M.add=function(u,I,tt){var et;return et=I?u*_[Y(I)]:rt(u)?u.$ms:N(u,this).$ms,N(this.$ms+et*(tt?-1:1),this)},M.subtract=function(u,I){return this.add(u,I,!0)},M.locale=function(u){var I=this.clone();return I.$l=u,I},M.clone=function(){return N(this.$ms,this)},M.humanize=function(u){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!u)},M.valueOf=function(){return this.asMilliseconds()},M.milliseconds=function(){return this.get("milliseconds")},M.asMilliseconds=function(){return this.as("milliseconds")},M.seconds=function(){return this.get("seconds")},M.asSeconds=function(){return this.as("seconds")},M.minutes=function(){return this.get("minutes")},M.asMinutes=function(){return this.as("minutes")},M.hours=function(){return this.get("hours")},M.asHours=function(){return this.as("hours")},M.days=function(){return this.get("days")},M.asDays=function(){return this.as("days")},M.weeks=function(){return this.get("weeks")},M.asWeeks=function(){return this.as("weeks")},M.months=function(){return this.get("months")},M.asMonths=function(){return this.as("months")},M.years=function(){return this.get("years")},M.asYears=function(){return this.as("years")},V}(),it=function(V,M,u){return V.add(M.years()*u,"y").add(M.months()*u,"M").add(M.days()*u,"d").add(M.hours()*u,"h").add(M.minutes()*u,"m").add(M.seconds()*u,"s").add(M.milliseconds()*u,"ms")};return function(V,M,u){e=u,r=u().$utils(),u.duration=function(et,v){var S=u.locale();return N(et,{$l:S},v)},u.isDuration=rt;var I=M.prototype.add,tt=M.prototype.subtract;M.prototype.add=function(et,v){return rt(et)?it(this,et,1):I.bind(this)(et,v)},M.prototype.subtract=function(et,v){return rt(et)?it(this,et,-1):tt.bind(this)(et,v)}}})});function Ie(e,r){let n;if(r===void 0){for(let i of e)if(i!=null&&(n<i||n===void 0&&i>=i))n=i}else{let i=-1;for(let a of e)if((a=r(a,++i,e))!=null&&(n<a||n===void 0&&a>=a))n=a}return n}function Ue(e,r){let n;if(r===void 0){for(let i of e)if(i!=null&&(n>i||n===void 0&&i>=i))n=i}else{let i=-1;for(let a of e)if((a=r(a,++i,e))!=null&&(n>a||n===void 0&&a>=a))n=a}return n}function Le(e){return e}var me=1,We=2,Ee=3,de=4,wr=0.000001;function En(e){return"translate("+e+",0)"}function An(e){return"translate(0,"+e+")"}function On(e){return(r)=>+e(r)}function $n(e,r){if(r=Math.max(0,e.bandwidth()-r*2)/2,e.round())r=Math.round(r);return(n)=>+e(n)+r}function Hn(){return!this.__axis}function Mr(e,r){var n=[],i=null,a=null,s=6,c=6,w=3,D=typeof window<"u"&&window.devicePixelRatio>1?0:0.5,H=e===me||e===de?-1:1,_=e===de||e===We?"x":"y",rt=e===me||e===Ee?En:An;function N(Y){var A=i==null?r.ticks?r.ticks.apply(r,n):r.domain():i,P=a==null?r.tickFormat?r.tickFormat.apply(r,n):Le:a,F=Math.max(s,0)+w,J=r.range(),lt=+J[0]+D,it=+J[J.length-1]+D,V=(r.bandwidth?$n:On)(r.copy(),D),M=Y.selection?Y.selection():Y,u=M.selectAll(".domain").data([null]),I=M.selectAll(".tick").data(A,r).order(),tt=I.exit(),et=I.enter().append("g").attr("class","tick"),v=I.select("line"),S=I.select("text");if(u=u.merge(u.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),I=I.merge(et),v=v.merge(et.append("line").attr("stroke","currentColor").attr(_+"2",H*s)),S=S.merge(et.append("text").attr("fill","currentColor").attr(_,H*F).attr("dy",e===me?"0em":e===Ee?"0.71em":"0.32em")),Y!==M)u=u.transition(Y),I=I.transition(Y),v=v.transition(Y),S=S.transition(Y),tt=tt.transition(Y).attr("opacity",wr).attr("transform",function(C){return isFinite(C=V(C))?rt(C+D):this.getAttribute("transform")}),et.attr("opacity",wr).attr("transform",function(C){var E=this.parentNode.__axis;return rt((E&&isFinite(E=E(C))?E:V(C))+D)});tt.remove(),u.attr("d",e===de||e===We?c?"M"+H*c+","+lt+"H"+D+"V"+it+"H"+H*c:"M"+D+","+lt+"V"+it:c?"M"+lt+","+H*c+"V"+D+"H"+it+"V"+H*c:"M"+lt+","+D+"H"+it),I.attr("opacity",1).attr("transform",function(C){return rt(V(C)+D)}),v.attr(_+"2",H*s),S.attr(_,H*F).text(P),M.filter(Hn).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===We?"start":e===de?"end":"middle"),M.each(function(){this.__axis=V})}return N.scale=function(Y){return arguments.length?(r=Y,N):r},N.ticks=function(){return n=Array.from(arguments),N},N.tickArguments=function(Y){return arguments.length?(n=Y==null?[]:Array.from(Y),N):n.slice()},N.tickValues=function(Y){return arguments.length?(i=Y==null?null:Array.from(Y),N):i&&i.slice()},N.tickFormat=function(Y){return arguments.length?(a=Y,N):a},N.tickSize=function(Y){return arguments.length?(s=c=+Y,N):s},N.tickSizeInner=function(Y){return arguments.length?(s=+Y,N):s},N.tickSizeOuter=function(Y){return arguments.length?(c=+Y,N):c},N.tickPadding=function(Y){return arguments.length?(w=+Y,N):w},N.offset=function(Y){return arguments.length?(D=+Y,N):D},N}function Ae(e){return Mr(me,e)}function Oe(e){return Mr(Ee,e)}var Dr=Math.PI/180,Cr=180/Math.PI;var he=18,Sr=0.96422,_r=1,Yr=0.82521,Fr=0.13793103448275862,Xt=0.20689655172413793,Ir=3*Xt*Xt,Nn=Xt*Xt*Xt;function Ur(e){if(e instanceof _t)return new _t(e.l,e.a,e.b,e.opacity);if(e instanceof Wt)return Wr(e);if(!(e instanceof vn))e=vf(e);var r=Pe(e.r),n=Pe(e.g),i=Pe(e.b),a=$e((0.2225045*r+0.7168786*n+0.0606169*i)/_r),s,c;if(r===n&&n===i)s=c=a;else s=$e((0.4360747*r+0.3850649*n+0.1430804*i)/Sr),c=$e((0.0139322*r+0.0971045*n+0.7141733*i)/Yr);return new _t(116*a-16,500*(s-a),200*(a-c),e.opacity)}function Lr(e,r,n,i){return arguments.length===1?Ur(e):new _t(e,r,n,i==null?1:i)}function _t(e,r,n,i){this.l=+e,this.a=+r,this.b=+n,this.opacity=+i}Io(_t,Lr,Tl(_o,{brighter(e){return new _t(this.l+he*(e==null?1:e),this.a,this.b,this.opacity)},darker(e){return new _t(this.l-he*(e==null?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,r=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return r=Sr*He(r),e=_r*He(e),n=Yr*He(n),new vn(Ne(3.1338561*r-1.6168667*e-0.4906146*n),Ne(-0.9787684*r+1.9161415*e+0.033454*n),Ne(0.0719453*r-0.2289914*e+1.4052427*n),this.opacity)}}));function $e(e){return e>Nn?Math.pow(e,0.3333333333333333):e/Ir+Fr}function He(e){return e>Xt?e*e*e:Ir*(e-Fr)}function Ne(e){return 255*(e<=0.0031308?12.92*e:1.055*Math.pow(e,0.4166666666666667)-0.055)}function Pe(e){return(e/=255)<=0.04045?e/12.92:Math.pow((e+0.055)/1.055,2.4)}function Pn(e){if(e instanceof Wt)return new Wt(e.h,e.c,e.l,e.opacity);if(!(e instanceof _t))e=Ur(e);if(e.a===0&&e.b===0)return new Wt(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var r=Math.atan2(e.b,e.a)*Cr;return new Wt(r<0?r+360:r,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function ye(e,r,n,i){return arguments.length===1?Pn(e):new Wt(e,r,n,i==null?1:i)}function Wt(e,r,n,i){this.h=+e,this.c=+r,this.l=+n,this.opacity=+i}function Wr(e){if(isNaN(e.h))return new _t(e.l,0,0,e.opacity);var r=e.h*Dr;return new _t(e.l,Math.cos(r)*e.c,Math.sin(r)*e.c,e.opacity)}Io(Wt,ye,Tl(_o,{brighter(e){return new Wt(this.h,this.c,this.l+he*(e==null?1:e),this.opacity)},darker(e){return new Wt(this.h,this.c,this.l-he*(e==null?1:e),this.opacity)},rgb(){return Wr(this).rgb()}}));function Er(e){return function(r,n){var i=e((r=ye(r)).h,(n=ye(n)).h),a=zi(r.c,n.c),s=zi(r.l,n.l),c=zi(r.opacity,n.opacity);return function(w){return r.h=i(w),r.c=a(w),r.l=s(w),r.opacity=c(w),r+""}}}var Ar=Er(vA),Ms=Er(zi);function Ve(e,r){e=e.slice();var n=0,i=e.length-1,a=e[n],s=e[i],c;if(s<a)c=n,n=i,i=c,c=a,a=s,s=c;return e[n]=r.floor(a),e[i]=r.ceil(s),e}var ze=new Date,Re=new Date;function ft(e,r,n,i){function a(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}if(a.floor=(s)=>(e(s=new Date(+s)),s),a.ceil=(s)=>(e(s=new Date(s-1)),r(s,1),e(s),s),a.round=(s)=>{let c=a(s),w=a.ceil(s);return s-c<w-s?c:w},a.offset=(s,c)=>(r(s=new Date(+s),c==null?1:Math.floor(c)),s),a.range=(s,c,w)=>{let D=[];if(s=a.ceil(s),w=w==null?1:Math.floor(w),!(s<c)||!(w>0))return D;let H;do D.push(H=new Date(+s)),r(s,w),e(s);while(H<s&&s<c);return D},a.filter=(s)=>ft((c)=>{if(c>=c)while(e(c),!s(c))c.setTime(c-1)},(c,w)=>{if(c>=c)if(w<0)while(++w<=0)while(r(c,-1),!s(c));else while(--w>=0)while(r(c,1),!s(c));}),n)a.count=(s,c)=>(ze.setTime(+s),Re.setTime(+c),e(ze),e(Re),Math.floor(n(ze,Re))),a.every=(s)=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:!(s>1)?a:a.filter(i?(c)=>i(c)%s===0:(c)=>a.count(0,c)%s===0));return a}var Yt=ft(()=>{},(e,r)=>{e.setTime(+e+r)},(e,r)=>r-e);Yt.every=(e)=>{if(e=Math.floor(e),!isFinite(e)||!(e>0))return null;if(!(e>1))return Yt;return ft((r)=>{r.setTime(Math.floor(r/e)*e)},(r,n)=>{r.setTime(+r+n*e)},(r,n)=>(n-r)/e)};var Or=Yt.range;var Mt=1000,Tt=60000,Ft=3600000,Ht=86400000,ie=604800000,Be=2592000000,ge=31536000000;var vt=ft((e)=>{e.setTime(e-e.getMilliseconds())},(e,r)=>{e.setTime(+e+r*Mt)},(e,r)=>(r-e)/Mt,(e)=>e.getUTCSeconds()),$r=vt.range;var Et=ft((e)=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Mt)},(e,r)=>{e.setTime(+e+r*Tt)},(e,r)=>(r-e)/Tt,(e)=>e.getMinutes()),Vn=Et.range,ke=ft((e)=>{e.setUTCSeconds(0,0)},(e,r)=>{e.setTime(+e+r*Tt)},(e,r)=>(r-e)/Tt,(e)=>e.getUTCMinutes()),zn=ke.range;var At=ft((e)=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Mt-e.getMinutes()*Tt)},(e,r)=>{e.setTime(+e+r*Ft)},(e,r)=>(r-e)/Ft,(e)=>e.getHours()),Rn=At.range,pe=ft((e)=>{e.setUTCMinutes(0,0,0)},(e,r)=>{e.setTime(+e+r*Ft)},(e,r)=>(r-e)/Ft,(e)=>e.getUTCHours()),Bn=pe.range;var Dt=ft((e)=>e.setHours(0,0,0,0),(e,r)=>e.setDate(e.getDate()+r),(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*Tt)/Ht,(e)=>e.getDate()-1),Zn=Dt.range,ae=ft((e)=>{e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r)},(e,r)=>(r-e)/Ht,(e)=>e.getUTCDate()-1),jn=ae.range,Te=ft((e)=>{e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r)},(e,r)=>(r-e)/Ht,(e)=>Math.floor(e/Ht)),Xn=Te.range;function Vt(e){return ft((r)=>{r.setDate(r.getDate()-(r.getDay()+7-e)%7),r.setHours(0,0,0,0)},(r,n)=>{r.setDate(r.getDate()+n*7)},(r,n)=>(n-r-(n.getTimezoneOffset()-r.getTimezoneOffset())*Tt)/ie)}var Ct=Vt(0),Nt=Vt(1),ve=Vt(2),xe=Vt(3),It=Vt(4),be=Vt(5),we=Vt(6),Hr=Ct.range,qn=Nt.range,Gn=ve.range,Qn=xe.range,Jn=It.range,Kn=be.range,ti=we.range;function zt(e){return ft((r)=>{r.setUTCDate(r.getUTCDate()-(r.getUTCDay()+7-e)%7),r.setUTCHours(0,0,0,0)},(r,n)=>{r.setUTCDate(r.getUTCDate()+n*7)},(r,n)=>(n-r)/ie)}var Rt=zt(0),qt=zt(1),Nr=zt(2),Pr=zt(3),Pt=zt(4),Vr=zt(5),zr=zt(6),Rr=Rt.range,ei=qt.range,ri=Nr.range,ni=Pr.range,ii=Pt.range,si=Vr.range,oi=zr.range;var Ot=ft((e)=>{e.setDate(1),e.setHours(0,0,0,0)},(e,r)=>{e.setMonth(e.getMonth()+r)},(e,r)=>r.getMonth()-e.getMonth()+(r.getFullYear()-e.getFullYear())*12,(e)=>e.getMonth()),ci=Ot.range,Me=ft((e)=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCMonth(e.getUTCMonth()+r)},(e,r)=>r.getUTCMonth()-e.getUTCMonth()+(r.getUTCFullYear()-e.getUTCFullYear())*12,(e)=>e.getUTCMonth()),ui=Me.range;var xt=ft((e)=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r)},(e,r)=>r.getFullYear()-e.getFullYear(),(e)=>e.getFullYear());xt.every=(e)=>!isFinite(e=Math.floor(e))||!(e>0)?null:ft((r)=>{r.setFullYear(Math.floor(r.getFullYear()/e)*e),r.setMonth(0,1),r.setHours(0,0,0,0)},(r,n)=>{r.setFullYear(r.getFullYear()+n*e)});var li=xt.range,St=ft((e)=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r)},(e,r)=>r.getUTCFullYear()-e.getUTCFullYear(),(e)=>e.getUTCFullYear());St.every=(e)=>!isFinite(e=Math.floor(e))||!(e>0)?null:ft((r)=>{r.setUTCFullYear(Math.floor(r.getUTCFullYear()/e)*e),r.setUTCMonth(0,1),r.setUTCHours(0,0,0,0)},(r,n)=>{r.setUTCFullYear(r.getUTCFullYear()+n*e)});var fi=St.range;function Br(e,r,n,i,a,s){let c=[[vt,1,Mt],[vt,5,5*Mt],[vt,15,15*Mt],[vt,30,30*Mt],[s,1,Tt],[s,5,5*Tt],[s,15,15*Tt],[s,30,30*Tt],[a,1,Ft],[a,3,3*Ft],[a,6,6*Ft],[a,12,12*Ft],[i,1,Ht],[i,2,2*Ht],[n,1,ie],[r,1,Be],[r,3,3*Be],[e,1,ge]];function w(H,_,rt){let N=_<H;if(N)[H,_]=[_,H];let Y=rt&&typeof rt.range==="function"?rt:D(H,_,rt),A=Y?Y.range(H,+_+1):[];return N?A.reverse():A}function D(H,_,rt){let N=Math.abs(_-H)/rt,Y=fl(([,,F])=>F).right(c,N);if(Y===c.length)return e.every(du(H/ge,_/ge,rt));if(Y===0)return Yt.every(Math.max(du(H,_,rt),1));let[A,P]=c[N/c[Y-1][2]<c[Y][2]/N?Y-1:Y];return A.every(P)}return[w,D]}var[di,mi]=Br(St,Me,Rt,Te,pe,ke),[Ze,je]=Br(xt,Ot,Ct,Dt,At,Et);function Xe(e){if(0<=e.y&&e.y<100){var r=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return r.setFullYear(e.y),r}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function qe(e){if(0<=e.y&&e.y<100){var r=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return r.setUTCFullYear(e.y),r}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function se(e,r,n){return{y:e,m:r,d:n,H:0,M:0,S:0,L:0}}function Ge(e){var{dateTime:r,date:n,time:i,periods:a,days:s,shortDays:c,months:w,shortMonths:D}=e,H=oe(a),_=ce(a),rt=oe(s),N=ce(s),Y=oe(c),A=ce(c),P=oe(w),F=ce(w),J=oe(D),lt=ce(D),it={a:k,A:X,b:o,B:q,c:null,d:Qr,e:Qr,f:Ai,g:ji,G:qi,H:Li,I:Wi,j:Ei,L:rn,m:Oi,M:$i,p:m,q:dt,Q:tn,s:en,S:Hi,u:Ni,U:Pi,V:Vi,w:Ri,W:Bi,x:null,X:null,y:Zi,Y:Xi,Z:Gi,"%":Kr},V={a:d,A:Z,b:Q,B:ct,c:null,d:Jr,e:Jr,f:ta,g:fa,G:ma,H:Qi,I:Ji,j:Ki,L:an,m:ea,M:ra,p:ut,q:nt,Q:tn,s:en,S:ia,u:aa,U:sa,V:oa,w:ca,W:ua,x:null,X:null,y:la,Y:da,Z:ha,"%":Kr},M={a:v,A:S,b:C,B:E,c:f,d:qr,e:qr,f:Yi,g:Xr,G:jr,H:Gr,I:Gr,j:Di,L:_i,m:Mi,M:Ci,p:et,q:wi,Q:Ii,s:Ui,S:Si,u:pi,U:Ti,V:vi,w:ki,W:xi,x:b,X:T,y:Xr,Y:jr,Z:bi,"%":Fi};it.x=u(n,it),it.X=u(i,it),it.c=u(r,it),V.x=u(n,V),V.X=u(i,V),V.c=u(r,V);function u(g,B){return function(K){var y=[],mt=-1,at=0,st=g.length,ht,yt,pt;if(!(K instanceof Date))K=new Date(+K);while(++mt<st)if(g.charCodeAt(mt)===37){if(y.push(g.slice(at,mt)),(yt=Zr[ht=g.charAt(++mt)])!=null)ht=g.charAt(++mt);else yt=ht==="e"?" ":"0";if(pt=B[ht])ht=pt(K,yt);y.push(ht),at=mt+1}return y.push(g.slice(at,mt)),y.join("")}}function I(g,B){return function(K){var y=se(1900,void 0,1),mt=tt(y,g,K+="",0),at,st;if(mt!=K.length)return null;if("Q"in y)return new Date(y.Q);if("s"in y)return new Date(y.s*1000+("L"in y?y.L:0));if(B&&!("Z"in y))y.Z=0;if("p"in y)y.H=y.H%12+y.p*12;if(y.m===void 0)y.m="q"in y?y.q:0;if("V"in y){if(y.V<1||y.V>53)return null;if(!("w"in y))y.w=1;if("Z"in y)at=qe(se(y.y,0,1)),st=at.getUTCDay(),at=st>4||st===0?qt.ceil(at):qt(at),at=ae.offset(at,(y.V-1)*7),y.y=at.getUTCFullYear(),y.m=at.getUTCMonth(),y.d=at.getUTCDate()+(y.w+6)%7;else at=Xe(se(y.y,0,1)),st=at.getDay(),at=st>4||st===0?Nt.ceil(at):Nt(at),at=Dt.offset(at,(y.V-1)*7),y.y=at.getFullYear(),y.m=at.getMonth(),y.d=at.getDate()+(y.w+6)%7}else if("W"in y||"U"in y){if(!("w"in y))y.w="u"in y?y.u%7:("W"in y)?1:0;st="Z"in y?qe(se(y.y,0,1)).getUTCDay():Xe(se(y.y,0,1)).getDay(),y.m=0,y.d="W"in y?(y.w+6)%7+y.W*7-(st+5)%7:y.w+y.U*7-(st+6)%7}if("Z"in y)return y.H+=y.Z/100|0,y.M+=y.Z%100,qe(y);return Xe(y)}}function tt(g,B,K,y){var mt=0,at=B.length,st=K.length,ht,yt;while(mt<at){if(y>=st)return-1;if(ht=B.charCodeAt(mt++),ht===37){if(ht=B.charAt(mt++),yt=M[ht in Zr?B.charAt(mt++):ht],!yt||(y=yt(g,K,y))<0)return-1}else if(ht!=K.charCodeAt(y++))return-1}return y}function et(g,B,K){var y=H.exec(B.slice(K));return y?(g.p=_.get(y[0].toLowerCase()),K+y[0].length):-1}function v(g,B,K){var y=Y.exec(B.slice(K));return y?(g.w=A.get(y[0].toLowerCase()),K+y[0].length):-1}function S(g,B,K){var y=rt.exec(B.slice(K));return y?(g.w=N.get(y[0].toLowerCase()),K+y[0].length):-1}function C(g,B,K){var y=J.exec(B.slice(K));return y?(g.m=lt.get(y[0].toLowerCase()),K+y[0].length):-1}function E(g,B,K){var y=P.exec(B.slice(K));return y?(g.m=F.get(y[0].toLowerCase()),K+y[0].length):-1}function f(g,B,K){return tt(g,r,B,K)}function b(g,B,K){return tt(g,n,B,K)}function T(g,B,K){return tt(g,i,B,K)}function k(g){return c[g.getDay()]}function X(g){return s[g.getDay()]}function o(g){return D[g.getMonth()]}function q(g){return w[g.getMonth()]}function m(g){return a[+(g.getHours()>=12)]}function dt(g){return 1+~~(g.getMonth()/3)}function d(g){return c[g.getUTCDay()]}function Z(g){return s[g.getUTCDay()]}function Q(g){return D[g.getUTCMonth()]}function ct(g){return w[g.getUTCMonth()]}function ut(g){return a[+(g.getUTCHours()>=12)]}function nt(g){return 1+~~(g.getUTCMonth()/3)}return{format:function(g){var B=u(g+="",it);return B.toString=function(){return g},B},parse:function(g){var B=I(g+="",!1);return B.toString=function(){return g},B},utcFormat:function(g){var B=u(g+="",V);return B.toString=function(){return g},B},utcParse:function(g){var B=I(g+="",!0);return B.toString=function(){return g},B}}}var Zr={"-":"",_:" ","0":"0"},kt=/^\s*\d+/,hi=/^%/,yi=/[\\^$*+?|[\]().{}]/g;function ot(e,r,n){var i=e<0?"-":"",a=(i?-e:e)+"",s=a.length;return i+(s<n?Array(n-s+1).join(r)+a:a)}function gi(e){return e.replace(yi,"\\$&")}function oe(e){return new RegExp("^(?:"+e.map(gi).join("|")+")","i")}function ce(e){return new Map(e.map((r,n)=>[r.toLowerCase(),n]))}function ki(e,r,n){var i=kt.exec(r.slice(n,n+1));return i?(e.w=+i[0],n+i[0].length):-1}function pi(e,r,n){var i=kt.exec(r.slice(n,n+1));return i?(e.u=+i[0],n+i[0].length):-1}function Ti(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.U=+i[0],n+i[0].length):-1}function vi(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.V=+i[0],n+i[0].length):-1}function xi(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.W=+i[0],n+i[0].length):-1}function jr(e,r,n){var i=kt.exec(r.slice(n,n+4));return i?(e.y=+i[0],n+i[0].length):-1}function Xr(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2000),n+i[0].length):-1}function bi(e,r,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(r.slice(n,n+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function wi(e,r,n){var i=kt.exec(r.slice(n,n+1));return i?(e.q=i[0]*3-3,n+i[0].length):-1}function Mi(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.m=i[0]-1,n+i[0].length):-1}function qr(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.d=+i[0],n+i[0].length):-1}function Di(e,r,n){var i=kt.exec(r.slice(n,n+3));return i?(e.m=0,e.d=+i[0],n+i[0].length):-1}function Gr(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.H=+i[0],n+i[0].length):-1}function Ci(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.M=+i[0],n+i[0].length):-1}function Si(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.S=+i[0],n+i[0].length):-1}function _i(e,r,n){var i=kt.exec(r.slice(n,n+3));return i?(e.L=+i[0],n+i[0].length):-1}function Yi(e,r,n){var i=kt.exec(r.slice(n,n+6));return i?(e.L=Math.floor(i[0]/1000),n+i[0].length):-1}function Fi(e,r,n){var i=hi.exec(r.slice(n,n+1));return i?n+i[0].length:-1}function Ii(e,r,n){var i=kt.exec(r.slice(n));return i?(e.Q=+i[0],n+i[0].length):-1}function Ui(e,r,n){var i=kt.exec(r.slice(n));return i?(e.s=+i[0],n+i[0].length):-1}function Qr(e,r){return ot(e.getDate(),r,2)}function Li(e,r){return ot(e.getHours(),r,2)}function Wi(e,r){return ot(e.getHours()%12||12,r,2)}function Ei(e,r){return ot(1+Dt.count(xt(e),e),r,3)}function rn(e,r){return ot(e.getMilliseconds(),r,3)}function Ai(e,r){return rn(e,r)+"000"}function Oi(e,r){return ot(e.getMonth()+1,r,2)}function $i(e,r){return ot(e.getMinutes(),r,2)}function Hi(e,r){return ot(e.getSeconds(),r,2)}function Ni(e){var r=e.getDay();return r===0?7:r}function Pi(e,r){return ot(Ct.count(xt(e)-1,e),r,2)}function nn(e){var r=e.getDay();return r>=4||r===0?It(e):It.ceil(e)}function Vi(e,r){return e=nn(e),ot(It.count(xt(e),e)+(xt(e).getDay()===4),r,2)}function Ri(e){return e.getDay()}function Bi(e,r){return ot(Nt.count(xt(e)-1,e),r,2)}function Zi(e,r){return ot(e.getFullYear()%100,r,2)}function ji(e,r){return e=nn(e),ot(e.getFullYear()%100,r,2)}function Xi(e,r){return ot(e.getFullYear()%1e4,r,4)}function qi(e,r){var n=e.getDay();return e=n>=4||n===0?It(e):It.ceil(e),ot(e.getFullYear()%1e4,r,4)}function Gi(e){var r=e.getTimezoneOffset();return(r>0?"-":(r*=-1,"+"))+ot(r/60|0,"0",2)+ot(r%60,"0",2)}function Jr(e,r){return ot(e.getUTCDate(),r,2)}function Qi(e,r){return ot(e.getUTCHours(),r,2)}function Ji(e,r){return ot(e.getUTCHours()%12||12,r,2)}function Ki(e,r){return ot(1+ae.count(St(e),e),r,3)}function an(e,r){return ot(e.getUTCMilliseconds(),r,3)}function ta(e,r){return an(e,r)+"000"}function ea(e,r){return ot(e.getUTCMonth()+1,r,2)}function ra(e,r){return ot(e.getUTCMinutes(),r,2)}function ia(e,r){return ot(e.getUTCSeconds(),r,2)}function aa(e){var r=e.getUTCDay();return r===0?7:r}function sa(e,r){return ot(Rt.count(St(e)-1,e),r,2)}function sn(e){var r=e.getUTCDay();return r>=4||r===0?Pt(e):Pt.ceil(e)}function oa(e,r){return e=sn(e),ot(Pt.count(St(e),e)+(St(e).getUTCDay()===4),r,2)}function ca(e){return e.getUTCDay()}function ua(e,r){return ot(qt.count(St(e)-1,e),r,2)}function la(e,r){return ot(e.getUTCFullYear()%100,r,2)}function fa(e,r){return e=sn(e),ot(e.getUTCFullYear()%100,r,2)}function da(e,r){return ot(e.getUTCFullYear()%1e4,r,4)}function ma(e,r){var n=e.getUTCDay();return e=n>=4||n===0?Pt(e):Pt.ceil(e),ot(e.getUTCFullYear()%1e4,r,4)}function ha(){return"+0000"}function Kr(){return"%"}function tn(e){return+e}function en(e){return Math.floor(+e/1000)}var Gt,Bt,cn,un,ln;Qe({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 Qe(e){return Gt=Ge(e),Bt=Gt.format,cn=Gt.parse,un=Gt.utcFormat,ln=Gt.utcParse,Gt}function ya(e){return new Date(e)}function ga(e){return e instanceof Date?+e:+new Date(+e)}function fn(e,r,n,i,a,s,c,w,D,H){var _=pu(),{invert:rt,domain:N}=_,Y=H(".%L"),A=H(":%S"),P=H("%I:%M"),F=H("%I %p"),J=H("%a %d"),lt=H("%b %d"),it=H("%B"),V=H("%Y");function M(u){return(D(u)<u?Y:w(u)<u?A:c(u)<u?P:s(u)<u?F:i(u)<u?a(u)<u?J:lt:n(u)<u?it:V)(u)}return _.invert=function(u){return new Date(rt(u))},_.domain=function(u){return arguments.length?N(Array.from(u,ga)):N().map(ya)},_.ticks=function(u){var I=N();return e(I[0],I[I.length-1],u==null?10:u)},_.tickFormat=function(u,I){return I==null?M:H(I)},_.nice=function(u){var I=N();if(!u||typeof u.range!=="function")u=r(I[0],I[I.length-1],u==null?10:u);return u?N(Ve(I,u)):_},_.copy=function(){return fd(_,fn(e,r,n,i,a,s,c,w,D,H))},_}function Je(){return ai.apply(fn(Ze,je,xt,Ot,Ct,Dt,At,Et,vt,Bt).domain([new Date(2000,0,1),new Date(2000,0,2)]),arguments)}var xn=on(Es(),1),bt=on(Fd(),1),bn=on(dn(),1),wn=on(mn(),1),Mn=on(hn(),1),Jt=on(Fd(),1),Wn=on(gn(),1);var cr=function(){var e=t(function(E,f,b,T){for(b=b||{},T=E.length;T--;b[E[T]]=f);return b},"o"),r=[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],i=[1,27],a=[1,28],s=[1,29],c=[1,30],w=[1,31],D=[1,32],H=[1,33],_=[1,34],rt=[1,9],N=[1,10],Y=[1,11],A=[1,12],P=[1,13],F=[1,14],J=[1,15],lt=[1,16],it=[1,19],V=[1,20],M=[1,21],u=[1,22],I=[1,23],tt=[1,25],et=[1,35],v={trace:t(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:t(function(f,b,T,k,X,o,q){var m=o.length-1;switch(X){case 1:return o[m-1];case 2:this.$=[];break;case 3:o[m-1].push(o[m]),this.$=o[m-1];break;case 4:case 5:this.$=o[m];break;case 6:case 7:this.$=[];break;case 8:k.setWeekday("monday");break;case 9:k.setWeekday("tuesday");break;case 10:k.setWeekday("wednesday");break;case 11:k.setWeekday("thursday");break;case 12:k.setWeekday("friday");break;case 13:k.setWeekday("saturday");break;case 14:k.setWeekday("sunday");break;case 15:k.setWeekend("friday");break;case 16:k.setWeekend("saturday");break;case 17:k.setDateFormat(o[m].substr(11)),this.$=o[m].substr(11);break;case 18:k.enableInclusiveEndDates(),this.$=o[m].substr(18);break;case 19:k.TopAxis(),this.$=o[m].substr(8);break;case 20:k.setAxisFormat(o[m].substr(11)),this.$=o[m].substr(11);break;case 21:k.setTickInterval(o[m].substr(13)),this.$=o[m].substr(13);break;case 22:k.setExcludes(o[m].substr(9)),this.$=o[m].substr(9);break;case 23:k.setIncludes(o[m].substr(9)),this.$=o[m].substr(9);break;case 24:k.setTodayMarker(o[m].substr(12)),this.$=o[m].substr(12);break;case 27:k.setDiagramTitle(o[m].substr(6)),this.$=o[m].substr(6);break;case 28:this.$=o[m].trim(),k.setAccTitle(this.$);break;case 29:case 30:this.$=o[m].trim(),k.setAccDescription(this.$);break;case 31:k.addSection(o[m].substr(8)),this.$=o[m].substr(8);break;case 33:k.addTask(o[m-1],o[m]),this.$="task";break;case 34:this.$=o[m-1],k.setClickEvent(o[m-1],o[m],null);break;case 35:this.$=o[m-2],k.setClickEvent(o[m-2],o[m-1],o[m]);break;case 36:this.$=o[m-2],k.setClickEvent(o[m-2],o[m-1],null),k.setLink(o[m-2],o[m]);break;case 37:this.$=o[m-3],k.setClickEvent(o[m-3],o[m-2],o[m-1]),k.setLink(o[m-3],o[m]);break;case 38:this.$=o[m-2],k.setClickEvent(o[m-2],o[m],null),k.setLink(o[m-2],o[m-1]);break;case 39:this.$=o[m-3],k.setClickEvent(o[m-3],o[m-1],o[m]),k.setLink(o[m-3],o[m-2]);break;case 40:this.$=o[m-1],k.setLink(o[m-1],o[m]);break;case 41:case 47:this.$=o[m-1]+" "+o[m];break;case 42:case 43:case 45:this.$=o[m-2]+" "+o[m-1]+" "+o[m];break;case 44:case 46:this.$=o[m-3]+" "+o[m-2]+" "+o[m-1]+" "+o[m];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:i,14:a,15:s,16:c,17:w,18:D,19:18,20:H,21:_,22:rt,23:N,24:Y,25:A,26:P,27:F,28:J,29:lt,30:it,31:V,33:M,35:u,36:I,37:24,38:tt,40:et},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:36,11:17,12:n,13:i,14:a,15:s,16:c,17:w,18:D,19:18,20:H,21:_,22:rt,23:N,24:Y,25:A,26:P,27:F,28:J,29:lt,30:it,31:V,33:M,35:u,36:I,37:24,38:tt,40:et},e(r,[2,5]),e(r,[2,6]),e(r,[2,17]),e(r,[2,18]),e(r,[2,19]),e(r,[2,20]),e(r,[2,21]),e(r,[2,22]),e(r,[2,23]),e(r,[2,24]),e(r,[2,25]),e(r,[2,26]),e(r,[2,27]),{32:[1,37]},{34:[1,38]},e(r,[2,30]),e(r,[2,31]),e(r,[2,32]),{39:[1,39]},e(r,[2,8]),e(r,[2,9]),e(r,[2,10]),e(r,[2,11]),e(r,[2,12]),e(r,[2,13]),e(r,[2,14]),e(r,[2,15]),e(r,[2,16]),{41:[1,40],43:[1,41]},e(r,[2,4]),e(r,[2,28]),e(r,[2,29]),e(r,[2,33]),e(r,[2,34],{42:[1,42],43:[1,43]}),e(r,[2,40],{41:[1,44]}),e(r,[2,35],{43:[1,45]}),e(r,[2,36]),e(r,[2,38],{42:[1,46]}),e(r,[2,37]),e(r,[2,39])],defaultActions:{},parseError:t(function(f,b){if(b.recoverable)this.trace(f);else{var T=Error(f);throw T.hash=b,T}},"parseError"),parse:t(function(f){var b=this,T=[0],k=[],X=[null],o=[],q=this.table,m="",dt=0,d=0,Z=0,Q=2,ct=1,ut=o.slice.call(arguments,1),nt=Object.create(this.lexer),g={yy:{}};for(var B in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,B))g.yy[B]=this.yy[B];if(nt.setInput(f,g.yy),g.yy.lexer=nt,g.yy.parser=this,typeof nt.yylloc>"u")nt.yylloc={};var K=nt.yylloc;o.push(K);var y=nt.options&&nt.options.ranges;if(typeof g.yy.parseError==="function")this.parseError=g.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function mt(wt){T.length=T.length-2*wt,X.length=X.length-wt,o.length=o.length-wt}t(mt,"popStack");function at(){var wt=k.pop()||nt.lex()||ct;if(typeof wt!=="number"){if(wt instanceof Array)k=wt,wt=k.pop();wt=b.symbols_[wt]||wt}return wt}t(at,"lex");var st,ht,yt,pt,os,Ye,jt={},le,Lt,br,fe;while(!0){if(yt=T[T.length-1],this.defaultActions[yt])pt=this.defaultActions[yt];else{if(st===null||typeof st>"u")st=at();pt=q[yt]&&q[yt][st]}if(typeof pt>"u"||!pt.length||!pt[0]){var Fe="";fe=[];for(le in q[yt])if(this.terminals_[le]&&le>Q)fe.push("'"+this.terminals_[le]+"'");if(nt.showPosition)Fe="Parse error on line "+(dt+1)+`:
1
+ import{t,Fd,l,x,te,R,L,z,O,U,j,G,p,h,Io,Dl,_o,bf,kn,bA,Ui,oi,Bs,W}from"./index-5y0bvq4q.js";import{Al,du,fd,pu,na}from"./index-z0cpp5bc.js";import{on,vn}from"./index-b9b2nwdd.js";var dn=vn(function(Ke,tr){(function(e,r){typeof Ke=="object"&&typeof tr<"u"?tr.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_isoWeek=r()})(Ke,function(){var e="day";return function(r,n,i){var a=function(w){return w.add(4-w.isoWeekday(),e)},s=n.prototype;s.isoWeekYear=function(){return a(this).year()},s.isoWeek=function(w){if(!this.$utils().u(w))return this.add(7*(w-this.isoWeek()),e);var D,H,_,rt,N=a(this),Y=(D=this.isoWeekYear(),H=this.$u,_=(H?i.utc:i)().year(D).startOf("year"),rt=4-_.isoWeekday(),_.isoWeekday()>4&&(rt+=7),_.add(rt,e));return N.diff(Y,"week")+1},s.isoWeekday=function(w){return this.$utils().u(w)?this.day()||7:this.day(this.day()%7?w:w-7)};var c=s.startOf;s.startOf=function(w,D){var H=this.$utils(),_=!!H.u(D)||D;return H.p(w)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):c.bind(this)(w,D)}}})});var mn=vn(function(er,rr){(function(e,r){typeof er=="object"&&typeof rr<"u"?rr.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=r()})(er,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"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,i=/\d\d/,a=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,c={},w=function(A){return(A=+A)+(A>68?1900:2000)},D=function(A){return function(P){this[A]=+P}},H=[/[+-]\d\d:?(\d\d)?|Z/,function(A){(this.zone||(this.zone={})).offset=function(P){if(!P)return 0;if(P==="Z")return 0;var F=P.match(/([+-]|\d\d)/g),J=60*F[1]+(+F[2]||0);return J===0?0:F[0]==="+"?-J:J}(A)}],_=function(A){var P=c[A];return P&&(P.indexOf?P:P.s.concat(P.f))},rt=function(A,P){var F,J=c.meridiem;if(J){for(var lt=1;lt<=24;lt+=1)if(A.indexOf(J(lt,0,P))>-1){F=lt>12;break}}else F=A===(P?"pm":"PM");return F},N={A:[s,function(A){this.afternoon=rt(A,!1)}],a:[s,function(A){this.afternoon=rt(A,!0)}],Q:[n,function(A){this.month=3*(A-1)+1}],S:[n,function(A){this.milliseconds=100*+A}],SS:[i,function(A){this.milliseconds=10*+A}],SSS:[/\d{3}/,function(A){this.milliseconds=+A}],s:[a,D("seconds")],ss:[a,D("seconds")],m:[a,D("minutes")],mm:[a,D("minutes")],H:[a,D("hours")],h:[a,D("hours")],HH:[a,D("hours")],hh:[a,D("hours")],D:[a,D("day")],DD:[i,D("day")],Do:[s,function(A){var P=c.ordinal,F=A.match(/\d+/);if(this.day=F[0],P)for(var J=1;J<=31;J+=1)P(J).replace(/\[|\]/g,"")===A&&(this.day=J)}],w:[a,D("week")],ww:[i,D("week")],M:[a,D("month")],MM:[i,D("month")],MMM:[s,function(A){var P=_("months"),F=(_("monthsShort")||P.map(function(J){return J.slice(0,3)})).indexOf(A)+1;if(F<1)throw Error();this.month=F%12||F}],MMMM:[s,function(A){var P=_("months").indexOf(A)+1;if(P<1)throw Error();this.month=P%12||P}],Y:[/[+-]?\d+/,D("year")],YY:[i,function(A){this.year=w(A)}],YYYY:[/\d{4}/,D("year")],Z:H,ZZ:H};function Y(A){var P,F;P=A,F=c&&c.formats;for(var J=(A=P.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(tt,et,v){var S=v&&v.toUpperCase();return et||F[v]||e[v]||F[S].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(C,E,f){return E||f.slice(1)})})).match(r),lt=J.length,it=0;it<lt;it+=1){var V=J[it],M=N[V],u=M&&M[0],I=M&&M[1];J[it]=I?{regex:u,parser:I}:V.replace(/^\[|\]$/g,"")}return function(tt){for(var et={},v=0,S=0;v<lt;v+=1){var C=J[v];if(typeof C=="string")S+=C.length;else{var{regex:E,parser:f}=C,b=tt.slice(S),T=E.exec(b)[0];f.call(et,T),tt=tt.replace(T,"")}}return function(k){var X=k.afternoon;if(X!==void 0){var o=k.hours;X?o<12&&(k.hours+=12):o===12&&(k.hours=0),delete k.afternoon}}(et),et}}return function(A,P,F){F.p.customParseFormat=!0,A&&A.parseTwoDigitYear&&(w=A.parseTwoDigitYear);var J=P.prototype,lt=J.parse;J.parse=function(it){var{date:V,utc:M,args:u}=it;this.$u=M;var I=u[1];if(typeof I=="string"){var tt=u[2]===!0,et=u[3]===!0,v=tt||et,S=u[2];et&&(S=u[2]),c=this.$locale(),!tt&&S&&(c=F.Ls[S]),this.$d=function(b,T,k,X){try{if(["x","X"].indexOf(T)>-1)return new Date((T==="X"?1000:1)*b);var o=Y(T)(b),{year:q,month:m,day:dt,hours:d,minutes:Z,seconds:Q,milliseconds:ct,zone:ut,week:nt}=o,g=new Date,B=dt||(q||m?1:g.getDate()),K=q||g.getFullYear(),y=0;q&&!m||(y=m>0?m-1:g.getMonth());var mt,at=d||0,st=Z||0,ht=Q||0,yt=ct||0;return ut?new Date(Date.UTC(K,y,B,at,st,ht,yt+60*ut.offset*1000)):k?new Date(Date.UTC(K,y,B,at,st,ht,yt)):(mt=new Date(K,y,B,at,st,ht,yt),nt&&(mt=X(mt).week(nt).toDate()),mt)}catch(pt){return new Date("")}}(V,I,M,F),this.init(),S&&S!==!0&&(this.$L=this.locale(S).$L),v&&V!=this.format(I)&&(this.$d=new Date("")),c={}}else if(I instanceof Array)for(var C=I.length,E=1;E<=C;E+=1){u[1]=I[E-1];var f=F.apply(this,u);if(f.isValid()){this.$d=f.$d,this.$L=f.$L,this.init();break}E===C&&(this.$d=new Date(""))}else lt.call(this,it)}}})});var hn=vn(function(nr,ir){(function(e,r){typeof nr=="object"&&typeof ir<"u"?ir.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_advancedFormat=r()})(nr,function(){return function(e,r){var n=r.prototype,i=n.format;n.format=function(a){var s=this,c=this.$locale();if(!this.isValid())return i.bind(this)(a);var w=this.$utils(),D=(a||"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(H){switch(H){case"Q":return Math.ceil((s.$M+1)/3);case"Do":return c.ordinal(s.$D);case"gggg":return s.weekYear();case"GGGG":return s.isoWeekYear();case"wo":return c.ordinal(s.week(),"W");case"w":case"ww":return w.s(s.week(),H==="w"?1:2,"0");case"W":case"WW":return w.s(s.isoWeek(),H==="W"?1:2,"0");case"k":case"kk":return w.s(String(s.$H===0?24:s.$H),H==="k"?1:2,"0");case"X":return Math.floor(s.$d.getTime()/1000);case"x":return s.$d.getTime();case"z":return"["+s.offsetName()+"]";case"zzz":return"["+s.offsetName("long")+"]";default:return H}});return i.bind(this)(D)}}})});var yn=vn(function(ar,sr){(function(e,r){typeof ar=="object"&&typeof sr<"u"?sr.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_duration=r()})(ar,function(){var e,r,n=1000,i=60000,a=3600000,s=86400000,c=31536000000,w=2628000000,D=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,H=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,_={years:c,months:w,days:s,hours:a,minutes:i,seconds:n,milliseconds:1,weeks:604800000},rt=function(V){return V instanceof lt},N=function(V,M,u){return new lt(V,u,M.$l)},Y=function(V){return r.p(V)+"s"},A=function(V){return V<0},P=function(V){return A(V)?Math.ceil(V):Math.floor(V)},F=function(V){return Math.abs(V)},J=function(V,M){return V?A(V)?{negative:!0,format:""+F(V)+M}:{negative:!1,format:""+V+M}:{negative:!1,format:""}},lt=function(){function V(u,I,tt){var et=this;if(this.$d={},this.$l=tt,u===void 0&&(this.$ms=0,this.parseFromMilliseconds()),I)return N(u*_[Y(I)],this);if(typeof u=="number")return this.$ms=u,this.parseFromMilliseconds(),this;if(typeof u=="object")return Object.keys(u).forEach(function(C){et.$d[Y(C)]=u[C]}),this.calMilliseconds(),this;if(typeof u=="string"){var v=u.match(D);if(v){var S=v.slice(2).map(function(C){return C!=null?Number(C):0});return this.$d.years=S[0],this.$d.months=S[1],this.$d.weeks=S[2],this.$d.days=S[3],this.$d.hours=S[4],this.$d.minutes=S[5],this.$d.seconds=S[6],this.calMilliseconds(),this}}return this}var M=V.prototype;return M.calMilliseconds=function(){var u=this;this.$ms=Object.keys(this.$d).reduce(function(I,tt){return I+(u.$d[tt]||0)*_[tt]},0)},M.parseFromMilliseconds=function(){var u=this.$ms;this.$d.years=P(u/c),u%=c,this.$d.months=P(u/w),u%=w,this.$d.days=P(u/s),u%=s,this.$d.hours=P(u/a),u%=a,this.$d.minutes=P(u/i),u%=i,this.$d.seconds=P(u/n),u%=n,this.$d.milliseconds=u},M.toISOString=function(){var u=J(this.$d.years,"Y"),I=J(this.$d.months,"M"),tt=+this.$d.days||0;this.$d.weeks&&(tt+=7*this.$d.weeks);var et=J(tt,"D"),v=J(this.$d.hours,"H"),S=J(this.$d.minutes,"M"),C=this.$d.seconds||0;this.$d.milliseconds&&(C+=this.$d.milliseconds/1000,C=Math.round(1000*C)/1000);var E=J(C,"S"),f=u.negative||I.negative||et.negative||v.negative||S.negative||E.negative,b=v.format||S.format||E.format?"T":"",T=(f?"-":"")+"P"+u.format+I.format+et.format+b+v.format+S.format+E.format;return T==="P"||T==="-P"?"P0D":T},M.toJSON=function(){return this.toISOString()},M.format=function(u){var I=u||"YYYY-MM-DDTHH:mm:ss",tt={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return I.replace(H,function(et,v){return v||String(tt[et])})},M.as=function(u){return this.$ms/_[Y(u)]},M.get=function(u){var I=this.$ms,tt=Y(u);return tt==="milliseconds"?I%=1000:I=tt==="weeks"?P(I/_[tt]):this.$d[tt],I||0},M.add=function(u,I,tt){var et;return et=I?u*_[Y(I)]:rt(u)?u.$ms:N(u,this).$ms,N(this.$ms+et*(tt?-1:1),this)},M.subtract=function(u,I){return this.add(u,I,!0)},M.locale=function(u){var I=this.clone();return I.$l=u,I},M.clone=function(){return N(this.$ms,this)},M.humanize=function(u){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!u)},M.valueOf=function(){return this.asMilliseconds()},M.milliseconds=function(){return this.get("milliseconds")},M.asMilliseconds=function(){return this.as("milliseconds")},M.seconds=function(){return this.get("seconds")},M.asSeconds=function(){return this.as("seconds")},M.minutes=function(){return this.get("minutes")},M.asMinutes=function(){return this.as("minutes")},M.hours=function(){return this.get("hours")},M.asHours=function(){return this.as("hours")},M.days=function(){return this.get("days")},M.asDays=function(){return this.as("days")},M.weeks=function(){return this.get("weeks")},M.asWeeks=function(){return this.as("weeks")},M.months=function(){return this.get("months")},M.asMonths=function(){return this.as("months")},M.years=function(){return this.get("years")},M.asYears=function(){return this.as("years")},V}(),it=function(V,M,u){return V.add(M.years()*u,"y").add(M.months()*u,"M").add(M.days()*u,"d").add(M.hours()*u,"h").add(M.minutes()*u,"m").add(M.seconds()*u,"s").add(M.milliseconds()*u,"ms")};return function(V,M,u){e=u,r=u().$utils(),u.duration=function(et,v){var S=u.locale();return N(et,{$l:S},v)},u.isDuration=rt;var I=M.prototype.add,tt=M.prototype.subtract;M.prototype.add=function(et,v){return rt(et)?it(this,et,1):I.bind(this)(et,v)},M.prototype.subtract=function(et,v){return rt(et)?it(this,et,-1):tt.bind(this)(et,v)}}})});function Ie(e,r){let n;if(r===void 0){for(let i of e)if(i!=null&&(n<i||n===void 0&&i>=i))n=i}else{let i=-1;for(let a of e)if((a=r(a,++i,e))!=null&&(n<a||n===void 0&&a>=a))n=a}return n}function Ue(e,r){let n;if(r===void 0){for(let i of e)if(i!=null&&(n>i||n===void 0&&i>=i))n=i}else{let i=-1;for(let a of e)if((a=r(a,++i,e))!=null&&(n>a||n===void 0&&a>=a))n=a}return n}function Le(e){return e}var me=1,We=2,Ee=3,de=4,wr=0.000001;function En(e){return"translate("+e+",0)"}function An(e){return"translate(0,"+e+")"}function On(e){return(r)=>+e(r)}function $n(e,r){if(r=Math.max(0,e.bandwidth()-r*2)/2,e.round())r=Math.round(r);return(n)=>+e(n)+r}function Hn(){return!this.__axis}function Mr(e,r){var n=[],i=null,a=null,s=6,c=6,w=3,D=typeof window<"u"&&window.devicePixelRatio>1?0:0.5,H=e===me||e===de?-1:1,_=e===de||e===We?"x":"y",rt=e===me||e===Ee?En:An;function N(Y){var A=i==null?r.ticks?r.ticks.apply(r,n):r.domain():i,P=a==null?r.tickFormat?r.tickFormat.apply(r,n):Le:a,F=Math.max(s,0)+w,J=r.range(),lt=+J[0]+D,it=+J[J.length-1]+D,V=(r.bandwidth?$n:On)(r.copy(),D),M=Y.selection?Y.selection():Y,u=M.selectAll(".domain").data([null]),I=M.selectAll(".tick").data(A,r).order(),tt=I.exit(),et=I.enter().append("g").attr("class","tick"),v=I.select("line"),S=I.select("text");if(u=u.merge(u.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),I=I.merge(et),v=v.merge(et.append("line").attr("stroke","currentColor").attr(_+"2",H*s)),S=S.merge(et.append("text").attr("fill","currentColor").attr(_,H*F).attr("dy",e===me?"0em":e===Ee?"0.71em":"0.32em")),Y!==M)u=u.transition(Y),I=I.transition(Y),v=v.transition(Y),S=S.transition(Y),tt=tt.transition(Y).attr("opacity",wr).attr("transform",function(C){return isFinite(C=V(C))?rt(C+D):this.getAttribute("transform")}),et.attr("opacity",wr).attr("transform",function(C){var E=this.parentNode.__axis;return rt((E&&isFinite(E=E(C))?E:V(C))+D)});tt.remove(),u.attr("d",e===de||e===We?c?"M"+H*c+","+lt+"H"+D+"V"+it+"H"+H*c:"M"+D+","+lt+"V"+it:c?"M"+lt+","+H*c+"V"+D+"H"+it+"V"+H*c:"M"+lt+","+D+"H"+it),I.attr("opacity",1).attr("transform",function(C){return rt(V(C)+D)}),v.attr(_+"2",H*s),S.attr(_,H*F).text(P),M.filter(Hn).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===We?"start":e===de?"end":"middle"),M.each(function(){this.__axis=V})}return N.scale=function(Y){return arguments.length?(r=Y,N):r},N.ticks=function(){return n=Array.from(arguments),N},N.tickArguments=function(Y){return arguments.length?(n=Y==null?[]:Array.from(Y),N):n.slice()},N.tickValues=function(Y){return arguments.length?(i=Y==null?null:Array.from(Y),N):i&&i.slice()},N.tickFormat=function(Y){return arguments.length?(a=Y,N):a},N.tickSize=function(Y){return arguments.length?(s=c=+Y,N):s},N.tickSizeInner=function(Y){return arguments.length?(s=+Y,N):s},N.tickSizeOuter=function(Y){return arguments.length?(c=+Y,N):c},N.tickPadding=function(Y){return arguments.length?(w=+Y,N):w},N.offset=function(Y){return arguments.length?(D=+Y,N):D},N}function Ae(e){return Mr(me,e)}function Oe(e){return Mr(Ee,e)}var Dr=Math.PI/180,Cr=180/Math.PI;var he=18,Sr=0.96422,_r=1,Yr=0.82521,Fr=0.13793103448275862,Xt=0.20689655172413793,Ir=3*Xt*Xt,Nn=Xt*Xt*Xt;function Ur(e){if(e instanceof _t)return new _t(e.l,e.a,e.b,e.opacity);if(e instanceof Wt)return Wr(e);if(!(e instanceof kn))e=bf(e);var r=Pe(e.r),n=Pe(e.g),i=Pe(e.b),a=$e((0.2225045*r+0.7168786*n+0.0606169*i)/_r),s,c;if(r===n&&n===i)s=c=a;else s=$e((0.4360747*r+0.3850649*n+0.1430804*i)/Sr),c=$e((0.0139322*r+0.0971045*n+0.7141733*i)/Yr);return new _t(116*a-16,500*(s-a),200*(a-c),e.opacity)}function Lr(e,r,n,i){return arguments.length===1?Ur(e):new _t(e,r,n,i==null?1:i)}function _t(e,r,n,i){this.l=+e,this.a=+r,this.b=+n,this.opacity=+i}Io(_t,Lr,Dl(_o,{brighter(e){return new _t(this.l+he*(e==null?1:e),this.a,this.b,this.opacity)},darker(e){return new _t(this.l-he*(e==null?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,r=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return r=Sr*He(r),e=_r*He(e),n=Yr*He(n),new kn(Ne(3.1338561*r-1.6168667*e-0.4906146*n),Ne(-0.9787684*r+1.9161415*e+0.033454*n),Ne(0.0719453*r-0.2289914*e+1.4052427*n),this.opacity)}}));function $e(e){return e>Nn?Math.pow(e,0.3333333333333333):e/Ir+Fr}function He(e){return e>Xt?e*e*e:Ir*(e-Fr)}function Ne(e){return 255*(e<=0.0031308?12.92*e:1.055*Math.pow(e,0.4166666666666667)-0.055)}function Pe(e){return(e/=255)<=0.04045?e/12.92:Math.pow((e+0.055)/1.055,2.4)}function Pn(e){if(e instanceof Wt)return new Wt(e.h,e.c,e.l,e.opacity);if(!(e instanceof _t))e=Ur(e);if(e.a===0&&e.b===0)return new Wt(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var r=Math.atan2(e.b,e.a)*Cr;return new Wt(r<0?r+360:r,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function ye(e,r,n,i){return arguments.length===1?Pn(e):new Wt(e,r,n,i==null?1:i)}function Wt(e,r,n,i){this.h=+e,this.c=+r,this.l=+n,this.opacity=+i}function Wr(e){if(isNaN(e.h))return new _t(e.l,0,0,e.opacity);var r=e.h*Dr;return new _t(e.l,Math.cos(r)*e.c,Math.sin(r)*e.c,e.opacity)}Io(Wt,ye,Dl(_o,{brighter(e){return new Wt(this.h,this.c,this.l+he*(e==null?1:e),this.opacity)},darker(e){return new Wt(this.h,this.c,this.l-he*(e==null?1:e),this.opacity)},rgb(){return Wr(this).rgb()}}));function Er(e){return function(r,n){var i=e((r=ye(r)).h,(n=ye(n)).h),a=Ui(r.c,n.c),s=Ui(r.l,n.l),c=Ui(r.opacity,n.opacity);return function(w){return r.h=i(w),r.c=a(w),r.l=s(w),r.opacity=c(w),r+""}}}var Ar=Er(bA),Ms=Er(Ui);function Ve(e,r){e=e.slice();var n=0,i=e.length-1,a=e[n],s=e[i],c;if(s<a)c=n,n=i,i=c,c=a,a=s,s=c;return e[n]=r.floor(a),e[i]=r.ceil(s),e}var ze=new Date,Re=new Date;function ft(e,r,n,i){function a(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}if(a.floor=(s)=>(e(s=new Date(+s)),s),a.ceil=(s)=>(e(s=new Date(s-1)),r(s,1),e(s),s),a.round=(s)=>{let c=a(s),w=a.ceil(s);return s-c<w-s?c:w},a.offset=(s,c)=>(r(s=new Date(+s),c==null?1:Math.floor(c)),s),a.range=(s,c,w)=>{let D=[];if(s=a.ceil(s),w=w==null?1:Math.floor(w),!(s<c)||!(w>0))return D;let H;do D.push(H=new Date(+s)),r(s,w),e(s);while(H<s&&s<c);return D},a.filter=(s)=>ft((c)=>{if(c>=c)while(e(c),!s(c))c.setTime(c-1)},(c,w)=>{if(c>=c)if(w<0)while(++w<=0)while(r(c,-1),!s(c));else while(--w>=0)while(r(c,1),!s(c));}),n)a.count=(s,c)=>(ze.setTime(+s),Re.setTime(+c),e(ze),e(Re),Math.floor(n(ze,Re))),a.every=(s)=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:!(s>1)?a:a.filter(i?(c)=>i(c)%s===0:(c)=>a.count(0,c)%s===0));return a}var Yt=ft(()=>{},(e,r)=>{e.setTime(+e+r)},(e,r)=>r-e);Yt.every=(e)=>{if(e=Math.floor(e),!isFinite(e)||!(e>0))return null;if(!(e>1))return Yt;return ft((r)=>{r.setTime(Math.floor(r/e)*e)},(r,n)=>{r.setTime(+r+n*e)},(r,n)=>(n-r)/e)};var Or=Yt.range;var Mt=1000,Tt=60000,Ft=3600000,Ht=86400000,ie=604800000,Be=2592000000,ge=31536000000;var vt=ft((e)=>{e.setTime(e-e.getMilliseconds())},(e,r)=>{e.setTime(+e+r*Mt)},(e,r)=>(r-e)/Mt,(e)=>e.getUTCSeconds()),$r=vt.range;var Et=ft((e)=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Mt)},(e,r)=>{e.setTime(+e+r*Tt)},(e,r)=>(r-e)/Tt,(e)=>e.getMinutes()),Vn=Et.range,ke=ft((e)=>{e.setUTCSeconds(0,0)},(e,r)=>{e.setTime(+e+r*Tt)},(e,r)=>(r-e)/Tt,(e)=>e.getUTCMinutes()),zn=ke.range;var At=ft((e)=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Mt-e.getMinutes()*Tt)},(e,r)=>{e.setTime(+e+r*Ft)},(e,r)=>(r-e)/Ft,(e)=>e.getHours()),Rn=At.range,pe=ft((e)=>{e.setUTCMinutes(0,0,0)},(e,r)=>{e.setTime(+e+r*Ft)},(e,r)=>(r-e)/Ft,(e)=>e.getUTCHours()),Bn=pe.range;var Dt=ft((e)=>e.setHours(0,0,0,0),(e,r)=>e.setDate(e.getDate()+r),(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*Tt)/Ht,(e)=>e.getDate()-1),Zn=Dt.range,ae=ft((e)=>{e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r)},(e,r)=>(r-e)/Ht,(e)=>e.getUTCDate()-1),jn=ae.range,Te=ft((e)=>{e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r)},(e,r)=>(r-e)/Ht,(e)=>Math.floor(e/Ht)),Xn=Te.range;function Vt(e){return ft((r)=>{r.setDate(r.getDate()-(r.getDay()+7-e)%7),r.setHours(0,0,0,0)},(r,n)=>{r.setDate(r.getDate()+n*7)},(r,n)=>(n-r-(n.getTimezoneOffset()-r.getTimezoneOffset())*Tt)/ie)}var Ct=Vt(0),Nt=Vt(1),ve=Vt(2),xe=Vt(3),It=Vt(4),be=Vt(5),we=Vt(6),Hr=Ct.range,qn=Nt.range,Gn=ve.range,Qn=xe.range,Jn=It.range,Kn=be.range,ti=we.range;function zt(e){return ft((r)=>{r.setUTCDate(r.getUTCDate()-(r.getUTCDay()+7-e)%7),r.setUTCHours(0,0,0,0)},(r,n)=>{r.setUTCDate(r.getUTCDate()+n*7)},(r,n)=>(n-r)/ie)}var Rt=zt(0),qt=zt(1),Nr=zt(2),Pr=zt(3),Pt=zt(4),Vr=zt(5),zr=zt(6),Rr=Rt.range,ei=qt.range,ri=Nr.range,ni=Pr.range,ii=Pt.range,ai=Vr.range,si=zr.range;var Ot=ft((e)=>{e.setDate(1),e.setHours(0,0,0,0)},(e,r)=>{e.setMonth(e.getMonth()+r)},(e,r)=>r.getMonth()-e.getMonth()+(r.getFullYear()-e.getFullYear())*12,(e)=>e.getMonth()),ci=Ot.range,Me=ft((e)=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCMonth(e.getUTCMonth()+r)},(e,r)=>r.getUTCMonth()-e.getUTCMonth()+(r.getUTCFullYear()-e.getUTCFullYear())*12,(e)=>e.getUTCMonth()),ui=Me.range;var xt=ft((e)=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r)},(e,r)=>r.getFullYear()-e.getFullYear(),(e)=>e.getFullYear());xt.every=(e)=>!isFinite(e=Math.floor(e))||!(e>0)?null:ft((r)=>{r.setFullYear(Math.floor(r.getFullYear()/e)*e),r.setMonth(0,1),r.setHours(0,0,0,0)},(r,n)=>{r.setFullYear(r.getFullYear()+n*e)});var li=xt.range,St=ft((e)=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r)},(e,r)=>r.getUTCFullYear()-e.getUTCFullYear(),(e)=>e.getUTCFullYear());St.every=(e)=>!isFinite(e=Math.floor(e))||!(e>0)?null:ft((r)=>{r.setUTCFullYear(Math.floor(r.getUTCFullYear()/e)*e),r.setUTCMonth(0,1),r.setUTCHours(0,0,0,0)},(r,n)=>{r.setUTCFullYear(r.getUTCFullYear()+n*e)});var fi=St.range;function Br(e,r,n,i,a,s){let c=[[vt,1,Mt],[vt,5,5*Mt],[vt,15,15*Mt],[vt,30,30*Mt],[s,1,Tt],[s,5,5*Tt],[s,15,15*Tt],[s,30,30*Tt],[a,1,Ft],[a,3,3*Ft],[a,6,6*Ft],[a,12,12*Ft],[i,1,Ht],[i,2,2*Ht],[n,1,ie],[r,1,Be],[r,3,3*Be],[e,1,ge]];function w(H,_,rt){let N=_<H;if(N)[H,_]=[_,H];let Y=rt&&typeof rt.range==="function"?rt:D(H,_,rt),A=Y?Y.range(H,+_+1):[];return N?A.reverse():A}function D(H,_,rt){let N=Math.abs(_-H)/rt,Y=Al(([,,F])=>F).right(c,N);if(Y===c.length)return e.every(du(H/ge,_/ge,rt));if(Y===0)return Yt.every(Math.max(du(H,_,rt),1));let[A,P]=c[N/c[Y-1][2]<c[Y][2]/N?Y-1:Y];return A.every(P)}return[w,D]}var[di,mi]=Br(St,Me,Rt,Te,pe,ke),[Ze,je]=Br(xt,Ot,Ct,Dt,At,Et);function Xe(e){if(0<=e.y&&e.y<100){var r=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return r.setFullYear(e.y),r}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function qe(e){if(0<=e.y&&e.y<100){var r=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return r.setUTCFullYear(e.y),r}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function se(e,r,n){return{y:e,m:r,d:n,H:0,M:0,S:0,L:0}}function Ge(e){var{dateTime:r,date:n,time:i,periods:a,days:s,shortDays:c,months:w,shortMonths:D}=e,H=oe(a),_=ce(a),rt=oe(s),N=ce(s),Y=oe(c),A=ce(c),P=oe(w),F=ce(w),J=oe(D),lt=ce(D),it={a:k,A:X,b:o,B:q,c:null,d:Qr,e:Qr,f:Oi,g:ji,G:qi,H:Wi,I:Ei,j:Ai,L:rn,m:$i,M:Hi,p:m,q:dt,Q:tn,s:en,S:Ni,u:Pi,U:Vi,V:zi,w:Ri,W:Bi,x:null,X:null,y:Zi,Y:Xi,Z:Gi,"%":Kr},V={a:d,A:Z,b:Q,B:ct,c:null,d:Jr,e:Jr,f:ta,g:fa,G:ma,H:Qi,I:Ji,j:Ki,L:an,m:ea,M:ra,p:ut,q:nt,Q:tn,s:en,S:ia,u:aa,U:sa,V:oa,w:ca,W:ua,x:null,X:null,y:la,Y:da,Z:ha,"%":Kr},M={a:v,A:S,b:C,B:E,c:f,d:qr,e:qr,f:Yi,g:Xr,G:jr,H:Gr,I:Gr,j:Di,L:_i,m:Mi,M:Ci,p:et,q:wi,Q:Ii,s:Li,S:Si,u:pi,U:Ti,V:vi,w:ki,W:xi,x:b,X:T,y:Xr,Y:jr,Z:bi,"%":Fi};it.x=u(n,it),it.X=u(i,it),it.c=u(r,it),V.x=u(n,V),V.X=u(i,V),V.c=u(r,V);function u(g,B){return function(K){var y=[],mt=-1,at=0,st=g.length,ht,yt,pt;if(!(K instanceof Date))K=new Date(+K);while(++mt<st)if(g.charCodeAt(mt)===37){if(y.push(g.slice(at,mt)),(yt=Zr[ht=g.charAt(++mt)])!=null)ht=g.charAt(++mt);else yt=ht==="e"?" ":"0";if(pt=B[ht])ht=pt(K,yt);y.push(ht),at=mt+1}return y.push(g.slice(at,mt)),y.join("")}}function I(g,B){return function(K){var y=se(1900,void 0,1),mt=tt(y,g,K+="",0),at,st;if(mt!=K.length)return null;if("Q"in y)return new Date(y.Q);if("s"in y)return new Date(y.s*1000+("L"in y?y.L:0));if(B&&!("Z"in y))y.Z=0;if("p"in y)y.H=y.H%12+y.p*12;if(y.m===void 0)y.m="q"in y?y.q:0;if("V"in y){if(y.V<1||y.V>53)return null;if(!("w"in y))y.w=1;if("Z"in y)at=qe(se(y.y,0,1)),st=at.getUTCDay(),at=st>4||st===0?qt.ceil(at):qt(at),at=ae.offset(at,(y.V-1)*7),y.y=at.getUTCFullYear(),y.m=at.getUTCMonth(),y.d=at.getUTCDate()+(y.w+6)%7;else at=Xe(se(y.y,0,1)),st=at.getDay(),at=st>4||st===0?Nt.ceil(at):Nt(at),at=Dt.offset(at,(y.V-1)*7),y.y=at.getFullYear(),y.m=at.getMonth(),y.d=at.getDate()+(y.w+6)%7}else if("W"in y||"U"in y){if(!("w"in y))y.w="u"in y?y.u%7:("W"in y)?1:0;st="Z"in y?qe(se(y.y,0,1)).getUTCDay():Xe(se(y.y,0,1)).getDay(),y.m=0,y.d="W"in y?(y.w+6)%7+y.W*7-(st+5)%7:y.w+y.U*7-(st+6)%7}if("Z"in y)return y.H+=y.Z/100|0,y.M+=y.Z%100,qe(y);return Xe(y)}}function tt(g,B,K,y){var mt=0,at=B.length,st=K.length,ht,yt;while(mt<at){if(y>=st)return-1;if(ht=B.charCodeAt(mt++),ht===37){if(ht=B.charAt(mt++),yt=M[ht in Zr?B.charAt(mt++):ht],!yt||(y=yt(g,K,y))<0)return-1}else if(ht!=K.charCodeAt(y++))return-1}return y}function et(g,B,K){var y=H.exec(B.slice(K));return y?(g.p=_.get(y[0].toLowerCase()),K+y[0].length):-1}function v(g,B,K){var y=Y.exec(B.slice(K));return y?(g.w=A.get(y[0].toLowerCase()),K+y[0].length):-1}function S(g,B,K){var y=rt.exec(B.slice(K));return y?(g.w=N.get(y[0].toLowerCase()),K+y[0].length):-1}function C(g,B,K){var y=J.exec(B.slice(K));return y?(g.m=lt.get(y[0].toLowerCase()),K+y[0].length):-1}function E(g,B,K){var y=P.exec(B.slice(K));return y?(g.m=F.get(y[0].toLowerCase()),K+y[0].length):-1}function f(g,B,K){return tt(g,r,B,K)}function b(g,B,K){return tt(g,n,B,K)}function T(g,B,K){return tt(g,i,B,K)}function k(g){return c[g.getDay()]}function X(g){return s[g.getDay()]}function o(g){return D[g.getMonth()]}function q(g){return w[g.getMonth()]}function m(g){return a[+(g.getHours()>=12)]}function dt(g){return 1+~~(g.getMonth()/3)}function d(g){return c[g.getUTCDay()]}function Z(g){return s[g.getUTCDay()]}function Q(g){return D[g.getUTCMonth()]}function ct(g){return w[g.getUTCMonth()]}function ut(g){return a[+(g.getUTCHours()>=12)]}function nt(g){return 1+~~(g.getUTCMonth()/3)}return{format:function(g){var B=u(g+="",it);return B.toString=function(){return g},B},parse:function(g){var B=I(g+="",!1);return B.toString=function(){return g},B},utcFormat:function(g){var B=u(g+="",V);return B.toString=function(){return g},B},utcParse:function(g){var B=I(g+="",!0);return B.toString=function(){return g},B}}}var Zr={"-":"",_:" ","0":"0"},kt=/^\s*\d+/,hi=/^%/,yi=/[\\^$*+?|[\]().{}]/g;function ot(e,r,n){var i=e<0?"-":"",a=(i?-e:e)+"",s=a.length;return i+(s<n?Array(n-s+1).join(r)+a:a)}function gi(e){return e.replace(yi,"\\$&")}function oe(e){return new RegExp("^(?:"+e.map(gi).join("|")+")","i")}function ce(e){return new Map(e.map((r,n)=>[r.toLowerCase(),n]))}function ki(e,r,n){var i=kt.exec(r.slice(n,n+1));return i?(e.w=+i[0],n+i[0].length):-1}function pi(e,r,n){var i=kt.exec(r.slice(n,n+1));return i?(e.u=+i[0],n+i[0].length):-1}function Ti(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.U=+i[0],n+i[0].length):-1}function vi(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.V=+i[0],n+i[0].length):-1}function xi(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.W=+i[0],n+i[0].length):-1}function jr(e,r,n){var i=kt.exec(r.slice(n,n+4));return i?(e.y=+i[0],n+i[0].length):-1}function Xr(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2000),n+i[0].length):-1}function bi(e,r,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(r.slice(n,n+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function wi(e,r,n){var i=kt.exec(r.slice(n,n+1));return i?(e.q=i[0]*3-3,n+i[0].length):-1}function Mi(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.m=i[0]-1,n+i[0].length):-1}function qr(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.d=+i[0],n+i[0].length):-1}function Di(e,r,n){var i=kt.exec(r.slice(n,n+3));return i?(e.m=0,e.d=+i[0],n+i[0].length):-1}function Gr(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.H=+i[0],n+i[0].length):-1}function Ci(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.M=+i[0],n+i[0].length):-1}function Si(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.S=+i[0],n+i[0].length):-1}function _i(e,r,n){var i=kt.exec(r.slice(n,n+3));return i?(e.L=+i[0],n+i[0].length):-1}function Yi(e,r,n){var i=kt.exec(r.slice(n,n+6));return i?(e.L=Math.floor(i[0]/1000),n+i[0].length):-1}function Fi(e,r,n){var i=hi.exec(r.slice(n,n+1));return i?n+i[0].length:-1}function Ii(e,r,n){var i=kt.exec(r.slice(n));return i?(e.Q=+i[0],n+i[0].length):-1}function Li(e,r,n){var i=kt.exec(r.slice(n));return i?(e.s=+i[0],n+i[0].length):-1}function Qr(e,r){return ot(e.getDate(),r,2)}function Wi(e,r){return ot(e.getHours(),r,2)}function Ei(e,r){return ot(e.getHours()%12||12,r,2)}function Ai(e,r){return ot(1+Dt.count(xt(e),e),r,3)}function rn(e,r){return ot(e.getMilliseconds(),r,3)}function Oi(e,r){return rn(e,r)+"000"}function $i(e,r){return ot(e.getMonth()+1,r,2)}function Hi(e,r){return ot(e.getMinutes(),r,2)}function Ni(e,r){return ot(e.getSeconds(),r,2)}function Pi(e){var r=e.getDay();return r===0?7:r}function Vi(e,r){return ot(Ct.count(xt(e)-1,e),r,2)}function nn(e){var r=e.getDay();return r>=4||r===0?It(e):It.ceil(e)}function zi(e,r){return e=nn(e),ot(It.count(xt(e),e)+(xt(e).getDay()===4),r,2)}function Ri(e){return e.getDay()}function Bi(e,r){return ot(Nt.count(xt(e)-1,e),r,2)}function Zi(e,r){return ot(e.getFullYear()%100,r,2)}function ji(e,r){return e=nn(e),ot(e.getFullYear()%100,r,2)}function Xi(e,r){return ot(e.getFullYear()%1e4,r,4)}function qi(e,r){var n=e.getDay();return e=n>=4||n===0?It(e):It.ceil(e),ot(e.getFullYear()%1e4,r,4)}function Gi(e){var r=e.getTimezoneOffset();return(r>0?"-":(r*=-1,"+"))+ot(r/60|0,"0",2)+ot(r%60,"0",2)}function Jr(e,r){return ot(e.getUTCDate(),r,2)}function Qi(e,r){return ot(e.getUTCHours(),r,2)}function Ji(e,r){return ot(e.getUTCHours()%12||12,r,2)}function Ki(e,r){return ot(1+ae.count(St(e),e),r,3)}function an(e,r){return ot(e.getUTCMilliseconds(),r,3)}function ta(e,r){return an(e,r)+"000"}function ea(e,r){return ot(e.getUTCMonth()+1,r,2)}function ra(e,r){return ot(e.getUTCMinutes(),r,2)}function ia(e,r){return ot(e.getUTCSeconds(),r,2)}function aa(e){var r=e.getUTCDay();return r===0?7:r}function sa(e,r){return ot(Rt.count(St(e)-1,e),r,2)}function sn(e){var r=e.getUTCDay();return r>=4||r===0?Pt(e):Pt.ceil(e)}function oa(e,r){return e=sn(e),ot(Pt.count(St(e),e)+(St(e).getUTCDay()===4),r,2)}function ca(e){return e.getUTCDay()}function ua(e,r){return ot(qt.count(St(e)-1,e),r,2)}function la(e,r){return ot(e.getUTCFullYear()%100,r,2)}function fa(e,r){return e=sn(e),ot(e.getUTCFullYear()%100,r,2)}function da(e,r){return ot(e.getUTCFullYear()%1e4,r,4)}function ma(e,r){var n=e.getUTCDay();return e=n>=4||n===0?Pt(e):Pt.ceil(e),ot(e.getUTCFullYear()%1e4,r,4)}function ha(){return"+0000"}function Kr(){return"%"}function tn(e){return+e}function en(e){return Math.floor(+e/1000)}var Gt,Bt,cn,un,ln;Qe({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 Qe(e){return Gt=Ge(e),Bt=Gt.format,cn=Gt.parse,un=Gt.utcFormat,ln=Gt.utcParse,Gt}function ya(e){return new Date(e)}function ga(e){return e instanceof Date?+e:+new Date(+e)}function fn(e,r,n,i,a,s,c,w,D,H){var _=pu(),{invert:rt,domain:N}=_,Y=H(".%L"),A=H(":%S"),P=H("%I:%M"),F=H("%I %p"),J=H("%a %d"),lt=H("%b %d"),it=H("%B"),V=H("%Y");function M(u){return(D(u)<u?Y:w(u)<u?A:c(u)<u?P:s(u)<u?F:i(u)<u?a(u)<u?J:lt:n(u)<u?it:V)(u)}return _.invert=function(u){return new Date(rt(u))},_.domain=function(u){return arguments.length?N(Array.from(u,ga)):N().map(ya)},_.ticks=function(u){var I=N();return e(I[0],I[I.length-1],u==null?10:u)},_.tickFormat=function(u,I){return I==null?M:H(I)},_.nice=function(u){var I=N();if(!u||typeof u.range!=="function")u=r(I[0],I[I.length-1],u==null?10:u);return u?N(Ve(I,u)):_},_.copy=function(){return fd(_,fn(e,r,n,i,a,s,c,w,D,H))},_}function Je(){return oi.apply(fn(Ze,je,xt,Ot,Ct,Dt,At,Et,vt,Bt).domain([new Date(2000,0,1),new Date(2000,0,2)]),arguments)}var xn=on(Bs(),1),bt=on(Fd(),1),bn=on(dn(),1),wn=on(mn(),1),Mn=on(hn(),1),Jt=on(Fd(),1),Wn=on(yn(),1);var cr=function(){var e=t(function(E,f,b,T){for(b=b||{},T=E.length;T--;b[E[T]]=f);return b},"o"),r=[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],i=[1,27],a=[1,28],s=[1,29],c=[1,30],w=[1,31],D=[1,32],H=[1,33],_=[1,34],rt=[1,9],N=[1,10],Y=[1,11],A=[1,12],P=[1,13],F=[1,14],J=[1,15],lt=[1,16],it=[1,19],V=[1,20],M=[1,21],u=[1,22],I=[1,23],tt=[1,25],et=[1,35],v={trace:t(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:t(function(f,b,T,k,X,o,q){var m=o.length-1;switch(X){case 1:return o[m-1];case 2:this.$=[];break;case 3:o[m-1].push(o[m]),this.$=o[m-1];break;case 4:case 5:this.$=o[m];break;case 6:case 7:this.$=[];break;case 8:k.setWeekday("monday");break;case 9:k.setWeekday("tuesday");break;case 10:k.setWeekday("wednesday");break;case 11:k.setWeekday("thursday");break;case 12:k.setWeekday("friday");break;case 13:k.setWeekday("saturday");break;case 14:k.setWeekday("sunday");break;case 15:k.setWeekend("friday");break;case 16:k.setWeekend("saturday");break;case 17:k.setDateFormat(o[m].substr(11)),this.$=o[m].substr(11);break;case 18:k.enableInclusiveEndDates(),this.$=o[m].substr(18);break;case 19:k.TopAxis(),this.$=o[m].substr(8);break;case 20:k.setAxisFormat(o[m].substr(11)),this.$=o[m].substr(11);break;case 21:k.setTickInterval(o[m].substr(13)),this.$=o[m].substr(13);break;case 22:k.setExcludes(o[m].substr(9)),this.$=o[m].substr(9);break;case 23:k.setIncludes(o[m].substr(9)),this.$=o[m].substr(9);break;case 24:k.setTodayMarker(o[m].substr(12)),this.$=o[m].substr(12);break;case 27:k.setDiagramTitle(o[m].substr(6)),this.$=o[m].substr(6);break;case 28:this.$=o[m].trim(),k.setAccTitle(this.$);break;case 29:case 30:this.$=o[m].trim(),k.setAccDescription(this.$);break;case 31:k.addSection(o[m].substr(8)),this.$=o[m].substr(8);break;case 33:k.addTask(o[m-1],o[m]),this.$="task";break;case 34:this.$=o[m-1],k.setClickEvent(o[m-1],o[m],null);break;case 35:this.$=o[m-2],k.setClickEvent(o[m-2],o[m-1],o[m]);break;case 36:this.$=o[m-2],k.setClickEvent(o[m-2],o[m-1],null),k.setLink(o[m-2],o[m]);break;case 37:this.$=o[m-3],k.setClickEvent(o[m-3],o[m-2],o[m-1]),k.setLink(o[m-3],o[m]);break;case 38:this.$=o[m-2],k.setClickEvent(o[m-2],o[m],null),k.setLink(o[m-2],o[m-1]);break;case 39:this.$=o[m-3],k.setClickEvent(o[m-3],o[m-1],o[m]),k.setLink(o[m-3],o[m-2]);break;case 40:this.$=o[m-1],k.setLink(o[m-1],o[m]);break;case 41:case 47:this.$=o[m-1]+" "+o[m];break;case 42:case 43:case 45:this.$=o[m-2]+" "+o[m-1]+" "+o[m];break;case 44:case 46:this.$=o[m-3]+" "+o[m-2]+" "+o[m-1]+" "+o[m];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:i,14:a,15:s,16:c,17:w,18:D,19:18,20:H,21:_,22:rt,23:N,24:Y,25:A,26:P,27:F,28:J,29:lt,30:it,31:V,33:M,35:u,36:I,37:24,38:tt,40:et},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:36,11:17,12:n,13:i,14:a,15:s,16:c,17:w,18:D,19:18,20:H,21:_,22:rt,23:N,24:Y,25:A,26:P,27:F,28:J,29:lt,30:it,31:V,33:M,35:u,36:I,37:24,38:tt,40:et},e(r,[2,5]),e(r,[2,6]),e(r,[2,17]),e(r,[2,18]),e(r,[2,19]),e(r,[2,20]),e(r,[2,21]),e(r,[2,22]),e(r,[2,23]),e(r,[2,24]),e(r,[2,25]),e(r,[2,26]),e(r,[2,27]),{32:[1,37]},{34:[1,38]},e(r,[2,30]),e(r,[2,31]),e(r,[2,32]),{39:[1,39]},e(r,[2,8]),e(r,[2,9]),e(r,[2,10]),e(r,[2,11]),e(r,[2,12]),e(r,[2,13]),e(r,[2,14]),e(r,[2,15]),e(r,[2,16]),{41:[1,40],43:[1,41]},e(r,[2,4]),e(r,[2,28]),e(r,[2,29]),e(r,[2,33]),e(r,[2,34],{42:[1,42],43:[1,43]}),e(r,[2,40],{41:[1,44]}),e(r,[2,35],{43:[1,45]}),e(r,[2,36]),e(r,[2,38],{42:[1,46]}),e(r,[2,37]),e(r,[2,39])],defaultActions:{},parseError:t(function(f,b){if(b.recoverable)this.trace(f);else{var T=Error(f);throw T.hash=b,T}},"parseError"),parse:t(function(f){var b=this,T=[0],k=[],X=[null],o=[],q=this.table,m="",dt=0,d=0,Z=0,Q=2,ct=1,ut=o.slice.call(arguments,1),nt=Object.create(this.lexer),g={yy:{}};for(var B in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,B))g.yy[B]=this.yy[B];if(nt.setInput(f,g.yy),g.yy.lexer=nt,g.yy.parser=this,typeof nt.yylloc>"u")nt.yylloc={};var K=nt.yylloc;o.push(K);var y=nt.options&&nt.options.ranges;if(typeof g.yy.parseError==="function")this.parseError=g.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function mt(wt){T.length=T.length-2*wt,X.length=X.length-wt,o.length=o.length-wt}t(mt,"popStack");function at(){var wt=k.pop()||nt.lex()||ct;if(typeof wt!=="number"){if(wt instanceof Array)k=wt,wt=k.pop();wt=b.symbols_[wt]||wt}return wt}t(at,"lex");var st,ht,yt,pt,os,Ye,jt={},le,Lt,br,fe;while(!0){if(yt=T[T.length-1],this.defaultActions[yt])pt=this.defaultActions[yt];else{if(st===null||typeof st>"u")st=at();pt=q[yt]&&q[yt][st]}if(typeof pt>"u"||!pt.length||!pt[0]){var Fe="";fe=[];for(le in q[yt])if(this.terminals_[le]&&le>Q)fe.push("'"+this.terminals_[le]+"'");if(nt.showPosition)Fe="Parse error on line "+(dt+1)+`:
2
2
  `+nt.showPosition()+`
3
3
  Expecting `+fe.join(", ")+", got '"+(this.terminals_[st]||st)+"'";else Fe="Parse error on line "+(dt+1)+": Unexpected "+(st==ct?"end of input":"'"+(this.terminals_[st]||st)+"'");this.parseError(Fe,{text:nt.match,token:this.terminals_[st]||st,line:nt.yylineno,loc:K,expected:fe})}if(pt[0]instanceof Array&&pt.length>1)throw Error("Parse Error: multiple actions possible at state: "+yt+", token: "+st);switch(pt[0]){case 1:if(T.push(st),X.push(nt.yytext),o.push(nt.yylloc),T.push(pt[1]),st=null,!ht){if(d=nt.yyleng,m=nt.yytext,dt=nt.yylineno,K=nt.yylloc,Z>0)Z--}else st=ht,ht=null;break;case 2:if(Lt=this.productions_[pt[1]][1],jt.$=X[X.length-Lt],jt._$={first_line:o[o.length-(Lt||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(Lt||1)].first_column,last_column:o[o.length-1].last_column},y)jt._$.range=[o[o.length-(Lt||1)].range[0],o[o.length-1].range[1]];if(Ye=this.performAction.apply(jt,[m,d,dt,g.yy,pt[1],X,o].concat(ut)),typeof Ye<"u")return Ye;if(Lt)T=T.slice(0,-1*Lt*2),X=X.slice(0,-1*Lt),o=o.slice(0,-1*Lt);T.push(this.productions_[pt[1]][0]),X.push(jt.$),o.push(jt._$),br=q[T[T.length-2]][T[T.length-1]],T.push(br);break;case 3:return!0}}return!0},"parse")},S=function(){var E={EOF:1,parseError:t(function(b,T){if(this.yy.parser)this.yy.parser.parseError(b,T);else throw Error(b)},"parseError"),setInput:t(function(f,b){if(this.yy=b||this.yy||{},this._input=f,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];return this.offset=0,this},"setInput"),input:t(function(){var f=this._input[0];this.yytext+=f,this.yyleng++,this.offset++,this.match+=f,this.matched+=f;var b=f.match(/(?:\r\n?|\n).*/g);if(b)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),f},"input"),unput:t(function(f){var b=f.length,T=f.split(/(?:\r\n?|\n)/g);this._input=f+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var k=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),T.length-1)this.yylineno-=T.length-1;var X=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:T?(T.length===k.length?this.yylloc.first_column:0)+k[k.length-T.length].length-T[0].length:this.yylloc.first_column-b},this.options.ranges)this.yylloc.range=[X[0],X[0]+this.yyleng-b];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(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:t(function(f){this.unput(this.match.slice(f))},"less"),pastInput:t(function(){var f=this.matched.substr(0,this.matched.length-this.match.length);return(f.length>20?"...":"")+f.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var f=this.match;if(f.length<20)f+=this._input.substr(0,20-f.length);return(f.substr(0,20)+(f.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var f=this.pastInput(),b=Array(f.length+1).join("-");return f+this.upcomingInput()+`
5
5
  `+b+"^"},"showPosition"),test_match:t(function(f,b){var T,k,X;if(this.options.backtrack_lexer){if(X={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)X.yylloc.range=this.yylloc.range.slice(0)}if(k=f[0].match(/(?:\r\n?|\n).*/g),k)this.yylineno+=k.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:k?k[k.length-1].length-k[k.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+f[0].length},this.yytext+=f[0],this.match+=f[0],this.matches=f,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(f[0].length),this.matched+=f[0],T=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(T)return T;else if(this._backtrack){for(var o in X)this[o]=X[o];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var f,b,T,k;if(!this._more)this.yytext="",this.match="";var X=this._currentRules();for(var o=0;o<X.length;o++)if(T=this._input.match(this.rules[X[o]]),T&&(!b||T[0].length>b[0].length)){if(b=T,k=o,this.options.backtrack_lexer)if(f=this.test_match(T,X[o]),f!==!1)return f;else if(this._backtrack){b=!1;continue}else return!1;else if(!this.options.flex)break}if(b){if(f=this.test_match(b,X[k]),f!==!1)return f;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var b=this.next();if(b)return b;else return this.lex()},"lex"),begin:t(function(b){this.conditionStack.push(b)},"begin"),popState:t(function(){var b=this.conditionStack.length-1;if(b>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(b){if(b=this.conditionStack.length-1-Math.abs(b||0),b>=0)return this.conditionStack[b];else return"INITIAL"},"topState"),pushState:t(function(b){this.begin(b)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(b,T,k,X){var o=X;switch(k){case 0:return this.begin("open_directive"),"open_directive";break;case 1:return this.begin("acc_title"),31;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),33;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return E}();v.lexer=S;function C(){this.yy={}}return t(C,"Parser"),C.prototype=v,v.Parser=C,new C}();cr.parser=cr;var ka=cr;bt.default.extend(bn.default);bt.default.extend(wn.default);bt.default.extend(Mn.default);var kn={friday:5,saturday:6},Ut="",dr="",mr=void 0,hr="",ee=[],re=[],yr=new Map,gr=[],Se=[],ne="",kr="",Dn=["active","done","crit","milestone","vert"],pr=[],Qt="",ue=!1,Tr=!1,vr="sunday",_e="saturday",ur=0,pa=t(function(){gr=[],Se=[],ne="",pr=[],De=0,fr=void 0,Ce=void 0,gt=[],Ut="",dr="",kr="",mr=void 0,hr="",ee=[],re=[],ue=!1,Tr=!1,ur=0,yr=new Map,Qt="",R(),vr="sunday",_e="saturday"},"clear"),Ta=t(function(e){Qt=e},"setDiagramId"),va=t(function(e){dr=e},"setAxisFormat"),xa=t(function(){return dr},"getAxisFormat"),ba=t(function(e){mr=e},"setTickInterval"),wa=t(function(){return mr},"getTickInterval"),Ma=t(function(e){hr=e},"setTodayMarker"),Da=t(function(){return hr},"getTodayMarker"),Ca=t(function(e){Ut=e},"setDateFormat"),Sa=t(function(){ue=!0},"enableInclusiveEndDates"),_a=t(function(){return ue},"endDatesAreInclusive"),Ya=t(function(){Tr=!0},"enableTopAxis"),Fa=t(function(){return Tr},"topAxisEnabled"),Ia=t(function(e){kr=e},"setDisplayMode"),Ua=t(function(){return kr},"getDisplayMode"),La=t(function(){return Ut},"getDateFormat"),Cn=t((e,r)=>{let n=r.toLowerCase().split(/[\s,]+/).filter((i)=>i!=="");return[...new Set([...e,...n])]},"mergeTokens"),Wa=t(function(e){ee=Cn(ee,e)},"setIncludes"),Ea=t(function(){return ee},"getIncludes"),Aa=t(function(e){re=Cn(re,e)},"setExcludes"),Oa=t(function(){return re},"getExcludes"),$a=t(function(){return yr},"getLinks"),Ha=t(function(e){ne=e,gr.push(e)},"addSection"),Na=t(function(){return gr},"getSections"),Pa=t(function(){let e=pn(),r=10,n=0;while(!e&&n<r)e=pn(),n++;return Se=gt,Se},"getTasks"),Sn=t(function(e,r,n,i){let a=e.format(r.trim()),s=e.format("YYYY-MM-DD");if(i.includes(a)||i.includes(s))return!1;if(n.includes("weekends")&&(e.isoWeekday()===kn[_e]||e.isoWeekday()===kn[_e]+1))return!0;if(n.includes(e.format("dddd").toLowerCase()))return!0;return n.includes(a)||n.includes(s)},"isInvalidDate"),Va=t(function(e){vr=e},"setWeekday"),za=t(function(){return vr},"getWeekday"),Ra=t(function(e){_e=e},"setWeekend"),_n=t(function(e,r,n,i){if(!n.length||e.manualEndTime)return;let a;if(e.startTime instanceof Date)a=bt.default(e.startTime);else a=bt.default(e.startTime,r,!0);a=a.add(1,"d");let s;if(e.endTime instanceof Date)s=bt.default(e.endTime);else s=bt.default(e.endTime,r,!0);let[c,w]=Ba(a,s,r,n,i);e.endTime=c.toDate(),e.renderEndTime=w},"checkTaskDates"),Ba=t(function(e,r,n,i,a){let s=!1,c=null,w=r.add(1e4,"d");while(e<=r){if(!s)c=r.toDate();if(s=Sn(e,n,i,a),s){if(r=r.add(1,"d"),r>w)throw Error("Failed to find a valid date that was not excluded by `excludes` after 10,000 iterations.")}e=e.add(1,"d")}return[r,c]},"fixTaskDates"),lr=t(function(e,r,n){if(n=n.trim(),t((w)=>{let D=w.trim();return D==="x"||D==="X"},"isTimestampFormat")(r)&&/^\d+$/.test(n))return new Date(Number(n));let s=/^after\s+(?<ids>[\d\w- ]+)/.exec(n);if(s!==null){let w=null;for(let H of s.groups.ids.split(" ")){let _=Zt(H);if(_!==void 0&&(!w||_.endTime>w.endTime))w=_}if(w)return w.endTime;let D=new Date;return D.setHours(0,0,0,0),D}let c=bt.default(n,r.trim(),!0);if(c.isValid())return c.toDate();else{l.debug("Invalid date:"+n),l.debug("With date format:"+r.trim());let w=new Date(n);if(w===void 0||isNaN(w.getTime())||w.getFullYear()<-1e4||w.getFullYear()>1e4)throw Error("Invalid date:"+n);return w}},"getStartDate"),Yn=t(function(e){let r=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(e.trim());if(r!==null)return[Number.parseFloat(r[1]),r[2]];return[NaN,"ms"]},"parseDuration"),Fn=t(function(e,r,n,i=!1){n=n.trim();let s=/^until\s+(?<ids>[\d\w- ]+)/.exec(n);if(s!==null){let _=null;for(let N of s.groups.ids.split(" ")){let Y=Zt(N);if(Y!==void 0&&(!_||Y.startTime<_.startTime))_=Y}if(_)return _.startTime;let rt=new Date;return rt.setHours(0,0,0,0),rt}let c=bt.default(n,r.trim(),!0);if(c.isValid()){if(i)c=c.add(1,"d");return c.toDate()}let w=bt.default(e),[D,H]=Yn(n);if(!Number.isNaN(D)){let _=w.add(D,H);if(_.isValid())w=_}return w.toDate()},"getEndDate"),De=0,Kt=t(function(e){if(e===void 0)return De=De+1,"task"+De;return e},"parseId"),Za=t(function(e,r){let n;if(r.substr(0,1)===":")n=r.substr(1,r.length);else n=r;let i=n.split(","),a={};xr(i,a,Dn);for(let c=0;c<i.length;c++)i[c]=i[c].trim();let s="";switch(i.length){case 1:a.id=Kt(),a.startTime=e.endTime,s=i[0];break;case 2:a.id=Kt(),a.startTime=lr(void 0,Ut,i[0]),s=i[1];break;case 3:a.id=Kt(i[0]),a.startTime=lr(void 0,Ut,i[1]),s=i[2];break;default:}if(s)a.endTime=Fn(a.startTime,Ut,s,ue),a.manualEndTime=bt.default(s,"YYYY-MM-DD",!0).isValid(),_n(a,Ut,re,ee);return a},"compileData"),ja=t(function(e,r){let n;if(r.substr(0,1)===":")n=r.substr(1,r.length);else n=r;let i=n.split(","),a={};xr(i,a,Dn);for(let s=0;s<i.length;s++)i[s]=i[s].trim();switch(i.length){case 1:a.id=Kt(),a.startTime={type:"prevTaskEnd",id:e},a.endTime={data:i[0]};break;case 2:a.id=Kt(),a.startTime={type:"getStartDate",startData:i[0]},a.endTime={data:i[1]};break;case 3:a.id=Kt(i[0]),a.startTime={type:"getStartDate",startData:i[1]},a.endTime={data:i[2]};break;default:}return a},"parseData"),fr,Ce,gt=[],In={},Xa=t(function(e,r){let n={section:ne,type:ne,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:r},task:e,classes:[]},i=ja(Ce,r);if(n.raw.startTime=i.startTime,n.raw.endTime=i.endTime,n.id=i.id,n.prevTaskId=Ce,n.active=i.active,n.done=i.done,n.crit=i.crit,n.milestone=i.milestone,n.vert=i.vert,n.vert)n.order=-1;else n.order=ur,ur++;let a=gt.push(n);Ce=n.id,In[n.id]=a-1},"addTask"),Zt=t(function(e){let r=In[e];return gt[r]},"findTaskById"),qa=t(function(e,r){let n={section:ne,type:ne,description:e,task:e,classes:[]},i=Za(fr,r);n.startTime=i.startTime,n.endTime=i.endTime,n.id=i.id,n.active=i.active,n.done=i.done,n.crit=i.crit,n.milestone=i.milestone,n.vert=i.vert,fr=n,Se.push(n)},"addTaskOrg"),pn=t(function(){let e=t(function(n){let i=gt[n],a="";switch(gt[n].raw.startTime.type){case"prevTaskEnd":{let s=Zt(i.prevTaskId);i.startTime=s.endTime;break}case"getStartDate":if(a=lr(void 0,Ut,gt[n].raw.startTime.startData),a)gt[n].startTime=a;break}if(gt[n].startTime){if(gt[n].endTime=Fn(gt[n].startTime,Ut,gt[n].raw.endTime.data,ue),gt[n].endTime)gt[n].processed=!0,gt[n].manualEndTime=bt.default(gt[n].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),_n(gt[n],Ut,re,ee)}return gt[n].processed},"compileTask"),r=!0;for(let[n,i]of gt.entries())e(n),r=r&&i.processed;return r},"compileTasks"),Ga=t(function(e,r){let n=r;if(p().securityLevel!=="loose")n=xn.sanitizeUrl(r);e.split(",").forEach(function(i){if(Zt(i)!==void 0)Ln(i,()=>{window.open(n,"_self")}),yr.set(i,n)}),Un(e,"clickable")},"setLink"),Un=t(function(e,r){e.split(",").forEach(function(n){let i=Zt(n);if(i!==void 0)i.classes.push(r)})},"setClass"),Qa=t(function(e,r,n){if(p().securityLevel!=="loose")return;if(r===void 0)return;let i=[];if(typeof n==="string"){i=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let s=0;s<i.length;s++){let c=i[s].trim();if(c.startsWith('"')&&c.endsWith('"'))c=c.substr(1,c.length-2);i[s]=c}}if(i.length===0)i.push(e);if(Zt(e)!==void 0)Ln(e,()=>{W.runFunc(r,...i)})},"setClickFun"),Ln=t(function(e,r){pr.push(function(){let n=Qt?`${Qt}-${e}`:e,i=document.querySelector(`[id="${n}"]`);if(i!==null)i.addEventListener("click",function(){r()})},function(){let n=Qt?`${Qt}-${e}`:e,i=document.querySelector(`[id="${n}-text"]`);if(i!==null)i.addEventListener("click",function(){r()})})},"pushFun"),Ja=t(function(e,r,n){e.split(",").forEach(function(i){Qa(i,r,n)}),Un(e,"clickable")},"setClickEvent"),Ka=t(function(e){pr.forEach(function(r){r(e)})},"bindFunctions"),ts={getConfig:t(()=>p().gantt,"getConfig"),clear:pa,setDateFormat:Ca,getDateFormat:La,enableInclusiveEndDates:Sa,endDatesAreInclusive:_a,enableTopAxis:Ya,topAxisEnabled:Fa,setAxisFormat:va,getAxisFormat:xa,setTickInterval:ba,getTickInterval:wa,setTodayMarker:Ma,getTodayMarker:Da,setAccTitle:L,getAccTitle:z,setDiagramTitle:j,getDiagramTitle:G,setDiagramId:Ta,setDisplayMode:Ia,getDisplayMode:Ua,setAccDescription:O,getAccDescription:U,addSection:Ha,getSections:Na,getTasks:Pa,addTask:Xa,findTaskById:Zt,addTaskOrg:qa,setIncludes:Wa,getIncludes:Ea,setExcludes:Aa,getExcludes:Oa,setClickEvent:Ja,setLink:Ga,getLinks:$a,bindFunctions:Ka,parseDuration:Yn,isInvalidDate:Sn,setWeekday:Va,getWeekday:za,setWeekend:Ra};function xr(e,r,n){let i=!0;while(i)i=!1,n.forEach(function(a){let s="^\\s*"+a+"\\s*$",c=new RegExp(s);if(e[0].match(c))r[a]=!0,e.shift(1),i=!0})}t(xr,"getTaskTags");Jt.default.extend(Wn.default);var es=t(function(){l.debug("Something is calling, setConf, remove the call")},"setConf"),Tn={monday:Nt,tuesday:ve,wednesday:xe,thursday:It,friday:be,saturday:we,sunday:Ct},rs=t((e,r)=>{let n=[...e].map(()=>-1/0),i=[...e].sort((s,c)=>s.startTime-c.startTime||s.order-c.order),a=0;for(let s of i)for(let c=0;c<n.length;c++)if(s.startTime>=n[c]){if(n[c]=s.endTime,s.order=c+r,c>a)a=c;break}return a},"getMaxIntersections"),$t,or=1e4,ns=t(function(e,r,n,i){let a=p().gantt;i.db.setDiagramId(r);let s=p().securityLevel,c;if(s==="sandbox")c=h("#i"+r);let w=s==="sandbox"?h(c.nodes()[0].contentDocument.body):h("body"),D=s==="sandbox"?c.nodes()[0].contentDocument:document,H=D.getElementById(r);if($t=H.parentElement.offsetWidth,$t===void 0)$t=1200;if(a.useWidth!==void 0)$t=a.useWidth;let _=i.db.getTasks(),rt=_.filter((v)=>!v.vert),N=[];for(let v of rt)N.push(v.type);N=et(N);let Y={},A=2*a.topPadding;if(i.db.getDisplayMode()==="compact"||a.displayMode==="compact"){let v={};for(let C of rt)if(v[C.section]===void 0)v[C.section]=[C];else v[C.section].push(C);let S=0;for(let C of Object.keys(v)){let E=rs(v[C],S)+1;S+=E,A+=E*(a.barHeight+a.barGap),Y[C]=E}}else{A+=rt.length*(a.barHeight+a.barGap);for(let v of N)Y[v]=rt.filter((S)=>S.type===v).length}H.setAttribute("viewBox","0 0 "+$t+" "+A);let P=w.select(`[id="${r}"]`),F=Je().domain([Ue(_,function(v){return v.startTime}),Ie(_,function(v){return v.endTime})]).rangeRound([0,$t-a.leftPadding-a.rightPadding]);function J(v,S){let C=v.startTime,E=S.startTime,f=0;if(C>E)f=1;else if(C<E)f=-1;return f}t(J,"taskCompare"),_.sort(J),lt(_,$t,A),te(P,A,$t,a.useMaxWidth),P.append("text").text(i.db.getDiagramTitle()).attr("x",$t/2).attr("y",a.titleTopMargin).attr("class","titleText");function lt(v,S,C){let E=a.barHeight,f=E+a.barGap,{topPadding:b,leftPadding:T}=a,k=na().domain([0,N.length]).range(["#00B9FA","#F95002"]).interpolate(Ar);V(f,b,T,S,C,v,i.db.getExcludes(),i.db.getIncludes()),u(T,b,S,C),it(v,f,b,T,E,k,S,C),I(f,b,T,E,k),tt(T,b,S,C)}t(lt,"makeGantt");function it(v,S,C,E,f,b,T){v.sort((d,Z)=>d.vert===Z.vert?0:d.vert?1:-1);let k=v.filter((d)=>!d.vert),o=[...new Set(k.map((d)=>d.order))].map((d)=>k.find((Z)=>Z.order===d));P.append("g").selectAll("rect").data(o).enter().append("rect").attr("x",0).attr("y",function(d,Z){return Z=d.order,Z*S+C-2}).attr("width",function(){return T-a.rightPadding/2}).attr("height",S).attr("class",function(d){for(let[Z,Q]of N.entries())if(d.type===Q)return"section section"+Z%a.numberSectionStyles;return"section section0"}).enter();let q=P.append("g").selectAll("rect").data(v).enter(),m=i.db.getLinks();if(q.append("rect").attr("id",function(d){return r+"-"+d.id}).attr("rx",3).attr("ry",3).attr("x",function(d){if(d.milestone)return F(d.startTime)+E+0.5*(F(d.endTime)-F(d.startTime))-0.5*f;return F(d.startTime)+E}).attr("y",function(d,Z){if(Z=d.order,d.vert)return a.gridLineStartPadding;return Z*S+C}).attr("width",function(d){if(d.milestone)return f;if(d.vert)return 0.08*f;return F(d.renderEndTime||d.endTime)-F(d.startTime)}).attr("height",function(d){if(d.vert)return k.length*(a.barHeight+a.barGap)+a.barHeight*2;return f}).attr("transform-origin",function(d,Z){return Z=d.order,(F(d.startTime)+E+0.5*(F(d.endTime)-F(d.startTime))).toString()+"px "+(Z*S+C+0.5*f).toString()+"px"}).attr("class",function(d){let Q="";if(d.classes.length>0)Q=d.classes.join(" ");let ct=0;for(let[nt,g]of N.entries())if(d.type===g)ct=nt%a.numberSectionStyles;let ut="";if(d.active)if(d.crit)ut+=" activeCrit";else ut=" active";else if(d.done)if(d.crit)ut=" doneCrit";else ut=" done";else if(d.crit)ut+=" crit";if(ut.length===0)ut=" task";if(d.milestone)ut=" milestone "+ut;if(d.vert)ut=" vert "+ut;return ut+=ct,ut+=" "+Q,"task"+ut}),q.append("text").attr("id",function(d){return r+"-"+d.id+"-text"}).text(function(d){return d.task}).attr("font-size",a.fontSize).attr("x",function(d){let Z=F(d.startTime),Q=F(d.renderEndTime||d.endTime);if(d.milestone)Z+=0.5*(F(d.endTime)-F(d.startTime))-0.5*f,Q=Z+f;if(d.vert)return F(d.startTime)+E;let ct=this.getBBox().width;if(ct>Q-Z)if(Q+ct+1.5*a.leftPadding>T)return Z+E-5;else return Q+E+5;else return(Q-Z)/2+Z+E}).attr("y",function(d,Z){if(d.vert)return a.gridLineStartPadding+k.length*(a.barHeight+a.barGap)+60;return Z=d.order,Z*S+a.barHeight/2+(a.fontSize/2-2)+C}).attr("text-height",f).attr("class",function(d){let Z=F(d.startTime),Q=F(d.endTime);if(d.milestone)Q=Z+f;let ct=this.getBBox().width,ut="";if(d.classes.length>0)ut=d.classes.join(" ");let nt=0;for(let[B,K]of N.entries())if(d.type===K)nt=B%a.numberSectionStyles;let g="";if(d.active)if(d.crit)g="activeCritText"+nt;else g="activeText"+nt;if(d.done)if(d.crit)g=g+" doneCritText"+nt;else g=g+" doneText"+nt;else if(d.crit)g=g+" critText"+nt;if(d.milestone)g+=" milestoneText";if(d.vert)g+=" vertText";if(ct>Q-Z)if(Q+ct+1.5*a.leftPadding>T)return ut+" taskTextOutsideLeft taskTextOutside"+nt+" "+g;else return ut+" taskTextOutsideRight taskTextOutside"+nt+" "+g+" width-"+ct;else return ut+" taskText taskText"+nt+" "+g+" width-"+ct}),p().securityLevel==="sandbox"){let d;d=h("#i"+r);let Z=d.nodes()[0].contentDocument;q.filter(function(Q){return m.has(Q.id)}).each(function(Q){var ct=Z.querySelector("#"+CSS.escape(r+"-"+Q.id)),ut=Z.querySelector("#"+CSS.escape(r+"-"+Q.id+"-text"));let nt=ct.parentNode;var g=Z.createElement("a");g.setAttribute("xlink:href",m.get(Q.id)),g.setAttribute("target","_top"),nt.appendChild(g),g.appendChild(ct),g.appendChild(ut)})}}t(it,"drawRects");function V(v,S,C,E,f,b,T,k){if(T.length===0&&k.length===0)return;let X,o;for(let{startTime:Q,endTime:ct}of b){if(X===void 0||Q<X)X=Q;if(o===void 0||ct>o)o=ct}if(!X||!o)return;if(Jt.default(o).diff(Jt.default(X),"year")>5){l.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}let q=i.db.getDateFormat(),m=[],dt=null,d=Jt.default(X);while(d.valueOf()<=o){if(i.db.isInvalidDate(d,q,T,k))if(!dt)dt={start:d,end:d};else dt.end=d;else if(dt)m.push(dt),dt=null;d=d.add(1,"d")}P.append("g").selectAll("rect").data(m).enter().append("rect").attr("id",(Q)=>r+"-exclude-"+Q.start.format("YYYY-MM-DD")).attr("x",(Q)=>F(Q.start.startOf("day"))+C).attr("y",a.gridLineStartPadding).attr("width",(Q)=>F(Q.end.endOf("day"))-F(Q.start.startOf("day"))).attr("height",f-S-a.gridLineStartPadding).attr("transform-origin",function(Q,ct){return(F(Q.start)+C+0.5*(F(Q.end)-F(Q.start))).toString()+"px "+(ct*v+0.5*f).toString()+"px"}).attr("class","exclude-range")}t(V,"drawExcludeDays");function M(v,S,C,E){if(C<=0||v>S)return 1/0;let f=S-v,b=Jt.default.duration({[E??"day"]:C}).asMilliseconds();if(b<=0)return 1/0;return Math.ceil(f/b)}t(M,"getEstimatedTickCount");function u(v,S,C,E){let f=i.db.getDateFormat(),b=i.db.getAxisFormat(),T;if(b)T=b;else if(f==="D")T="%d";else T=a.axisFormat??"%Y-%m-%d";let k=Oe(F).tickSize(-E+S+a.gridLineStartPadding).tickFormat(Bt(T)),o=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(i.db.getTickInterval()||a.tickInterval);if(o!==null){let q=parseInt(o[1],10);if(isNaN(q)||q<=0)l.warn(`Invalid tick interval value: "${o[1]}". Skipping custom tick interval.`);else{let m=o[2],dt=i.db.getWeekday()||a.weekday,d=F.domain(),Z=d[0],Q=d[1],ct=M(Z,Q,q,m);if(ct>or)l.warn(`The tick interval "${q}${m}" would generate ${ct} ticks, which exceeds the maximum allowed (${or}). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(m){case"millisecond":k.ticks(Yt.every(q));break;case"second":k.ticks(vt.every(q));break;case"minute":k.ticks(Et.every(q));break;case"hour":k.ticks(At.every(q));break;case"day":k.ticks(Dt.every(q));break;case"week":k.ticks(Tn[dt].every(q));break;case"month":k.ticks(Ot.every(q));break}}}if(P.append("g").attr("class","grid").attr("transform","translate("+v+", "+(E-50)+")").call(k).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),i.db.topAxisEnabled()||a.topAxis){let q=Ae(F).tickSize(-E+S+a.gridLineStartPadding).tickFormat(Bt(T));if(o!==null){let m=parseInt(o[1],10);if(isNaN(m)||m<=0)l.warn(`Invalid tick interval value: "${o[1]}". Skipping custom tick interval.`);else{let dt=o[2],d=i.db.getWeekday()||a.weekday,Z=F.domain(),Q=Z[0],ct=Z[1];if(M(Q,ct,m,dt)<=or)switch(dt){case"millisecond":q.ticks(Yt.every(m));break;case"second":q.ticks(vt.every(m));break;case"minute":q.ticks(Et.every(m));break;case"hour":q.ticks(At.every(m));break;case"day":q.ticks(Dt.every(m));break;case"week":q.ticks(Tn[d].every(m));break;case"month":q.ticks(Ot.every(m));break}}}P.append("g").attr("class","grid").attr("transform","translate("+v+", "+S+")").call(q).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}t(u,"makeGrid");function I(v,S){let C=0,E=Object.keys(Y).map((f)=>[f,Y[f]]);P.append("g").selectAll("text").data(E).enter().append(function(f){let b=f[0].split(x.lineBreakRegex),T=-(b.length-1)/2,k=D.createElementNS("http://www.w3.org/2000/svg","text");k.setAttribute("dy",T+"em");for(let[X,o]of b.entries()){let q=D.createElementNS("http://www.w3.org/2000/svg","tspan");if(q.setAttribute("alignment-baseline","central"),q.setAttribute("x","10"),X>0)q.setAttribute("dy","1em");q.textContent=o,k.appendChild(q)}return k}).attr("x",10).attr("y",function(f,b){if(b>0)for(let T=0;T<b;T++)return C+=E[b-1][1],f[1]*v/2+C*v+S;else return f[1]*v/2+S}).attr("font-size",a.sectionFontSize).attr("class",function(f){for(let[b,T]of N.entries())if(f[0]===T)return"sectionTitle sectionTitle"+b%a.numberSectionStyles;return"sectionTitle"})}t(I,"vertLabels");function tt(v,S,C,E){let f=i.db.getTodayMarker();if(f==="off")return;let b=P.append("g").attr("class","today"),T=new Date,k=b.append("line");if(k.attr("x1",F(T)+v).attr("x2",F(T)+v).attr("y1",a.titleTopMargin).attr("y2",E-a.titleTopMargin).attr("class","today"),f!=="")k.attr("style",f.replace(/,/g,";"))}t(tt,"drawToday");function et(v){let S={},C=[];for(let E=0,f=v.length;E<f;++E)if(!Object.prototype.hasOwnProperty.call(S,v[E]))S[v[E]]=!0,C.push(v[E]);return C}t(et,"checkUnique")},"draw"),is={setConf:es,draw:ns},as=t((e)=>`
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var b=this.next();if(b)return b;else return this.lex()},"lex"),begin:t(function(b){this.conditionStack.push(b)},"begin"),popState:t(function(){var b=this.conditionStack.length-1;if(b>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(b){if(b=this.conditionStack.length-1-Math.abs(b||0),b>=0)return this.conditionStack[b];else return"INITIAL"},"topState"),pushState:t(function(b){this.begin(b)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(b,T,k,X){var o=X;switch(k){case 0:return this.begin("open_directive"),"open_directive";break;case 1:return this.begin("acc_title"),31;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),33;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return E}();v.lexer=S;function C(){this.yy={}}return t(C,"Parser"),C.prototype=v,v.Parser=C,new C}();cr.parser=cr;var ka=cr;bt.default.extend(bn.default);bt.default.extend(wn.default);bt.default.extend(Mn.default);var gn={friday:5,saturday:6},Ut="",dr="",mr=void 0,hr="",ee=[],re=[],yr=new Map,gr=[],Se=[],ne="",kr="",Dn=["active","done","crit","milestone","vert"],pr=[],Qt="",ue=!1,Tr=!1,vr="sunday",_e="saturday",ur=0,pa=t(function(){gr=[],Se=[],ne="",pr=[],De=0,fr=void 0,Ce=void 0,gt=[],Ut="",dr="",kr="",mr=void 0,hr="",ee=[],re=[],ue=!1,Tr=!1,ur=0,yr=new Map,Qt="",R(),vr="sunday",_e="saturday"},"clear"),Ta=t(function(e){Qt=e},"setDiagramId"),va=t(function(e){dr=e},"setAxisFormat"),xa=t(function(){return dr},"getAxisFormat"),ba=t(function(e){mr=e},"setTickInterval"),wa=t(function(){return mr},"getTickInterval"),Ma=t(function(e){hr=e},"setTodayMarker"),Da=t(function(){return hr},"getTodayMarker"),Ca=t(function(e){Ut=e},"setDateFormat"),Sa=t(function(){ue=!0},"enableInclusiveEndDates"),_a=t(function(){return ue},"endDatesAreInclusive"),Ya=t(function(){Tr=!0},"enableTopAxis"),Fa=t(function(){return Tr},"topAxisEnabled"),Ia=t(function(e){kr=e},"setDisplayMode"),Ua=t(function(){return kr},"getDisplayMode"),La=t(function(){return Ut},"getDateFormat"),Cn=t((e,r)=>{let n=r.toLowerCase().split(/[\s,]+/).filter((i)=>i!=="");return[...new Set([...e,...n])]},"mergeTokens"),Wa=t(function(e){ee=Cn(ee,e)},"setIncludes"),Ea=t(function(){return ee},"getIncludes"),Aa=t(function(e){re=Cn(re,e)},"setExcludes"),Oa=t(function(){return re},"getExcludes"),$a=t(function(){return yr},"getLinks"),Ha=t(function(e){ne=e,gr.push(e)},"addSection"),Na=t(function(){return gr},"getSections"),Pa=t(function(){let e=pn(),r=10,n=0;while(!e&&n<r)e=pn(),n++;return Se=gt,Se},"getTasks"),Sn=t(function(e,r,n,i){let a=e.format(r.trim()),s=e.format("YYYY-MM-DD");if(i.includes(a)||i.includes(s))return!1;if(n.includes("weekends")&&(e.isoWeekday()===gn[_e]||e.isoWeekday()===gn[_e]+1))return!0;if(n.includes(e.format("dddd").toLowerCase()))return!0;return n.includes(a)||n.includes(s)},"isInvalidDate"),Va=t(function(e){vr=e},"setWeekday"),za=t(function(){return vr},"getWeekday"),Ra=t(function(e){_e=e},"setWeekend"),_n=t(function(e,r,n,i){if(!n.length||e.manualEndTime)return;let a;if(e.startTime instanceof Date)a=bt.default(e.startTime);else a=bt.default(e.startTime,r,!0);a=a.add(1,"d");let s;if(e.endTime instanceof Date)s=bt.default(e.endTime);else s=bt.default(e.endTime,r,!0);let[c,w]=Ba(a,s,r,n,i);e.endTime=c.toDate(),e.renderEndTime=w},"checkTaskDates"),Ba=t(function(e,r,n,i,a){let s=!1,c=null,w=r.add(1e4,"d");while(e<=r){if(!s)c=r.toDate();if(s=Sn(e,n,i,a),s){if(r=r.add(1,"d"),r>w)throw Error("Failed to find a valid date that was not excluded by `excludes` after 10,000 iterations.")}e=e.add(1,"d")}return[r,c]},"fixTaskDates"),lr=t(function(e,r,n){if(n=n.trim(),t((w)=>{let D=w.trim();return D==="x"||D==="X"},"isTimestampFormat")(r)&&/^\d+$/.test(n))return new Date(Number(n));let s=/^after\s+(?<ids>[\d\w- ]+)/.exec(n);if(s!==null){let w=null;for(let H of s.groups.ids.split(" ")){let _=Zt(H);if(_!==void 0&&(!w||_.endTime>w.endTime))w=_}if(w)return w.endTime;let D=new Date;return D.setHours(0,0,0,0),D}let c=bt.default(n,r.trim(),!0);if(c.isValid())return c.toDate();else{l.debug("Invalid date:"+n),l.debug("With date format:"+r.trim());let w=new Date(n);if(w===void 0||isNaN(w.getTime())||w.getFullYear()<-1e4||w.getFullYear()>1e4)throw Error("Invalid date:"+n);return w}},"getStartDate"),Yn=t(function(e){let r=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(e.trim());if(r!==null)return[Number.parseFloat(r[1]),r[2]];return[NaN,"ms"]},"parseDuration"),Fn=t(function(e,r,n,i=!1){n=n.trim();let s=/^until\s+(?<ids>[\d\w- ]+)/.exec(n);if(s!==null){let _=null;for(let N of s.groups.ids.split(" ")){let Y=Zt(N);if(Y!==void 0&&(!_||Y.startTime<_.startTime))_=Y}if(_)return _.startTime;let rt=new Date;return rt.setHours(0,0,0,0),rt}let c=bt.default(n,r.trim(),!0);if(c.isValid()){if(i)c=c.add(1,"d");return c.toDate()}let w=bt.default(e),[D,H]=Yn(n);if(!Number.isNaN(D)){let _=w.add(D,H);if(_.isValid())w=_}return w.toDate()},"getEndDate"),De=0,Kt=t(function(e){if(e===void 0)return De=De+1,"task"+De;return e},"parseId"),Za=t(function(e,r){let n;if(r.substr(0,1)===":")n=r.substr(1,r.length);else n=r;let i=n.split(","),a={};xr(i,a,Dn);for(let c=0;c<i.length;c++)i[c]=i[c].trim();let s="";switch(i.length){case 1:a.id=Kt(),a.startTime=e.endTime,s=i[0];break;case 2:a.id=Kt(),a.startTime=lr(void 0,Ut,i[0]),s=i[1];break;case 3:a.id=Kt(i[0]),a.startTime=lr(void 0,Ut,i[1]),s=i[2];break;default:}if(s)a.endTime=Fn(a.startTime,Ut,s,ue),a.manualEndTime=bt.default(s,"YYYY-MM-DD",!0).isValid(),_n(a,Ut,re,ee);return a},"compileData"),ja=t(function(e,r){let n;if(r.substr(0,1)===":")n=r.substr(1,r.length);else n=r;let i=n.split(","),a={};xr(i,a,Dn);for(let s=0;s<i.length;s++)i[s]=i[s].trim();switch(i.length){case 1:a.id=Kt(),a.startTime={type:"prevTaskEnd",id:e},a.endTime={data:i[0]};break;case 2:a.id=Kt(),a.startTime={type:"getStartDate",startData:i[0]},a.endTime={data:i[1]};break;case 3:a.id=Kt(i[0]),a.startTime={type:"getStartDate",startData:i[1]},a.endTime={data:i[2]};break;default:}return a},"parseData"),fr,Ce,gt=[],In={},Xa=t(function(e,r){let n={section:ne,type:ne,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:r},task:e,classes:[]},i=ja(Ce,r);if(n.raw.startTime=i.startTime,n.raw.endTime=i.endTime,n.id=i.id,n.prevTaskId=Ce,n.active=i.active,n.done=i.done,n.crit=i.crit,n.milestone=i.milestone,n.vert=i.vert,n.vert)n.order=-1;else n.order=ur,ur++;let a=gt.push(n);Ce=n.id,In[n.id]=a-1},"addTask"),Zt=t(function(e){let r=In[e];return gt[r]},"findTaskById"),qa=t(function(e,r){let n={section:ne,type:ne,description:e,task:e,classes:[]},i=Za(fr,r);n.startTime=i.startTime,n.endTime=i.endTime,n.id=i.id,n.active=i.active,n.done=i.done,n.crit=i.crit,n.milestone=i.milestone,n.vert=i.vert,fr=n,Se.push(n)},"addTaskOrg"),pn=t(function(){let e=t(function(n){let i=gt[n],a="";switch(gt[n].raw.startTime.type){case"prevTaskEnd":{let s=Zt(i.prevTaskId);i.startTime=s.endTime;break}case"getStartDate":if(a=lr(void 0,Ut,gt[n].raw.startTime.startData),a)gt[n].startTime=a;break}if(gt[n].startTime){if(gt[n].endTime=Fn(gt[n].startTime,Ut,gt[n].raw.endTime.data,ue),gt[n].endTime)gt[n].processed=!0,gt[n].manualEndTime=bt.default(gt[n].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),_n(gt[n],Ut,re,ee)}return gt[n].processed},"compileTask"),r=!0;for(let[n,i]of gt.entries())e(n),r=r&&i.processed;return r},"compileTasks"),Ga=t(function(e,r){let n=r;if(p().securityLevel!=="loose")n=xn.sanitizeUrl(r);e.split(",").forEach(function(i){if(Zt(i)!==void 0)Ln(i,()=>{window.open(n,"_self")}),yr.set(i,n)}),Un(e,"clickable")},"setLink"),Un=t(function(e,r){e.split(",").forEach(function(n){let i=Zt(n);if(i!==void 0)i.classes.push(r)})},"setClass"),Qa=t(function(e,r,n){if(p().securityLevel!=="loose")return;if(r===void 0)return;let i=[];if(typeof n==="string"){i=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let s=0;s<i.length;s++){let c=i[s].trim();if(c.startsWith('"')&&c.endsWith('"'))c=c.substr(1,c.length-2);i[s]=c}}if(i.length===0)i.push(e);if(Zt(e)!==void 0)Ln(e,()=>{W.runFunc(r,...i)})},"setClickFun"),Ln=t(function(e,r){pr.push(function(){let n=Qt?`${Qt}-${e}`:e,i=document.querySelector(`[id="${n}"]`);if(i!==null)i.addEventListener("click",function(){r()})},function(){let n=Qt?`${Qt}-${e}`:e,i=document.querySelector(`[id="${n}-text"]`);if(i!==null)i.addEventListener("click",function(){r()})})},"pushFun"),Ja=t(function(e,r,n){e.split(",").forEach(function(i){Qa(i,r,n)}),Un(e,"clickable")},"setClickEvent"),Ka=t(function(e){pr.forEach(function(r){r(e)})},"bindFunctions"),ts={getConfig:t(()=>p().gantt,"getConfig"),clear:pa,setDateFormat:Ca,getDateFormat:La,enableInclusiveEndDates:Sa,endDatesAreInclusive:_a,enableTopAxis:Ya,topAxisEnabled:Fa,setAxisFormat:va,getAxisFormat:xa,setTickInterval:ba,getTickInterval:wa,setTodayMarker:Ma,getTodayMarker:Da,setAccTitle:L,getAccTitle:z,setDiagramTitle:j,getDiagramTitle:G,setDiagramId:Ta,setDisplayMode:Ia,getDisplayMode:Ua,setAccDescription:O,getAccDescription:U,addSection:Ha,getSections:Na,getTasks:Pa,addTask:Xa,findTaskById:Zt,addTaskOrg:qa,setIncludes:Wa,getIncludes:Ea,setExcludes:Aa,getExcludes:Oa,setClickEvent:Ja,setLink:Ga,getLinks:$a,bindFunctions:Ka,parseDuration:Yn,isInvalidDate:Sn,setWeekday:Va,getWeekday:za,setWeekend:Ra};function xr(e,r,n){let i=!0;while(i)i=!1,n.forEach(function(a){let s="^\\s*"+a+"\\s*$",c=new RegExp(s);if(e[0].match(c))r[a]=!0,e.shift(1),i=!0})}t(xr,"getTaskTags");Jt.default.extend(Wn.default);var es=t(function(){l.debug("Something is calling, setConf, remove the call")},"setConf"),Tn={monday:Nt,tuesday:ve,wednesday:xe,thursday:It,friday:be,saturday:we,sunday:Ct},rs=t((e,r)=>{let n=[...e].map(()=>-1/0),i=[...e].sort((s,c)=>s.startTime-c.startTime||s.order-c.order),a=0;for(let s of i)for(let c=0;c<n.length;c++)if(s.startTime>=n[c]){if(n[c]=s.endTime,s.order=c+r,c>a)a=c;break}return a},"getMaxIntersections"),$t,or=1e4,ns=t(function(e,r,n,i){let a=p().gantt;i.db.setDiagramId(r);let s=p().securityLevel,c;if(s==="sandbox")c=h("#i"+r);let w=s==="sandbox"?h(c.nodes()[0].contentDocument.body):h("body"),D=s==="sandbox"?c.nodes()[0].contentDocument:document,H=D.getElementById(r);if($t=H.parentElement.offsetWidth,$t===void 0)$t=1200;if(a.useWidth!==void 0)$t=a.useWidth;let _=i.db.getTasks(),rt=_.filter((v)=>!v.vert),N=[];for(let v of rt)N.push(v.type);N=et(N);let Y={},A=2*a.topPadding;if(i.db.getDisplayMode()==="compact"||a.displayMode==="compact"){let v={};for(let C of rt)if(v[C.section]===void 0)v[C.section]=[C];else v[C.section].push(C);let S=0;for(let C of Object.keys(v)){let E=rs(v[C],S)+1;S+=E,A+=E*(a.barHeight+a.barGap),Y[C]=E}}else{A+=rt.length*(a.barHeight+a.barGap);for(let v of N)Y[v]=rt.filter((S)=>S.type===v).length}H.setAttribute("viewBox","0 0 "+$t+" "+A);let P=w.select(`[id="${r}"]`),F=Je().domain([Ue(_,function(v){return v.startTime}),Ie(_,function(v){return v.endTime})]).rangeRound([0,$t-a.leftPadding-a.rightPadding]);function J(v,S){let C=v.startTime,E=S.startTime,f=0;if(C>E)f=1;else if(C<E)f=-1;return f}t(J,"taskCompare"),_.sort(J),lt(_,$t,A),te(P,A,$t,a.useMaxWidth),P.append("text").text(i.db.getDiagramTitle()).attr("x",$t/2).attr("y",a.titleTopMargin).attr("class","titleText");function lt(v,S,C){let E=a.barHeight,f=E+a.barGap,{topPadding:b,leftPadding:T}=a,k=na().domain([0,N.length]).range(["#00B9FA","#F95002"]).interpolate(Ar);V(f,b,T,S,C,v,i.db.getExcludes(),i.db.getIncludes()),u(T,b,S,C),it(v,f,b,T,E,k,S,C),I(f,b,T,E,k),tt(T,b,S,C)}t(lt,"makeGantt");function it(v,S,C,E,f,b,T){v.sort((d,Z)=>d.vert===Z.vert?0:d.vert?1:-1);let k=v.filter((d)=>!d.vert),o=[...new Set(k.map((d)=>d.order))].map((d)=>k.find((Z)=>Z.order===d));P.append("g").selectAll("rect").data(o).enter().append("rect").attr("x",0).attr("y",function(d,Z){return Z=d.order,Z*S+C-2}).attr("width",function(){return T-a.rightPadding/2}).attr("height",S).attr("class",function(d){for(let[Z,Q]of N.entries())if(d.type===Q)return"section section"+Z%a.numberSectionStyles;return"section section0"}).enter();let q=P.append("g").selectAll("rect").data(v).enter(),m=i.db.getLinks();if(q.append("rect").attr("id",function(d){return r+"-"+d.id}).attr("rx",3).attr("ry",3).attr("x",function(d){if(d.milestone)return F(d.startTime)+E+0.5*(F(d.endTime)-F(d.startTime))-0.5*f;return F(d.startTime)+E}).attr("y",function(d,Z){if(Z=d.order,d.vert)return a.gridLineStartPadding;return Z*S+C}).attr("width",function(d){if(d.milestone)return f;if(d.vert)return 0.08*f;return F(d.renderEndTime||d.endTime)-F(d.startTime)}).attr("height",function(d){if(d.vert)return k.length*(a.barHeight+a.barGap)+a.barHeight*2;return f}).attr("transform-origin",function(d,Z){return Z=d.order,(F(d.startTime)+E+0.5*(F(d.endTime)-F(d.startTime))).toString()+"px "+(Z*S+C+0.5*f).toString()+"px"}).attr("class",function(d){let Q="";if(d.classes.length>0)Q=d.classes.join(" ");let ct=0;for(let[nt,g]of N.entries())if(d.type===g)ct=nt%a.numberSectionStyles;let ut="";if(d.active)if(d.crit)ut+=" activeCrit";else ut=" active";else if(d.done)if(d.crit)ut=" doneCrit";else ut=" done";else if(d.crit)ut+=" crit";if(ut.length===0)ut=" task";if(d.milestone)ut=" milestone "+ut;if(d.vert)ut=" vert "+ut;return ut+=ct,ut+=" "+Q,"task"+ut}),q.append("text").attr("id",function(d){return r+"-"+d.id+"-text"}).text(function(d){return d.task}).attr("font-size",a.fontSize).attr("x",function(d){let Z=F(d.startTime),Q=F(d.renderEndTime||d.endTime);if(d.milestone)Z+=0.5*(F(d.endTime)-F(d.startTime))-0.5*f,Q=Z+f;if(d.vert)return F(d.startTime)+E;let ct=this.getBBox().width;if(ct>Q-Z)if(Q+ct+1.5*a.leftPadding>T)return Z+E-5;else return Q+E+5;else return(Q-Z)/2+Z+E}).attr("y",function(d,Z){if(d.vert)return a.gridLineStartPadding+k.length*(a.barHeight+a.barGap)+60;return Z=d.order,Z*S+a.barHeight/2+(a.fontSize/2-2)+C}).attr("text-height",f).attr("class",function(d){let Z=F(d.startTime),Q=F(d.endTime);if(d.milestone)Q=Z+f;let ct=this.getBBox().width,ut="";if(d.classes.length>0)ut=d.classes.join(" ");let nt=0;for(let[B,K]of N.entries())if(d.type===K)nt=B%a.numberSectionStyles;let g="";if(d.active)if(d.crit)g="activeCritText"+nt;else g="activeText"+nt;if(d.done)if(d.crit)g=g+" doneCritText"+nt;else g=g+" doneText"+nt;else if(d.crit)g=g+" critText"+nt;if(d.milestone)g+=" milestoneText";if(d.vert)g+=" vertText";if(ct>Q-Z)if(Q+ct+1.5*a.leftPadding>T)return ut+" taskTextOutsideLeft taskTextOutside"+nt+" "+g;else return ut+" taskTextOutsideRight taskTextOutside"+nt+" "+g+" width-"+ct;else return ut+" taskText taskText"+nt+" "+g+" width-"+ct}),p().securityLevel==="sandbox"){let d;d=h("#i"+r);let Z=d.nodes()[0].contentDocument;q.filter(function(Q){return m.has(Q.id)}).each(function(Q){var ct=Z.querySelector("#"+CSS.escape(r+"-"+Q.id)),ut=Z.querySelector("#"+CSS.escape(r+"-"+Q.id+"-text"));let nt=ct.parentNode;var g=Z.createElement("a");g.setAttribute("xlink:href",m.get(Q.id)),g.setAttribute("target","_top"),nt.appendChild(g),g.appendChild(ct),g.appendChild(ut)})}}t(it,"drawRects");function V(v,S,C,E,f,b,T,k){if(T.length===0&&k.length===0)return;let X,o;for(let{startTime:Q,endTime:ct}of b){if(X===void 0||Q<X)X=Q;if(o===void 0||ct>o)o=ct}if(!X||!o)return;if(Jt.default(o).diff(Jt.default(X),"year")>5){l.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}let q=i.db.getDateFormat(),m=[],dt=null,d=Jt.default(X);while(d.valueOf()<=o){if(i.db.isInvalidDate(d,q,T,k))if(!dt)dt={start:d,end:d};else dt.end=d;else if(dt)m.push(dt),dt=null;d=d.add(1,"d")}P.append("g").selectAll("rect").data(m).enter().append("rect").attr("id",(Q)=>r+"-exclude-"+Q.start.format("YYYY-MM-DD")).attr("x",(Q)=>F(Q.start.startOf("day"))+C).attr("y",a.gridLineStartPadding).attr("width",(Q)=>F(Q.end.endOf("day"))-F(Q.start.startOf("day"))).attr("height",f-S-a.gridLineStartPadding).attr("transform-origin",function(Q,ct){return(F(Q.start)+C+0.5*(F(Q.end)-F(Q.start))).toString()+"px "+(ct*v+0.5*f).toString()+"px"}).attr("class","exclude-range")}t(V,"drawExcludeDays");function M(v,S,C,E){if(C<=0||v>S)return 1/0;let f=S-v,b=Jt.default.duration({[E??"day"]:C}).asMilliseconds();if(b<=0)return 1/0;return Math.ceil(f/b)}t(M,"getEstimatedTickCount");function u(v,S,C,E){let f=i.db.getDateFormat(),b=i.db.getAxisFormat(),T;if(b)T=b;else if(f==="D")T="%d";else T=a.axisFormat??"%Y-%m-%d";let k=Oe(F).tickSize(-E+S+a.gridLineStartPadding).tickFormat(Bt(T)),o=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(i.db.getTickInterval()||a.tickInterval);if(o!==null){let q=parseInt(o[1],10);if(isNaN(q)||q<=0)l.warn(`Invalid tick interval value: "${o[1]}". Skipping custom tick interval.`);else{let m=o[2],dt=i.db.getWeekday()||a.weekday,d=F.domain(),Z=d[0],Q=d[1],ct=M(Z,Q,q,m);if(ct>or)l.warn(`The tick interval "${q}${m}" would generate ${ct} ticks, which exceeds the maximum allowed (${or}). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(m){case"millisecond":k.ticks(Yt.every(q));break;case"second":k.ticks(vt.every(q));break;case"minute":k.ticks(Et.every(q));break;case"hour":k.ticks(At.every(q));break;case"day":k.ticks(Dt.every(q));break;case"week":k.ticks(Tn[dt].every(q));break;case"month":k.ticks(Ot.every(q));break}}}if(P.append("g").attr("class","grid").attr("transform","translate("+v+", "+(E-50)+")").call(k).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),i.db.topAxisEnabled()||a.topAxis){let q=Ae(F).tickSize(-E+S+a.gridLineStartPadding).tickFormat(Bt(T));if(o!==null){let m=parseInt(o[1],10);if(isNaN(m)||m<=0)l.warn(`Invalid tick interval value: "${o[1]}". Skipping custom tick interval.`);else{let dt=o[2],d=i.db.getWeekday()||a.weekday,Z=F.domain(),Q=Z[0],ct=Z[1];if(M(Q,ct,m,dt)<=or)switch(dt){case"millisecond":q.ticks(Yt.every(m));break;case"second":q.ticks(vt.every(m));break;case"minute":q.ticks(Et.every(m));break;case"hour":q.ticks(At.every(m));break;case"day":q.ticks(Dt.every(m));break;case"week":q.ticks(Tn[d].every(m));break;case"month":q.ticks(Ot.every(m));break}}}P.append("g").attr("class","grid").attr("transform","translate("+v+", "+S+")").call(q).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}t(u,"makeGrid");function I(v,S){let C=0,E=Object.keys(Y).map((f)=>[f,Y[f]]);P.append("g").selectAll("text").data(E).enter().append(function(f){let b=f[0].split(x.lineBreakRegex),T=-(b.length-1)/2,k=D.createElementNS("http://www.w3.org/2000/svg","text");k.setAttribute("dy",T+"em");for(let[X,o]of b.entries()){let q=D.createElementNS("http://www.w3.org/2000/svg","tspan");if(q.setAttribute("alignment-baseline","central"),q.setAttribute("x","10"),X>0)q.setAttribute("dy","1em");q.textContent=o,k.appendChild(q)}return k}).attr("x",10).attr("y",function(f,b){if(b>0)for(let T=0;T<b;T++)return C+=E[b-1][1],f[1]*v/2+C*v+S;else return f[1]*v/2+S}).attr("font-size",a.sectionFontSize).attr("class",function(f){for(let[b,T]of N.entries())if(f[0]===T)return"sectionTitle sectionTitle"+b%a.numberSectionStyles;return"sectionTitle"})}t(I,"vertLabels");function tt(v,S,C,E){let f=i.db.getTodayMarker();if(f==="off")return;let b=P.append("g").attr("class","today"),T=new Date,k=b.append("line");if(k.attr("x1",F(T)+v).attr("x2",F(T)+v).attr("y1",a.titleTopMargin).attr("y2",E-a.titleTopMargin).attr("class","today"),f!=="")k.attr("style",f.replace(/,/g,";"))}t(tt,"drawToday");function et(v){let S={},C=[];for(let E=0,f=v.length;E<f;++E)if(!Object.prototype.hasOwnProperty.call(S,v[E]))S[v[E]]=!0,C.push(v[E]);return C}t(et,"checkUnique")},"draw"),is={setConf:es,draw:ns},as=t((e)=>`
7
7
  .mermaid-main-font {
8
8
  font-family: ${e.fontFamily};
9
9
  }
@@ -0,0 +1 @@
1
+ import{nf}from"./index-fghst0kd.js";export{nf as createGitGraphServices};
@@ -1,4 +1,4 @@
1
- import{Ao}from"./index-44qrckd2.js";import{be}from"./index-3kgrcaq1.js";import{t,l,K,E,x,R,L,z,O,U,j,G,p,Sl,h,Cf,oe,W}from"./index-ctgefatv.js";import{Te}from"./index-0b1kwsam.js";var k={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},ke=K.gitGraph,V=t(()=>oe({...ke,...E().gitGraph}),"getConfig"),m=new Ao(()=>{let e=V(),{mainBranchName:r,mainBranchOrder:a}=e;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:a}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function ae(){return Cf({length:7})}t(ae,"getID");function fe(e,r){let a=Object.create(null);return e.reduce((n,c)=>{let d=r(c);if(!a[d])a[d]=!0,n.push(c);return n},[])}t(fe,"uniqBy");var Ce=t(function(e){m.records.direction=e},"setDirection"),ve=t(function(e){l.debug("options str",e),e=e?.trim(),e=e||"{}";try{m.records.options=JSON.parse(e)}catch(r){l.error("error while parsing gitGraph options",r.message)}},"setOptions"),Ee=t(function(){return m.records.options},"getOptions"),Le=t(function(e){let{msg:r,id:a,type:n,tags:c}=e;l.info("commit",r,a,n,c),l.debug("Entering commit:",r,a,n,c);let d=V();a=x.sanitizeText(a,d),r=x.sanitizeText(r,d),c=c?.map((o)=>x.sanitizeText(o,d));let s={id:a?a:m.records.seq+"-"+ae(),message:r,seq:m.records.seq++,type:n??k.NORMAL,tags:c??[],parents:m.records.head==null?[]:[m.records.head.id],branch:m.records.currBranch};if(m.records.head=s,l.info("main branch",d.mainBranchName),m.records.commits.has(s.id))l.warn(`Commit ID ${s.id} already exists`);m.records.commits.set(s.id,s),m.records.branches.set(m.records.currBranch,s.id),l.debug("in pushCommit "+s.id)},"commit"),Me=t(function(e){let{name:r,order:a}=e;if(r=x.sanitizeText(r,V()),m.records.branches.has(r))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 ${r}")`);m.records.branches.set(r,m.records.head!=null?m.records.head.id:null),m.records.branchConfig.set(r,{name:r,order:a}),$e(r),l.debug("in createBranch")},"branch"),Pe=t((e)=>{let{branch:r,id:a,type:n,tags:c}=e,d=V();if(r=x.sanitizeText(r,d),a)a=x.sanitizeText(a,d);let s=m.records.branches.get(m.records.currBranch),o=m.records.branches.get(r),g=s?m.records.commits.get(s):void 0,y=o?m.records.commits.get(o):void 0;if(g&&y&&g.branch===r)throw Error(`Cannot merge branch '${r}' into itself.`);if(m.records.currBranch===r){let i=Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},i}if(g===void 0||!g){let i=Error(`Incorrect usage of "merge". Current branch (${m.records.currBranch})has no commits`);throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},i}if(!m.records.branches.has(r)){let i=Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},i}if(y===void 0||!y){let i=Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},i}if(g===y){let i=Error('Incorrect usage of "merge". Both branches have same head');throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},i}if(a&&m.records.commits.has(a)){let i=Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom id");throw i.hash={text:`merge ${r} ${a} ${n} ${c?.join(" ")}`,token:`merge ${r} ${a} ${n} ${c?.join(" ")}`,expected:[`merge ${r} ${a}_UNIQUE ${n} ${c?.join(" ")}`]},i}let u=o?o:"",f={id:a||`${m.records.seq}-${ae()}`,message:`merged branch ${r} into ${m.records.currBranch}`,seq:m.records.seq++,parents:m.records.head==null?[]:[m.records.head.id,u],branch:m.records.currBranch,type:k.MERGE,customType:n,customId:a?!0:!1,tags:c??[]};m.records.head=f,m.records.commits.set(f.id,f),m.records.branches.set(m.records.currBranch,f.id),l.debug(m.records.branches),l.debug("in mergeBranch")},"merge"),Re=t(function(e){let{id:r,targetId:a,tags:n,parent:c}=e;l.debug("Entering cherryPick:",r,a,n);let d=V();if(r=x.sanitizeText(r,d),a=x.sanitizeText(a,d),n=n?.map((g)=>x.sanitizeText(g,d)),c=x.sanitizeText(c,d),!r||!m.records.commits.has(r)){let g=Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}let s=m.records.commits.get(r);if(s===void 0||!s)throw Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(c&&!(Array.isArray(s.parents)&&s.parents.includes(c)))throw Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let o=s.branch;if(s.type===k.MERGE&&!c)throw Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!m.records.commits.has(a)){if(o===m.records.currBranch){let f=Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},f}let g=m.records.branches.get(m.records.currBranch);if(g===void 0||!g){let f=Error(`Incorrect usage of "cherry-pick". Current branch (${m.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},f}let y=m.records.commits.get(g);if(y===void 0||!y){let f=Error(`Incorrect usage of "cherry-pick". Current branch (${m.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},f}let u={id:m.records.seq+"-"+ae(),message:`cherry-picked ${s?.message} into ${m.records.currBranch}`,seq:m.records.seq++,parents:m.records.head==null?[]:[m.records.head.id,s.id],branch:m.records.currBranch,type:k.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${s.id}${s.type===k.MERGE?`|parent:${c}`:""}`]};m.records.head=u,m.records.commits.set(u.id,u),m.records.branches.set(m.records.currBranch,u.id),l.debug(m.records.branches),l.debug("in cherryPick")}},"cherryPick"),$e=t(function(e){if(e=x.sanitizeText(e,V()),!m.records.branches.has(e)){let r=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}else{m.records.currBranch=e;let r=m.records.branches.get(m.records.currBranch);if(r===void 0||!r)m.records.head=null;else m.records.head=m.records.commits.get(r)??null}},"checkout");function ie(e,r,a){let n=e.indexOf(r);if(n===-1)e.push(a);else e.splice(n,1,a)}t(ie,"upsert");function he(e){let r=e.reduce((c,d)=>{if(c.seq>d.seq)return c;return d},e[0]),a="";e.forEach(function(c){if(c===r)a+="\t*";else a+="\t|"});let n=[a,r.id,r.seq];for(let c in m.records.branches)if(m.records.branches.get(c)===r.id)n.push(c);if(l.debug(n.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){let c=m.records.commits.get(r.parents[0]);if(ie(e,r,c),r.parents[1])e.push(m.records.commits.get(r.parents[1]))}else if(r.parents.length==0)return;else if(r.parents[0]){let c=m.records.commits.get(r.parents[0]);ie(e,r,c)}e=fe(e,(c)=>c.id),he(e)}t(he,"prettyPrintCommitHistory");var Oe=t(function(){l.debug(m.records.commits);let e=pe()[0];he([e])},"prettyPrint"),Ie=t(function(){m.reset(),R()},"clear"),_e=t(function(){return[...m.records.branchConfig.values()].map((r,a)=>{if(r.order!==null&&r.order!==void 0)return r;return{...r,order:parseFloat(`0.${a}`)}}).sort((r,a)=>(r.order??0)-(a.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ge=t(function(){return m.records.branches},"getBranches"),De=t(function(){return m.records.commits},"getCommits"),pe=t(function(){let e=[...m.records.commits.values()];return e.forEach(function(r){l.debug(r.id)}),e.sort((r,a)=>r.seq-a.seq),e},"getCommitsArray"),We=t(function(){return m.records.currBranch},"getCurrentBranch"),qe=t(function(){return m.records.direction},"getDirection"),Ae=t(function(){return m.records.head},"getHead"),ye={commitType:k,getConfig:V,setDirection:Ce,setOptions:ve,getOptions:Ee,commit:Le,branch:Me,merge:Pe,cherryPick:Re,checkout:$e,prettyPrint:Oe,clear:Ie,getBranchesAsObjArray:_e,getBranches:Ge,getCommits:De,getCommitsArray:pe,getCurrentBranch:We,getDirection:qe,getHead:Ae,setAccTitle:L,getAccTitle:z,getAccDescription:U,setAccDescription:O,setDiagramTitle:j,getDiagramTitle:G},He=t((e,r)=>{if(be(e,r),e.dir)r.setDirection(e.dir);for(let a of e.statements)Se(a,r)},"populate"),Se=t((e,r)=>{let n={Commit:t((c)=>r.commit(Ne(c)),"Commit"),Branch:t((c)=>r.branch(Fe(c)),"Branch"),Merge:t((c)=>r.merge(ze(c)),"Merge"),Checkout:t((c)=>r.checkout(Ye(c)),"Checkout"),CherryPicking:t((c)=>r.cherryPick(je(c)),"CherryPicking")}[e.$type];if(n)n(e);else l.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Ne=t((e)=>({id:e.id,msg:e.message??"",type:e.type!==void 0?k[e.type]:k.NORMAL,tags:e.tags??void 0}),"parseCommit"),Fe=t((e)=>({name:e.name,order:e.order??0}),"parseBranch"),ze=t((e)=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?k[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ye=t((e)=>e.branch,"parseCheckout"),je=t((e)=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ke={parse:t(async(e)=>{let r=await Te("gitGraph",e);l.debug(r),He(r,ye)},"parse")},S=10,N=40,D=4,A=2,F=8,se=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),de=12,le=new Set(["redux-color","redux-dark-color"]),Ue=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),Y=t((e,r,a=!1)=>{if(a&&e>0)return(e-1)%(r-1)+1;return e%r},"calcColorIndex"),P=new Map,I=new Map,te=30,J=new Map,re=[],H=0,w="LR",Ve=t(()=>{P.clear(),I.clear(),J.clear(),H=0,re=[],w="LR"},"clear"),xe=t((e)=>{let r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e==="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach((n)=>{let c=document.createElementNS("http://www.w3.org/2000/svg","tspan");c.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),c.setAttribute("dy","1em"),c.setAttribute("x","0"),c.setAttribute("class","row"),c.textContent=n.trim(),r.appendChild(c)}),r},"drawText"),ue=t((e)=>{let r,a,n;if(w==="BT")a=t((c,d)=>c<=d,"comparisonFunc"),n=1/0;else a=t((c,d)=>c>=d,"comparisonFunc"),n=0;return e.forEach((c)=>{let d=w==="TB"||w=="BT"?I.get(c)?.y:I.get(c)?.x;if(d!==void 0&&a(d,n))r=c,n=d}),r},"findClosestParent"),Ze=t((e)=>{let r="",a=1/0;return e.forEach((n)=>{let c=I.get(n).y;if(c<=a)r=n,a=c}),r||void 0},"findClosestParentBT"),Xe=t((e,r,a)=>{let n=a,c=a,d=[];e.forEach((s)=>{let o=r.get(s);if(!o)throw Error(`Commit not found for key ${s}`);if(o.parents.length)n=Qe(o),c=Math.max(n,c);else d.push(o);et(o,n)}),n=c,d.forEach((s)=>{tt(s,n,a)}),e.forEach((s)=>{let o=r.get(s);if(o?.parents.length){let g=Ze(o.parents);if(n=I.get(g).y-N,n<=c)c=n;let y=P.get(o.branch).pos,u=n-S;I.set(o.id,{x:y,y:u})}})},"setParallelBTPos"),Je=t((e)=>{let r=ue(e.parents.filter((n)=>n!==null));if(!r)throw Error(`Closest parent not found for commit ${e.id}`);let a=I.get(r)?.y;if(a===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return a},"findClosestParentPos"),Qe=t((e)=>Je(e)+N,"calculateCommitPosition"),et=t((e,r)=>{let a=P.get(e.branch);if(!a)throw Error(`Branch not found for commit ${e.id}`);let n=a.pos,c=r+S;return I.set(e.id,{x:n,y:c}),{x:n,y:c}},"setCommitPosition"),tt=t((e,r,a)=>{let n=P.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let c=r+a,d=n.pos;I.set(e.id,{x:d,y:c})},"setRootPosition"),rt=t((e,r,a,n,c,d)=>{let{theme:s}=p(),o=se.has(s??""),g=le.has(s??""),y=Ue.has(s??"");if(d===k.HIGHLIGHT)e.append("rect").attr("x",a.x-10+(o?3:0)).attr("y",a.y-10+(o?3:0)).attr("width",o?14:20).attr("height",o?14:20).attr("class",`commit ${r.id} commit-highlight${Y(c,F,g)} ${n}-outer`),e.append("rect").attr("x",a.x-6+(o?2:0)).attr("y",a.y-6+(o?2:0)).attr("width",o?8:12).attr("height",o?8:12).attr("class",`commit ${r.id} commit${Y(c,F,g)} ${n}-inner`);else if(d===k.CHERRY_PICK)e.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",o?7:10).attr("class",`commit ${r.id} ${n}`),e.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",o?2.5:2.75).attr("fill",y?"#000000":"#fff").attr("class",`commit ${r.id} ${n}`),e.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",o?2.5:2.75).attr("fill",y?"#000000":"#fff").attr("class",`commit ${r.id} ${n}`),e.append("line").attr("x1",a.x+3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke",y?"#000000":"#fff").attr("class",`commit ${r.id} ${n}`),e.append("line").attr("x1",a.x-3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke",y?"#000000":"#fff").attr("class",`commit ${r.id} ${n}`);else{let u=e.append("circle");if(u.attr("cx",a.x),u.attr("cy",a.y),u.attr("r",o?7:10),u.attr("class",`commit ${r.id} commit${Y(c,F,g)}`),d===k.MERGE){let f=e.append("circle");f.attr("cx",a.x),f.attr("cy",a.y),f.attr("r",o?5:6),f.attr("class",`commit ${n} ${r.id} commit${Y(c,F,g)}`)}if(d===k.REVERSE){let f=e.append("path"),i=o?4:5;f.attr("d",`M ${a.x-i},${a.y-i}L${a.x+i},${a.y+i}M${a.x-i},${a.y+i}L${a.x+i},${a.y-i}`).attr("class",`commit ${n} ${r.id} commit${Y(c,F,g)}`)}}},"drawCommitBullet"),at=t((e,r,a,n,c)=>{if(r.type!==k.CHERRY_PICK&&(r.customId&&r.type===k.MERGE||r.type!==k.MERGE)&&c.showCommitLabel){let d=e.append("g"),s=d.insert("rect").attr("class","commit-label-bkg"),o=d.append("text").attr("x",n).attr("y",a.y+25).attr("class","commit-label").text(r.id),g=o.node()?.getBBox();if(g){if(s.attr("x",a.posWithOffset-g.width/2-A).attr("y",a.y+13.5).attr("width",g.width+2*A).attr("height",g.height+2*A),w==="TB"||w==="BT")s.attr("x",a.x-(g.width+4*D+5)).attr("y",a.y-12),o.attr("x",a.x-(g.width+4*D)).attr("y",a.y+g.height-12);else o.attr("x",a.posWithOffset-g.width/2);if(c.rotateCommitLabel)if(w==="TB"||w==="BT")o.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),s.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{let y=-7.5-(g.width+10)/25*9.5,u=10+g.width/25*8.5;d.attr("transform","translate("+y+", "+u+") rotate(-45, "+n+", "+a.y+")")}}}},"drawCommitLabel"),ot=t((e,r,a,n)=>{if(r.tags.length>0){let c=0,d=0,s=0,o=[];for(let g of r.tags.reverse()){let y=e.insert("polygon"),u=e.append("circle"),f=e.append("text").attr("y",a.y-16-c).attr("class","tag-label").text(g),i=f.node()?.getBBox();if(!i)throw Error("Tag bbox not found");d=Math.max(d,i.width),s=Math.max(s,i.height),f.attr("x",a.posWithOffset-i.width/2),o.push({tag:f,hole:u,rect:y,yOffset:c}),c+=20}for(let{tag:g,hole:y,rect:u,yOffset:f}of o){let i=s/2,B=a.y-19.2-f;if(u.attr("class","tag-label-bkg").attr("points",`
1
+ import{Ao}from"./index-gwhx66f4.js";import{be}from"./index-11bdd235.js";import{t,l,K,E,x,R,L,z,O,U,j,G,p,Tl,h,xf,oe,W}from"./index-5y0bvq4q.js";import{Te}from"./index-fghst0kd.js";var k={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},ke=K.gitGraph,V=t(()=>oe({...ke,...E().gitGraph}),"getConfig"),m=new Ao(()=>{let e=V(),{mainBranchName:r,mainBranchOrder:a}=e;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:a}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function ae(){return xf({length:7})}t(ae,"getID");function fe(e,r){let a=Object.create(null);return e.reduce((n,c)=>{let d=r(c);if(!a[d])a[d]=!0,n.push(c);return n},[])}t(fe,"uniqBy");var Ce=t(function(e){m.records.direction=e},"setDirection"),ve=t(function(e){l.debug("options str",e),e=e?.trim(),e=e||"{}";try{m.records.options=JSON.parse(e)}catch(r){l.error("error while parsing gitGraph options",r.message)}},"setOptions"),Ee=t(function(){return m.records.options},"getOptions"),Le=t(function(e){let{msg:r,id:a,type:n,tags:c}=e;l.info("commit",r,a,n,c),l.debug("Entering commit:",r,a,n,c);let d=V();a=x.sanitizeText(a,d),r=x.sanitizeText(r,d),c=c?.map((o)=>x.sanitizeText(o,d));let s={id:a?a:m.records.seq+"-"+ae(),message:r,seq:m.records.seq++,type:n??k.NORMAL,tags:c??[],parents:m.records.head==null?[]:[m.records.head.id],branch:m.records.currBranch};if(m.records.head=s,l.info("main branch",d.mainBranchName),m.records.commits.has(s.id))l.warn(`Commit ID ${s.id} already exists`);m.records.commits.set(s.id,s),m.records.branches.set(m.records.currBranch,s.id),l.debug("in pushCommit "+s.id)},"commit"),Me=t(function(e){let{name:r,order:a}=e;if(r=x.sanitizeText(r,V()),m.records.branches.has(r))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 ${r}")`);m.records.branches.set(r,m.records.head!=null?m.records.head.id:null),m.records.branchConfig.set(r,{name:r,order:a}),$e(r),l.debug("in createBranch")},"branch"),Pe=t((e)=>{let{branch:r,id:a,type:n,tags:c}=e,d=V();if(r=x.sanitizeText(r,d),a)a=x.sanitizeText(a,d);let s=m.records.branches.get(m.records.currBranch),o=m.records.branches.get(r),g=s?m.records.commits.get(s):void 0,y=o?m.records.commits.get(o):void 0;if(g&&y&&g.branch===r)throw Error(`Cannot merge branch '${r}' into itself.`);if(m.records.currBranch===r){let i=Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},i}if(g===void 0||!g){let i=Error(`Incorrect usage of "merge". Current branch (${m.records.currBranch})has no commits`);throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},i}if(!m.records.branches.has(r)){let i=Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},i}if(y===void 0||!y){let i=Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},i}if(g===y){let i=Error('Incorrect usage of "merge". Both branches have same head');throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},i}if(a&&m.records.commits.has(a)){let i=Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom id");throw i.hash={text:`merge ${r} ${a} ${n} ${c?.join(" ")}`,token:`merge ${r} ${a} ${n} ${c?.join(" ")}`,expected:[`merge ${r} ${a}_UNIQUE ${n} ${c?.join(" ")}`]},i}let u=o?o:"",f={id:a||`${m.records.seq}-${ae()}`,message:`merged branch ${r} into ${m.records.currBranch}`,seq:m.records.seq++,parents:m.records.head==null?[]:[m.records.head.id,u],branch:m.records.currBranch,type:k.MERGE,customType:n,customId:a?!0:!1,tags:c??[]};m.records.head=f,m.records.commits.set(f.id,f),m.records.branches.set(m.records.currBranch,f.id),l.debug(m.records.branches),l.debug("in mergeBranch")},"merge"),Re=t(function(e){let{id:r,targetId:a,tags:n,parent:c}=e;l.debug("Entering cherryPick:",r,a,n);let d=V();if(r=x.sanitizeText(r,d),a=x.sanitizeText(a,d),n=n?.map((g)=>x.sanitizeText(g,d)),c=x.sanitizeText(c,d),!r||!m.records.commits.has(r)){let g=Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}let s=m.records.commits.get(r);if(s===void 0||!s)throw Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(c&&!(Array.isArray(s.parents)&&s.parents.includes(c)))throw Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let o=s.branch;if(s.type===k.MERGE&&!c)throw Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!m.records.commits.has(a)){if(o===m.records.currBranch){let f=Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},f}let g=m.records.branches.get(m.records.currBranch);if(g===void 0||!g){let f=Error(`Incorrect usage of "cherry-pick". Current branch (${m.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},f}let y=m.records.commits.get(g);if(y===void 0||!y){let f=Error(`Incorrect usage of "cherry-pick". Current branch (${m.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},f}let u={id:m.records.seq+"-"+ae(),message:`cherry-picked ${s?.message} into ${m.records.currBranch}`,seq:m.records.seq++,parents:m.records.head==null?[]:[m.records.head.id,s.id],branch:m.records.currBranch,type:k.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${s.id}${s.type===k.MERGE?`|parent:${c}`:""}`]};m.records.head=u,m.records.commits.set(u.id,u),m.records.branches.set(m.records.currBranch,u.id),l.debug(m.records.branches),l.debug("in cherryPick")}},"cherryPick"),$e=t(function(e){if(e=x.sanitizeText(e,V()),!m.records.branches.has(e)){let r=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}else{m.records.currBranch=e;let r=m.records.branches.get(m.records.currBranch);if(r===void 0||!r)m.records.head=null;else m.records.head=m.records.commits.get(r)??null}},"checkout");function ie(e,r,a){let n=e.indexOf(r);if(n===-1)e.push(a);else e.splice(n,1,a)}t(ie,"upsert");function he(e){let r=e.reduce((c,d)=>{if(c.seq>d.seq)return c;return d},e[0]),a="";e.forEach(function(c){if(c===r)a+="\t*";else a+="\t|"});let n=[a,r.id,r.seq];for(let c in m.records.branches)if(m.records.branches.get(c)===r.id)n.push(c);if(l.debug(n.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){let c=m.records.commits.get(r.parents[0]);if(ie(e,r,c),r.parents[1])e.push(m.records.commits.get(r.parents[1]))}else if(r.parents.length==0)return;else if(r.parents[0]){let c=m.records.commits.get(r.parents[0]);ie(e,r,c)}e=fe(e,(c)=>c.id),he(e)}t(he,"prettyPrintCommitHistory");var Oe=t(function(){l.debug(m.records.commits);let e=pe()[0];he([e])},"prettyPrint"),Ie=t(function(){m.reset(),R()},"clear"),_e=t(function(){return[...m.records.branchConfig.values()].map((r,a)=>{if(r.order!==null&&r.order!==void 0)return r;return{...r,order:parseFloat(`0.${a}`)}}).sort((r,a)=>(r.order??0)-(a.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ge=t(function(){return m.records.branches},"getBranches"),De=t(function(){return m.records.commits},"getCommits"),pe=t(function(){let e=[...m.records.commits.values()];return e.forEach(function(r){l.debug(r.id)}),e.sort((r,a)=>r.seq-a.seq),e},"getCommitsArray"),We=t(function(){return m.records.currBranch},"getCurrentBranch"),qe=t(function(){return m.records.direction},"getDirection"),Ae=t(function(){return m.records.head},"getHead"),ye={commitType:k,getConfig:V,setDirection:Ce,setOptions:ve,getOptions:Ee,commit:Le,branch:Me,merge:Pe,cherryPick:Re,checkout:$e,prettyPrint:Oe,clear:Ie,getBranchesAsObjArray:_e,getBranches:Ge,getCommits:De,getCommitsArray:pe,getCurrentBranch:We,getDirection:qe,getHead:Ae,setAccTitle:L,getAccTitle:z,getAccDescription:U,setAccDescription:O,setDiagramTitle:j,getDiagramTitle:G},He=t((e,r)=>{if(be(e,r),e.dir)r.setDirection(e.dir);for(let a of e.statements)Se(a,r)},"populate"),Se=t((e,r)=>{let n={Commit:t((c)=>r.commit(Ne(c)),"Commit"),Branch:t((c)=>r.branch(Fe(c)),"Branch"),Merge:t((c)=>r.merge(ze(c)),"Merge"),Checkout:t((c)=>r.checkout(Ye(c)),"Checkout"),CherryPicking:t((c)=>r.cherryPick(je(c)),"CherryPicking")}[e.$type];if(n)n(e);else l.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Ne=t((e)=>({id:e.id,msg:e.message??"",type:e.type!==void 0?k[e.type]:k.NORMAL,tags:e.tags??void 0}),"parseCommit"),Fe=t((e)=>({name:e.name,order:e.order??0}),"parseBranch"),ze=t((e)=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?k[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ye=t((e)=>e.branch,"parseCheckout"),je=t((e)=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ke={parse:t(async(e)=>{let r=await Te("gitGraph",e);l.debug(r),He(r,ye)},"parse")},S=10,N=40,D=4,A=2,F=8,se=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),de=12,le=new Set(["redux-color","redux-dark-color"]),Ue=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),Y=t((e,r,a=!1)=>{if(a&&e>0)return(e-1)%(r-1)+1;return e%r},"calcColorIndex"),P=new Map,I=new Map,te=30,J=new Map,re=[],H=0,w="LR",Ve=t(()=>{P.clear(),I.clear(),J.clear(),H=0,re=[],w="LR"},"clear"),xe=t((e)=>{let r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e==="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach((n)=>{let c=document.createElementNS("http://www.w3.org/2000/svg","tspan");c.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),c.setAttribute("dy","1em"),c.setAttribute("x","0"),c.setAttribute("class","row"),c.textContent=n.trim(),r.appendChild(c)}),r},"drawText"),ue=t((e)=>{let r,a,n;if(w==="BT")a=t((c,d)=>c<=d,"comparisonFunc"),n=1/0;else a=t((c,d)=>c>=d,"comparisonFunc"),n=0;return e.forEach((c)=>{let d=w==="TB"||w=="BT"?I.get(c)?.y:I.get(c)?.x;if(d!==void 0&&a(d,n))r=c,n=d}),r},"findClosestParent"),Ze=t((e)=>{let r="",a=1/0;return e.forEach((n)=>{let c=I.get(n).y;if(c<=a)r=n,a=c}),r||void 0},"findClosestParentBT"),Xe=t((e,r,a)=>{let n=a,c=a,d=[];e.forEach((s)=>{let o=r.get(s);if(!o)throw Error(`Commit not found for key ${s}`);if(o.parents.length)n=Qe(o),c=Math.max(n,c);else d.push(o);et(o,n)}),n=c,d.forEach((s)=>{tt(s,n,a)}),e.forEach((s)=>{let o=r.get(s);if(o?.parents.length){let g=Ze(o.parents);if(n=I.get(g).y-N,n<=c)c=n;let y=P.get(o.branch).pos,u=n-S;I.set(o.id,{x:y,y:u})}})},"setParallelBTPos"),Je=t((e)=>{let r=ue(e.parents.filter((n)=>n!==null));if(!r)throw Error(`Closest parent not found for commit ${e.id}`);let a=I.get(r)?.y;if(a===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return a},"findClosestParentPos"),Qe=t((e)=>Je(e)+N,"calculateCommitPosition"),et=t((e,r)=>{let a=P.get(e.branch);if(!a)throw Error(`Branch not found for commit ${e.id}`);let n=a.pos,c=r+S;return I.set(e.id,{x:n,y:c}),{x:n,y:c}},"setCommitPosition"),tt=t((e,r,a)=>{let n=P.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let c=r+a,d=n.pos;I.set(e.id,{x:d,y:c})},"setRootPosition"),rt=t((e,r,a,n,c,d)=>{let{theme:s}=p(),o=se.has(s??""),g=le.has(s??""),y=Ue.has(s??"");if(d===k.HIGHLIGHT)e.append("rect").attr("x",a.x-10+(o?3:0)).attr("y",a.y-10+(o?3:0)).attr("width",o?14:20).attr("height",o?14:20).attr("class",`commit ${r.id} commit-highlight${Y(c,F,g)} ${n}-outer`),e.append("rect").attr("x",a.x-6+(o?2:0)).attr("y",a.y-6+(o?2:0)).attr("width",o?8:12).attr("height",o?8:12).attr("class",`commit ${r.id} commit${Y(c,F,g)} ${n}-inner`);else if(d===k.CHERRY_PICK)e.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",o?7:10).attr("class",`commit ${r.id} ${n}`),e.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",o?2.5:2.75).attr("fill",y?"#000000":"#fff").attr("class",`commit ${r.id} ${n}`),e.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",o?2.5:2.75).attr("fill",y?"#000000":"#fff").attr("class",`commit ${r.id} ${n}`),e.append("line").attr("x1",a.x+3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke",y?"#000000":"#fff").attr("class",`commit ${r.id} ${n}`),e.append("line").attr("x1",a.x-3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke",y?"#000000":"#fff").attr("class",`commit ${r.id} ${n}`);else{let u=e.append("circle");if(u.attr("cx",a.x),u.attr("cy",a.y),u.attr("r",o?7:10),u.attr("class",`commit ${r.id} commit${Y(c,F,g)}`),d===k.MERGE){let f=e.append("circle");f.attr("cx",a.x),f.attr("cy",a.y),f.attr("r",o?5:6),f.attr("class",`commit ${n} ${r.id} commit${Y(c,F,g)}`)}if(d===k.REVERSE){let f=e.append("path"),i=o?4:5;f.attr("d",`M ${a.x-i},${a.y-i}L${a.x+i},${a.y+i}M${a.x-i},${a.y+i}L${a.x+i},${a.y-i}`).attr("class",`commit ${n} ${r.id} commit${Y(c,F,g)}`)}}},"drawCommitBullet"),at=t((e,r,a,n,c)=>{if(r.type!==k.CHERRY_PICK&&(r.customId&&r.type===k.MERGE||r.type!==k.MERGE)&&c.showCommitLabel){let d=e.append("g"),s=d.insert("rect").attr("class","commit-label-bkg"),o=d.append("text").attr("x",n).attr("y",a.y+25).attr("class","commit-label").text(r.id),g=o.node()?.getBBox();if(g){if(s.attr("x",a.posWithOffset-g.width/2-A).attr("y",a.y+13.5).attr("width",g.width+2*A).attr("height",g.height+2*A),w==="TB"||w==="BT")s.attr("x",a.x-(g.width+4*D+5)).attr("y",a.y-12),o.attr("x",a.x-(g.width+4*D)).attr("y",a.y+g.height-12);else o.attr("x",a.posWithOffset-g.width/2);if(c.rotateCommitLabel)if(w==="TB"||w==="BT")o.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),s.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{let y=-7.5-(g.width+10)/25*9.5,u=10+g.width/25*8.5;d.attr("transform","translate("+y+", "+u+") rotate(-45, "+n+", "+a.y+")")}}}},"drawCommitLabel"),ot=t((e,r,a,n)=>{if(r.tags.length>0){let c=0,d=0,s=0,o=[];for(let g of r.tags.reverse()){let y=e.insert("polygon"),u=e.append("circle"),f=e.append("text").attr("y",a.y-16-c).attr("class","tag-label").text(g),i=f.node()?.getBBox();if(!i)throw Error("Tag bbox not found");d=Math.max(d,i.width),s=Math.max(s,i.height),f.attr("x",a.posWithOffset-i.width/2),o.push({tag:f,hole:u,rect:y,yOffset:c}),c+=20}for(let{tag:g,hole:y,rect:u,yOffset:f}of o){let i=s/2,B=a.y-19.2-f;if(u.attr("class","tag-label-bkg").attr("points",`
2
2
  ${n-d/2-D/2},${B+A}
3
3
  ${n-d/2-D/2},${B-A}
4
4
  ${a.posWithOffset-d/2-D},${B-i-A}
@@ -11,7 +11,7 @@ import{Ao}from"./index-44qrckd2.js";import{be}from"./index-3kgrcaq1.js";import{t
11
11
  ${a.x+S+d+4},${b-i-2}
12
12
  ${a.x+S+d+4},${b+i+2}
13
13
  ${a.x+S},${b+i+2}`).attr("transform","translate(12,12) rotate(45, "+a.x+","+n+")"),y.attr("cx",a.x+D/2).attr("cy",b).attr("transform","translate(12,12) rotate(45, "+a.x+","+n+")"),g.attr("x",a.x+5).attr("y",b+3).attr("transform","translate(14,14) rotate(45, "+a.x+","+n+")")}}}},"drawCommitTags"),st=t((e)=>{switch(e.customType??e.type){case k.NORMAL:return"commit-normal";case k.REVERSE:return"commit-reverse";case k.HIGHLIGHT:return"commit-highlight";case k.MERGE:return"commit-merge";case k.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),nt=t((e,r,a,n)=>{let c={x:0,y:0};if(e.parents.length>0){let d=ue(e.parents);if(d){let s=n.get(d)??c;if(r==="TB")return s.y+N;else if(r==="BT")return(n.get(e.id)??c).y-N;else return s.x+N}}else if(r==="TB")return te;else if(r==="BT")return(n.get(e.id)??c).y-N;else return 0;return 0},"calculatePosition"),ct=t((e,r,a)=>{let n=w==="BT"&&a?r:r+S,c=P.get(e.branch)?.pos,d=w==="TB"||w==="BT"?P.get(e.branch)?.pos:n;if(d===void 0||c===void 0)throw Error(`Position were undefined for commit ${e.id}`);let s=se.has(p().theme??""),o=w==="TB"||w==="BT"?n:c+(s?de/2+1:-2);return{x:d,y:o,posWithOffset:n}},"getCommitPosition"),ge=t((e,r,a,n)=>{let c=e.append("g").attr("class","commit-bullets"),d=e.append("g").attr("class","commit-labels"),s=w==="TB"||w==="BT"?te:0,o=[...r.keys()],g=n.parallelCommits??!1,y=t((f,i)=>{let B=r.get(f)?.seq,b=r.get(i)?.seq;return B!==void 0&&b!==void 0?B-b:0},"sortKeys"),u=o.sort(y);if(w==="BT"){if(g)Xe(u,r,s);u=u.reverse()}u.forEach((f)=>{let i=r.get(f);if(!i)throw Error(`Commit not found for key ${f}`);if(g)s=nt(i,w,s,I);let B=ct(i,s,g);if(a){let b=st(i),C=i.customType??i.type,v=P.get(i.branch)?.index??0;rt(c,i,B,b,v,C),at(d,i,B,s,n),ot(d,i,B,s)}if(w==="TB"||w==="BT")I.set(i.id,{x:B.x,y:B.posWithOffset});else I.set(i.id,{x:B.posWithOffset,y:B.y});if(s=w==="BT"&&g?s+N:s+N+S,s>H)H=s})},"drawCommits"),it=t((e,r,a,n,c)=>{let s=(w==="TB"||w==="BT"?a.x<n.x:a.y<n.y)?r.branch:e.branch,o=t((y)=>y.branch===s,"isOnBranchToGetCurve"),g=t((y)=>y.seq>e.seq&&y.seq<r.seq,"isBetweenCommits");return[...c.values()].some((y)=>g(y)&&o(y))},"shouldRerouteArrow"),Q=t((e,r,a=0)=>{let n=e+Math.abs(e-r)/2;if(a>5)return n;if(re.every((s)=>Math.abs(s-n)>=10))return re.push(n),n;let d=Math.abs(e-r);return Q(e,r-d/5,a+1)},"findLane"),dt=t((e,r,a,n)=>{let{theme:c}=p(),d=le.has(c??""),s=I.get(r.id),o=I.get(a.id);if(s===void 0||o===void 0)throw Error(`Commit positions not found for commits ${r.id} and ${a.id}`);let g=it(r,a,s,o,n),y="",u="",f=0,i=0,B=P.get(a.branch)?.index;if(a.type===k.MERGE&&r.id!==a.parents[0])B=P.get(r.branch)?.index;let b;if(g){y="A 10 10, 0, 0, 0,",u="A 10 10, 0, 0, 1,",f=10,i=10;let C=s.y<o.y?Q(s.y,o.y):Q(o.y,s.y),v=s.x<o.x?Q(s.x,o.x):Q(o.x,s.x);if(w==="TB")if(s.x<o.x)b=`M ${s.x} ${s.y} L ${v-f} ${s.y} ${u} ${v} ${s.y+i} L ${v} ${o.y-f} ${y} ${v+i} ${o.y} L ${o.x} ${o.y}`;else B=P.get(r.branch)?.index,b=`M ${s.x} ${s.y} L ${v+f} ${s.y} ${y} ${v} ${s.y+i} L ${v} ${o.y-f} ${u} ${v-i} ${o.y} L ${o.x} ${o.y}`;else if(w==="BT")if(s.x<o.x)b=`M ${s.x} ${s.y} L ${v-f} ${s.y} ${y} ${v} ${s.y-i} L ${v} ${o.y+f} ${u} ${v+i} ${o.y} L ${o.x} ${o.y}`;else B=P.get(r.branch)?.index,b=`M ${s.x} ${s.y} L ${v+f} ${s.y} ${u} ${v} ${s.y-i} L ${v} ${o.y+f} ${y} ${v-i} ${o.y} L ${o.x} ${o.y}`;else if(s.y<o.y)b=`M ${s.x} ${s.y} L ${s.x} ${C-f} ${y} ${s.x+i} ${C} L ${o.x-f} ${C} ${u} ${o.x} ${C+i} L ${o.x} ${o.y}`;else B=P.get(r.branch)?.index,b=`M ${s.x} ${s.y} L ${s.x} ${C+f} ${u} ${s.x+i} ${C} L ${o.x-f} ${C} ${y} ${o.x} ${C-i} L ${o.x} ${o.y}`}else if(y="A 20 20, 0, 0, 0,",u="A 20 20, 0, 0, 1,",f=20,i=20,w==="TB"){if(s.x<o.x)if(a.type===k.MERGE&&r.id!==a.parents[0])b=`M ${s.x} ${s.y} L ${s.x} ${o.y-f} ${y} ${s.x+i} ${o.y} L ${o.x} ${o.y}`;else b=`M ${s.x} ${s.y} L ${o.x-f} ${s.y} ${u} ${o.x} ${s.y+i} L ${o.x} ${o.y}`;if(s.x>o.x)if(y="A 20 20, 0, 0, 0,",u="A 20 20, 0, 0, 1,",f=20,i=20,a.type===k.MERGE&&r.id!==a.parents[0])b=`M ${s.x} ${s.y} L ${s.x} ${o.y-f} ${u} ${s.x-i} ${o.y} L ${o.x} ${o.y}`;else b=`M ${s.x} ${s.y} L ${o.x+f} ${s.y} ${y} ${o.x} ${s.y+i} L ${o.x} ${o.y}`;if(s.x===o.x)b=`M ${s.x} ${s.y} L ${o.x} ${o.y}`}else if(w==="BT"){if(s.x<o.x)if(a.type===k.MERGE&&r.id!==a.parents[0])b=`M ${s.x} ${s.y} L ${s.x} ${o.y+f} ${u} ${s.x+i} ${o.y} L ${o.x} ${o.y}`;else b=`M ${s.x} ${s.y} L ${o.x-f} ${s.y} ${y} ${o.x} ${s.y-i} L ${o.x} ${o.y}`;if(s.x>o.x)if(y="A 20 20, 0, 0, 0,",u="A 20 20, 0, 0, 1,",f=20,i=20,a.type===k.MERGE&&r.id!==a.parents[0])b=`M ${s.x} ${s.y} L ${s.x} ${o.y+f} ${y} ${s.x-i} ${o.y} L ${o.x} ${o.y}`;else b=`M ${s.x} ${s.y} L ${o.x+f} ${s.y} ${u} ${o.x} ${s.y-i} L ${o.x} ${o.y}`;if(s.x===o.x)b=`M ${s.x} ${s.y} L ${o.x} ${o.y}`}else{if(s.y<o.y)if(a.type===k.MERGE&&r.id!==a.parents[0])b=`M ${s.x} ${s.y} L ${o.x-f} ${s.y} ${u} ${o.x} ${s.y+i} L ${o.x} ${o.y}`;else b=`M ${s.x} ${s.y} L ${s.x} ${o.y-f} ${y} ${s.x+i} ${o.y} L ${o.x} ${o.y}`;if(s.y>o.y)if(a.type===k.MERGE&&r.id!==a.parents[0])b=`M ${s.x} ${s.y} L ${o.x-f} ${s.y} ${y} ${o.x} ${s.y-i} L ${o.x} ${o.y}`;else b=`M ${s.x} ${s.y} L ${s.x} ${o.y+f} ${u} ${s.x+i} ${o.y} L ${o.x} ${o.y}`;if(s.y===o.y)b=`M ${s.x} ${s.y} L ${o.x} ${o.y}`}if(b===void 0)throw Error("Line definition not found");e.append("path").attr("d",b).attr("class","arrow arrow"+Y(B,F,d))},"drawArrow"),ht=t((e,r)=>{let a=e.append("g").attr("class","commit-arrows");[...r.keys()].forEach((n)=>{let c=r.get(n);if(c.parents&&c.parents.length>0)c.parents.forEach((d)=>{dt(a,r.get(d),c,r)})})},"drawArrows"),lt=t((e,r,a,n)=>{let{look:c,theme:d,themeVariables:s}=p(),{dropShadow:o,THEME_COLOR_LIMIT:g}=s,y=se.has(d??""),u=le.has(d??""),f=e.append("g");r.forEach((i,B)=>{let b=Y(B,y?g:F,u),C=P.get(i.name)?.pos;if(C===void 0)throw Error(`Position not found for branch ${i.name}`);let v=w==="TB"||w==="BT"?C:y?C+de/2+1:C-2,T=f.append("line");if(T.attr("x1",0),T.attr("y1",v),T.attr("x2",H),T.attr("y2",v),T.attr("class","branch branch"+b),w==="TB")T.attr("y1",te),T.attr("x1",C),T.attr("y2",H),T.attr("x2",C);else if(w==="BT")T.attr("y1",H),T.attr("x1",C),T.attr("y2",te),T.attr("x2",C);re.push(v);let ne=i.name,X=xe(ne),_=f.insert("rect"),q=f.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+b);q.node().appendChild(X);let M=X.getBBox(),me=y?0:4,ee=y?16:0,Z=y?de:0;if(c==="neo")_.attr("data-look","neo");if(_.attr("class","branchLabelBkg label"+b).attr("style",c==="neo"?`filter:${y?`url(#${n}-drop-shadow)`:o}`:"").attr("rx",me).attr("ry",me).attr("x",-M.width-4-(a.rotateCommitLabel===!0?30:0)).attr("y",-M.height/2+10).attr("width",M.width+18+ee).attr("height",M.height+4+Z),q.attr("transform","translate("+(-M.width-14-(a.rotateCommitLabel===!0?30:0)+ee/2)+", "+(v-M.height/2-2)+")"),w==="TB"){if(_.attr("x",C-M.width/2-10).attr("y",0),q.attr("transform","translate("+(C-M.width/2-5)+", 0)"),y)_.attr("transform",`translate(${-ee/2-3}, ${-Z-10})`),q.attr("transform","translate("+(C-M.width/2-5)+", "+(-Z*2+7)+")")}else if(w==="BT"){if(_.attr("x",C-M.width/2-10).attr("y",H),q.attr("transform","translate("+(C-M.width/2-5)+", "+H+")"),y)_.attr("transform",`translate(${-ee/2-3}, ${Z+10})`),q.attr("transform","translate("+(C-M.width/2-5)+", "+(H+Z*2+4)+")")}else _.attr("transform","translate(-19, "+(v-12-Z/2)+")")})},"drawBranches"),mt=t(function(e,r,a,n,c){return P.set(e,{pos:r,index:a}),r+=50+(c?40:0)+(w==="TB"||w==="BT"?n.width/2:0),r},"setBranchPosition"),gt=t(function(e,r,a,n){Ve(),l.debug("in gitgraph renderer",e+`
14
- `,"id:",r,a);let c=n.db;if(!c.getConfig){l.error("getConfig method is not available on db");return}let d=c.getConfig(),s=d.rotateCommitLabel??!1;J=c.getCommits();let o=c.getBranchesAsObjArray();w=c.getDirection();let g=h(`[id="${r}"]`),{look:y,theme:u,themeVariables:f}=p(),{useGradient:i,gradientStart:B,gradientStop:b,filterColor:C}=f;if(i){let T=g.append("defs").append("linearGradient").attr("id",r+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");T.append("stop").attr("offset","0%").attr("stop-color",B).attr("stop-opacity",1),T.append("stop").attr("offset","100%").attr("stop-color",b).attr("stop-opacity",1)}if(y==="neo"&&se.has(u??""))g.append("defs").append("filter").attr("id",r+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",C);let v=0;if(o.forEach((T,ne)=>{let X=xe(T.name),_=g.append("g"),ce=_.insert("g").attr("class","branchLabel"),q=ce.insert("g").attr("class","label branch-label");q.node()?.appendChild(X);let M=X.getBBox();v=mt(T.name,v,ne,M,s),q.remove(),ce.remove(),_.remove()}),ge(g,J,!1,d),d.showBranches)lt(g,o,d,r);ht(g,J),ge(g,J,!0,d),W.insertTitle(g,"gitTitleText",d.titleTopMargin??0,c.getDiagramTitle()),Sl(void 0,g,d.diagramPadding,d.useMaxWidth)},"draw"),ft={draw:gt},we=8,Be=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),$t=new Set(["redux-color","redux-dark-color"]),pt=new Set(["neo","neo-dark"]),yt=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),xt=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),ut=t((e)=>{let{svgId:r}=e,a="";if(e.useGradient&&r)for(let n=0;n<e.THEME_COLOR_LIMIT;n++)a+=`
14
+ `,"id:",r,a);let c=n.db;if(!c.getConfig){l.error("getConfig method is not available on db");return}let d=c.getConfig(),s=d.rotateCommitLabel??!1;J=c.getCommits();let o=c.getBranchesAsObjArray();w=c.getDirection();let g=h(`[id="${r}"]`),{look:y,theme:u,themeVariables:f}=p(),{useGradient:i,gradientStart:B,gradientStop:b,filterColor:C}=f;if(i){let T=g.append("defs").append("linearGradient").attr("id",r+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");T.append("stop").attr("offset","0%").attr("stop-color",B).attr("stop-opacity",1),T.append("stop").attr("offset","100%").attr("stop-color",b).attr("stop-opacity",1)}if(y==="neo"&&se.has(u??""))g.append("defs").append("filter").attr("id",r+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",C);let v=0;if(o.forEach((T,ne)=>{let X=xe(T.name),_=g.append("g"),ce=_.insert("g").attr("class","branchLabel"),q=ce.insert("g").attr("class","label branch-label");q.node()?.appendChild(X);let M=X.getBBox();v=mt(T.name,v,ne,M,s),q.remove(),ce.remove(),_.remove()}),ge(g,J,!1,d),d.showBranches)lt(g,o,d,r);ht(g,J),ge(g,J,!0,d),W.insertTitle(g,"gitTitleText",d.titleTopMargin??0,c.getDiagramTitle()),Tl(void 0,g,d.diagramPadding,d.useMaxWidth)},"draw"),ft={draw:gt},we=8,Be=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),$t=new Set(["redux-color","redux-dark-color"]),pt=new Set(["neo","neo-dark"]),yt=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),xt=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),ut=t((e)=>{let{svgId:r}=e,a="";if(e.useGradient&&r)for(let n=0;n<e.THEME_COLOR_LIMIT;n++)a+=`
15
15
  .label${n} { fill: ${e.mainBkg}; stroke: url(${r}-gradient); stroke-width: ${e.strokeWidth};}
16
16
  `;return a},"genGitGraphGradient"),bt=t((e)=>{let r=E(),{theme:a,themeVariables:n}=r,{borderColorArray:c}=n,d=Be.has(a);if(pt.has(a)){let s="";for(let o=0;o<e.THEME_COLOR_LIMIT;o++)if(o===0)s+=`
17
17
  .branch-label${o} { fill: ${e.nodeBorder};}
@@ -0,0 +1 @@
1
+ import{_f}from"./index-nd4p98mc.js";import"./index-9wd9y6m0.js";import"./index-3zc1b0dv.js";import"./index-3az1w5f8.js";import"./index-xya34x4v.js";export{_f as default};
@@ -0,0 +1 @@
1
+ import{Cn}from"./index-y3hdv561.js";import"./index-3az1w5f8.js";import"./index-qn4pkjfh.js";export{Cn as default};
@@ -1 +1 @@
1
- import{d,n,i,o,a,e,S,m,M,Vt,ma,De,C,Dn,b,sg,Lp,Ru,lg,Wl}from"./index-75haaj8g.js";import{cu}from"./index-k1xt92h4.js";import"./index-8e15fzax.js";var de={idle:"Kosong",loading:"Memuat",ready:"Siap"},V="p-1 rounded hover:bg-ink/5 disabled:opacity-25 disabled:hover:bg-transparent text-ink/70 hover:text-ink cursor-pointer disabled:cursor-not-allowed transition-colors";function K({url:t,input:s,loading:r,error:l,canGoBack:p,canGoForward:f,viewportMode:h,zoomLevel:c,onInputChange:x,onSubmit:A,onBack:P,onForward:T,onReload:v,onOpenExternal:E,onIncludeInChat:O,onChangeViewport:I,onZoomIn:N,onZoomOut:L,onResetZoom:u,onSetZoom:g,annotate:k}){let w=o(void 0);i(()=>{if(w.current===t)return;if(w.current=t,t)x(t)},[t,x]);let B=!t?"idle":r?"loading":"ready",z=B==="ready"?"bg-success animate-pulse":B==="loading"?"bg-ink/40 animate-pulse":"bg-ink/25",D=e("div",{className:"flex items-center bg-canvas border border-ink/10 rounded-md p-0.5 space-x-0.5 flex-shrink-0",children:[e("button",{type:"button",onClick:P,disabled:!p,"aria-label":"Back",title:"Back",className:V,children:e(Vt,{size:12})}),e("button",{type:"button",onClick:T,disabled:!f,"aria-label":"Maju",title:"Maju",className:V,children:e(ma,{size:12})}),e("button",{type:"button",onClick:v,disabled:!t,"aria-label":"Reload",title:"Reload",className:V,children:e(C,{size:12,className:r?"animate-spin":void 0})})]});return e(cu,{url:t,statusDotClass:z,statusLabel:de[B],viewportMode:h,zoomLevel:c,onChangeViewport:I,onZoomIn:N,onZoomOut:L,onResetZoom:u,onSetZoom:g,annotate:k,onIncludeInChat:O,onOpenExternal:E,openExternalLabel:"Buka di tab baru",openExternalTitle:"Buka di tab baru (untuk situs yang menolak iframe)",children:e("div",{className:"flex items-center flex-1 min-w-0 space-x-1.5",children:[D,e("form",{className:`flex-1 min-w-0 flex items-center bg-canvas border rounded-md px-2 py-0.5 space-x-1 focus-within:border-ink/40 ${l?"border-error":"border-ink/15"}`,onSubmit:(y)=>{y.preventDefault(),A(s)},children:[e(De,{size:12,className:"text-ink/40 flex-shrink-0"}),e("input",{type:"text",value:s,onChange:(y)=>x(y.currentTarget.value),placeholder:"Type an address (e.g. localhost:5173) and press Enter…","aria-label":"Browser address","aria-invalid":l!==void 0&&l!==null,title:l??void 0,spellcheck:!1,autoComplete:"off",className:`w-full min-w-0 bg-transparent outline-none font-mono text-[11px] placeholder:text-ink/35 ${l?"text-error":"text-ink/90"}`})]})]})})}var Z={"desktop-16-9":"w-full max-w-[1280px] aspect-video max-h-full border border-ink/20 rounded-lg shadow-md overflow-hidden my-auto",laptop:"w-[1024px] max-w-full h-[768px] max-h-full border border-ink/20 rounded-lg shadow-md overflow-hidden my-auto",tablet:"w-[768px] max-w-full h-[1024px] max-h-full border border-ink/20 rounded-lg shadow-md overflow-hidden my-auto",mobile:"w-[375px] max-w-full h-[667px] max-h-full border border-ink/20 rounded-xl shadow-md overflow-hidden my-auto","mobile-lg":"w-[414px] max-w-full h-[896px] max-h-full border border-ink/20 rounded-xl shadow-md overflow-hidden my-auto",responsive:"w-full h-full border-0"};var ce="clipboard-read; clipboard-write; fullscreen";function X({url:t,frameKey:s,loading:r,viewportMode:l,zoomLevel:p,onLoad:f,active:h=!0,overlay:c,onFrame:x}){if(!h)return null;if(!t)return e("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center select-none",children:[e("div",{className:"w-12 h-12 rounded-xl bg-ink/5 border border-ink/10 flex items-center justify-center text-ink/40 mb-3",children:e(De,{size:22})}),e("h3",{className:"text-sm font-semibold text-ink mb-1",children:"Browser Anda"}),e("p",{className:"text-xs text-ink/60 max-w-sm",children:"Type an address above and press Enter. The page loads inside this panel."}),e("p",{className:"text-[11px] text-ink/45 max-w-sm mt-2",children:"Sebagian situs (Google, GitHub) menolak ditampilkan dalam iframe — pakai tombol buka di tab baru."})]});return e("div",{className:"flex-1 min-h-0 relative flex items-center justify-center p-2 overflow-auto bg-canvas/60",children:[r?e("div",{className:"absolute inset-0 z-10 flex items-center justify-center pointer-events-none",children:e("div",{className:"flex items-center space-x-2 px-3 py-1.5 rounded-md bg-paper border border-ink/15",children:[e(m,{size:13,className:"animate-spin text-ink/50"}),e("span",{className:"text-[11px] font-mono text-ink/60",children:"Memuat…"})]})}):null,e("div",{className:`relative flex flex-col bg-white ${Z[l]} transition-all duration-200`,style:{zoom:p!==100?`${p}%`:void 0,transformOrigin:"top center"},children:[e("iframe",{ref:(A)=>x?.(A),src:t,title:"Browser pengguna",onLoad:f,referrerPolicy:"no-referrer",allow:ce,className:"w-full h-full bg-white border-0",style:c?{pointerEvents:"none"}:void 0},s),c]})]})}var W="w-full min-w-0 bg-canvas border border-ink/15 rounded px-2 py-1 text-[11px] font-mono text-ink placeholder:text-ink/35 focus:outline-none focus:border-ink/40";function ue(t){if(!t||t.ok)return null;if(t.reason==="cross-origin")return"This page is cross-origin, so its elements cannot be read. Name the part and add a note instead.";if(t.reason==="no-frame")return"The page has not loaded, so its elements cannot be read yet.";return"There is no element at this point (empty space). Name the part instead."}function Y({shape:t,index:s,readability:r,onLabel:l,onNote:p}){let f=ue(r),h=t.element;return e("div",{className:"flex items-start gap-1.5 min-w-0",children:[e("span",{className:"text-[11px] font-mono text-ink/45 pt-1 flex-shrink-0",children:[Ru[t.tool]," #",s]}),e("div",{className:"flex-1 min-w-0 space-y-1",children:[e("div",{className:"flex items-center gap-1 flex-wrap",children:[e("span",{className:"text-[10px] uppercase font-mono text-ink/40",children:"bagian"}),lg.map((c)=>{let x=t.label===c;return e("button",{type:"button",onClick:()=>l(x?"":c),"aria-pressed":x,className:`px-1.5 py-0.5 rounded-full border text-[10px] font-mono transition-colors cursor-pointer ${x?"bg-ink text-canvas border-ink":"bg-canvas text-ink/65 border-ink/15 hover:border-ink/40"}`,children:c},c)}),e("input",{value:t.label,onInput:(c)=>l(c.currentTarget.value),placeholder:"or type your own…","aria-label":"Name of the marked part",spellcheck:!1,className:`${W} flex-1 min-w-[110px]`})]}),e("textarea",{value:t.note,onInput:(c)=>p(c.currentTarget.value),placeholder:"What is wrong with this part? (e.g. the Pay button looks disabled)",rows:2,"aria-label":"Annotation note",className:`${W} resize-y`}),h?e("p",{className:"text-[10px] font-mono text-ink/45 truncate",title:h.path,children:["elemen: ",h.path,h.state?` · ${h.state}`:""]}):null,f?e("p",{className:"text-[10px] text-ink/40",children:f}):null]})]})}var me=["box","pin","arrow"],pe="px-2 py-1 rounded text-[11px] font-mono border transition-colors cursor-pointer",F="flex items-center gap-1 px-2 py-1 rounded text-[11px] border border-ink/15 hover:border-ink/40 text-ink/80 hover:text-ink transition-colors cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed";function j({tool:t,shapes:s,selectedId:r,readability:l,onTool:p,onLabel:f,onNote:h,onRemove:c,onReset:x,onCancel:A,onSend:P}){let T=s.find((E)=>E.id===r)??null,v=s.length>0;return e("div",{className:"flex-shrink-0 border-b border-ink/10 bg-paper px-2.5 py-1.5 space-y-1.5 select-none",children:[e("div",{className:"flex items-center gap-1.5",children:[e("span",{className:"text-[10px] uppercase font-mono text-ink/50 mr-1",children:"Anotasi"}),me.map((E)=>e("button",{type:"button",onClick:()=>p(E),"aria-pressed":t===E,className:`${pe} ${t===E?"bg-ink text-canvas border-ink":"bg-canvas text-ink/70 border-ink/15 hover:border-ink/40"}`,children:Ru[E]},E)),e("span",{className:"text-[11px] font-mono text-ink/45 ml-1",children:s.length>0?`${s.length} mark${s.length===1?"":"s"}`:"drag on the page to mark a part"}),e("div",{className:"flex-1"}),e("button",{type:"button",onClick:x,disabled:!v,className:F,title:"Clear all marks",children:[e(M,{size:12})," Bersihkan"]}),e("button",{type:"button",onClick:P,disabled:!v,className:F,title:"Kirim anotasi ke draft chat",children:[e(Dn,{size:12})," Kirim ke chat"]}),e("button",{type:"button",onClick:A,className:F,title:"Tutup mode anotasi",children:e(b,{size:12})})]}),T?e("div",{className:"flex items-start gap-1.5",children:[e("div",{className:"flex-1 min-w-0",children:e(Y,{shape:T,index:s.indexOf(T)+1,readability:l,onLabel:(E)=>f(T.id,E),onNote:(E)=>h(T.id,E)})}),e("button",{type:"button",onClick:()=>c(T.id),className:F,title:"Remove this mark",children:e(M,{size:12})})]}):e("p",{className:"text-[11px] text-ink/45",children:"This page cannot be screenshotted, so what gets sent is the area, the part name and your note."})]})}var q=0;function J(){return q+=1,`annot-${Date.now().toString(36)}-${q}`}function Q(t){let[s,r]=n(!1),[l,p]=n("box"),[f,h]=n([]),[c,x]=n(null);i(()=>{h([]),x(null)},[t]);let A=a(()=>{r((N)=>!N),x(null)},[]),P=a(()=>{x(null),r(!1)},[]),T=a((N)=>{h((L)=>[...L,N]),x(N.id)},[]),v=a((N,L)=>{h((u)=>u.map((g)=>g.id===N?{...g,note:L}:g))},[]),E=a((N,L)=>{h((u)=>u.map((g)=>g.id===N?{...g,label:L}:g))},[]),O=a((N)=>{h((L)=>L.filter((u)=>u.id!==N)),x((L)=>L===N?null:L)},[]),I=a(()=>{h([]),x(null)},[]);return{active:s,tool:l,shapes:f,selectedId:c,setTool:p,toggle:A,close:P,add:T,setNote:v,setLabel:E,select:x,remove:O,reset:I}}var fe=4,U="var(--theme-error)";function ee({shapes:t,tool:s,selectedId:r,onMeasure:l,onAdd:p,onSelect:f}){let h=o(null),c=o(null),[x,A]=n(null),[P,T]=n({width:0,height:0});i(()=>{let u=h.current;if(!u)return;let g=()=>{let w=u.getBoundingClientRect();if(w.width<=0||w.height<=0)return;T((B)=>B.width===w.width&&B.height===w.height?B:{width:w.width,height:w.height}),l({width:w.width,height:w.height})};if(g(),typeof ResizeObserver!=="function")return;let k=new ResizeObserver(g);return k.observe(u),()=>k.disconnect()},[l]);let v=(u)=>{let g=h.current;if(!g)return null;let k=g.getBoundingClientRect(),w={x:u.clientX-k.left,y:u.clientY-k.top};return{normalized:sg(k,w),px:w.x,py:w.y}},E=(u)=>{if(u.button!==0)return;let g=v(u);if(!g)return;u.preventDefault(),f(null),u.currentTarget.setPointerCapture?.(u.pointerId);let k={id:J(),tool:s,start:g.normalized,end:g.normalized,label:"",note:""};c.current=k,A(k)},O=(u)=>{let g=c.current;if(!g)return;let k=v(u);if(!k)return;let w={...g,end:k.normalized};c.current=w,A(w)},I=(u)=>{let g=c.current;if(!g)return;let k=v(u),w=k?{...g,end:k.normalized}:g;if(c.current=null,A(null),u.currentTarget.releasePointerCapture?.(u.pointerId),w.tool!=="pin"){let B=h.current?.getBoundingClientRect();if((B?Math.hypot((w.end.x-w.start.x)*B.width,(w.end.y-w.start.y)*B.height):0)<fe)return}p(w)},N=()=>{c.current=null,A(null)},L=x?[...t,x]:t;return e("div",{ref:h,className:"absolute inset-0 cursor-crosshair touch-none",onPointerDown:E,onPointerMove:O,onPointerUp:I,onPointerCancel:N,children:e("svg",{className:"absolute inset-0 w-full h-full",viewBox:`0 0 ${Math.max(1,P.width)} ${Math.max(1,P.height)}`,preserveAspectRatio:"none","aria-label":"Page annotation area",children:L.map((u,g)=>e(he,{shape:u,index:g+1,box:P,selected:u.id===r,onSelect:()=>f(u.id)},u.id))})})}function he({shape:t,index:s,box:r,selected:l,onSelect:p}){let f={x:t.start.x*r.width,y:t.start.y*r.height},h={x:t.end.x*r.width,y:t.end.y*r.height},c=Lp(t),x=l?3:2,A=String(s);return e("g",{onPointerDown:(T)=>{T.stopPropagation(),T.preventDefault(),p()},className:"cursor-pointer",children:[t.tool==="box"&&e("rect",{x:c.x*r.width,y:c.y*r.height,width:Math.max(1,c.width*r.width),height:Math.max(1,c.height*r.height),fill:U,fillOpacity:l?0.16:0.1,stroke:U,strokeWidth:x,vectorEffect:"non-scaling-stroke",rx:3}),t.tool==="arrow"&&e(d,{children:[e("line",{x1:f.x,y1:f.y,x2:h.x,y2:h.y,stroke:U,strokeWidth:x,vectorEffect:"non-scaling-stroke"}),e("circle",{cx:h.x,cy:h.y,r:4,fill:U})]}),t.tool==="pin"&&e("circle",{cx:f.x,cy:f.y,r:7,fill:U,fillOpacity:l?0.5:0.3,stroke:U,strokeWidth:x}),e("circle",{cx:f.x,cy:f.y,r:9,fill:U}),e("text",{x:f.x,y:f.y,textAnchor:"middle",dominantBaseline:"central",fontSize:11,fontWeight:700,fill:"var(--theme-paper)",children:A})]})}function te(t){let s=t.trim();if(!s)return s;let r=/^[a-z][a-z0-9+.-]*:/i.test(s)?s:`https://${s}`,l=new URL(r);if(l.protocol!=="http:"&&l.protocol!=="https:")throw Error("Only http and https URLs are allowed");return l.toString()}var ge="userBrowser.history",be="userBrowser.historyIndex",xe="userBrowser.inputUrl";function ne(){let[t,s]=S(ge,[]),[r,l]=S(be,-1),[p,f]=S(xe,""),[h,c]=n(0),[x,A]=n(!1),[P,T]=n(void 0),v=r>=0&&r<t.length?t[r]??"":"",E=a((u)=>{let g=u.trim();if(!g)return;let k;try{k=te(g)}catch(z){T(z instanceof Error?z.message:"Alamat tidak valid");return}T(void 0),A(!0);let B=[...t.slice(0,r+1),k];s(B),l(B.length-1),f(k),c((z)=>z+1)},[t,r,s,l,f]),O=a(()=>{if(r<=0)return;A(!0),l(r-1)},[r,l]),I=a(()=>{if(r>=t.length-1)return;A(!0),l(r+1)},[t.length,r,l]),N=a(()=>{if(!v)return;A(!0),c((u)=>u+1)},[v]),L=a(()=>{A(!1)},[]);return{url:v,input:p,setInput:f,frameKey:h,loading:x,error:P,canGoBack:r>0,canGoForward:r>=0&&r<t.length-1,submit:E,goBack:O,goForward:I,reload:N,markLoaded:L}}function we(t){if(!t)return"no-frame";try{return t.contentDocument?"readable":"cross-origin"}catch{return"cross-origin"}}function H(t){let s=t.replace(/\s+/g," ").trim();return s.length>60?`${s.slice(0,59)}…`:s}function ve(t){let s=t.tagName.toLowerCase();if(t.id)return`${s}#${t.id}`;for(let l of["data-testid","data-test","aria-label"]){let p=t.getAttribute(l);if(p)return`${s}[${l}="${H(p)}"]`}let r=t.getAttribute("role");if(r)return`${s}[role="${r}"]`;return s}function ye(t){let s=[],r=t;while(r&&s.length<4){if(r.tagName.toLowerCase()==="html")break;s.unshift(ve(r)),r=r.parentElement}return s.join(" > ")}function ke(t){let s=[];if(t.disabled)s.push("nonaktif");if(t instanceof HTMLSelectElement||t.tagName.toLowerCase()==="select"){let r=t,p=r.selectedOptions?.[0]?.textContent?.trim()||r.value;if(p)s.push(`nilai "${H(p)}"`);let f=r.options?.length??0;if(f>0)s.push(`${f} opsi`)}else if(t.tagName.toLowerCase()==="input"){let r=t;if(r.type)s.push(`tipe ${r.type}`);if(r.type!=="password"&&r.placeholder)s.push(`placeholder "${H(r.placeholder)}"`)}return s.length>0?s.join(", "):void 0}function Ae(t){let s={path:ye(t),tag:t.tagName.toLowerCase()},r=t.getAttribute("role");if(r)s.role=r;let l=H(t.innerText??t.textContent??"");if(l)s.text=l;let p=ke(t);if(p)s.state=p;return s}function oe(t,s){let r=we(t);if(r!=="readable")return{ok:!1,reason:r};let{contentWindow:l,contentDocument:p}=t;if(!l||!p)return{ok:!1,reason:"cross-origin"};try{let f=Math.min(Math.max(s.x,0),1)*l.innerWidth,h=Math.min(Math.max(s.y,0),1)*l.innerHeight,c=p.elementFromPoint(f,h);if(!c||c===p.documentElement||c===p.body)return{ok:!1,reason:"no-element"};return{ok:!0,element:Ae(c)}}catch{return{ok:!1,reason:"cross-origin"}}}function mt({className:t="",active:s=!0}){let[r,l]=S("userBrowser.viewportMode","responsive"),[p,f]=S("userBrowser.zoomLevel",100),[h,c]=n(null),[x,A]=n(null),[P,T]=n(null),{url:v,input:E,setInput:O,frameKey:I,loading:N,error:L,canGoBack:u,canGoForward:g,submit:k,goBack:w,goForward:B,reload:z,markLoaded:D}=ne(),y=Q(I),re=a(()=>{if(!v)return;window.open(v,"_blank","noopener,noreferrer")},[v]),ae=a(()=>{if(!v)return;Wl({url:v})},[v]),ie=a((R)=>{c((_)=>_&&_.width===R.width&&_.height===R.height?_:R)},[]),se=a((R)=>{let _=oe(x,R.start);T(_),y.add(_.ok?{...R,element:_.element}:R)},[y,x]),le=a(()=>{if(!v||y.shapes.length===0)return;let R=p/100;Wl({url:v,annotations:y.shapes,panel:{width:(h?.width??0)/R,height:(h?.height??0)/R,viewportMode:r,zoom:p}}),y.close()},[v,y,h,r,p]),G=y.active&&Boolean(v);return e("div",{className:`flex flex-col h-full w-full bg-paper text-ink overflow-hidden ${t}`,children:[e(K,{url:v,input:E,loading:N,error:L,canGoBack:u,canGoForward:g,viewportMode:r,zoomLevel:p,onInputChange:O,onSubmit:k,onBack:w,onForward:B,onReload:z,onOpenExternal:re,onIncludeInChat:ae,onChangeViewport:l,onZoomIn:()=>f((R)=>Math.min(200,R+10)),onZoomOut:()=>f((R)=>Math.max(50,R-10)),onResetZoom:()=>f(100),onSetZoom:f,annotate:{active:G,count:y.shapes.length,onToggle:y.toggle}}),G&&e(j,{tool:y.tool,shapes:y.shapes,selectedId:y.selectedId,readability:P,onTool:y.setTool,onLabel:y.setLabel,onNote:y.setNote,onRemove:y.remove,onReset:y.reset,onCancel:y.close,onSend:le}),e(X,{url:v,frameKey:I,loading:N,viewportMode:r,zoomLevel:p,onLoad:D,onFrame:A,active:s,overlay:G?e(ee,{shapes:y.shapes,tool:y.tool,selectedId:y.selectedId,onMeasure:ie,onAdd:se,onSelect:y.select}):null})]})}export{mt as UserBrowserPanel};
1
+ import{d,n,i,o,a,e,S,m,M,Vt,ma,Qe,C,Qn,b,og,Fp,Ru,sg,Kl}from"./index-st202rjv.js";import{cu}from"./index-tv61v3t3.js";import"./index-rqrcw8nj.js";var de={idle:"Kosong",loading:"Memuat",ready:"Siap"},V="p-1 rounded hover:bg-ink/5 disabled:opacity-25 disabled:hover:bg-transparent text-ink/70 hover:text-ink cursor-pointer disabled:cursor-not-allowed transition-colors";function K({url:t,input:s,loading:r,error:l,canGoBack:p,canGoForward:f,viewportMode:h,zoomLevel:c,onInputChange:x,onSubmit:A,onBack:P,onForward:T,onReload:v,onOpenExternal:E,onIncludeInChat:O,onChangeViewport:I,onZoomIn:N,onZoomOut:L,onResetZoom:u,onSetZoom:g,annotate:k}){let w=o(void 0);i(()=>{if(w.current===t)return;if(w.current=t,t)x(t)},[t,x]);let B=!t?"idle":r?"loading":"ready",z=B==="ready"?"bg-success animate-pulse":B==="loading"?"bg-ink/40 animate-pulse":"bg-ink/25",D=e("div",{className:"flex items-center bg-canvas border border-ink/10 rounded-md p-0.5 space-x-0.5 flex-shrink-0",children:[e("button",{type:"button",onClick:P,disabled:!p,"aria-label":"Back",title:"Back",className:V,children:e(Vt,{size:12})}),e("button",{type:"button",onClick:T,disabled:!f,"aria-label":"Maju",title:"Maju",className:V,children:e(ma,{size:12})}),e("button",{type:"button",onClick:v,disabled:!t,"aria-label":"Reload",title:"Reload",className:V,children:e(C,{size:12,className:r?"animate-spin":void 0})})]});return e(cu,{url:t,statusDotClass:z,statusLabel:de[B],viewportMode:h,zoomLevel:c,onChangeViewport:I,onZoomIn:N,onZoomOut:L,onResetZoom:u,onSetZoom:g,annotate:k,onIncludeInChat:O,onOpenExternal:E,openExternalLabel:"Buka di tab baru",openExternalTitle:"Buka di tab baru (untuk situs yang menolak iframe)",children:e("div",{className:"flex items-center flex-1 min-w-0 space-x-1.5",children:[D,e("form",{className:`flex-1 min-w-0 flex items-center bg-canvas border rounded-md px-2 py-0.5 space-x-1 focus-within:border-ink/40 ${l?"border-error":"border-ink/15"}`,onSubmit:(y)=>{y.preventDefault(),A(s)},children:[e(Qe,{size:12,className:"text-ink/40 flex-shrink-0"}),e("input",{type:"text",value:s,onChange:(y)=>x(y.currentTarget.value),placeholder:"Type an address (e.g. localhost:5173) and press Enter…","aria-label":"Browser address","aria-invalid":l!==void 0&&l!==null,title:l??void 0,spellcheck:!1,autoComplete:"off",className:`w-full min-w-0 bg-transparent outline-none font-mono text-[11px] placeholder:text-ink/35 ${l?"text-error":"text-ink/90"}`})]})]})})}var Z={"desktop-16-9":"w-full max-w-[1280px] aspect-video max-h-full border border-ink/20 rounded-lg shadow-md overflow-hidden my-auto",laptop:"w-[1024px] max-w-full h-[768px] max-h-full border border-ink/20 rounded-lg shadow-md overflow-hidden my-auto",tablet:"w-[768px] max-w-full h-[1024px] max-h-full border border-ink/20 rounded-lg shadow-md overflow-hidden my-auto",mobile:"w-[375px] max-w-full h-[667px] max-h-full border border-ink/20 rounded-xl shadow-md overflow-hidden my-auto","mobile-lg":"w-[414px] max-w-full h-[896px] max-h-full border border-ink/20 rounded-xl shadow-md overflow-hidden my-auto",responsive:"w-full h-full border-0"};var ce="clipboard-read; clipboard-write; fullscreen";function X({url:t,frameKey:s,loading:r,viewportMode:l,zoomLevel:p,onLoad:f,active:h=!0,overlay:c,onFrame:x}){if(!h)return null;if(!t)return e("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center select-none",children:[e("div",{className:"w-12 h-12 rounded-xl bg-ink/5 border border-ink/10 flex items-center justify-center text-ink/40 mb-3",children:e(Qe,{size:22})}),e("h3",{className:"text-sm font-semibold text-ink mb-1",children:"Browser Anda"}),e("p",{className:"text-xs text-ink/60 max-w-sm",children:"Type an address above and press Enter. The page loads inside this panel."}),e("p",{className:"text-[11px] text-ink/45 max-w-sm mt-2",children:"Sebagian situs (Google, GitHub) menolak ditampilkan dalam iframe — pakai tombol buka di tab baru."})]});return e("div",{className:"flex-1 min-h-0 relative flex items-center justify-center p-2 overflow-auto bg-canvas/60",children:[r?e("div",{className:"absolute inset-0 z-10 flex items-center justify-center pointer-events-none",children:e("div",{className:"flex items-center space-x-2 px-3 py-1.5 rounded-md bg-paper border border-ink/15",children:[e(m,{size:13,className:"animate-spin text-ink/50"}),e("span",{className:"text-[11px] font-mono text-ink/60",children:"Memuat…"})]})}):null,e("div",{className:`relative flex flex-col bg-white ${Z[l]} transition-all duration-200`,style:{zoom:p!==100?`${p}%`:void 0,transformOrigin:"top center"},children:[e("iframe",{ref:(A)=>x?.(A),src:t,title:"Browser pengguna",onLoad:f,referrerPolicy:"no-referrer",allow:ce,className:"w-full h-full bg-white border-0",style:c?{pointerEvents:"none"}:void 0},s),c]})]})}var W="w-full min-w-0 bg-canvas border border-ink/15 rounded px-2 py-1 text-[11px] font-mono text-ink placeholder:text-ink/35 focus:outline-none focus:border-ink/40";function ue(t){if(!t||t.ok)return null;if(t.reason==="cross-origin")return"This page is cross-origin, so its elements cannot be read. Name the part and add a note instead.";if(t.reason==="no-frame")return"The page has not loaded, so its elements cannot be read yet.";return"There is no element at this point (empty space). Name the part instead."}function Y({shape:t,index:s,readability:r,onLabel:l,onNote:p}){let f=ue(r),h=t.element;return e("div",{className:"flex items-start gap-1.5 min-w-0",children:[e("span",{className:"text-[11px] font-mono text-ink/45 pt-1 flex-shrink-0",children:[Ru[t.tool]," #",s]}),e("div",{className:"flex-1 min-w-0 space-y-1",children:[e("div",{className:"flex items-center gap-1 flex-wrap",children:[e("span",{className:"text-[10px] uppercase font-mono text-ink/40",children:"bagian"}),sg.map((c)=>{let x=t.label===c;return e("button",{type:"button",onClick:()=>l(x?"":c),"aria-pressed":x,className:`px-1.5 py-0.5 rounded-full border text-[10px] font-mono transition-colors cursor-pointer ${x?"bg-ink text-canvas border-ink":"bg-canvas text-ink/65 border-ink/15 hover:border-ink/40"}`,children:c},c)}),e("input",{value:t.label,onInput:(c)=>l(c.currentTarget.value),placeholder:"or type your own…","aria-label":"Name of the marked part",spellcheck:!1,className:`${W} flex-1 min-w-[110px]`})]}),e("textarea",{value:t.note,onInput:(c)=>p(c.currentTarget.value),placeholder:"What is wrong with this part? (e.g. the Pay button looks disabled)",rows:2,"aria-label":"Annotation note",className:`${W} resize-y`}),h?e("p",{className:"text-[10px] font-mono text-ink/45 truncate",title:h.path,children:["elemen: ",h.path,h.state?` · ${h.state}`:""]}):null,f?e("p",{className:"text-[10px] text-ink/40",children:f}):null]})]})}var me=["box","pin","arrow"],pe="px-2 py-1 rounded text-[11px] font-mono border transition-colors cursor-pointer",F="flex items-center gap-1 px-2 py-1 rounded text-[11px] border border-ink/15 hover:border-ink/40 text-ink/80 hover:text-ink transition-colors cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed";function j({tool:t,shapes:s,selectedId:r,readability:l,onTool:p,onLabel:f,onNote:h,onRemove:c,onReset:x,onCancel:A,onSend:P}){let T=s.find((E)=>E.id===r)??null,v=s.length>0;return e("div",{className:"flex-shrink-0 border-b border-ink/10 bg-paper px-2.5 py-1.5 space-y-1.5 select-none",children:[e("div",{className:"flex items-center gap-1.5",children:[e("span",{className:"text-[10px] uppercase font-mono text-ink/50 mr-1",children:"Anotasi"}),me.map((E)=>e("button",{type:"button",onClick:()=>p(E),"aria-pressed":t===E,className:`${pe} ${t===E?"bg-ink text-canvas border-ink":"bg-canvas text-ink/70 border-ink/15 hover:border-ink/40"}`,children:Ru[E]},E)),e("span",{className:"text-[11px] font-mono text-ink/45 ml-1",children:s.length>0?`${s.length} mark${s.length===1?"":"s"}`:"drag on the page to mark a part"}),e("div",{className:"flex-1"}),e("button",{type:"button",onClick:x,disabled:!v,className:F,title:"Clear all marks",children:[e(M,{size:12})," Bersihkan"]}),e("button",{type:"button",onClick:P,disabled:!v,className:F,title:"Kirim anotasi ke draft chat",children:[e(Qn,{size:12})," Kirim ke chat"]}),e("button",{type:"button",onClick:A,className:F,title:"Tutup mode anotasi",children:e(b,{size:12})})]}),T?e("div",{className:"flex items-start gap-1.5",children:[e("div",{className:"flex-1 min-w-0",children:e(Y,{shape:T,index:s.indexOf(T)+1,readability:l,onLabel:(E)=>f(T.id,E),onNote:(E)=>h(T.id,E)})}),e("button",{type:"button",onClick:()=>c(T.id),className:F,title:"Remove this mark",children:e(M,{size:12})})]}):e("p",{className:"text-[11px] text-ink/45",children:"This page cannot be screenshotted, so what gets sent is the area, the part name and your note."})]})}var q=0;function J(){return q+=1,`annot-${Date.now().toString(36)}-${q}`}function Q(t){let[s,r]=n(!1),[l,p]=n("box"),[f,h]=n([]),[c,x]=n(null);i(()=>{h([]),x(null)},[t]);let A=a(()=>{r((N)=>!N),x(null)},[]),P=a(()=>{x(null),r(!1)},[]),T=a((N)=>{h((L)=>[...L,N]),x(N.id)},[]),v=a((N,L)=>{h((u)=>u.map((g)=>g.id===N?{...g,note:L}:g))},[]),E=a((N,L)=>{h((u)=>u.map((g)=>g.id===N?{...g,label:L}:g))},[]),O=a((N)=>{h((L)=>L.filter((u)=>u.id!==N)),x((L)=>L===N?null:L)},[]),I=a(()=>{h([]),x(null)},[]);return{active:s,tool:l,shapes:f,selectedId:c,setTool:p,toggle:A,close:P,add:T,setNote:v,setLabel:E,select:x,remove:O,reset:I}}var fe=4,U="var(--theme-error)";function ee({shapes:t,tool:s,selectedId:r,onMeasure:l,onAdd:p,onSelect:f}){let h=o(null),c=o(null),[x,A]=n(null),[P,T]=n({width:0,height:0});i(()=>{let u=h.current;if(!u)return;let g=()=>{let w=u.getBoundingClientRect();if(w.width<=0||w.height<=0)return;T((B)=>B.width===w.width&&B.height===w.height?B:{width:w.width,height:w.height}),l({width:w.width,height:w.height})};if(g(),typeof ResizeObserver!=="function")return;let k=new ResizeObserver(g);return k.observe(u),()=>k.disconnect()},[l]);let v=(u)=>{let g=h.current;if(!g)return null;let k=g.getBoundingClientRect(),w={x:u.clientX-k.left,y:u.clientY-k.top};return{normalized:og(k,w),px:w.x,py:w.y}},E=(u)=>{if(u.button!==0)return;let g=v(u);if(!g)return;u.preventDefault(),f(null),u.currentTarget.setPointerCapture?.(u.pointerId);let k={id:J(),tool:s,start:g.normalized,end:g.normalized,label:"",note:""};c.current=k,A(k)},O=(u)=>{let g=c.current;if(!g)return;let k=v(u);if(!k)return;let w={...g,end:k.normalized};c.current=w,A(w)},I=(u)=>{let g=c.current;if(!g)return;let k=v(u),w=k?{...g,end:k.normalized}:g;if(c.current=null,A(null),u.currentTarget.releasePointerCapture?.(u.pointerId),w.tool!=="pin"){let B=h.current?.getBoundingClientRect();if((B?Math.hypot((w.end.x-w.start.x)*B.width,(w.end.y-w.start.y)*B.height):0)<fe)return}p(w)},N=()=>{c.current=null,A(null)},L=x?[...t,x]:t;return e("div",{ref:h,className:"absolute inset-0 cursor-crosshair touch-none",onPointerDown:E,onPointerMove:O,onPointerUp:I,onPointerCancel:N,children:e("svg",{className:"absolute inset-0 w-full h-full",viewBox:`0 0 ${Math.max(1,P.width)} ${Math.max(1,P.height)}`,preserveAspectRatio:"none","aria-label":"Page annotation area",children:L.map((u,g)=>e(he,{shape:u,index:g+1,box:P,selected:u.id===r,onSelect:()=>f(u.id)},u.id))})})}function he({shape:t,index:s,box:r,selected:l,onSelect:p}){let f={x:t.start.x*r.width,y:t.start.y*r.height},h={x:t.end.x*r.width,y:t.end.y*r.height},c=Fp(t),x=l?3:2,A=String(s);return e("g",{onPointerDown:(T)=>{T.stopPropagation(),T.preventDefault(),p()},className:"cursor-pointer",children:[t.tool==="box"&&e("rect",{x:c.x*r.width,y:c.y*r.height,width:Math.max(1,c.width*r.width),height:Math.max(1,c.height*r.height),fill:U,fillOpacity:l?0.16:0.1,stroke:U,strokeWidth:x,vectorEffect:"non-scaling-stroke",rx:3}),t.tool==="arrow"&&e(d,{children:[e("line",{x1:f.x,y1:f.y,x2:h.x,y2:h.y,stroke:U,strokeWidth:x,vectorEffect:"non-scaling-stroke"}),e("circle",{cx:h.x,cy:h.y,r:4,fill:U})]}),t.tool==="pin"&&e("circle",{cx:f.x,cy:f.y,r:7,fill:U,fillOpacity:l?0.5:0.3,stroke:U,strokeWidth:x}),e("circle",{cx:f.x,cy:f.y,r:9,fill:U}),e("text",{x:f.x,y:f.y,textAnchor:"middle",dominantBaseline:"central",fontSize:11,fontWeight:700,fill:"var(--theme-paper)",children:A})]})}function te(t){let s=t.trim();if(!s)return s;let r=/^[a-z][a-z0-9+.-]*:/i.test(s)?s:`https://${s}`,l=new URL(r);if(l.protocol!=="http:"&&l.protocol!=="https:")throw Error("Only http and https URLs are allowed");return l.toString()}var ge="userBrowser.history",be="userBrowser.historyIndex",xe="userBrowser.inputUrl";function ne(){let[t,s]=S(ge,[]),[r,l]=S(be,-1),[p,f]=S(xe,""),[h,c]=n(0),[x,A]=n(!1),[P,T]=n(void 0),v=r>=0&&r<t.length?t[r]??"":"",E=a((u)=>{let g=u.trim();if(!g)return;let k;try{k=te(g)}catch(z){T(z instanceof Error?z.message:"Alamat tidak valid");return}T(void 0),A(!0);let B=[...t.slice(0,r+1),k];s(B),l(B.length-1),f(k),c((z)=>z+1)},[t,r,s,l,f]),O=a(()=>{if(r<=0)return;A(!0),l(r-1)},[r,l]),I=a(()=>{if(r>=t.length-1)return;A(!0),l(r+1)},[t.length,r,l]),N=a(()=>{if(!v)return;A(!0),c((u)=>u+1)},[v]),L=a(()=>{A(!1)},[]);return{url:v,input:p,setInput:f,frameKey:h,loading:x,error:P,canGoBack:r>0,canGoForward:r>=0&&r<t.length-1,submit:E,goBack:O,goForward:I,reload:N,markLoaded:L}}function we(t){if(!t)return"no-frame";try{return t.contentDocument?"readable":"cross-origin"}catch{return"cross-origin"}}function H(t){let s=t.replace(/\s+/g," ").trim();return s.length>60?`${s.slice(0,59)}…`:s}function ve(t){let s=t.tagName.toLowerCase();if(t.id)return`${s}#${t.id}`;for(let l of["data-testid","data-test","aria-label"]){let p=t.getAttribute(l);if(p)return`${s}[${l}="${H(p)}"]`}let r=t.getAttribute("role");if(r)return`${s}[role="${r}"]`;return s}function ye(t){let s=[],r=t;while(r&&s.length<4){if(r.tagName.toLowerCase()==="html")break;s.unshift(ve(r)),r=r.parentElement}return s.join(" > ")}function ke(t){let s=[];if(t.disabled)s.push("nonaktif");if(t instanceof HTMLSelectElement||t.tagName.toLowerCase()==="select"){let r=t,p=r.selectedOptions?.[0]?.textContent?.trim()||r.value;if(p)s.push(`nilai "${H(p)}"`);let f=r.options?.length??0;if(f>0)s.push(`${f} opsi`)}else if(t.tagName.toLowerCase()==="input"){let r=t;if(r.type)s.push(`tipe ${r.type}`);if(r.type!=="password"&&r.placeholder)s.push(`placeholder "${H(r.placeholder)}"`)}return s.length>0?s.join(", "):void 0}function Ae(t){let s={path:ye(t),tag:t.tagName.toLowerCase()},r=t.getAttribute("role");if(r)s.role=r;let l=H(t.innerText??t.textContent??"");if(l)s.text=l;let p=ke(t);if(p)s.state=p;return s}function oe(t,s){let r=we(t);if(r!=="readable")return{ok:!1,reason:r};let{contentWindow:l,contentDocument:p}=t;if(!l||!p)return{ok:!1,reason:"cross-origin"};try{let f=Math.min(Math.max(s.x,0),1)*l.innerWidth,h=Math.min(Math.max(s.y,0),1)*l.innerHeight,c=p.elementFromPoint(f,h);if(!c||c===p.documentElement||c===p.body)return{ok:!1,reason:"no-element"};return{ok:!0,element:Ae(c)}}catch{return{ok:!1,reason:"cross-origin"}}}function mt({className:t="",active:s=!0}){let[r,l]=S("userBrowser.viewportMode","responsive"),[p,f]=S("userBrowser.zoomLevel",100),[h,c]=n(null),[x,A]=n(null),[P,T]=n(null),{url:v,input:E,setInput:O,frameKey:I,loading:N,error:L,canGoBack:u,canGoForward:g,submit:k,goBack:w,goForward:B,reload:z,markLoaded:D}=ne(),y=Q(I),re=a(()=>{if(!v)return;window.open(v,"_blank","noopener,noreferrer")},[v]),ae=a(()=>{if(!v)return;Kl({url:v})},[v]),ie=a((R)=>{c((_)=>_&&_.width===R.width&&_.height===R.height?_:R)},[]),se=a((R)=>{let _=oe(x,R.start);T(_),y.add(_.ok?{...R,element:_.element}:R)},[y,x]),le=a(()=>{if(!v||y.shapes.length===0)return;let R=p/100;Kl({url:v,annotations:y.shapes,panel:{width:(h?.width??0)/R,height:(h?.height??0)/R,viewportMode:r,zoom:p}}),y.close()},[v,y,h,r,p]),G=y.active&&Boolean(v);return e("div",{className:`flex flex-col h-full w-full bg-paper text-ink overflow-hidden ${t}`,children:[e(K,{url:v,input:E,loading:N,error:L,canGoBack:u,canGoForward:g,viewportMode:r,zoomLevel:p,onInputChange:O,onSubmit:k,onBack:w,onForward:B,onReload:z,onOpenExternal:re,onIncludeInChat:ae,onChangeViewport:l,onZoomIn:()=>f((R)=>Math.min(200,R+10)),onZoomOut:()=>f((R)=>Math.max(50,R-10)),onResetZoom:()=>f(100),onSetZoom:f,annotate:{active:G,count:y.shapes.length,onToggle:y.toggle}}),G&&e(j,{tool:y.tool,shapes:y.shapes,selectedId:y.selectedId,readability:P,onTool:y.setTool,onLabel:y.setLabel,onNote:y.setNote,onRemove:y.remove,onReset:y.reset,onCancel:y.close,onSend:le}),e(X,{url:v,frameKey:I,loading:N,viewportMode:r,zoomLevel:p,onLoad:D,onFrame:A,active:s,overlay:G?e(ee,{shapes:y.shapes,tool:y.tool,selectedId:y.selectedId,onMeasure:ie,onAdd:se,onSelect:y.select}):null})]})}export{mt as UserBrowserPanel};
@@ -1,2 +1,2 @@
1
- import{t}from"./index-ctgefatv.js";function be(c,e){if(c.accDescr)e.setAccDescription?.(c.accDescr);if(c.accTitle)e.setAccTitle?.(c.accTitle);if(c.title)e.setDiagramTitle?.(c.title)}t(be,"populateCommonDb");
1
+ import{t}from"./index-5y0bvq4q.js";function be(c,e){if(c.accDescr)e.setAccDescription?.(c.accDescr);if(c.accTitle)e.setAccTitle?.(c.accTitle);if(c.title)e.setDiagramTitle?.(c.title)}t(be,"populateCommonDb");
2
2
  export{be};