mxrb 0.1.4 → 0.1.7

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 (949) hide show
  1. checksums.yaml +4 -4
  2. data/README.de-DE.md +4 -1
  3. data/README.md +11 -3
  4. data/README.pt-BR.md +5 -2
  5. data/bin/mxrb +509 -358
  6. data/docker/java-actions/Dockerfile +44 -0
  7. data/docker/java-actions/src/com/mendix/core/Core.java +491 -0
  8. data/docker/java-actions/src/com/mendix/core/CoreException.java +11 -0
  9. data/docker/java-actions/src/com/mendix/core/CoreRuntimeException.java +10 -0
  10. data/docker/java-actions/src/com/mendix/core/actionmanagement/MicroflowCallBuilder.java +19 -0
  11. data/docker/java-actions/src/com/mendix/core/conf/Configuration.java +60 -0
  12. data/docker/java-actions/src/com/mendix/core/conf/RuntimeVersion.java +38 -0
  13. data/docker/java-actions/src/com/mendix/core/internal/ICore.java +5 -0
  14. data/docker/java-actions/src/com/mendix/core/objectmanagement/member/MendixAutoNumber.java +10 -0
  15. data/docker/java-actions/src/com/mendix/core/objectmanagement/member/MendixBinary.java +48 -0
  16. data/docker/java-actions/src/com/mendix/core/objectmanagement/member/MendixBoolean.java +10 -0
  17. data/docker/java-actions/src/com/mendix/core/objectmanagement/member/MendixDateTime.java +15 -0
  18. data/docker/java-actions/src/com/mendix/core/objectmanagement/member/MendixDecimal.java +10 -0
  19. data/docker/java-actions/src/com/mendix/core/objectmanagement/member/MendixEnum.java +18 -0
  20. data/docker/java-actions/src/com/mendix/core/objectmanagement/member/MendixHashString.java +10 -0
  21. data/docker/java-actions/src/com/mendix/core/objectmanagement/member/MendixInteger.java +10 -0
  22. data/docker/java-actions/src/com/mendix/core/objectmanagement/member/MendixLong.java +10 -0
  23. data/docker/java-actions/src/com/mendix/core/objectmanagement/member/MendixObjectMember.java +73 -0
  24. data/docker/java-actions/src/com/mendix/core/objectmanagement/member/MendixObjectReference.java +20 -0
  25. data/docker/java-actions/src/com/mendix/core/objectmanagement/member/MendixObjectReferenceSet.java +22 -0
  26. data/docker/java-actions/src/com/mendix/core/objectmanagement/member/MendixString.java +10 -0
  27. data/docker/java-actions/src/com/mendix/datastorage/DataStorage.java +5 -0
  28. data/docker/java-actions/src/com/mendix/datastorage/XPathBasicQuery.java +29 -0
  29. data/docker/java-actions/src/com/mendix/datastorage/XPathQuery.java +41 -0
  30. data/docker/java-actions/src/com/mendix/externalinterface/connector/RequestHandler.java +38 -0
  31. data/docker/java-actions/src/com/mendix/http/Http.java +5 -0
  32. data/docker/java-actions/src/com/mendix/integration/Integration.java +5 -0
  33. data/docker/java-actions/src/com/mendix/integration/WebserviceException.java +24 -0
  34. data/docker/java-actions/src/com/mendix/logging/ILogNode.java +35 -0
  35. data/docker/java-actions/src/com/mendix/logging/LogLevel.java +4 -0
  36. data/docker/java-actions/src/com/mendix/logging/LogMessage.java +18 -0
  37. data/docker/java-actions/src/com/mendix/logging/LogSubscriber.java +22 -0
  38. data/docker/java-actions/src/com/mendix/m2ee/api/IMxRuntimeRequest.java +20 -0
  39. data/docker/java-actions/src/com/mendix/m2ee/api/IMxRuntimeResponse.java +50 -0
  40. data/docker/java-actions/src/com/mendix/metrics/Counter.java +7 -0
  41. data/docker/java-actions/src/com/mendix/metrics/Gauge.java +7 -0
  42. data/docker/java-actions/src/com/mendix/metrics/Metric.java +17 -0
  43. data/docker/java-actions/src/com/mendix/metrics/Metrics.java +75 -0
  44. data/docker/java-actions/src/com/mendix/metrics/Timer.java +10 -0
  45. data/docker/java-actions/src/com/mendix/systemwideinterfaces/MendixException.java +9 -0
  46. data/docker/java-actions/src/com/mendix/systemwideinterfaces/MendixRuntimeException.java +9 -0
  47. data/docker/java-actions/src/com/mendix/systemwideinterfaces/connectionbus/data/IDataColumnSchema.java +7 -0
  48. data/docker/java-actions/src/com/mendix/systemwideinterfaces/connectionbus/data/IDataRow.java +14 -0
  49. data/docker/java-actions/src/com/mendix/systemwideinterfaces/connectionbus/data/IDataTable.java +11 -0
  50. data/docker/java-actions/src/com/mendix/systemwideinterfaces/connectionbus/data/IDataTableSchema.java +13 -0
  51. data/docker/java-actions/src/com/mendix/systemwideinterfaces/connectionbus/requests/IParameterMap.java +9 -0
  52. data/docker/java-actions/src/com/mendix/systemwideinterfaces/connectionbus/requests/IRetrievalSchema.java +9 -0
  53. data/docker/java-actions/src/com/mendix/systemwideinterfaces/connectionbus/requests/ISortExpression.java +7 -0
  54. data/docker/java-actions/src/com/mendix/systemwideinterfaces/connectionbus/requests/types/IGetRequest.java +9 -0
  55. data/docker/java-actions/src/com/mendix/systemwideinterfaces/connectionbus/requests/types/IOQLTextGetRequest.java +5 -0
  56. data/docker/java-actions/src/com/mendix/systemwideinterfaces/connectionbus/requests/types/ITextGetRequest.java +12 -0
  57. data/docker/java-actions/src/com/mendix/systemwideinterfaces/core/IContext.java +28 -0
  58. data/docker/java-actions/src/com/mendix/systemwideinterfaces/core/IDataType.java +20 -0
  59. data/docker/java-actions/src/com/mendix/systemwideinterfaces/core/IEntityProxy.java +27 -0
  60. data/docker/java-actions/src/com/mendix/systemwideinterfaces/core/IFeedback.java +10 -0
  61. data/docker/java-actions/src/com/mendix/systemwideinterfaces/core/ILanguage.java +11 -0
  62. data/docker/java-actions/src/com/mendix/systemwideinterfaces/core/IMendixIdentifier.java +8 -0
  63. data/docker/java-actions/src/com/mendix/systemwideinterfaces/core/IMendixObject.java +65 -0
  64. data/docker/java-actions/src/com/mendix/systemwideinterfaces/core/IMendixObjectMember.java +20 -0
  65. data/docker/java-actions/src/com/mendix/systemwideinterfaces/core/ISession.java +16 -0
  66. data/docker/java-actions/src/com/mendix/systemwideinterfaces/core/IUser.java +11 -0
  67. data/docker/java-actions/src/com/mendix/systemwideinterfaces/core/UserAction.java +25 -0
  68. data/docker/java-actions/src/com/mendix/systemwideinterfaces/core/meta/IMetaAssociation.java +15 -0
  69. data/docker/java-actions/src/com/mendix/systemwideinterfaces/core/meta/IMetaEnumValue.java +9 -0
  70. data/docker/java-actions/src/com/mendix/systemwideinterfaces/core/meta/IMetaEnumeration.java +9 -0
  71. data/docker/java-actions/src/com/mendix/systemwideinterfaces/core/meta/IMetaObject.java +39 -0
  72. data/docker/java-actions/src/com/mendix/systemwideinterfaces/core/meta/IMetaObjectMember.java +6 -0
  73. data/docker/java-actions/src/com/mendix/systemwideinterfaces/core/meta/IMetaPrimitive.java +19 -0
  74. data/docker/java-actions/src/com/mendix/thirdparty/org/json/JSONArray.java +249 -0
  75. data/docker/java-actions/src/com/mendix/thirdparty/org/json/JSONException.java +14 -0
  76. data/docker/java-actions/src/com/mendix/thirdparty/org/json/JSONObject.java +279 -0
  77. data/docker/java-actions/src/com/mendix/thirdparty/org/json/JSONValues.java +273 -0
  78. data/docker/java-actions/src/com/mendix/utils/ListUtils.java +27 -0
  79. data/docker/java-actions/src/com/mendix/webui/CustomJavaAction.java +11 -0
  80. data/docker/java-actions/src/com/mendix/webui/FeedbackHelper.java +30 -0
  81. data/docker/java-actions/src/javax/servlet/http/Cookie.java +69 -0
  82. data/docker/java-actions/src/javax/servlet/http/HttpServletRequest.java +21 -0
  83. data/docker/java-actions/src/javax/servlet/http/HttpServletResponse.java +27 -0
  84. data/docker/java-actions/src/mxrb/sidecar/Aggregate.java +70 -0
  85. data/docker/java-actions/src/mxrb/sidecar/Background.java +84 -0
  86. data/docker/java-actions/src/mxrb/sidecar/Bridge.java +306 -0
  87. data/docker/java-actions/src/mxrb/sidecar/Build.java +131 -0
  88. data/docker/java-actions/src/mxrb/sidecar/Captions.java +52 -0
  89. data/docker/java-actions/src/mxrb/sidecar/Handlers.java +27 -0
  90. data/docker/java-actions/src/mxrb/sidecar/Invoker.java +110 -0
  91. data/docker/java-actions/src/mxrb/sidecar/Json.java +234 -0
  92. data/docker/java-actions/src/mxrb/sidecar/Metadata.java +119 -0
  93. data/docker/java-actions/src/mxrb/sidecar/MxContext.java +100 -0
  94. data/docker/java-actions/src/mxrb/sidecar/MxDataTable.java +172 -0
  95. data/docker/java-actions/src/mxrb/sidecar/MxDataType.java +100 -0
  96. data/docker/java-actions/src/mxrb/sidecar/MxIdentifier.java +47 -0
  97. data/docker/java-actions/src/mxrb/sidecar/MxLogNode.java +50 -0
  98. data/docker/java-actions/src/mxrb/sidecar/MxMetaAssociation.java +62 -0
  99. data/docker/java-actions/src/mxrb/sidecar/MxMetaEnumeration.java +64 -0
  100. data/docker/java-actions/src/mxrb/sidecar/MxMetaObject.java +234 -0
  101. data/docker/java-actions/src/mxrb/sidecar/MxMetaPrimitive.java +88 -0
  102. data/docker/java-actions/src/mxrb/sidecar/MxMicroflowCall.java +36 -0
  103. data/docker/java-actions/src/mxrb/sidecar/MxObject.java +258 -0
  104. data/docker/java-actions/src/mxrb/sidecar/MxOqlRequest.java +101 -0
  105. data/docker/java-actions/src/mxrb/sidecar/MxRuntimeRequest.java +182 -0
  106. data/docker/java-actions/src/mxrb/sidecar/MxRuntimeResponse.java +122 -0
  107. data/docker/java-actions/src/mxrb/sidecar/MxSession.java +91 -0
  108. data/docker/java-actions/src/mxrb/sidecar/MxXPathQuery.java +127 -0
  109. data/docker/java-actions/src/mxrb/sidecar/RubyException.java +17 -0
  110. data/docker/java-actions/src/mxrb/sidecar/Server.java +56 -0
  111. data/docs/agent-relay/20260901-083127.md +15 -0
  112. data/docs/agent-relay/20260901-091655.md +16 -0
  113. data/docs/agent-relay/20260901-094201.md +16 -0
  114. data/docs/agent-relay/20260901-140415.md +28 -0
  115. data/docs/de-DE/README.md +2 -0
  116. data/docs/de-DE/architectural-standard.md +19 -0
  117. data/docs/de-DE/certificacao-ruby-typescript.md +40 -0
  118. data/docs/de-DE/cobertura-ruby-nativa.md +265 -0
  119. data/docs/de-DE/compiler.md +22 -7
  120. data/docs/de-DE/demanda-projeto-ruby-typescript-convencional.md +37 -0
  121. data/docs/de-DE/design-system.md +59 -2
  122. data/docs/de-DE/entity-dsl.md +12 -0
  123. data/docs/de-DE/method-oriented-flows.md +66 -0
  124. data/docs/de-DE/portabilidade-ruby-typescript.md +1050 -0
  125. data/docs/de-DE/project-structure.md +34 -10
  126. data/docs/de-DE/ruby-first-roadmap.md +286 -0
  127. data/docs/de-DE/runtime-ruby.md +329 -6
  128. data/docs/de-DE/scaffolds.md +8 -4
  129. data/docs/de-DE/studio-backend.md +352 -0
  130. data/docs/de-DE/validation-matrix.md +235 -19
  131. data/docs/de-DE/vetclinic-acceptance.md +4 -3
  132. data/docs/de-DE/windows-studio-pro.md +88 -0
  133. data/docs/de-DE/writing.md +3 -1
  134. data/docs/en-US/README.md +2 -0
  135. data/docs/en-US/architectural-patterns.md +2 -3
  136. data/docs/en-US/architectural-standard.md +21 -1
  137. data/docs/en-US/certificacao-ruby-typescript.md +40 -0
  138. data/docs/en-US/cobertura-ruby-nativa.md +381 -0
  139. data/docs/en-US/compiler.md +33 -6
  140. data/docs/en-US/conventions.md +1 -2
  141. data/docs/en-US/demanda-projeto-ruby-typescript-convencional.md +36 -0
  142. data/docs/en-US/design-system.md +55 -1
  143. data/docs/en-US/entity-dsl.md +12 -0
  144. data/docs/en-US/method-oriented-flows.md +62 -0
  145. data/docs/en-US/portabilidade-ruby-typescript.md +1050 -0
  146. data/docs/en-US/project-structure.md +31 -8
  147. data/docs/en-US/ruby-first-roadmap.md +271 -2
  148. data/docs/en-US/runtime-ruby.md +313 -7
  149. data/docs/en-US/scaffolds.md +7 -4
  150. data/docs/en-US/studio-backend.md +342 -0
  151. data/docs/en-US/validation-matrix.md +173 -48
  152. data/docs/en-US/vetclinic-acceptance.md +4 -2
  153. data/docs/en-US/windows-studio-pro.md +84 -0
  154. data/docs/en-US/writing.md +8 -3
  155. data/docs/guides/benchmark-budget.pt-BR.md +99 -0
  156. data/docs/guides/certificacao-edicoes.pt-BR.md +116 -0
  157. data/docs/guides/teste-manual-vetclinic-ruby.pt-BR.md +480 -0
  158. data/docs/planning/backlog.pt-BR.md +101 -0
  159. data/docs/planning/ruby-editability.pt-BR.md +277 -0
  160. data/docs/pt-BR/README.md +4 -0
  161. data/docs/pt-BR/architectural-standard.md +21 -1
  162. data/docs/pt-BR/certificacao-ruby-typescript.md +116 -0
  163. data/docs/pt-BR/cobertura-ruby-nativa.md +408 -0
  164. data/docs/pt-BR/compiler.md +38 -7
  165. data/docs/pt-BR/demanda-projeto-ruby-typescript-convencional.md +41 -0
  166. data/docs/pt-BR/design-system.md +58 -2
  167. data/docs/pt-BR/entity-dsl.md +12 -0
  168. data/docs/pt-BR/method-oriented-flows.md +158 -0
  169. data/docs/pt-BR/oql-sql.md +11 -1
  170. data/docs/pt-BR/portabilidade-ruby-typescript.md +1311 -0
  171. data/docs/pt-BR/project-structure.md +46 -8
  172. data/docs/pt-BR/ruby-first-roadmap.md +390 -2
  173. data/docs/pt-BR/runtime-ruby.md +321 -11
  174. data/docs/pt-BR/scaffolds.md +17 -4
  175. data/docs/pt-BR/studio-backend.md +363 -0
  176. data/docs/pt-BR/validation-matrix.md +211 -21
  177. data/docs/pt-BR/vetclinic-acceptance.md +4 -5
  178. data/docs/pt-BR/windows-studio-pro.md +85 -0
  179. data/docs/pt-BR/writing.md +4 -0
  180. data/docs/reviews/ruby-code-review-2026-09-05.pt-BR.md +385 -0
  181. data/examples/modbus_application.rb +105 -0
  182. data/examples/modbus_tcp_simulator.rb +137 -0
  183. data/examples/sudoku_evaluation.rb +5 -5
  184. data/examples/sudoku_functional_test.rb +12 -12
  185. data/lib/mxrb/architecture/graph.rb +2 -2
  186. data/lib/mxrb/architecture/validator.rb +5 -3
  187. data/lib/mxrb/benchmark_fixture.rb +19 -0
  188. data/lib/mxrb/caption.rb +107 -0
  189. data/lib/mxrb/cli/help.rb +47 -8
  190. data/lib/mxrb/compare.rb +236 -74
  191. data/lib/mxrb/compiler/activity_caption.rb +168 -0
  192. data/lib/mxrb/compiler/artifact_document_compiler.rb +2 -1
  193. data/lib/mxrb/compiler/attribute_type_index.rb +57 -0
  194. data/lib/mxrb/compiler/client_model_materializer.rb +3 -4
  195. data/lib/mxrb/compiler/code_action_document_compiler.rb +4 -1
  196. data/lib/mxrb/compiler/compatibility_analyzer.rb +53 -0
  197. data/lib/mxrb/compiler/constants_materializer.rb +7 -1
  198. data/lib/mxrb/compiler/data_grid_bundle_compiler.rb +14 -12
  199. data/lib/mxrb/compiler/database_connector_action_compiler.rb +2 -2
  200. data/lib/mxrb/compiler/deployment_materializer.rb +3 -2
  201. data/lib/mxrb/compiler/deployment_metadata.rb +7 -1
  202. data/lib/mxrb/compiler/domain_document_compiler.rb +26 -2
  203. data/lib/mxrb/compiler/domain_model_materializer.rb +30 -6
  204. data/lib/mxrb/compiler/domain_security_compiler.rb +9 -12
  205. data/lib/mxrb/compiler/java_proxy_generator.rb +34 -2
  206. data/lib/mxrb/compiler/languages.rb +30 -0
  207. data/lib/mxrb/compiler/legacy_data_grid_compiler.rb +19 -3
  208. data/lib/mxrb/compiler/legacy_page_builder.rb +96 -20
  209. data/lib/mxrb/compiler/mapping_materializer.rb +94 -0
  210. data/lib/mxrb/compiler/microflow_document_compiler.rb +5 -19
  211. data/lib/mxrb/compiler/microflow_materializer.rb +12 -1
  212. data/lib/mxrb/compiler/microflow_node_compiler.rb +257 -20
  213. data/lib/mxrb/compiler/model_values.rb +26 -0
  214. data/lib/mxrb/compiler/navigation_document_compiler.rb +73 -66
  215. data/lib/mxrb/compiler/navigation_grid_compiler.rb +112 -0
  216. data/lib/mxrb/compiler/page_bundle_builder.rb +17 -1
  217. data/lib/mxrb/compiler/page_bundle_compiler.rb +783 -147
  218. data/lib/mxrb/compiler/page_document_compiler.rb +17 -23
  219. data/lib/mxrb/compiler/published_rest_materializer.rb +117 -0
  220. data/lib/mxrb/compiler/published_rest_open_api.rb +131 -0
  221. data/lib/mxrb/compiler/runtime_nodes.rb +68 -0
  222. data/lib/mxrb/compiler/schemas/forms-11.12.1.json +19781 -0
  223. data/lib/mxrb/compiler/schemas/languages-10.24.0.73019.json +658 -0
  224. data/lib/mxrb/compiler/schemas/languages-11.12.1.json +670 -0
  225. data/lib/mxrb/compiler/schemas/runtime-10.24.0.73019.json +442 -0
  226. data/lib/mxrb/compiler/schemas/runtime-11.json +176 -0
  227. data/lib/mxrb/compiler/security_materializer.rb +13 -6
  228. data/lib/mxrb/compiler/settings_document_compiler.rb +14 -2
  229. data/lib/mxrb/compiler/settings_materializer.rb +2 -1
  230. data/lib/mxrb/compiler/source_model.rb +8 -10
  231. data/lib/mxrb/compiler/synchronized_entities.rb +76 -0
  232. data/lib/mxrb/compiler/url_segment_compiler.rb +82 -0
  233. data/lib/mxrb/compiler/user_role_resolver.rb +33 -0
  234. data/lib/mxrb/compiler/web_list_data_source.rb +6 -2
  235. data/lib/mxrb/compiler/web_shell_materializer.rb +14 -0
  236. data/lib/mxrb/compiler/web_widget_inventory.rb +72 -0
  237. data/lib/mxrb/converter.rb +125 -0
  238. data/lib/mxrb/dsl/artifact_documents.rb +56 -0
  239. data/lib/mxrb/dsl/asset_documents.rb +94 -0
  240. data/lib/mxrb/dsl/builder.rb +102 -1630
  241. data/lib/mxrb/dsl/code_actions.rb +201 -0
  242. data/lib/mxrb/dsl/data_view_builder.rb +162 -0
  243. data/lib/mxrb/dsl/document_builders.rb +185 -0
  244. data/lib/mxrb/dsl/entity_builder.rb +188 -0
  245. data/lib/mxrb/dsl/flow_body_dsl.rb +538 -0
  246. data/lib/mxrb/dsl/flow_builders.rb +362 -0
  247. data/lib/mxrb/dsl/flow_page_builder.rb +58 -0
  248. data/lib/mxrb/dsl/flow_program.rb +101 -0
  249. data/lib/mxrb/dsl/flow_rest_builder.rb +40 -0
  250. data/lib/mxrb/dsl/flow_text_builder.rb +55 -0
  251. data/lib/mxrb/dsl/integration_documents.rb +1634 -0
  252. data/lib/mxrb/dsl/layout_builders.rb +373 -0
  253. data/lib/mxrb/dsl/module_builder.rb +408 -0
  254. data/lib/mxrb/dsl/navigation_builders.rb +264 -0
  255. data/lib/mxrb/dsl/page_builder.rb +219 -0
  256. data/lib/mxrb/dsl/presentation_documents.rb +161 -0
  257. data/lib/mxrb/dsl/project_documents.rb +60 -0
  258. data/lib/mxrb/dsl/security_builder.rb +215 -0
  259. data/lib/mxrb/dsl/widget_builders.rb +251 -0
  260. data/lib/mxrb/dsl/widget_design.rb +61 -0
  261. data/lib/mxrb/dsl/widget_dsl.rb +553 -0
  262. data/lib/mxrb/dsl/widget_event_arguments.rb +52 -0
  263. data/lib/mxrb/dsl/workflows.rb +520 -0
  264. data/lib/mxrb/errors.rb +3 -0
  265. data/lib/mxrb/evaluation.rb +9 -8
  266. data/lib/mxrb/exporter/code_action_declarations.rb +133 -0
  267. data/lib/mxrb/exporter/data_sources.rb +144 -0
  268. data/lib/mxrb/exporter/domain_document_declarations.rb +222 -0
  269. data/lib/mxrb/exporter/flow_action_sources.rb +545 -0
  270. data/lib/mxrb/exporter/flow_linearization.rb +649 -0
  271. data/lib/mxrb/exporter/integration_declarations.rb +763 -0
  272. data/lib/mxrb/exporter/method_flow_source.rb +208 -0
  273. data/lib/mxrb/exporter/model_sources.rb +381 -0
  274. data/lib/mxrb/exporter/page_sources.rb +756 -0
  275. data/lib/mxrb/exporter/presentation_declarations.rb +161 -0
  276. data/lib/mxrb/exporter/project_sources.rb +306 -0
  277. data/lib/mxrb/exporter/rest_declarations.rb +509 -0
  278. data/lib/mxrb/exporter/workflow_declarations.rb +652 -0
  279. data/lib/mxrb/exporter.rb +677 -1491
  280. data/lib/mxrb/forms/catalog.rb +175 -0
  281. data/lib/mxrb/forms/certification.rb +115 -0
  282. data/lib/mxrb/forms/coverage.rb +130 -0
  283. data/lib/mxrb/forms/input_presentation.rb +55 -0
  284. data/lib/mxrb/forms/mpr_codec.rb +821 -0
  285. data/lib/mxrb/forms/node.rb +213 -0
  286. data/lib/mxrb/forms/source_emitter.rb +296 -0
  287. data/lib/mxrb/forms/storage_naming.rb +120 -0
  288. data/lib/mxrb/forms/values.rb +226 -0
  289. data/lib/mxrb/frontend/migrator.rb +2 -0
  290. data/lib/mxrb/functional.rb +47 -43
  291. data/lib/mxrb/github/annotator.rb +31 -27
  292. data/lib/mxrb/http/server.rb +10 -2
  293. data/lib/mxrb/integrity/validator.rb +70 -22
  294. data/lib/mxrb/io/bson_codec.rb +61 -35
  295. data/lib/mxrb/io/mpr_file.rb +638 -105
  296. data/lib/mxrb/io/mxunit_codec.rb +3 -3
  297. data/lib/mxrb/marketplace.rb +77 -73
  298. data/lib/mxrb/modbus/client.rb +162 -0
  299. data/lib/mxrb/modbus/rtu_transport.rb +150 -0
  300. data/lib/mxrb/modbus/stream_io.rb +43 -0
  301. data/lib/mxrb/modbus/tcp_transport.rb +47 -0
  302. data/lib/mxrb/modbus.rb +32 -0
  303. data/lib/mxrb/model/association.rb +28 -28
  304. data/lib/mxrb/model/attribute.rb +51 -35
  305. data/lib/mxrb/model/domain_model.rb +33 -16
  306. data/lib/mxrb/model/entity.rb +80 -70
  307. data/lib/mxrb/model/menu.rb +54 -13
  308. data/lib/mxrb/model/microflow.rb +48 -46
  309. data/lib/mxrb/model/module.rb +85 -42
  310. data/lib/mxrb/model/navigation.rb +232 -9
  311. data/lib/mxrb/model/page.rb +1223 -204
  312. data/lib/mxrb/model/project.rb +61 -15
  313. data/lib/mxrb/model/unit.rb +10 -9
  314. data/lib/mxrb/native_fragment_store.rb +184 -0
  315. data/lib/mxrb/official_marketplace/content_api.rb +13 -1
  316. data/lib/mxrb/official_marketplace/dependency_resolver.rb +6 -1
  317. data/lib/mxrb/official_marketplace/widget_package_installer.rb +2 -1
  318. data/lib/mxrb/oql/server.rb +8 -8
  319. data/lib/mxrb/pluggable/catalog.rb +179 -0
  320. data/lib/mxrb/pluggable/mpr_codec.rb +765 -0
  321. data/lib/mxrb/pluggable/node.rb +347 -0
  322. data/lib/mxrb/pluggable/schema_dsl.rb +179 -0
  323. data/lib/mxrb/pluggable/schema_source_emitter.rb +134 -0
  324. data/lib/mxrb/project_lifecycle.rb +5 -2
  325. data/lib/mxrb/protocols/entry.rb +29 -0
  326. data/lib/mxrb/protocols/registry.rb +59 -0
  327. data/lib/mxrb/protocols.rb +84 -70
  328. data/lib/mxrb/public_source_audit.rb +201 -0
  329. data/lib/mxrb/ruby_app/access_rule_builder.rb +27 -0
  330. data/lib/mxrb/ruby_app/application/offline_synchronization.rb +138 -0
  331. data/lib/mxrb/ruby_app/application/record_access.rb +402 -0
  332. data/lib/mxrb/ruby_app/application/request_handlers.rb +45 -0
  333. data/lib/mxrb/ruby_app/application/schema_security.rb +193 -0
  334. data/lib/mxrb/ruby_app/application/service_invocation.rb +261 -0
  335. data/lib/mxrb/ruby_app/application/session_access.rb +97 -0
  336. data/lib/mxrb/ruby_app/application/value_serialization.rb +148 -0
  337. data/lib/mxrb/ruby_app/application.rb +201 -0
  338. data/lib/mxrb/ruby_app/async_invocations.rb +97 -0
  339. data/lib/mxrb/ruby_app/compilation.rb +64 -0
  340. data/lib/mxrb/ruby_app/constant.rb +99 -0
  341. data/lib/mxrb/ruby_app/controller.rb +112 -0
  342. data/lib/mxrb/ruby_app/dataset.rb +87 -0
  343. data/lib/mxrb/ruby_app/design_classes.rb +177 -0
  344. data/lib/mxrb/ruby_app/design_declarations.rb +193 -0
  345. data/lib/mxrb/ruby_app/domain_rule_builders.rb +123 -0
  346. data/lib/mxrb/ruby_app/enumeration.rb +91 -0
  347. data/lib/mxrb/ruby_app/exporter/data_widget_sources.rb +614 -0
  348. data/lib/mxrb/ruby_app/exporter/document_exports.rb +216 -0
  349. data/lib/mxrb/ruby_app/exporter/domain_behaviors.rb +67 -0
  350. data/lib/mxrb/ruby_app/exporter/domain_manifests.rb +283 -0
  351. data/lib/mxrb/ruby_app/exporter/frontend_pages.rb +161 -0
  352. data/lib/mxrb/ruby_app/exporter/frontend_types.rb +500 -0
  353. data/lib/mxrb/ruby_app/exporter/model_sources.rb +376 -0
  354. data/lib/mxrb/ruby_app/exporter/module_exports.rb +211 -0
  355. data/lib/mxrb/ruby_app/exporter/nanoflow_typescript.rb +590 -0
  356. data/lib/mxrb/ruby_app/exporter/project_files.rb +398 -0
  357. data/lib/mxrb/ruby_app/exporter/support_files.rb +357 -0
  358. data/lib/mxrb/ruby_app/exporter/widget_manifests.rb +134 -0
  359. data/lib/mxrb/ruby_app/exporter/widget_sources.rb +510 -0
  360. data/lib/mxrb/ruby_app/exporter.rb +402 -1565
  361. data/lib/mxrb/ruby_app/file_content.rb +133 -0
  362. data/lib/mxrb/ruby_app/flow_metadata.rb +72 -0
  363. data/lib/mxrb/ruby_app/frontend_package.rb +54 -0
  364. data/lib/mxrb/ruby_app/frontend_template/package-lock.json +4790 -0
  365. data/lib/mxrb/ruby_app/frontend_template/src/app/App.tsx +5 -0
  366. data/lib/mxrb/ruby_app/frontend_template/src/app/router.tsx +18 -0
  367. data/lib/mxrb/ruby_app/frontend_template/src/components/auth/LoginForm.test.tsx +18 -0
  368. data/lib/mxrb/ruby_app/frontend_template/src/components/auth/LoginForm.tsx +80 -0
  369. data/lib/mxrb/ruby_app/frontend_template/src/components/feedback/AppFeedback.tsx +31 -0
  370. data/lib/mxrb/ruby_app/frontend_template/src/components/navigation/AppNavigation.tsx +45 -0
  371. data/lib/mxrb/ruby_app/frontend_template/src/core/errors.ts +3 -0
  372. data/lib/mxrb/ruby_app/frontend_template/src/features/README.md +4 -0
  373. data/lib/mxrb/ruby_app/frontend_template/src/features/routes.tsx +9 -0
  374. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/ApplicationRuntime.test.tsx +174 -0
  375. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/ApplicationRuntime.tsx +959 -0
  376. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/AsyncInvocation.test.ts +61 -0
  377. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/AsyncInvocation.ts +47 -0
  378. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/ClientActions.test.tsx +234 -0
  379. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/ClientEvents.test.tsx +174 -0
  380. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/CreateActions.test.tsx +114 -0
  381. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/OfflineStartup.test.tsx +154 -0
  382. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/PageDataSource.ts +26 -0
  383. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/PageEdits.test.ts +85 -0
  384. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/PageEdits.ts +132 -0
  385. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/PageVariables.test.tsx +107 -0
  386. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/PageVariables.tsx +272 -0
  387. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/PopupRuntime.test.tsx +226 -0
  388. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/StartupAuthentication.test.tsx +101 -0
  389. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/api.ts +35 -0
  390. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/calendar.test.ts +93 -0
  391. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/calendar.ts +134 -0
  392. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/captions.test.tsx +201 -0
  393. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/captions.ts +235 -0
  394. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/clientFunctions.test.ts +195 -0
  395. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/clientFunctions.ts +182 -0
  396. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/clientServices.ts +24 -0
  397. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/commonsStorage.test.ts +77 -0
  398. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/commonsStorage.ts +44 -0
  399. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/BoundField.test.tsx +339 -0
  400. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/BoundField.tsx +442 -0
  401. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/CoreWidgets.test.tsx +306 -0
  402. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/DataGrid.test.tsx +417 -0
  403. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/DataGrid.tsx +944 -0
  404. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/FieldPolicy.test.ts +96 -0
  405. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/FieldPolicy.tsx +106 -0
  406. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/FileWidget.tsx +152 -0
  407. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/GridIcon.tsx +92 -0
  408. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/LanguageSelector.test.tsx +109 -0
  409. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/LanguageSelector.tsx +130 -0
  410. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/MarketplaceChart.test.tsx +580 -0
  411. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/MarketplaceChart.tsx +576 -0
  412. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/MarketplaceControls.test.tsx +192 -0
  413. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/MarketplaceControls.tsx +193 -0
  414. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/MarketplaceDataWidgets.test.tsx +194 -0
  415. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/MarketplaceGridFilter.test.tsx +213 -0
  416. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/MarketplaceGridFilter.tsx +95 -0
  417. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/MarketplaceInteractive.test.tsx +202 -0
  418. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/MarketplaceInteractive.tsx +246 -0
  419. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/MarketplaceLegacy.test.tsx +171 -0
  420. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/MarketplaceLegacy.tsx +189 -0
  421. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/MarketplaceMenus.tsx +114 -0
  422. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/MarketplacePlotly.test.tsx +96 -0
  423. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/MarketplacePlotly.tsx +162 -0
  424. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/MarketplaceSelection.test.tsx +170 -0
  425. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/MarketplaceSelection.tsx +204 -0
  426. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/MarketplaceTimeline.tsx +116 -0
  427. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/MarketplaceTreeNode.tsx +91 -0
  428. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/NativeDataGrid.tsx +336 -0
  429. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/NativeDataWidgets.test.tsx +233 -0
  430. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/NativeDataWidgets.tsx +288 -0
  431. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/NativeLayout.test.tsx +100 -0
  432. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/NativeLayout.tsx +111 -0
  433. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/NativeScrollContainer.tsx +206 -0
  434. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/NativeSignature.tsx +104 -0
  435. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/NativeWidgets.test.tsx +855 -0
  436. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/NativeWidgets.tsx +1142 -0
  437. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/PageOutlet.test.tsx +74 -0
  438. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/PageOutlet.tsx +63 -0
  439. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/PageTitleContext.ts +7 -0
  440. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/Popup.tsx +181 -0
  441. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/PresentationWidgets.test.tsx +490 -0
  442. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/PresentationWidgets.tsx +566 -0
  443. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/ReferenceSetCombobox.tsx +183 -0
  444. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/SelectionScope.tsx +28 -0
  445. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/TabControl.tsx +88 -0
  446. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/VariableScope.ts +8 -0
  447. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/WidgetRenderer.test.tsx +574 -0
  448. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/WidgetRenderer.tsx +1076 -0
  449. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/autofocus.test.ts +79 -0
  450. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/autofocus.ts +58 -0
  451. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/components/marketplaceData.ts +126 -0
  452. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/contracts.ts +53 -0
  453. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/dateFormatting.ts +297 -0
  454. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/dateParsing.test.ts +189 -0
  455. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/decimal.test.ts +75 -0
  456. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/decimal.ts +132 -0
  457. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/decimalParsing.test.ts +44 -0
  458. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/decimalParsing.ts +123 -0
  459. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/expression.test.ts +139 -0
  460. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/expression.ts +391 -0
  461. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/expressionClient.test.ts +163 -0
  462. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/feedbackCapture.test.ts +75 -0
  463. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/feedbackCapture.ts +51 -0
  464. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/feedbackCaptureWidget.test.tsx +136 -0
  465. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/feedbackCaptureWidget.tsx +79 -0
  466. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/feedbackFiles.test.ts +92 -0
  467. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/feedbackFiles.ts +84 -0
  468. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/feedbackMetadata.test.ts +142 -0
  469. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/feedbackMetadata.ts +49 -0
  470. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/feedbackStorage.test.ts +110 -0
  471. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/feedbackStorage.ts +93 -0
  472. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/legacy/LegacyWidgetHost.tsx +218 -0
  473. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/legacy/amd.ts +104 -0
  474. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/legacy/dojo.ts +474 -0
  475. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/legacy/legacy.test.tsx +518 -0
  476. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/legacy/mx.ts +722 -0
  477. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/legacy/mxGlobal.ts +13 -0
  478. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/legacy/nativeUnavailable.ts +20 -0
  479. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/legacy/session.ts +26 -0
  480. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/listSource.test.tsx +299 -0
  481. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/listSource.ts +177 -0
  482. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/marketplace.tsx +326 -0
  483. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/marketplaceWidgets.json +203 -0
  484. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/marketplaceWidgets.test.tsx +38 -0
  485. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/mendixFilters.test.ts +66 -0
  486. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/mendixFilters.ts +101 -0
  487. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/nanoflow.ts +594 -0
  488. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/nanoflowCommons.test.ts +89 -0
  489. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/nanoflowCommons.ts +57 -0
  490. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/nanoflowData.test.ts +199 -0
  491. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/nanoflowLists.test.ts +34 -0
  492. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/nanoflowOffline.test.ts +130 -0
  493. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/nativeMobileActions.test.ts +310 -0
  494. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/nativeMobileActions.ts +493 -0
  495. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/nativeOnlyJavaScriptActions.test.ts +12 -0
  496. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/objectRestore.test.ts +164 -0
  497. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/objectRestore.ts +123 -0
  498. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/objectStorage.test.ts +179 -0
  499. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/objectStorage.ts +94 -0
  500. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/offlineStore.test.ts +147 -0
  501. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/offlineStore.ts +226 -0
  502. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/plotly.test.ts +55 -0
  503. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/plotly.ts +94 -0
  504. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/pluggableHost.test.tsx +231 -0
  505. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/pluggableHost.tsx +461 -0
  506. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/projectJavaScriptActions.test.ts +158 -0
  507. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/projectJavaScriptActions.ts +91 -0
  508. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/qrCode.test.ts +79 -0
  509. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/qrCode.ts +309 -0
  510. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/schemaLookup.ts +46 -0
  511. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/sort.test.ts +114 -0
  512. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/synchronize.test.ts +167 -0
  513. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/synchronize.ts +156 -0
  514. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/useActionExecution.tsx +100 -0
  515. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/useWidgetEvent.ts +132 -0
  516. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/value.test.ts +89 -0
  517. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/value.ts +319 -0
  518. data/lib/mxrb/ruby_app/frontend_template/src/generated/bridge/widgetContract.test.ts +32 -0
  519. data/lib/mxrb/ruby_app/frontend_template/src/layouts/AppLayout.tsx +19 -0
  520. data/lib/mxrb/ruby_app/frontend_template/src/main.tsx +16 -0
  521. data/lib/mxrb/ruby_app/frontend_template/src/plotly.d.ts +4 -0
  522. data/lib/mxrb/ruby_app/frontend_template/src/styles/index.css +1281 -0
  523. data/lib/mxrb/ruby_app/frontend_template/src/test/setup.ts +1 -0
  524. data/lib/mxrb/ruby_app/frontend_template/tsconfig.json +23 -0
  525. data/lib/mxrb/ruby_app/frontend_template/vitest.config.ts +10 -0
  526. data/lib/mxrb/ruby_app/java_actions_package.rb +118 -0
  527. data/lib/mxrb/ruby_app/known_community_commons_actions.rb +316 -0
  528. data/lib/mxrb/ruby_app/known_encryption_actions.rb +162 -0
  529. data/lib/mxrb/ruby_app/known_feedback_widget.rb +43 -0
  530. data/lib/mxrb/ruby_app/known_java_actions.rb +66 -0
  531. data/lib/mxrb/ruby_app/known_javascript_actions.rb +173 -0
  532. data/lib/mxrb/ruby_app/known_mx_model_reflection_actions.rb +353 -0
  533. data/lib/mxrb/ruby_app/known_oql_actions.rb +43 -0
  534. data/lib/mxrb/ruby_app/known_oql_module_actions.rb +101 -0
  535. data/lib/mxrb/ruby_app/known_startup_actions.rb +115 -0
  536. data/lib/mxrb/ruby_app/legacy_service_source_migration.rb +142 -0
  537. data/lib/mxrb/ruby_app/legacy_widget_source_migration.rb +64 -0
  538. data/lib/mxrb/ruby_app/manifest.rb +41 -0
  539. data/lib/mxrb/ruby_app/member_identity.rb +135 -0
  540. data/lib/mxrb/ruby_app/metamodel.rb +197 -0
  541. data/lib/mxrb/ruby_app/module_security.rb +51 -0
  542. data/lib/mxrb/ruby_app/native_bridge.rb +96 -0
  543. data/lib/mxrb/ruby_app/native_edit_patch.rb +69 -0
  544. data/lib/mxrb/ruby_app/page.rb +321 -0
  545. data/lib/mxrb/ruby_app/page_data_sources.rb +184 -0
  546. data/lib/mxrb/ruby_app/page_design_identity.rb +182 -0
  547. data/lib/mxrb/ruby_app/page_edit_bindings.rb +168 -0
  548. data/lib/mxrb/ruby_app/page_edit_contracts.rb +144 -0
  549. data/lib/mxrb/ruby_app/page_edit_properties.rb +93 -0
  550. data/lib/mxrb/ruby_app/page_edit_texts.rb +104 -0
  551. data/lib/mxrb/ruby_app/page_edit_translations.rb +67 -0
  552. data/lib/mxrb/ruby_app/page_edits.rb +662 -0
  553. data/lib/mxrb/ruby_app/page_widget_renames.rb +40 -0
  554. data/lib/mxrb/ruby_app/pluggable_context.rb +149 -0
  555. data/lib/mxrb/ruby_app/pluggable_properties.rb +715 -0
  556. data/lib/mxrb/ruby_app/pluggable_schemas.rb +28 -0
  557. data/lib/mxrb/ruby_app/portability_report.rb +127 -0
  558. data/lib/mxrb/ruby_app/presentation.rb +137 -0
  559. data/lib/mxrb/ruby_app/presentation_contracts.rb +132 -0
  560. data/lib/mxrb/ruby_app/presentation_edits.rb +179 -0
  561. data/lib/mxrb/ruby_app/presentation_exporter.rb +201 -0
  562. data/lib/mxrb/ruby_app/presentation_projection.rb +62 -0
  563. data/lib/mxrb/ruby_app/presentation_references.rb +53 -0
  564. data/lib/mxrb/ruby_app/preset.rb +37 -1
  565. data/lib/mxrb/ruby_app/project_javascript_actions.rb +78 -0
  566. data/lib/mxrb/ruby_app/project_security.rb +200 -0
  567. data/lib/mxrb/ruby_app/project_widget_bundle.rb +74 -0
  568. data/lib/mxrb/ruby_app/rack_adapter.rb +73 -0
  569. data/lib/mxrb/ruby_app/record.rb +388 -0
  570. data/lib/mxrb/ruby_app/record_identity.rb +209 -0
  571. data/lib/mxrb/ruby_app/record_inheritance.rb +65 -0
  572. data/lib/mxrb/ruby_app/record_validation.rb +175 -0
  573. data/lib/mxrb/ruby_app/registry.rb +149 -0
  574. data/lib/mxrb/ruby_app/regular_expression.rb +58 -0
  575. data/lib/mxrb/ruby_app/runtime_catalog.rb +106 -0
  576. data/lib/mxrb/ruby_app/runtime_project.rb +163 -0
  577. data/lib/mxrb/ruby_app/schedule_builder.rb +134 -0
  578. data/lib/mxrb/ruby_app/scheduled_event.rb +59 -0
  579. data/lib/mxrb/ruby_app/security_builders.rb +97 -0
  580. data/lib/mxrb/ruby_app/security_identity.rb +182 -0
  581. data/lib/mxrb/ruby_app/server.rb +436 -0
  582. data/lib/mxrb/ruby_app/service.rb +114 -0
  583. data/lib/mxrb/ruby_app/session_manager.rb +79 -16
  584. data/lib/mxrb/ruby_app/sidecar_services.rb +92 -0
  585. data/lib/mxrb/ruby_app/source_identity.rb +401 -0
  586. data/lib/mxrb/ruby_app/source_reloader.rb +38 -0
  587. data/lib/mxrb/ruby_app/supervisor.rb +139 -0
  588. data/lib/mxrb/ruby_app/synchronizer/document_synchronization.rb +281 -0
  589. data/lib/mxrb/ruby_app/synchronizer/entity_synchronization.rb +239 -0
  590. data/lib/mxrb/ruby_app/synchronizer.rb +127 -0
  591. data/lib/mxrb/ruby_app/thumbnail.rb +54 -0
  592. data/lib/mxrb/ruby_app/widget_styles.rb +73 -0
  593. data/lib/mxrb/ruby_app/widget_support.rb +76 -0
  594. data/lib/mxrb/ruby_app.rb +101 -1299
  595. data/lib/mxrb/runtime/access_control.rb +54 -101
  596. data/lib/mxrb/runtime/calendar_functions.rb +142 -0
  597. data/lib/mxrb/runtime/calendar_ranges.rb +93 -0
  598. data/lib/mxrb/runtime/client_drafts.rb +167 -0
  599. data/lib/mxrb/runtime/clipboard.rb +9 -2
  600. data/lib/mxrb/runtime/constants.rb +66 -0
  601. data/lib/mxrb/runtime/database_workspace.rb +282 -43
  602. data/lib/mxrb/runtime/date_formatting.rb +120 -0
  603. data/lib/mxrb/runtime/date_parse_fields.rb +144 -0
  604. data/lib/mxrb/runtime/date_parse_matchers.rb +39 -0
  605. data/lib/mxrb/runtime/date_parsing.rb +102 -0
  606. data/lib/mxrb/runtime/decimal_formatting.rb +56 -0
  607. data/lib/mxrb/runtime/decimal_parsing.rb +134 -0
  608. data/lib/mxrb/runtime/decimal_values.rb +121 -0
  609. data/lib/mxrb/runtime/docker_executor.rb +15 -14
  610. data/lib/mxrb/runtime/docker_workspace.rb +8 -8
  611. data/lib/mxrb/runtime/enumerations.rb +135 -0
  612. data/lib/mxrb/runtime/executor.rb +25 -25
  613. data/lib/mxrb/runtime/expression_functions.rb +83 -0
  614. data/lib/mxrb/runtime/import_mapping.rb +191 -0
  615. data/lib/mxrb/runtime/java_action_context.rb +224 -0
  616. data/lib/mxrb/runtime/java_http_exchange.rb +33 -0
  617. data/lib/mxrb/runtime/java_regex.rb +244 -0
  618. data/lib/mxrb/runtime/java_sidecar.rb +449 -0
  619. data/lib/mxrb/runtime/languages.rb +85 -0
  620. data/lib/mxrb/runtime/lifecycle.rb +21 -0
  621. data/lib/mxrb/runtime/native.rb +977 -155
  622. data/lib/mxrb/runtime/oql_case_grammar.rb +56 -0
  623. data/lib/mxrb/runtime/oql_datasets.rb +96 -0
  624. data/lib/mxrb/runtime/oql_expression_grammar.rb +128 -0
  625. data/lib/mxrb/runtime/oql_function_grammar.rb +114 -0
  626. data/lib/mxrb/runtime/oql_join_sources.rb +125 -0
  627. data/lib/mxrb/runtime/oql_membership.rb +35 -0
  628. data/lib/mxrb/runtime/oql_module_query.rb +88 -0
  629. data/lib/mxrb/runtime/oql_nesting.rb +51 -0
  630. data/lib/mxrb/runtime/oql_parameters.rb +40 -0
  631. data/lib/mxrb/runtime/oql_predicate.rb +322 -0
  632. data/lib/mxrb/runtime/oql_projection_view.rb +90 -0
  633. data/lib/mxrb/runtime/oql_query_shape.rb +34 -0
  634. data/lib/mxrb/runtime/oql_relational_query.rb +137 -0
  635. data/lib/mxrb/runtime/oql_relational_view.rb +100 -0
  636. data/lib/mxrb/runtime/oql_relations.rb +185 -0
  637. data/lib/mxrb/runtime/oql_scalar.rb +121 -0
  638. data/lib/mxrb/runtime/oql_selection.rb +127 -0
  639. data/lib/mxrb/runtime/oql_selection_terms.rb +50 -0
  640. data/lib/mxrb/runtime/oql_subquery.rb +40 -0
  641. data/lib/mxrb/runtime/oql_subquery_grammar.rb +68 -0
  642. data/lib/mxrb/runtime/oql_table.rb +117 -0
  643. data/lib/mxrb/runtime/oql_table_query.rb +116 -0
  644. data/lib/mxrb/runtime/oql_union.rb +31 -0
  645. data/lib/mxrb/runtime/oql_view_query.rb +62 -0
  646. data/lib/mxrb/runtime/oql_views.rb +107 -0
  647. data/lib/mxrb/runtime/password_policy.rb +59 -0
  648. data/lib/mxrb/runtime/scheduler.rb +61 -10
  649. data/lib/mxrb/runtime/schema_migrator.rb +133 -19
  650. data/lib/mxrb/runtime/sort_order.rb +51 -0
  651. data/lib/mxrb/runtime/sort_path.rb +44 -0
  652. data/lib/mxrb/runtime/sqlite_store.rb +352 -39
  653. data/lib/mxrb/runtime/string_functions.rb +42 -0
  654. data/lib/mxrb/runtime/system_domain.rb +140 -0
  655. data/lib/mxrb/runtime/system_metamodel.rb +48 -0
  656. data/lib/mxrb/runtime/system_metamodel_10.24.0.json +5111 -0
  657. data/lib/mxrb/runtime/system_metamodel_11.12.1.json +5790 -0
  658. data/lib/mxrb/runtime/system_sign_in.rb +53 -0
  659. data/lib/mxrb/runtime/time_zones.rb +85 -0
  660. data/lib/mxrb/runtime/toolchain.rb +16 -16
  661. data/lib/mxrb/runtime/xpath.rb +414 -0
  662. data/lib/mxrb/runtime/xpath_dates.rb +101 -0
  663. data/lib/mxrb/runtime/xpath_functions.rb +82 -0
  664. data/lib/mxrb/scaffold/cli.rb +14 -13
  665. data/lib/mxrb/scaffold/generator.rb +29 -7
  666. data/lib/mxrb/scaffold/help.rb +4 -0
  667. data/lib/mxrb/scaffold/recipes.rb +43 -4
  668. data/lib/mxrb/scaffold/templates.rb +101 -19
  669. data/lib/mxrb/schema/tables.rb +13 -13
  670. data/lib/mxrb/semantic/analyzer.rb +11 -10
  671. data/lib/mxrb/semantic/batch_plan.rb +8 -8
  672. data/lib/mxrb/semantic/domain_mutator.rb +149 -85
  673. data/lib/mxrb/semantic/extractor.rb +74 -75
  674. data/lib/mxrb/semantic/index.rb +86 -88
  675. data/lib/mxrb/semantic/inliner.rb +60 -60
  676. data/lib/mxrb/semantic/mover.rb +7 -7
  677. data/lib/mxrb/semantic/remover.rb +1 -1
  678. data/lib/mxrb/semantic/renamer.rb +23 -22
  679. data/lib/mxrb/settings/model.rb +330 -0
  680. data/lib/mxrb/settings/mpr_codec.rb +157 -0
  681. data/lib/mxrb/settings/source_emitter.rb +105 -0
  682. data/lib/mxrb/settings/value_contracts.rb +141 -0
  683. data/lib/mxrb/stored_fields.rb +86 -0
  684. data/lib/mxrb/studio/artifacts.rb +67 -0
  685. data/lib/mxrb/studio/backend.rb +36 -0
  686. data/lib/mxrb/studio/catalog.rb +249 -0
  687. data/lib/mxrb/studio/data_connections.rb +77 -0
  688. data/lib/mxrb/studio/data_explorer.rb +288 -0
  689. data/lib/mxrb/studio/documents.rb +260 -0
  690. data/lib/mxrb/studio/files.rb +321 -0
  691. data/lib/mxrb/studio/history.rb +181 -0
  692. data/lib/mxrb/studio/isolated.rb +123 -0
  693. data/lib/mxrb/studio/model_operations.rb +304 -0
  694. data/lib/mxrb/studio/parity.json +1019 -0
  695. data/lib/mxrb/studio/parity.rb +75 -0
  696. data/lib/mxrb/studio/preview_comparison.rb +106 -0
  697. data/lib/mxrb/studio/preview_sandbox.rb +142 -0
  698. data/lib/mxrb/studio/preview_sources.rb +80 -0
  699. data/lib/mxrb/studio/preview_worker.rb +23 -0
  700. data/lib/mxrb/studio/protocol.rb +116 -0
  701. data/lib/mxrb/studio/request_context.rb +141 -0
  702. data/lib/mxrb/studio/ruby_document.rb +252 -0
  703. data/lib/mxrb/studio/ruby_document_aggregates.rb +167 -0
  704. data/lib/mxrb/studio/ruby_project.rb +214 -0
  705. data/lib/mxrb/studio/server.rb +145 -0
  706. data/lib/mxrb/studio/service.rb +525 -0
  707. data/lib/mxrb/studio/snapshot.rb +163 -0
  708. data/lib/mxrb/studio/structure.rb +381 -0
  709. data/lib/mxrb/studio/sync.rb +1070 -0
  710. data/lib/mxrb/studio/sync_preview.rb +108 -0
  711. data/lib/mxrb/studio/task_configurations.rb +118 -0
  712. data/lib/mxrb/studio/text_merge.rb +185 -0
  713. data/lib/mxrb/studio/write_lock.rb +87 -0
  714. data/lib/mxrb/studio.rb +4 -0
  715. data/lib/mxrb/studio_compatibility/loss_audit.rb +136 -0
  716. data/lib/mxrb/studio_compatibility.rb +401 -0
  717. data/lib/mxrb/studio_schema_catalog.rb +375 -0
  718. data/lib/mxrb/system_texts.rb +322 -0
  719. data/lib/mxrb/version.rb +1 -1
  720. data/lib/mxrb/web_ui/assets/chunk-2GNONHZU.js +1 -0
  721. data/lib/mxrb/web_ui/assets/chunk-2P46CC5S.js +1 -0
  722. data/lib/mxrb/web_ui/assets/chunk-2SHOE7BM.js +200 -0
  723. data/lib/mxrb/web_ui/assets/chunk-32QEQT5X.js +1 -0
  724. data/lib/mxrb/web_ui/assets/{chunk-5VM5RSS4-ZNzvKenW.js → chunk-34FZNJLO.js} +2 -2
  725. data/lib/mxrb/web_ui/assets/chunk-35N2E2ST.js +88 -0
  726. data/lib/mxrb/web_ui/assets/chunk-3EBRCLBH.js +1 -0
  727. data/lib/mxrb/web_ui/assets/chunk-3F3S4FN6.js +1 -0
  728. data/lib/mxrb/web_ui/assets/chunk-3PZDNKEG.js +1 -0
  729. data/lib/mxrb/web_ui/assets/chunk-3UGOMMAO.js +3 -0
  730. data/lib/mxrb/web_ui/assets/chunk-4NYRXXLN.js +106 -0
  731. data/lib/mxrb/web_ui/assets/chunk-4R2TVXEB.js +1 -0
  732. data/lib/mxrb/web_ui/assets/chunk-4SGPCOHB.js +1 -0
  733. data/lib/mxrb/web_ui/assets/chunk-5BHXSKDK.js +292 -0
  734. data/lib/mxrb/web_ui/assets/chunk-5EVG4O6T.js +1 -0
  735. data/lib/mxrb/web_ui/assets/chunk-5G5NQYC6.js +34 -0
  736. data/lib/mxrb/web_ui/assets/chunk-5HFJOAW4.js +1 -0
  737. data/lib/mxrb/web_ui/assets/chunk-5TNNO4YZ.js +1 -0
  738. data/lib/mxrb/web_ui/assets/chunk-63IIJIEV.js +1 -0
  739. data/lib/mxrb/web_ui/assets/chunk-66OX7QNZ.js +1 -0
  740. data/lib/mxrb/web_ui/assets/chunk-6B4DUFPC.js +1 -0
  741. data/lib/mxrb/web_ui/assets/chunk-6HSV3Q4G.js +1 -0
  742. data/lib/mxrb/web_ui/assets/chunk-6KV64GIT.js +98 -0
  743. data/lib/mxrb/web_ui/assets/chunk-6ZPGWQKV.js +1 -0
  744. data/lib/mxrb/web_ui/assets/chunk-72H3YDZV.js +1 -0
  745. data/lib/mxrb/web_ui/assets/chunk-77A6STIF.js +66 -0
  746. data/lib/mxrb/web_ui/assets/chunk-7B4ZTT6G.js +1 -0
  747. data/lib/mxrb/web_ui/assets/chunk-7E4ON25K.js +7 -0
  748. data/lib/mxrb/web_ui/assets/chunk-7GXBVQXL.js +1 -0
  749. data/lib/mxrb/web_ui/assets/chunk-7ONEZDBB.js +291 -0
  750. data/lib/mxrb/web_ui/assets/chunk-7UWVQTN5.js +1 -0
  751. data/lib/mxrb/web_ui/assets/chunk-AFDXKSZJ.js +2 -0
  752. data/lib/mxrb/web_ui/assets/chunk-BUBLNEPX.js +1 -0
  753. data/lib/mxrb/web_ui/assets/chunk-CBAMBU3T.js +30 -0
  754. data/lib/mxrb/web_ui/assets/chunk-CYCQ4VLZ.js +1 -0
  755. data/lib/mxrb/web_ui/assets/chunk-CYUZI6LQ.js +213 -0
  756. data/lib/mxrb/web_ui/assets/chunk-D246GO7Q.js +1 -0
  757. data/lib/mxrb/web_ui/assets/chunk-DHQUYWHD.js +1 -0
  758. data/lib/mxrb/web_ui/assets/chunk-E2RCGYXT.js +1 -0
  759. data/lib/mxrb/web_ui/assets/chunk-E5A22KZX.js +70 -0
  760. data/lib/mxrb/web_ui/assets/chunk-E64VJRVG.js +1 -0
  761. data/lib/mxrb/web_ui/assets/chunk-EBM2OVIK.js +120 -0
  762. data/lib/mxrb/web_ui/assets/chunk-ELCFKSFF.js +41 -0
  763. data/lib/mxrb/web_ui/assets/chunk-EQTVJ2VI.js +36 -0
  764. data/lib/mxrb/web_ui/assets/chunk-FAGUL7T6.js +1 -0
  765. data/lib/mxrb/web_ui/assets/chunk-FHZHQJRK.js +38 -0
  766. data/lib/mxrb/web_ui/assets/chunk-FUKAUTTF.js +1 -0
  767. data/lib/mxrb/web_ui/assets/chunk-GMUATS3X.js +1 -0
  768. data/lib/mxrb/web_ui/assets/chunk-GVPVJSW7.js +1 -0
  769. data/lib/mxrb/web_ui/assets/chunk-H3FJWUNC.js +1 -0
  770. data/lib/mxrb/web_ui/assets/chunk-H4QZ3SLG.js +257 -0
  771. data/lib/mxrb/web_ui/assets/chunk-H57W7YI5.js +62 -0
  772. data/lib/mxrb/web_ui/assets/chunk-H6EH3XA3.js +1 -0
  773. data/lib/mxrb/web_ui/assets/chunk-HB5VHJFM.js +1 -0
  774. data/lib/mxrb/web_ui/assets/chunk-HCKYS7KE.js +139 -0
  775. data/lib/mxrb/web_ui/assets/chunk-HQBVNVYC.js +39 -0
  776. data/lib/mxrb/web_ui/assets/chunk-HSA6P35M.js +1 -0
  777. data/lib/mxrb/web_ui/assets/chunk-HUYRUGAK.js +135 -0
  778. data/lib/mxrb/web_ui/assets/chunk-I5PKQWBH.js +140 -0
  779. data/lib/mxrb/web_ui/assets/chunk-ID2OERHW.js +1 -0
  780. data/lib/mxrb/web_ui/assets/chunk-IDAIL53S.js +1 -0
  781. data/lib/mxrb/web_ui/assets/chunk-IWZI7GPK.js +1 -0
  782. data/lib/mxrb/web_ui/assets/chunk-IXXNJOS3.js +24 -0
  783. data/lib/mxrb/web_ui/assets/chunk-K5MIAU7K.js +1 -0
  784. data/lib/mxrb/web_ui/assets/chunk-K6CUQC6N.js +136 -0
  785. data/lib/mxrb/web_ui/assets/chunk-KE3NT6QN.js +0 -0
  786. data/lib/mxrb/web_ui/assets/chunk-KI74YC4J.js +72 -0
  787. data/lib/mxrb/web_ui/assets/chunk-KOJL4E5L.js +370 -0
  788. data/lib/mxrb/web_ui/assets/chunk-KPUKEWCZ.js +169 -0
  789. data/lib/mxrb/web_ui/assets/chunk-LEZ2D244.js +2 -0
  790. data/lib/mxrb/web_ui/assets/chunk-LJWZZILO.js +8 -0
  791. data/lib/mxrb/web_ui/assets/chunk-LOYCYQTD.js +24 -0
  792. data/lib/mxrb/web_ui/assets/chunk-M2T56PG5.js +1 -0
  793. data/lib/mxrb/web_ui/assets/chunk-NI5QL3P3.js +2 -0
  794. data/lib/mxrb/web_ui/assets/chunk-NM5LBQV6.js +1 -0
  795. data/lib/mxrb/web_ui/assets/chunk-NNFAPT7B.js +1 -0
  796. data/lib/mxrb/web_ui/assets/chunk-NTAWMNDE.js +7 -0
  797. data/lib/mxrb/web_ui/assets/chunk-NUGW2EXC.js +27 -0
  798. data/lib/mxrb/web_ui/assets/chunk-OKEQR3I2.js +99 -0
  799. data/lib/mxrb/web_ui/assets/chunk-OUPEVUDM.js +1 -0
  800. data/lib/mxrb/web_ui/assets/chunk-OZ3S3DQH.js +1 -0
  801. data/lib/mxrb/web_ui/assets/chunk-PBU4ZVTM.js +1 -0
  802. data/lib/mxrb/web_ui/assets/chunk-PQQBOQJI.js +217 -0
  803. data/lib/mxrb/web_ui/assets/chunk-Q63GKT34.js +1 -0
  804. data/lib/mxrb/web_ui/assets/chunk-QJHVSIW7.js +1 -0
  805. data/lib/mxrb/web_ui/assets/chunk-QMUNJBVF.js +2 -0
  806. data/lib/mxrb/web_ui/assets/chunk-RKTVQ6NQ.js +1 -0
  807. data/lib/mxrb/web_ui/assets/chunk-RQ6DNNSS.js +1 -0
  808. data/lib/mxrb/web_ui/assets/chunk-RVFML3W7.js +1 -0
  809. data/lib/mxrb/web_ui/assets/chunk-S5TKGUWG.js +3 -0
  810. data/lib/mxrb/web_ui/assets/chunk-SBICTFKY.js +2 -0
  811. data/lib/mxrb/web_ui/assets/chunk-SOO7HOBB.js +89 -0
  812. data/lib/mxrb/web_ui/assets/chunk-SQ2BDVUY.js +1 -0
  813. data/lib/mxrb/web_ui/assets/chunk-T5KDILTJ.js +1 -0
  814. data/lib/mxrb/web_ui/assets/chunk-TJ2A3WRV.js +14 -0
  815. data/lib/mxrb/web_ui/assets/chunk-UITAI6UC.js +78 -0
  816. data/lib/mxrb/web_ui/assets/chunk-UL26XZ4V.js +10 -0
  817. data/lib/mxrb/web_ui/assets/chunk-URTGGQPX.js +1 -0
  818. data/lib/mxrb/web_ui/assets/chunk-UZTYCEEY.js +1 -0
  819. data/lib/mxrb/web_ui/assets/chunk-VFXGN725.js +1 -0
  820. data/lib/mxrb/web_ui/assets/chunk-VJRJYCFG.js +84 -0
  821. data/lib/mxrb/web_ui/assets/chunk-W6DARM7I.js +1 -0
  822. data/lib/mxrb/web_ui/assets/chunk-WLRR7NCQ.js +40 -0
  823. data/lib/mxrb/web_ui/assets/chunk-XIMEPMUW.js +32 -0
  824. data/lib/mxrb/web_ui/assets/chunk-XRM2LTMZ.js +4 -0
  825. data/lib/mxrb/web_ui/assets/chunk-Y5TK5PAP.js +62 -0
  826. data/lib/mxrb/web_ui/assets/chunk-ZH3OWPCF.js +339 -0
  827. data/lib/mxrb/web_ui/assets/chunk-ZIHGYIEK.js +1 -0
  828. data/lib/mxrb/web_ui/assets/domain-STH3BZOK.js +1 -0
  829. data/lib/mxrb/web_ui/assets/domain-VYBHNQGI.css +1 -0
  830. data/lib/mxrb/web_ui/assets/modeler-S2X4PVYN.js +1 -0
  831. data/lib/mxrb/web_ui/assets/modeler-SWHOK6BD.css +1 -0
  832. data/lib/mxrb/web_ui/assets/studio/studio-3F773TXK.css +1 -0
  833. data/lib/mxrb/web_ui/assets/studio/studio-DSAUONWT.js +68 -0
  834. data/lib/mxrb/web_ui/assets/uml-6G73GOJ4.css +1 -0
  835. data/lib/mxrb/web_ui/assets/uml-ENRAUICA.js +18 -0
  836. data/lib/mxrb/web_ui/domain.html +1 -3
  837. data/lib/mxrb/web_ui/modeler.html +1 -4
  838. data/lib/mxrb/web_ui/studio.html +5 -0
  839. data/lib/mxrb/web_ui/uml.html +1 -19
  840. data/lib/mxrb/widget_certification.rb +1 -8
  841. data/lib/mxrb/widget_development.rb +57 -0
  842. data/lib/mxrb/widget_package.rb +18 -12
  843. data/lib/mxrb/writer/data_sources.rb +149 -0
  844. data/lib/mxrb/writer/page_overlay.rb +542 -0
  845. data/lib/mxrb/writer.rb +6143 -1598
  846. data/lib/mxrb.rb +198 -158
  847. data/marketplace/modules/shared-kernel/module.rb +1 -1
  848. metadata +729 -108
  849. data/lib/mxrb/web_ui/assets/abnfDiagram-N423BO3Z-C4JD3cEC.js +0 -1
  850. data/lib/mxrb/web_ui/assets/arc-3Z53kgFp.js +0 -1
  851. data/lib/mxrb/web_ui/assets/architecture-TIHT7OUA-BStBTLea.js +0 -1
  852. data/lib/mxrb/web_ui/assets/architectureDiagram-T3A2C74G-DBwqnM4J.js +0 -36
  853. data/lib/mxrb/web_ui/assets/array-BifhSqXX.js +0 -1
  854. data/lib/mxrb/web_ui/assets/blockDiagram-VBNYF7ZC-DLtuHt-j.js +0 -132
  855. data/lib/mxrb/web_ui/assets/c4Diagram-5PPSVZJV-ConSk_pe.js +0 -10
  856. data/lib/mxrb/web_ui/assets/channel-BhPvD7Dt.js +0 -1
  857. data/lib/mxrb/web_ui/assets/chunk-2GRJ4B5K-D2HpWsf_.js +0 -1
  858. data/lib/mxrb/web_ui/assets/chunk-2Q5K7J3B-C1jixKkw.js +0 -1
  859. data/lib/mxrb/web_ui/assets/chunk-4I5QYGJK-CiIdNwaF.js +0 -1
  860. data/lib/mxrb/web_ui/assets/chunk-5RXB4S5H-Bu_AaEkE.js +0 -231
  861. data/lib/mxrb/web_ui/assets/chunk-6Q2QTUOP-wQkNmt_X.js +0 -88
  862. data/lib/mxrb/web_ui/assets/chunk-7BUUIJ7U-Bb538aSH.js +0 -1
  863. data/lib/mxrb/web_ui/assets/chunk-GF5L2VYU-G8MmiBzU.js +0 -206
  864. data/lib/mxrb/web_ui/assets/chunk-I66GZJ75-CulcrLPh.js +0 -127
  865. data/lib/mxrb/web_ui/assets/chunk-JQJVKLGR-ukjzcdlL.js +0 -156
  866. data/lib/mxrb/web_ui/assets/chunk-JWPE2WC7-DVXcaiue.js +0 -1
  867. data/lib/mxrb/web_ui/assets/chunk-KBJHAD2P-Wm35lYov.js +0 -1
  868. data/lib/mxrb/web_ui/assets/chunk-KEIR6QF5-BICK3FdT.js +0 -161
  869. data/lib/mxrb/web_ui/assets/chunk-NSK5VX7P-D2nYrCY4.js +0 -2
  870. data/lib/mxrb/web_ui/assets/chunk-QR6OTTB3-BrdIzg4Q.js +0 -62
  871. data/lib/mxrb/web_ui/assets/chunk-RYQCIY6F-CCfZMcW6.js +0 -1
  872. data/lib/mxrb/web_ui/assets/chunk-UBXNYLIW-BPEVYsFK.js +0 -1
  873. data/lib/mxrb/web_ui/assets/chunk-W5SLKNZC-2E6OPhA4.js +0 -1
  874. data/lib/mxrb/web_ui/assets/chunk-WRU74C26-CBIvOyWp.js +0 -70
  875. data/lib/mxrb/web_ui/assets/chunk-XXDRQBXY-pH58XAyl.js +0 -1
  876. data/lib/mxrb/web_ui/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +0 -1
  877. data/lib/mxrb/web_ui/assets/classDiagram-JCYQIIEL-xiqo4D89.js +0 -1
  878. data/lib/mxrb/web_ui/assets/classDiagram-v2-OCEON4UE-xiqo4D89.js +0 -1
  879. data/lib/mxrb/web_ui/assets/cose-bilkent-JH36ORCC-t_flPpii.js +0 -1
  880. data/lib/mxrb/web_ui/assets/cynefin-VYW2F7L2-BIqktTEv.js +0 -1
  881. data/lib/mxrb/web_ui/assets/cynefinDiagram-MW4NZA55-C2d--lut.js +0 -62
  882. data/lib/mxrb/web_ui/assets/cytoscape.esm-B-NFISlW.js +0 -321
  883. data/lib/mxrb/web_ui/assets/dagre-Buvkdvvj.js +0 -1
  884. data/lib/mxrb/web_ui/assets/dagre-VZM6K2ZE-CSz2_tb5.js +0 -4
  885. data/lib/mxrb/web_ui/assets/defaultLocale-BFoDCU3G.js +0 -1
  886. data/lib/mxrb/web_ui/assets/diagram-7IWD3JNH-DCt7u7V_.js +0 -30
  887. data/lib/mxrb/web_ui/assets/diagram-B4RE2ZJO-DqZBqkMu.js +0 -3
  888. data/lib/mxrb/web_ui/assets/diagram-LBJQPF4R-ClIYbIsI.js +0 -24
  889. data/lib/mxrb/web_ui/assets/diagram-Q27KOJAE-DFxhvthJ.js +0 -24
  890. data/lib/mxrb/web_ui/assets/diagram-UB23O5K3-BSUTXptv.js +0 -41
  891. data/lib/mxrb/web_ui/assets/dist-D2qOEbeJ.js +0 -1
  892. data/lib/mxrb/web_ui/assets/domain-mGOZ1KCG.css +0 -1
  893. data/lib/mxrb/web_ui/assets/domain-qsjXhy4v.js +0 -1
  894. data/lib/mxrb/web_ui/assets/ebnfDiagram-BXEA7PRR-B5reICEi.js +0 -1
  895. data/lib/mxrb/web_ui/assets/erDiagram-JOGREHBK-Co5Mxn2p.js +0 -85
  896. data/lib/mxrb/web_ui/assets/eventmodeling-45OFAUF4-C1ylhSks.js +0 -1
  897. data/lib/mxrb/web_ui/assets/flowDiagram-UKHOOZJN-CHXaJIaS.js +0 -1
  898. data/lib/mxrb/web_ui/assets/ganttDiagram-PKOTCBZU-DPPPaWaz.js +0 -292
  899. data/lib/mxrb/web_ui/assets/gitGraph-TEB2WS4Q-qS77ywA9.js +0 -1
  900. data/lib/mxrb/web_ui/assets/gitGraphDiagram-DS77QQ5N-DpAv6-BT.js +0 -106
  901. data/lib/mxrb/web_ui/assets/graphlib-DS17s2tU.js +0 -1
  902. data/lib/mxrb/web_ui/assets/info-DKCQHKI2-C9VD1Y4e.js +0 -1
  903. data/lib/mxrb/web_ui/assets/infoDiagram-6WML65LV-Bk1kbcCy.js +0 -2
  904. data/lib/mxrb/web_ui/assets/init-C-OQMol4.js +0 -1
  905. data/lib/mxrb/web_ui/assets/ishikawaDiagram-WSZJBQD7-0gcISBFR.js +0 -70
  906. data/lib/mxrb/web_ui/assets/journeyDiagram-NVQOT4AX-Dt0RQnlh.js +0 -139
  907. data/lib/mxrb/web_ui/assets/jsx-runtime-DV0a5kSb.js +0 -9
  908. data/lib/mxrb/web_ui/assets/kanban-definition-27J2QSJJ-DIPQM7w9.js +0 -89
  909. data/lib/mxrb/web_ui/assets/katex-CXMH3UgJ.js +0 -257
  910. data/lib/mxrb/web_ui/assets/line-C0rYD-tL.js +0 -1
  911. data/lib/mxrb/web_ui/assets/linear-BPPxWorj.js +0 -1
  912. data/lib/mxrb/web_ui/assets/map-BaFkSB1l.js +0 -1
  913. data/lib/mxrb/web_ui/assets/mermaid-parser.core-B_UPzTxa.js +0 -7
  914. data/lib/mxrb/web_ui/assets/mindmap-definition-FAOFIHXS-CdJRSMuk.js +0 -96
  915. data/lib/mxrb/web_ui/assets/modeler-BNqHthwk.css +0 -1
  916. data/lib/mxrb/web_ui/assets/modeler-CQmqflbg.js +0 -1
  917. data/lib/mxrb/web_ui/assets/ordinal-BDEzSJ7C.js +0 -1
  918. data/lib/mxrb/web_ui/assets/packet-7NZHBO7P-CwQ4NSBs.js +0 -1
  919. data/lib/mxrb/web_ui/assets/path-fybaL0A-.js +0 -1
  920. data/lib/mxrb/web_ui/assets/pegDiagram-VL7TDLO6-D40S7ppx.js +0 -1
  921. data/lib/mxrb/web_ui/assets/pie-RZYD4A2V-CJroHMKh.js +0 -1
  922. data/lib/mxrb/web_ui/assets/pieDiagram-7S7Q4E2Y-QB54__BV.js +0 -39
  923. data/lib/mxrb/web_ui/assets/quadrantDiagram-CIZ2JOQS-DBhDS6ag.js +0 -7
  924. data/lib/mxrb/web_ui/assets/radar-I7S5WNFK-DdIUwd2d.js +0 -1
  925. data/lib/mxrb/web_ui/assets/railroad-3IZDKUUU-B1Lw6Xyq.js +0 -1
  926. data/lib/mxrb/web_ui/assets/railroad-abnf-AHOZXSZD-CQgQoeak.js +0 -1
  927. data/lib/mxrb/web_ui/assets/railroad-ebnf-EBAXGLYW-D7qEQ2x8.js +0 -1
  928. data/lib/mxrb/web_ui/assets/railroad-peg-LSFZ7HO6-C005Vxbb.js +0 -1
  929. data/lib/mxrb/web_ui/assets/railroadDiagram-AXF67PYL-BBP2qk7M.js +0 -1
  930. data/lib/mxrb/web_ui/assets/requirementDiagram-LRYGKXZP-D2cLsAoI.js +0 -84
  931. data/lib/mxrb/web_ui/assets/rough.esm-Dy-Kn_BL.js +0 -1
  932. data/lib/mxrb/web_ui/assets/sankeyDiagram-W5VNT64P-Bpi3FiP2.js +0 -40
  933. data/lib/mxrb/web_ui/assets/sequenceDiagram-SI44F4Z6-DCRcDlVe.js +0 -162
  934. data/lib/mxrb/web_ui/assets/sizeCapture-X5ZJPWSS-B0uUizjq.js +0 -1
  935. data/lib/mxrb/web_ui/assets/src-CvxfUak2.js +0 -1
  936. data/lib/mxrb/web_ui/assets/stateDiagram-OKZ733FA-C2GCEoxl.js +0 -1
  937. data/lib/mxrb/web_ui/assets/stateDiagram-v2-UEYNNEHI-D2gWgedh.js +0 -1
  938. data/lib/mxrb/web_ui/assets/swimlanes-SLNWSIFB-CRI9irEW.js +0 -2
  939. data/lib/mxrb/web_ui/assets/swimlanesDiagram-ULZ7WXOC-C5Wb_-hZ.js +0 -8
  940. data/lib/mxrb/web_ui/assets/theme-_mxc7BdY.css +0 -1
  941. data/lib/mxrb/web_ui/assets/timeline-definition-Z64GVDOM-B1-mNg-h.js +0 -120
  942. data/lib/mxrb/web_ui/assets/treeView-QDETBFTQ-7CTvIwKq.js +0 -1
  943. data/lib/mxrb/web_ui/assets/treemap-6X3UGDF4-CtL22pq5.js +0 -1
  944. data/lib/mxrb/web_ui/assets/uml-C3KAFGTq.js +0 -51
  945. data/lib/mxrb/web_ui/assets/uml-Dn-qd01X.css +0 -1
  946. data/lib/mxrb/web_ui/assets/vennDiagram-T6HMQDX7-BzVnUEAy.js +0 -34
  947. data/lib/mxrb/web_ui/assets/wardley-OPB4EBWU-JNi-QNag.js +0 -1
  948. data/lib/mxrb/web_ui/assets/wardleyDiagram-T6FBY63Y-BUwmAQ-B.js +0 -78
  949. data/lib/mxrb/web_ui/assets/xychartDiagram-ELKLHX3M-DEQS8sKp.js +0 -7
