ompchamber 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/static/css/index.b938f4a693.css +2 -0
  3. package/dist/client/static/js/77.8022a800b5.js +139 -0
  4. package/dist/client/static/js/async/{1k.5974df3b87.js → 1k.a411fe5b43.js} +2 -2
  5. package/dist/client/static/js/async/{3y.71f2ccf3b6.js → 3y.3186ecdd63.js} +5 -5
  6. package/dist/client/static/js/async/5b.d88304bc13.js +1 -0
  7. package/dist/client/static/js/async/66.86544ad741.js +93 -0
  8. package/dist/client/static/js/async/7g.db82aca7ba.js +1 -0
  9. package/dist/client/static/js/async/7l.fadbbc0583.js +1 -0
  10. package/dist/client/static/js/async/{dc.856fda6560.js → ar.ad5c8822a8.js} +2 -2
  11. package/dist/client/static/js/async/cx.9c8268d542.js +226 -0
  12. package/dist/client/static/js/async/e.6443e739a2.js +79 -0
  13. package/dist/client/static/js/async/f7.46971e9d6d.js +2 -0
  14. package/dist/client/static/js/async/g.ee41bfed7f.js +2 -0
  15. package/dist/client/static/js/async/h1.d7091cef78.js +1 -0
  16. package/dist/client/static/js/async/hs.e7c59d8090.js +41 -0
  17. package/dist/client/static/js/async/jl.4911fa3383.js +1 -0
  18. package/dist/client/static/js/async/{k.7466330d1a.js → k.d16cd09ae7.js} +2 -2
  19. package/dist/client/static/js/async/{m.c038c71b9f.js → m.2e1ea3db9e.js} +2 -2
  20. package/dist/client/static/js/async/m3.d2b05f9604.js +2 -0
  21. package/dist/client/static/js/async/mt.853be2b5aa.js +1 -0
  22. package/dist/client/static/js/async/{oc.9c060c9779.js → oc.eb22093f05.js} +1 -1
  23. package/dist/client/static/js/async/{og.634fba99ac.js → og.53f068804c.js} +1 -1
  24. package/dist/client/static/js/async/{5b.a5ccbc19dc.js → q.b453193538.js} +10 -10
  25. package/dist/client/static/js/async/q5.88b50ffa95.js +286 -0
  26. package/dist/client/static/js/async/q8.7f1b48e9cd.js +21 -0
  27. package/dist/client/static/js/async/{sy.d16be843a7.js → s.aad2ecebc6.js} +1 -1
  28. package/dist/client/static/js/async/{tr.e878658140.js → tr.2a0d2b7600.js} +1 -1
  29. package/dist/client/static/js/async/vt.20406a5604.js +1 -0
  30. package/dist/client/static/js/async/x1.fe8af17016.js +90 -0
  31. package/dist/client/static/js/async/yg.5a94e1fc8a.js +149 -0
  32. package/dist/client/static/js/async/yx.af2936c368.js +10 -0
  33. package/dist/client/static/js/index.57b39ffa7f.js +34 -0
  34. package/package.json +1 -1
  35. package/src/client/components/common/file-icon/index.tsx +4 -1
  36. package/src/client/components/common/image-viewer/index.tsx +224 -0
  37. package/src/client/components/mobile/mobile-right-sidebar/FullEditor.tsx +57 -43
  38. package/src/client/components/mobile/mobile-right-sidebar/Header.tsx +31 -24
  39. package/src/client/components/settings/Modal.tsx +1 -0
  40. package/src/client/components/settings/categories/ChatSettings.tsx +6 -2
  41. package/src/client/components/settings/categories/chat-settings/TitleSection.tsx +99 -0
  42. package/src/client/components/workspace/btw-panel/AskCard.tsx +155 -0
  43. package/src/client/components/workspace/btw-panel/Composer.tsx +181 -0
  44. package/src/client/components/workspace/btw-panel/Messages.tsx +100 -0
  45. package/src/client/components/workspace/btw-panel/TopicMenu.tsx +106 -0
  46. package/src/client/components/workspace/btw-panel/attachments.ts +80 -0
  47. package/src/client/components/workspace/btw-panel/index.tsx +83 -0
  48. package/src/client/components/workspace/chat-timeline/ComposerDock.tsx +37 -21
  49. package/src/client/components/workspace/chat-timeline/MinimapShortcuts.tsx +49 -12
  50. package/src/client/components/workspace/chat-timeline/TimelineBody.tsx +10 -6
  51. package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.tsx +2 -1
  52. package/src/client/components/workspace/chat-timeline/chat-input/DropOverlay.tsx +17 -0
  53. package/src/client/components/workspace/chat-timeline/chat-input/index.tsx +44 -40
  54. package/src/client/components/workspace/chat-timeline/index.tsx +11 -9
  55. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Read.tsx +25 -7
  56. package/src/client/components/workspace/editor/Toolbar.tsx +32 -23
  57. package/src/client/components/workspace/editor/index.tsx +45 -36
  58. package/src/client/hooks/chat/btw/index.ts +180 -0
  59. package/src/client/hooks/chat/btw/intercept.ts +43 -0
  60. package/src/client/hooks/chat/btw/mode.ts +179 -0
  61. package/src/client/hooks/chat/composer/attachments.ts +198 -0
  62. package/src/client/hooks/chat/composer/drop-entries.ts +204 -0
  63. package/src/client/hooks/chat/composer/drop-payload.test.ts +97 -0
  64. package/src/client/hooks/chat/composer/drop-payload.ts +130 -0
  65. package/src/client/hooks/chat/composer/drop-references.ts +106 -0
  66. package/src/client/hooks/chat/composer/file-drop.test.ts +194 -0
  67. package/src/client/hooks/chat/composer/file-drop.ts +226 -0
  68. package/src/client/hooks/chat/composer/file-reads.test.ts +211 -0
  69. package/src/client/hooks/chat/composer/file-reads.ts +238 -0
  70. package/src/client/hooks/chat/composer/index.ts +7 -1
  71. package/src/client/hooks/chat/composer/pipeline.ts +181 -0
  72. package/src/client/hooks/chat/omp/index.ts +3 -3
  73. package/src/client/hooks/chat/omp/prompt-send.ts +5 -5
  74. package/src/client/hooks/chat/timeline/actions.ts +16 -1
  75. package/src/client/hooks/chat/timeline/index.ts +16 -8
  76. package/src/client/hooks/chat/timeline/prompt-text.ts +6 -1
  77. package/src/client/hooks/chat/timeline/send.ts +29 -65
  78. package/src/client/hooks/chat/timeline/session-load.ts +2 -1
  79. package/src/client/hooks/chat/timeline/session-pagination.ts +161 -14
  80. package/src/client/hooks/chat/timeline/user-turns.ts +149 -0
  81. package/src/client/hooks/editor/file-actions.ts +49 -0
  82. package/src/client/hooks/editor/use-file-editor.ts +38 -27
  83. package/src/client/hooks/editor/use-file-transfer.ts +78 -0
  84. package/src/client/tailwind.css +22 -0
  85. package/src/server/db.server.ts +21 -287
  86. package/src/server/lib/btw/frames.test.ts +68 -0
  87. package/src/server/lib/btw/frames.ts +56 -0
  88. package/src/server/lib/btw/prompt.ts +28 -0
  89. package/src/server/lib/btw/registry.server.ts +141 -0
  90. package/src/server/lib/btw/runtime.server.ts +324 -0
  91. package/src/server/lib/btw/schema.server.ts +44 -0
  92. package/src/server/lib/btw/service.server.ts +171 -0
  93. package/src/server/lib/btw/session-copy.server.ts +213 -0
  94. package/src/server/lib/btw/session-copy.test.ts +166 -0
  95. package/src/server/lib/btw/store.server.ts +240 -0
  96. package/src/server/lib/db/schema.ts +110 -0
  97. package/src/server/lib/db/seed.ts +160 -0
  98. package/src/server/lib/db/workspace-sync.ts +70 -0
  99. package/src/server/lib/fs/root.ts +37 -0
  100. package/src/server/lib/omp/rpc/frame-fold.ts +207 -0
  101. package/src/server/lib/omp/rpc/manager.ts +27 -123
  102. package/src/server/lib/omp/session/auto-title.server.test.ts +137 -0
  103. package/src/server/lib/omp/session/auto-title.server.ts +152 -0
  104. package/src/server/lib/omp/session/blobs.server.test.ts +100 -0
  105. package/src/server/lib/omp/session/blobs.server.ts +76 -0
  106. package/src/server/lib/omp/session/file-scan.ts +174 -0
  107. package/src/server/lib/omp/session/files.test.ts +147 -0
  108. package/src/server/lib/omp/session/files.ts +52 -35
  109. package/src/server/lib/omp/session/locator.ts +2 -2
  110. package/src/server/lib/omp/session/merge-stored.test.ts +118 -0
  111. package/src/server/lib/omp/session/merge-stored.ts +171 -0
  112. package/src/server/lib/omp/session/messages.ts +34 -0
  113. package/src/server/lib/omp/session/reader.ts +2 -2
  114. package/src/server/lib/omp/session/subagent-presence.ts +9 -6
  115. package/src/server/lib/queue/delivery.server.test.ts +57 -0
  116. package/src/server/lib/queue/delivery.server.ts +25 -3
  117. package/src/server/plugins/ssr.ts +29 -2
  118. package/src/server/routes/btw/events.ts +70 -0
  119. package/src/server/routes/btw/index.ts +8 -0
  120. package/src/server/routes/btw/topics.ts +87 -0
  121. package/src/server/routes/btw/ws.ts +136 -0
  122. package/src/server/routes/chat/index.ts +2 -0
  123. package/src/server/routes/chat/session.ts +1 -115
  124. package/src/server/routes/chat/turns.ts +87 -0
  125. package/src/server/routes/fs/index.ts +4 -1
  126. package/src/server/routes/fs/raw.ts +85 -0
  127. package/src/server/routes/fs/read.ts +58 -3
  128. package/src/server/routes/index.ts +7 -1
  129. package/src/shared/lib/chat/attachments.test.ts +208 -0
  130. package/src/shared/lib/chat/attachments.ts +200 -15
  131. package/src/shared/lib/chat/btw/client.ts +94 -0
  132. package/src/shared/lib/chat/composer/client.test.ts +48 -0
  133. package/src/shared/lib/chat/composer/client.ts +6 -1
  134. package/src/shared/lib/chat/composer/composer.test.ts +39 -1
  135. package/src/shared/lib/chat/composer/trigger.ts +45 -1
  136. package/src/shared/lib/chat/omp/agent-events.ts +33 -80
  137. package/src/shared/lib/chat/omp/socket.ts +11 -6
  138. package/src/shared/lib/chat/omp/sse.ts +11 -6
  139. package/src/shared/lib/chat/omp/tool-results.ts +102 -0
  140. package/src/shared/lib/chat/omp/transport.ts +19 -3
  141. package/src/shared/lib/chat/text-file.ts +148 -0
  142. package/src/shared/lib/chat/timeline/omp-callbacks.ts +18 -32
  143. package/src/shared/lib/chat/timeline/stream-coalescer.ts +66 -0
  144. package/src/shared/lib/chat/timeline/turns.ts +7 -0
  145. package/src/shared/lib/fs/file-kind.ts +50 -0
  146. package/src/shared/lib/fs/paths.ts +19 -1
  147. package/src/shared/lib/markdown/math.test.ts +20 -3
  148. package/src/shared/lib/omp/session/inlined-attachments.test.ts +82 -0
  149. package/src/shared/lib/omp/session/mapper.ts +24 -4
  150. package/src/shared/lib/omp/session/messages-map.ts +16 -3
  151. package/src/shared/lib/omp/session/messages-parse.ts +2 -2
  152. package/src/shared/lib/omp/session/parse-message-blocks.ts +85 -5
  153. package/src/shared/types/btw.ts +65 -0
  154. package/src/shared/types/chat.ts +39 -1
  155. package/src/shared/types/index.ts +1 -0
  156. package/src/shared/types/omp/agent.ts +14 -1
  157. package/src/shared/types/omp/session.ts +4 -1
  158. package/src/shared/types/settings/state.ts +5 -0
  159. package/dist/client/static/css/index.b859cc1cc5.css +0 -2
  160. package/dist/client/static/js/async/5bh.8b2363424f.js +0 -1
  161. package/dist/client/static/js/async/66.5dfa29f957.js +0 -93
  162. package/dist/client/static/js/async/7g.a7814350c3.js +0 -1
  163. package/dist/client/static/js/async/7l.7a6a377ecc.js +0 -1
  164. package/dist/client/static/js/async/cx.ca5feec570.js +0 -226
  165. package/dist/client/static/js/async/e.93214d622b.js +0 -79
  166. package/dist/client/static/js/async/g.a06ca3b3e9.js +0 -2
  167. package/dist/client/static/js/async/h1.e8d5aa8e80.js +0 -1
  168. package/dist/client/static/js/async/hs.6d480d0ded.js +0 -41
  169. package/dist/client/static/js/async/jl.874d352278.js +0 -1
  170. package/dist/client/static/js/async/mt.0352e976d8.js +0 -1
  171. package/dist/client/static/js/async/nam.b5663e919f.js +0 -10
  172. package/dist/client/static/js/async/q.23af2a358f.js +0 -21
  173. package/dist/client/static/js/async/q5.e683f7c26e.js +0 -286
  174. package/dist/client/static/js/async/s.222ee974f6.js +0 -2
  175. package/dist/client/static/js/async/uf.46ad6209fa.js +0 -2
  176. package/dist/client/static/js/async/vt.42416b707d.js +0 -1
  177. package/dist/client/static/js/async/x1.da8687159b.js +0 -90
  178. package/dist/client/static/js/async/yg.35bebd6d0c.js +0 -149
  179. package/dist/client/static/js/index.6e065017eb.js +0 -33
  180. package/dist/client/static/js/jp.50817896f3.js +0 -139
  181. /package/dist/client/static/js/{jp.50817896f3.js.LICENSE.txt → 77.8022a800b5.js.LICENSE.txt} +0 -0
  182. /package/dist/client/static/js/async/{1k.5974df3b87.js.LICENSE.txt → 1k.a411fe5b43.js.LICENSE.txt} +0 -0
  183. /package/dist/client/static/js/async/{3y.71f2ccf3b6.js.LICENSE.txt → 3y.3186ecdd63.js.LICENSE.txt} +0 -0
  184. /package/dist/client/static/js/async/{dc.856fda6560.js.LICENSE.txt → ar.ad5c8822a8.js.LICENSE.txt} +0 -0
  185. /package/dist/client/static/js/async/{m.c038c71b9f.js.LICENSE.txt → f7.46971e9d6d.js.LICENSE.txt} +0 -0
  186. /package/dist/client/static/js/async/{5b.a5ccbc19dc.js.LICENSE.txt → g.ee41bfed7f.js.LICENSE.txt} +0 -0
  187. /package/dist/client/static/js/async/{q.23af2a358f.js.LICENSE.txt → m.2e1ea3db9e.js.LICENSE.txt} +0 -0
  188. /package/dist/client/static/js/async/{s.222ee974f6.js.LICENSE.txt → m3.d2b05f9604.js.LICENSE.txt} +0 -0
  189. /package/dist/client/static/js/async/{g.a06ca3b3e9.js.LICENSE.txt → q.b453193538.js.LICENSE.txt} +0 -0
  190. /package/dist/client/static/js/async/{uf.46ad6209fa.js.LICENSE.txt → q8.7f1b48e9cd.js.LICENSE.txt} +0 -0
  191. /package/dist/client/static/js/async/{nam.b5663e919f.js.LICENSE.txt → yx.af2936c368.js.LICENSE.txt} +0 -0
  192. /package/dist/client/static/js/{index.6e065017eb.js.LICENSE.txt → index.57b39ffa7f.js.LICENSE.txt} +0 -0
