@demlik/tea 0.11.0 → 0.13.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 (163) hide show
  1. package/dist/agent/index.d.ts +6 -5
  2. package/dist/agent/index.js +11 -11
  3. package/dist/authed-call/index.d.ts +3 -2
  4. package/dist/authed-call/index.js +7 -7
  5. package/dist/await-terminal/index.d.ts +3 -2
  6. package/dist/await-terminal/index.js +2 -2
  7. package/dist/batch-window/index.d.ts +4 -3
  8. package/dist/batch-window/index.js +3 -3
  9. package/dist/cache/index.d.ts +3 -2
  10. package/dist/cache/index.js +4 -4
  11. package/dist/chart/index.d.ts +4 -3
  12. package/dist/chart/index.js +2 -2
  13. package/dist/chart/inspect/index.d.ts +5 -4
  14. package/dist/chart/inspect/index.js +3 -3
  15. package/dist/chart/inspect/react.d.ts +6 -5
  16. package/dist/chart/inspect/react.js +5 -5
  17. package/dist/chart/lane/index.d.ts +7 -6
  18. package/dist/chart/lane/index.js +6 -6
  19. package/dist/chart/lane/react.d.ts +6 -5
  20. package/dist/chart/lane/react.js +7 -7
  21. package/dist/chart/lane/viewer/assets/{chunk-5RXB4S5H-IPzIfiJ6.js → chunk-5RXB4S5H-CcNtpUd7.js} +1 -1
  22. package/dist/chart/lane/viewer/assets/{classDiagram-v2-OCEON4UE-DnUXz1Pv.js → classDiagram-v2-OCEON4UE-D4uAiFr8.js} +1 -1
  23. package/dist/chart/lane/viewer/assets/{dagre-VZM6K2ZE-Og2UIoWg.js → dagre-VZM6K2ZE-831qZcA8.js} +1 -1
  24. package/dist/chart/lane/viewer/assets/{index-sP-6AD57.css → index-9SkH5NA3.css} +1 -1
  25. package/dist/chart/lane/viewer/assets/{index-Obj05Jex.js → index-Bgt4sXpW.js} +4 -4
  26. package/dist/chart/lane/viewer/assets/{kanban-definition-27J2QSJJ-CxkCxJUN.js → kanban-definition-27J2QSJJ-G7PaPzy-.js} +1 -1
  27. package/dist/chart/lane/viewer/assets/{mindmap-definition-FAOFIHXS-DvgvXZhp.js → mindmap-definition-FAOFIHXS-CGj9nrVk.js} +1 -1
  28. package/dist/chart/lane/viewer/assets/{stateDiagram-OKZ733FA-CIZQWK5X.js → stateDiagram-OKZ733FA-B_88AzBS.js} +1 -1
  29. package/dist/chart/lane/viewer/assets/{stateDiagram-v2-UEYNNEHI-Sm6p0NoR.js → stateDiagram-v2-UEYNNEHI-CR5gcgq6.js} +1 -1
  30. package/dist/chart/lane/viewer/assets/{timeline-definition-Z64GVDOM-CV3KwSb-.js → timeline-definition-Z64GVDOM-CCv52MfY.js} +1 -1
  31. package/dist/chart/lane/viewer/index.html +2 -2
  32. package/dist/chart/report/index.d.ts +5 -4
  33. package/dist/chart/report/index.js +4 -4
  34. package/dist/{chunk-ZF6WDK2D.js → chunk-3I52QZZ5.js} +7 -7
  35. package/dist/{chunk-ZF6WDK2D.js.map → chunk-3I52QZZ5.js.map} +1 -1
  36. package/dist/{chunk-ZD6PNZBK.js → chunk-3ZAFFRRB.js} +3 -3
  37. package/dist/{chunk-ZD6PNZBK.js.map → chunk-3ZAFFRRB.js.map} +1 -1
  38. package/dist/{chunk-4KTWLPL5.js → chunk-4EQZ76JC.js} +3 -3
  39. package/dist/{chunk-4KTWLPL5.js.map → chunk-4EQZ76JC.js.map} +1 -1
  40. package/dist/{chunk-EUF7XOEE.js → chunk-4KLG43GY.js} +6 -6
  41. package/dist/{chunk-EUF7XOEE.js.map → chunk-4KLG43GY.js.map} +1 -1
  42. package/dist/{chunk-JER5O7PQ.js → chunk-7FRZ2CT2.js} +15 -7
  43. package/dist/chunk-7FRZ2CT2.js.map +1 -0
  44. package/dist/{chunk-ZCL7SCBK.js → chunk-CIQG5L42.js} +5 -5
  45. package/dist/{chunk-ZCL7SCBK.js.map → chunk-CIQG5L42.js.map} +1 -1
  46. package/dist/{chunk-TP5UPGLY.js → chunk-CLM6ERNO.js} +3 -3
  47. package/dist/{chunk-TP5UPGLY.js.map → chunk-CLM6ERNO.js.map} +1 -1
  48. package/dist/{chunk-ND3DH6KM.js → chunk-COS5MSTO.js} +3 -3
  49. package/dist/{chunk-ND3DH6KM.js.map → chunk-COS5MSTO.js.map} +1 -1
  50. package/dist/{chunk-JP5D6GSL.js → chunk-CRPZJVD2.js} +4 -4
  51. package/dist/{chunk-JP5D6GSL.js.map → chunk-CRPZJVD2.js.map} +1 -1
  52. package/dist/{chunk-SUST46KO.js → chunk-D62FDQKE.js} +3 -3
  53. package/dist/{chunk-SUST46KO.js.map → chunk-D62FDQKE.js.map} +1 -1
  54. package/dist/{chunk-JGVL3WPL.js → chunk-DGE4PV4A.js} +3 -3
  55. package/dist/{chunk-JGVL3WPL.js.map → chunk-DGE4PV4A.js.map} +1 -1
  56. package/dist/{chunk-WLGO64WC.js → chunk-DMYGQB4O.js} +4 -4
  57. package/dist/{chunk-WLGO64WC.js.map → chunk-DMYGQB4O.js.map} +1 -1
  58. package/dist/{chunk-A56OR5RF.js → chunk-L57ZOT5K.js} +3 -3
  59. package/dist/{chunk-A56OR5RF.js.map → chunk-L57ZOT5K.js.map} +1 -1
  60. package/dist/{chunk-5KJKJOFC.js → chunk-NR7BU22N.js} +3 -3
  61. package/dist/{chunk-5KJKJOFC.js.map → chunk-NR7BU22N.js.map} +1 -1
  62. package/dist/{chunk-7V4EVLZA.js → chunk-O4MVQTEJ.js} +4 -4
  63. package/dist/{chunk-7V4EVLZA.js.map → chunk-O4MVQTEJ.js.map} +1 -1
  64. package/dist/{chunk-B5VXOFMZ.js → chunk-OOYD44JI.js} +54 -3
  65. package/dist/chunk-OOYD44JI.js.map +1 -0
  66. package/dist/{chunk-7SVIRMC6.js → chunk-RH5EFRVJ.js} +3 -3
  67. package/dist/{chunk-7SVIRMC6.js.map → chunk-RH5EFRVJ.js.map} +1 -1
  68. package/dist/{chunk-3JU6657S.js → chunk-VYFAZN3F.js} +3 -3
  69. package/dist/{chunk-3JU6657S.js.map → chunk-VYFAZN3F.js.map} +1 -1
  70. package/dist/chunk-XGELA764.js +163 -0
  71. package/dist/chunk-XGELA764.js.map +1 -0
  72. package/dist/{chunk-I5OV65MS.js → chunk-YUXP55T2.js} +3 -3
  73. package/dist/{chunk-I5OV65MS.js.map → chunk-YUXP55T2.js.map} +1 -1
  74. package/dist/{chunk-E6GEDSF4.js → chunk-YWIKDKHY.js} +3 -3
  75. package/dist/{chunk-E6GEDSF4.js.map → chunk-YWIKDKHY.js.map} +1 -1
  76. package/dist/{chunk-5EHLEUTL.js → chunk-ZSUUOEPL.js} +51 -6
  77. package/dist/chunk-ZSUUOEPL.js.map +1 -0
  78. package/dist/{core-Bjc0bS8j.d.ts → core-Co0LWkIA.d.ts} +190 -3
  79. package/dist/deadline/index.d.ts +3 -2
  80. package/dist/deadline/index.js +3 -3
  81. package/dist/do/index.d.ts +12 -8
  82. package/dist/do/index.js +11 -11
  83. package/dist/do/index.js.map +1 -1
  84. package/dist/{durable-effects-D8SqU_if.d.ts → durable-effects-C6uwzjb5.d.ts} +1 -1
  85. package/dist/extension/index.d.ts +3 -2
  86. package/dist/extension/index.js +3 -3
  87. package/dist/extension/react.js +3 -3
  88. package/dist/extension/subs/index.d.ts +3 -2
  89. package/dist/fan-out/index.d.ts +3 -2
  90. package/dist/{fold-Blbhru48.d.ts → fold-BJPdjc9w.d.ts} +1 -1
  91. package/dist/{graph-CcjWZVrd.d.ts → graph-B3L5e0N1.d.ts} +1 -1
  92. package/dist/idempotent-intake/index.d.ts +3 -2
  93. package/dist/index.d.ts +14 -6
  94. package/dist/index.js +2 -2
  95. package/dist/journal/index.d.ts +373 -0
  96. package/dist/journal/index.js +3 -0
  97. package/dist/journal/index.js.map +1 -0
  98. package/dist/llm-call/index.d.ts +3 -2
  99. package/dist/llm-call/index.js +8 -8
  100. package/dist/{machine-0OmPvsy_.d.ts → machine-BtFWQmmq.d.ts} +1 -1
  101. package/dist/machine-viz/index.d.ts +2 -1
  102. package/dist/machine-viz/index.js +2 -2
  103. package/dist/mem/index.d.ts +3 -2
  104. package/dist/monitored-run/index.d.ts +4 -3
  105. package/dist/monitored-run/index.js +5 -5
  106. package/dist/node/index.d.ts +31 -3
  107. package/dist/node/index.js +92 -3
  108. package/dist/node/index.js.map +1 -1
  109. package/dist/paginated-walk/index.d.ts +3 -2
  110. package/dist/paginated-walk/index.js +7 -7
  111. package/dist/parity/index.d.ts +3 -2
  112. package/dist/parity/index.js +3 -3
  113. package/dist/pbt/arbitraries/index.d.ts +2 -1
  114. package/dist/pbt/index.d.ts +2 -1
  115. package/dist/pbt/index.js +3 -3
  116. package/dist/pbt/runners/index.d.ts +2 -1
  117. package/dist/pbt/runners/index.js +3 -3
  118. package/dist/poller/index.d.ts +3 -2
  119. package/dist/poller/index.js +3 -3
  120. package/dist/prediction/index.d.ts +2 -1
  121. package/dist/prediction/index.js +2 -2
  122. package/dist/pure/index.d.ts +2 -1
  123. package/dist/pure/index.js +2 -2
  124. package/dist/react/index.d.ts +4 -3
  125. package/dist/react/index.js +2 -2
  126. package/dist/react/index.js.map +1 -1
  127. package/dist/reconciler/index.d.ts +3 -2
  128. package/dist/reconciler/index.js +7 -7
  129. package/dist/recorder/index.d.ts +3 -2
  130. package/dist/{reducer-BqyoVyBG.d.ts → reducer-4GNR6b8B.d.ts} +2 -2
  131. package/dist/resilient-call/index.d.ts +3 -2
  132. package/dist/resilient-call/index.js +6 -6
  133. package/dist/{run-BVeqJDBF.d.ts → run-pAcmBpah.d.ts} +3 -3
  134. package/dist/{runtime-types-Bxc637bp.d.ts → runtime-types-CNLmhWif.d.ts} +17 -2
  135. package/dist/saga/index.d.ts +3 -2
  136. package/dist/{samples-DCt6nF8H.d.ts → samples-B3My5oh2.d.ts} +1 -1
  137. package/dist/snapshot/index.d.ts +2 -1
  138. package/dist/snapshot/index.js +3 -3
  139. package/dist/subs/index.d.ts +4 -3
  140. package/dist/subs/index.js +3 -3
  141. package/dist/testing/index.d.ts +3 -2
  142. package/dist/testing/index.js +2 -2
  143. package/dist/throttled-input/index.d.ts +3 -2
  144. package/dist/throttled-input/index.js +6 -6
  145. package/dist/token-refresh/index.d.ts +2 -1
  146. package/dist/token-refresh/index.js +3 -3
  147. package/dist/trace-replay/index.d.ts +3 -2
  148. package/dist/trace-replay/index.js +3 -3
  149. package/dist/{types-D7u9DkH7.d.ts → types-XS_miRnB.d.ts} +1 -1
  150. package/dist/with-deadline/index.d.ts +2 -1
  151. package/dist/with-deadline/index.js +2 -2
  152. package/dist/with-resilience/index.d.ts +3 -2
  153. package/dist/with-resilience/index.js +6 -6
  154. package/dist/with-telemetry/index.d.ts +2 -1
  155. package/dist/with-telemetry/index.js +2 -2
  156. package/dist/work-queue/adapter.d.ts +3 -2
  157. package/dist/work-queue/index.d.ts +3 -2
  158. package/dist/work-queue/ops.d.ts +3 -2
  159. package/dist/workflow/index.d.ts +4 -3
  160. package/package.json +11 -4
  161. package/dist/chunk-5EHLEUTL.js.map +0 -1
  162. package/dist/chunk-B5VXOFMZ.js.map +0 -1
  163. package/dist/chunk-JER5O7PQ.js.map +0 -1
@@ -1,19 +1,20 @@
1
- import { C as Cmd } from '../core-Bjc0bS8j.js';
1
+ import { C as Cmd } from '../core-Co0LWkIA.js';
2
2
  export { LlmCall, LlmErr, LlmFailMsg, LlmOk, LlmRunCmd, LlmSucceedMsg, MessageLoader, ModelFactory, Schema } from '../llm-call/index.js';
