dominds 1.12.2 → 1.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/dist/llm/client.d.ts +1 -0
  2. package/dist/llm/defaults.yaml +1 -0
  3. package/dist/llm/gen/anthropic.d.ts +2 -1
  4. package/dist/llm/gen/anthropic.js +4 -0
  5. package/dist/llm/gen/codex.d.ts +2 -1
  6. package/dist/llm/gen/codex.js +4 -0
  7. package/dist/llm/gen/failure-classifier.d.ts +3 -0
  8. package/dist/llm/gen/failure-classifier.js +156 -0
  9. package/dist/llm/gen/openai-compatible.d.ts +2 -1
  10. package/dist/llm/gen/openai-compatible.js +4 -0
  11. package/dist/llm/gen/openai.d.ts +2 -1
  12. package/dist/llm/gen/openai.js +4 -0
  13. package/dist/llm/gen.d.ts +10 -0
  14. package/dist/llm/kernel-driver/drive.js +22 -6
  15. package/dist/llm/kernel-driver/flow.js +15 -20
  16. package/dist/llm/kernel-driver/reply-guidance.d.ts +7 -1
  17. package/dist/llm/kernel-driver/reply-guidance.js +30 -4
  18. package/dist/llm/kernel-driver/runtime.d.ts +3 -0
  19. package/dist/llm/kernel-driver/runtime.js +103 -30
  20. package/dist/persistence.js +31 -6
  21. package/dist/runtime/inter-dialog-format.js +46 -16
  22. package/dist/runtime/reply-prompt-copy.d.ts +12 -2
  23. package/dist/runtime/reply-prompt-copy.js +74 -16
  24. package/dist/runtime/tellask-labels.d.ts +8 -0
  25. package/dist/runtime/tellask-labels.js +47 -0
  26. package/dist/shared/utils/fbr.js +8 -12
  27. package/dist/shared/utils/inter-dialog-format.js +4 -6
  28. package/dist/tools/pending-tellask-reminder.js +3 -19
  29. package/package.json +3 -3
  30. package/webapp/dist/assets/{_basePickBy-B1lGEusm.js → _basePickBy-CBOtd63g.js} +3 -3
  31. package/webapp/dist/assets/_basePickBy-CBOtd63g.js.map +1 -0
  32. package/webapp/dist/assets/{_baseUniq-SGAsMSaE.js → _baseUniq-mfoKz4Wm.js} +2 -2
  33. package/webapp/dist/assets/_baseUniq-mfoKz4Wm.js.map +1 -0
  34. package/webapp/dist/assets/{arc-B2joU0eL.js → arc-Dq0WZLyu.js} +2 -2
  35. package/webapp/dist/assets/arc-Dq0WZLyu.js.map +1 -0
  36. package/webapp/dist/assets/{architectureDiagram-2XIMDMQ5-CsuG-Xa3.js → architectureDiagram-VXUJARFQ-CNmygmp3.js} +8 -26
  37. package/webapp/dist/assets/architectureDiagram-VXUJARFQ-CNmygmp3.js.map +1 -0
  38. package/webapp/dist/assets/{blockDiagram-WCTKOSBZ-D8_SVEGn.js → blockDiagram-VD42YOAC-DvE0lybt.js} +170 -187
  39. package/webapp/dist/assets/blockDiagram-VD42YOAC-DvE0lybt.js.map +1 -0
  40. package/webapp/dist/assets/{c4Diagram-IC4MRINW-D_lhLw36.js → c4Diagram-YG6GDRKO-CR7zJ2_u.js} +4 -4
  41. package/webapp/dist/assets/c4Diagram-YG6GDRKO-CR7zJ2_u.js.map +1 -0
  42. package/webapp/dist/assets/{channel-BI76pqQS.js → channel-DrTrnYx4.js} +2 -2
  43. package/webapp/dist/assets/channel-DrTrnYx4.js.map +1 -0
  44. package/webapp/dist/assets/{chunk-4BX2VUAB-BVI27QNV.js → chunk-4BX2VUAB-CVuJEIeN.js} +2 -2
  45. package/webapp/dist/assets/chunk-4BX2VUAB-CVuJEIeN.js.map +1 -0
  46. package/webapp/dist/assets/{chunk-55IACEB6-D2ECkhpq.js → chunk-55IACEB6-BxUoXApB.js} +2 -2
  47. package/webapp/dist/assets/chunk-55IACEB6-BxUoXApB.js.map +1 -0
  48. package/webapp/dist/assets/{chunk-WL4C6EOR-Cd-rWL8V.js → chunk-B4BG7PRW-DpMa3-9L.js} +121 -171
  49. package/webapp/dist/assets/chunk-B4BG7PRW-DpMa3-9L.js.map +1 -0
  50. package/webapp/dist/assets/{chunk-NQ4KR5QH-CZmmNdX5.js → chunk-DI55MBZ5-SAhxUTqQ.js} +7 -9
  51. package/webapp/dist/assets/chunk-DI55MBZ5-SAhxUTqQ.js.map +1 -0
  52. package/webapp/dist/assets/{chunk-FMBD7UC4-BAtzNqV5.js → chunk-FMBD7UC4-TX-LVAaV.js} +2 -2
  53. package/webapp/dist/assets/chunk-FMBD7UC4-TX-LVAaV.js.map +1 -0
  54. package/webapp/dist/assets/{chunk-KX2RTZJC-Dt3XFfSl.js → chunk-QN33PNHL-D1uiKlOO.js} +2 -2
  55. package/webapp/dist/assets/chunk-QN33PNHL-D1uiKlOO.js.map +1 -0
  56. package/webapp/dist/assets/{chunk-QZHKN3VN-BI_lqvsU.js → chunk-QZHKN3VN-BxuV0Oba.js} +2 -2
  57. package/webapp/dist/assets/chunk-QZHKN3VN-BxuV0Oba.js.map +1 -0
  58. package/webapp/dist/assets/{chunk-JSJVCQXG-BYyIDBzB.js → chunk-TZMSLE5B-Cw689yRl.js} +6 -14
  59. package/webapp/dist/assets/chunk-TZMSLE5B-Cw689yRl.js.map +1 -0
  60. package/webapp/dist/assets/{classDiagram-VBA2DB6C-CGVpNFjf.js → classDiagram-2ON5EDUG-BTTGianr.js} +6 -7
  61. package/webapp/dist/assets/classDiagram-2ON5EDUG-BTTGianr.js.map +1 -0
  62. package/webapp/dist/assets/{classDiagram-v2-RAHNMMFH-CGVpNFjf.js → classDiagram-v2-WZHVMYZB-BTTGianr.js} +6 -7
  63. package/webapp/dist/assets/classDiagram-v2-WZHVMYZB-BTTGianr.js.map +1 -0
  64. package/webapp/dist/assets/{clone-BcAwA2lT.js → clone-Dk8cAI3I.js} +2 -2
  65. package/webapp/dist/assets/clone-Dk8cAI3I.js.map +1 -0
  66. package/webapp/dist/assets/{cose-bilkent-S5V4N54A-CfkPOIie.js → cose-bilkent-S5V4N54A-BjJnzB2N.js} +2 -2
  67. package/webapp/dist/assets/cose-bilkent-S5V4N54A-BjJnzB2N.js.map +1 -0
  68. package/webapp/dist/assets/cytoscape.esm-Bm8DJGmZ.js.map +1 -1
  69. package/webapp/dist/assets/{dagre-KLK3FWXG-ETpwT3pg.js → dagre-6UL2VRFP-VF-xGhAf.js} +7 -7
  70. package/webapp/dist/assets/dagre-6UL2VRFP-VF-xGhAf.js.map +1 -0
  71. package/webapp/dist/assets/defaultLocale-B2RvLBDe.js.map +1 -1
  72. package/webapp/dist/assets/{diagram-E7M64L7V-CAkt3_Wu.js → diagram-PSM6KHXK-Ba5U0oRY.js} +10 -10
  73. package/webapp/dist/assets/diagram-PSM6KHXK-Ba5U0oRY.js.map +1 -0
  74. package/webapp/dist/assets/{diagram-IFDJBPK2-BUoOrHGY.js → diagram-QEK2KX5R-DoYCnEw_.js} +8 -9
  75. package/webapp/dist/assets/diagram-QEK2KX5R-DoYCnEw_.js.map +1 -0
  76. package/webapp/dist/assets/{diagram-P4PSJMXO-CITRT5KI.js → diagram-S2PKOQOG-CkK4SRyE.js} +8 -8
  77. package/webapp/dist/assets/diagram-S2PKOQOG-CkK4SRyE.js.map +1 -0
  78. package/webapp/dist/assets/{erDiagram-INFDFZHY-Cjpy0ose.js → erDiagram-Q2GNP2WA-DkI5eYww.js} +75 -96
  79. package/webapp/dist/assets/erDiagram-Q2GNP2WA-DkI5eYww.js.map +1 -0
  80. package/webapp/dist/assets/{flowDiagram-PKNHOUZH-CBmrK8ST.js → flowDiagram-NV44I4VS-wOdPUQ7Y.js} +81 -98
  81. package/webapp/dist/assets/flowDiagram-NV44I4VS-wOdPUQ7Y.js.map +1 -0
  82. package/webapp/dist/assets/{ganttDiagram-A5KZAMGK-CLoJRKb7.js → ganttDiagram-JELNMOA3-BtRWgkUH.js} +3 -28
  83. package/webapp/dist/assets/ganttDiagram-JELNMOA3-BtRWgkUH.js.map +1 -0
  84. package/webapp/dist/assets/{gitGraphDiagram-K3NZZRJ6-DcAa_Q3i.js → gitGraphDiagram-V2S2FVAM-Bsz7u1vi.js} +46 -38
  85. package/webapp/dist/assets/gitGraphDiagram-V2S2FVAM-Bsz7u1vi.js.map +1 -0
  86. package/webapp/dist/assets/graph-DAMkuTbn.js +425 -0
  87. package/webapp/dist/assets/graph-DAMkuTbn.js.map +1 -0
  88. package/webapp/dist/assets/{index-B219Q97D.js → index-rYmIohM_.js} +1072 -1025
  89. package/webapp/dist/assets/{index-B219Q97D.js.map → index-rYmIohM_.js.map} +1 -1
  90. package/webapp/dist/assets/{index-YaxF76or.css → index-xvYYeHuy.css} +1 -1
  91. package/webapp/dist/assets/{infoDiagram-LFFYTUFH-CXY1BDG-.js → infoDiagram-HS3SLOUP-BMaxCvH5.js} +7 -7
  92. package/webapp/dist/assets/infoDiagram-HS3SLOUP-BMaxCvH5.js.map +1 -0
  93. package/webapp/dist/assets/init-ZxktEp_H.js.map +1 -1
  94. package/webapp/dist/assets/{journeyDiagram-4ABVD52K-jFEOb3_9.js → journeyDiagram-XKPGCS4Q-ejyerzmG.js} +5 -5
  95. package/webapp/dist/assets/journeyDiagram-XKPGCS4Q-ejyerzmG.js.map +1 -0
  96. package/webapp/dist/assets/{kanban-definition-K7BYSVSG-g9DIRWk3.js → kanban-definition-3W4ZIXB7-CYj35TEs.js} +3 -5
  97. package/webapp/dist/assets/kanban-definition-3W4ZIXB7-CYj35TEs.js.map +1 -0
  98. package/webapp/dist/assets/{layout-BvoIJLam.js → layout-7Ql4zmuL.js} +5 -5
  99. package/webapp/dist/assets/layout-7Ql4zmuL.js.map +1 -0
  100. package/webapp/dist/assets/{linear-WhxKIgP6.js → linear-CVmgVPuZ.js} +2 -2
  101. package/webapp/dist/assets/linear-CVmgVPuZ.js.map +1 -0
  102. package/webapp/dist/assets/{mindmap-definition-YRQLILUH-BXxTVKab.js → mindmap-definition-VGOIOE7T-DOpxjGVo.js} +5 -7
  103. package/webapp/dist/assets/mindmap-definition-VGOIOE7T-DOpxjGVo.js.map +1 -0
  104. package/webapp/dist/assets/ordinal-CxptdPJm.js.map +1 -1
  105. package/webapp/dist/assets/{pieDiagram-SKSYHLDU-BVfKuFkc.js → pieDiagram-ADFJNKIX-CLQjpmAG.js} +8 -8
  106. package/webapp/dist/assets/pieDiagram-ADFJNKIX-CLQjpmAG.js.map +1 -0
  107. package/webapp/dist/assets/{quadrantDiagram-337W2JSQ-DjOan1Ul.js → quadrantDiagram-AYHSOK5B-ClD_bz7z.js} +3 -3
  108. package/webapp/dist/assets/quadrantDiagram-AYHSOK5B-ClD_bz7z.js.map +1 -0
  109. package/webapp/dist/assets/{requirementDiagram-Z7DCOOCP-CdkkhNJu.js → requirementDiagram-UZGBJVZJ-DOpb-TWH.js} +6 -16
  110. package/webapp/dist/assets/requirementDiagram-UZGBJVZJ-DOpb-TWH.js.map +1 -0
  111. package/webapp/dist/assets/{sankeyDiagram-WA2Y5GQK-Cc7UCE1M.js → sankeyDiagram-TZEHDZUN-D8Hsj3yx.js} +2 -2
  112. package/webapp/dist/assets/sankeyDiagram-TZEHDZUN-D8Hsj3yx.js.map +1 -0
  113. package/webapp/dist/assets/{sequenceDiagram-2WXFIKYE-CAf-TzzV.js → sequenceDiagram-WL72ISMW-CFMNjBER.js} +201 -601
  114. package/webapp/dist/assets/sequenceDiagram-WL72ISMW-CFMNjBER.js.map +1 -0
  115. package/webapp/dist/assets/{stateDiagram-RAJIS63D-CjQh2yGU.js → stateDiagram-FKZM4ZOC-BQeDlw0P.js} +9 -9
  116. package/webapp/dist/assets/stateDiagram-FKZM4ZOC-BQeDlw0P.js.map +1 -0
  117. package/webapp/dist/assets/{stateDiagram-v2-FVOUBMTO-BINESHF-.js → stateDiagram-v2-4FDKWEC3-DscX61Rs.js} +5 -5
  118. package/webapp/dist/assets/stateDiagram-v2-4FDKWEC3-DscX61Rs.js.map +1 -0
  119. package/webapp/dist/assets/{timeline-definition-YZTLITO2-FCh1aV2p.js → timeline-definition-IT6M3QCI-BcXPSTiw.js} +3 -3
  120. package/webapp/dist/assets/timeline-definition-IT6M3QCI-BcXPSTiw.js.map +1 -0
  121. package/webapp/dist/assets/{treemap-KZPCXAKY-J-UTxKUf.js → treemap-GDKQZRPO-BBr4UV0Z.js} +24 -37
  122. package/webapp/dist/assets/treemap-GDKQZRPO-BBr4UV0Z.js.map +1 -0
  123. package/webapp/dist/assets/{xychartDiagram-JWTSCODW-KYLvRsLH.js → xychartDiagram-PRI3JC2R-CS5RAtQE.js} +4 -4
  124. package/webapp/dist/assets/xychartDiagram-PRI3JC2R-CS5RAtQE.js.map +1 -0
  125. package/webapp/dist/index.html +2 -2
  126. package/webapp/dist/assets/_basePickBy-B1lGEusm.js.map +0 -1
  127. package/webapp/dist/assets/_baseUniq-SGAsMSaE.js.map +0 -1
  128. package/webapp/dist/assets/arc-B2joU0eL.js.map +0 -1
  129. package/webapp/dist/assets/architectureDiagram-2XIMDMQ5-CsuG-Xa3.js.map +0 -1
  130. package/webapp/dist/assets/blockDiagram-WCTKOSBZ-D8_SVEGn.js.map +0 -1
  131. package/webapp/dist/assets/c4Diagram-IC4MRINW-D_lhLw36.js.map +0 -1
  132. package/webapp/dist/assets/channel-BI76pqQS.js.map +0 -1
  133. package/webapp/dist/assets/chunk-4BX2VUAB-BVI27QNV.js.map +0 -1
  134. package/webapp/dist/assets/chunk-55IACEB6-D2ECkhpq.js.map +0 -1
  135. package/webapp/dist/assets/chunk-FMBD7UC4-BAtzNqV5.js.map +0 -1
  136. package/webapp/dist/assets/chunk-JSJVCQXG-BYyIDBzB.js.map +0 -1
  137. package/webapp/dist/assets/chunk-KX2RTZJC-Dt3XFfSl.js.map +0 -1
  138. package/webapp/dist/assets/chunk-NQ4KR5QH-CZmmNdX5.js.map +0 -1
  139. package/webapp/dist/assets/chunk-QZHKN3VN-BI_lqvsU.js.map +0 -1
  140. package/webapp/dist/assets/chunk-WL4C6EOR-Cd-rWL8V.js.map +0 -1
  141. package/webapp/dist/assets/classDiagram-VBA2DB6C-CGVpNFjf.js.map +0 -1
  142. package/webapp/dist/assets/classDiagram-v2-RAHNMMFH-CGVpNFjf.js.map +0 -1
  143. package/webapp/dist/assets/clone-BcAwA2lT.js.map +0 -1
  144. package/webapp/dist/assets/cose-bilkent-S5V4N54A-CfkPOIie.js.map +0 -1
  145. package/webapp/dist/assets/dagre-KLK3FWXG-ETpwT3pg.js.map +0 -1
  146. package/webapp/dist/assets/diagram-E7M64L7V-CAkt3_Wu.js.map +0 -1
  147. package/webapp/dist/assets/diagram-IFDJBPK2-BUoOrHGY.js.map +0 -1
  148. package/webapp/dist/assets/diagram-P4PSJMXO-CITRT5KI.js.map +0 -1
  149. package/webapp/dist/assets/erDiagram-INFDFZHY-Cjpy0ose.js.map +0 -1
  150. package/webapp/dist/assets/flowDiagram-PKNHOUZH-CBmrK8ST.js.map +0 -1
  151. package/webapp/dist/assets/ganttDiagram-A5KZAMGK-CLoJRKb7.js.map +0 -1
  152. package/webapp/dist/assets/gitGraphDiagram-K3NZZRJ6-DcAa_Q3i.js.map +0 -1
  153. package/webapp/dist/assets/graph-CyYArI_M.js +0 -782
  154. package/webapp/dist/assets/graph-CyYArI_M.js.map +0 -1
  155. package/webapp/dist/assets/infoDiagram-LFFYTUFH-CXY1BDG-.js.map +0 -1
  156. package/webapp/dist/assets/ishikawaDiagram-PHBUUO56-CCgHez0F.js +0 -966
  157. package/webapp/dist/assets/ishikawaDiagram-PHBUUO56-CCgHez0F.js.map +0 -1
  158. package/webapp/dist/assets/journeyDiagram-4ABVD52K-jFEOb3_9.js.map +0 -1
  159. package/webapp/dist/assets/kanban-definition-K7BYSVSG-g9DIRWk3.js.map +0 -1
  160. package/webapp/dist/assets/layout-BvoIJLam.js.map +0 -1
  161. package/webapp/dist/assets/linear-WhxKIgP6.js.map +0 -1
  162. package/webapp/dist/assets/mindmap-definition-YRQLILUH-BXxTVKab.js.map +0 -1
  163. package/webapp/dist/assets/pieDiagram-SKSYHLDU-BVfKuFkc.js.map +0 -1
  164. package/webapp/dist/assets/quadrantDiagram-337W2JSQ-DjOan1Ul.js.map +0 -1
  165. package/webapp/dist/assets/requirementDiagram-Z7DCOOCP-CdkkhNJu.js.map +0 -1
  166. package/webapp/dist/assets/sankeyDiagram-WA2Y5GQK-Cc7UCE1M.js.map +0 -1
  167. package/webapp/dist/assets/sequenceDiagram-2WXFIKYE-CAf-TzzV.js.map +0 -1
  168. package/webapp/dist/assets/stateDiagram-RAJIS63D-CjQh2yGU.js.map +0 -1
  169. package/webapp/dist/assets/stateDiagram-v2-FVOUBMTO-BINESHF-.js.map +0 -1
  170. package/webapp/dist/assets/timeline-definition-YZTLITO2-FCh1aV2p.js.map +0 -1
  171. package/webapp/dist/assets/treemap-KZPCXAKY-J-UTxKUf.js.map +0 -1
  172. package/webapp/dist/assets/vennDiagram-LZ73GAT5-T1yQlS2L.js +0 -2487
  173. package/webapp/dist/assets/vennDiagram-LZ73GAT5-T1yQlS2L.js.map +0 -1
  174. package/webapp/dist/assets/xychartDiagram-JWTSCODW-KYLvRsLH.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"graph-CyYArI_M.js","sources":["../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/union.js","../../../../node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/graphlib/graph.js"],"sourcesContent":["import baseFlatten from './_baseFlatten.js';\nimport baseRest from './_baseRest.js';\nimport baseUniq from './_baseUniq.js';\nimport isArrayLikeObject from './isArrayLikeObject.js';\n\n/**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */\nvar union = baseRest(function(arrays) {\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n});\n\nexport default union;\n","import * as _ from 'lodash-es';\n\nvar DEFAULT_EDGE_NAME = '\\x00';\nvar GRAPH_NODE = '\\x00';\nvar EDGE_KEY_DELIM = '\\x01';\n\n/**\n * @typedef {string} NodeID ID of a node.\n */\n\n/**\n * @typedef {`${string}${typeof EDGE_KEY_DELIM}${string}${typeof EDGE_KEY_DELIM}${string}`} EdgeID ID of an edge.\n * @internal - All public APIs use {@link EdgeObj} instead to refer to edges.\n */\n\n/**\n * @typedef {object} EdgeObj\n * @property {NodeID} v the id of the source or tail node of an edge\n * @property {NodeID} w the id of the target or head node of an edge\n * @property {string | number} [name] Name of the edge. Needed to uniquely identify\n * multiple edges between the same pair of nodes in a multigraph.\n */\n\n/**\n * @template {unknown} T\n * @typedef {T[] | Record<any, T>} Collection\n * Lodash object that can be iterated over with `_.each`.\n *\n * Beware, objects with `.length` are treated as arrays, see\n * https://lodash.com/docs/4.17.15#forEach\n */\n\n// Implementation notes:\n//\n// * Node id query functions should return string ids for the nodes\n// * Edge id query functions should return an \"edgeObj\", edge object, that is\n// composed of enough information to uniquely identify an edge: {v, w, name}.\n// * Internally we use an \"edgeId\", a stringified form of the edgeObj, to\n// reference edges. This is because we need a performant way to look these\n// edges up and, object properties, which have string keys, are the closest\n// we're going to get to a performant hashtable in JavaScript.\n\n// Implementation notes:\n//\n// * Node id query functions should return string ids for the nodes\n// * Edge id query functions should return an \"edgeObj\", edge object, that is\n// composed of enough information to uniquely identify an edge: {v, w, name}.\n// * Internally we use an \"edgeId\", a stringified form of the edgeObj, to\n// reference edges. This is because we need a performant way to look these\n// edges up and, object properties, which have string keys, are the closest\n// we're going to get to a performant hashtable in JavaScript.\n\n/**\n * @typedef {object} GraphOptions\n * @property {boolean | undefined} [directed] - set to `true` to get a\n * directed graph and `false` to get an undirected graph.\n * An undirected graph does not treat the order of nodes in an edge as\n * significant.\n * In other words, `g.edge(\"a\", \"b\") === g.edge(\"b\", \"a\")` for\n * an undirected graph.\n * Default: `true`\n * @property {boolean | undefined} [multigraph] - set to `true` to allow a\n * graph to have multiple edges between the same pair of nodes.\n * Default: `false`.\n * @property {boolean | undefined} [compound] - set to `true` to allow a\n * graph to have compound nodes - nodes which can be the parent of other\n * nodes.\n * Default: `false`.\n */\n\n/**\n * Graphlib has a single graph type: {@link Graph}. To create a new instance:\n *\n * ```js\n * var g = new Graph();\n * ```\n *\n * By default this will create a directed graph that does not allow multi-edges\n * or compound nodes.\n * The following options can be used when constructing a new graph:\n *\n * * {@link GraphOptions#directed}: set to `true` to get a directed graph and `false` to get an\n * undirected graph.\n * An undirected graph does not treat the order of nodes in an edge as\n * significant. In other words,\n * `g.edge(\"a\", \"b\") === g.edge(\"b\", \"a\")` for an undirected graph.\n * Default: `true`.\n * * {@link GraphOptions#multigraph}: set to `true` to allow a graph to have multiple edges\n * between the same pair of nodes. Default: `false`.\n * * {@link GraphOptions#compound}: set to `true` to allow a graph to have compound nodes -\n * nodes which can be the parent of other nodes. Default: `false`.\n *\n * To set the options, pass in an options object to the `Graph` constructor.\n * For example, to create a directed compound multigraph:\n *\n * ```js\n * var g = new Graph({ directed: true, compound: true, multigraph: true });\n * ```\n *\n * ### Node and Edge Representation\n *\n * In graphlib, a node is represented by a user-supplied String id.\n * All node related functions use this String id as a way to uniquely identify\n * the node. Here is an example of interacting with nodes:\n *\n * ```js\n * var g = new Graph();\n * g.setNode(\"my-id\", \"my-label\");\n * g.node(\"my-id\"); // returns \"my-label\"\n * ```\n *\n * Edges in graphlib are identified by the nodes they connect. For example:\n *\n * ```js\n * var g = new Graph();\n * g.setEdge(\"source\", \"target\", \"my-label\");\n * g.edge(\"source\", \"target\"); // returns \"my-label\"\n * ```\n *\n * However, we need a way to uniquely identify an edge in a single object for\n * various edge queries (e.g. {@link Graph#outEdges}).\n * We use {@link EdgeObj}s for this purpose.\n * They consist of the following properties:\n *\n * * {@link EdgeObj#v}: the id of the source or tail node of an edge\n * * {@link EdgeObj#w}: the id of the target or head node of an edge\n * * {@link EdgeObj#name} (optional): the name that uniquely identifies a multiedge.\n *\n * Any edge function that takes an edge id will also work with an {@link EdgeObj}. For example:\n *\n * ```js\n * var g = new Graph();\n * g.setEdge(\"source\", \"target\", \"my-label\");\n * g.edge({ v: \"source\", w: \"target\" }); // returns \"my-label\"\n * ```\n *\n * ### Multigraphs\n *\n * A [multigraph](https://en.wikipedia.org/wiki/Multigraph) is a graph that can\n * have more than one edge between the same pair of nodes.\n * By default graphlib graphs are not multigraphs, but a multigraph can be\n * constructed by setting the {@link GraphOptions#multigraph} property to true:\n *\n * ```js\n * var g = new Graph({ multigraph: true });\n * ```\n *\n * With multiple edges between two nodes we need some way to uniquely identify\n * each edge. We call this the {@link EdgeObj#name} property.\n * Here's an example of creating a couple of edges between the same nodes:\n *\n * ```js\n * var g = new Graph({ multigraph: true });\n * g.setEdge(\"a\", \"b\", \"edge1-label\", \"edge1\");\n * g.setEdge(\"a\", \"b\", \"edge2-label\", \"edge2\");\n * g.edge(\"a\", \"b\", \"edge1\"); // returns \"edge1-label\"\n * g.edge(\"a\", \"b\", \"edge2\"); // returns \"edge2-label\"\n * g.edges(); // returns [{ v: \"a\", w: \"b\", name: \"edge1\" },\n * // { v: \"a\", w: \"b\", name: \"edge2\" }]\n * ```\n *\n * A multigraph still allows an edge with no name to be created:\n *\n * ```js\n * var g = new Graph({ multigraph: true });\n * g.setEdge(\"a\", \"b\", \"my-label\");\n * g.edge({ v: \"a\", w: \"b\" }); // returns \"my-label\"\n * ```\n *\n * ### Compound Graphs\n *\n * A compound graph is one where a node can be the parent of other nodes.\n * The child nodes form a \"subgraph\".\n * Here's an example of constructing and interacting with a compound graph:\n *\n * ```js\n * var g = new Graph({ compound: true });\n * g.setParent(\"a\", \"parent\");\n * g.setParent(\"b\", \"parent\");\n * g.parent(\"a\"); // returns \"parent\"\n * g.parent(\"b\"); // returns \"parent\"\n * g.parent(\"parent\"); // returns undefined\n * ```\n *\n * ### Default Labels\n *\n * When a node or edge is created without a label, a default label can be assigned.\n * See {@link setDefaultNodeLabel} and {@link setDefaultEdgeLabel}.\n *\n * @template [GraphLabel=any] - Label of the graph.\n * @template [NodeLabel=any] - Label of a node.\n * Even though this is a \"label\", this could be any type that the user requires\n * (and may need to be an object for some layout/ranking algorithms in dagre).\n * @template [EdgeLabel=any] - Label of an edge.\n * Even though this is a \"label\", this could be any type that the user requires,\n * (and may need to be a object for ranking in dagre).\n */\nexport class Graph {\n /**\n * @param {GraphOptions} [opts] - Graph options.\n */\n constructor(opts = {}) {\n /**\n * @type {boolean}\n * @private\n */\n this._isDirected = Object.prototype.hasOwnProperty.call(opts, 'directed')\n ? opts.directed\n : true;\n /**\n * @type {boolean}\n * @private\n */\n this._isMultigraph = Object.prototype.hasOwnProperty.call(opts, 'multigraph')\n ? opts.multigraph\n : false;\n /**\n * @type {boolean}\n * @private\n */\n this._isCompound = Object.prototype.hasOwnProperty.call(opts, 'compound')\n ? opts.compound\n : false;\n\n /**\n * @type {GraphLabel | undefined}\n * Label for the graph itself\n */\n this._label = undefined;\n\n /**\n * Default label to be set when creating a new node.\n *\n * @private\n * @type {(v: NodeID | number) => NodeLabel}\n */\n this._defaultNodeLabelFn = _.constant(undefined);\n\n /**\n * Default label to be set when creating a new edge\n *\n * @private\n * @type {(v: NodeID, w: NodeID, name: string | undefined) => EdgeLabel}\n */\n this._defaultEdgeLabelFn = _.constant(undefined);\n\n /**\n * @type {Record<NodeID, NodeLabel>}\n * @private\n *\n * v -> label\n */\n this._nodes = {};\n\n if (this._isCompound) {\n /**\n * @type {Record<NodeID, NodeID>}\n * @private\n * v -> parent\n */\n this._parent = {};\n\n /**\n * @type {Record<NodeID, Record<NodeID, true>>}\n * @private\n * v -> children\n */\n this._children = {};\n this._children[GRAPH_NODE] = {};\n }\n\n /**\n * @type {Record<NodeID, Record<EdgeID, EdgeObj>>}\n * @private\n * v -> edgeObj\n */\n this._in = {};\n\n /**\n * @type {Record<NodeID, Record<NodeID, number>>}\n * @private\n * u -> v -> Number\n */\n this._preds = {};\n\n /**\n * @type {Record<NodeID, Record<EdgeID, EdgeObj>>}\n * @private\n * v -> edgeObj\n */\n this._out = {};\n\n /**\n * @type {Record<NodeID, Record<NodeID, number>>}\n * @private\n * v -> w -> Number\n */\n this._sucs = {};\n\n /**\n * @type {Record<EdgeID, EdgeObj>}\n * @private\n * e -> edgeObj\n */\n this._edgeObjs = {};\n\n /**\n * @type {Record<EdgeID, EdgeLabel>}\n * @private\n * e -> label\n */\n this._edgeLabels = {};\n }\n\n /* === Graph functions ========= */\n\n /**\n *\n * @returns {boolean} `true` if the graph is [directed](https://en.wikipedia.org/wiki/Directed_graph).\n * A directed graph treats the order of nodes in an edge as significant whereas an\n * [undirected](https://en.wikipedia.org/wiki/Graph_(mathematics)#Undirected_graph)\n * graph does not.\n * This example demonstrates the difference:\n *\n * @example\n *\n * ```js\n * var directed = new Graph({ directed: true });\n * directed.setEdge(\"a\", \"b\", \"my-label\");\n * directed.edge(\"a\", \"b\"); // returns \"my-label\"\n * directed.edge(\"b\", \"a\"); // returns undefined\n *\n * var undirected = new Graph({ directed: false });\n * undirected.setEdge(\"a\", \"b\", \"my-label\");\n * undirected.edge(\"a\", \"b\"); // returns \"my-label\"\n * undirected.edge(\"b\", \"a\"); // returns \"my-label\"\n * ```\n */\n isDirected() {\n return this._isDirected;\n }\n /**\n * @returns {boolean} `true` if the graph is a multigraph.\n */\n isMultigraph() {\n return this._isMultigraph;\n }\n /**\n * @returns {boolean} `true` if the graph is compound.\n */\n isCompound() {\n return this._isCompound;\n }\n\n /**\n * Sets the label for the graph to `label`.\n *\n * @param {GraphLabel} label - Label for the graph.\n * @returns {this}\n */\n setGraph(label) {\n this._label = label;\n return this;\n }\n\n /**\n * @returns {GraphLabel | undefined} the currently assigned label for the graph.\n * If no label has been assigned, returns `undefined`.\n *\n * @example\n *\n * ```js\n * var g = new Graph();\n * g.graph(); // returns undefined\n * g.setGraph(\"graph-label\");\n * g.graph(); // returns \"graph-label\"\n * ```\n */\n graph() {\n return this._label;\n }\n /* === Node functions ========== */\n\n /**\n * Sets a new default value that is assigned to nodes that are created without\n * a label.\n *\n * @param {typeof this._defaultNodeLabelFn | NodeLabel} newDefault - If a function,\n * it is called with the id of the node being created.\n * Otherwise, it is assigned as the label directly.\n * @returns {this}\n */\n setDefaultNodeLabel(newDefault) {\n if (!_.isFunction(newDefault)) {\n newDefault = _.constant(newDefault);\n }\n this._defaultNodeLabelFn = newDefault;\n return this;\n }\n\n /**\n * @returns {number} the number of nodes in the graph.\n */\n nodeCount() {\n return this._nodeCount;\n }\n\n /**\n * @returns {NodeID[]} the ids of the nodes in the graph.\n *\n * @remarks\n * Use {@link node()} to get the label for each node.\n * Takes `O(|V|)` time.\n */\n nodes() {\n return _.keys(this._nodes);\n }\n /**\n * @returns {NodeID[]} those nodes in the graph that have no in-edges.\n * @remarks Takes `O(|V|)` time.\n */\n sources() {\n var self = this;\n return _.filter(this.nodes(), function (v) {\n return _.isEmpty(self._in[v]);\n });\n }\n /**\n * @returns {NodeID[]} those nodes in the graph that have no out-edges.\n * @remarks Takes `O(|V|)` time.\n */\n sinks() {\n var self = this;\n return _.filter(this.nodes(), function (v) {\n return _.isEmpty(self._out[v]);\n });\n }\n\n /**\n * Invokes setNode method for each node in `vs` list.\n *\n * @param {Collection<NodeID | number>} vs - List of node IDs to create/set.\n * @param {NodeLabel} [value] - If set, update all nodes with this value.\n * @returns {this}\n * @remarks Complexity: O(|names|).\n */\n setNodes(vs, value) {\n var args = arguments;\n var self = this;\n _.each(vs, function (v) {\n if (args.length > 1) {\n self.setNode(v, value);\n } else {\n self.setNode(v);\n }\n });\n return this;\n }\n\n /**\n * Creates or updates the value for the node `v` in the graph.\n *\n * @param {NodeID | number} v - ID of the node to create/set.\n * @param {NodeLabel} [value] - If supplied, it is set as the value for the node.\n * If not supplied and the node was created by this call then\n * {@link setDefaultNodeLabel} will be used to set the node's value.\n * @returns {this} the graph, allowing this to be chained with other functions.\n * @remarks Takes `O(1)` time.\n */\n setNode(v, value) {\n if (Object.prototype.hasOwnProperty.call(this._nodes, v)) {\n if (arguments.length > 1) {\n this._nodes[v] = value;\n }\n return this;\n }\n\n this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v);\n if (this._isCompound) {\n this._parent[v] = GRAPH_NODE;\n this._children[v] = {};\n this._children[GRAPH_NODE][v] = true;\n }\n this._in[v] = {};\n this._preds[v] = {};\n this._out[v] = {};\n this._sucs[v] = {};\n ++this._nodeCount;\n return this;\n }\n\n /**\n * Gets the label of node with specified name.\n *\n * @param {NodeID | number} v - Node ID.\n * @returns {NodeLabel | undefined} the label assigned to the node with the id `v`\n * if it is in the graph.\n * Otherwise returns `undefined`.\n * @remarks Takes `O(1)` time.\n */\n node(v) {\n return this._nodes[v];\n }\n\n /**\n * Detects whether graph has a node with specified name or not.\n *\n * @param {NodeID | number} v - Node ID.\n * @returns {boolean} Returns `true` the graph has a node with the id.\n * @remarks Takes `O(1)` time.\n */\n hasNode(v) {\n return Object.prototype.hasOwnProperty.call(this._nodes, v);\n }\n\n /**\n * Remove the node with the id `v` in the graph or do nothing if the node is\n * not in the graph.\n *\n * If the node was removed this function also removes any incident edges.\n *\n * @param {NodeID | number} v - Node ID to remove.\n * @returns {this} the graph, allowing this to be chained with other functions.\n * @remarks Takes `O(|E|)` time.\n */\n removeNode(v) {\n if (Object.prototype.hasOwnProperty.call(this._nodes, v)) {\n var removeEdge = (e) => this.removeEdge(this._edgeObjs[e]);\n delete this._nodes[v];\n if (this._isCompound) {\n this._removeFromParentsChildList(v);\n delete this._parent[v];\n _.each(this.children(v), (child) => {\n this.setParent(child);\n });\n delete this._children[v];\n }\n _.each(_.keys(this._in[v]), removeEdge);\n delete this._in[v];\n delete this._preds[v];\n _.each(_.keys(this._out[v]), removeEdge);\n delete this._out[v];\n delete this._sucs[v];\n --this._nodeCount;\n }\n return this;\n }\n\n /**\n * Sets the parent for `v` to `parent` if it is defined or removes the parent\n * for `v` if `parent` is undefined.\n *\n * @param {NodeID | number} v - Node ID to set the parent for.\n * @param {NodeID | number} [parent] - Parent node ID. If not defined, removes the parent.\n * @returns {this} the graph, allowing this to be chained with other functions.\n * @throws if the graph is not compound.\n * @throws if setting the parent would create a cycle.\n * @remarks Takes `O(1)` time.\n */\n setParent(v, parent) {\n if (!this._isCompound) {\n throw new Error('Cannot set parent in a non-compound graph');\n }\n\n if (_.isUndefined(parent)) {\n parent = GRAPH_NODE;\n } else {\n // Coerce parent to string\n parent += '';\n for (var ancestor = parent; !_.isUndefined(ancestor); ancestor = this.parent(ancestor)) {\n if (ancestor === v) {\n throw new Error('Setting ' + parent + ' as parent of ' + v + ' would create a cycle');\n }\n }\n\n this.setNode(parent);\n }\n\n this.setNode(v);\n this._removeFromParentsChildList(v);\n // @ts-expect-error -- We coerced parent to a string above\n this._parent[v] = parent;\n this._children[parent][v] = true;\n return this;\n }\n\n /**\n * @private\n * @param {NodeID | number} v - Node ID.\n */\n _removeFromParentsChildList(v) {\n delete this._children[this._parent[v]][v];\n }\n\n /**\n * Get parent node for node `v`.\n *\n * @param {NodeID | number} v - Node ID.\n * @returns {NodeID | undefined} the node that is a parent of node `v`\n * or `undefined` if node `v` does not have a parent or is not a member of\n * the graph.\n * Always returns `undefined` for graphs that are not compound.\n * @remarks Takes `O(1)` time.\n */\n parent(v) {\n if (this._isCompound) {\n var parent = this._parent[v];\n if (parent !== GRAPH_NODE) {\n return parent;\n }\n }\n }\n\n /**\n * Gets list of direct children of node v.\n *\n * @param {NodeID | number} [v] - Node ID. If not specified, gets nodes\n * with no parent (top-level nodes).\n * @returns {NodeID[] | undefined} all nodes that are children of node `v` or\n * `undefined` if node `v` is not in the graph.\n * Always returns `[]` for graphs that are not compound.\n * @remarks Takes `O(|V|)` time.\n */\n children(v) {\n if (_.isUndefined(v)) {\n v = GRAPH_NODE;\n }\n\n if (this._isCompound) {\n var children = this._children[v];\n if (children) {\n return _.keys(children);\n }\n } else if (v === GRAPH_NODE) {\n return this.nodes();\n } else if (this.hasNode(v)) {\n return [];\n }\n }\n\n /**\n * @param {NodeID | number} v - Node ID.\n * @returns {NodeID[] | undefined} all nodes that are predecessors of the\n * specified node or `undefined` if node `v` is not in the graph.\n * @remarks\n * Behavior is undefined for undirected graphs - use {@link neighbors} instead.\n * Takes `O(|V|)` time.\n */\n predecessors(v) {\n var predsV = this._preds[v];\n if (predsV) {\n return _.keys(predsV);\n }\n }\n\n /**\n * @param {NodeID | number} v - Node ID.\n * @returns {NodeID[] | undefined} all nodes that are successors of the\n * specified node or `undefined` if node `v` is not in the graph.\n * @remarks\n * Behavior is undefined for undirected graphs - use {@link neighbors} instead.\n * Takes `O(|V|)` time.\n */\n successors(v) {\n var sucsV = this._sucs[v];\n if (sucsV) {\n return _.keys(sucsV);\n }\n }\n\n /**\n * @param {NodeID | number} v - Node ID.\n * @returns {NodeID[] | undefined} all nodes that are predecessors or\n * successors of the specified node\n * or `undefined` if node `v` is not in the graph.\n * @remarks Takes `O(|V|)` time.\n */\n neighbors(v) {\n var preds = this.predecessors(v);\n if (preds) {\n return _.union(preds, this.successors(v));\n }\n }\n\n /**\n * @param {NodeID | number} v - Node ID.\n * @returns {boolean} True if the node is a leaf (has no successors), false otherwise.\n */\n isLeaf(v) {\n var neighbors;\n if (this.isDirected()) {\n neighbors = this.successors(v);\n } else {\n neighbors = this.neighbors(v);\n }\n return neighbors.length === 0;\n }\n\n /**\n * Creates new graph with nodes filtered via `filter`.\n * Edges incident to rejected node\n * are also removed.\n * \n * In case of compound graph, if parent is rejected by `filter`,\n * than all its children are rejected too.\n\n * @param {(v: NodeID) => boolean} filter - Function that returns `true` for nodes to keep.\n * @returns {Graph<GraphLabel, NodeLabel, EdgeLabel>} A new graph containing only the nodes for which `filter` returns `true`.\n * @remarks Average-case complexity: O(|E|+|V|).\n */\n filterNodes(filter) {\n /**\n * @type {Graph<GraphLabel, NodeLabel, EdgeLabel>}\n */\n // @ts-expect-error\n var copy = new this.constructor({\n directed: this._isDirected,\n multigraph: this._isMultigraph,\n compound: this._isCompound,\n });\n\n copy.setGraph(this.graph());\n\n var self = this;\n _.each(this._nodes, function (value, v) {\n if (filter(v)) {\n copy.setNode(v, value);\n }\n });\n\n _.each(this._edgeObjs, function (e) {\n if (copy.hasNode(e.v) && copy.hasNode(e.w)) {\n copy.setEdge(e, self.edge(e));\n }\n });\n\n var parents = {};\n function findParent(v) {\n var parent = self.parent(v);\n if (parent === undefined || copy.hasNode(parent)) {\n parents[v] = parent;\n return parent;\n } else if (parent in parents) {\n return parents[parent];\n } else {\n return findParent(parent);\n }\n }\n\n if (this._isCompound) {\n _.each(copy.nodes(), function (v) {\n copy.setParent(v, findParent(v));\n });\n }\n\n return copy;\n }\n\n /* === Edge functions ========== */\n\n /**\n * Sets a new default value that is assigned to edges that are created without\n * a label.\n *\n * @param {typeof this._defaultEdgeLabelFn | EdgeLabel} newDefault - If a function,\n * it is called with the parameters `(v, w, name)`.\n * Otherwise, it is assigned as the label directly.\n * @returns {this}\n */\n setDefaultEdgeLabel(newDefault) {\n if (!_.isFunction(newDefault)) {\n newDefault = _.constant(newDefault);\n }\n this._defaultEdgeLabelFn = newDefault;\n return this;\n }\n\n /**\n * @returns {number} the number of edges in the graph.\n * @remarks Complexity: O(1).\n */\n edgeCount() {\n return this._edgeCount;\n }\n\n /**\n * Gets edges of the graph.\n *\n * @returns {EdgeObj[]} the {@link EdgeObj} for each edge in the graph.\n *\n * @remarks\n * In case of compound graph subgraphs are not considered.\n * Use {@link edge()} to get the label for each edge.\n * Takes `O(|E|)` time.\n */\n edges() {\n return _.values(this._edgeObjs);\n }\n\n /**\n * Establish an edges path over the nodes in nodes list.\n *\n * If some edge is already exists, it will update its label, otherwise it will\n * create an edge between pair of nodes with label provided or default label\n * if no label provided.\n *\n * @param {Collection<NodeID>} vs - List of node IDs to create edges between.\n * @param {EdgeLabel} [value] - If set, update all edges with this value.\n * @returns {this}\n * @remarks Complexity: O(|nodes|).\n */\n setPath(vs, value) {\n var self = this;\n var args = arguments;\n _.reduce(vs, function (v, w) {\n if (args.length > 1) {\n self.setEdge(v, w, value);\n } else {\n self.setEdge(v, w);\n }\n return w;\n });\n return this;\n }\n\n /**\n * Creates or updates the label for the edge (`v`, `w`) with the optionally\n * supplied `name`.\n *\n * @overload\n * @param {EdgeObj} arg0 - Edge object.\n * @param {EdgeLabel} [value] - If supplied, it is set as the label for the edge.\n * If not supplied and the edge was created by this call then\n * {@link setDefaultEdgeLabel} will be used to assign the edge's label.\n * @returns {this} the graph, allowing this to be chained with other functions.\n * @remarks Takes `O(1)` time.\n */\n /**\n * Creates or updates the label for the edge (`v`, `w`) with the optionally\n * supplied `name`.\n *\n * @overload\n * @param {NodeID | number} v - Source node ID. Number values will be coerced to strings.\n * @param {NodeID | number} w - Target node ID. Number values will be coerced to strings.\n * @param {EdgeLabel} [value] - If supplied, it is set as the label for the edge.\n * If not supplied and the edge was created by this call then\n * {@link setDefaultEdgeLabel} will be used to assign the edge's label.\n * @param {string | number} [name] - Edge name. Only useful with multigraphs.\n * @returns {this} the graph, allowing this to be chained with other functions.\n * @remarks Takes `O(1)` time.\n */\n setEdge() {\n var v, w, name, value;\n var valueSpecified = false;\n var arg0 = arguments[0];\n\n if (typeof arg0 === 'object' && arg0 !== null && 'v' in arg0) {\n v = arg0.v;\n w = arg0.w;\n name = arg0.name;\n if (arguments.length === 2) {\n value = arguments[1];\n valueSpecified = true;\n }\n } else {\n v = arg0;\n w = arguments[1];\n name = arguments[3];\n if (arguments.length > 2) {\n value = arguments[2];\n valueSpecified = true;\n }\n }\n\n v = '' + v;\n w = '' + w;\n if (!_.isUndefined(name)) {\n name = '' + name;\n }\n\n var e = edgeArgsToId(this._isDirected, v, w, name);\n if (Object.prototype.hasOwnProperty.call(this._edgeLabels, e)) {\n if (valueSpecified) {\n this._edgeLabels[e] = value;\n }\n return this;\n }\n\n if (!_.isUndefined(name) && !this._isMultigraph) {\n throw new Error('Cannot set a named edge when isMultigraph = false');\n }\n\n // It didn't exist, so we need to create it.\n // First ensure the nodes exist.\n this.setNode(v);\n this.setNode(w);\n\n this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name);\n\n var edgeObj = edgeArgsToObj(this._isDirected, v, w, name);\n // Ensure we add undirected edges in a consistent way.\n v = edgeObj.v;\n w = edgeObj.w;\n\n Object.freeze(edgeObj);\n this._edgeObjs[e] = edgeObj;\n incrementOrInitEntry(this._preds[w], v);\n incrementOrInitEntry(this._sucs[v], w);\n this._in[w][e] = edgeObj;\n this._out[v][e] = edgeObj;\n this._edgeCount++;\n return this;\n }\n\n /**\n * Gets the label for the specified edge.\n *\n * @overload\n * @param {EdgeObj} v - Edge object.\n * @returns {EdgeLabel | undefined} the label for the edge (`v`, `w`) if the\n * graph has an edge between `v` and `w` with the optional `name`.\n * Returned `undefined` if there is no such edge in the graph.\n * @remarks\n * `v` and `w` can be interchanged for undirected graphs.\n * Takes `O(1)` time.\n */\n /**\n * Gets the label for the specified edge.\n *\n * @overload\n * @param {NodeID | number} v - Source node ID.\n * @param {NodeID | number} w - Target node ID.\n * @param {string | number} [name] - Edge name. Only useful with multigraphs.\n * @returns {EdgeLabel | undefined} the label for the edge (`v`, `w`) if the\n * graph has an edge between `v` and `w` with the optional `name`.\n * Returned `undefined` if there is no such edge in the graph.\n * @remarks\n * `v` and `w` can be interchanged for undirected graphs.\n * Takes `O(1)` time.\n */\n edge(v, w, name) {\n var e =\n arguments.length === 1\n ? edgeObjToId(this._isDirected, arguments[0])\n : edgeArgsToId(this._isDirected, v, w, name);\n return this._edgeLabels[e];\n }\n\n /**\n * Detects whether the graph contains specified edge or not.\n *\n * @overload\n * @param {EdgeObj} v - Edge object.\n * @returns {boolean} `true` if the graph has an edge between `v` and `w`\n * with the optional `name`.\n * @remarks\n * `v` and `w` can be interchanged for undirected graphs.\n * No subgraphs are considered.\n * Takes `O(1)` time.\n */\n /**\n * Detects whether the graph contains specified edge or not.\n *\n * @overload\n * @param {NodeID | number} v - Source node ID.\n * @param {NodeID | number} w - Target node ID.\n * @param {string | number} [name] - Edge name. Only useful with multigraphs.\n * @returns {boolean} `true` if the graph has an edge between `v` and `w`\n * with the optional `name`.\n * @remarks\n * `v` and `w` can be interchanged for undirected graphs.\n * No subgraphs are considered.\n * Takes `O(1)` time.\n */\n hasEdge(v, w, name) {\n var e =\n arguments.length === 1\n ? edgeObjToId(this._isDirected, arguments[0])\n : edgeArgsToId(this._isDirected, v, w, name);\n return Object.prototype.hasOwnProperty.call(this._edgeLabels, e);\n }\n\n /**\n * Removes the edge (`v`, `w`) if the graph has an edge between `v` and `w`\n * with the optional `name`. If not this function does nothing.\n *\n * @overload\n * @param {EdgeObj} v - Edge object.\n * @returns {this}\n * @remarks\n * `v` and `w` can be interchanged for undirected graphs.\n * No subgraphs are considered.\n * Takes `O(1)` time.\n */\n /**\n * Removes the edge (`v`, `w`) if the graph has an edge between `v` and `w`\n * with the optional `name`. If not this function does nothing.\n *\n * @overload\n * @param {NodeID | number} v - Source node ID.\n * @param {NodeID | number} w - Target node ID.\n * @param {string | number} [name] - Edge name. Only useful with multigraphs.\n * @returns {this}\n * @remarks\n * `v` and `w` can be interchanged for undirected graphs.\n * Takes `O(1)` time.\n */\n removeEdge(v, w, name) {\n var e =\n arguments.length === 1\n ? edgeObjToId(this._isDirected, arguments[0])\n : edgeArgsToId(this._isDirected, v, w, name);\n var edge = this._edgeObjs[e];\n if (edge) {\n v = edge.v;\n w = edge.w;\n delete this._edgeLabels[e];\n delete this._edgeObjs[e];\n decrementOrRemoveEntry(this._preds[w], v);\n decrementOrRemoveEntry(this._sucs[v], w);\n delete this._in[w][e];\n delete this._out[v][e];\n this._edgeCount--;\n }\n return this;\n }\n\n /**\n * @param {NodeID | number} v - Target node ID.\n * @param {NodeID | number} [u] - Optionally filters edges down to just those\n * coming from node `u`.\n * @returns {EdgeObj[] | undefined} all edges that point to the node `v`.\n * Returns `undefined` if node `v` is not in the graph.\n * @remarks\n * Behavior is undefined for undirected graphs - use {@link nodeEdges} instead.\n * Takes `O(|E|)` time.\n */\n inEdges(v, u) {\n var inV = this._in[v];\n if (inV) {\n var edges = _.values(inV);\n if (!u) {\n return edges;\n }\n return _.filter(edges, function (edge) {\n return edge.v === u;\n });\n }\n }\n\n /**\n * @param {NodeID | number} v - Target node ID.\n * @param {NodeID | number} [w] - Optionally filters edges down to just those\n * that point to `w`.\n * @returns {EdgeObj[] | undefined} all edges that point to the node `v`.\n * Returns `undefined` if node `v` is not in the graph.\n * @remarks\n * Behavior is undefined for undirected graphs - use {@link nodeEdges} instead.\n * Takes `O(|E|)` time.\n */\n outEdges(v, w) {\n var outV = this._out[v];\n if (outV) {\n var edges = _.values(outV);\n if (!w) {\n return edges;\n }\n return _.filter(edges, function (edge) {\n return edge.w === w;\n });\n }\n }\n\n /**\n * @param {NodeID | number} v - Target Node ID.\n * @param {NodeID | number} [w] - If set, filters those edges down to just\n * those between nodes `v` and `w` regardless of direction\n * @returns {EdgeObj[] | undefined} all edges to or from node `v` regardless\n * of direction. Returns `undefined` if node `v` is not in the graph.\n * @remarks Takes `O(|E|)` time.\n */\n nodeEdges(v, w) {\n var inEdges = this.inEdges(v, w);\n if (inEdges) {\n return inEdges.concat(this.outEdges(v, w));\n }\n }\n}\n\n/* Number of nodes in the graph. Should only be changed by the implementation. */\nGraph.prototype._nodeCount = 0;\n\n/* Number of edges in the graph. Should only be changed by the implementation. */\nGraph.prototype._edgeCount = 0;\n\n/**\n * @param {Record<NodeID, number>} map - Object mapping node IDs to counts.\n * @param {NodeID | number} k - Node ID.\n */\nfunction incrementOrInitEntry(map, k) {\n if (map[k]) {\n map[k]++;\n } else {\n map[k] = 1;\n }\n}\n\n/**\n * @param {Record<NodeID, number>} map - Object mapping node IDs to counts.\n * @param {NodeID | number} k - Node ID.\n */\nfunction decrementOrRemoveEntry(map, k) {\n if (!--map[k]) {\n delete map[k];\n }\n}\n\n/**\n * @param {boolean} isDirected - If `false`, sorts v and w to ensure a consistent ID.\n * @param {EdgeObj['v'] | number} v_ - Source node ID.\n * @param {EdgeObj['w'] | number} w_ - Target node ID.\n * @param {EdgeObj['name']} [name] - Edge name (for multiple edges between the same nodes).\n * @returns {EdgeID} Unique ID for the edge.\n */\nfunction edgeArgsToId(isDirected, v_, w_, name) {\n var v = '' + v_;\n var w = '' + w_;\n if (!isDirected && v > w) {\n var tmp = v;\n v = w;\n w = tmp;\n }\n return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (_.isUndefined(name) ? DEFAULT_EDGE_NAME : name);\n}\n\n/**\n * @param {boolean} isDirected - If `false`, sorts v and w to ensure a consistent ID.\n * @param {EdgeObj['v'] | number} v_ - Source node ID.\n * @param {EdgeObj['w'] | number} w_ - Target node ID.\n * @param {EdgeObj['name']} [name] - Edge name (for multiple edges between the same nodes).\n * @returns {EdgeObj}\n */\nfunction edgeArgsToObj(isDirected, v_, w_, name) {\n var v = '' + v_;\n var w = '' + w_;\n if (!isDirected && v > w) {\n var tmp = v;\n v = w;\n w = tmp;\n }\n var edgeObj = { v: v, w: w };\n if (name) {\n edgeObj.name = name;\n }\n return edgeObj;\n}\n\n/**\n * @param {boolean} isDirected - If `false`, sorts v and w to ensure a consistent ID.\n * @param {EdgeObj} edgeObj - Edge object.\n * @returns {EdgeID} Unique ID for the edge.\n */\nfunction edgeObjToId(isDirected, edgeObj) {\n return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name);\n}\n"],"names":["_.constant","_.isFunction","_.keys","_.filter","_.isEmpty","_.each","_.isUndefined","_.union","filter","_.values","_.reduce"],"mappings":";;AAqBA,IAAI,QAAQ,SAAS,SAAS,QAAQ;AACpC,SAAO,SAAS,YAAY,QAAQ,GAAG,mBAAmB,IAAI,CAAC;AACjE,CAAC;ACrBD,IAAI,oBAAoB;AACxB,IAAI,aAAa;AACjB,IAAI,iBAAiB;AAiMd,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA,EAIjB,YAAY,OAAO,IAAI;AAKrB,SAAK,cAAc,OAAO,UAAU,eAAe,KAAK,MAAM,UAAU,IACpE,KAAK,WACL;AAKJ,SAAK,gBAAgB,OAAO,UAAU,eAAe,KAAK,MAAM,YAAY,IACxE,KAAK,aACL;AAKJ,SAAK,cAAc,OAAO,UAAU,eAAe,KAAK,MAAM,UAAU,IACpE,KAAK,WACL;AAMJ,SAAK,SAAS;AAQd,SAAK,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AAU,GAAG,GAAG;AACd,QAAI,UAAU,KAAK,QAAQ,GAAG,CAAC;AAC/B,QAAI,SAAS;AACX,aAAO,QAAQ,OAAO,KAAK,SAAS,GAAG,CAAC,CAAC;AAAA,IAC3C;AAAA,EACF;AACF;AAGA,MAAM,UAAU,aAAa;AAG7B,MAAM,UAAU,aAAa;AAM7B,SAAS,qBAAqB,KAAK,GAAG;AACpC,MAAI,IAAI,CAAC,GAAG;AACV,QAAI,CAAC;AAAA,EACP,OAAO;AACL,QAAI,CAAC,IAAI;AAAA,EACX;AACF;AAMA,SAAS,uBAAuB,KAAK,GAAG;AACtC,MAAI,CAAC,EAAE,IAAI,CAAC,GAAG;AACb,WAAO,IAAI,CAAC;AAAA,EACd;AACF;AASA,SAAS,aAAa,YAAY,IAAI,IAAI,MAAM;AAC9C,MAAI,IAAI,KAAK;AACb,MAAI,IAAI,KAAK;AACb,MAAI,CAAC,cAAc,IAAI,GAAG;AACxB,QAAI,MAAM;AACV,QAAI;AACJ,QAAI;AAAA,EACN;AACA,SAAO,IAAI,iBAAiB,IAAI,kBAAkBG,YAAc,IAAI,IAAI,oBAAoB;AAC9F;AASA,SAAS,cAAc,YAAY,IAAI,IAAI,MAAM;AAC/C,MAAI,IAAI,KAAK;AACb,MAAI,IAAI,KAAK;AACb,MAAI,CAAC,cAAc,IAAI,GAAG;AACxB,QAAI,MAAM;AACV,QAAI;AACJ,QAAI;AAAA,EACN;AACA,MAAI,UAAU,EAAE,GAAM,EAAI;AAC1B,MAAI,MAAM;AACR,YAAQ,OAAO;AAAA,EACjB;AACA,SAAO;AACT;AAOA,SAAS,YAAY,YAAY,SAAS;AACxC,SAAO,aAAa,YAAY,QAAQ,GAAG,QAAQ,GAAG,QAAQ,IAAI;AACpE;","x_google_ignoreList":[0,1]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"infoDiagram-LFFYTUFH-CXY1BDG-.js","sources":["../../../../node_modules/.pnpm/mermaid@11.13.0/node_modules/mermaid/dist/chunks/mermaid.core/infoDiagram-LFFYTUFH.mjs"],"sourcesContent":["import {\n selectSvgElement\n} from \"./chunk-HHEYEP7N.mjs\";\nimport {\n configureSvgSize\n} from \"./chunk-7R4GIKGN.mjs\";\nimport {\n __name,\n log\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/diagrams/info/infoParser.ts\nimport { parse } from \"@mermaid-js/parser\";\nvar parser = {\n parse: /* @__PURE__ */ __name(async (input) => {\n const ast = await parse(\"info\", input);\n log.debug(ast);\n }, \"parse\")\n};\n\n// src/diagrams/info/infoDb.ts\nvar DEFAULT_INFO_DB = {\n version: \"11.13.0\" + (true ? \"\" : \"-tiny\")\n};\nvar getVersion = /* @__PURE__ */ __name(() => DEFAULT_INFO_DB.version, \"getVersion\");\nvar db = {\n getVersion\n};\n\n// src/diagrams/info/infoRenderer.ts\nvar draw = /* @__PURE__ */ __name((text, id, version) => {\n log.debug(\"rendering info diagram\\n\" + text);\n const svg = selectSvgElement(id);\n configureSvgSize(svg, 100, 400, true);\n const group = svg.append(\"g\");\n group.append(\"text\").attr(\"x\", 100).attr(\"y\", 40).attr(\"class\", \"version\").attr(\"font-size\", 32).style(\"text-anchor\", \"middle\").text(`v${version}`);\n}, \"draw\");\nvar renderer = { draw };\n\n// src/diagrams/info/infoDiagram.ts\nvar diagram = {\n parser,\n db,\n renderer\n};\nexport {\n diagram\n};\n"],"names":[],"mappings":";;;;;AAaA,IAAI,SAAS;AAAA,EACX,OAAuB,uBAAO,OAAO,UAAU;AAC7C,UAAM,MAAM,MAAM,MAAM,QAAQ,KAAK;AACrC,QAAI,MAAM,GAAG;AAAA,EACf,GAAG,OAAO;AACZ;AAGA,IAAI,kBAAkB;AAAA,EACpB,SAAS;AACX;AACA,IAAI,aAA6B,uBAAO,MAAM,gBAAgB,SAAS,YAAY;AACnF,IAAI,KAAK;AAAA,EACP;AACF;AAGA,IAAI,OAAuB,uBAAO,CAAC,MAAM,IAAI,YAAY;AACvD,MAAI,MAAM,6BAA6B,IAAI;AAC3C,QAAM,MAAM,iBAAiB,EAAE;AAC/B,mBAAiB,KAAK,KAAK,KAAK,IAAI;AACpC,QAAM,QAAQ,IAAI,OAAO,GAAG;AAC5B,QAAM,OAAO,MAAM,EAAE,KAAK,KAAK,GAAG,EAAE,KAAK,KAAK,EAAE,EAAE,KAAK,SAAS,SAAS,EAAE,KAAK,aAAa,EAAE,EAAE,MAAM,eAAe,QAAQ,EAAE,KAAK,IAAI,OAAO,EAAE;AACpJ,GAAG,MAAM;AACT,IAAI,WAAW,EAAE,KAAI;AAGlB,IAAC,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AACF;","x_google_ignoreList":[0]}