@layers-app/editor 0.5.6-optimization → 0.5.6

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 (256) hide show
  1. package/README.md +0 -19
  2. package/dist/index.cjs +2 -2
  3. package/dist/index.js +10 -12
  4. package/dist/layers.52famHy6.js +1 -0
  5. package/dist/layers.59MV1gHs.js +41 -0
  6. package/dist/layers.6IaGqrl-.js +39 -0
  7. package/dist/layers.6lqPO-3Z.js +32 -0
  8. package/dist/layers.7JqFgE4-.js +15 -0
  9. package/dist/layers.8CsJHG7m.js +139 -0
  10. package/dist/layers.9pNaFvaX.js +1 -0
  11. package/dist/layers.AK6shBV6.js +42 -0
  12. package/dist/layers.AamAEMA7.js +160 -0
  13. package/dist/layers.B-WGMHL6.js +11 -0
  14. package/dist/layers.B19hGmey.js +1 -0
  15. package/dist/layers.B2wUdnez.js +437 -0
  16. package/dist/layers.B3D4g2HH.js +1 -0
  17. package/dist/layers.B6FBUZ1Z.js +9 -0
  18. package/dist/layers.B7-Kk2kp.js +11 -0
  19. package/dist/layers.B7K7JjK6.js +1510 -0
  20. package/dist/layers.B7USkgSi.js +6 -0
  21. package/dist/layers.B7hegMVr.js +1034 -0
  22. package/dist/layers.BAtv1CM7.js +1 -0
  23. package/dist/layers.BBSE_YmF.js +37 -0
  24. package/dist/layers.BCG8kdU-.js +32 -0
  25. package/dist/layers.BCUz59rh.js +39 -0
  26. package/dist/layers.BF8ID4w9.js +39 -0
  27. package/dist/layers.BIZaN3QR.js +7 -0
  28. package/dist/layers.BIeVwYKL.js +1 -0
  29. package/dist/layers.BJDrjORS.js +244 -0
  30. package/dist/layers.BK35bp4_.js +931 -0
  31. package/dist/layers.BKrHVgKG.js +11 -0
  32. package/dist/layers.BLd2spTm.js +1 -0
  33. package/dist/layers.BQj7sYv9.js +4 -0
  34. package/dist/layers.BSTBZrFn.js +1 -0
  35. package/dist/layers.BTnY40Hl.js +230 -0
  36. package/dist/layers.BW6eTqTQ.js +9 -0
  37. package/dist/layers.BX50pyFe.js +42 -0
  38. package/dist/layers.BXiMBNCf.js +7 -0
  39. package/dist/layers.BY0saexf.js +44 -0
  40. package/dist/layers.BYyHDhdF.js +40 -0
  41. package/dist/layers.B_SkKQaN.js +7 -0
  42. package/dist/layers.Bb45BkB7.js +35 -0
  43. package/dist/layers.BbCfEXyj.js +55 -0
  44. package/dist/layers.Bbx2DS9P.js +10 -0
  45. package/dist/layers.BeRqUeUL.js +1 -0
  46. package/dist/layers.BfBHY8YH.js +8 -0
  47. package/dist/layers.BfPqzMs9.js +1 -0
  48. package/dist/layers.Bfqazne8.js +70 -0
  49. package/dist/layers.BgzFjX4U.js +35 -0
  50. package/dist/layers.BhL3qtd0.js +1126 -0
  51. package/dist/layers.BitUjngp.js +11 -0
  52. package/dist/layers.BmR6H-fP.js +2966 -0
  53. package/dist/layers.Bn7g95cI.js +39 -0
  54. package/dist/layers.Bn7hw-zZ.js +13 -0
  55. package/dist/layers.BnYpz8RW.js +1359 -0
  56. package/dist/layers.BoIdFEtV.js +186 -0
  57. package/dist/layers.BorvTy9p.js +33 -0
  58. package/dist/layers.BpilXLfW.js +6 -0
  59. package/dist/layers.Bt8HOTA6.js +10 -0
  60. package/dist/layers.BvVfdnbz.js +41 -0
  61. package/dist/layers.BzUNMS1L.js +2 -0
  62. package/dist/layers.C-FZw43o.js +41 -0
  63. package/dist/layers.C0Lgw_Sx.js +11688 -0
  64. package/dist/layers.C4ToPutV.js +40 -0
  65. package/dist/layers.C4wkiWhv.js +8 -0
  66. package/dist/layers.C5ZDJAAD.js +220 -0
  67. package/dist/layers.C6P4YEcq.js +257 -0
  68. package/dist/layers.C7x1USYv.js +139 -0
  69. package/dist/layers.C8_lu5UH.js +23 -0
  70. package/dist/layers.C99jO8bw.js +1 -0
  71. package/dist/layers.C9KoadvU.js +122 -0
  72. package/dist/layers.C9PwfpMh.js +39 -0
  73. package/dist/layers.CA8KMZRI.js +1 -0
  74. package/dist/layers.CAGTppwS.js +4 -0
  75. package/dist/layers.CAgoPdOX.js +1088 -0
  76. package/dist/layers.CBb84SJY.js +10 -0
  77. package/dist/layers.CCaOiFeL.js +9 -0
  78. package/dist/layers.CChtus6s.js +9 -0
  79. package/dist/layers.CDpYDf4E.js +41 -0
  80. package/dist/layers.CElZbgj1.js +61 -0
  81. package/dist/layers.CFXi5TGg.js +5 -0
  82. package/dist/layers.CGvSf-pD.js +10 -0
  83. package/dist/layers.CH7Yhxyl.js +1 -0
  84. package/dist/layers.CHZsXQcr.js +1 -0
  85. package/dist/layers.CHbqHHw4.js +10 -0
  86. package/dist/layers.CIK15Iw8.js +1 -0
  87. package/dist/layers.CIpcY9uj.js +38 -0
  88. package/dist/layers.CK2ePV5l.js +1 -0
  89. package/dist/layers.CKOfAypO.js +1 -0
  90. package/dist/layers.CKuoZO2o.js +5 -0
  91. package/dist/layers.CLELtUjk.js +40 -0
  92. package/dist/layers.CNmEkwvP.js +84 -0
  93. package/dist/layers.CPJv1Tc9.js +46859 -0
  94. package/dist/layers.CPlQgHvJ.js +37 -0
  95. package/dist/layers.CR9KcJml.js +9 -0
  96. package/dist/layers.CRFf4NzO.js +10 -0
  97. package/dist/layers.CSI1-wyP.js +1 -0
  98. package/dist/layers.CTmWmJtN.js +32 -0
  99. package/dist/layers.CXqT56ec.js +304 -0
  100. package/dist/layers.CZ5YSh6D.js +8 -0
  101. package/dist/layers.C_2s_qym.js +3 -0
  102. package/dist/layers.C_IvrzZ3.js +7 -0
  103. package/dist/layers.C_fjSuvx.js +1 -0
  104. package/dist/layers.CaMAncU5.js +423 -0
  105. package/dist/layers.CcaiUz4r.js +1 -0
  106. package/dist/layers.Cd1zz9ej.js +39 -0
  107. package/dist/layers.CeafY0UM.js +37 -0
  108. package/dist/layers.CfcMk6Ta.js +1 -0
  109. package/dist/layers.Cfl_HoMI.js +769 -0
  110. package/dist/layers.CfpNlmP9.js +1 -0
  111. package/dist/layers.CiTTUiMF.js +8 -0
  112. package/dist/layers.Cj4cFFtZ.js +189 -0
  113. package/dist/layers.CmdoC_9-.js +7 -0
  114. package/dist/layers.CoGB8bed.js +8 -0
  115. package/dist/layers.Cpy28Z7d.js +35 -0
  116. package/dist/layers.CqVTtuYm.js +6 -0
  117. package/dist/layers.Cu93NN5Z.js +41 -0
  118. package/dist/layers.Cu9NodvY.js +1089 -0
  119. package/dist/layers.CvBE5BLz.js +118 -0
  120. package/dist/layers.Cx9zn9dM.js +41 -0
  121. package/dist/layers.CxJcDiDE.js +65 -0
  122. package/dist/layers.Cyzu9PKQ.js +1 -0
  123. package/dist/layers.CzAsjHtw.js +34 -0
  124. package/dist/layers.D0kgeXsw.js +1619 -0
  125. package/dist/layers.D0zn4_Mx.js +1 -0
  126. package/dist/layers.D1Vfjokq.js +32 -0
  127. package/dist/layers.D1rIvRN6.js +9 -0
  128. package/dist/layers.D22i1Ls7.js +6 -0
  129. package/dist/layers.D25D_N3C.js +7 -0
  130. package/dist/layers.D4T8fTcj.js +1223 -0
  131. package/dist/layers.D4fXRymr.js +40 -0
  132. package/dist/layers.D4gUAtLW.js +41 -0
  133. package/dist/layers.D59PMsKH.js +51 -0
  134. package/dist/layers.D5_C65FS.js +2479 -0
  135. package/dist/layers.D5j-6Vz3.js +36 -0
  136. package/dist/layers.D7ikYTua.js +2235 -0
  137. package/dist/layers.D7jGxypv.js +8 -0
  138. package/dist/layers.D7n2QyFM.js +48146 -0
  139. package/dist/layers.D8fdxG58.js +295 -0
  140. package/dist/layers.D9h1AMfz.js +8 -0
  141. package/dist/layers.DAsAtqWK.js +4 -0
  142. package/dist/layers.DBVrBhF0.js +1 -0
  143. package/dist/layers.DCWjWRvL.js +9 -0
  144. package/dist/layers.DD9dfhit.js +40 -0
  145. package/dist/layers.DHD10kvJ.js +1 -0
  146. package/dist/layers.DHZBzVaT.js +1283 -0
  147. package/dist/layers.DHfSJOOW.js +1 -0
  148. package/dist/layers.DKJQWPVn.js +32 -0
  149. package/dist/layers.DKUfWSX1.js +904 -0
  150. package/dist/layers.DLK-HpMV.js +1 -0
  151. package/dist/layers.DLjZPfF1.js +802 -0
  152. package/dist/layers.DLwuMfdd.js +84 -0
  153. package/dist/layers.DMIDFKxo.js +36 -0
  154. package/dist/layers.DMkBISW1.js +1 -0
  155. package/dist/layers.DN9HoVxI.js +18 -0
  156. package/dist/layers.DOrgOHBr.js +1 -0
  157. package/dist/layers.DRvKjryx.js +1265 -0
  158. package/dist/layers.DTMLuJKN.js +33 -0
  159. package/dist/layers.DUJa2ZOS.js +8 -0
  160. package/dist/layers.DVUWZ8Wt.js +37 -0
  161. package/dist/layers.DVrOJIL5.js +7 -0
  162. package/dist/layers.DY6GA9ww.js +9166 -0
  163. package/dist/layers.D_Imug13.js +8 -0
  164. package/dist/layers.D_KJI4uf.js +1 -0
  165. package/dist/layers.D_vzZUhY.js +1 -0
  166. package/dist/layers.DaCB9yHC.js +4 -0
  167. package/dist/layers.DbaKVP5e.js +1 -0
  168. package/dist/layers.DcjluSHw.js +84 -0
  169. package/dist/layers.De0fDaHO.js +40 -0
  170. package/dist/layers.DeEGG6FS.js +42 -0
  171. package/dist/layers.DfFJCPRD.js +373 -0
  172. package/dist/layers.DfLz3NUP.js +320 -0
  173. package/dist/layers.DhW2E_US.js +1580 -0
  174. package/dist/layers.DjUOC4st.js +16 -0
  175. package/dist/layers.DjbsplkN.js +32 -0
  176. package/dist/layers.DkaJchxc.js +6 -0
  177. package/dist/layers.DlGVcszu.js +1 -0
  178. package/dist/layers.DlfnKTKF.js +42 -0
  179. package/dist/layers.DnxO-9oO.js +1 -0
  180. package/dist/layers.DqSkTf9R.js +21763 -0
  181. package/dist/layers.Dr1JK1_Z.js +202 -0
  182. package/dist/layers.Dr8zNYOs.js +5 -0
  183. package/dist/layers.DsiNLArY.js +40 -0
  184. package/dist/layers.DtP3hMV0.js +10 -0
  185. package/dist/layers.Du1ZlY6H.js +40 -0
  186. package/dist/layers.Du8uQ4JH.js +1 -0
  187. package/dist/layers.DuQ8oZjN.js +1 -0
  188. package/dist/layers.DuwNlZRl.js +11 -0
  189. package/dist/layers.Dw7Dmv6Y.js +19 -0
  190. package/dist/layers.DxA6ocdw.js +70 -0
  191. package/dist/layers.Dy1naDTQ.js +14 -0
  192. package/dist/layers.E1TwhuY2.js +791 -0
  193. package/dist/layers.Eelq_G9Y.js +803 -0
  194. package/dist/layers.Eodu_OXz.js +2 -0
  195. package/dist/layers.H36OYk_h.js +5 -0
  196. package/dist/layers.HVpHwo9E.js +5 -0
  197. package/dist/layers.I-tmhwFG.js +39 -0
  198. package/dist/layers.Is4NOcYC.js +9 -0
  199. package/dist/layers.J20L8tWx.js +501 -0
  200. package/dist/layers.JWCLFILJ.js +1 -0
  201. package/dist/layers.Jm82B3Oj.js +116 -0
  202. package/dist/layers.L60GQ2sb.js +8 -0
  203. package/dist/layers.LJC22eKQ.js +7 -0
  204. package/dist/layers.MW6tobI-.js +6 -0
  205. package/dist/layers.MZ6d0DZp.js +10 -0
  206. package/dist/layers.M_62Sbj7.js +268 -0
  207. package/dist/layers.O8Nxijec.js +793 -0
  208. package/dist/layers.OLlYwVPc.js +14 -0
  209. package/dist/layers.Pw46DBip.js +59 -0
  210. package/dist/layers.U98UFPWm.js +207 -0
  211. package/dist/layers.VXlo2W40.js +36 -0
  212. package/dist/layers.VlKfhmpq.js +10 -0
  213. package/dist/layers.YOQy_t6q.js +40 -0
  214. package/dist/layers.ZoMyFX9M.js +2 -0
  215. package/dist/layers._1XiIhPh.js +7 -0
  216. package/dist/layers.ay_dYKjj.js +960 -0
  217. package/dist/layers.b0h5ZBmD.js +61 -0
  218. package/dist/layers.dDe6FHmh.js +36 -0
  219. package/dist/layers.dVkHa3a_.js +39 -0
  220. package/dist/layers.et7zjoY9.js +52 -0
  221. package/dist/layers.gryxZo3n.js +10 -0
  222. package/dist/layers.hPuFhhxl.js +41 -0
  223. package/dist/layers.hweLqW3I.js +261 -0
  224. package/dist/layers.kaOt41rd.js +9 -0
  225. package/dist/layers.lCpg7dOn.js +21 -0
  226. package/dist/layers.lLFiut9N.js +8 -0
  227. package/dist/layers.lNSz2AQQ.js +6 -0
  228. package/dist/layers.mV8zYAS9.js +39 -0
  229. package/dist/layers.oyyMMK1Q.js +21938 -0
  230. package/dist/layers.qFWUlMDP.js +282 -0
  231. package/dist/layers.t46sYkQh.js +96 -0
  232. package/dist/layers.tdFdnJVX.js +38 -0
  233. package/dist/layers.u4sk_7sk.js +6 -0
  234. package/dist/layers.uEa7jWOw.js +42 -0
  235. package/dist/layers.uKwUcHfW.js +9 -0
  236. package/dist/layers.v6694Ulr.js +425 -0
  237. package/dist/layers.xkw2pWfm.js +40 -0
  238. package/dist/layers.ytXaFkr-.js +1 -0
  239. package/dist/layers.z5ZNUv1T.js +38 -0
  240. package/package.json +18 -76
  241. package/dist/layers.7jmq6tBR.js +0 -2227
  242. package/dist/layers.B90YwJga.js +0 -4
  243. package/dist/layers.C03OvlLb.js +0 -6
  244. package/dist/layers.CJiIq6YQ.js +0 -1
  245. package/dist/layers.CXffIp2y.js +0 -864
  246. package/dist/layers.CZPeYQ9g.js +0 -3
  247. package/dist/layers.CZ_Lt7IL.js +0 -7
  248. package/dist/layers.Ci1-qkbn.js +0 -341
  249. package/dist/layers.Cnm-pECN.js +0 -2
  250. package/dist/layers.D6d62qQ_.js +0 -6774
  251. package/dist/layers.DNCgFYS7.js +0 -27
  252. package/dist/layers.Dev6Yrwi.js +0 -530
  253. package/dist/layers.Dgok89qX.js +0 -1
  254. package/dist/layers.Dq3o7sh3.js +0 -7723
  255. package/dist/layers.Duy8YzsH.js +0 -2511
  256. package/dist/layers.QjAkD17S.js +0 -3677