3
- import { A as AgentTurn, a as AgentConfigCore, C as CompactionPolicy, b as AgentKnob } from '../machine-0OmPvsy_.js';
4
- export { c as AgentBootMsg, d as AgentCmd, e as AgentCompactErrMsg, f as AgentCompactOkMsg, g as AgentCompactRunCmd, h as AgentCompactionConfig, i as AgentConfig, j as AgentDetachedHandlers, k as AgentEvent, l as AgentFailure, m as AgentLlmErrMsg, n as AgentLlmOkMsg, o as AgentLlmRunCmd, p as AgentMachineMsg, q as AgentPorts, r as AgentSnapshotConfig, s as AgentState, t as AgentStatus, u as AgentTerminalFailure, v as AgentTimerMsg, w as AgentToMachine, x as Awaiting, y as COMPACTION_PURPOSE, z as CompactInterpret, B as CompactionOutputs, D as CompactionPurpose, E as CompactionSummary, F as Conversation, S as SnapshotInterpret, T as ToolCall, G as ToolOutcome, H as ToolRecord, I as agentBootMsg, J as agentEvents, K as agentTurnSchema, L as compactionSummarySchema, M as isAgentTurn, N as isCompactionSummary, O as liftAgent, P as mergeInterpret, Q as status } from '../machine-0OmPvsy_.js';
3
+ import { A as AgentTurn, a as AgentConfigCore, C as CompactionPolicy, b as AgentKnob } from '../machine-BtFWQmmq.js';
4
+ export { c as AgentBootMsg, d as AgentCmd, e as AgentCompactErrMsg, f as AgentCompactOkMsg, g as AgentCompactRunCmd, h as AgentCompactionConfig, i as AgentConfig, j as AgentDetachedHandlers, k as AgentEvent, l as AgentFailure, m as AgentLlmErrMsg, n as AgentLlmOkMsg, o as AgentLlmRunCmd, p as AgentMachineMsg, q as AgentPorts, r as AgentSnapshotConfig, s as AgentState, t as AgentStatus, u as AgentTerminalFailure, v as AgentTimerMsg, w as AgentToMachine, x as Awaiting, y as COMPACTION_PURPOSE, z as CompactInterpret, B as CompactionOutputs, D as CompactionPurpose, E as CompactionSummary, F as Conversation, S as SnapshotInterpret, T as ToolCall, G as ToolOutcome, H as ToolRecord, I as agentBootMsg, J as agentEvents, K as agentTurnSchema, L as compactionSummarySchema, M as isAgentTurn, N as isCompactionSummary, O as liftAgent, P as mergeInterpret, Q as status } from '../machine-BtFWQmmq.js';
5
5
  export { MonitoredRunCmd, RunFailure } from '../monitored-run/index.js';
6
6
  export { DeadlineSub, deadlineSub, subscribeDeadline } from '../deadline/index.js';
7
+ import 'zod';
7
8
  import '../resilient-call/index.js';
8
9
  import '../cache/index.js';
9
- import '../types-D7u9DkH7.js';
10
+ import '../types-XS_miRnB.js';
10
11
  import '../circuit-breaker/index.js';
11
12
  import '../protocol-B5YmJr0d.js';
12
13
  import '../rate-limit/index.js';
13
14
  import '../retry-backoff/index.js';
14
15
  import '../fan-out/index.js';
15
16
  import '../work-queue/index.js';
16
- import '../runtime-types-Bxc637bp.js';
17
+ import '../runtime-types-CNLmhWif.js';
17
18
  import 'better-result';
18
19
  import '../snapshot/index.js';
19
20
 
@@ -1,22 +1,22 @@
1
- export { COMPACTION_PURPOSE, agentBootMsg, agentEvents, agentTurnSchema, compactionSummarySchema, createAgent, isAgentTurn, isCompactionSummary, liftAgent, mergeInterpret, status } from '../chunk-ZF6WDK2D.js';
2
- import '../chunk-WLGO64WC.js';
3
- import '../chunk-ND3DH6KM.js';
4
- import '../chunk-7V4EVLZA.js';
5
- import '../chunk-EUF7XOEE.js';
1
+ export { COMPACTION_PURPOSE, agentBootMsg, agentEvents, agentTurnSchema, compactionSummarySchema, createAgent, isAgentTurn, isCompactionSummary, liftAgent, mergeInterpret, status } from '../chunk-3I52QZZ5.js';
2
+ import '../chunk-DMYGQB4O.js';
3
+ import '../chunk-COS5MSTO.js';
4
+ import '../chunk-O4MVQTEJ.js';
5
+ import '../chunk-4KLG43GY.js';
6
6
  import '../chunk-JELSZN25.js';
7
7
  import '../chunk-D736QUGF.js';
8
- export { deadlineSub, subscribeDeadline } from '../chunk-JGVL3WPL.js';
8
+ import '../chunk-RH5EFRVJ.js';
9
+ export { deadlineSub, subscribeDeadline } from '../chunk-DGE4PV4A.js';
9
10
  import '../chunk-Q2UM7BXU.js';
10
11
  import '../chunk-S2EGRPCM.js';
11
12
  import '../chunk-UF4MZSLT.js';
12
- import '../chunk-7SVIRMC6.js';
13
+ import '../chunk-G5E74IJB.js';
13
14
  import '../chunk-MU6MCIAC.js';
14
15
  import '../chunk-FV3Z5MBE.js';
15
- import '../chunk-3JU6657S.js';
16
+ import '../chunk-VYFAZN3F.js';
16
17
  import '../chunk-2YFLOCWX.js';
17
18
  import '../chunk-ZJ5AOYBH.js';
18
- import '../chunk-G5E74IJB.js';
19
- import '../chunk-5EHLEUTL.js';
20
- import '../chunk-B5VXOFMZ.js';
19
+ import '../chunk-ZSUUOEPL.js';
20
+ import '../chunk-OOYD44JI.js';
21
21
  //# sourceMappingURL=index.js.map
22
22
  //# sourceMappingURL=index.js.map
@@ -1,11 +1,12 @@
1
- import { P as PortEmitter, C as Cmd } from '../core-Bjc0bS8j.js';
1
+ import { P as PortEmitter, C as Cmd } from '../core-Co0LWkIA.js';
2
2
  import { M as MsgType } from '../protocol-B5YmJr0d.js';
3
3
  import { ResilientConfig, ResilientState, RunCmd, SucceedMsg, FailMsg, ResilientTimerMsg, ResilientPorts } from '../resilient-call/index.js';
4
4
  import { TokenRefreshConfig, Token, TokenState, RefreshTokenCmd, TokenRefreshMsg } from '../token-refresh/index.js';
5
5
  import { DeadlineSub } from '../deadline/index.js';
6
6
  export { DeadlineExceeded, deadlineSub, subscribeDeadline } from '../deadline/index.js';
7
+ import 'zod';
7
8
  import '../cache/index.js';
8
- import '../types-D7u9DkH7.js';
9
+ import '../types-XS_miRnB.js';
9
10
  import '../circuit-breaker/index.js';
10
11
  import '../rate-limit/index.js';
11
12
  import '../retry-backoff/index.js';
@@ -1,16 +1,16 @@
1
- import { createTokenRefresh, refreshTokenCmd } from '../chunk-TP5UPGLY.js';
2
- import { createResilientCall } from '../chunk-EUF7XOEE.js';
1
+ import { createTokenRefresh, refreshTokenCmd } from '../chunk-CLM6ERNO.js';
2
+ import { createResilientCall } from '../chunk-4KLG43GY.js';
3
3
  import '../chunk-JELSZN25.js';
4
- export { deadlineSub, subscribeDeadline } from '../chunk-JGVL3WPL.js';
4
+ import '../chunk-RH5EFRVJ.js';
5
+ export { deadlineSub, subscribeDeadline } from '../chunk-DGE4PV4A.js';
5
6
  import '../chunk-Q2UM7BXU.js';
6
7
  import '../chunk-S2EGRPCM.js';
7
8
  import '../chunk-UF4MZSLT.js';
8
- import '../chunk-7SVIRMC6.js';
9
- import '../chunk-3JU6657S.js';
9
+ import '../chunk-VYFAZN3F.js';
10
10
  import '../chunk-2YFLOCWX.js';
11
11
  import '../chunk-ZJ5AOYBH.js';
12
- import '../chunk-5EHLEUTL.js';
13
- import { without } from '../chunk-B5VXOFMZ.js';
12
+ import '../chunk-ZSUUOEPL.js';
13
+ import { without } from '../chunk-OOYD44JI.js';
14
14
 
15
15
  // src/authed-call/index.ts
