@bkm016/basalt 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (196) hide show
  1. package/README.md +16 -22
  2. package/chunk-06hdzq5n.js +2 -0
  3. package/chunk-09rj27b2.js +2 -0
  4. package/{chunk-qnr1f5pj.js → chunk-0y7ne3d0.js} +2 -2
  5. package/{chunk-vgvq3q12.js → chunk-10xzzn07.js} +2 -2
  6. package/{chunk-6qertm2t.js → chunk-1qpces5a.js} +1 -1
  7. package/{chunk-nt2gntad.js → chunk-1zdwrgd4.js} +1 -1
  8. package/{chunk-sh74qzvt.js → chunk-27gntzs5.js} +4 -4
  9. package/{chunk-1v7st27a.js → chunk-2esbgxps.js} +14 -14
  10. package/{chunk-exnn1867.js → chunk-362g64pd.js} +1 -1
  11. package/{chunk-1aspj1hn.js → chunk-3cjsd292.js} +2 -2
  12. package/chunk-5c9j8qe4.js +478 -0
  13. package/{chunk-8dxzqwq3.js → chunk-5j1krv9v.js} +1 -1
  14. package/{chunk-vkkj4awb.js → chunk-6hssbcgj.js} +1 -1
  15. package/{chunk-1b7gbe8g.js → chunk-75m78j7x.js} +2 -2
  16. package/{chunk-kfq8wyd3.js → chunk-8296hw9m.js} +1 -1
  17. package/{chunk-szat3vp4.js → chunk-8d46jtbj.js} +2 -2
  18. package/{chunk-qczbfccb.js → chunk-8tjad3r0.js} +4 -4
  19. package/{chunk-agntrqs9.js → chunk-97rzj7f6.js} +1 -1
  20. package/{chunk-k7w7ac9q.js → chunk-981f9dw8.js} +8 -8
  21. package/{chunk-xysny0ve.js → chunk-aefadsy6.js} +2 -2
  22. package/{chunk-jhd54p1b.js → chunk-bannb9xm.js} +1 -1
  23. package/{chunk-a3tqx584.js → chunk-c7x1zq39.js} +1 -1
  24. package/{chunk-rv06x0kn.js → chunk-cjc90f84.js} +1 -1
  25. package/{chunk-x3dnb9sz.js → chunk-d2j735sd.js} +2 -2
  26. package/{chunk-yskm0hsy.js → chunk-d8gtbw9g.js} +1 -1
  27. package/{chunk-rm3kcxq9.js → chunk-fjtvjrkg.js} +13 -13
  28. package/{chunk-h6sw8fbt.js → chunk-fm0k0qtz.js} +1 -1
  29. package/{chunk-1yzt0qm0.js → chunk-fw2bpqmw.js} +1 -1
  30. package/{chunk-45cz26ap.js → chunk-gp7y0fja.js} +13 -13
  31. package/{chunk-2bb01ddq.js → chunk-gzxnene8.js} +1 -1
  32. package/{chunk-a8nyk4k9.js → chunk-hwr56pfj.js} +1 -1
  33. package/{chunk-0hbjv3y6.js → chunk-jwdb0ccj.js} +3 -3
  34. package/{chunk-kf8hq21a.js → chunk-k23t7vhs.js} +5 -5
  35. package/{chunk-bhqyxyap.js → chunk-k506w58v.js} +1 -1
  36. package/{chunk-44ek81ad.js → chunk-k6w6y71k.js} +2 -2
  37. package/chunk-m40gxwq4.js +5 -0
  38. package/chunk-m8vkwdgr.js +5 -0
  39. package/{chunk-f7egr55n.js → chunk-mvfsxdx6.js} +13 -13
  40. package/{chunk-pvncysbb.js → chunk-nbb9trwz.js} +1 -1
  41. package/{chunk-0szjy61m.js → chunk-pbcy6zdt.js} +1 -1
  42. package/chunk-pmqtkqsf.js +2 -0
  43. package/{chunk-hat3s3pr.js → chunk-pxsrqrd0.js} +1 -1
  44. package/{chunk-xsbxykr4.js → chunk-qe0teyn1.js} +1 -1
  45. package/{chunk-2zqny2sy.js → chunk-r7fpkb49.js} +1 -1
  46. package/{chunk-3m7qwfm3.js → chunk-rtzqqngy.js} +3 -3
  47. package/{chunk-6e49xsf5.js → chunk-shadcb9z.js} +2 -2
  48. package/{chunk-0qqb6v41.js → chunk-shhrr741.js} +120 -120
  49. package/{chunk-cv5wsd9m.js → chunk-t6zs4kw0.js} +2 -2
  50. package/{chunk-hcn9cf6v.js → chunk-v258nxcz.js} +1 -1
  51. package/{chunk-a6r4z44b.js → chunk-vk1gxk1t.js} +1 -1
  52. package/{chunk-s37s3k24.js → chunk-x1xss1d7.js} +2 -2
  53. package/{chunk-dakrpbe6.js → chunk-x4874m8e.js} +2 -2
  54. package/{chunk-wx7kdf0b.js → chunk-xfvvh1s5.js} +1 -1
  55. package/{chunk-0yytz0r1.js → chunk-y0m980k3.js} +5 -5
  56. package/{chunk-dhm42y04.js → chunk-y58ygzn9.js} +3 -3
  57. package/{chunk-2wkaw73s.js → chunk-y648fzx0.js} +5 -5
  58. package/{chunk-32at88hc.js → chunk-y7nma9rk.js} +1 -1
  59. package/{chunk-pmc3y1z8.js → chunk-ykens1hy.js} +1 -1
  60. package/{chunk-q8zx3kt6.js → chunk-z55bmysw.js} +1 -1
  61. package/{chunk-qx0m82rw.js → chunk-zmsgwr3s.js} +1 -1
  62. package/{chunk-501zkf9b.js → chunk-ztsjgssj.js} +1 -1
  63. package/compiled.js +5 -5
  64. package/package.json +1 -1
  65. package/ui-test-worker.js +63 -63
  66. package/web/chunk-0sewdyz1.js +1 -0
  67. package/web/{chunk-xbty0rv7.js → chunk-1z5p7a1h.js} +1 -1
  68. package/web/chunk-21ke27j6.js +1 -0
  69. package/web/{chunk-2msj52w6.js → chunk-24k0r5aq.js} +1 -1
  70. package/web/{chunk-a5x2zveg.js → chunk-284a17k8.js} +1 -1
  71. package/web/{chunk-ca682sm6.js → chunk-2pjdtesn.js} +14 -14
  72. package/web/{chunk-z7dcbxws.js → chunk-3mvr2gwh.js} +1 -1
  73. package/web/chunk-3t3zwx9j.js +1 -0
  74. package/web/{chunk-e6jxqbv7.js → chunk-3z93efr4.js} +1 -1
  75. package/web/{chunk-05w4fyzc.js → chunk-43jqvsrg.js} +1 -1
  76. package/web/{chunk-jwzd9tzk.js → chunk-4bry4xds.js} +2 -2
  77. package/web/{chunk-4ks96e4r.js → chunk-5e7ygjdn.js} +1 -1
  78. package/web/{chunk-qefasa1j.js → chunk-5jbf7n5q.js} +1 -1
  79. package/web/{chunk-e32y85kx.js → chunk-5rx8rtsa.js} +1 -1
  80. package/web/chunk-5xc9d5ft.js +1 -0
  81. package/web/{chunk-a1z5qx1r.js → chunk-693m9kt7.js} +3 -3
  82. package/web/{chunk-70qwwwak.js → chunk-6qejm5s2.js} +1 -1
  83. package/web/{chunk-kdyjnwdx.js → chunk-8ah6ce1b.js} +2 -2
  84. package/web/{chunk-5vw9rs4r.js → chunk-8e43yaq3.js} +3 -3
  85. package/web/{chunk-qnaqf0cr.js → chunk-8wye0wbb.js} +1 -1
  86. package/web/{chunk-45fzdcgz.js → chunk-986z0p48.js} +5 -5
  87. package/web/{chunk-y0m8hrwz.js → chunk-9dd1c37b.js} +77 -77
  88. package/web/{chunk-9yakxvjb.js → chunk-9re6yttj.js} +2 -2
  89. package/web/{chunk-2scce33n.js → chunk-abbvjt4e.js} +1 -1
  90. package/web/{chunk-b4wbk7vc.js → chunk-agmkx996.js} +3 -3
  91. package/web/{chunk-hev4hq89.js → chunk-anbn2ttv.js} +2 -2
  92. package/web/chunk-aqm3spxt.js +1139 -0
  93. package/web/{chunk-fk0dh93x.js → chunk-avwpjsxw.js} +5 -5
  94. package/web/chunk-b470hvpk.js +1 -0
  95. package/web/{chunk-9dxjafp2.js → chunk-bt1m87ck.js} +2 -2
  96. package/web/chunk-cqp1d4p0.js +1 -0
  97. package/web/{chunk-ss1bcb0n.js → chunk-ctcrk3qn.js} +2 -2
  98. package/web/{chunk-pf2ab8p8.js → chunk-ctd8bfg2.js} +1 -1
  99. package/web/{chunk-q5ke7a33.js → chunk-cwvtraca.js} +1 -1
  100. package/web/{chunk-yd46jhqv.js → chunk-dk90px7g.js} +1 -1
  101. package/web/{chunk-0mrkjnte.js → chunk-ds7srg4p.js} +1 -1
  102. package/web/{chunk-fscafg24.js → chunk-dt8ss97f.js} +5 -5
  103. package/web/{chunk-9p12mgs6.js → chunk-ezkqa7we.js} +1 -1
  104. package/web/{chunk-f26smjjf.js → chunk-f078k1ej.js} +1 -1
  105. package/web/chunk-fekjj24p.css +1 -0
  106. package/web/{chunk-a3verqw9.js → chunk-fqj9kry9.js} +5 -5
  107. package/web/chunk-frjfamx7.js +8 -0
  108. package/web/{chunk-g4azyef7.js → chunk-fy8ey195.js} +1 -1
  109. package/web/{chunk-wptv8atc.js → chunk-g8ee1csm.js} +1 -1
  110. package/web/{chunk-w880psmw.js → chunk-h31p43qa.js} +1 -1
  111. package/web/chunk-h5p5jsrw.js +1 -0
  112. package/web/chunk-h9fmr6ch.js +1 -0
  113. package/web/{chunk-qh7265qw.js → chunk-jf2ehmvp.js} +2 -2
  114. package/web/{chunk-fz06t6km.js → chunk-jmnaq7c1.js} +1 -1
  115. package/web/chunk-jq0pw0k2.js +1 -0
  116. package/web/{chunk-p3b9crsa.js → chunk-jvj66qhs.js} +2 -2
  117. package/web/{chunk-xjxv8dg8.js → chunk-jzmzhj8z.js} +4 -4
  118. package/web/chunk-k4cfnvyq.js +1 -0
  119. package/web/{chunk-dt462hk9.js → chunk-kgerjbn4.js} +1 -1
  120. package/web/{chunk-bc78qf1m.js → chunk-kww4azv5.js} +5 -5
  121. package/web/chunk-m29dhjkh.js +1 -0
  122. package/web/chunk-mj6tee5h.js +1 -0
  123. package/web/{chunk-jrcyc9s9.js → chunk-mjpjkyd1.js} +1 -1
  124. package/web/{chunk-20q90epj.js → chunk-n8sky2q6.js} +1 -1
  125. package/web/{chunk-fm2ybfj5.js → chunk-pk3ap3wh.js} +4 -4
  126. package/web/{chunk-bgnnrpna.js → chunk-q1pkntc6.js} +4 -4
  127. package/web/{chunk-taynqrgq.js → chunk-qryrg2pq.js} +2 -2
  128. package/web/{chunk-gqw3f02j.js → chunk-r92sbgwv.js} +5 -5
  129. package/web/{chunk-0vt9fg48.js → chunk-raqqscwa.js} +2 -2
  130. package/web/{chunk-3jhyzmnf.js → chunk-rc2vq9wz.js} +3 -3
  131. package/web/{chunk-2ps6mepk.js → chunk-rkj743fg.js} +3 -3
  132. package/web/{chunk-e53wfgb8.js → chunk-rrws61wf.js} +1 -1
  133. package/web/{chunk-9an7cjd9.js → chunk-s3hwejnr.js} +2 -2
  134. package/web/{chunk-dzwxgqgm.js → chunk-s3rdx28k.js} +2 -2
  135. package/web/{chunk-2m12wyrb.js → chunk-shbw6wg8.js} +1 -1
  136. package/web/chunk-szcy5z56.js +1 -0
  137. package/web/{chunk-tmvakq7n.js → chunk-t1xk6hca.js} +4 -4
  138. package/web/chunk-t2hhdg9r.js +1 -0
  139. package/web/chunk-tj4cmkwe.js +1 -0
  140. package/web/{chunk-bjkc94mv.js → chunk-tn1xzmgx.js} +1 -1
  141. package/web/{chunk-4v8en1yw.js → chunk-tnv7z83q.js} +1 -1
  142. package/web/chunk-v2b5q0n5.js +1 -0
  143. package/web/{chunk-3ee04tmm.js → chunk-vj6kstpp.js} +5 -5
  144. package/web/{chunk-b1pe46zz.js → chunk-vjqmnkh2.js} +1 -1
  145. package/web/{chunk-qd8bxxdj.js → chunk-vkc149rb.js} +1 -1
  146. package/web/{chunk-v28fx2nd.js → chunk-vny496ba.js} +1 -1
  147. package/web/{chunk-rpmpttbk.js → chunk-vz5ck6x9.js} +1 -1
  148. package/web/{chunk-y49fhfda.js → chunk-xa88zgkr.js} +1 -1
  149. package/web/{chunk-q0p5xqe1.js → chunk-xdcs8qz3.js} +4 -4
  150. package/web/chunk-y5x74t89.js +1 -0
  151. package/web/{chunk-xrxne80b.js → chunk-yen2kkn2.js} +1 -1
  152. package/web/{chunk-bj90t5gh.js → chunk-yjv2c45j.js} +4 -4
  153. package/web/chunk-yx3dh5hg.js +1 -0
  154. package/web/chunk-yz4fmtk2.js +1 -0
  155. package/web/{chunk-8p4tc9f4.js → chunk-z24vs8q9.js} +3 -3
  156. package/web/chunk-z5j6x6j8.js +2 -0
  157. package/web/chunk-z5stjrhc.js +1 -0
  158. package/web/{chunk-90kp4pnz.js → chunk-z760wagr.js} +1 -1
  159. package/web/{chunk-tqmwd9qp.js → chunk-znvnb9dh.js} +1 -1
  160. package/web/{chunk-22a4ety5.js → chunk-zrzq29e6.js} +1 -1
  161. package/web/{icon-yx2p2pye.svg → icon-1wgy7kzy.svg} +13 -13
  162. package/web/icon.svg +13 -13
  163. package/web/index.html +2 -2
  164. package/web/install.sh +0 -0
  165. package/web/sw.js +9 -0
  166. package/worker.js +1 -1
  167. package/chunk-09vr609h.js +0 -2
  168. package/chunk-58vz2qsq.js +0 -2
  169. package/chunk-c25s4w6a.js +0 -5
  170. package/chunk-t057xfrt.js +0 -5
  171. package/chunk-wjd9fr23.js +0 -2
  172. package/chunk-zef13k3h.js +0 -471
  173. package/web/chunk-2pver6r4.js +0 -1
  174. package/web/chunk-37ajk6zg.js +0 -2
  175. package/web/chunk-4wkm9fda.js +0 -1
  176. package/web/chunk-amzgyy1k.js +0 -1
  177. package/web/chunk-cff5hcm8.js +0 -8
  178. package/web/chunk-esp1mmgr.js +0 -1
  179. package/web/chunk-ew3cgdtd.js +0 -1
  180. package/web/chunk-gjq1pxw3.js +0 -1
  181. package/web/chunk-h5ejbf6e.js +0 -1
  182. package/web/chunk-jjh5jvva.js +0 -1
  183. package/web/chunk-k5btcvbg.js +0 -1
  184. package/web/chunk-kpvgecwy.js +0 -1
  185. package/web/chunk-kq40ss39.js +0 -1
  186. package/web/chunk-q7dsnvpf.js +0 -1
  187. package/web/chunk-rg426vkf.js +0 -1
  188. package/web/chunk-ry9256r7.js +0 -1
  189. package/web/chunk-scpwc9ev.js +0 -1
  190. package/web/chunk-ssy07dd2.js +0 -1
  191. package/web/chunk-tgpbhzn9.js +0 -1
  192. package/web/chunk-vt40e1kp.js +0 -1136
  193. package/web/chunk-w53rba6g.js +0 -1
  194. package/web/chunk-w86n42dy.js +0 -1
  195. package/web/chunk-wtawdeej.css +0 -1
  196. package/web/chunk-zde7mj43.js +0 -1
