@bkm016/basalt 0.0.0-stage → 0.1.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 (252) hide show
  1. package/README.md +275 -2
  2. package/chunk-0hbjv3y6.js +11 -0
  3. package/chunk-0rya8cxe.js +3 -0
  4. package/chunk-0szjy61m.js +2 -0
  5. package/chunk-0tdv0t5q.js +3 -0
  6. package/chunk-1egbcp85.js +59 -0
  7. package/chunk-1fv27j4b.js +3 -0
  8. package/chunk-1yzt0qm0.js +2 -0
  9. package/chunk-2zqny2sy.js +2 -0
  10. package/chunk-32at88hc.js +3 -0
  11. package/chunk-356q8e0y.js +10 -0
  12. package/chunk-3jz9g8ab.js +10 -0
  13. package/chunk-3p7q2pyp.js +3 -0
  14. package/chunk-501zkf9b.js +3 -0
  15. package/chunk-58vz2qsq.js +2 -0
  16. package/chunk-5fdgy0q2.js +16 -0
  17. package/chunk-5wp4egky.js +7 -0
  18. package/chunk-665jzf2w.js +25 -0
  19. package/chunk-6gyhajhx.js +3 -0
  20. package/chunk-7yw8aa5j.js +31 -0
  21. package/chunk-8wjgbd9k.js +3 -0
  22. package/chunk-913tfr9c.js +2 -0
  23. package/chunk-97kjn55j.js +2 -0
  24. package/chunk-9y69ywyg.js +3 -0
  25. package/chunk-a6r4z44b.js +2 -0
  26. package/chunk-agntrqs9.js +2 -0
  27. package/chunk-b9bg5fhd.js +2 -0
  28. package/chunk-bj14jshr.js +3 -0
  29. package/chunk-c25s4w6a.js +5 -0
  30. package/chunk-d48bfd2e.js +3 -0
  31. package/chunk-d913kpyw.js +3 -0
  32. package/chunk-dakrpbe6.js +3 -0
  33. package/chunk-g2k3yhgh.js +12 -0
  34. package/chunk-hat3s3pr.js +3 -0
  35. package/chunk-hcn9cf6v.js +2 -0
  36. package/chunk-j2x0g1vg.js +2 -0
  37. package/chunk-k0t23cmx.js +2 -0
  38. package/chunk-k7w7ac9q.js +18 -0
  39. package/chunk-kgdrjqsy.js +3 -0
  40. package/chunk-kjr81mrd.js +9 -0
  41. package/chunk-m38ber71.js +2 -0
  42. package/chunk-n6e43rvk.js +3 -0
  43. package/chunk-qbf8x2ft.js +5 -0
  44. package/chunk-qcwnkr5y.js +2 -0
  45. package/chunk-qffb7een.js +3 -0
  46. package/chunk-qnr1f5pj.js +3 -0
  47. package/chunk-r9aatvwm.js +3 -0
  48. package/chunk-rad3dm0q.js +2 -0
  49. package/chunk-rjdhaasf.js +3 -0
  50. package/chunk-rm3kcxq9.js +20 -0
  51. package/chunk-rv06x0kn.js +7 -0
  52. package/chunk-sf13azm4.js +12 -0
  53. package/chunk-sytpmbfp.js +471 -0
  54. package/chunk-t057xfrt.js +5 -0
  55. package/chunk-tjpvayr1.js +2 -0
  56. package/chunk-tnrqkc7b.js +8 -0
  57. package/chunk-v9fea96h.js +3 -0
  58. package/chunk-ve7qx8wm.js +3 -0
  59. package/chunk-vkkj4awb.js +2 -0
  60. package/chunk-wc5j0hfw.js +39 -0
  61. package/chunk-wd9zxhza.js +2 -0
  62. package/chunk-wx7kdf0b.js +2 -0
  63. package/chunk-x9982ek7.js +25 -0
  64. package/chunk-xhk54h2q.js +7 -0
  65. package/chunk-xsbxykr4.js +2 -0
  66. package/chunk-y69ewdn2.js +3 -0
  67. package/chunk-y8ced1jm.js +5 -0
  68. package/chunk-y9xe9ct2.js +2 -0
  69. package/chunk-yb1jxgnk.js +2 -0
  70. package/chunk-zt1wvkyf.js +3 -0
  71. package/compiled.js +3773 -0
  72. package/icon-dp9pmcvp.png +0 -0
  73. package/package.json +20 -4
  74. package/ui-test-worker.js +226 -0
  75. package/web/KaTeX_AMS-Regular-n7eqehx2.woff2 +0 -0
  76. package/web/KaTeX_Caligraphic-Bold-20r3b6fv.woff2 +0 -0
  77. package/web/KaTeX_Caligraphic-Regular-kkjm8f18.woff2 +0 -0
  78. package/web/KaTeX_Fraktur-Bold-pz5vg4t0.woff2 +0 -0
  79. package/web/KaTeX_Fraktur-Regular-a1e9wkwk.woff2 +0 -0
  80. package/web/KaTeX_Main-Bold-mcp098h8.woff2 +0 -0
  81. package/web/KaTeX_Main-BoldItalic-fy74z249.woff2 +0 -0
  82. package/web/KaTeX_Main-Italic-hw2gxy7f.woff2 +0 -0
  83. package/web/KaTeX_Main-Regular-xvp1b75c.woff2 +0 -0
  84. package/web/KaTeX_Math-BoldItalic-mf5nf33d.woff2 +0 -0
  85. package/web/KaTeX_Math-Italic-ap60jrna.woff2 +0 -0
  86. package/web/KaTeX_SansSerif-Bold-we3bymb6.woff2 +0 -0
  87. package/web/KaTeX_SansSerif-Italic-ent92bjx.woff2 +0 -0
  88. package/web/KaTeX_SansSerif-Regular-0573pbz9.woff2 +0 -0
  89. package/web/KaTeX_Script-Regular-z2rtj6vq.woff2 +0 -0
  90. package/web/KaTeX_Size1-Regular-dfr3w1hv.woff2 +0 -0
  91. package/web/KaTeX_Size2-Regular-kted78zb.woff2 +0 -0
  92. package/web/KaTeX_Size3-Regular-e6k1k5jk.woff2 +0 -0
  93. package/web/KaTeX_Size4-Regular-abedc1pd.woff2 +0 -0
  94. package/web/KaTeX_Typewriter-Regular-scw9zx1z.woff2 +0 -0
  95. package/web/apple-touch-icon-7dkm33qp.png +0 -0
  96. package/web/apple-touch-icon.png +0 -0
  97. package/web/chunk-00mq7bhx.js +1 -0
  98. package/web/chunk-0atfn8jf.js +1 -0
  99. package/web/chunk-0k0hvh59.js +40 -0
  100. package/web/chunk-0mrkjnte.js +1 -0
  101. package/web/chunk-0pbjgdgp.js +2 -0
  102. package/web/chunk-0s80zw00.js +1 -0
  103. package/web/chunk-0xck277j.js +140 -0
  104. package/web/chunk-1t760bg0.js +1 -0
  105. package/web/chunk-1v3d60pp.js +217 -0
  106. package/web/chunk-1x8fn8w9.js +1 -0
  107. package/web/chunk-20q90epj.js +2 -0
  108. package/web/chunk-24mfx6w1.js +2 -0
  109. package/web/chunk-29e1trsq.js +78 -0
  110. package/web/chunk-2j4m0bh1.js +2 -0
  111. package/web/chunk-310yey4q.js +1 -0
  112. package/web/chunk-32ezm0ry.js +1136 -0
  113. package/web/chunk-3ahpr030.js +2 -0
  114. package/web/chunk-3bqh2dkw.js +7 -0
  115. package/web/chunk-3cfabjey.js +370 -0
  116. package/web/chunk-3hvgs5aw.js +1 -0
  117. package/web/chunk-3kh6zefg.js +1 -0
  118. package/web/chunk-3pf33xsm.js +98 -0
  119. package/web/chunk-3pm4645m.js +2 -0
  120. package/web/chunk-401v5ht6.js +8 -0
  121. package/web/chunk-4b5mt5pd.js +70 -0
  122. package/web/chunk-4gavbw65.js +1 -0
  123. package/web/chunk-4rm1vy7w.js +1 -0
  124. package/web/chunk-4wd9r73y.js +1 -0
  125. package/web/chunk-4y2td14d.js +24 -0
  126. package/web/chunk-54thej0t.js +2 -0
  127. package/web/chunk-55kw67nv.js +1 -0
  128. package/web/chunk-59kqahb3.js +1 -0
  129. package/web/chunk-5hex8g0y.js +24 -0
  130. package/web/chunk-5r5kv4gh.js +1 -0
  131. package/web/chunk-6atq9qtt.js +7 -0
  132. package/web/chunk-6beqrmtq.js +1 -0
  133. package/web/chunk-6m69hczt.js +2 -0
  134. package/web/chunk-6r912gfj.js +34 -0
  135. package/web/chunk-74j07k8k.js +2 -0
  136. package/web/chunk-7f0m2yrd.js +169 -0
  137. package/web/chunk-8g239029.js +1 -0
  138. package/web/chunk-942prjb6.js +332 -0
  139. package/web/chunk-95q1bwxn.js +1 -0
  140. package/web/chunk-9s7c178f.js +1 -0
  141. package/web/chunk-9v1f6yc8.js +1 -0
  142. package/web/chunk-a3xt6840.js +38 -0
  143. package/web/chunk-ad6x47yy.js +1 -0
  144. package/web/chunk-b5brnfv9.js +2 -0
  145. package/web/chunk-benmmqt2.js +1 -0
  146. package/web/chunk-bgqdcnke.js +1 -0
  147. package/web/chunk-bhe4jzha.js +1 -0
  148. package/web/chunk-bwyw10wx.js +39 -0
  149. package/web/chunk-c85wxnpw.js +292 -0
  150. package/web/chunk-canbct9d.js +55 -0
  151. package/web/chunk-cg3jterp.js +2 -0
  152. package/web/chunk-d18r4m14.js +141 -0
  153. package/web/chunk-d4d3mnak.js +84 -0
  154. package/web/chunk-dmqtdeb4.js +1 -0
  155. package/web/chunk-dy2gm1fs.js +1 -0
  156. package/web/chunk-e5rmr47n.js +2 -0
  157. package/web/chunk-ea9swkkt.js +1 -0
  158. package/web/chunk-ejd43q75.js +19 -0
  159. package/web/chunk-eqegxtdt.js +1 -0
  160. package/web/chunk-ev1g5cqw.js +2 -0
  161. package/web/chunk-ezyvv4ab.js +3 -0
  162. package/web/chunk-f91wzwtk.js +1 -0
  163. package/web/chunk-fdkp6tzq.js +36 -0
  164. package/web/chunk-g1ev11wx.js +1 -0
  165. package/web/chunk-g9qv15hq.js +41 -0
  166. package/web/chunk-ghxe4gam.js +2 -0
  167. package/web/chunk-gmfp7fg4.js +1 -0
  168. package/web/chunk-gxay64d5.js +1 -0
  169. package/web/chunk-gxn0bey7.js +142 -0
  170. package/web/chunk-haphmhz8.js +200 -0
  171. package/web/chunk-hejz98gw.js +1 -0
  172. package/web/chunk-hfaffkrh.js +1 -0
  173. package/web/chunk-hp167dbv.js +1 -0
  174. package/web/chunk-hryhthxr.js +16 -0
  175. package/web/chunk-j2vt8c8v.js +1 -0
  176. package/web/chunk-jg6nzn6q.js +1 -0
  177. package/web/chunk-jtwhjp20.js +303 -0
  178. package/web/chunk-jvhmna7z.js +89 -0
  179. package/web/chunk-ka3q31t1.js +1 -0
  180. package/web/chunk-kbtbbarw.js +2 -0
  181. package/web/chunk-ktqt87qw.js +1 -0
  182. package/web/chunk-kx2xk3bb.js +1 -0
  183. package/web/chunk-m2d1sp30.js +1 -0
  184. package/web/chunk-mdsgekpk.js +1 -0
  185. package/web/chunk-mq92vqb1.js +2 -0
  186. package/web/chunk-n1dmrz44.js +2 -0
  187. package/web/chunk-n5fn9khr.js +1 -0
  188. package/web/chunk-n90cqdvg.js +2 -0
  189. package/web/chunk-nerx2q12.js +139 -0
  190. package/web/chunk-ngpq43vn.js +1 -0
  191. package/web/chunk-nj0cv1cq.js +257 -0
  192. package/web/chunk-nzey7cpv.js +1 -0
  193. package/web/chunk-p8y0hjx9.js +2 -0
  194. package/web/chunk-pxe3vna4.js +1 -0
  195. package/web/chunk-pz934t6t.js +30 -0
  196. package/web/chunk-r1dnh0s8.js +1 -0
  197. package/web/chunk-r5eakmw6.js +1 -0
  198. package/web/chunk-rkesqprv.js +1 -0
  199. package/web/chunk-rsn8j7xv.js +120 -0
  200. package/web/chunk-rtf2zzzv.js +1 -0
  201. package/web/chunk-ry9256r7.js +1 -0
  202. package/web/chunk-rykfak98.js +2 -0
  203. package/web/chunk-rz6wwdd5.js +106 -0
  204. package/web/chunk-s8vapqgr.js +12 -0
  205. package/web/chunk-sc63gh9d.js +2 -0
  206. package/web/chunk-srrfphes.js +1 -0
  207. package/web/chunk-svdzmaxb.js +2 -0
  208. package/web/chunk-svmhj9hd.js +1 -0
  209. package/web/chunk-t6agpn2z.js +1 -0
  210. package/web/chunk-tfyxp2qs.js +89 -0
  211. package/web/chunk-ts7zrf5b.js +2 -0
  212. package/web/chunk-ttg6tbwx.js +2 -0
  213. package/web/chunk-v47rhg7b.js +1 -0
  214. package/web/chunk-v5cnt7c8.js +1 -0
  215. package/web/chunk-v6v831tc.js +214 -0
  216. package/web/chunk-vadqkz3x.js +99 -0
  217. package/web/chunk-vfqdy860.js +1 -0
  218. package/web/chunk-vfqe8298.js +1 -0
  219. package/web/chunk-vqjs551t.js +7 -0
  220. package/web/chunk-wtawdeej.css +1 -0
  221. package/web/chunk-x3zwjkwg.js +62 -0
  222. package/web/chunk-x59p8sg2.js +1 -0
  223. package/web/chunk-x9q4kh67.js +4 -0
  224. package/web/chunk-xet1jjy9.js +1 -0
  225. package/web/chunk-xzp7jf7e.js +2 -0
  226. package/web/chunk-y7z144e3.js +1 -0
  227. package/web/chunk-ydgqrfvw.js +2 -0
  228. package/web/chunk-ydtrc1ay.js +2 -0
  229. package/web/chunk-yj1a2d37.js +1 -0
  230. package/web/chunk-ykxpb3wv.js +2 -0
  231. package/web/chunk-ytpwz01r.js +291 -0
  232. package/web/chunk-z09emmrb.js +1 -0
  233. package/web/chunk-z1jtv4c0.js +2 -0
  234. package/web/chunk-zakv2xdf.js +1 -0
  235. package/web/chunk-zbj1trar.js +2 -0
  236. package/web/chunk-zk2f7x5e.js +4 -0
  237. package/web/icon-192.png +0 -0
  238. package/web/icon-512.png +0 -0
  239. package/web/icon-maskable-512.png +0 -0
  240. package/web/icon-yx2p2pye.svg +13 -0
  241. package/web/icon.svg +13 -0
  242. package/web/index.html +23 -0
  243. package/web/install.ps1 +91 -0
  244. package/web/install.sh +177 -0
  245. package/web/inter-latin-wght-normal-an0py913.woff2 +0 -0
  246. package/web/jetbrains-mono-latin-wght-normal-hj2e42wt.woff2 +0 -0
  247. package/web/manifest-txf6vfbq.webmanifest +35 -0
  248. package/web/manifest.webmanifest +35 -0
  249. package/web/source-serif-4-latin-wght-italic-ta5tqqvz.woff2 +0 -0
  250. package/web/source-serif-4-latin-wght-normal-1yyvbhsz.woff2 +0 -0
  251. package/web/sw.js +90 -0
  252. package/worker.js +2 -0