@@ -0,0 +1,99 @@
1
+ import{a as it}from"./chunk-H3FJWUNC.js";import{a as rt}from"./chunk-IDAIL53S.js";import{b as tt,c as st}from"./chunk-FAGUL7T6.js";import"./chunk-E2RCGYXT.js";import"./chunk-M2T56PG5.js";import"./chunk-UL26XZ4V.js";import"./chunk-GVPVJSW7.js";import"./chunk-Y5TK5PAP.js";import"./chunk-ID2OERHW.js";import"./chunk-5HFJOAW4.js";import{a as ue,b as Xe,c as Je,d as $e,e as et}from"./chunk-4SGPCOHB.js";import"./chunk-KI74YC4J.js";import"./chunk-UZTYCEEY.js";import{q as He,t as Qe}from"./chunk-AFDXKSZJ.js";import"./chunk-NM5LBQV6.js";import{$ as U,O as Ye,U as Pe,V as ze,W as Ue,X as Ke,Y as Ze,Z as je,_ as qe,a as Ge,b as Fe}from"./chunk-HUYRUGAK.js";import{b as A,h as We}from"./chunk-T5KDILTJ.js";import{a as b,b as Be}from"./chunk-DHQUYWHD.js";import"./chunk-W6DARM7I.js";var Ce=(function(){var t=b(function(M,a,o,u){for(o=o||{},u=M.length;u--;o[M[u]]=a);return o},"o"),n=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],h=[2,2],r=[1,7],l=[1,9],p=[1,10],_=[1,11],f=[1,12],m=[1,30],d=[1,23],k=[1,24],O=[1,25],B=[1,26],Y=[1,27],E=[1,19],I=[1,28],K=[1,29],N=[1,20],R=[1,18],v=[1,21],D=[1,22],Oe=[2,6],c=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],de=[1,36],be=[1,37],pe=[1,38],fe=[1,39],ke=[1,40],Z=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],L=[1,46],w=[1,47],j=[1,57],q=[43,51,53,54,55,74,75],W=[1,70],H=[1,68],V=[1,65],Q=[1,69],X=[1,71],ee=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],te=[1,78],se=[1,77],ie=[1,76],Ne=[69,70,71,72,73],xe=[1,91],Ae=[6,9,45,50],P=[6,9,12,44,45,50,51,52],re=[1,101],ae=[1,100],ne=[1,99],J=[18,61],Ie=[1,110],Re=[1,109],ve=[20,43,51,53,54,55],ge=[18,61,64,66],ye={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:b(function(a,o,u,i,g,e,$){var s=e.length-1;switch(g){case 1:break;case 2:this.$=[];break;case 3:this.$=e[s-1].concat(e[s]);break;case 4:this.$=e[s];break;case 5:case 6:this.$=[];break;case 7:i.addEntity(e[s-4]),i.addEntity(e[s-2]),i.addRelationship(e[s-4],e[s],e[s-2],e[s-3]),this.$=[e[s-4],e[s-2]];break;case 8:i.addEntity(e[s-8]),i.addEntity(e[s-4]),i.addRelationship(e[s-8],e[s],e[s-4],e[s-5]),i.setClass([e[s-8]],e[s-6]),i.setClass([e[s-4]],e[s-2]),this.$=[e[s-8],e[s-4]];break;case 9:i.addEntity(e[s-6]),i.addEntity(e[s-2]),i.addRelationship(e[s-6],e[s],e[s-2],e[s-3]),i.setClass([e[s-6]],e[s-4]),this.$=[e[s-6],e[s-2]];break;case 10:i.addEntity(e[s-6]),i.addEntity(e[s-4]),i.addRelationship(e[s-6],e[s],e[s-4],e[s-5]),i.setClass([e[s-4]],e[s-2]),this.$=[e[s-6],e[s-4]];break;case 11:i.addEntity(e[s-3]),i.addAttributes(e[s-3],e[s-1]),this.$=[e[s-3]];break;case 12:i.addEntity(e[s-5]),i.addAttributes(e[s-5],e[s-1]),i.setClass([e[s-5]],e[s-3]),this.$=[e[s-5]];break;case 13:i.addEntity(e[s-2]),this.$=[e[s-2]];break;case 14:i.addEntity(e[s-4]),i.setClass([e[s-4]],e[s-2]),this.$=[e[s-4]];break;case 15:i.addEntity(e[s]),this.$=[e[s]];break;case 16:i.addEntity(e[s-2]),i.setClass([e[s-2]],e[s]),this.$=[e[s-2]];break;case 17:i.addEntity(e[s-6],e[s-4]),i.addAttributes(e[s-6],e[s-1]),this.$=[e[s-6]];break;case 18:i.addEntity(e[s-8],e[s-6]),i.addAttributes(e[s-8],e[s-1]),i.setClass([e[s-8]],e[s-3]),this.$=[e[s-8]];break;case 19:i.addEntity(e[s-5],e[s-3]),this.$=[e[s-5]];break;case 20:i.addEntity(e[s-7],e[s-5]),i.setClass([e[s-7]],e[s-2]),this.$=[e[s-7]];break;case 21:i.addEntity(e[s-3],e[s-1]);break;case 22:i.addEntity(e[s-5],e[s-3]),i.setClass([e[s-5]],e[s]);break;case 23:case 24:this.$=e[s].trim(),i.setAccTitle(this.$);break;case 25:case 26:this.$=e[s].trim(),i.setAccDescription(this.$);break;case 27:i.subgraphDepth?this.$=e[s]:(i.setDirection(e[s].value),this.$=[]);break;case 31:i.subgraphDepth=(i.subgraphDepth||1)-1,this.$=i.addSubGraph({text:e[s-2].id},e[s-1],{text:e[s-2].text});break;case 32:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:e[s-1],text:e[s-1]};break;case 33:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:e[s-4],text:e[s-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=e[s];break;case 35:this.$=e[s-1]+" "+e[s];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=e[s-3],i.addClass(e[s-2],e[s-1]);break;case 41:case 42:case 63:case 72:this.$=[e[s]];break;case 43:case 44:this.$=e[s-2].concat([e[s]]);break;case 45:this.$=e[s-2],i.setClass(e[s-1],e[s]);break;case 46:this.$=e[s-3],i.addCssStyles(e[s-2],e[s-1]);break;case 47:this.$=[e[s]];break;case 48:e[s-2].push(e[s]),this.$=e[s-2];break;case 50:this.$=e[s-1]+e[s];break;case 58:case 84:case 85:this.$=e[s].replace(/"/g,"");break;case 64:e[s].push(e[s-1]),this.$=e[s];break;case 65:this.$={type:e[s-1],name:e[s]};break;case 66:this.$={type:e[s-2],name:e[s-1],keys:e[s]};break;case 67:this.$={type:e[s-2],name:e[s-1],comment:e[s]};break;case 68:this.$={type:e[s-3],name:e[s-2],keys:e[s-1],comment:e[s]};break;case 69:case 71:case 74:this.$=e[s];break;case 70:this.$=e[s-1]+e[s];break;case 73:e[s-2].push(e[s]),this.$=e[s-2];break;case 75:this.$=e[s].replace(/"/g,"");break;case 76:this.$={cardA:e[s],relType:e[s-1],cardB:e[s-2]};break;case 77:this.$=i.Cardinality.ZERO_OR_ONE;break;case 78:this.$=i.Cardinality.ZERO_OR_MORE;break;case 79:this.$=i.Cardinality.ONE_OR_MORE;break;case 80:this.$=i.Cardinality.ONLY_ONE;break;case 81:this.$=i.Cardinality.MD_PARENT;break;case 82:this.$=i.Identification.NON_IDENTIFYING;break;case 83:this.$=i.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(n,h,{5:3}),{6:[1,4],7:5,8:6,9:r,10:8,21:l,23:p,25:_,27:f,28:13,29:14,30:15,31:16,32:17,34:m,37:d,38:k,39:O,40:B,41:Y,43:E,46:I,47:K,51:N,53:R,54:v,55:D},t(n,Oe,{1:[2,1]}),t(c,[2,3]),t(c,[2,4]),t(c,[2,5]),t(c,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:de,70:be,71:pe,72:fe,73:ke}),{22:[1,41]},{24:[1,42]},{26:[1,43]},t(c,[2,26]),t(c,[2,27]),t(c,[2,28]),t(c,[2,29]),t(c,[2,30]),t(c,h,{5:44}),t(Z,[2,58]),t(Z,[2,59]),t(Z,[2,60]),t(Z,[2,61]),t(Z,[2,62]),t(c,[2,36]),t(c,[2,37]),t(c,[2,38]),t(c,[2,39]),{15:45,43:L,44:w},{15:48,43:L,44:w},{15:49,43:L,44:w},{10:50,43:E,51:N,53:R,54:v,55:D},{10:51,43:E,51:N,53:R,54:v,55:D},{15:52,43:L,44:w},{17:53,18:[1,54],56:55,57:56,61:j},{10:58,43:E,51:N,53:R,54:v,55:D},{68:59,74:[1,60],75:[1,61]},t(q,[2,77]),t(q,[2,78]),t(q,[2,79]),t(q,[2,80]),t(q,[2,81]),t(c,[2,23]),t(c,[2,24]),t(c,[2,25]),{6:[1,63],7:5,8:6,9:r,10:8,21:l,23:p,25:_,27:f,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:m,37:d,38:k,39:O,40:B,41:Y,43:E,46:I,47:K,51:N,53:R,54:v,55:D},{12:W,42:64,44:H,45:V,48:66,49:67,51:Q,52:X},t(ee,[2,41]),t(ee,[2,42]),{15:72,43:L,44:w,45:V},{12:W,42:73,44:H,45:V,48:66,49:67,51:Q,52:X},{6:te,9:se,19:[1,75],35:74,50:ie},{12:[1,79],14:[1,80]},t(c,[2,16],{67:35,11:81,16:[1,82],45:V,69:de,70:be,71:pe,72:fe,73:ke}),{18:[1,83]},t(c,[2,13]),{17:84,18:[2,63],56:55,57:56,61:j},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:de,70:be,71:pe,72:fe,73:ke},t(Ne,[2,82]),t(Ne,[2,83]),t(c,[2,31]),t(c,Oe),{6:te,9:se,35:90,45:xe,50:ie},{43:[1,92],44:[1,93]},t(Ae,[2,47],{49:94,12:W,44:H,51:Q,52:X}),t(P,[2,49]),t(P,[2,54]),t(P,[2,55]),t(P,[2,56]),t(P,[2,57]),t(c,[2,45],{45:V}),{6:te,9:se,35:95,45:xe,50:ie},t(c,[2,32]),{10:97,36:96,43:E,51:N,53:R,54:v,55:D},t(c,[2,51]),t(c,[2,52]),t(c,[2,53]),{13:98,43:re,53:ae,76:ne},{15:102,43:L,44:w},{10:103,43:E,51:N,53:R,54:v,55:D},{17:104,18:[1,105],56:55,57:56,61:j},t(c,[2,11]),{18:[2,64]},t(J,[2,65],{59:106,60:107,63:108,65:Ie,66:Re}),t([18,61,65,66],[2,71]),{61:[2,70]},t(c,[2,21],{14:[1,112],16:[1,111]}),t([43,51,53,54,55],[2,76]),t(c,[2,40]),{12:W,44:H,48:113,49:67,51:Q,52:X},t(ee,[2,43]),t(ee,[2,44]),t(P,[2,50]),t(c,[2,46]),{10:115,20:[1,114],43:E,51:N,53:R,54:v,55:D},t(ve,[2,34]),t(c,[2,7]),t(c,[2,84]),t(c,[2,85]),t(c,[2,86]),{12:[1,116],45:V},{12:[1,118],14:[1,117]},{18:[1,119]},t(c,[2,14]),t(J,[2,66],{60:120,64:[1,121],66:Re}),t(J,[2,67]),t(ge,[2,72]),t(J,[2,75]),t(ge,[2,74]),{17:122,18:[1,123],56:55,57:56,61:j},{15:124,43:L,44:w},t(Ae,[2,48],{49:94,12:W,44:H,51:Q,52:X}),{6:te,9:se,35:125,50:ie},t(ve,[2,35]),{13:126,43:re,53:ae,76:ne},{15:127,43:L,44:w},{13:128,43:re,53:ae,76:ne},t(c,[2,12]),t(J,[2,68]),{63:129,65:Ie},{18:[1,130]},t(c,[2,19]),t(c,[2,22],{16:[1,131],45:V}),t(c,[2,33]),t(c,[2,10]),{12:[1,132],45:V},t(c,[2,9]),t(ge,[2,73]),t(c,[2,17]),{17:133,18:[1,134],56:55,57:56,61:j},{13:135,43:re,53:ae,76:ne},{18:[1,136]},t(c,[2,20]),t(c,[2,8]),t(c,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:b(function(a,o){if(o.recoverable)this.trace(a);else{var u=new Error(a);throw u.hash=o,u}},"parseError"),parse:b(function(a){var o=this,u=[0],i=[],g=[null],e=[],$=this.table,s="",le=0,De=0,Le=0,lt=2,we=1,ct=e.slice.call(arguments,1),y=Object.create(this.lexer),G={yy:{}};for(var _e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_e)&&(G.yy[_e]=this.yy[_e]);y.setInput(a,G.yy),G.yy.lexer=y,G.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var me=y.yylloc;e.push(me);var ht=y.options&&y.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ut(T){u.length=u.length-2*T,g.length=g.length-T,e.length=e.length-T}b(ut,"popStack");function Ve(){var T;return T=i.pop()||y.lex()||we,typeof T!="number"&&(T instanceof Array&&(i=T,T=i.pop()),T=o.symbols_[T]||T),T}b(Ve,"lex");for(var S,Ee,F,C,yt,Se,z={},ce,x,Me,he;;){if(F=u[u.length-1],this.defaultActions[F]?C=this.defaultActions[F]:((S===null||typeof S>"u")&&(S=Ve()),C=$[F]&&$[F][S]),typeof C>"u"||!C.length||!C[0]){var Te="";he=[];for(ce in $[F])this.terminals_[ce]&&ce>lt&&he.push("'"+this.terminals_[ce]+"'");y.showPosition?Te="Parse error on line "+(le+1)+`:
2
+ `+y.showPosition()+`
3
+ Expecting `+he.join(", ")+", got '"+(this.terminals_[S]||S)+"'":Te="Parse error on line "+(le+1)+": Unexpected "+(S==we?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(Te,{text:y.match,token:this.terminals_[S]||S,line:y.yylineno,loc:me,expected:he})}if(C[0]instanceof Array&&C.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+S);switch(C[0]){case 1:u.push(S),g.push(y.yytext),e.push(y.yylloc),u.push(C[1]),S=null,Ee?(S=Ee,Ee=null):(De=y.yyleng,s=y.yytext,le=y.yylineno,me=y.yylloc,Le>0&&Le--);break;case 2:if(x=this.productions_[C[1]][1],z.$=g[g.length-x],z._$={first_line:e[e.length-(x||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(x||1)].first_column,last_column:e[e.length-1].last_column},ht&&(z._$.range=[e[e.length-(x||1)].range[0],e[e.length-1].range[1]]),Se=this.performAction.apply(z,[s,De,le,G.yy,C[1],g,e].concat(ct)),typeof Se<"u")return Se;x&&(u=u.slice(0,-1*x*2),g=g.slice(0,-1*x),e=e.slice(0,-1*x)),u.push(this.productions_[C[1]][0]),g.push(z.$),e.push(z._$),Me=$[u[u.length-2]][u[u.length-1]],u.push(Me);break;case 3:return!0}}return!0},"parse")},ot=(function(){var M={EOF:1,parseError:b(function(o,u){if(this.yy.parser)this.yy.parser.parseError(o,u);else throw new Error(o)},"parseError"),setInput:b(function(a,o){return this.yy=o||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var o=a.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:b(function(a){var o=a.length,u=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var g=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===i.length?this.yylloc.first_column:0)+i[i.length-u.length].length-u[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[g[0],g[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(a){this.unput(this.match.slice(a))},"less"),pastInput:b(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var a=this.pastInput(),o=new Array(a.length+1).join("-");return a+this.upcomingInput()+`
5
+ `+o+"^"},"showPosition"),test_match:b(function(a,o){var u,i,g;if(this.options.backtrack_lexer&&(g={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(g.yylloc.range=this.yylloc.range.slice(0))),i=a[0].match(/(?:\r\n?|\n).*/g),i&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],u=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),u)return u;if(this._backtrack){for(var e in g)this[e]=g[e];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,o,u,i;this._more||(this.yytext="",this.match="");for(var g=this._currentRules(),e=0;e<g.length;e++)if(u=this._input.match(this.rules[g[e]]),u&&(!o||u[0].length>o[0].length)){if(o=u,i=e,this.options.backtrack_lexer){if(a=this.test_match(u,g[e]),a!==!1)return a;if(this._backtrack){o=!1;continue}else return!1}else if(!this.options.flex)break}return o?(a=this.test_match(o,g[i]),a!==!1?a:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var o=this.next();return o||this.lex()},"lex"),begin:b(function(o){this.conditionStack.push(o)},"begin"),popState:b(function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},"topState"),pushState:b(function(o){this.begin(o)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:b(function(o,u,i,g){var e=g;switch(i){case 0:return this.begin("acc_title"),23;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),25;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 37;case 8:return 38;case 9:return 39;case 10:return 40;case 11:break;case 12:return 9;case 13:return 53;case 14:return 76;case 15:return 4;case 16:return this.begin("block"),16;break;case 17:return 52;case 18:return 52;case 19:return 45;case 20:return 14;case 21:return 12;case 22:break;case 23:return 65;case 24:return 61;case 25:return 61;case 26:this.begin("block_bq");break;case 27:return 61;case 28:this.popState();break;case 29:return 66;case 30:break;case 31:return this.popState(),18;break;case 32:return u.yytext[0];case 33:return 19;case 34:return 20;case 35:return this.begin("style"),47;break;case 36:return this.popState(),9;break;case 37:break;case 38:return 12;case 39:return 45;case 40:return 52;case 41:return this.begin("style"),41;break;case 42:return 46;case 43:return 34;case 44:return 33;case 45:return 69;case 46:return 71;case 47:return 71;case 48:return 71;case 49:return 69;case 50:return 69;case 51:return 70;case 52:return 70;case 53:return 70;case 54:return 70;case 55:return 70;case 56:return 71;case 57:return 70;case 58:return 71;case 59:return 72;case 60:return 72;case 61:return 54;case 62:return 72;case 63:return 72;case 64:return 72;case 65:return 55;case 66:return 51;case 67:return 72;case 68:return 69;case 69:return 70;case 70:return 71;case 71:return 73;case 72:return 74;case 73:return 75;case 74:return 75;case 75:return 74;case 76:return 74;case 77:return 74;case 78:return 44;case 79:return 50;case 80:return 43;case 81:return u.yytext[0];case 82:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[ \t\r]+)/i,/^(?:[\n]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\.,\u00C0-\uFFFF\*]*))/i,/^(?:[`])/i,/^(?:[^`]+)/i,/^(?:[`])/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:subgraph\b)/i,/^(?:end\b\s*)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[36,37,38,39,40,78,79],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block_bq:{rules:[27,28],inclusive:!1},block:{rules:[22,23,24,25,26,29,30,31,32],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,33,34,35,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,80,81,82],inclusive:!0}}};return M})();ye.lexer=ot;function oe(){this.yy={}}return b(oe,"Parser"),oe.prototype=ye,ye.Parser=oe,new oe})();Ce.parser=Ce;var dt=Ce,bt=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.subgraphDepth=0,this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=ze,this.getAccTitle=Ue,this.setAccDescription=Ke,this.getAccDescription=Ze,this.setDiagramTitle=je,this.getDiagramTitle=qe,this.getConfig=b(()=>U().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this),this.addSubGraph=this.addSubGraph.bind(this)}static{b(this,"ErDB")}addEntity(t,n=""){return this.entities.has(t)?!this.entities.get(t)?.alias&&n&&(this.entities.get(t).alias=n,A.info(`Add alias '${n}' to entity '${t}'`)):(this.entities.set(t,{id:`entity-${t}-${this.entities.size}`,label:t,attributes:[],alias:n,shape:"erBox",look:U().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),A.info("Added new entity :",t)),this.entities.get(t)}getEntity(t){return this.entities.get(t)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(t,n){let h=this.addEntity(t),r;for(r=n.length-1;r>=0;r--)n[r].keys||(n[r].keys=[]),n[r].comment||(n[r].comment=""),h.attributes.push(n[r]),A.debug("Added attribute ",n[r].name)}addRelationship(t,n,h,r){let l;if(this.subGraphLookup.has(t))l=t;else{let f=this.addEntity(t);if(!f)return;l=f.id}let p;if(this.subGraphLookup.has(h))p=h;else{let f=this.addEntity(h);if(!f)return;p=f.id}let _={entityA:l,roleA:n,entityB:p,relSpec:r};this.relationships.push(_),A.debug("Added new relationship :",_)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(t){this.direction=t}getCompiledStyles(t){let n=[];for(let h of t){let r=this.classes.get(h);r?.styles&&(n=[...n,...r.styles??[]].map(l=>l.trim())),r?.textStyles&&(n=[...n,...r.textStyles??[]].map(l=>l.trim()))}return n}addCssStyles(t,n){for(let h of t){let r=this.entities.get(h),l=this.subGraphLookup.get(h);if(n){if(r)for(let p of n)r.cssStyles.push(p);if(l){l.cssStyles||(l.cssStyles=[]);for(let p of n)l.cssStyles.push(p)}}}}addClass(t,n){t.forEach(h=>{let r=this.classes.get(h);r===void 0&&(r={id:h,styles:[],textStyles:[]},this.classes.set(h,r)),n&&n.forEach(function(l){if(/color/.exec(l)){let p=l.replace("fill","bgFill");r.textStyles.push(p)}r.styles.push(l)})})}addSubGraph(t,n,h){let r=t.text.trim(),l=h.text,_=b(k=>{let O=new Set,B;return{nodeList:k.filter(E=>{if(E?.stmt)return E.stmt==="dir"&&(B=E.value),!1;if(typeof E!="string")return!1;let I=E.trim();return!I||O.has(I)?!1:(O.add(I),!0)}),dir:B}},"uniq")(n.flat()),f=_.nodeList,m=_.dir;r=r??"subGraph"+this.subCount,l=l||"",l=this.sanitizeText(l),this.subCount=this.subCount+1;let d={id:r,nodes:f,title:l.trim(),classes:[],cssStyles:[],dir:m,labelType:this.sanitizeNodeLabelType(h?.type)};return A.info("Adding",d.id,d.nodes,d.dir),d.nodes=this.makeUniq(d,this.subGraphs).nodes,this.subGraphs.push(d),this.subGraphLookup.set(r,d),r}getSubGraphs(){return this.subGraphs}setClass(t,n){for(let h of t){let r=this.entities.get(h);if(r)for(let p of n)r.cssClasses+=" "+p;let l=this.subGraphLookup.get(h);if(l)for(let p of n)l.classes.push(p)}}subgraphNodeCache(t){let n=new Set;for(let h of t)for(let r of h.nodes)n.add(r);return n}makeUniq(t,n){let h=this.subgraphNodeCache(n),r=[];return t.nodes.forEach((l,p)=>{h.has(l)?A.warn(`Entity '${l}' already belongs to another subgraph and will be ignored`):r.push(t.nodes[p])}),{nodes:r}}sanitizeText(t){return Ye.sanitizeText(t,U())}sanitizeNodeLabelType(t){switch(t){case"markdown":case"string":case"text":return t;default:return"markdown"}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.subgraphDepth=0,Pe()}getData(){let t=[],n=[],h=U(),r=this.getSubGraphs(),l=new Map,p=new Map;for(let d=r.length-1;d>=0;d--){let k=r[d];k.nodes.length>0&&p.set(k.id,!0);for(let O of k.nodes)l.set(O,k.id)}for(let d=r.length-1;d>=0;d--){let k=r[d];t.push({id:k.id,label:k.title,labelStyle:"",labelType:k.labelType,parentId:l.get(k.id),padding:8,cssCompiledStyles:this.getCompiledStyles(k.classes),cssStyles:k.cssStyles,cssClasses:k.classes.join(" "),shape:"rect",dir:k.dir,isGroup:!0,look:h.look})}let _=new Set(r.map(d=>d.id)),f=0;for(let d of this.entities.keys()){if(_.has(d))continue;let k=this.entities.get(d);k&&(k.cssCompiledStyles=this.getCompiledStyles(k.cssClasses.split(" ")),k.colorIndex=f++,t.push({...k,parentId:l.get(d),isGroup:!1}))}let m=0;for(let d of this.relationships){let k={id:Qe(d.entityA,d.entityB,{prefix:"id",counter:m++}),type:"normal",curve:"basis",start:d.entityA,end:d.entityB,label:d.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:d.relSpec.cardB.toLowerCase(),arrowTypeEnd:d.relSpec.cardA.toLowerCase(),pattern:d.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:h.look,labelType:"markdown"};n.push(k)}return{nodes:t,edges:n,other:{},config:h,direction:this.direction}}},nt={};Be(nt,{draw:()=>pt});var pt=b(async function(t,n,h,r){A.info("REF0:"),A.info("Drawing er diagram (unified)",n);let{securityLevel:l,er:p,layout:_}=U(),f=r.db.getData(),m=it(n,l);f.type=r.type,f.layoutAlgorithm=st(_),f.config.flowchart.nodeSpacing=p?.nodeSpacing||140,f.config.flowchart.rankSpacing=p?.rankSpacing||80,f.direction=r.db.getDirection();let{config:d}=f,{look:k}=d;k==="neo"?f.markers=["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"]:f.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],f.diagramId=n,await tt(f,m);let O=m.selectAll('[id*="-background"]');Array.from(O).length>0&&O.each(function(){let Y=We(this),I=Y.attr("id").replace("-background",""),K=m.select(`#${CSS.escape(I)}`);if(!K.empty()){let N=K.attr("transform");Y.attr("transform",N)}});let B=8;He.insertTitle(m,"erDiagramTitleText",p?.titleTopMargin??25,r.db.getDiagramTitle()),rt(m,B,"erDiagram",p?.useMaxWidth??!0)},"draw"),at=b((t,n)=>{let h=Fe,r=h(t,"r"),l=h(t,"g"),p=h(t,"b");return Ge(r,l,p,n)},"fade"),ft=b(t=>{let{theme:n,bkgColorArray:h,borderColorArray:r}=t;if(!Je(n,r))return"";let l=$e(t.look),p=Xe(h),_="";for(let f=0;f<et(r);f++){let m=r[f],d=p?`fill: ${h[f%h.length]};`:"";_+=`
7
+
8
+ [data-look="${l}"][data-color-id="color-${f}"].node path {
9
+ stroke: ${m};
10
+ ${d}
11
+ }
12
+
13
+ [data-look="${l}"][data-color-id="color-${f}"].node rect {
14
+ stroke: ${m};
15
+ ${d}
16
+ }
17
+ `}return _},"genColor"),kt=b(t=>{let{look:n,theme:h,erEdgeLabelBackground:r,strokeWidth:l}=t;return`
18
+ ${ft(t)}
19
+ .entityBox {
20
+ fill: ${t.mainBkg};
21
+ stroke: ${t.nodeBorder};
22
+ }
23
+
24
+ .relationshipLabelBox {
25
+ fill: ${t.tertiaryColor};
26
+ opacity: 0.7;
27
+ background-color: ${t.tertiaryColor};
28
+ rect {
29
+ opacity: 0.5;
30
+ }
31
+ }
32
+
33
+ .labelBkg {
34
+ background-color: ${ue.has(h)&&r?r:at(t.tertiaryColor,.5)};
35
+ }
36
+
37
+ .edgeLabel {
38
+ background-color: ${ue.has(h)&&r?r:t.edgeLabelBackground};
39
+ }
40
+ .edgeLabel .label rect {
41
+ fill: ${ue.has(h)&&r?r:t.edgeLabelBackground};
42
+ }
43
+ .edgeLabel .label text {
44
+ fill: ${t.textColor};
45
+ }
46
+
47
+ .edgeLabel .label {
48
+ fill: ${t.nodeBorder};
49
+ font-size: 14px;
50
+ }
51
+
52
+ .label {
53
+ font-family: ${t.fontFamily};
54
+ color: ${t.nodeTextColor||t.textColor};
55
+ }
56
+
57
+ .edge-pattern-dashed {
58
+ stroke-dasharray: 8,8;
59
+ }
60
+
61
+ .node rect,
62
+ .node circle,
63
+ .node ellipse,
64
+ .node polygon
65
+ {
66
+ fill: ${t.mainBkg};
67
+ stroke: ${t.nodeBorder};
68
+ stroke-width: ${n==="neo"?l:"1px"};
69
+ }
70
+
71
+ .relationshipLine {
72
+ stroke: ${t.lineColor};
73
+ stroke-width: ${n==="neo"?l:"1px"};
74
+ fill: none;
75
+ }
76
+
77
+ .marker {
78
+ fill: none !important;
79
+ stroke: ${t.lineColor} !important;
80
+ stroke-width: 1;
81
+ }
82
+ [data-look=neo].labelBkg {
83
+ background-color: ${at(t.tertiaryColor,.5)};
84
+ }
85
+
86
+ .cluster rect {
87
+ fill: ${t.clusterBkg??t.mainBkg};
88
+ stroke: ${t.clusterBorder??t.nodeBorder};
89
+ stroke-width: 1px;
90
+ }
91
+
92
+ .cluster text {
93
+ fill: ${t.titleColor??t.textColor};
94
+ }
95
+
96
+ .cluster-label text {
97
+ fill: ${t.titleColor??t.textColor};
98
+ }
99
+ `},"getStyles"),gt=kt,Bt={parser:dt,get db(){return new bt},renderer:nt,styles:gt};export{Bt as diagram};
@@ -0,0 +1 @@
1
+ import{a as j}from"./chunk-ZH3OWPCF.js";import{b as V,h as it}from"./chunk-T5KDILTJ.js";import{a as W}from"./chunk-DHQUYWHD.js";import{b as $,c as pt}from"./chunk-W6DARM7I.js";var q=$((k,K)=>{(function(C,v){typeof k=="object"&&typeof K=="object"?K.exports=v():typeof define=="function"&&define.amd?define([],v):typeof k=="object"?k.layoutBase=v():C.layoutBase=v()})(k,function(){return(function(N){var C={};function v(n){if(C[n])return C[n].exports;var e=C[n]={i:n,l:!1,exports:{}};return N[n].call(e.exports,e,e.exports,v),e.l=!0,e.exports}return v.m=N,v.c=C,v.i=function(n){return n},v.d=function(n,e,t){v.o(n,e)||Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:t})},v.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return v.d(e,"a",e),e},v.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},v.p="",v(v.s=26)})([(function(N,C,v){"use strict";function n(){}n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,N.exports=n}),(function(N,C,v){"use strict";var n=v(2),e=v(8),t=v(9);function r(u,s,p){n.call(this,p),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=p,this.bendpoints=[],this.source=u,this.target=s}r.prototype=Object.create(n.prototype);for(var a in n)r[a]=n[a];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(u){if(this.source===u)return this.target;if(this.target===u)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(u,s){for(var p=this.getOtherEnd(u),i=s.getGraphManager().getRoot();;){if(p.getOwner()==s)return p;if(p.getOwner()==i)break;p=p.getOwner().getParent()}return null},r.prototype.updateLength=function(){var u=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),u),this.isOverlapingSourceAndTarget||(this.lengthX=u[0]-u[2],this.lengthY=u[1]-u[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=r}),(function(N,C,v){"use strict";function n(e){this.vGraphObject=e}N.exports=n}),(function(N,C,v){"use strict";var n=v(2),e=v(10),t=v(13),r=v(0),a=v(16),u=v(4);function s(i,h,l,d){l==null&&d==null&&(d=h),n.call(this,d),i.graphManager!=null&&(i=i.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=d,this.edges=[],this.graphManager=i,l!=null&&h!=null?this.rect=new t(h.x,h.y,l.width,l.height):this.rect=new t}s.prototype=Object.create(n.prototype);for(var p in n)s[p]=n[p];s.prototype.getEdges=function(){return this.edges},s.prototype.getChild=function(){return this.child},s.prototype.getOwner=function(){return this.owner},s.prototype.getWidth=function(){return this.rect.width},s.prototype.setWidth=function(i){this.rect.width=i},s.prototype.getHeight=function(){return this.rect.height},s.prototype.setHeight=function(i){this.rect.height=i},s.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},s.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},s.prototype.getCenter=function(){return new u(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},s.prototype.getLocation=function(){return new u(this.rect.x,this.rect.y)},s.prototype.getRect=function(){return this.rect},s.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},s.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},s.prototype.setRect=function(i,h){this.rect.x=i.x,this.rect.y=i.y,this.rect.width=h.width,this.rect.height=h.height},s.prototype.setCenter=function(i,h){this.rect.x=i-this.rect.width/2,this.rect.y=h-this.rect.height/2},s.prototype.setLocation=function(i,h){this.rect.x=i,this.rect.y=h},s.prototype.moveBy=function(i,h){this.rect.x+=i,this.rect.y+=h},s.prototype.getEdgeListToNode=function(i){var h=[],l,d=this;return d.edges.forEach(function(y){if(y.target==i){if(y.source!=d)throw"Incorrect edge source!";h.push(y)}}),h},s.prototype.getEdgesBetween=function(i){var h=[],l,d=this;return d.edges.forEach(function(y){if(!(y.source==d||y.target==d))throw"Incorrect edge source and/or target";(y.target==i||y.source==i)&&h.push(y)}),h},s.prototype.getNeighborsList=function(){var i=new Set,h=this;return h.edges.forEach(function(l){if(l.source==h)i.add(l.target);else{if(l.target!=h)throw"Incorrect incidency!";i.add(l.source)}}),i},s.prototype.withChildren=function(){var i=new Set,h,l;if(i.add(this),this.child!=null)for(var d=this.child.getNodes(),y=0;y<d.length;y++)h=d[y],l=h.withChildren(),l.forEach(function(T){i.add(T)});return i},s.prototype.getNoOfChildren=function(){var i=0,h;if(this.child==null)i=1;else for(var l=this.child.getNodes(),d=0;d<l.length;d++)h=l[d],i+=h.getNoOfChildren();return i==0&&(i=1),i},s.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},s.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},s.prototype.scatter=function(){var i,h,l=-r.INITIAL_WORLD_BOUNDARY,d=r.INITIAL_WORLD_BOUNDARY;i=r.WORLD_CENTER_X+a.nextDouble()*(d-l)+l;var y=-r.INITIAL_WORLD_BOUNDARY,T=r.INITIAL_WORLD_BOUNDARY;h=r.WORLD_CENTER_Y+a.nextDouble()*(T-y)+y,this.rect.x=i,this.rect.y=h},s.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var i=this.getChild();if(i.updateBounds(!0),this.rect.x=i.getLeft(),this.rect.y=i.getTop(),this.setWidth(i.getRight()-i.getLeft()),this.setHeight(i.getBottom()-i.getTop()),r.NODE_DIMENSIONS_INCLUDE_LABELS){var h=i.getRight()-i.getLeft(),l=i.getBottom()-i.getTop();this.labelWidth>h&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>l&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-l)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-l),this.setHeight(this.labelHeight))}}},s.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},s.prototype.transform=function(i){var h=this.rect.x;h>r.WORLD_BOUNDARY?h=r.WORLD_BOUNDARY:h<-r.WORLD_BOUNDARY&&(h=-r.WORLD_BOUNDARY);var l=this.rect.y;l>r.WORLD_BOUNDARY?l=r.WORLD_BOUNDARY:l<-r.WORLD_BOUNDARY&&(l=-r.WORLD_BOUNDARY);var d=new u(h,l),y=i.inverseTransformPoint(d);this.setLocation(y.x,y.y)},s.prototype.getLeft=function(){return this.rect.x},s.prototype.getRight=function(){return this.rect.x+this.rect.width},s.prototype.getTop=function(){return this.rect.y},s.prototype.getBottom=function(){return this.rect.y+this.rect.height},s.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},N.exports=s}),(function(N,C,v){"use strict";function n(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(e){this.x=e},n.prototype.setY=function(e){this.y=e},n.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},N.exports=n}),(function(N,C,v){"use strict";var n=v(2),e=v(10),t=v(0),r=v(6),a=v(3),u=v(1),s=v(13),p=v(12),i=v(11);function h(d,y,T){n.call(this,T),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=d,y!=null&&y instanceof r?this.graphManager=y:y!=null&&y instanceof Layout&&(this.graphManager=y.graphManager)}h.prototype=Object.create(n.prototype);for(var l in n)h[l]=n[l];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(d,y,T){if(y==null&&T==null){var c=d;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(c)>-1)throw"Node already in graph!";return c.owner=this,this.getNodes().push(c),c}else{var D=d;if(!(this.getNodes().indexOf(y)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(y.owner==T.owner&&y.owner==this))throw"Both owners must be this graph!";return y.owner!=T.owner?null:(D.source=y,D.target=T,D.isInterGraph=!1,this.getEdges().push(D),y.edges.push(D),T!=y&&T.edges.push(D),D)}},h.prototype.remove=function(d){var y=d;if(d instanceof a){if(y==null)throw"Node is null!";if(!(y.owner!=null&&y.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=y.edges.slice(),c,D=T.length,E=0;E<D;E++)c=T[E],c.isInterGraph?this.graphManager.remove(c):c.source.owner.remove(c);var O=this.nodes.indexOf(y);if(O==-1)throw"Node not in owner node list!";this.nodes.splice(O,1)}else if(d instanceof u){var c=d;if(c==null)throw"Edge is null!";if(!(c.source!=null&&c.target!=null))throw"Source and/or target is null!";if(!(c.source.owner!=null&&c.target.owner!=null&&c.source.owner==this&&c.target.owner==this))throw"Source and/or target owner is invalid!";var o=c.source.edges.indexOf(c),g=c.target.edges.indexOf(c);if(!(o>-1&&g>-1))throw"Source and/or target doesn't know this edge!";c.source.edges.splice(o,1),c.target!=c.source&&c.target.edges.splice(g,1);var O=c.source.owner.getEdges().indexOf(c);if(O==-1)throw"Not in owner's edge list!";c.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var d=e.MAX_VALUE,y=e.MAX_VALUE,T,c,D,E=this.getNodes(),O=E.length,o=0;o<O;o++){var g=E[o];T=g.getTop(),c=g.getLeft(),d>T&&(d=T),y>c&&(y=c)}return d==e.MAX_VALUE?null:(E[0].getParent().paddingLeft!=null?D=E[0].getParent().paddingLeft:D=this.margin,this.left=y-D,this.top=d-D,new p(this.left,this.top))},h.prototype.updateBounds=function(d){for(var y=e.MAX_VALUE,T=-e.MAX_VALUE,c=e.MAX_VALUE,D=-e.MAX_VALUE,E,O,o,g,f,L=this.nodes,A=L.length,I=0;I<A;I++){var m=L[I];d&&m.child!=null&&m.updateBounds(),E=m.getLeft(),O=m.getRight(),o=m.getTop(),g=m.getBottom(),y>E&&(y=E),T<O&&(T=O),c>o&&(c=o),D<g&&(D=g)}var R=new s(y,c,T-y,D-c);y==e.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),L[0].getParent().paddingLeft!=null?f=L[0].getParent().paddingLeft:f=this.margin,this.left=R.x-f,this.right=R.x+R.width+f,this.top=R.y-f,this.bottom=R.y+R.height+f},h.calculateBounds=function(d){for(var y=e.MAX_VALUE,T=-e.MAX_VALUE,c=e.MAX_VALUE,D=-e.MAX_VALUE,E,O,o,g,f=d.length,L=0;L<f;L++){var A=d[L];E=A.getLeft(),O=A.getRight(),o=A.getTop(),g=A.getBottom(),y>E&&(y=E),T<O&&(T=O),c>o&&(c=o),D<g&&(D=g)}var I=new s(y,c,T-y,D-c);return I},h.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){for(var d=0,y=this.nodes,T=y.length,c=0;c<T;c++){var D=y[c];d+=D.calcEstimatedSize()}return d==0?this.estimatedSize=t.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=d/Math.sqrt(this.nodes.length),this.estimatedSize},h.prototype.updateConnected=function(){var d=this;if(this.nodes.length==0){this.isConnected=!0;return}var y=new i,T=new Set,c=this.nodes[0],D,E,O=c.withChildren();for(O.forEach(function(I){y.push(I),T.add(I)});y.length!==0;){c=y.shift(),D=c.getEdges();for(var o=D.length,g=0;g<o;g++){var f=D[g];if(E=f.getOtherEndInGraph(c,this),E!=null&&!T.has(E)){var L=E.withChildren();L.forEach(function(I){y.push(I),T.add(I)})}}}if(this.isConnected=!1,T.size>=this.nodes.length){var A=0;T.forEach(function(I){I.owner==d&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},N.exports=h}),(function(N,C,v){"use strict";var n,e=v(1);function t(r){n=v(5),this.layout=r,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var r=this.layout.newGraph(),a=this.layout.newNode(null),u=this.add(r,a);return this.setRootGraph(u),this.rootGraph},t.prototype.add=function(r,a,u,s,p){if(u==null&&s==null&&p==null){if(r==null)throw"Graph is null!";if(a==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(a.child!=null)throw"Already has a child!";return r.parent=a,a.child=r,r}else{p=u,s=a,u=r;var i=s.getOwner(),h=p.getOwner();if(!(i!=null&&i.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(i==h)return u.isInterGraph=!1,i.add(u,s,p);if(u.isInterGraph=!0,u.source=s,u.target=p,this.edges.indexOf(u)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(u),!(u.source!=null&&u.target!=null))throw"Edge source and/or target is null!";if(!(u.source.edges.indexOf(u)==-1&&u.target.edges.indexOf(u)==-1))throw"Edge already in source and/or target incidency list!";return u.source.edges.push(u),u.target.edges.push(u),u}},t.prototype.remove=function(r){if(r instanceof n){var a=r;if(a.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(a==this.rootGraph||a.parent!=null&&a.parent.graphManager==this))throw"Invalid parent node!";var u=[];u=u.concat(a.getEdges());for(var s,p=u.length,i=0;i<p;i++)s=u[i],a.remove(s);var h=[];h=h.concat(a.getNodes());var l;p=h.length;for(var i=0;i<p;i++)l=h[i],a.remove(l);a==this.rootGraph&&this.setRootGraph(null);var d=this.graphs.indexOf(a);this.graphs.splice(d,1),a.parent=null}else if(r instanceof e){if(s=r,s==null)throw"Edge is null!";if(!s.isInterGraph)throw"Not an inter-graph edge!";if(!(s.source!=null&&s.target!=null))throw"Source and/or target is null!";if(!(s.source.edges.indexOf(s)!=-1&&s.target.edges.indexOf(s)!=-1))throw"Source and/or target doesn't know this edge!";var d=s.source.edges.indexOf(s);if(s.source.edges.splice(d,1),d=s.target.edges.indexOf(s),s.target.edges.splice(d,1),!(s.source.owner!=null&&s.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(s.source.owner.getGraphManager().edges.indexOf(s)==-1)throw"Not in owner graph manager's edge list!";var d=s.source.owner.getGraphManager().edges.indexOf(s);s.source.owner.getGraphManager().edges.splice(d,1)}},t.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},t.prototype.getGraphs=function(){return this.graphs},t.prototype.getAllNodes=function(){if(this.allNodes==null){for(var r=[],a=this.getGraphs(),u=a.length,s=0;s<u;s++)r=r.concat(a[s].getNodes());this.allNodes=r}return this.allNodes},t.prototype.resetAllNodes=function(){this.allNodes=null},t.prototype.resetAllEdges=function(){this.allEdges=null},t.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},t.prototype.getAllEdges=function(){if(this.allEdges==null){for(var r=[],a=this.getGraphs(),u=a.length,s=0;s<a.length;s++)r=r.concat(a[s].getEdges());r=r.concat(this.edges),this.allEdges=r}return this.allEdges},t.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},t.prototype.setAllNodesToApplyGravitation=function(r){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=r},t.prototype.getRoot=function(){return this.rootGraph},t.prototype.setRootGraph=function(r){if(r.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=r,r.parent==null&&(r.parent=this.layout.newNode("Root node"))},t.prototype.getLayout=function(){return this.layout},t.prototype.isOneAncestorOfOther=function(r,a){if(!(r!=null&&a!=null))throw"assert failed";if(r==a)return!0;var u=r.getOwner(),s;do{if(s=u.getParent(),s==null)break;if(s==a)return!0;if(u=s.getOwner(),u==null)break}while(!0);u=a.getOwner();do{if(s=u.getParent(),s==null)break;if(s==r)return!0;if(u=s.getOwner(),u==null)break}while(!0);return!1},t.prototype.calcLowestCommonAncestors=function(){for(var r,a,u,s,p,i=this.getAllEdges(),h=i.length,l=0;l<h;l++){if(r=i[l],a=r.source,u=r.target,r.lca=null,r.sourceInLca=a,r.targetInLca=u,a==u){r.lca=a.getOwner();continue}for(s=a.getOwner();r.lca==null;){for(r.targetInLca=u,p=u.getOwner();r.lca==null;){if(p==s){r.lca=p;break}if(p==this.rootGraph)break;if(r.lca!=null)throw"assert failed";r.targetInLca=p.getParent(),p=r.targetInLca.getOwner()}if(s==this.rootGraph)break;r.lca==null&&(r.sourceInLca=s.getParent(),s=r.sourceInLca.getOwner())}if(r.lca==null)throw"assert failed"}},t.prototype.calcLowestCommonAncestor=function(r,a){if(r==a)return r.getOwner();var u=r.getOwner();do{if(u==null)break;var s=a.getOwner();do{if(s==null)break;if(s==u)return s;s=s.getParent().getOwner()}while(!0);u=u.getParent().getOwner()}while(!0);return u},t.prototype.calcInclusionTreeDepths=function(r,a){r==null&&a==null&&(r=this.rootGraph,a=1);for(var u,s=r.getNodes(),p=s.length,i=0;i<p;i++)u=s[i],u.inclusionTreeDepth=a,u.child!=null&&this.calcInclusionTreeDepths(u.child,a+1)},t.prototype.includesInvalidEdge=function(){for(var r,a=this.edges.length,u=0;u<a;u++)if(r=this.edges[u],this.isOneAncestorOfOther(r.source,r.target))return!0;return!1},N.exports=t}),(function(N,C,v){"use strict";var n=v(0);function e(){}for(var t in n)e[t]=n[t];e.MAX_ITERATIONS=2500,e.DEFAULT_EDGE_LENGTH=50,e.DEFAULT_SPRING_STRENGTH=.45,e.DEFAULT_REPULSION_STRENGTH=4500,e.DEFAULT_GRAVITY_STRENGTH=.4,e.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,e.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,e.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,e.COOLING_ADAPTATION_FACTOR=.33,e.ADAPTATION_LOWER_NODE_LIMIT=1e3,e.ADAPTATION_UPPER_NODE_LIMIT=5e3,e.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,e.MAX_NODE_DISPLACEMENT=e.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,e.MIN_REPULSION_DIST=e.DEFAULT_EDGE_LENGTH/10,e.CONVERGENCE_CHECK_PERIOD=100,e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,e.MIN_EDGE_LENGTH=1,e.GRID_CALCULATION_CHECK_PERIOD=10,N.exports=e}),(function(N,C,v){"use strict";var n=v(12);function e(){}e.calcSeparationAmount=function(t,r,a,u){if(!t.intersects(r))throw"assert failed";var s=new Array(2);this.decideDirectionsForOverlappingNodes(t,r,s),a[0]=Math.min(t.getRight(),r.getRight())-Math.max(t.x,r.x),a[1]=Math.min(t.getBottom(),r.getBottom())-Math.max(t.y,r.y),t.getX()<=r.getX()&&t.getRight()>=r.getRight()?a[0]+=Math.min(r.getX()-t.getX(),t.getRight()-r.getRight()):r.getX()<=t.getX()&&r.getRight()>=t.getRight()&&(a[0]+=Math.min(t.getX()-r.getX(),r.getRight()-t.getRight())),t.getY()<=r.getY()&&t.getBottom()>=r.getBottom()?a[1]+=Math.min(r.getY()-t.getY(),t.getBottom()-r.getBottom()):r.getY()<=t.getY()&&r.getBottom()>=t.getBottom()&&(a[1]+=Math.min(t.getY()-r.getY(),r.getBottom()-t.getBottom()));var p=Math.abs((r.getCenterY()-t.getCenterY())/(r.getCenterX()-t.getCenterX()));r.getCenterY()===t.getCenterY()&&r.getCenterX()===t.getCenterX()&&(p=1);var i=p*a[0],h=a[1]/p;a[0]<h?h=a[0]:i=a[1],a[0]=-1*s[0]*(h/2+u),a[1]=-1*s[1]*(i/2+u)},e.decideDirectionsForOverlappingNodes=function(t,r,a){t.getCenterX()<r.getCenterX()?a[0]=-1:a[0]=1,t.getCenterY()<r.getCenterY()?a[1]=-1:a[1]=1},e.getIntersection2=function(t,r,a){var u=t.getCenterX(),s=t.getCenterY(),p=r.getCenterX(),i=r.getCenterY();if(t.intersects(r))return a[0]=u,a[1]=s,a[2]=p,a[3]=i,!0;var h=t.getX(),l=t.getY(),d=t.getRight(),y=t.getX(),T=t.getBottom(),c=t.getRight(),D=t.getWidthHalf(),E=t.getHeightHalf(),O=r.getX(),o=r.getY(),g=r.getRight(),f=r.getX(),L=r.getBottom(),A=r.getRight(),I=r.getWidthHalf(),m=r.getHeightHalf(),R=!1,w=!1;if(u===p){if(s>i)return a[0]=u,a[1]=l,a[2]=p,a[3]=L,!1;if(s<i)return a[0]=u,a[1]=T,a[2]=p,a[3]=o,!1}else if(s===i){if(u>p)return a[0]=h,a[1]=s,a[2]=g,a[3]=i,!1;if(u<p)return a[0]=d,a[1]=s,a[2]=O,a[3]=i,!1}else{var F=t.height/t.width,Y=r.height/r.width,x=(i-s)/(p-u),M=void 0,G=void 0,S=void 0,P=void 0,_=void 0,U=void 0;if(-F===x?u>p?(a[0]=y,a[1]=T,R=!0):(a[0]=d,a[1]=l,R=!0):F===x&&(u>p?(a[0]=h,a[1]=l,R=!0):(a[0]=c,a[1]=T,R=!0)),-Y===x?p>u?(a[2]=f,a[3]=L,w=!0):(a[2]=g,a[3]=o,w=!0):Y===x&&(p>u?(a[2]=O,a[3]=o,w=!0):(a[2]=A,a[3]=L,w=!0)),R&&w)return!1;if(u>p?s>i?(M=this.getCardinalDirection(F,x,4),G=this.getCardinalDirection(Y,x,2)):(M=this.getCardinalDirection(-F,x,3),G=this.getCardinalDirection(-Y,x,1)):s>i?(M=this.getCardinalDirection(-F,x,1),G=this.getCardinalDirection(-Y,x,3)):(M=this.getCardinalDirection(F,x,2),G=this.getCardinalDirection(Y,x,4)),!R)switch(M){case 1:P=l,S=u+-E/x,a[0]=S,a[1]=P;break;case 2:S=c,P=s+D*x,a[0]=S,a[1]=P;break;case 3:P=T,S=u+E/x,a[0]=S,a[1]=P;break;case 4:S=y,P=s+-D*x,a[0]=S,a[1]=P;break}if(!w)switch(G){case 1:U=o,_=p+-m/x,a[2]=_,a[3]=U;break;case 2:_=A,U=i+I*x,a[2]=_,a[3]=U;break;case 3:U=L,_=p+m/x,a[2]=_,a[3]=U;break;case 4:_=f,U=i+-I*x,a[2]=_,a[3]=U;break}}return!1},e.getCardinalDirection=function(t,r,a){return t>r?a:1+a%4},e.getIntersection=function(t,r,a,u){if(u==null)return this.getIntersection2(t,r,a);var s=t.x,p=t.y,i=r.x,h=r.y,l=a.x,d=a.y,y=u.x,T=u.y,c=void 0,D=void 0,E=void 0,O=void 0,o=void 0,g=void 0,f=void 0,L=void 0,A=void 0;return E=h-p,o=s-i,f=i*p-s*h,O=T-d,g=l-y,L=y*d-l*T,A=E*g-O*o,A===0?null:(c=(o*L-g*f)/A,D=(O*f-E*L)/A,new n(c,D))},e.angleOfVector=function(t,r,a,u){var s=void 0;return t!==a?(s=Math.atan((u-r)/(a-t)),a<t?s+=Math.PI:u<r&&(s+=this.TWO_PI)):u<r?s=this.ONE_AND_HALF_PI:s=this.HALF_PI,s},e.doIntersect=function(t,r,a,u){var s=t.x,p=t.y,i=r.x,h=r.y,l=a.x,d=a.y,y=u.x,T=u.y,c=(i-s)*(T-d)-(y-l)*(h-p);if(c===0)return!1;var D=((T-d)*(y-s)+(l-y)*(T-p))/c,E=((p-h)*(y-s)+(i-s)*(T-p))/c;return 0<D&&D<1&&0<E&&E<1},e.HALF_PI=.5*Math.PI,e.ONE_AND_HALF_PI=1.5*Math.PI,e.TWO_PI=2*Math.PI,e.THREE_PI=3*Math.PI,N.exports=e}),(function(N,C,v){"use strict";function n(){}n.sign=function(e){return e>0?1:e<0?-1:0},n.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},n.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},N.exports=n}),(function(N,C,v){"use strict";function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,N.exports=n}),(function(N,C,v){"use strict";var n=(function(){function s(p,i){for(var h=0;h<i.length;h++){var l=i[h];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(p,l.key,l)}}return function(p,i,h){return i&&s(p.prototype,i),h&&s(p,h),p}})();function e(s,p){if(!(s instanceof p))throw new TypeError("Cannot call a class as a function")}var t=function(p){return{value:p,next:null,prev:null}},r=function(p,i,h,l){return p!==null?p.next=i:l.head=i,h!==null?h.prev=i:l.tail=i,i.prev=p,i.next=h,l.length++,i},a=function(p,i){var h=p.prev,l=p.next;return h!==null?h.next=l:i.head=l,l!==null?l.prev=h:i.tail=h,p.prev=p.next=null,i.length--,p},u=(function(){function s(p){var i=this;e(this,s),this.length=0,this.head=null,this.tail=null,p?.forEach(function(h){return i.push(h)})}return n(s,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(i,h){return r(h.prev,t(i),h,this)}},{key:"insertAfter",value:function(i,h){return r(h,t(i),h.next,this)}},{key:"insertNodeBefore",value:function(i,h){return r(h.prev,i,h,this)}},{key:"insertNodeAfter",value:function(i,h){return r(h,i,h.next,this)}},{key:"push",value:function(i){return r(this.tail,t(i),null,this)}},{key:"unshift",value:function(i){return r(null,t(i),this.head,this)}},{key:"remove",value:function(i){return a(i,this)}},{key:"pop",value:function(){return a(this.tail,this).value}},{key:"popNode",value:function(){return a(this.tail,this)}},{key:"shift",value:function(){return a(this.head,this).value}},{key:"shiftNode",value:function(){return a(this.head,this)}},{key:"get_object_at",value:function(i){if(i<=this.length()){for(var h=1,l=this.head;h<i;)l=l.next,h++;return l.value}}},{key:"set_object_at",value:function(i,h){if(i<=this.length()){for(var l=1,d=this.head;l<i;)d=d.next,l++;d.value=h}}}]),s})();N.exports=u}),(function(N,C,v){"use strict";function n(e,t,r){this.x=null,this.y=null,e==null&&t==null&&r==null?(this.x=0,this.y=0):typeof e=="number"&&typeof t=="number"&&r==null?(this.x=e,this.y=t):e.constructor.name=="Point"&&t==null&&r==null&&(r=e,this.x=r.x,this.y=r.y)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.getLocation=function(){return new n(this.x,this.y)},n.prototype.setLocation=function(e,t,r){e.constructor.name=="Point"&&t==null&&r==null?(r=e,this.setLocation(r.x,r.y)):typeof e=="number"&&typeof t=="number"&&r==null&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},n.prototype.move=function(e,t){this.x=e,this.y=t},n.prototype.translate=function(e,t){this.x+=e,this.y+=t},n.prototype.equals=function(e){if(e.constructor.name=="Point"){var t=e;return this.x==t.x&&this.y==t.y}return this==e},n.prototype.toString=function(){return new n().constructor.name+"[x="+this.x+",y="+this.y+"]"},N.exports=n}),(function(N,C,v){"use strict";function n(e,t,r,a){this.x=0,this.y=0,this.width=0,this.height=0,e!=null&&t!=null&&r!=null&&a!=null&&(this.x=e,this.y=t,this.width=r,this.height=a)}n.prototype.getX=function(){return this.x},n.prototype.setX=function(e){this.x=e},n.prototype.getY=function(){return this.y},n.prototype.setY=function(e){this.y=e},n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(e){this.width=e},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(e){this.height=e},n.prototype.getRight=function(){return this.x+this.width},n.prototype.getBottom=function(){return this.y+this.height},n.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},n.prototype.getCenterX=function(){return this.x+this.width/2},n.prototype.getMinX=function(){return this.getX()},n.prototype.getMaxX=function(){return this.getX()+this.width},n.prototype.getCenterY=function(){return this.y+this.height/2},n.prototype.getMinY=function(){return this.getY()},n.prototype.getMaxY=function(){return this.getY()+this.height},n.prototype.getWidthHalf=function(){return this.width/2},n.prototype.getHeightHalf=function(){return this.height/2},N.exports=n}),(function(N,C,v){"use strict";var n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function e(){}e.lastID=0,e.createID=function(t){return e.isPrimitive(t)?t:(t.uniqueID!=null||(t.uniqueID=e.getString(),e.lastID++),t.uniqueID)},e.getString=function(t){return t==null&&(t=e.lastID),"Object#"+t},e.isPrimitive=function(t){var r=typeof t>"u"?"undefined":n(t);return t==null||r!="object"&&r!="function"},N.exports=e}),(function(N,C,v){"use strict";function n(l){if(Array.isArray(l)){for(var d=0,y=Array(l.length);d<l.length;d++)y[d]=l[d];return y}else return Array.from(l)}var e=v(0),t=v(6),r=v(3),a=v(1),u=v(5),s=v(4),p=v(17),i=v(27);function h(l){i.call(this),this.layoutQuality=e.QUALITY,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=e.DEFAULT_INCREMENTAL,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new t(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,l!=null&&(this.isRemoteUse=l)}h.RANDOM_SEED=1,h.prototype=Object.create(i.prototype),h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},h.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},h.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},h.prototype.newGraphManager=function(){var l=new t(this);return this.graphManager=l,l},h.prototype.newGraph=function(l){return new u(null,this.graphManager,l)},h.prototype.newNode=function(l){return new r(this.graphManager,l)},h.prototype.newEdge=function(l){return new a(null,null,l)},h.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},h.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var l;return this.checkLayoutSuccess()?l=!1:l=this.layout(),e.ANIMATE==="during"?!1:(l&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,l)},h.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},h.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var l,d=this.graphManager.getAllEdges(),y=0;y<d.length;y++)l=d[y];for(var T,c=this.graphManager.getRoot().getNodes(),y=0;y<c.length;y++)T=c[y];this.update(this.graphManager.getRoot())}},h.prototype.update=function(l){if(l==null)this.update2();else if(l instanceof r){var d=l;if(d.getChild()!=null)for(var y=d.getChild().getNodes(),T=0;T<y.length;T++)update(y[T]);if(d.vGraphObject!=null){var c=d.vGraphObject;c.update(d)}}else if(l instanceof a){var D=l;if(D.vGraphObject!=null){var E=D.vGraphObject;E.update(D)}}else if(l instanceof u){var O=l;if(O.vGraphObject!=null){var o=O.vGraphObject;o.update(O)}}},h.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=e.QUALITY,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=e.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},h.prototype.transform=function(l){if(l==null)this.transform(new s(0,0));else{var d=new p,y=this.graphManager.getRoot().updateLeftTop();if(y!=null){d.setWorldOrgX(l.x),d.setWorldOrgY(l.y),d.setDeviceOrgX(y.x),d.setDeviceOrgY(y.y);for(var T=this.getAllNodes(),c,D=0;D<T.length;D++)c=T[D],c.transform(d)}}},h.prototype.positionNodesRandomly=function(l){if(l==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var d,y,T=l.getNodes(),c=0;c<T.length;c++)d=T[c],y=d.getChild(),y==null||y.getNodes().length==0?d.scatter():(this.positionNodesRandomly(y),d.updateBounds())},h.prototype.getFlatForest=function(){for(var l=[],d=!0,y=this.graphManager.getRoot().getNodes(),T=!0,c=0;c<y.length;c++)y[c].getChild()!=null&&(T=!1);if(!T)return l;var D=new Set,E=[],O=new Map,o=[];for(o=o.concat(y);o.length>0&&d;){for(E.push(o[0]);E.length>0&&d;){var g=E[0];E.splice(0,1),D.add(g);for(var f=g.getEdges(),c=0;c<f.length;c++){var L=f[c].getOtherEnd(g);if(O.get(g)!=L)if(!D.has(L))E.push(L),O.set(L,g);else{d=!1;break}}}if(!d)l=[];else{var A=[].concat(n(D));l.push(A);for(var c=0;c<A.length;c++){var I=A[c],m=o.indexOf(I);m>-1&&o.splice(m,1)}D=new Set,O=new Map}}return l},h.prototype.createDummyNodesForBendpoints=function(l){for(var d=[],y=l.source,T=this.graphManager.calcLowestCommonAncestor(l.source,l.target),c=0;c<l.bendpoints.length;c++){var D=this.newNode(null);D.setRect(new Point(0,0),new Dimension(1,1)),T.add(D);var E=this.newEdge(null);this.graphManager.add(E,y,D),d.add(D),y=D}var E=this.newEdge(null);return this.graphManager.add(E,y,l.target),this.edgeToDummyNodes.set(l,d),l.isInterGraph()?this.graphManager.remove(l):T.remove(l),d},h.prototype.createBendpointsFromDummyNodes=function(){var l=[];l=l.concat(this.graphManager.getAllEdges()),l=[].concat(n(this.edgeToDummyNodes.keys())).concat(l);for(var d=0;d<l.length;d++){var y=l[d];if(y.bendpoints.length>0){for(var T=this.edgeToDummyNodes.get(y),c=0;c<T.length;c++){var D=T[c],E=new s(D.getCenterX(),D.getCenterY()),O=y.bendpoints.get(c);O.x=E.x,O.y=E.y,D.getOwner().remove(D)}this.graphManager.add(y,y.source,y.target)}}},h.transform=function(l,d,y,T){if(y!=null&&T!=null){var c=d;if(l<=50){var D=d/y;c-=(d-D)/50*(50-l)}else{var E=d*T;c+=(E-d)/50*(l-50)}return c}else{var O,o;return l<=50?(O=9*d/500,o=d/10):(O=9*d/50,o=-8*d),O*l+o}},h.findCenterOfTree=function(l){var d=[];d=d.concat(l);var y=[],T=new Map,c=!1,D=null;(d.length==1||d.length==2)&&(c=!0,D=d[0]);for(var E=0;E<d.length;E++){var O=d[E],o=O.getNeighborsList().size;T.set(O,O.getNeighborsList().size),o==1&&y.push(O)}var g=[];for(g=g.concat(y);!c;){var f=[];f=f.concat(g),g=[];for(var E=0;E<d.length;E++){var O=d[E],L=d.indexOf(O);L>=0&&d.splice(L,1);var A=O.getNeighborsList();A.forEach(function(R){if(y.indexOf(R)<0){var w=T.get(R),F=w-1;F==1&&g.push(R),T.set(R,F)}})}y=y.concat(g),(d.length==1||d.length==2)&&(c=!0,D=d[0])}return D},h.prototype.setGraphManager=function(l){this.graphManager=l},N.exports=h}),(function(N,C,v){"use strict";function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return n.x=Math.sin(n.seed++)*1e4,n.x-Math.floor(n.x)},N.exports=n}),(function(N,C,v){"use strict";var n=v(4);function e(t,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var r=0,a=this.lworldExtX;return a!=0&&(r=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/a),r},e.prototype.transformY=function(t){var r=0,a=this.lworldExtY;return a!=0&&(r=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/a),r},e.prototype.inverseTransformX=function(t){var r=0,a=this.ldeviceExtX;return a!=0&&(r=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/a),r},e.prototype.inverseTransformY=function(t){var r=0,a=this.ldeviceExtY;return a!=0&&(r=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/a),r},e.prototype.inverseTransformPoint=function(t){var r=new n(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return r},N.exports=e}),(function(N,C,v){"use strict";function n(i){if(Array.isArray(i)){for(var h=0,l=Array(i.length);h<i.length;h++)l[h]=i[h];return l}else return Array.from(i)}var e=v(15),t=v(7),r=v(0),a=v(8),u=v(9);function s(){e.call(this),this.useSmartIdealEdgeLengthCalculation=t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=t.DEFAULT_EDGE_LENGTH,this.springConstant=t.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=t.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=t.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=t.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*t.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=t.MAX_ITERATIONS}s.prototype=Object.create(e.prototype);for(var p in e)s[p]=e[p];s.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},s.prototype.calcIdealEdgeLengths=function(){for(var i,h,l,d,y,T,c=this.getGraphManager().getAllEdges(),D=0;D<c.length;D++)i=c[D],i.idealLength=this.idealEdgeLength,i.isInterGraph&&(l=i.getSource(),d=i.getTarget(),y=i.getSourceInLca().getEstimatedSize(),T=i.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(i.idealLength+=y+T-2*r.SIMPLE_NODE_SIZE),h=i.getLca().getInclusionTreeDepth(),i.idealLength+=t.DEFAULT_EDGE_LENGTH*t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(l.getInclusionTreeDepth()+d.getInclusionTreeDepth()-2*h))},s.prototype.initSpringEmbedder=function(){var i=this.getAllNodes().length;this.incremental?(i>t.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(i-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(i>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(i-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},s.prototype.calcSpringForces=function(){for(var i=this.getAllEdges(),h,l=0;l<i.length;l++)h=i[l],this.calcSpringForce(h,h.idealLength)},s.prototype.calcRepulsionForces=function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,l,d,y,T,c=this.getAllNodes(),D;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&i&&this.updateGrid(),D=new Set,l=0;l<c.length;l++)y=c[l],this.calculateRepulsionForceOfANode(y,D,i,h),D.add(y);else for(l=0;l<c.length;l++)for(y=c[l],d=l+1;d<c.length;d++)T=c[d],y.getOwner()==T.getOwner()&&this.calcRepulsionForce(y,T)},s.prototype.calcGravitationalForces=function(){for(var i,h=this.getAllNodesToApplyGravitation(),l=0;l<h.length;l++)i=h[l],this.calcGravitationalForce(i)},s.prototype.moveNodes=function(){for(var i=this.getAllNodes(),h,l=0;l<i.length;l++)h=i[l],h.move()},s.prototype.calcSpringForce=function(i,h){var l=i.getSource(),d=i.getTarget(),y,T,c,D;if(this.uniformLeafNodeSizes&&l.getChild()==null&&d.getChild()==null)i.updateLengthSimple();else if(i.updateLength(),i.isOverlapingSourceAndTarget)return;y=i.getLength(),y!=0&&(T=this.springConstant*(y-h),c=T*(i.lengthX/y),D=T*(i.lengthY/y),l.springForceX+=c,l.springForceY+=D,d.springForceX-=c,d.springForceY-=D)},s.prototype.calcRepulsionForce=function(i,h){var l=i.getRect(),d=h.getRect(),y=new Array(2),T=new Array(4),c,D,E,O,o,g,f;if(l.intersects(d)){a.calcSeparationAmount(l,d,y,t.DEFAULT_EDGE_LENGTH/2),g=2*y[0],f=2*y[1];var L=i.noOfChildren*h.noOfChildren/(i.noOfChildren+h.noOfChildren);i.repulsionForceX-=L*g,i.repulsionForceY-=L*f,h.repulsionForceX+=L*g,h.repulsionForceY+=L*f}else this.uniformLeafNodeSizes&&i.getChild()==null&&h.getChild()==null?(c=d.getCenterX()-l.getCenterX(),D=d.getCenterY()-l.getCenterY()):(a.getIntersection(l,d,T),c=T[2]-T[0],D=T[3]-T[1]),Math.abs(c)<t.MIN_REPULSION_DIST&&(c=u.sign(c)*t.MIN_REPULSION_DIST),Math.abs(D)<t.MIN_REPULSION_DIST&&(D=u.sign(D)*t.MIN_REPULSION_DIST),E=c*c+D*D,O=Math.sqrt(E),o=this.repulsionConstant*i.noOfChildren*h.noOfChildren/E,g=o*c/O,f=o*D/O,i.repulsionForceX-=g,i.repulsionForceY-=f,h.repulsionForceX+=g,h.repulsionForceY+=f},s.prototype.calcGravitationalForce=function(i){var h,l,d,y,T,c,D,E;h=i.getOwner(),l=(h.getRight()+h.getLeft())/2,d=(h.getTop()+h.getBottom())/2,y=i.getCenterX()-l,T=i.getCenterY()-d,c=Math.abs(y)+i.getWidth()/2,D=Math.abs(T)+i.getHeight()/2,i.getOwner()==this.graphManager.getRoot()?(E=h.getEstimatedSize()*this.gravityRangeFactor,(c>E||D>E)&&(i.gravitationForceX=-this.gravityConstant*y,i.gravitationForceY=-this.gravityConstant*T)):(E=h.getEstimatedSize()*this.compoundGravityRangeFactor,(c>E||D>E)&&(i.gravitationForceX=-this.gravityConstant*y*this.compoundGravityConstant,i.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},s.prototype.isConverged=function(){var i,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),i=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,i||h},s.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},s.prototype.calcNoOfChildrenForAllNodes=function(){for(var i,h=this.graphManager.getAllNodes(),l=0;l<h.length;l++)i=h[l],i.noOfChildren=i.getNoOfChildren()},s.prototype.calcGrid=function(i){var h=0,l=0;h=parseInt(Math.ceil((i.getRight()-i.getLeft())/this.repulsionRange)),l=parseInt(Math.ceil((i.getBottom()-i.getTop())/this.repulsionRange));for(var d=new Array(h),y=0;y<h;y++)d[y]=new Array(l);for(var y=0;y<h;y++)for(var T=0;T<l;T++)d[y][T]=new Array;return d},s.prototype.addNodeToGrid=function(i,h,l){var d=0,y=0,T=0,c=0;d=parseInt(Math.floor((i.getRect().x-h)/this.repulsionRange)),y=parseInt(Math.floor((i.getRect().width+i.getRect().x-h)/this.repulsionRange)),T=parseInt(Math.floor((i.getRect().y-l)/this.repulsionRange)),c=parseInt(Math.floor((i.getRect().height+i.getRect().y-l)/this.repulsionRange));for(var D=d;D<=y;D++)for(var E=T;E<=c;E++)this.grid[D][E].push(i),i.setGridCoordinates(d,y,T,c)},s.prototype.updateGrid=function(){var i,h,l=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),i=0;i<l.length;i++)h=l[i],this.addNodeToGrid(h,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},s.prototype.calculateRepulsionForceOfANode=function(i,h,l,d){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&l||d){var y=new Set;i.surrounding=new Array;for(var T,c=this.grid,D=i.startX-1;D<i.finishX+2;D++)for(var E=i.startY-1;E<i.finishY+2;E++)if(!(D<0||E<0||D>=c.length||E>=c[0].length)){for(var O=0;O<c[D][E].length;O++)if(T=c[D][E][O],!(i.getOwner()!=T.getOwner()||i==T)&&!h.has(T)&&!y.has(T)){var o=Math.abs(i.getCenterX()-T.getCenterX())-(i.getWidth()/2+T.getWidth()/2),g=Math.abs(i.getCenterY()-T.getCenterY())-(i.getHeight()/2+T.getHeight()/2);o<=this.repulsionRange&&g<=this.repulsionRange&&y.add(T)}}i.surrounding=[].concat(n(y))}for(D=0;D<i.surrounding.length;D++)this.calcRepulsionForce(i,i.surrounding[D])},s.prototype.calcRepulsionRange=function(){return 0},N.exports=s}),(function(N,C,v){"use strict";var n=v(1),e=v(7);function t(a,u,s){n.call(this,a,u,s),this.idealLength=e.DEFAULT_EDGE_LENGTH}t.prototype=Object.create(n.prototype);for(var r in n)t[r]=n[r];N.exports=t}),(function(N,C,v){"use strict";var n=v(3);function e(r,a,u,s){n.call(this,r,a,u,s),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}e.prototype=Object.create(n.prototype);for(var t in n)e[t]=n[t];e.prototype.setGridCoordinates=function(r,a,u,s){this.startX=r,this.finishX=a,this.startY=u,this.finishY=s},N.exports=e}),(function(N,C,v){"use strict";function n(e,t){this.width=0,this.height=0,e!==null&&t!==null&&(this.height=t,this.width=e)}n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(e){this.width=e},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(e){this.height=e},N.exports=n}),(function(N,C,v){"use strict";var n=v(14);function e(){this.map={},this.keys=[]}e.prototype.put=function(t,r){var a=n.createID(t);this.contains(a)||(this.map[a]=r,this.keys.push(t))},e.prototype.contains=function(t){var r=n.createID(t);return this.map[t]!=null},e.prototype.get=function(t){var r=n.createID(t);return this.map[r]},e.prototype.keySet=function(){return this.keys},N.exports=e}),(function(N,C,v){"use strict";var n=v(14);function e(){this.set={}}e.prototype.add=function(t){var r=n.createID(t);this.contains(r)||(this.set[r]=t)},e.prototype.remove=function(t){delete this.set[n.createID(t)]},e.prototype.clear=function(){this.set={}},e.prototype.contains=function(t){return this.set[n.createID(t)]==t},e.prototype.isEmpty=function(){return this.size()===0},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAllTo=function(t){for(var r=Object.keys(this.set),a=r.length,u=0;u<a;u++)t.push(this.set[r[u]])},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAll=function(t){for(var r=t.length,a=0;a<r;a++){var u=t[a];this.add(u)}},N.exports=e}),(function(N,C,v){"use strict";var n=(function(){function a(u,s){for(var p=0;p<s.length;p++){var i=s[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,i.key,i)}}return function(u,s,p){return s&&a(u.prototype,s),p&&a(u,p),u}})();function e(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}var t=v(11),r=(function(){function a(u,s){e(this,a),(s!==null||s!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var p=void 0;u instanceof t?p=u.size():p=u.length,this._quicksort(u,0,p-1)}return n(a,[{key:"_quicksort",value:function(s,p,i){if(p<i){var h=this._partition(s,p,i);this._quicksort(s,p,h),this._quicksort(s,h+1,i)}}},{key:"_partition",value:function(s,p,i){for(var h=this._get(s,p),l=p,d=i;;){for(;this.compareFunction(h,this._get(s,d));)d--;for(;this.compareFunction(this._get(s,l),h);)l++;if(l<d)this._swap(s,l,d),l++,d--;else return d}}},{key:"_get",value:function(s,p){return s instanceof t?s.get_object_at(p):s[p]}},{key:"_set",value:function(s,p,i){s instanceof t?s.set_object_at(p,i):s[p]=i}},{key:"_swap",value:function(s,p,i){var h=this._get(s,p);this._set(s,p,this._get(s,i)),this._set(s,i,h)}},{key:"_defaultCompareFunction",value:function(s,p){return p>s}}]),a})();N.exports=r}),(function(N,C,v){"use strict";var n=(function(){function r(a,u){for(var s=0;s<u.length;s++){var p=u[s];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}return function(a,u,s){return u&&r(a.prototype,u),s&&r(a,s),a}})();function e(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")}var t=(function(){function r(a,u){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,r),this.sequence1=a,this.sequence2=u,this.match_score=s,this.mismatch_penalty=p,this.gap_penalty=i,this.iMax=a.length+1,this.jMax=u.length+1,this.grid=new Array(this.iMax);for(var h=0;h<this.iMax;h++){this.grid[h]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.grid[h][l]=0}this.tracebackGrid=new Array(this.iMax);for(var d=0;d<this.iMax;d++){this.tracebackGrid[d]=new Array(this.jMax);for(var y=0;y<this.jMax;y++)this.tracebackGrid[d][y]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return n(r,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var u=1;u<this.jMax;u++)this.grid[0][u]=this.grid[0][u-1]+this.gap_penalty,this.tracebackGrid[0][u]=[!1,!1,!0];for(var s=1;s<this.iMax;s++)this.grid[s][0]=this.grid[s-1][0]+this.gap_penalty,this.tracebackGrid[s][0]=[!1,!0,!1];for(var p=1;p<this.iMax;p++)for(var i=1;i<this.jMax;i++){var h=void 0;this.sequence1[p-1]===this.sequence2[i-1]?h=this.grid[p-1][i-1]+this.match_score:h=this.grid[p-1][i-1]+this.mismatch_penalty;var l=this.grid[p-1][i]+this.gap_penalty,d=this.grid[p][i-1]+this.gap_penalty,y=[h,l,d],T=this.arrayAllMaxIndexes(y);this.grid[p][i]=y[T[0]],this.tracebackGrid[p][i]=[T.includes(0),T.includes(1),T.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var u=[];for(u.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});u[0];){var s=u[0],p=this.tracebackGrid[s.pos[0]][s.pos[1]];p[0]&&u.push({pos:[s.pos[0]-1,s.pos[1]-1],seq1:this.sequence1[s.pos[0]-1]+s.seq1,seq2:this.sequence2[s.pos[1]-1]+s.seq2}),p[1]&&u.push({pos:[s.pos[0]-1,s.pos[1]],seq1:this.sequence1[s.pos[0]-1]+s.seq1,seq2:"-"+s.seq2}),p[2]&&u.push({pos:[s.pos[0],s.pos[1]-1],seq1:"-"+s.seq1,seq2:this.sequence2[s.pos[1]-1]+s.seq2}),s.pos[0]===0&&s.pos[1]===0&&this.alignments.push({sequence1:s.seq1,sequence2:s.seq2}),u.shift()}return this.alignments}},{key:"getAllIndexes",value:function(u,s){for(var p=[],i=-1;(i=u.indexOf(s,i+1))!==-1;)p.push(i);return p}},{key:"arrayAllMaxIndexes",value:function(u){return this.getAllIndexes(u,Math.max.apply(null,u))}}]),r})();N.exports=t}),(function(N,C,v){"use strict";var n=function(){};n.FDLayout=v(18),n.FDLayoutConstants=v(7),n.FDLayoutEdge=v(19),n.FDLayoutNode=v(20),n.DimensionD=v(21),n.HashMap=v(22),n.HashSet=v(23),n.IGeometry=v(8),n.IMath=v(9),n.Integer=v(10),n.Point=v(12),n.PointD=v(4),n.RandomSeed=v(16),n.RectangleD=v(13),n.Transform=v(17),n.UniqueIDGeneretor=v(14),n.Quicksort=v(24),n.LinkedList=v(11),n.LGraphObject=v(2),n.LGraph=v(5),n.LEdge=v(1),n.LGraphManager=v(6),n.LNode=v(3),n.Layout=v(15),n.LayoutConstants=v(0),n.NeedlemanWunsch=v(25),N.exports=n}),(function(N,C,v){"use strict";function n(){this.listeners=[]}var e=n.prototype;e.addListener=function(t,r){this.listeners.push({event:t,callback:r})},e.removeListener=function(t,r){for(var a=this.listeners.length;a>=0;a--){var u=this.listeners[a];u.event===t&&u.callback===r&&this.listeners.splice(a,1)}},e.emit=function(t,r){for(var a=0;a<this.listeners.length;a++){var u=this.listeners[a];t===u.event&&u.callback(r)}},N.exports=n})])})});var J=$((Z,z)=>{(function(C,v){typeof Z=="object"&&typeof z=="object"?z.exports=v(q()):typeof define=="function"&&define.amd?define(["layout-base"],v):typeof Z=="object"?Z.coseBase=v(q()):C.coseBase=v(C.layoutBase)})(Z,function(N){return(function(C){var v={};function n(e){if(v[e])return v[e].exports;var t=v[e]={i:e,l:!1,exports:{}};return C[e].call(t.exports,t,t.exports,n),t.l=!0,t.exports}return n.m=C,n.c=v,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)})([(function(C,v){C.exports=N}),(function(C,v,n){"use strict";var e=n(0).FDLayoutConstants;function t(){}for(var r in e)t[r]=e[r];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=e.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TREE_REDUCTION_ON_INCREMENTAL=!1,C.exports=t}),(function(C,v,n){"use strict";var e=n(0).FDLayoutEdge;function t(a,u,s){e.call(this,a,u,s)}t.prototype=Object.create(e.prototype);for(var r in e)t[r]=e[r];C.exports=t}),(function(C,v,n){"use strict";var e=n(0).LGraph;function t(a,u,s){e.call(this,a,u,s)}t.prototype=Object.create(e.prototype);for(var r in e)t[r]=e[r];C.exports=t}),(function(C,v,n){"use strict";var e=n(0).LGraphManager;function t(a){e.call(this,a)}t.prototype=Object.create(e.prototype);for(var r in e)t[r]=e[r];C.exports=t}),(function(C,v,n){"use strict";var e=n(0).FDLayoutNode,t=n(0).IMath;function r(u,s,p,i){e.call(this,u,s,p,i)}r.prototype=Object.create(e.prototype);for(var a in e)r[a]=e[a];r.prototype.move=function(){var u=this.graphManager.getLayout();this.displacementX=u.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=u.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>u.coolingFactor*u.maxNodeDisplacement&&(this.displacementX=u.coolingFactor*u.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>u.coolingFactor*u.maxNodeDisplacement&&(this.displacementY=u.coolingFactor*u.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),u.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},r.prototype.propogateDisplacementToChildren=function(u,s){for(var p=this.getChild().getNodes(),i,h=0;h<p.length;h++)i=p[h],i.getChild()==null?(i.moveBy(u,s),i.displacementX+=u,i.displacementY+=s):i.propogateDisplacementToChildren(u,s)},r.prototype.setPred1=function(u){this.pred1=u},r.prototype.getPred1=function(){return pred1},r.prototype.getPred2=function(){return pred2},r.prototype.setNext=function(u){this.next=u},r.prototype.getNext=function(){return next},r.prototype.setProcessed=function(u){this.processed=u},r.prototype.isProcessed=function(){return processed},C.exports=r}),(function(C,v,n){"use strict";var e=n(0).FDLayout,t=n(4),r=n(3),a=n(5),u=n(2),s=n(1),p=n(0).FDLayoutConstants,i=n(0).LayoutConstants,h=n(0).Point,l=n(0).PointD,d=n(0).Layout,y=n(0).Integer,T=n(0).IGeometry,c=n(0).LGraph,D=n(0).Transform;function E(){e.call(this),this.toBeTiled={}}E.prototype=Object.create(e.prototype);for(var O in e)E[O]=e[O];E.prototype.newGraphManager=function(){var o=new t(this);return this.graphManager=o,o},E.prototype.newGraph=function(o){return new r(null,this.graphManager,o)},E.prototype.newNode=function(o){return new a(this.graphManager,o)},E.prototype.newEdge=function(o){return new u(null,null,o)},E.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.isSubLayout||(s.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=s.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=p.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=p.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=p.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=p.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=p.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=p.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/p.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=p.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},E.prototype.layout=function(){var o=i.DEFAULT_CREATE_BENDS_AS_NEEDED;return o&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},E.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(s.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var g=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(I){return g.has(I)});this.graphManager.setAllNodesToApplyGravitation(f)}}else{var o=this.getFlatForest();if(o.length>0)this.positionNodesRadially(o);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var g=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(L){return g.has(L)});this.graphManager.setAllNodesToApplyGravitation(f),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},E.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%p.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var o=new Set(this.getAllNodes()),g=this.nodesWithGravity.filter(function(A){return o.has(A)});this.graphManager.setAllNodesToApplyGravitation(g),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=p.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=p.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var f=!this.isTreeGrowing&&!this.isGrowthFinished,L=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(f,L),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},E.prototype.getPositionsData=function(){for(var o=this.graphManager.getAllNodes(),g={},f=0;f<o.length;f++){var L=o[f].rect,A=o[f].id;g[A]={id:A,x:L.getCenterX(),y:L.getCenterY(),w:L.width,h:L.height}}return g},E.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var o=!1;if(p.ANIMATE==="during")this.emit("layoutstarted");else{for(;!o;)o=this.tick();this.graphManager.updateBounds()}},E.prototype.calculateNodesToApplyGravitationTo=function(){var o=[],g,f=this.graphManager.getGraphs(),L=f.length,A;for(A=0;A<L;A++)g=f[A],g.updateConnected(),g.isConnected||(o=o.concat(g.getNodes()));return o},E.prototype.createBendpoints=function(){var o=[];o=o.concat(this.graphManager.getAllEdges());var g=new Set,f;for(f=0;f<o.length;f++){var L=o[f];if(!g.has(L)){var A=L.getSource(),I=L.getTarget();if(A==I)L.getBendpoints().push(new l),L.getBendpoints().push(new l),this.createDummyNodesForBendpoints(L),g.add(L);else{var m=[];if(m=m.concat(A.getEdgeListToNode(I)),m=m.concat(I.getEdgeListToNode(A)),!g.has(m[0])){if(m.length>1){var R;for(R=0;R<m.length;R++){var w=m[R];w.getBendpoints().push(new l),this.createDummyNodesForBendpoints(w)}}m.forEach(function(F){g.add(F)})}}}if(g.size==o.length)break}},E.prototype.positionNodesRadially=function(o){for(var g=new h(0,0),f=Math.ceil(Math.sqrt(o.length)),L=0,A=0,I=0,m=new l(0,0),R=0;R<o.length;R++){R%f==0&&(I=0,A=L,R!=0&&(A+=s.DEFAULT_COMPONENT_SEPERATION),L=0);var w=o[R],F=d.findCenterOfTree(w);g.x=I,g.y=A,m=E.radialLayout(w,F,g),m.y>L&&(L=Math.floor(m.y)),I=Math.floor(m.x+s.DEFAULT_COMPONENT_SEPERATION)}this.transform(new l(i.WORLD_CENTER_X-m.x/2,i.WORLD_CENTER_Y-m.y/2))},E.radialLayout=function(o,g,f){var L=Math.max(this.maxDiagonalInTree(o),s.DEFAULT_RADIAL_SEPARATION);E.branchRadialLayout(g,null,0,359,0,L);var A=c.calculateBounds(o),I=new D;I.setDeviceOrgX(A.getMinX()),I.setDeviceOrgY(A.getMinY()),I.setWorldOrgX(f.x),I.setWorldOrgY(f.y);for(var m=0;m<o.length;m++){var R=o[m];R.transform(I)}var w=new l(A.getMaxX(),A.getMaxY());return I.inverseTransformPoint(w)},E.branchRadialLayout=function(o,g,f,L,A,I){var m=(L-f+1)/2;m<0&&(m+=180);var R=(m+f)%360,w=R*T.TWO_PI/360,F=Math.cos(w),Y=A*Math.cos(w),x=A*Math.sin(w);o.setCenter(Y,x);var M=[];M=M.concat(o.getEdges());var G=M.length;g!=null&&G--;for(var S=0,P=M.length,_,U=o.getEdgesBetween(g);U.length>1;){var X=U[0];U.splice(0,1);var B=M.indexOf(X);B>=0&&M.splice(B,1),P--,G--}g!=null?_=(M.indexOf(U[0])+1)%P:_=0;for(var b=Math.abs(L-f)/G,H=_;S!=G;H=++H%P){var et=M[H].getOtherEnd(o);if(et!=g){var rt=(f+S*b)%360,ct=(rt+b)%360;E.branchRadialLayout(et,o,rt,ct,A+I,I),S++}}},E.maxDiagonalInTree=function(o){for(var g=y.MIN_VALUE,f=0;f<o.length;f++){var L=o[f],A=L.getDiagonal();A>g&&(g=A)}return g},E.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},E.prototype.groupZeroDegreeMembers=function(){var o=this,g={};this.memberGroups={},this.idToDummyNode={};for(var f=[],L=this.graphManager.getAllNodes(),A=0;A<L.length;A++){var I=L[A],m=I.getParent();this.getNodeDegreeWithChildren(I)===0&&(m.id==null||!this.getToBeTiled(m))&&f.push(I)}for(var A=0;A<f.length;A++){var I=f[A],R=I.getParent().id;typeof g[R]>"u"&&(g[R]=[]),g[R]=g[R].concat(I)}Object.keys(g).forEach(function(w){if(g[w].length>1){var F="DummyCompound_"+w;o.memberGroups[F]=g[w];var Y=g[w][0].getParent(),x=new a(o.graphManager);x.id=F,x.paddingLeft=Y.paddingLeft||0,x.paddingRight=Y.paddingRight||0,x.paddingBottom=Y.paddingBottom||0,x.paddingTop=Y.paddingTop||0,o.idToDummyNode[F]=x;var M=o.getGraphManager().add(o.newGraph(),x),G=Y.getChild();G.add(x);for(var S=0;S<g[w].length;S++){var P=g[w][S];G.remove(P),M.add(P)}}})},E.prototype.clearCompounds=function(){var o={},g={};this.performDFSOnCompounds();for(var f=0;f<this.compoundOrder.length;f++)g[this.compoundOrder[f].id]=this.compoundOrder[f],o[this.compoundOrder[f].id]=[].concat(this.compoundOrder[f].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[f].getChild()),this.compoundOrder[f].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(o,g)},E.prototype.clearZeroDegreeMembers=function(){var o=this,g=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(f){var L=o.idToDummyNode[f];g[f]=o.tileNodes(o.memberGroups[f],L.paddingLeft+L.paddingRight),L.rect.width=g[f].width,L.rect.height=g[f].height})},E.prototype.repopulateCompounds=function(){for(var o=this.compoundOrder.length-1;o>=0;o--){var g=this.compoundOrder[o],f=g.id,L=g.paddingLeft,A=g.paddingTop;this.adjustLocations(this.tiledMemberPack[f],g.rect.x,g.rect.y,L,A)}},E.prototype.repopulateZeroDegreeMembers=function(){var o=this,g=this.tiledZeroDegreePack;Object.keys(g).forEach(function(f){var L=o.idToDummyNode[f],A=L.paddingLeft,I=L.paddingTop;o.adjustLocations(g[f],L.rect.x,L.rect.y,A,I)})},E.prototype.getToBeTiled=function(o){var g=o.id;if(this.toBeTiled[g]!=null)return this.toBeTiled[g];var f=o.getChild();if(f==null)return this.toBeTiled[g]=!1,!1;for(var L=f.getNodes(),A=0;A<L.length;A++){var I=L[A];if(this.getNodeDegree(I)>0)return this.toBeTiled[g]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[g]=!1,!1}return this.toBeTiled[g]=!0,!0},E.prototype.getNodeDegree=function(o){for(var g=o.id,f=o.getEdges(),L=0,A=0;A<f.length;A++){var I=f[A];I.getSource().id!==I.getTarget().id&&(L=L+1)}return L},E.prototype.getNodeDegreeWithChildren=function(o){var g=this.getNodeDegree(o);if(o.getChild()==null)return g;for(var f=o.getChild().getNodes(),L=0;L<f.length;L++){var A=f[L];g+=this.getNodeDegreeWithChildren(A)}return g},E.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},E.prototype.fillCompexOrderByDFS=function(o){for(var g=0;g<o.length;g++){var f=o[g];f.getChild()!=null&&this.fillCompexOrderByDFS(f.getChild().getNodes()),this.getToBeTiled(f)&&this.compoundOrder.push(f)}},E.prototype.adjustLocations=function(o,g,f,L,A){g+=L,f+=A;for(var I=g,m=0;m<o.rows.length;m++){var R=o.rows[m];g=I;for(var w=0,F=0;F<R.length;F++){var Y=R[F];Y.rect.x=g,Y.rect.y=f,g+=Y.rect.width+o.horizontalPadding,Y.rect.height>w&&(w=Y.rect.height)}f+=w+o.verticalPadding}},E.prototype.tileCompoundMembers=function(o,g){var f=this;this.tiledMemberPack=[],Object.keys(o).forEach(function(L){var A=g[L];f.tiledMemberPack[L]=f.tileNodes(o[L],A.paddingLeft+A.paddingRight),A.rect.width=f.tiledMemberPack[L].width,A.rect.height=f.tiledMemberPack[L].height})},E.prototype.tileNodes=function(o,g){var f=s.TILING_PADDING_VERTICAL,L=s.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:g,verticalPadding:f,horizontalPadding:L};o.sort(function(R,w){return R.rect.width*R.rect.height>w.rect.width*w.rect.height?-1:R.rect.width*R.rect.height<w.rect.width*w.rect.height?1:0});for(var I=0;I<o.length;I++){var m=o[I];A.rows.length==0?this.insertNodeToRow(A,m,0,g):this.canAddHorizontal(A,m.rect.width,m.rect.height)?this.insertNodeToRow(A,m,this.getShortestRowIndex(A),g):this.insertNodeToRow(A,m,A.rows.length,g),this.shiftToLastRow(A)}return A},E.prototype.insertNodeToRow=function(o,g,f,L){var A=L;if(f==o.rows.length){var I=[];o.rows.push(I),o.rowWidth.push(A),o.rowHeight.push(0)}var m=o.rowWidth[f]+g.rect.width;o.rows[f].length>0&&(m+=o.horizontalPadding),o.rowWidth[f]=m,o.width<m&&(o.width=m);var R=g.rect.height;f>0&&(R+=o.verticalPadding);var w=0;R>o.rowHeight[f]&&(w=o.rowHeight[f],o.rowHeight[f]=R,w=o.rowHeight[f]-w),o.height+=w,o.rows[f].push(g)},E.prototype.getShortestRowIndex=function(o){for(var g=-1,f=Number.MAX_VALUE,L=0;L<o.rows.length;L++)o.rowWidth[L]<f&&(g=L,f=o.rowWidth[L]);return g},E.prototype.getLongestRowIndex=function(o){for(var g=-1,f=Number.MIN_VALUE,L=0;L<o.rows.length;L++)o.rowWidth[L]>f&&(g=L,f=o.rowWidth[L]);return g},E.prototype.canAddHorizontal=function(o,g,f){var L=this.getShortestRowIndex(o);if(L<0)return!0;var A=o.rowWidth[L];if(A+o.horizontalPadding+g<=o.width)return!0;var I=0;o.rowHeight[L]<f&&L>0&&(I=f+o.verticalPadding-o.rowHeight[L]);var m;o.width-A>=g+o.horizontalPadding?m=(o.height+I)/(A+g+o.horizontalPadding):m=(o.height+I)/o.width,I=f+o.verticalPadding;var R;return o.width<g?R=(o.height+I)/g:R=(o.height+I)/o.width,R<1&&(R=1/R),m<1&&(m=1/m),m<R},E.prototype.shiftToLastRow=function(o){var g=this.getLongestRowIndex(o),f=o.rowWidth.length-1,L=o.rows[g],A=L[L.length-1],I=A.width+o.horizontalPadding;if(o.width-o.rowWidth[f]>I&&g!=f){L.splice(-1,1),o.rows[f].push(A),o.rowWidth[g]=o.rowWidth[g]-I,o.rowWidth[f]=o.rowWidth[f]+I,o.width=o.rowWidth[instance.getLongestRowIndex(o)];for(var m=Number.MIN_VALUE,R=0;R<L.length;R++)L[R].height>m&&(m=L[R].height);g>0&&(m+=o.verticalPadding);var w=o.rowHeight[g]+o.rowHeight[f];o.rowHeight[g]=m,o.rowHeight[f]<A.height+o.verticalPadding&&(o.rowHeight[f]=A.height+o.verticalPadding);var F=o.rowHeight[g]+o.rowHeight[f];o.height+=F-w,this.shiftToLastRow(o)}},E.prototype.tilingPreLayout=function(){s.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},E.prototype.tilingPostLayout=function(){s.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},E.prototype.reduceTrees=function(){for(var o=[],g=!0,f;g;){var L=this.graphManager.getAllNodes(),A=[];g=!1;for(var I=0;I<L.length;I++)f=L[I],f.getEdges().length==1&&!f.getEdges()[0].isInterGraph&&f.getChild()==null&&(A.push([f,f.getEdges()[0],f.getOwner()]),g=!0);if(g==!0){for(var m=[],R=0;R<A.length;R++)A[R][0].getEdges().length==1&&(m.push(A[R]),A[R][0].getOwner().remove(A[R][0]));o.push(m),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=o},E.prototype.growTree=function(o){for(var g=o.length,f=o[g-1],L,A=0;A<f.length;A++)L=f[A],this.findPlaceforPrunedNode(L),L[2].add(L[0]),L[2].add(L[1],L[1].source,L[1].target);o.splice(o.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},E.prototype.findPlaceforPrunedNode=function(o){var g,f,L=o[0];L==o[1].source?f=o[1].target:f=o[1].source;var A=f.startX,I=f.finishX,m=f.startY,R=f.finishY,w=0,F=0,Y=0,x=0,M=[w,Y,F,x];if(m>0)for(var G=A;G<=I;G++)M[0]+=this.grid[G][m-1].length+this.grid[G][m].length-1;if(I<this.grid.length-1)for(var G=m;G<=R;G++)M[1]+=this.grid[I+1][G].length+this.grid[I][G].length-1;if(R<this.grid[0].length-1)for(var G=A;G<=I;G++)M[2]+=this.grid[G][R+1].length+this.grid[G][R].length-1;if(A>0)for(var G=m;G<=R;G++)M[3]+=this.grid[A-1][G].length+this.grid[A][G].length-1;for(var S=y.MAX_VALUE,P,_,U=0;U<M.length;U++)M[U]<S?(S=M[U],P=1,_=U):M[U]==S&&P++;if(P==3&&S==0)M[0]==0&&M[1]==0&&M[2]==0?g=1:M[0]==0&&M[1]==0&&M[3]==0?g=0:M[0]==0&&M[2]==0&&M[3]==0?g=3:M[1]==0&&M[2]==0&&M[3]==0&&(g=2);else if(P==2&&S==0){var X=Math.floor(Math.random()*2);M[0]==0&&M[1]==0?X==0?g=0:g=1:M[0]==0&&M[2]==0?X==0?g=0:g=2:M[0]==0&&M[3]==0?X==0?g=0:g=3:M[1]==0&&M[2]==0?X==0?g=1:g=2:M[1]==0&&M[3]==0?X==0?g=1:g=3:X==0?g=2:g=3}else if(P==4&&S==0){var X=Math.floor(Math.random()*4);g=X}else g=_;g==0?L.setCenter(f.getCenterX(),f.getCenterY()-f.getHeight()/2-p.DEFAULT_EDGE_LENGTH-L.getHeight()/2):g==1?L.setCenter(f.getCenterX()+f.getWidth()/2+p.DEFAULT_EDGE_LENGTH+L.getWidth()/2,f.getCenterY()):g==2?L.setCenter(f.getCenterX(),f.getCenterY()+f.getHeight()/2+p.DEFAULT_EDGE_LENGTH+L.getHeight()/2):L.setCenter(f.getCenterX()-f.getWidth()/2-p.DEFAULT_EDGE_LENGTH-L.getWidth()/2,f.getCenterY())},C.exports=E}),(function(C,v,n){"use strict";var e={};e.layoutBase=n(0),e.CoSEConstants=n(1),e.CoSEEdge=n(2),e.CoSEGraph=n(3),e.CoSEGraphManager=n(4),e.CoSELayout=n(6),e.CoSENode=n(5),C.exports=e})])})});var nt=$((Q,tt)=>{(function(C,v){typeof Q=="object"&&typeof tt=="object"?tt.exports=v(J()):typeof define=="function"&&define.amd?define(["cose-base"],v):typeof Q=="object"?Q.cytoscapeCoseBilkent=v(J()):C.cytoscapeCoseBilkent=v(C.coseBase)})(Q,function(N){return(function(C){var v={};function n(e){if(v[e])return v[e].exports;var t=v[e]={i:e,l:!1,exports:{}};return C[e].call(t.exports,t,t.exports,n),t.l=!0,t.exports}return n.m=C,n.c=v,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)})([(function(C,v){C.exports=N}),(function(C,v,n){"use strict";var e=n(0).layoutBase.LayoutConstants,t=n(0).layoutBase.FDLayoutConstants,r=n(0).CoSEConstants,a=n(0).CoSELayout,u=n(0).CoSENode,s=n(0).layoutBase.PointD,p=n(0).layoutBase.DimensionD,i={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function h(T,c){var D={};for(var E in T)D[E]=T[E];for(var E in c)D[E]=c[E];return D}function l(T){this.options=h(i,T),d(this.options)}var d=function(c){c.nodeRepulsion!=null&&(r.DEFAULT_REPULSION_STRENGTH=t.DEFAULT_REPULSION_STRENGTH=c.nodeRepulsion),c.idealEdgeLength!=null&&(r.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=c.idealEdgeLength),c.edgeElasticity!=null&&(r.DEFAULT_SPRING_STRENGTH=t.DEFAULT_SPRING_STRENGTH=c.edgeElasticity),c.nestingFactor!=null&&(r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.nestingFactor),c.gravity!=null&&(r.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=c.gravity),c.numIter!=null&&(r.MAX_ITERATIONS=t.MAX_ITERATIONS=c.numIter),c.gravityRange!=null&&(r.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=c.gravityRange),c.gravityCompound!=null&&(r.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.gravityCompound),c.gravityRangeCompound!=null&&(r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.gravityRangeCompound),c.initialEnergyOnIncremental!=null&&(r.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.initialEnergyOnIncremental),c.quality=="draft"?e.QUALITY=0:c.quality=="proof"?e.QUALITY=2:e.QUALITY=1,r.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=e.NODE_DIMENSIONS_INCLUDE_LABELS=c.nodeDimensionsIncludeLabels,r.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=e.DEFAULT_INCREMENTAL=!c.randomize,r.ANIMATE=t.ANIMATE=e.ANIMATE=c.animate,r.TILE=c.tile,r.TILING_PADDING_VERTICAL=typeof c.tilingPaddingVertical=="function"?c.tilingPaddingVertical.call():c.tilingPaddingVertical,r.TILING_PADDING_HORIZONTAL=typeof c.tilingPaddingHorizontal=="function"?c.tilingPaddingHorizontal.call():c.tilingPaddingHorizontal};l.prototype.run=function(){var T,c,D=this.options,E=this.idToLNode={},O=this.layout=new a,o=this;o.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var g=O.newGraphManager();this.gm=g;var f=this.options.eles.nodes(),L=this.options.eles.edges();this.root=g.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(f),O);for(var A=0;A<L.length;A++){var I=L[A],m=this.idToLNode[I.data("source")],R=this.idToLNode[I.data("target")];if(m!==R&&m.getEdgesBetween(R).length==0){var w=g.add(O.newEdge(),m,R);w.id=I.id()}}var F=function(M,G){typeof M=="number"&&(M=G);var S=M.data("id"),P=o.idToLNode[S];return{x:P.getRect().getCenterX(),y:P.getRect().getCenterY()}},Y=function x(){for(var M=function(){D.fit&&D.cy.fit(D.eles,D.padding),T||(T=!0,o.cy.one("layoutready",D.ready),o.cy.trigger({type:"layoutready",layout:o}))},G=o.options.refresh,S,P=0;P<G&&!S;P++)S=o.stopped||o.layout.tick();if(S){O.checkLayoutSuccess()&&!O.isSubLayout&&O.doPostLayout(),O.tilingPostLayout&&O.tilingPostLayout(),O.isLayoutFinished=!0,o.options.eles.nodes().positions(F),M(),o.cy.one("layoutstop",o.options.stop),o.cy.trigger({type:"layoutstop",layout:o}),c&&cancelAnimationFrame(c),T=!1;return}var _=o.layout.getPositionsData();D.eles.nodes().positions(function(U,X){if(typeof U=="number"&&(U=X),!U.isParent()){for(var B=U.id(),b=_[B],H=U;b==null&&(b=_[H.data("parent")]||_["DummyCompound_"+H.data("parent")],_[B]=b,H=H.parent()[0],H!=null););return b!=null?{x:b.x,y:b.y}:{x:U.position("x"),y:U.position("y")}}}),M(),c=requestAnimationFrame(x)};return O.addListener("layoutstarted",function(){o.options.animate==="during"&&(c=requestAnimationFrame(Y))}),O.runLayout(),this.options.animate!=="during"&&(o.options.eles.nodes().not(":parent").layoutPositions(o,o.options,F),T=!1),this},l.prototype.getTopMostNodes=function(T){for(var c={},D=0;D<T.length;D++)c[T[D].id()]=!0;var E=T.filter(function(O,o){typeof O=="number"&&(O=o);for(var g=O.parent()[0];g!=null;){if(c[g.id()])return!1;g=g.parent()[0]}return!0});return E},l.prototype.processChildrenList=function(T,c,D){for(var E=c.length,O=0;O<E;O++){var o=c[O],g=o.children(),f,L=o.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(o.outerWidth()!=null&&o.outerHeight()!=null?f=T.add(new u(D.graphManager,new s(o.position("x")-L.w/2,o.position("y")-L.h/2),new p(parseFloat(L.w),parseFloat(L.h)))):f=T.add(new u(this.graphManager)),f.id=o.data("id"),f.paddingLeft=parseInt(o.css("padding")),f.paddingTop=parseInt(o.css("padding")),f.paddingRight=parseInt(o.css("padding")),f.paddingBottom=parseInt(o.css("padding")),this.options.nodeDimensionsIncludeLabels&&o.isParent()){var A=o.boundingBox({includeLabels:!0,includeNodes:!1}).w,I=o.boundingBox({includeLabels:!0,includeNodes:!1}).h,m=o.css("text-halign");f.labelWidth=A,f.labelHeight=I,f.labelPos=m}if(this.idToLNode[o.data("id")]=f,isNaN(f.rect.x)&&(f.rect.x=0),isNaN(f.rect.y)&&(f.rect.y=0),g!=null&&g.length>0){var R;R=D.getGraphManager().add(D.newGraph(),f),this.processChildrenList(R,g,D)}}},l.prototype.stop=function(){return this.stopped=!0,this};var y=function(c){c("layout","cose-bilkent",l)};typeof cytoscape<"u"&&y(cytoscape),C.exports=y})])})});var st=pt(nt(),1);j.use(st.default);function ot(N,C){N.forEach(v=>{let n={id:v.id,labelText:v.label,height:v.height,width:v.width,padding:v.padding??0};Object.keys(v).forEach(e=>{["id","label","height","width","padding","x","y"].includes(e)||(n[e]=v[e])}),C.add({group:"nodes",data:n,position:{x:v.x??0,y:v.y??0}})})}W(ot,"addNodes");function at(N,C){N.forEach(v=>{let n={id:v.id,source:v.start,target:v.end};Object.keys(v).forEach(e=>{["id","start","end"].includes(e)||(n[e]=v[e])}),C.add({group:"edges",data:n})})}W(at,"addEdges");function ht(N){return new Promise(C=>{let v=it("body").append("div").attr("id","cy").attr("style","display:none"),n=j({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});v.remove(),ot(N.nodes,n),at(N.edges,n),n.nodes().forEach(function(t){t.layoutDimensions=()=>{let r=t.data();return{w:r.width,h:r.height}}});let e={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};n.layout(e).run(),n.ready(t=>{V.info("Cytoscape ready",t),C(n)})})}W(ht,"createCytoscapeInstance");function lt(N){return N.nodes().map(C=>{let v=C.data(),n=C.position(),e={id:v.id,x:n.x,y:n.y};return Object.keys(v).forEach(t=>{t!=="id"&&(e[t]=v[t])}),e})}W(lt,"extractPositionedNodes");function ut(N){return N.edges().map(C=>{let v=C.data(),n=C._private.rscratch,e={id:v.id,source:v.source,target:v.target,startX:n.startX,startY:n.startY,midX:n.midX,midY:n.midY,endX:n.endX,endY:n.endY};return Object.keys(v).forEach(t=>{["id","source","target"].includes(t)||(e[t]=v[t])}),e})}W(ut,"extractPositionedEdges");async function gt(N,C){V.debug("Starting cose-bilkent layout algorithm");try{ft(N);let v=await ht(N),n=lt(v),e=ut(v);return V.debug(`Layout completed: ${n.length} nodes, ${e.length} edges`),{nodes:n,edges:e}}catch(v){throw V.error("Error in cose-bilkent layout algorithm:",v),v}}W(gt,"executeCoseBilkentLayout");function ft(N){if(!N)throw new Error("Layout data is required");if(!N.config)throw new Error("Configuration is required in layout data");if(!N.rootNode)throw new Error("Root node is required");if(!N.nodes||!Array.isArray(N.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(N.edges))throw new Error("Edges array is required in layout data");return!0}W(ft,"validateLayoutData");var dt=W(async(N,C,{insertCluster:v,insertEdge:n,insertEdgeLabel:e,insertMarkers:t,insertNode:r,log:a,positionEdgeLabel:u},{algorithm:s})=>{let p={},i={},h=C.select("g");t(h,N.markers,N.type,N.diagramId);let l=h.insert("g").attr("class","subgraphs"),d=h.insert("g").attr("class","edgePaths"),y=h.insert("g").attr("class","edgeLabels"),T=h.insert("g").attr("class","nodes");a.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(N.nodes.map(async E=>{if(E.isGroup){let O={...E};i[E.id]=O,p[E.id]=O,await v(l,E)}else{let O={...E};p[E.id]=O;let o=await r(T,E,{config:N.config,dir:N.direction||"TB"}),g=o.node().getBBox();O.width=g.width,O.height=g.height,O.domId=o,a.debug(`Node ${E.id} dimensions: ${g.width}x${g.height}`)}})),a.debug("Running cose-bilkent layout algorithm");let c={...N,nodes:N.nodes.map(E=>{let O=p[E.id];return{...E,width:O.width,height:O.height}})},D=await gt(c,N.config);a.debug("Positioning nodes based on layout results"),D.nodes.forEach(E=>{let O=p[E.id];O?.domId&&(O.domId.attr("transform",`translate(${E.x}, ${E.y})`),O.x=E.x,O.y=E.y,a.debug(`Positioned node ${O.id} at center (${E.x}, ${E.y})`))}),D.edges.forEach(E=>{let O=N.edges.find(o=>o.id===E.id);O&&(O.points=[{x:E.startX,y:E.startY},{x:E.midX,y:E.midY},{x:E.endX,y:E.endY}])}),a.debug("Inserting and positioning edges"),await Promise.all(N.edges.map(async E=>{let O=await e(y,E),o=p[E.start??""],g=p[E.end??""];if(o&&g){let f=D.edges.find(L=>L.id===E.id);if(f){a.debug("APA01 positionedEdge",f);let L={...E},A=n(d,L,i,N.type,o,g,N.diagramId);u(L,A)}else{let L={...E,points:[{x:o.x||0,y:o.y||0},{x:g.x||0,y:g.y||0}]},A=n(d,L,i,N.type,o,g,N.diagramId);u(L,A)}}})),a.debug("Cose-bilkent rendering completed")},"render"),Tt=dt;export{Tt as render};
@@ -0,0 +1 @@
1
+ import{a as P}from"./chunk-UL26XZ4V.js";import{a as y}from"./chunk-DHQUYWHD.js";var w=5,O=1e-5,X=2,Y=.6,R=1e-6;function N(t){let e=[];for(let s=0;s<t.length-1;s++)e.push({a:t[s],b:t[s+1]});return e}y(N,"buildSegmentList");function T(t,e,s,i){let r=e.x-t.x,o=e.y-t.y,a=i.x-s.x,d=i.y-s.y,u=r*d-o*a;if(u===0)return null;let n=s.x-t.x,c=s.y-t.y,p=(n*d-c*a)/u,l=(n*o-c*r)/u;return p<=R||p>=1-R||l<=R||l>=1-R?null:{point:{x:t.x+p*r,y:t.y+p*o},tA:p,tB:l}}y(T,"segmentIntersection");function v(t){return Math.abs(t.b.x-t.a.x)>=Math.abs(t.b.y-t.a.y)}y(v,"isHorizontalSeg");function B(t,e,s){if(t.curve!=="rounded")return!1;let i=t.points,r=i[e],o=i[e+1];if(!r||!o)return!1;let a=Math.hypot(o.x-r.x,o.y-r.y),d=s*a,u=e>0?L(i[e-1],r,o,w):null;if(u&&d<u.cutLen)return!0;let n=e+2<i.length?L(r,o,i[e+2],w):null;return n!==null&&a-d<n.cutLen}y(B,"crossingSitsInRoundedCorner");function C(t){let e=[];for(let s=0;s<t.length;s++){let i=t[s],r=N(i.points);for(let o=s+1;o<t.length;o++){let a=t[o],d=N(a.points);for(let[u,n]of r.entries())for(let[c,p]of d.entries()){let l=T(n.a,n.b,p.a,p.b);if(!l||B(i,u,l.tA)||B(a,c,l.tB))continue;let g=v(n),S=v(p);(g!==S?g:!1)?e.push({jumpEdgeId:i.id,otherEdgeId:a.id,segIndex:u,t:l.tA,point:l.point}):e.push({jumpEdgeId:a.id,otherEdgeId:i.id,segIndex:c,t:l.tB,point:l.point})}}}return e}y(C,"findEdgeIntersections");function M(t){let e=Math.round(t*1e3)/1e3;return Number.isInteger(e)?`${e}`:`${e}`}y(M,"fmt");function A(t){return`${M(t.x)},${M(t.y)}`}y(A,"pointToString");function D(t){let e=t.b.x-t.a.x,s=t.b.y-t.a.y;return Math.abs(e)>=Math.abs(s)?e>=0?1:0:s>=0?1:0}y(D,"getArcSweepFlag");function _(t,e){if(t.length<2)return t.map(o=>({...o}));let s=t.map(o=>({...o})),i=e.arrowTypeStart&&P[e.arrowTypeStart];if(i){let o=t[0],a=t[1],d=Math.atan2(a.y-o.y,a.x-o.x);s[0].x=o.x+i*Math.cos(d),s[0].y=o.y+i*Math.sin(d)}let r=e.arrowTypeEnd&&P[e.arrowTypeEnd];if(r){let o=t.length,a=t[o-2],d=t[o-1],u=Math.atan2(d.y-a.y,d.x-a.x);s[o-1].x=d.x-r*Math.cos(u),s[o-1].y=d.y-r*Math.sin(u)}return s}y(_,"applyMarkerOffsets");function k(t,e,s,i,r){let o=t.point.x,a=t.point.y,d={x:o-e*t.r,y:a-s*t.r},u={x:o+e*t.r,y:a+s*t.r},n=[`L${A(d)}`];return r==="arc"?n.push(`A${M(t.r)},${M(t.r)} 0 0 ${i} ${A(u)}`):n.push(`M${A(u)}`),n}y(k,"emitJump");function L(t,e,s,i){let r=e.x-t.x,o=e.y-t.y,a=s.x-e.x,d=s.y-e.y,u=Math.hypot(r,o),n=Math.hypot(a,d);if(u<O||n<O)return null;let c=r/u,p=o/u,l=a/n,g=d/n,S=c*l+p*g,b=Math.max(-1,Math.min(1,S)),x=Math.acos(b);if(x<O||Math.abs(Math.PI-x)<O)return null;let h=Math.min(i/Math.sin(x/2),u/2,n/2);return{startX:e.x-c*h,startY:e.y-p*h,endX:e.x+l*h,endY:e.y+g*h,ctrlX:e.x,ctrlY:e.y,cutLen:h}}y(L,"computeRoundedCorner");function H(t,e,s){let i=t.points;if(i.length<2)return"";let r=_(i,t),o=t.curve==="rounded",a=N(r),d=new Map;for(let n of e){let c=a[n.segIndex];if(!c)continue;let p=Math.hypot(c.b.x-c.a.x,c.b.y-c.a.y),l=d.get(n.segIndex)??[];l.push({t:n.t,point:n.point,d:n.t*p,r:s.jumpRadius}),d.set(n.segIndex,l)}let u=[`M${A(r[0])}`];for(let n=0;n<a.length;n++){let c=a[n],p=Math.hypot(c.b.x-c.a.x,c.b.y-c.a.y),l=p===0?0:(c.b.x-c.a.x)/p,g=p===0?0:(c.b.y-c.a.y)/p,S=D(c),b=0;if(o&&n>0){let f=L(r[n-1],r[n],r[n+1]??r[n],w);f&&(b=f.cutLen)}let x=p,h=null;o&&n<a.length-1&&(h=L(r[n],r[n+1],r[n+2]??r[n+1],w),h&&(x=p-h.cutLen));let $=s.jumpRadius*Y,m=[...d.get(n)??[]].sort((f,E)=>f.t-E.t).filter(f=>{let E=Math.min(f.d-b,x-f.d)-X;return f.r=Math.min(f.r,E),f.r>=$});for(let f=0;f<m.length-1;f++){let E=m[f+1].d-m[f].d;if(m[f].r+m[f+1].r>E){let I=E/2;m[f].r=Math.min(m[f].r,I),m[f+1].r=Math.min(m[f+1].r,I)}}for(let f of m)f.r<$||u.push(...k(f,l,g,S,s.jumpStyle));o&&h?(u.push(`L${M(h.startX)},${M(h.startY)}`),u.push(`Q${M(h.ctrlX)},${M(h.ctrlY)} ${M(h.endX)},${M(h.endY)}`)):u.push(`L${A(c.b)}`)}return u.join(" ")}y(H,"rewriteEdgePath");function J(t){return/^[\d\s+,.LMelm-]*$/.test(t)}y(J,"isStraightPath");function U(t){return t?t==="linear"||t==="rounded"||t==="step"||t==="stepBefore"||t==="stepAfter":!0}y(U,"curveSupportsLineHops");function j(t){if(!t)return null;try{let e=typeof atob=="function"?atob(t):Buffer.from(t,"base64").toString(),s=JSON.parse(e);if(!Array.isArray(s))return null;let i=[];for(let r of s)r&&typeof r.x=="number"&&typeof r.y=="number"&&i.push({x:r.x,y:r.y});return i.length>=2?i:null}catch{return null}}y(j,"decodeDataPoints");function F(t,e,s){if(!s.enabled)return;let i=t.node();if(!i)return;let r=new Map;for(let n of e)r.set(n.id,n);let o=new Map;for(let n of i.querySelectorAll("path[data-id]")){let c=n.getAttribute("data-id");c!==null&&!o.has(c)&&o.set(c,n)}let a=[];for(let n of e){let c=o.get(n.id);if(!c)continue;let l=j(c.getAttribute("data-points"))??n.points;a.push({...n,points:l})}let d=C(a);if(d.length===0)return;let u=new Map;for(let n of d){let c=u.get(n.jumpEdgeId)??[];c.push(n),u.set(n.jumpEdgeId,c)}for(let n of a){let c=u.get(n.id);if(!c||c.length===0)continue;let l=r.get(n.id)?.curve;if(l!==void 0&&!U(l))continue;let g=o.get(n.id);if(!g)continue;if(l===void 0){let m=g.getAttribute("d")??"";if(!J(m))continue}let S=g.getAttribute("style")??"",b=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(S),x=b?Number.parseFloat(b[1]):null,h=b?Number.parseFloat(b[2]):null,$=H(n,c,s);if(g.setAttribute("d",$),x!==null&&h!==null&&typeof g.getTotalLength=="function"){let m=g.getTotalLength(),f=Math.max(0,m-x-h),E=`0 ${x} ${f} ${h}`,I=S.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${E};`).replace(/;\s*;+/g,";");g.setAttribute("style",I)}}}y(F,"applyLineJumpsToSvg");export{F as a};
@@ -0,0 +1 @@
1
+ import{a as o,b as e}from"./chunk-URTGGQPX.js";import"./chunk-K6CUQC6N.js";import"./chunk-W6DARM7I.js";export{o as InfoModule,e as createInfoServices};