@@ -1,4 +1,4 @@
1
- import{Qr,ii,Mn,Nr,oi,si,pn}from"./chunk-vt40e1kp.js";var S=class extends Error{constructor(t){super(t);this.name="ShikiError"}};function tn(t){return Ne(t)}function Ne(t){if(Array.isArray(t))return nn(t);if(t instanceof RegExp)return t;if(typeof t==="object")return rn(t);return t}function nn(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=Ne(t[n]);return e}function rn(t){let e={};for(let n in t)e[n]=Ne(t[n]);return e}function Ve(t,...e){return e.forEach((n)=>{for(let r in n)t[r]=n[r]}),t}function Ye(t){let e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");if(e===0)return t;else if(~e===t.length-1)return Ye(t.substring(0,t.length-1));else return t.substr(~e+1)}var ye=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,J=class{static hasCaptures(t){if(t===null)return!1;return ye.lastIndex=0,ye.test(t)}static replaceCaptures(t,e,n){return t.replace(ye,(r,s,i,o)=>{let a=n[parseInt(s||i,10)];if(a){let c=e.substring(a.start,a.end);while(c[0]===".")c=c.substring(1);switch(o){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return r})}};function Je(t,e){if(t<e)return-1;if(t>e)return 1;return 0}function Qe(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,r=e.length;if(n===r){for(let s=0;s<n;s++){let i=Je(t[s],e[s]);if(i!==0)return i}return 0}return n-r}function Fe(t){if(/^#[0-9a-f]{6}$/i.test(t))return!0;if(/^#[0-9a-f]{8}$/i.test(t))return!0;if(/^#[0-9a-f]{3}$/i.test(t))return!0;if(/^#[0-9a-f]{4}$/i.test(t))return!0;return!1}function Xe(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Ze=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);let e=this.fn(t);return this.cache.set(t,e),e}},M=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(an(t),e)}static createFromParsedTheme(t,e){return ln(t,e)}_cachedMatchRoot=new Ze((t)=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;let e=t.scopeName,r=this._cachedMatchRoot.get(e).find((s)=>sn(t.parent,s.parentScopes));if(!r)return null;return new et(r.fontStyle,r.foreground,r.background)}},be=class t{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(let r of n)e=new t(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new t(n,e[r]);return n}push(e){return new t(this,e)}getSegments(){let e=this,n=[];while(e)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){if(this===e)return!0;if(this.parent===null)return!1;return this.parent.extends(e)}getExtensionIfDefined(e){let n=[],r=this;while(r&&r!==e)n.push(r.scopeName),r=r.parent;return r===e?n.reverse():void 0}};function sn(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],s=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],s=!0}while(t){if(on(t.scopeName,r))break;if(s)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function on(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var et=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function an(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let s=0,i=e.length;s<i;s++){let o=e[s];if(!o.settings)continue;let a;if(typeof o.scope==="string"){let h=o.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),a=h.split(",")}else if(Array.isArray(o.scope))a=o.scope;else a=[""];let c=-1;if(typeof o.settings.fontStyle==="string"){c=0;let h=o.settings.fontStyle.split(" ");for(let d=0,f=h.length;d<f;d++)switch(h[d]){case"italic":c=c|1;break;case"bold":c=c|2;break;case"underline":c=c|4;break;case"strikethrough":c=c|8;break}}let l=null;if(typeof o.settings.foreground==="string"&&Fe(o.settings.foreground))l=o.settings.foreground;let u=null;if(typeof o.settings.background==="string"&&Fe(o.settings.background))u=o.settings.background;for(let h=0,d=a.length;h<d;h++){let m=a[h].trim().split(" "),y=m[m.length-1],_=null;if(m.length>1)_=m.slice(0,m.length-1),_.reverse();n[r++]=new cn(y,_,s,c,l,u)}}return n}var cn=class{constructor(t,e,n,r,s,i){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=s,this.background=i}},k=((t)=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(k||{});function ln(t,e){t.sort((c,l)=>{let u=Je(c.scope,l.scope);if(u!==0)return u;if(u=Qe(c.parentScopes,l.parentScopes),u!==0)return u;return c.index-l.index});let n=0,r="#000000",s="#ffffff";while(t.length>=1&&t[0].scope===""){let c=t.shift();if(c.fontStyle!==-1)n=c.fontStyle;if(c.foreground!==null)r=c.foreground;if(c.background!==null)s=c.background}let i=new un(e),o=new et(n,i.getId(r),i.getId(s)),a=new fn(new we(0,null,-1,0,0),[]);for(let c=0,l=t.length;c<l;c++){let u=t[c];a.insert(0,u.scope,u.parentScopes,u.fontStyle,i.getId(u.foreground),i.getId(u.background))}return new M(i,o,a)}var un=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},hn=Object.freeze([]),we=class t{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,r,s,i){this.scopeDepth=e,this.parentScopes=n||hn,this.fontStyle=r,this.foreground=s,this.background=i}clone(){return new t(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,s=e.length;r<s;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,s){if(this.scopeDepth>e)console.log("how did this happen?");else this.scopeDepth=e;if(n!==-1)this.fontStyle=n;if(r!==0)this.foreground=r;if(s!==0)this.background=s}},fn=class t{constructor(e,n=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let r=0,s=0;while(!0){if(e.parentScopes[r]===">")r++;if(n.parentScopes[s]===">")s++;if(r>=e.parentScopes.length||s>=n.parentScopes.length)break;let i=n.parentScopes[s].length-e.parentScopes[r].length;if(i!==0)return i;r++,s++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),s,i;if(r===-1)s=e,i="";else s=e.substring(0,r),i=e.substring(r+1);if(this._children.hasOwnProperty(s))return this._children[s].match(i)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(t._cmpBySpecificity),n}insert(e,n,r,s,i,o){if(n===""){this._doInsertHere(e,r,s,i,o);return}let a=n.indexOf("."),c,l;if(a===-1)c=n,l="";else c=n.substring(0,a),l=n.substring(a+1);let u;if(this._children.hasOwnProperty(c))u=this._children[c];else u=new t(this._mainRule.clone(),we.cloneArr(this._rulesWithParentScopes)),this._children[c]=u;u.insert(e+1,l,r,s,i,o)}_doInsertHere(e,n,r,s,i){if(n===null){this._mainRule.acceptOverwrite(e,r,s,i);return}for(let o=0,a=this._rulesWithParentScopes.length;o<a;o++){let c=this._rulesWithParentScopes[o];if(Qe(c.parentScopes,n)===0){c.acceptOverwrite(e,r,s,i);return}}if(r===-1)r=this._mainRule.fontStyle;if(s===0)s=this._mainRule.foreground;if(i===0)i=this._mainRule.background;this._rulesWithParentScopes.push(new we(e,n,r,s,i))}},x=class t{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){let n=t.getLanguageId(e),r=t.getTokenType(e),s=t.getFontStyle(e),i=t.getForeground(e),o=t.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:s,foreground:i,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,r,s,i,o,a){let c=t.getLanguageId(e),l=t.getTokenType(e),u=t.containsBalancedBrackets(e)?1:0,h=t.getFontStyle(e),d=t.getForeground(e),f=t.getBackground(e);if(n!==0)c=n;if(r!==8)l=mn(r);if(s!==null)u=s?1:0;if(i!==-1)h=i;if(o!==0)d=o;if(a!==0)f=a;return(c<<0|l<<8|u<<10|h<<11|d<<15|f<<24)>>>0}};function dn(t){return t}function mn(t){return t}function X(t,e){let n=[],r=gn(t),s=r.next();while(s!==null){let c=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=r.next()}let l=o();if(n.push({matcher:l,priority:c}),s!==",")break;s=r.next()}return n;function i(){if(s==="-"){s=r.next();let c=i();return(l)=>!!c&&!c(l)}if(s==="("){s=r.next();let c=a();if(s===")")s=r.next();return c}if(De(s)){let c=[];do c.push(s),s=r.next();while(De(s));return(l)=>e(c,l)}return null}function o(){let c=[],l=i();while(l)c.push(l),l=i();return(u)=>c.every((h)=>h(u))}function a(){let c=[],l=o();while(l){if(c.push(l),s==="|"||s===",")do s=r.next();while(s==="|"||s===",");else break;l=o()}return(u)=>c.some((h)=>h(u))}}function De(t){return!!t&&!!t.match(/[\w\.:]+/)}function gn(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;let r=n[0];return n=e.exec(t),r}}}function tt(t){if(typeof t.dispose==="function")t.dispose()}var j=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},_n=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},yn=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){let e=t.toKey();if(this._seenReferenceKeys.has(e))return;this._seenReferenceKeys.add(e),this._references.push(t)}},bn=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new j(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let t=this.Q;this.Q=[];let e=new yn;for(let n of t)Sn(n,this.initialScopeName,this.repo,e);for(let n of e.references)if(n instanceof j){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName))continue;if(this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Sn(t,e,n,r){let s=n.lookup(t.scopeName);if(!s){if(t.scopeName===e)throw Error(`No grammar provided for <${e}>`);return}let i=n.lookup(e);if(t instanceof j)Q({baseGrammar:i,selfGrammar:s},r);else Ce(t.ruleName,{baseGrammar:i,selfGrammar:s,repository:s.repository},r);let o=n.injections(t.scopeName);if(o)for(let a of o)r.add(new j(a))}function Ce(t,e,n){if(e.repository&&e.repository[t]){let r=e.repository[t];Z([r],e,n)}}function Q(t,e){if(t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns))Z(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e);if(t.selfGrammar.injections)Z(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function Z(t,e,n){for(let r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let s=r.repository?Ve({},e.repository,r.repository):e.repository;if(Array.isArray(r.patterns))Z(r.patterns,{...e,repository:s},n);let i=r.include;if(!i)continue;let o=nt(i);switch(o.kind){case 0:Q({...e,selfGrammar:e.baseGrammar},n);break;case 1:Q(e,n);break;case 2:Ce(o.ruleName,{...e,repository:s},n);break;case 3:case 4:let a=o.scopeName===e.selfGrammar.scopeName?e.selfGrammar:o.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(a){let c={baseGrammar:e.baseGrammar,selfGrammar:a,repository:s};if(o.kind===4)Ce(o.ruleName,c,n);else Q(c,n)}else if(o.kind===4)n.add(new _n(o.scopeName,o.ruleName));else n.add(new j(o.scopeName));break}}}var wn=class{kind=0},Cn=class{kind=1},kn=class{constructor(t){this.ruleName=t}kind=2},Rn=class{constructor(t){this.scopeName=t}kind=3},Nn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function nt(t){if(t==="$base")return new wn;else if(t==="$self")return new Cn;let e=t.indexOf("#");if(e===-1)return new Rn(t);else if(e===0)return new kn(t.substring(1));else{let n=t.substring(0,e),r=t.substring(e+1);return new Nn(n,r)}}var Tn=/\\(\d+)/,We=/\\(\d+)/g,ws=Symbol("RuleId"),vn=-1,rt=-2;function st(t){return t}function it(t){return t}var W=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,r){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=J.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=J.hasCaptures(this._contentName)}get debugName(){let t=this.$location?`${Ye(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){if(!this._nameIsCapturing||this._name===null||t===null||e===null)return this._name;return J.replaceCaptures(this._name,t,e)}getContentName(t,e){if(!this._contentNameIsCapturing||this._contentName===null)return this._contentName;return J.replaceCaptures(this._contentName,t,e)}},An=class extends W{retokenizeCapturedWithRuleId;constructor(t,e,n,r,s){super(t,e,n,r);this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(t,e){throw Error("Not supported!")}compile(t,e){throw Error("Not supported!")}compileAG(t,e,n,r){throw Error("Not supported!")}},En=class extends W{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,null);this._match=new F(r,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns)this._cachedCompiledPatterns=new D,this.collectPatterns(t,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}},He=class extends W{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,r);this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null}collectPatterns(t,e){for(let n of this.patterns)t.getRule(n).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns)this._cachedCompiledPatterns=new D,this.collectPatterns(t,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}},ke=class extends W{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s,i,o,a,c,l){super(t,e,n,r);this._begin=new F(s,this.id),this.beginCaptures=i,this._end=new F(o?o:"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,r)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new D;for(let n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns);if(this.applyEndPatternLast)this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end);else this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}if(this._end.hasBackReferences)if(this.applyEndPatternLast)this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e);else this._cachedCompiledPatterns.setSource(0,e);return this._cachedCompiledPatterns}},ee=class extends W{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,r,s,i,o,a,c){super(t,e,n,r);this._begin=new F(s,this.id),this.beginCaptures=i,this.whileCaptures=a,this._while=new F(o,rt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null;if(this._cachedCompiledWhilePatterns)this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new D;for(let e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,r){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,r)}_getCachedCompiledWhilePatterns(t,e){if(!this._cachedCompiledWhilePatterns)this._cachedCompiledWhilePatterns=new D,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while);if(this._while.hasBackReferences)this._cachedCompiledWhilePatterns.setSource(0,e?e:"￿");return this._cachedCompiledWhilePatterns}},ot=class t{static createCaptureRule(e,n,r,s,i){return e.registerRule((o)=>new An(n,o,r,s,i))}static getCompiledRuleId(e,n,r){if(!e.id)n.registerRule((s)=>{if(e.id=s,e.match)return new En(e.$vscodeTextmateLocation,e.id,e.name,e.match,t._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){if(e.repository)r=Ve({},r,e.repository);let i=e.patterns;if(typeof i>"u"&&e.include)i=[{include:e.include}];return new He(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,t._compilePatterns(i,n,r))}if(e.while)return new ee(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,t._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,t._compileCaptures(e.whileCaptures||e.captures,n,r),t._compilePatterns(e.patterns,n,r));return new ke(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,t._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,t._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,t._compilePatterns(e.patterns,n,r))});return e.id}static _compileCaptures(e,n,r){let s=[];if(e){let i=0;for(let o in e){if(o==="$vscodeTextmateLocation")continue;let a=parseInt(o,10);if(a>i)i=a}for(let o=0;o<=i;o++)s[o]=null;for(let o in e){if(o==="$vscodeTextmateLocation")continue;let a=parseInt(o,10),c=0;if(e[o].patterns)c=t.getCompiledRuleId(e[o],n,r);s[a]=t.createCaptureRule(n,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,c)}}return s}static _compilePatterns(e,n,r){let s=[];if(e)for(let i=0,o=e.length;i<o;i++){let a=e[i],c=-1;if(a.include){let l=nt(a.include);switch(l.kind){case 0:case 1:c=t.getCompiledRuleId(r[a.include],n,r);break;case 2:let u=r[l.ruleName];if(u)c=t.getCompiledRuleId(u,n,r);break;case 3:case 4:let h=l.scopeName,d=l.kind===4?l.ruleName:null,f=n.getExternalGrammar(h,r);if(f)if(d){let m=f.repository[d];if(m)c=t.getCompiledRuleId(m,n,f.repository)}else c=t.getCompiledRuleId(f.repository.$self,n,f.repository);break}}else c=t.getCompiledRuleId(a,n,r);if(c!==-1){let l=n.getRule(c),u=!1;if(l instanceof He||l instanceof ke||l instanceof ee){if(l.hasMissingPatterns&&l.patterns.length===0)u=!0}if(u)continue;s.push(c)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}},F=class t{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e==="string"){let r=e.length,s=0,i=[],o=!1;for(let a=0;a<r;a++)if(e.charAt(a)==="\\"){if(a+1<r){let l=e.charAt(a+1);if(l==="z")i.push(e.substring(s,a)),i.push("$(?!\\n)(?<!\\n)"),s=a+2;else if(l==="A"||l==="G")o=!0;a++}}if(this.hasAnchor=o,s===0)this.source=e;else i.push(e.substring(s,r)),this.source=i.join("")}else this.hasAnchor=!1,this.source=e;if(this.hasAnchor)this._anchorCache=this._buildAnchorCache();else this._anchorCache=null;if(this.ruleId=n,typeof this.source==="string")this.hasBackReferences=Tn.test(this.source);else this.hasBackReferences=!1}clone(){return new t(this.source,this.ruleId)}setSource(e){if(this.source===e)return;if(this.source=e,this.hasAnchor)this._anchorCache=this._buildAnchorCache()}resolveBackReferences(e,n){if(typeof this.source!=="string")throw Error("This method should only be called if the source is a string");let r=n.map((s)=>e.substring(s.start,s.end));return We.lastIndex=0,this.source.replace(We,(s,i)=>Xe(r[parseInt(i,10)]||""))}_buildAnchorCache(){if(typeof this.source!=="string")throw Error("This method should only be called if the source is a string");let e=[],n=[],r=[],s=[],i,o,a,c;for(i=0,o=this.source.length;i<o;i++)if(a=this.source.charAt(i),e[i]=a,n[i]=a,r[i]=a,s[i]=a,a==="\\"){if(i+1<o){if(c=this.source.charAt(i+1),c==="A")e[i+1]="￿",n[i+1]="￿",r[i+1]="A",s[i+1]="A";else if(c==="G")e[i+1]="￿",n[i+1]="G",r[i+1]="￿",s[i+1]="G";else e[i+1]=c,n[i+1]=c,r[i+1]=c,s[i+1]=c;i++}}return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:s.join("")}}resolveAnchors(e,n){if(!this.hasAnchor||!this._anchorCache||typeof this.source!=="string")return this.source;if(e)if(n)return this._anchorCache.A1_G1;else return this._anchorCache.A1_G0;else if(n)return this._anchorCache.A0_G1;else return this._anchorCache.A0_G0}},D=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){if(this._cached)this._cached.dispose(),this._cached=null;if(this._anchorCache.A0_G0)this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null;if(this._anchorCache.A0_G1)this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null;if(this._anchorCache.A1_G0)this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null;if(this._anchorCache.A1_G1)this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){if(this._items[t].source!==e)this._disposeCaches(),this._items[t].setSource(e)}compile(t){if(!this._cached){let e=this._items.map((n)=>n.source);this._cached=new qe(t,e,this._items.map((n)=>n.ruleId))}return this._cached}compileAG(t,e,n){if(!this._hasAnchors)return this.compile(t);else if(e)if(n){if(!this._anchorCache.A1_G1)this._anchorCache.A1_G1=this._resolveAnchors(t,e,n);return this._anchorCache.A1_G1}else{if(!this._anchorCache.A1_G0)this._anchorCache.A1_G0=this._resolveAnchors(t,e,n);return this._anchorCache.A1_G0}else if(n){if(!this._anchorCache.A0_G1)this._anchorCache.A0_G1=this._resolveAnchors(t,e,n);return this._anchorCache.A0_G1}else{if(!this._anchorCache.A0_G0)this._anchorCache.A0_G0=this._resolveAnchors(t,e,n);return this._anchorCache.A0_G0}}_resolveAnchors(t,e,n){let r=this._items.map((s)=>s.resolveAnchors(e,n));return new qe(t,r,this._items.map((s)=>s.ruleId))}},qe=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}scanner;dispose(){if(typeof this.scanner.dispose==="function")this.scanner.dispose()}toString(){let t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
1
+ import{Qr,ii,Mn,Nr,oi,si,pn}from"./chunk-aqm3spxt.js";var S=class extends Error{constructor(t){super(t);this.name="ShikiError"}};function tn(t){return Ne(t)}function Ne(t){if(Array.isArray(t))return nn(t);if(t instanceof RegExp)return t;if(typeof t==="object")return rn(t);return t}function nn(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=Ne(t[n]);return e}function rn(t){let e={};for(let n in t)e[n]=Ne(t[n]);return e}function Ve(t,...e){return e.forEach((n)=>{for(let r in n)t[r]=n[r]}),t}function Ye(t){let e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");if(e===0)return t;else if(~e===t.length-1)return Ye(t.substring(0,t.length-1));else return t.substr(~e+1)}var ye=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,J=class{static hasCaptures(t){if(t===null)return!1;return ye.lastIndex=0,ye.test(t)}static replaceCaptures(t,e,n){return t.replace(ye,(r,s,i,o)=>{let a=n[parseInt(s||i,10)];if(a){let c=e.substring(a.start,a.end);while(c[0]===".")c=c.substring(1);switch(o){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return r})}};function Je(t,e){if(t<e)return-1;if(t>e)return 1;return 0}function Qe(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,r=e.length;if(n===r){for(let s=0;s<n;s++){let i=Je(t[s],e[s]);if(i!==0)return i}return 0}return n-r}function Fe(t){if(/^#[0-9a-f]{6}$/i.test(t))return!0;if(/^#[0-9a-f]{8}$/i.test(t))return!0;if(/^#[0-9a-f]{3}$/i.test(t))return!0;if(/^#[0-9a-f]{4}$/i.test(t))return!0;return!1}function Xe(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Ze=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);let e=this.fn(t);return this.cache.set(t,e),e}},M=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(an(t),e)}static createFromParsedTheme(t,e){return ln(t,e)}_cachedMatchRoot=new Ze((t)=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;let e=t.scopeName,r=this._cachedMatchRoot.get(e).find((s)=>sn(t.parent,s.parentScopes));if(!r)return null;return new et(r.fontStyle,r.foreground,r.background)}},be=class t{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(let r of n)e=new t(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new t(n,e[r]);return n}push(e){return new t(this,e)}getSegments(){let e=this,n=[];while(e)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){if(this===e)return!0;if(this.parent===null)return!1;return this.parent.extends(e)}getExtensionIfDefined(e){let n=[],r=this;while(r&&r!==e)n.push(r.scopeName),r=r.parent;return r===e?n.reverse():void 0}};function sn(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],s=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],s=!0}while(t){if(on(t.scopeName,r))break;if(s)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function on(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var et=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function an(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let s=0,i=e.length;s<i;s++){let o=e[s];if(!o.settings)continue;let a;if(typeof o.scope==="string"){let h=o.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),a=h.split(",")}else if(Array.isArray(o.scope))a=o.scope;else a=[""];let c=-1;if(typeof o.settings.fontStyle==="string"){c=0;let h=o.settings.fontStyle.split(" ");for(let d=0,f=h.length;d<f;d++)switch(h[d]){case"italic":c=c|1;break;case"bold":c=c|2;break;case"underline":c=c|4;break;case"strikethrough":c=c|8;break}}let l=null;if(typeof o.settings.foreground==="string"&&Fe(o.settings.foreground))l=o.settings.foreground;let u=null;if(typeof o.settings.background==="string"&&Fe(o.settings.background))u=o.settings.background;for(let h=0,d=a.length;h<d;h++){let m=a[h].trim().split(" "),y=m[m.length-1],_=null;if(m.length>1)_=m.slice(0,m.length-1),_.reverse();n[r++]=new cn(y,_,s,c,l,u)}}return n}var cn=class{constructor(t,e,n,r,s,i){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=s,this.background=i}},k=((t)=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(k||{});function ln(t,e){t.sort((c,l)=>{let u=Je(c.scope,l.scope);if(u!==0)return u;if(u=Qe(c.parentScopes,l.parentScopes),u!==0)return u;return c.index-l.index});let n=0,r="#000000",s="#ffffff";while(t.length>=1&&t[0].scope===""){let c=t.shift();if(c.fontStyle!==-1)n=c.fontStyle;if(c.foreground!==null)r=c.foreground;if(c.background!==null)s=c.background}let i=new un(e),o=new et(n,i.getId(r),i.getId(s)),a=new fn(new we(0,null,-1,0,0),[]);for(let c=0,l=t.length;c<l;c++){let u=t[c];a.insert(0,u.scope,u.parentScopes,u.fontStyle,i.getId(u.foreground),i.getId(u.background))}return new M(i,o,a)}var un=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},hn=Object.freeze([]),we=class t{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,r,s,i){this.scopeDepth=e,this.parentScopes=n||hn,this.fontStyle=r,this.foreground=s,this.background=i}clone(){return new t(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,s=e.length;r<s;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,s){if(this.scopeDepth>e)console.log("how did this happen?");else this.scopeDepth=e;if(n!==-1)this.fontStyle=n;if(r!==0)this.foreground=r;if(s!==0)this.background=s}},fn=class t{constructor(e,n=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let r=0,s=0;while(!0){if(e.parentScopes[r]===">")r++;if(n.parentScopes[s]===">")s++;if(r>=e.parentScopes.length||s>=n.parentScopes.length)break;let i=n.parentScopes[s].length-e.parentScopes[r].length;if(i!==0)return i;r++,s++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),s,i;if(r===-1)s=e,i="";else s=e.substring(0,r),i=e.substring(r+1);if(this._children.hasOwnProperty(s))return this._children[s].match(i)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(t._cmpBySpecificity),n}insert(e,n,r,s,i,o){if(n===""){this._doInsertHere(e,r,s,i,o);return}let a=n.indexOf("."),c,l;if(a===-1)c=n,l="";else c=n.substring(0,a),l=n.substring(a+1);let u;if(this._children.hasOwnProperty(c))u=this._children[c];else u=new t(this._mainRule.clone(),we.cloneArr(this._rulesWithParentScopes)),this._children[c]=u;u.insert(e+1,l,r,s,i,o)}_doInsertHere(e,n,r,s,i){if(n===null){this._mainRule.acceptOverwrite(e,r,s,i);return}for(let o=0,a=this._rulesWithParentScopes.length;o<a;o++){let c=this._rulesWithParentScopes[o];if(Qe(c.parentScopes,n)===0){c.acceptOverwrite(e,r,s,i);return}}if(r===-1)r=this._mainRule.fontStyle;if(s===0)s=this._mainRule.foreground;if(i===0)i=this._mainRule.background;this._rulesWithParentScopes.push(new we(e,n,r,s,i))}},x=class t{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){let n=t.getLanguageId(e),r=t.getTokenType(e),s=t.getFontStyle(e),i=t.getForeground(e),o=t.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:s,foreground:i,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,r,s,i,o,a){let c=t.getLanguageId(e),l=t.getTokenType(e),u=t.containsBalancedBrackets(e)?1:0,h=t.getFontStyle(e),d=t.getForeground(e),f=t.getBackground(e);if(n!==0)c=n;if(r!==8)l=mn(r);if(s!==null)u=s?1:0;if(i!==-1)h=i;if(o!==0)d=o;if(a!==0)f=a;return(c<<0|l<<8|u<<10|h<<11|d<<15|f<<24)>>>0}};function dn(t){return t}function mn(t){return t}function X(t,e){let n=[],r=gn(t),s=r.next();while(s!==null){let c=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=r.next()}let l=o();if(n.push({matcher:l,priority:c}),s!==",")break;s=r.next()}return n;function i(){if(s==="-"){s=r.next();let c=i();return(l)=>!!c&&!c(l)}if(s==="("){s=r.next();let c=a();if(s===")")s=r.next();return c}if(De(s)){let c=[];do c.push(s),s=r.next();while(De(s));return(l)=>e(c,l)}return null}function o(){let c=[],l=i();while(l)c.push(l),l=i();return(u)=>c.every((h)=>h(u))}function a(){let c=[],l=o();while(l){if(c.push(l),s==="|"||s===",")do s=r.next();while(s==="|"||s===",");else break;l=o()}return(u)=>c.some((h)=>h(u))}}function De(t){return!!t&&!!t.match(/[\w\.:]+/)}function gn(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;let r=n[0];return n=e.exec(t),r}}}function tt(t){if(typeof t.dispose==="function")t.dispose()}var j=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},_n=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},yn=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){let e=t.toKey();if(this._seenReferenceKeys.has(e))return;this._seenReferenceKeys.add(e),this._references.push(t)}},bn=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new j(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let t=this.Q;this.Q=[];let e=new yn;for(let n of t)Sn(n,this.initialScopeName,this.repo,e);for(let n of e.references)if(n instanceof j){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName))continue;if(this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Sn(t,e,n,r){let s=n.lookup(t.scopeName);if(!s){if(t.scopeName===e)throw Error(`No grammar provided for <${e}>`);return}let i=n.lookup(e);if(t instanceof j)Q({baseGrammar:i,selfGrammar:s},r);else Ce(t.ruleName,{baseGrammar:i,selfGrammar:s,repository:s.repository},r);let o=n.injections(t.scopeName);if(o)for(let a of o)r.add(new j(a))}function Ce(t,e,n){if(e.repository&&e.repository[t]){let r=e.repository[t];Z([r],e,n)}}function Q(t,e){if(t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns))Z(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e);if(t.selfGrammar.injections)Z(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function Z(t,e,n){for(let r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let s=r.repository?Ve({},e.repository,r.repository):e.repository;if(Array.isArray(r.patterns))Z(r.patterns,{...e,repository:s},n);let i=r.include;if(!i)continue;let o=nt(i);switch(o.kind){case 0:Q({...e,selfGrammar:e.baseGrammar},n);break;case 1:Q(e,n);break;case 2:Ce(o.ruleName,{...e,repository:s},n);break;case 3:case 4:let a=o.scopeName===e.selfGrammar.scopeName?e.selfGrammar:o.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(a){let c={baseGrammar:e.baseGrammar,selfGrammar:a,repository:s};if(o.kind===4)Ce(o.ruleName,c,n);else Q(c,n)}else if(o.kind===4)n.add(new _n(o.scopeName,o.ruleName));else n.add(new j(o.scopeName));break}}}var wn=class{kind=0},Cn=class{kind=1},kn=class{constructor(t){this.ruleName=t}kind=2},Rn=class{constructor(t){this.scopeName=t}kind=3},Nn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function nt(t){if(t==="$base")return new wn;else if(t==="$self")return new Cn;let e=t.indexOf("#");if(e===-1)return new Rn(t);else if(e===0)return new kn(t.substring(1));else{let n=t.substring(0,e),r=t.substring(e+1);return new Nn(n,r)}}var Tn=/\\(\d+)/,We=/\\(\d+)/g,ws=Symbol("RuleId"),vn=-1,rt=-2;function st(t){return t}function it(t){return t}var W=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,r){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=J.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=J.hasCaptures(this._contentName)}get debugName(){let t=this.$location?`${Ye(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){if(!this._nameIsCapturing||this._name===null||t===null||e===null)return this._name;return J.replaceCaptures(this._name,t,e)}getContentName(t,e){if(!this._contentNameIsCapturing||this._contentName===null)return this._contentName;return J.replaceCaptures(this._contentName,t,e)}},An=class extends W{retokenizeCapturedWithRuleId;constructor(t,e,n,r,s){super(t,e,n,r);this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(t,e){throw Error("Not supported!")}compile(t,e){throw Error("Not supported!")}compileAG(t,e,n,r){throw Error("Not supported!")}},En=class extends W{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,null);this._match=new F(r,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns)this._cachedCompiledPatterns=new D,this.collectPatterns(t,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}},He=class extends W{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,r);this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null}collectPatterns(t,e){for(let n of this.patterns)t.getRule(n).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns)this._cachedCompiledPatterns=new D,this.collectPatterns(t,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}},ke=class extends W{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s,i,o,a,c,l){super(t,e,n,r);this._begin=new F(s,this.id),this.beginCaptures=i,this._end=new F(o?o:"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,r)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new D;for(let n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns);if(this.applyEndPatternLast)this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end);else this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}if(this._end.hasBackReferences)if(this.applyEndPatternLast)this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e);else this._cachedCompiledPatterns.setSource(0,e);return this._cachedCompiledPatterns}},ee=class extends W{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,r,s,i,o,a,c){super(t,e,n,r);this._begin=new F(s,this.id),this.beginCaptures=i,this.whileCaptures=a,this._while=new F(o,rt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null;if(this._cachedCompiledWhilePatterns)this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new D;for(let e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,r){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,r)}_getCachedCompiledWhilePatterns(t,e){if(!this._cachedCompiledWhilePatterns)this._cachedCompiledWhilePatterns=new D,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while);if(this._while.hasBackReferences)this._cachedCompiledWhilePatterns.setSource(0,e?e:"￿");return this._cachedCompiledWhilePatterns}},ot=class t{static createCaptureRule(e,n,r,s,i){return e.registerRule((o)=>new An(n,o,r,s,i))}static getCompiledRuleId(e,n,r){if(!e.id)n.registerRule((s)=>{if(e.id=s,e.match)return new En(e.$vscodeTextmateLocation,e.id,e.name,e.match,t._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){if(e.repository)r=Ve({},r,e.repository);let i=e.patterns;if(typeof i>"u"&&e.include)i=[{include:e.include}];return new He(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,t._compilePatterns(i,n,r))}if(e.while)return new ee(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,t._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,t._compileCaptures(e.whileCaptures||e.captures,n,r),t._compilePatterns(e.patterns,n,r));return new ke(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,t._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,t._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,t._compilePatterns(e.patterns,n,r))});return e.id}static _compileCaptures(e,n,r){let s=[];if(e){let i=0;for(let o in e){if(o==="$vscodeTextmateLocation")continue;let a=parseInt(o,10);if(a>i)i=a}for(let o=0;o<=i;o++)s[o]=null;for(let o in e){if(o==="$vscodeTextmateLocation")continue;let a=parseInt(o,10),c=0;if(e[o].patterns)c=t.getCompiledRuleId(e[o],n,r);s[a]=t.createCaptureRule(n,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,c)}}return s}static _compilePatterns(e,n,r){let s=[];if(e)for(let i=0,o=e.length;i<o;i++){let a=e[i],c=-1;if(a.include){let l=nt(a.include);switch(l.kind){case 0:case 1:c=t.getCompiledRuleId(r[a.include],n,r);break;case 2:let u=r[l.ruleName];if(u)c=t.getCompiledRuleId(u,n,r);break;case 3:case 4:let h=l.scopeName,d=l.kind===4?l.ruleName:null,f=n.getExternalGrammar(h,r);if(f)if(d){let m=f.repository[d];if(m)c=t.getCompiledRuleId(m,n,f.repository)}else c=t.getCompiledRuleId(f.repository.$self,n,f.repository);break}}else c=t.getCompiledRuleId(a,n,r);if(c!==-1){let l=n.getRule(c),u=!1;if(l instanceof He||l instanceof ke||l instanceof ee){if(l.hasMissingPatterns&&l.patterns.length===0)u=!0}if(u)continue;s.push(c)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}},F=class t{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e==="string"){let r=e.length,s=0,i=[],o=!1;for(let a=0;a<r;a++)if(e.charAt(a)==="\\"){if(a+1<r){let l=e.charAt(a+1);if(l==="z")i.push(e.substring(s,a)),i.push("$(?!\\n)(?<!\\n)"),s=a+2;else if(l==="A"||l==="G")o=!0;a++}}if(this.hasAnchor=o,s===0)this.source=e;else i.push(e.substring(s,r)),this.source=i.join("")}else this.hasAnchor=!1,this.source=e;if(this.hasAnchor)this._anchorCache=this._buildAnchorCache();else this._anchorCache=null;if(this.ruleId=n,typeof this.source==="string")this.hasBackReferences=Tn.test(this.source);else this.hasBackReferences=!1}clone(){return new t(this.source,this.ruleId)}setSource(e){if(this.source===e)return;if(this.source=e,this.hasAnchor)this._anchorCache=this._buildAnchorCache()}resolveBackReferences(e,n){if(typeof this.source!=="string")throw Error("This method should only be called if the source is a string");let r=n.map((s)=>e.substring(s.start,s.end));return We.lastIndex=0,this.source.replace(We,(s,i)=>Xe(r[parseInt(i,10)]||""))}_buildAnchorCache(){if(typeof this.source!=="string")throw Error("This method should only be called if the source is a string");let e=[],n=[],r=[],s=[],i,o,a,c;for(i=0,o=this.source.length;i<o;i++)if(a=this.source.charAt(i),e[i]=a,n[i]=a,r[i]=a,s[i]=a,a==="\\"){if(i+1<o){if(c=this.source.charAt(i+1),c==="A")e[i+1]="￿",n[i+1]="￿",r[i+1]="A",s[i+1]="A";else if(c==="G")e[i+1]="￿",n[i+1]="G",r[i+1]="￿",s[i+1]="G";else e[i+1]=c,n[i+1]=c,r[i+1]=c,s[i+1]=c;i++}}return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:s.join("")}}resolveAnchors(e,n){if(!this.hasAnchor||!this._anchorCache||typeof this.source!=="string")return this.source;if(e)if(n)return this._anchorCache.A1_G1;else return this._anchorCache.A1_G0;else if(n)return this._anchorCache.A0_G1;else return this._anchorCache.A0_G0}},D=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){if(this._cached)this._cached.dispose(),this._cached=null;if(this._anchorCache.A0_G0)this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null;if(this._anchorCache.A0_G1)this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null;if(this._anchorCache.A1_G0)this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null;if(this._anchorCache.A1_G1)this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){if(this._items[t].source!==e)this._disposeCaches(),this._items[t].setSource(e)}compile(t){if(!this._cached){let e=this._items.map((n)=>n.source);this._cached=new qe(t,e,this._items.map((n)=>n.ruleId))}return this._cached}compileAG(t,e,n){if(!this._hasAnchors)return this.compile(t);else if(e)if(n){if(!this._anchorCache.A1_G1)this._anchorCache.A1_G1=this._resolveAnchors(t,e,n);return this._anchorCache.A1_G1}else{if(!this._anchorCache.A1_G0)this._anchorCache.A1_G0=this._resolveAnchors(t,e,n);return this._anchorCache.A1_G0}else if(n){if(!this._anchorCache.A0_G1)this._anchorCache.A0_G1=this._resolveAnchors(t,e,n);return this._anchorCache.A0_G1}else{if(!this._anchorCache.A0_G0)this._anchorCache.A0_G0=this._resolveAnchors(t,e,n);return this._anchorCache.A0_G0}}_resolveAnchors(t,e,n){let r=this._items.map((s)=>s.resolveAnchors(e,n));return new qe(t,r,this._items.map((s)=>s.ruleId))}},qe=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}scanner;dispose(){if(typeof this.scanner.dispose==="function")this.scanner.dispose()}toString(){let t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
2
2
  `)}findNextMatchSync(t,e,n){let r=this.scanner.findNextMatchSync(t,e,n);if(!r)return null;return{ruleId:this.rules[r.index],captureIndices:r.captureIndices}}},Se=class{constructor(t,e){this.languageId=t,this.tokenType=e}},xn=class t{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,n){this._defaultAttributes=new Se(e,8),this._embeddedLanguagesMatcher=new In(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){if(e===null)return t._NULL_SCOPE_METADATA;return this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new Se(0,0);_getBasicScopeAttributes=new Ze((e)=>{let n=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new Se(n,r)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){let n=e.match(t.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},In=class{values;scopesRegExp;constructor(t){if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);let e=t.map(([n,r])=>Xe(n));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;let e=t.match(this.scopesRegExp);if(!e)return;return this.values.get(e[1])}},Cs={InDebugMode:typeof process<"u"&&!!process.env.VSCODE_TEXTMATE_DEBUG},at=!1,ze=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function ct(t,e,n,r,s,i,o,a){let c=e.content.length,l=!1,u=-1;if(o){let f=Ln(t,e,n,r,s,i);s=f.stack,r=f.linePos,n=f.isFirstLine,u=f.anchorPosition}let h=Date.now();while(!l){if(a!==0){if(Date.now()-h>a)return new ze(s,!0)}d()}return new ze(s,!1);function d(){let f=Pn(t,e,n,r,s,u);if(!f){i.produce(s,c),l=!0;return}let{captureIndices:m,matchedRuleId:y}=f,_=m&&m.length>0?m[0].end>r:!1;if(y===vn){let p=s.getRule(t);i.produce(s,m[0].start),s=s.withContentNameScopesList(s.nameScopesList),B(t,e,n,s,i,p.endCaptures,m),i.produce(s,m[0].end);let g=s;if(s=s.parent,u=g.getAnchorPos(),!_&&g.getEnterPos()===r){s=g,i.produce(s,c),l=!0;return}}else{let p=t.getRule(y);i.produce(s,m[0].start);let g=s,b=p.getName(e.content,m),C=s.contentNameScopesList.pushAttributed(b,t);if(s=s.push(y,r,u,m[0].end===c,null,C,C),p instanceof ke){let R=p;B(t,e,n,s,i,R.beginCaptures,m),i.produce(s,m[0].end),u=m[0].end;let N=R.getContentName(e.content,m),E=C.pushAttributed(N,t);if(s=s.withContentNameScopesList(E),R.endHasBackReferences)s=s.withEndRule(R.getEndWithResolvedBackReferences(e.content,m));if(!_&&g.hasSameRuleAs(s)){s=s.pop(),i.produce(s,c),l=!0;return}}else if(p instanceof ee){let R=p;B(t,e,n,s,i,R.beginCaptures,m),i.produce(s,m[0].end),u=m[0].end;let N=R.getContentName(e.content,m),E=C.pushAttributed(N,t);if(s=s.withContentNameScopesList(E),R.whileHasBackReferences)s=s.withEndRule(R.getWhileWithResolvedBackReferences(e.content,m));if(!_&&g.hasSameRuleAs(s)){s=s.pop(),i.produce(s,c),l=!0;return}}else if(B(t,e,n,s,i,p.captures,m),i.produce(s,m[0].end),s=s.pop(),!_){s=s.safePop(),i.produce(s,c),l=!0;return}}if(m[0].end>r)r=m[0].end,n=!1}}function Ln(t,e,n,r,s,i){let o=s.beginRuleCapturedEOL?0:-1,a=[];for(let c=s;c;c=c.pop()){let l=c.getRule(t);if(l instanceof ee)a.push({rule:l,stack:c})}for(let c=a.pop();c;c=a.pop()){let{ruleScanner:l,findOptions:u}=On(c.rule,t,c.stack.endRule,n,r===o),h=l.findNextMatchSync(e,r,u);if(h){if(h.ruleId!==rt){s=c.stack.pop();break}if(h.captureIndices&&h.captureIndices.length){if(i.produce(c.stack,h.captureIndices[0].start),B(t,e,n,c.stack,i,c.rule.whileCaptures,h.captureIndices),i.produce(c.stack,h.captureIndices[0].end),o=h.captureIndices[0].end,h.captureIndices[0].end>r)r=h.captureIndices[0].end,n=!1}}else{s=c.stack.pop();break}}return{stack:s,linePos:r,anchorPosition:o,isFirstLine:n}}function Pn(t,e,n,r,s,i){let o=Gn(t,e,n,r,s,i),a=t.getInjections();if(a.length===0)return o;let c=Bn(a,t,e,n,r,s,i);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;if(u<l||c.priorityMatch&&u===l)return c;return o}function Gn(t,e,n,r,s,i){let o=s.getRule(t),{ruleScanner:a,findOptions:c}=lt(o,t,s.endRule,n,r===i),l=a.findNextMatchSync(e,r,c);if(l)return{captureIndices:l.captureIndices,matchedRuleId:l.ruleId};return null}function Bn(t,e,n,r,s,i,o){let a=Number.MAX_VALUE,c=null,l,u=0,h=i.contentNameScopesList.getScopeNames();for(let d=0,f=t.length;d<f;d++){let m=t[d];if(!m.matcher(h))continue;let y=e.getRule(m.ruleId),{ruleScanner:_,findOptions:p}=lt(y,e,null,r,s===o),g=_.findNextMatchSync(n,s,p);if(!g)continue;let b=g.captureIndices[0].start;if(b>=a)continue;if(a=b,c=g.captureIndices,l=g.ruleId,u=m.priority,a===s)break}if(c)return{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l};return null}function lt(t,e,n,r,s){if(at){let o=t.compile(e,n),a=ut(r,s);return{ruleScanner:o,findOptions:a}}return{ruleScanner:t.compileAG(e,n,r,s),findOptions:0}}function On(t,e,n,r,s){if(at){let o=t.compileWhile(e,n),a=ut(r,s);return{ruleScanner:o,findOptions:a}}return{ruleScanner:t.compileWhileAG(e,n,r,s),findOptions:0}}function ut(t,e){let n=0;if(!t)n|=1;if(!e)n|=4;return n}function B(t,e,n,r,s,i,o){if(i.length===0)return;let a=e.content,c=Math.min(i.length,o.length),l=[],u=o[0].end;for(let h=0;h<c;h++){let d=i[h];if(d===null)continue;let f=o[h];if(f.length===0)continue;if(f.start>u)break;while(l.length>0&&l[l.length-1].endPos<=f.start)s.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0)s.produceFromScopes(l[l.length-1].scopes,f.start);else s.produce(r,f.start);if(d.retokenizeCapturedWithRuleId){let y=d.getName(a,o),_=r.contentNameScopesList.pushAttributed(y,t),p=d.getContentName(a,o),g=_.pushAttributed(p,t),b=r.push(d.retokenizeCapturedWithRuleId,f.start,-1,!1,null,_,g),C=t.createOnigString(a.substring(0,f.end));ct(t,C,n&&f.start===0,f.start,b,s,!1,0),tt(C);continue}let m=d.getName(a,o);if(m!==null){let _=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(m,t);l.push(new $n(_,f.end))}}while(l.length>0)s.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var $n=class{scopes;endPos;constructor(t,e){this.scopes=t,this.endPos=e}};function jn(t,e,n,r,s,i,o,a){return new Dn(t,e,n,r,s,i,o,a)}function Ue(t,e,n,r,s){let i=X(e,te),o=ot.getCompiledRuleId(n,r,s.repository);for(let a of i)t.push({debugSelector:e,matcher:a.matcher,ruleId:o,grammar:s,priority:a.priority})}function te(t,e){if(e.length<t.length)return!1;let n=0;return t.every((r)=>{for(let s=n;s<e.length;s++)if(Fn(e[s],r))return n=s+1,!0;return!1})}function Fn(t,e){if(!t)return!1;if(t===e)return!0;let n=e.length;return t.length>n&&t.substr(0,n)===e&&t[n]==="."}var Dn=class{constructor(t,e,n,r,s,i,o,a){if(this._rootScopeName=t,this.balancedBracketSelectors=i,this._onigLib=a,this._basicScopeAttributesProvider=new xn(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Ke(e,null),this._injections=null,this._tokenTypeMatchers=[],s)for(let c of Object.keys(s)){let l=X(c,te);for(let u of l)this._tokenTypeMatchers.push({matcher:u.matcher,type:s[c]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let t of this._ruleId2desc)if(t)t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){let t={lookup:(s)=>{if(s===this._rootScopeName)return this._grammar;return this.getExternalGrammar(s)},injections:(s)=>this._grammarRepository.injections(s)},e=[],n=this._rootScopeName,r=t.lookup(n);if(r){let s=r.injections;if(s)for(let o in s)Ue(e,o,s[o],this,r);let i=this._grammarRepository.injections(n);if(i)i.forEach((o)=>{let a=this.getExternalGrammar(o);if(a){let c=a.injectionSelector;if(c)Ue(e,c,a,this,a)}})}return e.sort((s,i)=>s.priority-i.priority),e}getInjections(){if(this._injections===null)this._injections=this._collectInjections();return this._injections}registerRule(t){let e=++this._lastRuleId,n=t(st(e));return this._ruleId2desc[e]=n,n}getRule(t){return this._ruleId2desc[it(t)]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];else if(this._grammarRepository){let n=this._grammarRepository.lookup(t);if(n)return this._includedGrammars[t]=Ke(n,e&&e.$base),this._includedGrammars[t]}return}tokenizeLine(t,e,n=0){let r=this._tokenize(t,e,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(t,e,n=0){let r=this._tokenize(t,e,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(t,e,n,r){if(this._rootId===-1)this._rootId=ot.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections();let s;if(!e||e===Re.NULL){s=!0;let l=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),h=x.set(0,l.languageId,l.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),d=this.getRule(this._rootId).getName(null,null),f;if(d)f=O.createRootAndLookUpScopeName(d,h,this);else f=O.createRoot("unknown",h);e=new Re(null,this._rootId,-1,-1,!1,null,f,f)}else s=!1,e.reset();t=t+`
3
3
  `;let i=this.createOnigString(t),o=i.content.length,a=new Hn(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),c=ct(this,i,s,0,e,a,!0,r);return tt(i),{lineLength:o,lineTokens:a,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Ke(t,e){return t=tn(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var O=class t{constructor(e,n,r){this.parent=e,this.scopePath=n,this.tokenAttributes=r}static fromExtension(e,n){let r=e,s=e?.scopePath??null;for(let i of n)s=be.push(s,i.scopeNames),r=new t(r,s,i.encodedTokenAttributes);return r}static createRoot(e,n){return new t(null,new be(null,e),n)}static createRootAndLookUpScopeName(e,n,r){let s=r.getMetadataForScope(e),i=new be(null,e),o=r.themeProvider.themeMatch(i),a=t.mergeAttributes(n,s,o);return new t(null,i,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return t.equals(this,e)}static equals(e,n){do{if(e===n)return!0;if(!e&&!n)return!0;if(!e||!n)return!1;if(e.scopeName!==n.scopeName||e.tokenAttributes!==n.tokenAttributes)return!1;e=e.parent,n=n.parent}while(!0)}static mergeAttributes(e,n,r){let s=-1,i=0,o=0;if(r!==null)s=r.fontStyle,i=r.foregroundId,o=r.backgroundId;return x.set(e,n.languageId,n.tokenType,null,s,i,o)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return t._pushAttributed(this,e,n);let r=e.split(/ /g),s=this;for(let i of r)s=t._pushAttributed(s,i,n);return s}static _pushAttributed(e,n,r){let s=r.getMetadataForScope(n),i=e.scopePath.push(n),o=r.themeProvider.themeMatch(i),a=t.mergeAttributes(e.tokenAttributes,s,o);return new t(e,i,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let n=[],r=this;while(r&&r!==e)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===e?n.reverse():void 0}},Re=class t{constructor(e,n,r,s,i,o,a,c){this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=i,this.endRule=o,this.nameScopesList=a,this.contentNameScopesList=c,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=s}_stackElementBrand=void 0;static NULL=new t(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){if(e===null)return!1;return t._equals(this,e)}static _equals(e,n){if(e===n)return!0;if(!this._structuralEquals(e,n))return!1;return O.equals(e.contentNameScopesList,n.contentNameScopesList)}static _structuralEquals(e,n){do{if(e===n)return!0;if(!e&&!n)return!0;if(!e||!n)return!1;if(e.depth!==n.depth||e.ruleId!==n.ruleId||e.endRule!==n.endRule)return!1;e=e.parent,n=n.parent}while(!0)}clone(){return this}static _reset(e){while(e)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){t._reset(this)}pop(){return this.parent}safePop(){if(this.parent)return this.parent;return this}push(e,n,r,s,i,o,a){return new t(this,e,n,r,s,i,o,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,n){if(this.parent)n=this.parent._writeString(e,n);return e[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(e){if(this.contentNameScopesList===e)return this;return this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){if(this.endRule===e)return this;return new t(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let n=this;while(n&&n._enterPos===e._enterPos){if(n.ruleId===e.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:it(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,n){let r=O.fromExtension(e?.nameScopesList??null,n.nameScopesList);return new t(e,st(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,O.fromExtension(r,n.contentNameScopesList))}},Wn=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,e){this.balancedBracketScopes=t.flatMap((n)=>{if(n==="*")return this.allowAny=!0,[];return X(n,te).map((r)=>r.matcher)}),this.unbalancedBracketScopes=e.flatMap((n)=>X(n,te).map((r)=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(let e of this.unbalancedBracketScopes)if(e(t))return!1;for(let e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},Hn=class{constructor(t,e,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let r=t?.tokenAttributes??0,s=!1;if(this.balancedBracketSelectors?.matchesAlways)s=!0;if(this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let i=t?.getScopeNames()??[];for(let o of this._tokenTypeOverrides)if(o.matcher(i))r=x.set(r,0,dn(o.type),null,-1,0,0);if(this.balancedBracketSelectors)s=this.balancedBracketSelectors.match(i)}if(s)r=x.set(r,0,8,s,-1,0,0);if(this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=e;return}let n=t?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:n}),this._lastTokenEndIndex=e}getResult(t,e){if(this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1)this._tokens.pop();if(this._tokens.length===0)this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0;return this._tokens}getBinaryResult(t,e){if(this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1)this._binaryTokens.pop(),this._binaryTokens.pop();if(this._binaryTokens.length===0)this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0;let n=new Uint32Array(this._binaryTokens.length);for(let r=0,s=this._binaryTokens.length;r<s;r++)n[r]=this._binaryTokens[r];return n}},qn=class{constructor(t,e){this._onigLib=e,this._theme=t}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){if(this._rawGrammars.set(t.scopeName,t),e)this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,n,r,s){if(!this._grammars.has(t)){let i=this._rawGrammars.get(t);if(!i)return null;this._grammars.set(t,jn(t,i,e,n,r,s,this,this._onigLib))}return this._grammars.get(t)}},ht=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new qn(M.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,e){this._syncRegistry.setTheme(M.createFromRawTheme(t,e))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,e,n){return this.loadGrammarWithConfiguration(t,e,{embeddedLanguages:n})}loadGrammarWithConfiguration(t,e,n){return this._loadGrammar(t,e,n.embeddedLanguages,n.tokenTypes,new Wn(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,e,n,r,s){let i=new bn(this._syncRegistry,t);while(i.Q.length>0)i.Q.map((o)=>this._loadSingleGrammar(o.scopeName)),i.processQueue();return this._grammarForScopeName(t,e,n,r,s)}_loadSingleGrammar(t){if(!this._ensureGrammarCache.has(t))this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0)}_doLoadSingleGrammar(t){let e=this._options.loadGrammar(t);if(e){let n=typeof this._options.getInjections==="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(e,n)}}addGrammar(t,e=[],n=0,r=null){return this._syncRegistry.addGrammar(t,e),this._grammarForScopeName(t.scopeName,n,r)}_grammarForScopeName(t,e=0,n=null,r=null,s=null){return this._syncRegistry.grammarForScopeName(t,e,n,r,s)}},ne=Re.NULL;function q(t,e){let n=typeof t==="string"?{}:{...t.colorReplacements},r=typeof t==="string"?t:t.name;for(let[s,i]of Object.entries(e?.colorReplacements||{}))if(typeof i==="string")n[s]=i;else if(s===r)Object.assign(n,i);return n}function v(t,e){if(!t)return t;return e?.[t?.toLowerCase()]||t}function pt(t){return Array.isArray(t)?t:[t]}async function Te(t){return Promise.resolve(typeof t==="function"?t():t).then((e)=>e.default||e)}function z(t){return!t||["plaintext","txt","text","plain"].includes(t)}function _t(t){return t==="ansi"||z(t)}function U(t){return t==="none"}function yt(t){return U(t)}var zn=/(\r?\n)/g;function P(t,e=!1){if(t.length===0)return[["",0]];let n=t.split(zn),r=0,s=[];for(let i=0;i<n.length;i+=2){let o=e?n[i]+(n[i+1]||""):n[i];s.push([o,r]),r+=n[i].length,r+=n[i+1]?.length||0}return s}var ft={light:"#333333",dark:"#bbbbbb"},dt={light:"#fffffe",dark:"#1e1e1e"},mt="__shiki_resolved";function re(t){if(t?.[mt])return t;let e={...t};if(e.tokenColors&&!e.settings)e.settings=e.tokenColors,delete e.tokenColors;e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:n,fg:r}=e;if(!n||!r){let a=e.settings?e.settings.find((c)=>!c.name&&!c.scope):void 0;if(a?.settings?.foreground)r=a.settings.foreground;if(a?.settings?.background)n=a.settings.background;if(!r&&e?.colors?.["editor.foreground"])r=e.colors["editor.foreground"];if(!n&&e?.colors?.["editor.background"])n=e.colors["editor.background"];if(!r)r=e.type==="light"?ft.light:ft.dark;if(!n)n=e.type==="light"?dt.light:dt.dark;e.fg=r,e.bg=n}if(!(e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope))e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let s=0,i=new Map;function o(a){if(i.has(a))return i.get(a);s+=1;let c=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;if(e.colorReplacements?.[`#${c}`])return o(a);return i.set(a,c),c}e.settings=e.settings.map((a)=>{let c=a.settings?.foreground&&!a.settings.foreground.startsWith("#"),l=a.settings?.background&&!a.settings.background.startsWith("#");if(!c&&!l)return a;let u={...a,settings:{...a.settings}};if(c){let h=o(a.settings.foreground);e.colorReplacements[h]=a.settings.foreground,u.settings.foreground=h}if(l){let h=o(a.settings.background);e.colorReplacements[h]=a.settings.background,u.settings.background=h}return u});for(let a of Object.keys(e.colors||{}))if(a==="editor.foreground"||a==="editor.background"||a.startsWith("terminal.ansi")){if(!e.colors[a]?.startsWith("#")){let c=o(e.colors[a]);e.colorReplacements[c]=e.colors[a],e.colors[a]=c}}return Object.defineProperty(e,mt,{enumerable:!1,writable:!1,value:!0}),e}async function bt(t){return[...new Set((await Promise.all(t.filter((e)=>!_t(e)).map(async(e)=>await Te(e).then((n)=>Array.isArray(n)?n:[n])))).flat())]}async function St(t){return(await Promise.all(t.map(async(e)=>yt(e)?null:re(await Te(e))))).filter((e)=>!!e)}function wt(t,e){if(!e)return t;if(e[t]){let n=new Set([t]);while(e[t]){if(t=e[t],n.has(t))throw new S(`Circular alias \`${[...n].join(" -> ")} -> ${t}\``);n.add(t)}}return t}var Un=class extends ht{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(t,e,n,r={}){super(t);this._resolver=t,this._themes=e,this._langs=n,this._alias=r,this._themes.map((s)=>this.loadTheme(s)),this.loadLanguages(this._langs)}getTheme(t){if(typeof t==="string")return this._resolvedThemes.get(t);else return this.loadTheme(t)}loadTheme(t){let e=re(t);if(e.name)this._resolvedThemes.set(e.name,e),this._loadedThemesCache=null;return e}getLoadedThemes(){if(!this._loadedThemesCache)this._loadedThemesCache=[...this._resolvedThemes.keys()];return this._loadedThemesCache}setTheme(t){let e=this._textmateThemeCache.get(t);if(!e)e=M.createFromRawTheme(t),this._textmateThemeCache.set(t,e);this._syncRegistry.setTheme(e)}getGrammar(t){return t=wt(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;let e=new Set([...this._langMap.values()].filter((s)=>s.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);let n={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);let r=this.loadGrammarWithConfiguration(t.scopeName,1,n);if(r.name=t.name,this._resolvedGrammars.set(t.name,r),t.aliases)t.aliases.forEach((s)=>{this._alias[s]=t.name});if(this._loadedLanguagesCache=null,e.size)for(let s of e)this._resolvedGrammars.delete(s.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(s.scopeName),this._syncRegistry?._grammars?.delete(s.scopeName),this.loadLanguage(this._langMap.get(s.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(let r of t)this.resolveEmbeddedLanguages(r);let e=[...this._langGraph.entries()],n=e.filter(([r,s])=>!s);if(n.length){let r=e.filter(([s,i])=>{if(!i)return!1;return(i.embeddedLanguages||i.embeddedLangs)?.some((o)=>n.map(([a])=>a).includes(o))}).filter((s)=>!n.includes(s));throw new S(`Missing languages ${n.map(([s])=>`\`${s}\``).join(", ")}, required by ${r.map(([s])=>`\`${s}\``).join(", ")}`)}for(let[r,s]of e)this._resolver.addLanguage(s);for(let[r,s]of e)this.loadLanguage(s)}getLoadedLanguages(){if(!this._loadedLanguagesCache)this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])];return this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);let e=t.embeddedLanguages??t.embeddedLangs;if(e)for(let n of e)this._langGraph.set(n,this._langMap.get(n))}},Kn=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,e){this._onigLib={createOnigScanner:(n)=>t.createScanner(n),createOnigString:(n)=>t.createString(n)},e.forEach((n)=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){if(this._langs.set(t.name,t),t.aliases)t.aliases.forEach((e)=>{this._langs.set(e,t)});if(this._scopeToLang.set(t.scopeName,t),t.injectTo)t.injectTo.forEach((e)=>{if(!this._injections.get(e))this._injections.set(e,[]);this._injections.get(e).push(t.scopeName)})}getInjections(t){let e=t.split("."),n=[];for(let r=1;r<=e.length;r++){let s=e.slice(0,r).join(".");n=[...n,...this._injections.get(s)||[]]}return n}},H=0;function ve(t){if(H+=1,t.warnings!==!1&&H>=10&&H%10===0)console.warn(`[Shiki] ${H} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let e=!1;if(!t.engine)throw new S("`engine` option is required for synchronous mode");let n=(t.langs||[]).flat(1),r=(t.themes||[]).flat(1).map(re),s=new Un(new Kn(t.engine,n),r,n,t.langAlias),i;function o(g){return wt(g,t.langAlias)}function a(g){_();let b=s.getGrammar(typeof g==="string"?g:g.name);if(!b)throw new S(`Language \`${g}\` not found, you may need to load it first`);return b}function c(g){if(g==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};_();let b=s.getTheme(g);if(!b)throw new S(`Theme \`${g}\` not found, you may need to load it first`);return b}function l(g){_();let b=c(g);if(i!==g)s.setTheme(b),i=g;return{theme:b,colorMap:s.getColorMap()}}function u(){return _(),s.getLoadedThemes()}function h(){return _(),s.getLoadedLanguages()}function d(...g){_(),s.loadLanguages(g.flat(1))}async function f(...g){return d(await bt(g))}function m(...g){_();for(let b of g.flat(1))s.loadTheme(b)}async function y(...g){return _(),m(await St(g))}function _(){if(e)throw new S("Shiki instance has been disposed")}function p(){if(e)return;e=!0,s.dispose(),H-=1}return{setTheme:l,getTheme:c,getLanguage:a,getLoadedThemes:u,getLoadedLanguages:h,resolveLangAlias:o,loadLanguage:f,loadLanguageSync:d,loadTheme:y,loadThemeSync:m,dispose:p,[Symbol.dispose]:p}}async function Ae(t){if(!t.engine)console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[e,n,r]=await Promise.all([St(t.themes||[]),bt(t.langs||[]),t.engine]);return ve({...t,themes:e,langs:n,engine:r})}var Ct=new WeakMap;function K(t,e){Ct.set(t,e)}function G(t){return Ct.get(t)}var se=class t{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,n){return new t(Object.fromEntries(pt(n).map((r)=>[r,ne])),e)}constructor(...e){if(e.length===2){let[n,r]=e;this.lang=r,this._stacks=n}else{let[n,r,s]=e;this.lang=r,this._stacks={[s]:n}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Vn(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Vn(t){let e=[],n=new Set;function r(s){if(n.has(s))return;n.add(s);let i=s?.nameScopesList?.scopeName;if(i)e.push(i);if(s.parent)r(s.parent)}return r(t),e}function Yn(t,e){if(!(t instanceof se))throw new S("Invalid grammar state");return t.getInternalStack(e)}var Jn=/,/,Qn=/ /;function Ee(t,e,n={}){let{theme:r=t.getLoadedThemes()[0]}=n;if(z(t.resolveLangAlias(n.lang||"text"))||U(r))return P(e).map((a)=>[{content:a[0],offset:a[1]}]);let{theme:s,colorMap:i}=t.setTheme(r),o=t.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==o.name)throw new S(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(s.name))throw new S(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return Rt(e,o,s,i,n)}function kt(...t){if(t.length===2)return G(t[1]);let[e,n,r={}]=t,{lang:s="text",theme:i=e.getLoadedThemes()[0]}=r;if(z(s)||U(i))throw new S("Plain language does not have grammar state");if(s==="ansi")throw new S("ANSI language does not have grammar state");let{theme:o,colorMap:a}=e.setTheme(i),c=e.getLanguage(s);return new se(xe(n,c,o,a,r).stateStack,c.name,o.name)}function Rt(t,e,n,r,s){let i=xe(t,e,n,r,s),o=new se(i.stateStack,e.name,n.name);return K(i.tokens,o),i.tokens}function xe(t,e,n,r,s){let i=q(n,s),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:a=500,includeExplanation:c=!1}=s,l=P(t),u=s.grammarState?Yn(s.grammarState,n.name)??ne:s.grammarContextCode!=null?xe(s.grammarContextCode,e,n,r,{...s,grammarState:void 0,grammarContextCode:void 0}).stateStack:ne,h=[],d=[];for(let f=0,m=l.length;f<m;f++){let[y,_]=l[f];if(y===""){h=[],d.push([]);continue}if(o>0&&y.length>=o){h=[],d.push([{content:y,offset:_,color:"",fontStyle:0}]);continue}let p,g,b;if(c&&c!=="tokenType")p=e.tokenizeLine(y,u,a),g=p.tokens,b=0;let C=e.tokenizeLine2(y,u,a),R=C.tokens.length/2;for(let N=0;N<R;N++){let E=C.tokens[2*N],ge=N+1<R?C.tokens[2*N+2]:y.length;if(E===ge)continue;let pe=C.tokens[2*N+1],Zt=v(r[x.getForeground(pe)],i),en=x.getFontStyle(pe),Y={content:y.substring(E,ge),offset:_+E,color:Zt,fontStyle:en};if(c==="tokenType")Y.type=x.getTokenType(pe);else if(c){let Me=[];if(c!=="scopeName")for(let T of n.settings){let L;switch(typeof T.scope){case"string":L=T.scope.split(Jn).map((_e)=>_e.trim());break;case"object":L=T.scope;break;default:continue}Me.push({settings:T,selectors:L.map((_e)=>_e.split(Qn))})}Y.explanation=[];let je=0;while(E+je<ge){let T=g[b],L=y.substring(T.startIndex,T.endIndex);je+=L.length,Y.explanation.push({content:L,scopes:c==="scopeName"?Xn(T.scopes):Zn(Me,T.scopes)}),b+=1}}h.push(Y)}d.push(h),h=[],u=C.ruleStack}return{tokens:d,stateStack:u}}function Xn(t){return t.map((e)=>({scopeName:e}))}function Zn(t,e){let n=[];for(let r=0,s=e.length;r<s;r++){let i=e[r];n[r]={scopeName:i,themeMatches:tr(t,i,e.slice(0,r))}}return n}function gt(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function er(t,e,n){if(!gt(t.at(-1),e))return!1;let r=t.length-2,s=n.length-1;while(r>=0&&s>=0){if(gt(t[r],n[s]))r-=1;s-=1}if(r===-1)return!0;return!1}function tr(t,e,n){let r=[];for(let{selectors:s,settings:i}of t)for(let o of s)if(er(o,e,n)){r.push(i);break}return r}function ie(t,e,n,r=Ee){let s=Object.entries(n.themes).filter((l)=>l[1]).map((l)=>({color:l[0],theme:l[1]})),i=s.map((l)=>{let u=r(t,e,{...n,theme:l.theme});return{tokens:u,state:G(u),theme:typeof l.theme==="string"?l.theme:l.theme.name}}),o=nr(...i.map((l)=>l.tokens)),a=o[0].map((l,u)=>l.map((h,d)=>{let f={content:h.content,variants:{},offset:h.offset};if("includeExplanation"in n&&n.includeExplanation)f.explanation=h.explanation;return o.forEach((m,y)=>{let{content:_,explanation:p,offset:g,...b}=m[u][d];f.variants[s[y].color]=b}),f})),c=i[0].state?new se(Object.fromEntries(i.map((l)=>[l.theme,l.state?.getInternalStack(l.theme)])),i[0].state.lang):void 0;if(c)K(a,c);return a}function nr(...t){let e=t.map(()=>[]),n=t.length;for(let r=0;r<t[0].length;r++){let s=t.map((c)=>c[r]),i=e.map(()=>[]);e.forEach((c,l)=>c.push(i[l]));let o=s.map(()=>0),a=s.map((c)=>c[0]);while(a.every((c)=>c)){let c=Math.min(...a.map((l)=>l.content.length));for(let l=0;l<n;l++){let u=a[l];if(u.content.length===c)i[l].push(u),o[l]+=1,a[l]=s[l][o[l]];else i[l].push({...u,content:u.content.slice(0,c)}),a[l]={...u,content:u.content.slice(c),offset:u.offset+c}}}}return e}var Nt=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var Tt={}.hasOwnProperty;function vt(t,e){let n=e||{};function r(s,...i){let{invalid:o,handlers:a}=r;if(s&&Tt.call(s,t)){let c=String(s[t]);o=Tt.call(a,c)?a[c]:r.unknown}if(o)return o.call(this,s,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var rr=/["&'<>`]/g,sr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ir=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,or=/[|\\{}()[\]^$+*?.]/g,At=new WeakMap;function Et(t,e){if(t=t.replace(e.subset?ar(e.subset):rr,r),e.subset||e.escapeOnly)return t;return t.replace(sr,n).replace(ir,r);function n(s,i,o){return e.format((s.charCodeAt(0)-55296)*1024+s.charCodeAt(1)-56320+65536,o.charCodeAt(i+2),e)}function r(s,i,o){return e.format(s.charCodeAt(0),o.charCodeAt(i+1),e)}}function ar(t){let e=At.get(t);if(!e)e=cr(t),At.set(t,e);return e}function cr(t){let e=[],n=-1;while(++n<t.length)e.push(t[n].replace(or,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}var lr=/[\dA-Fa-f]/;function xt(t,e,n){let r="&#x"+t.toString(16).toUpperCase();return n&&e&&!lr.test(String.fromCharCode(e))?r:r+";"}var ur=/\d/;function It(t,e,n){let r="&#"+String(t);return n&&e&&!ur.test(String.fromCharCode(e))?r:r+";"}var Lt=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"];var oe={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"};var Pt=["cent","copy","divide","gt","lt","not","para","times"];var Gt={}.hasOwnProperty,Ie={},ae;for(ae in oe)if(Gt.call(oe,ae))Ie[oe[ae]]=ae;var hr=/[^\dA-Za-z]/;function Bt(t,e,n,r){let s=String.fromCharCode(t);if(Gt.call(Ie,s)){let i=Ie[s],o="&"+i;if(n&&Lt.includes(i)&&!Pt.includes(i)&&(!r||e&&e!==61&&hr.test(String.fromCharCode(e))))return o;return o+";"}return""}function Ot(t,e,n){let r=xt(t,e,n.omitOptionalSemicolons),s;if(n.useNamedReferences||n.useShortestReferences)s=Bt(t,e,n.omitOptionalSemicolons,n.attribute);if((n.useShortestReferences||!s)&&n.useShortestReferences){let i=It(t,e,n.omitOptionalSemicolons);if(i.length<r.length)r=i}return s&&(!n.useShortestReferences||s.length<r.length)?s:r}function A(t,e){return Et(t,Object.assign({format:Ot},e))}var fr=/^>|^->|<!--|-->|--!>|<!-$/g,dr=[">"],mr=["<",">"];function $t(t,e,n,r){return r.settings.bogusComments?"<?"+A(t.value,Object.assign({},r.settings.characterReferences,{subset:dr}))+">":"<!--"+t.value.replace(fr,s)+"-->";function s(i){return A(i,Object.assign({},r.settings.characterReferences,{subset:mr}))}}function Mt(t,e,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}var w=jt(1),Le=jt(-1),gr=[];function jt(t){return e;function e(n,r,s){let i=n?n.children:gr,o=(r||0)+t,a=i[o];if(!s)while(a&&pn(a))o+=t,a=i[o];return a}}var pr={}.hasOwnProperty;function ce(t){return e;function e(n,r,s){return pr.call(t,n.tagName)&&t[n.tagName](n,r,s)}}var V=ce({body:yr,caption:Pe,colgroup:Pe,dd:Cr,dt:wr,head:Pe,html:_r,li:Sr,optgroup:kr,option:Rr,p:br,rp:Ft,rt:Ft,tbody:vr,td:Dt,tfoot:Ar,th:Dt,thead:Tr,tr:Er});function Pe(t,e,n){let r=w(n,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&pn(r.value.charAt(0)))}function _r(t,e,n){let r=w(n,e);return!r||r.type!=="comment"}function yr(t,e,n){let r=w(n,e);return!r||r.type!=="comment"}function br(t,e,n){let r=w(n,e);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function Sr(t,e,n){let r=w(n,e);return!r||r.type==="element"&&r.tagName==="li"}function wr(t,e,n){let r=w(n,e);return Boolean(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function Cr(t,e,n){let r=w(n,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Ft(t,e,n){let r=w(n,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function kr(t,e,n){let r=w(n,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function Rr(t,e,n){let r=w(n,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function Tr(t,e,n){let r=w(n,e);return Boolean(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function vr(t,e,n){let r=w(n,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function Ar(t,e,n){return!w(n,e)}function Er(t,e,n){let r=w(n,e);return!r||r.type==="element"&&r.tagName==="tr"}function Dt(t,e,n){let r=w(n,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}var Wt=ce({body:Lr,colgroup:Pr,head:Ir,html:xr,tbody:Gr});function xr(t){let e=w(t,-1);return!e||e.type!=="comment"}function Ir(t){let e=new Set;for(let r of t.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(e.has(r.tagName))return!1;e.add(r.tagName)}let n=t.children[0];return!n||n.type==="element"}function Lr(t){let e=w(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&pn(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function Pr(t,e,n){let r=Le(n,e),s=w(t,-1,!0);if(n&&r&&r.type==="element"&&r.tagName==="colgroup"&&V(r,n.children.indexOf(r),n))return!1;return Boolean(s&&s.type==="element"&&s.tagName==="col")}function Gr(t,e,n){let r=Le(n,e),s=w(t,-1);if(n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&V(r,n.children.indexOf(r),n))return!1;return Boolean(s&&s.type==="element"&&s.tagName==="tr")}var le={name:[[`
4
4
  \f\r &/=>`.split(""),`
@@ -1,4 +1,4 @@
1
- import{e,r,we,D,O,B,C,S,E,T,A,I,L,s,p}from"./chunk-y0m8hrwz.js";import"./chunk-0mrkjnte.js";import{xt}from"./chunk-90kp4pnz.js";var Qt=function(){var t=e(function(st,l,c,f){for(c=c||{},f=st.length;f--;c[st[f]]=l);return c},"o"),n=[1,3],m=[1,4],y=[1,5],h=[1,6],g=[1,7],V=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],d=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],u=[55,56,57],v=[2,36],F=[1,37],P=[1,36],q=[1,38],k=[1,35],_=[1,43],b=[1,41],w=[1,45],_t=[1,14],At=[1,23],Ft=[1,18],Pt=[1,19],qt=[1,20],Vt=[1,21],kt=[1,22],a=[1,24],Ht=[1,25],Xt=[1,26],Mt=[1,27],Yt=[1,28],jt=[1,29],tt=[1,32],et=[1,33],R=[1,34],N=[1,39],W=[1,40],U=[1,42],Q=[1,44],at=[1,63],nt=[1,62],H=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],Gt=[1,66],Kt=[1,67],Zt=[1,68],Jt=[1,69],$t=[1,70],te=[1,71],ee=[1,72],ie=[1,73],ae=[1,74],ne=[1,75],re=[1,76],se=[1,77],G=[4,5,6,7,8,9,10,11,12,13,14,15,18],ht=[1,91],ct=[1,92],dt=[1,93],ut=[1,100],ft=[1,94],gt=[1,97],pt=[1,95],yt=[1,96],bt=[1,98],Tt=[1,99],It=[1,103],oe=[10,55,56,57],K=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],wt={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:e(function(l,c,f,x,z,i,St){var o=i.length-1;switch(z){case 23:this.$=i[o];break;case 24:this.$=i[o-1]+""+i[o];break;case 26:this.$=i[o-1]+i[o];break;case 27:this.$=[i[o].trim()];break;case 28:i[o-2].push(i[o].trim()),this.$=i[o-2];break;case 29:this.$=i[o-4],x.addClass(i[o-2],i[o]);break;case 37:this.$=[];break;case 42:this.$=i[o].trim(),x.setDiagramTitle(this.$);break;case 43:this.$=i[o].trim(),x.setAccTitle(this.$);break;case 44:case 45:this.$=i[o].trim(),x.setAccDescription(this.$);break;case 46:x.addSection(i[o].substr(8)),this.$=i[o].substr(8);break;case 47:x.addPoint(i[o-3],"",i[o-1],i[o],[]);break;case 48:x.addPoint(i[o-4],i[o-3],i[o-1],i[o],[]);break;case 49:x.addPoint(i[o-4],"",i[o-2],i[o-1],i[o]);break;case 50:x.addPoint(i[o-5],i[o-4],i[o-2],i[o-1],i[o]);break;case 51:x.setXAxisLeftText(i[o-2]),x.setXAxisRightText(i[o]);break;case 52:i[o-1].text+=" ⟶ ",x.setXAxisLeftText(i[o-1]);break;case 53:x.setXAxisLeftText(i[o]);break;case 54:x.setYAxisBottomText(i[o-2]),x.setYAxisTopText(i[o]);break;case 55:i[o-1].text+=" ⟶ ",x.setYAxisBottomText(i[o-1]);break;case 56:x.setYAxisBottomText(i[o]);break;case 57:x.setQuadrant1Text(i[o]);break;case 58:x.setQuadrant2Text(i[o]);break;case 59:x.setQuadrant3Text(i[o]);break;case 60:x.setQuadrant4Text(i[o]);break;case 64:this.$={text:i[o],type:"text"};break;case 65:this.$={text:i[o-1].text+""+i[o],type:i[o-1].type};break;case 66:this.$={text:i[o],type:"text"};break;case 67:this.$={text:i[o],type:"markdown"};break;case 68:this.$=i[o];break;case 69:this.$=i[o-1]+""+i[o];break}},"anonymous"),table:[{18:n,26:1,27:2,28:m,55:y,56:h,57:g},{1:[3]},{18:n,26:8,27:2,28:m,55:y,56:h,57:g},{18:n,26:9,27:2,28:m,55:y,56:h,57:g},t(V,[2,33],{29:10}),t(d,[2,61]),t(d,[2,62]),t(d,[2,63]),{1:[2,30]},{1:[2,31]},t(u,v,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:F,5:P,10:q,12:k,13:_,14:b,15:w,18:_t,25:At,35:Ft,37:Pt,39:qt,41:Vt,42:kt,48:a,50:Ht,51:Xt,52:Mt,53:Yt,54:jt,60:tt,61:et,63:R,64:N,65:W,66:U,67:Q}),t(V,[2,34]),{27:46,55:y,56:h,57:g},t(u,[2,37]),t(u,v,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:F,5:P,10:q,12:k,13:_,14:b,15:w,18:_t,25:At,35:Ft,37:Pt,39:qt,41:Vt,42:kt,48:a,50:Ht,51:Xt,52:Mt,53:Yt,54:jt,60:tt,61:et,63:R,64:N,65:W,66:U,67:Q}),t(u,[2,39]),t(u,[2,40]),t(u,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(u,[2,45]),t(u,[2,46]),{18:[1,51]},{4:F,5:P,10:q,12:k,13:_,14:b,15:w,43:52,58:31,60:tt,61:et,63:R,64:N,65:W,66:U,67:Q},{4:F,5:P,10:q,12:k,13:_,14:b,15:w,43:53,58:31,60:tt,61:et,63:R,64:N,65:W,66:U,67:Q},{4:F,5:P,10:q,12:k,13:_,14:b,15:w,43:54,58:31,60:tt,61:et,63:R,64:N,65:W,66:U,67:Q},{4:F,5:P,10:q,12:k,13:_,14:b,15:w,43:55,58:31,60:tt,61:et,63:R,64:N,65:W,66:U,67:Q},{4:F,5:P,10:q,12:k,13:_,14:b,15:w,43:56,58:31,60:tt,61:et,63:R,64:N,65:W,66:U,67:Q},{4:F,5:P,10:q,12:k,13:_,14:b,15:w,43:57,58:31,60:tt,61:et,63:R,64:N,65:W,66:U,67:Q},{4:F,5:P,8:at,10:q,12:k,13:_,14:b,15:w,18:nt,44:[1,58],47:[1,59],58:61,59:60,63:R,64:N,65:W,66:U,67:Q},t(H,[2,64]),t(H,[2,66]),t(H,[2,67]),t(H,[2,70]),t(H,[2,71]),t(H,[2,72]),t(H,[2,73]),t(H,[2,74]),t(H,[2,75]),t(H,[2,76]),t(H,[2,77]),t(H,[2,78]),t(H,[2,79]),t(H,[2,80]),t(H,[2,81]),t(V,[2,35]),t(u,[2,38]),t(u,[2,42]),t(u,[2,43]),t(u,[2,44]),{3:65,4:Gt,5:Kt,6:Zt,7:Jt,8:$t,9:te,10:ee,11:ie,12:ae,13:ne,14:re,15:se,21:64},t(u,[2,53],{59:60,58:61,4:F,5:P,8:at,10:q,12:k,13:_,14:b,15:w,18:nt,49:[1,78],63:R,64:N,65:W,66:U,67:Q}),t(u,[2,56],{59:60,58:61,4:F,5:P,8:at,10:q,12:k,13:_,14:b,15:w,18:nt,49:[1,79],63:R,64:N,65:W,66:U,67:Q}),t(u,[2,57],{59:60,58:61,4:F,5:P,8:at,10:q,12:k,13:_,14:b,15:w,18:nt,63:R,64:N,65:W,66:U,67:Q}),t(u,[2,58],{59:60,58:61,4:F,5:P,8:at,10:q,12:k,13:_,14:b,15:w,18:nt,63:R,64:N,65:W,66:U,67:Q}),t(u,[2,59],{59:60,58:61,4:F,5:P,8:at,10:q,12:k,13:_,14:b,15:w,18:nt,63:R,64:N,65:W,66:U,67:Q}),t(u,[2,60],{59:60,58:61,4:F,5:P,8:at,10:q,12:k,13:_,14:b,15:w,18:nt,63:R,64:N,65:W,66:U,67:Q}),{45:[1,80]},{44:[1,81]},t(H,[2,65]),t(H,[2,82]),t(H,[2,83]),t(H,[2,84]),{3:83,4:Gt,5:Kt,6:Zt,7:Jt,8:$t,9:te,10:ee,11:ie,12:ae,13:ne,14:re,15:se,18:[1,82]},t(G,[2,23]),t(G,[2,1]),t(G,[2,2]),t(G,[2,3]),t(G,[2,4]),t(G,[2,5]),t(G,[2,6]),t(G,[2,7]),t(G,[2,8]),t(G,[2,9]),t(G,[2,10]),t(G,[2,11]),t(G,[2,12]),t(u,[2,52],{58:31,43:84,4:F,5:P,10:q,12:k,13:_,14:b,15:w,60:tt,61:et,63:R,64:N,65:W,66:U,67:Q}),t(u,[2,55],{58:31,43:85,4:F,5:P,10:q,12:k,13:_,14:b,15:w,60:tt,61:et,63:R,64:N,65:W,66:U,67:Q}),{46:[1,86]},{45:[1,87]},{4:ht,5:ct,6:dt,8:ut,11:ft,13:gt,16:90,17:pt,18:yt,19:bt,20:Tt,22:89,23:88},t(G,[2,24]),t(u,[2,51],{59:60,58:61,4:F,5:P,8:at,10:q,12:k,13:_,14:b,15:w,18:nt,63:R,64:N,65:W,66:U,67:Q}),t(u,[2,54],{59:60,58:61,4:F,5:P,8:at,10:q,12:k,13:_,14:b,15:w,18:nt,63:R,64:N,65:W,66:U,67:Q}),t(u,[2,47],{22:89,16:90,23:101,4:ht,5:ct,6:dt,8:ut,11:ft,13:gt,17:pt,18:yt,19:bt,20:Tt}),{46:[1,102]},t(u,[2,29],{10:It}),t(oe,[2,27],{16:104,4:ht,5:ct,6:dt,8:ut,11:ft,13:gt,17:pt,18:yt,19:bt,20:Tt}),t(K,[2,25]),t(K,[2,13]),t(K,[2,14]),t(K,[2,15]),t(K,[2,16]),t(K,[2,17]),t(K,[2,18]),t(K,[2,19]),t(K,[2,20]),t(K,[2,21]),t(K,[2,22]),t(u,[2,49],{10:It}),t(u,[2,48],{22:89,16:90,23:105,4:ht,5:ct,6:dt,8:ut,11:ft,13:gt,17:pt,18:yt,19:bt,20:Tt}),{4:ht,5:ct,6:dt,8:ut,11:ft,13:gt,16:90,17:pt,18:yt,19:bt,20:Tt,22:106},t(K,[2,26]),t(u,[2,50],{10:It}),t(oe,[2,28],{16:104,4:ht,5:ct,6:dt,8:ut,11:ft,13:gt,17:pt,18:yt,19:bt,20:Tt})],defaultActions:{8:[2,30],9:[2,31]},parseError:e(function(l,c){if(c.recoverable)this.trace(l);else{var f=Error(l);throw f.hash=c,f}},"parseError"),parse:e(function(l){var c=this,f=[0],x=[],z=[null],i=[],St=this.table,o="",Ct=0,le=0,he=0,Ce=2,ce=1,Le=i.slice.call(arguments,1),X=Object.create(this.lexer),ot={yy:{}};for(var Bt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Bt))ot.yy[Bt]=this.yy[Bt];if(X.setInput(l,ot.yy),ot.yy.lexer=X,ot.yy.parser=this,typeof X.yylloc>"u")X.yylloc={};var Rt=X.yylloc;i.push(Rt);var Ee=X.options&&X.options.ranges;if(typeof ot.yy.parseError==="function")this.parseError=ot.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function De(J){f.length=f.length-2*J,z.length=z.length-J,i.length=i.length-J}e(De,"popStack");function de(){var J=x.pop()||X.lex()||ce;if(typeof J!=="number"){if(J instanceof Array)x=J,J=x.pop();J=c.symbols_[J]||J}return J}e(de,"lex");var Y,Nt,lt,Z,We,Wt,mt={},Lt,rt,ue,Et;while(!0){if(lt=f[f.length-1],this.defaultActions[lt])Z=this.defaultActions[lt];else{if(Y===null||typeof Y>"u")Y=de();Z=St[lt]&&St[lt][Y]}if(typeof Z>"u"||!Z.length||!Z[0]){var Ut="";Et=[];for(Lt in St[lt])if(this.terminals_[Lt]&&Lt>Ce)Et.push("'"+this.terminals_[Lt]+"'");if(X.showPosition)Ut="Parse error on line "+(Ct+1)+`:
1
+ import{e,r,we,D,O,B,C,S,E,T,A,I,L,s,p}from"./chunk-9dd1c37b.js";import"./chunk-ds7srg4p.js";import{xt}from"./chunk-z760wagr.js";var Qt=function(){var t=e(function(st,l,c,f){for(c=c||{},f=st.length;f--;c[st[f]]=l);return c},"o"),n=[1,3],m=[1,4],y=[1,5],h=[1,6],g=[1,7],V=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],d=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],u=[55,56,57],v=[2,36],F=[1,37],P=[1,36],q=[1,38],k=[1,35],_=[1,43],b=[1,41],w=[1,45],_t=[1,14],At=[1,23],Ft=[1,18],Pt=[1,19],qt=[1,20],Vt=[1,21],kt=[1,22],a=[1,24],Ht=[1,25],Xt=[1,26],Mt=[1,27],Yt=[1,28],jt=[1,29],tt=[1,32],et=[1,33],R=[1,34],N=[1,39],W=[1,40],U=[1,42],Q=[1,44],at=[1,63],nt=[1,62],H=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],Gt=[1,66],Kt=[1,67],Zt=[1,68],Jt=[1,69],$t=[1,70],te=[1,71],ee=[1,72],ie=[1,73],ae=[1,74],ne=[1,75],re=[1,76],se=[1,77],G=[4,5,6,7,8,9,10,11,12,13,14,15,18],ht=[1,91],ct=[1,92],dt=[1,93],ut=[1,100],ft=[1,94],gt=[1,97],pt=[1,95],yt=[1,96],bt=[1,98],Tt=[1,99],It=[1,103],oe=[10,55,56,57],K=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],wt={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:e(function(l,c,f,x,z,i,St){var o=i.length-1;switch(z){case 23:this.$=i[o];break;case 24:this.$=i[o-1]+""+i[o];break;case 26:this.$=i[o-1]+i[o];break;case 27:this.$=[i[o].trim()];break;case 28:i[o-2].push(i[o].trim()),this.$=i[o-2];break;case 29:this.$=i[o-4],x.addClass(i[o-2],i[o]);break;case 37:this.$=[];break;case 42:this.$=i[o].trim(),x.setDiagramTitle(this.$);break;case 43:this.$=i[o].trim(),x.setAccTitle(this.$);break;case 44:case 45:this.$=i[o].trim(),x.setAccDescription(this.$);break;case 46:x.addSection(i[o].substr(8)),this.$=i[o].substr(8);break;case 47:x.addPoint(i[o-3],"",i[o-1],i[o],[]);break;case 48:x.addPoint(i[o-4],i[o-3],i[o-1],i[o],[]);break;case 49:x.addPoint(i[o-4],"",i[o-2],i[o-1],i[o]);break;case 50:x.addPoint(i[o-5],i[o-4],i[o-2],i[o-1],i[o]);break;case 51:x.setXAxisLeftText(i[o-2]),x.setXAxisRightText(i[o]);break;case 52:i[o-1].text+=" ⟶ ",x.setXAxisLeftText(i[o-1]);break;case 53:x.setXAxisLeftText(i[o]);break;case 54:x.setYAxisBottomText(i[o-2]),x.setYAxisTopText(i[o]);break;case 55:i[o-1].text+=" ⟶ ",x.setYAxisBottomText(i[o-1]);break;case 56:x.setYAxisBottomText(i[o]);break;case 57:x.setQuadrant1Text(i[o]);break;case 58:x.setQuadrant2Text(i[o]);break;case 59:x.setQuadrant3Text(i[o]);break;case 60:x.setQuadrant4Text(i[o]);break;case 64:this.$={text:i[o],type:"text"};break;case 65:this.$={text:i[o-1].text+""+i[o],type:i[o-1].type};break;case 66:this.$={text:i[o],type:"text"};break;case 67:this.$={text:i[o],type:"markdown"};break;case 68:this.$=i[o];break;case 69:this.$=i[o-1]+""+i[o];break}},"anonymous"),table:[{18:n,26:1,27:2,28:m,55:y,56:h,57:g},{1:[3]},{18:n,26:8,27:2,28:m,55:y,56:h,57:g},{18:n,26:9,27:2,28:m,55:y,56:h,57:g},t(V,[2,33],{29:10}),t(d,[2,61]),t(d,[2,62]),t(d,[2,63]),{1:[2,30]},{1:[2,31]},t(u,v,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:F,5:P,10:q,12:k,13:_,14:b,15:w,18:_t,25:At,35:Ft,37:Pt,39:qt,41:Vt,42:kt,48:a,50:Ht,51:Xt,52:Mt,53:Yt,54:jt,60:tt,61:et,63:R,64:N,65:W,66:U,67:Q}),t(V,[2,34]),{27:46,55:y,56:h,57:g},t(u,[2,37]),t(u,v,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:F,5:P,10:q,12:k,13:_,14:b,15:w,18:_t,25:At,35:Ft,37:Pt,39:qt,41:Vt,42:kt,48:a,50:Ht,51:Xt,52:Mt,53:Yt,54:jt,60:tt,61:et,63:R,64:N,65:W,66:U,67:Q}),t(u,[2,39]),t(u,[2,40]),t(u,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(u,[2,45]),t(u,[2,46]),{18:[1,51]},{4:F,5:P,10:q,12:k,13:_,14:b,15:w,43:52,58:31,60:tt,61:et,63:R,64:N,65:W,66:U,67:Q},{4:F,5:P,10:q,12:k,13:_,14:b,15:w,43:53,58:31,60:tt,61:et,63:R,64:N,65:W,66:U,67:Q},{4:F,5:P,10:q,12:k,13:_,14:b,15:w,43:54,58:31,60:tt,61:et,63:R,64:N,65:W,66:U,67:Q},{4:F,5:P,10:q,12:k,13:_,14:b,15:w,43:55,58:31,60:tt,61:et,63:R,64:N,65:W,66:U,67:Q},{4:F,5:P,10:q,12:k,13:_,14:b,15:w,43:56,58:31,60:tt,61:et,63:R,64:N,65:W,66:U,67:Q},{4:F,5:P,10:q,12:k,13:_,14:b,15:w,43:57,58:31,60:tt,61:et,63:R,64:N,65:W,66:U,67:Q},{4:F,5:P,8:at,10:q,12:k,13:_,14:b,15:w,18:nt,44:[1,58],47:[1,59],58:61,59:60,63:R,64:N,65:W,66:U,67:Q},t(H,[2,64]),t(H,[2,66]),t(H,[2,67]),t(H,[2,70]),t(H,[2,71]),t(H,[2,72]),t(H,[2,73]),t(H,[2,74]),t(H,[2,75]),t(H,[2,76]),t(H,[2,77]),t(H,[2,78]),t(H,[2,79]),t(H,[2,80]),t(H,[2,81]),t(V,[2,35]),t(u,[2,38]),t(u,[2,42]),t(u,[2,43]),t(u,[2,44]),{3:65,4:Gt,5:Kt,6:Zt,7:Jt,8:$t,9:te,10:ee,11:ie,12:ae,13:ne,14:re,15:se,21:64},t(u,[2,53],{59:60,58:61,4:F,5:P,8:at,10:q,12:k,13:_,14:b,15:w,18:nt,49:[1,78],63:R,64:N,65:W,66:U,67:Q}),t(u,[2,56],{59:60,58:61,4:F,5:P,8:at,10:q,12:k,13:_,14:b,15:w,18:nt,49:[1,79],63:R,64:N,65:W,66:U,67:Q}),t(u,[2,57],{59:60,58:61,4:F,5:P,8:at,10:q,12:k,13:_,14:b,15:w,18:nt,63:R,64:N,65:W,66:U,67:Q}),t(u,[2,58],{59:60,58:61,4:F,5:P,8:at,10:q,12:k,13:_,14:b,15:w,18:nt,63:R,64:N,65:W,66:U,67:Q}),t(u,[2,59],{59:60,58:61,4:F,5:P,8:at,10:q,12:k,13:_,14:b,15:w,18:nt,63:R,64:N,65:W,66:U,67:Q}),t(u,[2,60],{59:60,58:61,4:F,5:P,8:at,10:q,12:k,13:_,14:b,15:w,18:nt,63:R,64:N,65:W,66:U,67:Q}),{45:[1,80]},{44:[1,81]},t(H,[2,65]),t(H,[2,82]),t(H,[2,83]),t(H,[2,84]),{3:83,4:Gt,5:Kt,6:Zt,7:Jt,8:$t,9:te,10:ee,11:ie,12:ae,13:ne,14:re,15:se,18:[1,82]},t(G,[2,23]),t(G,[2,1]),t(G,[2,2]),t(G,[2,3]),t(G,[2,4]),t(G,[2,5]),t(G,[2,6]),t(G,[2,7]),t(G,[2,8]),t(G,[2,9]),t(G,[2,10]),t(G,[2,11]),t(G,[2,12]),t(u,[2,52],{58:31,43:84,4:F,5:P,10:q,12:k,13:_,14:b,15:w,60:tt,61:et,63:R,64:N,65:W,66:U,67:Q}),t(u,[2,55],{58:31,43:85,4:F,5:P,10:q,12:k,13:_,14:b,15:w,60:tt,61:et,63:R,64:N,65:W,66:U,67:Q}),{46:[1,86]},{45:[1,87]},{4:ht,5:ct,6:dt,8:ut,11:ft,13:gt,16:90,17:pt,18:yt,19:bt,20:Tt,22:89,23:88},t(G,[2,24]),t(u,[2,51],{59:60,58:61,4:F,5:P,8:at,10:q,12:k,13:_,14:b,15:w,18:nt,63:R,64:N,65:W,66:U,67:Q}),t(u,[2,54],{59:60,58:61,4:F,5:P,8:at,10:q,12:k,13:_,14:b,15:w,18:nt,63:R,64:N,65:W,66:U,67:Q}),t(u,[2,47],{22:89,16:90,23:101,4:ht,5:ct,6:dt,8:ut,11:ft,13:gt,17:pt,18:yt,19:bt,20:Tt}),{46:[1,102]},t(u,[2,29],{10:It}),t(oe,[2,27],{16:104,4:ht,5:ct,6:dt,8:ut,11:ft,13:gt,17:pt,18:yt,19:bt,20:Tt}),t(K,[2,25]),t(K,[2,13]),t(K,[2,14]),t(K,[2,15]),t(K,[2,16]),t(K,[2,17]),t(K,[2,18]),t(K,[2,19]),t(K,[2,20]),t(K,[2,21]),t(K,[2,22]),t(u,[2,49],{10:It}),t(u,[2,48],{22:89,16:90,23:105,4:ht,5:ct,6:dt,8:ut,11:ft,13:gt,17:pt,18:yt,19:bt,20:Tt}),{4:ht,5:ct,6:dt,8:ut,11:ft,13:gt,16:90,17:pt,18:yt,19:bt,20:Tt,22:106},t(K,[2,26]),t(u,[2,50],{10:It}),t(oe,[2,28],{16:104,4:ht,5:ct,6:dt,8:ut,11:ft,13:gt,17:pt,18:yt,19:bt,20:Tt})],defaultActions:{8:[2,30],9:[2,31]},parseError:e(function(l,c){if(c.recoverable)this.trace(l);else{var f=Error(l);throw f.hash=c,f}},"parseError"),parse:e(function(l){var c=this,f=[0],x=[],z=[null],i=[],St=this.table,o="",Ct=0,le=0,he=0,Ce=2,ce=1,Le=i.slice.call(arguments,1),X=Object.create(this.lexer),ot={yy:{}};for(var Bt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Bt))ot.yy[Bt]=this.yy[Bt];if(X.setInput(l,ot.yy),ot.yy.lexer=X,ot.yy.parser=this,typeof X.yylloc>"u")X.yylloc={};var Rt=X.yylloc;i.push(Rt);var Ee=X.options&&X.options.ranges;if(typeof ot.yy.parseError==="function")this.parseError=ot.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function De(J){f.length=f.length-2*J,z.length=z.length-J,i.length=i.length-J}e(De,"popStack");function de(){var J=x.pop()||X.lex()||ce;if(typeof J!=="number"){if(J instanceof Array)x=J,J=x.pop();J=c.symbols_[J]||J}return J}e(de,"lex");var Y,Nt,lt,Z,We,Wt,mt={},Lt,rt,ue,Et;while(!0){if(lt=f[f.length-1],this.defaultActions[lt])Z=this.defaultActions[lt];else{if(Y===null||typeof Y>"u")Y=de();Z=St[lt]&&St[lt][Y]}if(typeof Z>"u"||!Z.length||!Z[0]){var Ut="";Et=[];for(Lt in St[lt])if(this.terminals_[Lt]&&Lt>Ce)Et.push("'"+this.terminals_[Lt]+"'");if(X.showPosition)Ut="Parse error on line "+(Ct+1)+`:
2
2
  `+X.showPosition()+`
3
3
  Expecting `+Et.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'";else Ut="Parse error on line "+(Ct+1)+": Unexpected "+(Y==ce?"end of input":"'"+(this.terminals_[Y]||Y)+"'");this.parseError(Ut,{text:X.match,token:this.terminals_[Y]||Y,line:X.yylineno,loc:Rt,expected:Et})}if(Z[0]instanceof Array&&Z.length>1)throw Error("Parse Error: multiple actions possible at state: "+lt+", token: "+Y);switch(Z[0]){case 1:if(f.push(Y),z.push(X.yytext),i.push(X.yylloc),f.push(Z[1]),Y=null,!Nt){if(le=X.yyleng,o=X.yytext,Ct=X.yylineno,Rt=X.yylloc,he>0)he--}else Y=Nt,Nt=null;break;case 2:if(rt=this.productions_[Z[1]][1],mt.$=z[z.length-rt],mt._$={first_line:i[i.length-(rt||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(rt||1)].first_column,last_column:i[i.length-1].last_column},Ee)mt._$.range=[i[i.length-(rt||1)].range[0],i[i.length-1].range[1]];if(Wt=this.performAction.apply(mt,[o,le,Ct,ot.yy,Z[1],z,i].concat(Le)),typeof Wt<"u")return Wt;if(rt)f=f.slice(0,-1*rt*2),z=z.slice(0,-1*rt),i=i.slice(0,-1*rt);f.push(this.productions_[Z[1]][0]),z.push(mt.$),i.push(mt._$),ue=St[f[f.length-2]][f[f.length-1]],f.push(ue);break;case 3:return!0}}return!0},"parse")},ve=function(){var st={EOF:1,parseError:e(function(c,f){if(this.yy.parser)this.yy.parser.parseError(c,f);else throw Error(c)},"parseError"),setInput:e(function(l,c){if(this.yy=c||this.yy||{},this._input=l,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 l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var c=l.match(/(?:\r\n?|\n).*/g);if(c)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),l},"input"),unput:e(function(l){var c=l.length,f=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var x=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),f.length-1)this.yylineno-=f.length-1;var z=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:f?(f.length===x.length?this.yylloc.first_column:0)+x[x.length-f.length].length-f[0].length:this.yylloc.first_column-c},this.options.ranges)this.yylloc.range=[z[0],z[0]+this.yyleng-c];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
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(l){this.unput(this.match.slice(l))},"less"),pastInput:e(function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var l=this.match;if(l.length<20)l+=this._input.substr(0,20-l.length);return(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var l=this.pastInput(),c=Array(l.length+1).join("-");return l+this.upcomingInput()+`
@@ -1,9 +1,9 @@
1
- import{e,Yt,r,b,C,S,E,T,A,I,L,s,N,le,ae,ie,ft,he,ge}from"./chunk-y0m8hrwz.js";import{fe}from"./chunk-ss1bcb0n.js";import{oe}from"./chunk-hev4hq89.js";var He=function(){var t=e(function(X,l,o,h){for(o=o||{},h=X.length;h--;o[X[h]]=l);return o},"o"),d=[1,3],f=[1,4],m=[1,5],a=[1,6],u=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],q=[1,22],w=[2,7],R=[1,26],V=[1,27],v=[1,28],F=[1,29],P=[1,33],U=[1,34],Y=[1,35],B=[1,36],Q=[1,37],H=[1,38],K=[1,24],W=[1,31],j=[1,32],G=[1,30],g=[1,39],y=[1,40],k=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],J=[1,61],pe=[89,90],Ke=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],xe=[27,29],We=[1,70],je=[1,71],Ge=[1,72],ze=[1,73],Xe=[1,74],Je=[1,75],Ze=[1,76],be=[1,83],Z=[1,80],Re=[1,84],ke=[1,85],ye=[1,86],_e=[1,87],Se=[1,88],Ie=[1,89],Te=[1,90],Ne=[1,91],qe=[1,92],we=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],ee=[63,64],et=[1,101],tt=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],D=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],te=[1,110],se=[1,106],re=[1,107],ne=[1,108],ce=[1,109],ue=[1,111],Ce=[1,116],Ae=[1,117],Ve=[1,114],ve=[1,115],$e={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:e(function(l,o,h,n,p,i,Le){var c=i.length-1;switch(p){case 4:this.$=i[c].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=i[c].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:n.setDirection("TB");break;case 18:n.setDirection("BT");break;case 19:n.setDirection("RL");break;case 20:n.setDirection("LR");break;case 21:n.addRequirement(i[c-3],i[c-4]);break;case 22:n.addRequirement(i[c-5],i[c-6]),n.setClass([i[c-5]],i[c-3]);break;case 23:n.setNewReqId(i[c-2]);break;case 24:n.setNewReqText(i[c-2]);break;case 25:n.setNewReqRisk(i[c-2]);break;case 26:n.setNewReqVerifyMethod(i[c-2]);break;case 29:this.$=n.RequirementType.REQUIREMENT;break;case 30:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=n.RiskLevel.LOW_RISK;break;case 36:this.$=n.RiskLevel.MED_RISK;break;case 37:this.$=n.RiskLevel.HIGH_RISK;break;case 38:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=n.VerifyType.VERIFY_TEST;break;case 42:n.addElement(i[c-3]);break;case 43:n.addElement(i[c-5]),n.setClass([i[c-5]],i[c-3]);break;case 44:n.setNewElementType(i[c-2]);break;case 45:n.setNewElementDocRef(i[c-2]);break;case 48:n.addRelationship(i[c-2],i[c],i[c-4]);break;case 49:n.addRelationship(i[c-2],i[c-4],i[c]);break;case 50:this.$=n.Relationships.CONTAINS;break;case 51:this.$=n.Relationships.COPIES;break;case 52:this.$=n.Relationships.DERIVES;break;case 53:this.$=n.Relationships.SATISFIES;break;case 54:this.$=n.Relationships.VERIFIES;break;case 55:this.$=n.Relationships.REFINES;break;case 56:this.$=n.Relationships.TRACES;break;case 57:this.$=i[c-2],n.defineClass(i[c-1],i[c]);break;case 58:n.setClass(i[c-1],i[c]);break;case 59:n.setClass([i[c-2]],i[c]);break;case 60:case 62:this.$=[i[c]];break;case 61:case 63:this.$=i[c-2].concat([i[c]]);break;case 64:this.$=i[c-2],n.setCssStyle(i[c-1],i[c]);break;case 65:this.$=[i[c]];break;case 66:i[c-2].push(i[c]),this.$=i[c-2];break;case 68:this.$=i[c-1]+i[c];break}},"anonymous"),table:[{3:1,4:2,6:d,9:f,11:m,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:d,9:f,11:m,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(u,[2,6]),{3:12,4:2,6:d,9:f,11:m,13:a},{1:[2,2]},{4:17,5:q,7:13,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},t(u,[2,4]),t(u,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:q,7:42,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:43,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:44,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:45,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:46,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:47,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:48,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:49,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:50,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},t(k,[2,17]),t(k,[2,18]),t(k,[2,19]),t(k,[2,20]),{30:60,33:62,75:J,89:g,90:y},{30:63,33:62,75:J,89:g,90:y},{30:64,33:62,75:J,89:g,90:y},t(pe,[2,29]),t(pe,[2,30]),t(pe,[2,31]),t(pe,[2,32]),t(pe,[2,33]),t(pe,[2,34]),t(Ke,[2,81]),t(Ke,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},t(xe,[2,79]),t(xe,[2,80]),{27:[1,67],29:[1,68]},t(xe,[2,85]),t(xe,[2,86]),{62:69,65:We,66:je,67:Ge,68:ze,69:Xe,70:Je,71:Ze},{62:77,65:We,66:je,67:Ge,68:ze,69:Xe,70:Je,71:Ze},{30:78,33:62,75:J,89:g,90:y},{73:79,75:be,76:Z,78:81,79:82,80:Re,81:ke,82:ye,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},t(we,[2,60]),t(we,[2,62]),{73:93,75:be,76:Z,78:81,79:82,80:Re,81:ke,82:ye,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},{30:94,33:62,75:J,76:Z,89:g,90:y},{5:[1,95]},{30:96,33:62,75:J,89:g,90:y},{5:[1,97]},{30:98,33:62,75:J,89:g,90:y},{63:[1,99]},t(ee,[2,50]),t(ee,[2,51]),t(ee,[2,52]),t(ee,[2,53]),t(ee,[2,54]),t(ee,[2,55]),t(ee,[2,56]),{64:[1,100]},t(k,[2,59],{76:Z}),t(k,[2,64],{76:et}),{33:103,75:[1,102],89:g,90:y},t(tt,[2,65],{79:104,75:be,80:Re,81:ke,82:ye,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe}),t(D,[2,67]),t(D,[2,69]),t(D,[2,70]),t(D,[2,71]),t(D,[2,72]),t(D,[2,73]),t(D,[2,74]),t(D,[2,75]),t(D,[2,76]),t(D,[2,77]),t(D,[2,78]),t(k,[2,57],{76:et}),t(k,[2,58],{76:Z}),{5:te,28:105,31:se,34:re,36:ne,38:ce,40:ue},{27:[1,112],76:Z},{5:Ce,40:Ae,56:113,57:Ve,59:ve},{27:[1,118],76:Z},{33:119,89:g,90:y},{33:120,89:g,90:y},{75:be,78:121,79:82,80:Re,81:ke,82:ye,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},t(we,[2,61]),t(we,[2,63]),t(D,[2,68]),t(k,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:te,28:126,31:se,34:re,36:ne,38:ce,40:ue},t(k,[2,28]),{5:[1,127]},t(k,[2,42]),{32:[1,128]},{32:[1,129]},{5:Ce,40:Ae,56:130,57:Ve,59:ve},t(k,[2,47]),{5:[1,131]},t(k,[2,48]),t(k,[2,49]),t(tt,[2,66],{79:104,75:be,80:Re,81:ke,82:ye,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe}),{33:132,89:g,90:y},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},t(k,[2,27]),{5:te,28:145,31:se,34:re,36:ne,38:ce,40:ue},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(k,[2,46]),{5:Ce,40:Ae,56:152,57:Ve,59:ve},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},t(k,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(k,[2,43]),{5:te,28:159,31:se,34:re,36:ne,38:ce,40:ue},{5:te,28:160,31:se,34:re,36:ne,38:ce,40:ue},{5:te,28:161,31:se,34:re,36:ne,38:ce,40:ue},{5:te,28:162,31:se,34:re,36:ne,38:ce,40:ue},{5:Ce,40:Ae,56:163,57:Ve,59:ve},{5:Ce,40:Ae,56:164,57:Ve,59:ve},t(k,[2,23]),t(k,[2,24]),t(k,[2,25]),t(k,[2,26]),t(k,[2,44]),t(k,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:e(function(l,o){if(o.recoverable)this.trace(l);else{var h=Error(l);throw h.hash=o,h}},"parseError"),parse:e(function(l){var o=this,h=[0],n=[],p=[null],i=[],Le=this.table,c="",Oe=0,st=0,it=0,ct=2,rt=1,ht=i.slice.call(arguments,1),_=Object.create(this.lexer),me={yy:{}};for(var Pe in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Pe))me.yy[Pe]=this.yy[Pe];if(_.setInput(l,me.yy),me.yy.lexer=_,me.yy.parser=this,typeof _.yylloc>"u")_.yylloc={};var Ue=_.yylloc;i.push(Ue);var ut=_.options&&_.options.ranges;if(typeof me.yy.parseError==="function")this.parseError=me.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function mt(M){h.length=h.length-2*M,p.length=p.length-M,i.length=i.length-M}e(mt,"popStack");function nt(){var M=n.pop()||_.lex()||rt;if(typeof M!=="number"){if(M instanceof Array)n=M,M=n.pop();M=o.symbols_[M]||M}return M}e(nt,"lex");var x,Ye,de,O,gt,Be,Ee={},Me,z,at,Fe;while(!0){if(de=h[h.length-1],this.defaultActions[de])O=this.defaultActions[de];else{if(x===null||typeof x>"u")x=nt();O=Le[de]&&Le[de][x]}if(typeof O>"u"||!O.length||!O[0]){var Qe="";Fe=[];for(Me in Le[de])if(this.terminals_[Me]&&Me>ct)Fe.push("'"+this.terminals_[Me]+"'");if(_.showPosition)Qe="Parse error on line "+(Oe+1)+`:
1
+ import{e,Zt,r,b,C,S,E,T,A,I,L,s,N,ce,ae,ie,ft,ge,ye}from"./chunk-9dd1c37b.js";import{he}from"./chunk-ctcrk3qn.js";import{se}from"./chunk-anbn2ttv.js";var He=function(){var t=e(function(X,l,o,h){for(o=o||{},h=X.length;h--;o[X[h]]=l);return o},"o"),d=[1,3],f=[1,4],m=[1,5],a=[1,6],u=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],q=[1,22],w=[2,7],R=[1,26],V=[1,27],v=[1,28],F=[1,29],P=[1,33],U=[1,34],Y=[1,35],B=[1,36],Q=[1,37],H=[1,38],K=[1,24],W=[1,31],j=[1,32],G=[1,30],g=[1,39],y=[1,40],k=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],J=[1,61],de=[89,90],Ke=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],xe=[27,29],We=[1,70],je=[1,71],Ge=[1,72],ze=[1,73],Xe=[1,74],Je=[1,75],Ze=[1,76],Ee=[1,83],Z=[1,80],be=[1,84],Re=[1,85],ke=[1,86],_e=[1,87],Se=[1,88],Ie=[1,89],Te=[1,90],Ne=[1,91],qe=[1,92],we=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],ee=[63,64],et=[1,101],tt=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],D=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],te=[1,110],re=[1,106],ne=[1,107],le=[1,108],oe=[1,109],ue=[1,111],Ce=[1,116],Ae=[1,117],Ve=[1,114],ve=[1,115],$e={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:e(function(l,o,h,n,p,i,Le){var c=i.length-1;switch(p){case 4:this.$=i[c].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=i[c].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:n.setDirection("TB");break;case 18:n.setDirection("BT");break;case 19:n.setDirection("RL");break;case 20:n.setDirection("LR");break;case 21:n.addRequirement(i[c-3],i[c-4]);break;case 22:n.addRequirement(i[c-5],i[c-6]),n.setClass([i[c-5]],i[c-3]);break;case 23:n.setNewReqId(i[c-2]);break;case 24:n.setNewReqText(i[c-2]);break;case 25:n.setNewReqRisk(i[c-2]);break;case 26:n.setNewReqVerifyMethod(i[c-2]);break;case 29:this.$=n.RequirementType.REQUIREMENT;break;case 30:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=n.RiskLevel.LOW_RISK;break;case 36:this.$=n.RiskLevel.MED_RISK;break;case 37:this.$=n.RiskLevel.HIGH_RISK;break;case 38:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=n.VerifyType.VERIFY_TEST;break;case 42:n.addElement(i[c-3]);break;case 43:n.addElement(i[c-5]),n.setClass([i[c-5]],i[c-3]);break;case 44:n.setNewElementType(i[c-2]);break;case 45:n.setNewElementDocRef(i[c-2]);break;case 48:n.addRelationship(i[c-2],i[c],i[c-4]);break;case 49:n.addRelationship(i[c-2],i[c-4],i[c]);break;case 50:this.$=n.Relationships.CONTAINS;break;case 51:this.$=n.Relationships.COPIES;break;case 52:this.$=n.Relationships.DERIVES;break;case 53:this.$=n.Relationships.SATISFIES;break;case 54:this.$=n.Relationships.VERIFIES;break;case 55:this.$=n.Relationships.REFINES;break;case 56:this.$=n.Relationships.TRACES;break;case 57:this.$=i[c-2],n.defineClass(i[c-1],i[c]);break;case 58:n.setClass(i[c-1],i[c]);break;case 59:n.setClass([i[c-2]],i[c]);break;case 60:case 62:this.$=[i[c]];break;case 61:case 63:this.$=i[c-2].concat([i[c]]);break;case 64:this.$=i[c-2],n.setCssStyle(i[c-1],i[c]);break;case 65:this.$=[i[c]];break;case 66:i[c-2].push(i[c]),this.$=i[c-2];break;case 68:this.$=i[c-1]+i[c];break}},"anonymous"),table:[{3:1,4:2,6:d,9:f,11:m,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:d,9:f,11:m,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(u,[2,6]),{3:12,4:2,6:d,9:f,11:m,13:a},{1:[2,2]},{4:17,5:q,7:13,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},t(u,[2,4]),t(u,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:q,7:42,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:43,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:44,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:45,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:46,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:47,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:48,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:49,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:50,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},t(k,[2,17]),t(k,[2,18]),t(k,[2,19]),t(k,[2,20]),{30:60,33:62,75:J,89:g,90:y},{30:63,33:62,75:J,89:g,90:y},{30:64,33:62,75:J,89:g,90:y},t(de,[2,29]),t(de,[2,30]),t(de,[2,31]),t(de,[2,32]),t(de,[2,33]),t(de,[2,34]),t(Ke,[2,81]),t(Ke,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},t(xe,[2,79]),t(xe,[2,80]),{27:[1,67],29:[1,68]},t(xe,[2,85]),t(xe,[2,86]),{62:69,65:We,66:je,67:Ge,68:ze,69:Xe,70:Je,71:Ze},{62:77,65:We,66:je,67:Ge,68:ze,69:Xe,70:Je,71:Ze},{30:78,33:62,75:J,89:g,90:y},{73:79,75:Ee,76:Z,78:81,79:82,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},t(we,[2,60]),t(we,[2,62]),{73:93,75:Ee,76:Z,78:81,79:82,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},{30:94,33:62,75:J,76:Z,89:g,90:y},{5:[1,95]},{30:96,33:62,75:J,89:g,90:y},{5:[1,97]},{30:98,33:62,75:J,89:g,90:y},{63:[1,99]},t(ee,[2,50]),t(ee,[2,51]),t(ee,[2,52]),t(ee,[2,53]),t(ee,[2,54]),t(ee,[2,55]),t(ee,[2,56]),{64:[1,100]},t(k,[2,59],{76:Z}),t(k,[2,64],{76:et}),{33:103,75:[1,102],89:g,90:y},t(tt,[2,65],{79:104,75:Ee,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe}),t(D,[2,67]),t(D,[2,69]),t(D,[2,70]),t(D,[2,71]),t(D,[2,72]),t(D,[2,73]),t(D,[2,74]),t(D,[2,75]),t(D,[2,76]),t(D,[2,77]),t(D,[2,78]),t(k,[2,57],{76:et}),t(k,[2,58],{76:Z}),{5:te,28:105,31:re,34:ne,36:le,38:oe,40:ue},{27:[1,112],76:Z},{5:Ce,40:Ae,56:113,57:Ve,59:ve},{27:[1,118],76:Z},{33:119,89:g,90:y},{33:120,89:g,90:y},{75:Ee,78:121,79:82,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},t(we,[2,61]),t(we,[2,63]),t(D,[2,68]),t(k,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:te,28:126,31:re,34:ne,36:le,38:oe,40:ue},t(k,[2,28]),{5:[1,127]},t(k,[2,42]),{32:[1,128]},{32:[1,129]},{5:Ce,40:Ae,56:130,57:Ve,59:ve},t(k,[2,47]),{5:[1,131]},t(k,[2,48]),t(k,[2,49]),t(tt,[2,66],{79:104,75:Ee,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe}),{33:132,89:g,90:y},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},t(k,[2,27]),{5:te,28:145,31:re,34:ne,36:le,38:oe,40:ue},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(k,[2,46]),{5:Ce,40:Ae,56:152,57:Ve,59:ve},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},t(k,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(k,[2,43]),{5:te,28:159,31:re,34:ne,36:le,38:oe,40:ue},{5:te,28:160,31:re,34:ne,36:le,38:oe,40:ue},{5:te,28:161,31:re,34:ne,36:le,38:oe,40:ue},{5:te,28:162,31:re,34:ne,36:le,38:oe,40:ue},{5:Ce,40:Ae,56:163,57:Ve,59:ve},{5:Ce,40:Ae,56:164,57:Ve,59:ve},t(k,[2,23]),t(k,[2,24]),t(k,[2,25]),t(k,[2,26]),t(k,[2,44]),t(k,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:e(function(l,o){if(o.recoverable)this.trace(l);else{var h=Error(l);throw h.hash=o,h}},"parseError"),parse:e(function(l){var o=this,h=[0],n=[],p=[null],i=[],Le=this.table,c="",Oe=0,st=0,it=0,ct=2,rt=1,ht=i.slice.call(arguments,1),_=Object.create(this.lexer),me={yy:{}};for(var Pe in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Pe))me.yy[Pe]=this.yy[Pe];if(_.setInput(l,me.yy),me.yy.lexer=_,me.yy.parser=this,typeof _.yylloc>"u")_.yylloc={};var Ue=_.yylloc;i.push(Ue);var ut=_.options&&_.options.ranges;if(typeof me.yy.parseError==="function")this.parseError=me.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function mt(M){h.length=h.length-2*M,p.length=p.length-M,i.length=i.length-M}e(mt,"popStack");function nt(){var M=n.pop()||_.lex()||rt;if(typeof M!=="number"){if(M instanceof Array)n=M,M=n.pop();M=o.symbols_[M]||M}return M}e(nt,"lex");var x,Ye,fe,O,gt,Be,pe={},Me,z,at,Fe;while(!0){if(fe=h[h.length-1],this.defaultActions[fe])O=this.defaultActions[fe];else{if(x===null||typeof x>"u")x=nt();O=Le[fe]&&Le[fe][x]}if(typeof O>"u"||!O.length||!O[0]){var Qe="";Fe=[];for(Me in Le[fe])if(this.terminals_[Me]&&Me>ct)Fe.push("'"+this.terminals_[Me]+"'");if(_.showPosition)Qe="Parse error on line "+(Oe+1)+`:
2
2
  `+_.showPosition()+`
3
- Expecting `+Fe.join(", ")+", got '"+(this.terminals_[x]||x)+"'";else Qe="Parse error on line "+(Oe+1)+": Unexpected "+(x==rt?"end of input":"'"+(this.terminals_[x]||x)+"'");this.parseError(Qe,{text:_.match,token:this.terminals_[x]||x,line:_.yylineno,loc:Ue,expected:Fe})}if(O[0]instanceof Array&&O.length>1)throw Error("Parse Error: multiple actions possible at state: "+de+", token: "+x);switch(O[0]){case 1:if(h.push(x),p.push(_.yytext),i.push(_.yylloc),h.push(O[1]),x=null,!Ye){if(st=_.yyleng,c=_.yytext,Oe=_.yylineno,Ue=_.yylloc,it>0)it--}else x=Ye,Ye=null;break;case 2:if(z=this.productions_[O[1]][1],Ee.$=p[p.length-z],Ee._$={first_line:i[i.length-(z||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(z||1)].first_column,last_column:i[i.length-1].last_column},ut)Ee._$.range=[i[i.length-(z||1)].range[0],i[i.length-1].range[1]];if(Be=this.performAction.apply(Ee,[c,st,Oe,me.yy,O[1],p,i].concat(ht)),typeof Be<"u")return Be;if(z)h=h.slice(0,-1*z*2),p=p.slice(0,-1*z),i=i.slice(0,-1*z);h.push(this.productions_[O[1]][0]),p.push(Ee.$),i.push(Ee._$),at=Le[h[h.length-2]][h[h.length-1]],h.push(at);break;case 3:return!0}}return!0},"parse")},ot=function(){var X={EOF:1,parseError:e(function(o,h){if(this.yy.parser)this.yy.parser.parseError(o,h);else throw Error(o)},"parseError"),setInput:e(function(l,o){if(this.yy=o||this.yy||{},this._input=l,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 l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var o=l.match(/(?:\r\n?|\n).*/g);if(o)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),l},"input"),unput:e(function(l){var o=l.length,h=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var n=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),h.length-1)this.yylineno-=h.length-1;var p=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:h?(h.length===n.length?this.yylloc.first_column:0)+n[n.length-h.length].length-h[0].length:this.yylloc.first_column-o},this.options.ranges)this.yylloc.range=[p[0],p[0]+this.yyleng-o];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).
3
+ Expecting `+Fe.join(", ")+", got '"+(this.terminals_[x]||x)+"'";else Qe="Parse error on line "+(Oe+1)+": Unexpected "+(x==rt?"end of input":"'"+(this.terminals_[x]||x)+"'");this.parseError(Qe,{text:_.match,token:this.terminals_[x]||x,line:_.yylineno,loc:Ue,expected:Fe})}if(O[0]instanceof Array&&O.length>1)throw Error("Parse Error: multiple actions possible at state: "+fe+", token: "+x);switch(O[0]){case 1:if(h.push(x),p.push(_.yytext),i.push(_.yylloc),h.push(O[1]),x=null,!Ye){if(st=_.yyleng,c=_.yytext,Oe=_.yylineno,Ue=_.yylloc,it>0)it--}else x=Ye,Ye=null;break;case 2:if(z=this.productions_[O[1]][1],pe.$=p[p.length-z],pe._$={first_line:i[i.length-(z||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(z||1)].first_column,last_column:i[i.length-1].last_column},ut)pe._$.range=[i[i.length-(z||1)].range[0],i[i.length-1].range[1]];if(Be=this.performAction.apply(pe,[c,st,Oe,me.yy,O[1],p,i].concat(ht)),typeof Be<"u")return Be;if(z)h=h.slice(0,-1*z*2),p=p.slice(0,-1*z),i=i.slice(0,-1*z);h.push(this.productions_[O[1]][0]),p.push(pe.$),i.push(pe._$),at=Le[h[h.length-2]][h[h.length-1]],h.push(at);break;case 3:return!0}}return!0},"parse")},ot=function(){var X={EOF:1,parseError:e(function(o,h){if(this.yy.parser)this.yy.parser.parseError(o,h);else throw Error(o)},"parseError"),setInput:e(function(l,o){if(this.yy=o||this.yy||{},this._input=l,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 l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var o=l.match(/(?:\r\n?|\n).*/g);if(o)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),l},"input"),unput:e(function(l){var o=l.length,h=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var n=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),h.length-1)this.yylineno-=h.length-1;var p=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:h?(h.length===n.length?this.yylloc.first_column:0)+n[n.length-h.length].length-h[0].length:this.yylloc.first_column-o},this.options.ranges)this.yylloc.range=[p[0],p[0]+this.yyleng-o];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
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(l){this.unput(this.match.slice(l))},"less"),pastInput:e(function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var l=this.match;if(l.length<20)l+=this._input.substr(0,20-l.length);return(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var l=this.pastInput(),o=Array(l.length+1).join("-");return l+this.upcomingInput()+`
5
5
  `+o+"^"},"showPosition"),test_match:e(function(l,o){var h,n,p;if(this.options.backtrack_lexer){if(p={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)p.yylloc.range=this.yylloc.range.slice(0)}if(n=l[0].match(/(?:\r\n?|\n).*/g),n)this.yylineno+=n.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+l[0].length},this.yytext+=l[0],this.match+=l[0],this.matches=l,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(l[0].length),this.matched+=l[0],h=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(h)return h;else if(this._backtrack){for(var i in p)this[i]=p[i];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var l,o,h,n;if(!this._more)this.yytext="",this.match="";var p=this._currentRules();for(var i=0;i<p.length;i++)if(h=this._input.match(this.rules[p[i]]),h&&(!o||h[0].length>o[0].length)){if(o=h,n=i,this.options.backtrack_lexer)if(l=this.test_match(h,p[i]),l!==!1)return l;else if(this._backtrack){o=!1;continue}else return!1;else if(!this.options.flex)break}if(o){if(l=this.test_match(o,p[n]),l!==!1)return l;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 o=this.next();if(o)return o;else return this.lex()},"lex"),begin:e(function(o){this.conditionStack.push(o)},"begin"),popState:e(function(){var o=this.conditionStack.length-1;if(o>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(o){if(o=this.conditionStack.length-1-Math.abs(o||0),o>=0)return this.conditionStack[o];else return"INITIAL"},"topState"),pushState:e(function(o){this.begin(o)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(o,h,n,p){var i=p;switch(n){case 0:return"title";case 1:return this.begin("acc_title"),9;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),11;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;break;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;break;case 60:return this.begin("style"),74;break;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return h.yytext=h.yytext.trim(),89;break;case 68:return 75;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};return X}();$e.lexer=ot;function De(){this.yy={}}return e(De,"Parser"),De.prototype=$e,$e.Parser=De,new De}();He.parser=He;var dt=He,pt=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=S,this.getAccTitle=E,this.setAccDescription=T,this.getAccDescription=A,this.setDiagramTitle=I,this.getDiagramTitle=L,this.getConfig=e(()=>s().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{e(this,"RequirementDB")}getDirection(){return this.direction}setDirection(t){this.direction=t}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(t,d){if(!this.requirements.has(t))this.requirements.set(t,{name:t,type:d,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]});return this.resetLatestRequirement(),this.requirements.get(t)}getRequirements(){return this.requirements}setNewReqId(t){if(this.latestRequirement!==void 0)this.latestRequirement.requirementId=t}setNewReqText(t){if(this.latestRequirement!==void 0)this.latestRequirement.text=t}setNewReqRisk(t){if(this.latestRequirement!==void 0)this.latestRequirement.risk=t}setNewReqVerifyMethod(t){if(this.latestRequirement!==void 0)this.latestRequirement.verifyMethod=t}addElement(t){if(!this.elements.has(t))this.elements.set(t,{name:t,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),r.info("Added new element: ",t);return this.resetLatestElement(),this.elements.get(t)}getElements(){return this.elements}setNewElementType(t){if(this.latestElement!==void 0)this.latestElement.type=t}setNewElementDocRef(t){if(this.latestElement!==void 0)this.latestElement.docRef=t}addRelationship(t,d,f){this.relations.push({type:t,src:d,dst:f})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,C()}setCssStyle(t,d){for(let f of t){let m=this.requirements.get(f)??this.elements.get(f);if(!d||!m)return;for(let a of d)if(a.includes(","))m.cssStyles.push(...a.split(","));else m.cssStyles.push(a)}}setClass(t,d){for(let f of t){let m=this.requirements.get(f)??this.elements.get(f);if(m)for(let a of d){m.classes.push(a);let u=this.classes.get(a)?.styles;if(u)m.cssStyles.push(...u)}}}defineClass(t,d){for(let f of t){let m=this.classes.get(f);if(m===void 0)m={id:f,styles:[],textStyles:[]},this.classes.set(f,m);if(d)d.forEach(function(a){if(/color/.exec(a)){let u=a.replace("fill","bgFill");m.textStyles.push(u)}m.styles.push(a)});this.requirements.forEach((a)=>{if(a.classes.includes(f))a.cssStyles.push(...d.flatMap((u)=>u.split(",")))}),this.elements.forEach((a)=>{if(a.classes.includes(f))a.cssStyles.push(...d.flatMap((u)=>u.split(",")))})}}getClasses(){return this.classes}getData(){let t=s(),d=[],f=[];for(let a of this.requirements.values()){let u=a;u.id=a.name,u.cssStyles=a.cssStyles,u.cssClasses=a.classes.join(" "),u.shape="requirementBox",u.look=t.look,u.colorIndex=d.length,d.push(u)}for(let a of this.elements.values()){let u=a;u.shape="requirementBox",u.look=t.look,u.id=a.name,u.cssStyles=a.cssStyles,u.cssClasses=a.classes.join(" "),u.colorIndex=d.length,d.push(u)}let m=0;for(let a of this.relations){let u=a.type===this.Relationships.CONTAINS,q={id:`${a.src}-${a.dst}-${m++}`,start:this.requirements.get(a.src)?.name??this.elements.get(a.src)?.name,end:this.requirements.get(a.dst)?.name??this.elements.get(a.dst)?.name,label:`&lt;&lt;${a.type}&gt;&gt;`,classes:"relationshipLine",style:["fill:none",u?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:u?"normal":"dashed",arrowTypeStart:u?"requirement_contains":"",arrowTypeEnd:u?"":"requirement_arrow",look:t.look,labelType:"markdown"};f.push(q)}return{nodes:d,edges:f,other:{},config:t,direction:this.getDirection()}}},Et=e(()=>{let t=b(),{theme:d,themeVariables:f}=t,{bkgColorArray:m,borderColorArray:a}=f;if(!ae(d,a))return"";let u=ie(t.look),q="",w=le(m);for(let R=0;R<ft(a);R++){let V=a[R],v=w?`fill: ${m[R%m.length]};`:"";q+=`
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var o=this.next();if(o)return o;else return this.lex()},"lex"),begin:e(function(o){this.conditionStack.push(o)},"begin"),popState:e(function(){var o=this.conditionStack.length-1;if(o>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(o){if(o=this.conditionStack.length-1-Math.abs(o||0),o>=0)return this.conditionStack[o];else return"INITIAL"},"topState"),pushState:e(function(o){this.begin(o)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(o,h,n,p){var i=p;switch(n){case 0:return"title";case 1:return this.begin("acc_title"),9;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),11;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;break;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;break;case 60:return this.begin("style"),74;break;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return h.yytext=h.yytext.trim(),89;break;case 68:return 75;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};return X}();$e.lexer=ot;function De(){this.yy={}}return e(De,"Parser"),De.prototype=$e,$e.Parser=De,new De}();He.parser=He;var dt=He,pt=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=S,this.getAccTitle=E,this.setAccDescription=T,this.getAccDescription=A,this.setDiagramTitle=I,this.getDiagramTitle=L,this.getConfig=e(()=>s().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{e(this,"RequirementDB")}getDirection(){return this.direction}setDirection(t){this.direction=t}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(t,d){if(!this.requirements.has(t))this.requirements.set(t,{name:t,type:d,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]});return this.resetLatestRequirement(),this.requirements.get(t)}getRequirements(){return this.requirements}setNewReqId(t){if(this.latestRequirement!==void 0)this.latestRequirement.requirementId=t}setNewReqText(t){if(this.latestRequirement!==void 0)this.latestRequirement.text=t}setNewReqRisk(t){if(this.latestRequirement!==void 0)this.latestRequirement.risk=t}setNewReqVerifyMethod(t){if(this.latestRequirement!==void 0)this.latestRequirement.verifyMethod=t}addElement(t){if(!this.elements.has(t))this.elements.set(t,{name:t,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),r.info("Added new element: ",t);return this.resetLatestElement(),this.elements.get(t)}getElements(){return this.elements}setNewElementType(t){if(this.latestElement!==void 0)this.latestElement.type=t}setNewElementDocRef(t){if(this.latestElement!==void 0)this.latestElement.docRef=t}addRelationship(t,d,f){this.relations.push({type:t,src:d,dst:f})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,C()}setCssStyle(t,d){for(let f of t){let m=this.requirements.get(f)??this.elements.get(f);if(!d||!m)return;for(let a of d)if(a.includes(","))m.cssStyles.push(...a.split(","));else m.cssStyles.push(a)}}setClass(t,d){for(let f of t){let m=this.requirements.get(f)??this.elements.get(f);if(m)for(let a of d){m.classes.push(a);let u=this.classes.get(a)?.styles;if(u)m.cssStyles.push(...u)}}}defineClass(t,d){for(let f of t){let m=this.classes.get(f);if(m===void 0)m={id:f,styles:[],textStyles:[]},this.classes.set(f,m);if(d)d.forEach(function(a){if(/color/.exec(a)){let u=a.replace("fill","bgFill");m.textStyles.push(u)}m.styles.push(a)});this.requirements.forEach((a)=>{if(a.classes.includes(f))a.cssStyles.push(...d.flatMap((u)=>u.split(",")))}),this.elements.forEach((a)=>{if(a.classes.includes(f))a.cssStyles.push(...d.flatMap((u)=>u.split(",")))})}}getClasses(){return this.classes}getData(){let t=s(),d=[],f=[];for(let a of this.requirements.values()){let u=a;u.id=a.name,u.cssStyles=a.cssStyles,u.cssClasses=a.classes.join(" "),u.shape="requirementBox",u.look=t.look,u.colorIndex=d.length,d.push(u)}for(let a of this.elements.values()){let u=a;u.shape="requirementBox",u.look=t.look,u.id=a.name,u.cssStyles=a.cssStyles,u.cssClasses=a.classes.join(" "),u.colorIndex=d.length,d.push(u)}let m=0;for(let a of this.relations){let u=a.type===this.Relationships.CONTAINS,q={id:`${a.src}-${a.dst}-${m++}`,start:this.requirements.get(a.src)?.name??this.elements.get(a.src)?.name,end:this.requirements.get(a.dst)?.name??this.elements.get(a.dst)?.name,label:`&lt;&lt;${a.type}&gt;&gt;`,classes:"relationshipLine",style:["fill:none",u?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:u?"normal":"dashed",arrowTypeStart:u?"requirement_contains":"",arrowTypeEnd:u?"":"requirement_arrow",look:t.look,labelType:"markdown"};f.push(q)}return{nodes:d,edges:f,other:{},config:t,direction:this.getDirection()}}},Et=e(()=>{let t=b(),{theme:d,themeVariables:f}=t,{bkgColorArray:m,borderColorArray:a}=f;if(!ae(d,a))return"";let u=ie(t.look),q="",w=ce(m);for(let R=0;R<ft(a);R++){let V=a[R],v=w?`fill: ${m[R%m.length]};`:"";q+=`
7
7
 
8
8
  [data-look="${u}"][data-color-id="color-${R}"].node path {
9
9
  stroke: ${V};
@@ -81,4 +81,4 @@ Expecting `+Fe.join(", ")+", got '"+(this.terminals_[x]||x)+"'";else Qe="Parse e
81
81
  background-color: ${a??t.edgeLabelBackground};
82
82
  }
83
83
 
84
- `},"getStyles"),Rt=bt,lt={};Yt(lt,{draw:()=>kt});var kt=e(async function(t,d,f,m){r.info("REF0:"),r.info("Drawing requirement diagram (unified)",d);let{securityLevel:a,state:u,layout:q,look:w}=s(),R=m.db.getData(),V=fe(d,a);R.type=m.type,R.layoutAlgorithm=ge(q),R.nodeSpacing=u?.nodeSpacing??50,R.rankSpacing=u?.rankSpacing??50,R.markers=w==="neo"?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],R.diagramId=d,await he(R,V);let v=8;N.insertTitle(V,"requirementDiagramTitleText",u?.titleTopMargin??25,m.db.getDiagramTitle()),oe(V,v,"requirementDiagram",u?.useMaxWidth??!0)},"draw"),Mt={parser:dt,get db(){return new pt},renderer:lt,styles:Rt};export{Mt as diagram};
84
+ `},"getStyles"),Rt=bt,lt={};Zt(lt,{draw:()=>kt});var kt=e(async function(t,d,f,m){r.info("REF0:"),r.info("Drawing requirement diagram (unified)",d);let{securityLevel:a,state:u,layout:q,look:w}=s(),R=m.db.getData(),V=he(d,a);R.type=m.type,R.layoutAlgorithm=ye(q),R.nodeSpacing=u?.nodeSpacing??50,R.rankSpacing=u?.rankSpacing??50,R.markers=w==="neo"?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],R.diagramId=d,await ge(R,V);let v=8;N.insertTitle(V,"requirementDiagramTitleText",u?.titleTopMargin??25,m.db.getDiagramTitle()),se(V,v,"requirementDiagram",u?.useMaxWidth??!0)},"draw"),Mt={parser:dt,get db(){return new pt},renderer:lt,styles:Rt};export{Mt as diagram};
@@ -0,0 +1 @@
1
+ import{or}from"./chunk-qryrg2pq.js";export{or as createRailroadPegServices};
@@ -1,4 +1,4 @@
1
- import{W}from"./chunk-b1pe46zz.js";import{e,r,we,D,b,B,C,S,E,T,A,I,L,q,U}from"./chunk-y0m8hrwz.js";import{X}from"./chunk-taynqrgq.js";var ht=e(()=>({domains:new Map,transitions:[]}),"createDefaultData"),ot=ht(),St=e(()=>ot.domains,"getDomains"),Mt=e(()=>ot.transitions,"getTransitions"),zt=e((t)=>{if(!t)return;for(let n of t){let o=n.domain,a=(n.items??[]).map((l)=>({label:l.label}));ot.domains.set(o,{name:o,items:a})}},"setDomains"),Lt=e((t)=>{if(!t)return;ot.transitions=t.filter((n)=>{if(n.from===n.to)return r.warn(`Cynefin: self-loop transition on domain "${n.from}" is not meaningful and will be skipped.`),!1;return!0}).map((n)=>({from:n.from,to:n.to,label:n.label||void 0}))},"setTransitions"),Nt=e(()=>U({...D.cynefin,...b().cynefin}),"getConfig"),Pt=e(()=>{C(),ot=ht()},"clear"),it={getDomains:St,getTransitions:Mt,setDomains:zt,setTransitions:Lt,getConfig:Nt,clear:Pt,setAccTitle:S,getAccTitle:E,setDiagramTitle:I,getDiagramTitle:L,getAccDescription:A,setAccDescription:T},It=e((t)=>{W(t,it),it.setDomains(t.domains),it.setTransitions(t.transitions)},"populate"),Wt={parse:e(async(t)=>{let n=await X("cynefin",t);r.debug(n),It(n)},"parse")};function nt(t){let n=t+1831565813|0;return n=Math.imul(n^n>>>15,n|1),n^=n+Math.imul(n^n>>>7,n|61),((n^n>>>14)>>>0)/4294967296}e(nt,"seededRandom");function xt(t){let n=0;for(let o=0;o<t.length;o++){let a=t.charCodeAt(o);n=(n<<5)-n+a,n|=0}return n}e(xt,"hashString");function $t(t,n){if(typeof t==="number"&&Number.isFinite(t)&&t!==0)return t;return xt(n)}e($t,"resolveSeed");function bt(t,n,o,a){let l=t/2,p=a??t*0.015,at=7,Z=n/7,f=[];for(let i=0;i<=7;i++){let y=nt(o+i*17)*p*2-p;f.push({x:l+y,y:i*Z})}let N=`M${f[0].x},${f[0].y}`;for(let i=0;i<f.length-1;i++){let y=f[i],c=f[i+1],m=(y.y+c.y)/2,k=i%2===0?1:-1,h=p*1.5*k*nt(o+i*31+7),J=y.x+h,K=m,tt=c.x-h;N+=` C${J},${K} ${tt},${m} ${c.x},${c.y}`}return N}e(bt,"generateFoldPath");function wt(t,n,o,a){let l=n/2,p=a??n*0.015,at=7,Z=t/7,f=[];for(let i=0;i<=7;i++){let y=nt(o+i*23)*p*2-p;f.push({x:i*Z,y:l+y})}let N=`M${f[0].x},${f[0].y}`;for(let i=0;i<f.length-1;i++){let y=f[i],c=f[i+1],m=(y.x+c.x)/2,k=i%2===0?1:-1,h=p*1.5*k*nt(o+i*37+11),J=m,K=y.y+h,tt=m,G=c.y-h;N+=` C${J},${K} ${tt},${G} ${c.x},${c.y}`}return N}e(wt,"generateHorizontalBoundary");function Ct(t,n){let o=t/2,a=n*0.5,l=n,p=t*0.03;return[`M${o},${a}`,`C${o+p},${a+(l-a)*0.2}`,`${o-p*1.5},${a+(l-a)*0.55}`,`${o+p*0.5},${a+(l-a)*0.75}`,`C${o-p},${a+(l-a)*0.85}`,`${o+p*0.3},${a+(l-a)*0.95}`,`${o},${l}`].join(" ")}e(Ct,"generateCliffPath");function vt(t,n,o,a){return[`M${t-o},${n}`,`A${o},${a} 0 1,1 ${t+o},${n}`,`A${o},${a} 0 1,1 ${t-o},${n}`,"Z"].join(" ")}e(vt,"generateConfusionPath");var gt={complex:{model:"Probe → Sense → Respond",practice:"Emergent Practices"},complicated:{model:"Sense → Analyse → Respond",practice:"Good Practices"},clear:{model:"Sense → Categorise → Respond",practice:"Best Practices"},chaotic:{model:"Act → Sense → Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},Rt=e((t,n)=>{let o=t/2,a=n/2;return{complex:{cx:o/2,cy:a/2,x:0,y:0,w:o,h:a},complicated:{cx:o+o/2,cy:a/2,x:o,y:0,w:o,h:a},chaotic:{cx:o/2,cy:a+a/2,x:0,y:a,w:o,h:a},clear:{cx:o+o/2,cy:a+a/2,x:o,y:a,w:o,h:a},confusion:{cx:o,cy:a,x:o*0.7,y:a*0.7,w:o*0.6,h:a*0.6}}},"getDomainLayouts"),Ft=e(()=>{let t=we(),n=b();return U(t,n.themeVariables).cynefin},"getCynefinDomainColors"),lt=3,Vt=e((t,n,o,a)=>{let l=a.db,p=l.getDomains(),at=l.getTransitions(),Z=l.getDiagramTitle(),f=l.getAccTitle(),N=l.getAccDescription(),i=l.getConfig(),y=Ft();r.debug("Rendering Cynefin diagram");let{width:c,height:m,padding:k,showDomainDescriptions:h,boundaryAmplitude:J}=i,K=c+k*2,tt=m+k*2,G={complex:y.complexBg,complicated:y.complicatedBg,clear:y.clearBg,chaotic:y.chaoticBg,confusion:y.confusionBg},P=q(n);if(B(P,tt,K,i.useMaxWidth??!0),P.attr("viewBox",`0 0 ${K} ${tt}`),f)P.append("title").text(f);if(N)P.append("desc").text(N);let R=P.append("g").attr("transform",`translate(${k}, ${k})`),et=Rt(c,m),dt=$t(i.seed,n),Dt=R.append("g").attr("class","cynefin-backgrounds"),st=["complex","complicated","chaotic","clear"];for(let d of st){let s=et[d];Dt.append("rect").attr("class","cynefinDomain").attr("x",s.x).attr("y",s.y).attr("width",s.w).attr("height",s.h).attr("fill",G[d]).attr("fill-opacity",0.4).attr("stroke","none")}let ct=R.append("g").attr("class","cynefin-boundaries");ct.append("path").attr("class","cynefinBoundary").attr("d",bt(c,m,dt,J)).attr("fill","none"),ct.append("path").attr("class","cynefinBoundary").attr("d",wt(c,m,dt+100,J)).attr("fill","none"),ct.append("path").attr("class","cynefinCliff").attr("d",Ct(c,m)).attr("fill","none");let kt=c*0.15,Tt=m*0.15;R.append("path").attr("class","cynefinConfusion").attr("d",vt(c/2,m/2,kt,Tt)).attr("fill",G.confusion).attr("fill-opacity",0.5);let ft=R.append("g").attr("class","cynefin-labels");for(let d of st){let s=et[d];ft.append("text").attr("class","cynefinDomainLabel").attr("x",s.cx).attr("y",h?s.cy-30:s.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(d.charAt(0).toUpperCase()+d.slice(1))}if(ft.append("text").attr("class","cynefinDomainLabel").attr("x",c/2).attr("y",h?m/2-10:m/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){let d=R.append("g").attr("class","cynefin-subtitles");for(let s of st){let g=et[s],u=gt[s];d.append("text").attr("class","cynefinSubtitle").attr("x",g.cx).attr("y",g.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(u.model),d.append("text").attr("class","cynefinSubtitle").attr("x",g.cx).attr("y",g.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(u.practice)}d.append("text").attr("class","cynefinSubtitle").attr("x",c/2).attr("y",m/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(gt.confusion.practice)}let mt=R.append("g").attr("class","cynefin-items"),F=26,pt=10,At=["complex","complicated","chaotic","clear","confusion"];for(let d of At){let s=p.get(d);if(!s||s.items.length===0)continue;let g=et[d],u=d==="confusion",Y=s.items,O=0;if(u&&s.items.length>lt)O=s.items.length-lt,Y=s.items.slice(0,lt);let V;if(u){let w=h?22:14;V=g.cy+w}else V=g.cy+(h?25:15);if([...Y].forEach((w,_)=>{let M=V+_*(F+4),H=mt.append("g"),j=H.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",F/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(w.label),v=w.label.length*7,x=j.node();if(x&&typeof x.getBBox==="function"){let rt=x.getBBox();if(rt.width>0)v=rt.width}let z=v+pt*2,Q=g.cx-z/2;H.attr("transform",`translate(${Q}, ${M})`),H.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",z).attr("height",F).attr("rx",4).attr("ry",4).attr("fill",G[d]).attr("fill-opacity",0.95),j.attr("x",z/2).attr("y",F/2)}),O>0){let w=V+Y.length*(F+4),_=`+${O} more`,M=mt.append("g"),H=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",F/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(_),j=_.length*7,v=H.node();if(v&&typeof v.getBBox==="function"){let Q=v.getBBox();if(Q.width>0)j=Q.width}let x=j+pt*2,z=g.cx-x/2;M.attr("transform",`translate(${z}, ${w})`),M.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",F).attr("rx",4).attr("ry",4).attr("fill",G[d]).attr("fill-opacity",0.6),H.attr("x",x/2).attr("y",F/2)}}if(at.length>0){let d=P.select("defs").empty()?P.append("defs"):P.select("defs"),s=`cynefin-arrow-${n}`;d.append("marker").attr("id",s).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");let g=R.append("g").attr("class","cynefin-arrows");at.forEach((u)=>{let Y=et[u.from],O=et[u.to];if(!Y||!O)return;if(u.from===u.to){r.warn(`Cynefin renderer: skipping self-loop on domain "${u.from}"`);return}let{cx:V,cy:w}=Y,{cx:_,cy:M}=O,H=(V+_)/2,j=(w+M)/2,v=_-V,x=M-w,z=Math.sqrt(v*v+x*x),Q=z*0.15,rt=-x/z,Bt=v/z,yt=H+rt*Q,ut=j+Bt*Q;if(g.append("path").attr("class","cynefinArrowLine").attr("d",`M${V},${w} Q${yt},${ut} ${_},${M}`).attr("fill","none").attr("marker-end",`url(#${s})`),u.label)g.append("text").attr("class","cynefinArrowLabel").attr("x",yt).attr("y",ut-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(u.label)})}if(Z)R.append("text").attr("class","cynefinTitle").attr("x",c/2).attr("y",-k/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(Z)},"draw"),_t={draw:Vt},Et=e(()=>{let t=we(),n=b();return U(t,n.themeVariables).cynefin},"getCynefinTheme"),Ht=e(()=>{let t=Et();return`
1
+ import{W}from"./chunk-vjqmnkh2.js";import{e,r,we,D,b,B,C,S,E,T,A,I,L,V,U}from"./chunk-9dd1c37b.js";import{X}from"./chunk-qryrg2pq.js";var ht=e(()=>({domains:new Map,transitions:[]}),"createDefaultData"),ot=ht(),St=e(()=>ot.domains,"getDomains"),Mt=e(()=>ot.transitions,"getTransitions"),zt=e((t)=>{if(!t)return;for(let n of t){let o=n.domain,a=(n.items??[]).map((l)=>({label:l.label}));ot.domains.set(o,{name:o,items:a})}},"setDomains"),Lt=e((t)=>{if(!t)return;ot.transitions=t.filter((n)=>{if(n.from===n.to)return r.warn(`Cynefin: self-loop transition on domain "${n.from}" is not meaningful and will be skipped.`),!1;return!0}).map((n)=>({from:n.from,to:n.to,label:n.label||void 0}))},"setTransitions"),Nt=e(()=>U({...D.cynefin,...b().cynefin}),"getConfig"),Pt=e(()=>{C(),ot=ht()},"clear"),it={getDomains:St,getTransitions:Mt,setDomains:zt,setTransitions:Lt,getConfig:Nt,clear:Pt,setAccTitle:S,getAccTitle:E,setDiagramTitle:I,getDiagramTitle:L,getAccDescription:A,setAccDescription:T},It=e((t)=>{W(t,it),it.setDomains(t.domains),it.setTransitions(t.transitions)},"populate"),Wt={parse:e(async(t)=>{let n=await X("cynefin",t);r.debug(n),It(n)},"parse")};function nt(t){let n=t+1831565813|0;return n=Math.imul(n^n>>>15,n|1),n^=n+Math.imul(n^n>>>7,n|61),((n^n>>>14)>>>0)/4294967296}e(nt,"seededRandom");function xt(t){let n=0;for(let o=0;o<t.length;o++){let a=t.charCodeAt(o);n=(n<<5)-n+a,n|=0}return n}e(xt,"hashString");function $t(t,n){if(typeof t==="number"&&Number.isFinite(t)&&t!==0)return t;return xt(n)}e($t,"resolveSeed");function bt(t,n,o,a){let l=t/2,p=a??t*0.015,at=7,Z=n/7,f=[];for(let i=0;i<=7;i++){let y=nt(o+i*17)*p*2-p;f.push({x:l+y,y:i*Z})}let N=`M${f[0].x},${f[0].y}`;for(let i=0;i<f.length-1;i++){let y=f[i],c=f[i+1],m=(y.y+c.y)/2,k=i%2===0?1:-1,h=p*1.5*k*nt(o+i*31+7),J=y.x+h,K=m,tt=c.x-h;N+=` C${J},${K} ${tt},${m} ${c.x},${c.y}`}return N}e(bt,"generateFoldPath");function wt(t,n,o,a){let l=n/2,p=a??n*0.015,at=7,Z=t/7,f=[];for(let i=0;i<=7;i++){let y=nt(o+i*23)*p*2-p;f.push({x:i*Z,y:l+y})}let N=`M${f[0].x},${f[0].y}`;for(let i=0;i<f.length-1;i++){let y=f[i],c=f[i+1],m=(y.x+c.x)/2,k=i%2===0?1:-1,h=p*1.5*k*nt(o+i*37+11),J=m,K=y.y+h,tt=m,Y=c.y-h;N+=` C${J},${K} ${tt},${Y} ${c.x},${c.y}`}return N}e(wt,"generateHorizontalBoundary");function Ct(t,n){let o=t/2,a=n*0.5,l=n,p=t*0.03;return[`M${o},${a}`,`C${o+p},${a+(l-a)*0.2}`,`${o-p*1.5},${a+(l-a)*0.55}`,`${o+p*0.5},${a+(l-a)*0.75}`,`C${o-p},${a+(l-a)*0.85}`,`${o+p*0.3},${a+(l-a)*0.95}`,`${o},${l}`].join(" ")}e(Ct,"generateCliffPath");function vt(t,n,o,a){return[`M${t-o},${n}`,`A${o},${a} 0 1,1 ${t+o},${n}`,`A${o},${a} 0 1,1 ${t-o},${n}`,"Z"].join(" ")}e(vt,"generateConfusionPath");var gt={complex:{model:"Probe → Sense → Respond",practice:"Emergent Practices"},complicated:{model:"Sense → Analyse → Respond",practice:"Good Practices"},clear:{model:"Sense → Categorise → Respond",practice:"Best Practices"},chaotic:{model:"Act → Sense → Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},Rt=e((t,n)=>{let o=t/2,a=n/2;return{complex:{cx:o/2,cy:a/2,x:0,y:0,w:o,h:a},complicated:{cx:o+o/2,cy:a/2,x:o,y:0,w:o,h:a},chaotic:{cx:o/2,cy:a+a/2,x:0,y:a,w:o,h:a},clear:{cx:o+o/2,cy:a+a/2,x:o,y:a,w:o,h:a},confusion:{cx:o,cy:a,x:o*0.7,y:a*0.7,w:o*0.6,h:a*0.6}}},"getDomainLayouts"),Ft=e(()=>{let t=we(),n=b();return U(t,n.themeVariables).cynefin},"getCynefinDomainColors"),lt=3,Vt=e((t,n,o,a)=>{let l=a.db,p=l.getDomains(),at=l.getTransitions(),Z=l.getDiagramTitle(),f=l.getAccTitle(),N=l.getAccDescription(),i=l.getConfig(),y=Ft();r.debug("Rendering Cynefin diagram");let{width:c,height:m,padding:k,showDomainDescriptions:h,boundaryAmplitude:J}=i,K=c+k*2,tt=m+k*2,Y={complex:y.complexBg,complicated:y.complicatedBg,clear:y.clearBg,chaotic:y.chaoticBg,confusion:y.confusionBg},P=V(n);if(B(P,tt,K,i.useMaxWidth??!0),P.attr("viewBox",`0 0 ${K} ${tt}`),f)P.append("title").text(f);if(N)P.append("desc").text(N);let R=P.append("g").attr("transform",`translate(${k}, ${k})`),et=Rt(c,m),dt=$t(i.seed,n),Dt=R.append("g").attr("class","cynefin-backgrounds"),st=["complex","complicated","chaotic","clear"];for(let d of st){let s=et[d];Dt.append("rect").attr("class","cynefinDomain").attr("x",s.x).attr("y",s.y).attr("width",s.w).attr("height",s.h).attr("fill",Y[d]).attr("fill-opacity",0.4).attr("stroke","none")}let ct=R.append("g").attr("class","cynefin-boundaries");ct.append("path").attr("class","cynefinBoundary").attr("d",bt(c,m,dt,J)).attr("fill","none"),ct.append("path").attr("class","cynefinBoundary").attr("d",wt(c,m,dt+100,J)).attr("fill","none"),ct.append("path").attr("class","cynefinCliff").attr("d",Ct(c,m)).attr("fill","none");let kt=c*0.15,Tt=m*0.15;R.append("path").attr("class","cynefinConfusion").attr("d",vt(c/2,m/2,kt,Tt)).attr("fill",Y.confusion).attr("fill-opacity",0.5);let ft=R.append("g").attr("class","cynefin-labels");for(let d of st){let s=et[d];ft.append("text").attr("class","cynefinDomainLabel").attr("x",s.cx).attr("y",h?s.cy-30:s.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(d.charAt(0).toUpperCase()+d.slice(1))}if(ft.append("text").attr("class","cynefinDomainLabel").attr("x",c/2).attr("y",h?m/2-10:m/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){let d=R.append("g").attr("class","cynefin-subtitles");for(let s of st){let g=et[s],u=gt[s];d.append("text").attr("class","cynefinSubtitle").attr("x",g.cx).attr("y",g.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(u.model),d.append("text").attr("class","cynefinSubtitle").attr("x",g.cx).attr("y",g.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(u.practice)}d.append("text").attr("class","cynefinSubtitle").attr("x",c/2).attr("y",m/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(gt.confusion.practice)}let mt=R.append("g").attr("class","cynefin-items"),F=26,pt=10,At=["complex","complicated","chaotic","clear","confusion"];for(let d of At){let s=p.get(d);if(!s||s.items.length===0)continue;let g=et[d],u=d==="confusion",O=s.items,j=0;if(u&&s.items.length>lt)j=s.items.length-lt,O=s.items.slice(0,lt);let _;if(u){let w=h?22:14;_=g.cy+w}else _=g.cy+(h?25:15);if([...O].forEach((w,H)=>{let M=_+H*(F+4),G=mt.append("g"),q=G.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",F/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(w.label),v=w.label.length*7,x=q.node();if(x&&typeof x.getBBox==="function"){let rt=x.getBBox();if(rt.width>0)v=rt.width}let z=v+pt*2,Q=g.cx-z/2;G.attr("transform",`translate(${Q}, ${M})`),G.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",z).attr("height",F).attr("rx",4).attr("ry",4).attr("fill",Y[d]).attr("fill-opacity",0.95),q.attr("x",z/2).attr("y",F/2)}),j>0){let w=_+O.length*(F+4),H=`+${j} more`,M=mt.append("g"),G=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",F/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(H),q=H.length*7,v=G.node();if(v&&typeof v.getBBox==="function"){let Q=v.getBBox();if(Q.width>0)q=Q.width}let x=q+pt*2,z=g.cx-x/2;M.attr("transform",`translate(${z}, ${w})`),M.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",F).attr("rx",4).attr("ry",4).attr("fill",Y[d]).attr("fill-opacity",0.6),G.attr("x",x/2).attr("y",F/2)}}if(at.length>0){let d=P.select("defs").empty()?P.append("defs"):P.select("defs"),s=`cynefin-arrow-${n}`;d.append("marker").attr("id",s).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");let g=R.append("g").attr("class","cynefin-arrows");at.forEach((u)=>{let O=et[u.from],j=et[u.to];if(!O||!j)return;if(u.from===u.to){r.warn(`Cynefin renderer: skipping self-loop on domain "${u.from}"`);return}let{cx:_,cy:w}=O,{cx:H,cy:M}=j,G=(_+H)/2,q=(w+M)/2,v=H-_,x=M-w,z=Math.sqrt(v*v+x*x),Q=z*0.15,rt=-x/z,Bt=v/z,yt=G+rt*Q,ut=q+Bt*Q;if(g.append("path").attr("class","cynefinArrowLine").attr("d",`M${_},${w} Q${yt},${ut} ${H},${M}`).attr("fill","none").attr("marker-end",`url(#${s})`),u.label)g.append("text").attr("class","cynefinArrowLabel").attr("x",yt).attr("y",ut-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(u.label)})}if(Z)R.append("text").attr("class","cynefinTitle").attr("x",c/2).attr("y",-k/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(Z)},"draw"),_t={draw:Vt},Et=e(()=>{let t=we(),n=b();return U(t,n.themeVariables).cynefin},"getCynefinTheme"),Ht=e(()=>{let t=Et();return`
2
2
  .cynefinDomain {
3
3
  stroke: none;
4
4
  }