@@ -1,90 +0,0 @@
1
- "use strict";(self.rspackChunkompchamber=self.rspackChunkompchamber||[]).push([["x1"],{WJ(e,t,n){var i=n("Yr"),s=n("M4"),o=n("Gt"),r=(0,o.K)((e,t,n,o)=>{e.attr("class",n);let{width:r,height:l,x:h,y:d}=a(e,t);(0,i.a$)(e,l,r,o);let g=c(h,d,r,l,t);e.attr("viewBox",g),s.R.debug(`viewBox configured: ${g} with padding: ${t}`)},"setupViewPortForSVG"),a=(0,o.K)((e,t)=>{let n=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:n.width+2*t,height:n.height+2*t,x:n.x,y:n.y}},"calculateDimensionsWithPadding"),c=(0,o.K)((e,t,n,i,s)=>`${e-s} ${t-s} ${n} ${i}`,"createViewBox");n.d(t,{P:()=>r})},OT(e,t,n){var i=n("Gt"),s=n("El"),o=(0,i.K)((e,t)=>{let n;return"sandbox"===t&&(n=(0,s.Ltv)("#i"+e)),("sandbox"===t?(0,s.Ltv)(n.nodes()[0].contentDocument.body):(0,s.Ltv)("body")).select(`[id="${e}"]`)},"getDiagramElement");n.d(t,{A:()=>o})},Px(e,t,n){n.d(t,{diagram:()=>_});var i=n("OT"),s=n("WJ"),o=n("mW");n("Q"),n("ix"),n("LC"),n("bQ"),n("Ut"),n("PF"),n("iV"),n("h5"),n("pK"),n("NH");var r=n("Yr"),a=n("M4"),c=n("Gt");let l=new Uint8Array(16),h=[];for(let e=0;e<256;++e)h.push((e+256).toString(16).slice(1));var d=n("HAv"),g=n("CM"),u=n("xh"),p=function(){var e=(0,c.K)(function(e,t,n,i){for(n=n||{},i=e.length;i--;n[e[i]]=t);return n},"o"),t=[1,4],n=[1,13],i=[1,12],s=[1,15],o=[1,16],r=[1,20],a=[1,19],l=[6,7,8],h=[1,26],d=[1,24],g=[1,25],u=[6,7,11],p=[1,6,13,15,16,19,22],y=[1,33],m=[1,34],f=[1,6,7,11,13,15,16,19,22],b={trace:(0,c.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:(0,c.K)(function(e,t,n,i,s,o,r){var a=o.length-1;switch(s){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",o[a].id),i.addNode(o[a-1].length,o[a].id,o[a].descr,o[a].type);break;case 16:i.getLogger().trace("Icon: ",o[a]),i.decorateNode({icon:o[a]});break;case 17:case 21:i.decorateNode({class:o[a]});break;case 18:i.getLogger().trace("SPACELIST");break;case 19:i.getLogger().trace("Node: ",o[a].id),i.addNode(0,o[a].id,o[a].descr,o[a].type);break;case 20:i.decorateNode({icon:o[a]});break;case 25:i.getLogger().trace("node found ..",o[a-2]),this.$={id:o[a-1],descr:o[a-1],type:i.getType(o[a-2],o[a])};break;case 26:this.$={id:o[a],descr:o[a],type:i.nodeType.DEFAULT};break;case 27:i.getLogger().trace("node found ..",o[a-3]),this.$={id:o[a-3],descr:o[a-1],type:i.getType(o[a-2],o[a])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:n,7:[1,10],9:9,12:11,13:i,14:14,15:s,16:o,17:17,18:18,19:r,22:a},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:n,12:21,13:i,14:14,15:s,16:o,17:17,18:18,19:r,22:a},{6:n,9:22,12:11,13:i,14:14,15:s,16:o,17:17,18:18,19:r,22:a},{6:h,7:d,10:23,11:g},e(u,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:r,22:a}),e(u,[2,18]),e(u,[2,19]),e(u,[2,20]),e(u,[2,21]),e(u,[2,23]),e(u,[2,24]),e(u,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7:d,10:32,11:g},{1:[2,7],6:n,12:21,13:i,14:14,15:s,16:o,17:17,18:18,19:r,22:a},e(p,[2,14],{7:y,11:m}),e(f,[2,8]),e(f,[2,9]),e(f,[2,10]),e(u,[2,15]),e(u,[2,16]),e(u,[2,17]),{20:[1,35]},{21:[1,36]},e(p,[2,13],{7:y,11:m}),e(f,[2,11]),e(f,[2,12]),{21:[1,37]},e(u,[2,25]),e(u,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,c.K)(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},"parseError"),parse:(0,c.K)(function(e){var t=this,n=[0],i=[],s=[null],o=[],r=this.table,a="",l=0,h=0,d=0,g=o.slice.call(arguments,1),u=Object.create(this.lexer),p={};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p[y]=this.yy[y]);u.setInput(e,p),p.lexer=u,p.parser=this,void 0===u.yylloc&&(u.yylloc={});var m=u.yylloc;o.push(m);var f=u.options&&u.options.ranges;function b(){var e;return"number"!=typeof(e=i.pop()||u.lex()||1)&&(e instanceof Array&&(e=(i=e).pop()),e=t.symbols_[e]||e),e}"function"==typeof p.parseError?this.parseError=p.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K)(function(e){n.length=n.length-2*e,s.length=s.length-e,o.length=o.length-e},"popStack"),(0,c.K)(b,"lex");for(var E,_,k,S,x,L,N,D,$,v={};;){if(k=n[n.length-1],this.defaultActions[k]?S=this.defaultActions[k]:(null==E&&(E=b()),S=r[k]&&r[k][E]),void 0===S||!S.length||!S[0]){var I="";for(L in $=[],r[k])this.terminals_[L]&&L>2&&$.push("'"+this.terminals_[L]+"'");I=u.showPosition?"Parse error on line "+(l+1)+":\n"+u.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[E]||E)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==E?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(I,{text:u.match,token:this.terminals_[E]||E,line:u.yylineno,loc:m,expected:$})}if(S[0]instanceof Array&&S.length>1)throw Error("Parse Error: multiple actions possible at state: "+k+", token: "+E);switch(S[0]){case 1:n.push(E),s.push(u.yytext),o.push(u.yylloc),n.push(S[1]),E=null,_?(E=_,_=null):(h=u.yyleng,a=u.yytext,l=u.yylineno,m=u.yylloc,d>0&&d--);break;case 2:if(N=this.productions_[S[1]][1],v.$=s[s.length-N],v._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},f&&(v._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),void 0!==(x=this.performAction.apply(v,[a,h,l,p,S[1],s,o].concat(g))))return x;N&&(n=n.slice(0,-1*N*2),s=s.slice(0,-1*N),o=o.slice(0,-1*N)),n.push(this.productions_[S[1]][0]),s.push(v.$),o.push(v._$),D=r[n[n.length-2]][n[n.length-1]],n.push(D);break;case 3:return!0}}return!0},"parse")};function E(){this.yy={}}return b.lexer={EOF:1,parseError:(0,c.K)(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},"parseError"),setInput:(0,c.K)(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,c.K)(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:(0,c.K)(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.K)(function(){return this._more=!0,this},"more"),reject:(0,c.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,c.K)(function(e){this.unput(this.match.slice(e))},"less"),pastInput:(0,c.K)(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.K)(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,c.K)(function(){var e=this.pastInput(),t=Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},"showPosition"),test_match:(0,c.K)(function(e,t){var n,i,s;if(this.options.backtrack_lexer&&(s={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&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack)for(var o in s)this[o]=s[o];return!1},"test_match"),next:(0,c.K)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var e,t,n,i,s=this._currentRules(),o=0;o<s.length;o++)if((n=this._input.match(this.rules[s[o]]))&&(!t||n[0].length>t[0].length)){if(t=n,i=o,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,s[o])))return e;if(!this._backtrack)return!1;t=!1;continue}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,s[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,c.K)(function(){var e=this.next();return e||this.lex()},"lex"),begin:(0,c.K)(function(e){this.conditionStack.push(e)},"begin"),popState:(0,c.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,c.K)(function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:(0,c.K)(function(e){this.begin(e)},"pushState"),stateStackSize:(0,c.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,c.K)(function(e,t,n,i){switch(n){case 0:return e.getLogger().trace("Found comment",t.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:e.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return e.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:e.getLogger().trace("end icon"),this.popState();break;case 10:return e.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return e.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return e.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return e.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return e.getLogger().trace("description:",t.yytext),"NODE_DESCR";case 27:return this.popState(),e.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),e.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),e.getLogger().trace("node end ...",t.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return e.getLogger().trace("Long description:",t.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}},(0,c.K)(E,"Parser"),E.prototype=b,b.Parser=E,new E}();p.parser=p;var y={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},m=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=y,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{(0,c.K)(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let t=this.nodes.length-1;t>=0;t--)if(this.nodes[t].level<e)return this.nodes[t];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,t,n,i){a.R.info("addNode",e,t,n,i);let s=!1;0===this.nodes.length?(this.baseLevel=e,e=0,s=!0):void 0!==this.baseLevel&&(e-=this.baseLevel,s=!1);let o=(0,r.D7)(),c=o.mindmap?.padding??r.UI.mindmap.padding;switch(i){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:c*=2}let l={id:this.count++,nodeId:(0,r.jZ)(t,o),level:e,descr:(0,r.jZ)(n,o),type:i,children:[],width:o.mindmap?.maxNodeWidth??r.UI.mindmap.maxNodeWidth,padding:c,isRoot:s},h=this.getParent(e);if(h)h.children.push(l),this.nodes.push(l);else if(s)this.nodes.push(l);else throw Error(`There can be only one root. No parent could be found for ("${l.descr}")`)}getType(e,t){switch(a.R.debug("In get type",e,t),e){case"[":return this.nodeType.RECT;case"(":return")"===t?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,t){this.elements[e]=t}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;let t=(0,r.D7)(),n=this.nodes[this.nodes.length-1];e.icon&&(n.icon=(0,r.jZ)(e.icon,t)),e.class&&(n.class=(0,r.jZ)(e.class,t))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,t){if(0===e.level?e.section=void 0:e.section=t,e.children)for(let[n,i]of e.children.entries()){let s=0===e.level?n%11:t;this.assignSections(i,s)}}flattenNodes(e,t){let n=(0,r.D7)(),i=["mindmap-node"];!0===e.isRoot?i.push("section-root","section--1"):void 0!==e.section&&i.push(`section-${e.section}`),e.class&&i.push(e.class);let s=i.join(" "),o=(0,c.K)(e=>{let t=(n.theme?.toLowerCase()??"").includes("redux");switch(e){case y.CIRCLE:return"mindmapCircle";case y.RECT:return"rect";case y.ROUNDED_RECT:return"rounded";case y.CLOUD:return"cloud";case y.BANG:return"bang";case y.HEXAGON:return"hexagon";case y.DEFAULT:return t?"rounded":"defaultMindmapNode";case y.NO_BORDER:default:return"rect"}},"getShapeFromType"),a={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:o(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:s,cssStyles:[],look:n.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(t.push(a),e.children)for(let n of e.children)this.flattenNodes(n,t)}generateEdges(e,t){if(!e.children)return;let n=(0,r.D7)();for(let i of e.children){let s="edge";void 0!==i.section&&(s+=` section-edge-${i.section}`);let o=e.level+1;s+=` edge-depth-${o}`;let r={id:`edge_${e.id}_${i.id}`,start:e.id.toString(),end:i.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:n.look,classes:s,depth:e.level,section:i.section};t.push(r),this.generateEdges(i,t)}}getData(){let e=this.getMindmap(),t=(0,r.D7)();if(void 0!==(0,r.TM)().layout||(t.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:t};a.R.debug("getData: mindmapRoot",e,t),this.assignSections(e);let n=[],i=[];this.flattenNodes(e,n),this.generateEdges(e,i),a.R.debug(`getData: processed ${n.length} nodes and ${i.length} edges`);let s=new Map;for(let e of n)s.set(e.id,{shape:e.shape,width:e.width,height:e.height,padding:e.padding});return{nodes:n,edges:i,config:t,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(s),type:"mindmap",diagramId:"mindmap-"+(crypto.randomUUID?crypto.randomUUID():function(e,t,n){let i=(e=e||{}).random??e.rng?.()??crypto.getRandomValues(l);if(i.length<16)throw Error("Random bytes length must be >= 16");if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){if((n=n||0)<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=i[e];return t}return function(e,t=0){return(h[e[t+0]]+h[e[t+1]]+h[e[t+2]]+h[e[t+3]]+"-"+h[e[t+4]]+h[e[t+5]]+"-"+h[e[t+6]]+h[e[t+7]]+"-"+h[e[t+8]]+h[e[t+9]]+"-"+h[e[t+10]]+h[e[t+11]]+h[e[t+12]]+h[e[t+13]]+h[e[t+14]]+h[e[t+15]]).toLowerCase()}(i)}(void 0,void 0,void 0))}}getLogger(){return a.R}},f=(0,c.K)(async(e,t,n,c)=>{a.R.debug("Rendering mindmap diagram\n"+e);let l=c.db,h=l.getData(),d=(0,i.A)(t,h.config.securityLevel);if(h.type=c.type,h.layoutAlgorithm=(0,o.q7)(h.config.layout,{fallback:"cose-bilkent"}),h.diagramId=t,!l.getMindmap())return;h.nodes.forEach(e=>{"rounded"===e.shape?(e.radius=15,e.taper=15,e.stroke="none",e.width=0,e.padding=15):"circle"===e.shape?e.padding=10:"rect"===e.shape?(e.width=0,e.padding=10):"hexagon"===e.shape&&(e.width=0,e.height=0)}),await (0,o.XX)(h,d);let{themeVariables:g}=(0,r.zj)(),{useGradient:u,gradientStart:p,gradientStop:y}=g;if(u&&p&&y){let e=d.attr("id"),t=d.append("defs").append("linearGradient").attr("id",`${e}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");t.append("stop").attr("offset","0%").attr("stop-color",p).attr("stop-opacity",1),t.append("stop").attr("offset","100%").attr("stop-color",y).attr("stop-opacity",1)}(0,s.P)(d,h.config.mindmap?.padding??r.UI.mindmap.padding,"mindmapDiagram",h.config.mindmap?.useMaxWidth??r.UI.mindmap.useMaxWidth)},"draw"),b=(0,c.K)(e=>{let{theme:t,look:n}=e,i="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e["lineColor"+t]=e["lineColor"+t]||e["cScaleInv"+t],(0,d.A)(e["lineColor"+t])?e["lineColor"+t]=(0,g.A)(e["lineColor"+t],20):e["lineColor"+t]=(0,u.A)(e["lineColor"+t],20);for(let s=0;s<e.THEME_COLOR_LIMIT;s++){let o=""+("neo"===n?Math.max(10-(s-1)*2,2):17-3*s);i+=`
2
- .section-${s-1} rect, .section-${s-1} path, .section-${s-1} circle, .section-${s-1} polygon, .section-${s-1} path {
3
- fill: ${e["cScale"+s]};
4
- }
5
- .section-${s-1} text {
6
- fill: ${e["cScaleLabel"+s]};
7
- }
8
- .section-${s-1} span {
9
- color: ${e["cScaleLabel"+s]};
10
- }
11
- .node-icon-${s-1} {
12
- font-size: 40px;
13
- color: ${e["cScaleLabel"+s]};
14
- }
15
- .section-edge-${s-1}{
16
- stroke: ${e["cScale"+s]};
17
- }
18
- .edge-depth-${s-1}{
19
- stroke-width: ${o};
20
- }
21
- .section-${s-1} line {
22
- stroke: ${e["cScaleInv"+s]} ;
23
- stroke-width: 3;
24
- }
25
-
26
- .disabled, .disabled circle, .disabled text {
27
- fill: lightgray;
28
- }
29
- .disabled text {
30
- fill: #efefef;
31
- }
32
- [data-look="neo"].mindmap-node.section-${s-1} rect, [data-look="neo"].mindmap-node.section-${s-1} path, [data-look="neo"].mindmap-node.section-${s-1} circle, [data-look="neo"].mindmap-node.section-${s-1} polygon {
33
- fill: ${"redux"===t||"redux-dark"===t||"neutral"===t?e.mainBkg:e["cScale"+s]};
34
- stroke: ${"redux"===t||"redux-dark"===t?e.nodeBorder:e["cScale"+s]};
35
- stroke-width: ${e.strokeWidth??2}px;
36
- }
37
- [data-look="neo"].section-edge-${s-1}{
38
- stroke: ${t?.includes("redux")||"neo-dark"===t?e.nodeBorder:e["cScale"+s]};
39
- }
40
- [data-look="neo"].mindmap-node.section-${s-1} text {
41
- fill: ${"redux"===t||"redux-dark"===t?e.nodeBorder:e["cScaleLabel"+("neutral"===t?1:s)]};
42
- }
43
- `}return i},"genSections"),E=(0,c.K)((e,t,n)=>{let i="";for(let s=0;s<e;s++)i+=`
44
- [data-look="neo"].mindmap-node.section-${s-1} rect, [data-look="neo"].mindmap-node.section-${s-1} path, [data-look="neo"].mindmap-node.section-${s-1} circle, [data-look="neo"].mindmap-node.section-${s-1} polygon {
45
- stroke: url(${t}-gradient);
46
- fill: ${n};
47
- }
48
- .section-${s-1} line {
49
- stroke-width: 0;
50
- }`;return i},"genGradient"),_={get db(){return new m},renderer:{draw:f},parser:p,styles:(0,c.K)(e=>{let{theme:t}=e,n=e.svgId,i=e.dropShadow?e.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none";return`
51
- .edge {
52
- stroke-width: 3;
53
- }
54
- ${b(e)}
55
- .section-root rect, .section-root path, .section-root circle, .section-root polygon {
56
- fill: ${e.git0};
57
- }
58
- .section-root text {
59
- fill: ${e.gitBranchLabel0};
60
- }
61
- .section-root span {
62
- color: ${t?.includes("redux")?e.nodeBorder:e.gitBranchLabel0};
63
- }
64
- .icon-container {
65
- height:100%;
66
- display: flex;
67
- justify-content: center;
68
- align-items: center;
69
- }
70
- .edge {
71
- fill: none;
72
- }
73
- .mindmap-node-label {
74
- dy: 1em;
75
- alignment-baseline: middle;
76
- text-anchor: middle;
77
- dominant-baseline: middle;
78
- text-align: center;
79
- }
80
- [data-look="neo"].mindmap-node {
81
- filter: ${i};
82
- }
83
- [data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon {
84
- fill: ${t?.includes("redux")?e.mainBkg:e.git0};
85
- }
86
- [data-look="neo"].mindmap-node.section-root .text-inner-tspan {
87
- fill: ${t?.includes("redux")?e.nodeBorder:e["cScaleLabel"+ +("neutral"===t)]};
88
- }
89
- ${e.useGradient&&n&&e.mainBkg?E(e.THEME_COLOR_LIMIT,n,e.mainBkg):""}
90
- `},"getStyles")}}}]);
@@ -1,149 +0,0 @@
1
- "use strict";(self.rspackChunkompchamber=self.rspackChunkompchamber||[]).push([["yg"],{gj(e,t,s){var i=s("Wq"),r=s("ja");t.A=(e,t)=>i.A.lang.round(r.A.parse(e)[t])},AY(e,t,s){s.d(t,{diagram:()=>eL});var i=s("VV8"),r=s("Q"),n=s("LC"),a=s("bQ");s("Ut"),s("PF"),s("iV"),s("h5");var o=s("pK"),l=s("NH"),c=s("Yr"),h=s("M4"),u=s("Gt"),g=s("OY"),d=s("DH"),y=s("VV"),p=s("SPK");function b(e,t){for(let s in t)Object.hasOwn(t,s)&&(e[s]=t[s])}var f=s("gj"),x=s("Cv"),S=s("El"),m=s("v2"),L=function(){var e=(0,u.K)(function(e,t,s,i){for(s=s||{},i=e.length;i--;s[e[i]]=t);return s},"o"),t=[1,15],s=[1,7],i=[1,13],r=[1,14],n=[1,19],a=[1,16],o=[1,17],l=[1,18],c=[8,30],h=[8,10,21,28,29,30,31,39,43,46],g=[1,23],d=[1,24],y=[8,10,15,16,21,28,29,30,31,39,43,46],p=[8,10,15,16,21,27,28,29,30,31,39,43,46],b=[1,49],f={trace:(0,u.K)(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:(0,u.K)(function(e,t,s,i,r,n,a){var o=n.length-1;switch(r){case 4:i.getLogger().debug("Rule: separator (NL) ");break;case 5:i.getLogger().debug("Rule: separator (Space) ");break;case 6:i.getLogger().debug("Rule: separator (EOF) ");break;case 7:i.getLogger().debug("Rule: hierarchy: ",n[o-1]),i.setHierarchy(n[o-1]);break;case 8:i.getLogger().debug("Stop NL ");break;case 9:i.getLogger().debug("Stop EOF ");break;case 10:i.getLogger().debug("Stop NL2 ");break;case 11:i.getLogger().debug("Stop EOF2 ");break;case 12:i.getLogger().debug("Rule: statement: ",n[o]),"number"==typeof n[o].length?this.$=n[o]:this.$=[n[o]];break;case 13:i.getLogger().debug("Rule: statement #2: ",n[o-1]),this.$=[n[o-1]].concat(n[o]);break;case 14:i.getLogger().debug("Rule: link: ",n[o],e),this.$={edgeTypeStr:n[o],label:""};break;case 15:i.getLogger().debug("Rule: LABEL link: ",n[o-3],n[o-1],n[o]),this.$={edgeTypeStr:n[o],label:n[o-1]};break;case 18:let l=parseInt(n[o]),c=i.generateId();this.$={id:c,type:"space",label:"",width:l,children:[]};break;case 23:i.getLogger().debug("Rule: (nodeStatement link node) ",n[o-2],n[o-1],n[o]," typestr: ",n[o-1].edgeTypeStr);let h=i.edgeStrToEdgeData(n[o-1].edgeTypeStr),u=i.edgeStrToEdgeStartData(n[o-1].edgeTypeStr),g=i.edgeStrToThickness(n[o-1].edgeTypeStr),d=i.edgeStrToPattern(n[o-1].edgeTypeStr);this.$=[{id:n[o-2].id,label:n[o-2].label,type:n[o-2].type,directions:n[o-2].directions},{id:n[o-2].id+"-"+n[o].id,start:n[o-2].id,end:n[o].id,label:n[o-1].label,type:"edge",thickness:g,pattern:d,directions:n[o].directions,arrowTypeEnd:h,arrowTypeStart:u},{id:n[o].id,label:n[o].label,type:i.typeStr2Type(n[o].typeStr),directions:n[o].directions}];break;case 24:i.getLogger().debug("Rule: nodeStatement (abc88 node size) ",n[o-1],n[o]),this.$={id:n[o-1].id,label:n[o-1].label,type:i.typeStr2Type(n[o-1].typeStr),directions:n[o-1].directions,widthInColumns:parseInt(n[o],10)};break;case 25:i.getLogger().debug("Rule: nodeStatement (node) ",n[o]),this.$={id:n[o].id,label:n[o].label,type:i.typeStr2Type(n[o].typeStr),directions:n[o].directions,widthInColumns:1};break;case 26:i.getLogger().debug("APA123",this?this:"na"),i.getLogger().debug("COLUMNS: ",n[o]),this.$={type:"column-setting",columns:"auto"===n[o]?-1:parseInt(n[o])};break;case 27:i.getLogger().debug("Rule: id-block statement : ",n[o-2],n[o-1]),i.generateId(),this.$={...n[o-2],type:"composite",children:n[o-1]};break;case 28:i.getLogger().debug("Rule: blockStatement : ",n[o-2],n[o-1],n[o]);let y=i.generateId();this.$={id:y,type:"composite",label:"",children:n[o-1]};break;case 29:i.getLogger().debug("Rule: node (NODE_ID separator): ",n[o]),this.$={id:n[o]};break;case 30:i.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",n[o-1],n[o]),this.$={id:n[o-1],label:n[o].label,typeStr:n[o].typeStr,directions:n[o].directions};break;case 31:i.getLogger().debug("Rule: dirList: ",n[o]),this.$=[n[o]];break;case 32:i.getLogger().debug("Rule: dirList: ",n[o-1],n[o]),this.$=[n[o-1]].concat(n[o]);break;case 33:i.getLogger().debug("Rule: nodeShapeNLabel: ",n[o-2],n[o-1],n[o]),this.$={typeStr:n[o-2]+n[o],label:n[o-1]};break;case 34:i.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",n[o-3],n[o-2]," #3:",n[o-1],n[o]),this.$={typeStr:n[o-3]+n[o],label:n[o-2],directions:n[o-1]};break;case 35:case 36:this.$={type:"classDef",id:n[o-1].trim(),css:n[o].trim()};break;case 37:this.$={type:"applyClass",id:n[o-1].trim(),styleClass:n[o].trim()};break;case 38:this.$={type:"applyStyles",id:n[o-1].trim(),stylesStr:n[o].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:s,22:8,23:9,24:10,25:11,26:12,28:i,29:r,31:n,39:a,43:o,46:l},{8:[1,20]},e(c,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:s,28:i,29:r,31:n,39:a,43:o,46:l}),e(h,[2,16],{14:22,15:g,16:d}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(y,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,31:n},{10:t,11:27,13:4,19:5,20:6,21:s,22:8,23:9,24:10,25:11,26:12,28:i,29:r,31:n,39:a,43:o,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(p,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(c,[2,13]),{26:35,31:n},{31:[2,14]},{17:[1,36]},e(y,[2,24]),{10:t,11:37,13:4,14:22,15:g,16:d,19:5,20:6,21:s,22:8,23:9,24:10,25:11,26:12,28:i,29:r,31:n,39:a,43:o,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(p,[2,30]),{18:[1,43]},{18:[1,44]},e(y,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{36:[1,47]},{33:48,34:b},{15:[1,50]},e(h,[2,27]),e(p,[2,33]),{38:[1,51]},{33:52,34:b,38:[2,31]},{31:[2,15]},e(p,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:(0,u.K)(function(e,t){if(t.recoverable)this.trace(e);else{var s=Error(e);throw s.hash=t,s}},"parseError"),parse:(0,u.K)(function(e){var t=this,s=[0],i=[],r=[null],n=[],a=this.table,o="",l=0,c=0,h=0,g=n.slice.call(arguments,1),d=Object.create(this.lexer),y={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(y[p]=this.yy[p]);d.setInput(e,y),y.lexer=d,y.parser=this,void 0===d.yylloc&&(d.yylloc={});var b=d.yylloc;n.push(b);var f=d.options&&d.options.ranges;function x(){var e;return"number"!=typeof(e=i.pop()||d.lex()||1)&&(e instanceof Array&&(e=(i=e).pop()),e=t.symbols_[e]||e),e}"function"==typeof y.parseError?this.parseError=y.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,u.K)(function(e){s.length=s.length-2*e,r.length=r.length-e,n.length=n.length-e},"popStack"),(0,u.K)(x,"lex");for(var S,m,L,k,_,w,E,D,$,I={};;){if(L=s[s.length-1],this.defaultActions[L]?k=this.defaultActions[L]:(null==S&&(S=x()),k=a[L]&&a[L][S]),void 0===k||!k.length||!k[0]){var N="";for(w in $=[],a[L])this.terminals_[w]&&w>2&&$.push("'"+this.terminals_[w]+"'");N=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[S]||S)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==S?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(N,{text:d.match,token:this.terminals_[S]||S,line:d.yylineno,loc:b,expected:$})}if(k[0]instanceof Array&&k.length>1)throw Error("Parse Error: multiple actions possible at state: "+L+", token: "+S);switch(k[0]){case 1:s.push(S),r.push(d.yytext),n.push(d.yylloc),s.push(k[1]),S=null,m?(S=m,m=null):(c=d.yyleng,o=d.yytext,l=d.yylineno,b=d.yylloc,h>0&&h--);break;case 2:if(E=this.productions_[k[1]][1],I.$=r[r.length-E],I._$={first_line:n[n.length-(E||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(E||1)].first_column,last_column:n[n.length-1].last_column},f&&(I._$.range=[n[n.length-(E||1)].range[0],n[n.length-1].range[1]]),void 0!==(_=this.performAction.apply(I,[o,c,l,y,k[1],r,n].concat(g))))return _;E&&(s=s.slice(0,-1*E*2),r=r.slice(0,-1*E),n=n.slice(0,-1*E)),s.push(this.productions_[k[1]][0]),r.push(I.$),n.push(I._$),D=a[s[s.length-2]][s[s.length-1]],s.push(D);break;case 3:return!0}}return!0},"parse")};function x(){this.yy={}}return f.lexer={EOF:1,parseError:(0,u.K)(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},"parseError"),setInput:(0,u.K)(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,u.K)(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:(0,u.K)(function(e){var t=e.length,s=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:(0,u.K)(function(){return this._more=!0,this},"more"),reject:(0,u.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,u.K)(function(e){this.unput(this.match.slice(e))},"less"),pastInput:(0,u.K)(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,u.K)(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,u.K)(function(){var e=this.pastInput(),t=Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},"showPosition"),test_match:(0,u.K)(function(e,t){var s,i,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],s=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack)for(var n in r)this[n]=r[n];return!1},"test_match"),next:(0,u.K)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var e,t,s,i,r=this._currentRules(),n=0;n<r.length;n++)if((s=this._input.match(this.rules[r[n]]))&&(!t||s[0].length>t[0].length)){if(t=s,i=n,this.options.backtrack_lexer){if(!1!==(e=this.test_match(s,r[n])))return e;if(!this._backtrack)return!1;t=!1;continue}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,r[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,u.K)(function(){var e=this.next();return e||this.lex()},"lex"),begin:(0,u.K)(function(e){this.conditionStack.push(e)},"begin"),popState:(0,u.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,u.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,u.K)(function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:(0,u.K)(function(e){this.begin(e)},"pushState"),stateStackSize:(0,u.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,u.K)(function(e,t,s,i){switch(s){case 0:return e.getLogger().debug("Found block-beta"),10;case 1:return e.getLogger().debug("Found id-block"),29;case 2:return e.getLogger().debug("Found block"),10;case 3:e.getLogger().debug(".",t.yytext);break;case 4:e.getLogger().debug("_",t.yytext);break;case 5:return 5;case 6:return t.yytext=-1,28;case 7:return t.yytext=t.yytext.replace(/columns\s+/,""),e.getLogger().debug("COLUMNS (LEX)",t.yytext),28;case 8:case 76:case 77:case 99:this.pushState("md_string");break;case 9:return"MD_STR";case 10:case 34:case 79:this.popState();break;case 11:this.pushState("string");break;case 12:e.getLogger().debug("LEX: POPPING STR:",t.yytext),this.popState();break;case 13:return e.getLogger().debug("LEX: STR end:",t.yytext),"STR";case 14:return t.yytext=t.yytext.replace(/space\:/,""),e.getLogger().debug("SPACE NUM (LEX)",t.yytext),21;case 15:return t.yytext="1",e.getLogger().debug("COLUMNS (LEX)",t.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:case 38:case 40:case 41:case 44:return this.popState(),e.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),e.getLogger().debug("Lex: ))"),"NODE_DEND";case 42:return this.popState(),e.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),e.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),e.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),e.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),e.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),e.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),e.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),e.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),e.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),e.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return e.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return e.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return e.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:case 59:case 60:case 61:case 64:return e.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return e.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 62:return e.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return e.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return e.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),e.getLogger().debug("LEX ARR START"),37;case 74:return e.getLogger().debug("Lex: NODE_ID",t.yytext),31;case 75:return e.getLogger().debug("Lex: EOF",t.yytext),8;case 78:return"NODE_DESCR";case 80:e.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:e.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return e.getLogger().debug("LEX: NODE_DESCR:",t.yytext),"NODE_DESCR";case 83:e.getLogger().debug("LEX POPPING"),this.popState();break;case 84:e.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (right): dir:",t.yytext),"DIR";case 86:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (left):",t.yytext),"DIR";case 87:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (x):",t.yytext),"DIR";case 88:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (y):",t.yytext),"DIR";case 89:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (up):",t.yytext),"DIR";case 90:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (down):",t.yytext),"DIR";case 91:return t.yytext="]>",e.getLogger().debug("Lex (ARROW_DIR end):",t.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 93:case 94:case 95:return e.getLogger().debug("Lex: LINK",t.yytext),15;case 96:case 97:case 98:return e.getLogger().debug("Lex: START_LINK",t.yytext),this.pushState("LLABEL"),16;case 100:return e.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 102:case 103:return this.popState(),e.getLogger().debug("Lex: LINK",t.yytext),15;case 104:return e.getLogger().debug("Lex: COLON",t.yytext),t.yytext=t.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}},(0,u.K)(x,"Parser"),x.prototype=f,f.Parser=x,new x}();L.parser=L;var k=new Map,_=[],w=new Map,E="color",D="fill",$=new Map,I="",N=(0,u.K)(e=>c.Y2.sanitizeText(e,(0,c.D7)()),"sanitizeText"),T=(0,u.K)(function(e,t=""){let s=$.get(e);s||(s={id:e,styles:[],textStyles:[]},$.set(e,s)),null!=t&&t.split(",").forEach(e=>{let t=e.replace(/([^;]*);/,"$1").trim();if(RegExp(E).exec(e)){let e=t.replace(D,"bgFill").replace(E,D);s.textStyles.push(e)}s.styles.push(t)})},"addStyleClass"),O=(0,u.K)(function(e,t=""){let s=k.get(e);null!=t&&(s.styles=t.split(","))},"addStyle2Node"),R=(0,u.K)(function(e,t){e.split(",").forEach(function(e){let s=k.get(e);if(void 0===s){let t=e.trim();s={id:t,type:"na",children:[]},k.set(t,s)}s.classes||(s.classes=[]),s.classes.push(t)})},"setCssClass"),C=0,z=(0,u.K)((e,t)=>{let s=e.flat(),i=[],r=s.find(e=>e?.type==="column-setting"),n=r?.columns??-1;for(let e of s){if("number"==typeof n&&n>0&&"column-setting"!==e.type&&"number"==typeof e.widthInColumns&&e.widthInColumns>n&&h.R.warn(`Block ${e.id} width ${e.widthInColumns} exceeds configured column width ${n}`),e.label&&(e.label=N(e.label)),"classDef"===e.type){T(e.id,e.css);continue}if("applyClass"===e.type){R(e.id,e?.styleClass??"");continue}if("applyStyles"===e.type){e?.stylesStr&&O(e.id,e?.stylesStr);continue}if("column-setting"===e.type)t.columns=e.columns??-1;else if("edge"===e.type){let t=(w.get(e.id)??0)+1;w.set(e.id,t),e.id=t+"-"+e.id,_.push(e)}else{e.label||("composite"===e.type?e.label="":e.label=e.id);let t=k.get(e.id);if(void 0===t?("composite"===e.type&&(e.colorIndex=C++),k.set(e.id,e)):("na"!==e.type&&(t.type=e.type),e.label!==e.id&&(t.label=e.label)),e.children&&z(e.children,e),"space"===e.type){let t=e.width??1;for(let s=0;s<t;s++){let t=function(e){if((0,g.s)(e))return e;let t=(0,d.b)(e);if(!function(e){switch((0,d.b)(e)){case y.R_:case y.Uw:case y.cT:case y.iq:case y.$V:case y.vC:case y.ri:case y.ML:case y.XZ:case y.i1:case y._u:case y.pj:case y.kj:case y.GX:case y.Av:case y.NA:case y.OG:case y.VP:case y.Qb:case y.q:case y.x6:case y.ZR:return!0;default:return!1}}(e))return{};if(Array.isArray(e)){let t=Array.from(e);return e.length>0&&"string"==typeof e[0]&&Object.hasOwn(e,"index")&&(t.index=e.index,t.input=e.input),t}if((0,p.i)(e))return new e.constructor(e.buffer,e.byteOffset,e.length);if("[object ArrayBuffer]"===t)return new ArrayBuffer(e.byteLength);if("[object DataView]"===t){let t=e.buffer,s=e.byteOffset,i=e.byteLength,r=new ArrayBuffer(i),n=new Uint8Array(t,s,i);return new Uint8Array(r).set(n),new DataView(r)}if("[object Boolean]"===t||"[object Number]"===t||"[object String]"===t){let s=new e.constructor(e.valueOf());return"[object String]"===t?function(e,t){let s=t.valueOf().length;for(let i in t)Object.hasOwn(t,i)&&(Number.isNaN(Number(i))||Number(i)>=s)&&(e[i]=t[i])}(s,e):b(s,e),s}if("[object Date]"===t)return new Date(Number(e));if("[object RegExp]"===t){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if("[object Symbol]"===t)return Object(Symbol.prototype.valueOf.call(e));if("[object Map]"===t){let t=new Map;return e.forEach((e,s)=>{t.set(s,e)}),t}if("[object Set]"===t){let t=new Set;return e.forEach(e=>{t.add(e)}),t}if("[object Arguments]"===t){let t={};return b(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}let s={};return function(e,t){let s=Object.getPrototypeOf(t);null!==s&&"function"==typeof t.constructor&&Object.setPrototypeOf(e,s)}(s,e),b(s,e),function(e,t){let s=Object.getOwnPropertySymbols(t);for(let i=0;i<s.length;i++){let r=s[i];Object.prototype.propertyIsEnumerable.call(t,r)&&(e[r]=t[r])}}(s,e),s}(e);t.id=t.id+"-"+s,k.set(t.id,t),i.push(t)}}else void 0===t&&i.push(e)}}t.children=i},"populateBlockDatabase"),A=[],K={id:"root",type:"composite",children:[],columns:-1},v=(0,u.K)(()=>{h.R.debug("Clear called"),(0,c.IU)(),k=new Map([["root",K={id:"root",type:"composite",children:[],columns:-1}]]),A=[],$=new Map,_=[],w=new Map,I="",C=0},"clear");function B(e){switch(h.R.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return h.R.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function P(e){return(h.R.debug("typeStr2Type",e),"=="===e)?"thick":"normal"}function F(e){switch(e.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}function j(e){switch(e.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}function M(e){return e.includes("==")?"thick":"normal"}function Y(e){return e.includes(".-")?"dotted":"solid"}(0,u.K)(B,"typeStr2Type"),(0,u.K)(P,"edgeTypeStr2Type"),(0,u.K)(F,"edgeStrToEdgeData"),(0,u.K)(j,"edgeStrToEdgeStartData"),(0,u.K)(M,"edgeStrToThickness"),(0,u.K)(Y,"edgeStrToPattern");var W=0,U=(0,u.K)(()=>(W++,"id-"+Math.random().toString(36).substr(2,12)+"-"+W),"generateId"),X=(0,u.K)(e=>{K.children=e,z(e,K),A=K.children},"setHierarchy"),V=(0,u.K)(e=>{let t=k.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),G=(0,u.K)(()=>[...k.values()],"getBlocksFlat"),H=(0,u.K)(()=>A||[],"getBlocks"),q=(0,u.K)(()=>_,"getEdges"),Z=(0,u.K)(e=>k.get(e),"getBlock"),J=(0,u.K)(e=>{k.set(e.id,e)},"setBlock"),Q=(0,u.K)(e=>{I=e},"setDiagramId"),ee=(0,u.K)(()=>I,"getDiagramId"),et=(0,u.K)(()=>h.R,"getLogger"),es=(0,u.K)(function(){return $},"getClasses"),ei={getConfig:(0,u.K)(()=>(0,c.zj)().block,"getConfig"),typeStr2Type:B,edgeTypeStr2Type:P,edgeStrToEdgeData:F,edgeStrToEdgeStartData:j,edgeStrToThickness:M,edgeStrToPattern:Y,getLogger:et,getBlocksFlat:G,getBlocks:H,getEdges:q,setHierarchy:X,getBlock:Z,setBlock:J,getColumns:V,getClasses:es,clear:v,generateId:U,setDiagramId:Q,getDiagramId:ee},er=(0,u.K)(e=>{let{theme:t,bkgColorArray:s,borderColorArray:i}=e;if(!(0,o.P1)(t,i))return"";let r=(0,o.rq)(e.look),n=(0,o.Ic)(s),a="";for(let t=0;t<(0,o.nw)(e.THEME_COLOR_LIMIT,i);t++){let e=i[t%i.length],o=n?`fill: ${s[t%s.length]};`:"",l=`[data-look="${r}"][data-color-id="color-${t}"]`;a+=`
2
-
3
- ${l}.node rect.composite {
4
- stroke: ${e};
5
- ${o}
6
- }
7
- `}return a},"genColor"),en=(0,u.K)((e,t)=>{let s=f.A,i=s(e,"r"),r=s(e,"g"),n=s(e,"b");return x.A(i,r,n,t)},"fade"),ea=(0,u.K)(e=>`${er(e)}
8
- .label {
9
- font-family: ${e.fontFamily};
10
- color: ${e.nodeTextColor||e.textColor};
11
- }
12
- .cluster-label text {
13
- fill: ${e.titleColor};
14
- }
15
- .cluster-label span {
16
- color: ${e.titleColor};
17
- }
18
-
19
-
20
-
21
- .label text,span {
22
- fill: ${e.nodeTextColor||e.textColor};
23
- color: ${e.nodeTextColor||e.textColor};
24
- }
25
-
26
- .node rect,
27
- .node circle,
28
- .node ellipse,
29
- .node polygon,
30
- .node path {
31
- fill: ${e.mainBkg};
32
- stroke: ${e.nodeBorder};
33
- /* From the theme, as every other diagram does. Pinned at 1px here, so block drew a
34
- thinner border than an identical flowchart node under any theme asking for more --
35
- the neo theme asks for 2. Nothing downstream corrected it: the neo rules set stroke
36
- and filter, never stroke-width. */
37
- stroke-width: ${e.strokeWidth??1}px;
38
- }
39
- .flowchart-label text {
40
- text-anchor: middle;
41
- }
42
- // .flowchart-label .text-outer-tspan {
43
- // text-anchor: middle;
44
- // }
45
- // .flowchart-label .text-inner-tspan {
46
- // text-anchor: start;
47
- // }
48
-
49
- .node .label {
50
- text-align: center;
51
- }
52
- .node.clickable {
53
- cursor: pointer;
54
- }
55
-
56
- .arrowheadPath {
57
- fill: ${e.arrowheadColor};
58
- }
59
-
60
- .edgePaths .path {
61
- stroke: ${e.lineColor};
62
- stroke-width: 2.0px;
63
- }
64
-
65
- .flowchart-link {
66
- stroke: ${e.lineColor};
67
- fill: none;
68
- }
69
-
70
- .edgeLabel {
71
- background-color: ${e.edgeLabelBackground};
72
- /*
73
- * This is for backward compatibility with existing code that didn't
74
- * add a \`<p>\` around edge labels.
75
- *
76
- * TODO: We should probably remove this in a future release.
77
- */
78
- p {
79
- margin: 0;
80
- padding: 0;
81
- display: inline;
82
- }
83
- rect {
84
- opacity: 0.5;
85
- background-color: ${e.edgeLabelBackground};
86
- fill: ${e.edgeLabelBackground};
87
- }
88
- text-align: center;
89
- }
90
-
91
- /* For html labels only */
92
- .labelBkg {
93
- background-color: ${e.edgeLabelBackground};
94
- }
95
-
96
- .node .cluster {
97
- // fill: ${en(e.mainBkg,.5)};
98
- fill: ${en(e.clusterBkg,.5)};
99
- stroke: ${en(e.clusterBorder,.2)};
100
- box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
101
- stroke-width: 1px;
102
- }
103
-
104
- .cluster text {
105
- fill: ${e.titleColor};
106
- }
107
-
108
- .cluster span {
109
- color: ${e.titleColor};
110
- }
111
- /* .cluster div {
112
- color: ${e.titleColor};
113
- } */
114
-
115
- div.mermaidTooltip {
116
- position: absolute;
117
- text-align: center;
118
- max-width: 200px;
119
- padding: 2px;
120
- font-family: ${e.fontFamily};
121
- font-size: 12px;
122
- background: ${e.tertiaryColor};
123
- border: 1px solid ${e.border2};
124
- border-radius: 2px;
125
- pointer-events: none;
126
- z-index: 100;
127
- }
128
-
129
- .flowchartTitleText {
130
- text-anchor: middle;
131
- font-size: 18px;
132
- fill: ${e.textColor};
133
- }
134
- ${(0,i.o)()}
135
- `,"getStyles");function eo(e,t){if(0===e||!Number.isInteger(e))throw Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(1===e)return{px:0,py:t};let s=Math.floor(t/e);return{px:t%e,py:s}}(0,u.K)(eo,"calculateBlockPosition");var el=(0,u.K)(e=>{let t=0,s=0;for(let i of e.children){let{width:e,height:r,x:n,y:a}=i.size??{width:0,height:0,x:0,y:0};if(h.R.debug("getMaxChildSize abc95 child:",i.id,"width:",e,"height:",r,"x:",n,"y:",a,i.type),"space"===i.type)continue;let o=e/(i.widthInColumns??1);o>t&&(t=o),r>s&&(s=r)}return{width:t,height:s}},"getMaxChildSize");function ec(e,t,s=0,i=0,r=8){h.R.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",s),e?.size?.width||(e.size={width:s,height:i,x:0,y:0});let n=0,a=0;if(e.children?.length>0){for(let s of e.children)ec(s,t,0,0,r);let o=el(e);for(let t of(n=o.width,a=o.height,h.R.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",n,a),e.children))t.size&&(h.R.debug(`abc95 Setting size of children of ${e.id} id=${t.id} ${n} ${a} ${JSON.stringify(t.size)}`),t.size.width=n*(t.widthInColumns??1)+r*((t.widthInColumns??1)-1),t.size.height=a,t.size.x=0,t.size.y=0,h.R.debug(`abc95 updating size of ${e.id} children child:${t.id} maxWidth:${n} maxHeight:${a}`));for(let s of e.children)ec(s,t,n,a,r);let l=e.columns??-1,c=0;for(let t of e.children)c+=t.widthInColumns??1;let u=e.children.length;l>0&&l<c&&(u=l);let g=Math.ceil(c/u),d=u*(n+r)+r,y=g*(a+r)+r;if(d<s){h.R.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${s} siblingHeight ${i} width ${d}`),d=s,y=i;let t=(s-u*r-r)/u,o=(i-g*r-r)/g;for(let s of(h.R.debug("Size indata abc88",e.id,"childWidth",t,"maxWidth",n),h.R.debug("Size indata abc88",e.id,"childHeight",o,"maxHeight",a),h.R.debug("Size indata abc88 xSize",u,"padding",r),e.children))s.size&&(s.size.width=t,s.size.height=o,s.size.x=0,s.size.y=0)}if(h.R.debug(`abc95 (finale calc) ${e.id} xSize ${u} ySize ${g} columns ${l}${e.children.length} width=${Math.max(d,e.size?.width||0)}`),d<(e?.size?.width||0)){d=e?.size?.width||0;let t=l>0?Math.min(e.children.length,l):e.children.length;if(t>0){let s=(d-t*r-r)/t;for(let t of(h.R.debug("abc95 (growing to fit) width",e.id,d,e.size?.width,s),e.children))t.size&&(t.size.width=s)}}e.size={width:d,height:y,x:0,y:0}}h.R.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}function eh(e,t,s=8){h.R.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);let i=e.columns??-1;if(h.R.debug("layoutBlocks columns abc95",e.id,"=>",i,e),e.children&&e.children.length>0){let r=e?.children[0]?.size?.width??0,n=e.children.length*r+(e.children.length-1)*s;h.R.debug("widthOfChildren 88",n,"posX");let a=new Map;{let t=0;for(let s of e.children){if(!s.size)continue;let{py:e}=eo(i,t),r=a.get(e)??0;s.size.height>r&&a.set(e,s.size.height);let n=s?.widthInColumns??1;i>0&&(n=Math.min(n,i-t%i)),t+=n}}let o=new Map;{let e=0;for(let t of[...a.keys()].sort((e,t)=>e-t))o.set(t,e),e+=(a.get(t)??0)+s}let l=0;h.R.debug("abc91 block?.size?.x",e.id,e?.size?.x);let c=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-s,u=0;for(let r of e.children){if(!r.size)continue;let{width:n,height:g}=r.size,{px:d,py:y}=eo(i,l);if(y!=u&&(u=y,c=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-s,h.R.debug("New row in layout for block",e.id," and child ",r.id,u)),h.R.debug(`abc89 layout blocks (child) id: ${r.id} Pos: ${l} (px, py) ${d},${y} (${e?.size?.x},${e?.size?.y}) parent: ${e.id} width: ${n}${s}`),e.size){let t=n/2;r.size.x=c+s+t,h.R.debug(`abc91 layout blocks (calc) px, pyid:${r.id} startingPos=X${c} new startingPosX${r.size.x} ${t} padding=${s} width=${n} halfWidth=${t} => x:${r.size.x} y:${r.size.y} ${r.widthInColumns} (width * (child?.w || 1)) / 2 ${n*(r?.widthInColumns??1)/2}`),c=r.size.x+t;let i=o.get(y)??0,l=a.get(y)??g;r.size.y=e.size.y-e.size.height/2+i+l/2+s,h.R.debug(`abc88 layout blocks (calc) px, pyid:${r.id}startingPosX${c}${s}${t}=>x:${r.size.x}y:${r.size.y}${r.widthInColumns}(width * (child?.w || 1)) / 2${n*(r?.widthInColumns??1)/2}`)}r.children&&eh(r,t,s);let p=r?.widthInColumns??1;i>0&&(p=Math.min(p,i-l%i)),l+=p,h.R.debug("abc88 columnsPos",r,l)}}h.R.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}function eu(e,{minX:t,minY:s,maxX:i,maxY:r}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&"root"!==e.id){let{x:n,y:a,width:o,height:l}=e.size;n-o/2<t&&(t=n-o/2),a-l/2<s&&(s=a-l/2),n+o/2>i&&(i=n+o/2),a+l/2>r&&(r=a+l/2)}if(e.children)for(let n of e.children)({minX:t,minY:s,maxX:i,maxY:r}=eu(n,{minX:t,minY:s,maxX:i,maxY:r}));return{minX:t,minY:s,maxX:i,maxY:r}}function eg(e){let t=e.getBlock("root");if(!t)return;let s=(0,c.D7)()?.block?.padding??8;ec(t,e,0,0,s),eh(t,e,s),h.R.debug("getBlocks",JSON.stringify(t,null,2));let{minX:i,minY:r,maxX:n,maxY:a}=eu(t);return{x:i,y:r,width:n-i,height:a-r}}function ed(e,t,s=!1){let i,r="default";(e?.classes?.length||0)>0&&(r=(e?.classes??[]).join(" ")),r+=" flowchart-label";let n=(e?.classes??[]).flatMap(e=>t.getClasses().get(e)?.styles??[]),a=0,o="rect";switch(e.type){case"round":a=5,o="rect";break;case"composite":a=0,o="composite",i=0;break;case"square":case"group":default:o="rect";break;case"diamond":o="question";break;case"hexagon":o="hexagon";break;case"block_arrow":o="block_arrow";break;case"odd":case"rect_left_inv_arrow":o="rect_left_inv_arrow";break;case"lean_right":o="lean_right";break;case"lean_left":o="lean_left";break;case"trapezoid":o="trapezoid";break;case"inv_trapezoid":o="inv_trapezoid";break;case"circle":o="circle";break;case"ellipse":o="ellipse";break;case"stadium":o="stadium";break;case"subroutine":o="subroutine";break;case"cylinder":o="cylinder";break;case"doublecircle":o="doublecircle"}let h=(0,l.sM)(e?.styles??[]),u=e.label,g=e.size??{width:0,height:0,x:0,y:0},d=t.getDiagramId();return{labelStyle:h.labelStyle,shape:o,label:u,labelText:u,rx:a,ry:a,class:r,cssClasses:r,cssStyles:e?.styles??[],cssCompiledStyles:n,style:h.style,id:e.id,domId:d?`${d}-${e.id}`:e.id,isGroup:!1,directions:e.directions,width:g.width||void 0,height:g.height||void 0,wrappingWidth:g.width||1/0,x:g.x,y:g.y,positioned:s,intersect:void 0,padding:i??(0,c.zj)()?.block?.padding??0,widthInColumns:e.widthInColumns??1,colorIndex:e.colorIndex,look:(0,c.zj)().look}}async function ey(e,t,s){let i=ed(t,s,!1);if("group"===t.type)return;let r=(0,c.zj)(),n=await (0,a.on)(e,i,{config:r}),o=n.node()?.getBBox()??{width:0,height:0},l=s.getBlock(i.id);l.size={width:o.width,height:o.height,x:0,y:0,node:n},s.setBlock(l),n.remove()}async function ep(e,t,s){let i=ed(t,s,!0);if("space"!==s.getBlock(i.id).type){let s=(0,c.zj)(),r=await (0,a.on)(e,i,{config:s});void 0!==i.colorIndex&&(0,o.XE)(r,i.colorIndex,s.theme,s.themeVariables?.borderColorArray),t.intersect=i?.intersect,(0,a.U_)(i)}}async function eb(e,t,s,i){for(let r of t)await i(e,r,s),r.children&&await eb(e,r.children,s,i)}async function ef(e,t,s){await eb(e,t,s,ey)}async function ex(e,t,s){await eb(e,t,s,ep)}async function eS(e,t,s,i,r){let a=new m.T({multigraph:!0,compound:!0});for(let e of(a.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8}),s))e.size&&a.setNode(e.id,{width:e.size.width,height:e.size.height,intersect:e.intersect});for(let s of t)if(s.start&&s.end){let t=i.getBlock(s.start),o=i.getBlock(s.end);if(t?.size&&o?.size){let i=t.size,l=o.size,c=[{x:i.x,y:i.y},{x:i.x+(l.x-i.x)/2,y:i.y+(l.y-i.y)/2},{x:l.x,y:l.y}],h=r?`${r}-${s.id}`:s.id,u="thick"===s.thickness?"edge-thickness-thick":"edge-thickness-normal",g="dotted"===s.pattern?"edge-pattern-dotted":"edge-pattern-solid",d=`${u} ${g} flowchart-link LS-a1 LE-b1`;(0,n.Jo)(e,{...s,id:h,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:c,classes:d},{},"block",a.node(s.start),a.node(s.end),r),s.label&&(await (0,n.jP)(e,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:c,classes:d}),(0,n.T_)({...s,x:c[1].x,y:c[1].y},{originalPath:c}))}}}(0,u.K)(ec,"setBlockSizes"),(0,u.K)(eh,"layoutBlocks"),(0,u.K)(eu,"findBounds"),(0,u.K)(eg,"layout"),(0,u.K)(ed,"getNodeFromBlock"),(0,u.K)(ey,"calculateBlockSize"),(0,u.K)(ep,"insertBlockPositioned"),(0,u.K)(eb,"performOperations"),(0,u.K)(ef,"calculateBlockSizes"),(0,u.K)(ex,"insertBlocks"),(0,u.K)(eS,"insertEdges");var em=(0,u.K)(function(e,t){return t.db.getClasses()},"getClasses"),eL={parser:L,db:ei,renderer:{draw:(0,u.K)(async function(e,t,s,i){let a,{securityLevel:o,block:l}=(0,c.zj)(),u=i.db;u.setDiagramId(t),"sandbox"===o&&(a=(0,S.Ltv)("#i"+t));let g="sandbox"===o?(0,S.Ltv)(a.nodes()[0].contentDocument.body):(0,S.Ltv)("body"),d="sandbox"===o?g.select(`[id="${t}"]`):(0,S.Ltv)(`[id="${t}"]`);(0,r.F)(d,(0,c.zj)()),(0,n.g0)(d,["point","circle","cross"],i.type,t);let y=u.getBlocks(),p=u.getBlocksFlat(),b=u.getEdges(),f=d.insert("g").attr("class","block");await ef(f,y,u);let x=eg(u);await ex(f,y,u),await eS(f,b,p,u,t);let m=f.node()?.getBBox(),L=m&&Number.isFinite(m.width)&&Number.isFinite(m.height)?m:x;if(L){let e=Math.max(1,Math.round(.125*(L.width/L.height))),t=L.height+e+10,s=L.width+10,{useMaxWidth:i}=l;(0,c.a$)(d,t,s,!!i),h.R.debug("Here Bounds",x,L),d.attr("viewBox",`${L.x-5} ${L.y-5} ${L.width+10} ${L.height+10}`)}},"draw"),getClasses:em},styles:ea}},VV8(e,t,s){var i=(0,s("Gt").K)(()=>`
136
- /* Font Awesome icon styling - consolidated */
137
- .label-icon {
138
- display: inline-block;
139
- height: 1em;
140
- overflow: visible;
141
- vertical-align: -0.125em;
142
- }
143
-
144
- .node .label-icon path {
145
- fill: currentColor;
146
- stroke: revert;
147
- stroke-width: revert;
148
- }
149
- `,"getIconStyles");s.d(t,{o:()=>i})}}]);