@loopstack/loopstack-studio 0.20.3 → 0.21.0-rc.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 (991) hide show
  1. package/dist/_virtual/rolldown_runtime.js +20 -0
  2. package/dist/components/data-table/ConfirmDialog.js +30 -0
  3. package/dist/components/data-table/DataList.js +216 -0
  4. package/dist/components/data-table/DataTable.js +264 -0
  5. package/dist/components/data-table/DataTableBatchAction.js +32 -0
  6. package/dist/components/data-table/DataTableFilters.js +83 -0
  7. package/dist/components/data-table/DataTablePagination.js +108 -0
  8. package/dist/components/data-table/DataTableToolbar.js +70 -0
  9. package/dist/components/dynamic-form/ArrayController.js +100 -0
  10. package/dist/components/dynamic-form/CodeContent.js +174 -0
  11. package/dist/components/dynamic-form/Form.js +35 -0
  12. package/dist/components/dynamic-form/FormBody.js +26 -0
  13. package/dist/components/dynamic-form/FormElement.js +42 -0
  14. package/dist/components/dynamic-form/FormElementHeader.js +20 -0
  15. package/dist/components/dynamic-form/InputController.js +38 -0
  16. package/dist/components/dynamic-form/MarkdownContent.js +76 -0
  17. package/dist/components/dynamic-form/MermaidDiagram.js +41 -0
  18. package/dist/components/dynamic-form/ObjectController.js +32 -0
  19. package/dist/components/dynamic-form/fields/BaseFieldWrapper.js +47 -0
  20. package/dist/components/dynamic-form/fields/CheckboxField.js +53 -0
  21. package/dist/components/dynamic-form/fields/CodeViewField.js +63 -0
  22. package/dist/components/dynamic-form/fields/InputField.js +105 -0
  23. package/dist/components/dynamic-form/fields/RadioField.js +67 -0
  24. package/dist/components/dynamic-form/fields/SelectField.js +60 -0
  25. package/dist/components/dynamic-form/fields/SliderField.js +112 -0
  26. package/dist/components/dynamic-form/fields/SwitchField.js +66 -0
  27. package/dist/components/dynamic-form/fields/TextareaField.js +77 -0
  28. package/dist/components/dynamic-form/fields/utils/text-validation-utils.js +33 -0
  29. package/dist/components/dynamic-form/hooks/useArrayDefaultValue.js +42 -0
  30. package/dist/components/dynamic-form/hooks/useFieldConfig.js +21 -0
  31. package/dist/components/dynamic-form/hooks/useMergeParentKey.js +5 -0
  32. package/dist/components/dynamic-form/hooks/useSortPropertyNames.js +5 -0
  33. package/dist/components/layout/MainLayout.js +24 -0
  34. package/dist/components/lists/CustomListView.js +87 -0
  35. package/dist/components/lists/ListView.js +118 -0
  36. package/dist/components/page/PageBreadcrumbs.js +41 -0
  37. package/dist/components/snackbars/ErrorSnackbar.js +30 -0
  38. package/dist/components/snackbars/Snackbar.js +44 -0
  39. package/dist/components/ui/alert-dialog.js +121 -0
  40. package/dist/components/ui/badge.js +28 -0
  41. package/dist/components/ui/breadcrumb.js +85 -0
  42. package/dist/components/ui/button.js +47 -0
  43. package/dist/components/ui/card.js +29 -0
  44. package/dist/components/ui/checkbox.js +26 -0
  45. package/dist/components/ui/collapsible.js +32 -0
  46. package/dist/components/ui/dialog.js +88 -0
  47. package/dist/components/ui/input.js +18 -0
  48. package/dist/components/ui/label.js +19 -0
  49. package/dist/components/ui/radio-group.js +38 -0
  50. package/dist/components/ui/select.js +125 -0
  51. package/dist/components/ui/sheet.js +97 -0
  52. package/dist/components/ui/slider.js +35 -0
  53. package/dist/components/ui/switch.js +24 -0
  54. package/dist/components/ui/table.js +81 -0
  55. package/dist/components/ui/textarea.js +17 -0
  56. package/dist/components/ui/tooltip.js +50 -0
  57. package/dist/features/health/LocalHealthCheck.js +95 -0
  58. package/dist/features/workspaces/Workspaces.js +162 -0
  59. package/dist/features/workspaces/components/CreateWorkspace.js +128 -0
  60. package/dist/features/workspaces/components/ExecutionTimeline.js +204 -0
  61. package/dist/features/workspaces/components/NewPipelineRunDialog.js +31 -0
  62. package/dist/features/workspaces/components/PipelineForm.js +152 -0
  63. package/dist/features/workspaces/components/pipeline-form/ArgumentsView.js +75 -0
  64. package/dist/features/workspaces/components/pipeline-form/HeaderSection.js +43 -0
  65. package/dist/features/workspaces/components/pipeline-form/SelectionView.js +105 -0
  66. package/dist/hooks/use-mobile.js +3 -3
  67. package/dist/hooks/useAuth.js +56 -0
  68. package/dist/hooks/useConfig.js +46 -0
  69. package/dist/hooks/useDebounce.js +27 -0
  70. package/dist/hooks/usePipelines.js +117 -0
  71. package/dist/hooks/useProcessor.js +24 -0
  72. package/dist/hooks/useWorkspaces.js +142 -0
  73. package/dist/index.d.ts +7 -0
  74. package/dist/index.js +4 -1
  75. package/dist/lib/utils.js +6 -0
  76. package/dist/loopstack-studio.css +2 -0
  77. package/dist/node_modules/@braintree/sanitize-url/dist/constants.js +6 -0
  78. package/dist/node_modules/@braintree/sanitize-url/dist/index.js +48 -0
  79. package/dist/node_modules/@chevrotain/gast/lib/src/helpers.js +26 -0
  80. package/dist/node_modules/@chevrotain/gast/lib/src/model.js +154 -0
  81. package/dist/node_modules/@chevrotain/gast/lib/src/visitor.js +40 -0
  82. package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/api.js +2 -0
  83. package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/base-regexp-visitor.js +85 -0
  84. package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/character-classes.js +35 -0
  85. package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/regexp-parser.js +570 -0
  86. package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/utils.js +25 -0
  87. package/dist/node_modules/@chevrotain/utils/lib/src/print.js +9 -0
  88. package/dist/node_modules/@chevrotain/utils/lib/src/timer.js +8 -0
  89. package/dist/node_modules/@chevrotain/utils/lib/src/to-fast-properties.js +10 -0
  90. package/dist/node_modules/@iconify/utils/lib/customisations/defaults.js +9 -0
  91. package/dist/node_modules/@iconify/utils/lib/icon/defaults.js +18 -0
  92. package/dist/node_modules/@iconify/utils/lib/icon/merge.js +8 -0
  93. package/dist/node_modules/@iconify/utils/lib/icon/name.js +35 -0
  94. package/dist/node_modules/@iconify/utils/lib/icon/transformations.js +7 -0
  95. package/dist/node_modules/@iconify/utils/lib/icon-set/get-icon.js +15 -0
  96. package/dist/node_modules/@iconify/utils/lib/icon-set/tree.js +14 -0
  97. package/dist/node_modules/@iconify/utils/lib/svg/build.js +54 -0
  98. package/dist/node_modules/@iconify/utils/lib/svg/defs.js +22 -0
  99. package/dist/node_modules/@iconify/utils/lib/svg/html.js +6 -0
  100. package/dist/node_modules/@iconify/utils/lib/svg/id.js +17 -0
  101. package/dist/node_modules/@iconify/utils/lib/svg/size.js +18 -0
  102. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/architecture-7HQA4BMR.js +3 -0
  103. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-4F5CHEZ2.js +23 -0
  104. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-B2363JML.js +60 -0
  105. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FRFDVMJY.js +23 -0
  106. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-PL6DKKU2.js +28 -0
  107. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-SJTYNZTY.js +23 -0
  108. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-TCCFYFTB.js +787 -0
  109. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-TQ3KTPDO.js +23 -0
  110. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-UMXZTB3W.js +30 -0
  111. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/gitGraph-G5XIXVHT.js +3 -0
  112. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-VBDWY6EO.js +3 -0
  113. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-DYOGHKS2.js +3 -0
  114. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-VRWISCQL.js +3 -0
  115. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-ZZBFDIW7.js +3 -0
  116. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-GDKQZRPO.js +3 -0
  117. package/dist/node_modules/@mermaid-js/parser/dist/mermaid-parser.core.js +55 -0
  118. package/dist/node_modules/ccount/index.js +8 -0
  119. package/dist/node_modules/chevrotain/lib/src/api.js +10 -0
  120. package/dist/node_modules/chevrotain/lib/src/lang/lang_extensions.js +10 -0
  121. package/dist/node_modules/chevrotain/lib/src/parse/constants.js +2 -0
  122. package/dist/node_modules/chevrotain/lib/src/parse/cst/cst.js +13 -0
  123. package/dist/node_modules/chevrotain/lib/src/parse/cst/cst_visitor.js +58 -0
  124. package/dist/node_modules/chevrotain/lib/src/parse/errors_public.js +75 -0
  125. package/dist/node_modules/chevrotain/lib/src/parse/exceptions_public.js +34 -0
  126. package/dist/node_modules/chevrotain/lib/src/parse/grammar/checks.js +299 -0
  127. package/dist/node_modules/chevrotain/lib/src/parse/grammar/first.js +25 -0
  128. package/dist/node_modules/chevrotain/lib/src/parse/grammar/follow.js +29 -0
  129. package/dist/node_modules/chevrotain/lib/src/parse/grammar/gast/gast_resolver_public.js +15 -0
  130. package/dist/node_modules/chevrotain/lib/src/parse/grammar/interpreter.js +269 -0
  131. package/dist/node_modules/chevrotain/lib/src/parse/grammar/keys.js +5 -0
  132. package/dist/node_modules/chevrotain/lib/src/parse/grammar/llk_lookahead.js +43 -0
  133. package/dist/node_modules/chevrotain/lib/src/parse/grammar/lookahead.js +248 -0
  134. package/dist/node_modules/chevrotain/lib/src/parse/grammar/resolver.js +32 -0
  135. package/dist/node_modules/chevrotain/lib/src/parse/grammar/rest.js +58 -0
  136. package/dist/node_modules/chevrotain/lib/src/parse/parser/parser.js +122 -0
  137. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/context_assist.js +16 -0
  138. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/error_handler.js +48 -0
  139. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/gast_recorder.js +172 -0
  140. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/lexer_adapter.js +39 -0
  141. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/looksahead.js +109 -0
  142. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/perf_tracer.js +22 -0
  143. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_api.js +313 -0
  144. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_engine.js +275 -0
  145. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recoverable.js +144 -0
  146. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/tree_builder.js +102 -0
  147. package/dist/node_modules/chevrotain/lib/src/parse/parser/utils/apply_mixins.js +11 -0
  148. package/dist/node_modules/chevrotain/lib/src/scan/lexer.js +465 -0
  149. package/dist/node_modules/chevrotain/lib/src/scan/lexer_errors_public.js +9 -0
  150. package/dist/node_modules/chevrotain/lib/src/scan/lexer_public.js +275 -0
  151. package/dist/node_modules/chevrotain/lib/src/scan/reg_exp.js +152 -0
  152. package/dist/node_modules/chevrotain/lib/src/scan/reg_exp_parser.js +15 -0
  153. package/dist/node_modules/chevrotain/lib/src/scan/tokens.js +75 -0
  154. package/dist/node_modules/chevrotain/lib/src/scan/tokens_public.js +42 -0
  155. package/dist/node_modules/chevrotain-allstar/lib/all-star-lookahead.js +346 -0
  156. package/dist/node_modules/chevrotain-allstar/lib/atn.js +194 -0
  157. package/dist/node_modules/chevrotain-allstar/lib/dfa.js +32 -0
  158. package/dist/node_modules/chevrotain-allstar/lib/index.js +1 -0
  159. package/dist/node_modules/comma-separated-tokens/index.js +10 -0
  160. package/dist/node_modules/cose-base/cose-base.js +469 -0
  161. package/dist/node_modules/cytoscape/dist/cytoscape.esm.js +18100 -0
  162. package/dist/node_modules/cytoscape-cose-bilkent/cytoscape-cose-bilkent.js +172 -0
  163. package/dist/node_modules/cytoscape-fcose/cytoscape-fcose.js +604 -0
  164. package/dist/node_modules/cytoscape-fcose/node_modules/cose-base/cose-base.js +1142 -0
  165. package/dist/node_modules/cytoscape-fcose/node_modules/layout-base/layout-base.js +1635 -0
  166. package/dist/node_modules/d3/src/index.js +93 -0
  167. package/dist/node_modules/d3-array/src/ascending.js +4 -0
  168. package/dist/node_modules/d3-array/src/bisect.js +8 -0
  169. package/dist/node_modules/d3-array/src/bisector.js +39 -0
  170. package/dist/node_modules/d3-array/src/descending.js +4 -0
  171. package/dist/node_modules/d3-array/src/max.js +10 -0
  172. package/dist/node_modules/d3-array/src/min.js +10 -0
  173. package/dist/node_modules/d3-array/src/number.js +4 -0
  174. package/dist/node_modules/d3-array/src/range.js +6 -0
  175. package/dist/node_modules/d3-array/src/ticks.js +30 -0
  176. package/dist/node_modules/d3-axis/src/axis.js +61 -0
  177. package/dist/node_modules/d3-axis/src/identity.js +4 -0
  178. package/dist/node_modules/d3-brush/src/brush.js +15 -0
  179. package/dist/node_modules/d3-brush/src/index.js +1 -0
  180. package/dist/node_modules/d3-color/src/color.js +287 -0
  181. package/dist/node_modules/d3-color/src/define.js +9 -0
  182. package/dist/node_modules/d3-color/src/lab.js +70 -0
  183. package/dist/node_modules/d3-color/src/math.js +2 -0
  184. package/dist/node_modules/d3-dispatch/src/dispatch.js +64 -0
  185. package/dist/node_modules/d3-ease/src/cubic.js +4 -0
  186. package/dist/node_modules/d3-format/src/defaultLocale.js +11 -0
  187. package/dist/node_modules/d3-format/src/exponent.js +5 -0
  188. package/dist/node_modules/d3-format/src/formatDecimal.js +9 -0
  189. package/dist/node_modules/d3-format/src/formatGroup.js +7 -0
  190. package/dist/node_modules/d3-format/src/formatNumerals.js +8 -0
  191. package/dist/node_modules/d3-format/src/formatPrefixAuto.js +9 -0
  192. package/dist/node_modules/d3-format/src/formatRounded.js +8 -0
  193. package/dist/node_modules/d3-format/src/formatSpecifier.js +25 -0
  194. package/dist/node_modules/d3-format/src/formatTrim.js +16 -0
  195. package/dist/node_modules/d3-format/src/formatTypes.js +19 -0
  196. package/dist/node_modules/d3-format/src/identity.js +4 -0
  197. package/dist/node_modules/d3-format/src/locale.js +82 -0
  198. package/dist/node_modules/d3-format/src/precisionFixed.js +5 -0
  199. package/dist/node_modules/d3-format/src/precisionPrefix.js +5 -0
  200. package/dist/node_modules/d3-format/src/precisionRound.js +5 -0
  201. package/dist/node_modules/d3-hierarchy/src/accessors.js +5 -0
  202. package/dist/node_modules/d3-hierarchy/src/constant.js +9 -0
  203. package/dist/node_modules/d3-hierarchy/src/hierarchy/ancestors.js +5 -0
  204. package/dist/node_modules/d3-hierarchy/src/hierarchy/count.js +10 -0
  205. package/dist/node_modules/d3-hierarchy/src/hierarchy/descendants.js +4 -0
  206. package/dist/node_modules/d3-hierarchy/src/hierarchy/each.js +6 -0
  207. package/dist/node_modules/d3-hierarchy/src/hierarchy/eachAfter.js +6 -0
  208. package/dist/node_modules/d3-hierarchy/src/hierarchy/eachBefore.js +5 -0
  209. package/dist/node_modules/d3-hierarchy/src/hierarchy/find.js +5 -0
  210. package/dist/node_modules/d3-hierarchy/src/hierarchy/index.js +57 -0
  211. package/dist/node_modules/d3-hierarchy/src/hierarchy/iterator.js +7 -0
  212. package/dist/node_modules/d3-hierarchy/src/hierarchy/leaves.js +7 -0
  213. package/dist/node_modules/d3-hierarchy/src/hierarchy/links.js +10 -0
  214. package/dist/node_modules/d3-hierarchy/src/hierarchy/path.js +12 -0
  215. package/dist/node_modules/d3-hierarchy/src/hierarchy/sort.js +6 -0
  216. package/dist/node_modules/d3-hierarchy/src/hierarchy/sum.js +7 -0
  217. package/dist/node_modules/d3-hierarchy/src/treemap/dice.js +4 -0
  218. package/dist/node_modules/d3-hierarchy/src/treemap/index.js +36 -0
  219. package/dist/node_modules/d3-hierarchy/src/treemap/round.js +4 -0
  220. package/dist/node_modules/d3-hierarchy/src/treemap/slice.js +4 -0
  221. package/dist/node_modules/d3-hierarchy/src/treemap/squarify.js +33 -0
  222. package/dist/node_modules/d3-interpolate/src/array.js +11 -0
  223. package/dist/node_modules/d3-interpolate/src/basis.js +12 -0
  224. package/dist/node_modules/d3-interpolate/src/basisClosed.js +9 -0
  225. package/dist/node_modules/d3-interpolate/src/color.js +25 -0
  226. package/dist/node_modules/d3-interpolate/src/constant.js +2 -0
  227. package/dist/node_modules/d3-interpolate/src/date.js +7 -0
  228. package/dist/node_modules/d3-interpolate/src/hcl.js +12 -0
  229. package/dist/node_modules/d3-interpolate/src/number.js +6 -0
  230. package/dist/node_modules/d3-interpolate/src/numberArray.js +12 -0
  231. package/dist/node_modules/d3-interpolate/src/object.js +10 -0
  232. package/dist/node_modules/d3-interpolate/src/rgb.js +15 -0
  233. package/dist/node_modules/d3-interpolate/src/round.js +6 -0
  234. package/dist/node_modules/d3-interpolate/src/string.js +24 -0
  235. package/dist/node_modules/d3-interpolate/src/transform/decompose.js +20 -0
  236. package/dist/node_modules/d3-interpolate/src/transform/index.js +52 -0
  237. package/dist/node_modules/d3-interpolate/src/transform/parse.js +10 -0
  238. package/dist/node_modules/d3-interpolate/src/value.js +14 -0
  239. package/dist/node_modules/d3-path/src/path.js +61 -0
  240. package/dist/node_modules/d3-sankey/node_modules/d3-array/src/max.js +10 -0
  241. package/dist/node_modules/d3-sankey/node_modules/d3-array/src/min.js +10 -0
  242. package/dist/node_modules/d3-sankey/node_modules/d3-array/src/sum.js +10 -0
  243. package/dist/node_modules/d3-sankey/node_modules/d3-path/src/path.js +50 -0
  244. package/dist/node_modules/d3-sankey/node_modules/d3-shape/src/array.js +2 -0
  245. package/dist/node_modules/d3-sankey/node_modules/d3-shape/src/constant.js +6 -0
  246. package/dist/node_modules/d3-sankey/node_modules/d3-shape/src/link/index.js +35 -0
  247. package/dist/node_modules/d3-sankey/node_modules/d3-shape/src/point.js +7 -0
  248. package/dist/node_modules/d3-sankey/src/align.js +17 -0
  249. package/dist/node_modules/d3-sankey/src/constant.js +6 -0
  250. package/dist/node_modules/d3-sankey/src/sankey.js +224 -0
  251. package/dist/node_modules/d3-sankey/src/sankeyLinkHorizontal.js +11 -0
  252. package/dist/node_modules/d3-scale/src/band.js +39 -0
  253. package/dist/node_modules/d3-scale/src/constant.js +6 -0
  254. package/dist/node_modules/d3-scale/src/continuous.js +69 -0
  255. package/dist/node_modules/d3-scale/src/init.js +13 -0
  256. package/dist/node_modules/d3-scale/src/linear.js +32 -0
  257. package/dist/node_modules/d3-scale/src/nice.js +6 -0
  258. package/dist/node_modules/d3-scale/src/number.js +4 -0
  259. package/dist/node_modules/d3-scale/src/ordinal.js +27 -0
  260. package/dist/node_modules/d3-scale/src/tickFormat.js +27 -0
  261. package/dist/node_modules/d3-scale/src/time.js +43 -0
  262. package/dist/node_modules/d3-scale-chromatic/src/categorical/Tableau10.js +3 -0
  263. package/dist/node_modules/d3-scale-chromatic/src/colors.js +5 -0
  264. package/dist/node_modules/d3-selection/src/array.js +4 -0
  265. package/dist/node_modules/d3-selection/src/constant.js +6 -0
  266. package/dist/node_modules/d3-selection/src/creator.js +18 -0
  267. package/dist/node_modules/d3-selection/src/matcher.js +11 -0
  268. package/dist/node_modules/d3-selection/src/namespace.js +9 -0
  269. package/dist/node_modules/d3-selection/src/namespaces.js +8 -0
  270. package/dist/node_modules/d3-selection/src/select.js +5 -0
  271. package/dist/node_modules/d3-selection/src/selection/append.js +8 -0
  272. package/dist/node_modules/d3-selection/src/selection/attr.js +42 -0
  273. package/dist/node_modules/d3-selection/src/selection/call.js +5 -0
  274. package/dist/node_modules/d3-selection/src/selection/classed.js +51 -0
  275. package/dist/node_modules/d3-selection/src/selection/clone.js +12 -0
  276. package/dist/node_modules/d3-selection/src/selection/data.js +34 -0
  277. package/dist/node_modules/d3-selection/src/selection/datum.js +4 -0
  278. package/dist/node_modules/d3-selection/src/selection/dispatch.js +19 -0
  279. package/dist/node_modules/d3-selection/src/selection/each.js +5 -0
  280. package/dist/node_modules/d3-selection/src/selection/empty.js +4 -0
  281. package/dist/node_modules/d3-selection/src/selection/enter.js +24 -0
  282. package/dist/node_modules/d3-selection/src/selection/exit.js +6 -0
  283. package/dist/node_modules/d3-selection/src/selection/filter.js +8 -0
  284. package/dist/node_modules/d3-selection/src/selection/html.js +17 -0
  285. package/dist/node_modules/d3-selection/src/selection/index.js +84 -0
  286. package/dist/node_modules/d3-selection/src/selection/insert.js +12 -0
  287. package/dist/node_modules/d3-selection/src/selection/iterator.js +4 -0
  288. package/dist/node_modules/d3-selection/src/selection/join.js +5 -0
  289. package/dist/node_modules/d3-selection/src/selection/lower.js +7 -0
  290. package/dist/node_modules/d3-selection/src/selection/merge.js +7 -0
  291. package/dist/node_modules/d3-selection/src/selection/node.js +8 -0
  292. package/dist/node_modules/d3-selection/src/selection/nodes.js +4 -0
  293. package/dist/node_modules/d3-selection/src/selection/on.js +54 -0
  294. package/dist/node_modules/d3-selection/src/selection/order.js +5 -0
  295. package/dist/node_modules/d3-selection/src/selection/property.js +20 -0
  296. package/dist/node_modules/d3-selection/src/selection/raise.js +7 -0
  297. package/dist/node_modules/d3-selection/src/selection/remove.js +8 -0
  298. package/dist/node_modules/d3-selection/src/selection/select.js +8 -0
  299. package/dist/node_modules/d3-selection/src/selection/selectAll.js +14 -0
  300. package/dist/node_modules/d3-selection/src/selection/selectChild.js +14 -0
  301. package/dist/node_modules/d3-selection/src/selection/selectChildren.js +14 -0
  302. package/dist/node_modules/d3-selection/src/selection/size.js +6 -0
  303. package/dist/node_modules/d3-selection/src/selection/sort.js +16 -0
  304. package/dist/node_modules/d3-selection/src/selection/sparse.js +4 -0
  305. package/dist/node_modules/d3-selection/src/selection/style.js +24 -0
  306. package/dist/node_modules/d3-selection/src/selection/text.js +17 -0
  307. package/dist/node_modules/d3-selection/src/selector.js +7 -0
  308. package/dist/node_modules/d3-selection/src/selectorAll.js +9 -0
  309. package/dist/node_modules/d3-selection/src/window.js +4 -0
  310. package/dist/node_modules/d3-shape/src/arc.js +79 -0
  311. package/dist/node_modules/d3-shape/src/array.js +5 -0
  312. package/dist/node_modules/d3-shape/src/constant.js +6 -0
  313. package/dist/node_modules/d3-shape/src/curve/basis.js +45 -0
  314. package/dist/node_modules/d3-shape/src/curve/basisClosed.js +46 -0
  315. package/dist/node_modules/d3-shape/src/curve/basisOpen.js +42 -0
  316. package/dist/node_modules/d3-shape/src/curve/bump.js +36 -0
  317. package/dist/node_modules/d3-shape/src/curve/bundle.js +26 -0
  318. package/dist/node_modules/d3-shape/src/curve/cardinal.js +52 -0
  319. package/dist/node_modules/d3-shape/src/curve/cardinalClosed.js +51 -0
  320. package/dist/node_modules/d3-shape/src/curve/cardinalOpen.js +45 -0
  321. package/dist/node_modules/d3-shape/src/curve/catmullRom.js +67 -0
  322. package/dist/node_modules/d3-shape/src/curve/catmullRomClosed.js +56 -0
  323. package/dist/node_modules/d3-shape/src/curve/catmullRomOpen.js +50 -0
  324. package/dist/node_modules/d3-shape/src/curve/linear.js +32 -0
  325. package/dist/node_modules/d3-shape/src/curve/linearClosed.js +21 -0
  326. package/dist/node_modules/d3-shape/src/curve/monotone.js +90 -0
  327. package/dist/node_modules/d3-shape/src/curve/natural.js +35 -0
  328. package/dist/node_modules/d3-shape/src/curve/step.js +43 -0
  329. package/dist/node_modules/d3-shape/src/descending.js +4 -0
  330. package/dist/node_modules/d3-shape/src/identity.js +4 -0
  331. package/dist/node_modules/d3-shape/src/line.js +26 -0
  332. package/dist/node_modules/d3-shape/src/math.js +8 -0
  333. package/dist/node_modules/d3-shape/src/noop.js +2 -0
  334. package/dist/node_modules/d3-shape/src/path.js +15 -0
  335. package/dist/node_modules/d3-shape/src/pie.js +39 -0
  336. package/dist/node_modules/d3-shape/src/point.js +7 -0
  337. package/dist/node_modules/d3-time/src/day.js +17 -0
  338. package/dist/node_modules/d3-time/src/duration.js +2 -0
  339. package/dist/node_modules/d3-time/src/hour.js +15 -0
  340. package/dist/node_modules/d3-time/src/interval.js +24 -0
  341. package/dist/node_modules/d3-time/src/millisecond.js +10 -0
  342. package/dist/node_modules/d3-time/src/minute.js +15 -0
  343. package/dist/node_modules/d3-time/src/month.js +14 -0
  344. package/dist/node_modules/d3-time/src/second.js +9 -0
  345. package/dist/node_modules/d3-time/src/ticks.js +121 -0
  346. package/dist/node_modules/d3-time/src/week.js +21 -0
  347. package/dist/node_modules/d3-time/src/year.js +22 -0
  348. package/dist/node_modules/d3-time-format/src/defaultLocale.js +58 -0
  349. package/dist/node_modules/d3-time-format/src/locale.js +486 -0
  350. package/dist/node_modules/d3-timer/src/timeout.js +8 -0
  351. package/dist/node_modules/d3-timer/src/timer.js +51 -0
  352. package/dist/node_modules/d3-transition/src/index.js +3 -0
  353. package/dist/node_modules/d3-transition/src/interrupt.js +15 -0
  354. package/dist/node_modules/d3-transition/src/selection/index.js +4 -0
  355. package/dist/node_modules/d3-transition/src/selection/interrupt.js +7 -0
  356. package/dist/node_modules/d3-transition/src/selection/transition.js +21 -0
  357. package/dist/node_modules/d3-transition/src/transition/attr.js +47 -0
  358. package/dist/node_modules/d3-transition/src/transition/attrTween.js +36 -0
  359. package/dist/node_modules/d3-transition/src/transition/delay.js +16 -0
  360. package/dist/node_modules/d3-transition/src/transition/duration.js +16 -0
  361. package/dist/node_modules/d3-transition/src/transition/ease.js +12 -0
  362. package/dist/node_modules/d3-transition/src/transition/easeVarying.js +13 -0
  363. package/dist/node_modules/d3-transition/src/transition/end.js +14 -0
  364. package/dist/node_modules/d3-transition/src/transition/filter.js +8 -0
  365. package/dist/node_modules/d3-transition/src/transition/index.js +65 -0
  366. package/dist/node_modules/d3-transition/src/transition/interpolate.js +9 -0
  367. package/dist/node_modules/d3-transition/src/transition/merge.js +8 -0
  368. package/dist/node_modules/d3-transition/src/transition/on.js +19 -0
  369. package/dist/node_modules/d3-transition/src/transition/remove.js +11 -0
  370. package/dist/node_modules/d3-transition/src/transition/schedule.js +67 -0
  371. package/dist/node_modules/d3-transition/src/transition/select.js +10 -0
  372. package/dist/node_modules/d3-transition/src/transition/selectAll.js +13 -0
  373. package/dist/node_modules/d3-transition/src/transition/selection.js +6 -0
  374. package/dist/node_modules/d3-transition/src/transition/style.js +43 -0
  375. package/dist/node_modules/d3-transition/src/transition/styleTween.js +21 -0
  376. package/dist/node_modules/d3-transition/src/transition/text.js +15 -0
  377. package/dist/node_modules/d3-transition/src/transition/textTween.js +21 -0
  378. package/dist/node_modules/d3-transition/src/transition/transition.js +15 -0
  379. package/dist/node_modules/d3-transition/src/transition/tween.js +52 -0
  380. package/dist/node_modules/d3-zoom/src/index.js +2 -0
  381. package/dist/node_modules/d3-zoom/src/transform.js +46 -0
  382. package/dist/node_modules/d3-zoom/src/zoom.js +2 -0
  383. package/dist/node_modules/dagre-d3-es/src/dagre/acyclic.js +34 -0
  384. package/dist/node_modules/dagre-d3-es/src/dagre/add-border-segments.js +22 -0
  385. package/dist/node_modules/dagre-d3-es/src/dagre/coordinate-system.js +44 -0
  386. package/dist/node_modules/dagre-d3-es/src/dagre/data/list.js +25 -0
  387. package/dist/node_modules/dagre-d3-es/src/dagre/greedy-fas.js +69 -0
  388. package/dist/node_modules/dagre-d3-es/src/dagre/index.js +4 -0
  389. package/dist/node_modules/dagre-d3-es/src/dagre/layout.js +241 -0
  390. package/dist/node_modules/dagre-d3-es/src/dagre/nesting-graph.js +66 -0
  391. package/dist/node_modules/dagre-d3-es/src/dagre/normalize.js +32 -0
  392. package/dist/node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.js +14 -0
  393. package/dist/node_modules/dagre-d3-es/src/dagre/order/barycenter.js +25 -0
  394. package/dist/node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.js +25 -0
  395. package/dist/node_modules/dagre-d3-es/src/dagre/order/cross-count.js +33 -0
  396. package/dist/node_modules/dagre-d3-es/src/dagre/order/index.js +44 -0
  397. package/dist/node_modules/dagre-d3-es/src/dagre/order/init-order.js +23 -0
  398. package/dist/node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js +55 -0
  399. package/dist/node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js +43 -0
  400. package/dist/node_modules/dagre-d3-es/src/dagre/order/sort.js +27 -0
  401. package/dist/node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.js +40 -0
  402. package/dist/node_modules/dagre-d3-es/src/dagre/position/bk.js +216 -0
  403. package/dist/node_modules/dagre-d3-es/src/dagre/position/index.js +23 -0
  404. package/dist/node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.js +31 -0
  405. package/dist/node_modules/dagre-d3-es/src/dagre/rank/index.js +25 -0
  406. package/dist/node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js +84 -0
  407. package/dist/node_modules/dagre-d3-es/src/dagre/rank/util.js +20 -0
  408. package/dist/node_modules/dagre-d3-es/src/dagre/util.js +117 -0
  409. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/dfs.js +16 -0
  410. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/dijkstra-all.js +1 -0
  411. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/dijkstra.js +2 -0
  412. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/floyd-warshall.js +2 -0
  413. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/index.js +8 -0
  414. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/is-acyclic.js +1 -0
  415. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/postorder.js +5 -0
  416. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/preorder.js +5 -0
  417. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/prim.js +1 -0
  418. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/topsort.js +15 -0
  419. package/dist/node_modules/dagre-d3-es/src/graphlib/graph.js +228 -0
  420. package/dist/node_modules/dagre-d3-es/src/graphlib/index.js +1 -0
  421. package/dist/node_modules/dagre-d3-es/src/graphlib/json.js +32 -0
  422. package/dist/node_modules/dayjs/dayjs.min.js +298 -0
  423. package/dist/node_modules/dayjs/plugin/advancedFormat.js +37 -0
  424. package/dist/node_modules/dayjs/plugin/customParseFormat.js +160 -0
  425. package/dist/node_modules/dayjs/plugin/duration.js +164 -0
  426. package/dist/node_modules/dayjs/plugin/isoWeek.js +29 -0
  427. package/dist/node_modules/devlop/lib/default.js +2 -0
  428. package/dist/node_modules/dompurify/dist/purify.es.js +547 -0
  429. package/dist/node_modules/hast-util-from-dom/lib/index.js +58 -0
  430. package/dist/node_modules/hast-util-from-html-isomorphic/lib/browser.js +10 -0
  431. package/dist/node_modules/hast-util-is-element/lib/index.js +36 -0
  432. package/dist/node_modules/hast-util-parse-selector/lib/index.js +16 -0
  433. package/dist/node_modules/hast-util-to-text/lib/index.js +104 -0
  434. package/dist/node_modules/hastscript/lib/create-h.js +86 -0
  435. package/dist/node_modules/hastscript/lib/index.js +5 -0
  436. package/dist/node_modules/hastscript/lib/svg-case-sensitive-tag-names.js +2 -0
  437. package/dist/node_modules/internmap/src/index.js +36 -0
  438. package/dist/node_modules/katex/dist/katex.js +22103 -0
  439. package/dist/node_modules/khroma/dist/channels/index.js +68 -0
  440. package/dist/node_modules/khroma/dist/channels/reusable.js +8 -0
  441. package/dist/node_modules/khroma/dist/channels/type.js +20 -0
  442. package/dist/node_modules/khroma/dist/color/hex.js +22 -0
  443. package/dist/node_modules/khroma/dist/color/hsl.js +36 -0
  444. package/dist/node_modules/khroma/dist/color/index.js +23 -0
  445. package/dist/node_modules/khroma/dist/color/keyword.js +162 -0
  446. package/dist/node_modules/khroma/dist/color/rgb.js +23 -0
  447. package/dist/node_modules/khroma/dist/constants.js +9 -0
  448. package/dist/node_modules/khroma/dist/methods/adjust.js +8 -0
  449. package/dist/node_modules/khroma/dist/methods/adjust_channel.js +7 -0
  450. package/dist/node_modules/khroma/dist/methods/change.js +8 -0
  451. package/dist/node_modules/khroma/dist/methods/channel.js +4 -0
  452. package/dist/node_modules/khroma/dist/methods/darken.js +3 -0
  453. package/dist/node_modules/khroma/dist/methods/invert.js +7 -0
  454. package/dist/node_modules/khroma/dist/methods/is_dark.js +3 -0
  455. package/dist/node_modules/khroma/dist/methods/is_light.js +3 -0
  456. package/dist/node_modules/khroma/dist/methods/lighten.js +3 -0
  457. package/dist/node_modules/khroma/dist/methods/luminance.js +7 -0
  458. package/dist/node_modules/khroma/dist/methods/mix.js +7 -0
  459. package/dist/node_modules/khroma/dist/methods/rgba.js +15 -0
  460. package/dist/node_modules/khroma/dist/utils/channel.js +58 -0
  461. package/dist/node_modules/khroma/dist/utils/index.js +9 -0
  462. package/dist/node_modules/khroma/dist/utils/lang.js +5 -0
  463. package/dist/node_modules/khroma/dist/utils/unit.js +5 -0
  464. package/dist/node_modules/langium/lib/default-module.js +85 -0
  465. package/dist/node_modules/langium/lib/dependency-injection.js +62 -0
  466. package/dist/node_modules/langium/lib/documentation/comment-provider.js +11 -0
  467. package/dist/node_modules/langium/lib/documentation/documentation-provider.js +36 -0
  468. package/dist/node_modules/langium/lib/documentation/jsdoc.js +303 -0
  469. package/dist/node_modules/langium/lib/index.js +182 -0
  470. package/dist/node_modules/langium/lib/languages/generated/ast.js +1089 -0
  471. package/dist/node_modules/langium/lib/languages/grammar-config.js +13 -0
  472. package/dist/node_modules/langium/lib/parser/async-parser.js +83 -0
  473. package/dist/node_modules/langium/lib/parser/completion-parser-builder.js +7 -0
  474. package/dist/node_modules/langium/lib/parser/cst-node-builder.js +160 -0
  475. package/dist/node_modules/langium/lib/parser/indentation-aware.js +141 -0
  476. package/dist/node_modules/langium/lib/parser/langium-parser-builder.js +11 -0
  477. package/dist/node_modules/langium/lib/parser/langium-parser.js +388 -0
  478. package/dist/node_modules/langium/lib/parser/lexer.js +50 -0
  479. package/dist/node_modules/langium/lib/parser/parser-builder-base.js +275 -0
  480. package/dist/node_modules/langium/lib/parser/token-builder.js +61 -0
  481. package/dist/node_modules/langium/lib/parser/value-converter.js +78 -0
  482. package/dist/node_modules/langium/lib/references/linker.js +190 -0
  483. package/dist/node_modules/langium/lib/references/name-provider.js +13 -0
  484. package/dist/node_modules/langium/lib/references/references.js +76 -0
  485. package/dist/node_modules/langium/lib/references/scope-computation.js +35 -0
  486. package/dist/node_modules/langium/lib/references/scope-provider.js +34 -0
  487. package/dist/node_modules/langium/lib/references/scope.js +73 -0
  488. package/dist/node_modules/langium/lib/serializer/hydrator.js +125 -0
  489. package/dist/node_modules/langium/lib/serializer/json-serializer.js +145 -0
  490. package/dist/node_modules/langium/lib/service-registry.js +37 -0
  491. package/dist/node_modules/langium/lib/syntax-tree.js +70 -0
  492. package/dist/node_modules/langium/lib/utils/ast-utils.js +157 -0
  493. package/dist/node_modules/langium/lib/utils/caching.js +91 -0
  494. package/dist/node_modules/langium/lib/utils/cancellation.js +5 -0
  495. package/dist/node_modules/langium/lib/utils/collections.js +85 -0
  496. package/dist/node_modules/langium/lib/utils/cst-utils.js +190 -0
  497. package/dist/node_modules/langium/lib/utils/disposable.js +8 -0
  498. package/dist/node_modules/langium/lib/utils/errors.js +12 -0
  499. package/dist/node_modules/langium/lib/utils/event.js +5 -0
  500. package/dist/node_modules/langium/lib/utils/grammar-loader.js +22 -0
  501. package/dist/node_modules/langium/lib/utils/grammar-utils.js +296 -0
  502. package/dist/node_modules/langium/lib/utils/index.js +53 -0
  503. package/dist/node_modules/langium/lib/utils/promise-utils.js +30 -0
  504. package/dist/node_modules/langium/lib/utils/regexp-utils.js +167 -0
  505. package/dist/node_modules/langium/lib/utils/stream.js +327 -0
  506. package/dist/node_modules/langium/lib/utils/uri-utils.js +107 -0
  507. package/dist/node_modules/langium/lib/validation/document-validator.js +210 -0
  508. package/dist/node_modules/langium/lib/validation/validation-registry.js +87 -0
  509. package/dist/node_modules/langium/lib/workspace/ast-descriptions.js +57 -0
  510. package/dist/node_modules/langium/lib/workspace/ast-node-locator.js +28 -0
  511. package/dist/node_modules/langium/lib/workspace/configuration.js +51 -0
  512. package/dist/node_modules/langium/lib/workspace/document-builder.js +201 -0
  513. package/dist/node_modules/langium/lib/workspace/documents.js +142 -0
  514. package/dist/node_modules/langium/lib/workspace/file-system-provider.js +34 -0
  515. package/dist/node_modules/langium/lib/workspace/index-manager.js +49 -0
  516. package/dist/node_modules/langium/lib/workspace/profiler.js +89 -0
  517. package/dist/node_modules/langium/lib/workspace/workspace-lock.js +42 -0
  518. package/dist/node_modules/langium/lib/workspace/workspace-manager.js +66 -0
  519. package/dist/node_modules/layout-base/layout-base.js +1407 -0
  520. package/dist/node_modules/lodash-es/_DataView.js +4 -0
  521. package/dist/node_modules/lodash-es/_Hash.js +15 -0
  522. package/dist/node_modules/lodash-es/_ListCache.js +15 -0
  523. package/dist/node_modules/lodash-es/_Map.js +4 -0
  524. package/dist/node_modules/lodash-es/_MapCache.js +15 -0
  525. package/dist/node_modules/lodash-es/_Promise.js +4 -0
  526. package/dist/node_modules/lodash-es/_Set.js +4 -0
  527. package/dist/node_modules/lodash-es/_SetCache.js +10 -0
  528. package/dist/node_modules/lodash-es/_Stack.js +12 -0
  529. package/dist/node_modules/lodash-es/_Symbol.js +3 -0
  530. package/dist/node_modules/lodash-es/_Uint8Array.js +3 -0
  531. package/dist/node_modules/lodash-es/_WeakMap.js +4 -0
  532. package/dist/node_modules/lodash-es/_apply.js +11 -0
  533. package/dist/node_modules/lodash-es/_arrayAggregator.js +9 -0
  534. package/dist/node_modules/lodash-es/_arrayEach.js +6 -0
  535. package/dist/node_modules/lodash-es/_arrayEvery.js +6 -0
  536. package/dist/node_modules/lodash-es/_arrayFilter.js +9 -0
  537. package/dist/node_modules/lodash-es/_arrayIncludes.js +6 -0
  538. package/dist/node_modules/lodash-es/_arrayIncludesWith.js +6 -0
  539. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +14 -0
  540. package/dist/node_modules/lodash-es/_arrayMap.js +6 -0
  541. package/dist/node_modules/lodash-es/_arrayPush.js +6 -0
  542. package/dist/node_modules/lodash-es/_arrayReduce.js +7 -0
  543. package/dist/node_modules/lodash-es/_arraySome.js +6 -0
  544. package/dist/node_modules/lodash-es/_asciiSize.js +3 -0
  545. package/dist/node_modules/lodash-es/_assignMergeValue.js +7 -0
  546. package/dist/node_modules/lodash-es/_assignValue.js +9 -0
  547. package/dist/node_modules/lodash-es/_assocIndexOf.js +7 -0
  548. package/dist/node_modules/lodash-es/_baseAggregator.js +8 -0
  549. package/dist/node_modules/lodash-es/_baseAssign.js +7 -0
  550. package/dist/node_modules/lodash-es/_baseAssignIn.js +7 -0
  551. package/dist/node_modules/lodash-es/_baseAssignValue.js +11 -0
  552. package/dist/node_modules/lodash-es/_baseClone.js +56 -0
  553. package/dist/node_modules/lodash-es/_baseCreate.js +12 -0
  554. package/dist/node_modules/lodash-es/_baseDifference.js +22 -0
  555. package/dist/node_modules/lodash-es/_baseEach.js +4 -0
  556. package/dist/node_modules/lodash-es/_baseEvery.js +9 -0
  557. package/dist/node_modules/lodash-es/_baseExtremum.js +10 -0
  558. package/dist/node_modules/lodash-es/_baseFilter.js +9 -0
  559. package/dist/node_modules/lodash-es/_baseFindIndex.js +6 -0
  560. package/dist/node_modules/lodash-es/_baseFlatten.js +12 -0
  561. package/dist/node_modules/lodash-es/_baseFor.js +3 -0
  562. package/dist/node_modules/lodash-es/_baseForOwn.js +7 -0
  563. package/dist/node_modules/lodash-es/_baseGet.js +9 -0
  564. package/dist/node_modules/lodash-es/_baseGetAllKeys.js +8 -0
  565. package/dist/node_modules/lodash-es/_baseGetTag.js +9 -0
  566. package/dist/node_modules/lodash-es/_baseGt.js +5 -0
  567. package/dist/node_modules/lodash-es/_baseHas.js +6 -0
  568. package/dist/node_modules/lodash-es/_baseHasIn.js +5 -0
  569. package/dist/node_modules/lodash-es/_baseIndexOf.js +8 -0
  570. package/dist/node_modules/lodash-es/_baseIsArguments.js +8 -0
  571. package/dist/node_modules/lodash-es/_baseIsEqual.js +7 -0
  572. package/dist/node_modules/lodash-es/_baseIsEqualDeep.js +29 -0
  573. package/dist/node_modules/lodash-es/_baseIsMap.js +8 -0
  574. package/dist/node_modules/lodash-es/_baseIsMatch.js +25 -0
  575. package/dist/node_modules/lodash-es/_baseIsNaN.js +5 -0
  576. package/dist/node_modules/lodash-es/_baseIsNative.js +10 -0
  577. package/dist/node_modules/lodash-es/_baseIsRegExp.js +8 -0
  578. package/dist/node_modules/lodash-es/_baseIsSet.js +8 -0
  579. package/dist/node_modules/lodash-es/_baseIsTypedArray.js +10 -0
  580. package/dist/node_modules/lodash-es/_baseIteratee.js +10 -0
  581. package/dist/node_modules/lodash-es/_baseKeys.js +11 -0
  582. package/dist/node_modules/lodash-es/_baseKeysIn.js +12 -0
  583. package/dist/node_modules/lodash-es/_baseLt.js +5 -0
  584. package/dist/node_modules/lodash-es/_baseMap.js +10 -0
  585. package/dist/node_modules/lodash-es/_baseMatches.js +11 -0
  586. package/dist/node_modules/lodash-es/_baseMatchesProperty.js +16 -0
  587. package/dist/node_modules/lodash-es/_baseMerge.js +18 -0
  588. package/dist/node_modules/lodash-es/_baseMergeDeep.js +30 -0
  589. package/dist/node_modules/lodash-es/_baseOrderBy.js +30 -0
  590. package/dist/node_modules/lodash-es/_basePick.js +9 -0
  591. package/dist/node_modules/lodash-es/_basePickBy.js +12 -0
  592. package/dist/node_modules/lodash-es/_baseProperty.js +7 -0
  593. package/dist/node_modules/lodash-es/_basePropertyDeep.js +8 -0
  594. package/dist/node_modules/lodash-es/_baseRange.js +7 -0
  595. package/dist/node_modules/lodash-es/_baseReduce.js +7 -0
  596. package/dist/node_modules/lodash-es/_baseRest.js +8 -0
  597. package/dist/node_modules/lodash-es/_baseSet.js +21 -0
  598. package/dist/node_modules/lodash-es/_baseSetToString.js +12 -0
  599. package/dist/node_modules/lodash-es/_baseSlice.js +8 -0
  600. package/dist/node_modules/lodash-es/_baseSome.js +9 -0
  601. package/dist/node_modules/lodash-es/_baseSortBy.js +7 -0
  602. package/dist/node_modules/lodash-es/_baseTimes.js +6 -0
  603. package/dist/node_modules/lodash-es/_baseToString.js +14 -0
  604. package/dist/node_modules/lodash-es/_baseTrim.js +7 -0
  605. package/dist/node_modules/lodash-es/_baseUnary.js +7 -0
  606. package/dist/node_modules/lodash-es/_baseUniq.js +26 -0
  607. package/dist/node_modules/lodash-es/_baseValues.js +8 -0
  608. package/dist/node_modules/lodash-es/_baseZipObject.js +9 -0
  609. package/dist/node_modules/lodash-es/_cacheHas.js +5 -0
  610. package/dist/node_modules/lodash-es/_castFunction.js +6 -0
  611. package/dist/node_modules/lodash-es/_castPath.js +9 -0
  612. package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +7 -0
  613. package/dist/node_modules/lodash-es/_cloneBuffer.js +9 -0
  614. package/dist/node_modules/lodash-es/_cloneDataView.js +7 -0
  615. package/dist/node_modules/lodash-es/_cloneRegExp.js +7 -0
  616. package/dist/node_modules/lodash-es/_cloneSymbol.js +7 -0
  617. package/dist/node_modules/lodash-es/_cloneTypedArray.js +7 -0
  618. package/dist/node_modules/lodash-es/_compareAscending.js +11 -0
  619. package/dist/node_modules/lodash-es/_compareMultiple.js +10 -0
  620. package/dist/node_modules/lodash-es/_copyArray.js +7 -0
  621. package/dist/node_modules/lodash-es/_copyObject.js +13 -0
  622. package/dist/node_modules/lodash-es/_copySymbols.js +7 -0
  623. package/dist/node_modules/lodash-es/_copySymbolsIn.js +7 -0
  624. package/dist/node_modules/lodash-es/_coreJsData.js +3 -0
  625. package/dist/node_modules/lodash-es/_createAggregator.js +12 -0
  626. package/dist/node_modules/lodash-es/_createAssigner.js +14 -0
  627. package/dist/node_modules/lodash-es/_createBaseEach.js +11 -0
  628. package/dist/node_modules/lodash-es/_createBaseFor.js +11 -0
  629. package/dist/node_modules/lodash-es/_createFind.js +18 -0
  630. package/dist/node_modules/lodash-es/_createRange.js +10 -0
  631. package/dist/node_modules/lodash-es/_createSet.js +7 -0
  632. package/dist/node_modules/lodash-es/_defineProperty.js +8 -0
  633. package/dist/node_modules/lodash-es/_equalArrays.js +34 -0
  634. package/dist/node_modules/lodash-es/_equalByTag.js +34 -0
  635. package/dist/node_modules/lodash-es/_equalObjects.js +31 -0
  636. package/dist/node_modules/lodash-es/_flatRest.js +8 -0
  637. package/dist/node_modules/lodash-es/_freeGlobal.js +2 -0
  638. package/dist/node_modules/lodash-es/_getAllKeys.js +8 -0
  639. package/dist/node_modules/lodash-es/_getAllKeysIn.js +8 -0
  640. package/dist/node_modules/lodash-es/_getMapData.js +7 -0
  641. package/dist/node_modules/lodash-es/_getMatchData.js +15 -0
  642. package/dist/node_modules/lodash-es/_getNative.js +8 -0
  643. package/dist/node_modules/lodash-es/_getPrototype.js +3 -0
  644. package/dist/node_modules/lodash-es/_getRawTag.js +13 -0
  645. package/dist/node_modules/lodash-es/_getSymbols.js +8 -0
  646. package/dist/node_modules/lodash-es/_getSymbolsIn.js +9 -0
  647. package/dist/node_modules/lodash-es/_getTag.js +21 -0
  648. package/dist/node_modules/lodash-es/_getValue.js +5 -0
  649. package/dist/node_modules/lodash-es/_hasPath.js +17 -0
  650. package/dist/node_modules/lodash-es/_hasUnicode.js +6 -0
  651. package/dist/node_modules/lodash-es/_hashClear.js +6 -0
  652. package/dist/node_modules/lodash-es/_hashDelete.js +6 -0
  653. package/dist/node_modules/lodash-es/_hashGet.js +12 -0
  654. package/dist/node_modules/lodash-es/_hashHas.js +8 -0
  655. package/dist/node_modules/lodash-es/_hashSet.js +8 -0
  656. package/dist/node_modules/lodash-es/_initCloneArray.js +7 -0
  657. package/dist/node_modules/lodash-es/_initCloneByTag.js +32 -0
  658. package/dist/node_modules/lodash-es/_initCloneObject.js +8 -0
  659. package/dist/node_modules/lodash-es/_isFlattenable.js +9 -0
  660. package/dist/node_modules/lodash-es/_isIndex.js +7 -0
  661. package/dist/node_modules/lodash-es/_isIterateeCall.js +11 -0
  662. package/dist/node_modules/lodash-es/_isKey.js +10 -0
  663. package/dist/node_modules/lodash-es/_isKeyable.js +6 -0
  664. package/dist/node_modules/lodash-es/_isMasked.js +10 -0
  665. package/dist/node_modules/lodash-es/_isPrototype.js +7 -0
  666. package/dist/node_modules/lodash-es/_isStrictComparable.js +6 -0
  667. package/dist/node_modules/lodash-es/_listCacheClear.js +5 -0
  668. package/dist/node_modules/lodash-es/_listCacheDelete.js +8 -0
  669. package/dist/node_modules/lodash-es/_listCacheGet.js +7 -0
  670. package/dist/node_modules/lodash-es/_listCacheHas.js +6 -0
  671. package/dist/node_modules/lodash-es/_listCacheSet.js +7 -0
  672. package/dist/node_modules/lodash-es/_mapCacheClear.js +12 -0
  673. package/dist/node_modules/lodash-es/_mapCacheDelete.js +7 -0
  674. package/dist/node_modules/lodash-es/_mapCacheGet.js +6 -0
  675. package/dist/node_modules/lodash-es/_mapCacheHas.js +6 -0
  676. package/dist/node_modules/lodash-es/_mapCacheSet.js +7 -0
  677. package/dist/node_modules/lodash-es/_mapToArray.js +8 -0
  678. package/dist/node_modules/lodash-es/_matchesStrictComparable.js +7 -0
  679. package/dist/node_modules/lodash-es/_memoizeCapped.js +10 -0
  680. package/dist/node_modules/lodash-es/_nativeCreate.js +3 -0
  681. package/dist/node_modules/lodash-es/_nativeKeys.js +3 -0
  682. package/dist/node_modules/lodash-es/_nativeKeysIn.js +7 -0
  683. package/dist/node_modules/lodash-es/_nodeUtil.js +7 -0
  684. package/dist/node_modules/lodash-es/_objectToString.js +6 -0
  685. package/dist/node_modules/lodash-es/_overArg.js +7 -0
  686. package/dist/node_modules/lodash-es/_overRest.js +12 -0
  687. package/dist/node_modules/lodash-es/_root.js +3 -0
  688. package/dist/node_modules/lodash-es/_safeGet.js +5 -0
  689. package/dist/node_modules/lodash-es/_setCacheAdd.js +6 -0
  690. package/dist/node_modules/lodash-es/_setCacheHas.js +5 -0
  691. package/dist/node_modules/lodash-es/_setToArray.js +8 -0
  692. package/dist/node_modules/lodash-es/_setToString.js +4 -0
  693. package/dist/node_modules/lodash-es/_shortOut.js +13 -0
  694. package/dist/node_modules/lodash-es/_stackClear.js +6 -0
  695. package/dist/node_modules/lodash-es/_stackDelete.js +6 -0
  696. package/dist/node_modules/lodash-es/_stackGet.js +5 -0
  697. package/dist/node_modules/lodash-es/_stackHas.js +5 -0
  698. package/dist/node_modules/lodash-es/_stackSet.js +15 -0
  699. package/dist/node_modules/lodash-es/_strictIndexOf.js +6 -0
  700. package/dist/node_modules/lodash-es/_stringSize.js +8 -0
  701. package/dist/node_modules/lodash-es/_stringToPath.js +8 -0
  702. package/dist/node_modules/lodash-es/_toKey.js +9 -0
  703. package/dist/node_modules/lodash-es/_toSource.js +14 -0
  704. package/dist/node_modules/lodash-es/_trimmedEndIndex.js +7 -0
  705. package/dist/node_modules/lodash-es/_unicodeSize.js +17 -0
  706. package/dist/node_modules/lodash-es/assign.js +14 -0
  707. package/dist/node_modules/lodash-es/clone.js +7 -0
  708. package/dist/node_modules/lodash-es/cloneDeep.js +7 -0
  709. package/dist/node_modules/lodash-es/compact.js +9 -0
  710. package/dist/node_modules/lodash-es/constant.js +7 -0
  711. package/dist/node_modules/lodash-es/defaults.js +14 -0
  712. package/dist/node_modules/lodash-es/difference.js +8 -0
  713. package/dist/node_modules/lodash-es/drop.js +8 -0
  714. package/dist/node_modules/lodash-es/dropRight.js +8 -0
  715. package/dist/node_modules/lodash-es/eq.js +5 -0
  716. package/dist/node_modules/lodash-es/every.js +11 -0
  717. package/dist/node_modules/lodash-es/filter.js +9 -0
  718. package/dist/node_modules/lodash-es/find.js +4 -0
  719. package/dist/node_modules/lodash-es/findIndex.js +12 -0
  720. package/dist/node_modules/lodash-es/flatMap.js +7 -0
  721. package/dist/node_modules/lodash-es/flatten.js +6 -0
  722. package/dist/node_modules/lodash-es/forEach.js +9 -0
  723. package/dist/node_modules/lodash-es/forIn.js +8 -0
  724. package/dist/node_modules/lodash-es/forOwn.js +7 -0
  725. package/dist/node_modules/lodash-es/get.js +7 -0
  726. package/dist/node_modules/lodash-es/groupBy.js +6 -0
  727. package/dist/node_modules/lodash-es/has.js +7 -0
  728. package/dist/node_modules/lodash-es/hasIn.js +7 -0
  729. package/dist/node_modules/lodash-es/head.js +5 -0
  730. package/dist/node_modules/lodash-es/identity.js +5 -0
  731. package/dist/node_modules/lodash-es/includes.js +13 -0
  732. package/dist/node_modules/lodash-es/indexOf.js +11 -0
  733. package/dist/node_modules/lodash-es/isArguments.js +8 -0
  734. package/dist/node_modules/lodash-es/isArray.js +2 -0
  735. package/dist/node_modules/lodash-es/isArrayLike.js +7 -0
  736. package/dist/node_modules/lodash-es/isArrayLikeObject.js +7 -0
  737. package/dist/node_modules/lodash-es/isBuffer.js +4 -0
  738. package/dist/node_modules/lodash-es/isEmpty.js +20 -0
  739. package/dist/node_modules/lodash-es/isFunction.js +10 -0
  740. package/dist/node_modules/lodash-es/isLength.js +6 -0
  741. package/dist/node_modules/lodash-es/isMap.js +5 -0
  742. package/dist/node_modules/lodash-es/isObject.js +6 -0
  743. package/dist/node_modules/lodash-es/isObjectLike.js +5 -0
  744. package/dist/node_modules/lodash-es/isPlainObject.js +13 -0
  745. package/dist/node_modules/lodash-es/isRegExp.js +5 -0
  746. package/dist/node_modules/lodash-es/isSet.js +5 -0
  747. package/dist/node_modules/lodash-es/isString.js +9 -0
  748. package/dist/node_modules/lodash-es/isSymbol.js +8 -0
  749. package/dist/node_modules/lodash-es/isTypedArray.js +5 -0
  750. package/dist/node_modules/lodash-es/isUndefined.js +5 -0
  751. package/dist/node_modules/lodash-es/keys.js +8 -0
  752. package/dist/node_modules/lodash-es/keysIn.js +8 -0
  753. package/dist/node_modules/lodash-es/last.js +6 -0
  754. package/dist/node_modules/lodash-es/map.js +9 -0
  755. package/dist/node_modules/lodash-es/mapValues.js +11 -0
  756. package/dist/node_modules/lodash-es/max.js +8 -0
  757. package/dist/node_modules/lodash-es/memoize.js +15 -0
  758. package/dist/node_modules/lodash-es/merge.js +6 -0
  759. package/dist/node_modules/lodash-es/min.js +8 -0
  760. package/dist/node_modules/lodash-es/minBy.js +8 -0
  761. package/dist/node_modules/lodash-es/negate.js +16 -0
  762. package/dist/node_modules/lodash-es/noop.js +3 -0
  763. package/dist/node_modules/lodash-es/now.js +5 -0
  764. package/dist/node_modules/lodash-es/pick.js +6 -0
  765. package/dist/node_modules/lodash-es/pickBy.js +15 -0
  766. package/dist/node_modules/lodash-es/property.js +9 -0
  767. package/dist/node_modules/lodash-es/range.js +3 -0
  768. package/dist/node_modules/lodash-es/reduce.js +11 -0
  769. package/dist/node_modules/lodash-es/reject.js +10 -0
  770. package/dist/node_modules/lodash-es/size.js +14 -0
  771. package/dist/node_modules/lodash-es/some.js +11 -0
  772. package/dist/node_modules/lodash-es/sortBy.js +10 -0
  773. package/dist/node_modules/lodash-es/stubArray.js +5 -0
  774. package/dist/node_modules/lodash-es/stubFalse.js +5 -0
  775. package/dist/node_modules/lodash-es/toFinite.js +7 -0
  776. package/dist/node_modules/lodash-es/toInteger.js +7 -0
  777. package/dist/node_modules/lodash-es/toNumber.js +18 -0
  778. package/dist/node_modules/lodash-es/toPlainObject.js +7 -0
  779. package/dist/node_modules/lodash-es/toString.js +6 -0
  780. package/dist/node_modules/lodash-es/union.js +8 -0
  781. package/dist/node_modules/lodash-es/uniq.js +6 -0
  782. package/dist/node_modules/lodash-es/uniqBy.js +7 -0
  783. package/dist/node_modules/lodash-es/uniqueId.js +8 -0
  784. package/dist/node_modules/lodash-es/values.js +7 -0
  785. package/dist/node_modules/lodash-es/zipObject.js +7 -0
  786. package/dist/node_modules/longest-streak/index.js +7 -0
  787. package/dist/node_modules/markdown-table/index.js +57 -0
  788. package/dist/node_modules/marked/lib/marked.esm.js +1384 -0
  789. package/dist/node_modules/mdast-util-find-and-replace/lib/index.js +59 -0
  790. package/dist/node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp/index.js +5 -0
  791. package/dist/node_modules/mdast-util-gfm/lib/index.js +24 -0
  792. package/dist/node_modules/mdast-util-gfm-autolink-literal/lib/index.js +127 -0
  793. package/dist/node_modules/mdast-util-gfm-footnote/lib/index.js +95 -0
  794. package/dist/node_modules/mdast-util-gfm-strikethrough/lib/index.js +47 -0
  795. package/dist/node_modules/mdast-util-gfm-table/lib/index.js +135 -0
  796. package/dist/node_modules/mdast-util-gfm-task-list-item/lib/index.js +56 -0
  797. package/dist/node_modules/mdast-util-math/lib/index.js +142 -0
  798. package/dist/node_modules/mdast-util-phrasing/lib/index.js +20 -0
  799. package/dist/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js +10 -0
  800. package/dist/node_modules/mdast-util-to-markdown/lib/handle/break.js +7 -0
  801. package/dist/node_modules/mdast-util-to-markdown/lib/handle/code.js +34 -0
  802. package/dist/node_modules/mdast-util-to-markdown/lib/handle/definition.js +22 -0
  803. package/dist/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js +23 -0
  804. package/dist/node_modules/mdast-util-to-markdown/lib/handle/heading.js +22 -0
  805. package/dist/node_modules/mdast-util-to-markdown/lib/handle/html.js +8 -0
  806. package/dist/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js +21 -0
  807. package/dist/node_modules/mdast-util-to-markdown/lib/handle/image.js +26 -0
  808. package/dist/node_modules/mdast-util-to-markdown/lib/handle/index.js +42 -0
  809. package/dist/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js +17 -0
  810. package/dist/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js +21 -0
  811. package/dist/node_modules/mdast-util-to-markdown/lib/handle/link.js +39 -0
  812. package/dist/node_modules/mdast-util-to-markdown/lib/handle/list-item.js +16 -0
  813. package/dist/node_modules/mdast-util-to-markdown/lib/handle/list.js +24 -0
  814. package/dist/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js +5 -0
  815. package/dist/node_modules/mdast-util-to-markdown/lib/handle/root.js +7 -0
  816. package/dist/node_modules/mdast-util-to-markdown/lib/handle/strong.js +23 -0
  817. package/dist/node_modules/mdast-util-to-markdown/lib/handle/text.js +4 -0
  818. package/dist/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js +7 -0
  819. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js +6 -0
  820. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js +9 -0
  821. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js +6 -0
  822. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js +6 -0
  823. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-fence.js +6 -0
  824. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js +6 -0
  825. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-quote.js +6 -0
  826. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js +6 -0
  827. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule.js +6 -0
  828. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-strong.js +6 -0
  829. package/dist/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js +4 -0
  830. package/dist/node_modules/mdast-util-to-markdown/lib/util/encode-info.js +36 -0
  831. package/dist/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js +4 -0
  832. package/dist/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js +10 -0
  833. package/dist/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js +6 -0
  834. package/dist/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js +10 -0
  835. package/dist/node_modules/mdast-util-to-string/lib/index.js +22 -0
  836. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-VXUJARFQ.js +673 -0
  837. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-VD42YOAC.js +3010 -0
  838. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-YG6GDRKO.js +2955 -0
  839. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-4BX2VUAB.js +6 -0
  840. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-55IACEB6.js +8 -0
  841. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ABZYJK2D.js +1547 -0
  842. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-AGHRB4JF.js +29 -0
  843. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ATLVNIR6.js +65 -0
  844. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-B4BG7PRW.js +3110 -0
  845. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-CVBHYZKI.js +10 -0
  846. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-DI55MBZ5.js +1994 -0
  847. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-DR5Q36YT.js +135 -0
  848. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-EXTU4WIE.js +9 -0
  849. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-FMBD7UC4.js +3 -0
  850. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-HN2XXSSU.js +74 -0
  851. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-JA3XYJ7Z.js +247 -0
  852. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-JZLCHNYA.js +3516 -0
  853. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-MI3HLSF2.js +1140 -0
  854. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-N4CR4FBY.js +39 -0
  855. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QN33PNHL.js +23 -0
  856. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QXUST7PY.js +497 -0
  857. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QZHKN3VN.js +11 -0
  858. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-S3R3BYOJ.js +338 -0
  859. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-TZMSLE5B.js +55 -0
  860. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-2ON5EDUG.js +26 -0
  861. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-WZHVMYZB.js +26 -0
  862. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/cose-bilkent-S5V4N54A.js +219 -0
  863. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/dagre-6UL2VRFP.js +263 -0
  864. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-PSM6KHXK.js +283 -0
  865. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-QEK2KX5R.js +211 -0
  866. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-S2PKOQOG.js +129 -0
  867. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-Q2GNP2WA.js +1599 -0
  868. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-NV44I4VS.js +4128 -0
  869. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-JELNMOA3.js +1688 -0
  870. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-V2S2FVAM.js +621 -0
  871. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/infoDiagram-HS3SLOUP.js +18 -0
  872. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/journeyDiagram-XKPGCS4Q.js +883 -0
  873. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/kanban-definition-3W4ZIXB7.js +970 -0
  874. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/mindmap-definition-VGOIOE7T.js +931 -0
  875. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-ADFJNKIX.js +117 -0
  876. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/quadrantDiagram-AYHSOK5B.js +1970 -0
  877. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/requirementDiagram-UZGBJVZJ.js +2187 -0
  878. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-TZEHDZUN.js +519 -0
  879. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-WL72ISMW.js +3560 -0
  880. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-FKZM4ZOC.js +220 -0
  881. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-v2-4FDKWEC3.js +25 -0
  882. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-IT6M3QCI.js +833 -0
  883. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/xychartDiagram-PRI3JC2R.js +1975 -0
  884. package/dist/node_modules/mermaid/dist/mermaid.core.js +662 -0
  885. package/dist/node_modules/micromark-core-commonmark/lib/blank-line.js +16 -0
  886. package/dist/node_modules/micromark-extension-gfm/index.js +16 -0
  887. package/dist/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js +172 -0
  888. package/dist/node_modules/micromark-extension-gfm-footnote/lib/syntax.js +191 -0
  889. package/dist/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js +94 -0
  890. package/dist/node_modules/micromark-extension-gfm-table/lib/edit-map.js +41 -0
  891. package/dist/node_modules/micromark-extension-gfm-table/lib/infer.js +18 -0
  892. package/dist/node_modules/micromark-extension-gfm-table/lib/syntax.js +199 -0
  893. package/dist/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js +32 -0
  894. package/dist/node_modules/micromark-extension-math/lib/math-flow.js +72 -0
  895. package/dist/node_modules/micromark-extension-math/lib/math-text.js +44 -0
  896. package/dist/node_modules/micromark-extension-math/lib/syntax.js +9 -0
  897. package/dist/node_modules/micromark-factory-space/index.js +12 -0
  898. package/dist/node_modules/micromark-util-character/index.js +21 -0
  899. package/dist/node_modules/micromark-util-chunked/index.js +6 -0
  900. package/dist/node_modules/micromark-util-classify-character/index.js +6 -0
  901. package/dist/node_modules/micromark-util-combine-extensions/index.js +24 -0
  902. package/dist/node_modules/micromark-util-normalize-identifier/index.js +4 -0
  903. package/dist/node_modules/micromark-util-resolve-all/index.js +9 -0
  904. package/dist/node_modules/property-information/index.js +23 -0
  905. package/dist/node_modules/property-information/lib/aria.js +59 -0
  906. package/dist/node_modules/property-information/lib/find.js +29 -0
  907. package/dist/node_modules/property-information/lib/html.js +314 -0
  908. package/dist/node_modules/property-information/lib/normalize.js +4 -0
  909. package/dist/node_modules/property-information/lib/svg.js +560 -0
  910. package/dist/node_modules/property-information/lib/util/case-insensitive-transform.js +5 -0
  911. package/dist/node_modules/property-information/lib/util/case-sensitive-transform.js +4 -0
  912. package/dist/node_modules/property-information/lib/util/create.js +12 -0
  913. package/dist/node_modules/property-information/lib/util/defined-info.js +16 -0
  914. package/dist/node_modules/property-information/lib/util/info.js +7 -0
  915. package/dist/node_modules/property-information/lib/util/merge.js +7 -0
  916. package/dist/node_modules/property-information/lib/util/schema.js +7 -0
  917. package/dist/node_modules/property-information/lib/util/types.js +15 -0
  918. package/dist/node_modules/property-information/lib/xlink.js +17 -0
  919. package/dist/node_modules/property-information/lib/xml.js +13 -0
  920. package/dist/node_modules/property-information/lib/xmlns.js +12 -0
  921. package/dist/node_modules/rehype-katex/lib/index.js +60 -0
  922. package/dist/node_modules/remark-gfm/lib/index.js +8 -0
  923. package/dist/node_modules/remark-math/lib/index.js +8 -0
  924. package/dist/node_modules/roughjs/bundled/rough.esm.js +1350 -0
  925. package/dist/node_modules/space-separated-tokens/index.js +5 -0
  926. package/dist/node_modules/stylis/src/Enum.js +2 -0
  927. package/dist/node_modules/stylis/src/Parser.js +93 -0
  928. package/dist/node_modules/stylis/src/Serializer.js +19 -0
  929. package/dist/node_modules/stylis/src/Tokenizer.js +104 -0
  930. package/dist/node_modules/stylis/src/Utility.js +26 -0
  931. package/dist/node_modules/ts-dedent/esm/index.js +25 -0
  932. package/dist/node_modules/unist-util-find-after/lib/index.js +10 -0
  933. package/dist/node_modules/unist-util-is/lib/index.js +45 -0
  934. package/dist/node_modules/unist-util-visit/lib/index.js +10 -0
  935. package/dist/node_modules/unist-util-visit-parents/lib/color.js +4 -0
  936. package/dist/node_modules/unist-util-visit-parents/lib/index.js +35 -0
  937. package/dist/node_modules/uuid/dist/esm-browser/native.js +2 -0
  938. package/dist/node_modules/uuid/dist/esm-browser/rng.js +9 -0
  939. package/dist/node_modules/uuid/dist/esm-browser/stringify.js +6 -0
  940. package/dist/node_modules/uuid/dist/esm-browser/v4.js +17 -0
  941. package/dist/node_modules/vscode-jsonrpc/browser.js +7 -0
  942. package/dist/node_modules/vscode-jsonrpc/lib/browser/main.js +52 -0
  943. package/dist/node_modules/vscode-jsonrpc/lib/browser/ril.js +120 -0
  944. package/dist/node_modules/vscode-jsonrpc/lib/common/api.js +337 -0
  945. package/dist/node_modules/vscode-jsonrpc/lib/common/cancellation.js +57 -0
  946. package/dist/node_modules/vscode-jsonrpc/lib/common/connection.js +647 -0
  947. package/dist/node_modules/vscode-jsonrpc/lib/common/disposable.js +13 -0
  948. package/dist/node_modules/vscode-jsonrpc/lib/common/events.js +64 -0
  949. package/dist/node_modules/vscode-jsonrpc/lib/common/is.js +34 -0
  950. package/dist/node_modules/vscode-jsonrpc/lib/common/linkedMap.js +235 -0
  951. package/dist/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js +93 -0
  952. package/dist/node_modules/vscode-jsonrpc/lib/common/messageReader.js +129 -0
  953. package/dist/node_modules/vscode-jsonrpc/lib/common/messageWriter.js +85 -0
  954. package/dist/node_modules/vscode-jsonrpc/lib/common/messages.js +161 -0
  955. package/dist/node_modules/vscode-jsonrpc/lib/common/ral.js +18 -0
  956. package/dist/node_modules/vscode-jsonrpc/lib/common/semaphore.js +44 -0
  957. package/dist/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +58 -0
  958. package/dist/node_modules/vscode-languageserver-protocol/lib/browser/main.js +28 -0
  959. package/dist/node_modules/vscode-languageserver-protocol/lib/common/api.js +36 -0
  960. package/dist/node_modules/vscode-languageserver-protocol/lib/common/connection.js +12 -0
  961. package/dist/node_modules/vscode-languageserver-protocol/lib/common/messages.js +31 -0
  962. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js +19 -0
  963. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js +15 -0
  964. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js +11 -0
  965. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js +11 -0
  966. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js +33 -0
  967. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js +35 -0
  968. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js +15 -0
  969. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js +11 -0
  970. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js +19 -0
  971. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js +11 -0
  972. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js +15 -0
  973. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.js +674 -0
  974. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js +11 -0
  975. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js +19 -0
  976. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js +126 -0
  977. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js +24 -0
  978. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js +11 -0
  979. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js +31 -0
  980. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js +11 -0
  981. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js +11 -0
  982. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js +19 -0
  983. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js +15 -0
  984. package/dist/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js +42 -0
  985. package/dist/node_modules/vscode-languageserver-textdocument/lib/esm/main.js +138 -0
  986. package/dist/node_modules/vscode-languageserver-types/lib/esm/main.js +1084 -0
  987. package/dist/node_modules/vscode-uri/lib/esm/index.js +373 -0
  988. package/dist/node_modules/web-namespaces/index.js +9 -0
  989. package/dist/pages/WorkspacePage.js +63 -0
  990. package/dist/pages/WorkspacesPage.js +36 -0
  991. package/package.json +32 -32