16
16
  function createAuthedCall(config, rng = Math.random) {
@@ -1,6 +1,7 @@
1
- import { R as Runtime, C as CtxArg } from '../runtime-types-Bxc637bp.js';
2
- import { C as Cmd, S as Sub, M as Machine } from '../core-Bjc0bS8j.js';
1
+ import { R as Runtime, C as CtxArg } from '../runtime-types-CNLmhWif.js';
2
+ import { C as Cmd, S as Sub, M as Machine } from '../core-Co0LWkIA.js';
3
3
  import 'better-result';
4
+ import 'zod';
4
5
 
5
6
  /**
6
7
  * @demlik/tea/await-terminal — run a ONE-SHOT / decision-procedure machine to a
@@ -1,5 +1,5 @@
1
- import { run } from '../chunk-5EHLEUTL.js';
2
- import '../chunk-B5VXOFMZ.js';
1
+ import { run } from '../chunk-ZSUUOEPL.js';
2
+ import '../chunk-OOYD44JI.js';
3
3
 
4
4
  // src/await-terminal/index.ts
5
5
  var TerminalTimeoutError = class extends Error {
@@ -1,9 +1,10 @@
1
- import { C as Cmd } from '../core-Bjc0bS8j.js';
1
+ import { C as Cmd } from '../core-Co0LWkIA.js';
2
2
  export { Debounced, debounce } from '../debounce/index.js';
3
3
  import { DeadlineExceeded, DeadlineSub } from '../deadline/index.js';
4
- import { S as SubscribeHandler } from '../types-D7u9DkH7.js';
4
+ import { S as SubscribeHandler } from '../types-XS_miRnB.js';
5
5
  export { EnqueueInput } from '../work-queue/index.js';
6
- import '../runtime-types-Bxc637bp.js';
6
+ import 'zod';
7
+ import '../runtime-types-CNLmhWif.js';
7
8
  import 'better-result';
8
9
 
9
10
  /**
@@ -1,8 +1,8 @@
1
1
  export { debounce } from '../chunk-J6527VRQ.js';
2
- import { subscribeDeadline, deadlineExceeded, deadlineSub } from '../chunk-JGVL3WPL.js';
2
+ import { subscribeDeadline, deadlineExceeded, deadlineSub } from '../chunk-DGE4PV4A.js';
3
3
  import '../chunk-2YFLOCWX.js';
4
- import '../chunk-5EHLEUTL.js';
5
- import '../chunk-B5VXOFMZ.js';
4
+ import '../chunk-ZSUUOEPL.js';
5
+ import '../chunk-OOYD44JI.js';
6
6
 
7
7
  // src/batch-window/index.ts
8
8
  function initBatchWindow() {
@@ -1,5 +1,6 @@
1
- import { S as Sub } from '../core-Bjc0bS8j.js';
2
- import { S as SubscribeHandler } from '../types-D7u9DkH7.js';
1
+ import { S as Sub } from '../core-Co0LWkIA.js';
2
+ import { S as SubscribeHandler } from '../types-XS_miRnB.js';
3
+ import 'zod';
3
4
 
4
5
  /**
5
6
  * @demlik/tea/cache — a TTL cache as pure state, PLUS a periodic eviction Sub.
@@ -1,8 +1,8 @@
1
- export { cacheEvictMsg, cacheEvictionSub, cacheEvictionSubscribe, evictExpired, get, has, initCache, remove, set } from '../chunk-7SVIRMC6.js';
2
- import '../chunk-3JU6657S.js';
1
+ export { cacheEvictMsg, cacheEvictionSub, cacheEvictionSubscribe, evictExpired, get, has, initCache, remove, set } from '../chunk-RH5EFRVJ.js';
2
+ import '../chunk-VYFAZN3F.js';
3
3
  import '../chunk-2YFLOCWX.js';
4
4
  import '../chunk-ZJ5AOYBH.js';
5
- import '../chunk-5EHLEUTL.js';
6
- import '../chunk-B5VXOFMZ.js';
5
+ import '../chunk-ZSUUOEPL.js';
6
+ import '../chunk-OOYD44JI.js';
7
7
  //# sourceMappingURL=index.js.map
8
8
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,7 @@
1
- import { C as Cmd, T as Transitions, R as Reducer } from '../core-Bjc0bS8j.js';
2
- import { A as Assigns, G as GuardName, l as Guards, U as UsedCmdName, m as Cmds, n as CellName, o as Cells, p as RAssigns, q as RGuardName, r as RGuards, s as RUsedCmdName, t as RCmds, u as RCellName, v as RCells, C as Chart, S as StateOf, M as MsgOf, a as CmdOf, j as MsgIn, R as ReducerChart, b as RStateOf, I as InitialData, f as InitialState } from '../graph-CcjWZVrd.js';
3
- export { w as CmdEvent, x as CmdName, y as EdgeKey, z as EdgeSpec, B as EndPolarity, i as ErrorFinal, E as EventName, k as EventOrigin, F as ForeignEvent, D as GroupName, H as GroupOf, J as MissingPairs, O as OriginAt, P as ParkingState, K as RStateName, c as StateName, L as SubEvent, h as SuccessFinal, g as Ty, W as WorldEvent, N as WorldRole, Q as defineChart, V as defineReducerChart, X as ty } from '../graph-CcjWZVrd.js';
1
+ import { C as Cmd, T as Transitions, c as Reducer } from '../core-Co0LWkIA.js';
2
+ import { A as Assigns, G as GuardName, l as Guards, U as UsedCmdName, m as Cmds, n as CellName, o as Cells, p as RAssigns, q as RGuardName, r as RGuards, s as RUsedCmdName, t as RCmds, u as RCellName, v as RCells, C as Chart, S as StateOf, M as MsgOf, a as CmdOf, j as MsgIn, R as ReducerChart, b as RStateOf, I as InitialData, f as InitialState } from '../graph-B3L5e0N1.js';
3
+ export { w as CmdEvent, x as CmdName, y as EdgeKey, z as EdgeSpec, B as EndPolarity, i as ErrorFinal, E as EventName, k as EventOrigin, F as ForeignEvent, D as GroupName, H as GroupOf, J as MissingPairs, O as OriginAt, P as ParkingState, K as RStateName, c as StateName, L as SubEvent, h as SuccessFinal, g as Ty, W as WorldEvent, N as WorldRole, Q as defineChart, V as defineReducerChart, X as ty } from '../graph-B3L5e0N1.js';
4
+ import 'zod';
4
5
 
5
6
  /**
6
7
  * A cell returned a state OUTSIDE its edge's declared `to`.
@@ -1,6 +1,6 @@
1
- export { CellTargetError, chartMermaid, compile, compileReducer, edgeKey, initFrom, initialStateOf, reducerInitFrom, reducerMermaid } from '../chunk-E6GEDSF4.js';
1
+ export { CellTargetError, chartMermaid, compile, compileReducer, edgeKey, initFrom, initialStateOf, reducerInitFrom, reducerMermaid } from '../chunk-YWIKDKHY.js';
2
2
  import '../chunk-UOC2PL46.js';
3
- import '../chunk-B5VXOFMZ.js';
3
+ import '../chunk-OOYD44JI.js';
4
4
 
5
5
  // src/chart/graph.ts
6
6
  var ty = () => ({});
@@ -1,7 +1,8 @@
1
- import { C as Cmd, S as Sub, M as Machine } from '../../core-Bjc0bS8j.js';
2
- export { A as AnyCell, a as AnyGuard, C as ChartDescription, b as ChartEdge, c as ChartEventInfo, d as ChartRefusal, e as ChartStateInfo, E as EdgeCore, f as EdgeKind, g as EventPreview, G as GuardPreview, h as GuardUnknown, I as InspectOptions, i as InspectParts, R as ReducerChartDescription, j as ReducerEdge, k as ReducerEventInfo, l as ReducerEventPreview, m as RefusalReason, n as ResolvedBy, U as Unanswerable, o as describeChart, p as describeReducerChart, q as edgeAt, r as explainRefusal, s as inspectReducerState, t as inspectState, u as inspectStateSummary, v as previewEvent, w as previewReducerEvent, x as reducerEdgeAt, y as refusalAtState, z as stateInfo } from '../../reducer-BqyoVyBG.js';
3
- export { R as RtSamples, S as SamplePayload, a as Samples, s as sampleMsg } from '../../samples-DCt6nF8H.js';
4
- import '../../graph-CcjWZVrd.js';
1
+ import { C as Cmd, S as Sub, M as Machine } from '../../core-Co0LWkIA.js';
2
+ export { A as AnyCell, a as AnyGuard, C as ChartDescription, b as ChartEdge, c as ChartEventInfo, d as ChartRefusal, e as ChartStateInfo, E as EdgeCore, f as EdgeKind, g as EventPreview, G as GuardPreview, h as GuardUnknown, I as InspectOptions, i as InspectParts, R as ReducerChartDescription, j as ReducerEdge, k as ReducerEventInfo, l as ReducerEventPreview, m as RefusalReason, n as ResolvedBy, U as Unanswerable, o as describeChart, p as describeReducerChart, q as edgeAt, r as explainRefusal, s as inspectReducerState, t as inspectState, u as inspectStateSummary, v as previewEvent, w as previewReducerEvent, x as reducerEdgeAt, y as refusalAtState, z as stateInfo } from '../../reducer-4GNR6b8B.js';
3
+ export { R as RtSamples, S as SamplePayload, a as Samples, s as sampleMsg } from '../../samples-B3My5oh2.js';
4
+ import 'zod';
5
+ import '../../graph-B3L5e0N1.js';
5
6
 
6
7
  /**
7
8
  * The cmds ONE step emitted, tagged with the msg that caused them.
@@ -1,5 +1,5 @@
1
- export { captureCmds, describeChart, describeReducerChart, edgeAt, explainRefusal, firedAt, firedCounts, inspectReducerState, inspectState, inspectStateSummary, previewEvent, previewReducerEvent, reducerEdgeAt, refusalAtState, sampleMsg, stateInfo } from '../../chunk-ZD6PNZBK.js';
2
- import '../../chunk-5EHLEUTL.js';
3
- import '../../chunk-B5VXOFMZ.js';
1
+ export { captureCmds, describeChart, describeReducerChart, edgeAt, explainRefusal, firedAt, firedCounts, inspectReducerState, inspectState, inspectStateSummary, previewEvent, previewReducerEvent, reducerEdgeAt, refusalAtState, sampleMsg, stateInfo } from '../../chunk-3ZAFFRRB.js';
2
+ import '../../chunk-ZSUUOEPL.js';
3
+ import '../../chunk-OOYD44JI.js';
4
4
  //# sourceMappingURL=index.js.map
5
5
  //# sourceMappingURL=index.js.map
@@ -1,11 +1,12 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { R as Runtime } from '../../runtime-types-Bxc637bp.js';
3
- import { C as Cmd, M as Machine, S as Sub } from '../../core-Bjc0bS8j.js';
2
+ import { R as Runtime } from '../../runtime-types-CNLmhWif.js';
3
+ import { C as Cmd, M as Machine, S as Sub, R as RequiredCtx } from '../../core-Co0LWkIA.js';
4
4
  import { Recorder } from '../../recorder/index.js';
5
5
  import { Parts, RParts } from '../index.js';
6
- import { C as Chart, S as StateOf, M as MsgOf, a as CmdOf, I as InitialData, R as ReducerChart, b as RStateOf } from '../../graph-CcjWZVrd.js';
7
- import { a as Samples } from '../../samples-DCt6nF8H.js';
6
+ import { C as Chart, S as StateOf, M as MsgOf, a as CmdOf, I as InitialData, R as ReducerChart, b as RStateOf } from '../../graph-B3L5e0N1.js';
7
+ import { a as Samples } from '../../samples-B3My5oh2.js';
8
8
  import 'better-result';
9
+ import 'zod';
9
10
 
10
11
  /**
11
12
  * Everything `<ChartInspector>` needs. Four fields, and every one of them is a
@@ -81,7 +82,7 @@ interface ReducerChartInspectorProps<C, S extends {
81
82
  */
82
83
  declare function useInspectorRuntime<S, M extends {
83
84
  type: string;
84
- }, K extends Cmd, Ctx>(machine: Machine<S, M, K, Sub<never>, Ctx>, ctx: Ctx, epoch: number): {
85
+ }, K extends Cmd, Ctx>(machine: Machine<S, M, K, Sub<never>, Ctx>, ctx: Ctx & RequiredCtx<K>, epoch: number): {
85
86
  readonly rt: Runtime<S, M> | null;
86
87
  readonly rec: Recorder<S, M>;
87
88
  };
@@ -1,11 +1,11 @@
1
- export { ChartInspector, ReducerChartInspector, useInspectorRuntime } from '../../chunk-JER5O7PQ.js';
2
- import '../../chunk-ZD6PNZBK.js';
3
- import '../../chunk-E6GEDSF4.js';
1
+ export { ChartInspector, ReducerChartInspector, useInspectorRuntime } from '../../chunk-7FRZ2CT2.js';
2
+ import '../../chunk-3ZAFFRRB.js';
3
+ import '../../chunk-YWIKDKHY.js';
4
4
  import '../../chunk-UOC2PL46.js';
5
5
  import '../../chunk-MUUROGIH.js';
6
+ import '../../chunk-ZSUUOEPL.js';
7
+ import '../../chunk-OOYD44JI.js';
6
8
  import '../../chunk-WRAA7GVZ.js';
7
9
  import '../../chunk-EWJP3YYP.js';
8
- import '../../chunk-5EHLEUTL.js';
9
- import '../../chunk-B5VXOFMZ.js';
10
10
  //# sourceMappingURL=react.js.map
11
11
  //# sourceMappingURL=react.js.map
@@ -1,9 +1,10 @@
1
- import { g as EventPreview, d as ChartRefusal, I as InspectOptions, U as Unanswerable } from '../../reducer-BqyoVyBG.js';
2
- import { P as PhaseStanding, I as ImportedLane, L as LogEntry, T as TaskState } from '../../fold-Blbhru48.js';
3
- export { c as Lane, d as LaneChecks, e as LaneCmd, f as LaneErrorFinals, g as LaneHand, h as LaneHands, b as LaneHandsOf, i as LaneInitial, j as LaneMsg, k as LaneOf, l as LanePhaseName, m as LanePhaseOf, n as LanePhaseShape, o as LaneRegion, p as LaneRegions, q as LaneRunChecks, r as LaneRunMsg, s as LaneRunState, t as LaneRuntime, u as LaneShape, v as LaneShapeError, w as LaneSiblings, x as LaneSpec, y as LaneState, z as LaneSuccessFinals, a as LaneTaskChart, L as LaneTaskId, A as LaneTaskShape, B as LaneTasksIn, C as LaneTerminal, P as PhaseAtRest, D as defineLane, E as laneShape, F as runLane } from '../../run-BVeqJDBF.js';
4
- import '../../graph-CcjWZVrd.js';
5
- import '../../core-Bjc0bS8j.js';
6
- import '../../samples-DCt6nF8H.js';
1
+ import { g as EventPreview, d as ChartRefusal, I as InspectOptions, U as Unanswerable } from '../../reducer-4GNR6b8B.js';
2
+ import { P as PhaseStanding, I as ImportedLane, L as LogEntry, T as TaskState } from '../../fold-BJPdjc9w.js';
3
+ export { c as Lane, d as LaneChecks, e as LaneCmd, f as LaneErrorFinals, g as LaneHand, h as LaneHands, b as LaneHandsOf, i as LaneInitial, j as LaneMsg, k as LaneOf, l as LanePhaseName, m as LanePhaseOf, n as LanePhaseShape, o as LaneRegion, p as LaneRegions, q as LaneRunChecks, r as LaneRunMsg, s as LaneRunState, t as LaneRuntime, u as LaneShape, v as LaneShapeError, w as LaneSiblings, x as LaneSpec, y as LaneState, z as LaneSuccessFinals, a as LaneTaskChart, L as LaneTaskId, A as LaneTaskShape, B as LaneTasksIn, C as LaneTerminal, P as PhaseAtRest, D as defineLane, E as laneShape, F as runLane } from '../../run-pAcmBpah.js';
4
+ import '../../graph-B3L5e0N1.js';
5
+ import '../../core-Co0LWkIA.js';
6
+ import 'zod';
7
+ import '../../samples-B3My5oh2.js';
7
8
  import '../index.js';
8
9
 
9
10
  /** Why a task cannot move. `null` when it can. */
@@ -1,9 +1,9 @@
1
- export { LaneShapeError, defineLane, inspectLane, inspectLaneStates, laneShape, laneView, liveFeed, replayFeed, runLane } from '../../chunk-ZCL7SCBK.js';
2
- import '../../chunk-ZD6PNZBK.js';
3
- import '../../chunk-5KJKJOFC.js';
4
- import '../../chunk-E6GEDSF4.js';
1
+ export { LaneShapeError, defineLane, inspectLane, inspectLaneStates, laneShape, laneView, liveFeed, replayFeed, runLane } from '../../chunk-CIQG5L42.js';
2
+ import '../../chunk-3ZAFFRRB.js';
3
+ import '../../chunk-NR7BU22N.js';
4
+ import '../../chunk-YWIKDKHY.js';
5
5
  import '../../chunk-UOC2PL46.js';
6
- import '../../chunk-5EHLEUTL.js';
7
- import '../../chunk-B5VXOFMZ.js';
6
+ import '../../chunk-ZSUUOEPL.js';
7
+ import '../../chunk-OOYD44JI.js';
8
8
  //# sourceMappingURL=index.js.map
9
9
  //# sourceMappingURL=index.js.map
@@ -1,9 +1,10 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { a as Samples } from '../../samples-DCt6nF8H.js';
3
- import { I as ImportedLane, L as LogEntry } from '../../fold-Blbhru48.js';
4
- import { L as LaneTaskId, a as LaneTaskChart, b as LaneHandsOf } from '../../run-BVeqJDBF.js';
5
- import '../../graph-CcjWZVrd.js';
6
- import '../../core-Bjc0bS8j.js';
2
+ import { a as Samples } from '../../samples-B3My5oh2.js';
3
+ import { I as ImportedLane, L as LogEntry } from '../../fold-BJPdjc9w.js';
4
+ import { L as LaneTaskId, a as LaneTaskChart, b as LaneHandsOf } from '../../run-pAcmBpah.js';
5
+ import '../../graph-B3L5e0N1.js';
6
+ import '../../core-Co0LWkIA.js';
7
+ import 'zod';
7
8
  import '../index.js';
8
9
 
9
10
  /**
@@ -1,14 +1,14 @@
1
- import { useInspectorRuntime } from '../../chunk-JER5O7PQ.js';
2
- import { replayFeed, runLane, liveFeed, laneView } from '../../chunk-ZCL7SCBK.js';
3
- import '../../chunk-ZD6PNZBK.js';
4
- import '../../chunk-5KJKJOFC.js';
5
- import '../../chunk-E6GEDSF4.js';
1
+ import { useInspectorRuntime } from '../../chunk-7FRZ2CT2.js';
2
+ import { replayFeed, runLane, liveFeed, laneView } from '../../chunk-CIQG5L42.js';
3
+ import '../../chunk-3ZAFFRRB.js';
4
+ import '../../chunk-NR7BU22N.js';
5
+ import '../../chunk-YWIKDKHY.js';
6
6
  import '../../chunk-UOC2PL46.js';
7
7
  import '../../chunk-MUUROGIH.js';
8
+ import { replay } from '../../chunk-ZSUUOEPL.js';
9
+ import '../../chunk-OOYD44JI.js';
8
10
  import '../../chunk-WRAA7GVZ.js';
9
11
  import '../../chunk-EWJP3YYP.js';
10
- import { replay } from '../../chunk-5EHLEUTL.js';
11
- import '../../chunk-B5VXOFMZ.js';
12
12
  import { useMemo, useReducer, useEffect, useRef, useState } from 'react';
13
13
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
14
14
 
@@ -1,4 +1,4 @@
1
- import{Et as e,Ft as t,Ht as n,Ot as r,Tt as i,U as a,Y as o,a as s,at as c,f as l,it as u,q as d,st as f,ut as p,zt as m}from"./chunk-NSK5VX7P-CBCyTZMs.js";import{n as h}from"./index-Obj05Jex.js";import{n as g,t as _}from"./chunk-KBJHAD2P-DZOw7xU6.js";import{t as v}from"./chunk-2GRJ4B5K-HdDf8SI3.js";var y=(function(){var e=n(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,16],l=[1,17],u=[1,18],d=[1,19],f=[1,33],p=[1,20],m=[1,21],h=[1,22],g=[1,23],_=[1,24],v=[1,26],y=[1,27],b=[1,28],x=[1,29],S=[1,30],C=[1,31],w=[1,32],T=[1,35],E=[1,36],D=[1,37],O=[1,38],k=[1,34],A=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],j=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],M=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],N={trace:n(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NL`,6:`SD`,14:`DESCR`,15:`-->`,16:`HIDE_EMPTY`,17:`scale`,18:`WIDTH`,19:`COMPOSIT_STATE`,20:`STRUCT_START`,21:`STRUCT_STOP`,22:`STATE_DESCR`,23:`AS`,24:`ID`,25:`FORK`,26:`JOIN`,27:`CHOICE`,28:`CONCURRENT`,29:`note`,31:`NOTE_TEXT`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,38:`CLICK`,39:`STRING`,40:`HREF`,41:`classDef`,42:`CLASSDEF_ID`,43:`CLASSDEF_STYLEOPTS`,44:`DEFAULT`,45:`style`,46:`STYLE_IDS`,47:`STYLEDEF_STYLEOPTS`,48:`class`,49:`CLASSENTITY_IDS`,50:`STYLECLASS`,51:`direction_tb`,52:`direction_bt`,53:`direction_rl`,54:`direction_lr`,56:`;`,57:`EDGE_STATE`,58:`STYLE_SEPARATOR`,59:`left_of`,60:`right_of`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:n(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.setRootDoc(a[s]),a[s];case 4:this.$=[];break;case 5:a[s]!=`nl`&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 6:case 7:this.$=a[s];break;case 8:this.$=`nl`;break;case 12:this.$=a[s];break;case 13:let e=a[s-1];e.description=r.trimColon(a[s]),this.$=e;break;case 14:this.$={stmt:`relation`,state1:a[s-2],state2:a[s]};break;case 15:let t=r.trimColon(a[s]);this.$={stmt:`relation`,state1:a[s-3],state2:a[s-1],description:t};break;case 19:this.$={stmt:`state`,id:a[s-3],type:`default`,description:``,doc:a[s-1]};break;case 20:var c=a[s],l=a[s-2].trim();if(a[s].match(`:`)){var u=a[s].split(`:`);c=u[0],l=[l,u[1]]}this.$={stmt:`state`,id:c,type:`default`,description:l};break;case 21:this.$={stmt:`state`,id:a[s-3],type:`default`,description:a[s-5],doc:a[s-1]};break;case 22:this.$={stmt:`state`,id:a[s],type:`fork`};break;case 23:this.$={stmt:`state`,id:a[s],type:`join`};break;case 24:this.$={stmt:`state`,id:a[s],type:`choice`};break;case 25:this.$={stmt:`state`,id:r.getDividerId(),type:`divider`};break;case 26:this.$={stmt:`state`,id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 29:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 30:case 31:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:this.$={stmt:`click`,id:a[s-3],url:a[s-2],tooltip:a[s-1]};break;case 33:this.$={stmt:`click`,id:a[s-3],url:a[s-1],tooltip:``};break;case 34:case 35:this.$={stmt:`classDef`,id:a[s-1].trim(),classes:a[s].trim()};break;case 36:this.$={stmt:`style`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 37:this.$={stmt:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:r.setDirection(`TB`),this.$={stmt:`dir`,value:`TB`};break;case 39:r.setDirection(`BT`),this.$={stmt:`dir`,value:`BT`};break;case 40:r.setDirection(`RL`),this.$={stmt:`dir`,value:`RL`};break;case 41:r.setDirection(`LR`),this.$={stmt:`dir`,value:`LR`};break;case 44:case 45:this.$={stmt:`state`,id:a[s].trim(),type:`default`,description:``};break;case 46:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break;case 47:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``}}},`anonymous`),table:[{3:1,4:t,5:r,6:i},{1:[3]},{3:5,4:t,5:r,6:i},{3:6,4:t,5:r,6:i},e([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,7]),e(A,[2,8]),e(A,[2,9]),e(A,[2,10]),e(A,[2,11]),e(A,[2,12],{14:[1,40],15:[1,41]}),e(A,[2,16]),{18:[1,42]},e(A,[2,18],{20:[1,43]}),{23:[1,44]},e(A,[2,22]),e(A,[2,23]),e(A,[2,24]),e(A,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(A,[2,28]),{34:[1,49]},{36:[1,50]},e(A,[2,31]),{13:51,24:f,57:k},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(j,[2,44],{58:[1,56]}),e(j,[2,45],{58:[1,57]}),e(A,[2,38]),e(A,[2,39]),e(A,[2,40]),e(A,[2,41]),e(A,[2,6]),e(A,[2,13]),{13:58,24:f,57:k},e(A,[2,17]),e(M,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(A,[2,29]),e(A,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},e(A,[2,14],{14:[1,71]}),{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,72],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(A,[2,34]),e(A,[2,35]),e(A,[2,36]),e(A,[2,37]),e(j,[2,46]),e(j,[2,47]),e(A,[2,15]),e(A,[2,19]),e(M,a,{7:78}),e(A,[2,26]),e(A,[2,27]),{5:[1,79]},{5:[1,80]},{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,81],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,32]),e(A,[2,33]),e(A,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:n(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:n(function(e){var t=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}n(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}n(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{Et as e,Ft as t,Ht as n,Ot as r,Tt as i,U as a,Y as o,a as s,at as c,f as l,it as u,q as d,st as f,ut as p,zt as m}from"./chunk-NSK5VX7P-CBCyTZMs.js";import{n as h}from"./index-Bgt4sXpW.js";import{n as g,t as _}from"./chunk-KBJHAD2P-DZOw7xU6.js";import{t as v}from"./chunk-2GRJ4B5K-HdDf8SI3.js";var y=(function(){var e=n(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,16],l=[1,17],u=[1,18],d=[1,19],f=[1,33],p=[1,20],m=[1,21],h=[1,22],g=[1,23],_=[1,24],v=[1,26],y=[1,27],b=[1,28],x=[1,29],S=[1,30],C=[1,31],w=[1,32],T=[1,35],E=[1,36],D=[1,37],O=[1,38],k=[1,34],A=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],j=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],M=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],N={trace:n(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NL`,6:`SD`,14:`DESCR`,15:`-->`,16:`HIDE_EMPTY`,17:`scale`,18:`WIDTH`,19:`COMPOSIT_STATE`,20:`STRUCT_START`,21:`STRUCT_STOP`,22:`STATE_DESCR`,23:`AS`,24:`ID`,25:`FORK`,26:`JOIN`,27:`CHOICE`,28:`CONCURRENT`,29:`note`,31:`NOTE_TEXT`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,38:`CLICK`,39:`STRING`,40:`HREF`,41:`classDef`,42:`CLASSDEF_ID`,43:`CLASSDEF_STYLEOPTS`,44:`DEFAULT`,45:`style`,46:`STYLE_IDS`,47:`STYLEDEF_STYLEOPTS`,48:`class`,49:`CLASSENTITY_IDS`,50:`STYLECLASS`,51:`direction_tb`,52:`direction_bt`,53:`direction_rl`,54:`direction_lr`,56:`;`,57:`EDGE_STATE`,58:`STYLE_SEPARATOR`,59:`left_of`,60:`right_of`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:n(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.setRootDoc(a[s]),a[s];case 4:this.$=[];break;case 5:a[s]!=`nl`&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 6:case 7:this.$=a[s];break;case 8:this.$=`nl`;break;case 12:this.$=a[s];break;case 13:let e=a[s-1];e.description=r.trimColon(a[s]),this.$=e;break;case 14:this.$={stmt:`relation`,state1:a[s-2],state2:a[s]};break;case 15:let t=r.trimColon(a[s]);this.$={stmt:`relation`,state1:a[s-3],state2:a[s-1],description:t};break;case 19:this.$={stmt:`state`,id:a[s-3],type:`default`,description:``,doc:a[s-1]};break;case 20:var c=a[s],l=a[s-2].trim();if(a[s].match(`:`)){var u=a[s].split(`:`);c=u[0],l=[l,u[1]]}this.$={stmt:`state`,id:c,type:`default`,description:l};break;case 21:this.$={stmt:`state`,id:a[s-3],type:`default`,description:a[s-5],doc:a[s-1]};break;case 22:this.$={stmt:`state`,id:a[s],type:`fork`};break;case 23:this.$={stmt:`state`,id:a[s],type:`join`};break;case 24:this.$={stmt:`state`,id:a[s],type:`choice`};break;case 25:this.$={stmt:`state`,id:r.getDividerId(),type:`divider`};break;case 26:this.$={stmt:`state`,id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 29:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 30:case 31:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:this.$={stmt:`click`,id:a[s-3],url:a[s-2],tooltip:a[s-1]};break;case 33:this.$={stmt:`click`,id:a[s-3],url:a[s-1],tooltip:``};break;case 34:case 35:this.$={stmt:`classDef`,id:a[s-1].trim(),classes:a[s].trim()};break;case 36:this.$={stmt:`style`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 37:this.$={stmt:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:r.setDirection(`TB`),this.$={stmt:`dir`,value:`TB`};break;case 39:r.setDirection(`BT`),this.$={stmt:`dir`,value:`BT`};break;case 40:r.setDirection(`RL`),this.$={stmt:`dir`,value:`RL`};break;case 41:r.setDirection(`LR`),this.$={stmt:`dir`,value:`LR`};break;case 44:case 45:this.$={stmt:`state`,id:a[s].trim(),type:`default`,description:``};break;case 46:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break;case 47:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``}}},`anonymous`),table:[{3:1,4:t,5:r,6:i},{1:[3]},{3:5,4:t,5:r,6:i},{3:6,4:t,5:r,6:i},e([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,7]),e(A,[2,8]),e(A,[2,9]),e(A,[2,10]),e(A,[2,11]),e(A,[2,12],{14:[1,40],15:[1,41]}),e(A,[2,16]),{18:[1,42]},e(A,[2,18],{20:[1,43]}),{23:[1,44]},e(A,[2,22]),e(A,[2,23]),e(A,[2,24]),e(A,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(A,[2,28]),{34:[1,49]},{36:[1,50]},e(A,[2,31]),{13:51,24:f,57:k},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(j,[2,44],{58:[1,56]}),e(j,[2,45],{58:[1,57]}),e(A,[2,38]),e(A,[2,39]),e(A,[2,40]),e(A,[2,41]),e(A,[2,6]),e(A,[2,13]),{13:58,24:f,57:k},e(A,[2,17]),e(M,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(A,[2,29]),e(A,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},e(A,[2,14],{14:[1,71]}),{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,72],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(A,[2,34]),e(A,[2,35]),e(A,[2,36]),e(A,[2,37]),e(j,[2,46]),e(j,[2,47]),e(A,[2,15]),e(A,[2,19]),e(M,a,{7:78}),e(A,[2,26]),e(A,[2,27]),{5:[1,79]},{5:[1,80]},{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,81],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,32]),e(A,[2,33]),e(A,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:n(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:n(function(e){var t=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}n(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}n(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};N.lexer=(function(){return{EOF:1,parseError:n(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:n(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:n(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:n(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 r=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 i=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===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:n(function(){return this._more=!0,this},`more`),reject:n(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:n(function(e){this.unput(this.match.slice(e))},`less`),pastInput:n(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:n(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:n(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{Et as e,Ft as t,Ht as n,Ot as r,St as i,Tt as a,U as o,Y as s,at as c,f as l,gt as u,it as d,o as f,q as p,st as m,ut as h,zt as g}from"./chunk-NSK5VX7P-CBCyTZMs.js";import{n as _,t as v}from"./index-Obj05Jex.js";import{t as y}from"./chunk-5VM5RSS4-BP4fRS_5.js";import{n as b,t as x}from"./chunk-KBJHAD2P-DZOw7xU6.js";import{t as S}from"./chunk-2GRJ4B5K-HdDf8SI3.js";var C=(function(){var e=n(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,18],r=[1,19],i=[1,20],a=[1,41],o=[1,26],s=[1,42],c=[1,24],l=[1,25],u=[1,32],d=[1,33],f=[1,34],p=[1,45],m=[1,35],h=[1,36],g=[1,37],_=[1,38],v=[1,27],y=[1,28],b=[1,29],x=[1,30],S=[1,31],C=[1,44],w=[1,46],T=[1,43],E=[1,47],D=[1,9],O=[1,8,9],k=[1,58],A=[1,59],j=[1,60],M=[1,61],N=[1,62],P=[1,63],ee=[1,64],F=[1,8,9,41],te=[1,77],I=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],L=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],R=[13,60,86,100,102,103],z=[13,60,73,74,86,100,102,103],ne=[13,60,68,69,70,71,72,86,100,102,103],B=[1,103],V=[1,121],H=[1,117],U=[1,113],W=[1,119],G=[1,114],K=[1,115],q=[1,116],J=[1,118],Y=[1,120],re=[22,50,60,61,82,86,87,88,89,90],ie=[1,128],X=[12,39],ae=[1,8,9,39,41,44,46],Z=[1,8,9,22],oe=[1,153],se=[1,8,9,61],Q=[1,8,9,22,50,60,61,82,86,87,88,89,90],ce={trace:n(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:`error`,7:`CLASS_DIAGRAM`,8:`NEWLINE`,9:`EOF`,12:`SQS`,13:`STR`,14:`SQE`,18:`DOT`,20:`GENERICTYPE`,22:`LABEL`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,39:`STRUCT_START`,41:`STRUCT_STOP`,42:`NAMESPACE`,44:`STYLE_SEPARATOR`,46:`ANNOTATION_START`,47:`ANNOTATION_END`,48:`CLASS`,50:`SPACE`,51:`MEMBER`,52:`SEPARATOR`,54:`NOTE_FOR`,56:`NOTE`,57:`CLASSDEF`,60:`ALPHA`,61:`COMMA`,62:`direction_tb`,63:`direction_bt`,64:`direction_rl`,65:`direction_lr`,68:`AGGREGATION`,69:`EXTENSION`,70:`COMPOSITION`,71:`DEPENDENCY`,72:`LOLLIPOP`,73:`LINE`,74:`DOTTED_LINE`,75:`CALLBACK`,76:`LINK`,77:`LINK_TARGET`,78:`CLICK`,79:`CALLBACK_NAME`,80:`CALLBACK_ARGS`,81:`HREF`,82:`STYLE`,83:`CSSCLASS`,86:`NUM`,87:`COLON`,88:`UNIT`,89:`BRKT`,90:`PCT`,93:`graphCodeTokens`,95:`TAGSTART`,96:`TAGEND`,97:`==`,98:`--`,99:`DEFAULT`,100:`MINUS`,101:`keywords`,102:`UNICODE_TEXT`,103:`BQUOTE_STR`},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:n(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 8:this.$=a[s-1];break;case 9:case 10:case 13:case 15:this.$=a[s];break;case 11:case 14:this.$=a[s-2]+`.`+a[s];break;case 12:case 16:this.$=a[s-1]+a[s];break;case 17:case 18:this.$=a[s-1]+`~`+a[s]+`~`;break;case 19:r.addRelation(a[s]);break;case 20:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 31:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 34:r.addClassesToNamespace(a[s-3],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 35:r.addClassesToNamespace(a[s-4],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 36:this.$=r.addNamespace(a[s]);break;case 37:this.$=r.addNamespace(a[s-1],a[s]);break;case 38:this.$=[[a[s]],[]];break;case 39:this.$=[[a[s-1]],[]];break;case 40:a[s][0].unshift(a[s-2]),this.$=a[s];break;case 41:this.$=[[],[a[s]]];break;case 42:this.$=[[],[a[s-1]]];break;case 43:a[s][1].unshift(a[s-2]),this.$=a[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=a[s];break;case 48:r.setCssClass(a[s-2],a[s]);break;case 49:r.addMembers(a[s-3],a[s-1]);break;case 51:r.setCssClass(a[s-5],a[s-3]),r.addMembers(a[s-5],a[s-1]);break;case 52:r.addAnnotation(a[s-3],a[s-1]);break;case 53:r.addAnnotation(a[s-6],a[s-4]),r.addMembers(a[s-6],a[s-1]);break;case 54:r.addAnnotation(a[s-5],a[s-3]);break;case 55:this.$=a[s],r.addClass(a[s]);break;case 56:this.$=a[s-1],r.addClass(a[s-1]),r.setClassLabel(a[s-1],a[s]);break;case 60:r.addAnnotation(a[s],a[s-2]);break;case 61:case 74:this.$=[a[s]];break;case 62:a[s].push(a[s-1]),this.$=a[s];break;case 63:break;case 64:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 65:break;case 66:break;case 67:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:`none`,relationTitle2:`none`};break;case 68:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:`none`};break;case 69:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:`none`,relationTitle2:a[s-1]};break;case 70:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 71:this.$=r.addNote(a[s],a[s-1]);break;case 72:this.$=r.addNote(a[s]);break;case 73:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 75:this.$=a[s-2].concat([a[s]]);break;case 76:r.setDirection(`TB`);break;case 77:r.setDirection(`BT`);break;case 78:r.setDirection(`RL`);break;case 79:r.setDirection(`LR`);break;case 80:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 81:this.$={type1:`none`,type2:a[s],lineType:a[s-1]};break;case 82:this.$={type1:a[s-1],type2:`none`,lineType:a[s]};break;case 83:this.$={type1:`none`,type2:`none`,lineType:a[s]};break;case 84:this.$=r.relationType.AGGREGATION;break;case 85:this.$=r.relationType.EXTENSION;break;case 86:this.$=r.relationType.COMPOSITION;break;case 87:this.$=r.relationType.DEPENDENCY;break;case 88:this.$=r.relationType.LOLLIPOP;break;case 89:this.$=r.lineType.LINE;break;case 90:this.$=r.lineType.DOTTED_LINE;break;case 91:case 97:this.$=a[s-2],r.setClickEvent(a[s-1],a[s]);break;case 92:case 98:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 93:this.$=a[s-2],r.setLink(a[s-1],a[s]);break;case 94:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 95:this.$=a[s-3],r.setLink(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 96:this.$=a[s-4],r.setLink(a[s-3],a[s-2],a[s]),r.setTooltip(a[s-3],a[s-1]);break;case 99:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 100:this.$=a[s-4],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 101:this.$=a[s-3],r.setLink(a[s-2],a[s]);break;case 102:this.$=a[s-4],r.setLink(a[s-3],a[s-1],a[s]);break;case 103:this.$=a[s-4],r.setLink(a[s-3],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 104:this.$=a[s-5],r.setLink(a[s-4],a[s-2],a[s]),r.setTooltip(a[s-4],a[s-1]);break;case 105:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 106:r.setCssClass(a[s-1],a[s]);break;case 107:this.$=[a[s]];break;case 108:a[s-2].push(a[s]),this.$=a[s-2];break;case 110:this.$=a[s-1]+a[s]}},`anonymous`),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:t,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(D,[2,5],{8:[1,48]}),{8:[1,49]},e(O,[2,19],{22:[1,50]}),e(O,[2,21]),e(O,[2,22]),e(O,[2,23]),e(O,[2,24]),e(O,[2,25]),e(O,[2,26]),e(O,[2,27]),e(O,[2,28]),e(O,[2,29]),e(O,[2,30]),{34:[1,51]},{36:[1,52]},e(O,[2,33]),e(O,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:k,69:A,70:j,71:M,72:N,73:P,74:ee}),{39:[1,65]},e(F,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),e(O,[2,65]),e(O,[2,66]),{16:69,60:p,86:C,100:w,102:T},{16:39,17:40,19:70,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:71,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:72,60:p,86:C,100:w,102:T,103:E},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:p,86:C,100:w,102:T,103:E},{13:te,55:76},{58:78,60:[1,79]},e(O,[2,76]),e(O,[2,77]),e(O,[2,78]),e(O,[2,79]),e(I,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:p,86:C,100:w,102:T,103:E}),e(I,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:87,60:p,86:C,100:w,102:T,103:E},e(L,[2,133]),e(L,[2,134]),e(L,[2,135]),e(L,[2,136]),e([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),e(D,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:t,35:r,37:i,42:a,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:t,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},e(O,[2,20]),e(O,[2,31]),e(O,[2,32]),{13:[1,91],16:39,17:40,19:90,60:p,86:C,100:w,102:T,103:E},{53:92,66:56,67:57,68:k,69:A,70:j,71:M,72:N,73:P,74:ee},e(O,[2,64]),{67:93,73:P,74:ee},e(R,[2,83],{66:94,68:k,69:A,70:j,71:M,72:N}),e(z,[2,84]),e(z,[2,85]),e(z,[2,86]),e(z,[2,87]),e(z,[2,88]),e(ne,[2,89]),e(ne,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:a,43:23,48:s,54:u,56:d},{16:100,60:p,86:C,100:w,102:T},{41:[1,102],45:101,51:B},{16:104,60:p,86:C,100:w,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:V,50:H,59:110,60:U,82:W,84:111,85:112,86:G,87:K,88:q,89:J,90:Y},{60:[1,122]},{13:te,55:123},e(F,[2,72]),e(F,[2,138]),{22:V,50:H,59:124,60:U,61:[1,125],82:W,84:111,85:112,86:G,87:K,88:q,89:J,90:Y},e(re,[2,74]),{16:39,17:40,19:126,60:p,86:C,100:w,102:T,103:E},e(I,[2,16]),e(I,[2,17]),e(I,[2,18]),{11:127,12:ie,39:[2,36]},e(X,[2,9],{16:85,17:86,15:130,18:[1,129],60:p,86:C,100:w,102:T,103:E}),e(X,[2,10]),e(ae,[2,55],{11:131,12:ie}),e(D,[2,7]),{9:[1,132]},e(Z,[2,67]),{16:39,17:40,19:133,60:p,86:C,100:w,102:T,103:E},{13:[1,135],16:39,17:40,19:134,60:p,86:C,100:w,102:T,103:E},e(R,[2,82],{66:136,68:k,69:A,70:j,71:M,72:N}),e(R,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:a,43:23,48:s,54:u,56:d},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},e(F,[2,48],{39:[1,142]}),{41:[1,143]},e(F,[2,50]),{41:[2,61],45:144,51:B},{47:[1,145]},{16:39,17:40,19:146,60:p,86:C,100:w,102:T,103:E},e(O,[2,91],{13:[1,147]}),e(O,[2,93],{13:[1,149],77:[1,148]}),e(O,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},e(O,[2,105],{61:oe}),e(se,[2,107],{85:154,22:V,50:H,60:U,82:W,86:G,87:K,88:q,89:J,90:Y}),e(Q,[2,109]),e(Q,[2,111]),e(Q,[2,112]),e(Q,[2,113]),e(Q,[2,114]),e(Q,[2,115]),e(Q,[2,116]),e(Q,[2,117]),e(Q,[2,118]),e(Q,[2,119]),e(O,[2,106]),e(F,[2,71]),e(O,[2,73],{61:oe}),{60:[1,155]},e(I,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:p,86:C,100:w,102:T,103:E},e(X,[2,12]),e(ae,[2,56]),{1:[2,4]},e(Z,[2,69]),e(Z,[2,68]),{16:39,17:40,19:158,60:p,86:C,100:w,102:T,103:E},e(R,[2,80]),e(F,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:a,43:23,48:s,54:u,56:d},{45:163,51:B},e(F,[2,49]),{41:[2,62]},e(F,[2,52],{39:[1,164]}),e(O,[2,60]),e(O,[2,92]),e(O,[2,94]),e(O,[2,95],{77:[1,165]}),e(O,[2,98]),e(O,[2,99],{13:[1,166]}),e(O,[2,101],{13:[1,168],77:[1,167]}),{22:V,50:H,60:U,82:W,84:169,85:112,86:G,87:K,88:q,89:J,90:Y},e(Q,[2,110]),e(re,[2,75]),{14:[1,170]},e(X,[2,11]),e(Z,[2,70]),e(F,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:B},e(O,[2,96]),e(O,[2,100]),e(O,[2,102]),e(O,[2,103],{77:[1,174]}),e(se,[2,108],{85:154,22:V,50:H,60:U,82:W,86:G,87:K,88:q,89:J,90:Y}),e(ae,[2,8]),e(F,[2,51]),{41:[1,175]},e(F,[2,54]),e(O,[2,104]),e(F,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:n(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:n(function(e){var t=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}n(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}n(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{Et as e,Ft as t,Ht as n,Ot as r,St as i,Tt as a,U as o,Y as s,at as c,f as l,gt as u,it as d,o as f,q as p,st as m,ut as h,zt as g}from"./chunk-NSK5VX7P-CBCyTZMs.js";import{n as _,t as v}from"./index-Bgt4sXpW.js";import{t as y}from"./chunk-5VM5RSS4-BP4fRS_5.js";import{n as b,t as x}from"./chunk-KBJHAD2P-DZOw7xU6.js";import{t as S}from"./chunk-2GRJ4B5K-HdDf8SI3.js";var C=(function(){var e=n(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,18],r=[1,19],i=[1,20],a=[1,41],o=[1,26],s=[1,42],c=[1,24],l=[1,25],u=[1,32],d=[1,33],f=[1,34],p=[1,45],m=[1,35],h=[1,36],g=[1,37],_=[1,38],v=[1,27],y=[1,28],b=[1,29],x=[1,30],S=[1,31],C=[1,44],w=[1,46],T=[1,43],E=[1,47],D=[1,9],O=[1,8,9],k=[1,58],A=[1,59],j=[1,60],M=[1,61],N=[1,62],P=[1,63],ee=[1,64],F=[1,8,9,41],te=[1,77],I=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],L=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],R=[13,60,86,100,102,103],z=[13,60,73,74,86,100,102,103],ne=[13,60,68,69,70,71,72,86,100,102,103],B=[1,103],V=[1,121],H=[1,117],U=[1,113],W=[1,119],G=[1,114],K=[1,115],q=[1,116],J=[1,118],Y=[1,120],re=[22,50,60,61,82,86,87,88,89,90],ie=[1,128],X=[12,39],ae=[1,8,9,39,41,44,46],Z=[1,8,9,22],oe=[1,153],se=[1,8,9,61],Q=[1,8,9,22,50,60,61,82,86,87,88,89,90],ce={trace:n(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:`error`,7:`CLASS_DIAGRAM`,8:`NEWLINE`,9:`EOF`,12:`SQS`,13:`STR`,14:`SQE`,18:`DOT`,20:`GENERICTYPE`,22:`LABEL`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,39:`STRUCT_START`,41:`STRUCT_STOP`,42:`NAMESPACE`,44:`STYLE_SEPARATOR`,46:`ANNOTATION_START`,47:`ANNOTATION_END`,48:`CLASS`,50:`SPACE`,51:`MEMBER`,52:`SEPARATOR`,54:`NOTE_FOR`,56:`NOTE`,57:`CLASSDEF`,60:`ALPHA`,61:`COMMA`,62:`direction_tb`,63:`direction_bt`,64:`direction_rl`,65:`direction_lr`,68:`AGGREGATION`,69:`EXTENSION`,70:`COMPOSITION`,71:`DEPENDENCY`,72:`LOLLIPOP`,73:`LINE`,74:`DOTTED_LINE`,75:`CALLBACK`,76:`LINK`,77:`LINK_TARGET`,78:`CLICK`,79:`CALLBACK_NAME`,80:`CALLBACK_ARGS`,81:`HREF`,82:`STYLE`,83:`CSSCLASS`,86:`NUM`,87:`COLON`,88:`UNIT`,89:`BRKT`,90:`PCT`,93:`graphCodeTokens`,95:`TAGSTART`,96:`TAGEND`,97:`==`,98:`--`,99:`DEFAULT`,100:`MINUS`,101:`keywords`,102:`UNICODE_TEXT`,103:`BQUOTE_STR`},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:n(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 8:this.$=a[s-1];break;case 9:case 10:case 13:case 15:this.$=a[s];break;case 11:case 14:this.$=a[s-2]+`.`+a[s];break;case 12:case 16:this.$=a[s-1]+a[s];break;case 17:case 18:this.$=a[s-1]+`~`+a[s]+`~`;break;case 19:r.addRelation(a[s]);break;case 20:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 31:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 34:r.addClassesToNamespace(a[s-3],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 35:r.addClassesToNamespace(a[s-4],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 36:this.$=r.addNamespace(a[s]);break;case 37:this.$=r.addNamespace(a[s-1],a[s]);break;case 38:this.$=[[a[s]],[]];break;case 39:this.$=[[a[s-1]],[]];break;case 40:a[s][0].unshift(a[s-2]),this.$=a[s];break;case 41:this.$=[[],[a[s]]];break;case 42:this.$=[[],[a[s-1]]];break;case 43:a[s][1].unshift(a[s-2]),this.$=a[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=a[s];break;case 48:r.setCssClass(a[s-2],a[s]);break;case 49:r.addMembers(a[s-3],a[s-1]);break;case 51:r.setCssClass(a[s-5],a[s-3]),r.addMembers(a[s-5],a[s-1]);break;case 52:r.addAnnotation(a[s-3],a[s-1]);break;case 53:r.addAnnotation(a[s-6],a[s-4]),r.addMembers(a[s-6],a[s-1]);break;case 54:r.addAnnotation(a[s-5],a[s-3]);break;case 55:this.$=a[s],r.addClass(a[s]);break;case 56:this.$=a[s-1],r.addClass(a[s-1]),r.setClassLabel(a[s-1],a[s]);break;case 60:r.addAnnotation(a[s],a[s-2]);break;case 61:case 74:this.$=[a[s]];break;case 62:a[s].push(a[s-1]),this.$=a[s];break;case 63:break;case 64:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 65:break;case 66:break;case 67:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:`none`,relationTitle2:`none`};break;case 68:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:`none`};break;case 69:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:`none`,relationTitle2:a[s-1]};break;case 70:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 71:this.$=r.addNote(a[s],a[s-1]);break;case 72:this.$=r.addNote(a[s]);break;case 73:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 75:this.$=a[s-2].concat([a[s]]);break;case 76:r.setDirection(`TB`);break;case 77:r.setDirection(`BT`);break;case 78:r.setDirection(`RL`);break;case 79:r.setDirection(`LR`);break;case 80:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 81:this.$={type1:`none`,type2:a[s],lineType:a[s-1]};break;case 82:this.$={type1:a[s-1],type2:`none`,lineType:a[s]};break;case 83:this.$={type1:`none`,type2:`none`,lineType:a[s]};break;case 84:this.$=r.relationType.AGGREGATION;break;case 85:this.$=r.relationType.EXTENSION;break;case 86:this.$=r.relationType.COMPOSITION;break;case 87:this.$=r.relationType.DEPENDENCY;break;case 88:this.$=r.relationType.LOLLIPOP;break;case 89:this.$=r.lineType.LINE;break;case 90:this.$=r.lineType.DOTTED_LINE;break;case 91:case 97:this.$=a[s-2],r.setClickEvent(a[s-1],a[s]);break;case 92:case 98:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 93:this.$=a[s-2],r.setLink(a[s-1],a[s]);break;case 94:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 95:this.$=a[s-3],r.setLink(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 96:this.$=a[s-4],r.setLink(a[s-3],a[s-2],a[s]),r.setTooltip(a[s-3],a[s-1]);break;case 99:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 100:this.$=a[s-4],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 101:this.$=a[s-3],r.setLink(a[s-2],a[s]);break;case 102:this.$=a[s-4],r.setLink(a[s-3],a[s-1],a[s]);break;case 103:this.$=a[s-4],r.setLink(a[s-3],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 104:this.$=a[s-5],r.setLink(a[s-4],a[s-2],a[s]),r.setTooltip(a[s-4],a[s-1]);break;case 105:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 106:r.setCssClass(a[s-1],a[s]);break;case 107:this.$=[a[s]];break;case 108:a[s-2].push(a[s]),this.$=a[s-2];break;case 110:this.$=a[s-1]+a[s]}},`anonymous`),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:t,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(D,[2,5],{8:[1,48]}),{8:[1,49]},e(O,[2,19],{22:[1,50]}),e(O,[2,21]),e(O,[2,22]),e(O,[2,23]),e(O,[2,24]),e(O,[2,25]),e(O,[2,26]),e(O,[2,27]),e(O,[2,28]),e(O,[2,29]),e(O,[2,30]),{34:[1,51]},{36:[1,52]},e(O,[2,33]),e(O,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:k,69:A,70:j,71:M,72:N,73:P,74:ee}),{39:[1,65]},e(F,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),e(O,[2,65]),e(O,[2,66]),{16:69,60:p,86:C,100:w,102:T},{16:39,17:40,19:70,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:71,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:72,60:p,86:C,100:w,102:T,103:E},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:p,86:C,100:w,102:T,103:E},{13:te,55:76},{58:78,60:[1,79]},e(O,[2,76]),e(O,[2,77]),e(O,[2,78]),e(O,[2,79]),e(I,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:p,86:C,100:w,102:T,103:E}),e(I,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:87,60:p,86:C,100:w,102:T,103:E},e(L,[2,133]),e(L,[2,134]),e(L,[2,135]),e(L,[2,136]),e([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),e(D,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:t,35:r,37:i,42:a,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:t,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},e(O,[2,20]),e(O,[2,31]),e(O,[2,32]),{13:[1,91],16:39,17:40,19:90,60:p,86:C,100:w,102:T,103:E},{53:92,66:56,67:57,68:k,69:A,70:j,71:M,72:N,73:P,74:ee},e(O,[2,64]),{67:93,73:P,74:ee},e(R,[2,83],{66:94,68:k,69:A,70:j,71:M,72:N}),e(z,[2,84]),e(z,[2,85]),e(z,[2,86]),e(z,[2,87]),e(z,[2,88]),e(ne,[2,89]),e(ne,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:a,43:23,48:s,54:u,56:d},{16:100,60:p,86:C,100:w,102:T},{41:[1,102],45:101,51:B},{16:104,60:p,86:C,100:w,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:V,50:H,59:110,60:U,82:W,84:111,85:112,86:G,87:K,88:q,89:J,90:Y},{60:[1,122]},{13:te,55:123},e(F,[2,72]),e(F,[2,138]),{22:V,50:H,59:124,60:U,61:[1,125],82:W,84:111,85:112,86:G,87:K,88:q,89:J,90:Y},e(re,[2,74]),{16:39,17:40,19:126,60:p,86:C,100:w,102:T,103:E},e(I,[2,16]),e(I,[2,17]),e(I,[2,18]),{11:127,12:ie,39:[2,36]},e(X,[2,9],{16:85,17:86,15:130,18:[1,129],60:p,86:C,100:w,102:T,103:E}),e(X,[2,10]),e(ae,[2,55],{11:131,12:ie}),e(D,[2,7]),{9:[1,132]},e(Z,[2,67]),{16:39,17:40,19:133,60:p,86:C,100:w,102:T,103:E},{13:[1,135],16:39,17:40,19:134,60:p,86:C,100:w,102:T,103:E},e(R,[2,82],{66:136,68:k,69:A,70:j,71:M,72:N}),e(R,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:a,43:23,48:s,54:u,56:d},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},e(F,[2,48],{39:[1,142]}),{41:[1,143]},e(F,[2,50]),{41:[2,61],45:144,51:B},{47:[1,145]},{16:39,17:40,19:146,60:p,86:C,100:w,102:T,103:E},e(O,[2,91],{13:[1,147]}),e(O,[2,93],{13:[1,149],77:[1,148]}),e(O,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},e(O,[2,105],{61:oe}),e(se,[2,107],{85:154,22:V,50:H,60:U,82:W,86:G,87:K,88:q,89:J,90:Y}),e(Q,[2,109]),e(Q,[2,111]),e(Q,[2,112]),e(Q,[2,113]),e(Q,[2,114]),e(Q,[2,115]),e(Q,[2,116]),e(Q,[2,117]),e(Q,[2,118]),e(Q,[2,119]),e(O,[2,106]),e(F,[2,71]),e(O,[2,73],{61:oe}),{60:[1,155]},e(I,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:p,86:C,100:w,102:T,103:E},e(X,[2,12]),e(ae,[2,56]),{1:[2,4]},e(Z,[2,69]),e(Z,[2,68]),{16:39,17:40,19:158,60:p,86:C,100:w,102:T,103:E},e(R,[2,80]),e(F,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:a,43:23,48:s,54:u,56:d},{45:163,51:B},e(F,[2,49]),{41:[2,62]},e(F,[2,52],{39:[1,164]}),e(O,[2,60]),e(O,[2,92]),e(O,[2,94]),e(O,[2,95],{77:[1,165]}),e(O,[2,98]),e(O,[2,99],{13:[1,166]}),e(O,[2,101],{13:[1,168],77:[1,167]}),{22:V,50:H,60:U,82:W,84:169,85:112,86:G,87:K,88:q,89:J,90:Y},e(Q,[2,110]),e(re,[2,75]),{14:[1,170]},e(X,[2,11]),e(Z,[2,70]),e(F,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:B},e(O,[2,96]),e(O,[2,100]),e(O,[2,102]),e(O,[2,103],{77:[1,174]}),e(se,[2,108],{85:154,22:V,50:H,60:U,82:W,86:G,87:K,88:q,89:J,90:Y}),e(ae,[2,8]),e(F,[2,51]),{41:[1,175]},e(F,[2,54]),e(O,[2,104]),e(F,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:n(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:n(function(e){var t=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}n(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}n(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};ce.lexer=(function(){return{EOF:1,parseError:n(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:n(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:n(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:n(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 r=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 i=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===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:n(function(){return this._more=!0,this},`more`),reject:n(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:n(function(e){this.unput(this.match.slice(e))},`less`),pastInput:n(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:n(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:n(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{Ht as e,st as t,zt as n}from"./chunk-NSK5VX7P-CBCyTZMs.js";import{a as r,c as i,d as a,f as o,h as s,i as c,l,m as u,o as d,p as f,r as p,s as m,u as h}from"./index-Obj05Jex.js";import{a as g,i as _,n as v,r as y,t as b}from"./dagre-K_PewWfS.js";var x=4;function S(e){return g(e,x)}function C(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:w(e),edges:T(e)};return y(e.graph())||(t.value=S(e.graph())),t}function w(e){return _(e.nodes(),function(t){var n=e.node(t),r=e.parent(t),i={v:t};return y(n)||(i.value=n),y(r)||(i.parent=r),i})}function T(e){return _(e.edges(),function(t){var n=e.edge(t),r={v:t.v,w:t.w};return y(t.name)||(r.name=t.name),y(n)||(r.value=n),r})}var E=new Map,D=new Map,O=new Map,k=e(()=>{D.clear(),O.clear(),E.clear()},`clear`),A=e((e,t)=>{let r=D.get(t)||[];return n.trace(`In isDescendant`,t,` `,e,` = `,r.includes(e)),r.includes(e)},`isDescendant`),j=e((e,t)=>{let r=D.get(t)||[];return n.info(`Descendants of `,t,` is `,r),n.info(`Edge is `,e),e.v===t||e.w===t?!1:r?r.includes(e.v)||A(e.v,t)||A(e.w,t)||r.includes(e.w):(n.debug(`Tilt, `,t,`,not in descendants`),!1)},`edgeInCluster`),M=e((e,t,r,i)=>{n.warn(`Copying children of `,e,`root`,i,`data`,t.node(e),i);let a=t.children(e)||[];e!==i&&a.push(e),n.warn(`Copying (nodes) clusterId`,e,`nodes`,a),a.forEach(a=>{if(t.children(a).length>0)M(a,t,r,i);else{let o=t.node(a);n.info(`cp `,a,` to `,i,` with parent `,e),r.setNode(a,o),i!==t.parent(a)&&(n.warn(`Setting parent`,a,t.parent(a)),r.setParent(a,t.parent(a))),e!==i&&a!==e?(n.debug(`Setting parent`,a,e),r.setParent(a,e)):(n.info(`In copy `,e,`root`,i,`data`,t.node(e),i),n.debug(`Not Setting parent for node=`,a,`cluster!==rootId`,e!==i,`node!==clusterId`,a!==e));let s=t.edges(a);n.debug(`Copying Edges`,s),s.forEach(a=>{n.info(`Edge`,a);let o=t.edge(a.v,a.w,a.name);n.info(`Edge data`,o,i);try{if(j(a,i)){let e=D.get(i)||[],s=e.includes(a.v)||A(a.v,i)||a.v===i,c=e.includes(a.w)||A(a.w,i)||a.w===i;if(s&&c)n.info(`Copying as `,a.v,a.w,o,a.name),r.setEdge(a.v,a.w,o,a.name),n.info(`newGraph edges `,r.edges(),r.edge(r.edges()[0]));else{let e=s?i:a.v,r=c?i:a.w;n.info(`Rebinding cross-boundary edge as `,e,r,o,a.name),t.setEdge(e,r,o,a.name)}}else n.info(`Skipping copy of edge `,a.v,`-->`,a.w,` rootId: `,i,` clusterId:`,e)}catch(e){n.error(e)}})}n.debug(`Removing node`,a),t.removeNode(a)})},`copy`),N=e((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)O.set(i,e),r=[...r,...N(i,t)];return r},`extractDescendants`),P=e((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),F=e((e,t,r)=>{let i=t.children(e);if(n.trace(`Searching children of id `,e,i),i.length<1)return e;let a;for(let e of i){let n=F(e,t,r),i=P(t,r,n);if(n){if(i.length>0)a=n;else return n}}return a},`findNonClusterChild`),I=e(e=>!E.has(e)||!E.get(e).externalConnections?e:E.has(e)?E.get(e).id:e,`getAnchorId`),L=e((e,t)=>{if(!e||t>10){n.debug(`Opting out, no graph `);return}n.debug(`Opting in, graph `),e.nodes().forEach(function(t){e.children(t).length>0&&(n.warn(`Cluster identified`,t,` Replacement id in edges: `,F(t,e,t)),D.set(t,N(t,e)),E.set(t,{id:F(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){let r=e.children(t),i=e.edges();r.length>0?(n.debug(`Cluster identified`,t,D),i.forEach(e=>{A(e.v,t)^A(e.w,t)&&(n.warn(`Edge: `,e,` leaves cluster `,t),n.warn(`Descendants of XXX `,t,`: `,D.get(t)),E.get(t).externalConnections=!0)})):n.debug(`Not a cluster `,t,D)});for(let t of E.keys()){let n=E.get(t).id,r=e.parent(n);r!==t&&E.has(r)&&!E.get(r).externalConnections&&(E.get(t).id=r);let i=e.edges().some(e=>e.v===t);if(n&&E.get(t)?.externalConnections&&i&&V(e,n,t)){let r=H(e,t,e.parent(n));r&&(E.get(t).id=r)}}e.edges().forEach(function(t){let r=e.edge(t);n.warn(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),n.warn(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(e.edge(t)));let i=t.v,a=t.w;if(n.warn(`Fix XXX`,E,`ids:`,t.v,t.w,`Translating: `,E.get(t.v),` --- `,E.get(t.w)),E.get(t.v)||E.get(t.w)){if(n.warn(`Fixing and trying - removing XXX`,t.v,t.w,t.name),i=I(t.v),a=I(t.w),e.removeEdge(t.v,t.w,t.name),i!==t.v){let n=e.parent(i);E.get(n).externalConnections=!0,r.fromCluster=t.v}if(a!==t.w){let n=e.parent(a);E.get(n).externalConnections=!0,r.toCluster=t.w}n.warn(`Fix Replacing with XXX`,i,a,t.name),e.setEdge(i,a,r,t.name)}}),n.warn(`Adjusted Graph`,C(e)),R(e,0),n.trace(E)},`adjustClustersAndEdges`),R=e((e,t)=>{if(n.warn(`extractor - `,t,C(e),e.children(`D`)),t>10){n.error(`Bailing out`);return}let r=e.nodes(),i=!1;for(let t of r){let n=e.children(t);i||=n.length>0}if(!i){n.debug(`Done, no node has children`,e.nodes());return}n.debug(`Nodes = `,r,t);for(let i of r)if(n.debug(`Extracting node`,i,E,E.has(i)&&!E.get(i).externalConnections,!e.parent(i),e.node(i),e.children(`D`),` Depth `,t),!E.has(i))n.debug(`Not a cluster`,i,t);else if(E.get(i)?.clusterData?.explicitDir&&e.children(i)&&e.children(i).length>0){n.warn(`Cluster with explicit dir, creating subgraph for children`,i,t);let r=E.get(i).clusterData.dir,a=new v({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});M(i,e,a,i);let o=e.node(i)||{};e.setNode(i,{...o,clusterNode:!0,id:i,clusterData:E.get(i).clusterData,label:E.get(i).label,graph:a}),n.warn(`Subgraph for cluster with explicit dir created:`,i,C(a))}else if(!E.get(i).externalConnections&&e.children(i)&&e.children(i).length>0){n.warn(`Cluster without external connections, without a parent and with children`,i,t);let r=e.graph().rankdir===`TB`?`LR`:`TB`;E.get(i)?.clusterData?.dir&&(r=E.get(i).clusterData.dir,n.warn(`Fixing dir`,E.get(i).clusterData.dir,r));let a=new v({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});M(i,e,a,i);let o=e.node(i)||{};e.setNode(i,{...o,clusterNode:!0,id:i,clusterData:E.get(i).clusterData,label:E.get(i).label,graph:a}),n.debug(`Old graph after copy`,C(e))}else n.warn(`Cluster ** `,i,` **not meeting the criteria !externalConnections:`,!E.get(i).externalConnections,` no parent: `,!e.parent(i),` children `,e.children(i)&&e.children(i).length>0,e.children(`D`),t),n.debug(E);r=e.nodes(),n.warn(`New list of nodes`,r);for(let i of r){let r=e.node(i);n.warn(` Now next level`,i,r),r?.clusterNode&&R(r.graph,t+1)}},`extractor`),z=e((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=z(e,e.children(t));n=[...n,...r]}),n},`sorter`),B=e(e=>z(e,e.children()),`sortNodesByHierarchy`),V=e((e,t,n)=>{let r=e.parent(t);for(;r&&r!==n;){let t=E.get(r);if(t&&!t.externalConnections)return!0;r=e.parent(r)}return!1},`isNodeInExtractableCluster`),H=e((e,t,n)=>{let r=e.children(t)??[];for(let i of r){if(i===n||A(i,n))continue;let r=F(i,e,t);if(r&&!V(e,r,t))return r}return null},`findSafeAnchorNode`),U=e((e,t,n)=>Math.max(t,Math.min(n,e)),`clamp`),W=e((e=`TB`)=>{switch(e){case`BT`:return`bottom`;case`LR`:return`right`;case`RL`:return`left`;default:return`top`}},`getDefaultSelfLoopSide`),G=e(e=>e===`flowchart`||e===`flowchart-v2`||e===`stateDiagram`,`shouldMergeSelfLoopSegments`),K=e((e,t,n,r,i)=>{let a=[],o=new Set;if(n.forEach(({start:e,end:t})=>{e!==r&&o.add(e),t!==r&&o.add(t)}),o.forEach(t=>{let n=e.node(t);typeof n?.x==`number`&&typeof n?.y==`number`&&a.push(n)}),a.length===0&&n.forEach(({edge:e})=>{(e.points??[]).forEach(e=>{typeof e?.x==`number`&&typeof e?.y==`number`&&a.push(e)})}),a.length===0)return W(i);let s=a.reduce((e,t)=>({x:e.x+t.x/a.length,y:e.y+t.y/a.length}),{x:0,y:0}),c=s.x-t.x,l=s.y-t.y;return Math.abs(c)>Math.abs(l)?c>0?`right`:`left`:Math.abs(l)>0?l>0?`bottom`:`top`:W(i)},`getSelfLoopSide`),q=e((e,t=`top`,n=0,r=0)=>{let i=e.x,a=e.y-n,o=e.width/2,s=e.height/2,c=Math.max(36,Math.min(100,e.width*.8)),l=U(Math.max(r,e.width*.35),36,c),u=U(Math.min(e.width,e.height)*.45,24,48);switch(t){case`bottom`:{let e=a+s;return[{x:i-l/2,y:e},{x:i-l/2,y:e+u},{x:i+l/2,y:e+u},{x:i+l/2,y:e}]}case`right`:{let e=i+o;return[{x:e,y:a-l/2},{x:e+u,y:a-l/2},{x:e+u,y:a+l/2},{x:e,y:a+l/2}]}case`left`:{let e=i-o;return[{x:e,y:a-l/2},{x:e-u,y:a-l/2},{x:e-u,y:a+l/2},{x:e,y:a+l/2}]}default:{let e=a-s;return[{x:i-l/2,y:e},{x:i-l/2,y:e-u},{x:i+l/2,y:e-u},{x:i+l/2,y:e}]}}},`getSelfLoopPoints`),J=e((e,t,n=`top`,r=0,i={})=>{let a=e.x,o=e.y-r,s=i.width??0,c=i.height??0;switch(n){case`bottom`:return{x:a,y:Math.max(...t.map(e=>e.y))+c/2+4};case`right`:return{x:Math.max(...t.map(e=>e.x))+s/2+4,y:o};case`left`:return{x:Math.min(...t.map(e=>e.x))-s/2-4,y:o};default:return{x:a,y:Math.min(...t.map(e=>e.y))-c/2-4}}},`getSelfLoopLabelPosition`),Y=e((e,t=0,{mergeSelfLoops:n=!0}={})=>{let r=new Map,i=[],a=e.graph()?.rankdir;return e.edges().forEach(t=>{let a=e.edge(t);if(n&&a.selfLoop){let e=a.selfLoop.id;r.has(e)||r.set(e,[]),r.get(e).push({edge:a,start:t.v,end:t.w})}else i.push({edge:a,start:t.v,end:t.w})}),r.forEach(n=>{if(n.length!==3){n.forEach(e=>i.push(e));return}n.sort((e,t)=>e.edge.selfLoop.order-t.edge.selfLoop.order);let[r,o,s]=n,c=r.edge.originalEdge??o.edge.originalEdge??s.edge.originalEdge??o.edge,l=e.node(c.start);if(!l){n.forEach(e=>i.push(e));return}let u={width:o.edge.width,height:o.edge.height},d=K(e,l,n,c.start,a),f=q(l,d,t,u.width??0),p=J(l,f,d,t,u),m={...o.edge,...c,id:c.id,points:f,start:c.start,end:c.end,x:p.x,y:p.y,width:u.width,height:u.height,labelStyle:o.edge.labelStyle,fromCluster:r.edge.fromCluster??o.edge.fromCluster??s.edge.fromCluster,toCluster:r.edge.toCluster??o.edge.toCluster??s.edge.toCluster};delete m.selfLoop,delete m.originalEdge,i.push({edge:m,start:m.start,end:m.end})}),i},`getEdgesToRender`),X=e(async(t,i,l,d,p,g)=>{n.warn(`Graph in recursive render:XAX`,C(i),p);let _=i.graph().rankdir;n.trace(`Dir in recursive render - dir:`,_);let v=t.insert(`g`).attr(`class`,`root`);i.nodes()?n.info(`Recursive render XXX`,i.nodes()):n.info(`No nodes found for`,i),i.edges().length>0&&n.info(`Recursive edges`,i.edge(i.edges()[0]));let y=v.insert(`g`).attr(`class`,`clusters`),x=v.insert(`g`).attr(`class`,`edgePaths`),S=v.insert(`g`).attr(`class`,`edgeLabels`),w=v.insert(`g`).attr(`class`,`nodes`),T=G(l);await Promise.all(i.nodes().map(async function(e){let t=i.node(e);if(p!==void 0){let t=JSON.parse(JSON.stringify(p.clusterData));n.trace(`Setting data for parent cluster XXX
1
+ import{Ht as e,st as t,zt as n}from"./chunk-NSK5VX7P-CBCyTZMs.js";import{a as r,c as i,d as a,f as o,h as s,i as c,l,m as u,o as d,p as f,r as p,s as m,u as h}from"./index-Bgt4sXpW.js";import{a as g,i as _,n as v,r as y,t as b}from"./dagre-K_PewWfS.js";var x=4;function S(e){return g(e,x)}function C(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:w(e),edges:T(e)};return y(e.graph())||(t.value=S(e.graph())),t}function w(e){return _(e.nodes(),function(t){var n=e.node(t),r=e.parent(t),i={v:t};return y(n)||(i.value=n),y(r)||(i.parent=r),i})}function T(e){return _(e.edges(),function(t){var n=e.edge(t),r={v:t.v,w:t.w};return y(t.name)||(r.name=t.name),y(n)||(r.value=n),r})}var E=new Map,D=new Map,O=new Map,k=e(()=>{D.clear(),O.clear(),E.clear()},`clear`),A=e((e,t)=>{let r=D.get(t)||[];return n.trace(`In isDescendant`,t,` `,e,` = `,r.includes(e)),r.includes(e)},`isDescendant`),j=e((e,t)=>{let r=D.get(t)||[];return n.info(`Descendants of `,t,` is `,r),n.info(`Edge is `,e),e.v===t||e.w===t?!1:r?r.includes(e.v)||A(e.v,t)||A(e.w,t)||r.includes(e.w):(n.debug(`Tilt, `,t,`,not in descendants`),!1)},`edgeInCluster`),M=e((e,t,r,i)=>{n.warn(`Copying children of `,e,`root`,i,`data`,t.node(e),i);let a=t.children(e)||[];e!==i&&a.push(e),n.warn(`Copying (nodes) clusterId`,e,`nodes`,a),a.forEach(a=>{if(t.children(a).length>0)M(a,t,r,i);else{let o=t.node(a);n.info(`cp `,a,` to `,i,` with parent `,e),r.setNode(a,o),i!==t.parent(a)&&(n.warn(`Setting parent`,a,t.parent(a)),r.setParent(a,t.parent(a))),e!==i&&a!==e?(n.debug(`Setting parent`,a,e),r.setParent(a,e)):(n.info(`In copy `,e,`root`,i,`data`,t.node(e),i),n.debug(`Not Setting parent for node=`,a,`cluster!==rootId`,e!==i,`node!==clusterId`,a!==e));let s=t.edges(a);n.debug(`Copying Edges`,s),s.forEach(a=>{n.info(`Edge`,a);let o=t.edge(a.v,a.w,a.name);n.info(`Edge data`,o,i);try{if(j(a,i)){let e=D.get(i)||[],s=e.includes(a.v)||A(a.v,i)||a.v===i,c=e.includes(a.w)||A(a.w,i)||a.w===i;if(s&&c)n.info(`Copying as `,a.v,a.w,o,a.name),r.setEdge(a.v,a.w,o,a.name),n.info(`newGraph edges `,r.edges(),r.edge(r.edges()[0]));else{let e=s?i:a.v,r=c?i:a.w;n.info(`Rebinding cross-boundary edge as `,e,r,o,a.name),t.setEdge(e,r,o,a.name)}}else n.info(`Skipping copy of edge `,a.v,`-->`,a.w,` rootId: `,i,` clusterId:`,e)}catch(e){n.error(e)}})}n.debug(`Removing node`,a),t.removeNode(a)})},`copy`),N=e((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)O.set(i,e),r=[...r,...N(i,t)];return r},`extractDescendants`),P=e((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),F=e((e,t,r)=>{let i=t.children(e);if(n.trace(`Searching children of id `,e,i),i.length<1)return e;let a;for(let e of i){let n=F(e,t,r),i=P(t,r,n);if(n){if(i.length>0)a=n;else return n}}return a},`findNonClusterChild`),I=e(e=>!E.has(e)||!E.get(e).externalConnections?e:E.has(e)?E.get(e).id:e,`getAnchorId`),L=e((e,t)=>{if(!e||t>10){n.debug(`Opting out, no graph `);return}n.debug(`Opting in, graph `),e.nodes().forEach(function(t){e.children(t).length>0&&(n.warn(`Cluster identified`,t,` Replacement id in edges: `,F(t,e,t)),D.set(t,N(t,e)),E.set(t,{id:F(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){let r=e.children(t),i=e.edges();r.length>0?(n.debug(`Cluster identified`,t,D),i.forEach(e=>{A(e.v,t)^A(e.w,t)&&(n.warn(`Edge: `,e,` leaves cluster `,t),n.warn(`Descendants of XXX `,t,`: `,D.get(t)),E.get(t).externalConnections=!0)})):n.debug(`Not a cluster `,t,D)});for(let t of E.keys()){let n=E.get(t).id,r=e.parent(n);r!==t&&E.has(r)&&!E.get(r).externalConnections&&(E.get(t).id=r);let i=e.edges().some(e=>e.v===t);if(n&&E.get(t)?.externalConnections&&i&&V(e,n,t)){let r=H(e,t,e.parent(n));r&&(E.get(t).id=r)}}e.edges().forEach(function(t){let r=e.edge(t);n.warn(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),n.warn(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(e.edge(t)));let i=t.v,a=t.w;if(n.warn(`Fix XXX`,E,`ids:`,t.v,t.w,`Translating: `,E.get(t.v),` --- `,E.get(t.w)),E.get(t.v)||E.get(t.w)){if(n.warn(`Fixing and trying - removing XXX`,t.v,t.w,t.name),i=I(t.v),a=I(t.w),e.removeEdge(t.v,t.w,t.name),i!==t.v){let n=e.parent(i);E.get(n).externalConnections=!0,r.fromCluster=t.v}if(a!==t.w){let n=e.parent(a);E.get(n).externalConnections=!0,r.toCluster=t.w}n.warn(`Fix Replacing with XXX`,i,a,t.name),e.setEdge(i,a,r,t.name)}}),n.warn(`Adjusted Graph`,C(e)),R(e,0),n.trace(E)},`adjustClustersAndEdges`),R=e((e,t)=>{if(n.warn(`extractor - `,t,C(e),e.children(`D`)),t>10){n.error(`Bailing out`);return}let r=e.nodes(),i=!1;for(let t of r){let n=e.children(t);i||=n.length>0}if(!i){n.debug(`Done, no node has children`,e.nodes());return}n.debug(`Nodes = `,r,t);for(let i of r)if(n.debug(`Extracting node`,i,E,E.has(i)&&!E.get(i).externalConnections,!e.parent(i),e.node(i),e.children(`D`),` Depth `,t),!E.has(i))n.debug(`Not a cluster`,i,t);else if(E.get(i)?.clusterData?.explicitDir&&e.children(i)&&e.children(i).length>0){n.warn(`Cluster with explicit dir, creating subgraph for children`,i,t);let r=E.get(i).clusterData.dir,a=new v({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});M(i,e,a,i);let o=e.node(i)||{};e.setNode(i,{...o,clusterNode:!0,id:i,clusterData:E.get(i).clusterData,label:E.get(i).label,graph:a}),n.warn(`Subgraph for cluster with explicit dir created:`,i,C(a))}else if(!E.get(i).externalConnections&&e.children(i)&&e.children(i).length>0){n.warn(`Cluster without external connections, without a parent and with children`,i,t);let r=e.graph().rankdir===`TB`?`LR`:`TB`;E.get(i)?.clusterData?.dir&&(r=E.get(i).clusterData.dir,n.warn(`Fixing dir`,E.get(i).clusterData.dir,r));let a=new v({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});M(i,e,a,i);let o=e.node(i)||{};e.setNode(i,{...o,clusterNode:!0,id:i,clusterData:E.get(i).clusterData,label:E.get(i).label,graph:a}),n.debug(`Old graph after copy`,C(e))}else n.warn(`Cluster ** `,i,` **not meeting the criteria !externalConnections:`,!E.get(i).externalConnections,` no parent: `,!e.parent(i),` children `,e.children(i)&&e.children(i).length>0,e.children(`D`),t),n.debug(E);r=e.nodes(),n.warn(`New list of nodes`,r);for(let i of r){let r=e.node(i);n.warn(` Now next level`,i,r),r?.clusterNode&&R(r.graph,t+1)}},`extractor`),z=e((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=z(e,e.children(t));n=[...n,...r]}),n},`sorter`),B=e(e=>z(e,e.children()),`sortNodesByHierarchy`),V=e((e,t,n)=>{let r=e.parent(t);for(;r&&r!==n;){let t=E.get(r);if(t&&!t.externalConnections)return!0;r=e.parent(r)}return!1},`isNodeInExtractableCluster`),H=e((e,t,n)=>{let r=e.children(t)??[];for(let i of r){if(i===n||A(i,n))continue;let r=F(i,e,t);if(r&&!V(e,r,t))return r}return null},`findSafeAnchorNode`),U=e((e,t,n)=>Math.max(t,Math.min(n,e)),`clamp`),W=e((e=`TB`)=>{switch(e){case`BT`:return`bottom`;case`LR`:return`right`;case`RL`:return`left`;default:return`top`}},`getDefaultSelfLoopSide`),G=e(e=>e===`flowchart`||e===`flowchart-v2`||e===`stateDiagram`,`shouldMergeSelfLoopSegments`),K=e((e,t,n,r,i)=>{let a=[],o=new Set;if(n.forEach(({start:e,end:t})=>{e!==r&&o.add(e),t!==r&&o.add(t)}),o.forEach(t=>{let n=e.node(t);typeof n?.x==`number`&&typeof n?.y==`number`&&a.push(n)}),a.length===0&&n.forEach(({edge:e})=>{(e.points??[]).forEach(e=>{typeof e?.x==`number`&&typeof e?.y==`number`&&a.push(e)})}),a.length===0)return W(i);let s=a.reduce((e,t)=>({x:e.x+t.x/a.length,y:e.y+t.y/a.length}),{x:0,y:0}),c=s.x-t.x,l=s.y-t.y;return Math.abs(c)>Math.abs(l)?c>0?`right`:`left`:Math.abs(l)>0?l>0?`bottom`:`top`:W(i)},`getSelfLoopSide`),q=e((e,t=`top`,n=0,r=0)=>{let i=e.x,a=e.y-n,o=e.width/2,s=e.height/2,c=Math.max(36,Math.min(100,e.width*.8)),l=U(Math.max(r,e.width*.35),36,c),u=U(Math.min(e.width,e.height)*.45,24,48);switch(t){case`bottom`:{let e=a+s;return[{x:i-l/2,y:e},{x:i-l/2,y:e+u},{x:i+l/2,y:e+u},{x:i+l/2,y:e}]}case`right`:{let e=i+o;return[{x:e,y:a-l/2},{x:e+u,y:a-l/2},{x:e+u,y:a+l/2},{x:e,y:a+l/2}]}case`left`:{let e=i-o;return[{x:e,y:a-l/2},{x:e-u,y:a-l/2},{x:e-u,y:a+l/2},{x:e,y:a+l/2}]}default:{let e=a-s;return[{x:i-l/2,y:e},{x:i-l/2,y:e-u},{x:i+l/2,y:e-u},{x:i+l/2,y:e}]}}},`getSelfLoopPoints`),J=e((e,t,n=`top`,r=0,i={})=>{let a=e.x,o=e.y-r,s=i.width??0,c=i.height??0;switch(n){case`bottom`:return{x:a,y:Math.max(...t.map(e=>e.y))+c/2+4};case`right`:return{x:Math.max(...t.map(e=>e.x))+s/2+4,y:o};case`left`:return{x:Math.min(...t.map(e=>e.x))-s/2-4,y:o};default:return{x:a,y:Math.min(...t.map(e=>e.y))-c/2-4}}},`getSelfLoopLabelPosition`),Y=e((e,t=0,{mergeSelfLoops:n=!0}={})=>{let r=new Map,i=[],a=e.graph()?.rankdir;return e.edges().forEach(t=>{let a=e.edge(t);if(n&&a.selfLoop){let e=a.selfLoop.id;r.has(e)||r.set(e,[]),r.get(e).push({edge:a,start:t.v,end:t.w})}else i.push({edge:a,start:t.v,end:t.w})}),r.forEach(n=>{if(n.length!==3){n.forEach(e=>i.push(e));return}n.sort((e,t)=>e.edge.selfLoop.order-t.edge.selfLoop.order);let[r,o,s]=n,c=r.edge.originalEdge??o.edge.originalEdge??s.edge.originalEdge??o.edge,l=e.node(c.start);if(!l){n.forEach(e=>i.push(e));return}let u={width:o.edge.width,height:o.edge.height},d=K(e,l,n,c.start,a),f=q(l,d,t,u.width??0),p=J(l,f,d,t,u),m={...o.edge,...c,id:c.id,points:f,start:c.start,end:c.end,x:p.x,y:p.y,width:u.width,height:u.height,labelStyle:o.edge.labelStyle,fromCluster:r.edge.fromCluster??o.edge.fromCluster??s.edge.fromCluster,toCluster:r.edge.toCluster??o.edge.toCluster??s.edge.toCluster};delete m.selfLoop,delete m.originalEdge,i.push({edge:m,start:m.start,end:m.end})}),i},`getEdgesToRender`),X=e(async(t,i,l,d,p,g)=>{n.warn(`Graph in recursive render:XAX`,C(i),p);let _=i.graph().rankdir;n.trace(`Dir in recursive render - dir:`,_);let v=t.insert(`g`).attr(`class`,`root`);i.nodes()?n.info(`Recursive render XXX`,i.nodes()):n.info(`No nodes found for`,i),i.edges().length>0&&n.info(`Recursive edges`,i.edge(i.edges()[0]));let y=v.insert(`g`).attr(`class`,`clusters`),x=v.insert(`g`).attr(`class`,`edgePaths`),S=v.insert(`g`).attr(`class`,`edgeLabels`),w=v.insert(`g`).attr(`class`,`nodes`),T=G(l);await Promise.all(i.nodes().map(async function(e){let t=i.node(e);if(p!==void 0){let t=JSON.parse(JSON.stringify(p.clusterData));n.trace(`Setting data for parent cluster XXX
2
2
  Node.id = `,e,`
3
3
  data=`,t.height,`
4
4
  Parent cluster`,p.height),i.setNode(p.id,t),i.parent(e)||(n.trace(`Setting parent`,e,p.id),i.setParent(e,p.id,t))}if(n.info(`(Insert) Node XXX`+e+`: `+JSON.stringify(i.node(e))),t?.clusterNode){n.info(`Cluster identified XBX`,e,t.width,i.node(e));let{ranksep:r,nodesep:a}=i.graph();t.graph.setGraph({...t.graph.graph(),ranksep:r+25,nodesep:a});let o=await X(w,t.graph,l,d,i.node(e),g),s=o.elem;u(t,s),t.diff=o.diff||0,n.info(`New compound node after recursive render XAX`,e,`width`,t.width,`height`,t.height),f(s,t)}else i.children(e).length>0?(n.trace(`Cluster - the non recursive path XBX`,e,t.id,t,t.width,`Graph:`,i),n.trace(F(t.id,i)),E.set(t.id,{id:F(t.id,i),node:t})):(n.trace(`Node - the non recursive path XAX`,e,w,i.node(e),_),await a(w,i.node(e),{config:g,dir:_}))})),await e(async()=>{let e=i.edges().map(async function(e){let t=i.edge(e.v,e.w,e.name);if(n.info(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(e)),n.info(`Edge `+e.v+` -> `+e.w+`: `,e,` `,JSON.stringify(i.edge(e))),n.info(`Fix`,E,`ids:`,e.v,e.w,`Translating: `,E.get(e.v),E.get(e.w)),T&&t.selfLoop){if(t.selfLoop.order!==1)return;let e=t.id;t.id=t.selfLoop.id,await r(S,t),t.id=e;return}await r(S,t)});await Promise.all(e)},`processEdges`)(),n.info(`Graph before layout:`,JSON.stringify(C(i))),n.info(`############################################# XXX`),n.info(`### Layout ### XXX`),n.info(`############################################# XXX`),b(i),n.info(`Graph after layout:`,JSON.stringify(C(i)));let D=0,{subGraphTitleTotalMargin:O}=s(g);await Promise.all(B(i).map(async function(e){let t=i.node(e);if(n.info(`Position XBX => `+e+`: (`+t.x,`,`+t.y,`) width: `,t.width,` height: `,t.height),t?.clusterNode)t.y+=O,n.info(`A tainted cluster node XBX1`,e,t.id,t.width,t.height,t.x,t.y,i.parent(e)),E.get(t.id).node=t,o(t);else if(i.children(e).length>0){n.info(`A pure cluster node XBX1`,e,t.id,t.x,t.y,t.width,t.height,i.parent(e)),t.height+=O,i.node(t.parentId);let r=t?.padding/2||0,a=t?.labelBBox?.height||0,o=a-r||0;n.debug(`OffsetY`,o,`labelHeight`,a,`halfPadding`,r),await h(y,t),E.get(t.id).node=t}else{let e=i.node(t.parentId);t.y+=O/2,n.info(`A regular node XBX1 - using the padding`,t.id,`parent`,t.parentId,t.width,t.height,t.x,t.y,`offsetY`,t.offsetY,`parent`,e,e?.offsetY,t),o(t)}}));let k=O/2;return Y(i,k,{mergeSelfLoops:T}).forEach(function({edge:e,start:t,end:r}){n.info(`Edge `+t+` -> `+r+`: `+JSON.stringify(e),e),e.points.forEach(e=>e.y+=k);let a=i.node(t),o=i.node(r),s=c(x,e,E,l,a,o,d);m(e,s)}),i.nodes().forEach(function(e){let t=i.node(e);n.info(e,t.type,t.diff),t.isGroup&&(D=t.diff)}),n.warn(`Returning from recursive render XAX`,v,D),{elem:v,diff:D}},`recursiveRender`),Z=e(async(e,r)=>{let a=new v({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),o=r.select(`g`);d(o,e.markers,e.type,e.diagramId),l(),p(),i(),k(),e.nodes.forEach(e=>{a.setNode(e.id,{...e}),e.parentId&&a.setParent(e.id,e.parentId)}),n.debug(`Edges:`,e.edges),e.edges.forEach(e=>{if(e.start===e.end){let t=e.start,n=t+`---`+t+`---1`,r=t+`---`+t+`---2`,i=a.node(t);a.setNode(n,{domId:n,id:n,parentId:i.parentId,labelStyle:``,label:``,padding:0,shape:`labelRect`,style:``,width:10,height:10}),a.setParent(n,i.parentId),a.setNode(r,{domId:r,id:r,parentId:i.parentId,labelStyle:``,padding:0,shape:`labelRect`,label:``,style:``,width:10,height:10}),a.setParent(r,i.parentId);let o=structuredClone(e),s=structuredClone(e),c=structuredClone(e),l=structuredClone(e);s.originalEdge=o,s.selfLoop={id:o.id,order:0},c.originalEdge=o,c.selfLoop={id:o.id,order:1},l.originalEdge=o,l.selfLoop={id:o.id,order:2},s.label=``,s.arrowTypeEnd=`none`,s.endLabelLeft=``,s.endLabelRight=``,s.startLabelLeft=``,s.id=t+`-cyclic-special-1`,c.startLabelRight=``,c.startLabelLeft=``,c.endLabelLeft=``,c.endLabelRight=``,c.arrowTypeStart=`none`,c.arrowTypeEnd=`none`,c.id=t+`-cyclic-special-mid`,l.label=``,l.startLabelRight=``,l.startLabelLeft=``,l.arrowTypeStart=`none`,i.isGroup&&(s.fromCluster=t,l.toCluster=t),l.id=t+`-cyclic-special-2`,l.arrowTypeStart=`none`,a.setEdge(t,n,s,t+`-cyclic-special-0`),a.setEdge(n,r,c,t+`-cyclic-special-1`),a.setEdge(r,t,l,t+`-cyclic-special-2`)}else a.setEdge(e.start,e.end,{...e},e.id)}),n.warn(`Graph at first:`,JSON.stringify(C(a))),L(a),n.warn(`Graph after XAX:`,JSON.stringify(C(a)));let s=t();await X(o,a,e.type,e.diagramId,void 0,s)},`render`);export{Y as getEdgesToRender,Z as render};