@@ -0,0 +1,1265 @@
1
+ import { n as vt, o as Ct, s as Ot, a as Pt, b as Gt, c as St, g as C, l as B, d as At, u as It, y as Nt, q as Ht, j as D, z as Bt } from "./layers.DY6GA9ww.js";
2
+ import "./layers.DqSkTf9R.js";
3
+ var mt = (function() {
4
+ var r = function(S, o, u, d) {
5
+ for (u = u || {}, d = S.length; d--; u[S[d]] = o)
6
+ ;
7
+ return u;
8
+ }, n = [1, 3], l = [1, 6], h = [1, 4], i = [1, 5], c = [2, 5], p = [1, 12], m = [5, 7, 13, 19, 21, 23, 24, 26, 28, 31, 37, 40, 47], x = [7, 13, 19, 21, 23, 24, 26, 28, 31, 37, 40], y = [7, 12, 13, 19, 21, 23, 24, 26, 28, 31, 37, 40], a = [7, 13, 47], R = [1, 42], _ = [1, 41], b = [7, 13, 29, 32, 35, 38, 47], f = [1, 55], k = [1, 56], g = [1, 57], E = [7, 13, 32, 35, 42, 47], z = {
9
+ trace: function() {
10
+ },
11
+ yy: {},
12
+ symbols_: { error: 2, start: 3, eol: 4, GG: 5, document: 6, EOF: 7, ":": 8, DIR: 9, options: 10, body: 11, OPT: 12, NL: 13, line: 14, statement: 15, commitStatement: 16, mergeStatement: 17, cherryPickStatement: 18, acc_title: 19, acc_title_value: 20, acc_descr: 21, acc_descr_value: 22, acc_descr_multiline_value: 23, section: 24, branchStatement: 25, CHECKOUT: 26, ref: 27, BRANCH: 28, ORDER: 29, NUM: 30, CHERRY_PICK: 31, COMMIT_ID: 32, STR: 33, PARENT_COMMIT: 34, COMMIT_TAG: 35, EMPTYSTR: 36, MERGE: 37, COMMIT_TYPE: 38, commitType: 39, COMMIT: 40, commit_arg: 41, COMMIT_MSG: 42, NORMAL: 43, REVERSE: 44, HIGHLIGHT: 45, ID: 46, ";": 47, $accept: 0, $end: 1 },
13
+ terminals_: { 2: "error", 5: "GG", 7: "EOF", 8: ":", 9: "DIR", 12: "OPT", 13: "NL", 19: "acc_title", 20: "acc_title_value", 21: "acc_descr", 22: "acc_descr_value", 23: "acc_descr_multiline_value", 24: "section", 26: "CHECKOUT", 28: "BRANCH", 29: "ORDER", 30: "NUM", 31: "CHERRY_PICK", 32: "COMMIT_ID", 33: "STR", 34: "PARENT_COMMIT", 35: "COMMIT_TAG", 36: "EMPTYSTR", 37: "MERGE", 38: "COMMIT_TYPE", 40: "COMMIT", 42: "COMMIT_MSG", 43: "NORMAL", 44: "REVERSE", 45: "HIGHLIGHT", 46: "ID", 47: ";" },
14
+ productions_: [0, [3, 2], [3, 3], [3, 4], [3, 5], [6, 0], [6, 2], [10, 2], [10, 1], [11, 0], [11, 2], [14, 2], [14, 1], [15, 1], [15, 1], [15, 1], [15, 2], [15, 2], [15, 1], [15, 1], [15, 1], [15, 2], [25, 2], [25, 4], [18, 3], [18, 5], [18, 5], [18, 7], [18, 7], [18, 5], [18, 5], [18, 5], [18, 7], [18, 7], [18, 7], [18, 7], [17, 2], [17, 4], [17, 4], [17, 4], [17, 6], [17, 6], [17, 6], [17, 6], [17, 6], [17, 6], [17, 8], [17, 8], [17, 8], [17, 8], [17, 8], [17, 8], [16, 2], [16, 3], [16, 3], [16, 5], [16, 5], [16, 3], [16, 5], [16, 5], [16, 5], [16, 5], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 3], [16, 5], [16, 5], [16, 5], [16, 5], [16, 5], [16, 5], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [41, 0], [41, 1], [39, 1], [39, 1], [39, 1], [27, 1], [27, 1], [4, 1], [4, 1], [4, 1]],
15
+ performAction: function(o, u, d, s, T, t, X) {
16
+ var e = t.length - 1;
17
+ switch (T) {
18
+ case 2:
19
+ return t[e];
20
+ case 3:
21
+ return t[e - 1];
22
+ case 4:
23
+ return s.setDirection(t[e - 3]), t[e - 1];
24
+ case 6:
25
+ s.setOptions(t[e - 1]), this.$ = t[e];
26
+ break;
27
+ case 7:
28
+ t[e - 1] += t[e], this.$ = t[e - 1];
29
+ break;
30
+ case 9:
31
+ this.$ = [];
32
+ break;
33
+ case 10:
34
+ t[e - 1].push(t[e]), this.$ = t[e - 1];
35
+ break;
36
+ case 11:
37
+ this.$ = t[e - 1];
38
+ break;
39
+ case 16:
40
+ this.$ = t[e].trim(), s.setAccTitle(this.$);
41
+ break;
42
+ case 17:
43
+ case 18:
44
+ this.$ = t[e].trim(), s.setAccDescription(this.$);
45
+ break;
46
+ case 19:
47
+ s.addSection(t[e].substr(8)), this.$ = t[e].substr(8);
48
+ break;
49
+ case 21:
50
+ s.checkout(t[e]);
51
+ break;
52
+ case 22:
53
+ s.branch(t[e]);
54
+ break;
55
+ case 23:
56
+ s.branch(t[e - 2], t[e]);
57
+ break;
58
+ case 24:
59
+ s.cherryPick(t[e], "", void 0);
60
+ break;
61
+ case 25:
62
+ s.cherryPick(t[e - 2], "", void 0, t[e]);
63
+ break;
64
+ case 26:
65
+ s.cherryPick(t[e - 2], "", t[e]);
66
+ break;
67
+ case 27:
68
+ s.cherryPick(t[e - 4], "", t[e], t[e - 2]);
69
+ break;
70
+ case 28:
71
+ s.cherryPick(t[e - 4], "", t[e - 2], t[e]);
72
+ break;
73
+ case 29:
74
+ s.cherryPick(t[e], "", t[e - 2]);
75
+ break;
76
+ case 30:
77
+ s.cherryPick(t[e], "", "");
78
+ break;
79
+ case 31:
80
+ s.cherryPick(t[e - 2], "", "");
81
+ break;
82
+ case 32:
83
+ s.cherryPick(t[e - 4], "", "", t[e - 2]);
84
+ break;
85
+ case 33:
86
+ s.cherryPick(t[e - 4], "", "", t[e]);
87
+ break;
88
+ case 34:
89
+ s.cherryPick(t[e - 2], "", t[e - 4], t[e]);
90
+ break;
91
+ case 35:
92
+ s.cherryPick(t[e - 2], "", "", t[e]);
93
+ break;
94
+ case 36:
95
+ s.merge(t[e], "", "", "");
96
+ break;
97
+ case 37:
98
+ s.merge(t[e - 2], t[e], "", "");
99
+ break;
100
+ case 38:
101
+ s.merge(t[e - 2], "", t[e], "");
102
+ break;
103
+ case 39:
104
+ s.merge(t[e - 2], "", "", t[e]);
105
+ break;
106
+ case 40:
107
+ s.merge(t[e - 4], t[e], "", t[e - 2]);
108
+ break;
109
+ case 41:
110
+ s.merge(t[e - 4], "", t[e], t[e - 2]);
111
+ break;
112
+ case 42:
113
+ s.merge(t[e - 4], "", t[e - 2], t[e]);
114
+ break;
115
+ case 43:
116
+ s.merge(t[e - 4], t[e - 2], t[e], "");
117
+ break;
118
+ case 44:
119
+ s.merge(t[e - 4], t[e - 2], "", t[e]);
120
+ break;
121
+ case 45:
122
+ s.merge(t[e - 4], t[e], t[e - 2], "");
123
+ break;
124
+ case 46:
125
+ s.merge(t[e - 6], t[e - 4], t[e - 2], t[e]);
126
+ break;
127
+ case 47:
128
+ s.merge(t[e - 6], t[e], t[e - 4], t[e - 2]);
129
+ break;
130
+ case 48:
131
+ s.merge(t[e - 6], t[e - 4], t[e], t[e - 2]);
132
+ break;
133
+ case 49:
134
+ s.merge(t[e - 6], t[e - 2], t[e - 4], t[e]);
135
+ break;
136
+ case 50:
137
+ s.merge(t[e - 6], t[e], t[e - 2], t[e - 4]);
138
+ break;
139
+ case 51:
140
+ s.merge(t[e - 6], t[e - 2], t[e], t[e - 4]);
141
+ break;
142
+ case 52:
143
+ s.commit(t[e]);
144
+ break;
145
+ case 53:
146
+ s.commit("", "", s.commitType.NORMAL, t[e]);
147
+ break;
148
+ case 54:
149
+ s.commit("", "", t[e], "");
150
+ break;
151
+ case 55:
152
+ s.commit("", "", t[e], t[e - 2]);
153
+ break;
154
+ case 56:
155
+ s.commit("", "", t[e - 2], t[e]);
156
+ break;
157
+ case 57:
158
+ s.commit("", t[e], s.commitType.NORMAL, "");
159
+ break;
160
+ case 58:
161
+ s.commit("", t[e - 2], s.commitType.NORMAL, t[e]);
162
+ break;
163
+ case 59:
164
+ s.commit("", t[e], s.commitType.NORMAL, t[e - 2]);
165
+ break;
166
+ case 60:
167
+ s.commit("", t[e - 2], t[e], "");
168
+ break;
169
+ case 61:
170
+ s.commit("", t[e], t[e - 2], "");
171
+ break;
172
+ case 62:
173
+ s.commit("", t[e - 4], t[e - 2], t[e]);
174
+ break;
175
+ case 63:
176
+ s.commit("", t[e - 4], t[e], t[e - 2]);
177
+ break;
178
+ case 64:
179
+ s.commit("", t[e - 2], t[e - 4], t[e]);
180
+ break;
181
+ case 65:
182
+ s.commit("", t[e], t[e - 4], t[e - 2]);
183
+ break;
184
+ case 66:
185
+ s.commit("", t[e], t[e - 2], t[e - 4]);
186
+ break;
187
+ case 67:
188
+ s.commit("", t[e - 2], t[e], t[e - 4]);
189
+ break;
190
+ case 68:
191
+ s.commit(t[e], "", s.commitType.NORMAL, "");
192
+ break;
193
+ case 69:
194
+ s.commit(t[e], "", s.commitType.NORMAL, t[e - 2]);
195
+ break;
196
+ case 70:
197
+ s.commit(t[e - 2], "", s.commitType.NORMAL, t[e]);
198
+ break;
199
+ case 71:
200
+ s.commit(t[e - 2], "", t[e], "");
201
+ break;
202
+ case 72:
203
+ s.commit(t[e], "", t[e - 2], "");
204
+ break;
205
+ case 73:
206
+ s.commit(t[e], t[e - 2], s.commitType.NORMAL, "");
207
+ break;
208
+ case 74:
209
+ s.commit(t[e - 2], t[e], s.commitType.NORMAL, "");
210
+ break;
211
+ case 75:
212
+ s.commit(t[e - 4], "", t[e - 2], t[e]);
213
+ break;
214
+ case 76:
215
+ s.commit(t[e - 4], "", t[e], t[e - 2]);
216
+ break;
217
+ case 77:
218
+ s.commit(t[e - 2], "", t[e - 4], t[e]);
219
+ break;
220
+ case 78:
221
+ s.commit(t[e], "", t[e - 4], t[e - 2]);
222
+ break;
223
+ case 79:
224
+ s.commit(t[e], "", t[e - 2], t[e - 4]);
225
+ break;
226
+ case 80:
227
+ s.commit(t[e - 2], "", t[e], t[e - 4]);
228
+ break;
229
+ case 81:
230
+ s.commit(t[e - 4], t[e], t[e - 2], "");
231
+ break;
232
+ case 82:
233
+ s.commit(t[e - 4], t[e - 2], t[e], "");
234
+ break;
235
+ case 83:
236
+ s.commit(t[e - 2], t[e], t[e - 4], "");
237
+ break;
238
+ case 84:
239
+ s.commit(t[e], t[e - 2], t[e - 4], "");
240
+ break;
241
+ case 85:
242
+ s.commit(t[e], t[e - 4], t[e - 2], "");
243
+ break;
244
+ case 86:
245
+ s.commit(t[e - 2], t[e - 4], t[e], "");
246
+ break;
247
+ case 87:
248
+ s.commit(t[e - 4], t[e], s.commitType.NORMAL, t[e - 2]);
249
+ break;
250
+ case 88:
251
+ s.commit(t[e - 4], t[e - 2], s.commitType.NORMAL, t[e]);
252
+ break;
253
+ case 89:
254
+ s.commit(t[e - 2], t[e], s.commitType.NORMAL, t[e - 4]);
255
+ break;
256
+ case 90:
257
+ s.commit(t[e], t[e - 2], s.commitType.NORMAL, t[e - 4]);
258
+ break;
259
+ case 91:
260
+ s.commit(t[e], t[e - 4], s.commitType.NORMAL, t[e - 2]);
261
+ break;
262
+ case 92:
263
+ s.commit(t[e - 2], t[e - 4], s.commitType.NORMAL, t[e]);
264
+ break;
265
+ case 93:
266
+ s.commit(t[e - 6], t[e - 4], t[e - 2], t[e]);
267
+ break;
268
+ case 94:
269
+ s.commit(t[e - 6], t[e - 4], t[e], t[e - 2]);
270
+ break;
271
+ case 95:
272
+ s.commit(t[e - 6], t[e - 2], t[e - 4], t[e]);
273
+ break;
274
+ case 96:
275
+ s.commit(t[e - 6], t[e], t[e - 4], t[e - 2]);
276
+ break;
277
+ case 97:
278
+ s.commit(t[e - 6], t[e - 2], t[e], t[e - 4]);
279
+ break;
280
+ case 98:
281
+ s.commit(t[e - 6], t[e], t[e - 2], t[e - 4]);
282
+ break;
283
+ case 99:
284
+ s.commit(t[e - 4], t[e - 6], t[e - 2], t[e]);
285
+ break;
286
+ case 100:
287
+ s.commit(t[e - 4], t[e - 6], t[e], t[e - 2]);
288
+ break;
289
+ case 101:
290
+ s.commit(t[e - 2], t[e - 6], t[e - 4], t[e]);
291
+ break;
292
+ case 102:
293
+ s.commit(t[e], t[e - 6], t[e - 4], t[e - 2]);
294
+ break;
295
+ case 103:
296
+ s.commit(t[e - 2], t[e - 6], t[e], t[e - 4]);
297
+ break;
298
+ case 104:
299
+ s.commit(t[e], t[e - 6], t[e - 2], t[e - 4]);
300
+ break;
301
+ case 105:
302
+ s.commit(t[e], t[e - 4], t[e - 2], t[e - 6]);
303
+ break;
304
+ case 106:
305
+ s.commit(t[e - 2], t[e - 4], t[e], t[e - 6]);
306
+ break;
307
+ case 107:
308
+ s.commit(t[e], t[e - 2], t[e - 4], t[e - 6]);
309
+ break;
310
+ case 108:
311
+ s.commit(t[e - 2], t[e], t[e - 4], t[e - 6]);
312
+ break;
313
+ case 109:
314
+ s.commit(t[e - 4], t[e - 2], t[e], t[e - 6]);
315
+ break;
316
+ case 110:
317
+ s.commit(t[e - 4], t[e], t[e - 2], t[e - 6]);
318
+ break;
319
+ case 111:
320
+ s.commit(t[e - 2], t[e - 4], t[e - 6], t[e]);
321
+ break;
322
+ case 112:
323
+ s.commit(t[e], t[e - 4], t[e - 6], t[e - 2]);
324
+ break;
325
+ case 113:
326
+ s.commit(t[e - 2], t[e], t[e - 6], t[e - 4]);
327
+ break;
328
+ case 114:
329
+ s.commit(t[e], t[e - 2], t[e - 6], t[e - 4]);
330
+ break;
331
+ case 115:
332
+ s.commit(t[e - 4], t[e - 2], t[e - 6], t[e]);
333
+ break;
334
+ case 116:
335
+ s.commit(t[e - 4], t[e], t[e - 6], t[e - 2]);
336
+ break;
337
+ case 117:
338
+ this.$ = "";
339
+ break;
340
+ case 118:
341
+ this.$ = t[e];
342
+ break;
343
+ case 119:
344
+ this.$ = s.commitType.NORMAL;
345
+ break;
346
+ case 120:
347
+ this.$ = s.commitType.REVERSE;
348
+ break;
349
+ case 121:
350
+ this.$ = s.commitType.HIGHLIGHT;
351
+ break;
352
+ }
353
+ },
354
+ table: [{ 3: 1, 4: 2, 5: n, 7: l, 13: h, 47: i }, { 1: [3] }, { 3: 7, 4: 2, 5: n, 7: l, 13: h, 47: i }, { 6: 8, 7: c, 8: [1, 9], 9: [1, 10], 10: 11, 13: p }, r(m, [2, 124]), r(m, [2, 125]), r(m, [2, 126]), { 1: [2, 1] }, { 7: [1, 13] }, { 6: 14, 7: c, 10: 11, 13: p }, { 8: [1, 15] }, r(x, [2, 9], { 11: 16, 12: [1, 17] }), r(y, [2, 8]), { 1: [2, 2] }, { 7: [1, 18] }, { 6: 19, 7: c, 10: 11, 13: p }, { 7: [2, 6], 13: [1, 22], 14: 20, 15: 21, 16: 23, 17: 24, 18: 25, 19: [1, 26], 21: [1, 27], 23: [1, 28], 24: [1, 29], 25: 30, 26: [1, 31], 28: [1, 35], 31: [1, 34], 37: [1, 33], 40: [1, 32] }, r(y, [2, 7]), { 1: [2, 3] }, { 7: [1, 36] }, r(x, [2, 10]), { 4: 37, 7: l, 13: h, 47: i }, r(x, [2, 12]), r(a, [2, 13]), r(a, [2, 14]), r(a, [2, 15]), { 20: [1, 38] }, { 22: [1, 39] }, r(a, [2, 18]), r(a, [2, 19]), r(a, [2, 20]), { 27: 40, 33: R, 46: _ }, r(a, [2, 117], { 41: 43, 32: [1, 46], 33: [1, 48], 35: [1, 44], 38: [1, 45], 42: [1, 47] }), { 27: 49, 33: R, 46: _ }, { 32: [1, 50], 35: [1, 51] }, { 27: 52, 33: R, 46: _ }, { 1: [2, 4] }, r(x, [2, 11]), r(a, [2, 16]), r(a, [2, 17]), r(a, [2, 21]), r(b, [2, 122]), r(b, [2, 123]), r(a, [2, 52]), { 33: [1, 53] }, { 39: 54, 43: f, 44: k, 45: g }, { 33: [1, 58] }, { 33: [1, 59] }, r(a, [2, 118]), r(a, [2, 36], { 32: [1, 60], 35: [1, 62], 38: [1, 61] }), { 33: [1, 63] }, { 33: [1, 64], 36: [1, 65] }, r(a, [2, 22], { 29: [1, 66] }), r(a, [2, 53], { 32: [1, 68], 38: [1, 67], 42: [1, 69] }), r(a, [2, 54], { 32: [1, 71], 35: [1, 70], 42: [1, 72] }), r(E, [2, 119]), r(E, [2, 120]), r(E, [2, 121]), r(a, [2, 57], { 35: [1, 73], 38: [1, 74], 42: [1, 75] }), r(a, [2, 68], { 32: [1, 78], 35: [1, 76], 38: [1, 77] }), { 33: [1, 79] }, { 39: 80, 43: f, 44: k, 45: g }, { 33: [1, 81] }, r(a, [2, 24], { 34: [1, 82], 35: [1, 83] }), { 32: [1, 84] }, { 32: [1, 85] }, { 30: [1, 86] }, { 39: 87, 43: f, 44: k, 45: g }, { 33: [1, 88] }, { 33: [1, 89] }, { 33: [1, 90] }, { 33: [1, 91] }, { 33: [1, 92] }, { 33: [1, 93] }, { 39: 94, 43: f, 44: k, 45: g }, { 33: [1, 95] }, { 33: [1, 96] }, { 39: 97, 43: f, 44: k, 45: g }, { 33: [1, 98] }, r(a, [2, 37], { 35: [1, 100], 38: [1, 99] }), r(a, [2, 38], { 32: [1, 102], 35: [1, 101] }), r(a, [2, 39], { 32: [1, 103], 38: [1, 104] }), { 33: [1, 105] }, { 33: [1, 106], 36: [1, 107] }, { 33: [1, 108] }, { 33: [1, 109] }, r(a, [2, 23]), r(a, [2, 55], { 32: [1, 110], 42: [1, 111] }), r(a, [2, 59], { 38: [1, 112], 42: [1, 113] }), r(a, [2, 69], { 32: [1, 115], 38: [1, 114] }), r(a, [2, 56], { 32: [1, 116], 42: [1, 117] }), r(a, [2, 61], { 35: [1, 118], 42: [1, 119] }), r(a, [2, 72], { 32: [1, 121], 35: [1, 120] }), r(a, [2, 58], { 38: [1, 122], 42: [1, 123] }), r(a, [2, 60], { 35: [1, 124], 42: [1, 125] }), r(a, [2, 73], { 35: [1, 127], 38: [1, 126] }), r(a, [2, 70], { 32: [1, 129], 38: [1, 128] }), r(a, [2, 71], { 32: [1, 131], 35: [1, 130] }), r(a, [2, 74], { 35: [1, 133], 38: [1, 132] }), { 39: 134, 43: f, 44: k, 45: g }, { 33: [1, 135] }, { 33: [1, 136] }, { 33: [1, 137] }, { 33: [1, 138] }, { 39: 139, 43: f, 44: k, 45: g }, r(a, [2, 25], { 35: [1, 140] }), r(a, [2, 26], { 34: [1, 141] }), r(a, [2, 31], { 34: [1, 142] }), r(a, [2, 29], { 34: [1, 143] }), r(a, [2, 30], { 34: [1, 144] }), { 33: [1, 145] }, { 33: [1, 146] }, { 39: 147, 43: f, 44: k, 45: g }, { 33: [1, 148] }, { 39: 149, 43: f, 44: k, 45: g }, { 33: [1, 150] }, { 33: [1, 151] }, { 33: [1, 152] }, { 33: [1, 153] }, { 33: [1, 154] }, { 33: [1, 155] }, { 33: [1, 156] }, { 39: 157, 43: f, 44: k, 45: g }, { 33: [1, 158] }, { 33: [1, 159] }, { 33: [1, 160] }, { 39: 161, 43: f, 44: k, 45: g }, { 33: [1, 162] }, { 39: 163, 43: f, 44: k, 45: g }, { 33: [1, 164] }, { 33: [1, 165] }, { 33: [1, 166] }, { 39: 167, 43: f, 44: k, 45: g }, { 33: [1, 168] }, r(a, [2, 43], { 35: [1, 169] }), r(a, [2, 44], { 38: [1, 170] }), r(a, [2, 42], { 32: [1, 171] }), r(a, [2, 45], { 35: [1, 172] }), r(a, [2, 40], { 38: [1, 173] }), r(a, [2, 41], { 32: [1, 174] }), { 33: [1, 175], 36: [1, 176] }, { 33: [1, 177] }, { 33: [1, 178] }, { 33: [1, 179] }, { 33: [1, 180] }, r(a, [2, 66], { 42: [1, 181] }), r(a, [2, 79], { 32: [1, 182] }), r(a, [2, 67], { 42: [1, 183] }), r(a, [2, 90], { 38: [1, 184] }), r(a, [2, 80], { 32: [1, 185] }), r(a, [2, 89], { 38: [1, 186] }), r(a, [2, 65], { 42: [1, 187] }), r(a, [2, 78], { 32: [1, 188] }), r(a, [2, 64], { 42: [1, 189] }), r(a, [2, 84], { 35: [1, 190] }), r(a, [2, 77], { 32: [1, 191] }), r(a, [2, 83], { 35: [1, 192] }), r(a, [2, 63], { 42: [1, 193] }), r(a, [2, 91], { 38: [1, 194] }), r(a, [2, 62], { 42: [1, 195] }), r(a, [2, 85], { 35: [1, 196] }), r(a, [2, 86], { 35: [1, 197] }), r(a, [2, 92], { 38: [1, 198] }), r(a, [2, 76], { 32: [1, 199] }), r(a, [2, 87], { 38: [1, 200] }), r(a, [2, 75], { 32: [1, 201] }), r(a, [2, 81], { 35: [1, 202] }), r(a, [2, 82], { 35: [1, 203] }), r(a, [2, 88], { 38: [1, 204] }), { 33: [1, 205] }, { 39: 206, 43: f, 44: k, 45: g }, { 33: [1, 207] }, { 33: [1, 208] }, { 39: 209, 43: f, 44: k, 45: g }, { 33: [1, 210] }, r(a, [2, 27]), r(a, [2, 32]), r(a, [2, 28]), r(a, [2, 33]), r(a, [2, 34]), r(a, [2, 35]), { 33: [1, 211] }, { 33: [1, 212] }, { 33: [1, 213] }, { 39: 214, 43: f, 44: k, 45: g }, { 33: [1, 215] }, { 39: 216, 43: f, 44: k, 45: g }, { 33: [1, 217] }, { 33: [1, 218] }, { 33: [1, 219] }, { 33: [1, 220] }, { 33: [1, 221] }, { 33: [1, 222] }, { 33: [1, 223] }, { 39: 224, 43: f, 44: k, 45: g }, { 33: [1, 225] }, { 33: [1, 226] }, { 33: [1, 227] }, { 39: 228, 43: f, 44: k, 45: g }, { 33: [1, 229] }, { 39: 230, 43: f, 44: k, 45: g }, { 33: [1, 231] }, { 33: [1, 232] }, { 33: [1, 233] }, { 39: 234, 43: f, 44: k, 45: g }, r(a, [2, 46]), r(a, [2, 48]), r(a, [2, 47]), r(a, [2, 49]), r(a, [2, 51]), r(a, [2, 50]), r(a, [2, 107]), r(a, [2, 108]), r(a, [2, 105]), r(a, [2, 106]), r(a, [2, 110]), r(a, [2, 109]), r(a, [2, 114]), r(a, [2, 113]), r(a, [2, 112]), r(a, [2, 111]), r(a, [2, 116]), r(a, [2, 115]), r(a, [2, 104]), r(a, [2, 103]), r(a, [2, 102]), r(a, [2, 101]), r(a, [2, 99]), r(a, [2, 100]), r(a, [2, 98]), r(a, [2, 97]), r(a, [2, 96]), r(a, [2, 95]), r(a, [2, 93]), r(a, [2, 94])],
355
+ defaultActions: { 7: [2, 1], 13: [2, 2], 18: [2, 3], 36: [2, 4] },
356
+ parseError: function(o, u) {
357
+ if (u.recoverable)
358
+ this.trace(o);
359
+ else {
360
+ var d = new Error(o);
361
+ throw d.hash = u, d;
362
+ }
363
+ },
364
+ parse: function(o) {
365
+ var u = this, d = [0], s = [], T = [null], t = [], X = this.table, e = "", rt = 0, ft = 0, wt = 2, pt = 1, Lt = t.slice.call(arguments, 1), O = Object.create(this.lexer), F = { yy: {} };
366
+ for (var ct in this.yy)
367
+ Object.prototype.hasOwnProperty.call(this.yy, ct) && (F.yy[ct] = this.yy[ct]);
368
+ O.setInput(o, F.yy), F.yy.lexer = O, F.yy.parser = this, typeof O.yylloc > "u" && (O.yylloc = {});
369
+ var ot = O.yylloc;
370
+ t.push(ot);
371
+ var Rt = O.options && O.options.ranges;
372
+ typeof F.yy.parseError == "function" ? this.parseError = F.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
373
+ function Mt() {
374
+ var j;
375
+ return j = s.pop() || O.lex() || pt, typeof j != "number" && (j instanceof Array && (s = j, j = s.pop()), j = u.symbols_[j] || j), j;
376
+ }
377
+ for (var N, K, V, lt, J = {}, it, q, bt, st; ; ) {
378
+ if (K = d[d.length - 1], this.defaultActions[K] ? V = this.defaultActions[K] : ((N === null || typeof N > "u") && (N = Mt()), V = X[K] && X[K][N]), typeof V > "u" || !V.length || !V[0]) {
379
+ var ht = "";
380
+ st = [];
381
+ for (it in X[K])
382
+ this.terminals_[it] && it > wt && st.push("'" + this.terminals_[it] + "'");
383
+ O.showPosition ? ht = "Parse error on line " + (rt + 1) + `:
384
+ ` + O.showPosition() + `
385
+ Expecting ` + st.join(", ") + ", got '" + (this.terminals_[N] || N) + "'" : ht = "Parse error on line " + (rt + 1) + ": Unexpected " + (N == pt ? "end of input" : "'" + (this.terminals_[N] || N) + "'"), this.parseError(ht, {
386
+ text: O.match,
387
+ token: this.terminals_[N] || N,
388
+ line: O.yylineno,
389
+ loc: ot,
390
+ expected: st
391
+ });
392
+ }
393
+ if (V[0] instanceof Array && V.length > 1)
394
+ throw new Error("Parse Error: multiple actions possible at state: " + K + ", token: " + N);
395
+ switch (V[0]) {
396
+ case 1:
397
+ d.push(N), T.push(O.yytext), t.push(O.yylloc), d.push(V[1]), N = null, ft = O.yyleng, e = O.yytext, rt = O.yylineno, ot = O.yylloc;
398
+ break;
399
+ case 2:
400
+ if (q = this.productions_[V[1]][1], J.$ = T[T.length - q], J._$ = {
401
+ first_line: t[t.length - (q || 1)].first_line,
402
+ last_line: t[t.length - 1].last_line,
403
+ first_column: t[t.length - (q || 1)].first_column,
404
+ last_column: t[t.length - 1].last_column
405
+ }, Rt && (J._$.range = [
406
+ t[t.length - (q || 1)].range[0],
407
+ t[t.length - 1].range[1]
408
+ ]), lt = this.performAction.apply(J, [
409
+ e,
410
+ ft,
411
+ rt,
412
+ F.yy,
413
+ V[1],
414
+ T,
415
+ t
416
+ ].concat(Lt)), typeof lt < "u")
417
+ return lt;
418
+ q && (d = d.slice(0, -1 * q * 2), T = T.slice(0, -1 * q), t = t.slice(0, -1 * q)), d.push(this.productions_[V[1]][0]), T.push(J.$), t.push(J._$), bt = X[d[d.length - 2]][d[d.length - 1]], d.push(bt);
419
+ break;
420
+ case 3:
421
+ return !0;
422
+ }
423
+ }
424
+ return !0;
425
+ }
426
+ }, M = /* @__PURE__ */ (function() {
427
+ var S = {
428
+ EOF: 1,
429
+ parseError: function(u, d) {
430
+ if (this.yy.parser)
431
+ this.yy.parser.parseError(u, d);
432
+ else
433
+ throw new Error(u);
434
+ },
435
+ // resets the lexer, sets new input
436
+ setInput: function(o, u) {
437
+ return this.yy = u || this.yy || {}, this._input = o, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
438
+ first_line: 1,
439
+ first_column: 0,
440
+ last_line: 1,
441
+ last_column: 0
442
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
443
+ },
444
+ // consumes and returns one char from the input
445
+ input: function() {
446
+ var o = this._input[0];
447
+ this.yytext += o, this.yyleng++, this.offset++, this.match += o, this.matched += o;
448
+ var u = o.match(/(?:\r\n?|\n).*/g);
449
+ return u ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), o;
450
+ },
451
+ // unshifts one char (or a string) into the input
452
+ unput: function(o) {
453
+ var u = o.length, d = o.split(/(?:\r\n?|\n)/g);
454
+ this._input = o + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - u), this.offset -= u;
455
+ var s = this.match.split(/(?:\r\n?|\n)/g);
456
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), d.length - 1 && (this.yylineno -= d.length - 1);
457
+ var T = this.yylloc.range;
458
+ return this.yylloc = {
459
+ first_line: this.yylloc.first_line,
460
+ last_line: this.yylineno + 1,
461
+ first_column: this.yylloc.first_column,
462
+ last_column: d ? (d.length === s.length ? this.yylloc.first_column : 0) + s[s.length - d.length].length - d[0].length : this.yylloc.first_column - u
463
+ }, this.options.ranges && (this.yylloc.range = [T[0], T[0] + this.yyleng - u]), this.yyleng = this.yytext.length, this;
464
+ },
465
+ // When called from action, caches matched text and appends it on next action
466
+ more: function() {
467
+ return this._more = !0, this;
468
+ },
469
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
470
+ reject: function() {
471
+ if (this.options.backtrack_lexer)
472
+ this._backtrack = !0;
473
+ else
474
+ 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).
475
+ ` + this.showPosition(), {
476
+ text: "",
477
+ token: null,
478
+ line: this.yylineno
479
+ });
480
+ return this;
481
+ },
482
+ // retain first n characters of the match
483
+ less: function(o) {
484
+ this.unput(this.match.slice(o));
485
+ },
486
+ // displays already matched input, i.e. for error messages
487
+ pastInput: function() {
488
+ var o = this.matched.substr(0, this.matched.length - this.match.length);
489
+ return (o.length > 20 ? "..." : "") + o.substr(-20).replace(/\n/g, "");
490
+ },
491
+ // displays upcoming input, i.e. for error messages
492
+ upcomingInput: function() {
493
+ var o = this.match;
494
+ return o.length < 20 && (o += this._input.substr(0, 20 - o.length)), (o.substr(0, 20) + (o.length > 20 ? "..." : "")).replace(/\n/g, "");
495
+ },
496
+ // displays the character position where the lexing error occurred, i.e. for error messages
497
+ showPosition: function() {
498
+ var o = this.pastInput(), u = new Array(o.length + 1).join("-");
499
+ return o + this.upcomingInput() + `
500
+ ` + u + "^";
501
+ },
502
+ // test the lexed token: return FALSE when not a match, otherwise return token
503
+ test_match: function(o, u) {
504
+ var d, s, T;
505
+ if (this.options.backtrack_lexer && (T = {
506
+ yylineno: this.yylineno,
507
+ yylloc: {
508
+ first_line: this.yylloc.first_line,
509
+ last_line: this.last_line,
510
+ first_column: this.yylloc.first_column,
511
+ last_column: this.yylloc.last_column
512
+ },
513
+ yytext: this.yytext,
514
+ match: this.match,
515
+ matches: this.matches,
516
+ matched: this.matched,
517
+ yyleng: this.yyleng,
518
+ offset: this.offset,
519
+ _more: this._more,
520
+ _input: this._input,
521
+ yy: this.yy,
522
+ conditionStack: this.conditionStack.slice(0),
523
+ done: this.done
524
+ }, this.options.ranges && (T.yylloc.range = this.yylloc.range.slice(0))), s = o[0].match(/(?:\r\n?|\n).*/g), s && (this.yylineno += s.length), this.yylloc = {
525
+ first_line: this.yylloc.last_line,
526
+ last_line: this.yylineno + 1,
527
+ first_column: this.yylloc.last_column,
528
+ last_column: s ? s[s.length - 1].length - s[s.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + o[0].length
529
+ }, this.yytext += o[0], this.match += o[0], this.matches = o, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(o[0].length), this.matched += o[0], d = this.performAction.call(this, this.yy, this, u, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), d)
530
+ return d;
531
+ if (this._backtrack) {
532
+ for (var t in T)
533
+ this[t] = T[t];
534
+ return !1;
535
+ }
536
+ return !1;
537
+ },
538
+ // return next match in input
539
+ next: function() {
540
+ if (this.done)
541
+ return this.EOF;
542
+ this._input || (this.done = !0);
543
+ var o, u, d, s;
544
+ this._more || (this.yytext = "", this.match = "");
545
+ for (var T = this._currentRules(), t = 0; t < T.length; t++)
546
+ if (d = this._input.match(this.rules[T[t]]), d && (!u || d[0].length > u[0].length)) {
547
+ if (u = d, s = t, this.options.backtrack_lexer) {
548
+ if (o = this.test_match(d, T[t]), o !== !1)
549
+ return o;
550
+ if (this._backtrack) {
551
+ u = !1;
552
+ continue;
553
+ } else
554
+ return !1;
555
+ } else if (!this.options.flex)
556
+ break;
557
+ }
558
+ return u ? (o = this.test_match(u, T[s]), o !== !1 ? o : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
559
+ ` + this.showPosition(), {
560
+ text: "",
561
+ token: null,
562
+ line: this.yylineno
563
+ });
564
+ },
565
+ // return next match that has a token
566
+ lex: function() {
567
+ var u = this.next();
568
+ return u || this.lex();
569
+ },
570
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
571
+ begin: function(u) {
572
+ this.conditionStack.push(u);
573
+ },
574
+ // pop the previously active lexer condition state off the condition stack
575
+ popState: function() {
576
+ var u = this.conditionStack.length - 1;
577
+ return u > 0 ? this.conditionStack.pop() : this.conditionStack[0];
578
+ },
579
+ // produce the lexer rule set which is active for the currently active lexer condition state
580
+ _currentRules: function() {
581
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
582
+ },
583
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
584
+ topState: function(u) {
585
+ return u = this.conditionStack.length - 1 - Math.abs(u || 0), u >= 0 ? this.conditionStack[u] : "INITIAL";
586
+ },
587
+ // alias for begin(condition)
588
+ pushState: function(u) {
589
+ this.begin(u);
590
+ },
591
+ // return the number of states currently on the stack
592
+ stateStackSize: function() {
593
+ return this.conditionStack.length;
594
+ },
595
+ options: { "case-insensitive": !0 },
596
+ performAction: function(u, d, s, T) {
597
+ switch (s) {
598
+ case 0:
599
+ return this.begin("acc_title"), 19;
600
+ case 1:
601
+ return this.popState(), "acc_title_value";
602
+ case 2:
603
+ return this.begin("acc_descr"), 21;
604
+ case 3:
605
+ return this.popState(), "acc_descr_value";
606
+ case 4:
607
+ this.begin("acc_descr_multiline");
608
+ break;
609
+ case 5:
610
+ this.popState();
611
+ break;
612
+ case 6:
613
+ return "acc_descr_multiline_value";
614
+ case 7:
615
+ return 13;
616
+ case 8:
617
+ break;
618
+ case 9:
619
+ break;
620
+ case 10:
621
+ return 5;
622
+ case 11:
623
+ return 40;
624
+ case 12:
625
+ return 32;
626
+ case 13:
627
+ return 38;
628
+ case 14:
629
+ return 42;
630
+ case 15:
631
+ return 43;
632
+ case 16:
633
+ return 44;
634
+ case 17:
635
+ return 45;
636
+ case 18:
637
+ return 35;
638
+ case 19:
639
+ return 28;
640
+ case 20:
641
+ return 29;
642
+ case 21:
643
+ return 37;
644
+ case 22:
645
+ return 31;
646
+ case 23:
647
+ return 34;
648
+ case 24:
649
+ return 26;
650
+ case 25:
651
+ return 9;
652
+ case 26:
653
+ return 9;
654
+ case 27:
655
+ return 8;
656
+ case 28:
657
+ return "CARET";
658
+ case 29:
659
+ this.begin("options");
660
+ break;
661
+ case 30:
662
+ this.popState();
663
+ break;
664
+ case 31:
665
+ return 12;
666
+ case 32:
667
+ return 36;
668
+ case 33:
669
+ this.begin("string");
670
+ break;
671
+ case 34:
672
+ this.popState();
673
+ break;
674
+ case 35:
675
+ return 33;
676
+ case 36:
677
+ return 30;
678
+ case 37:
679
+ return 46;
680
+ case 38:
681
+ return 7;
682
+ }
683
+ },
684
+ rules: [/^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:(\r?\n)+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:gitGraph\b)/i, /^(?:commit(?=\s|$))/i, /^(?:id:)/i, /^(?:type:)/i, /^(?:msg:)/i, /^(?:NORMAL\b)/i, /^(?:REVERSE\b)/i, /^(?:HIGHLIGHT\b)/i, /^(?:tag:)/i, /^(?:branch(?=\s|$))/i, /^(?:order:)/i, /^(?:merge(?=\s|$))/i, /^(?:cherry-pick(?=\s|$))/i, /^(?:parent:)/i, /^(?:checkout(?=\s|$))/i, /^(?:LR\b)/i, /^(?:TB\b)/i, /^(?::)/i, /^(?:\^)/i, /^(?:options\r?\n)/i, /^(?:[ \r\n\t]+end\b)/i, /^(?:[\s\S]+(?=[ \r\n\t]+end))/i, /^(?:["]["])/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[0-9]+(?=\s|$))/i, /^(?:\w([-\./\w]*[-\w])?)/i, /^(?:$)/i, /^(?:\s+)/i],
685
+ conditions: { acc_descr_multiline: { rules: [5, 6], inclusive: !1 }, acc_descr: { rules: [3], inclusive: !1 }, acc_title: { rules: [1], inclusive: !1 }, options: { rules: [30, 31], inclusive: !1 }, string: { rules: [34, 35], inclusive: !1 }, INITIAL: { rules: [0, 2, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 36, 37, 38, 39], inclusive: !0 } }
686
+ };
687
+ return S;
688
+ })();
689
+ z.lexer = M;
690
+ function A() {
691
+ this.yy = {};
692
+ }
693
+ return A.prototype = z, z.Parser = A, new A();
694
+ })();
695
+ mt.parser = mt;
696
+ const Vt = mt;
697
+ let at = C().gitGraph.mainBranchName, Dt = C().gitGraph.mainBranchOrder, v = {}, I = null, tt = {};
698
+ tt[at] = { name: at, order: Dt };
699
+ let L = {};
700
+ L[at] = I;
701
+ let G = at, kt = "LR", W = 0;
702
+ function ut() {
703
+ return Bt({ length: 7 });
704
+ }
705
+ function zt(r, n) {
706
+ const l = /* @__PURE__ */ Object.create(null);
707
+ return r.reduce((h, i) => {
708
+ const c = n(i);
709
+ return l[c] || (l[c] = !0, h.push(i)), h;
710
+ }, []);
711
+ }
712
+ const qt = function(r) {
713
+ kt = r;
714
+ };
715
+ let xt = {};
716
+ const jt = function(r) {
717
+ B.debug("options str", r), r = r && r.trim(), r = r || "{}";
718
+ try {
719
+ xt = JSON.parse(r);
720
+ } catch (n) {
721
+ B.error("error while parsing gitGraph options", n.message);
722
+ }
723
+ }, Yt = function() {
724
+ return xt;
725
+ }, Ft = function(r, n, l, h) {
726
+ B.debug("Entering commit:", r, n, l, h), n = D.sanitizeText(n, C()), r = D.sanitizeText(r, C()), h = D.sanitizeText(h, C());
727
+ const i = {
728
+ id: n || W + "-" + ut(),
729
+ message: r,
730
+ seq: W++,
731
+ type: l || Q.NORMAL,
732
+ tag: h || "",
733
+ parents: I == null ? [] : [I.id],
734
+ branch: G
735
+ };
736
+ I = i, v[i.id] = i, L[G] = i.id, B.debug("in pushCommit " + i.id);
737
+ }, Kt = function(r, n) {
738
+ if (r = D.sanitizeText(r, C()), L[r] === void 0)
739
+ L[r] = I != null ? I.id : null, tt[r] = { name: r, order: n ? parseInt(n, 10) : null }, yt(r), B.debug("in createBranch");
740
+ else {
741
+ let l = new Error(
742
+ 'Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ' + r + '")'
743
+ );
744
+ throw l.hash = {
745
+ text: "branch " + r,
746
+ token: "branch " + r,
747
+ line: "1",
748
+ loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
749
+ expected: ['"checkout ' + r + '"']
750
+ }, l;
751
+ }
752
+ }, Ut = function(r, n, l, h) {
753
+ r = D.sanitizeText(r, C()), n = D.sanitizeText(n, C());
754
+ const i = v[L[G]], c = v[L[r]];
755
+ if (G === r) {
756
+ let m = new Error('Incorrect usage of "merge". Cannot merge a branch to itself');
757
+ throw m.hash = {
758
+ text: "merge " + r,
759
+ token: "merge " + r,
760
+ line: "1",
761
+ loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
762
+ expected: ["branch abc"]
763
+ }, m;
764
+ } else if (i === void 0 || !i) {
765
+ let m = new Error(
766
+ 'Incorrect usage of "merge". Current branch (' + G + ")has no commits"
767
+ );
768
+ throw m.hash = {
769
+ text: "merge " + r,
770
+ token: "merge " + r,
771
+ line: "1",
772
+ loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
773
+ expected: ["commit"]
774
+ }, m;
775
+ } else if (L[r] === void 0) {
776
+ let m = new Error(
777
+ 'Incorrect usage of "merge". Branch to be merged (' + r + ") does not exist"
778
+ );
779
+ throw m.hash = {
780
+ text: "merge " + r,
781
+ token: "merge " + r,
782
+ line: "1",
783
+ loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
784
+ expected: ["branch " + r]
785
+ }, m;
786
+ } else if (c === void 0 || !c) {
787
+ let m = new Error(
788
+ 'Incorrect usage of "merge". Branch to be merged (' + r + ") has no commits"
789
+ );
790
+ throw m.hash = {
791
+ text: "merge " + r,
792
+ token: "merge " + r,
793
+ line: "1",
794
+ loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
795
+ expected: ['"commit"']
796
+ }, m;
797
+ } else if (i === c) {
798
+ let m = new Error('Incorrect usage of "merge". Both branches have same head');
799
+ throw m.hash = {
800
+ text: "merge " + r,
801
+ token: "merge " + r,
802
+ line: "1",
803
+ loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
804
+ expected: ["branch abc"]
805
+ }, m;
806
+ } else if (n && v[n] !== void 0) {
807
+ let m = new Error(
808
+ 'Incorrect usage of "merge". Commit with id:' + n + " already exists, use different custom Id"
809
+ );
810
+ throw m.hash = {
811
+ text: "merge " + r + n + l + h,
812
+ token: "merge " + r + n + l + h,
813
+ line: "1",
814
+ loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
815
+ expected: [
816
+ "merge " + r + " " + n + "_UNIQUE " + l + " " + h
817
+ ]
818
+ }, m;
819
+ }
820
+ const p = {
821
+ id: n || W + "-" + ut(),
822
+ message: "merged branch " + r + " into " + G,
823
+ seq: W++,
824
+ parents: [I == null ? null : I.id, L[r]],
825
+ branch: G,
826
+ type: Q.MERGE,
827
+ customType: l,
828
+ customId: !!n,
829
+ tag: h || ""
830
+ };
831
+ I = p, v[p.id] = p, L[G] = p.id, B.debug(L), B.debug("in mergeBranch");
832
+ }, Wt = function(r, n, l, h) {
833
+ if (B.debug("Entering cherryPick:", r, n, l), r = D.sanitizeText(r, C()), n = D.sanitizeText(n, C()), l = D.sanitizeText(l, C()), h = D.sanitizeText(h, C()), !r || v[r] === void 0) {
834
+ let p = new Error(
835
+ 'Incorrect usage of "cherryPick". Source commit id should exist and provided'
836
+ );
837
+ throw p.hash = {
838
+ text: "cherryPick " + r + " " + n,
839
+ token: "cherryPick " + r + " " + n,
840
+ line: "1",
841
+ loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
842
+ expected: ["cherry-pick abc"]
843
+ }, p;
844
+ }
845
+ let i = v[r], c = i.branch;
846
+ if (h && !(Array.isArray(i.parents) && i.parents.includes(h)))
847
+ throw new Error(
848
+ "Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit."
849
+ );
850
+ if (i.type === Q.MERGE && !h)
851
+ throw new Error(
852
+ "Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified."
853
+ );
854
+ if (!n || v[n] === void 0) {
855
+ if (c === G) {
856
+ let x = new Error(
857
+ 'Incorrect usage of "cherryPick". Source commit is already on current branch'
858
+ );
859
+ throw x.hash = {
860
+ text: "cherryPick " + r + " " + n,
861
+ token: "cherryPick " + r + " " + n,
862
+ line: "1",
863
+ loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
864
+ expected: ["cherry-pick abc"]
865
+ }, x;
866
+ }
867
+ const p = v[L[G]];
868
+ if (p === void 0 || !p) {
869
+ let x = new Error(
870
+ 'Incorrect usage of "cherry-pick". Current branch (' + G + ")has no commits"
871
+ );
872
+ throw x.hash = {
873
+ text: "cherryPick " + r + " " + n,
874
+ token: "cherryPick " + r + " " + n,
875
+ line: "1",
876
+ loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
877
+ expected: ["cherry-pick abc"]
878
+ }, x;
879
+ }
880
+ const m = {
881
+ id: W + "-" + ut(),
882
+ message: "cherry-picked " + i + " into " + G,
883
+ seq: W++,
884
+ parents: [I == null ? null : I.id, i.id],
885
+ branch: G,
886
+ type: Q.CHERRY_PICK,
887
+ tag: l ?? `cherry-pick:${i.id}${i.type === Q.MERGE ? `|parent:${h}` : ""}`
888
+ };
889
+ I = m, v[m.id] = m, L[G] = m.id, B.debug(L), B.debug("in cherryPick");
890
+ }
891
+ }, yt = function(r) {
892
+ if (r = D.sanitizeText(r, C()), L[r] === void 0) {
893
+ let n = new Error(
894
+ 'Trying to checkout branch which is not yet created. (Help try using "branch ' + r + '")'
895
+ );
896
+ throw n.hash = {
897
+ text: "checkout " + r,
898
+ token: "checkout " + r,
899
+ line: "1",
900
+ loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
901
+ expected: ['"branch ' + r + '"']
902
+ }, n;
903
+ } else {
904
+ G = r;
905
+ const n = L[G];
906
+ I = v[n];
907
+ }
908
+ };
909
+ function gt(r, n, l) {
910
+ const h = r.indexOf(n);
911
+ h === -1 ? r.push(l) : r.splice(h, 1, l);
912
+ }
913
+ function _t(r) {
914
+ const n = r.reduce((i, c) => i.seq > c.seq ? i : c, r[0]);
915
+ let l = "";
916
+ r.forEach(function(i) {
917
+ i === n ? l += " *" : l += " |";
918
+ });
919
+ const h = [l, n.id, n.seq];
920
+ for (let i in L)
921
+ L[i] === n.id && h.push(i);
922
+ if (B.debug(h.join(" ")), n.parents && n.parents.length == 2) {
923
+ const i = v[n.parents[0]];
924
+ gt(r, n, i), r.push(v[n.parents[1]]);
925
+ } else {
926
+ if (n.parents.length == 0)
927
+ return;
928
+ {
929
+ const i = v[n.parents];
930
+ gt(r, n, i);
931
+ }
932
+ }
933
+ r = zt(r, (i) => i.id), _t(r);
934
+ }
935
+ const Jt = function() {
936
+ B.debug(v);
937
+ const r = Et()[0];
938
+ _t([r]);
939
+ }, Qt = function() {
940
+ v = {}, I = null;
941
+ let r = C().gitGraph.mainBranchName, n = C().gitGraph.mainBranchOrder;
942
+ L = {}, L[r] = null, tt = {}, tt[r] = { name: r, order: n }, G = r, W = 0, Ht();
943
+ }, Xt = function() {
944
+ return Object.values(tt).map((n, l) => n.order !== null ? n : {
945
+ ...n,
946
+ order: parseFloat(`0.${l}`, 10)
947
+ }).sort((n, l) => n.order - l.order).map(({ name: n }) => ({ name: n }));
948
+ }, Zt = function() {
949
+ return L;
950
+ }, $t = function() {
951
+ return v;
952
+ }, Et = function() {
953
+ const r = Object.keys(v).map(function(n) {
954
+ return v[n];
955
+ });
956
+ return r.forEach(function(n) {
957
+ B.debug(n.id);
958
+ }), r.sort((n, l) => n.seq - l.seq), r;
959
+ }, te = function() {
960
+ return G;
961
+ }, ee = function() {
962
+ return kt;
963
+ }, re = function() {
964
+ return I;
965
+ }, Q = {
966
+ NORMAL: 0,
967
+ REVERSE: 1,
968
+ HIGHLIGHT: 2,
969
+ MERGE: 3,
970
+ CHERRY_PICK: 4
971
+ }, ie = {
972
+ getConfig: () => C().gitGraph,
973
+ setDirection: qt,
974
+ setOptions: jt,
975
+ getOptions: Yt,
976
+ commit: Ft,
977
+ branch: Kt,
978
+ merge: Ut,
979
+ cherryPick: Wt,
980
+ checkout: yt,
981
+ //reset,
982
+ prettyPrint: Jt,
983
+ clear: Qt,
984
+ getBranchesAsObjArray: Xt,
985
+ getBranches: Zt,
986
+ getCommits: $t,
987
+ getCommitsArray: Et,
988
+ getCurrentBranch: te,
989
+ getDirection: ee,
990
+ getHead: re,
991
+ setAccTitle: St,
992
+ getAccTitle: Gt,
993
+ getAccDescription: Pt,
994
+ setAccDescription: Ot,
995
+ setDiagramTitle: Ct,
996
+ getDiagramTitle: vt,
997
+ commitType: Q
998
+ };
999
+ let Z = {};
1000
+ const P = {
1001
+ NORMAL: 0,
1002
+ REVERSE: 1,
1003
+ HIGHLIGHT: 2,
1004
+ MERGE: 3,
1005
+ CHERRY_PICK: 4
1006
+ }, U = 8;
1007
+ let H = {}, Y = {}, nt = [], et = 0, w = "LR";
1008
+ const se = () => {
1009
+ H = {}, Y = {}, Z = {}, et = 0, nt = [], w = "LR";
1010
+ }, Tt = (r) => {
1011
+ const n = document.createElementNS("http://www.w3.org/2000/svg", "text");
1012
+ let l = [];
1013
+ typeof r == "string" ? l = r.split(/\\n|\n|<br\s*\/?>/gi) : Array.isArray(r) ? l = r : l = [];
1014
+ for (const h of l) {
1015
+ const i = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
1016
+ i.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), i.setAttribute("dy", "1em"), i.setAttribute("x", "0"), i.setAttribute("class", "row"), i.textContent = h.trim(), n.appendChild(i);
1017
+ }
1018
+ return n;
1019
+ }, ae = (r) => {
1020
+ let n = "", l = 0;
1021
+ return r.forEach((h) => {
1022
+ const i = w === "TB" ? Y[h].y : Y[h].x;
1023
+ i >= l && (n = h, l = i);
1024
+ }), n || void 0;
1025
+ }, dt = (r, n, l) => {
1026
+ const h = C().gitGraph, i = r.append("g").attr("class", "commit-bullets"), c = r.append("g").attr("class", "commit-labels");
1027
+ let p = 0;
1028
+ w === "TB" && (p = 30);
1029
+ const x = Object.keys(n).sort((_, b) => n[_].seq - n[b].seq), y = h.parallelCommits, a = 10, R = 40;
1030
+ x.forEach((_) => {
1031
+ const b = n[_];
1032
+ if (y)
1033
+ if (b.parents.length) {
1034
+ const E = ae(b.parents);
1035
+ p = w === "TB" ? Y[E].y + R : Y[E].x + R;
1036
+ } else
1037
+ p = 0, w === "TB" && (p = 30);
1038
+ const f = p + a, k = w === "TB" ? f : H[b.branch].pos, g = w === "TB" ? H[b.branch].pos : f;
1039
+ if (l) {
1040
+ let E, z = b.customType !== void 0 && b.customType !== "" ? b.customType : b.type;
1041
+ switch (z) {
1042
+ case P.NORMAL:
1043
+ E = "commit-normal";
1044
+ break;
1045
+ case P.REVERSE:
1046
+ E = "commit-reverse";
1047
+ break;
1048
+ case P.HIGHLIGHT:
1049
+ E = "commit-highlight";
1050
+ break;
1051
+ case P.MERGE:
1052
+ E = "commit-merge";
1053
+ break;
1054
+ case P.CHERRY_PICK:
1055
+ E = "commit-cherry-pick";
1056
+ break;
1057
+ default:
1058
+ E = "commit-normal";
1059
+ }
1060
+ if (z === P.HIGHLIGHT) {
1061
+ const M = i.append("rect");
1062
+ M.attr("x", g - 10), M.attr("y", k - 10), M.attr("height", 20), M.attr("width", 20), M.attr(
1063
+ "class",
1064
+ `commit ${b.id} commit-highlight${H[b.branch].index % U} ${E}-outer`
1065
+ ), i.append("rect").attr("x", g - 6).attr("y", k - 6).attr("height", 12).attr("width", 12).attr(
1066
+ "class",
1067
+ `commit ${b.id} commit${H[b.branch].index % U} ${E}-inner`
1068
+ );
1069
+ } else if (z === P.CHERRY_PICK)
1070
+ i.append("circle").attr("cx", g).attr("cy", k).attr("r", 10).attr("class", `commit ${b.id} ${E}`), i.append("circle").attr("cx", g - 3).attr("cy", k + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${b.id} ${E}`), i.append("circle").attr("cx", g + 3).attr("cy", k + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${b.id} ${E}`), i.append("line").attr("x1", g + 3).attr("y1", k + 1).attr("x2", g).attr("y2", k - 5).attr("stroke", "#fff").attr("class", `commit ${b.id} ${E}`), i.append("line").attr("x1", g - 3).attr("y1", k + 1).attr("x2", g).attr("y2", k - 5).attr("stroke", "#fff").attr("class", `commit ${b.id} ${E}`);
1071
+ else {
1072
+ const M = i.append("circle");
1073
+ if (M.attr("cx", g), M.attr("cy", k), M.attr("r", b.type === P.MERGE ? 9 : 10), M.attr(
1074
+ "class",
1075
+ `commit ${b.id} commit${H[b.branch].index % U}`
1076
+ ), z === P.MERGE) {
1077
+ const A = i.append("circle");
1078
+ A.attr("cx", g), A.attr("cy", k), A.attr("r", 6), A.attr(
1079
+ "class",
1080
+ `commit ${E} ${b.id} commit${H[b.branch].index % U}`
1081
+ );
1082
+ }
1083
+ z === P.REVERSE && i.append("path").attr("d", `M ${g - 5},${k - 5}L${g + 5},${k + 5}M${g - 5},${k + 5}L${g + 5},${k - 5}`).attr(
1084
+ "class",
1085
+ `commit ${E} ${b.id} commit${H[b.branch].index % U}`
1086
+ );
1087
+ }
1088
+ }
1089
+ if (w === "TB" ? Y[b.id] = { x: g, y: f } : Y[b.id] = { x: f, y: k }, l) {
1090
+ if (b.type !== P.CHERRY_PICK && (b.customId && b.type === P.MERGE || b.type !== P.MERGE) && h.showCommitLabel) {
1091
+ const M = c.append("g"), A = M.insert("rect").attr("class", "commit-label-bkg"), S = M.append("text").attr("x", p).attr("y", k + 25).attr("class", "commit-label").text(b.id);
1092
+ let o = S.node().getBBox();
1093
+ if (A.attr("x", f - o.width / 2 - 2).attr("y", k + 13.5).attr("width", o.width + 4).attr("height", o.height + 4), w === "TB" && (A.attr("x", g - (o.width + 16 + 5)).attr("y", k - 12), S.attr("x", g - (o.width + 16)).attr("y", k + o.height - 12)), w !== "TB" && S.attr("x", f - o.width / 2), h.rotateCommitLabel)
1094
+ if (w === "TB")
1095
+ S.attr("transform", "rotate(-45, " + g + ", " + k + ")"), A.attr("transform", "rotate(-45, " + g + ", " + k + ")");
1096
+ else {
1097
+ let u = -7.5 - (o.width + 10) / 25 * 9.5, d = 10 + o.width / 25 * 8.5;
1098
+ M.attr(
1099
+ "transform",
1100
+ "translate(" + u + ", " + d + ") rotate(-45, " + p + ", " + k + ")"
1101
+ );
1102
+ }
1103
+ }
1104
+ if (b.tag) {
1105
+ const M = c.insert("polygon"), A = c.append("circle"), S = c.append("text").attr("y", k - 16).attr("class", "tag-label").text(b.tag);
1106
+ let o = S.node().getBBox();
1107
+ S.attr("x", f - o.width / 2);
1108
+ const u = o.height / 2, d = k - 19.2;
1109
+ M.attr("class", "tag-label-bkg").attr(
1110
+ "points",
1111
+ `
1112
+ ${p - o.width / 2 - 4 / 2},${d + 2}
1113
+ ${p - o.width / 2 - 4 / 2},${d - 2}
1114
+ ${f - o.width / 2 - 4},${d - u - 2}
1115
+ ${f + o.width / 2 + 4},${d - u - 2}
1116
+ ${f + o.width / 2 + 4},${d + u + 2}
1117
+ ${f - o.width / 2 - 4},${d + u + 2}`
1118
+ ), A.attr("cx", p - o.width / 2 + 4 / 2).attr("cy", d).attr("r", 1.5).attr("class", "tag-hole"), w === "TB" && (M.attr("class", "tag-label-bkg").attr(
1119
+ "points",
1120
+ `
1121
+ ${g},${p + 2}
1122
+ ${g},${p - 2}
1123
+ ${g + a},${p - u - 2}
1124
+ ${g + a + o.width + 4},${p - u - 2}
1125
+ ${g + a + o.width + 4},${p + u + 2}
1126
+ ${g + a},${p + u + 2}`
1127
+ ).attr("transform", "translate(12,12) rotate(45, " + g + "," + p + ")"), A.attr("cx", g + 4 / 2).attr("cy", p).attr("transform", "translate(12,12) rotate(45, " + g + "," + p + ")"), S.attr("x", g + 5).attr("y", p + 3).attr("transform", "translate(14,14) rotate(45, " + g + "," + p + ")"));
1128
+ }
1129
+ }
1130
+ p += R + a, p > et && (et = p);
1131
+ });
1132
+ }, ne = (r, n, l, h, i) => {
1133
+ const p = (w === "TB" ? l.x < h.x : l.y < h.y) ? n.branch : r.branch, m = (y) => y.branch === p, x = (y) => y.seq > r.seq && y.seq < n.seq;
1134
+ return Object.values(i).some((y) => x(y) && m(y));
1135
+ }, $ = (r, n, l = 0) => {
1136
+ const h = r + Math.abs(r - n) / 2;
1137
+ if (l > 5)
1138
+ return h;
1139
+ if (nt.every((p) => Math.abs(p - h) >= 10))
1140
+ return nt.push(h), h;
1141
+ const c = Math.abs(r - n);
1142
+ return $(r, n - c / 5, l + 1);
1143
+ }, ce = (r, n, l, h) => {
1144
+ const i = Y[n.id], c = Y[l.id], p = ne(n, l, i, c, h);
1145
+ let m = "", x = "", y = 0, a = 0, R = H[l.branch].index;
1146
+ l.type === P.MERGE && n.id !== l.parents[0] && (R = H[n.branch].index);
1147
+ let _;
1148
+ if (p) {
1149
+ m = "A 10 10, 0, 0, 0,", x = "A 10 10, 0, 0, 1,", y = 10, a = 10;
1150
+ const b = i.y < c.y ? $(i.y, c.y) : $(c.y, i.y), f = i.x < c.x ? $(i.x, c.x) : $(c.x, i.x);
1151
+ w === "TB" ? i.x < c.x ? _ = `M ${i.x} ${i.y} L ${f - y} ${i.y} ${x} ${f} ${i.y + a} L ${f} ${c.y - y} ${m} ${f + a} ${c.y} L ${c.x} ${c.y}` : (R = H[n.branch].index, _ = `M ${i.x} ${i.y} L ${f + y} ${i.y} ${m} ${f} ${i.y + a} L ${f} ${c.y - y} ${x} ${f - a} ${c.y} L ${c.x} ${c.y}`) : i.y < c.y ? _ = `M ${i.x} ${i.y} L ${i.x} ${b - y} ${m} ${i.x + a} ${b} L ${c.x - y} ${b} ${x} ${c.x} ${b + a} L ${c.x} ${c.y}` : (R = H[n.branch].index, _ = `M ${i.x} ${i.y} L ${i.x} ${b + y} ${x} ${i.x + a} ${b} L ${c.x - y} ${b} ${m} ${c.x} ${b - a} L ${c.x} ${c.y}`);
1152
+ } else
1153
+ m = "A 20 20, 0, 0, 0,", x = "A 20 20, 0, 0, 1,", y = 20, a = 20, w === "TB" ? (i.x < c.x && (l.type === P.MERGE && n.id !== l.parents[0] ? _ = `M ${i.x} ${i.y} L ${i.x} ${c.y - y} ${m} ${i.x + a} ${c.y} L ${c.x} ${c.y}` : _ = `M ${i.x} ${i.y} L ${c.x - y} ${i.y} ${x} ${c.x} ${i.y + a} L ${c.x} ${c.y}`), i.x > c.x && (m = "A 20 20, 0, 0, 0,", x = "A 20 20, 0, 0, 1,", y = 20, a = 20, l.type === P.MERGE && n.id !== l.parents[0] ? _ = `M ${i.x} ${i.y} L ${i.x} ${c.y - y} ${x} ${i.x - a} ${c.y} L ${c.x} ${c.y}` : _ = `M ${i.x} ${i.y} L ${c.x + y} ${i.y} ${m} ${c.x} ${i.y + a} L ${c.x} ${c.y}`), i.x === c.x && (_ = `M ${i.x} ${i.y} L ${c.x} ${c.y}`)) : (i.y < c.y && (l.type === P.MERGE && n.id !== l.parents[0] ? _ = `M ${i.x} ${i.y} L ${c.x - y} ${i.y} ${x} ${c.x} ${i.y + a} L ${c.x} ${c.y}` : _ = `M ${i.x} ${i.y} L ${i.x} ${c.y - y} ${m} ${i.x + a} ${c.y} L ${c.x} ${c.y}`), i.y > c.y && (l.type === P.MERGE && n.id !== l.parents[0] ? _ = `M ${i.x} ${i.y} L ${c.x - y} ${i.y} ${m} ${c.x} ${i.y - a} L ${c.x} ${c.y}` : _ = `M ${i.x} ${i.y} L ${i.x} ${c.y + y} ${x} ${i.x + a} ${c.y} L ${c.x} ${c.y}`), i.y === c.y && (_ = `M ${i.x} ${i.y} L ${c.x} ${c.y}`));
1154
+ r.append("path").attr("d", _).attr("class", "arrow arrow" + R % U);
1155
+ }, oe = (r, n) => {
1156
+ const l = r.append("g").attr("class", "commit-arrows");
1157
+ Object.keys(n).forEach((h) => {
1158
+ const i = n[h];
1159
+ i.parents && i.parents.length > 0 && i.parents.forEach((c) => {
1160
+ ce(l, n[c], i, n);
1161
+ });
1162
+ });
1163
+ }, le = (r, n) => {
1164
+ const l = C().gitGraph, h = r.append("g");
1165
+ n.forEach((i, c) => {
1166
+ const p = c % U, m = H[i.name].pos, x = h.append("line");
1167
+ x.attr("x1", 0), x.attr("y1", m), x.attr("x2", et), x.attr("y2", m), x.attr("class", "branch branch" + p), w === "TB" && (x.attr("y1", 30), x.attr("x1", m), x.attr("y2", et), x.attr("x2", m)), nt.push(m);
1168
+ let y = i.name;
1169
+ const a = Tt(y), R = h.insert("rect"), b = h.insert("g").attr("class", "branchLabel").insert("g").attr("class", "label branch-label" + p);
1170
+ b.node().appendChild(a);
1171
+ let f = a.getBBox();
1172
+ R.attr("class", "branchLabelBkg label" + p).attr("rx", 4).attr("ry", 4).attr("x", -f.width - 4 - (l.rotateCommitLabel === !0 ? 30 : 0)).attr("y", -f.height / 2 + 8).attr("width", f.width + 18).attr("height", f.height + 4), b.attr(
1173
+ "transform",
1174
+ "translate(" + (-f.width - 14 - (l.rotateCommitLabel === !0 ? 30 : 0)) + ", " + (m - f.height / 2 - 1) + ")"
1175
+ ), w === "TB" && (R.attr("x", m - f.width / 2 - 10).attr("y", 0), b.attr("transform", "translate(" + (m - f.width / 2 - 5) + ", 0)")), w !== "TB" && R.attr("transform", "translate(-19, " + (m - f.height / 2) + ")");
1176
+ });
1177
+ }, he = function(r, n, l, h) {
1178
+ se();
1179
+ const i = C(), c = i.gitGraph;
1180
+ B.debug("in gitgraph renderer", r + `
1181
+ `, "id:", n, l), Z = h.db.getCommits();
1182
+ const p = h.db.getBranchesAsObjArray();
1183
+ w = h.db.getDirection();
1184
+ const m = At(`[id="${n}"]`);
1185
+ let x = 0;
1186
+ p.forEach((y, a) => {
1187
+ const R = Tt(y.name), _ = m.append("g"), b = _.insert("g").attr("class", "branchLabel"), f = b.insert("g").attr("class", "label branch-label");
1188
+ f.node().appendChild(R);
1189
+ let k = R.getBBox();
1190
+ H[y.name] = { pos: x, index: a }, x += 50 + (c.rotateCommitLabel ? 40 : 0) + (w === "TB" ? k.width / 2 : 0), f.remove(), b.remove(), _.remove();
1191
+ }), dt(m, Z, !1), c.showBranches && le(m, p), oe(m, Z), dt(m, Z, !0), It.insertTitle(
1192
+ m,
1193
+ "gitTitleText",
1194
+ c.titleTopMargin,
1195
+ h.db.getDiagramTitle()
1196
+ ), Nt(
1197
+ void 0,
1198
+ m,
1199
+ c.diagramPadding,
1200
+ c.useMaxWidth ?? i.useMaxWidth
1201
+ );
1202
+ }, me = {
1203
+ draw: he
1204
+ }, ue = (r) => `
1205
+ .commit-id,
1206
+ .commit-msg,
1207
+ .branch-label {
1208
+ fill: lightgrey;
1209
+ color: lightgrey;
1210
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
1211
+ font-family: var(--mermaid-font-family);
1212
+ }
1213
+ ${[0, 1, 2, 3, 4, 5, 6, 7].map(
1214
+ (n) => `
1215
+ .branch-label${n} { fill: ${r["gitBranchLabel" + n]}; }
1216
+ .commit${n} { stroke: ${r["git" + n]}; fill: ${r["git" + n]}; }
1217
+ .commit-highlight${n} { stroke: ${r["gitInv" + n]}; fill: ${r["gitInv" + n]}; }
1218
+ .label${n} { fill: ${r["git" + n]}; }
1219
+ .arrow${n} { stroke: ${r["git" + n]}; }
1220
+ `
1221
+ ).join(`
1222
+ `)}
1223
+
1224
+ .branch {
1225
+ stroke-width: 1;
1226
+ stroke: ${r.lineColor};
1227
+ stroke-dasharray: 2;
1228
+ }
1229
+ .commit-label { font-size: ${r.commitLabelFontSize}; fill: ${r.commitLabelColor};}
1230
+ .commit-label-bkg { font-size: ${r.commitLabelFontSize}; fill: ${r.commitLabelBackground}; opacity: 0.5; }
1231
+ .tag-label { font-size: ${r.tagLabelFontSize}; fill: ${r.tagLabelColor};}
1232
+ .tag-label-bkg { fill: ${r.tagLabelBackground}; stroke: ${r.tagLabelBorder}; }
1233
+ .tag-hole { fill: ${r.textColor}; }
1234
+
1235
+ .commit-merge {
1236
+ stroke: ${r.primaryColor};
1237
+ fill: ${r.primaryColor};
1238
+ }
1239
+ .commit-reverse {
1240
+ stroke: ${r.primaryColor};
1241
+ fill: ${r.primaryColor};
1242
+ stroke-width: 3;
1243
+ }
1244
+ .commit-highlight-outer {
1245
+ }
1246
+ .commit-highlight-inner {
1247
+ stroke: ${r.primaryColor};
1248
+ fill: ${r.primaryColor};
1249
+ }
1250
+
1251
+ .arrow { stroke-width: 8; stroke-linecap: round; fill: none}
1252
+ .gitTitleText {
1253
+ text-anchor: middle;
1254
+ font-size: 18px;
1255
+ fill: ${r.textColor};
1256
+ }
1257
+ `, fe = ue, ge = {
1258
+ parser: Vt,
1259
+ db: ie,
1260
+ renderer: me,
1261
+ styles: fe
1262
+ };
1263
+ export {
1264
+ ge as diagram
1265
+ };