@@ -0,0 +1,139 @@
1
+ import{e,B,C,S,E,T,A,I,L,s,p}from"./chunk-jtwhjp20.js";import{nn,Br,Xi,Ke}from"./chunk-ghxe4gam.js";import{bt}from"./chunk-3ahpr030.js";import{je}from"./chunk-hryhthxr.js";var nt=function(){var t=e(function(u,n,a,o){for(a=a||{},o=u.length;o--;a[u[o]]=n);return a},"o"),r=[6,8,10,11,12,14,16,17,18],l=[1,9],g=[1,10],i=[1,11],y=[1,12],m=[1,13],c=[1,14],x={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:e(function(n,a,o,d,f,h,w){var _=h.length-1;switch(f){case 1:return h[_-1];case 2:this.$=[];break;case 3:h[_-1].push(h[_]),this.$=h[_-1];break;case 4:case 5:this.$=h[_];break;case 6:case 7:this.$=[];break;case 8:d.setDiagramTitle(h[_].substr(6)),this.$=h[_].substr(6);break;case 9:this.$=h[_].trim(),d.setAccTitle(this.$);break;case 10:case 11:this.$=h[_].trim(),d.setAccDescription(this.$);break;case 12:d.addSection(h[_].substr(8)),this.$=h[_].substr(8);break;case 13:d.addTask(h[_-1],h[_]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:l,12:g,14:i,16:y,17:m,18:c},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:15,11:l,12:g,14:i,16:y,17:m,18:c},t(r,[2,5]),t(r,[2,6]),t(r,[2,8]),{13:[1,16]},{15:[1,17]},t(r,[2,11]),t(r,[2,12]),{19:[1,18]},t(r,[2,4]),t(r,[2,9]),t(r,[2,10]),t(r,[2,13])],defaultActions:{},parseError:e(function(n,a){if(a.recoverable)this.trace(n);else{var o=Error(n);throw o.hash=a,o}},"parseError"),parse:e(function(n){var a=this,o=[0],d=[],f=[null],h=[],w=this.table,_="",z=0,ot=0,ct=0,vt=2,ht=1,wt=h.slice.call(arguments,1),v=Object.create(this.lexer),O={yy:{}};for(var Q in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Q))O.yy[Q]=this.yy[Q];if(v.setInput(n,O.yy),O.yy.lexer=v,O.yy.parser=this,typeof v.yylloc>"u")v.yylloc={};var D=v.yylloc;h.push(D);var Tt=v.options&&v.options.ranges;if(typeof O.yy.parseError==="function")this.parseError=O.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function St(F){o.length=o.length-2*F,f.length=f.length-F,h.length=h.length-F}e(St,"popStack");function ut(){var F=d.pop()||v.lex()||ht;if(typeof F!=="number"){if(F instanceof Array)d=F,F=d.pop();F=a.symbols_[F]||F}return F}e(ut,"lex");var M,tt,Y,P,Gt,et,q={},Z,j,yt,J;while(!0){if(Y=o[o.length-1],this.defaultActions[Y])P=this.defaultActions[Y];else{if(M===null||typeof M>"u")M=ut();P=w[Y]&&w[Y][M]}if(typeof P>"u"||!P.length||!P[0]){var rt="";J=[];for(Z in w[Y])if(this.terminals_[Z]&&Z>vt)J.push("'"+this.terminals_[Z]+"'");if(v.showPosition)rt="Parse error on line "+(z+1)+`:
2
+ `+v.showPosition()+`
3
+ Expecting `+J.join(", ")+", got '"+(this.terminals_[M]||M)+"'";else rt="Parse error on line "+(z+1)+": Unexpected "+(M==ht?"end of input":"'"+(this.terminals_[M]||M)+"'");this.parseError(rt,{text:v.match,token:this.terminals_[M]||M,line:v.yylineno,loc:D,expected:J})}if(P[0]instanceof Array&&P.length>1)throw Error("Parse Error: multiple actions possible at state: "+Y+", token: "+M);switch(P[0]){case 1:if(o.push(M),f.push(v.yytext),h.push(v.yylloc),o.push(P[1]),M=null,!tt){if(ot=v.yyleng,_=v.yytext,z=v.yylineno,D=v.yylloc,ct>0)ct--}else M=tt,tt=null;break;case 2:if(j=this.productions_[P[1]][1],q.$=f[f.length-j],q._$={first_line:h[h.length-(j||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(j||1)].first_column,last_column:h[h.length-1].last_column},Tt)q._$.range=[h[h.length-(j||1)].range[0],h[h.length-1].range[1]];if(et=this.performAction.apply(q,[_,ot,z,O.yy,P[1],f,h].concat(wt)),typeof et<"u")return et;if(j)o=o.slice(0,-1*j*2),f=f.slice(0,-1*j),h=h.slice(0,-1*j);o.push(this.productions_[P[1]][0]),f.push(q.$),h.push(q._$),yt=w[o[o.length-2]][o[o.length-1]],o.push(yt);break;case 3:return!0}}return!0},"parse")},k=function(){var u={EOF:1,parseError:e(function(a,o){if(this.yy.parser)this.yy.parser.parseError(a,o);else throw Error(a)},"parseError"),setInput:e(function(n,a){if(this.yy=a||this.yy||{},this._input=n,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:e(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var a=n.match(/(?:\r\n?|\n).*/g);if(a)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),n},"input"),unput:e(function(n){var a=n.length,o=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var d=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),o.length-1)this.yylineno-=o.length-1;var f=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:o?(o.length===d.length?this.yylloc.first_column:0)+d[d.length-o.length].length-o[0].length:this.yylloc.first_column-a},this.options.ranges)this.yylloc.range=[f[0],f[0]+this.yyleng-a];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(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
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(n){this.unput(this.match.slice(n))},"less"),pastInput:e(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var n=this.match;if(n.length<20)n+=this._input.substr(0,20-n.length);return(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var n=this.pastInput(),a=Array(n.length+1).join("-");return n+this.upcomingInput()+`
5
+ `+a+"^"},"showPosition"),test_match:e(function(n,a){var o,d,f;if(this.options.backtrack_lexer){if(f={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)f.yylloc.range=this.yylloc.range.slice(0)}if(d=n[0].match(/(?:\r\n?|\n).*/g),d)this.yylineno+=d.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+n[0].length},this.yytext+=n[0],this.match+=n[0],this.matches=n,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(n[0].length),this.matched+=n[0],o=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(o)return o;else if(this._backtrack){for(var h in f)this[h]=f[h];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var n,a,o,d;if(!this._more)this.yytext="",this.match="";var f=this._currentRules();for(var h=0;h<f.length;h++)if(o=this._input.match(this.rules[f[h]]),o&&(!a||o[0].length>a[0].length)){if(a=o,d=h,this.options.backtrack_lexer)if(n=this.test_match(o,f[h]),n!==!1)return n;else if(this._backtrack){a=!1;continue}else return!1;else if(!this.options.flex)break}if(a){if(n=this.test_match(a,f[d]),n!==!1)return n;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:e(function(){var a=this.next();if(a)return a;else return this.lex()},"lex"),begin:e(function(a){this.conditionStack.push(a)},"begin"),popState:e(function(){var a=this.conditionStack.length-1;if(a>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(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:e(function(a){if(a=this.conditionStack.length-1-Math.abs(a||0),a>=0)return this.conditionStack[a];else return"INITIAL"},"topState"),pushState:e(function(a){this.begin(a)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(a,o,d,f){var h=f;switch(d){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.begin("acc_descr"),14;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return u}();x.lexer=k;function b(){this.yy={}}return e(b,"Parser"),b.prototype=x,x.Parser=b,new b}();nt.parser=nt;var $t=nt,X="",at=[],G=[],H=[],Mt=e(function(){at.length=0,G.length=0,X="",H.length=0,C()},"clear"),Et=e(function(t){X=t,at.push(t)},"addSection"),Ct=e(function(){return at},"getSections"),Pt=e(function(){let t=dt(),r=100,l=0;while(!t&&l<r)t=dt(),l++;return G.push(...H),G},"getTasks"),It=e(function(){let t=[];return G.forEach((l)=>{if(l.people)t.push(...l.people)}),[...new Set(t)].sort()},"updateActors"),At=e(function(t,r){let l=r.substr(1).split(":"),g=0,i=[];if(l.length===1)g=Number(l[0]),i=[];else g=Number(l[0]),i=l[1].split(",");let y=i.map((c)=>c.trim()),m={section:X,type:X,people:y,task:t,score:g};H.push(m)},"addTask"),Ft=e(function(t){let r={section:X,type:X,description:t,task:t,classes:[]};G.push(r)},"addTaskOrg"),dt=e(function(){let t=e(function(l){return H[l].processed},"compileTask"),r=!0;for(let[l,g]of H.entries())t(l),r=r&&g.processed;return r},"compileTasks"),Vt=e(function(){return It()},"getActors"),ft={getConfig:e(()=>s().journey,"getConfig"),clear:Mt,setDiagramTitle:I,getDiagramTitle:L,setAccTitle:S,getAccTitle:E,setAccDescription:T,getAccDescription:A,addSection:Et,getSections:Ct,getTasks:Pt,addTask:At,addTaskOrg:Ft,getActors:Vt},Rt=e((t)=>`.label {
7
+ font-family: ${t.fontFamily};
8
+ color: ${t.textColor};
9
+ }
10
+ .mouth {
11
+ stroke: #666;
12
+ }
13
+
14
+ line {
15
+ stroke: ${t.textColor}
16
+ }
17
+
18
+ .legend {
19
+ fill: ${t.textColor};
20
+ font-family: ${t.fontFamily};
21
+ }
22
+
23
+ .label text {
24
+ fill: #333;
25
+ }
26
+ .label {
27
+ color: ${t.textColor}
28
+ }
29
+
30
+ .face {
31
+ ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};
32
+ stroke: #999;
33
+ }
34
+
35
+ .node rect,
36
+ .node circle,
37
+ .node ellipse,
38
+ .node polygon,
39
+ .node path {
40
+ fill: ${t.mainBkg};
41
+ stroke: ${t.nodeBorder};
42
+ stroke-width: 1px;
43
+ }
44
+
45
+ .node .label {
46
+ text-align: center;
47
+ }
48
+ .node.clickable {
49
+ cursor: pointer;
50
+ }
51
+
52
+ .arrowheadPath {
53
+ fill: ${t.arrowheadColor};
54
+ }
55
+
56
+ .edgePaths .path {
57
+ stroke: ${t.lineColor};
58
+ stroke-width: 1.5px;
59
+ }
60
+
61
+ .flowchart-link {
62
+ stroke: ${t.lineColor};
63
+ fill: none;
64
+ }
65
+
66
+ .edgeLabel {
67
+ background-color: ${t.edgeLabelBackground};
68
+ rect {
69
+ opacity: 0.5;
70
+ }
71
+ text-align: center;
72
+ }
73
+
74
+ .cluster rect {
75
+ }
76
+
77
+ .cluster text {
78
+ fill: ${t.titleColor};
79
+ }
80
+
81
+ div.mermaidTooltip {
82
+ position: absolute;
83
+ text-align: center;
84
+ max-width: 200px;
85
+ padding: 2px;
86
+ font-family: ${t.fontFamily};
87
+ font-size: 12px;
88
+ background: ${t.tertiaryColor};
89
+ border: 1px solid ${t.border2};
90
+ border-radius: 2px;
91
+ pointer-events: none;
92
+ z-index: 100;
93
+ }
94
+
95
+ .task-type-0, .section-type-0 {
96
+ ${t.fillType0?`fill: ${t.fillType0}`:""};
97
+ }
98
+ .task-type-1, .section-type-1 {
99
+ ${t.fillType0?`fill: ${t.fillType1}`:""};
100
+ }
101
+ .task-type-2, .section-type-2 {
102
+ ${t.fillType0?`fill: ${t.fillType2}`:""};
103
+ }
104
+ .task-type-3, .section-type-3 {
105
+ ${t.fillType0?`fill: ${t.fillType3}`:""};
106
+ }
107
+ .task-type-4, .section-type-4 {
108
+ ${t.fillType0?`fill: ${t.fillType4}`:""};
109
+ }
110
+ .task-type-5, .section-type-5 {
111
+ ${t.fillType0?`fill: ${t.fillType5}`:""};
112
+ }
113
+ .task-type-6, .section-type-6 {
114
+ ${t.fillType0?`fill: ${t.fillType6}`:""};
115
+ }
116
+ .task-type-7, .section-type-7 {
117
+ ${t.fillType0?`fill: ${t.fillType7}`:""};
118
+ }
119
+
120
+ .actor-0 {
121
+ ${t.actor0?`fill: ${t.actor0}`:""};
122
+ }
123
+ .actor-1 {
124
+ ${t.actor1?`fill: ${t.actor1}`:""};
125
+ }
126
+ .actor-2 {
127
+ ${t.actor2?`fill: ${t.actor2}`:""};
128
+ }
129
+ .actor-3 {
130
+ ${t.actor3?`fill: ${t.actor3}`:""};
131
+ }
132
+ .actor-4 {
133
+ ${t.actor4?`fill: ${t.actor4}`:""};
134
+ }
135
+ .actor-5 {
136
+ ${t.actor5?`fill: ${t.actor5}`:""};
137
+ }
138
+ ${je()}
139
+ `,"getStyles"),Lt=Rt,lt=e(function(t,r){return nn(t,r)},"drawRect"),Bt=e(function(t,r){let g=t.append("circle").attr("cx",r.cx).attr("cy",r.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");i.append("circle").attr("cx",r.cx-5).attr("cy",r.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",r.cx+5).attr("cy",r.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function y(x){let k=bt().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);x.append("path").attr("class","mouth").attr("d",k).attr("transform","translate("+r.cx+","+(r.cy+2)+")")}e(y,"smile");function m(x){let k=bt().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);x.append("path").attr("class","mouth").attr("d",k).attr("transform","translate("+r.cx+","+(r.cy+7)+")")}e(m,"sad");function c(x){x.append("line").attr("class","mouth").attr("stroke",2).attr("x1",r.cx-5).attr("y1",r.cy+7).attr("x2",r.cx+5).attr("y2",r.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}if(e(c,"ambivalent"),r.score>3)y(i);else if(r.score<3)m(i);else c(i);return g},"drawFace"),mt=e(function(t,r){let l=t.append("circle");if(l.attr("cx",r.cx),l.attr("cy",r.cy),l.attr("class","actor-"+r.pos),l.attr("fill",r.fill),l.attr("stroke",r.stroke),l.attr("r",r.r),l.class!==void 0)l.attr("class",l.class);if(r.title!==void 0)l.append("title").text(r.title);return l},"drawCircle"),xt=e(function(t,r){return Xi(t,r)},"drawText"),jt=e(function(t,r){function l(i,y,m,c,x){return i+","+y+" "+(i+m)+","+y+" "+(i+m)+","+(y+c-x)+" "+(i+m-x*1.2)+","+(y+c)+" "+i+","+(y+c)}e(l,"genPoints");let g=t.append("polygon");g.attr("points",l(r.x,r.y,50,20,7)),g.attr("class","labelBox"),r.y=r.y+r.labelMargin,r.x=r.x+0.5*r.labelMargin,xt(t,r)},"drawLabel"),Nt=e(function(t,r,l){let g=t.append("g"),i=Ke();i.x=r.x,i.y=r.y,i.fill=r.fill,i.width=l.width*r.taskCount+l.diagramMarginX*(r.taskCount-1),i.height=l.height,i.class="journey-section section-type-"+r.num,i.rx=3,i.ry=3,lt(g,i),kt(l)(r.text,g,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+r.num},l,r.colour)},"drawSection"),st=-1,zt=e(function(t,r,l,g){let i=r.x+l.width/2,y=t.append("g");st++;let m=450;y.append("line").attr("id",g+"-task"+st).attr("x1",i).attr("y1",r.y).attr("x2",i).attr("y2",m).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Bt(y,{cx:i,cy:300+(5-r.score)*30,score:r.score});let c=Ke();c.x=r.x,c.y=r.y,c.fill=r.fill,c.width=l.width,c.height=l.height,c.class="task task-type-"+r.num,c.rx=3,c.ry=3,lt(y,c);let x=r.x+14;r.people.forEach((k)=>{let b=r.actors[k].color,u={cx:x,cy:r.y,r:7,fill:b,stroke:"#000",title:k,pos:r.actors[k].position};mt(y,u),x+=10}),kt(l)(r.task,y,c.x,c.y,c.width,c.height,{class:"task"},l,r.colour)},"drawTask"),Wt=e(function(t,r){Br(t,r)},"drawBackgroundRect"),kt=function(){function t(i,y,m,c,x,k,b,u){let n=y.append("text").attr("x",m+x/2).attr("y",c+k/2+5).style("font-color",u).style("text-anchor","middle").text(i);g(n,b)}e(t,"byText");function r(i,y,m,c,x,k,b,u,n){let{taskFontSize:a,taskFontFamily:o}=u,d=i.split(/<br\s*\/?>/gi);for(let f=0;f<d.length;f++){let h=f*a-a*(d.length-1)/2,w=y.append("text").attr("x",m+x/2).attr("y",c).attr("fill",n).style("text-anchor","middle").style("font-size",a).style("font-family",o);w.append("tspan").attr("x",m+x/2).attr("dy",h).text(d[f]),w.attr("y",c+k/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),g(w,b)}}e(r,"byTspan");function l(i,y,m,c,x,k,b,u){let n=y.append("switch"),o=n.append("foreignObject").attr("x",m).attr("y",c).attr("width",x).attr("height",k).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");o.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),r(i,n,m,c,x,k,b,u),g(o,b)}e(l,"byFo");function g(i,y){for(let m in y)if(m in y)i.attr(m,y[m])}return e(g,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?l:i.textPlacement==="old"?t:r}}(),Ot=e(function(t,r){st=-1,t.append("defs").append("marker").attr("id",r+"-arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics"),U={drawRect:lt,drawCircle:mt,drawSection:Nt,drawText:xt,drawLabel:jt,drawTask:zt,drawBackgroundRect:Wt,initGraphics:Ot},Yt=e(function(t){Object.keys(t).forEach(function(l){R[l]=t[l]})},"setConf"),N={},K=0;function _t(t){let r=s().journey,l=r.maxLabelWidth;K=0;let g=60;Object.keys(N).forEach((i)=>{let y=N[i].color,m={cx:20,cy:g,r:7,fill:y,stroke:"#000",pos:N[i].position};U.drawCircle(t,m);let c=t.append("text").attr("visibility","hidden").text(i),x=c.node().getBoundingClientRect().width;c.remove();let k=[];if(x<=l)k=[i];else{let b=i.split(" "),u="";if(c=t.append("text").attr("visibility","hidden"),b.forEach((n)=>{let a=u?`${u} ${n}`:n;if(c.text(a),c.node().getBoundingClientRect().width>l){if(u)k.push(u);if(u=n,c.text(n),c.node().getBoundingClientRect().width>l){let d="";for(let f of n)if(d+=f,c.text(d+"-"),c.node().getBoundingClientRect().width>l)k.push(d.slice(0,-1)+"-"),d=f;u=d}}else u=a}),u)k.push(u);c.remove()}k.forEach((b,u)=>{let n={x:40,y:g+7+u*20,fill:"#666",text:b,textMargin:r.boxTextMargin??5},o=U.drawText(t,n).node().getBoundingClientRect().width;if(o>K&&o>r.leftMargin-o)K=o}),g+=Math.max(20,k.length*20)})}e(_t,"drawActorLegend");var R=s().journey,W=0,qt=e(function(t,r,l,g){let i=s(),y=i.journey.titleColor,m=i.journey.titleFontSize,c=i.journey.titleFontFamily,x=i.securityLevel,k;if(x==="sandbox")k=p("#i"+r);let b=x==="sandbox"?p(k.nodes()[0].contentDocument.body):p("body");V.init();let u=b.select("#"+r);U.initGraphics(u,r);let n=g.db.getTasks(),a=g.db.getDiagramTitle(),o=g.db.getActors();for(let z in N)delete N[z];let d=0;o.forEach((z)=>{N[z]={color:R.actorColours[d%R.actorColours.length],position:d},d++}),_t(u),W=R.leftMargin+K,V.insert(0,0,W,Object.keys(N).length*50),Xt(u,n,0,r);let f=V.getBounds();if(a)u.append("text").text(a).attr("x",W).attr("font-size",m).attr("font-weight","bold").attr("y",25).attr("fill",y).attr("font-family",c);let h=f.stopy-f.starty+2*R.diagramMarginY,w=W+f.stopx+2*R.diagramMarginX;B(u,h,w,R.useMaxWidth),u.append("line").attr("x1",W).attr("y1",R.height*4).attr("x2",w-W-4).attr("y2",R.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+r+"-arrowhead)");let _=a?70:0;u.attr("viewBox",`${f.startx} -25 ${w} ${h+_}`),u.attr("preserveAspectRatio","xMinYMin meet"),u.attr("height",h+_+25)},"draw"),V={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:e(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:e(function(t,r,l,g){if(t[r]===void 0)t[r]=l;else t[r]=g(l,t[r])},"updateVal"),updateBounds:e(function(t,r,l,g){let i=s().journey,y=this,m=0;function c(x){return e(function(b){m++;let u=y.sequenceItems.length-m+1;if(y.updateVal(b,"starty",r-u*i.boxMargin,Math.min),y.updateVal(b,"stopy",g+u*i.boxMargin,Math.max),y.updateVal(V.data,"startx",t-u*i.boxMargin,Math.min),y.updateVal(V.data,"stopx",l+u*i.boxMargin,Math.max),x!=="activation")y.updateVal(b,"startx",t-u*i.boxMargin,Math.min),y.updateVal(b,"stopx",l+u*i.boxMargin,Math.max),y.updateVal(V.data,"starty",r-u*i.boxMargin,Math.min),y.updateVal(V.data,"stopy",g+u*i.boxMargin,Math.max)},"updateItemBounds")}e(c,"updateFn"),this.sequenceItems.forEach(c())},"updateBounds"),insert:e(function(t,r,l,g){let i=Math.min(t,l),y=Math.max(t,l),m=Math.min(r,g),c=Math.max(r,g);this.updateVal(V.data,"startx",i,Math.min),this.updateVal(V.data,"starty",m,Math.min),this.updateVal(V.data,"stopx",y,Math.max),this.updateVal(V.data,"stopy",c,Math.max),this.updateBounds(i,m,y,c)},"insert"),bumpVerticalPos:e(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:e(function(){return this.verticalPos},"getVerticalPos"),getBounds:e(function(){return this.data},"getBounds")},{sectionFills:it,sectionColours:pt}=R,Xt=e(function(t,r,l,g){let i=s().journey,y="",m=i.height*2+i.diagramMarginY,c=l+m,x=0,k="#CCC",b="black",u=0;for(let[n,a]of r.entries()){if(y!==a.section){k=it[x%it.length],u=x%it.length,b=pt[x%pt.length];let d=0,f=a.section;for(let w=n;w<r.length;w++)if(r[w].section==f)d=d+1;else break;let h={x:n*i.taskMargin+n*i.width+W,y:50,text:a.section,fill:k,num:u,colour:b,taskCount:d};U.drawSection(t,h,i),y=a.section,x++}let o=a.people.reduce((d,f)=>{if(N[f])d[f]=N[f];return d},{});a.x=n*i.taskMargin+n*i.width+W,a.y=c,a.width=i.diagramMarginX,a.height=i.diagramMarginY,a.colour=b,a.fill=k,a.num=u,a.actors=o,U.drawTask(t,a,i,g),V.insert(a.x,a.y,a.x+a.width+i.taskMargin,450)}},"drawTasks"),gt={setConf:Yt,draw:qt},te={parser:$t,db:ft,renderer:gt,styles:Lt,init:e((t)=>{gt.setConf(t.journey),ft.clear()},"init")};export{te as diagram};
@@ -0,0 +1 @@
1
+ import{e,r}from"./chunk-jtwhjp20.js";import{K,Lt,It}from"./chunk-jvhmna7z.js";import{W}from"./chunk-e5rmr47n.js";import{or,_t}from"./chunk-gxn0bey7.js";var i=or().RailroadPeg.parser.LangiumParser,s=e((t)=>{let a=t.alternatives.map(l);if(a.length===1)return a[0];return{type:"choice",alternatives:a}},"transformOrderedChoice"),l=e((t)=>{let a=t.elements.map(m);if(a.length===1)return a[0];return{type:"sequence",elements:a}},"transformSequence"),m=e((t)=>{let a=p(t.suffix);if(!t.operator)return a;return{type:"special",text:t.operator==="&"?`&${o(a)}`:`!${o(a)}`}},"transformPrefix"),o=e((t)=>{switch(t.type){case"terminal":return`"${t.value}"`;case"nonterminal":return t.name;case"special":return t.text;default:return"(...)"}},"nodeToLabel"),p=e((t)=>{let a=u(t.primary);if(!t.operator)return a;switch(t.operator){case"?":return{type:"optional",element:a};case"*":return{type:"repetition",element:a,min:0,max:1/0};case"+":return{type:"repetition",element:a,min:1,max:1/0};default:throw Error(`Unsupported PEG suffix operator: ${t.operator}`)}},"transformSuffix"),u=e((t)=>{switch(t.$type){case"PegLiteral":return{type:"terminal",value:t.value};case"PegIdentifier":return{type:"nonterminal",name:t.name};case"PegGroup":return s(t.element);case"PegAny":return{type:"special",text:t.dot};default:throw Error(`Unsupported PEG primary node: ${t.$type}`)}},"transformPrimary"),c=e((t)=>({name:t.name,definition:s(t.definition)}),"transformRule"),f=e((t)=>{if(W(t,K),t.title)K.setTitle(t.title);t.rules.map((a)=>K.addRule(c(a)))},"populateDb"),d={parse:e((t)=>{K.clear(),r.debug("[PEG Parser] Starting Langium parse");let a=i.parse(t);if(a.lexerErrors.length>0||a.parserErrors.length>0)throw new _t(a);let n=a.value;r.debug("[PEG Parser] Parsed rules:",n.rules.length),f(n),r.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:K}},w={parser:d,db:K,renderer:It,styles:Lt};export{w as diagram};