@@ -0,0 +1,3516 @@
1
+ import { __name, log } from "./chunk-AGHRB4JF.js";
2
+ import { common_default, defaultConfig_default, evaluate, getConfig, getConfig2, hasKatex, parseGenericTypes, renderKatexSanitized, sanitizeText, sanitizeText3 } from "./chunk-ABZYJK2D.js";
3
+ import select_default from "../../../../d3-selection/src/select.js";
4
+ import "../../../../d3/src/index.js";
5
+ import { getSubGraphTitleMargins } from "./chunk-CVBHYZKI.js";
6
+ import { compileStyles, solidStateFill, styles2String, userNodeOverrides } from "./chunk-ATLVNIR6.js";
7
+ import { calculateTextWidth, decodeEntities, handleUndefinedAttr, parseFontSize } from "./chunk-S3R3BYOJ.js";
8
+ import { createText, getIconSVG } from "./chunk-JA3XYJ7Z.js";
9
+ import { at } from "../../../../roughjs/bundled/rough.esm.js";
10
+ var labelHelper = /* @__PURE__ */ __name(async (l, u, p) => {
11
+ let h, g = u.useHtmlLabels || evaluate(getConfig2()?.htmlLabels);
12
+ h = p || "node default";
13
+ let _ = l.insert("g").attr("class", h).attr("id", u.domId || u.id), y = _.insert("g").attr("class", "label").attr("style", handleUndefinedAttr(u.labelStyle)), x;
14
+ x = u.label === void 0 ? "" : typeof u.label == "string" ? u.label : u.label[0];
15
+ let S = await createText(y, sanitizeText(decodeEntities(x), getConfig2()), {
16
+ useHtmlLabels: g,
17
+ width: u.width || getConfig2().flowchart?.wrappingWidth,
18
+ cssClasses: "markdown-node-label",
19
+ style: u.labelStyle,
20
+ addSvgBackground: !!u.icon || !!u.img
21
+ }), C = S.getBBox(), w = (u?.padding ?? 0) / 2;
22
+ if (g) {
23
+ let l = S.children[0], u = select_default(S), f = l.getElementsByTagName("img");
24
+ if (f) {
25
+ let l = x.replace(/<img[^>]*>/g, "").trim() === "";
26
+ await Promise.all([...f].map((u) => new Promise((f) => {
27
+ function p() {
28
+ if (u.style.display = "flex", u.style.flexDirection = "column", l) {
29
+ let [e = defaultConfig_default.fontSize] = parseFontSize(getConfig2().fontSize ? getConfig2().fontSize : window.getComputedStyle(document.body).fontSize), l = e * 5 + "px";
30
+ u.style.minWidth = l, u.style.maxWidth = l;
31
+ } else u.style.width = "100%";
32
+ f(u);
33
+ }
34
+ __name(p, "setupImage"), setTimeout(() => {
35
+ u.complete && p();
36
+ }), u.addEventListener("error", p), u.addEventListener("load", p);
37
+ })));
38
+ }
39
+ C = l.getBoundingClientRect(), u.attr("width", C.width), u.attr("height", C.height);
40
+ }
41
+ return g ? y.attr("transform", "translate(" + -C.width / 2 + ", " + -C.height / 2 + ")") : y.attr("transform", "translate(0, " + -C.height / 2 + ")"), u.centerLabel && y.attr("transform", "translate(" + -C.width / 2 + ", " + -C.height / 2 + ")"), y.insert("rect", ":first-child"), {
42
+ shapeSvg: _,
43
+ bbox: C,
44
+ halfPadding: w,
45
+ label: y
46
+ };
47
+ }, "labelHelper"), insertLabel = /* @__PURE__ */ __name(async (e, l, u) => {
48
+ let d = u.useHtmlLabels || evaluate(getConfig2()?.flowchart?.htmlLabels), p = e.insert("g").attr("class", "label").attr("style", u.labelStyle || ""), h = await createText(p, sanitizeText(decodeEntities(l), getConfig2()), {
49
+ useHtmlLabels: d,
50
+ width: u.width || getConfig2()?.flowchart?.wrappingWidth,
51
+ style: u.labelStyle,
52
+ addSvgBackground: !!u.icon || !!u.img
53
+ }), g = h.getBBox(), _ = u.padding / 2;
54
+ if (evaluate(getConfig2()?.flowchart?.htmlLabels)) {
55
+ let e = h.children[0], l = select_default(h);
56
+ g = e.getBoundingClientRect(), l.attr("width", g.width), l.attr("height", g.height);
57
+ }
58
+ return d ? p.attr("transform", "translate(" + -g.width / 2 + ", " + -g.height / 2 + ")") : p.attr("transform", "translate(0, " + -g.height / 2 + ")"), u.centerLabel && p.attr("transform", "translate(" + -g.width / 2 + ", " + -g.height / 2 + ")"), p.insert("rect", ":first-child"), {
59
+ shapeSvg: e,
60
+ bbox: g,
61
+ halfPadding: _,
62
+ label: p
63
+ };
64
+ }, "insertLabel"), updateNodeBounds = /* @__PURE__ */ __name((e, l) => {
65
+ let u = l.node().getBBox();
66
+ e.width = u.width, e.height = u.height;
67
+ }, "updateNodeBounds"), getNodeClasses = /* @__PURE__ */ __name((e, l) => (e.look === "handDrawn" ? "rough-node" : "node") + " " + e.cssClasses + " " + (l || ""), "getNodeClasses");
68
+ function createPathFromPoints(e) {
69
+ let l = e.map((e, l) => `${l === 0 ? "M" : "L"}${e.x},${e.y}`);
70
+ return l.push("Z"), l.join(" ");
71
+ }
72
+ __name(createPathFromPoints, "createPathFromPoints");
73
+ function generateFullSineWavePoints(e, l, u, d, f, p) {
74
+ let m = [], h = u - e, g = d - l, _ = h / p, v = 2 * Math.PI / _, y = l + g / 2;
75
+ for (let l = 0; l <= 50; l++) {
76
+ let u = e + l / 50 * h, d = y + f * Math.sin(v * (u - e));
77
+ m.push({
78
+ x: u,
79
+ y: d
80
+ });
81
+ }
82
+ return m;
83
+ }
84
+ __name(generateFullSineWavePoints, "generateFullSineWavePoints");
85
+ function generateCirclePoints(e, l, u, d, f, p) {
86
+ let m = [], h = f * Math.PI / 180, g = (p * Math.PI / 180 - h) / (d - 1);
87
+ for (let f = 0; f < d; f++) {
88
+ let d = h + f * g, p = e + u * Math.cos(d), _ = l + u * Math.sin(d);
89
+ m.push({
90
+ x: -p,
91
+ y: -_
92
+ });
93
+ }
94
+ return m;
95
+ }
96
+ __name(generateCirclePoints, "generateCirclePoints");
97
+ var intersect_rect_default = /* @__PURE__ */ __name((e, l) => {
98
+ var u = e.x, d = e.y, f = l.x - u, p = l.y - d, m = e.width / 2, h = e.height / 2, g, _;
99
+ return Math.abs(p) * m > Math.abs(f) * h ? (p < 0 && (h = -h), g = p === 0 ? 0 : h * f / p, _ = h) : (f < 0 && (m = -m), g = m, _ = f === 0 ? 0 : m * p / f), {
100
+ x: u + g,
101
+ y: d + _
102
+ };
103
+ }, "intersectRect");
104
+ function applyStyle(e, l) {
105
+ l && e.attr("style", l);
106
+ }
107
+ __name(applyStyle, "applyStyle");
108
+ async function addHtmlLabel(e) {
109
+ let l = select_default(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")), d = l.append("xhtml:div"), f = getConfig2(), p = e.label;
110
+ e.label && hasKatex(e.label) && (p = await renderKatexSanitized(e.label.replace(common_default.lineBreakRegex, "\n"), f));
111
+ let g = "<span class=\"" + (e.isNode ? "nodeLabel" : "edgeLabel") + "\" " + (e.labelStyle ? "style=\"" + e.labelStyle + "\"" : "") + ">" + p + "</span>";
112
+ return d.html(sanitizeText(g, f)), applyStyle(d, e.labelStyle), d.style("display", "inline-block"), d.style("padding-right", "1px"), d.style("white-space", "nowrap"), d.attr("xmlns", "http://www.w3.org/1999/xhtml"), l.node();
113
+ }
114
+ __name(addHtmlLabel, "addHtmlLabel");
115
+ var createLabel_default = /* @__PURE__ */ __name(async (e, u, d, p) => {
116
+ let h = e || "";
117
+ if (typeof h == "object" && (h = h[0]), evaluate(getConfig2().flowchart.htmlLabels)) return h = h.replace(/\\n|\n/g, "<br />"), log.info("vertexText" + h), await addHtmlLabel({
118
+ isNode: p,
119
+ label: decodeEntities(h).replace(/fa[blrs]?:fa-[\w-]+/g, (e) => `<i class='${e.replace(":", " ")}'></i>`),
120
+ labelStyle: u && u.replace("fill:", "color:")
121
+ });
122
+ {
123
+ let e = document.createElementNS("http://www.w3.org/2000/svg", "text");
124
+ e.setAttribute("style", u.replace("color:", "fill:"));
125
+ let l = [];
126
+ l = typeof h == "string" ? h.split(/\\n|\n|<br\s*\/?>/gi) : Array.isArray(h) ? h : [];
127
+ for (let u of l) {
128
+ let l = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
129
+ l.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), l.setAttribute("dy", "1em"), l.setAttribute("x", "0"), d ? l.setAttribute("class", "title-row") : l.setAttribute("class", "row"), l.textContent = u.trim(), e.appendChild(l);
130
+ }
131
+ return e;
132
+ }
133
+ }, "createLabel"), createRoundedRectPathD = /* @__PURE__ */ __name((e, l, u, d, f) => [
134
+ "M",
135
+ e + f,
136
+ l,
137
+ "H",
138
+ e + u - f,
139
+ "A",
140
+ f,
141
+ f,
142
+ 0,
143
+ 0,
144
+ 1,
145
+ e + u,
146
+ l + f,
147
+ "V",
148
+ l + d - f,
149
+ "A",
150
+ f,
151
+ f,
152
+ 0,
153
+ 0,
154
+ 1,
155
+ e + u - f,
156
+ l + d,
157
+ "H",
158
+ e + f,
159
+ "A",
160
+ f,
161
+ f,
162
+ 0,
163
+ 0,
164
+ 1,
165
+ e,
166
+ l + d - f,
167
+ "V",
168
+ l + f,
169
+ "A",
170
+ f,
171
+ f,
172
+ 0,
173
+ 0,
174
+ 1,
175
+ e + f,
176
+ l,
177
+ "Z"
178
+ ].join(" "), "createRoundedRectPathD"), rect = /* @__PURE__ */ __name(async (e, u) => {
179
+ log.info("Creating subgraph rect for ", u.id, u);
180
+ let d = getConfig2(), { themeVariables: p, handDrawnSeed: h } = d, { clusterBkg: g, clusterBorder: _ } = p, { labelStyles: v, nodeStyles: y, borderStyles: S, backgroundStyles: C } = styles2String(u), E = e.insert("g").attr("class", "cluster " + u.cssClasses).attr("id", u.id).attr("data-look", u.look), D = evaluate(d.flowchart.htmlLabels), O = E.insert("g").attr("class", "cluster-label "), k = await createText(O, u.label, {
181
+ style: u.labelStyle,
182
+ useHtmlLabels: D,
183
+ isNode: !0
184
+ }), j = k.getBBox();
185
+ if (evaluate(d.flowchart.htmlLabels)) {
186
+ let e = k.children[0], l = select_default(k);
187
+ j = e.getBoundingClientRect(), l.attr("width", j.width), l.attr("height", j.height);
188
+ }
189
+ let M = u.width <= j.width + u.padding ? j.width + u.padding : u.width;
190
+ u.width <= j.width + u.padding ? u.diff = (M - u.width) / 2 - u.padding : u.diff = -u.padding;
191
+ let N = u.height, P = u.x - M / 2, F = u.y - N / 2;
192
+ log.trace("Data ", u, JSON.stringify(u));
193
+ let I;
194
+ if (u.look === "handDrawn") {
195
+ let e = at.svg(E), d = userNodeOverrides(u, {
196
+ roughness: .7,
197
+ fill: g,
198
+ stroke: _,
199
+ fillWeight: 3,
200
+ seed: h
201
+ }), f = e.path(createRoundedRectPathD(P, F, M, N, 0), d);
202
+ I = E.insert(() => (log.debug("Rough node insert CXC", f), f), ":first-child"), I.select("path:nth-child(2)").attr("style", S.join(";")), I.select("path").attr("style", C.join(";").replace("fill", "stroke"));
203
+ } else I = E.insert("rect", ":first-child"), I.attr("style", y).attr("rx", u.rx).attr("ry", u.ry).attr("x", P).attr("y", F).attr("width", M).attr("height", N);
204
+ let { subGraphTitleTopMargin: L } = getSubGraphTitleMargins(d);
205
+ if (O.attr("transform", `translate(${u.x - j.width / 2}, ${u.y - u.height / 2 + L})`), v) {
206
+ let e = O.select("span");
207
+ e && e.attr("style", v);
208
+ }
209
+ let R = I.node().getBBox();
210
+ return u.offsetX = 0, u.width = R.width, u.height = R.height, u.offsetY = j.height - u.padding / 2, u.intersect = function(e) {
211
+ return intersect_rect_default(u, e);
212
+ }, {
213
+ cluster: E,
214
+ labelBBox: j
215
+ };
216
+ }, "rect"), shapes = {
217
+ rect,
218
+ squareRect: rect,
219
+ roundedWithTitle: /* @__PURE__ */ __name(async (e, l) => {
220
+ let u = getConfig2(), { themeVariables: d, handDrawnSeed: p } = u, { altBackground: h, compositeBackground: g, compositeTitleBackground: _, nodeBorder: v } = d, y = e.insert("g").attr("class", l.cssClasses).attr("id", l.id).attr("data-id", l.id).attr("data-look", l.look), x = y.insert("g", ":first-child"), S = y.insert("g").attr("class", "cluster-label"), C = y.append("rect"), w = S.node().appendChild(await createLabel_default(l.label, l.labelStyle, void 0, !0)), T = w.getBBox();
221
+ if (evaluate(u.flowchart.htmlLabels)) {
222
+ let e = w.children[0], l = select_default(w);
223
+ T = e.getBoundingClientRect(), l.attr("width", T.width), l.attr("height", T.height);
224
+ }
225
+ let E = 0 * l.padding, D = E / 2, O = (l.width <= T.width + l.padding ? T.width + l.padding : l.width) + E;
226
+ l.width <= T.width + l.padding ? l.diff = (O - l.width) / 2 - l.padding : l.diff = -l.padding;
227
+ let k = l.height + E, A = l.height + E - T.height - 6, j = l.x - O / 2, M = l.y - k / 2;
228
+ l.width = O;
229
+ let N = l.y - l.height / 2 - D + T.height + 2, P;
230
+ if (l.look === "handDrawn") {
231
+ let e = l.cssClasses.includes("statediagram-cluster-alt"), u = at.svg(y), d = l.rx || l.ry ? u.path(createRoundedRectPathD(j, M, O, k, 10), {
232
+ roughness: .7,
233
+ fill: _,
234
+ fillStyle: "solid",
235
+ stroke: v,
236
+ seed: p
237
+ }) : u.rectangle(j, M, O, k, { seed: p });
238
+ P = y.insert(() => d, ":first-child");
239
+ let f = u.rectangle(j, N, O, A, {
240
+ fill: e ? h : g,
241
+ fillStyle: e ? "hachure" : "solid",
242
+ stroke: v,
243
+ seed: p
244
+ });
245
+ P = y.insert(() => d, ":first-child"), C = y.insert(() => f);
246
+ } else P = x.insert("rect", ":first-child"), P.attr("class", "outer").attr("x", j).attr("y", M).attr("width", O).attr("height", k).attr("data-look", l.look), C.attr("class", "inner").attr("x", j).attr("y", N).attr("width", O).attr("height", A);
247
+ return S.attr("transform", `translate(${l.x - T.width / 2}, ${M + 1 - (evaluate(u.flowchart.htmlLabels) ? 0 : 3)})`), l.height = P.node().getBBox().height, l.offsetX = 0, l.offsetY = T.height - l.padding / 2, l.labelBBox = T, l.intersect = function(e) {
248
+ return intersect_rect_default(l, e);
249
+ }, {
250
+ cluster: y,
251
+ labelBBox: T
252
+ };
253
+ }, "roundedWithTitle"),
254
+ noteGroup: /* @__PURE__ */ __name((e, l) => {
255
+ let u = e.insert("g").attr("class", "note-cluster").attr("id", l.id), d = u.insert("rect", ":first-child"), f = 0 * l.padding, p = f / 2;
256
+ d.attr("rx", l.rx).attr("ry", l.ry).attr("x", l.x - l.width / 2 - p).attr("y", l.y - l.height / 2 - p).attr("width", l.width + f).attr("height", l.height + f).attr("fill", "none");
257
+ let m = d.node().getBBox();
258
+ return l.width = m.width, l.height = m.height, l.intersect = function(e) {
259
+ return intersect_rect_default(l, e);
260
+ }, {
261
+ cluster: u,
262
+ labelBBox: {
263
+ width: 0,
264
+ height: 0
265
+ }
266
+ };
267
+ }, "noteGroup"),
268
+ divider: /* @__PURE__ */ __name((e, l) => {
269
+ let { themeVariables: u, handDrawnSeed: d } = getConfig2(), { nodeBorder: f } = u, p = e.insert("g").attr("class", l.cssClasses).attr("id", l.id).attr("data-look", l.look), h = p.insert("g", ":first-child"), g = 0 * l.padding, _ = l.width + g;
270
+ l.diff = -l.padding;
271
+ let v = l.height + g, y = l.x - _ / 2, b = l.y - v / 2;
272
+ l.width = _;
273
+ let x;
274
+ if (l.look === "handDrawn") {
275
+ let e = at.svg(p).rectangle(y, b, _, v, {
276
+ fill: "lightgrey",
277
+ roughness: .5,
278
+ strokeLineDash: [5],
279
+ stroke: f,
280
+ seed: d
281
+ });
282
+ x = p.insert(() => e, ":first-child");
283
+ } else x = h.insert("rect", ":first-child"), x.attr("class", "divider").attr("x", y).attr("y", b).attr("width", _).attr("height", v).attr("data-look", l.look);
284
+ return l.height = x.node().getBBox().height, l.offsetX = 0, l.offsetY = 0, l.intersect = function(e) {
285
+ return intersect_rect_default(l, e);
286
+ }, {
287
+ cluster: p,
288
+ labelBBox: {}
289
+ };
290
+ }, "divider"),
291
+ kanbanSection: /* @__PURE__ */ __name(async (e, u) => {
292
+ log.info("Creating subgraph rect for ", u.id, u);
293
+ let d = getConfig2(), { themeVariables: p, handDrawnSeed: h } = d, { clusterBkg: g, clusterBorder: _ } = p, { labelStyles: v, nodeStyles: y, borderStyles: S, backgroundStyles: C } = styles2String(u), E = e.insert("g").attr("class", "cluster " + u.cssClasses).attr("id", u.id).attr("data-look", u.look), D = evaluate(d.flowchart.htmlLabels), O = E.insert("g").attr("class", "cluster-label "), k = await createText(O, u.label, {
294
+ style: u.labelStyle,
295
+ useHtmlLabels: D,
296
+ isNode: !0,
297
+ width: u.width
298
+ }), j = k.getBBox();
299
+ if (evaluate(d.flowchart.htmlLabels)) {
300
+ let e = k.children[0], l = select_default(k);
301
+ j = e.getBoundingClientRect(), l.attr("width", j.width), l.attr("height", j.height);
302
+ }
303
+ let M = u.width <= j.width + u.padding ? j.width + u.padding : u.width;
304
+ u.width <= j.width + u.padding ? u.diff = (M - u.width) / 2 - u.padding : u.diff = -u.padding;
305
+ let N = u.height, P = u.x - M / 2, F = u.y - N / 2;
306
+ log.trace("Data ", u, JSON.stringify(u));
307
+ let I;
308
+ if (u.look === "handDrawn") {
309
+ let e = at.svg(E), d = userNodeOverrides(u, {
310
+ roughness: .7,
311
+ fill: g,
312
+ stroke: _,
313
+ fillWeight: 4,
314
+ seed: h
315
+ }), f = e.path(createRoundedRectPathD(P, F, M, N, u.rx), d);
316
+ I = E.insert(() => (log.debug("Rough node insert CXC", f), f), ":first-child"), I.select("path:nth-child(2)").attr("style", S.join(";")), I.select("path").attr("style", C.join(";").replace("fill", "stroke"));
317
+ } else I = E.insert("rect", ":first-child"), I.attr("style", y).attr("rx", u.rx).attr("ry", u.ry).attr("x", P).attr("y", F).attr("width", M).attr("height", N);
318
+ let { subGraphTitleTopMargin: L } = getSubGraphTitleMargins(d);
319
+ if (O.attr("transform", `translate(${u.x - j.width / 2}, ${u.y - u.height / 2 + L})`), v) {
320
+ let e = O.select("span");
321
+ e && e.attr("style", v);
322
+ }
323
+ let R = I.node().getBBox();
324
+ return u.offsetX = 0, u.width = R.width, u.height = R.height, u.offsetY = j.height - u.padding / 2, u.intersect = function(e) {
325
+ return intersect_rect_default(u, e);
326
+ }, {
327
+ cluster: E,
328
+ labelBBox: j
329
+ };
330
+ }, "kanbanSection")
331
+ }, clusterElems = /* @__PURE__ */ new Map(), insertCluster = /* @__PURE__ */ __name(async (e, l) => {
332
+ let u = await shapes[l.shape || "rect"](e, l);
333
+ return clusterElems.set(l.id, u), u;
334
+ }, "insertCluster"), clear = /* @__PURE__ */ __name(() => {
335
+ clusterElems = /* @__PURE__ */ new Map();
336
+ }, "clear");
337
+ function intersectNode(e, l) {
338
+ return e.intersect(l);
339
+ }
340
+ __name(intersectNode, "intersectNode");
341
+ var intersect_node_default = intersectNode;
342
+ function intersectEllipse(e, l, u, d) {
343
+ var f = e.x, p = e.y, m = f - d.x, h = p - d.y, g = Math.sqrt(l * l * h * h + u * u * m * m), _ = Math.abs(l * u * m / g);
344
+ d.x < f && (_ = -_);
345
+ var v = Math.abs(l * u * h / g);
346
+ return d.y < p && (v = -v), {
347
+ x: f + _,
348
+ y: p + v
349
+ };
350
+ }
351
+ __name(intersectEllipse, "intersectEllipse");
352
+ var intersect_ellipse_default = intersectEllipse;
353
+ function intersectCircle(e, l, u) {
354
+ return intersect_ellipse_default(e, l, l, u);
355
+ }
356
+ __name(intersectCircle, "intersectCircle");
357
+ var intersect_circle_default = intersectCircle;
358
+ function intersectLine(e, l, u, d) {
359
+ {
360
+ let f = l.y - e.y, p = e.x - l.x, m = l.x * e.y - e.x * l.y, h = f * u.x + p * u.y + m, g = f * d.x + p * d.y + m, _ = 1e-6;
361
+ if (h !== 0 && g !== 0 && sameSign(h, g)) return;
362
+ let v = d.y - u.y, y = u.x - d.x, b = d.x * u.y - u.x * d.y, x = v * e.x + y * e.y + b, S = v * l.x + y * l.y + b;
363
+ if (Math.abs(x) < _ && Math.abs(S) < _ && sameSign(x, S)) return;
364
+ let C = f * y - v * p;
365
+ if (C === 0) return;
366
+ let w = Math.abs(C / 2), T = p * b - y * m, E = T < 0 ? (T - w) / C : (T + w) / C;
367
+ return T = v * m - f * b, {
368
+ x: E,
369
+ y: T < 0 ? (T - w) / C : (T + w) / C
370
+ };
371
+ }
372
+ }
373
+ __name(intersectLine, "intersectLine");
374
+ function sameSign(e, l) {
375
+ return e * l > 0;
376
+ }
377
+ __name(sameSign, "sameSign");
378
+ var intersect_line_default = intersectLine;
379
+ function intersectPolygon(e, l, u) {
380
+ let d = e.x, f = e.y, p = [], m = Infinity, h = Infinity;
381
+ typeof l.forEach == "function" ? l.forEach(function(e) {
382
+ m = Math.min(m, e.x), h = Math.min(h, e.y);
383
+ }) : (m = Math.min(m, l.x), h = Math.min(h, l.y));
384
+ let g = d - e.width / 2 - m, _ = f - e.height / 2 - h;
385
+ for (let d = 0; d < l.length; d++) {
386
+ let f = l[d], m = l[d < l.length - 1 ? d + 1 : 0], h = intersect_line_default(e, u, {
387
+ x: g + f.x,
388
+ y: _ + f.y
389
+ }, {
390
+ x: g + m.x,
391
+ y: _ + m.y
392
+ });
393
+ h && p.push(h);
394
+ }
395
+ return p.length ? (p.length > 1 && p.sort(function(e, l) {
396
+ let d = e.x - u.x, f = e.y - u.y, p = Math.sqrt(d * d + f * f), m = l.x - u.x, h = l.y - u.y, g = Math.sqrt(m * m + h * h);
397
+ return p < g ? -1 : p === g ? 0 : 1;
398
+ }), p[0]) : e;
399
+ }
400
+ __name(intersectPolygon, "intersectPolygon");
401
+ var intersect_default = {
402
+ node: intersect_node_default,
403
+ circle: intersect_circle_default,
404
+ ellipse: intersect_ellipse_default,
405
+ polygon: intersectPolygon,
406
+ rect: intersect_rect_default
407
+ };
408
+ function anchor(e, u) {
409
+ let { labelStyles: d } = styles2String(u);
410
+ u.labelStyle = d;
411
+ let f = getNodeClasses(u), p = f;
412
+ f || (p = "anchor");
413
+ let m = e.insert("g").attr("class", p).attr("id", u.domId || u.id), { cssStyles: h } = u, g = at.svg(m), _ = userNodeOverrides(u, {
414
+ fill: "black",
415
+ stroke: "none",
416
+ fillStyle: "solid"
417
+ });
418
+ u.look !== "handDrawn" && (_.roughness = 0);
419
+ let v = g.circle(0, 0, 2, _), y = m.insert(() => v, ":first-child");
420
+ return y.attr("class", "anchor").attr("style", handleUndefinedAttr(h)), updateNodeBounds(u, y), u.intersect = function(e) {
421
+ return log.info("Circle intersect", u, 1, e), intersect_default.circle(u, 1, e);
422
+ }, m;
423
+ }
424
+ __name(anchor, "anchor");
425
+ function generateArcPoints(e, l, u, d, f, p, m) {
426
+ let h = (e + u) / 2, g = (l + d) / 2, _ = Math.atan2(d - l, u - e), v = (u - e) / 2, y = (d - l) / 2, b = v / f, x = y / p, S = Math.sqrt(b ** 2 + x ** 2);
427
+ if (S > 1) throw Error("The given radii are too small to create an arc between the points.");
428
+ let C = Math.sqrt(1 - S ** 2), w = h + C * p * Math.sin(_) * (m ? -1 : 1), T = g - C * f * Math.cos(_) * (m ? -1 : 1), E = Math.atan2((l - T) / p, (e - w) / f), D = Math.atan2((d - T) / p, (u - w) / f) - E;
429
+ m && D < 0 && (D += 2 * Math.PI), !m && D > 0 && (D -= 2 * Math.PI);
430
+ let O = [];
431
+ for (let e = 0; e < 20; e++) {
432
+ let l = E + e / 19 * D, u = w + f * Math.cos(l), d = T + p * Math.sin(l);
433
+ O.push({
434
+ x: u,
435
+ y: d
436
+ });
437
+ }
438
+ return O;
439
+ }
440
+ __name(generateArcPoints, "generateArcPoints");
441
+ async function bowTieRect(e, l) {
442
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
443
+ l.labelStyle = u;
444
+ let { shapeSvg: f, bbox: p } = await labelHelper(e, l, getNodeClasses(l)), m = p.width + l.padding + 20, h = p.height + l.padding, g = h / 2, _ = g / (2.5 + h / 50), { cssStyles: v } = l, y = [
445
+ {
446
+ x: m / 2,
447
+ y: -h / 2
448
+ },
449
+ {
450
+ x: -m / 2,
451
+ y: -h / 2
452
+ },
453
+ ...generateArcPoints(-m / 2, -h / 2, -m / 2, h / 2, _, g, !1),
454
+ {
455
+ x: m / 2,
456
+ y: h / 2
457
+ },
458
+ ...generateArcPoints(m / 2, h / 2, m / 2, -h / 2, _, g, !0)
459
+ ], b = at.svg(f), x = userNodeOverrides(l, {});
460
+ l.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
461
+ let S = createPathFromPoints(y), C = b.path(S, x), E = f.insert(() => C, ":first-child");
462
+ return E.attr("class", "basic label-container"), v && l.look !== "handDrawn" && E.selectAll("path").attr("style", v), d && l.look !== "handDrawn" && E.selectAll("path").attr("style", d), E.attr("transform", `translate(${_ / 2}, 0)`), updateNodeBounds(l, E), l.intersect = function(e) {
463
+ return intersect_default.polygon(l, y, e);
464
+ }, f;
465
+ }
466
+ __name(bowTieRect, "bowTieRect");
467
+ function insertPolygonShape(e, l, u, d) {
468
+ return e.insert("polygon", ":first-child").attr("points", d.map(function(e) {
469
+ return e.x + "," + e.y;
470
+ }).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -l / 2 + "," + u / 2 + ")");
471
+ }
472
+ __name(insertPolygonShape, "insertPolygonShape");
473
+ async function card(e, l) {
474
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
475
+ l.labelStyle = u;
476
+ let { shapeSvg: f, bbox: p } = await labelHelper(e, l, getNodeClasses(l)), m = p.height + l.padding, h = p.width + l.padding + 12, g = h, _ = -m, v = [
477
+ {
478
+ x: 12,
479
+ y: _
480
+ },
481
+ {
482
+ x: g,
483
+ y: _
484
+ },
485
+ {
486
+ x: g,
487
+ y: 0
488
+ },
489
+ {
490
+ x: 0,
491
+ y: 0
492
+ },
493
+ {
494
+ x: 0,
495
+ y: _ + 12
496
+ },
497
+ {
498
+ x: 12,
499
+ y: _
500
+ }
501
+ ], y, { cssStyles: b } = l;
502
+ if (l.look === "handDrawn") {
503
+ let e = at.svg(f), u = userNodeOverrides(l, {}), d = createPathFromPoints(v), p = e.path(d, u);
504
+ y = f.insert(() => p, ":first-child").attr("transform", `translate(${-h / 2}, ${m / 2})`), b && y.attr("style", b);
505
+ } else y = insertPolygonShape(f, h, m, v);
506
+ return d && y.attr("style", d), updateNodeBounds(l, y), l.intersect = function(e) {
507
+ return intersect_default.polygon(l, v, e);
508
+ }, f;
509
+ }
510
+ __name(card, "card");
511
+ function choice(e, l) {
512
+ let { nodeStyles: u } = styles2String(l);
513
+ l.label = "";
514
+ let d = e.insert("g").attr("class", getNodeClasses(l)).attr("id", l.domId ?? l.id), { cssStyles: f } = l, p = Math.max(28, l.width ?? 0), m = [
515
+ {
516
+ x: 0,
517
+ y: p / 2
518
+ },
519
+ {
520
+ x: p / 2,
521
+ y: 0
522
+ },
523
+ {
524
+ x: 0,
525
+ y: -p / 2
526
+ },
527
+ {
528
+ x: -p / 2,
529
+ y: 0
530
+ }
531
+ ], h = at.svg(d), g = userNodeOverrides(l, {});
532
+ l.look !== "handDrawn" && (g.roughness = 0, g.fillStyle = "solid");
533
+ let _ = createPathFromPoints(m), v = h.path(_, g), y = d.insert(() => v, ":first-child");
534
+ return f && l.look !== "handDrawn" && y.selectAll("path").attr("style", f), u && l.look !== "handDrawn" && y.selectAll("path").attr("style", u), l.width = 28, l.height = 28, l.intersect = function(e) {
535
+ return intersect_default.polygon(l, m, e);
536
+ }, d;
537
+ }
538
+ __name(choice, "choice");
539
+ async function circle(e, u, d) {
540
+ let { labelStyles: f, nodeStyles: p } = styles2String(u);
541
+ u.labelStyle = f;
542
+ let { shapeSvg: m, bbox: h, halfPadding: g } = await labelHelper(e, u, getNodeClasses(u)), _ = d?.padding ?? g, v = h.width / 2 + _, y, { cssStyles: b } = u;
543
+ if (u.look === "handDrawn") {
544
+ let e = at.svg(m), l = userNodeOverrides(u, {}), d = e.circle(0, 0, v * 2, l);
545
+ y = m.insert(() => d, ":first-child"), y.attr("class", "basic label-container").attr("style", handleUndefinedAttr(b));
546
+ } else y = m.insert("circle", ":first-child").attr("class", "basic label-container").attr("style", p).attr("r", v).attr("cx", 0).attr("cy", 0);
547
+ return updateNodeBounds(u, y), u.calcIntersect = function(e, l) {
548
+ let u = e.width / 2;
549
+ return intersect_default.circle(e, u, l);
550
+ }, u.intersect = function(e) {
551
+ return log.info("Circle intersect", u, v, e), intersect_default.circle(u, v, e);
552
+ }, m;
553
+ }
554
+ __name(circle, "circle");
555
+ function createLine(e) {
556
+ let l = Math.cos(Math.PI / 4), u = Math.sin(Math.PI / 4), d = e * 2, f = {
557
+ x: d / 2 * l,
558
+ y: d / 2 * u
559
+ }, p = {
560
+ x: -(d / 2) * l,
561
+ y: d / 2 * u
562
+ }, m = {
563
+ x: -(d / 2) * l,
564
+ y: -(d / 2) * u
565
+ }, h = {
566
+ x: d / 2 * l,
567
+ y: -(d / 2) * u
568
+ };
569
+ return `M ${p.x},${p.y} L ${h.x},${h.y}
570
+ M ${f.x},${f.y} L ${m.x},${m.y}`;
571
+ }
572
+ __name(createLine, "createLine");
573
+ function crossedCircle(e, u) {
574
+ let { labelStyles: d, nodeStyles: f } = styles2String(u);
575
+ u.labelStyle = d, u.label = "";
576
+ let p = e.insert("g").attr("class", getNodeClasses(u)).attr("id", u.domId ?? u.id), m = Math.max(30, u?.width ?? 0), { cssStyles: h } = u, g = at.svg(p), _ = userNodeOverrides(u, {});
577
+ u.look !== "handDrawn" && (_.roughness = 0, _.fillStyle = "solid");
578
+ let v = g.circle(0, 0, m * 2, _), y = createLine(m), b = g.path(y, _), x = p.insert(() => v, ":first-child");
579
+ return x.insert(() => b), h && u.look !== "handDrawn" && x.selectAll("path").attr("style", h), f && u.look !== "handDrawn" && x.selectAll("path").attr("style", f), updateNodeBounds(u, x), u.intersect = function(e) {
580
+ return log.info("crossedCircle intersect", u, {
581
+ radius: m,
582
+ point: e
583
+ }), intersect_default.circle(u, m, e);
584
+ }, p;
585
+ }
586
+ __name(crossedCircle, "crossedCircle");
587
+ function generateCirclePoints2(e, l, u, d = 100, f = 0, p = 180) {
588
+ let m = [], h = f * Math.PI / 180, g = (p * Math.PI / 180 - h) / (d - 1);
589
+ for (let f = 0; f < d; f++) {
590
+ let d = h + f * g, p = e + u * Math.cos(d), _ = l + u * Math.sin(d);
591
+ m.push({
592
+ x: -p,
593
+ y: -_
594
+ });
595
+ }
596
+ return m;
597
+ }
598
+ __name(generateCirclePoints2, "generateCirclePoints");
599
+ async function curlyBraceLeft(e, l) {
600
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
601
+ l.labelStyle = u;
602
+ let { shapeSvg: f, bbox: p, label: m } = await labelHelper(e, l, getNodeClasses(l)), h = p.width + (l.padding ?? 0), g = p.height + (l.padding ?? 0), _ = Math.max(5, g * .1), { cssStyles: v } = l, y = [
603
+ ...generateCirclePoints2(h / 2, -g / 2, _, 30, -90, 0),
604
+ {
605
+ x: -h / 2 - _,
606
+ y: _
607
+ },
608
+ ...generateCirclePoints2(h / 2 + _ * 2, -_, _, 20, -180, -270),
609
+ ...generateCirclePoints2(h / 2 + _ * 2, _, _, 20, -90, -180),
610
+ {
611
+ x: -h / 2 - _,
612
+ y: -g / 2
613
+ },
614
+ ...generateCirclePoints2(h / 2, g / 2, _, 20, 0, 90)
615
+ ], b = [
616
+ {
617
+ x: h / 2,
618
+ y: -g / 2 - _
619
+ },
620
+ {
621
+ x: -h / 2,
622
+ y: -g / 2 - _
623
+ },
624
+ ...generateCirclePoints2(h / 2, -g / 2, _, 20, -90, 0),
625
+ {
626
+ x: -h / 2 - _,
627
+ y: -_
628
+ },
629
+ ...generateCirclePoints2(h / 2 + h * .1, -_, _, 20, -180, -270),
630
+ ...generateCirclePoints2(h / 2 + h * .1, _, _, 20, -90, -180),
631
+ {
632
+ x: -h / 2 - _,
633
+ y: g / 2
634
+ },
635
+ ...generateCirclePoints2(h / 2, g / 2, _, 20, 0, 90),
636
+ {
637
+ x: -h / 2,
638
+ y: g / 2 + _
639
+ },
640
+ {
641
+ x: h / 2,
642
+ y: g / 2 + _
643
+ }
644
+ ], x = at.svg(f), S = userNodeOverrides(l, { fill: "none" });
645
+ l.look !== "handDrawn" && (S.roughness = 0, S.fillStyle = "solid");
646
+ let C = createPathFromPoints(y).replace("Z", ""), E = x.path(C, S), D = createPathFromPoints(b), O = x.path(D, { ...S }), k = f.insert("g", ":first-child");
647
+ return k.insert(() => O, ":first-child").attr("stroke-opacity", 0), k.insert(() => E, ":first-child"), k.attr("class", "text"), v && l.look !== "handDrawn" && k.selectAll("path").attr("style", v), d && l.look !== "handDrawn" && k.selectAll("path").attr("style", d), k.attr("transform", `translate(${_}, 0)`), m.attr("transform", `translate(${-h / 2 + _ - (p.x - (p.left ?? 0))},${-g / 2 + (l.padding ?? 0) / 2 - (p.y - (p.top ?? 0))})`), updateNodeBounds(l, k), l.intersect = function(e) {
648
+ return intersect_default.polygon(l, b, e);
649
+ }, f;
650
+ }
651
+ __name(curlyBraceLeft, "curlyBraceLeft");
652
+ function generateCirclePoints3(e, l, u, d = 100, f = 0, p = 180) {
653
+ let m = [], h = f * Math.PI / 180, g = (p * Math.PI / 180 - h) / (d - 1);
654
+ for (let f = 0; f < d; f++) {
655
+ let d = h + f * g, p = e + u * Math.cos(d), _ = l + u * Math.sin(d);
656
+ m.push({
657
+ x: p,
658
+ y: _
659
+ });
660
+ }
661
+ return m;
662
+ }
663
+ __name(generateCirclePoints3, "generateCirclePoints");
664
+ async function curlyBraceRight(e, l) {
665
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
666
+ l.labelStyle = u;
667
+ let { shapeSvg: f, bbox: p, label: m } = await labelHelper(e, l, getNodeClasses(l)), h = p.width + (l.padding ?? 0), g = p.height + (l.padding ?? 0), _ = Math.max(5, g * .1), { cssStyles: v } = l, y = [
668
+ ...generateCirclePoints3(h / 2, -g / 2, _, 20, -90, 0),
669
+ {
670
+ x: h / 2 + _,
671
+ y: -_
672
+ },
673
+ ...generateCirclePoints3(h / 2 + _ * 2, -_, _, 20, -180, -270),
674
+ ...generateCirclePoints3(h / 2 + _ * 2, _, _, 20, -90, -180),
675
+ {
676
+ x: h / 2 + _,
677
+ y: g / 2
678
+ },
679
+ ...generateCirclePoints3(h / 2, g / 2, _, 20, 0, 90)
680
+ ], b = [
681
+ {
682
+ x: -h / 2,
683
+ y: -g / 2 - _
684
+ },
685
+ {
686
+ x: h / 2,
687
+ y: -g / 2 - _
688
+ },
689
+ ...generateCirclePoints3(h / 2, -g / 2, _, 20, -90, 0),
690
+ {
691
+ x: h / 2 + _,
692
+ y: -_
693
+ },
694
+ ...generateCirclePoints3(h / 2 + _ * 2, -_, _, 20, -180, -270),
695
+ ...generateCirclePoints3(h / 2 + _ * 2, _, _, 20, -90, -180),
696
+ {
697
+ x: h / 2 + _,
698
+ y: g / 2
699
+ },
700
+ ...generateCirclePoints3(h / 2, g / 2, _, 20, 0, 90),
701
+ {
702
+ x: h / 2,
703
+ y: g / 2 + _
704
+ },
705
+ {
706
+ x: -h / 2,
707
+ y: g / 2 + _
708
+ }
709
+ ], x = at.svg(f), S = userNodeOverrides(l, { fill: "none" });
710
+ l.look !== "handDrawn" && (S.roughness = 0, S.fillStyle = "solid");
711
+ let C = createPathFromPoints(y).replace("Z", ""), E = x.path(C, S), D = createPathFromPoints(b), O = x.path(D, { ...S }), k = f.insert("g", ":first-child");
712
+ return k.insert(() => O, ":first-child").attr("stroke-opacity", 0), k.insert(() => E, ":first-child"), k.attr("class", "text"), v && l.look !== "handDrawn" && k.selectAll("path").attr("style", v), d && l.look !== "handDrawn" && k.selectAll("path").attr("style", d), k.attr("transform", `translate(${-_}, 0)`), m.attr("transform", `translate(${-h / 2 + (l.padding ?? 0) / 2 - (p.x - (p.left ?? 0))},${-g / 2 + (l.padding ?? 0) / 2 - (p.y - (p.top ?? 0))})`), updateNodeBounds(l, k), l.intersect = function(e) {
713
+ return intersect_default.polygon(l, b, e);
714
+ }, f;
715
+ }
716
+ __name(curlyBraceRight, "curlyBraceRight");
717
+ function generateCirclePoints4(e, l, u, d = 100, f = 0, p = 180) {
718
+ let m = [], h = f * Math.PI / 180, g = (p * Math.PI / 180 - h) / (d - 1);
719
+ for (let f = 0; f < d; f++) {
720
+ let d = h + f * g, p = e + u * Math.cos(d), _ = l + u * Math.sin(d);
721
+ m.push({
722
+ x: -p,
723
+ y: -_
724
+ });
725
+ }
726
+ return m;
727
+ }
728
+ __name(generateCirclePoints4, "generateCirclePoints");
729
+ async function curlyBraces(e, l) {
730
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
731
+ l.labelStyle = u;
732
+ let { shapeSvg: f, bbox: p, label: m } = await labelHelper(e, l, getNodeClasses(l)), h = p.width + (l.padding ?? 0), g = p.height + (l.padding ?? 0), _ = Math.max(5, g * .1), { cssStyles: v } = l, y = [
733
+ ...generateCirclePoints4(h / 2, -g / 2, _, 30, -90, 0),
734
+ {
735
+ x: -h / 2 - _,
736
+ y: _
737
+ },
738
+ ...generateCirclePoints4(h / 2 + _ * 2, -_, _, 20, -180, -270),
739
+ ...generateCirclePoints4(h / 2 + _ * 2, _, _, 20, -90, -180),
740
+ {
741
+ x: -h / 2 - _,
742
+ y: -g / 2
743
+ },
744
+ ...generateCirclePoints4(h / 2, g / 2, _, 20, 0, 90)
745
+ ], b = [
746
+ ...generateCirclePoints4(-h / 2 + _ + _ / 2, -g / 2, _, 20, -90, -180),
747
+ {
748
+ x: h / 2 - _ / 2,
749
+ y: _
750
+ },
751
+ ...generateCirclePoints4(-h / 2 - _ / 2, -_, _, 20, 0, 90),
752
+ ...generateCirclePoints4(-h / 2 - _ / 2, _, _, 20, -90, 0),
753
+ {
754
+ x: h / 2 - _ / 2,
755
+ y: -_
756
+ },
757
+ ...generateCirclePoints4(-h / 2 + _ + _ / 2, g / 2, _, 30, -180, -270)
758
+ ], x = [
759
+ {
760
+ x: h / 2,
761
+ y: -g / 2 - _
762
+ },
763
+ {
764
+ x: -h / 2,
765
+ y: -g / 2 - _
766
+ },
767
+ ...generateCirclePoints4(h / 2, -g / 2, _, 20, -90, 0),
768
+ {
769
+ x: -h / 2 - _,
770
+ y: -_
771
+ },
772
+ ...generateCirclePoints4(h / 2 + _ * 2, -_, _, 20, -180, -270),
773
+ ...generateCirclePoints4(h / 2 + _ * 2, _, _, 20, -90, -180),
774
+ {
775
+ x: -h / 2 - _,
776
+ y: g / 2
777
+ },
778
+ ...generateCirclePoints4(h / 2, g / 2, _, 20, 0, 90),
779
+ {
780
+ x: -h / 2,
781
+ y: g / 2 + _
782
+ },
783
+ {
784
+ x: h / 2 - _ - _ / 2,
785
+ y: g / 2 + _
786
+ },
787
+ ...generateCirclePoints4(-h / 2 + _ + _ / 2, -g / 2, _, 20, -90, -180),
788
+ {
789
+ x: h / 2 - _ / 2,
790
+ y: _
791
+ },
792
+ ...generateCirclePoints4(-h / 2 - _ / 2, -_, _, 20, 0, 90),
793
+ ...generateCirclePoints4(-h / 2 - _ / 2, _, _, 20, -90, 0),
794
+ {
795
+ x: h / 2 - _ / 2,
796
+ y: -_
797
+ },
798
+ ...generateCirclePoints4(-h / 2 + _ + _ / 2, g / 2, _, 30, -180, -270)
799
+ ], S = at.svg(f), C = userNodeOverrides(l, { fill: "none" });
800
+ l.look !== "handDrawn" && (C.roughness = 0, C.fillStyle = "solid");
801
+ let E = createPathFromPoints(y).replace("Z", ""), D = S.path(E, C), O = createPathFromPoints(b).replace("Z", ""), k = S.path(O, C), A = createPathFromPoints(x), j = S.path(A, { ...C }), N = f.insert("g", ":first-child");
802
+ return N.insert(() => j, ":first-child").attr("stroke-opacity", 0), N.insert(() => D, ":first-child"), N.insert(() => k, ":first-child"), N.attr("class", "text"), v && l.look !== "handDrawn" && N.selectAll("path").attr("style", v), d && l.look !== "handDrawn" && N.selectAll("path").attr("style", d), N.attr("transform", `translate(${_ - _ / 4}, 0)`), m.attr("transform", `translate(${-h / 2 + (l.padding ?? 0) / 2 - (p.x - (p.left ?? 0))},${-g / 2 + (l.padding ?? 0) / 2 - (p.y - (p.top ?? 0))})`), updateNodeBounds(l, N), l.intersect = function(e) {
803
+ return intersect_default.polygon(l, x, e);
804
+ }, f;
805
+ }
806
+ __name(curlyBraces, "curlyBraces");
807
+ async function curvedTrapezoid(e, l) {
808
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
809
+ l.labelStyle = u;
810
+ let { shapeSvg: f, bbox: p } = await labelHelper(e, l, getNodeClasses(l)), m = Math.max(80, (p.width + (l.padding ?? 0) * 2) * 1.25, l?.width ?? 0), h = Math.max(20, p.height + (l.padding ?? 0) * 2, l?.height ?? 0), g = h / 2, { cssStyles: _ } = l, v = at.svg(f), y = userNodeOverrides(l, {});
811
+ l.look !== "handDrawn" && (y.roughness = 0, y.fillStyle = "solid");
812
+ let b = m, x = h, S = b - g, C = x / 4, E = [
813
+ {
814
+ x: S,
815
+ y: 0
816
+ },
817
+ {
818
+ x: C,
819
+ y: 0
820
+ },
821
+ {
822
+ x: 0,
823
+ y: x / 2
824
+ },
825
+ {
826
+ x: C,
827
+ y: x
828
+ },
829
+ {
830
+ x: S,
831
+ y: x
832
+ },
833
+ ...generateCirclePoints(-S, -x / 2, g, 50, 270, 90)
834
+ ], D = createPathFromPoints(E), O = v.path(D, y), k = f.insert(() => O, ":first-child");
835
+ return k.attr("class", "basic label-container"), _ && l.look !== "handDrawn" && k.selectChildren("path").attr("style", _), d && l.look !== "handDrawn" && k.selectChildren("path").attr("style", d), k.attr("transform", `translate(${-m / 2}, ${-h / 2})`), updateNodeBounds(l, k), l.intersect = function(e) {
836
+ return intersect_default.polygon(l, E, e);
837
+ }, f;
838
+ }
839
+ __name(curvedTrapezoid, "curvedTrapezoid");
840
+ var createCylinderPathD = /* @__PURE__ */ __name((e, l, u, d, f, p) => [
841
+ `M${e},${l + p}`,
842
+ `a${f},${p} 0,0,0 ${u},0`,
843
+ `a${f},${p} 0,0,0 ${-u},0`,
844
+ `l0,${d}`,
845
+ `a${f},${p} 0,0,0 ${u},0`,
846
+ `l0,${-d}`
847
+ ].join(" "), "createCylinderPathD"), createOuterCylinderPathD = /* @__PURE__ */ __name((e, l, u, d, f, p) => [
848
+ `M${e},${l + p}`,
849
+ `M${e + u},${l + p}`,
850
+ `a${f},${p} 0,0,0 ${-u},0`,
851
+ `l0,${d}`,
852
+ `a${f},${p} 0,0,0 ${u},0`,
853
+ `l0,${-d}`
854
+ ].join(" "), "createOuterCylinderPathD"), createInnerCylinderPathD = /* @__PURE__ */ __name((e, l, u, d, f, p) => [`M${e - u / 2},${-d / 2}`, `a${f},${p} 0,0,0 ${u},0`].join(" "), "createInnerCylinderPathD");
855
+ async function cylinder(e, l) {
856
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
857
+ l.labelStyle = u;
858
+ let { shapeSvg: f, bbox: p, label: m } = await labelHelper(e, l, getNodeClasses(l)), h = Math.max(p.width + l.padding, l.width ?? 0), g = h / 2, _ = g / (2.5 + h / 50), v = Math.max(p.height + _ + l.padding, l.height ?? 0), y, { cssStyles: b } = l;
859
+ if (l.look === "handDrawn") {
860
+ let e = at.svg(f), u = createOuterCylinderPathD(0, 0, h, v, g, _), d = createInnerCylinderPathD(0, _, h, v, g, _), p = e.path(u, userNodeOverrides(l, {})), m = e.path(d, userNodeOverrides(l, { fill: "none" }));
861
+ y = f.insert(() => m, ":first-child"), y = f.insert(() => p, ":first-child"), y.attr("class", "basic label-container"), b && y.attr("style", b);
862
+ } else {
863
+ let e = createCylinderPathD(0, 0, h, v, g, _);
864
+ y = f.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container").attr("style", handleUndefinedAttr(b)).attr("style", d);
865
+ }
866
+ return y.attr("label-offset-y", _), y.attr("transform", `translate(${-h / 2}, ${-(v / 2 + _)})`), updateNodeBounds(l, y), m.attr("transform", `translate(${-(p.width / 2) - (p.x - (p.left ?? 0))}, ${-(p.height / 2) + (l.padding ?? 0) / 1.5 - (p.y - (p.top ?? 0))})`), l.intersect = function(e) {
867
+ let u = intersect_default.rect(l, e), d = u.x - (l.x ?? 0);
868
+ if (g != 0 && (Math.abs(d) < (l.width ?? 0) / 2 || Math.abs(d) == (l.width ?? 0) / 2 && Math.abs(u.y - (l.y ?? 0)) > (l.height ?? 0) / 2 - _)) {
869
+ let f = _ * _ * (1 - d * d / (g * g));
870
+ f > 0 && (f = Math.sqrt(f)), f = _ - f, e.y - (l.y ?? 0) > 0 && (f = -f), u.y += f;
871
+ }
872
+ return u;
873
+ }, f;
874
+ }
875
+ __name(cylinder, "cylinder");
876
+ async function dividedRectangle(e, l) {
877
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
878
+ l.labelStyle = u;
879
+ let { shapeSvg: f, bbox: p, label: m } = await labelHelper(e, l, getNodeClasses(l)), h = p.width + l.padding, g = p.height + l.padding, _ = g * .2, v = -h / 2, y = -g / 2 - _ / 2, { cssStyles: b } = l, x = at.svg(f), S = userNodeOverrides(l, {});
880
+ l.look !== "handDrawn" && (S.roughness = 0, S.fillStyle = "solid");
881
+ let C = [
882
+ {
883
+ x: v,
884
+ y: y + _
885
+ },
886
+ {
887
+ x: -v,
888
+ y: y + _
889
+ },
890
+ {
891
+ x: -v,
892
+ y: -y
893
+ },
894
+ {
895
+ x: v,
896
+ y: -y
897
+ },
898
+ {
899
+ x: v,
900
+ y
901
+ },
902
+ {
903
+ x: -v,
904
+ y
905
+ },
906
+ {
907
+ x: -v,
908
+ y: y + _
909
+ }
910
+ ], E = x.polygon(C.map((e) => [e.x, e.y]), S), D = f.insert(() => E, ":first-child");
911
+ return D.attr("class", "basic label-container"), b && l.look !== "handDrawn" && D.selectAll("path").attr("style", b), d && l.look !== "handDrawn" && D.selectAll("path").attr("style", d), m.attr("transform", `translate(${v + (l.padding ?? 0) / 2 - (p.x - (p.left ?? 0))}, ${y + _ + (l.padding ?? 0) / 2 - (p.y - (p.top ?? 0))})`), updateNodeBounds(l, D), l.intersect = function(e) {
912
+ return intersect_default.rect(l, e);
913
+ }, f;
914
+ }
915
+ __name(dividedRectangle, "dividedRectangle");
916
+ async function doublecircle(e, u) {
917
+ let { labelStyles: d, nodeStyles: f } = styles2String(u);
918
+ u.labelStyle = d;
919
+ let { shapeSvg: p, bbox: m, halfPadding: h } = await labelHelper(e, u, getNodeClasses(u)), g = m.width / 2 + h + 5, _ = m.width / 2 + h, v, { cssStyles: y } = u;
920
+ if (u.look === "handDrawn") {
921
+ let e = at.svg(p), l = userNodeOverrides(u, {
922
+ roughness: .2,
923
+ strokeWidth: 2.5
924
+ }), d = userNodeOverrides(u, {
925
+ roughness: .2,
926
+ strokeWidth: 1.5
927
+ }), f = e.circle(0, 0, g * 2, l), m = e.circle(0, 0, _ * 2, d);
928
+ v = p.insert("g", ":first-child"), v.attr("class", handleUndefinedAttr(u.cssClasses)).attr("style", handleUndefinedAttr(y)), v.node()?.appendChild(f), v.node()?.appendChild(m);
929
+ } else {
930
+ v = p.insert("g", ":first-child");
931
+ let e = v.insert("circle", ":first-child"), l = v.insert("circle");
932
+ v.attr("class", "basic label-container").attr("style", f), e.attr("class", "outer-circle").attr("style", f).attr("r", g).attr("cx", 0).attr("cy", 0), l.attr("class", "inner-circle").attr("style", f).attr("r", _).attr("cx", 0).attr("cy", 0);
933
+ }
934
+ return updateNodeBounds(u, v), u.intersect = function(e) {
935
+ return log.info("DoubleCircle intersect", u, g, e), intersect_default.circle(u, g, e);
936
+ }, p;
937
+ }
938
+ __name(doublecircle, "doublecircle");
939
+ function filledCircle(e, u, { config: { themeVariables: d } }) {
940
+ let { labelStyles: f, nodeStyles: p } = styles2String(u);
941
+ u.label = "", u.labelStyle = f;
942
+ let m = e.insert("g").attr("class", getNodeClasses(u)).attr("id", u.domId ?? u.id), { cssStyles: h } = u, g = at.svg(m), { nodeBorder: _ } = d, v = userNodeOverrides(u, { fillStyle: "solid" });
943
+ u.look !== "handDrawn" && (v.roughness = 0);
944
+ let y = g.circle(0, 0, 14, v), b = m.insert(() => y, ":first-child");
945
+ return b.selectAll("path").attr("style", `fill: ${_} !important;`), h && h.length > 0 && u.look !== "handDrawn" && b.selectAll("path").attr("style", h), p && u.look !== "handDrawn" && b.selectAll("path").attr("style", p), updateNodeBounds(u, b), u.intersect = function(e) {
946
+ return log.info("filledCircle intersect", u, {
947
+ radius: 7,
948
+ point: e
949
+ }), intersect_default.circle(u, 7, e);
950
+ }, m;
951
+ }
952
+ __name(filledCircle, "filledCircle");
953
+ async function flippedTriangle(e, u) {
954
+ let { labelStyles: d, nodeStyles: f } = styles2String(u);
955
+ u.labelStyle = d;
956
+ let { shapeSvg: p, bbox: m, label: h } = await labelHelper(e, u, getNodeClasses(u)), g = m.width + (u.padding ?? 0), _ = g + m.height, v = g + m.height, y = [
957
+ {
958
+ x: 0,
959
+ y: -_
960
+ },
961
+ {
962
+ x: v,
963
+ y: -_
964
+ },
965
+ {
966
+ x: v / 2,
967
+ y: 0
968
+ }
969
+ ], { cssStyles: b } = u, x = at.svg(p), S = userNodeOverrides(u, {});
970
+ u.look !== "handDrawn" && (S.roughness = 0, S.fillStyle = "solid");
971
+ let C = createPathFromPoints(y), E = x.path(C, S), D = p.insert(() => E, ":first-child").attr("transform", `translate(${-_ / 2}, ${_ / 2})`);
972
+ return b && u.look !== "handDrawn" && D.selectChildren("path").attr("style", b), f && u.look !== "handDrawn" && D.selectChildren("path").attr("style", f), u.width = g, u.height = _, updateNodeBounds(u, D), h.attr("transform", `translate(${-m.width / 2 - (m.x - (m.left ?? 0))}, ${-_ / 2 + (u.padding ?? 0) / 2 + (m.y - (m.top ?? 0))})`), u.intersect = function(e) {
973
+ return log.info("Triangle intersect", u, y, e), intersect_default.polygon(u, y, e);
974
+ }, p;
975
+ }
976
+ __name(flippedTriangle, "flippedTriangle");
977
+ function forkJoin(e, l, { dir: u, config: { state: d, themeVariables: f } }) {
978
+ let { nodeStyles: p } = styles2String(l);
979
+ l.label = "";
980
+ let m = e.insert("g").attr("class", getNodeClasses(l)).attr("id", l.domId ?? l.id), { cssStyles: h } = l, g = Math.max(70, l?.width ?? 0), _ = Math.max(10, l?.height ?? 0);
981
+ u === "LR" && (g = Math.max(10, l?.width ?? 0), _ = Math.max(70, l?.height ?? 0));
982
+ let v = -1 * g / 2, y = -1 * _ / 2, b = at.svg(m), x = userNodeOverrides(l, {
983
+ stroke: f.lineColor,
984
+ fill: f.lineColor
985
+ });
986
+ l.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
987
+ let S = b.rectangle(v, y, g, _, x), C = m.insert(() => S, ":first-child");
988
+ h && l.look !== "handDrawn" && C.selectAll("path").attr("style", h), p && l.look !== "handDrawn" && C.selectAll("path").attr("style", p), updateNodeBounds(l, C);
989
+ let E = d?.padding ?? 0;
990
+ return l.width && l.height && (l.width += E / 2 || 0, l.height += E / 2 || 0), l.intersect = function(e) {
991
+ return intersect_default.rect(l, e);
992
+ }, m;
993
+ }
994
+ __name(forkJoin, "forkJoin");
995
+ async function halfRoundedRectangle(e, u) {
996
+ let { labelStyles: d, nodeStyles: f } = styles2String(u);
997
+ u.labelStyle = d;
998
+ let { shapeSvg: p, bbox: m } = await labelHelper(e, u, getNodeClasses(u)), h = Math.max(80, m.width + (u.padding ?? 0) * 2, u?.width ?? 0), g = Math.max(50, m.height + (u.padding ?? 0) * 2, u?.height ?? 0), _ = g / 2, { cssStyles: v } = u, y = at.svg(p), b = userNodeOverrides(u, {});
999
+ u.look !== "handDrawn" && (b.roughness = 0, b.fillStyle = "solid");
1000
+ let x = [
1001
+ {
1002
+ x: -h / 2,
1003
+ y: -g / 2
1004
+ },
1005
+ {
1006
+ x: h / 2 - _,
1007
+ y: -g / 2
1008
+ },
1009
+ ...generateCirclePoints(-h / 2 + _, 0, _, 50, 90, 270),
1010
+ {
1011
+ x: h / 2 - _,
1012
+ y: g / 2
1013
+ },
1014
+ {
1015
+ x: -h / 2,
1016
+ y: g / 2
1017
+ }
1018
+ ], S = createPathFromPoints(x), C = y.path(S, b), E = p.insert(() => C, ":first-child");
1019
+ return E.attr("class", "basic label-container"), v && u.look !== "handDrawn" && E.selectChildren("path").attr("style", v), f && u.look !== "handDrawn" && E.selectChildren("path").attr("style", f), updateNodeBounds(u, E), u.intersect = function(e) {
1020
+ return log.info("Pill intersect", u, {
1021
+ radius: _,
1022
+ point: e
1023
+ }), intersect_default.polygon(u, x, e);
1024
+ }, p;
1025
+ }
1026
+ __name(halfRoundedRectangle, "halfRoundedRectangle");
1027
+ async function hexagon(e, l) {
1028
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
1029
+ l.labelStyle = u;
1030
+ let { shapeSvg: f, bbox: p } = await labelHelper(e, l, getNodeClasses(l)), m = p.height + (l.padding ?? 0), h = p.width + (l.padding ?? 0) * 2.5, { cssStyles: g } = l, _ = at.svg(f), v = userNodeOverrides(l, {});
1031
+ l.look !== "handDrawn" && (v.roughness = 0, v.fillStyle = "solid");
1032
+ let y = h / 2, b = y / 6;
1033
+ y += b;
1034
+ let x = m / 2, S = x / 2, C = y - S, E = [
1035
+ {
1036
+ x: -C,
1037
+ y: -x
1038
+ },
1039
+ {
1040
+ x: 0,
1041
+ y: -x
1042
+ },
1043
+ {
1044
+ x: C,
1045
+ y: -x
1046
+ },
1047
+ {
1048
+ x: y,
1049
+ y: 0
1050
+ },
1051
+ {
1052
+ x: C,
1053
+ y: x
1054
+ },
1055
+ {
1056
+ x: 0,
1057
+ y: x
1058
+ },
1059
+ {
1060
+ x: -C,
1061
+ y: x
1062
+ },
1063
+ {
1064
+ x: -y,
1065
+ y: 0
1066
+ }
1067
+ ], D = createPathFromPoints(E), O = _.path(D, v), k = f.insert(() => O, ":first-child");
1068
+ return k.attr("class", "basic label-container"), g && l.look !== "handDrawn" && k.selectChildren("path").attr("style", g), d && l.look !== "handDrawn" && k.selectChildren("path").attr("style", d), l.width = h, l.height = m, updateNodeBounds(l, k), l.intersect = function(e) {
1069
+ return intersect_default.polygon(l, E, e);
1070
+ }, f;
1071
+ }
1072
+ __name(hexagon, "hexagon");
1073
+ async function hourglass(e, u) {
1074
+ let { labelStyles: d, nodeStyles: f } = styles2String(u);
1075
+ u.label = "", u.labelStyle = d;
1076
+ let { shapeSvg: p } = await labelHelper(e, u, getNodeClasses(u)), m = Math.max(30, u?.width ?? 0), h = Math.max(30, u?.height ?? 0), { cssStyles: g } = u, _ = at.svg(p), v = userNodeOverrides(u, {});
1077
+ u.look !== "handDrawn" && (v.roughness = 0, v.fillStyle = "solid");
1078
+ let y = [
1079
+ {
1080
+ x: 0,
1081
+ y: 0
1082
+ },
1083
+ {
1084
+ x: m,
1085
+ y: 0
1086
+ },
1087
+ {
1088
+ x: 0,
1089
+ y: h
1090
+ },
1091
+ {
1092
+ x: m,
1093
+ y: h
1094
+ }
1095
+ ], b = createPathFromPoints(y), x = _.path(b, v), S = p.insert(() => x, ":first-child");
1096
+ return S.attr("class", "basic label-container"), g && u.look !== "handDrawn" && S.selectChildren("path").attr("style", g), f && u.look !== "handDrawn" && S.selectChildren("path").attr("style", f), S.attr("transform", `translate(${-m / 2}, ${-h / 2})`), updateNodeBounds(u, S), u.intersect = function(e) {
1097
+ return log.info("Pill intersect", u, { points: y }), intersect_default.polygon(u, y, e);
1098
+ }, p;
1099
+ }
1100
+ __name(hourglass, "hourglass");
1101
+ async function icon(e, u, { config: { themeVariables: d, flowchart: f } }) {
1102
+ let { labelStyles: p } = styles2String(u);
1103
+ u.labelStyle = p;
1104
+ let m = u.assetHeight ?? 48, h = u.assetWidth ?? 48, g = Math.max(m, h), _ = f?.wrappingWidth;
1105
+ u.width = Math.max(g, _ ?? 0);
1106
+ let { shapeSvg: v, bbox: y, label: b } = await labelHelper(e, u, "icon-shape default"), x = u.pos === "t", C = g, E = g, { nodeBorder: D } = d, { stylesMap: O } = compileStyles(u), k = -E / 2, A = -C / 2, N = u.label ? 8 : 0, F = at.svg(v), I = userNodeOverrides(u, {
1107
+ stroke: "none",
1108
+ fill: "none"
1109
+ });
1110
+ u.look !== "handDrawn" && (I.roughness = 0, I.fillStyle = "solid");
1111
+ let L = F.rectangle(k, A, E, C, I), R = Math.max(E, y.width), z = C + y.height + N, B = F.rectangle(-R / 2, -z / 2, R, z, {
1112
+ ...I,
1113
+ fill: "transparent",
1114
+ stroke: "none"
1115
+ }), V = v.insert(() => L, ":first-child"), H = v.insert(() => B);
1116
+ if (u.icon) {
1117
+ let e = v.append("g");
1118
+ e.html(`<g>${await getIconSVG(u.icon, {
1119
+ height: g,
1120
+ width: g,
1121
+ fallbackPrefix: ""
1122
+ })}</g>`);
1123
+ let l = e.node().getBBox(), d = l.width, f = l.height, p = l.x, m = l.y;
1124
+ e.attr("transform", `translate(${-d / 2 - p},${x ? y.height / 2 + N / 2 - f / 2 - m : -y.height / 2 - N / 2 - f / 2 - m})`), e.attr("style", `color: ${O.get("stroke") ?? D};`);
1125
+ }
1126
+ return b.attr("transform", `translate(${-y.width / 2 - (y.x - (y.left ?? 0))},${x ? -z / 2 : z / 2 - y.height})`), V.attr("transform", `translate(0,${x ? y.height / 2 + N / 2 : -y.height / 2 - N / 2})`), updateNodeBounds(u, H), u.intersect = function(e) {
1127
+ if (log.info("iconSquare intersect", u, e), !u.label) return intersect_default.rect(u, e);
1128
+ let d = u.x ?? 0, f = u.y ?? 0, p = u.height ?? 0, m = [];
1129
+ return m = x ? [
1130
+ {
1131
+ x: d - y.width / 2,
1132
+ y: f - p / 2
1133
+ },
1134
+ {
1135
+ x: d + y.width / 2,
1136
+ y: f - p / 2
1137
+ },
1138
+ {
1139
+ x: d + y.width / 2,
1140
+ y: f - p / 2 + y.height + N
1141
+ },
1142
+ {
1143
+ x: d + E / 2,
1144
+ y: f - p / 2 + y.height + N
1145
+ },
1146
+ {
1147
+ x: d + E / 2,
1148
+ y: f + p / 2
1149
+ },
1150
+ {
1151
+ x: d - E / 2,
1152
+ y: f + p / 2
1153
+ },
1154
+ {
1155
+ x: d - E / 2,
1156
+ y: f - p / 2 + y.height + N
1157
+ },
1158
+ {
1159
+ x: d - y.width / 2,
1160
+ y: f - p / 2 + y.height + N
1161
+ }
1162
+ ] : [
1163
+ {
1164
+ x: d - E / 2,
1165
+ y: f - p / 2
1166
+ },
1167
+ {
1168
+ x: d + E / 2,
1169
+ y: f - p / 2
1170
+ },
1171
+ {
1172
+ x: d + E / 2,
1173
+ y: f - p / 2 + C
1174
+ },
1175
+ {
1176
+ x: d + y.width / 2,
1177
+ y: f - p / 2 + C
1178
+ },
1179
+ {
1180
+ x: d + y.width / 2 / 2,
1181
+ y: f + p / 2
1182
+ },
1183
+ {
1184
+ x: d - y.width / 2,
1185
+ y: f + p / 2
1186
+ },
1187
+ {
1188
+ x: d - y.width / 2,
1189
+ y: f - p / 2 + C
1190
+ },
1191
+ {
1192
+ x: d - E / 2,
1193
+ y: f - p / 2 + C
1194
+ }
1195
+ ], intersect_default.polygon(u, m, e);
1196
+ }, v;
1197
+ }
1198
+ __name(icon, "icon");
1199
+ async function iconCircle(e, u, { config: { themeVariables: d, flowchart: f } }) {
1200
+ let { labelStyles: p } = styles2String(u);
1201
+ u.labelStyle = p;
1202
+ let m = u.assetHeight ?? 48, h = u.assetWidth ?? 48, g = Math.max(m, h), _ = f?.wrappingWidth;
1203
+ u.width = Math.max(g, _ ?? 0);
1204
+ let { shapeSvg: v, bbox: y, label: b } = await labelHelper(e, u, "icon-shape default"), x = u.label ? 8 : 0, C = u.pos === "t", { nodeBorder: E, mainBkg: D } = d, { stylesMap: O } = compileStyles(u), k = at.svg(v), A = userNodeOverrides(u, {});
1205
+ u.look !== "handDrawn" && (A.roughness = 0, A.fillStyle = "solid"), A.stroke = O.get("fill") ?? D;
1206
+ let N = v.append("g");
1207
+ u.icon && N.html(`<g>${await getIconSVG(u.icon, {
1208
+ height: g,
1209
+ width: g,
1210
+ fallbackPrefix: ""
1211
+ })}</g>`);
1212
+ let F = N.node().getBBox(), I = F.width, L = F.height, R = F.x, z = F.y, B = Math.max(I, L) * Math.SQRT2 + 40, V = k.circle(0, 0, B, A), H = Math.max(B, y.width), U = B + y.height + x, W = k.rectangle(-H / 2, -U / 2, H, U, {
1213
+ ...A,
1214
+ fill: "transparent",
1215
+ stroke: "none"
1216
+ }), G = v.insert(() => V, ":first-child"), K = v.insert(() => W);
1217
+ return N.attr("transform", `translate(${-I / 2 - R},${C ? y.height / 2 + x / 2 - L / 2 - z : -y.height / 2 - x / 2 - L / 2 - z})`), N.attr("style", `color: ${O.get("stroke") ?? E};`), b.attr("transform", `translate(${-y.width / 2 - (y.x - (y.left ?? 0))},${C ? -U / 2 : U / 2 - y.height})`), G.attr("transform", `translate(0,${C ? y.height / 2 + x / 2 : -y.height / 2 - x / 2})`), updateNodeBounds(u, K), u.intersect = function(e) {
1218
+ return log.info("iconSquare intersect", u, e), intersect_default.rect(u, e);
1219
+ }, v;
1220
+ }
1221
+ __name(iconCircle, "iconCircle");
1222
+ async function iconRounded(e, u, { config: { themeVariables: d, flowchart: f } }) {
1223
+ let { labelStyles: p } = styles2String(u);
1224
+ u.labelStyle = p;
1225
+ let m = u.assetHeight ?? 48, h = u.assetWidth ?? 48, g = Math.max(m, h), _ = f?.wrappingWidth;
1226
+ u.width = Math.max(g, _ ?? 0);
1227
+ let { shapeSvg: v, bbox: y, halfPadding: b, label: x } = await labelHelper(e, u, "icon-shape default"), C = u.pos === "t", E = g + b * 2, D = g + b * 2, { nodeBorder: O, mainBkg: k } = d, { stylesMap: A } = compileStyles(u), N = -D / 2, F = -E / 2, I = u.label ? 8 : 0, L = at.svg(v), R = userNodeOverrides(u, {});
1228
+ u.look !== "handDrawn" && (R.roughness = 0, R.fillStyle = "solid"), R.stroke = A.get("fill") ?? k;
1229
+ let z = L.path(createRoundedRectPathD(N, F, D, E, 5), R), B = Math.max(D, y.width), V = E + y.height + I, H = L.rectangle(-B / 2, -V / 2, B, V, {
1230
+ ...R,
1231
+ fill: "transparent",
1232
+ stroke: "none"
1233
+ }), W = v.insert(() => z, ":first-child").attr("class", "icon-shape2"), G = v.insert(() => H);
1234
+ if (u.icon) {
1235
+ let e = v.append("g");
1236
+ e.html(`<g>${await getIconSVG(u.icon, {
1237
+ height: g,
1238
+ width: g,
1239
+ fallbackPrefix: ""
1240
+ })}</g>`);
1241
+ let l = e.node().getBBox(), d = l.width, f = l.height, p = l.x, m = l.y;
1242
+ e.attr("transform", `translate(${-d / 2 - p},${C ? y.height / 2 + I / 2 - f / 2 - m : -y.height / 2 - I / 2 - f / 2 - m})`), e.attr("style", `color: ${A.get("stroke") ?? O};`);
1243
+ }
1244
+ return x.attr("transform", `translate(${-y.width / 2 - (y.x - (y.left ?? 0))},${C ? -V / 2 : V / 2 - y.height})`), W.attr("transform", `translate(0,${C ? y.height / 2 + I / 2 : -y.height / 2 - I / 2})`), updateNodeBounds(u, G), u.intersect = function(e) {
1245
+ if (log.info("iconSquare intersect", u, e), !u.label) return intersect_default.rect(u, e);
1246
+ let d = u.x ?? 0, f = u.y ?? 0, p = u.height ?? 0, m = [];
1247
+ return m = C ? [
1248
+ {
1249
+ x: d - y.width / 2,
1250
+ y: f - p / 2
1251
+ },
1252
+ {
1253
+ x: d + y.width / 2,
1254
+ y: f - p / 2
1255
+ },
1256
+ {
1257
+ x: d + y.width / 2,
1258
+ y: f - p / 2 + y.height + I
1259
+ },
1260
+ {
1261
+ x: d + D / 2,
1262
+ y: f - p / 2 + y.height + I
1263
+ },
1264
+ {
1265
+ x: d + D / 2,
1266
+ y: f + p / 2
1267
+ },
1268
+ {
1269
+ x: d - D / 2,
1270
+ y: f + p / 2
1271
+ },
1272
+ {
1273
+ x: d - D / 2,
1274
+ y: f - p / 2 + y.height + I
1275
+ },
1276
+ {
1277
+ x: d - y.width / 2,
1278
+ y: f - p / 2 + y.height + I
1279
+ }
1280
+ ] : [
1281
+ {
1282
+ x: d - D / 2,
1283
+ y: f - p / 2
1284
+ },
1285
+ {
1286
+ x: d + D / 2,
1287
+ y: f - p / 2
1288
+ },
1289
+ {
1290
+ x: d + D / 2,
1291
+ y: f - p / 2 + E
1292
+ },
1293
+ {
1294
+ x: d + y.width / 2,
1295
+ y: f - p / 2 + E
1296
+ },
1297
+ {
1298
+ x: d + y.width / 2 / 2,
1299
+ y: f + p / 2
1300
+ },
1301
+ {
1302
+ x: d - y.width / 2,
1303
+ y: f + p / 2
1304
+ },
1305
+ {
1306
+ x: d - y.width / 2,
1307
+ y: f - p / 2 + E
1308
+ },
1309
+ {
1310
+ x: d - D / 2,
1311
+ y: f - p / 2 + E
1312
+ }
1313
+ ], intersect_default.polygon(u, m, e);
1314
+ }, v;
1315
+ }
1316
+ __name(iconRounded, "iconRounded");
1317
+ async function iconSquare(e, u, { config: { themeVariables: d, flowchart: f } }) {
1318
+ let { labelStyles: p } = styles2String(u);
1319
+ u.labelStyle = p;
1320
+ let m = u.assetHeight ?? 48, h = u.assetWidth ?? 48, g = Math.max(m, h), _ = f?.wrappingWidth;
1321
+ u.width = Math.max(g, _ ?? 0);
1322
+ let { shapeSvg: v, bbox: y, halfPadding: b, label: x } = await labelHelper(e, u, "icon-shape default"), C = u.pos === "t", E = g + b * 2, D = g + b * 2, { nodeBorder: O, mainBkg: k } = d, { stylesMap: A } = compileStyles(u), N = -D / 2, F = -E / 2, I = u.label ? 8 : 0, L = at.svg(v), R = userNodeOverrides(u, {});
1323
+ u.look !== "handDrawn" && (R.roughness = 0, R.fillStyle = "solid"), R.stroke = A.get("fill") ?? k;
1324
+ let z = L.path(createRoundedRectPathD(N, F, D, E, .1), R), B = Math.max(D, y.width), V = E + y.height + I, H = L.rectangle(-B / 2, -V / 2, B, V, {
1325
+ ...R,
1326
+ fill: "transparent",
1327
+ stroke: "none"
1328
+ }), W = v.insert(() => z, ":first-child"), G = v.insert(() => H);
1329
+ if (u.icon) {
1330
+ let e = v.append("g");
1331
+ e.html(`<g>${await getIconSVG(u.icon, {
1332
+ height: g,
1333
+ width: g,
1334
+ fallbackPrefix: ""
1335
+ })}</g>`);
1336
+ let l = e.node().getBBox(), d = l.width, f = l.height, p = l.x, m = l.y;
1337
+ e.attr("transform", `translate(${-d / 2 - p},${C ? y.height / 2 + I / 2 - f / 2 - m : -y.height / 2 - I / 2 - f / 2 - m})`), e.attr("style", `color: ${A.get("stroke") ?? O};`);
1338
+ }
1339
+ return x.attr("transform", `translate(${-y.width / 2 - (y.x - (y.left ?? 0))},${C ? -V / 2 : V / 2 - y.height})`), W.attr("transform", `translate(0,${C ? y.height / 2 + I / 2 : -y.height / 2 - I / 2})`), updateNodeBounds(u, G), u.intersect = function(e) {
1340
+ if (log.info("iconSquare intersect", u, e), !u.label) return intersect_default.rect(u, e);
1341
+ let d = u.x ?? 0, f = u.y ?? 0, p = u.height ?? 0, m = [];
1342
+ return m = C ? [
1343
+ {
1344
+ x: d - y.width / 2,
1345
+ y: f - p / 2
1346
+ },
1347
+ {
1348
+ x: d + y.width / 2,
1349
+ y: f - p / 2
1350
+ },
1351
+ {
1352
+ x: d + y.width / 2,
1353
+ y: f - p / 2 + y.height + I
1354
+ },
1355
+ {
1356
+ x: d + D / 2,
1357
+ y: f - p / 2 + y.height + I
1358
+ },
1359
+ {
1360
+ x: d + D / 2,
1361
+ y: f + p / 2
1362
+ },
1363
+ {
1364
+ x: d - D / 2,
1365
+ y: f + p / 2
1366
+ },
1367
+ {
1368
+ x: d - D / 2,
1369
+ y: f - p / 2 + y.height + I
1370
+ },
1371
+ {
1372
+ x: d - y.width / 2,
1373
+ y: f - p / 2 + y.height + I
1374
+ }
1375
+ ] : [
1376
+ {
1377
+ x: d - D / 2,
1378
+ y: f - p / 2
1379
+ },
1380
+ {
1381
+ x: d + D / 2,
1382
+ y: f - p / 2
1383
+ },
1384
+ {
1385
+ x: d + D / 2,
1386
+ y: f - p / 2 + E
1387
+ },
1388
+ {
1389
+ x: d + y.width / 2,
1390
+ y: f - p / 2 + E
1391
+ },
1392
+ {
1393
+ x: d + y.width / 2 / 2,
1394
+ y: f + p / 2
1395
+ },
1396
+ {
1397
+ x: d - y.width / 2,
1398
+ y: f + p / 2
1399
+ },
1400
+ {
1401
+ x: d - y.width / 2,
1402
+ y: f - p / 2 + E
1403
+ },
1404
+ {
1405
+ x: d - D / 2,
1406
+ y: f - p / 2 + E
1407
+ }
1408
+ ], intersect_default.polygon(u, m, e);
1409
+ }, v;
1410
+ }
1411
+ __name(iconSquare, "iconSquare");
1412
+ async function imageSquare(e, u, { config: { flowchart: d } }) {
1413
+ let f = new Image();
1414
+ f.src = u?.img ?? "", await f.decode();
1415
+ let p = Number(f.naturalWidth.toString().replace("px", "")), m = Number(f.naturalHeight.toString().replace("px", ""));
1416
+ u.imageAspectRatio = p / m;
1417
+ let { labelStyles: h } = styles2String(u);
1418
+ u.labelStyle = h;
1419
+ let g = d?.wrappingWidth;
1420
+ u.defaultWidth = d?.wrappingWidth;
1421
+ let _ = Math.max(u.label ? g ?? 0 : 0, u?.assetWidth ?? p), v = u.constraint === "on" && u?.assetHeight ? u.assetHeight * u.imageAspectRatio : _, y = u.constraint === "on" ? v / u.imageAspectRatio : u?.assetHeight ?? m;
1422
+ u.width = Math.max(v, g ?? 0);
1423
+ let { shapeSvg: b, bbox: x, label: S } = await labelHelper(e, u, "image-shape default"), C = u.pos === "t", E = -v / 2, D = -y / 2, O = u.label ? 8 : 0, k = at.svg(b), A = userNodeOverrides(u, {});
1424
+ u.look !== "handDrawn" && (A.roughness = 0, A.fillStyle = "solid");
1425
+ let j = k.rectangle(E, D, v, y, A), N = Math.max(v, x.width), F = y + x.height + O, I = k.rectangle(-N / 2, -F / 2, N, F, {
1426
+ ...A,
1427
+ fill: "none",
1428
+ stroke: "none"
1429
+ }), L = b.insert(() => j, ":first-child"), R = b.insert(() => I);
1430
+ if (u.img) {
1431
+ let e = b.append("image");
1432
+ e.attr("href", u.img), e.attr("width", v), e.attr("height", y), e.attr("preserveAspectRatio", "none"), e.attr("transform", `translate(${-v / 2},${C ? F / 2 - y : -F / 2})`);
1433
+ }
1434
+ return S.attr("transform", `translate(${-x.width / 2 - (x.x - (x.left ?? 0))},${C ? -y / 2 - x.height / 2 - O / 2 : y / 2 - x.height / 2 + O / 2})`), L.attr("transform", `translate(0,${C ? x.height / 2 + O / 2 : -x.height / 2 - O / 2})`), updateNodeBounds(u, R), u.intersect = function(e) {
1435
+ if (log.info("iconSquare intersect", u, e), !u.label) return intersect_default.rect(u, e);
1436
+ let d = u.x ?? 0, f = u.y ?? 0, p = u.height ?? 0, m = [];
1437
+ return m = C ? [
1438
+ {
1439
+ x: d - x.width / 2,
1440
+ y: f - p / 2
1441
+ },
1442
+ {
1443
+ x: d + x.width / 2,
1444
+ y: f - p / 2
1445
+ },
1446
+ {
1447
+ x: d + x.width / 2,
1448
+ y: f - p / 2 + x.height + O
1449
+ },
1450
+ {
1451
+ x: d + v / 2,
1452
+ y: f - p / 2 + x.height + O
1453
+ },
1454
+ {
1455
+ x: d + v / 2,
1456
+ y: f + p / 2
1457
+ },
1458
+ {
1459
+ x: d - v / 2,
1460
+ y: f + p / 2
1461
+ },
1462
+ {
1463
+ x: d - v / 2,
1464
+ y: f - p / 2 + x.height + O
1465
+ },
1466
+ {
1467
+ x: d - x.width / 2,
1468
+ y: f - p / 2 + x.height + O
1469
+ }
1470
+ ] : [
1471
+ {
1472
+ x: d - v / 2,
1473
+ y: f - p / 2
1474
+ },
1475
+ {
1476
+ x: d + v / 2,
1477
+ y: f - p / 2
1478
+ },
1479
+ {
1480
+ x: d + v / 2,
1481
+ y: f - p / 2 + y
1482
+ },
1483
+ {
1484
+ x: d + x.width / 2,
1485
+ y: f - p / 2 + y
1486
+ },
1487
+ {
1488
+ x: d + x.width / 2 / 2,
1489
+ y: f + p / 2
1490
+ },
1491
+ {
1492
+ x: d - x.width / 2,
1493
+ y: f + p / 2
1494
+ },
1495
+ {
1496
+ x: d - x.width / 2,
1497
+ y: f - p / 2 + y
1498
+ },
1499
+ {
1500
+ x: d - v / 2,
1501
+ y: f - p / 2 + y
1502
+ }
1503
+ ], intersect_default.polygon(u, m, e);
1504
+ }, b;
1505
+ }
1506
+ __name(imageSquare, "imageSquare");
1507
+ async function inv_trapezoid(e, l) {
1508
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
1509
+ l.labelStyle = u;
1510
+ let { shapeSvg: f, bbox: p } = await labelHelper(e, l, getNodeClasses(l)), m = Math.max(p.width + (l.padding ?? 0) * 2, l?.width ?? 0), h = Math.max(p.height + (l.padding ?? 0) * 2, l?.height ?? 0), g = [
1511
+ {
1512
+ x: 0,
1513
+ y: 0
1514
+ },
1515
+ {
1516
+ x: m,
1517
+ y: 0
1518
+ },
1519
+ {
1520
+ x: m + 3 * h / 6,
1521
+ y: -h
1522
+ },
1523
+ {
1524
+ x: -3 * h / 6,
1525
+ y: -h
1526
+ }
1527
+ ], _, { cssStyles: v } = l;
1528
+ if (l.look === "handDrawn") {
1529
+ let e = at.svg(f), u = userNodeOverrides(l, {}), d = createPathFromPoints(g), p = e.path(d, u);
1530
+ _ = f.insert(() => p, ":first-child").attr("transform", `translate(${-m / 2}, ${h / 2})`), v && _.attr("style", v);
1531
+ } else _ = insertPolygonShape(f, m, h, g);
1532
+ return d && _.attr("style", d), l.width = m, l.height = h, updateNodeBounds(l, _), l.intersect = function(e) {
1533
+ return intersect_default.polygon(l, g, e);
1534
+ }, f;
1535
+ }
1536
+ __name(inv_trapezoid, "inv_trapezoid");
1537
+ async function drawRect(e, l, u) {
1538
+ let { labelStyles: d, nodeStyles: f } = styles2String(l);
1539
+ l.labelStyle = d;
1540
+ let { shapeSvg: p, bbox: m } = await labelHelper(e, l, getNodeClasses(l)), h = Math.max(m.width + u.labelPaddingX * 2, l?.width || 0), g = Math.max(m.height + u.labelPaddingY * 2, l?.height || 0), _ = -h / 2, v = -g / 2, y, { rx: b, ry: x } = l, { cssStyles: S } = l;
1541
+ if (u?.rx && u.ry && (b = u.rx, x = u.ry), l.look === "handDrawn") {
1542
+ let e = at.svg(p), u = userNodeOverrides(l, {}), d = b || x ? e.path(createRoundedRectPathD(_, v, h, g, b || 0), u) : e.rectangle(_, v, h, g, u);
1543
+ y = p.insert(() => d, ":first-child"), y.attr("class", "basic label-container").attr("style", handleUndefinedAttr(S));
1544
+ } else y = p.insert("rect", ":first-child"), y.attr("class", "basic label-container").attr("style", f).attr("rx", handleUndefinedAttr(b)).attr("ry", handleUndefinedAttr(x)).attr("x", _).attr("y", v).attr("width", h).attr("height", g);
1545
+ return updateNodeBounds(l, y), l.calcIntersect = function(e, l) {
1546
+ return intersect_default.rect(e, l);
1547
+ }, l.intersect = function(e) {
1548
+ return intersect_default.rect(l, e);
1549
+ }, p;
1550
+ }
1551
+ __name(drawRect, "drawRect");
1552
+ async function labelRect(e, l) {
1553
+ let { shapeSvg: u, bbox: d, label: f } = await labelHelper(e, l, "label"), p = u.insert("rect", ":first-child");
1554
+ return p.attr("width", .1).attr("height", .1), u.attr("class", "label edgeLabel"), f.attr("transform", `translate(${-(d.width / 2) - (d.x - (d.left ?? 0))}, ${-(d.height / 2) - (d.y - (d.top ?? 0))})`), updateNodeBounds(l, p), l.intersect = function(e) {
1555
+ return intersect_default.rect(l, e);
1556
+ }, u;
1557
+ }
1558
+ __name(labelRect, "labelRect");
1559
+ async function lean_left(e, l) {
1560
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
1561
+ l.labelStyle = u;
1562
+ let { shapeSvg: f, bbox: p } = await labelHelper(e, l, getNodeClasses(l)), m = Math.max(p.width + (l.padding ?? 0), l?.width ?? 0), h = Math.max(p.height + (l.padding ?? 0), l?.height ?? 0), g = [
1563
+ {
1564
+ x: 0,
1565
+ y: 0
1566
+ },
1567
+ {
1568
+ x: m + 3 * h / 6,
1569
+ y: 0
1570
+ },
1571
+ {
1572
+ x: m,
1573
+ y: -h
1574
+ },
1575
+ {
1576
+ x: -(3 * h) / 6,
1577
+ y: -h
1578
+ }
1579
+ ], _, { cssStyles: v } = l;
1580
+ if (l.look === "handDrawn") {
1581
+ let e = at.svg(f), u = userNodeOverrides(l, {}), d = createPathFromPoints(g), p = e.path(d, u);
1582
+ _ = f.insert(() => p, ":first-child").attr("transform", `translate(${-m / 2}, ${h / 2})`), v && _.attr("style", v);
1583
+ } else _ = insertPolygonShape(f, m, h, g);
1584
+ return d && _.attr("style", d), l.width = m, l.height = h, updateNodeBounds(l, _), l.intersect = function(e) {
1585
+ return intersect_default.polygon(l, g, e);
1586
+ }, f;
1587
+ }
1588
+ __name(lean_left, "lean_left");
1589
+ async function lean_right(e, l) {
1590
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
1591
+ l.labelStyle = u;
1592
+ let { shapeSvg: f, bbox: p } = await labelHelper(e, l, getNodeClasses(l)), m = Math.max(p.width + (l.padding ?? 0), l?.width ?? 0), h = Math.max(p.height + (l.padding ?? 0), l?.height ?? 0), g = [
1593
+ {
1594
+ x: -3 * h / 6,
1595
+ y: 0
1596
+ },
1597
+ {
1598
+ x: m,
1599
+ y: 0
1600
+ },
1601
+ {
1602
+ x: m + 3 * h / 6,
1603
+ y: -h
1604
+ },
1605
+ {
1606
+ x: 0,
1607
+ y: -h
1608
+ }
1609
+ ], _, { cssStyles: v } = l;
1610
+ if (l.look === "handDrawn") {
1611
+ let e = at.svg(f), u = userNodeOverrides(l, {}), d = createPathFromPoints(g), p = e.path(d, u);
1612
+ _ = f.insert(() => p, ":first-child").attr("transform", `translate(${-m / 2}, ${h / 2})`), v && _.attr("style", v);
1613
+ } else _ = insertPolygonShape(f, m, h, g);
1614
+ return d && _.attr("style", d), l.width = m, l.height = h, updateNodeBounds(l, _), l.intersect = function(e) {
1615
+ return intersect_default.polygon(l, g, e);
1616
+ }, f;
1617
+ }
1618
+ __name(lean_right, "lean_right");
1619
+ function lightningBolt(e, u) {
1620
+ let { labelStyles: d, nodeStyles: f } = styles2String(u);
1621
+ u.label = "", u.labelStyle = d;
1622
+ let p = e.insert("g").attr("class", getNodeClasses(u)).attr("id", u.domId ?? u.id), { cssStyles: m } = u, h = Math.max(35, u?.width ?? 0), g = Math.max(35, u?.height ?? 0), _ = [
1623
+ {
1624
+ x: h,
1625
+ y: 0
1626
+ },
1627
+ {
1628
+ x: 0,
1629
+ y: g + 7 / 2
1630
+ },
1631
+ {
1632
+ x: h - 14,
1633
+ y: g + 7 / 2
1634
+ },
1635
+ {
1636
+ x: 0,
1637
+ y: 2 * g
1638
+ },
1639
+ {
1640
+ x: h,
1641
+ y: g - 7 / 2
1642
+ },
1643
+ {
1644
+ x: 14,
1645
+ y: g - 7 / 2
1646
+ }
1647
+ ], v = at.svg(p), y = userNodeOverrides(u, {});
1648
+ u.look !== "handDrawn" && (y.roughness = 0, y.fillStyle = "solid");
1649
+ let b = createPathFromPoints(_), x = v.path(b, y), S = p.insert(() => x, ":first-child");
1650
+ return m && u.look !== "handDrawn" && S.selectAll("path").attr("style", m), f && u.look !== "handDrawn" && S.selectAll("path").attr("style", f), S.attr("transform", `translate(-${h / 2},${-g})`), updateNodeBounds(u, S), u.intersect = function(e) {
1651
+ return log.info("lightningBolt intersect", u, e), intersect_default.polygon(u, _, e);
1652
+ }, p;
1653
+ }
1654
+ __name(lightningBolt, "lightningBolt");
1655
+ var createCylinderPathD2 = /* @__PURE__ */ __name((e, l, u, d, f, p, m) => [
1656
+ `M${e},${l + p}`,
1657
+ `a${f},${p} 0,0,0 ${u},0`,
1658
+ `a${f},${p} 0,0,0 ${-u},0`,
1659
+ `l0,${d}`,
1660
+ `a${f},${p} 0,0,0 ${u},0`,
1661
+ `l0,${-d}`,
1662
+ `M${e},${l + p + m}`,
1663
+ `a${f},${p} 0,0,0 ${u},0`
1664
+ ].join(" "), "createCylinderPathD"), createOuterCylinderPathD2 = /* @__PURE__ */ __name((e, l, u, d, f, p, m) => [
1665
+ `M${e},${l + p}`,
1666
+ `M${e + u},${l + p}`,
1667
+ `a${f},${p} 0,0,0 ${-u},0`,
1668
+ `l0,${d}`,
1669
+ `a${f},${p} 0,0,0 ${u},0`,
1670
+ `l0,${-d}`,
1671
+ `M${e},${l + p + m}`,
1672
+ `a${f},${p} 0,0,0 ${u},0`
1673
+ ].join(" "), "createOuterCylinderPathD"), createInnerCylinderPathD2 = /* @__PURE__ */ __name((e, l, u, d, f, p) => [`M${e - u / 2},${-d / 2}`, `a${f},${p} 0,0,0 ${u},0`].join(" "), "createInnerCylinderPathD");
1674
+ async function linedCylinder(e, l) {
1675
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
1676
+ l.labelStyle = u;
1677
+ let { shapeSvg: f, bbox: p, label: m } = await labelHelper(e, l, getNodeClasses(l)), h = Math.max(p.width + (l.padding ?? 0), l.width ?? 0), g = h / 2, _ = g / (2.5 + h / 50), v = Math.max(p.height + _ + (l.padding ?? 0), l.height ?? 0), y = v * .1, b, { cssStyles: x } = l;
1678
+ if (l.look === "handDrawn") {
1679
+ let e = at.svg(f), u = createOuterCylinderPathD2(0, 0, h, v, g, _, y), d = createInnerCylinderPathD2(0, _, h, v, g, _), p = userNodeOverrides(l, {}), m = e.path(u, p), S = e.path(d, p);
1680
+ f.insert(() => S, ":first-child").attr("class", "line"), b = f.insert(() => m, ":first-child"), b.attr("class", "basic label-container"), x && b.attr("style", x);
1681
+ } else {
1682
+ let e = createCylinderPathD2(0, 0, h, v, g, _, y);
1683
+ b = f.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container").attr("style", handleUndefinedAttr(x)).attr("style", d);
1684
+ }
1685
+ return b.attr("label-offset-y", _), b.attr("transform", `translate(${-h / 2}, ${-(v / 2 + _)})`), updateNodeBounds(l, b), m.attr("transform", `translate(${-(p.width / 2) - (p.x - (p.left ?? 0))}, ${-(p.height / 2) + _ - (p.y - (p.top ?? 0))})`), l.intersect = function(e) {
1686
+ let u = intersect_default.rect(l, e), d = u.x - (l.x ?? 0);
1687
+ if (g != 0 && (Math.abs(d) < (l.width ?? 0) / 2 || Math.abs(d) == (l.width ?? 0) / 2 && Math.abs(u.y - (l.y ?? 0)) > (l.height ?? 0) / 2 - _)) {
1688
+ let f = _ * _ * (1 - d * d / (g * g));
1689
+ f > 0 && (f = Math.sqrt(f)), f = _ - f, e.y - (l.y ?? 0) > 0 && (f = -f), u.y += f;
1690
+ }
1691
+ return u;
1692
+ }, f;
1693
+ }
1694
+ __name(linedCylinder, "linedCylinder");
1695
+ async function linedWaveEdgedRect(e, l) {
1696
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
1697
+ l.labelStyle = u;
1698
+ let { shapeSvg: f, bbox: p, label: m } = await labelHelper(e, l, getNodeClasses(l)), h = Math.max(p.width + (l.padding ?? 0) * 2, l?.width ?? 0), g = Math.max(p.height + (l.padding ?? 0) * 2, l?.height ?? 0), _ = g / 4, v = g + _, { cssStyles: y } = l, b = at.svg(f), x = userNodeOverrides(l, {});
1699
+ l.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
1700
+ let S = [
1701
+ {
1702
+ x: -h / 2 - h / 2 * .1,
1703
+ y: -v / 2
1704
+ },
1705
+ {
1706
+ x: -h / 2 - h / 2 * .1,
1707
+ y: v / 2
1708
+ },
1709
+ ...generateFullSineWavePoints(-h / 2 - h / 2 * .1, v / 2, h / 2 + h / 2 * .1, v / 2, _, .8),
1710
+ {
1711
+ x: h / 2 + h / 2 * .1,
1712
+ y: -v / 2
1713
+ },
1714
+ {
1715
+ x: -h / 2 - h / 2 * .1,
1716
+ y: -v / 2
1717
+ },
1718
+ {
1719
+ x: -h / 2,
1720
+ y: -v / 2
1721
+ },
1722
+ {
1723
+ x: -h / 2,
1724
+ y: v / 2 * 1.1
1725
+ },
1726
+ {
1727
+ x: -h / 2,
1728
+ y: -v / 2
1729
+ }
1730
+ ], C = b.polygon(S.map((e) => [e.x, e.y]), x), E = f.insert(() => C, ":first-child");
1731
+ return E.attr("class", "basic label-container"), y && l.look !== "handDrawn" && E.selectAll("path").attr("style", y), d && l.look !== "handDrawn" && E.selectAll("path").attr("style", d), E.attr("transform", `translate(0,${-_ / 2})`), m.attr("transform", `translate(${-h / 2 + (l.padding ?? 0) + h / 2 * .1 / 2 - (p.x - (p.left ?? 0))},${-g / 2 + (l.padding ?? 0) - _ / 2 - (p.y - (p.top ?? 0))})`), updateNodeBounds(l, E), l.intersect = function(e) {
1732
+ return intersect_default.polygon(l, S, e);
1733
+ }, f;
1734
+ }
1735
+ __name(linedWaveEdgedRect, "linedWaveEdgedRect");
1736
+ async function multiRect(e, l) {
1737
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
1738
+ l.labelStyle = u;
1739
+ let { shapeSvg: f, bbox: p, label: m } = await labelHelper(e, l, getNodeClasses(l)), h = Math.max(p.width + (l.padding ?? 0) * 2, l?.width ?? 0), g = Math.max(p.height + (l.padding ?? 0) * 2, l?.height ?? 0), _ = -h / 2, v = -g / 2, { cssStyles: y } = l, b = at.svg(f), x = userNodeOverrides(l, {}), S = [
1740
+ {
1741
+ x: _ - 5,
1742
+ y: v + 5
1743
+ },
1744
+ {
1745
+ x: _ - 5,
1746
+ y: v + g + 5
1747
+ },
1748
+ {
1749
+ x: _ + h - 5,
1750
+ y: v + g + 5
1751
+ },
1752
+ {
1753
+ x: _ + h - 5,
1754
+ y: v + g
1755
+ },
1756
+ {
1757
+ x: _ + h,
1758
+ y: v + g
1759
+ },
1760
+ {
1761
+ x: _ + h,
1762
+ y: v + g - 5
1763
+ },
1764
+ {
1765
+ x: _ + h + 5,
1766
+ y: v + g - 5
1767
+ },
1768
+ {
1769
+ x: _ + h + 5,
1770
+ y: v - 5
1771
+ },
1772
+ {
1773
+ x: _ + 5,
1774
+ y: v - 5
1775
+ },
1776
+ {
1777
+ x: _ + 5,
1778
+ y: v
1779
+ },
1780
+ {
1781
+ x: _,
1782
+ y: v
1783
+ },
1784
+ {
1785
+ x: _,
1786
+ y: v + 5
1787
+ }
1788
+ ], C = [
1789
+ {
1790
+ x: _,
1791
+ y: v + 5
1792
+ },
1793
+ {
1794
+ x: _ + h - 5,
1795
+ y: v + 5
1796
+ },
1797
+ {
1798
+ x: _ + h - 5,
1799
+ y: v + g
1800
+ },
1801
+ {
1802
+ x: _ + h,
1803
+ y: v + g
1804
+ },
1805
+ {
1806
+ x: _ + h,
1807
+ y: v
1808
+ },
1809
+ {
1810
+ x: _,
1811
+ y: v
1812
+ }
1813
+ ];
1814
+ l.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
1815
+ let E = createPathFromPoints(S), D = b.path(E, x), O = createPathFromPoints(C), k = b.path(O, {
1816
+ ...x,
1817
+ fill: "none"
1818
+ }), A = f.insert(() => k, ":first-child");
1819
+ return A.insert(() => D, ":first-child"), A.attr("class", "basic label-container"), y && l.look !== "handDrawn" && A.selectAll("path").attr("style", y), d && l.look !== "handDrawn" && A.selectAll("path").attr("style", d), m.attr("transform", `translate(${-(p.width / 2) - 5 - (p.x - (p.left ?? 0))}, ${-(p.height / 2) + 5 - (p.y - (p.top ?? 0))})`), updateNodeBounds(l, A), l.intersect = function(e) {
1820
+ return intersect_default.polygon(l, S, e);
1821
+ }, f;
1822
+ }
1823
+ __name(multiRect, "multiRect");
1824
+ async function multiWaveEdgedRectangle(e, l) {
1825
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
1826
+ l.labelStyle = u;
1827
+ let { shapeSvg: f, bbox: p, label: m } = await labelHelper(e, l, getNodeClasses(l)), h = Math.max(p.width + (l.padding ?? 0) * 2, l?.width ?? 0), g = Math.max(p.height + (l.padding ?? 0) * 2, l?.height ?? 0), _ = g / 4, v = g + _, y = -h / 2, b = -v / 2, { cssStyles: x } = l, S = generateFullSineWavePoints(y - 5, b + v + 5, y + h - 5, b + v + 5, _, .8), C = S?.[S.length - 1], E = [
1828
+ {
1829
+ x: y - 5,
1830
+ y: b + 5
1831
+ },
1832
+ {
1833
+ x: y - 5,
1834
+ y: b + v + 5
1835
+ },
1836
+ ...S,
1837
+ {
1838
+ x: y + h - 5,
1839
+ y: C.y - 5
1840
+ },
1841
+ {
1842
+ x: y + h,
1843
+ y: C.y - 5
1844
+ },
1845
+ {
1846
+ x: y + h,
1847
+ y: C.y - 10
1848
+ },
1849
+ {
1850
+ x: y + h + 5,
1851
+ y: C.y - 10
1852
+ },
1853
+ {
1854
+ x: y + h + 5,
1855
+ y: b - 5
1856
+ },
1857
+ {
1858
+ x: y + 5,
1859
+ y: b - 5
1860
+ },
1861
+ {
1862
+ x: y + 5,
1863
+ y: b
1864
+ },
1865
+ {
1866
+ x: y,
1867
+ y: b
1868
+ },
1869
+ {
1870
+ x: y,
1871
+ y: b + 5
1872
+ }
1873
+ ], D = [
1874
+ {
1875
+ x: y,
1876
+ y: b + 5
1877
+ },
1878
+ {
1879
+ x: y + h - 5,
1880
+ y: b + 5
1881
+ },
1882
+ {
1883
+ x: y + h - 5,
1884
+ y: C.y - 5
1885
+ },
1886
+ {
1887
+ x: y + h,
1888
+ y: C.y - 5
1889
+ },
1890
+ {
1891
+ x: y + h,
1892
+ y: b
1893
+ },
1894
+ {
1895
+ x: y,
1896
+ y: b
1897
+ }
1898
+ ], O = at.svg(f), k = userNodeOverrides(l, {});
1899
+ l.look !== "handDrawn" && (k.roughness = 0, k.fillStyle = "solid");
1900
+ let A = createPathFromPoints(E), j = O.path(A, k), N = createPathFromPoints(D), R = O.path(N, k), z = f.insert(() => j, ":first-child");
1901
+ return z.insert(() => R), z.attr("class", "basic label-container"), x && l.look !== "handDrawn" && z.selectAll("path").attr("style", x), d && l.look !== "handDrawn" && z.selectAll("path").attr("style", d), z.attr("transform", `translate(0,${-_ / 2})`), m.attr("transform", `translate(${-(p.width / 2) - 5 - (p.x - (p.left ?? 0))}, ${-(p.height / 2) + 5 - _ / 2 - (p.y - (p.top ?? 0))})`), updateNodeBounds(l, z), l.intersect = function(e) {
1902
+ return intersect_default.polygon(l, E, e);
1903
+ }, f;
1904
+ }
1905
+ __name(multiWaveEdgedRectangle, "multiWaveEdgedRectangle");
1906
+ async function note(e, l, { config: { themeVariables: u } }) {
1907
+ let { labelStyles: d, nodeStyles: f } = styles2String(l);
1908
+ l.labelStyle = d, l.useHtmlLabels || getConfig().flowchart?.htmlLabels !== !1 || (l.centerLabel = !0);
1909
+ let { shapeSvg: m, bbox: h, label: g } = await labelHelper(e, l, getNodeClasses(l)), _ = Math.max(h.width + (l.padding ?? 0) * 2, l?.width ?? 0), v = Math.max(h.height + (l.padding ?? 0) * 2, l?.height ?? 0), y = -_ / 2, b = -v / 2, { cssStyles: x } = l, S = at.svg(m), C = userNodeOverrides(l, {
1910
+ fill: u.noteBkgColor,
1911
+ stroke: u.noteBorderColor
1912
+ });
1913
+ l.look !== "handDrawn" && (C.roughness = 0, C.fillStyle = "solid");
1914
+ let E = S.rectangle(y, b, _, v, C), D = m.insert(() => E, ":first-child");
1915
+ return D.attr("class", "basic label-container"), x && l.look !== "handDrawn" && D.selectAll("path").attr("style", x), f && l.look !== "handDrawn" && D.selectAll("path").attr("style", f), g.attr("transform", `translate(${-h.width / 2 - (h.x - (h.left ?? 0))}, ${-(h.height / 2) - (h.y - (h.top ?? 0))})`), updateNodeBounds(l, D), l.intersect = function(e) {
1916
+ return intersect_default.rect(l, e);
1917
+ }, m;
1918
+ }
1919
+ __name(note, "note");
1920
+ var createDecisionBoxPathD = /* @__PURE__ */ __name((e, l, u) => [
1921
+ `M${e + u / 2},${l}`,
1922
+ `L${e + u},${l - u / 2}`,
1923
+ `L${e + u / 2},${l - u}`,
1924
+ `L${e},${l - u / 2}`,
1925
+ "Z"
1926
+ ].join(" "), "createDecisionBoxPathD");
1927
+ async function question(e, l) {
1928
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
1929
+ l.labelStyle = u;
1930
+ let { shapeSvg: f, bbox: p } = await labelHelper(e, l, getNodeClasses(l)), m = p.width + l.padding + (p.height + l.padding), h = .5, g = [
1931
+ {
1932
+ x: m / 2,
1933
+ y: 0
1934
+ },
1935
+ {
1936
+ x: m,
1937
+ y: -m / 2
1938
+ },
1939
+ {
1940
+ x: m / 2,
1941
+ y: -m
1942
+ },
1943
+ {
1944
+ x: 0,
1945
+ y: -m / 2
1946
+ }
1947
+ ], _, { cssStyles: v } = l;
1948
+ if (l.look === "handDrawn") {
1949
+ let e = at.svg(f), u = userNodeOverrides(l, {}), d = createDecisionBoxPathD(0, 0, m), p = e.path(d, u);
1950
+ _ = f.insert(() => p, ":first-child").attr("transform", `translate(${-m / 2 + h}, ${m / 2})`), v && _.attr("style", v);
1951
+ } else _ = insertPolygonShape(f, m, m, g), _.attr("transform", `translate(${-m / 2 + h}, ${m / 2})`);
1952
+ return d && _.attr("style", d), updateNodeBounds(l, _), l.calcIntersect = function(e, l) {
1953
+ let u = e.width, d = [
1954
+ {
1955
+ x: u / 2,
1956
+ y: 0
1957
+ },
1958
+ {
1959
+ x: u,
1960
+ y: -u / 2
1961
+ },
1962
+ {
1963
+ x: u / 2,
1964
+ y: -u
1965
+ },
1966
+ {
1967
+ x: 0,
1968
+ y: -u / 2
1969
+ }
1970
+ ], f = intersect_default.polygon(e, d, l);
1971
+ return {
1972
+ x: f.x - .5,
1973
+ y: f.y - .5
1974
+ };
1975
+ }, l.intersect = function(e) {
1976
+ return this.calcIntersect(l, e);
1977
+ }, f;
1978
+ }
1979
+ __name(question, "question");
1980
+ async function rect_left_inv_arrow(e, l) {
1981
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
1982
+ l.labelStyle = u;
1983
+ let { shapeSvg: f, bbox: p, label: m } = await labelHelper(e, l, getNodeClasses(l)), h = Math.max(p.width + (l.padding ?? 0), l?.width ?? 0), g = Math.max(p.height + (l.padding ?? 0), l?.height ?? 0), _ = -h / 2, v = -g / 2, y = v / 2, b = [
1984
+ {
1985
+ x: _ + y,
1986
+ y: v
1987
+ },
1988
+ {
1989
+ x: _,
1990
+ y: 0
1991
+ },
1992
+ {
1993
+ x: _ + y,
1994
+ y: -v
1995
+ },
1996
+ {
1997
+ x: -_,
1998
+ y: -v
1999
+ },
2000
+ {
2001
+ x: -_,
2002
+ y: v
2003
+ }
2004
+ ], { cssStyles: x } = l, S = at.svg(f), C = userNodeOverrides(l, {});
2005
+ l.look !== "handDrawn" && (C.roughness = 0, C.fillStyle = "solid");
2006
+ let E = createPathFromPoints(b), D = S.path(E, C), O = f.insert(() => D, ":first-child");
2007
+ return O.attr("class", "basic label-container"), x && l.look !== "handDrawn" && O.selectAll("path").attr("style", x), d && l.look !== "handDrawn" && O.selectAll("path").attr("style", d), O.attr("transform", `translate(${-y / 2},0)`), m.attr("transform", `translate(${-y / 2 - p.width / 2 - (p.x - (p.left ?? 0))}, ${-(p.height / 2) - (p.y - (p.top ?? 0))})`), updateNodeBounds(l, O), l.intersect = function(e) {
2008
+ return intersect_default.polygon(l, b, e);
2009
+ }, f;
2010
+ }
2011
+ __name(rect_left_inv_arrow, "rect_left_inv_arrow");
2012
+ async function rectWithTitle(e, u) {
2013
+ let { labelStyles: d, nodeStyles: p } = styles2String(u);
2014
+ u.labelStyle = d;
2015
+ let h;
2016
+ h = u.cssClasses ? "node " + u.cssClasses : "node default";
2017
+ let g = e.insert("g").attr("class", h).attr("id", u.domId || u.id), _ = g.insert("g"), v = g.insert("g").attr("class", "label").attr("style", p), y = u.description, x = u.label, S = v.node().appendChild(await createLabel_default(x, u.labelStyle, !0, !0)), C = {
2018
+ width: 0,
2019
+ height: 0
2020
+ };
2021
+ if (evaluate(getConfig2()?.flowchart?.htmlLabels)) {
2022
+ let e = S.children[0], l = select_default(S);
2023
+ C = e.getBoundingClientRect(), l.attr("width", C.width), l.attr("height", C.height);
2024
+ }
2025
+ log.info("Text 2", y);
2026
+ let E = y || [], D = S.getBBox(), O = v.node().appendChild(await createLabel_default(E.join ? E.join("<br/>") : E, u.labelStyle, !0, !0)), k = O.children[0], A = select_default(O);
2027
+ C = k.getBoundingClientRect(), A.attr("width", C.width), A.attr("height", C.height);
2028
+ let j = (u.padding || 0) / 2;
2029
+ select_default(O).attr("transform", "translate( " + (C.width > D.width ? 0 : (D.width - C.width) / 2) + ", " + (D.height + j + 5) + ")"), select_default(S).attr("transform", "translate( " + (C.width < D.width ? 0 : -(D.width - C.width) / 2) + ", 0)"), C = v.node().getBBox(), v.attr("transform", "translate(" + -C.width / 2 + ", " + (-C.height / 2 - j + 3) + ")");
2030
+ let M = C.width + (u.padding || 0), N = C.height + (u.padding || 0), F = -C.width / 2 - j, I = -C.height / 2 - j, L, R;
2031
+ if (u.look === "handDrawn") {
2032
+ let e = at.svg(g), d = userNodeOverrides(u, {}), f = e.path(createRoundedRectPathD(F, I, M, N, u.rx || 0), d), p = e.line(-C.width / 2 - j, -C.height / 2 - j + D.height + j, C.width / 2 + j, -C.height / 2 - j + D.height + j, d);
2033
+ R = g.insert(() => (log.debug("Rough node insert CXC", f), p), ":first-child"), L = g.insert(() => (log.debug("Rough node insert CXC", f), f), ":first-child");
2034
+ } else L = _.insert("rect", ":first-child"), R = _.insert("line"), L.attr("class", "outer title-state").attr("style", p).attr("x", -C.width / 2 - j).attr("y", -C.height / 2 - j).attr("width", C.width + (u.padding || 0)).attr("height", C.height + (u.padding || 0)), R.attr("class", "divider").attr("x1", -C.width / 2 - j).attr("x2", C.width / 2 + j).attr("y1", -C.height / 2 - j + D.height + j).attr("y2", -C.height / 2 - j + D.height + j);
2035
+ return updateNodeBounds(u, L), u.intersect = function(e) {
2036
+ return intersect_default.rect(u, e);
2037
+ }, g;
2038
+ }
2039
+ __name(rectWithTitle, "rectWithTitle");
2040
+ function generateArcPoints2(e, l, u, d, f, p, m) {
2041
+ let h = (e + u) / 2, g = (l + d) / 2, _ = Math.atan2(d - l, u - e), v = (u - e) / 2, y = (d - l) / 2, b = v / f, x = y / p, S = Math.sqrt(b ** 2 + x ** 2);
2042
+ if (S > 1) throw Error("The given radii are too small to create an arc between the points.");
2043
+ let C = Math.sqrt(1 - S ** 2), w = h + C * p * Math.sin(_) * (m ? -1 : 1), T = g - C * f * Math.cos(_) * (m ? -1 : 1), E = Math.atan2((l - T) / p, (e - w) / f), D = Math.atan2((d - T) / p, (u - w) / f) - E;
2044
+ m && D < 0 && (D += 2 * Math.PI), !m && D > 0 && (D -= 2 * Math.PI);
2045
+ let O = [];
2046
+ for (let e = 0; e < 20; e++) {
2047
+ let l = E + e / 19 * D, u = w + f * Math.cos(l), d = T + p * Math.sin(l);
2048
+ O.push({
2049
+ x: u,
2050
+ y: d
2051
+ });
2052
+ }
2053
+ return O;
2054
+ }
2055
+ __name(generateArcPoints2, "generateArcPoints");
2056
+ async function roundedRect(e, l) {
2057
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
2058
+ l.labelStyle = u;
2059
+ let { shapeSvg: f, bbox: p } = await labelHelper(e, l, getNodeClasses(l)), m = l?.padding ?? 0, h = l?.padding ?? 0, g = (l?.width ? l?.width : p.width) + m * 2, _ = (l?.height ? l?.height : p.height) + h * 2, v = l.radius || 5, y = l.taper || 5, { cssStyles: b } = l, x = at.svg(f), S = userNodeOverrides(l, {});
2060
+ l.stroke && (S.stroke = l.stroke), l.look !== "handDrawn" && (S.roughness = 0, S.fillStyle = "solid");
2061
+ let C = [
2062
+ {
2063
+ x: -g / 2 + y,
2064
+ y: -_ / 2
2065
+ },
2066
+ {
2067
+ x: g / 2 - y,
2068
+ y: -_ / 2
2069
+ },
2070
+ ...generateArcPoints2(g / 2 - y, -_ / 2, g / 2, -_ / 2 + y, v, v, !0),
2071
+ {
2072
+ x: g / 2,
2073
+ y: -_ / 2 + y
2074
+ },
2075
+ {
2076
+ x: g / 2,
2077
+ y: _ / 2 - y
2078
+ },
2079
+ ...generateArcPoints2(g / 2, _ / 2 - y, g / 2 - y, _ / 2, v, v, !0),
2080
+ {
2081
+ x: g / 2 - y,
2082
+ y: _ / 2
2083
+ },
2084
+ {
2085
+ x: -g / 2 + y,
2086
+ y: _ / 2
2087
+ },
2088
+ ...generateArcPoints2(-g / 2 + y, _ / 2, -g / 2, _ / 2 - y, v, v, !0),
2089
+ {
2090
+ x: -g / 2,
2091
+ y: _ / 2 - y
2092
+ },
2093
+ {
2094
+ x: -g / 2,
2095
+ y: -_ / 2 + y
2096
+ },
2097
+ ...generateArcPoints2(-g / 2, -_ / 2 + y, -g / 2 + y, -_ / 2, v, v, !0)
2098
+ ], E = createPathFromPoints(C), D = x.path(E, S), O = f.insert(() => D, ":first-child");
2099
+ return O.attr("class", "basic label-container outer-path"), b && l.look !== "handDrawn" && O.selectChildren("path").attr("style", b), d && l.look !== "handDrawn" && O.selectChildren("path").attr("style", d), updateNodeBounds(l, O), l.intersect = function(e) {
2100
+ return intersect_default.polygon(l, C, e);
2101
+ }, f;
2102
+ }
2103
+ __name(roundedRect, "roundedRect");
2104
+ async function shadedProcess(e, l) {
2105
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
2106
+ l.labelStyle = u;
2107
+ let { shapeSvg: f, bbox: p, label: m } = await labelHelper(e, l, getNodeClasses(l)), h = l?.padding ?? 0, g = Math.max(p.width + (l.padding ?? 0) * 2, l?.width ?? 0), _ = Math.max(p.height + (l.padding ?? 0) * 2, l?.height ?? 0), v = -p.width / 2 - h, y = -p.height / 2 - h, { cssStyles: b } = l, x = at.svg(f), S = userNodeOverrides(l, {});
2108
+ l.look !== "handDrawn" && (S.roughness = 0, S.fillStyle = "solid");
2109
+ let C = [
2110
+ {
2111
+ x: v,
2112
+ y
2113
+ },
2114
+ {
2115
+ x: v + g + 8,
2116
+ y
2117
+ },
2118
+ {
2119
+ x: v + g + 8,
2120
+ y: y + _
2121
+ },
2122
+ {
2123
+ x: v - 8,
2124
+ y: y + _
2125
+ },
2126
+ {
2127
+ x: v - 8,
2128
+ y
2129
+ },
2130
+ {
2131
+ x: v,
2132
+ y
2133
+ },
2134
+ {
2135
+ x: v,
2136
+ y: y + _
2137
+ }
2138
+ ], E = x.polygon(C.map((e) => [e.x, e.y]), S), D = f.insert(() => E, ":first-child");
2139
+ return D.attr("class", "basic label-container").attr("style", handleUndefinedAttr(b)), d && l.look !== "handDrawn" && D.selectAll("path").attr("style", d), b && l.look !== "handDrawn" && D.selectAll("path").attr("style", d), m.attr("transform", `translate(${-g / 2 + 4 + (l.padding ?? 0) - (p.x - (p.left ?? 0))},${-_ / 2 + (l.padding ?? 0) - (p.y - (p.top ?? 0))})`), updateNodeBounds(l, D), l.intersect = function(e) {
2140
+ return intersect_default.rect(l, e);
2141
+ }, f;
2142
+ }
2143
+ __name(shadedProcess, "shadedProcess");
2144
+ async function slopedRect(e, l) {
2145
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
2146
+ l.labelStyle = u;
2147
+ let { shapeSvg: f, bbox: p, label: m } = await labelHelper(e, l, getNodeClasses(l)), h = Math.max(p.width + (l.padding ?? 0) * 2, l?.width ?? 0), g = Math.max(p.height + (l.padding ?? 0) * 2, l?.height ?? 0), _ = -h / 2, v = -g / 2, { cssStyles: y } = l, b = at.svg(f), x = userNodeOverrides(l, {});
2148
+ l.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
2149
+ let S = [
2150
+ {
2151
+ x: _,
2152
+ y: v
2153
+ },
2154
+ {
2155
+ x: _,
2156
+ y: v + g
2157
+ },
2158
+ {
2159
+ x: _ + h,
2160
+ y: v + g
2161
+ },
2162
+ {
2163
+ x: _ + h,
2164
+ y: v - g / 2
2165
+ }
2166
+ ], C = createPathFromPoints(S), E = b.path(C, x), D = f.insert(() => E, ":first-child");
2167
+ return D.attr("class", "basic label-container"), y && l.look !== "handDrawn" && D.selectChildren("path").attr("style", y), d && l.look !== "handDrawn" && D.selectChildren("path").attr("style", d), D.attr("transform", `translate(0, ${g / 4})`), m.attr("transform", `translate(${-h / 2 + (l.padding ?? 0) - (p.x - (p.left ?? 0))}, ${-g / 4 + (l.padding ?? 0) - (p.y - (p.top ?? 0))})`), updateNodeBounds(l, D), l.intersect = function(e) {
2168
+ return intersect_default.polygon(l, S, e);
2169
+ }, f;
2170
+ }
2171
+ __name(slopedRect, "slopedRect");
2172
+ async function squareRect2(e, l) {
2173
+ return drawRect(e, l, {
2174
+ rx: 0,
2175
+ ry: 0,
2176
+ classes: "",
2177
+ labelPaddingX: l.labelPaddingX ?? (l?.padding || 0) * 2,
2178
+ labelPaddingY: (l?.padding || 0) * 1
2179
+ });
2180
+ }
2181
+ __name(squareRect2, "squareRect");
2182
+ async function stadium(e, l) {
2183
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
2184
+ l.labelStyle = u;
2185
+ let { shapeSvg: f, bbox: p } = await labelHelper(e, l, getNodeClasses(l)), m = p.height + l.padding, h = p.width + m / 4 + l.padding, g = m / 2, { cssStyles: _ } = l, v = at.svg(f), y = userNodeOverrides(l, {});
2186
+ l.look !== "handDrawn" && (y.roughness = 0, y.fillStyle = "solid");
2187
+ let b = [
2188
+ {
2189
+ x: -h / 2 + g,
2190
+ y: -m / 2
2191
+ },
2192
+ {
2193
+ x: h / 2 - g,
2194
+ y: -m / 2
2195
+ },
2196
+ ...generateCirclePoints(-h / 2 + g, 0, g, 50, 90, 270),
2197
+ {
2198
+ x: h / 2 - g,
2199
+ y: m / 2
2200
+ },
2201
+ ...generateCirclePoints(h / 2 - g, 0, g, 50, 270, 450)
2202
+ ], x = createPathFromPoints(b), S = v.path(x, y), C = f.insert(() => S, ":first-child");
2203
+ return C.attr("class", "basic label-container outer-path"), _ && l.look !== "handDrawn" && C.selectChildren("path").attr("style", _), d && l.look !== "handDrawn" && C.selectChildren("path").attr("style", d), updateNodeBounds(l, C), l.intersect = function(e) {
2204
+ return intersect_default.polygon(l, b, e);
2205
+ }, f;
2206
+ }
2207
+ __name(stadium, "stadium");
2208
+ async function state(e, l) {
2209
+ return drawRect(e, l, {
2210
+ rx: 5,
2211
+ ry: 5,
2212
+ classes: "flowchart-node"
2213
+ });
2214
+ }
2215
+ __name(state, "state");
2216
+ function stateEnd(e, l, { config: { themeVariables: u } }) {
2217
+ let { labelStyles: d, nodeStyles: f } = styles2String(l);
2218
+ l.labelStyle = d;
2219
+ let { cssStyles: p } = l, { lineColor: m, stateBorder: h, nodeBorder: g } = u, _ = e.insert("g").attr("class", "node default").attr("id", l.domId || l.id), v = at.svg(_), y = userNodeOverrides(l, {});
2220
+ l.look !== "handDrawn" && (y.roughness = 0, y.fillStyle = "solid");
2221
+ let b = v.circle(0, 0, 14, {
2222
+ ...y,
2223
+ stroke: m,
2224
+ strokeWidth: 2
2225
+ }), x = h ?? g, S = v.circle(0, 0, 5, {
2226
+ ...y,
2227
+ fill: x,
2228
+ stroke: x,
2229
+ strokeWidth: 2,
2230
+ fillStyle: "solid"
2231
+ }), C = _.insert(() => b, ":first-child");
2232
+ return C.insert(() => S), p && C.selectAll("path").attr("style", p), f && C.selectAll("path").attr("style", f), updateNodeBounds(l, C), l.intersect = function(e) {
2233
+ return intersect_default.circle(l, 7, e);
2234
+ }, _;
2235
+ }
2236
+ __name(stateEnd, "stateEnd");
2237
+ function stateStart(e, l, { config: { themeVariables: u } }) {
2238
+ let { lineColor: d } = u, f = e.insert("g").attr("class", "node default").attr("id", l.domId || l.id), p;
2239
+ if (l.look === "handDrawn") {
2240
+ let e = at.svg(f).circle(0, 0, 14, solidStateFill(d));
2241
+ p = f.insert(() => e), p.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14);
2242
+ } else p = f.insert("circle", ":first-child"), p.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14);
2243
+ return updateNodeBounds(l, p), l.intersect = function(e) {
2244
+ return intersect_default.circle(l, 7, e);
2245
+ }, f;
2246
+ }
2247
+ __name(stateStart, "stateStart");
2248
+ async function subroutine(e, l) {
2249
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
2250
+ l.labelStyle = u;
2251
+ let { shapeSvg: f, bbox: p } = await labelHelper(e, l, getNodeClasses(l)), m = (l?.padding || 0) / 2, h = p.width + l.padding, g = p.height + l.padding, _ = -p.width / 2 - m, v = -p.height / 2 - m, y = [
2252
+ {
2253
+ x: 0,
2254
+ y: 0
2255
+ },
2256
+ {
2257
+ x: h,
2258
+ y: 0
2259
+ },
2260
+ {
2261
+ x: h,
2262
+ y: -g
2263
+ },
2264
+ {
2265
+ x: 0,
2266
+ y: -g
2267
+ },
2268
+ {
2269
+ x: 0,
2270
+ y: 0
2271
+ },
2272
+ {
2273
+ x: -8,
2274
+ y: 0
2275
+ },
2276
+ {
2277
+ x: h + 8,
2278
+ y: 0
2279
+ },
2280
+ {
2281
+ x: h + 8,
2282
+ y: -g
2283
+ },
2284
+ {
2285
+ x: -8,
2286
+ y: -g
2287
+ },
2288
+ {
2289
+ x: -8,
2290
+ y: 0
2291
+ }
2292
+ ];
2293
+ if (l.look === "handDrawn") {
2294
+ let e = at.svg(f), u = userNodeOverrides(l, {}), d = e.rectangle(_ - 8, v, h + 16, g, u), p = e.line(_, v, _, v + g, u), m = e.line(_ + h, v, _ + h, v + g, u);
2295
+ f.insert(() => p, ":first-child"), f.insert(() => m, ":first-child");
2296
+ let y = f.insert(() => d, ":first-child"), { cssStyles: b } = l;
2297
+ y.attr("class", "basic label-container").attr("style", handleUndefinedAttr(b)), updateNodeBounds(l, y);
2298
+ } else {
2299
+ let e = insertPolygonShape(f, h, g, y);
2300
+ d && e.attr("style", d), updateNodeBounds(l, e);
2301
+ }
2302
+ return l.intersect = function(e) {
2303
+ return intersect_default.polygon(l, y, e);
2304
+ }, f;
2305
+ }
2306
+ __name(subroutine, "subroutine");
2307
+ async function taggedRect(e, l) {
2308
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
2309
+ l.labelStyle = u;
2310
+ let { shapeSvg: f, bbox: p } = await labelHelper(e, l, getNodeClasses(l)), m = Math.max(p.width + (l.padding ?? 0) * 2, l?.width ?? 0), h = Math.max(p.height + (l.padding ?? 0) * 2, l?.height ?? 0), g = -m / 2, _ = -h / 2, v = .2 * h, y = .2 * h, { cssStyles: b } = l, x = at.svg(f), S = userNodeOverrides(l, {}), C = [
2311
+ {
2312
+ x: g - v / 2,
2313
+ y: _
2314
+ },
2315
+ {
2316
+ x: g + m + v / 2,
2317
+ y: _
2318
+ },
2319
+ {
2320
+ x: g + m + v / 2,
2321
+ y: _ + h
2322
+ },
2323
+ {
2324
+ x: g - v / 2,
2325
+ y: _ + h
2326
+ }
2327
+ ], E = [
2328
+ {
2329
+ x: g + m - v / 2,
2330
+ y: _ + h
2331
+ },
2332
+ {
2333
+ x: g + m + v / 2,
2334
+ y: _ + h
2335
+ },
2336
+ {
2337
+ x: g + m + v / 2,
2338
+ y: _ + h - y
2339
+ }
2340
+ ];
2341
+ l.look !== "handDrawn" && (S.roughness = 0, S.fillStyle = "solid");
2342
+ let D = createPathFromPoints(C), O = x.path(D, S), k = createPathFromPoints(E), A = x.path(k, {
2343
+ ...S,
2344
+ fillStyle: "solid"
2345
+ }), j = f.insert(() => A, ":first-child");
2346
+ return j.insert(() => O, ":first-child"), j.attr("class", "basic label-container"), b && l.look !== "handDrawn" && j.selectAll("path").attr("style", b), d && l.look !== "handDrawn" && j.selectAll("path").attr("style", d), updateNodeBounds(l, j), l.intersect = function(e) {
2347
+ return intersect_default.polygon(l, C, e);
2348
+ }, f;
2349
+ }
2350
+ __name(taggedRect, "taggedRect");
2351
+ async function taggedWaveEdgedRectangle(e, l) {
2352
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
2353
+ l.labelStyle = u;
2354
+ let { shapeSvg: f, bbox: p, label: m } = await labelHelper(e, l, getNodeClasses(l)), h = Math.max(p.width + (l.padding ?? 0) * 2, l?.width ?? 0), g = Math.max(p.height + (l.padding ?? 0) * 2, l?.height ?? 0), _ = g / 4, v = .2 * h, y = .2 * g, b = g + _, { cssStyles: x } = l, S = at.svg(f), C = userNodeOverrides(l, {});
2355
+ l.look !== "handDrawn" && (C.roughness = 0, C.fillStyle = "solid");
2356
+ let E = [
2357
+ {
2358
+ x: -h / 2 - h / 2 * .1,
2359
+ y: b / 2
2360
+ },
2361
+ ...generateFullSineWavePoints(-h / 2 - h / 2 * .1, b / 2, h / 2 + h / 2 * .1, b / 2, _, .8),
2362
+ {
2363
+ x: h / 2 + h / 2 * .1,
2364
+ y: -b / 2
2365
+ },
2366
+ {
2367
+ x: -h / 2 - h / 2 * .1,
2368
+ y: -b / 2
2369
+ }
2370
+ ], D = -h / 2 + h / 2 * .1, O = -b / 2 - y * .4, k = [
2371
+ {
2372
+ x: D + h - v,
2373
+ y: (O + g) * 1.4
2374
+ },
2375
+ {
2376
+ x: D + h,
2377
+ y: O + g - y
2378
+ },
2379
+ {
2380
+ x: D + h,
2381
+ y: (O + g) * .9
2382
+ },
2383
+ ...generateFullSineWavePoints(D + h, (O + g) * 1.3, D + h - v, (O + g) * 1.5, -g * .03, .5)
2384
+ ], A = createPathFromPoints(E), j = S.path(A, C), N = createPathFromPoints(k), R = S.path(N, {
2385
+ ...C,
2386
+ fillStyle: "solid"
2387
+ }), z = f.insert(() => R, ":first-child");
2388
+ return z.insert(() => j, ":first-child"), z.attr("class", "basic label-container"), x && l.look !== "handDrawn" && z.selectAll("path").attr("style", x), d && l.look !== "handDrawn" && z.selectAll("path").attr("style", d), z.attr("transform", `translate(0,${-_ / 2})`), m.attr("transform", `translate(${-h / 2 + (l.padding ?? 0) - (p.x - (p.left ?? 0))},${-g / 2 + (l.padding ?? 0) - _ / 2 - (p.y - (p.top ?? 0))})`), updateNodeBounds(l, z), l.intersect = function(e) {
2389
+ return intersect_default.polygon(l, E, e);
2390
+ }, f;
2391
+ }
2392
+ __name(taggedWaveEdgedRectangle, "taggedWaveEdgedRectangle");
2393
+ async function text(e, l) {
2394
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
2395
+ l.labelStyle = u;
2396
+ let { shapeSvg: f, bbox: p } = await labelHelper(e, l, getNodeClasses(l)), m = Math.max(p.width + l.padding, l?.width || 0), h = Math.max(p.height + l.padding, l?.height || 0), g = -m / 2, _ = -h / 2, v = f.insert("rect", ":first-child");
2397
+ return v.attr("class", "text").attr("style", d).attr("rx", 0).attr("ry", 0).attr("x", g).attr("y", _).attr("width", m).attr("height", h), updateNodeBounds(l, v), l.intersect = function(e) {
2398
+ return intersect_default.rect(l, e);
2399
+ }, f;
2400
+ }
2401
+ __name(text, "text");
2402
+ var createCylinderPathD3 = /* @__PURE__ */ __name((e, l, u, d, f, p) => `M${e},${l}
2403
+ a${f},${p} 0,0,1 0,${-d}
2404
+ l${u},0
2405
+ a${f},${p} 0,0,1 0,${d}
2406
+ M${u},${-d}
2407
+ a${f},${p} 0,0,0 0,${d}
2408
+ l${-u},0`, "createCylinderPathD"), createOuterCylinderPathD3 = /* @__PURE__ */ __name((e, l, u, d, f, p) => [
2409
+ `M${e},${l}`,
2410
+ `M${e + u},${l}`,
2411
+ `a${f},${p} 0,0,0 0,${-d}`,
2412
+ `l${-u},0`,
2413
+ `a${f},${p} 0,0,0 0,${d}`,
2414
+ `l${u},0`
2415
+ ].join(" "), "createOuterCylinderPathD"), createInnerCylinderPathD3 = /* @__PURE__ */ __name((e, l, u, d, f, p) => [`M${e + u / 2},${-d / 2}`, `a${f},${p} 0,0,0 0,${d}`].join(" "), "createInnerCylinderPathD");
2416
+ async function tiltedCylinder(e, l) {
2417
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
2418
+ l.labelStyle = u;
2419
+ let { shapeSvg: f, bbox: p, label: m, halfPadding: h } = await labelHelper(e, l, getNodeClasses(l)), g = l.look === "neo" ? h * 2 : h, _ = p.height + g, v = _ / 2, y = v / (2.5 + _ / 50), b = p.width + y + g, { cssStyles: x } = l, S;
2420
+ if (l.look === "handDrawn") {
2421
+ let e = at.svg(f), u = createOuterCylinderPathD3(0, 0, b, _, y, v), d = createInnerCylinderPathD3(0, 0, b, _, y, v), p = e.path(u, userNodeOverrides(l, {})), m = e.path(d, userNodeOverrides(l, { fill: "none" }));
2422
+ S = f.insert(() => m, ":first-child"), S = f.insert(() => p, ":first-child"), S.attr("class", "basic label-container"), x && S.attr("style", x);
2423
+ } else {
2424
+ let e = createCylinderPathD3(0, 0, b, _, y, v);
2425
+ S = f.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container").attr("style", handleUndefinedAttr(x)).attr("style", d), S.attr("class", "basic label-container"), x && S.selectAll("path").attr("style", x), d && S.selectAll("path").attr("style", d);
2426
+ }
2427
+ return S.attr("label-offset-x", y), S.attr("transform", `translate(${-b / 2}, ${_ / 2} )`), m.attr("transform", `translate(${-(p.width / 2) - y - (p.x - (p.left ?? 0))}, ${-(p.height / 2) - (p.y - (p.top ?? 0))})`), updateNodeBounds(l, S), l.intersect = function(e) {
2428
+ let u = intersect_default.rect(l, e), d = u.y - (l.y ?? 0);
2429
+ if (v != 0 && (Math.abs(d) < (l.height ?? 0) / 2 || Math.abs(d) == (l.height ?? 0) / 2 && Math.abs(u.x - (l.x ?? 0)) > (l.width ?? 0) / 2 - y)) {
2430
+ let f = y * y * (1 - d * d / (v * v));
2431
+ f != 0 && (f = Math.sqrt(Math.abs(f))), f = y - f, e.x - (l.x ?? 0) > 0 && (f = -f), u.x += f;
2432
+ }
2433
+ return u;
2434
+ }, f;
2435
+ }
2436
+ __name(tiltedCylinder, "tiltedCylinder");
2437
+ async function trapezoid(e, l) {
2438
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
2439
+ l.labelStyle = u;
2440
+ let { shapeSvg: f, bbox: p } = await labelHelper(e, l, getNodeClasses(l)), m = p.width + l.padding, h = p.height + l.padding, g = [
2441
+ {
2442
+ x: -3 * h / 6,
2443
+ y: 0
2444
+ },
2445
+ {
2446
+ x: m + 3 * h / 6,
2447
+ y: 0
2448
+ },
2449
+ {
2450
+ x: m,
2451
+ y: -h
2452
+ },
2453
+ {
2454
+ x: 0,
2455
+ y: -h
2456
+ }
2457
+ ], _, { cssStyles: v } = l;
2458
+ if (l.look === "handDrawn") {
2459
+ let e = at.svg(f), u = userNodeOverrides(l, {}), d = createPathFromPoints(g), p = e.path(d, u);
2460
+ _ = f.insert(() => p, ":first-child").attr("transform", `translate(${-m / 2}, ${h / 2})`), v && _.attr("style", v);
2461
+ } else _ = insertPolygonShape(f, m, h, g);
2462
+ return d && _.attr("style", d), l.width = m, l.height = h, updateNodeBounds(l, _), l.intersect = function(e) {
2463
+ return intersect_default.polygon(l, g, e);
2464
+ }, f;
2465
+ }
2466
+ __name(trapezoid, "trapezoid");
2467
+ async function trapezoidalPentagon(e, l) {
2468
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
2469
+ l.labelStyle = u;
2470
+ let { shapeSvg: f, bbox: p } = await labelHelper(e, l, getNodeClasses(l)), m = Math.max(60, p.width + (l.padding ?? 0) * 2, l?.width ?? 0), h = Math.max(20, p.height + (l.padding ?? 0) * 2, l?.height ?? 0), { cssStyles: g } = l, _ = at.svg(f), v = userNodeOverrides(l, {});
2471
+ l.look !== "handDrawn" && (v.roughness = 0, v.fillStyle = "solid");
2472
+ let y = [
2473
+ {
2474
+ x: -m / 2 * .8,
2475
+ y: -h / 2
2476
+ },
2477
+ {
2478
+ x: m / 2 * .8,
2479
+ y: -h / 2
2480
+ },
2481
+ {
2482
+ x: m / 2,
2483
+ y: -h / 2 * .6
2484
+ },
2485
+ {
2486
+ x: m / 2,
2487
+ y: h / 2
2488
+ },
2489
+ {
2490
+ x: -m / 2,
2491
+ y: h / 2
2492
+ },
2493
+ {
2494
+ x: -m / 2,
2495
+ y: -h / 2 * .6
2496
+ }
2497
+ ], b = createPathFromPoints(y), x = _.path(b, v), S = f.insert(() => x, ":first-child");
2498
+ return S.attr("class", "basic label-container"), g && l.look !== "handDrawn" && S.selectChildren("path").attr("style", g), d && l.look !== "handDrawn" && S.selectChildren("path").attr("style", d), updateNodeBounds(l, S), l.intersect = function(e) {
2499
+ return intersect_default.polygon(l, y, e);
2500
+ }, f;
2501
+ }
2502
+ __name(trapezoidalPentagon, "trapezoidalPentagon");
2503
+ async function triangle(e, u) {
2504
+ let { labelStyles: d, nodeStyles: p } = styles2String(u);
2505
+ u.labelStyle = d;
2506
+ let { shapeSvg: h, bbox: g, label: _ } = await labelHelper(e, u, getNodeClasses(u)), v = evaluate(getConfig2().flowchart?.htmlLabels), y = g.width + (u.padding ?? 0), b = y + g.height, x = y + g.height, S = [
2507
+ {
2508
+ x: 0,
2509
+ y: 0
2510
+ },
2511
+ {
2512
+ x,
2513
+ y: 0
2514
+ },
2515
+ {
2516
+ x: x / 2,
2517
+ y: -b
2518
+ }
2519
+ ], { cssStyles: C } = u, E = at.svg(h), D = userNodeOverrides(u, {});
2520
+ u.look !== "handDrawn" && (D.roughness = 0, D.fillStyle = "solid");
2521
+ let O = createPathFromPoints(S), k = E.path(O, D), A = h.insert(() => k, ":first-child").attr("transform", `translate(${-b / 2}, ${b / 2})`);
2522
+ return C && u.look !== "handDrawn" && A.selectChildren("path").attr("style", C), p && u.look !== "handDrawn" && A.selectChildren("path").attr("style", p), u.width = y, u.height = b, updateNodeBounds(u, A), _.attr("transform", `translate(${-g.width / 2 - (g.x - (g.left ?? 0))}, ${b / 2 - (g.height + (u.padding ?? 0) / (v ? 2 : 1) - (g.y - (g.top ?? 0)))})`), u.intersect = function(e) {
2523
+ return log.info("Triangle intersect", u, S, e), intersect_default.polygon(u, S, e);
2524
+ }, h;
2525
+ }
2526
+ __name(triangle, "triangle");
2527
+ async function waveEdgedRectangle(e, l) {
2528
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
2529
+ l.labelStyle = u;
2530
+ let { shapeSvg: f, bbox: p, label: m } = await labelHelper(e, l, getNodeClasses(l)), h = Math.max(p.width + (l.padding ?? 0) * 2, l?.width ?? 0), g = Math.max(p.height + (l.padding ?? 0) * 2, l?.height ?? 0), _ = g / 8, v = g + _, { cssStyles: y } = l, b = 70 - h, x = b > 0 ? b / 2 : 0, S = at.svg(f), C = userNodeOverrides(l, {});
2531
+ l.look !== "handDrawn" && (C.roughness = 0, C.fillStyle = "solid");
2532
+ let E = [
2533
+ {
2534
+ x: -h / 2 - x,
2535
+ y: v / 2
2536
+ },
2537
+ ...generateFullSineWavePoints(-h / 2 - x, v / 2, h / 2 + x, v / 2, _, .8),
2538
+ {
2539
+ x: h / 2 + x,
2540
+ y: -v / 2
2541
+ },
2542
+ {
2543
+ x: -h / 2 - x,
2544
+ y: -v / 2
2545
+ }
2546
+ ], D = createPathFromPoints(E), O = S.path(D, C), k = f.insert(() => O, ":first-child");
2547
+ return k.attr("class", "basic label-container"), y && l.look !== "handDrawn" && k.selectAll("path").attr("style", y), d && l.look !== "handDrawn" && k.selectAll("path").attr("style", d), k.attr("transform", `translate(0,${-_ / 2})`), m.attr("transform", `translate(${-h / 2 + (l.padding ?? 0) - (p.x - (p.left ?? 0))},${-g / 2 + (l.padding ?? 0) - _ - (p.y - (p.top ?? 0))})`), updateNodeBounds(l, k), l.intersect = function(e) {
2548
+ return intersect_default.polygon(l, E, e);
2549
+ }, f;
2550
+ }
2551
+ __name(waveEdgedRectangle, "waveEdgedRectangle");
2552
+ async function waveRectangle(e, l) {
2553
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
2554
+ l.labelStyle = u;
2555
+ let { shapeSvg: f, bbox: p } = await labelHelper(e, l, getNodeClasses(l)), m = Math.max(p.width + (l.padding ?? 0) * 2, l?.width ?? 0), h = Math.max(p.height + (l.padding ?? 0) * 2, l?.height ?? 0), g = m / h, _ = m, v = h;
2556
+ _ > v * g ? v = _ / g : _ = v * g, _ = Math.max(_, 100), v = Math.max(v, 50);
2557
+ let y = Math.min(v * .2, v / 4), b = v + y * 2, { cssStyles: x } = l, S = at.svg(f), C = userNodeOverrides(l, {});
2558
+ l.look !== "handDrawn" && (C.roughness = 0, C.fillStyle = "solid");
2559
+ let E = [
2560
+ {
2561
+ x: -_ / 2,
2562
+ y: b / 2
2563
+ },
2564
+ ...generateFullSineWavePoints(-_ / 2, b / 2, _ / 2, b / 2, y, 1),
2565
+ {
2566
+ x: _ / 2,
2567
+ y: -b / 2
2568
+ },
2569
+ ...generateFullSineWavePoints(_ / 2, -b / 2, -_ / 2, -b / 2, y, -1)
2570
+ ], D = createPathFromPoints(E), O = S.path(D, C), k = f.insert(() => O, ":first-child");
2571
+ return k.attr("class", "basic label-container"), x && l.look !== "handDrawn" && k.selectAll("path").attr("style", x), d && l.look !== "handDrawn" && k.selectAll("path").attr("style", d), updateNodeBounds(l, k), l.intersect = function(e) {
2572
+ return intersect_default.polygon(l, E, e);
2573
+ }, f;
2574
+ }
2575
+ __name(waveRectangle, "waveRectangle");
2576
+ async function windowPane(e, l) {
2577
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
2578
+ l.labelStyle = u;
2579
+ let { shapeSvg: f, bbox: p, label: m } = await labelHelper(e, l, getNodeClasses(l)), h = Math.max(p.width + (l.padding ?? 0) * 2, l?.width ?? 0), g = Math.max(p.height + (l.padding ?? 0) * 2, l?.height ?? 0), _ = -h / 2, v = -g / 2, { cssStyles: y } = l, b = at.svg(f), x = userNodeOverrides(l, {}), S = [
2580
+ {
2581
+ x: _ - 5,
2582
+ y: v - 5
2583
+ },
2584
+ {
2585
+ x: _ - 5,
2586
+ y: v + g
2587
+ },
2588
+ {
2589
+ x: _ + h,
2590
+ y: v + g
2591
+ },
2592
+ {
2593
+ x: _ + h,
2594
+ y: v - 5
2595
+ }
2596
+ ], C = `M${_ - 5},${v - 5} L${_ + h},${v - 5} L${_ + h},${v + g} L${_ - 5},${v + g} L${_ - 5},${v - 5}
2597
+ M${_ - 5},${v} L${_ + h},${v}
2598
+ M${_},${v - 5} L${_},${v + g}`;
2599
+ l.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
2600
+ let E = b.path(C, x), D = f.insert(() => E, ":first-child");
2601
+ return D.attr("transform", `translate(${5 / 2}, ${5 / 2})`), D.attr("class", "basic label-container"), y && l.look !== "handDrawn" && D.selectAll("path").attr("style", y), d && l.look !== "handDrawn" && D.selectAll("path").attr("style", d), m.attr("transform", `translate(${-(p.width / 2) + 5 / 2 - (p.x - (p.left ?? 0))}, ${-(p.height / 2) + 5 / 2 - (p.y - (p.top ?? 0))})`), updateNodeBounds(l, D), l.intersect = function(e) {
2602
+ return intersect_default.polygon(l, S, e);
2603
+ }, f;
2604
+ }
2605
+ __name(windowPane, "windowPane");
2606
+ async function erBox(e, l) {
2607
+ let u = l;
2608
+ if (u.alias && (l.label = u.alias), l.look === "handDrawn") {
2609
+ let { themeVariables: u } = getConfig(), { background: d } = u;
2610
+ await erBox(e, {
2611
+ ...l,
2612
+ id: l.id + "-background",
2613
+ look: "default",
2614
+ cssStyles: ["stroke: none", `fill: ${d}`]
2615
+ });
2616
+ }
2617
+ let d = getConfig();
2618
+ l.useHtmlLabels = d.htmlLabels;
2619
+ let m = d.er?.diagramPadding ?? 10, h = d.er?.entityPadding ?? 6, { cssStyles: g } = l, { labelStyles: _, nodeStyles: v } = styles2String(l);
2620
+ if (u.attributes.length === 0 && l.label) {
2621
+ let u = {
2622
+ rx: 0,
2623
+ ry: 0,
2624
+ labelPaddingX: m,
2625
+ labelPaddingY: m * 1.5,
2626
+ classes: ""
2627
+ };
2628
+ calculateTextWidth(l.label, d) + u.labelPaddingX * 2 < d.er.minEntityWidth && (l.width = d.er.minEntityWidth);
2629
+ let p = await drawRect(e, l, u);
2630
+ if (!evaluate(d.htmlLabels)) {
2631
+ let e = p.select("text"), l = e.node()?.getBBox();
2632
+ e.attr("transform", `translate(${-l.width / 2}, 0)`);
2633
+ }
2634
+ return p;
2635
+ }
2636
+ d.htmlLabels || (m *= 1.25, h *= 1.25);
2637
+ let y = getNodeClasses(l);
2638
+ y ||= "node default";
2639
+ let x = e.insert("g").attr("class", y).attr("id", l.domId || l.id), S = await addText(x, l.label ?? "", d, 0, 0, ["name"], _);
2640
+ S.height += h;
2641
+ let C = 0, D = [], O = [], k = 0, A = 0, j = 0, M = 0, N = !0, I = !0;
2642
+ for (let e of u.attributes) {
2643
+ let l = await addText(x, e.type, d, 0, C, ["attribute-type"], _);
2644
+ k = Math.max(k, l.width + m);
2645
+ let u = await addText(x, e.name, d, 0, C, ["attribute-name"], _);
2646
+ A = Math.max(A, u.width + m);
2647
+ let f = await addText(x, e.keys.join(), d, 0, C, ["attribute-keys"], _);
2648
+ j = Math.max(j, f.width + m);
2649
+ let p = await addText(x, e.comment, d, 0, C, ["attribute-comment"], _);
2650
+ M = Math.max(M, p.width + m);
2651
+ let g = Math.max(l.height, u.height, f.height, p.height) + h;
2652
+ O.push({
2653
+ yOffset: C,
2654
+ rowHeight: g
2655
+ }), C += g;
2656
+ }
2657
+ let L = 4;
2658
+ j <= m && (N = !1, j = 0, L--), M <= m && (I = !1, M = 0, L--);
2659
+ let R = x.node().getBBox();
2660
+ if (S.width + m * 2 - (k + A + j + M) > 0) {
2661
+ let e = S.width + m * 2 - (k + A + j + M);
2662
+ k += e / L, A += e / L, j > 0 && (j += e / L), M > 0 && (M += e / L);
2663
+ }
2664
+ let z = k + A + j + M, B = at.svg(x), V = userNodeOverrides(l, {});
2665
+ l.look !== "handDrawn" && (V.roughness = 0, V.fillStyle = "solid");
2666
+ let H = 0;
2667
+ O.length > 0 && (H = O.reduce((e, l) => e + (l?.rowHeight ?? 0), 0));
2668
+ let U = Math.max(R.width + m * 2, l?.width || 0, z), W = Math.max((H ?? 0) + S.height, l?.height || 0), G = -U / 2, K = -W / 2;
2669
+ x.selectAll("g:not(:first-child)").each((e, l, u) => {
2670
+ let d = select_default(u[l]), f = d.attr("transform"), p = 0, g = 0;
2671
+ if (f) {
2672
+ let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(f);
2673
+ e && (p = parseFloat(e[1]), g = parseFloat(e[2]), d.attr("class").includes("attribute-name") ? p += k : d.attr("class").includes("attribute-keys") ? p += k + A : d.attr("class").includes("attribute-comment") && (p += k + A + j));
2674
+ }
2675
+ d.attr("transform", `translate(${G + m / 2 + p}, ${g + K + S.height + h / 2})`);
2676
+ }), x.select(".name").attr("transform", "translate(" + -S.width / 2 + ", " + (K + h / 2) + ")");
2677
+ let q = B.rectangle(G, K, U, W, V), J = x.insert(() => q, ":first-child").attr("style", g.join("")), { themeVariables: Y } = getConfig(), { rowEven: X, rowOdd: Z, nodeBorder: Q } = Y;
2678
+ D.push(0);
2679
+ for (let [e, l] of O.entries()) {
2680
+ let u = (e + 1) % 2 == 0 && l.yOffset !== 0, d = B.rectangle(G, S.height + K + l?.yOffset, U, l?.rowHeight, {
2681
+ ...V,
2682
+ fill: u ? X : Z,
2683
+ stroke: Q
2684
+ });
2685
+ x.insert(() => d, "g.label").attr("style", g.join("")).attr("class", `row-rect-${u ? "even" : "odd"}`);
2686
+ }
2687
+ let $ = B.line(G, S.height + K, U + G, S.height + K, V);
2688
+ x.insert(() => $).attr("class", "divider"), $ = B.line(k + G, S.height + K, k + G, W + K, V), x.insert(() => $).attr("class", "divider"), N && ($ = B.line(k + A + G, S.height + K, k + A + G, W + K, V), x.insert(() => $).attr("class", "divider")), I && ($ = B.line(k + A + j + G, S.height + K, k + A + j + G, W + K, V), x.insert(() => $).attr("class", "divider"));
2689
+ for (let e of D) $ = B.line(G, S.height + K + e, U + G, S.height + K + e, V), x.insert(() => $).attr("class", "divider");
2690
+ if (updateNodeBounds(l, J), v && l.look !== "handDrawn") {
2691
+ let e = v.split(";")?.filter((e) => e.includes("stroke"))?.map((e) => `${e}`).join("; ");
2692
+ x.selectAll("path").attr("style", e ?? ""), x.selectAll(".row-rect-even path").attr("style", v);
2693
+ }
2694
+ return l.intersect = function(e) {
2695
+ return intersect_default.rect(l, e);
2696
+ }, x;
2697
+ }
2698
+ __name(erBox, "erBox");
2699
+ async function addText(e, l, u, d = 0, p = 0, m = [], h = "") {
2700
+ let _ = e.insert("g").attr("class", `label ${m.join(" ")}`).attr("transform", `translate(${d}, ${p})`).attr("style", h);
2701
+ l !== parseGenericTypes(l) && (l = parseGenericTypes(l), l = l.replaceAll("<", "&lt;").replaceAll(">", "&gt;"));
2702
+ let v = _.node().appendChild(await createText(_, l, {
2703
+ width: calculateTextWidth(l, u) + 100,
2704
+ style: h,
2705
+ useHtmlLabels: u.htmlLabels
2706
+ }, u));
2707
+ if (l.includes("&lt;") || l.includes("&gt;")) {
2708
+ let e = v.children[0];
2709
+ for (e.textContent = e.textContent.replaceAll("&lt;", "<").replaceAll("&gt;", ">"); e.childNodes[0];) e = e.childNodes[0], e.textContent = e.textContent.replaceAll("&lt;", "<").replaceAll("&gt;", ">");
2710
+ }
2711
+ let y = v.getBBox();
2712
+ if (evaluate(u.htmlLabels)) {
2713
+ let e = v.children[0];
2714
+ e.style.textAlign = "start";
2715
+ let l = select_default(v);
2716
+ y = e.getBoundingClientRect(), l.attr("width", y.width), l.attr("height", y.height);
2717
+ }
2718
+ return y;
2719
+ }
2720
+ __name(addText, "addText");
2721
+ async function textHelper(e, l, u, d, f = u.class.padding ?? 12) {
2722
+ let p = d ? 0 : 3, m = e.insert("g").attr("class", getNodeClasses(l)).attr("id", l.domId || l.id), h = null, g = null, _ = null, v = null, y = 0, b = 0, x = 0;
2723
+ if (h = m.insert("g").attr("class", "annotation-group text"), l.annotations.length > 0) {
2724
+ let e = l.annotations[0];
2725
+ await addText2(h, { text: `\xAB${e}\xBB` }, 0), y = h.node().getBBox().height;
2726
+ }
2727
+ g = m.insert("g").attr("class", "label-group text"), await addText2(g, l, 0, ["font-weight: bolder"]);
2728
+ let S = g.node().getBBox();
2729
+ b = S.height, _ = m.insert("g").attr("class", "members-group text");
2730
+ let C = 0;
2731
+ for (let e of l.members) {
2732
+ let l = await addText2(_, e, C, [e.parseClassifier()]);
2733
+ C += l + p;
2734
+ }
2735
+ x = _.node().getBBox().height, x <= 0 && (x = f / 2), v = m.insert("g").attr("class", "methods-group text");
2736
+ let w = 0;
2737
+ for (let e of l.methods) {
2738
+ let l = await addText2(v, e, w, [e.parseClassifier()]);
2739
+ w += l + p;
2740
+ }
2741
+ let T = m.node().getBBox();
2742
+ if (h !== null) {
2743
+ let e = h.node().getBBox();
2744
+ h.attr("transform", `translate(${-e.width / 2})`);
2745
+ }
2746
+ return g.attr("transform", `translate(${-S.width / 2}, ${y})`), T = m.node().getBBox(), _.attr("transform", `translate(0, ${y + b + f * 2})`), T = m.node().getBBox(), v.attr("transform", `translate(0, ${y + b + (x ? x + f * 4 : f * 2)})`), T = m.node().getBBox(), {
2747
+ shapeSvg: m,
2748
+ bbox: T
2749
+ };
2750
+ }
2751
+ __name(textHelper, "textHelper");
2752
+ async function addText2(l, u, d, m = []) {
2753
+ let g = l.insert("g").attr("class", "label").attr("style", m.join("; ")), _ = getConfig(), v = "useHtmlLabels" in u ? u.useHtmlLabels : evaluate(_.htmlLabels) ?? !0, x = "";
2754
+ x = "text" in u ? u.text : u.label, !v && x.startsWith("\\") && (x = x.substring(1)), hasKatex(x) && (v = !0);
2755
+ let S = await createText(g, sanitizeText3(decodeEntities(x)), {
2756
+ width: calculateTextWidth(x, _) + 50,
2757
+ classes: "markdown-node-label",
2758
+ useHtmlLabels: v
2759
+ }, _), C, w = 1;
2760
+ if (v) {
2761
+ let l = S.children[0], u = select_default(S);
2762
+ w = l.innerHTML.split("<br>").length, l.innerHTML.includes("</math>") && (w += l.innerHTML.split("<mrow>").length - 1);
2763
+ let d = l.getElementsByTagName("img");
2764
+ if (d) {
2765
+ let l = x.replace(/<img[^>]*>/g, "").trim() === "";
2766
+ await Promise.all([...d].map((u) => new Promise((d) => {
2767
+ function f() {
2768
+ if (u.style.display = "flex", u.style.flexDirection = "column", l) {
2769
+ let e = _.fontSize?.toString() ?? window.getComputedStyle(document.body).fontSize, l = parseInt(e, 10) * 5 + "px";
2770
+ u.style.minWidth = l, u.style.maxWidth = l;
2771
+ } else u.style.width = "100%";
2772
+ d(u);
2773
+ }
2774
+ __name(f, "setupImage"), setTimeout(() => {
2775
+ u.complete && f();
2776
+ }), u.addEventListener("error", f), u.addEventListener("load", f);
2777
+ })));
2778
+ }
2779
+ C = l.getBoundingClientRect(), u.attr("width", C.width), u.attr("height", C.height);
2780
+ } else {
2781
+ m.includes("font-weight: bolder") && select_default(S).selectAll("tspan").attr("font-weight", ""), w = S.children.length;
2782
+ let e = S.children[0];
2783
+ (S.textContent === "" || S.textContent.includes("&gt")) && (e.textContent = x[0] + x.substring(1).replaceAll("&gt;", ">").replaceAll("&lt;", "<").trim(), x[1] === " " && (e.textContent = e.textContent[0] + " " + e.textContent.substring(1))), e.textContent === "undefined" && (e.textContent = ""), C = S.getBBox();
2784
+ }
2785
+ return g.attr("transform", "translate(0," + (-C.height / (2 * w) + d) + ")"), C.height;
2786
+ }
2787
+ __name(addText2, "addText");
2788
+ async function classBox(e, l) {
2789
+ let u = getConfig2(), d = u.class.padding ?? 12, p = d, h = l.useHtmlLabels ?? evaluate(u.htmlLabels) ?? !0, g = l;
2790
+ g.annotations = g.annotations ?? [], g.members = g.members ?? [], g.methods = g.methods ?? [];
2791
+ let { shapeSvg: _, bbox: v } = await textHelper(e, l, u, h, p), { labelStyles: y, nodeStyles: x } = styles2String(l);
2792
+ l.labelStyle = y, l.cssStyles = g.styles || "";
2793
+ let S = g.styles?.join(";") || x || "";
2794
+ l.cssStyles ||= S.replaceAll("!important", "").split(";");
2795
+ let C = g.members.length === 0 && g.methods.length === 0 && !u.class?.hideEmptyMembersBox, E = at.svg(_), D = userNodeOverrides(l, {});
2796
+ l.look !== "handDrawn" && (D.roughness = 0, D.fillStyle = "solid");
2797
+ let O = v.width, k = v.height;
2798
+ g.members.length === 0 && g.methods.length === 0 ? k += p : g.members.length > 0 && g.methods.length === 0 && (k += p * 2);
2799
+ let A = -O / 2, j = -k / 2, M = E.rectangle(A - d, j - d - (C ? d : g.members.length === 0 && g.methods.length === 0 ? -d / 2 : 0), O + 2 * d, k + 2 * d + (C ? d * 2 : g.members.length === 0 && g.methods.length === 0 ? -d : 0), D), N = _.insert(() => M, ":first-child");
2800
+ N.attr("class", "basic label-container");
2801
+ let F = N.node().getBBox();
2802
+ _.selectAll(".text").each((e, l, u) => {
2803
+ let f = select_default(u[l]), p = f.attr("transform"), m = 0;
2804
+ if (p) {
2805
+ let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(p);
2806
+ e && (m = parseFloat(e[2]));
2807
+ }
2808
+ let v = m + j + d - (C ? d : g.members.length === 0 && g.methods.length === 0 ? -d / 2 : 0);
2809
+ h || (v -= 4);
2810
+ let y = A;
2811
+ (f.attr("class").includes("label-group") || f.attr("class").includes("annotation-group")) && (y = -f.node()?.getBBox().width / 2 || 0, _.selectAll("text").each(function(e, l, u) {
2812
+ window.getComputedStyle(u[l]).textAnchor === "middle" && (y = 0);
2813
+ })), f.attr("transform", `translate(${y}, ${v})`);
2814
+ });
2815
+ let I = _.select(".annotation-group").node().getBBox().height - (C ? d / 2 : 0) || 0, L = _.select(".label-group").node().getBBox().height - (C ? d / 2 : 0) || 0, R = _.select(".members-group").node().getBBox().height - (C ? d / 2 : 0) || 0;
2816
+ if (g.members.length > 0 || g.methods.length > 0 || C) {
2817
+ let e = E.line(F.x, I + L + j + d, F.x + F.width, I + L + j + d, D);
2818
+ _.insert(() => e).attr("class", "divider").attr("style", S);
2819
+ }
2820
+ if (C || g.members.length > 0 || g.methods.length > 0) {
2821
+ let e = E.line(F.x, I + L + R + j + p * 2 + d, F.x + F.width, I + L + R + j + d + p * 2, D);
2822
+ _.insert(() => e).attr("class", "divider").attr("style", S);
2823
+ }
2824
+ if (g.look !== "handDrawn" && _.selectAll("path").attr("style", S), N.select(":nth-child(2)").attr("style", S), _.selectAll(".divider").select("path").attr("style", S), l.labelStyle ? _.selectAll("span").attr("style", l.labelStyle) : _.selectAll("span").attr("style", S), !h) {
2825
+ let e = RegExp(/color\s*:\s*([^;]*)/), l = e.exec(S);
2826
+ if (l) {
2827
+ let e = l[0].replace("color", "fill");
2828
+ _.selectAll("tspan").attr("style", e);
2829
+ } else if (y) {
2830
+ let l = e.exec(y);
2831
+ if (l) {
2832
+ let e = l[0].replace("color", "fill");
2833
+ _.selectAll("tspan").attr("style", e);
2834
+ }
2835
+ }
2836
+ }
2837
+ return updateNodeBounds(l, N), l.intersect = function(e) {
2838
+ return intersect_default.rect(l, e);
2839
+ }, _;
2840
+ }
2841
+ __name(classBox, "classBox");
2842
+ async function requirementBox(e, l) {
2843
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
2844
+ l.labelStyle = u;
2845
+ let f = l, p = l, m = "verifyMethod" in l, h = getNodeClasses(l), g = e.insert("g").attr("class", h).attr("id", l.domId ?? l.id), _;
2846
+ _ = m ? await addText3(g, `&lt;&lt;${f.type}&gt;&gt;`, 0, l.labelStyle) : await addText3(g, "&lt;&lt;Element&gt;&gt;", 0, l.labelStyle);
2847
+ let v = _, y = await addText3(g, f.name, v, l.labelStyle + "; font-weight: bold;");
2848
+ if (v += y + 20, m) {
2849
+ let e = await addText3(g, `${f.requirementId ? `ID: ${f.requirementId}` : ""}`, v, l.labelStyle);
2850
+ v += e;
2851
+ let u = await addText3(g, `${f.text ? `Text: ${f.text}` : ""}`, v, l.labelStyle);
2852
+ v += u;
2853
+ let d = await addText3(g, `${f.risk ? `Risk: ${f.risk}` : ""}`, v, l.labelStyle);
2854
+ v += d, await addText3(g, `${f.verifyMethod ? `Verification: ${f.verifyMethod}` : ""}`, v, l.labelStyle);
2855
+ } else {
2856
+ let e = await addText3(g, `${p.type ? `Type: ${p.type}` : ""}`, v, l.labelStyle);
2857
+ v += e, await addText3(g, `${p.docRef ? `Doc Ref: ${p.docRef}` : ""}`, v, l.labelStyle);
2858
+ }
2859
+ let x = (g.node()?.getBBox().width ?? 200) + 20, S = (g.node()?.getBBox().height ?? 200) + 20, C = -x / 2, E = -S / 2, D = at.svg(g), O = userNodeOverrides(l, {});
2860
+ l.look !== "handDrawn" && (O.roughness = 0, O.fillStyle = "solid");
2861
+ let k = D.rectangle(C, E, x, S, O), A = g.insert(() => k, ":first-child");
2862
+ if (A.attr("class", "basic label-container").attr("style", d), g.selectAll(".label").each((e, l, u) => {
2863
+ let d = select_default(u[l]), f = d.attr("transform"), p = 0, m = 0;
2864
+ if (f) {
2865
+ let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(f);
2866
+ e && (p = parseFloat(e[1]), m = parseFloat(e[2]));
2867
+ }
2868
+ let h = m - S / 2, g = C + 20 / 2;
2869
+ (l === 0 || l === 1) && (g = p), d.attr("transform", `translate(${g}, ${h + 20})`);
2870
+ }), v > _ + y + 20) {
2871
+ let e = D.line(C, E + _ + y + 20, C + x, E + _ + y + 20, O);
2872
+ g.insert(() => e).attr("style", d);
2873
+ }
2874
+ return updateNodeBounds(l, A), l.intersect = function(e) {
2875
+ return intersect_default.rect(l, e);
2876
+ }, g;
2877
+ }
2878
+ __name(requirementBox, "requirementBox");
2879
+ async function addText3(e, l, u, d = "") {
2880
+ if (l === "") return 0;
2881
+ let f = e.insert("g").attr("class", "label").attr("style", d), p = getConfig2(), h = p.htmlLabels ?? !0, g = await createText(f, sanitizeText3(decodeEntities(l)), {
2882
+ width: calculateTextWidth(l, p) + 50,
2883
+ classes: "markdown-node-label",
2884
+ useHtmlLabels: h,
2885
+ style: d
2886
+ }, p), _;
2887
+ if (h) {
2888
+ let e = g.children[0], l = select_default(g);
2889
+ _ = e.getBoundingClientRect(), l.attr("width", _.width), l.attr("height", _.height);
2890
+ } else {
2891
+ let e = g.children[0];
2892
+ for (let l of e.children) l.textContent = l.textContent.replaceAll("&gt;", ">").replaceAll("&lt;", "<"), d && l.setAttribute("style", d);
2893
+ _ = g.getBBox(), _.height += 6;
2894
+ }
2895
+ return f.attr("transform", `translate(${-_.width / 2},${-_.height / 2 + u})`), _.height;
2896
+ }
2897
+ __name(addText3, "addText");
2898
+ var colorFromPriority = /* @__PURE__ */ __name((e) => {
2899
+ switch (e) {
2900
+ case "Very High": return "red";
2901
+ case "High": return "orange";
2902
+ case "Medium": return null;
2903
+ case "Low": return "blue";
2904
+ case "Very Low": return "lightblue";
2905
+ }
2906
+ }, "colorFromPriority");
2907
+ async function kanbanItem(e, l, { config: u }) {
2908
+ let { labelStyles: d, nodeStyles: f } = styles2String(l);
2909
+ l.labelStyle = d || "";
2910
+ let p = l.width;
2911
+ l.width = (l.width ?? 200) - 10;
2912
+ let { shapeSvg: m, bbox: h, label: g } = await labelHelper(e, l, getNodeClasses(l)), _ = l.padding || 10, v = "", y;
2913
+ "ticket" in l && l.ticket && u?.kanban?.ticketBaseUrl && (v = u?.kanban?.ticketBaseUrl.replace("#TICKET#", l.ticket), y = m.insert("svg:a", ":first-child").attr("class", "kanban-ticket-link").attr("xlink:href", v).attr("target", "_blank"));
2914
+ let b = {
2915
+ useHtmlLabels: l.useHtmlLabels,
2916
+ labelStyle: l.labelStyle || "",
2917
+ width: l.width,
2918
+ img: l.img,
2919
+ padding: l.padding || 8,
2920
+ centerLabel: !1
2921
+ }, x, S;
2922
+ y ? {label: x, bbox: S} = await insertLabel(y, "ticket" in l && l.ticket || "", b) : {label: x, bbox: S} = await insertLabel(m, "ticket" in l && l.ticket || "", b);
2923
+ let { label: C, bbox: E } = await insertLabel(m, "assigned" in l && l.assigned || "", b);
2924
+ l.width = p;
2925
+ let D = l?.width || 0, O = Math.max(S.height, E.height) / 2, k = Math.max(h.height + 20, l?.height || 0) + O, A = -D / 2, j = -k / 2;
2926
+ g.attr("transform", "translate(" + (_ - D / 2) + ", " + (-O - h.height / 2) + ")"), x.attr("transform", "translate(" + (_ - D / 2) + ", " + (-O + h.height / 2) + ")"), C.attr("transform", "translate(" + (_ + D / 2 - E.width - 20) + ", " + (-O + h.height / 2) + ")");
2927
+ let I, { rx: L, ry: R } = l, { cssStyles: z } = l;
2928
+ if (l.look === "handDrawn") {
2929
+ let e = at.svg(m), u = userNodeOverrides(l, {}), d = L || R ? e.path(createRoundedRectPathD(A, j, D, k, L || 0), u) : e.rectangle(A, j, D, k, u);
2930
+ I = m.insert(() => d, ":first-child"), I.attr("class", "basic label-container").attr("style", z || null);
2931
+ } else {
2932
+ I = m.insert("rect", ":first-child"), I.attr("class", "basic label-container __APA__").attr("style", f).attr("rx", L ?? 5).attr("ry", R ?? 5).attr("x", A).attr("y", j).attr("width", D).attr("height", k);
2933
+ let e = "priority" in l && l.priority;
2934
+ if (e) {
2935
+ let l = m.append("line"), u = A + 2, d = j + Math.floor((L ?? 0) / 2), f = j + k - Math.floor((L ?? 0) / 2);
2936
+ l.attr("x1", u).attr("y1", d).attr("x2", u).attr("y2", f).attr("stroke-width", "4").attr("stroke", colorFromPriority(e));
2937
+ }
2938
+ }
2939
+ return updateNodeBounds(l, I), l.height = k, l.intersect = function(e) {
2940
+ return intersect_default.rect(l, e);
2941
+ }, m;
2942
+ }
2943
+ __name(kanbanItem, "kanbanItem");
2944
+ async function bang(e, u) {
2945
+ let { labelStyles: d, nodeStyles: f } = styles2String(u);
2946
+ u.labelStyle = d;
2947
+ let { shapeSvg: p, bbox: m, halfPadding: h, label: g } = await labelHelper(e, u, getNodeClasses(u)), _ = m.width + 10 * h, v = m.height + 8 * h, y = .15 * _, { cssStyles: b } = u, x = m.width + 20, S = m.height + 20, C = Math.max(_, x), E = Math.max(v, S);
2948
+ g.attr("transform", `translate(${-m.width / 2}, ${-m.height / 2})`);
2949
+ let D, k = `M0 0
2950
+ a${y},${y} 1 0,0 ${C * .25},${-1 * E * .1}
2951
+ a${y},${y} 1 0,0 ${C * .25},0
2952
+ a${y},${y} 1 0,0 ${C * .25},0
2953
+ a${y},${y} 1 0,0 ${C * .25},${E * .1}
2954
+
2955
+ a${y},${y} 1 0,0 ${C * .15},${E * .33}
2956
+ a${y * .8},${y * .8} 1 0,0 0,${E * .34}
2957
+ a${y},${y} 1 0,0 ${-1 * C * .15},${E * .33}
2958
+
2959
+ a${y},${y} 1 0,0 ${-1 * C * .25},${E * .15}
2960
+ a${y},${y} 1 0,0 ${-1 * C * .25},0
2961
+ a${y},${y} 1 0,0 ${-1 * C * .25},0
2962
+ a${y},${y} 1 0,0 ${-1 * C * .25},${-1 * E * .15}
2963
+
2964
+ a${y},${y} 1 0,0 ${-1 * C * .1},${-1 * E * .33}
2965
+ a${y * .8},${y * .8} 1 0,0 0,${-1 * E * .34}
2966
+ a${y},${y} 1 0,0 ${C * .1},${-1 * E * .33}
2967
+ H0 V0 Z`;
2968
+ if (u.look === "handDrawn") {
2969
+ let e = at.svg(p), l = userNodeOverrides(u, {}), d = e.path(k, l);
2970
+ D = p.insert(() => d, ":first-child"), D.attr("class", "basic label-container").attr("style", handleUndefinedAttr(b));
2971
+ } else D = p.insert("path", ":first-child").attr("class", "basic label-container").attr("style", f).attr("d", k);
2972
+ return D.attr("transform", `translate(${-C / 2}, ${-E / 2})`), updateNodeBounds(u, D), u.calcIntersect = function(e, l) {
2973
+ return intersect_default.rect(e, l);
2974
+ }, u.intersect = function(e) {
2975
+ return log.info("Bang intersect", u, e), intersect_default.rect(u, e);
2976
+ }, p;
2977
+ }
2978
+ __name(bang, "bang");
2979
+ async function cloud(e, u) {
2980
+ let { labelStyles: d, nodeStyles: f } = styles2String(u);
2981
+ u.labelStyle = d;
2982
+ let { shapeSvg: p, bbox: m, halfPadding: h, label: g } = await labelHelper(e, u, getNodeClasses(u)), _ = m.width + 2 * h, v = m.height + 2 * h, y = .15 * _, b = .25 * _, x = .35 * _, S = .2 * _, { cssStyles: C } = u, E, D = `M0 0
2983
+ a${y},${y} 0 0,1 ${_ * .25},${-1 * _ * .1}
2984
+ a${x},${x} 1 0,1 ${_ * .4},${-1 * _ * .1}
2985
+ a${b},${b} 1 0,1 ${_ * .35},${_ * .2}
2986
+
2987
+ a${y},${y} 1 0,1 ${_ * .15},${v * .35}
2988
+ a${S},${S} 1 0,1 ${-1 * _ * .15},${v * .65}
2989
+
2990
+ a${b},${y} 1 0,1 ${-1 * _ * .25},${_ * .15}
2991
+ a${x},${x} 1 0,1 ${-1 * _ * .5},0
2992
+ a${y},${y} 1 0,1 ${-1 * _ * .25},${-1 * _ * .15}
2993
+
2994
+ a${y},${y} 1 0,1 ${-1 * _ * .1},${-1 * v * .35}
2995
+ a${S},${S} 1 0,1 ${_ * .1},${-1 * v * .65}
2996
+ H0 V0 Z`;
2997
+ if (u.look === "handDrawn") {
2998
+ let e = at.svg(p), l = userNodeOverrides(u, {}), d = e.path(D, l);
2999
+ E = p.insert(() => d, ":first-child"), E.attr("class", "basic label-container").attr("style", handleUndefinedAttr(C));
3000
+ } else E = p.insert("path", ":first-child").attr("class", "basic label-container").attr("style", f).attr("d", D);
3001
+ return g.attr("transform", `translate(${-m.width / 2}, ${-m.height / 2})`), E.attr("transform", `translate(${-_ / 2}, ${-v / 2})`), updateNodeBounds(u, E), u.calcIntersect = function(e, l) {
3002
+ return intersect_default.rect(e, l);
3003
+ }, u.intersect = function(e) {
3004
+ return log.info("Cloud intersect", u, e), intersect_default.rect(u, e);
3005
+ }, p;
3006
+ }
3007
+ __name(cloud, "cloud");
3008
+ async function defaultMindmapNode(e, l) {
3009
+ let { labelStyles: u, nodeStyles: d } = styles2String(l);
3010
+ l.labelStyle = u;
3011
+ let { shapeSvg: f, bbox: p, halfPadding: m, label: h } = await labelHelper(e, l, getNodeClasses(l)), g = p.width + 8 * m, _ = p.height + 2 * m, v = `
3012
+ M${-g / 2} ${_ / 2 - 5}
3013
+ v${-_ + 10}
3014
+ q0,-5 5,-5
3015
+ h${g - 10}
3016
+ q5,0 5,5
3017
+ v${_ - 10}
3018
+ q0,5 -5,5
3019
+ h${-g + 10}
3020
+ q-5,0 -5,-5
3021
+ Z
3022
+ `, y = f.append("path").attr("id", "node-" + l.id).attr("class", "node-bkg node-" + l.type).attr("style", d).attr("d", v);
3023
+ return f.append("line").attr("class", "node-line-").attr("x1", -g / 2).attr("y1", _ / 2).attr("x2", g / 2).attr("y2", _ / 2), h.attr("transform", `translate(${-p.width / 2}, ${-p.height / 2})`), f.append(() => h.node()), updateNodeBounds(l, y), l.calcIntersect = function(e, l) {
3024
+ return intersect_default.rect(e, l);
3025
+ }, l.intersect = function(e) {
3026
+ return intersect_default.rect(l, e);
3027
+ }, f;
3028
+ }
3029
+ __name(defaultMindmapNode, "defaultMindmapNode");
3030
+ async function mindmapCircle(e, l) {
3031
+ return circle(e, l, { padding: l.padding ?? 0 });
3032
+ }
3033
+ __name(mindmapCircle, "mindmapCircle");
3034
+ var shapesDefs = [
3035
+ {
3036
+ semanticName: "Process",
3037
+ name: "Rectangle",
3038
+ shortName: "rect",
3039
+ description: "Standard process shape",
3040
+ aliases: [
3041
+ "proc",
3042
+ "process",
3043
+ "rectangle"
3044
+ ],
3045
+ internalAliases: ["squareRect"],
3046
+ handler: squareRect2
3047
+ },
3048
+ {
3049
+ semanticName: "Event",
3050
+ name: "Rounded Rectangle",
3051
+ shortName: "rounded",
3052
+ description: "Represents an event",
3053
+ aliases: ["event"],
3054
+ internalAliases: ["roundedRect"],
3055
+ handler: roundedRect
3056
+ },
3057
+ {
3058
+ semanticName: "Terminal Point",
3059
+ name: "Stadium",
3060
+ shortName: "stadium",
3061
+ description: "Terminal point",
3062
+ aliases: ["terminal", "pill"],
3063
+ handler: stadium
3064
+ },
3065
+ {
3066
+ semanticName: "Subprocess",
3067
+ name: "Framed Rectangle",
3068
+ shortName: "fr-rect",
3069
+ description: "Subprocess",
3070
+ aliases: [
3071
+ "subprocess",
3072
+ "subproc",
3073
+ "framed-rectangle",
3074
+ "subroutine"
3075
+ ],
3076
+ handler: subroutine
3077
+ },
3078
+ {
3079
+ semanticName: "Database",
3080
+ name: "Cylinder",
3081
+ shortName: "cyl",
3082
+ description: "Database storage",
3083
+ aliases: [
3084
+ "db",
3085
+ "database",
3086
+ "cylinder"
3087
+ ],
3088
+ handler: cylinder
3089
+ },
3090
+ {
3091
+ semanticName: "Start",
3092
+ name: "Circle",
3093
+ shortName: "circle",
3094
+ description: "Starting point",
3095
+ aliases: ["circ"],
3096
+ handler: circle
3097
+ },
3098
+ {
3099
+ semanticName: "Bang",
3100
+ name: "Bang",
3101
+ shortName: "bang",
3102
+ description: "Bang",
3103
+ aliases: ["bang"],
3104
+ handler: bang
3105
+ },
3106
+ {
3107
+ semanticName: "Cloud",
3108
+ name: "Cloud",
3109
+ shortName: "cloud",
3110
+ description: "cloud",
3111
+ aliases: ["cloud"],
3112
+ handler: cloud
3113
+ },
3114
+ {
3115
+ semanticName: "Decision",
3116
+ name: "Diamond",
3117
+ shortName: "diam",
3118
+ description: "Decision-making step",
3119
+ aliases: [
3120
+ "decision",
3121
+ "diamond",
3122
+ "question"
3123
+ ],
3124
+ handler: question
3125
+ },
3126
+ {
3127
+ semanticName: "Prepare Conditional",
3128
+ name: "Hexagon",
3129
+ shortName: "hex",
3130
+ description: "Preparation or condition step",
3131
+ aliases: ["hexagon", "prepare"],
3132
+ handler: hexagon
3133
+ },
3134
+ {
3135
+ semanticName: "Data Input/Output",
3136
+ name: "Lean Right",
3137
+ shortName: "lean-r",
3138
+ description: "Represents input or output",
3139
+ aliases: ["lean-right", "in-out"],
3140
+ internalAliases: ["lean_right"],
3141
+ handler: lean_right
3142
+ },
3143
+ {
3144
+ semanticName: "Data Input/Output",
3145
+ name: "Lean Left",
3146
+ shortName: "lean-l",
3147
+ description: "Represents output or input",
3148
+ aliases: ["lean-left", "out-in"],
3149
+ internalAliases: ["lean_left"],
3150
+ handler: lean_left
3151
+ },
3152
+ {
3153
+ semanticName: "Priority Action",
3154
+ name: "Trapezoid Base Bottom",
3155
+ shortName: "trap-b",
3156
+ description: "Priority action",
3157
+ aliases: [
3158
+ "priority",
3159
+ "trapezoid-bottom",
3160
+ "trapezoid"
3161
+ ],
3162
+ handler: trapezoid
3163
+ },
3164
+ {
3165
+ semanticName: "Manual Operation",
3166
+ name: "Trapezoid Base Top",
3167
+ shortName: "trap-t",
3168
+ description: "Represents a manual task",
3169
+ aliases: [
3170
+ "manual",
3171
+ "trapezoid-top",
3172
+ "inv-trapezoid"
3173
+ ],
3174
+ internalAliases: ["inv_trapezoid"],
3175
+ handler: inv_trapezoid
3176
+ },
3177
+ {
3178
+ semanticName: "Stop",
3179
+ name: "Double Circle",
3180
+ shortName: "dbl-circ",
3181
+ description: "Represents a stop point",
3182
+ aliases: ["double-circle"],
3183
+ internalAliases: ["doublecircle"],
3184
+ handler: doublecircle
3185
+ },
3186
+ {
3187
+ semanticName: "Text Block",
3188
+ name: "Text Block",
3189
+ shortName: "text",
3190
+ description: "Text block",
3191
+ handler: text
3192
+ },
3193
+ {
3194
+ semanticName: "Card",
3195
+ name: "Notched Rectangle",
3196
+ shortName: "notch-rect",
3197
+ description: "Represents a card",
3198
+ aliases: ["card", "notched-rectangle"],
3199
+ handler: card
3200
+ },
3201
+ {
3202
+ semanticName: "Lined/Shaded Process",
3203
+ name: "Lined Rectangle",
3204
+ shortName: "lin-rect",
3205
+ description: "Lined process shape",
3206
+ aliases: [
3207
+ "lined-rectangle",
3208
+ "lined-process",
3209
+ "lin-proc",
3210
+ "shaded-process"
3211
+ ],
3212
+ handler: shadedProcess
3213
+ },
3214
+ {
3215
+ semanticName: "Start",
3216
+ name: "Small Circle",
3217
+ shortName: "sm-circ",
3218
+ description: "Small starting point",
3219
+ aliases: ["start", "small-circle"],
3220
+ internalAliases: ["stateStart"],
3221
+ handler: stateStart
3222
+ },
3223
+ {
3224
+ semanticName: "Stop",
3225
+ name: "Framed Circle",
3226
+ shortName: "fr-circ",
3227
+ description: "Stop point",
3228
+ aliases: ["stop", "framed-circle"],
3229
+ internalAliases: ["stateEnd"],
3230
+ handler: stateEnd
3231
+ },
3232
+ {
3233
+ semanticName: "Fork/Join",
3234
+ name: "Filled Rectangle",
3235
+ shortName: "fork",
3236
+ description: "Fork or join in process flow",
3237
+ aliases: ["join"],
3238
+ internalAliases: ["forkJoin"],
3239
+ handler: forkJoin
3240
+ },
3241
+ {
3242
+ semanticName: "Collate",
3243
+ name: "Hourglass",
3244
+ shortName: "hourglass",
3245
+ description: "Represents a collate operation",
3246
+ aliases: ["hourglass", "collate"],
3247
+ handler: hourglass
3248
+ },
3249
+ {
3250
+ semanticName: "Comment",
3251
+ name: "Curly Brace",
3252
+ shortName: "brace",
3253
+ description: "Adds a comment",
3254
+ aliases: ["comment", "brace-l"],
3255
+ handler: curlyBraceLeft
3256
+ },
3257
+ {
3258
+ semanticName: "Comment Right",
3259
+ name: "Curly Brace",
3260
+ shortName: "brace-r",
3261
+ description: "Adds a comment",
3262
+ handler: curlyBraceRight
3263
+ },
3264
+ {
3265
+ semanticName: "Comment with braces on both sides",
3266
+ name: "Curly Braces",
3267
+ shortName: "braces",
3268
+ description: "Adds a comment",
3269
+ handler: curlyBraces
3270
+ },
3271
+ {
3272
+ semanticName: "Com Link",
3273
+ name: "Lightning Bolt",
3274
+ shortName: "bolt",
3275
+ description: "Communication link",
3276
+ aliases: ["com-link", "lightning-bolt"],
3277
+ handler: lightningBolt
3278
+ },
3279
+ {
3280
+ semanticName: "Document",
3281
+ name: "Document",
3282
+ shortName: "doc",
3283
+ description: "Represents a document",
3284
+ aliases: ["doc", "document"],
3285
+ handler: waveEdgedRectangle
3286
+ },
3287
+ {
3288
+ semanticName: "Delay",
3289
+ name: "Half-Rounded Rectangle",
3290
+ shortName: "delay",
3291
+ description: "Represents a delay",
3292
+ aliases: ["half-rounded-rectangle"],
3293
+ handler: halfRoundedRectangle
3294
+ },
3295
+ {
3296
+ semanticName: "Direct Access Storage",
3297
+ name: "Horizontal Cylinder",
3298
+ shortName: "h-cyl",
3299
+ description: "Direct access storage",
3300
+ aliases: ["das", "horizontal-cylinder"],
3301
+ handler: tiltedCylinder
3302
+ },
3303
+ {
3304
+ semanticName: "Disk Storage",
3305
+ name: "Lined Cylinder",
3306
+ shortName: "lin-cyl",
3307
+ description: "Disk storage",
3308
+ aliases: ["disk", "lined-cylinder"],
3309
+ handler: linedCylinder
3310
+ },
3311
+ {
3312
+ semanticName: "Display",
3313
+ name: "Curved Trapezoid",
3314
+ shortName: "curv-trap",
3315
+ description: "Represents a display",
3316
+ aliases: ["curved-trapezoid", "display"],
3317
+ handler: curvedTrapezoid
3318
+ },
3319
+ {
3320
+ semanticName: "Divided Process",
3321
+ name: "Divided Rectangle",
3322
+ shortName: "div-rect",
3323
+ description: "Divided process shape",
3324
+ aliases: [
3325
+ "div-proc",
3326
+ "divided-rectangle",
3327
+ "divided-process"
3328
+ ],
3329
+ handler: dividedRectangle
3330
+ },
3331
+ {
3332
+ semanticName: "Extract",
3333
+ name: "Triangle",
3334
+ shortName: "tri",
3335
+ description: "Extraction process",
3336
+ aliases: ["extract", "triangle"],
3337
+ handler: triangle
3338
+ },
3339
+ {
3340
+ semanticName: "Internal Storage",
3341
+ name: "Window Pane",
3342
+ shortName: "win-pane",
3343
+ description: "Internal storage",
3344
+ aliases: ["internal-storage", "window-pane"],
3345
+ handler: windowPane
3346
+ },
3347
+ {
3348
+ semanticName: "Junction",
3349
+ name: "Filled Circle",
3350
+ shortName: "f-circ",
3351
+ description: "Junction point",
3352
+ aliases: ["junction", "filled-circle"],
3353
+ handler: filledCircle
3354
+ },
3355
+ {
3356
+ semanticName: "Loop Limit",
3357
+ name: "Trapezoidal Pentagon",
3358
+ shortName: "notch-pent",
3359
+ description: "Loop limit step",
3360
+ aliases: ["loop-limit", "notched-pentagon"],
3361
+ handler: trapezoidalPentagon
3362
+ },
3363
+ {
3364
+ semanticName: "Manual File",
3365
+ name: "Flipped Triangle",
3366
+ shortName: "flip-tri",
3367
+ description: "Manual file operation",
3368
+ aliases: ["manual-file", "flipped-triangle"],
3369
+ handler: flippedTriangle
3370
+ },
3371
+ {
3372
+ semanticName: "Manual Input",
3373
+ name: "Sloped Rectangle",
3374
+ shortName: "sl-rect",
3375
+ description: "Manual input step",
3376
+ aliases: ["manual-input", "sloped-rectangle"],
3377
+ handler: slopedRect
3378
+ },
3379
+ {
3380
+ semanticName: "Multi-Document",
3381
+ name: "Stacked Document",
3382
+ shortName: "docs",
3383
+ description: "Multiple documents",
3384
+ aliases: [
3385
+ "documents",
3386
+ "st-doc",
3387
+ "stacked-document"
3388
+ ],
3389
+ handler: multiWaveEdgedRectangle
3390
+ },
3391
+ {
3392
+ semanticName: "Multi-Process",
3393
+ name: "Stacked Rectangle",
3394
+ shortName: "st-rect",
3395
+ description: "Multiple processes",
3396
+ aliases: [
3397
+ "procs",
3398
+ "processes",
3399
+ "stacked-rectangle"
3400
+ ],
3401
+ handler: multiRect
3402
+ },
3403
+ {
3404
+ semanticName: "Stored Data",
3405
+ name: "Bow Tie Rectangle",
3406
+ shortName: "bow-rect",
3407
+ description: "Stored data",
3408
+ aliases: ["stored-data", "bow-tie-rectangle"],
3409
+ handler: bowTieRect
3410
+ },
3411
+ {
3412
+ semanticName: "Summary",
3413
+ name: "Crossed Circle",
3414
+ shortName: "cross-circ",
3415
+ description: "Summary",
3416
+ aliases: ["summary", "crossed-circle"],
3417
+ handler: crossedCircle
3418
+ },
3419
+ {
3420
+ semanticName: "Tagged Document",
3421
+ name: "Tagged Document",
3422
+ shortName: "tag-doc",
3423
+ description: "Tagged document",
3424
+ aliases: ["tag-doc", "tagged-document"],
3425
+ handler: taggedWaveEdgedRectangle
3426
+ },
3427
+ {
3428
+ semanticName: "Tagged Process",
3429
+ name: "Tagged Rectangle",
3430
+ shortName: "tag-rect",
3431
+ description: "Tagged process",
3432
+ aliases: [
3433
+ "tagged-rectangle",
3434
+ "tag-proc",
3435
+ "tagged-process"
3436
+ ],
3437
+ handler: taggedRect
3438
+ },
3439
+ {
3440
+ semanticName: "Paper Tape",
3441
+ name: "Flag",
3442
+ shortName: "flag",
3443
+ description: "Paper tape",
3444
+ aliases: ["paper-tape"],
3445
+ handler: waveRectangle
3446
+ },
3447
+ {
3448
+ semanticName: "Odd",
3449
+ name: "Odd",
3450
+ shortName: "odd",
3451
+ description: "Odd shape",
3452
+ internalAliases: ["rect_left_inv_arrow"],
3453
+ handler: rect_left_inv_arrow
3454
+ },
3455
+ {
3456
+ semanticName: "Lined Document",
3457
+ name: "Lined Document",
3458
+ shortName: "lin-doc",
3459
+ description: "Lined document",
3460
+ aliases: ["lined-document"],
3461
+ handler: linedWaveEdgedRect
3462
+ }
3463
+ ], shapes2 = (/* @__PURE__ */ __name(() => {
3464
+ let e = {
3465
+ state,
3466
+ choice,
3467
+ note,
3468
+ rectWithTitle,
3469
+ labelRect,
3470
+ iconSquare,
3471
+ iconCircle,
3472
+ icon,
3473
+ iconRounded,
3474
+ imageSquare,
3475
+ anchor,
3476
+ kanbanItem,
3477
+ mindmapCircle,
3478
+ defaultMindmapNode,
3479
+ classBox,
3480
+ erBox,
3481
+ requirementBox
3482
+ }, l = [...Object.entries(e), ...shapesDefs.flatMap((e) => [
3483
+ e.shortName,
3484
+ ..."aliases" in e ? e.aliases : [],
3485
+ ..."internalAliases" in e ? e.internalAliases : []
3486
+ ].map((l) => [l, e.handler]))];
3487
+ return Object.fromEntries(l);
3488
+ }, "generateShapeMap"))();
3489
+ function isValidShape(e) {
3490
+ return e in shapes2;
3491
+ }
3492
+ __name(isValidShape, "isValidShape");
3493
+ var nodeElems = /* @__PURE__ */ new Map();
3494
+ async function insertNode(e, l, u) {
3495
+ let d, f;
3496
+ l.shape === "rect" && (l.rx && l.ry ? l.shape = "roundedRect" : l.shape = "squareRect");
3497
+ let p = l.shape ? shapes2[l.shape] : void 0;
3498
+ if (!p) throw Error(`No such shape: ${l.shape}. Please check your syntax.`);
3499
+ if (l.link) {
3500
+ let m;
3501
+ u.config.securityLevel === "sandbox" ? m = "_top" : l.linkTarget && (m = l.linkTarget || "_blank"), d = e.insert("svg:a").attr("xlink:href", l.link).attr("target", m ?? null), f = await p(d, l, u);
3502
+ } else f = await p(e, l, u), d = f;
3503
+ return l.tooltip && f.attr("title", l.tooltip), nodeElems.set(l.id, d), l.haveCallback && d.attr("class", d.attr("class") + " clickable"), d;
3504
+ }
3505
+ __name(insertNode, "insertNode");
3506
+ var setNodeElem = /* @__PURE__ */ __name((e, l) => {
3507
+ nodeElems.set(l.id, e);
3508
+ }, "setNodeElem"), clear2 = /* @__PURE__ */ __name(() => {
3509
+ nodeElems.clear();
3510
+ }, "clear"), positionNode = /* @__PURE__ */ __name((e) => {
3511
+ let u = nodeElems.get(e.id);
3512
+ log.trace("Transforming node", e.diff, e, "translate(" + (e.x - e.width / 2 - 5) + ", " + e.width / 2 + ")");
3513
+ let d = e.diff || 0;
3514
+ return e.clusterNode ? u.attr("transform", "translate(" + (e.x + d - e.width / 2) + ", " + (e.y - e.height / 2 - 8) + ")") : u.attr("transform", "translate(" + e.x + ", " + e.y + ")"), d;
3515
+ }, "positionNode");
3516
+ export { clear, clear2, createLabel_default, insertCluster, insertNode, isValidShape, labelHelper, positionNode, setNodeElem, updateNodeBounds };