unleash-server 5.3.4 → 5.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (454) hide show
  1. package/dist/lib/addons/slack-app-definition.js +8 -0
  2. package/dist/lib/addons/slack-app-definition.js.map +1 -1
  3. package/dist/lib/addons/slack-app.d.ts +1 -4
  4. package/dist/lib/addons/slack-app.js +46 -68
  5. package/dist/lib/addons/slack-app.js.map +1 -1
  6. package/dist/lib/addons/slack-app.test.js +12 -66
  7. package/dist/lib/addons/slack-app.test.js.map +1 -1
  8. package/dist/lib/create-config.js +1 -0
  9. package/dist/lib/create-config.js.map +1 -1
  10. package/dist/lib/db/access-store.d.ts +3 -1
  11. package/dist/lib/db/access-store.js +53 -0
  12. package/dist/lib/db/access-store.js.map +1 -1
  13. package/dist/lib/db/client-applications-store.d.ts +3 -1
  14. package/dist/lib/db/client-applications-store.js +73 -6
  15. package/dist/lib/db/client-applications-store.js.map +1 -1
  16. package/dist/lib/db/feature-environment-store.js +3 -0
  17. package/dist/lib/db/feature-environment-store.js.map +1 -1
  18. package/dist/lib/db/feature-strategy-store.d.ts +1 -0
  19. package/dist/lib/db/feature-strategy-store.js +21 -3
  20. package/dist/lib/db/feature-strategy-store.js.map +1 -1
  21. package/dist/lib/db/feature-strategy-store.test.js +40 -0
  22. package/dist/lib/db/feature-strategy-store.test.js.map +1 -1
  23. package/dist/lib/db/feature-toggle-client-store.js +5 -3
  24. package/dist/lib/db/feature-toggle-client-store.js.map +1 -1
  25. package/dist/lib/db/feature-toggle-store.d.ts +6 -1
  26. package/dist/lib/db/feature-toggle-store.js +37 -9
  27. package/dist/lib/db/feature-toggle-store.js.map +1 -1
  28. package/dist/lib/db/index.js +1 -1
  29. package/dist/lib/db/index.js.map +1 -1
  30. package/dist/lib/db/role-store.d.ts +3 -0
  31. package/dist/lib/db/role-store.js +21 -4
  32. package/dist/lib/db/role-store.js.map +1 -1
  33. package/dist/lib/features/access/createAccessService.js +2 -2
  34. package/dist/lib/features/access/createAccessService.js.map +1 -1
  35. package/dist/lib/features/change-request-access-service/change-request-access-read-model.d.ts +1 -0
  36. package/dist/lib/features/change-request-access-service/fake-change-request-access-read-model.d.ts +1 -0
  37. package/dist/lib/features/change-request-access-service/fake-change-request-access-read-model.js +3 -0
  38. package/dist/lib/features/change-request-access-service/fake-change-request-access-read-model.js.map +1 -1
  39. package/dist/lib/features/change-request-access-service/sql-change-request-access-read-model.d.ts +1 -0
  40. package/dist/lib/features/change-request-access-service/sql-change-request-access-read-model.js +10 -1
  41. package/dist/lib/features/change-request-access-service/sql-change-request-access-read-model.js.map +1 -1
  42. package/dist/lib/features/export-import-toggles/export-import-permissions.e2e.test.js +4 -0
  43. package/dist/lib/features/export-import-toggles/export-import-permissions.e2e.test.js.map +1 -1
  44. package/dist/lib/features/export-import-toggles/export-import-service.d.ts +2 -1
  45. package/dist/lib/features/export-import-toggles/export-import-service.js +30 -16
  46. package/dist/lib/features/export-import-toggles/export-import-service.js.map +1 -1
  47. package/dist/lib/features/export-import-toggles/export-import.e2e.test.js +24 -4
  48. package/dist/lib/features/export-import-toggles/export-import.e2e.test.js.map +1 -1
  49. package/dist/lib/features/export-import-toggles/import-context-validation.js +1 -1
  50. package/dist/lib/features/export-import-toggles/import-context-validation.js.map +1 -1
  51. package/dist/lib/features/export-import-toggles/import-toggles-store-type.d.ts +1 -0
  52. package/dist/lib/features/export-import-toggles/import-toggles-store.d.ts +1 -0
  53. package/dist/lib/features/export-import-toggles/import-toggles-store.js +8 -0
  54. package/dist/lib/features/export-import-toggles/import-toggles-store.js.map +1 -1
  55. package/dist/lib/features/export-import-toggles/import-validation-messages.d.ts +1 -1
  56. package/dist/lib/features/export-import-toggles/import-validation-messages.js +7 -1
  57. package/dist/lib/features/export-import-toggles/import-validation-messages.js.map +1 -1
  58. package/dist/lib/features/feature-toggle/createFeatureToggleService.js +9 -12
  59. package/dist/lib/features/feature-toggle/createFeatureToggleService.js.map +1 -1
  60. package/dist/lib/features/index.d.ts +1 -0
  61. package/dist/lib/features/index.js +1 -0
  62. package/dist/lib/features/index.js.map +1 -1
  63. package/dist/lib/features/playground/advanced-playground.test.js +57 -6
  64. package/dist/lib/features/playground/advanced-playground.test.js.map +1 -1
  65. package/dist/lib/features/playground/generateObjectCombinations.d.ts +2 -2
  66. package/dist/lib/features/playground/generateObjectCombinations.js +4 -1
  67. package/dist/lib/features/playground/generateObjectCombinations.js.map +1 -1
  68. package/dist/lib/features/playground/generateObjectCombinations.test.js +7 -6
  69. package/dist/lib/features/playground/generateObjectCombinations.test.js.map +1 -1
  70. package/dist/lib/features/playground/playground.js +1 -1
  71. package/dist/lib/features/playground/playground.js.map +1 -1
  72. package/dist/lib/features/segment/createSegmentService.d.ts +5 -0
  73. package/dist/lib/features/segment/createSegmentService.js +32 -0
  74. package/dist/lib/features/segment/createSegmentService.js.map +1 -0
  75. package/dist/lib/metrics.js +12 -0
  76. package/dist/lib/metrics.js.map +1 -1
  77. package/dist/lib/metrics.test.js +1 -1
  78. package/dist/lib/metrics.test.js.map +1 -1
  79. package/dist/lib/middleware/response-time-metrics.js +1 -1
  80. package/dist/lib/middleware/response-time-metrics.js.map +1 -1
  81. package/dist/lib/openapi/index.js +3 -1
  82. package/dist/lib/openapi/index.js.map +1 -1
  83. package/dist/lib/openapi/meta-schema-rules.test.js +2 -41
  84. package/dist/lib/openapi/meta-schema-rules.test.js.map +1 -1
  85. package/dist/lib/openapi/spec/admin-features-query-schema.d.ts +1 -0
  86. package/dist/lib/openapi/spec/admin-features-query-schema.js +1 -0
  87. package/dist/lib/openapi/spec/admin-features-query-schema.js.map +1 -1
  88. package/dist/lib/openapi/spec/advanced-playground-environment-feature-schema.d.ts +4 -1
  89. package/dist/lib/openapi/spec/advanced-playground-feature-schema.d.ts +8 -2
  90. package/dist/lib/openapi/spec/advanced-playground-request-schema.d.ts +1 -1
  91. package/dist/lib/openapi/spec/advanced-playground-response-schema.d.ts +17 -5
  92. package/dist/lib/openapi/spec/application-schema.d.ts +33 -1
  93. package/dist/lib/openapi/spec/application-schema.js +12 -1
  94. package/dist/lib/openapi/spec/application-schema.js.map +1 -1
  95. package/dist/lib/openapi/spec/application-usage-schema.d.ts +25 -0
  96. package/dist/lib/openapi/spec/application-usage-schema.js +27 -0
  97. package/dist/lib/openapi/spec/application-usage-schema.js.map +1 -0
  98. package/dist/lib/openapi/spec/applications-schema.d.ts +57 -1
  99. package/dist/lib/openapi/spec/applications-schema.js +4 -1
  100. package/dist/lib/openapi/spec/applications-schema.js.map +1 -1
  101. package/dist/lib/openapi/spec/bulk-metrics-schema.d.ts +18 -4
  102. package/dist/lib/openapi/spec/bulk-registration-schema.d.ts +6 -1
  103. package/dist/lib/openapi/spec/client-metrics-env-schema.d.ts +6 -2
  104. package/dist/lib/openapi/spec/client-metrics-env-schema.js +0 -1
  105. package/dist/lib/openapi/spec/client-metrics-env-schema.js.map +1 -1
  106. package/dist/lib/openapi/spec/client-metrics-schema.d.ts +6 -1
  107. package/dist/lib/openapi/spec/create-application-schema.d.ts +0 -1
  108. package/dist/lib/openapi/spec/create-application-schema.js +0 -1
  109. package/dist/lib/openapi/spec/create-application-schema.js.map +1 -1
  110. package/dist/lib/openapi/spec/create-context-field-schema.d.ts +68 -0
  111. package/dist/lib/openapi/spec/create-context-field-schema.js +19 -0
  112. package/dist/lib/openapi/spec/create-context-field-schema.js.map +1 -0
  113. package/dist/lib/openapi/spec/create-feature-schema.d.ts +1 -0
  114. package/dist/lib/openapi/spec/create-feature-schema.js +1 -0
  115. package/dist/lib/openapi/spec/create-feature-schema.js.map +1 -1
  116. package/dist/lib/openapi/spec/create-feature-strategy-schema.d.ts +0 -1
  117. package/dist/lib/openapi/spec/create-group-schema.d.ts +0 -1
  118. package/dist/lib/openapi/spec/create-group-schema.js +0 -1
  119. package/dist/lib/openapi/spec/create-group-schema.js.map +1 -1
  120. package/dist/lib/openapi/spec/create-invited-user-schema.d.ts +9 -0
  121. package/dist/lib/openapi/spec/create-invited-user-schema.js +9 -0
  122. package/dist/lib/openapi/spec/create-invited-user-schema.js.map +1 -1
  123. package/dist/lib/openapi/spec/create-strategy-variant-schema.d.ts +0 -1
  124. package/dist/lib/openapi/spec/create-strategy-variant-schema.js +0 -1
  125. package/dist/lib/openapi/spec/create-strategy-variant-schema.js.map +1 -1
  126. package/dist/lib/openapi/spec/create-user-response-schema.d.ts +2 -1
  127. package/dist/lib/openapi/spec/create-user-response-schema.js +1 -1
  128. package/dist/lib/openapi/spec/create-user-response-schema.js.map +1 -1
  129. package/dist/lib/openapi/spec/date-schema.d.ts +6 -1
  130. package/dist/lib/openapi/spec/date-schema.js +14 -1
  131. package/dist/lib/openapi/spec/date-schema.js.map +1 -1
  132. package/dist/lib/openapi/spec/environment-project-schema.d.ts +0 -2
  133. package/dist/lib/openapi/spec/environments-project-schema.d.ts +0 -2
  134. package/dist/lib/openapi/spec/event-schema.d.ts +1 -3
  135. package/dist/lib/openapi/spec/event-schema.js +0 -1
  136. package/dist/lib/openapi/spec/event-schema.js.map +1 -1
  137. package/dist/lib/openapi/spec/events-schema.d.ts +1 -3
  138. package/dist/lib/openapi/spec/export-query-schema.d.ts +0 -1
  139. package/dist/lib/openapi/spec/export-query-schema.js +0 -1
  140. package/dist/lib/openapi/spec/export-query-schema.js.map +1 -1
  141. package/dist/lib/openapi/spec/export-result-schema.d.ts +17 -1
  142. package/dist/lib/openapi/spec/feature-environment-metrics-schema.d.ts +6 -1
  143. package/dist/lib/openapi/spec/feature-environment-schema.d.ts +7 -0
  144. package/dist/lib/openapi/spec/feature-environment-schema.js +7 -0
  145. package/dist/lib/openapi/spec/feature-environment-schema.js.map +1 -1
  146. package/dist/lib/openapi/spec/feature-events-schema.d.ts +1 -3
  147. package/dist/lib/openapi/spec/feature-metrics-schema.d.ts +12 -2
  148. package/dist/lib/openapi/spec/feature-schema.d.ts +9 -1
  149. package/dist/lib/openapi/spec/feature-schema.js +2 -1
  150. package/dist/lib/openapi/spec/feature-schema.js.map +1 -1
  151. package/dist/lib/openapi/spec/feature-strategy-segment-schema.d.ts +5 -0
  152. package/dist/lib/openapi/spec/feature-strategy-segment-schema.js +5 -0
  153. package/dist/lib/openapi/spec/feature-strategy-segment-schema.js.map +1 -1
  154. package/dist/lib/openapi/spec/feature-usage-schema.d.ts +12 -2
  155. package/dist/lib/openapi/spec/features-schema.d.ts +16 -1
  156. package/dist/lib/openapi/spec/group-schema.d.ts +10 -2
  157. package/dist/lib/openapi/spec/group-schema.js +6 -0
  158. package/dist/lib/openapi/spec/group-schema.js.map +1 -1
  159. package/dist/lib/openapi/spec/group-user-model-schema.d.ts +2 -1
  160. package/dist/lib/openapi/spec/groups-schema.d.ts +14 -4
  161. package/dist/lib/openapi/spec/health-overview-schema.d.ts +16 -5
  162. package/dist/lib/openapi/spec/health-report-schema.d.ts +16 -5
  163. package/dist/lib/openapi/spec/import-toggles-schema.d.ts +34 -2
  164. package/dist/lib/openapi/spec/index.d.ts +3 -1
  165. package/dist/lib/openapi/spec/index.js +3 -1
  166. package/dist/lib/openapi/spec/index.js.map +1 -1
  167. package/dist/lib/openapi/spec/maintenance-schema.d.ts +2 -0
  168. package/dist/lib/openapi/spec/maintenance-schema.js +2 -0
  169. package/dist/lib/openapi/spec/maintenance-schema.js.map +1 -1
  170. package/dist/lib/openapi/spec/me-schema.d.ts +2 -1
  171. package/dist/lib/openapi/spec/patch-schema.d.ts +12 -1
  172. package/dist/lib/openapi/spec/patch-schema.js +12 -1
  173. package/dist/lib/openapi/spec/patch-schema.js.map +1 -1
  174. package/dist/lib/openapi/spec/patches-schema.d.ts +12 -1
  175. package/dist/lib/openapi/spec/playground-feature-schema.d.ts +3 -0
  176. package/dist/lib/openapi/spec/playground-request-schema.d.ts +1 -1
  177. package/dist/lib/openapi/spec/playground-response-schema.d.ts +8 -2
  178. package/dist/lib/openapi/spec/playground-segment-schema.d.ts +1 -0
  179. package/dist/lib/openapi/spec/playground-segment-schema.js +1 -0
  180. package/dist/lib/openapi/spec/playground-segment-schema.js.map +1 -1
  181. package/dist/lib/openapi/spec/playground-strategy-schema.d.ts +2 -0
  182. package/dist/lib/openapi/spec/playground-strategy-schema.js +1 -0
  183. package/dist/lib/openapi/spec/playground-strategy-schema.js.map +1 -1
  184. package/dist/lib/openapi/spec/profile-schema.d.ts +9 -1
  185. package/dist/lib/openapi/spec/project-environment-schema.d.ts +0 -2
  186. package/dist/lib/openapi/spec/project-overview-schema.d.ts +20 -6
  187. package/dist/lib/openapi/spec/project-overview-schema.js +4 -1
  188. package/dist/lib/openapi/spec/project-overview-schema.js.map +1 -1
  189. package/dist/lib/openapi/spec/project-schema.d.ts +4 -0
  190. package/dist/lib/openapi/spec/project-schema.js +4 -0
  191. package/dist/lib/openapi/spec/project-schema.js.map +1 -1
  192. package/dist/lib/openapi/spec/projects-schema.d.ts +6 -0
  193. package/dist/lib/openapi/spec/projects-schema.js +2 -0
  194. package/dist/lib/openapi/spec/projects-schema.js.map +1 -1
  195. package/dist/lib/openapi/spec/public-signup-token-schema.d.ts +3 -1
  196. package/dist/lib/openapi/spec/public-signup-token-schema.js +1 -0
  197. package/dist/lib/openapi/spec/public-signup-token-schema.js.map +1 -1
  198. package/dist/lib/openapi/spec/public-signup-tokens-schema.d.ts +5 -2
  199. package/dist/lib/openapi/spec/push-variants-schema.d.ts +3 -0
  200. package/dist/lib/openapi/spec/push-variants-schema.js +3 -0
  201. package/dist/lib/openapi/spec/push-variants-schema.js.map +1 -1
  202. package/dist/lib/openapi/spec/reset-password-schema.d.ts +4 -0
  203. package/dist/lib/openapi/spec/reset-password-schema.js +4 -0
  204. package/dist/lib/openapi/spec/reset-password-schema.js.map +1 -1
  205. package/dist/lib/openapi/spec/sdk-context-schema.d.ts +1 -1
  206. package/dist/lib/openapi/spec/sdk-context-schema.js +1 -1
  207. package/dist/lib/openapi/spec/sdk-context-schema.js.map +1 -1
  208. package/dist/lib/openapi/spec/search-events-schema.d.ts +2 -2
  209. package/dist/lib/openapi/spec/search-events-schema.js +1 -6
  210. package/dist/lib/openapi/spec/search-events-schema.js.map +1 -1
  211. package/dist/lib/openapi/spec/sort-order-schema.d.ts +4 -1
  212. package/dist/lib/openapi/spec/sort-order-schema.js +4 -1
  213. package/dist/lib/openapi/spec/sort-order-schema.js.map +1 -1
  214. package/dist/lib/openapi/spec/state-schema.d.ts +39 -3
  215. package/dist/lib/openapi/spec/state-schema.js +14 -2
  216. package/dist/lib/openapi/spec/state-schema.js.map +1 -1
  217. package/dist/lib/openapi/spec/toggle-maintenance-schema.d.ts +2 -0
  218. package/dist/lib/openapi/spec/toggle-maintenance-schema.js +2 -0
  219. package/dist/lib/openapi/spec/toggle-maintenance-schema.js.map +1 -1
  220. package/dist/lib/openapi/spec/token-string-list-schema.d.ts +0 -1
  221. package/dist/lib/openapi/spec/token-string-list-schema.js +0 -1
  222. package/dist/lib/openapi/spec/token-string-list-schema.js.map +1 -1
  223. package/dist/lib/openapi/spec/token-user-schema.d.ts +1 -1
  224. package/dist/lib/openapi/spec/token-user-schema.js +1 -1
  225. package/dist/lib/openapi/spec/token-user-schema.js.map +1 -1
  226. package/dist/lib/openapi/spec/{upsert-context-field-schema.d.ts → update-context-field-schema.d.ts} +19 -8
  227. package/dist/lib/openapi/spec/update-context-field-schema.js +44 -0
  228. package/dist/lib/openapi/spec/update-context-field-schema.js.map +1 -0
  229. package/dist/lib/openapi/spec/update-user-schema.d.ts +0 -1
  230. package/dist/lib/openapi/spec/update-user-schema.js +0 -1
  231. package/dist/lib/openapi/spec/update-user-schema.js.map +1 -1
  232. package/dist/lib/openapi/spec/user-schema.d.ts +2 -1
  233. package/dist/lib/openapi/spec/user-schema.js +2 -1
  234. package/dist/lib/openapi/spec/user-schema.js.map +1 -1
  235. package/dist/lib/openapi/spec/users-groups-base-schema.d.ts +33 -4
  236. package/dist/lib/openapi/spec/users-groups-base-schema.js +24 -0
  237. package/dist/lib/openapi/spec/users-groups-base-schema.js.map +1 -1
  238. package/dist/lib/openapi/spec/users-schema.d.ts +3 -2
  239. package/dist/lib/openapi/spec/users-schema.js +1 -1
  240. package/dist/lib/openapi/spec/users-schema.js.map +1 -1
  241. package/dist/lib/openapi/spec/users-search-schema.d.ts +3 -1
  242. package/dist/lib/openapi/spec/users-search-schema.js +1 -0
  243. package/dist/lib/openapi/spec/users-search-schema.js.map +1 -1
  244. package/dist/lib/openapi/spec/variants-schema.d.ts +1 -0
  245. package/dist/lib/openapi/spec/variants-schema.js +1 -0
  246. package/dist/lib/openapi/spec/variants-schema.js.map +1 -1
  247. package/dist/lib/openapi/util/openapi-tags.d.ts +18 -0
  248. package/dist/lib/openapi/util/openapi-tags.js +12 -0
  249. package/dist/lib/openapi/util/openapi-tags.js.map +1 -1
  250. package/dist/lib/routes/admin-api/api-token.d.ts +5 -0
  251. package/dist/lib/routes/admin-api/api-token.js +28 -0
  252. package/dist/lib/routes/admin-api/api-token.js.map +1 -1
  253. package/dist/lib/routes/admin-api/archive.js +4 -0
  254. package/dist/lib/routes/admin-api/archive.js.map +1 -1
  255. package/dist/lib/routes/admin-api/client-metrics.js +2 -1
  256. package/dist/lib/routes/admin-api/client-metrics.js.map +1 -1
  257. package/dist/lib/routes/admin-api/context.d.ts +4 -3
  258. package/dist/lib/routes/admin-api/context.js +3 -4
  259. package/dist/lib/routes/admin-api/context.js.map +1 -1
  260. package/dist/lib/routes/admin-api/feature-type.js +2 -2
  261. package/dist/lib/routes/admin-api/feature-type.js.map +1 -1
  262. package/dist/lib/routes/admin-api/instance-admin.js +2 -0
  263. package/dist/lib/routes/admin-api/instance-admin.js.map +1 -1
  264. package/dist/lib/routes/admin-api/maintenance.d.ts +2 -1
  265. package/dist/lib/routes/admin-api/maintenance.js.map +1 -1
  266. package/dist/lib/routes/admin-api/project/environments.js +1 -0
  267. package/dist/lib/routes/admin-api/project/environments.js.map +1 -1
  268. package/dist/lib/routes/admin-api/project/project-features.js +2 -1
  269. package/dist/lib/routes/admin-api/project/project-features.js.map +1 -1
  270. package/dist/lib/routes/admin-api/public-signup.js +2 -1
  271. package/dist/lib/routes/admin-api/public-signup.js.map +1 -1
  272. package/dist/lib/routes/admin-api/strategy.d.ts +1 -1
  273. package/dist/lib/routes/admin-api/strategy.js +2 -2
  274. package/dist/lib/routes/admin-api/strategy.js.map +1 -1
  275. package/dist/lib/routes/admin-api/tag-type.js +2 -2
  276. package/dist/lib/routes/admin-api/tag-type.js.map +1 -1
  277. package/dist/lib/routes/admin-api/user-admin.js +2 -1
  278. package/dist/lib/routes/admin-api/user-admin.js.map +1 -1
  279. package/dist/lib/routes/client-api/register.d.ts +1 -0
  280. package/dist/lib/routes/client-api/register.js +8 -0
  281. package/dist/lib/routes/client-api/register.js.map +1 -1
  282. package/dist/lib/routes/index.js +1 -0
  283. package/dist/lib/routes/index.js.map +1 -1
  284. package/dist/lib/routes/public-invite.js +2 -1
  285. package/dist/lib/routes/public-invite.js.map +1 -1
  286. package/dist/lib/segments/segment-service-interface.d.ts +2 -0
  287. package/dist/lib/server-impl.js +3 -1
  288. package/dist/lib/server-impl.js.map +1 -1
  289. package/dist/lib/services/access-service.d.ts +6 -3
  290. package/dist/lib/services/access-service.js +17 -5
  291. package/dist/lib/services/access-service.js.map +1 -1
  292. package/dist/lib/services/access-service.test.js +49 -3
  293. package/dist/lib/services/access-service.test.js.map +1 -1
  294. package/dist/lib/services/client-metrics/instance-service.js +5 -7
  295. package/dist/lib/services/client-metrics/instance-service.js.map +1 -1
  296. package/dist/lib/services/client-metrics/last-seen-service.d.ts +4 -0
  297. package/dist/lib/services/client-metrics/last-seen-service.js +4 -1
  298. package/dist/lib/services/client-metrics/last-seen-service.js.map +1 -1
  299. package/dist/lib/services/client-metrics/models.d.ts +2 -0
  300. package/dist/lib/services/client-metrics/schema.js +1 -0
  301. package/dist/lib/services/client-metrics/schema.js.map +1 -1
  302. package/dist/lib/services/feature-service-potentially-stale.test.js +0 -1
  303. package/dist/lib/services/feature-service-potentially-stale.test.js.map +1 -1
  304. package/dist/lib/services/feature-toggle-service.js +20 -30
  305. package/dist/lib/services/feature-toggle-service.js.map +1 -1
  306. package/dist/lib/services/index.js +1 -1
  307. package/dist/lib/services/index.js.map +1 -1
  308. package/dist/lib/services/instance-stats-service.d.ts +2 -0
  309. package/dist/lib/services/instance-stats-service.js +6 -1
  310. package/dist/lib/services/instance-stats-service.js.map +1 -1
  311. package/dist/lib/services/maintenance-service.js +1 -1
  312. package/dist/lib/services/maintenance-service.js.map +1 -1
  313. package/dist/lib/services/maintenance-service.test.js +1 -1
  314. package/dist/lib/services/maintenance-service.test.js.map +1 -1
  315. package/dist/lib/services/project-service.d.ts +2 -1
  316. package/dist/lib/services/project-service.js +3 -0
  317. package/dist/lib/services/project-service.js.map +1 -1
  318. package/dist/lib/services/segment-service.d.ts +8 -2
  319. package/dist/lib/services/segment-service.js +34 -3
  320. package/dist/lib/services/segment-service.js.map +1 -1
  321. package/dist/lib/services/user-service.js +3 -3
  322. package/dist/lib/services/user-service.js.map +1 -1
  323. package/dist/lib/services/version-service.d.ts +1 -0
  324. package/dist/lib/services/version-service.js +8 -1
  325. package/dist/lib/services/version-service.js.map +1 -1
  326. package/dist/lib/types/events.d.ts +2 -1
  327. package/dist/lib/types/events.js +4 -2
  328. package/dist/lib/types/events.js.map +1 -1
  329. package/dist/lib/types/experimental.d.ts +1 -1
  330. package/dist/lib/types/experimental.js +6 -5
  331. package/dist/lib/types/experimental.js.map +1 -1
  332. package/dist/lib/types/model.d.ts +2 -0
  333. package/dist/lib/types/model.js.map +1 -1
  334. package/dist/lib/types/option.d.ts +2 -0
  335. package/dist/lib/types/project.d.ts +7 -0
  336. package/dist/lib/types/stores/access-store.d.ts +9 -0
  337. package/dist/lib/types/stores/client-applications-store.d.ts +5 -0
  338. package/dist/lib/types/stores/context-field-store.d.ts +3 -3
  339. package/dist/lib/types/stores/feature-toggle-store.d.ts +2 -1
  340. package/dist/lib/types/stores/role-store.d.ts +3 -0
  341. package/dist/migrations/20230802092725-add-last-seen-column-to-feature-environments.d.ts +2 -0
  342. package/dist/migrations/20230802092725-add-last-seen-column-to-feature-environments.js +84 -0
  343. package/dist/migrations/20230802092725-add-last-seen-column-to-feature-environments.js.map +1 -0
  344. package/dist/migrations/20230802141830-add-feature-and-environment-last-seen-at-to-features-view.d.ts +2 -0
  345. package/dist/migrations/20230802141830-add-feature-and-environment-last-seen-at-to-features-view.js +83 -0
  346. package/dist/migrations/20230802141830-add-feature-and-environment-last-seen-at-to-features-view.js.map +1 -0
  347. package/dist/migrations/20230803061359-change-request-optional-feature.d.ts +2 -0
  348. package/dist/migrations/20230803061359-change-request-optional-feature.js +13 -0
  349. package/dist/migrations/20230803061359-change-request-optional-feature.js.map +1 -0
  350. package/dist/migrations/20230808104232-update-root-roles-descriptions.d.ts +2 -0
  351. package/dist/migrations/20230808104232-update-root-roles-descriptions.js +15 -0
  352. package/dist/migrations/20230808104232-update-root-roles-descriptions.js.map +1 -0
  353. package/dist/migrations/20230814095253-change-request-rejections.d.ts +2 -0
  354. package/dist/migrations/20230814095253-change-request-rejections.js +18 -0
  355. package/dist/migrations/20230814095253-change-request-rejections.js.map +1 -0
  356. package/dist/migrations/20230814115436-change-request-timzone-timestamps.d.ts +2 -0
  357. package/dist/migrations/20230814115436-change-request-timzone-timestamps.js +15 -0
  358. package/dist/migrations/20230814115436-change-request-timzone-timestamps.js.map +1 -0
  359. package/dist/migrations/20230815065908-change-request-approve-reject-permission.d.ts +2 -0
  360. package/dist/migrations/20230815065908-change-request-approve-reject-permission.js +12 -0
  361. package/dist/migrations/20230815065908-change-request-approve-reject-permission.js.map +1 -0
  362. package/dist/migrations/20230817095805-client-applications-usage-table.d.ts +2 -0
  363. package/dist/migrations/20230817095805-client-applications-usage-table.js +17 -0
  364. package/dist/migrations/20230817095805-client-applications-usage-table.js.map +1 -0
  365. package/dist/migrations/20230818124614-update-client-applications-usage-table.d.ts +2 -0
  366. package/dist/migrations/20230818124614-update-client-applications-usage-table.js +25 -0
  367. package/dist/migrations/20230818124614-update-client-applications-usage-table.js.map +1 -0
  368. package/dist/server-dev.js +3 -2
  369. package/dist/server-dev.js.map +1 -1
  370. package/dist/test/config/test-config.js +1 -0
  371. package/dist/test/config/test-config.js.map +1 -1
  372. package/dist/test/e2e/api/admin/api-token.auth.e2e.test.js +12 -84
  373. package/dist/test/e2e/api/admin/api-token.auth.e2e.test.js.map +1 -1
  374. package/dist/test/e2e/api/admin/api-token.e2e.test.js +10 -2
  375. package/dist/test/e2e/api/admin/api-token.e2e.test.js.map +1 -1
  376. package/dist/test/e2e/api/admin/metrics.e2e.test.js +30 -4
  377. package/dist/test/e2e/api/admin/metrics.e2e.test.js.map +1 -1
  378. package/dist/test/e2e/api/admin/project/features.e2e.test.js +14 -15
  379. package/dist/test/e2e/api/admin/project/features.e2e.test.js.map +1 -1
  380. package/dist/test/e2e/api/client/metricsV2.e2e.test.js +19 -5
  381. package/dist/test/e2e/api/client/metricsV2.e2e.test.js.map +1 -1
  382. package/dist/test/e2e/api/openapi/openapi.e2e.test.js +23 -0
  383. package/dist/test/e2e/api/openapi/openapi.e2e.test.js.map +1 -1
  384. package/dist/test/e2e/helpers/test-helper.js +11 -1
  385. package/dist/test/e2e/helpers/test-helper.js.map +1 -1
  386. package/dist/test/e2e/services/access-service.e2e.test.js +2 -2
  387. package/dist/test/e2e/services/access-service.e2e.test.js.map +1 -1
  388. package/dist/test/e2e/services/api-token-service.e2e.test.js +1 -1
  389. package/dist/test/e2e/services/api-token-service.e2e.test.js.map +1 -1
  390. package/dist/test/e2e/services/environment-service.test.js +2 -0
  391. package/dist/test/e2e/services/environment-service.test.js.map +1 -1
  392. package/dist/test/e2e/services/feature-toggle-service-v2.e2e.test.js +1 -1
  393. package/dist/test/e2e/services/feature-toggle-service-v2.e2e.test.js.map +1 -1
  394. package/dist/test/e2e/services/playground-service.test.js +1 -1
  395. package/dist/test/e2e/services/playground-service.test.js.map +1 -1
  396. package/dist/test/e2e/services/project-health-service.e2e.test.js +1 -1
  397. package/dist/test/e2e/services/project-health-service.e2e.test.js.map +1 -1
  398. package/dist/test/e2e/services/project-service.e2e.test.js +1 -1
  399. package/dist/test/e2e/services/project-service.e2e.test.js.map +1 -1
  400. package/dist/test/e2e/services/user-service.e2e.test.js +10 -0
  401. package/dist/test/e2e/services/user-service.e2e.test.js.map +1 -1
  402. package/dist/test/fixtures/access-service-mock.js +1 -0
  403. package/dist/test/fixtures/access-service-mock.js.map +1 -1
  404. package/dist/test/fixtures/fake-access-store.d.ts +3 -1
  405. package/dist/test/fixtures/fake-access-store.js +6 -0
  406. package/dist/test/fixtures/fake-access-store.js.map +1 -1
  407. package/dist/test/fixtures/fake-feature-toggle-store.d.ts +2 -1
  408. package/dist/test/fixtures/fake-feature-toggle-store.js +19 -6
  409. package/dist/test/fixtures/fake-feature-toggle-store.js.map +1 -1
  410. package/dist/test/fixtures/fake-project-store.d.ts +1 -1
  411. package/dist/test/fixtures/fake-role-store.d.ts +3 -0
  412. package/dist/test/fixtures/fake-role-store.js +6 -0
  413. package/dist/test/fixtures/fake-role-store.js.map +1 -1
  414. package/frontend/build/index.html +2 -2
  415. package/frontend/build/static/{AdvancedPlayground-48dddbf4.js → AdvancedPlayground-2d715a2c.js} +3 -3
  416. package/frontend/build/static/{CreateProject-c1b0f704.js → CreateProject-5b1090c2.js} +1 -1
  417. package/frontend/build/static/{Error-e6f7c2ee.js → Error-e44ea66b.js} +1 -1
  418. package/frontend/build/static/FeatureArchiveDialog-b47b18e8.js +10 -0
  419. package/frontend/build/static/{FeatureMetricsChart-81da0ce4.js → FeatureMetricsChart-36caeeb7.js} +2 -2
  420. package/frontend/build/static/FeatureViewLazyExport-49d56afd.js +7 -0
  421. package/frontend/build/static/LazyAdminExport-87c9ab51.js +35 -0
  422. package/frontend/build/static/LazyProjectExport-c4634b2a.js +17 -0
  423. package/frontend/build/static/{NetworkOverview-cd06e59f.js → NetworkOverview-c762698b.js} +64 -64
  424. package/frontend/build/static/{NetworkTraffic-ba933617.js → NetworkTraffic-c8d9eb9b.js} +1 -1
  425. package/frontend/build/static/RoleCell-d1aa8288.js +1 -0
  426. package/frontend/build/static/{StrategyItemContainer-88c18285.js → StrategyItemContainer-c7c352a4.js} +1 -1
  427. package/frontend/build/static/changeRequestProcess-f2469ef4.svg +61 -0
  428. package/frontend/build/static/{chartjs-adapter-date-fns.esm-799be047.js → chartjs-adapter-date-fns.esm-9c67372b.js} +6 -6
  429. package/frontend/build/static/{flowchart-elk-definition-170a3958-543f0844.js → flowchart-elk-definition-170a3958-5ea9fc56.js} +1 -1
  430. package/frontend/build/static/{index-88f1c682.js → index-1aaa8c27.js} +1 -1
  431. package/frontend/build/static/{index-aa638b65.js → index-670c9345.js} +1 -1
  432. package/frontend/build/static/index-b7003840.js +454 -0
  433. package/frontend/build/static/{is_dark-735e3a95.js → is_dark-b445e102.js} +1 -1
  434. package/frontend/build/static/{mindmap-definition-44684416-ac92f950.js → mindmap-definition-44684416-254e936e.js} +1 -1
  435. package/frontend/build/static/pro-enterprise-feature-badge-8ac467c3.svg +7 -0
  436. package/frontend/build/static/pro-enterprise-feature-badge-light-81a18f9b.svg +6 -0
  437. package/frontend/build/static/{timeline-definition-8e5a9bc6-6c09f608.js → timeline-definition-8e5a9bc6-24fd1725.js} +1 -1
  438. package/frontend/build/static/{unknownify-0b176a78.js → unknownify-ea4585e8.js} +1 -1
  439. package/frontend/build/static/usage-line-00d00632.svg +3 -0
  440. package/frontend/build/static/usage-rate-cb18f02b.svg +3 -0
  441. package/frontend/package.json +13 -13
  442. package/package.json +12 -13
  443. package/dist/lib/openapi/spec/upsert-context-field-schema.js +0 -35
  444. package/dist/lib/openapi/spec/upsert-context-field-schema.js.map +0 -1
  445. package/frontend/build/static/FeatureArchiveDialog-9ad60db1.js +0 -10
  446. package/frontend/build/static/FeatureViewLazyExport-58a3e977.js +0 -7
  447. package/frontend/build/static/LazyAdminExport-c98b11d7.js +0 -37
  448. package/frontend/build/static/LazyProjectExport-14db2e37.js +0 -16
  449. package/frontend/build/static/RoleCell-c534790e.js +0 -1
  450. package/frontend/build/static/changeRequestProcess-a532ab60.svg +0 -1
  451. package/frontend/build/static/index-1c4c68c3.js +0 -453
  452. package/frontend/build/static/pro-enterprise-feature-badge-8fab99c5.svg +0 -5
  453. package/frontend/build/static/pro-enterprise-feature-badge-light-0227af08.svg +0 -1
  454. /package/frontend/build/static/{index-770afaee.css → style-770afaee.css} +0 -0
@@ -1,32 +1,32 @@
1
- import{g0 as T4,g1 as lc,g2 as cc,g3 as E4,g4 as C4,g5 as S4,s as m2,r as Wh,j as Po,bS as A4,g6 as L4,g7 as B4,C as D4,E as I4,g8 as M4,g9 as N4}from"./index-1c4c68c3.js";import{u as R4,a as b2}from"./unknownify-0b176a78.js";const O4=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function F4(t){return typeof t=="string"&&O4.test(t)}function P4(t){if(!F4(t))throw TypeError("Invalid UUID");let e;const r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}function V4(t){t=unescape(encodeURIComponent(t));const e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}const Y4="6ba7b810-9dad-11d1-80b4-00c04fd430c8",z4="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function U4(t,e,r){function i(n,s,a,o){var l;if(typeof n=="string"&&(n=V4(n)),typeof s=="string"&&(s=P4(s)),((l=s)===null||l===void 0?void 0:l.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let h=new Uint8Array(16+n.length);if(h.set(s),h.set(n,s.length),h=r(h),h[6]=h[6]&15|e,h[8]=h[8]&63|128,a){o=o||0;for(let u=0;u<16;++u)a[o+u]=h[u];return a}return T4(h)}try{i.name=t}catch{}return i.DNS=Y4,i.URL=z4,i}function W4(t,e,r,i){switch(t){case 0:return e&r^~e&i;case 1:return e^r^i;case 2:return e&r^e&i^r&i;case 3:return e^r^i}}function eh(t,e){return t<<e|t>>>32-e}function H4(t){const e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){const a=unescape(encodeURIComponent(t));t=[];for(let o=0;o<a.length;++o)t.push(a.charCodeAt(o))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);const i=t.length/4+2,n=Math.ceil(i/16),s=new Array(n);for(let a=0;a<n;++a){const o=new Uint32Array(16);for(let l=0;l<16;++l)o[l]=t[a*64+l*4]<<24|t[a*64+l*4+1]<<16|t[a*64+l*4+2]<<8|t[a*64+l*4+3];s[a]=o}s[n-1][14]=(t.length-1)*8/Math.pow(2,32),s[n-1][14]=Math.floor(s[n-1][14]),s[n-1][15]=(t.length-1)*8&4294967295;for(let a=0;a<n;++a){const o=new Uint32Array(80);for(let p=0;p<16;++p)o[p]=s[a][p];for(let p=16;p<80;++p)o[p]=eh(o[p-3]^o[p-8]^o[p-14]^o[p-16],1);let l=r[0],h=r[1],u=r[2],f=r[3],d=r[4];for(let p=0;p<80;++p){const m=Math.floor(p/20),b=eh(l,5)+W4(m,h,u,f)+d+e[m]+o[p]>>>0;d=f,f=u,u=eh(h,30)>>>0,h=l,l=b}r[0]=r[0]+l>>>0,r[1]=r[1]+h>>>0,r[2]=r[2]+u>>>0,r[3]=r[3]+f>>>0,r[4]=r[4]+d>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}const q4=U4("v5",80,H4),G4=q4;function _2(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i=Array.from(typeof t=="string"?[t]:t);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var n=i.reduce(function(o,l){var h=l.match(/\n([\t ]+|(?!\s).)/g);return h?o.concat(h.map(function(u){var f,d;return(d=(f=u.match(/[\t ]/g))===null||f===void 0?void 0:f.length)!==null&&d!==void 0?d:0})):o},[]);if(n.length){var s=new RegExp(`
1
+ import{gd as E4,ge as lc,gf as cc,gg as C4,gh as S4,gi as A4,cd as i1,s as b2,r as Wh,j as Po,bT as L4,gj as B4,gk as D4,C as I4,E as M4,gl as N4,gm as R4}from"./index-b7003840.js";import{u as O4,a as _2}from"./unknownify-ea4585e8.js";const F4=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function P4(t){return typeof t=="string"&&F4.test(t)}function V4(t){if(!P4(t))throw TypeError("Invalid UUID");let e;const r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}function Y4(t){t=unescape(encodeURIComponent(t));const e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}const z4="6ba7b810-9dad-11d1-80b4-00c04fd430c8",U4="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function W4(t,e,r){function i(n,s,a,o){var l;if(typeof n=="string"&&(n=Y4(n)),typeof s=="string"&&(s=V4(s)),((l=s)===null||l===void 0?void 0:l.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let h=new Uint8Array(16+n.length);if(h.set(s),h.set(n,s.length),h=r(h),h[6]=h[6]&15|e,h[8]=h[8]&63|128,a){o=o||0;for(let u=0;u<16;++u)a[o+u]=h[u];return a}return E4(h)}try{i.name=t}catch{}return i.DNS=z4,i.URL=U4,i}function H4(t,e,r,i){switch(t){case 0:return e&r^~e&i;case 1:return e^r^i;case 2:return e&r^e&i^r&i;case 3:return e^r^i}}function eh(t,e){return t<<e|t>>>32-e}function q4(t){const e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){const a=unescape(encodeURIComponent(t));t=[];for(let o=0;o<a.length;++o)t.push(a.charCodeAt(o))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);const i=t.length/4+2,n=Math.ceil(i/16),s=new Array(n);for(let a=0;a<n;++a){const o=new Uint32Array(16);for(let l=0;l<16;++l)o[l]=t[a*64+l*4]<<24|t[a*64+l*4+1]<<16|t[a*64+l*4+2]<<8|t[a*64+l*4+3];s[a]=o}s[n-1][14]=(t.length-1)*8/Math.pow(2,32),s[n-1][14]=Math.floor(s[n-1][14]),s[n-1][15]=(t.length-1)*8&4294967295;for(let a=0;a<n;++a){const o=new Uint32Array(80);for(let p=0;p<16;++p)o[p]=s[a][p];for(let p=16;p<80;++p)o[p]=eh(o[p-3]^o[p-8]^o[p-14]^o[p-16],1);let l=r[0],h=r[1],u=r[2],f=r[3],d=r[4];for(let p=0;p<80;++p){const m=Math.floor(p/20),b=eh(l,5)+H4(m,h,u,f)+d+e[m]+o[p]>>>0;d=f,f=u,u=eh(h,30)>>>0,h=l,l=b}r[0]=r[0]+l>>>0,r[1]=r[1]+h>>>0,r[2]=r[2]+u>>>0,r[3]=r[3]+f>>>0,r[4]=r[4]+d>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}const G4=W4("v5",80,q4),$4=G4;function x2(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i=Array.from(typeof t=="string"?[t]:t);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var n=i.reduce(function(o,l){var h=l.match(/\n([\t ]+|(?!\s).)/g);return h?o.concat(h.map(function(u){var f,d;return(d=(f=u.match(/[\t ]/g))===null||f===void 0?void 0:f.length)!==null&&d!==void 0?d:0})):o},[]);if(n.length){var s=new RegExp(`
2
2
  [ ]{`+Math.min.apply(Math,n)+"}","g");i=i.map(function(o){return o.replace(s,`
3
3
  `)})}i[0]=i[0].replace(/^\r?\n/,"");var a=i[0];return e.forEach(function(o,l){var h=a.match(/(?:^|\n)( *)$/),u=h?h[1]:"",f=o;typeof o=="string"&&o.includes(`
4
4
  `)&&(f=String(o).split(`
5
5
  `).map(function(d,p){return p===0?d:""+u+d}).join(`
6
- `)),a+=f+i[l+1]}),a}var x2={exports:{}};(function(t,e){(function(r,i){t.exports=i()})(lc,function(){var r=1e3,i=6e4,n=36e5,s="millisecond",a="second",o="minute",l="hour",h="day",u="week",f="month",d="quarter",p="year",m="date",b="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,k=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(w){var g=["th","st","nd","rd"],D=w%100;return"["+w+(g[(D-20)%10]||g[D]||g[0])+"]"}},B=function(w,g,D){var y=String(w);return!y||y.length>=g?w:""+Array(g+1-y.length).join(D)+w},R={s:B,z:function(w){var g=-w.utcOffset(),D=Math.abs(g),y=Math.floor(D/60),N=D%60;return(g<=0?"+":"-")+B(y,2,"0")+":"+B(N,2,"0")},m:function w(g,D){if(g.date()<D.date())return-w(D,g);var y=12*(D.year()-g.year())+(D.month()-g.month()),N=g.clone().add(y,f),nt=D-N<0,Y=g.clone().add(y+(nt?-1:1),f);return+(-(y+(D-N)/(nt?N-Y:Y-N))||0)},a:function(w){return w<0?Math.ceil(w)||0:Math.floor(w)},p:function(w){return{M:f,y:p,w:u,d:h,D:m,h:l,m:o,s:a,ms:s,Q:d}[w]||String(w||"").toLowerCase().replace(/s$/,"")},u:function(w){return w===void 0}},P="en",V={};V[P]=v;var O=function(w){return w instanceof E},F=function w(g,D,y){var N;if(!g)return P;if(typeof g=="string"){var nt=g.toLowerCase();V[nt]&&(N=nt),D&&(V[nt]=D,N=nt);var Y=g.split("-");if(!N&&Y.length>1)return w(Y[0])}else{var Z=g.name;V[Z]=g,N=Z}return!y&&N&&(P=N),N||!y&&P},C=function(w,g){if(O(w))return w.clone();var D=typeof g=="object"?g:{};return D.date=w,D.args=arguments,new E(D)},S=R;S.l=F,S.i=O,S.w=function(w,g){return C(w,{locale:g.$L,utc:g.$u,x:g.$x,$offset:g.$offset})};var E=function(){function w(D){this.$L=F(D.locale,null,!0),this.parse(D)}var g=w.prototype;return g.parse=function(D){this.$d=function(y){var N=y.date,nt=y.utc;if(N===null)return new Date(NaN);if(S.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var Y=N.match(x);if(Y){var Z=Y[2]-1||0,J=(Y[7]||"0").substring(0,3);return nt?new Date(Date.UTC(Y[1],Z,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,J)):new Date(Y[1],Z,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,J)}}return new Date(N)}(D),this.$x=D.x||{},this.init()},g.init=function(){var D=this.$d;this.$y=D.getFullYear(),this.$M=D.getMonth(),this.$D=D.getDate(),this.$W=D.getDay(),this.$H=D.getHours(),this.$m=D.getMinutes(),this.$s=D.getSeconds(),this.$ms=D.getMilliseconds()},g.$utils=function(){return S},g.isValid=function(){return this.$d.toString()!==b},g.isSame=function(D,y){var N=C(D);return this.startOf(y)<=N&&N<=this.endOf(y)},g.isAfter=function(D,y){return C(D)<this.startOf(y)},g.isBefore=function(D,y){return this.endOf(y)<C(D)},g.$g=function(D,y,N){return S.u(D)?this[y]:this.set(N,D)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(D,y){var N=this,nt=!!S.u(y)||y,Y=S.p(D),Z=function($,j){var W=S.w(N.$u?Date.UTC(N.$y,j,$):new Date(N.$y,j,$),N);return nt?W:W.endOf(h)},J=function($,j){return S.w(N.toDate()[$].apply(N.toDate("s"),(nt?[0,0,0,0]:[23,59,59,999]).slice(j)),N)},X=this.$W,tt=this.$M,ot=this.$D,at="set"+(this.$u?"UTC":"");switch(Y){case p:return nt?Z(1,0):Z(31,11);case f:return nt?Z(1,tt):Z(0,tt+1);case u:var U=this.$locale().weekStart||0,Tt=(X<U?X+7:X)-U;return Z(nt?ot-Tt:ot+(6-Tt),tt);case h:case m:return J(at+"Hours",0);case l:return J(at+"Minutes",1);case o:return J(at+"Seconds",2);case a:return J(at+"Milliseconds",3);default:return this.clone()}},g.endOf=function(D){return this.startOf(D,!1)},g.$set=function(D,y){var N,nt=S.p(D),Y="set"+(this.$u?"UTC":""),Z=(N={},N[h]=Y+"Date",N[m]=Y+"Date",N[f]=Y+"Month",N[p]=Y+"FullYear",N[l]=Y+"Hours",N[o]=Y+"Minutes",N[a]=Y+"Seconds",N[s]=Y+"Milliseconds",N)[nt],J=nt===h?this.$D+(y-this.$W):y;if(nt===f||nt===p){var X=this.clone().set(m,1);X.$d[Z](J),X.init(),this.$d=X.set(m,Math.min(this.$D,X.daysInMonth())).$d}else Z&&this.$d[Z](J);return this.init(),this},g.set=function(D,y){return this.clone().$set(D,y)},g.get=function(D){return this[S.p(D)]()},g.add=function(D,y){var N,nt=this;D=Number(D);var Y=S.p(y),Z=function(tt){var ot=C(nt);return S.w(ot.date(ot.date()+Math.round(tt*D)),nt)};if(Y===f)return this.set(f,this.$M+D);if(Y===p)return this.set(p,this.$y+D);if(Y===h)return Z(1);if(Y===u)return Z(7);var J=(N={},N[o]=i,N[l]=n,N[a]=r,N)[Y]||1,X=this.$d.getTime()+D*J;return S.w(X,this)},g.subtract=function(D,y){return this.add(-1*D,y)},g.format=function(D){var y=this,N=this.$locale();if(!this.isValid())return N.invalidDate||b;var nt=D||"YYYY-MM-DDTHH:mm:ssZ",Y=S.z(this),Z=this.$H,J=this.$m,X=this.$M,tt=N.weekdays,ot=N.months,at=function(j,W,z,A){return j&&(j[W]||j(y,nt))||z[W].slice(0,A)},U=function(j){return S.s(Z%12||12,j,"0")},Tt=N.meridiem||function(j,W,z){var A=j<12?"AM":"PM";return z?A.toLowerCase():A},$={YY:String(this.$y).slice(-2),YYYY:this.$y,M:X+1,MM:S.s(X+1,2,"0"),MMM:at(N.monthsShort,X,ot,3),MMMM:at(ot,X),D:this.$D,DD:S.s(this.$D,2,"0"),d:String(this.$W),dd:at(N.weekdaysMin,this.$W,tt,2),ddd:at(N.weekdaysShort,this.$W,tt,3),dddd:tt[this.$W],H:String(Z),HH:S.s(Z,2,"0"),h:U(1),hh:U(2),a:Tt(Z,J,!0),A:Tt(Z,J,!1),m:String(J),mm:S.s(J,2,"0"),s:String(this.$s),ss:S.s(this.$s,2,"0"),SSS:S.s(this.$ms,3,"0"),Z:Y};return nt.replace(k,function(j,W){return W||$[j]||Y.replace(":","")})},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(D,y,N){var nt,Y=S.p(y),Z=C(D),J=(Z.utcOffset()-this.utcOffset())*i,X=this-Z,tt=S.m(this,Z);return tt=(nt={},nt[p]=tt/12,nt[f]=tt,nt[d]=tt/3,nt[u]=(X-J)/6048e5,nt[h]=(X-J)/864e5,nt[l]=X/n,nt[o]=X/i,nt[a]=X/r,nt)[Y]||X,N?tt:S.a(tt)},g.daysInMonth=function(){return this.endOf(f).$D},g.$locale=function(){return V[this.$L]},g.locale=function(D,y){if(!D)return this.$L;var N=this.clone(),nt=F(D,y,!0);return nt&&(N.$L=nt),N},g.clone=function(){return S.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},w}(),_=E.prototype;return C.prototype=_,[["$ms",s],["$s",a],["$m",o],["$H",l],["$W",h],["$M",f],["$y",p],["$D",m]].forEach(function(w){_[w[1]]=function(g){return this.$g(g,w[0],w[1])}}),C.extend=function(w,g){return w.$i||(w(g,E,C),w.$i=!0),C},C.locale=F,C.isDayjs=O,C.unix=function(w){return C(1e3*w)},C.en=V[P],C.Ls=V,C.p={},C})})(x2);var $4=x2.exports;const xr=cc($4);var i1={};Object.defineProperty(i1,"__esModule",{value:!0});var Ki=i1.sanitizeUrl=void 0,j4=/^([^\w]*)(javascript|data|vbscript)/im,X4=/&#(\w+)(^\w|;)?/g,K4=/&(newline|tab);/gi,Z4=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Q4=/^.+(:|&colon;)/gim,J4=[".","/"];function t5(t){return J4.indexOf(t[0])>-1}function e5(t){return t.replace(X4,function(e,r){return String.fromCharCode(r)})}function r5(t){var e=e5(t||"").replace(K4,"").replace(Z4,"").trim();if(!e)return"about:blank";if(t5(e))return e;var r=e.match(Q4);if(!r)return e;var i=r[0];return j4.test(i)?"about:blank":e}Ki=i1.sanitizeUrl=r5;function Vo(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function i5(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function n1(t){let e,r,i;t.length!==2?(e=Vo,r=(o,l)=>Vo(t(o),l),i=(o,l)=>t(o)-l):(e=t===Vo||t===i5?t:n5,r=t,i=t);function n(o,l,h=0,u=o.length){if(h<u){if(e(l,l)!==0)return u;do{const f=h+u>>>1;r(o[f],l)<0?h=f+1:u=f}while(h<u)}return h}function s(o,l,h=0,u=o.length){if(h<u){if(e(l,l)!==0)return u;do{const f=h+u>>>1;r(o[f],l)<=0?h=f+1:u=f}while(h<u)}return h}function a(o,l,h=0,u=o.length){const f=n(o,l,h,u-1);return f>h&&i(o[f-1],l)>-i(o[f],l)?f-1:f}return{left:n,center:a,right:s}}function n5(){return 0}function s5(t){return t===null?NaN:+t}const a5=n1(Vo),o5=a5.right;n1(s5).center;const l5=o5;class M0 extends Map{constructor(e,r=u5){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(const[i,n]of e)this.set(i,n)}get(e){return super.get(N0(this,e))}has(e){return super.has(N0(this,e))}set(e,r){return super.set(c5(this,e),r)}delete(e){return super.delete(h5(this,e))}}function N0({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):r}function c5({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):(t.set(i,r),r)}function h5({_intern:t,_key:e},r){const i=e(r);return t.has(i)&&(r=t.get(i),t.delete(i)),r}function u5(t){return t!==null&&typeof t=="object"?t.valueOf():t}const f5=Math.sqrt(50),d5=Math.sqrt(10),p5=Math.sqrt(2);function ol(t,e,r){const i=(e-t)/Math.max(0,r),n=Math.floor(Math.log10(i)),s=i/Math.pow(10,n),a=s>=f5?10:s>=d5?5:s>=p5?2:1;let o,l,h;return n<0?(h=Math.pow(10,-n)/a,o=Math.round(t*h),l=Math.round(e*h),o/h<t&&++o,l/h>e&&--l,h=-h):(h=Math.pow(10,n)*a,o=Math.round(t/h),l=Math.round(e/h),o*h<t&&++o,l*h>e&&--l),l<o&&.5<=r&&r<2?ol(t,e,r*2):[o,l,h]}function g5(t,e,r){if(e=+e,t=+t,r=+r,!(r>0))return[];if(t===e)return[t];const i=e<t,[n,s,a]=i?ol(e,t,r):ol(t,e,r);if(!(s>=n))return[];const o=s-n+1,l=new Array(o);if(i)if(a<0)for(let h=0;h<o;++h)l[h]=(s-h)/-a;else for(let h=0;h<o;++h)l[h]=(s-h)*a;else if(a<0)for(let h=0;h<o;++h)l[h]=(n+h)/-a;else for(let h=0;h<o;++h)l[h]=(n+h)*a;return l}function Hh(t,e,r){return e=+e,t=+t,r=+r,ol(t,e,r)[2]}function qh(t,e,r){e=+e,t=+t,r=+r;const i=e<t,n=i?Hh(e,t,r):Hh(t,e,r);return(i?-1:1)*(n<0?1/-n:n)}function y5(t,e){let r;if(e===void 0)for(const i of t)i!=null&&(r<i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of t)(n=e(n,++i,t))!=null&&(r<n||r===void 0&&n>=n)&&(r=n)}return r}function m5(t,e){let r;if(e===void 0)for(const i of t)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of t)(n=e(n,++i,t))!=null&&(r>n||r===void 0&&n>=n)&&(r=n)}return r}function b5(t){return t}var Yo=1,rh=2,Gh=3,ko=4,R0=1e-6;function _5(t){return"translate("+t+",0)"}function x5(t){return"translate(0,"+t+")"}function v5(t){return e=>+t(e)}function k5(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function w5(){return!this.__axis}function v2(t,e){var r=[],i=null,n=null,s=6,a=6,o=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,h=t===Yo||t===ko?-1:1,u=t===ko||t===rh?"x":"y",f=t===Yo||t===Gh?_5:x5;function d(p){var m=i??(e.ticks?e.ticks.apply(e,r):e.domain()),b=n??(e.tickFormat?e.tickFormat.apply(e,r):b5),x=Math.max(s,0)+o,k=e.range(),v=+k[0]+l,B=+k[k.length-1]+l,R=(e.bandwidth?k5:v5)(e.copy(),l),P=p.selection?p.selection():p,V=P.selectAll(".domain").data([null]),O=P.selectAll(".tick").data(m,e).order(),F=O.exit(),C=O.enter().append("g").attr("class","tick"),S=O.select("line"),E=O.select("text");V=V.merge(V.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),O=O.merge(C),S=S.merge(C.append("line").attr("stroke","currentColor").attr(u+"2",h*s)),E=E.merge(C.append("text").attr("fill","currentColor").attr(u,h*x).attr("dy",t===Yo?"0em":t===Gh?"0.71em":"0.32em")),p!==P&&(V=V.transition(p),O=O.transition(p),S=S.transition(p),E=E.transition(p),F=F.transition(p).attr("opacity",R0).attr("transform",function(_){return isFinite(_=R(_))?f(_+l):this.getAttribute("transform")}),C.attr("opacity",R0).attr("transform",function(_){var w=this.parentNode.__axis;return f((w&&isFinite(w=w(_))?w:R(_))+l)})),F.remove(),V.attr("d",t===ko||t===rh?a?"M"+h*a+","+v+"H"+l+"V"+B+"H"+h*a:"M"+l+","+v+"V"+B:a?"M"+v+","+h*a+"V"+l+"H"+B+"V"+h*a:"M"+v+","+l+"H"+B),O.attr("opacity",1).attr("transform",function(_){return f(R(_)+l)}),S.attr(u+"2",h*s),E.attr(u,h*x).text(b),P.filter(w5).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===rh?"start":t===ko?"end":"middle"),P.each(function(){this.__axis=R})}return d.scale=function(p){return arguments.length?(e=p,d):e},d.ticks=function(){return r=Array.from(arguments),d},d.tickArguments=function(p){return arguments.length?(r=p==null?[]:Array.from(p),d):r.slice()},d.tickValues=function(p){return arguments.length?(i=p==null?null:Array.from(p),d):i&&i.slice()},d.tickFormat=function(p){return arguments.length?(n=p,d):n},d.tickSize=function(p){return arguments.length?(s=a=+p,d):s},d.tickSizeInner=function(p){return arguments.length?(s=+p,d):s},d.tickSizeOuter=function(p){return arguments.length?(a=+p,d):a},d.tickPadding=function(p){return arguments.length?(o=+p,d):o},d.offset=function(p){return arguments.length?(l=+p,d):l},d}function T5(t){return v2(Yo,t)}function E5(t){return v2(Gh,t)}var C5={value:()=>{}};function k2(){for(var t=0,e=arguments.length,r={},i;t<e;++t){if(!(i=arguments[t]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new zo(r)}function zo(t){this._=t}function S5(t,e){return t.trim().split(/^|\s+/).map(function(r){var i="",n=r.indexOf(".");if(n>=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}zo.prototype=k2.prototype={constructor:zo,on:function(t,e){var r=this._,i=S5(t+"",r),n,s=-1,a=i.length;if(arguments.length<2){for(;++s<a;)if((n=(t=i[s]).type)&&(n=A5(r[n],t.name)))return n;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++s<a;)if(n=(t=i[s]).type)r[n]=O0(r[n],t.name,e);else if(e==null)for(n in r)r[n]=O0(r[n],t.name,null);return this},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new zo(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var r=new Array(n),i=0,n,s;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],i=0,n=s.length;i<n;++i)s[i].value.apply(e,r)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],n=0,s=i.length;n<s;++n)i[n].value.apply(e,r)}};function A5(t,e){for(var r=0,i=t.length,n;r<i;++r)if((n=t[r]).name===e)return n.value}function O0(t,e,r){for(var i=0,n=t.length;i<n;++i)if(t[i].name===e){t[i]=C5,t=t.slice(0,i).concat(t.slice(i+1));break}return r!=null&&t.push({name:e,value:r}),t}var $h="http://www.w3.org/1999/xhtml";const F0={svg:"http://www.w3.org/2000/svg",xhtml:$h,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function hc(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),F0.hasOwnProperty(e)?{space:F0[e],local:t}:t}function L5(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===$h&&e.documentElement.namespaceURI===$h?e.createElement(t):e.createElementNS(r,t)}}function B5(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function w2(t){var e=hc(t);return(e.local?B5:L5)(e)}function D5(){}function s1(t){return t==null?D5:function(){return this.querySelector(t)}}function I5(t){typeof t!="function"&&(t=s1(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var s=e[n],a=s.length,o=i[n]=new Array(a),l,h,u=0;u<a;++u)(l=s[u])&&(h=t.call(l,l.__data__,u,s))&&("__data__"in l&&(h.__data__=l.__data__),o[u]=h);return new dr(i,this._parents)}function T2(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function M5(){return[]}function E2(t){return t==null?M5:function(){return this.querySelectorAll(t)}}function N5(t){return function(){return T2(t.apply(this,arguments))}}function R5(t){typeof t=="function"?t=N5(t):t=E2(t);for(var e=this._groups,r=e.length,i=[],n=[],s=0;s<r;++s)for(var a=e[s],o=a.length,l,h=0;h<o;++h)(l=a[h])&&(i.push(t.call(l,l.__data__,h,a)),n.push(l));return new dr(i,n)}function C2(t){return function(){return this.matches(t)}}function S2(t){return function(e){return e.matches(t)}}var O5=Array.prototype.find;function F5(t){return function(){return O5.call(this.children,t)}}function P5(){return this.firstElementChild}function V5(t){return this.select(t==null?P5:F5(typeof t=="function"?t:S2(t)))}var Y5=Array.prototype.filter;function z5(){return Array.from(this.children)}function U5(t){return function(){return Y5.call(this.children,t)}}function W5(t){return this.selectAll(t==null?z5:U5(typeof t=="function"?t:S2(t)))}function H5(t){typeof t!="function"&&(t=C2(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var s=e[n],a=s.length,o=i[n]=[],l,h=0;h<a;++h)(l=s[h])&&t.call(l,l.__data__,h,s)&&o.push(l);return new dr(i,this._parents)}function A2(t){return new Array(t.length)}function q5(){return new dr(this._enter||this._groups.map(A2),this._parents)}function ll(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}ll.prototype={constructor:ll,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function G5(t){return function(){return t}}function $5(t,e,r,i,n,s){for(var a=0,o,l=e.length,h=s.length;a<h;++a)(o=e[a])?(o.__data__=s[a],i[a]=o):r[a]=new ll(t,s[a]);for(;a<l;++a)(o=e[a])&&(n[a]=o)}function j5(t,e,r,i,n,s,a){var o,l,h=new Map,u=e.length,f=s.length,d=new Array(u),p;for(o=0;o<u;++o)(l=e[o])&&(d[o]=p=a.call(l,l.__data__,o,e)+"",h.has(p)?n[o]=l:h.set(p,l));for(o=0;o<f;++o)p=a.call(t,s[o],o,s)+"",(l=h.get(p))?(i[o]=l,l.__data__=s[o],h.delete(p)):r[o]=new ll(t,s[o]);for(o=0;o<u;++o)(l=e[o])&&h.get(d[o])===l&&(n[o]=l)}function X5(t){return t.__data__}function K5(t,e){if(!arguments.length)return Array.from(this,X5);var r=e?j5:$5,i=this._parents,n=this._groups;typeof t!="function"&&(t=G5(t));for(var s=n.length,a=new Array(s),o=new Array(s),l=new Array(s),h=0;h<s;++h){var u=i[h],f=n[h],d=f.length,p=Z5(t.call(u,u&&u.__data__,h,i)),m=p.length,b=o[h]=new Array(m),x=a[h]=new Array(m),k=l[h]=new Array(d);r(u,f,b,x,k,p,e);for(var v=0,B=0,R,P;v<m;++v)if(R=b[v]){for(v>=B&&(B=v+1);!(P=x[B])&&++B<m;);R._next=P||null}}return a=new dr(a,i),a._enter=o,a._exit=l,a}function Z5(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Q5(){return new dr(this._exit||this._groups.map(A2),this._parents)}function J5(t,e,r){var i=this.enter(),n=this,s=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(n=e(n),n&&(n=n.selection())),r==null?s.remove():r(s),i&&n?i.merge(n).order():n}function tb(t){for(var e=t.selection?t.selection():t,r=this._groups,i=e._groups,n=r.length,s=i.length,a=Math.min(n,s),o=new Array(n),l=0;l<a;++l)for(var h=r[l],u=i[l],f=h.length,d=o[l]=new Array(f),p,m=0;m<f;++m)(p=h[m]||u[m])&&(d[m]=p);for(;l<n;++l)o[l]=r[l];return new dr(o,this._parents)}function eb(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var i=t[e],n=i.length-1,s=i[n],a;--n>=0;)(a=i[n])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function rb(t){t||(t=ib);function e(f,d){return f&&d?t(f.__data__,d.__data__):!f-!d}for(var r=this._groups,i=r.length,n=new Array(i),s=0;s<i;++s){for(var a=r[s],o=a.length,l=n[s]=new Array(o),h,u=0;u<o;++u)(h=a[u])&&(l[u]=h);l.sort(e)}return new dr(n,this._parents).order()}function ib(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function nb(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function sb(){return Array.from(this)}function ab(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],n=0,s=i.length;n<s;++n){var a=i[n];if(a)return a}return null}function ob(){let t=0;for(const e of this)++t;return t}function lb(){return!this.node()}function cb(t){for(var e=this._groups,r=0,i=e.length;r<i;++r)for(var n=e[r],s=0,a=n.length,o;s<a;++s)(o=n[s])&&t.call(o,o.__data__,s,n);return this}function hb(t){return function(){this.removeAttribute(t)}}function ub(t){return function(){this.removeAttributeNS(t.space,t.local)}}function fb(t,e){return function(){this.setAttribute(t,e)}}function db(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function pb(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function gb(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function yb(t,e){var r=hc(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((e==null?r.local?ub:hb:typeof e=="function"?r.local?gb:pb:r.local?db:fb)(r,e))}function L2(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function mb(t){return function(){this.style.removeProperty(t)}}function bb(t,e,r){return function(){this.style.setProperty(t,e,r)}}function _b(t,e,r){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function xb(t,e,r){return arguments.length>1?this.each((e==null?mb:typeof e=="function"?_b:bb)(t,e,r??"")):vs(this.node(),t)}function vs(t,e){return t.style.getPropertyValue(e)||L2(t).getComputedStyle(t,null).getPropertyValue(e)}function vb(t){return function(){delete this[t]}}function kb(t,e){return function(){this[t]=e}}function wb(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function Tb(t,e){return arguments.length>1?this.each((e==null?vb:typeof e=="function"?wb:kb)(t,e)):this.node()[t]}function B2(t){return t.trim().split(/^|\s+/)}function a1(t){return t.classList||new D2(t)}function D2(t){this._node=t,this._names=B2(t.getAttribute("class")||"")}D2.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function I2(t,e){for(var r=a1(t),i=-1,n=e.length;++i<n;)r.add(e[i])}function M2(t,e){for(var r=a1(t),i=-1,n=e.length;++i<n;)r.remove(e[i])}function Eb(t){return function(){I2(this,t)}}function Cb(t){return function(){M2(this,t)}}function Sb(t,e){return function(){(e.apply(this,arguments)?I2:M2)(this,t)}}function Ab(t,e){var r=B2(t+"");if(arguments.length<2){for(var i=a1(this.node()),n=-1,s=r.length;++n<s;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof e=="function"?Sb:e?Eb:Cb)(r,e))}function Lb(){this.textContent=""}function Bb(t){return function(){this.textContent=t}}function Db(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Ib(t){return arguments.length?this.each(t==null?Lb:(typeof t=="function"?Db:Bb)(t)):this.node().textContent}function Mb(){this.innerHTML=""}function Nb(t){return function(){this.innerHTML=t}}function Rb(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Ob(t){return arguments.length?this.each(t==null?Mb:(typeof t=="function"?Rb:Nb)(t)):this.node().innerHTML}function Fb(){this.nextSibling&&this.parentNode.appendChild(this)}function Pb(){return this.each(Fb)}function Vb(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Yb(){return this.each(Vb)}function zb(t){var e=typeof t=="function"?t:w2(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Ub(){return null}function Wb(t,e){var r=typeof t=="function"?t:w2(t),i=e==null?Ub:typeof e=="function"?e:s1(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Hb(){var t=this.parentNode;t&&t.removeChild(this)}function qb(){return this.each(Hb)}function Gb(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function $b(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function jb(t){return this.select(t?$b:Gb)}function Xb(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Kb(t){return function(e){t.call(this,e,this.__data__)}}function Zb(t){return t.trim().split(/^|\s+/).map(function(e){var r="",i=e.indexOf(".");return i>=0&&(r=e.slice(i+1),e=e.slice(0,i)),{type:e,name:r}})}function Qb(t){return function(){var e=this.__on;if(e){for(var r=0,i=-1,n=e.length,s;r<n;++r)s=e[r],(!t.type||s.type===t.type)&&s.name===t.name?this.removeEventListener(s.type,s.listener,s.options):e[++i]=s;++i?e.length=i:delete this.__on}}}function Jb(t,e,r){return function(){var i=this.__on,n,s=Kb(e);if(i){for(var a=0,o=i.length;a<o;++a)if((n=i[a]).type===t.type&&n.name===t.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=s,n.options=r),n.value=e;return}}this.addEventListener(t.type,s,r),n={type:t.type,name:t.name,value:e,listener:s,options:r},i?i.push(n):this.__on=[n]}}function t_(t,e,r){var i=Zb(t+""),n,s=i.length,a;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,h=o.length,u;l<h;++l)for(n=0,u=o[l];n<s;++n)if((a=i[n]).type===u.type&&a.name===u.name)return u.value}return}for(o=e?Jb:Qb,n=0;n<s;++n)this.each(o(i[n],e,r));return this}function N2(t,e,r){var i=L2(t),n=i.CustomEvent;typeof n=="function"?n=new n(e,r):(n=i.document.createEvent("Event"),r?(n.initEvent(e,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(e,!1,!1)),t.dispatchEvent(n)}function e_(t,e){return function(){return N2(this,t,e)}}function r_(t,e){return function(){return N2(this,t,e.apply(this,arguments))}}function i_(t,e){return this.each((typeof e=="function"?r_:e_)(t,e))}function*n_(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],n=0,s=i.length,a;n<s;++n)(a=i[n])&&(yield a)}var o1=[null];function dr(t,e){this._groups=t,this._parents=e}function io(){return new dr([[document.documentElement]],o1)}function s_(){return this}dr.prototype=io.prototype={constructor:dr,select:I5,selectAll:R5,selectChild:V5,selectChildren:W5,filter:H5,data:K5,enter:q5,exit:Q5,join:J5,merge:tb,selection:s_,order:eb,sort:rb,call:nb,nodes:sb,node:ab,size:ob,empty:lb,each:cb,attr:yb,style:xb,property:Tb,classed:Ab,text:Ib,html:Ob,raise:Pb,lower:Yb,append:zb,insert:Wb,remove:qb,clone:jb,datum:Xb,on:t_,dispatch:i_,[Symbol.iterator]:n_};function _t(t){return typeof t=="string"?new dr([[document.querySelector(t)]],[document.documentElement]):new dr([[t]],o1)}function l1(t){return typeof t=="string"?new dr([document.querySelectorAll(t)],[document.documentElement]):new dr([T2(t)],o1)}function no(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function uc(t,e){var r=Object.create(t.prototype);for(var i in e)r[i]=e[i];return r}function qn(){}var Sa=.7,cl=1/Sa,ps="\\s*([+-]?\\d+)\\s*",Aa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",di="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",a_=/^#([0-9a-f]{3,8})$/,o_=new RegExp(`^rgb\\(${ps},${ps},${ps}\\)$`),l_=new RegExp(`^rgb\\(${di},${di},${di}\\)$`),c_=new RegExp(`^rgba\\(${ps},${ps},${ps},${Aa}\\)$`),h_=new RegExp(`^rgba\\(${di},${di},${di},${Aa}\\)$`),u_=new RegExp(`^hsl\\(${Aa},${di},${di}\\)$`),f_=new RegExp(`^hsla\\(${Aa},${di},${di},${Aa}\\)$`),P0={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};no(qn,Dn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:V0,formatHex:V0,formatHex8:d_,formatHsl:p_,formatRgb:Y0,toString:Y0});function V0(){return this.rgb().formatHex()}function d_(){return this.rgb().formatHex8()}function p_(){return O2(this).formatHsl()}function Y0(){return this.rgb().formatRgb()}function Dn(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=a_.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?z0(e):r===3?new sr(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?wo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?wo(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=o_.exec(t))?new sr(e[1],e[2],e[3],1):(e=l_.exec(t))?new sr(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=c_.exec(t))?wo(e[1],e[2],e[3],e[4]):(e=h_.exec(t))?wo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=u_.exec(t))?H0(e[1],e[2]/100,e[3]/100,1):(e=f_.exec(t))?H0(e[1],e[2]/100,e[3]/100,e[4]):P0.hasOwnProperty(t)?z0(P0[t]):t==="transparent"?new sr(NaN,NaN,NaN,0):null}function z0(t){return new sr(t>>16&255,t>>8&255,t&255,1)}function wo(t,e,r,i){return i<=0&&(t=e=r=NaN),new sr(t,e,r,i)}function R2(t){return t instanceof qn||(t=Dn(t)),t?(t=t.rgb(),new sr(t.r,t.g,t.b,t.opacity)):new sr}function jh(t,e,r,i){return arguments.length===1?R2(t):new sr(t,e,r,i??1)}function sr(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}no(sr,jh,uc(qn,{brighter(t){return t=t==null?cl:Math.pow(cl,t),new sr(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Sa:Math.pow(Sa,t),new sr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new sr(Ln(this.r),Ln(this.g),Ln(this.b),hl(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:U0,formatHex:U0,formatHex8:g_,formatRgb:W0,toString:W0}));function U0(){return`#${An(this.r)}${An(this.g)}${An(this.b)}`}function g_(){return`#${An(this.r)}${An(this.g)}${An(this.b)}${An((isNaN(this.opacity)?1:this.opacity)*255)}`}function W0(){const t=hl(this.opacity);return`${t===1?"rgb(":"rgba("}${Ln(this.r)}, ${Ln(this.g)}, ${Ln(this.b)}${t===1?")":`, ${t})`}`}function hl(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ln(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function An(t){return t=Ln(t),(t<16?"0":"")+t.toString(16)}function H0(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Gr(t,e,r,i)}function O2(t){if(t instanceof Gr)return new Gr(t.h,t.s,t.l,t.opacity);if(t instanceof qn||(t=Dn(t)),!t)return new Gr;if(t instanceof Gr)return t;t=t.rgb();var e=t.r/255,r=t.g/255,i=t.b/255,n=Math.min(e,r,i),s=Math.max(e,r,i),a=NaN,o=s-n,l=(s+n)/2;return o?(e===s?a=(r-i)/o+(r<i)*6:r===s?a=(i-e)/o+2:a=(e-r)/o+4,o/=l<.5?s+n:2-s-n,a*=60):o=l>0&&l<1?0:a,new Gr(a,o,l,t.opacity)}function y_(t,e,r,i){return arguments.length===1?O2(t):new Gr(t,e,r,i??1)}function Gr(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}no(Gr,y_,uc(qn,{brighter(t){return t=t==null?cl:Math.pow(cl,t),new Gr(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Sa:Math.pow(Sa,t),new Gr(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*e,n=2*r-i;return new sr(ih(t>=240?t-240:t+120,n,i),ih(t,n,i),ih(t<120?t+240:t-120,n,i),this.opacity)},clamp(){return new Gr(q0(this.h),To(this.s),To(this.l),hl(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=hl(this.opacity);return`${t===1?"hsl(":"hsla("}${q0(this.h)}, ${To(this.s)*100}%, ${To(this.l)*100}%${t===1?")":`, ${t})`}`}}));function q0(t){return t=(t||0)%360,t<0?t+360:t}function To(t){return Math.max(0,Math.min(1,t||0))}function ih(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const m_=Math.PI/180,b_=180/Math.PI,ul=18,F2=.96422,P2=1,V2=.82521,Y2=4/29,gs=6/29,z2=3*gs*gs,__=gs*gs*gs;function U2(t){if(t instanceof pi)return new pi(t.l,t.a,t.b,t.opacity);if(t instanceof Oi)return W2(t);t instanceof sr||(t=R2(t));var e=oh(t.r),r=oh(t.g),i=oh(t.b),n=nh((.2225045*e+.7168786*r+.0606169*i)/P2),s,a;return e===r&&r===i?s=a=n:(s=nh((.4360747*e+.3850649*r+.1430804*i)/F2),a=nh((.0139322*e+.0971045*r+.7141733*i)/V2)),new pi(116*n-16,500*(s-n),200*(n-a),t.opacity)}function x_(t,e,r,i){return arguments.length===1?U2(t):new pi(t,e,r,i??1)}function pi(t,e,r,i){this.l=+t,this.a=+e,this.b=+r,this.opacity=+i}no(pi,x_,uc(qn,{brighter(t){return new pi(this.l+ul*(t??1),this.a,this.b,this.opacity)},darker(t){return new pi(this.l-ul*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return e=F2*sh(e),t=P2*sh(t),r=V2*sh(r),new sr(ah(3.1338561*e-1.6168667*t-.4906146*r),ah(-.9787684*e+1.9161415*t+.033454*r),ah(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}}));function nh(t){return t>__?Math.pow(t,1/3):t/z2+Y2}function sh(t){return t>gs?t*t*t:z2*(t-Y2)}function ah(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function oh(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function v_(t){if(t instanceof Oi)return new Oi(t.h,t.c,t.l,t.opacity);if(t instanceof pi||(t=U2(t)),t.a===0&&t.b===0)return new Oi(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*b_;return new Oi(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Xh(t,e,r,i){return arguments.length===1?v_(t):new Oi(t,e,r,i??1)}function Oi(t,e,r,i){this.h=+t,this.c=+e,this.l=+r,this.opacity=+i}function W2(t){if(isNaN(t.h))return new pi(t.l,0,0,t.opacity);var e=t.h*m_;return new pi(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}no(Oi,Xh,uc(qn,{brighter(t){return new Oi(this.h,this.c,this.l+ul*(t??1),this.opacity)},darker(t){return new Oi(this.h,this.c,this.l-ul*(t??1),this.opacity)},rgb(){return W2(this).rgb()}}));const fc=t=>()=>t;function H2(t,e){return function(r){return t+r*e}}function k_(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(i){return Math.pow(t+i*e,r)}}function w_(t,e){var r=e-t;return r?H2(t,r>180||r<-180?r-360*Math.round(r/360):r):fc(isNaN(t)?e:t)}function T_(t){return(t=+t)==1?ga:function(e,r){return r-e?k_(e,r,t):fc(isNaN(e)?r:e)}}function ga(t,e){var r=e-t;return r?H2(t,r):fc(isNaN(t)?e:t)}const fl=function t(e){var r=T_(e);function i(n,s){var a=r((n=jh(n)).r,(s=jh(s)).r),o=r(n.g,s.g),l=r(n.b,s.b),h=ga(n.opacity,s.opacity);return function(u){return n.r=a(u),n.g=o(u),n.b=l(u),n.opacity=h(u),n+""}}return i.gamma=t,i}(1);function E_(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,i=e.slice(),n;return function(s){for(n=0;n<r;++n)i[n]=t[n]*(1-s)+e[n]*s;return i}}function C_(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function S_(t,e){var r=e?e.length:0,i=t?Math.min(r,t.length):0,n=new Array(i),s=new Array(r),a;for(a=0;a<i;++a)n[a]=c1(t[a],e[a]);for(;a<r;++a)s[a]=e[a];return function(o){for(a=0;a<i;++a)s[a]=n[a](o);return s}}function A_(t,e){var r=new Date;return t=+t,e=+e,function(i){return r.setTime(t*(1-i)+e*i),r}}function qr(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function L_(t,e){var r={},i={},n;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(n in e)n in t?r[n]=c1(t[n],e[n]):i[n]=e[n];return function(s){for(n in r)i[n]=r[n](s);return i}}var Kh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,lh=new RegExp(Kh.source,"g");function B_(t){return function(){return t}}function D_(t){return function(e){return t(e)+""}}function q2(t,e){var r=Kh.lastIndex=lh.lastIndex=0,i,n,s,a=-1,o=[],l=[];for(t=t+"",e=e+"";(i=Kh.exec(t))&&(n=lh.exec(e));)(s=n.index)>r&&(s=e.slice(r,s),o[a]?o[a]+=s:o[++a]=s),(i=i[0])===(n=n[0])?o[a]?o[a]+=n:o[++a]=n:(o[++a]=null,l.push({i:a,x:qr(i,n)})),r=lh.lastIndex;return r<e.length&&(s=e.slice(r),o[a]?o[a]+=s:o[++a]=s),o.length<2?l[0]?D_(l[0].x):B_(e):(e=l.length,function(h){for(var u=0,f;u<e;++u)o[(f=l[u]).i]=f.x(h);return o.join("")})}function c1(t,e){var r=typeof e,i;return e==null||r==="boolean"?fc(e):(r==="number"?qr:r==="string"?(i=Dn(e))?(e=i,fl):q2:e instanceof Dn?fl:e instanceof Date?A_:C_(e)?E_:Array.isArray(e)?S_:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?L_:qr)(t,e)}function I_(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}var G0=180/Math.PI,Zh={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function G2(t,e,r,i,n,s){var a,o,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*r+e*i)&&(r-=t*l,i-=e*l),(o=Math.sqrt(r*r+i*i))&&(r/=o,i/=o,l/=o),t*i<e*r&&(t=-t,e=-e,l=-l,a=-a),{translateX:n,translateY:s,rotate:Math.atan2(e,t)*G0,skewX:Math.atan(l)*G0,scaleX:a,scaleY:o}}var Eo;function M_(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Zh:G2(e.a,e.b,e.c,e.d,e.e,e.f)}function N_(t){return t==null||(Eo||(Eo=document.createElementNS("http://www.w3.org/2000/svg","g")),Eo.setAttribute("transform",t),!(t=Eo.transform.baseVal.consolidate()))?Zh:(t=t.matrix,G2(t.a,t.b,t.c,t.d,t.e,t.f))}function $2(t,e,r,i){function n(h){return h.length?h.pop()+" ":""}function s(h,u,f,d,p,m){if(h!==f||u!==d){var b=p.push("translate(",null,e,null,r);m.push({i:b-4,x:qr(h,f)},{i:b-2,x:qr(u,d)})}else(f||d)&&p.push("translate("+f+e+d+r)}function a(h,u,f,d){h!==u?(h-u>180?u+=360:u-h>180&&(h+=360),d.push({i:f.push(n(f)+"rotate(",null,i)-2,x:qr(h,u)})):u&&f.push(n(f)+"rotate("+u+i)}function o(h,u,f,d){h!==u?d.push({i:f.push(n(f)+"skewX(",null,i)-2,x:qr(h,u)}):u&&f.push(n(f)+"skewX("+u+i)}function l(h,u,f,d,p,m){if(h!==f||u!==d){var b=p.push(n(p)+"scale(",null,",",null,")");m.push({i:b-4,x:qr(h,f)},{i:b-2,x:qr(u,d)})}else(f!==1||d!==1)&&p.push(n(p)+"scale("+f+","+d+")")}return function(h,u){var f=[],d=[];return h=t(h),u=t(u),s(h.translateX,h.translateY,u.translateX,u.translateY,f,d),a(h.rotate,u.rotate,f,d),o(h.skewX,u.skewX,f,d),l(h.scaleX,h.scaleY,u.scaleX,u.scaleY,f,d),h=u=null,function(p){for(var m=-1,b=d.length,x;++m<b;)f[(x=d[m]).i]=x.x(p);return f.join("")}}}var R_=$2(M_,"px, ","px)","deg)"),O_=$2(N_,", ",")",")");function F_(t){return function(e,r){var i=t((e=Xh(e)).h,(r=Xh(r)).h),n=ga(e.c,r.c),s=ga(e.l,r.l),a=ga(e.opacity,r.opacity);return function(o){return e.h=i(o),e.c=n(o),e.l=s(o),e.opacity=a(o),e+""}}}const P_=F_(w_);var ks=0,la=0,Zs=0,j2=1e3,dl,ca,pl=0,In=0,dc=0,La=typeof performance=="object"&&performance.now?performance:Date,X2=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function h1(){return In||(X2(V_),In=La.now()+dc)}function V_(){In=0}function gl(){this._call=this._time=this._next=null}gl.prototype=K2.prototype={constructor:gl,restart:function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?h1():+r)+(e==null?0:+e),!this._next&&ca!==this&&(ca?ca._next=this:dl=this,ca=this),this._call=t,this._time=r,Qh()},stop:function(){this._call&&(this._call=null,this._time=1/0,Qh())}};function K2(t,e,r){var i=new gl;return i.restart(t,e,r),i}function Y_(){h1(),++ks;for(var t=dl,e;t;)(e=In-t._time)>=0&&t._call.call(void 0,e),t=t._next;--ks}function $0(){In=(pl=La.now())+dc,ks=la=0;try{Y_()}finally{ks=0,U_(),In=0}}function z_(){var t=La.now(),e=t-pl;e>j2&&(dc-=e,pl=t)}function U_(){for(var t,e=dl,r,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:dl=r);ca=t,Qh(i)}function Qh(t){if(!ks){la&&(la=clearTimeout(la));var e=t-In;e>24?(t<1/0&&(la=setTimeout($0,t-La.now()-dc)),Zs&&(Zs=clearInterval(Zs))):(Zs||(pl=La.now(),Zs=setInterval(z_,j2)),ks=1,X2($0))}}function j0(t,e,r){var i=new gl;return e=e==null?0:+e,i.restart(n=>{i.stop(),t(n+e)},e,r),i}var W_=k2("start","end","cancel","interrupt"),H_=[],Z2=0,X0=1,Jh=2,Uo=3,K0=4,tu=5,Wo=6;function pc(t,e,r,i,n,s){var a=t.__transition;if(!a)t.__transition={};else if(r in a)return;q_(t,r,{name:e,index:i,group:n,on:W_,tween:H_,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Z2})}function u1(t,e){var r=ri(t,e);if(r.state>Z2)throw new Error("too late; already scheduled");return r}function _i(t,e){var r=ri(t,e);if(r.state>Uo)throw new Error("too late; already running");return r}function ri(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function q_(t,e,r){var i=t.__transition,n;i[e]=r,r.timer=K2(s,0,r.time);function s(h){r.state=X0,r.timer.restart(a,r.delay,r.time),r.delay<=h&&a(h-r.delay)}function a(h){var u,f,d,p;if(r.state!==X0)return l();for(u in i)if(p=i[u],p.name===r.name){if(p.state===Uo)return j0(a);p.state===K0?(p.state=Wo,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete i[u]):+u<e&&(p.state=Wo,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete i[u])}if(j0(function(){r.state===Uo&&(r.state=K0,r.timer.restart(o,r.delay,r.time),o(h))}),r.state=Jh,r.on.call("start",t,t.__data__,r.index,r.group),r.state===Jh){for(r.state=Uo,n=new Array(d=r.tween.length),u=0,f=-1;u<d;++u)(p=r.tween[u].value.call(t,t.__data__,r.index,r.group))&&(n[++f]=p);n.length=f+1}}function o(h){for(var u=h<r.duration?r.ease.call(null,h/r.duration):(r.timer.restart(l),r.state=tu,1),f=-1,d=n.length;++f<d;)n[f].call(t,u);r.state===tu&&(r.on.call("end",t,t.__data__,r.index,r.group),l())}function l(){r.state=Wo,r.timer.stop(),delete i[e];for(var h in i)return;delete t.__transition}}function G_(t,e){var r=t.__transition,i,n,s=!0,a;if(r){e=e==null?null:e+"";for(a in r){if((i=r[a]).name!==e){s=!1;continue}n=i.state>Jh&&i.state<tu,i.state=Wo,i.timer.stop(),i.on.call(n?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete r[a]}s&&delete t.__transition}}function $_(t){return this.each(function(){G_(this,t)})}function j_(t,e){var r,i;return function(){var n=_i(this,t),s=n.tween;if(s!==r){i=r=s;for(var a=0,o=i.length;a<o;++a)if(i[a].name===e){i=i.slice(),i.splice(a,1);break}}n.tween=i}}function X_(t,e,r){var i,n;if(typeof r!="function")throw new Error;return function(){var s=_i(this,t),a=s.tween;if(a!==i){n=(i=a).slice();for(var o={name:e,value:r},l=0,h=n.length;l<h;++l)if(n[l].name===e){n[l]=o;break}l===h&&n.push(o)}s.tween=n}}function K_(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i=ri(this.node(),r).tween,n=0,s=i.length,a;n<s;++n)if((a=i[n]).name===t)return a.value;return null}return this.each((e==null?j_:X_)(r,t,e))}function f1(t,e,r){var i=t._id;return t.each(function(){var n=_i(this,i);(n.value||(n.value={}))[e]=r.apply(this,arguments)}),function(n){return ri(n,i).value[e]}}function Q2(t,e){var r;return(typeof e=="number"?qr:e instanceof Dn?fl:(r=Dn(e))?(e=r,fl):q2)(t,e)}function Z_(t){return function(){this.removeAttribute(t)}}function Q_(t){return function(){this.removeAttributeNS(t.space,t.local)}}function J_(t,e,r){var i,n=r+"",s;return function(){var a=this.getAttribute(t);return a===n?null:a===i?s:s=e(i=a,r)}}function tx(t,e,r){var i,n=r+"",s;return function(){var a=this.getAttributeNS(t.space,t.local);return a===n?null:a===i?s:s=e(i=a,r)}}function ex(t,e,r){var i,n,s;return function(){var a,o=r(this),l;return o==null?void this.removeAttribute(t):(a=this.getAttribute(t),l=o+"",a===l?null:a===i&&l===n?s:(n=l,s=e(i=a,o)))}}function rx(t,e,r){var i,n,s;return function(){var a,o=r(this),l;return o==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),l=o+"",a===l?null:a===i&&l===n?s:(n=l,s=e(i=a,o)))}}function ix(t,e){var r=hc(t),i=r==="transform"?O_:Q2;return this.attrTween(t,typeof e=="function"?(r.local?rx:ex)(r,i,f1(this,"attr."+t,e)):e==null?(r.local?Q_:Z_)(r):(r.local?tx:J_)(r,i,e))}function nx(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function sx(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function ax(t,e){var r,i;function n(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&sx(t,s)),r}return n._value=e,n}function ox(t,e){var r,i;function n(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&nx(t,s)),r}return n._value=e,n}function lx(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var i=hc(t);return this.tween(r,(i.local?ax:ox)(i,e))}function cx(t,e){return function(){u1(this,t).delay=+e.apply(this,arguments)}}function hx(t,e){return e=+e,function(){u1(this,t).delay=e}}function ux(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?cx:hx)(e,t)):ri(this.node(),e).delay}function fx(t,e){return function(){_i(this,t).duration=+e.apply(this,arguments)}}function dx(t,e){return e=+e,function(){_i(this,t).duration=e}}function px(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?fx:dx)(e,t)):ri(this.node(),e).duration}function gx(t,e){if(typeof e!="function")throw new Error;return function(){_i(this,t).ease=e}}function yx(t){var e=this._id;return arguments.length?this.each(gx(e,t)):ri(this.node(),e).ease}function mx(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;_i(this,t).ease=r}}function bx(t){if(typeof t!="function")throw new Error;return this.each(mx(this._id,t))}function _x(t){typeof t!="function"&&(t=C2(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var s=e[n],a=s.length,o=i[n]=[],l,h=0;h<a;++h)(l=s[h])&&t.call(l,l.__data__,h,s)&&o.push(l);return new qi(i,this._parents,this._name,this._id)}function xx(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,i=e.length,n=r.length,s=Math.min(i,n),a=new Array(i),o=0;o<s;++o)for(var l=e[o],h=r[o],u=l.length,f=a[o]=new Array(u),d,p=0;p<u;++p)(d=l[p]||h[p])&&(f[p]=d);for(;o<i;++o)a[o]=e[o];return new qi(a,this._parents,this._name,this._id)}function vx(t){return(t+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function kx(t,e,r){var i,n,s=vx(e)?u1:_i;return function(){var a=s(this,t),o=a.on;o!==i&&(n=(i=o).copy()).on(e,r),a.on=n}}function wx(t,e){var r=this._id;return arguments.length<2?ri(this.node(),r).on.on(t):this.each(kx(r,t,e))}function Tx(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function Ex(){return this.on("end.remove",Tx(this._id))}function Cx(t){var e=this._name,r=this._id;typeof t!="function"&&(t=s1(t));for(var i=this._groups,n=i.length,s=new Array(n),a=0;a<n;++a)for(var o=i[a],l=o.length,h=s[a]=new Array(l),u,f,d=0;d<l;++d)(u=o[d])&&(f=t.call(u,u.__data__,d,o))&&("__data__"in u&&(f.__data__=u.__data__),h[d]=f,pc(h[d],e,r,d,h,ri(u,r)));return new qi(s,this._parents,e,r)}function Sx(t){var e=this._name,r=this._id;typeof t!="function"&&(t=E2(t));for(var i=this._groups,n=i.length,s=[],a=[],o=0;o<n;++o)for(var l=i[o],h=l.length,u,f=0;f<h;++f)if(u=l[f]){for(var d=t.call(u,u.__data__,f,l),p,m=ri(u,r),b=0,x=d.length;b<x;++b)(p=d[b])&&pc(p,e,r,b,d,m);s.push(d),a.push(u)}return new qi(s,a,e,r)}var Ax=io.prototype.constructor;function Lx(){return new Ax(this._groups,this._parents)}function Bx(t,e){var r,i,n;return function(){var s=vs(this,t),a=(this.style.removeProperty(t),vs(this,t));return s===a?null:s===r&&a===i?n:n=e(r=s,i=a)}}function J2(t){return function(){this.style.removeProperty(t)}}function Dx(t,e,r){var i,n=r+"",s;return function(){var a=vs(this,t);return a===n?null:a===i?s:s=e(i=a,r)}}function Ix(t,e,r){var i,n,s;return function(){var a=vs(this,t),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(t),vs(this,t))),a===l?null:a===i&&l===n?s:(n=l,s=e(i=a,o))}}function Mx(t,e){var r,i,n,s="style."+e,a="end."+s,o;return function(){var l=_i(this,t),h=l.on,u=l.value[s]==null?o||(o=J2(e)):void 0;(h!==r||n!==u)&&(i=(r=h).copy()).on(a,n=u),l.on=i}}function Nx(t,e,r){var i=(t+="")=="transform"?R_:Q2;return e==null?this.styleTween(t,Bx(t,i)).on("end.style."+t,J2(t)):typeof e=="function"?this.styleTween(t,Ix(t,i,f1(this,"style."+t,e))).each(Mx(this._id,t)):this.styleTween(t,Dx(t,i,e),r).on("end.style."+t,null)}function Rx(t,e,r){return function(i){this.style.setProperty(t,e.call(this,i),r)}}function Ox(t,e,r){var i,n;function s(){var a=e.apply(this,arguments);return a!==n&&(i=(n=a)&&Rx(t,a,r)),i}return s._value=e,s}function Fx(t,e,r){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!="function")throw new Error;return this.tween(i,Ox(t,e,r??""))}function Px(t){return function(){this.textContent=t}}function Vx(t){return function(){var e=t(this);this.textContent=e??""}}function Yx(t){return this.tween("text",typeof t=="function"?Vx(f1(this,"text",t)):Px(t==null?"":t+""))}function zx(t){return function(e){this.textContent=t.call(this,e)}}function Ux(t){var e,r;function i(){var n=t.apply(this,arguments);return n!==r&&(e=(r=n)&&zx(n)),e}return i._value=t,i}function Wx(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,Ux(t))}function Hx(){for(var t=this._name,e=this._id,r=tp(),i=this._groups,n=i.length,s=0;s<n;++s)for(var a=i[s],o=a.length,l,h=0;h<o;++h)if(l=a[h]){var u=ri(l,e);pc(l,t,r,h,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new qi(i,this._parents,t,r)}function qx(){var t,e,r=this,i=r._id,n=r.size();return new Promise(function(s,a){var o={value:a},l={value:function(){--n===0&&s()}};r.each(function(){var h=_i(this,i),u=h.on;u!==t&&(e=(t=u).copy(),e._.cancel.push(o),e._.interrupt.push(o),e._.end.push(l)),h.on=e}),n===0&&s()})}var Gx=0;function qi(t,e,r,i){this._groups=t,this._parents=e,this._name=r,this._id=i}function tp(){return++Gx}var Ci=io.prototype;qi.prototype={constructor:qi,select:Cx,selectAll:Sx,selectChild:Ci.selectChild,selectChildren:Ci.selectChildren,filter:_x,merge:xx,selection:Lx,transition:Hx,call:Ci.call,nodes:Ci.nodes,node:Ci.node,size:Ci.size,empty:Ci.empty,each:Ci.each,on:wx,attr:ix,attrTween:lx,style:Nx,styleTween:Fx,text:Yx,textTween:Wx,remove:Ex,tween:K_,delay:ux,duration:px,ease:yx,easeVarying:bx,end:qx,[Symbol.iterator]:Ci[Symbol.iterator]};function $x(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var jx={time:null,delay:0,duration:250,ease:$x};function Xx(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function Kx(t){var e,r;t instanceof qi?(e=t._id,t=t._name):(e=tp(),(r=jx).time=h1(),t=t==null?null:t+"");for(var i=this._groups,n=i.length,s=0;s<n;++s)for(var a=i[s],o=a.length,l,h=0;h<o;++h)(l=a[h])&&pc(l,t,e,h,a,r||Xx(l,e));return new qi(i,this._parents,t,e)}io.prototype.interrupt=$_;io.prototype.transition=Kx;const eu=Math.PI,ru=2*eu,Tn=1e-6,Zx=ru-Tn;function ep(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}function Qx(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return ep;const r=10**e;return function(i){this._+=i[0];for(let n=1,s=i.length;n<s;++n)this._+=Math.round(arguments[n]*r)/r+i[n]}}class Jx{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?ep:Qx(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,i,n){this._append`Q${+e},${+r},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(e,r,i,n,s,a){this._append`C${+e},${+r},${+i},${+n},${this._x1=+s},${this._y1=+a}`}arcTo(e,r,i,n,s){if(e=+e,r=+r,i=+i,n=+n,s=+s,s<0)throw new Error(`negative radius: ${s}`);let a=this._x1,o=this._y1,l=i-e,h=n-r,u=a-e,f=o-r,d=u*u+f*f;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(d>Tn)if(!(Math.abs(f*l-h*u)>Tn)||!s)this._append`L${this._x1=e},${this._y1=r}`;else{let p=i-a,m=n-o,b=l*l+h*h,x=p*p+m*m,k=Math.sqrt(b),v=Math.sqrt(d),B=s*Math.tan((eu-Math.acos((b+d-x)/(2*k*v)))/2),R=B/v,P=B/k;Math.abs(R-1)>Tn&&this._append`L${e+R*u},${r+R*f}`,this._append`A${s},${s},0,0,${+(f*p>u*m)},${this._x1=e+P*l},${this._y1=r+P*h}`}}arc(e,r,i,n,s,a){if(e=+e,r=+r,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let o=i*Math.cos(n),l=i*Math.sin(n),h=e+o,u=r+l,f=1^a,d=a?n-s:s-n;this._x1===null?this._append`M${h},${u}`:(Math.abs(this._x1-h)>Tn||Math.abs(this._y1-u)>Tn)&&this._append`L${h},${u}`,i&&(d<0&&(d=d%ru+ru),d>Zx?this._append`A${i},${i},0,1,${f},${e-o},${r-l}A${i},${i},0,1,${f},${this._x1=h},${this._y1=u}`:d>Tn&&this._append`A${i},${i},0,${+(d>=eu)},${f},${this._x1=e+i*Math.cos(s)},${this._y1=r+i*Math.sin(s)}`)}rect(e,r,i,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}}function t6(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function e6(t,e){return fetch(t,e).then(t6)}function r6(t){return(e,r)=>e6(e,r).then(i=>new DOMParser().parseFromString(i,t))}var i6=r6("image/svg+xml");function n6(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function yl(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,i=t.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+t.slice(r+1)]}function ws(t){return t=yl(Math.abs(t)),t?t[1]:NaN}function s6(t,e){return function(r,i){for(var n=r.length,s=[],a=0,o=t[0],l=0;n>0&&o>0&&(l+o+1>i&&(o=Math.max(1,i-l)),s.push(r.substring(n-=o,n+o)),!((l+=o+1)>i));)o=t[a=(a+1)%t.length];return s.reverse().join(e)}}function a6(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var o6=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ml(t){if(!(e=o6.exec(t)))throw new Error("invalid format: "+t);var e;return new d1({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}ml.prototype=d1.prototype;function d1(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}d1.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function l6(t){t:for(var e=t.length,r=1,i=-1,n;r<e;++r)switch(t[r]){case".":i=n=r;break;case"0":i===0&&(i=r),n=r;break;default:if(!+t[r])break t;i>0&&(i=0);break}return i>0?t.slice(0,i)+t.slice(n+1):t}var rp;function c6(t,e){var r=yl(t,e);if(!r)return t+"";var i=r[0],n=r[1],s=n-(rp=Math.max(-8,Math.min(8,Math.floor(n/3)))*3)+1,a=i.length;return s===a?i:s>a?i+new Array(s-a+1).join("0"):s>0?i.slice(0,s)+"."+i.slice(s):"0."+new Array(1-s).join("0")+yl(t,Math.max(0,e+s-1))[0]}function Z0(t,e){var r=yl(t,e);if(!r)return t+"";var i=r[0],n=r[1];return n<0?"0."+new Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+new Array(n-i.length+2).join("0")}const Q0={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:n6,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Z0(t*100,e),r:Z0,s:c6,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function J0(t){return t}var tf=Array.prototype.map,ef=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function h6(t){var e=t.grouping===void 0||t.thousands===void 0?J0:s6(tf.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",i=t.currency===void 0?"":t.currency[1]+"",n=t.decimal===void 0?".":t.decimal+"",s=t.numerals===void 0?J0:a6(tf.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",o=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function h(f){f=ml(f);var d=f.fill,p=f.align,m=f.sign,b=f.symbol,x=f.zero,k=f.width,v=f.comma,B=f.precision,R=f.trim,P=f.type;P==="n"?(v=!0,P="g"):Q0[P]||(B===void 0&&(B=12),R=!0,P="g"),(x||d==="0"&&p==="=")&&(x=!0,d="0",p="=");var V=b==="$"?r:b==="#"&&/[boxX]/.test(P)?"0"+P.toLowerCase():"",O=b==="$"?i:/[%p]/.test(P)?a:"",F=Q0[P],C=/[defgprs%]/.test(P);B=B===void 0?6:/[gprs]/.test(P)?Math.max(1,Math.min(21,B)):Math.max(0,Math.min(20,B));function S(E){var _=V,w=O,g,D,y;if(P==="c")w=F(E)+w,E="";else{E=+E;var N=E<0||1/E<0;if(E=isNaN(E)?l:F(Math.abs(E),B),R&&(E=l6(E)),N&&+E==0&&m!=="+"&&(N=!1),_=(N?m==="("?m:o:m==="-"||m==="("?"":m)+_,w=(P==="s"?ef[8+rp/3]:"")+w+(N&&m==="("?")":""),C){for(g=-1,D=E.length;++g<D;)if(y=E.charCodeAt(g),48>y||y>57){w=(y===46?n+E.slice(g+1):E.slice(g))+w,E=E.slice(0,g);break}}}v&&!x&&(E=e(E,1/0));var nt=_.length+E.length+w.length,Y=nt<k?new Array(k-nt+1).join(d):"";switch(v&&x&&(E=e(Y+E,Y.length?k-w.length:1/0),Y=""),p){case"<":E=_+E+w+Y;break;case"=":E=_+Y+E+w;break;case"^":E=Y.slice(0,nt=Y.length>>1)+_+E+w+Y.slice(nt);break;default:E=Y+_+E+w;break}return s(E)}return S.toString=function(){return f+""},S}function u(f,d){var p=h((f=ml(f),f.type="f",f)),m=Math.max(-8,Math.min(8,Math.floor(ws(d)/3)))*3,b=Math.pow(10,-m),x=ef[8+m/3];return function(k){return p(b*k)+x}}return{format:h,formatPrefix:u}}var Co,ip,np;u6({thousands:",",grouping:[3],currency:["$",""]});function u6(t){return Co=h6(t),ip=Co.format,np=Co.formatPrefix,Co}function f6(t){return Math.max(0,-ws(Math.abs(t)))}function d6(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ws(e)/3)))*3-ws(Math.abs(t)))}function p6(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,ws(e)-ws(t))+1}function p1(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const rf=Symbol("implicit");function sp(){var t=new M0,e=[],r=[],i=rf;function n(s){let a=t.get(s);if(a===void 0){if(i!==rf)return i;t.set(s,a=e.push(s)-1)}return r[a%r.length]}return n.domain=function(s){if(!arguments.length)return e.slice();e=[],t=new M0;for(const a of s)t.has(a)||t.set(a,e.push(a)-1);return n},n.range=function(s){return arguments.length?(r=Array.from(s),n):r.slice()},n.unknown=function(s){return arguments.length?(i=s,n):i},n.copy=function(){return sp(e,r).unknown(i)},p1.apply(n,arguments),n}function g6(t){return function(){return t}}function y6(t){return+t}var nf=[0,1];function as(t){return t}function iu(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:g6(isNaN(e)?NaN:.5)}function m6(t,e){var r;return t>e&&(r=t,t=e,e=r),function(i){return Math.max(t,Math.min(e,i))}}function b6(t,e,r){var i=t[0],n=t[1],s=e[0],a=e[1];return n<i?(i=iu(n,i),s=r(a,s)):(i=iu(i,n),s=r(s,a)),function(o){return s(i(o))}}function _6(t,e,r){var i=Math.min(t.length,e.length)-1,n=new Array(i),s=new Array(i),a=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<i;)n[a]=iu(t[a],t[a+1]),s[a]=r(e[a],e[a+1]);return function(o){var l=l5(t,o,1,i)-1;return s[l](n[l](o))}}function ap(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function x6(){var t=nf,e=nf,r=c1,i,n,s,a=as,o,l,h;function u(){var d=Math.min(t.length,e.length);return a!==as&&(a=m6(t[0],t[d-1])),o=d>2?_6:b6,l=h=null,f}function f(d){return d==null||isNaN(d=+d)?s:(l||(l=o(t.map(i),e,r)))(i(a(d)))}return f.invert=function(d){return a(n((h||(h=o(e,t.map(i),qr)))(d)))},f.domain=function(d){return arguments.length?(t=Array.from(d,y6),u()):t.slice()},f.range=function(d){return arguments.length?(e=Array.from(d),u()):e.slice()},f.rangeRound=function(d){return e=Array.from(d),r=I_,u()},f.clamp=function(d){return arguments.length?(a=d?!0:as,u()):a!==as},f.interpolate=function(d){return arguments.length?(r=d,u()):r},f.unknown=function(d){return arguments.length?(s=d,f):s},function(d,p){return i=d,n=p,u()}}function op(){return x6()(as,as)}function v6(t,e,r,i){var n=qh(t,e,r),s;switch(i=ml(i??",f"),i.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return i.precision==null&&!isNaN(s=d6(n,a))&&(i.precision=s),np(i,a)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(s=p6(n,Math.max(Math.abs(t),Math.abs(e))))&&(i.precision=s-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(s=f6(n))&&(i.precision=s-(i.type==="%")*2);break}}return ip(i)}function k6(t){var e=t.domain;return t.ticks=function(r){var i=e();return g5(i[0],i[i.length-1],r??10)},t.tickFormat=function(r,i){var n=e();return v6(n[0],n[n.length-1],r??10,i)},t.nice=function(r){r==null&&(r=10);var i=e(),n=0,s=i.length-1,a=i[n],o=i[s],l,h,u=10;for(o<a&&(h=a,a=o,o=h,h=n,n=s,s=h);u-- >0;){if(h=Hh(a,o,r),h===l)return i[n]=a,i[s]=o,e(i);if(h>0)a=Math.floor(a/h)*h,o=Math.ceil(o/h)*h;else if(h<0)a=Math.ceil(a*h)/h,o=Math.floor(o*h)/h;else break;l=h}return t},t}function lp(){var t=op();return t.copy=function(){return ap(t,lp())},p1.apply(t,arguments),k6(t)}function w6(t,e){t=t.slice();var r=0,i=t.length-1,n=t[r],s=t[i],a;return s<n&&(a=r,r=i,i=a,a=n,n=s,s=a),t[r]=e.floor(n),t[i]=e.ceil(s),t}const ch=new Date,hh=new Date;function He(t,e,r,i){function n(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return n.floor=s=>(t(s=new Date(+s)),s),n.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),n.round=s=>{const a=n(s),o=n.ceil(s);return s-a<o-s?a:o},n.offset=(s,a)=>(e(s=new Date(+s),a==null?1:Math.floor(a)),s),n.range=(s,a,o)=>{const l=[];if(s=n.ceil(s),o=o==null?1:Math.floor(o),!(s<a)||!(o>0))return l;let h;do l.push(h=new Date(+s)),e(s,o),t(s);while(h<s&&s<a);return l},n.filter=s=>He(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,o)=>{if(a>=a)if(o<0)for(;++o<=0;)for(;e(a,-1),!s(a););else for(;--o>=0;)for(;e(a,1),!s(a););}),r&&(n.count=(s,a)=>(ch.setTime(+s),hh.setTime(+a),t(ch),t(hh),Math.floor(r(ch,hh))),n.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?n.filter(i?a=>i(a)%s===0:a=>n.count(0,a)%s===0):n)),n}const bl=He(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);bl.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?He(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):bl);bl.range;const Fi=1e3,Vr=Fi*60,Pi=Vr*60,Gi=Pi*24,g1=Gi*7,sf=Gi*30,uh=Gi*365,os=He(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*Fi)},(t,e)=>(e-t)/Fi,t=>t.getUTCSeconds());os.range;const Ba=He(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Fi)},(t,e)=>{t.setTime(+t+e*Vr)},(t,e)=>(e-t)/Vr,t=>t.getMinutes());Ba.range;const T6=He(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*Vr)},(t,e)=>(e-t)/Vr,t=>t.getUTCMinutes());T6.range;const Da=He(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Fi-t.getMinutes()*Vr)},(t,e)=>{t.setTime(+t+e*Pi)},(t,e)=>(e-t)/Pi,t=>t.getHours());Da.range;const E6=He(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Pi)},(t,e)=>(e-t)/Pi,t=>t.getUTCHours());E6.range;const Mn=He(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Vr)/Gi,t=>t.getDate()-1);Mn.range;const y1=He(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Gi,t=>t.getUTCDate()-1);y1.range;const C6=He(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Gi,t=>Math.floor(t/Gi));C6.range;function Gn(t){return He(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*Vr)/g1)}const Ts=Gn(0),_l=Gn(1),S6=Gn(2),A6=Gn(3),Es=Gn(4),L6=Gn(5),B6=Gn(6);Ts.range;_l.range;S6.range;A6.range;Es.range;L6.range;B6.range;function $n(t){return He(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/g1)}const cp=$n(0),xl=$n(1),D6=$n(2),I6=$n(3),Cs=$n(4),M6=$n(5),N6=$n(6);cp.range;xl.range;D6.range;I6.range;Cs.range;M6.range;N6.range;const Ia=He(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Ia.range;const R6=He(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());R6.range;const $i=He(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());$i.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:He(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)});$i.range;const Nn=He(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Nn.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:He(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)});Nn.range;function O6(t,e,r,i,n,s){const a=[[os,1,Fi],[os,5,5*Fi],[os,15,15*Fi],[os,30,30*Fi],[s,1,Vr],[s,5,5*Vr],[s,15,15*Vr],[s,30,30*Vr],[n,1,Pi],[n,3,3*Pi],[n,6,6*Pi],[n,12,12*Pi],[i,1,Gi],[i,2,2*Gi],[r,1,g1],[e,1,sf],[e,3,3*sf],[t,1,uh]];function o(h,u,f){const d=u<h;d&&([h,u]=[u,h]);const p=f&&typeof f.range=="function"?f:l(h,u,f),m=p?p.range(h,+u+1):[];return d?m.reverse():m}function l(h,u,f){const d=Math.abs(u-h)/f,p=n1(([,,x])=>x).right(a,d);if(p===a.length)return t.every(qh(h/uh,u/uh,f));if(p===0)return bl.every(Math.max(qh(h,u,f),1));const[m,b]=a[d/a[p-1][2]<a[p][2]/d?p-1:p];return m.every(b)}return[o,l]}const[F6,P6]=O6($i,Ia,Ts,Mn,Da,Ba);function fh(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function dh(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Qs(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function V6(t){var e=t.dateTime,r=t.date,i=t.time,n=t.periods,s=t.days,a=t.shortDays,o=t.months,l=t.shortMonths,h=Js(n),u=ta(n),f=Js(s),d=ta(s),p=Js(a),m=ta(a),b=Js(o),x=ta(o),k=Js(l),v=ta(l),B={a:N,A:nt,b:Y,B:Z,c:null,d:uf,e:uf,f:lv,g:bv,G:xv,H:sv,I:av,j:ov,L:hp,m:cv,M:hv,p:J,q:X,Q:pf,s:gf,S:uv,u:fv,U:dv,V:pv,w:gv,W:yv,x:null,X:null,y:mv,Y:_v,Z:vv,"%":df},R={a:tt,A:ot,b:at,B:U,c:null,d:ff,e:ff,f:Ev,g:Rv,G:Fv,H:kv,I:wv,j:Tv,L:fp,m:Cv,M:Sv,p:Tt,q:$,Q:pf,s:gf,S:Av,u:Lv,U:Bv,V:Dv,w:Iv,W:Mv,x:null,X:null,y:Nv,Y:Ov,Z:Pv,"%":df},P={a:S,A:E,b:_,B:w,c:g,d:cf,e:cf,f:ev,g:lf,G:of,H:hf,I:hf,j:Z6,L:tv,m:K6,M:Q6,p:C,q:X6,Q:iv,s:nv,S:J6,u:H6,U:q6,V:G6,w:W6,W:$6,x:D,X:y,y:lf,Y:of,Z:j6,"%":rv};B.x=V(r,B),B.X=V(i,B),B.c=V(e,B),R.x=V(r,R),R.X=V(i,R),R.c=V(e,R);function V(j,W){return function(z){var A=[],M=-1,q=0,L=j.length,st,T,Dt;for(z instanceof Date||(z=new Date(+z));++M<L;)j.charCodeAt(M)===37&&(A.push(j.slice(q,M)),(T=af[st=j.charAt(++M)])!=null?st=j.charAt(++M):T=st==="e"?" ":"0",(Dt=W[st])&&(st=Dt(z,T)),A.push(st),q=M+1);return A.push(j.slice(q,M)),A.join("")}}function O(j,W){return function(z){var A=Qs(1900,void 0,1),M=F(A,j,z+="",0),q,L;if(M!=z.length)return null;if("Q"in A)return new Date(A.Q);if("s"in A)return new Date(A.s*1e3+("L"in A?A.L:0));if(W&&!("Z"in A)&&(A.Z=0),"p"in A&&(A.H=A.H%12+A.p*12),A.m===void 0&&(A.m="q"in A?A.q:0),"V"in A){if(A.V<1||A.V>53)return null;"w"in A||(A.w=1),"Z"in A?(q=dh(Qs(A.y,0,1)),L=q.getUTCDay(),q=L>4||L===0?xl.ceil(q):xl(q),q=y1.offset(q,(A.V-1)*7),A.y=q.getUTCFullYear(),A.m=q.getUTCMonth(),A.d=q.getUTCDate()+(A.w+6)%7):(q=fh(Qs(A.y,0,1)),L=q.getDay(),q=L>4||L===0?_l.ceil(q):_l(q),q=Mn.offset(q,(A.V-1)*7),A.y=q.getFullYear(),A.m=q.getMonth(),A.d=q.getDate()+(A.w+6)%7)}else("W"in A||"U"in A)&&("w"in A||(A.w="u"in A?A.u%7:"W"in A?1:0),L="Z"in A?dh(Qs(A.y,0,1)).getUTCDay():fh(Qs(A.y,0,1)).getDay(),A.m=0,A.d="W"in A?(A.w+6)%7+A.W*7-(L+5)%7:A.w+A.U*7-(L+6)%7);return"Z"in A?(A.H+=A.Z/100|0,A.M+=A.Z%100,dh(A)):fh(A)}}function F(j,W,z,A){for(var M=0,q=W.length,L=z.length,st,T;M<q;){if(A>=L)return-1;if(st=W.charCodeAt(M++),st===37){if(st=W.charAt(M++),T=P[st in af?W.charAt(M++):st],!T||(A=T(j,z,A))<0)return-1}else if(st!=z.charCodeAt(A++))return-1}return A}function C(j,W,z){var A=h.exec(W.slice(z));return A?(j.p=u.get(A[0].toLowerCase()),z+A[0].length):-1}function S(j,W,z){var A=p.exec(W.slice(z));return A?(j.w=m.get(A[0].toLowerCase()),z+A[0].length):-1}function E(j,W,z){var A=f.exec(W.slice(z));return A?(j.w=d.get(A[0].toLowerCase()),z+A[0].length):-1}function _(j,W,z){var A=k.exec(W.slice(z));return A?(j.m=v.get(A[0].toLowerCase()),z+A[0].length):-1}function w(j,W,z){var A=b.exec(W.slice(z));return A?(j.m=x.get(A[0].toLowerCase()),z+A[0].length):-1}function g(j,W,z){return F(j,e,W,z)}function D(j,W,z){return F(j,r,W,z)}function y(j,W,z){return F(j,i,W,z)}function N(j){return a[j.getDay()]}function nt(j){return s[j.getDay()]}function Y(j){return l[j.getMonth()]}function Z(j){return o[j.getMonth()]}function J(j){return n[+(j.getHours()>=12)]}function X(j){return 1+~~(j.getMonth()/3)}function tt(j){return a[j.getUTCDay()]}function ot(j){return s[j.getUTCDay()]}function at(j){return l[j.getUTCMonth()]}function U(j){return o[j.getUTCMonth()]}function Tt(j){return n[+(j.getUTCHours()>=12)]}function $(j){return 1+~~(j.getUTCMonth()/3)}return{format:function(j){var W=V(j+="",B);return W.toString=function(){return j},W},parse:function(j){var W=O(j+="",!1);return W.toString=function(){return j},W},utcFormat:function(j){var W=V(j+="",R);return W.toString=function(){return j},W},utcParse:function(j){var W=O(j+="",!0);return W.toString=function(){return j},W}}}var af={"-":"",_:" ",0:"0"},Ze=/^\s*\d+/,Y6=/^%/,z6=/[\\^$*+?|[\]().{}]/g;function ue(t,e,r){var i=t<0?"-":"",n=(i?-t:t)+"",s=n.length;return i+(s<r?new Array(r-s+1).join(e)+n:n)}function U6(t){return t.replace(z6,"\\$&")}function Js(t){return new RegExp("^(?:"+t.map(U6).join("|")+")","i")}function ta(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}function W6(t,e,r){var i=Ze.exec(e.slice(r,r+1));return i?(t.w=+i[0],r+i[0].length):-1}function H6(t,e,r){var i=Ze.exec(e.slice(r,r+1));return i?(t.u=+i[0],r+i[0].length):-1}function q6(t,e,r){var i=Ze.exec(e.slice(r,r+2));return i?(t.U=+i[0],r+i[0].length):-1}function G6(t,e,r){var i=Ze.exec(e.slice(r,r+2));return i?(t.V=+i[0],r+i[0].length):-1}function $6(t,e,r){var i=Ze.exec(e.slice(r,r+2));return i?(t.W=+i[0],r+i[0].length):-1}function of(t,e,r){var i=Ze.exec(e.slice(r,r+4));return i?(t.y=+i[0],r+i[0].length):-1}function lf(t,e,r){var i=Ze.exec(e.slice(r,r+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function j6(t,e,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function X6(t,e,r){var i=Ze.exec(e.slice(r,r+1));return i?(t.q=i[0]*3-3,r+i[0].length):-1}function K6(t,e,r){var i=Ze.exec(e.slice(r,r+2));return i?(t.m=i[0]-1,r+i[0].length):-1}function cf(t,e,r){var i=Ze.exec(e.slice(r,r+2));return i?(t.d=+i[0],r+i[0].length):-1}function Z6(t,e,r){var i=Ze.exec(e.slice(r,r+3));return i?(t.m=0,t.d=+i[0],r+i[0].length):-1}function hf(t,e,r){var i=Ze.exec(e.slice(r,r+2));return i?(t.H=+i[0],r+i[0].length):-1}function Q6(t,e,r){var i=Ze.exec(e.slice(r,r+2));return i?(t.M=+i[0],r+i[0].length):-1}function J6(t,e,r){var i=Ze.exec(e.slice(r,r+2));return i?(t.S=+i[0],r+i[0].length):-1}function tv(t,e,r){var i=Ze.exec(e.slice(r,r+3));return i?(t.L=+i[0],r+i[0].length):-1}function ev(t,e,r){var i=Ze.exec(e.slice(r,r+6));return i?(t.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function rv(t,e,r){var i=Y6.exec(e.slice(r,r+1));return i?r+i[0].length:-1}function iv(t,e,r){var i=Ze.exec(e.slice(r));return i?(t.Q=+i[0],r+i[0].length):-1}function nv(t,e,r){var i=Ze.exec(e.slice(r));return i?(t.s=+i[0],r+i[0].length):-1}function uf(t,e){return ue(t.getDate(),e,2)}function sv(t,e){return ue(t.getHours(),e,2)}function av(t,e){return ue(t.getHours()%12||12,e,2)}function ov(t,e){return ue(1+Mn.count($i(t),t),e,3)}function hp(t,e){return ue(t.getMilliseconds(),e,3)}function lv(t,e){return hp(t,e)+"000"}function cv(t,e){return ue(t.getMonth()+1,e,2)}function hv(t,e){return ue(t.getMinutes(),e,2)}function uv(t,e){return ue(t.getSeconds(),e,2)}function fv(t){var e=t.getDay();return e===0?7:e}function dv(t,e){return ue(Ts.count($i(t)-1,t),e,2)}function up(t){var e=t.getDay();return e>=4||e===0?Es(t):Es.ceil(t)}function pv(t,e){return t=up(t),ue(Es.count($i(t),t)+($i(t).getDay()===4),e,2)}function gv(t){return t.getDay()}function yv(t,e){return ue(_l.count($i(t)-1,t),e,2)}function mv(t,e){return ue(t.getFullYear()%100,e,2)}function bv(t,e){return t=up(t),ue(t.getFullYear()%100,e,2)}function _v(t,e){return ue(t.getFullYear()%1e4,e,4)}function xv(t,e){var r=t.getDay();return t=r>=4||r===0?Es(t):Es.ceil(t),ue(t.getFullYear()%1e4,e,4)}function vv(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+ue(e/60|0,"0",2)+ue(e%60,"0",2)}function ff(t,e){return ue(t.getUTCDate(),e,2)}function kv(t,e){return ue(t.getUTCHours(),e,2)}function wv(t,e){return ue(t.getUTCHours()%12||12,e,2)}function Tv(t,e){return ue(1+y1.count(Nn(t),t),e,3)}function fp(t,e){return ue(t.getUTCMilliseconds(),e,3)}function Ev(t,e){return fp(t,e)+"000"}function Cv(t,e){return ue(t.getUTCMonth()+1,e,2)}function Sv(t,e){return ue(t.getUTCMinutes(),e,2)}function Av(t,e){return ue(t.getUTCSeconds(),e,2)}function Lv(t){var e=t.getUTCDay();return e===0?7:e}function Bv(t,e){return ue(cp.count(Nn(t)-1,t),e,2)}function dp(t){var e=t.getUTCDay();return e>=4||e===0?Cs(t):Cs.ceil(t)}function Dv(t,e){return t=dp(t),ue(Cs.count(Nn(t),t)+(Nn(t).getUTCDay()===4),e,2)}function Iv(t){return t.getUTCDay()}function Mv(t,e){return ue(xl.count(Nn(t)-1,t),e,2)}function Nv(t,e){return ue(t.getUTCFullYear()%100,e,2)}function Rv(t,e){return t=dp(t),ue(t.getUTCFullYear()%100,e,2)}function Ov(t,e){return ue(t.getUTCFullYear()%1e4,e,4)}function Fv(t,e){var r=t.getUTCDay();return t=r>=4||r===0?Cs(t):Cs.ceil(t),ue(t.getUTCFullYear()%1e4,e,4)}function Pv(){return"+0000"}function df(){return"%"}function pf(t){return+t}function gf(t){return Math.floor(+t/1e3)}var rs,vl;Vv({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Vv(t){return rs=V6(t),vl=rs.format,rs.parse,rs.utcFormat,rs.utcParse,rs}function Yv(t){return new Date(t)}function zv(t){return t instanceof Date?+t:+new Date(+t)}function pp(t,e,r,i,n,s,a,o,l,h){var u=op(),f=u.invert,d=u.domain,p=h(".%L"),m=h(":%S"),b=h("%I:%M"),x=h("%I %p"),k=h("%a %d"),v=h("%b %d"),B=h("%B"),R=h("%Y");function P(V){return(l(V)<V?p:o(V)<V?m:a(V)<V?b:s(V)<V?x:i(V)<V?n(V)<V?k:v:r(V)<V?B:R)(V)}return u.invert=function(V){return new Date(f(V))},u.domain=function(V){return arguments.length?d(Array.from(V,zv)):d().map(Yv)},u.ticks=function(V){var O=d();return t(O[0],O[O.length-1],V??10)},u.tickFormat=function(V,O){return O==null?P:h(O)},u.nice=function(V){var O=d();return(!V||typeof V.range!="function")&&(V=e(O[0],O[O.length-1],V??10)),V?d(w6(O,V)):u},u.copy=function(){return ap(u,pp(t,e,r,i,n,s,a,o,l,h))},u}function Uv(){return p1.apply(pp(F6,P6,$i,Ia,Ts,Mn,Da,Ba,os,vl).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Le(t){return function(){return t}}const yf=Math.abs,er=Math.atan2,xn=Math.cos,Wv=Math.max,ph=Math.min,oi=Math.sin,ls=Math.sqrt,rr=1e-12,Ma=Math.PI,kl=Ma/2,Ho=2*Ma;function Hv(t){return t>1?0:t<-1?Ma:Math.acos(t)}function mf(t){return t>=1?kl:t<=-1?-kl:Math.asin(t)}function gp(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);e=i}return t},()=>new Jx(e)}function qv(t){return t.innerRadius}function Gv(t){return t.outerRadius}function $v(t){return t.startAngle}function jv(t){return t.endAngle}function Xv(t){return t&&t.padAngle}function Kv(t,e,r,i,n,s,a,o){var l=r-t,h=i-e,u=a-n,f=o-s,d=f*l-u*h;if(!(d*d<rr))return d=(u*(e-s)-f*(t-n))/d,[t+d*l,e+d*h]}function So(t,e,r,i,n,s,a){var o=t-r,l=e-i,h=(a?s:-s)/ls(o*o+l*l),u=h*l,f=-h*o,d=t+u,p=e+f,m=r+u,b=i+f,x=(d+m)/2,k=(p+b)/2,v=m-d,B=b-p,R=v*v+B*B,P=n-s,V=d*b-m*p,O=(B<0?-1:1)*ls(Wv(0,P*P*R-V*V)),F=(V*B-v*O)/R,C=(-V*v-B*O)/R,S=(V*B+v*O)/R,E=(-V*v+B*O)/R,_=F-x,w=C-k,g=S-x,D=E-k;return _*_+w*w>g*g+D*D&&(F=S,C=E),{cx:F,cy:C,x01:-u,y01:-f,x11:F*(n/P-1),y11:C*(n/P-1)}}function nu(){var t=qv,e=Gv,r=Le(0),i=null,n=$v,s=jv,a=Xv,o=null,l=gp(h);function h(){var u,f,d=+t.apply(this,arguments),p=+e.apply(this,arguments),m=n.apply(this,arguments)-kl,b=s.apply(this,arguments)-kl,x=yf(b-m),k=b>m;if(o||(o=u=l()),p<d&&(f=p,p=d,d=f),!(p>rr))o.moveTo(0,0);else if(x>Ho-rr)o.moveTo(p*xn(m),p*oi(m)),o.arc(0,0,p,m,b,!k),d>rr&&(o.moveTo(d*xn(b),d*oi(b)),o.arc(0,0,d,b,m,k));else{var v=m,B=b,R=m,P=b,V=x,O=x,F=a.apply(this,arguments)/2,C=F>rr&&(i?+i.apply(this,arguments):ls(d*d+p*p)),S=ph(yf(p-d)/2,+r.apply(this,arguments)),E=S,_=S,w,g;if(C>rr){var D=mf(C/d*oi(F)),y=mf(C/p*oi(F));(V-=D*2)>rr?(D*=k?1:-1,R+=D,P-=D):(V=0,R=P=(m+b)/2),(O-=y*2)>rr?(y*=k?1:-1,v+=y,B-=y):(O=0,v=B=(m+b)/2)}var N=p*xn(v),nt=p*oi(v),Y=d*xn(P),Z=d*oi(P);if(S>rr){var J=p*xn(B),X=p*oi(B),tt=d*xn(R),ot=d*oi(R),at;if(x<Ma)if(at=Kv(N,nt,tt,ot,J,X,Y,Z)){var U=N-at[0],Tt=nt-at[1],$=J-at[0],j=X-at[1],W=1/oi(Hv((U*$+Tt*j)/(ls(U*U+Tt*Tt)*ls($*$+j*j)))/2),z=ls(at[0]*at[0]+at[1]*at[1]);E=ph(S,(d-z)/(W-1)),_=ph(S,(p-z)/(W+1))}else E=_=0}O>rr?_>rr?(w=So(tt,ot,N,nt,p,_,k),g=So(J,X,Y,Z,p,_,k),o.moveTo(w.cx+w.x01,w.cy+w.y01),_<S?o.arc(w.cx,w.cy,_,er(w.y01,w.x01),er(g.y01,g.x01),!k):(o.arc(w.cx,w.cy,_,er(w.y01,w.x01),er(w.y11,w.x11),!k),o.arc(0,0,p,er(w.cy+w.y11,w.cx+w.x11),er(g.cy+g.y11,g.cx+g.x11),!k),o.arc(g.cx,g.cy,_,er(g.y11,g.x11),er(g.y01,g.x01),!k))):(o.moveTo(N,nt),o.arc(0,0,p,v,B,!k)):o.moveTo(N,nt),!(d>rr)||!(V>rr)?o.lineTo(Y,Z):E>rr?(w=So(Y,Z,J,X,d,-E,k),g=So(N,nt,tt,ot,d,-E,k),o.lineTo(w.cx+w.x01,w.cy+w.y01),E<S?o.arc(w.cx,w.cy,E,er(w.y01,w.x01),er(g.y01,g.x01),!k):(o.arc(w.cx,w.cy,E,er(w.y01,w.x01),er(w.y11,w.x11),!k),o.arc(0,0,d,er(w.cy+w.y11,w.cx+w.x11),er(g.cy+g.y11,g.cx+g.x11),k),o.arc(g.cx,g.cy,E,er(g.y11,g.x11),er(g.y01,g.x01),!k))):o.arc(0,0,d,P,R,k)}if(o.closePath(),u)return o=null,u+""||null}return h.centroid=function(){var u=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,f=(+n.apply(this,arguments)+ +s.apply(this,arguments))/2-Ma/2;return[xn(f)*u,oi(f)*u]},h.innerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:Le(+u),h):t},h.outerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:Le(+u),h):e},h.cornerRadius=function(u){return arguments.length?(r=typeof u=="function"?u:Le(+u),h):r},h.padRadius=function(u){return arguments.length?(i=u==null?null:typeof u=="function"?u:Le(+u),h):i},h.startAngle=function(u){return arguments.length?(n=typeof u=="function"?u:Le(+u),h):n},h.endAngle=function(u){return arguments.length?(s=typeof u=="function"?u:Le(+u),h):s},h.padAngle=function(u){return arguments.length?(a=typeof u=="function"?u:Le(+u),h):a},h.context=function(u){return arguments.length?(o=u??null,h):o},h}function yp(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function mp(t){this._context=t}mp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function Cr(t){return new mp(t)}function Zv(t){return t[0]}function Qv(t){return t[1]}function Us(t,e){var r=Le(!0),i=null,n=Cr,s=null,a=gp(o);t=typeof t=="function"?t:t===void 0?Zv:Le(t),e=typeof e=="function"?e:e===void 0?Qv:Le(e);function o(l){var h,u=(l=yp(l)).length,f,d=!1,p;for(i==null&&(s=n(p=a())),h=0;h<=u;++h)!(h<u&&r(f=l[h],h,l))===d&&((d=!d)?s.lineStart():s.lineEnd()),d&&s.point(+t(f,h,l),+e(f,h,l));if(p)return s=null,p+""||null}return o.x=function(l){return arguments.length?(t=typeof l=="function"?l:Le(+l),o):t},o.y=function(l){return arguments.length?(e=typeof l=="function"?l:Le(+l),o):e},o.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Le(!!l),o):r},o.curve=function(l){return arguments.length?(n=l,i!=null&&(s=n(i)),o):n},o.context=function(l){return arguments.length?(l==null?i=s=null:s=n(i=l),o):i},o}function Jv(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function tk(t){return t}function ek(){var t=tk,e=Jv,r=null,i=Le(0),n=Le(Ho),s=Le(0);function a(o){var l,h=(o=yp(o)).length,u,f,d=0,p=new Array(h),m=new Array(h),b=+i.apply(this,arguments),x=Math.min(Ho,Math.max(-Ho,n.apply(this,arguments)-b)),k,v=Math.min(Math.abs(x)/h,s.apply(this,arguments)),B=v*(x<0?-1:1),R;for(l=0;l<h;++l)(R=m[p[l]=l]=+t(o[l],l,o))>0&&(d+=R);for(e!=null?p.sort(function(P,V){return e(m[P],m[V])}):r!=null&&p.sort(function(P,V){return r(o[P],o[V])}),l=0,f=d?(x-h*B)/d:0;l<h;++l,b=k)u=p[l],R=m[u],k=b+(R>0?R*f:0)+B,m[u]={data:o[u],index:l,value:R,startAngle:b,endAngle:k,padAngle:v};return m}return a.value=function(o){return arguments.length?(t=typeof o=="function"?o:Le(+o),a):t},a.sortValues=function(o){return arguments.length?(e=o,r=null,a):e},a.sort=function(o){return arguments.length?(r=o,e=null,a):r},a.startAngle=function(o){return arguments.length?(i=typeof o=="function"?o:Le(+o),a):i},a.endAngle=function(o){return arguments.length?(n=typeof o=="function"?o:Le(+o),a):n},a.padAngle=function(o){return arguments.length?(s=typeof o=="function"?o:Le(+o),a):s},a}class bp{constructor(e,r){this._context=e,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}}function rk(t){return new bp(t,!0)}function ik(t){return new bp(t,!1)}function un(){}function wl(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function gc(t){this._context=t}gc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:wl(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:wl(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Ss(t){return new gc(t)}function _p(t){this._context=t}_p.prototype={areaStart:un,areaEnd:un,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:wl(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function nk(t){return new _p(t)}function xp(t){this._context=t}xp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:wl(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function sk(t){return new xp(t)}function vp(t,e){this._basis=new gc(t),this._beta=e}vp.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var i=t[0],n=e[0],s=t[r]-i,a=e[r]-n,o=-1,l;++o<=r;)l=o/r,this._basis.point(this._beta*t[o]+(1-this._beta)*(i+l*s),this._beta*e[o]+(1-this._beta)*(n+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const ak=function t(e){function r(i){return e===1?new gc(i):new vp(i,e)}return r.beta=function(i){return t(+i)},r}(.85);function Tl(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function m1(t,e){this._context=t,this._k=(1-e)/6}m1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Tl(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Tl(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const ok=function t(e){function r(i){return new m1(i,e)}return r.tension=function(i){return t(+i)},r}(0);function b1(t,e){this._context=t,this._k=(1-e)/6}b1.prototype={areaStart:un,areaEnd:un,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Tl(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const lk=function t(e){function r(i){return new b1(i,e)}return r.tension=function(i){return t(+i)},r}(0);function _1(t,e){this._context=t,this._k=(1-e)/6}_1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Tl(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const ck=function t(e){function r(i){return new _1(i,e)}return r.tension=function(i){return t(+i)},r}(0);function x1(t,e,r){var i=t._x1,n=t._y1,s=t._x2,a=t._y2;if(t._l01_a>rr){var o=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*o-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,n=(n*o-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>rr){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);s=(s*h+t._x1*t._l23_2a-e*t._l12_2a)/u,a=(a*h+t._y1*t._l23_2a-r*t._l12_2a)/u}t._context.bezierCurveTo(i,n,s,a,t._x2,t._y2)}function kp(t,e){this._context=t,this._alpha=e}kp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:x1(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const hk=function t(e){function r(i){return e?new kp(i,e):new m1(i,0)}return r.alpha=function(i){return t(+i)},r}(.5);function wp(t,e){this._context=t,this._alpha=e}wp.prototype={areaStart:un,areaEnd:un,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:x1(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const uk=function t(e){function r(i){return e?new wp(i,e):new b1(i,0)}return r.alpha=function(i){return t(+i)},r}(.5);function Tp(t,e){this._context=t,this._alpha=e}Tp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:x1(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const fk=function t(e){function r(i){return e?new Tp(i,e):new _1(i,0)}return r.alpha=function(i){return t(+i)},r}(.5);function Ep(t){this._context=t}Ep.prototype={areaStart:un,areaEnd:un,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function dk(t){return new Ep(t)}function bf(t){return t<0?-1:1}function _f(t,e,r){var i=t._x1-t._x0,n=e-t._x1,s=(t._y1-t._y0)/(i||n<0&&-0),a=(r-t._y1)/(n||i<0&&-0),o=(s*n+a*i)/(i+n);return(bf(s)+bf(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(o))||0}function xf(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function gh(t,e,r){var i=t._x0,n=t._y0,s=t._x1,a=t._y1,o=(s-i)/3;t._context.bezierCurveTo(i+o,n+o*e,s-o,a-o*r,s,a)}function El(t){this._context=t}El.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:gh(this,this._t0,xf(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,gh(this,xf(this,r=_f(this,t,e)),r);break;default:gh(this,this._t0,r=_f(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function Cp(t){this._context=new Sp(t)}(Cp.prototype=Object.create(El.prototype)).point=function(t,e){El.prototype.point.call(this,e,t)};function Sp(t){this._context=t}Sp.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,i,n,s){this._context.bezierCurveTo(e,t,i,r,s,n)}};function pk(t){return new El(t)}function gk(t){return new Cp(t)}function Ap(t){this._context=t}Ap.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var i=vf(t),n=vf(e),s=0,a=1;a<r;++s,++a)this._context.bezierCurveTo(i[0][s],n[0][s],i[1][s],n[1][s],t[a],e[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function vf(t){var e,r=t.length-1,i,n=new Array(r),s=new Array(r),a=new Array(r);for(n[0]=0,s[0]=2,a[0]=t[0]+2*t[1],e=1;e<r-1;++e)n[e]=1,s[e]=4,a[e]=4*t[e]+2*t[e+1];for(n[r-1]=2,s[r-1]=7,a[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)i=n[e]/s[e-1],s[e]-=i,a[e]-=i*a[e-1];for(n[r-1]=a[r-1]/s[r-1],e=r-2;e>=0;--e)n[e]=(a[e]-n[e+1])/s[e];for(s[r-1]=(t[r]+n[r-1])/2,e=0;e<r-1;++e)s[e]=2*t[e+1]-n[e+1];return[n,s]}function yk(t){return new Ap(t)}function yc(t,e){this._context=t,this._t=e}yc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e}};function mk(t){return new yc(t,.5)}function bk(t){return new yc(t,0)}function _k(t){return new yc(t,1)}function ha(t,e,r){this.k=t,this.x=e,this.y=r}ha.prototype={constructor:ha,scale:function(t){return t===1?this:new ha(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new ha(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};ha.prototype;/*! @license DOMPurify 2.4.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.3/LICENSE */function rn(t){"@babel/helpers - typeof";return rn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rn(t)}function su(t,e){return su=Object.setPrototypeOf||function(i,n){return i.__proto__=n,i},su(t,e)}function xk(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qo(t,e,r){return xk()?qo=Reflect.construct:qo=function(n,s,a){var o=[null];o.push.apply(o,s);var l=Function.bind.apply(n,o),h=new l;return a&&su(h,a.prototype),h},qo.apply(null,arguments)}function Hr(t){return vk(t)||kk(t)||wk(t)||Tk()}function vk(t){if(Array.isArray(t))return au(t)}function kk(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function wk(t,e){if(t){if(typeof t=="string")return au(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return au(t,e)}}function au(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}function Tk(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
7
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ek=Object.hasOwnProperty,kf=Object.setPrototypeOf,Ck=Object.isFrozen,Sk=Object.getPrototypeOf,Ak=Object.getOwnPropertyDescriptor,pr=Object.freeze,Jr=Object.seal,Lk=Object.create,Lp=typeof Reflect<"u"&&Reflect,Cl=Lp.apply,ou=Lp.construct;Cl||(Cl=function(e,r,i){return e.apply(r,i)});pr||(pr=function(e){return e});Jr||(Jr=function(e){return e});ou||(ou=function(e,r){return qo(e,Hr(r))});var Bk=Yr(Array.prototype.forEach),wf=Yr(Array.prototype.pop),ea=Yr(Array.prototype.push),Go=Yr(String.prototype.toLowerCase),yh=Yr(String.prototype.toString),Dk=Yr(String.prototype.match),Wr=Yr(String.prototype.replace),Ik=Yr(String.prototype.indexOf),Mk=Yr(String.prototype.trim),lr=Yr(RegExp.prototype.test),mh=Nk(TypeError);function Yr(t){return function(e){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return Cl(t,e,i)}}function Nk(t){return function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return ou(t,r)}}function le(t,e,r){r=r||Go,kf&&kf(t,null);for(var i=e.length;i--;){var n=e[i];if(typeof n=="string"){var s=r(n);s!==n&&(Ck(e)||(e[i]=s),n=s)}t[n]=!0}return t}function vn(t){var e=Lk(null),r;for(r in t)Cl(Ek,t,[r])===!0&&(e[r]=t[r]);return e}function Ao(t,e){for(;t!==null;){var r=Ak(t,e);if(r){if(r.get)return Yr(r.get);if(typeof r.value=="function")return Yr(r.value)}t=Sk(t)}function i(n){return console.warn("fallback value for",n),null}return i}var Tf=pr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),bh=pr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),_h=pr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Rk=pr(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),xh=pr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),Ok=pr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ef=pr(["#text"]),Cf=pr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),vh=pr(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Sf=pr(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Lo=pr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Fk=Jr(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Pk=Jr(/<%[\w\W]*|[\w\W]*%>/gm),Vk=Jr(/\${[\w\W]*}/gm),Yk=Jr(/^data-[\-\w.\u00B7-\uFFFF]/),zk=Jr(/^aria-[\-\w]+$/),Uk=Jr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Wk=Jr(/^(?:\w+script|data):/i),Hk=Jr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),qk=Jr(/^html$/i),Gk=function(){return typeof window>"u"?null:window},$k=function(e,r){if(rn(e)!=="object"||typeof e.createPolicy!="function")return null;var i=null,n="data-tt-policy-suffix";r.currentScript&&r.currentScript.hasAttribute(n)&&(i=r.currentScript.getAttribute(n));var s="dompurify"+(i?"#"+i:"");try{return e.createPolicy(s,{createHTML:function(o){return o},createScriptURL:function(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function Bp(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Gk(),e=function(K){return Bp(K)};if(e.version="2.4.3",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;var r=t.document,i=t.document,n=t.DocumentFragment,s=t.HTMLTemplateElement,a=t.Node,o=t.Element,l=t.NodeFilter,h=t.NamedNodeMap,u=h===void 0?t.NamedNodeMap||t.MozNamedAttrMap:h,f=t.HTMLFormElement,d=t.DOMParser,p=t.trustedTypes,m=o.prototype,b=Ao(m,"cloneNode"),x=Ao(m,"nextSibling"),k=Ao(m,"childNodes"),v=Ao(m,"parentNode");if(typeof s=="function"){var B=i.createElement("template");B.content&&B.content.ownerDocument&&(i=B.content.ownerDocument)}var R=$k(p,r),P=R?R.createHTML(""):"",V=i,O=V.implementation,F=V.createNodeIterator,C=V.createDocumentFragment,S=V.getElementsByTagName,E=r.importNode,_={};try{_=vn(i).documentMode?i.documentMode:{}}catch{}var w={};e.isSupported=typeof v=="function"&&O&&typeof O.createHTMLDocument<"u"&&_!==9;var g=Fk,D=Pk,y=Vk,N=Yk,nt=zk,Y=Wk,Z=Hk,J=Uk,X=null,tt=le({},[].concat(Hr(Tf),Hr(bh),Hr(_h),Hr(xh),Hr(Ef))),ot=null,at=le({},[].concat(Hr(Cf),Hr(vh),Hr(Sf),Hr(Lo))),U=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Tt=null,$=null,j=!0,W=!0,z=!1,A=!1,M=!1,q=!1,L=!1,st=!1,T=!1,Dt=!1,et=!0,Et=!1,vt="user-content-",pt=!0,ut=!1,gt={},ht=null,yt=le({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),he=null,re=le({},["audio","video","img","source","image","track"]),Mt=null,Nt=le({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Kt="http://www.w3.org/1998/Math/MathML",fe="http://www.w3.org/2000/svg",qt="http://www.w3.org/1999/xhtml",Ft=qt,Bt=!1,bt=null,mt=le({},[Kt,fe,qt],yh),wt,ft=["application/xhtml+xml","text/html"],It="text/html",it,Wt=null,ct=i.createElement("form"),Gt=function(K){return K instanceof RegExp||K instanceof Function},Jt=function(K){Wt&&Wt===K||((!K||rn(K)!=="object")&&(K={}),K=vn(K),wt=ft.indexOf(K.PARSER_MEDIA_TYPE)===-1?wt=It:wt=K.PARSER_MEDIA_TYPE,it=wt==="application/xhtml+xml"?yh:Go,X="ALLOWED_TAGS"in K?le({},K.ALLOWED_TAGS,it):tt,ot="ALLOWED_ATTR"in K?le({},K.ALLOWED_ATTR,it):at,bt="ALLOWED_NAMESPACES"in K?le({},K.ALLOWED_NAMESPACES,yh):mt,Mt="ADD_URI_SAFE_ATTR"in K?le(vn(Nt),K.ADD_URI_SAFE_ATTR,it):Nt,he="ADD_DATA_URI_TAGS"in K?le(vn(re),K.ADD_DATA_URI_TAGS,it):re,ht="FORBID_CONTENTS"in K?le({},K.FORBID_CONTENTS,it):yt,Tt="FORBID_TAGS"in K?le({},K.FORBID_TAGS,it):{},$="FORBID_ATTR"in K?le({},K.FORBID_ATTR,it):{},gt="USE_PROFILES"in K?K.USE_PROFILES:!1,j=K.ALLOW_ARIA_ATTR!==!1,W=K.ALLOW_DATA_ATTR!==!1,z=K.ALLOW_UNKNOWN_PROTOCOLS||!1,A=K.SAFE_FOR_TEMPLATES||!1,M=K.WHOLE_DOCUMENT||!1,st=K.RETURN_DOM||!1,T=K.RETURN_DOM_FRAGMENT||!1,Dt=K.RETURN_TRUSTED_TYPE||!1,L=K.FORCE_BODY||!1,et=K.SANITIZE_DOM!==!1,Et=K.SANITIZE_NAMED_PROPS||!1,pt=K.KEEP_CONTENT!==!1,ut=K.IN_PLACE||!1,J=K.ALLOWED_URI_REGEXP||J,Ft=K.NAMESPACE||qt,K.CUSTOM_ELEMENT_HANDLING&&Gt(K.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(U.tagNameCheck=K.CUSTOM_ELEMENT_HANDLING.tagNameCheck),K.CUSTOM_ELEMENT_HANDLING&&Gt(K.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(U.attributeNameCheck=K.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),K.CUSTOM_ELEMENT_HANDLING&&typeof K.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(U.allowCustomizedBuiltInElements=K.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),A&&(W=!1),T&&(st=!0),gt&&(X=le({},Hr(Ef)),ot=[],gt.html===!0&&(le(X,Tf),le(ot,Cf)),gt.svg===!0&&(le(X,bh),le(ot,vh),le(ot,Lo)),gt.svgFilters===!0&&(le(X,_h),le(ot,vh),le(ot,Lo)),gt.mathMl===!0&&(le(X,xh),le(ot,Sf),le(ot,Lo))),K.ADD_TAGS&&(X===tt&&(X=vn(X)),le(X,K.ADD_TAGS,it)),K.ADD_ATTR&&(ot===at&&(ot=vn(ot)),le(ot,K.ADD_ATTR,it)),K.ADD_URI_SAFE_ATTR&&le(Mt,K.ADD_URI_SAFE_ATTR,it),K.FORBID_CONTENTS&&(ht===yt&&(ht=vn(ht)),le(ht,K.FORBID_CONTENTS,it)),pt&&(X["#text"]=!0),M&&le(X,["html","head","body"]),X.table&&(le(X,["tbody"]),delete Tt.tbody),pr&&pr(K),Wt=K)},se=le({},["mi","mo","mn","ms","mtext"]),ie=le({},["foreignobject","desc","title","annotation-xml"]),ae=le({},["title","style","font","a","script"]),Rt=le({},bh);le(Rt,_h),le(Rt,Rk);var Ht=le({},xh);le(Ht,Ok);var ne=function(K){var xt=v(K);(!xt||!xt.tagName)&&(xt={namespaceURI:Ft,tagName:"template"});var Ct=Go(K.tagName),te=Go(xt.tagName);return bt[K.namespaceURI]?K.namespaceURI===fe?xt.namespaceURI===qt?Ct==="svg":xt.namespaceURI===Kt?Ct==="svg"&&(te==="annotation-xml"||se[te]):!!Rt[Ct]:K.namespaceURI===Kt?xt.namespaceURI===qt?Ct==="math":xt.namespaceURI===fe?Ct==="math"&&ie[te]:!!Ht[Ct]:K.namespaceURI===qt?xt.namespaceURI===fe&&!ie[te]||xt.namespaceURI===Kt&&!se[te]?!1:!Ht[Ct]&&(ae[Ct]||!Rt[Ct]):!!(wt==="application/xhtml+xml"&&bt[K.namespaceURI]):!1},Ut=function(K){ea(e.removed,{element:K});try{K.parentNode.removeChild(K)}catch{try{K.outerHTML=P}catch{K.remove()}}},ki=function(K,xt){try{ea(e.removed,{attribute:xt.getAttributeNode(K),from:xt})}catch{ea(e.removed,{attribute:null,from:xt})}if(xt.removeAttribute(K),K==="is"&&!ot[K])if(st||T)try{Ut(xt)}catch{}else try{xt.setAttribute(K,"")}catch{}},mn=function(K){var xt,Ct;if(L)K="<remove></remove>"+K;else{var te=Dk(K,/^[\r\n\t ]+/);Ct=te&&te[0]}wt==="application/xhtml+xml"&&Ft===qt&&(K='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+K+"</body></html>");var de=R?R.createHTML(K):K;if(Ft===qt)try{xt=new d().parseFromString(de,wt)}catch{}if(!xt||!xt.documentElement){xt=O.createDocument(Ft,"template",null);try{xt.documentElement.innerHTML=Bt?P:de}catch{}}var ge=xt.body||xt.documentElement;return K&&Ct&&ge.insertBefore(i.createTextNode(Ct),ge.childNodes[0]||null),Ft===qt?S.call(xt,M?"html":"body")[0]:M?xt.documentElement:ge},me=function(K){return F.call(K.ownerDocument||K,K,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},$t=function(K){return K instanceof f&&(typeof K.nodeName!="string"||typeof K.textContent!="string"||typeof K.removeChild!="function"||!(K.attributes instanceof u)||typeof K.removeAttribute!="function"||typeof K.setAttribute!="function"||typeof K.namespaceURI!="string"||typeof K.insertBefore!="function"||typeof K.hasChildNodes!="function")},Ce=function(K){return rn(a)==="object"?K instanceof a:K&&rn(K)==="object"&&typeof K.nodeType=="number"&&typeof K.nodeName=="string"},tr=function(K,xt,Ct){w[K]&&Bk(w[K],function(te){te.call(e,xt,Ct,Wt)})},Se=function(K){var xt;if(tr("beforeSanitizeElements",K,null),$t(K)||lr(/[\u0080-\uFFFF]/,K.nodeName))return Ut(K),!0;var Ct=it(K.nodeName);if(tr("uponSanitizeElement",K,{tagName:Ct,allowedTags:X}),K.hasChildNodes()&&!Ce(K.firstElementChild)&&(!Ce(K.content)||!Ce(K.content.firstElementChild))&&lr(/<[/\w]/g,K.innerHTML)&&lr(/<[/\w]/g,K.textContent)||Ct==="select"&&lr(/<template/i,K.innerHTML))return Ut(K),!0;if(!X[Ct]||Tt[Ct]){if(!Tt[Ct]&&be(Ct)&&(U.tagNameCheck instanceof RegExp&&lr(U.tagNameCheck,Ct)||U.tagNameCheck instanceof Function&&U.tagNameCheck(Ct)))return!1;if(pt&&!ht[Ct]){var te=v(K)||K.parentNode,de=k(K)||K.childNodes;if(de&&te)for(var ge=de.length,Me=ge-1;Me>=0;--Me)te.insertBefore(b(de[Me],!0),x(K))}return Ut(K),!0}return K instanceof o&&!ne(K)||(Ct==="noscript"||Ct==="noembed")&&lr(/<\/no(script|embed)/i,K.innerHTML)?(Ut(K),!0):(A&&K.nodeType===3&&(xt=K.textContent,xt=Wr(xt,g," "),xt=Wr(xt,D," "),xt=Wr(xt,y," "),K.textContent!==xt&&(ea(e.removed,{element:K.cloneNode()}),K.textContent=xt)),tr("afterSanitizeElements",K,null),!1)},Ve=function(K,xt,Ct){if(et&&(xt==="id"||xt==="name")&&(Ct in i||Ct in ct))return!1;if(!(W&&!$[xt]&&lr(N,xt))){if(!(j&&lr(nt,xt))){if(!ot[xt]||$[xt]){if(!(be(K)&&(U.tagNameCheck instanceof RegExp&&lr(U.tagNameCheck,K)||U.tagNameCheck instanceof Function&&U.tagNameCheck(K))&&(U.attributeNameCheck instanceof RegExp&&lr(U.attributeNameCheck,xt)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(xt))||xt==="is"&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&&lr(U.tagNameCheck,Ct)||U.tagNameCheck instanceof Function&&U.tagNameCheck(Ct))))return!1}else if(!Mt[xt]){if(!lr(J,Wr(Ct,Z,""))){if(!((xt==="src"||xt==="xlink:href"||xt==="href")&&K!=="script"&&Ik(Ct,"data:")===0&&he[K])){if(!(z&&!lr(Y,Wr(Ct,Z,"")))){if(Ct)return!1}}}}}}return!0},be=function(K){return K.indexOf("-")>0},Qe=function(K){var xt,Ct,te,de;tr("beforeSanitizeAttributes",K,null);var ge=K.attributes;if(ge){var Me={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ot};for(de=ge.length;de--;){xt=ge[de];var Ge=xt,we=Ge.name,Xs=Ge.namespaceURI;if(Ct=we==="value"?xt.value:Mk(xt.value),te=it(we),Me.attrName=te,Me.attrValue=Ct,Me.keepAttr=!0,Me.forceKeepAttr=void 0,tr("uponSanitizeAttribute",K,Me),Ct=Me.attrValue,!Me.forceKeepAttr&&(ki(we,K),!!Me.keepAttr)){if(lr(/\/>/i,Ct)){ki(we,K);continue}A&&(Ct=Wr(Ct,g," "),Ct=Wr(Ct,D," "),Ct=Wr(Ct,y," "));var ts=it(K.nodeName);if(Ve(ts,te,Ct)){if(Et&&(te==="id"||te==="name")&&(ki(we,K),Ct=vt+Ct),R&&rn(p)==="object"&&typeof p.getAttributeType=="function"&&!Xs)switch(p.getAttributeType(ts,te)){case"TrustedHTML":Ct=R.createHTML(Ct);break;case"TrustedScriptURL":Ct=R.createScriptURL(Ct);break}try{Xs?K.setAttributeNS(Xs,we,Ct):K.setAttribute(we,Ct),wf(e.removed)}catch{}}}}tr("afterSanitizeAttributes",K,null)}},qe=function Lt(K){var xt,Ct=me(K);for(tr("beforeSanitizeShadowDOM",K,null);xt=Ct.nextNode();)tr("uponSanitizeShadowNode",xt,null),!Se(xt)&&(xt.content instanceof n&&Lt(xt.content),Qe(xt));tr("afterSanitizeShadowDOM",K,null)};return e.sanitize=function(Lt){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},xt,Ct,te,de,ge;if(Bt=!Lt,Bt&&(Lt="<!-->"),typeof Lt!="string"&&!Ce(Lt)){if(typeof Lt.toString!="function")throw mh("toString is not a function");if(Lt=Lt.toString(),typeof Lt!="string")throw mh("dirty is not a string, aborting")}if(!e.isSupported){if(rn(t.toStaticHTML)==="object"||typeof t.toStaticHTML=="function"){if(typeof Lt=="string")return t.toStaticHTML(Lt);if(Ce(Lt))return t.toStaticHTML(Lt.outerHTML)}return Lt}if(q||Jt(K),e.removed=[],typeof Lt=="string"&&(ut=!1),ut){if(Lt.nodeName){var Me=it(Lt.nodeName);if(!X[Me]||Tt[Me])throw mh("root node is forbidden and cannot be sanitized in-place")}}else if(Lt instanceof a)xt=mn("<!---->"),Ct=xt.ownerDocument.importNode(Lt,!0),Ct.nodeType===1&&Ct.nodeName==="BODY"||Ct.nodeName==="HTML"?xt=Ct:xt.appendChild(Ct);else{if(!st&&!A&&!M&&Lt.indexOf("<")===-1)return R&&Dt?R.createHTML(Lt):Lt;if(xt=mn(Lt),!xt)return st?null:Dt?P:""}xt&&L&&Ut(xt.firstChild);for(var Ge=me(ut?Lt:xt);te=Ge.nextNode();)te.nodeType===3&&te===de||Se(te)||(te.content instanceof n&&qe(te.content),Qe(te),de=te);if(de=null,ut)return Lt;if(st){if(T)for(ge=C.call(xt.ownerDocument);xt.firstChild;)ge.appendChild(xt.firstChild);else ge=xt;return ot.shadowroot&&(ge=E.call(r,ge,!0)),ge}var we=M?xt.outerHTML:xt.innerHTML;return M&&X["!doctype"]&&xt.ownerDocument&&xt.ownerDocument.doctype&&xt.ownerDocument.doctype.name&&lr(qk,xt.ownerDocument.doctype.name)&&(we="<!DOCTYPE "+xt.ownerDocument.doctype.name+`>
8
- `+we),A&&(we=Wr(we,g," "),we=Wr(we,D," "),we=Wr(we,y," ")),R&&Dt?R.createHTML(we):we},e.setConfig=function(Lt){Jt(Lt),q=!0},e.clearConfig=function(){Wt=null,q=!1},e.isValidAttribute=function(Lt,K,xt){Wt||Jt({});var Ct=it(Lt),te=it(K);return Ve(Ct,te,xt)},e.addHook=function(Lt,K){typeof K=="function"&&(w[Lt]=w[Lt]||[],ea(w[Lt],K))},e.removeHook=function(Lt){if(w[Lt])return wf(w[Lt])},e.removeHooks=function(Lt){w[Lt]&&(w[Lt]=[])},e.removeAllHooks=function(){w={}},e}var Na=Bp();const $o={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},i)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;const n=r<.5?r*(1+e):r+e-r*e,s=2*r-n;switch(i){case"r":return $o.hue2rgb(s,n,t+1/3)*255;case"g":return $o.hue2rgb(s,n,t)*255;case"b":return $o.hue2rgb(s,n,t-1/3)*255}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;const n=Math.max(t,e,r),s=Math.min(t,e,r),a=(n+s)/2;if(i==="l")return a*100;if(n===s)return 0;const o=n-s,l=a>.5?o/(2-n-s):o/(n+s);if(i==="s")return l*100;switch(n){case t:return((e-r)/o+(e<r?6:0))*60;case e:return((r-t)/o+2)*60;case r:return((t-e)/o+4)*60;default:return-1}}},jk=$o,Xk={clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},Kk=Xk,Zk={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},Qk=Zk,Jk={channel:jk,lang:Kk,unit:Qk},ee=Jk,en={};for(let t=0;t<=255;t++)en[t]=ee.unit.dec2hex(t);const ir={ALL:0,RGB:1,HSL:2};class t8{constructor(){this.type=ir.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=ir.ALL}is(e){return this.type===e}}const e8=t8;class r8{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new e8}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=ir.ALL,this}_ensureHSL(){const e=this.data,{h:r,s:i,l:n}=e;r===void 0&&(e.h=ee.channel.rgb2hsl(e,"h")),i===void 0&&(e.s=ee.channel.rgb2hsl(e,"s")),n===void 0&&(e.l=ee.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r,g:i,b:n}=e;r===void 0&&(e.r=ee.channel.hsl2rgb(e,"r")),i===void 0&&(e.g=ee.channel.hsl2rgb(e,"g")),n===void 0&&(e.b=ee.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,r=e.r;return!this.type.is(ir.HSL)&&r!==void 0?r:(this._ensureHSL(),ee.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,r=e.g;return!this.type.is(ir.HSL)&&r!==void 0?r:(this._ensureHSL(),ee.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,r=e.b;return!this.type.is(ir.HSL)&&r!==void 0?r:(this._ensureHSL(),ee.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,r=e.h;return!this.type.is(ir.RGB)&&r!==void 0?r:(this._ensureRGB(),ee.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,r=e.s;return!this.type.is(ir.RGB)&&r!==void 0?r:(this._ensureRGB(),ee.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,r=e.l;return!this.type.is(ir.RGB)&&r!==void 0?r:(this._ensureRGB(),ee.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(ir.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(ir.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(ir.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(ir.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(ir.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(ir.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const i8=r8,n8=new i8({r:0,g:0,b:0,a:0},"transparent"),mc=n8,Dp={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;const e=t.match(Dp.re);if(!e)return;const r=e[1],i=parseInt(r,16),n=r.length,s=n%4===0,a=n>4,o=a?1:17,l=a?8:4,h=s?0:-1,u=a?255:15;return mc.set({r:(i>>l*(h+3)&u)*o,g:(i>>l*(h+2)&u)*o,b:(i>>l*(h+1)&u)*o,a:s?(i&u)*o/255:1},t)},stringify:t=>{const{r:e,g:r,b:i,a:n}=t;return n<1?`#${en[Math.round(e)]}${en[Math.round(r)]}${en[Math.round(i)]}${en[Math.round(n*255)]}`:`#${en[Math.round(e)]}${en[Math.round(r)]}${en[Math.round(i)]}`}},ya=Dp,jo={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(jo.hueRe);if(e){const[,r,i]=e;switch(i){case"grad":return ee.channel.clamp.h(parseFloat(r)*.9);case"rad":return ee.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return ee.channel.clamp.h(parseFloat(r)*360)}}return ee.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(e!==104&&e!==72)return;const r=t.match(jo.re);if(!r)return;const[,i,n,s,a,o]=r;return mc.set({h:jo._hue2deg(i),s:ee.channel.clamp.s(parseFloat(n)),l:ee.channel.clamp.l(parseFloat(s)),a:a?ee.channel.clamp.a(o?parseFloat(a)/100:parseFloat(a)):1},t)},stringify:t=>{const{h:e,s:r,l:i,a:n}=t;return n<1?`hsla(${ee.lang.round(e)}, ${ee.lang.round(r)}%, ${ee.lang.round(i)}%, ${n})`:`hsl(${ee.lang.round(e)}, ${ee.lang.round(r)}%, ${ee.lang.round(i)}%)`}},Bo=jo,Xo={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=Xo.colors[t];if(e)return ya.parse(e)},stringify:t=>{const e=ya.stringify(t);for(const r in Xo.colors)if(Xo.colors[r]===e)return r}},Af=Xo,Ip={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(e!==114&&e!==82)return;const r=t.match(Ip.re);if(!r)return;const[,i,n,s,a,o,l,h,u]=r;return mc.set({r:ee.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:ee.channel.clamp.g(a?parseFloat(s)*2.55:parseFloat(s)),b:ee.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:h?ee.channel.clamp.a(u?parseFloat(h)/100:parseFloat(h)):1},t)},stringify:t=>{const{r:e,g:r,b:i,a:n}=t;return n<1?`rgba(${ee.lang.round(e)}, ${ee.lang.round(r)}, ${ee.lang.round(i)}, ${ee.lang.round(n)})`:`rgb(${ee.lang.round(e)}, ${ee.lang.round(r)}, ${ee.lang.round(i)})`}},Do=Ip,s8={format:{keyword:Af,hex:ya,rgb:Do,rgba:Do,hsl:Bo,hsla:Bo},parse:t=>{if(typeof t!="string")return t;const e=ya.parse(t)||Do.parse(t)||Bo.parse(t)||Af.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(ir.HSL)||t.data.r===void 0?Bo.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?Do.stringify(t):ya.stringify(t)},ji=s8,a8=(t,e)=>{const r=ji.parse(t);for(const i in e)r[i]=ee.channel.clamp[i](e[i]);return ji.stringify(r)},Mp=a8,o8=(t,e,r=0,i=1)=>{if(typeof t!="number")return Mp(t,{a:e});const n=mc.set({r:ee.channel.clamp.r(t),g:ee.channel.clamp.g(e),b:ee.channel.clamp.b(r),a:ee.channel.clamp.a(i)});return ji.stringify(n)},ma=o8,l8=(t,e,r)=>{const i=ji.parse(t),n=i[e],s=ee.channel.clamp[e](n+r);return n!==s&&(i[e]=s),ji.stringify(i)},Np=l8,c8=(t,e)=>Np(t,"l",e),zt=c8,h8=(t,e)=>Np(t,"l",-e),Zt=h8,u8=(t,e)=>{const r=ji.parse(t),i={};for(const n in e)e[n]&&(i[n]=r[n]+e[n]);return Mp(t,i)},lt=u8,f8=(t,e,r=50)=>{const{r:i,g:n,b:s,a}=ji.parse(t),{r:o,g:l,b:h,a:u}=ji.parse(e),f=r/100,d=f*2-1,p=a-u,b=((d*p===-1?d:(d+p)/(1+d*p))+1)/2,x=1-b,k=i*b+o*x,v=n*b+l*x,B=s*b+h*x,R=a*f+u*(1-f);return ma(k,v,B,R)},d8=f8,p8=(t,e=100)=>{const r=ji.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,d8(r,t,e)},At=p8;var g8=typeof global=="object"&&global&&global.Object===Object&&global;const Rp=g8;var y8=typeof self=="object"&&self&&self.Object===Object&&self,m8=Rp||y8||Function("return this")();const ii=m8;var b8=ii.Symbol;const zr=b8;var Op=Object.prototype,_8=Op.hasOwnProperty,x8=Op.toString,ra=zr?zr.toStringTag:void 0;function v8(t){var e=_8.call(t,ra),r=t[ra];try{t[ra]=void 0;var i=!0}catch{}var n=x8.call(t);return i&&(e?t[ra]=r:delete t[ra]),n}var k8=Object.prototype,w8=k8.toString;function T8(t){return w8.call(t)}var E8="[object Null]",C8="[object Undefined]",Lf=zr?zr.toStringTag:void 0;function jn(t){return t==null?t===void 0?C8:E8:Lf&&Lf in Object(t)?v8(t):T8(t)}function Sr(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var S8="[object AsyncFunction]",A8="[object Function]",L8="[object GeneratorFunction]",B8="[object Proxy]";function As(t){if(!Sr(t))return!1;var e=jn(t);return e==A8||e==L8||e==S8||e==B8}var D8=ii["__core-js_shared__"];const kh=D8;var Bf=function(){var t=/[^.]+$/.exec(kh&&kh.keys&&kh.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function I8(t){return!!Bf&&Bf in t}var M8=Function.prototype,N8=M8.toString;function Xn(t){if(t!=null){try{return N8.call(t)}catch{}try{return t+""}catch{}}return""}var R8=/[\\^$.*+?()[\]{}|]/g,O8=/^\[object .+?Constructor\]$/,F8=Function.prototype,P8=Object.prototype,V8=F8.toString,Y8=P8.hasOwnProperty,z8=RegExp("^"+V8.call(Y8).replace(R8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function U8(t){if(!Sr(t)||I8(t))return!1;var e=As(t)?z8:O8;return e.test(Xn(t))}function W8(t,e){return t==null?void 0:t[e]}function Kn(t,e){var r=W8(t,e);return U8(r)?r:void 0}var H8=Kn(Object,"create");const Ra=H8;function q8(){this.__data__=Ra?Ra(null):{},this.size=0}function G8(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var $8="__lodash_hash_undefined__",j8=Object.prototype,X8=j8.hasOwnProperty;function K8(t){var e=this.__data__;if(Ra){var r=e[t];return r===$8?void 0:r}return X8.call(e,t)?e[t]:void 0}var Z8=Object.prototype,Q8=Z8.hasOwnProperty;function J8(t){var e=this.__data__;return Ra?e[t]!==void 0:Q8.call(e,t)}var t7="__lodash_hash_undefined__";function e7(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ra&&e===void 0?t7:e,this}function Rn(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}Rn.prototype.clear=q8;Rn.prototype.delete=G8;Rn.prototype.get=K8;Rn.prototype.has=J8;Rn.prototype.set=e7;function r7(){this.__data__=[],this.size=0}function Ws(t,e){return t===e||t!==t&&e!==e}function bc(t,e){for(var r=t.length;r--;)if(Ws(t[r][0],e))return r;return-1}var i7=Array.prototype,n7=i7.splice;function s7(t){var e=this.__data__,r=bc(e,t);if(r<0)return!1;var i=e.length-1;return r==i?e.pop():n7.call(e,r,1),--this.size,!0}function a7(t){var e=this.__data__,r=bc(e,t);return r<0?void 0:e[r][1]}function o7(t){return bc(this.__data__,t)>-1}function l7(t,e){var r=this.__data__,i=bc(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}function Zi(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}Zi.prototype.clear=r7;Zi.prototype.delete=s7;Zi.prototype.get=a7;Zi.prototype.has=o7;Zi.prototype.set=l7;var c7=Kn(ii,"Map");const Oa=c7;function h7(){this.size=0,this.__data__={hash:new Rn,map:new(Oa||Zi),string:new Rn}}function u7(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function _c(t,e){var r=t.__data__;return u7(e)?r[typeof e=="string"?"string":"hash"]:r.map}function f7(t){var e=_c(this,t).delete(t);return this.size-=e?1:0,e}function d7(t){return _c(this,t).get(t)}function p7(t){return _c(this,t).has(t)}function g7(t,e){var r=_c(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}function Qi(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}Qi.prototype.clear=h7;Qi.prototype.delete=f7;Qi.prototype.get=d7;Qi.prototype.has=p7;Qi.prototype.set=g7;var y7="Expected a function";function Hs(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(y7);var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],s=r.cache;if(s.has(n))return s.get(n);var a=t.apply(this,i);return r.cache=s.set(n,a)||s,a};return r.cache=new(Hs.Cache||Qi),r}Hs.Cache=Qi;function mi(t){return t!=null&&typeof t=="object"}var m7="[object Symbol]";function On(t){return typeof t=="symbol"||mi(t)&&jn(t)==m7}function ys(t,e){for(var r=-1,i=t==null?0:t.length,n=Array(i);++r<i;)n[r]=e(t[r],r,t);return n}var b7=Array.isArray;const Fe=b7;var _7=1/0,Df=zr?zr.prototype:void 0,If=Df?Df.toString:void 0;function Fp(t){if(typeof t=="string")return t;if(Fe(t))return ys(t,Fp)+"";if(On(t))return If?If.call(t):"";var e=t+"";return e=="0"&&1/t==-_7?"-0":e}var x7=/\s/;function v7(t){for(var e=t.length;e--&&x7.test(t.charAt(e)););return e}var k7=/^\s+/;function w7(t){return t&&t.slice(0,v7(t)+1).replace(k7,"")}var Mf=0/0,T7=/^[-+]0x[0-9a-f]+$/i,E7=/^0b[01]+$/i,C7=/^0o[0-7]+$/i,S7=parseInt;function A7(t){if(typeof t=="number")return t;if(On(t))return Mf;if(Sr(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Sr(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=w7(t);var r=E7.test(t);return r||C7.test(t)?S7(t.slice(2),r?2:8):T7.test(t)?Mf:+t}var Nf=1/0,L7=17976931348623157e292;function Ko(t){if(!t)return t===0?t:0;if(t=A7(t),t===Nf||t===-Nf){var e=t<0?-1:1;return e*L7}return t===t?t:0}function B7(t){var e=Ko(t),r=e%1;return e===e?r?e-r:e:0}function Zn(t){return t}var D7=Kn(ii,"WeakMap");const lu=D7;var Rf=Object.create,I7=function(){function t(){}return function(e){if(!Sr(e))return{};if(Rf)return Rf(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();const M7=I7;function N7(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function R7(){}function Pp(t,e){var r=-1,i=t.length;for(e||(e=Array(i));++r<i;)e[r]=t[r];return e}var O7=800,F7=16,P7=Date.now;function V7(t){var e=0,r=0;return function(){var i=P7(),n=F7-(i-r);if(r=i,n>0){if(++e>=O7)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function cs(t){return function(){return t}}var Y7=function(){try{var t=Kn(Object,"defineProperty");return t({},"",{}),t}catch{}}();const Sl=Y7;var z7=Sl?function(t,e){return Sl(t,"toString",{configurable:!0,enumerable:!1,value:cs(e),writable:!0})}:Zn;const U7=z7;var W7=V7(U7);const Vp=W7;function Yp(t,e){for(var r=-1,i=t==null?0:t.length;++r<i&&e(t[r],r,t)!==!1;);return t}function zp(t,e,r,i){for(var n=t.length,s=r+(i?1:-1);i?s--:++s<n;)if(e(t[s],s,t))return s;return-1}function H7(t){return t!==t}function q7(t,e,r){for(var i=r-1,n=t.length;++i<n;)if(t[i]===e)return i;return-1}function G7(t,e,r){return e===e?q7(t,e,r):zp(t,H7,r)}function $7(t,e){var r=t==null?0:t.length;return!!r&&G7(t,e,0)>-1}var j7=9007199254740991,X7=/^(?:0|[1-9]\d*)$/;function xc(t,e){var r=typeof t;return e=e??j7,!!e&&(r=="number"||r!="symbol"&&X7.test(t))&&t>-1&&t%1==0&&t<e}function vc(t,e,r){e=="__proto__"&&Sl?Sl(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var K7=Object.prototype,Z7=K7.hasOwnProperty;function kc(t,e,r){var i=t[e];(!(Z7.call(t,e)&&Ws(i,r))||r===void 0&&!(e in t))&&vc(t,e,r)}function so(t,e,r,i){var n=!r;r||(r={});for(var s=-1,a=e.length;++s<a;){var o=e[s],l=i?i(r[o],t[o],o,r,t):void 0;l===void 0&&(l=t[o]),n?vc(r,o,l):kc(r,o,l)}return r}var Of=Math.max;function Up(t,e,r){return e=Of(e===void 0?t.length-1:e,0),function(){for(var i=arguments,n=-1,s=Of(i.length-e,0),a=Array(s);++n<s;)a[n]=i[e+n];n=-1;for(var o=Array(e+1);++n<e;)o[n]=i[n];return o[e]=r(a),N7(t,this,o)}}function wc(t,e){return Vp(Up(t,e,Zn),t+"")}var Q7=9007199254740991;function v1(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Q7}function pn(t){return t!=null&&v1(t.length)&&!As(t)}function Fa(t,e,r){if(!Sr(r))return!1;var i=typeof e;return(i=="number"?pn(r)&&xc(e,r.length):i=="string"&&e in r)?Ws(r[e],t):!1}function J7(t){return wc(function(e,r){var i=-1,n=r.length,s=n>1?r[n-1]:void 0,a=n>2?r[2]:void 0;for(s=t.length>3&&typeof s=="function"?(n--,s):void 0,a&&Fa(r[0],r[1],a)&&(s=n<3?void 0:s,n=1),e=Object(e);++i<n;){var o=r[i];o&&t(e,o,i,s)}return e})}var tw=Object.prototype;function Tc(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||tw;return t===r}function ew(t,e){for(var r=-1,i=Array(t);++r<t;)i[r]=e(r);return i}var rw="[object Arguments]";function Ff(t){return mi(t)&&jn(t)==rw}var Wp=Object.prototype,iw=Wp.hasOwnProperty,nw=Wp.propertyIsEnumerable,sw=Ff(function(){return arguments}())?Ff:function(t){return mi(t)&&iw.call(t,"callee")&&!nw.call(t,"callee")};const Ls=sw;function aw(){return!1}var Hp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Pf=Hp&&typeof module=="object"&&module&&!module.nodeType&&module,ow=Pf&&Pf.exports===Hp,Vf=ow?ii.Buffer:void 0,lw=Vf?Vf.isBuffer:void 0,cw=lw||aw;const Bs=cw;var hw="[object Arguments]",uw="[object Array]",fw="[object Boolean]",dw="[object Date]",pw="[object Error]",gw="[object Function]",yw="[object Map]",mw="[object Number]",bw="[object Object]",_w="[object RegExp]",xw="[object Set]",vw="[object String]",kw="[object WeakMap]",ww="[object ArrayBuffer]",Tw="[object DataView]",Ew="[object Float32Array]",Cw="[object Float64Array]",Sw="[object Int8Array]",Aw="[object Int16Array]",Lw="[object Int32Array]",Bw="[object Uint8Array]",Dw="[object Uint8ClampedArray]",Iw="[object Uint16Array]",Mw="[object Uint32Array]",ye={};ye[Ew]=ye[Cw]=ye[Sw]=ye[Aw]=ye[Lw]=ye[Bw]=ye[Dw]=ye[Iw]=ye[Mw]=!0;ye[hw]=ye[uw]=ye[ww]=ye[fw]=ye[Tw]=ye[dw]=ye[pw]=ye[gw]=ye[yw]=ye[mw]=ye[bw]=ye[_w]=ye[xw]=ye[vw]=ye[kw]=!1;function Nw(t){return mi(t)&&v1(t.length)&&!!ye[jn(t)]}function Ec(t){return function(e){return t(e)}}var qp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ba=qp&&typeof module=="object"&&module&&!module.nodeType&&module,Rw=ba&&ba.exports===qp,wh=Rw&&Rp.process,Ow=function(){try{var t=ba&&ba.require&&ba.require("util").types;return t||wh&&wh.binding&&wh.binding("util")}catch{}}();const Ds=Ow;var Yf=Ds&&Ds.isTypedArray,Fw=Yf?Ec(Yf):Nw;const Cc=Fw;var Pw=Object.prototype,Vw=Pw.hasOwnProperty;function Gp(t,e){var r=Fe(t),i=!r&&Ls(t),n=!r&&!i&&Bs(t),s=!r&&!i&&!n&&Cc(t),a=r||i||n||s,o=a?ew(t.length,String):[],l=o.length;for(var h in t)(e||Vw.call(t,h))&&!(a&&(h=="length"||n&&(h=="offset"||h=="parent")||s&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||xc(h,l)))&&o.push(h);return o}function $p(t,e){return function(r){return t(e(r))}}var Yw=$p(Object.keys,Object);const zw=Yw;var Uw=Object.prototype,Ww=Uw.hasOwnProperty;function jp(t){if(!Tc(t))return zw(t);var e=[];for(var r in Object(t))Ww.call(t,r)&&r!="constructor"&&e.push(r);return e}function Er(t){return pn(t)?Gp(t):jp(t)}function Hw(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var qw=Object.prototype,Gw=qw.hasOwnProperty;function $w(t){if(!Sr(t))return Hw(t);var e=Tc(t),r=[];for(var i in t)i=="constructor"&&(e||!Gw.call(t,i))||r.push(i);return r}function Qn(t){return pn(t)?Gp(t,!0):$w(t)}var jw=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Xw=/^\w*$/;function k1(t,e){if(Fe(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||On(t)?!0:Xw.test(t)||!jw.test(t)||e!=null&&t in Object(e)}var Kw=500;function Zw(t){var e=Hs(t,function(i){return r.size===Kw&&r.clear(),i}),r=e.cache;return e}var Qw=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Jw=/\\(\\)?/g,tT=Zw(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Qw,function(r,i,n,s){e.push(n?s.replace(Jw,"$1"):i||r)}),e});const eT=tT;function Xp(t){return t==null?"":Fp(t)}function Sc(t,e){return Fe(t)?t:k1(t,e)?[t]:eT(Xp(t))}var rT=1/0;function ao(t){if(typeof t=="string"||On(t))return t;var e=t+"";return e=="0"&&1/t==-rT?"-0":e}function Ac(t,e){e=Sc(e,t);for(var r=0,i=e.length;t!=null&&r<i;)t=t[ao(e[r++])];return r&&r==i?t:void 0}function iT(t,e,r){var i=t==null?void 0:Ac(t,e);return i===void 0?r:i}function w1(t,e){for(var r=-1,i=e.length,n=t.length;++r<i;)t[n+r]=e[r];return t}var zf=zr?zr.isConcatSpreadable:void 0;function nT(t){return Fe(t)||Ls(t)||!!(zf&&t&&t[zf])}function Lc(t,e,r,i,n){var s=-1,a=t.length;for(r||(r=nT),n||(n=[]);++s<a;){var o=t[s];e>0&&r(o)?e>1?Lc(o,e-1,r,i,n):w1(n,o):i||(n[n.length]=o)}return n}function qs(t){var e=t==null?0:t.length;return e?Lc(t,1):[]}function sT(t){return Vp(Up(t,void 0,qs),t+"")}var aT=$p(Object.getPrototypeOf,Object);const T1=aT;var oT="[object Object]",lT=Function.prototype,cT=Object.prototype,Kp=lT.toString,hT=cT.hasOwnProperty,uT=Kp.call(Object);function Zp(t){if(!mi(t)||jn(t)!=oT)return!1;var e=T1(t);if(e===null)return!0;var r=hT.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Kp.call(r)==uT}function fT(t,e,r,i){var n=-1,s=t==null?0:t.length;for(i&&s&&(r=t[++n]);++n<s;)r=e(r,t[n],n,t);return r}function dT(){this.__data__=new Zi,this.size=0}function pT(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function gT(t){return this.__data__.get(t)}function yT(t){return this.__data__.has(t)}var mT=200;function bT(t,e){var r=this.__data__;if(r instanceof Zi){var i=r.__data__;if(!Oa||i.length<mT-1)return i.push([t,e]),this.size=++r.size,this;r=this.__data__=new Qi(i)}return r.set(t,e),this.size=r.size,this}function Kr(t){var e=this.__data__=new Zi(t);this.size=e.size}Kr.prototype.clear=dT;Kr.prototype.delete=pT;Kr.prototype.get=gT;Kr.prototype.has=yT;Kr.prototype.set=bT;function _T(t,e){return t&&so(e,Er(e),t)}function xT(t,e){return t&&so(e,Qn(e),t)}var Qp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Uf=Qp&&typeof module=="object"&&module&&!module.nodeType&&module,vT=Uf&&Uf.exports===Qp,Wf=vT?ii.Buffer:void 0,Hf=Wf?Wf.allocUnsafe:void 0;function Jp(t,e){if(e)return t.slice();var r=t.length,i=Hf?Hf(r):new t.constructor(r);return t.copy(i),i}function tg(t,e){for(var r=-1,i=t==null?0:t.length,n=0,s=[];++r<i;){var a=t[r];e(a,r,t)&&(s[n++]=a)}return s}function eg(){return[]}var kT=Object.prototype,wT=kT.propertyIsEnumerable,qf=Object.getOwnPropertySymbols,TT=qf?function(t){return t==null?[]:(t=Object(t),tg(qf(t),function(e){return wT.call(t,e)}))}:eg;const E1=TT;function ET(t,e){return so(t,E1(t),e)}var CT=Object.getOwnPropertySymbols,ST=CT?function(t){for(var e=[];t;)w1(e,E1(t)),t=T1(t);return e}:eg;const rg=ST;function AT(t,e){return so(t,rg(t),e)}function ig(t,e,r){var i=e(t);return Fe(t)?i:w1(i,r(t))}function cu(t){return ig(t,Er,E1)}function LT(t){return ig(t,Qn,rg)}var BT=Kn(ii,"DataView");const hu=BT;var DT=Kn(ii,"Promise");const uu=DT;var IT=Kn(ii,"Set");const ms=IT;var Gf="[object Map]",MT="[object Object]",$f="[object Promise]",jf="[object Set]",Xf="[object WeakMap]",Kf="[object DataView]",NT=Xn(hu),RT=Xn(Oa),OT=Xn(uu),FT=Xn(ms),PT=Xn(lu),En=jn;(hu&&En(new hu(new ArrayBuffer(1)))!=Kf||Oa&&En(new Oa)!=Gf||uu&&En(uu.resolve())!=$f||ms&&En(new ms)!=jf||lu&&En(new lu)!=Xf)&&(En=function(t){var e=jn(t),r=e==MT?t.constructor:void 0,i=r?Xn(r):"";if(i)switch(i){case NT:return Kf;case RT:return Gf;case OT:return $f;case FT:return jf;case PT:return Xf}return e});const Is=En;var VT=Object.prototype,YT=VT.hasOwnProperty;function zT(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&YT.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var UT=ii.Uint8Array;const Al=UT;function C1(t){var e=new t.constructor(t.byteLength);return new Al(e).set(new Al(t)),e}function WT(t,e){var r=e?C1(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var HT=/\w*$/;function qT(t){var e=new t.constructor(t.source,HT.exec(t));return e.lastIndex=t.lastIndex,e}var Zf=zr?zr.prototype:void 0,Qf=Zf?Zf.valueOf:void 0;function GT(t){return Qf?Object(Qf.call(t)):{}}function ng(t,e){var r=e?C1(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var $T="[object Boolean]",jT="[object Date]",XT="[object Map]",KT="[object Number]",ZT="[object RegExp]",QT="[object Set]",JT="[object String]",tE="[object Symbol]",eE="[object ArrayBuffer]",rE="[object DataView]",iE="[object Float32Array]",nE="[object Float64Array]",sE="[object Int8Array]",aE="[object Int16Array]",oE="[object Int32Array]",lE="[object Uint8Array]",cE="[object Uint8ClampedArray]",hE="[object Uint16Array]",uE="[object Uint32Array]";function fE(t,e,r){var i=t.constructor;switch(e){case eE:return C1(t);case $T:case jT:return new i(+t);case rE:return WT(t,r);case iE:case nE:case sE:case aE:case oE:case lE:case cE:case hE:case uE:return ng(t,r);case XT:return new i;case KT:case JT:return new i(t);case ZT:return qT(t);case QT:return new i;case tE:return GT(t)}}function sg(t){return typeof t.constructor=="function"&&!Tc(t)?M7(T1(t)):{}}var dE="[object Map]";function pE(t){return mi(t)&&Is(t)==dE}var Jf=Ds&&Ds.isMap,gE=Jf?Ec(Jf):pE;const yE=gE;var mE="[object Set]";function bE(t){return mi(t)&&Is(t)==mE}var td=Ds&&Ds.isSet,_E=td?Ec(td):bE;const xE=_E;var vE=1,kE=2,wE=4,ag="[object Arguments]",TE="[object Array]",EE="[object Boolean]",CE="[object Date]",SE="[object Error]",og="[object Function]",AE="[object GeneratorFunction]",LE="[object Map]",BE="[object Number]",lg="[object Object]",DE="[object RegExp]",IE="[object Set]",ME="[object String]",NE="[object Symbol]",RE="[object WeakMap]",OE="[object ArrayBuffer]",FE="[object DataView]",PE="[object Float32Array]",VE="[object Float64Array]",YE="[object Int8Array]",zE="[object Int16Array]",UE="[object Int32Array]",WE="[object Uint8Array]",HE="[object Uint8ClampedArray]",qE="[object Uint16Array]",GE="[object Uint32Array]",pe={};pe[ag]=pe[TE]=pe[OE]=pe[FE]=pe[EE]=pe[CE]=pe[PE]=pe[VE]=pe[YE]=pe[zE]=pe[UE]=pe[LE]=pe[BE]=pe[lg]=pe[DE]=pe[IE]=pe[ME]=pe[NE]=pe[WE]=pe[HE]=pe[qE]=pe[GE]=!0;pe[SE]=pe[og]=pe[RE]=!1;function _a(t,e,r,i,n,s){var a,o=e&vE,l=e&kE,h=e&wE;if(r&&(a=n?r(t,i,n,s):r(t)),a!==void 0)return a;if(!Sr(t))return t;var u=Fe(t);if(u){if(a=zT(t),!o)return Pp(t,a)}else{var f=Is(t),d=f==og||f==AE;if(Bs(t))return Jp(t,o);if(f==lg||f==ag||d&&!n){if(a=l||d?{}:sg(t),!o)return l?AT(t,xT(a,t)):ET(t,_T(a,t))}else{if(!pe[f])return n?t:{};a=fE(t,f,o)}}s||(s=new Kr);var p=s.get(t);if(p)return p;s.set(t,a),xE(t)?t.forEach(function(x){a.add(_a(x,e,r,x,t,s))}):yE(t)&&t.forEach(function(x,k){a.set(k,_a(x,e,r,k,t,s))});var m=h?l?LT:cu:l?Qn:Er,b=u?void 0:m(t);return Yp(b||t,function(x,k){b&&(k=x,x=t[k]),kc(a,k,_a(x,e,r,k,t,s))}),a}var $E=4;function jE(t){return _a(t,$E)}var XE=1,KE=4;function ZE(t){return _a(t,XE|KE)}var QE="__lodash_hash_undefined__";function JE(t){return this.__data__.set(t,QE),this}function tC(t){return this.__data__.has(t)}function Pa(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new Qi;++e<r;)this.add(t[e])}Pa.prototype.add=Pa.prototype.push=JE;Pa.prototype.has=tC;function eC(t,e){for(var r=-1,i=t==null?0:t.length;++r<i;)if(e(t[r],r,t))return!0;return!1}function cg(t,e){return t.has(e)}var rC=1,iC=2;function hg(t,e,r,i,n,s){var a=r&rC,o=t.length,l=e.length;if(o!=l&&!(a&&l>o))return!1;var h=s.get(t),u=s.get(e);if(h&&u)return h==e&&u==t;var f=-1,d=!0,p=r&iC?new Pa:void 0;for(s.set(t,e),s.set(e,t);++f<o;){var m=t[f],b=e[f];if(i)var x=a?i(b,m,f,e,t,s):i(m,b,f,t,e,s);if(x!==void 0){if(x)continue;d=!1;break}if(p){if(!eC(e,function(k,v){if(!cg(p,v)&&(m===k||n(m,k,r,i,s)))return p.push(v)})){d=!1;break}}else if(!(m===b||n(m,b,r,i,s))){d=!1;break}}return s.delete(t),s.delete(e),d}function nC(t){var e=-1,r=Array(t.size);return t.forEach(function(i,n){r[++e]=[n,i]}),r}function S1(t){var e=-1,r=Array(t.size);return t.forEach(function(i){r[++e]=i}),r}var sC=1,aC=2,oC="[object Boolean]",lC="[object Date]",cC="[object Error]",hC="[object Map]",uC="[object Number]",fC="[object RegExp]",dC="[object Set]",pC="[object String]",gC="[object Symbol]",yC="[object ArrayBuffer]",mC="[object DataView]",ed=zr?zr.prototype:void 0,Th=ed?ed.valueOf:void 0;function bC(t,e,r,i,n,s,a){switch(r){case mC:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case yC:return!(t.byteLength!=e.byteLength||!s(new Al(t),new Al(e)));case oC:case lC:case uC:return Ws(+t,+e);case cC:return t.name==e.name&&t.message==e.message;case fC:case pC:return t==e+"";case hC:var o=nC;case dC:var l=i&sC;if(o||(o=S1),t.size!=e.size&&!l)return!1;var h=a.get(t);if(h)return h==e;i|=aC,a.set(t,e);var u=hg(o(t),o(e),i,n,s,a);return a.delete(t),u;case gC:if(Th)return Th.call(t)==Th.call(e)}return!1}var _C=1,xC=Object.prototype,vC=xC.hasOwnProperty;function kC(t,e,r,i,n,s){var a=r&_C,o=cu(t),l=o.length,h=cu(e),u=h.length;if(l!=u&&!a)return!1;for(var f=l;f--;){var d=o[f];if(!(a?d in e:vC.call(e,d)))return!1}var p=s.get(t),m=s.get(e);if(p&&m)return p==e&&m==t;var b=!0;s.set(t,e),s.set(e,t);for(var x=a;++f<l;){d=o[f];var k=t[d],v=e[d];if(i)var B=a?i(v,k,d,e,t,s):i(k,v,d,t,e,s);if(!(B===void 0?k===v||n(k,v,r,i,s):B)){b=!1;break}x||(x=d=="constructor")}if(b&&!x){var R=t.constructor,P=e.constructor;R!=P&&"constructor"in t&&"constructor"in e&&!(typeof R=="function"&&R instanceof R&&typeof P=="function"&&P instanceof P)&&(b=!1)}return s.delete(t),s.delete(e),b}var wC=1,rd="[object Arguments]",id="[object Array]",Io="[object Object]",TC=Object.prototype,nd=TC.hasOwnProperty;function EC(t,e,r,i,n,s){var a=Fe(t),o=Fe(e),l=a?id:Is(t),h=o?id:Is(e);l=l==rd?Io:l,h=h==rd?Io:h;var u=l==Io,f=h==Io,d=l==h;if(d&&Bs(t)){if(!Bs(e))return!1;a=!0,u=!1}if(d&&!u)return s||(s=new Kr),a||Cc(t)?hg(t,e,r,i,n,s):bC(t,e,l,r,i,n,s);if(!(r&wC)){var p=u&&nd.call(t,"__wrapped__"),m=f&&nd.call(e,"__wrapped__");if(p||m){var b=p?t.value():t,x=m?e.value():e;return s||(s=new Kr),n(b,x,r,i,s)}}return d?(s||(s=new Kr),kC(t,e,r,i,n,s)):!1}function A1(t,e,r,i,n){return t===e?!0:t==null||e==null||!mi(t)&&!mi(e)?t!==t&&e!==e:EC(t,e,r,i,A1,n)}var CC=1,SC=2;function AC(t,e,r,i){var n=r.length,s=n,a=!i;if(t==null)return!s;for(t=Object(t);n--;){var o=r[n];if(a&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++n<s;){o=r[n];var l=o[0],h=t[l],u=o[1];if(a&&o[2]){if(h===void 0&&!(l in t))return!1}else{var f=new Kr;if(i)var d=i(h,u,l,t,e,f);if(!(d===void 0?A1(u,h,CC|SC,i,f):d))return!1}}return!0}function ug(t){return t===t&&!Sr(t)}function LC(t){for(var e=Er(t),r=e.length;r--;){var i=e[r],n=t[i];e[r]=[i,n,ug(n)]}return e}function fg(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}function BC(t){var e=LC(t);return e.length==1&&e[0][2]?fg(e[0][0],e[0][1]):function(r){return r===t||AC(r,t,e)}}function DC(t,e){return t!=null&&e in Object(t)}function dg(t,e,r){e=Sc(e,t);for(var i=-1,n=e.length,s=!1;++i<n;){var a=ao(e[i]);if(!(s=t!=null&&r(t,a)))break;t=t[a]}return s||++i!=n?s:(n=t==null?0:t.length,!!n&&v1(n)&&xc(a,n)&&(Fe(t)||Ls(t)))}function pg(t,e){return t!=null&&dg(t,e,DC)}var IC=1,MC=2;function NC(t,e){return k1(t)&&ug(e)?fg(ao(t),e):function(r){var i=iT(r,t);return i===void 0&&i===e?pg(r,t):A1(e,i,IC|MC)}}function RC(t){return function(e){return e==null?void 0:e[t]}}function OC(t){return function(e){return Ac(e,t)}}function FC(t){return k1(t)?RC(ao(t)):OC(t)}function gn(t){return typeof t=="function"?t:t==null?Zn:typeof t=="object"?Fe(t)?NC(t[0],t[1]):BC(t):FC(t)}function PC(t){return function(e,r,i){for(var n=-1,s=Object(e),a=i(e),o=a.length;o--;){var l=a[t?o:++n];if(r(s[l],l,s)===!1)break}return e}}var VC=PC();const L1=VC;function gg(t,e){return t&&L1(t,e,Er)}function YC(t,e){return function(r,i){if(r==null)return r;if(!pn(r))return t(r,i);for(var n=r.length,s=e?n:-1,a=Object(r);(e?s--:++s<n)&&i(a[s],s,a)!==!1;);return r}}var zC=YC(gg);const Bc=zC;var UC=function(){return ii.Date.now()};const sd=UC;var yg=Object.prototype,WC=yg.hasOwnProperty,HC=wc(function(t,e){t=Object(t);var r=-1,i=e.length,n=i>2?e[2]:void 0;for(n&&Fa(e[0],e[1],n)&&(i=1);++r<i;)for(var s=e[r],a=Qn(s),o=-1,l=a.length;++o<l;){var h=a[o],u=t[h];(u===void 0||Ws(u,yg[h])&&!WC.call(t,h))&&(t[h]=s[h])}return t});const ns=HC;function fu(t,e,r){(r!==void 0&&!Ws(t[e],r)||r===void 0&&!(e in t))&&vc(t,e,r)}function mg(t){return mi(t)&&pn(t)}function du(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function qC(t){return so(t,Qn(t))}function GC(t,e,r,i,n,s,a){var o=du(t,r),l=du(e,r),h=a.get(l);if(h){fu(t,r,h);return}var u=s?s(o,l,r+"",t,e,a):void 0,f=u===void 0;if(f){var d=Fe(l),p=!d&&Bs(l),m=!d&&!p&&Cc(l);u=l,d||p||m?Fe(o)?u=o:mg(o)?u=Pp(o):p?(f=!1,u=Jp(l,!0)):m?(f=!1,u=ng(l,!0)):u=[]:Zp(l)||Ls(l)?(u=o,Ls(o)?u=qC(o):(!Sr(o)||As(o))&&(u=sg(l))):f=!1}f&&(a.set(l,u),n(u,l,i,s,a),a.delete(l)),fu(t,r,u)}function bg(t,e,r,i,n){t!==e&&L1(e,function(s,a){if(n||(n=new Kr),Sr(s))GC(t,e,a,r,bg,i,n);else{var o=i?i(du(t,a),s,a+"",t,e,n):void 0;o===void 0&&(o=s),fu(t,a,o)}},Qn)}function $C(t,e,r){for(var i=-1,n=t==null?0:t.length;++i<n;)if(r(e,t[i]))return!0;return!1}function Ll(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function _g(t){return typeof t=="function"?t:Zn}function dt(t,e){var r=Fe(t)?Yp:Bc;return r(t,_g(e))}function jC(t,e){var r=[];return Bc(t,function(i,n,s){e(i,n,s)&&r.push(i)}),r}function Vi(t,e){var r=Fe(t)?tg:jC;return r(t,gn(e))}function XC(t){return function(e,r,i){var n=Object(e);if(!pn(e)){var s=gn(r);e=Er(e),r=function(o){return s(n[o],o,n)}}var a=t(e,r,i);return a>-1?n[s?e[a]:a]:void 0}}var KC=Math.max;function ZC(t,e,r){var i=t==null?0:t.length;if(!i)return-1;var n=r==null?0:B7(r);return n<0&&(n=KC(i+n,0)),zp(t,gn(e),n)}var QC=XC(ZC);const B1=QC;function xg(t,e){var r=-1,i=pn(t)?Array(t.length):[];return Bc(t,function(n,s,a){i[++r]=e(n,s,a)}),i}function Oe(t,e){var r=Fe(t)?ys:xg;return r(t,gn(e))}function JC(t,e){return t==null?t:L1(t,_g(e),Qn)}function t9(t,e){return t>e}var e9=Object.prototype,r9=e9.hasOwnProperty;function i9(t,e){return t!=null&&r9.call(t,e)}function Qt(t,e){return t!=null&&dg(t,e,i9)}function n9(t,e){return ys(e,function(r){return t[r]})}function Wi(t){return t==null?[]:n9(t,Er(t))}var s9="[object Map]",a9="[object Set]",o9=Object.prototype,l9=o9.hasOwnProperty;function bs(t){if(t==null)return!0;if(pn(t)&&(Fe(t)||typeof t=="string"||typeof t.splice=="function"||Bs(t)||Cc(t)||Ls(t)))return!t.length;var e=Is(t);if(e==s9||e==a9)return!t.size;if(Tc(t))return!jp(t).length;for(var r in t)if(l9.call(t,r))return!1;return!0}function Be(t){return t===void 0}function vg(t,e){return t<e}function Dc(t,e){var r={};return e=gn(e),gg(t,function(i,n,s){vc(r,n,e(i,n,s))}),r}function D1(t,e,r){for(var i=-1,n=t.length;++i<n;){var s=t[i],a=e(s);if(a!=null&&(o===void 0?a===a&&!On(a):r(a,o)))var o=a,l=s}return l}function Fn(t){return t&&t.length?D1(t,Zn,t9):void 0}var c9=J7(function(t,e,r){bg(t,e,r)});const pu=c9;function Va(t){return t&&t.length?D1(t,Zn,vg):void 0}function I1(t,e){return t&&t.length?D1(t,gn(e),vg):void 0}function h9(t,e,r,i){if(!Sr(t))return t;e=Sc(e,t);for(var n=-1,s=e.length,a=s-1,o=t;o!=null&&++n<s;){var l=ao(e[n]),h=r;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(n!=a){var u=o[l];h=i?i(u,l,o):void 0,h===void 0&&(h=Sr(u)?u:xc(e[n+1])?[]:{})}kc(o,l,h),o=o[l]}return t}function u9(t,e,r){for(var i=-1,n=e.length,s={};++i<n;){var a=e[i],o=Ac(t,a);r(o,a)&&h9(s,Sc(a,t),o)}return s}function f9(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}function d9(t,e){if(t!==e){var r=t!==void 0,i=t===null,n=t===t,s=On(t),a=e!==void 0,o=e===null,l=e===e,h=On(e);if(!o&&!h&&!s&&t>e||s&&a&&l&&!o&&!h||i&&a&&l||!r&&l||!n)return 1;if(!i&&!s&&!h&&t<e||h&&r&&n&&!i&&!s||o&&r&&n||!a&&n||!l)return-1}return 0}function p9(t,e,r){for(var i=-1,n=t.criteria,s=e.criteria,a=n.length,o=r.length;++i<a;){var l=d9(n[i],s[i]);if(l){if(i>=o)return l;var h=r[i];return l*(h=="desc"?-1:1)}}return t.index-e.index}function g9(t,e,r){e.length?e=ys(e,function(s){return Fe(s)?function(a){return Ac(a,s.length===1?s[0]:s)}:s}):e=[Zn];var i=-1;e=ys(e,Ec(gn));var n=xg(t,function(s,a,o){var l=ys(e,function(h){return h(s)});return{criteria:l,index:++i,value:s}});return f9(n,function(s,a){return p9(s,a,r)})}function y9(t,e){return u9(t,e,function(r,i){return pg(t,i)})}var m9=sT(function(t,e){return t==null?{}:y9(t,e)});const Ya=m9;var b9=Math.ceil,_9=Math.max;function x9(t,e,r,i){for(var n=-1,s=_9(b9((e-t)/(r||1)),0),a=Array(s);s--;)a[i?s:++n]=t,t+=r;return a}function v9(t){return function(e,r,i){return i&&typeof i!="number"&&Fa(e,r,i)&&(r=i=void 0),e=Ko(e),r===void 0?(r=e,e=0):r=Ko(r),i=i===void 0?e<r?1:-1:Ko(i),x9(e,r,i,t)}}var k9=v9();const Pn=k9;function w9(t,e,r,i,n){return n(t,function(s,a,o){r=i?(i=!1,s):e(r,s,a,o)}),r}function oo(t,e,r){var i=Fe(t)?fT:w9,n=arguments.length<3;return i(t,gn(e),r,n,Bc)}var T9=wc(function(t,e){if(t==null)return[];var r=e.length;return r>1&&Fa(t,e[0],e[1])?e=[]:r>2&&Fa(e[0],e[1],e[2])&&(e=[e[0]]),g9(t,Lc(e,1),[])});const lo=T9;var E9=1/0,C9=ms&&1/S1(new ms([,-0]))[1]==E9?function(t){return new ms(t)}:R7;const S9=C9;var A9=200;function L9(t,e,r){var i=-1,n=$7,s=t.length,a=!0,o=[],l=o;if(r)a=!1,n=$C;else if(s>=A9){var h=e?null:S9(t);if(h)return S1(h);a=!1,n=cg,l=new Pa}else l=e?[]:o;t:for(;++i<s;){var u=t[i],f=e?e(u):u;if(u=r||u!==0?u:0,a&&f===f){for(var d=l.length;d--;)if(l[d]===f)continue t;e&&l.push(f),o.push(u)}else n(l,f,r)||(l!==o&&l.push(f),o.push(u))}return o}var B9=wc(function(t){return L9(Lc(t,1,mg,!0))});const D9=B9;var I9=0;function Ic(t){var e=++I9;return Xp(t)+e}function M9(t,e,r){for(var i=-1,n=t.length,s=e.length,a={};++i<n;){var o=i<s?e[i]:void 0;r(a,t[i],o)}return a}function N9(t,e){return M9(t||[],e||[],kc)}var R9="\0",kn="\0",ad="";class Pe{constructor(e={}){this._isDirected=Qt(e,"directed")?e.directed:!0,this._isMultigraph=Qt(e,"multigraph")?e.multigraph:!1,this._isCompound=Qt(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=cs(void 0),this._defaultEdgeLabelFn=cs(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[kn]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return As(e)||(e=cs(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return Er(this._nodes)}sources(){var e=this;return Vi(this.nodes(),function(r){return bs(e._in[r])})}sinks(){var e=this;return Vi(this.nodes(),function(r){return bs(e._out[r])})}setNodes(e,r){var i=arguments,n=this;return dt(e,function(s){i.length>1?n.setNode(s,r):n.setNode(s)}),this}setNode(e,r){return Qt(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=r),this):(this._nodes[e]=arguments.length>1?r:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=kn,this._children[e]={},this._children[kn][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Qt(this._nodes,e)}removeNode(e){var r=this;if(Qt(this._nodes,e)){var i=function(n){r.removeEdge(r._edgeObjs[n])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],dt(this.children(e),function(n){r.setParent(n)}),delete this._children[e]),dt(Er(this._in[e]),i),delete this._in[e],delete this._preds[e],dt(Er(this._out[e]),i),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Be(r))r=kn;else{r+="";for(var i=r;!Be(i);i=this.parent(i))if(i===e)throw new Error("Setting "+r+" as parent of "+e+" would create a cycle");this.setNode(r)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=r,this._children[r][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var r=this._parent[e];if(r!==kn)return r}}children(e){if(Be(e)&&(e=kn),this._isCompound){var r=this._children[e];if(r)return Er(r)}else{if(e===kn)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var r=this._preds[e];if(r)return Er(r)}successors(e){var r=this._sucs[e];if(r)return Er(r)}neighbors(e){var r=this.predecessors(e);if(r)return D9(r,this.successors(e))}isLeaf(e){var r;return this.isDirected()?r=this.successors(e):r=this.neighbors(e),r.length===0}filterNodes(e){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var i=this;dt(this._nodes,function(a,o){e(o)&&r.setNode(o,a)}),dt(this._edgeObjs,function(a){r.hasNode(a.v)&&r.hasNode(a.w)&&r.setEdge(a,i.edge(a))});var n={};function s(a){var o=i.parent(a);return o===void 0||r.hasNode(o)?(n[a]=o,o):o in n?n[o]:s(o)}return this._isCompound&&dt(r.nodes(),function(a){r.setParent(a,s(a))}),r}setDefaultEdgeLabel(e){return As(e)||(e=cs(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return Wi(this._edgeObjs)}setPath(e,r){var i=this,n=arguments;return oo(e,function(s,a){return n.length>1?i.setEdge(s,a,r):i.setEdge(s,a),a}),this}setEdge(){var e,r,i,n,s=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(e=a.v,r=a.w,i=a.name,arguments.length===2&&(n=arguments[1],s=!0)):(e=a,r=arguments[1],i=arguments[3],arguments.length>2&&(n=arguments[2],s=!0)),e=""+e,r=""+r,Be(i)||(i=""+i);var o=ua(this._isDirected,e,r,i);if(Qt(this._edgeLabels,o))return s&&(this._edgeLabels[o]=n),this;if(!Be(i)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(r),this._edgeLabels[o]=s?n:this._defaultEdgeLabelFn(e,r,i);var l=O9(this._isDirected,e,r,i);return e=l.v,r=l.w,Object.freeze(l),this._edgeObjs[o]=l,od(this._preds[r],e),od(this._sucs[e],r),this._in[r][o]=l,this._out[e][o]=l,this._edgeCount++,this}edge(e,r,i){var n=arguments.length===1?Eh(this._isDirected,arguments[0]):ua(this._isDirected,e,r,i);return this._edgeLabels[n]}hasEdge(e,r,i){var n=arguments.length===1?Eh(this._isDirected,arguments[0]):ua(this._isDirected,e,r,i);return Qt(this._edgeLabels,n)}removeEdge(e,r,i){var n=arguments.length===1?Eh(this._isDirected,arguments[0]):ua(this._isDirected,e,r,i),s=this._edgeObjs[n];return s&&(e=s.v,r=s.w,delete this._edgeLabels[n],delete this._edgeObjs[n],ld(this._preds[r],e),ld(this._sucs[e],r),delete this._in[r][n],delete this._out[e][n],this._edgeCount--),this}inEdges(e,r){var i=this._in[e];if(i){var n=Wi(i);return r?Vi(n,function(s){return s.v===r}):n}}outEdges(e,r){var i=this._out[e];if(i){var n=Wi(i);return r?Vi(n,function(s){return s.w===r}):n}}nodeEdges(e,r){var i=this.inEdges(e,r);if(i)return i.concat(this.outEdges(e,r))}}Pe.prototype._nodeCount=0;Pe.prototype._edgeCount=0;function od(t,e){t[e]?t[e]++:t[e]=1}function ld(t,e){--t[e]||delete t[e]}function ua(t,e,r,i){var n=""+e,s=""+r;if(!t&&n>s){var a=n;n=s,s=a}return n+ad+s+ad+(Be(i)?R9:i)}function O9(t,e,r,i){var n=""+e,s=""+r;if(!t&&n>s){var a=n;n=s,s=a}var o={v:n,w:s};return i&&(o.name=i),o}function Eh(t,e){return ua(t,e.v,e.w,e.name)}class F9{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,r=e._prev;if(r!==e)return cd(r),r}enqueue(e){var r=this._sentinel;e._prev&&e._next&&cd(e),e._next=r._next,r._next._prev=e,r._next=e,e._prev=r}toString(){for(var e=[],r=this._sentinel,i=r._prev;i!==r;)e.push(JSON.stringify(i,P9)),i=i._prev;return"["+e.join(", ")+"]"}}function cd(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function P9(t,e){if(t!=="_next"&&t!=="_prev")return e}var V9=cs(1);function Y9(t,e){if(t.nodeCount()<=1)return[];var r=U9(t,e||V9),i=z9(r.graph,r.buckets,r.zeroIdx);return qs(Oe(i,function(n){return t.outEdges(n.v,n.w)}))}function z9(t,e,r){for(var i=[],n=e[e.length-1],s=e[0],a;t.nodeCount();){for(;a=s.dequeue();)Ch(t,e,r,a);for(;a=n.dequeue();)Ch(t,e,r,a);if(t.nodeCount()){for(var o=e.length-2;o>0;--o)if(a=e[o].dequeue(),a){i=i.concat(Ch(t,e,r,a,!0));break}}}return i}function Ch(t,e,r,i,n){var s=n?[]:void 0;return dt(t.inEdges(i.v),function(a){var o=t.edge(a),l=t.node(a.v);n&&s.push({v:a.v,w:a.w}),l.out-=o,gu(e,r,l)}),dt(t.outEdges(i.v),function(a){var o=t.edge(a),l=a.w,h=t.node(l);h.in-=o,gu(e,r,h)}),t.removeNode(i.v),s}function U9(t,e){var r=new Pe,i=0,n=0;dt(t.nodes(),function(o){r.setNode(o,{v:o,in:0,out:0})}),dt(t.edges(),function(o){var l=r.edge(o.v,o.w)||0,h=e(o),u=l+h;r.setEdge(o.v,o.w,u),n=Math.max(n,r.node(o.v).out+=h),i=Math.max(i,r.node(o.w).in+=h)});var s=Pn(n+i+3).map(function(){return new F9}),a=i+1;return dt(r.nodes(),function(o){gu(s,a,r.node(o))}),{graph:r,buckets:s,zeroIdx:a}}function gu(t,e,r){r.out?r.in?t[r.out-r.in+e].enqueue(r):t[t.length-1].enqueue(r):t[0].enqueue(r)}function W9(t){var e=t.graph().acyclicer==="greedy"?Y9(t,r(t)):H9(t);dt(e,function(i){var n=t.edge(i);t.removeEdge(i),n.forwardName=i.name,n.reversed=!0,t.setEdge(i.w,i.v,n,Ic("rev"))});function r(i){return function(n){return i.edge(n).weight}}}function H9(t){var e=[],r={},i={};function n(s){Qt(i,s)||(i[s]=!0,r[s]=!0,dt(t.outEdges(s),function(a){Qt(r,a.w)?e.push(a):n(a.w)}),delete r[s])}return dt(t.nodes(),n),e}function q9(t){dt(t.edges(),function(e){var r=t.edge(e);if(r.reversed){t.removeEdge(e);var i=r.forwardName;delete r.reversed,delete r.forwardName,t.setEdge(e.w,e.v,r,i)}})}function Gs(t,e,r,i){var n;do n=Ic(i);while(t.hasNode(n));return r.dummy=e,t.setNode(n,r),n}function G9(t){var e=new Pe().setGraph(t.graph());return dt(t.nodes(),function(r){e.setNode(r,t.node(r))}),dt(t.edges(),function(r){var i=e.edge(r.v,r.w)||{weight:0,minlen:1},n=t.edge(r);e.setEdge(r.v,r.w,{weight:i.weight+n.weight,minlen:Math.max(i.minlen,n.minlen)})}),e}function kg(t){var e=new Pe({multigraph:t.isMultigraph()}).setGraph(t.graph());return dt(t.nodes(),function(r){t.children(r).length||e.setNode(r,t.node(r))}),dt(t.edges(),function(r){e.setEdge(r,t.edge(r))}),e}function hd(t,e){var r=t.x,i=t.y,n=e.x-r,s=e.y-i,a=t.width/2,o=t.height/2;if(!n&&!s)throw new Error("Not possible to find intersection inside of the rectangle");var l,h;return Math.abs(s)*a>Math.abs(n)*o?(s<0&&(o=-o),l=o*n/s,h=o):(n<0&&(a=-a),l=a,h=a*s/n),{x:r+l,y:i+h}}function Mc(t){var e=Oe(Pn(wg(t)+1),function(){return[]});return dt(t.nodes(),function(r){var i=t.node(r),n=i.rank;Be(n)||(e[n][i.order]=r)}),e}function $9(t){var e=Va(Oe(t.nodes(),function(r){return t.node(r).rank}));dt(t.nodes(),function(r){var i=t.node(r);Qt(i,"rank")&&(i.rank-=e)})}function j9(t){var e=Va(Oe(t.nodes(),function(s){return t.node(s).rank})),r=[];dt(t.nodes(),function(s){var a=t.node(s).rank-e;r[a]||(r[a]=[]),r[a].push(s)});var i=0,n=t.graph().nodeRankFactor;dt(r,function(s,a){Be(s)&&a%n!==0?--i:i&&dt(s,function(o){t.node(o).rank+=i})})}function ud(t,e,r,i){var n={width:0,height:0};return arguments.length>=4&&(n.rank=r,n.order=i),Gs(t,"border",n,e)}function wg(t){return Fn(Oe(t.nodes(),function(e){var r=t.node(e).rank;if(!Be(r))return r}))}function X9(t,e){var r={lhs:[],rhs:[]};return dt(t,function(i){e(i)?r.lhs.push(i):r.rhs.push(i)}),r}function K9(t,e){var r=sd();try{return e()}finally{console.log(t+" time: "+(sd()-r)+"ms")}}function Z9(t,e){return e()}function Q9(t){function e(r){var i=t.children(r),n=t.node(r);if(i.length&&dt(i,e),Qt(n,"minRank")){n.borderLeft=[],n.borderRight=[];for(var s=n.minRank,a=n.maxRank+1;s<a;++s)fd(t,"borderLeft","_bl",r,n,s),fd(t,"borderRight","_br",r,n,s)}}dt(t.children(),e)}function fd(t,e,r,i,n,s){var a={width:0,height:0,rank:s,borderType:e},o=n[e][s-1],l=Gs(t,"border",a,r);n[e][s]=l,t.setParent(l,i),o&&t.setEdge(o,l,{weight:1})}function J9(t){var e=t.graph().rankdir.toLowerCase();(e==="lr"||e==="rl")&&Tg(t)}function tS(t){var e=t.graph().rankdir.toLowerCase();(e==="bt"||e==="rl")&&eS(t),(e==="lr"||e==="rl")&&(rS(t),Tg(t))}function Tg(t){dt(t.nodes(),function(e){dd(t.node(e))}),dt(t.edges(),function(e){dd(t.edge(e))})}function dd(t){var e=t.width;t.width=t.height,t.height=e}function eS(t){dt(t.nodes(),function(e){Sh(t.node(e))}),dt(t.edges(),function(e){var r=t.edge(e);dt(r.points,Sh),Qt(r,"y")&&Sh(r)})}function Sh(t){t.y=-t.y}function rS(t){dt(t.nodes(),function(e){Ah(t.node(e))}),dt(t.edges(),function(e){var r=t.edge(e);dt(r.points,Ah),Qt(r,"x")&&Ah(r)})}function Ah(t){var e=t.x;t.x=t.y,t.y=e}function iS(t){t.graph().dummyChains=[],dt(t.edges(),function(e){nS(t,e)})}function nS(t,e){var r=e.v,i=t.node(r).rank,n=e.w,s=t.node(n).rank,a=e.name,o=t.edge(e),l=o.labelRank;if(s!==i+1){t.removeEdge(e);var h,u,f;for(f=0,++i;i<s;++f,++i)o.points=[],u={width:0,height:0,edgeLabel:o,edgeObj:e,rank:i},h=Gs(t,"edge",u,"_d"),i===l&&(u.width=o.width,u.height=o.height,u.dummy="edge-label",u.labelpos=o.labelpos),t.setEdge(r,h,{weight:o.weight},a),f===0&&t.graph().dummyChains.push(h),r=h;t.setEdge(r,n,{weight:o.weight},a)}}function sS(t){dt(t.graph().dummyChains,function(e){var r=t.node(e),i=r.edgeLabel,n;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)})}function M1(t){var e={};function r(i){var n=t.node(i);if(Qt(e,i))return n.rank;e[i]=!0;var s=Va(Oe(t.outEdges(i),function(a){return r(a.w)-t.edge(a).minlen}));return(s===Number.POSITIVE_INFINITY||s===void 0||s===null)&&(s=0),n.rank=s}dt(t.sources(),r)}function za(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}function Eg(t){var e=new Pe({directed:!1}),r=t.nodes()[0],i=t.nodeCount();e.setNode(r,{});for(var n,s;aS(e,t)<i;)n=oS(e,t),s=e.hasNode(n.v)?za(t,n):-za(t,n),lS(e,t,s);return e}function aS(t,e){function r(i){dt(e.nodeEdges(i),function(n){var s=n.v,a=i===s?n.w:s;!t.hasNode(a)&&!za(e,n)&&(t.setNode(a,{}),t.setEdge(i,a,{}),r(a))})}return dt(t.nodes(),r),t.nodeCount()}function oS(t,e){return I1(e.edges(),function(r){if(t.hasNode(r.v)!==t.hasNode(r.w))return za(e,r)})}function lS(t,e,r){dt(t.nodes(),function(i){e.node(i).rank+=r})}function cS(){}cS.prototype=new Error;function Cg(t,e,r){Fe(e)||(e=[e]);var i=(t.isDirected()?t.successors:t.neighbors).bind(t),n=[],s={};return dt(e,function(a){if(!t.hasNode(a))throw new Error("Graph does not have node: "+a);Sg(t,a,r==="post",s,i,n)}),n}function Sg(t,e,r,i,n,s){Qt(i,e)||(i[e]=!0,r||s.push(e),dt(n(e),function(a){Sg(t,a,r,i,n,s)}),r&&s.push(e))}function hS(t,e){return Cg(t,e,"post")}function uS(t,e){return Cg(t,e,"pre")}Jn.initLowLimValues=R1;Jn.initCutValues=N1;Jn.calcCutValue=Ag;Jn.leaveEdge=Bg;Jn.enterEdge=Dg;Jn.exchangeEdges=Ig;function Jn(t){t=G9(t),M1(t);var e=Eg(t);R1(e),N1(e,t);for(var r,i;r=Bg(e);)i=Dg(e,t,r),Ig(e,t,r,i)}function N1(t,e){var r=hS(t,t.nodes());r=r.slice(0,r.length-1),dt(r,function(i){fS(t,e,i)})}function fS(t,e,r){var i=t.node(r),n=i.parent;t.edge(r,n).cutvalue=Ag(t,e,r)}function Ag(t,e,r){var i=t.node(r),n=i.parent,s=!0,a=e.edge(r,n),o=0;return a||(s=!1,a=e.edge(n,r)),o=a.weight,dt(e.nodeEdges(r),function(l){var h=l.v===r,u=h?l.w:l.v;if(u!==n){var f=h===s,d=e.edge(l).weight;if(o+=f?d:-d,pS(t,r,u)){var p=t.edge(r,u).cutvalue;o+=f?-p:p}}}),o}function R1(t,e){arguments.length<2&&(e=t.nodes()[0]),Lg(t,{},1,e)}function Lg(t,e,r,i,n){var s=r,a=t.node(i);return e[i]=!0,dt(t.neighbors(i),function(o){Qt(e,o)||(r=Lg(t,e,r,o,i))}),a.low=s,a.lim=r++,n?a.parent=n:delete a.parent,r}function Bg(t){return B1(t.edges(),function(e){return t.edge(e).cutvalue<0})}function Dg(t,e,r){var i=r.v,n=r.w;e.hasEdge(i,n)||(i=r.w,n=r.v);var s=t.node(i),a=t.node(n),o=s,l=!1;s.lim>a.lim&&(o=a,l=!0);var h=Vi(e.edges(),function(u){return l===pd(t,t.node(u.v),o)&&l!==pd(t,t.node(u.w),o)});return I1(h,function(u){return za(e,u)})}function Ig(t,e,r,i){var n=r.v,s=r.w;t.removeEdge(n,s),t.setEdge(i.v,i.w,{}),R1(t),N1(t,e),dS(t,e)}function dS(t,e){var r=B1(t.nodes(),function(n){return!e.node(n).parent}),i=uS(t,r);i=i.slice(1),dt(i,function(n){var s=t.node(n).parent,a=e.edge(n,s),o=!1;a||(a=e.edge(s,n),o=!0),e.node(n).rank=e.node(s).rank+(o?a.minlen:-a.minlen)})}function pS(t,e,r){return t.hasEdge(e,r)}function pd(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}function gS(t){switch(t.graph().ranker){case"network-simplex":gd(t);break;case"tight-tree":mS(t);break;case"longest-path":yS(t);break;default:gd(t)}}var yS=M1;function mS(t){M1(t),Eg(t)}function gd(t){Jn(t)}function bS(t){var e=Gs(t,"root",{},"_root"),r=_S(t),i=Fn(Wi(r))-1,n=2*i+1;t.graph().nestingRoot=e,dt(t.edges(),function(a){t.edge(a).minlen*=n});var s=xS(t)+1;dt(t.children(),function(a){Mg(t,e,n,s,i,r,a)}),t.graph().nodeRankFactor=n}function Mg(t,e,r,i,n,s,a){var o=t.children(a);if(!o.length){a!==e&&t.setEdge(e,a,{weight:0,minlen:r});return}var l=ud(t,"_bt"),h=ud(t,"_bb"),u=t.node(a);t.setParent(l,a),u.borderTop=l,t.setParent(h,a),u.borderBottom=h,dt(o,function(f){Mg(t,e,r,i,n,s,f);var d=t.node(f),p=d.borderTop?d.borderTop:f,m=d.borderBottom?d.borderBottom:f,b=d.borderTop?i:2*i,x=p!==m?1:n-s[a]+1;t.setEdge(l,p,{weight:b,minlen:x,nestingEdge:!0}),t.setEdge(m,h,{weight:b,minlen:x,nestingEdge:!0})}),t.parent(a)||t.setEdge(e,l,{weight:0,minlen:n+s[a]})}function _S(t){var e={};function r(i,n){var s=t.children(i);s&&s.length&&dt(s,function(a){r(a,n+1)}),e[i]=n}return dt(t.children(),function(i){r(i,1)}),e}function xS(t){return oo(t.edges(),function(e,r){return e+t.edge(r).weight},0)}function vS(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,dt(t.edges(),function(r){var i=t.edge(r);i.nestingEdge&&t.removeEdge(r)})}function kS(t,e,r){var i={},n;dt(r,function(s){for(var a=t.parent(s),o,l;a;){if(o=t.parent(a),o?(l=i[o],i[o]=a):(l=n,n=a),l&&l!==a){e.setEdge(l,a);return}a=o}})}function wS(t,e,r){var i=TS(t),n=new Pe({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(s){return t.node(s)});return dt(t.nodes(),function(s){var a=t.node(s),o=t.parent(s);(a.rank===e||a.minRank<=e&&e<=a.maxRank)&&(n.setNode(s),n.setParent(s,o||i),dt(t[r](s),function(l){var h=l.v===s?l.w:l.v,u=n.edge(h,s),f=Be(u)?0:u.weight;n.setEdge(h,s,{weight:t.edge(l).weight+f})}),Qt(a,"minRank")&&n.setNode(s,{borderLeft:a.borderLeft[e],borderRight:a.borderRight[e]}))}),n}function TS(t){for(var e;t.hasNode(e=Ic("_root")););return e}function ES(t,e){for(var r=0,i=1;i<e.length;++i)r+=CS(t,e[i-1],e[i]);return r}function CS(t,e,r){for(var i=N9(r,Oe(r,function(h,u){return u})),n=qs(Oe(e,function(h){return lo(Oe(t.outEdges(h),function(u){return{pos:i[u.w],weight:t.edge(u).weight}}),"pos")})),s=1;s<r.length;)s<<=1;var a=2*s-1;s-=1;var o=Oe(new Array(a),function(){return 0}),l=0;return dt(n.forEach(function(h){var u=h.pos+s;o[u]+=h.weight;for(var f=0;u>0;)u%2&&(f+=o[u+1]),u=u-1>>1,o[u]+=h.weight;l+=h.weight*f})),l}function SS(t){var e={},r=Vi(t.nodes(),function(o){return!t.children(o).length}),i=Fn(Oe(r,function(o){return t.node(o).rank})),n=Oe(Pn(i+1),function(){return[]});function s(o){if(!Qt(e,o)){e[o]=!0;var l=t.node(o);n[l.rank].push(o),dt(t.successors(o),s)}}var a=lo(r,function(o){return t.node(o).rank});return dt(a,s),n}function AS(t,e){return Oe(e,function(r){var i=t.inEdges(r);if(i.length){var n=oo(i,function(s,a){var o=t.edge(a),l=t.node(a.v);return{sum:s.sum+o.weight*l.order,weight:s.weight+o.weight}},{sum:0,weight:0});return{v:r,barycenter:n.sum/n.weight,weight:n.weight}}else return{v:r}})}function LS(t,e){var r={};dt(t,function(n,s){var a=r[n.v]={indegree:0,in:[],out:[],vs:[n.v],i:s};Be(n.barycenter)||(a.barycenter=n.barycenter,a.weight=n.weight)}),dt(e.edges(),function(n){var s=r[n.v],a=r[n.w];!Be(s)&&!Be(a)&&(a.indegree++,s.out.push(r[n.w]))});var i=Vi(r,function(n){return!n.indegree});return BS(i)}function BS(t){var e=[];function r(s){return function(a){a.merged||(Be(a.barycenter)||Be(s.barycenter)||a.barycenter>=s.barycenter)&&DS(s,a)}}function i(s){return function(a){a.in.push(s),--a.indegree===0&&t.push(a)}}for(;t.length;){var n=t.pop();e.push(n),dt(n.in.reverse(),r(n)),dt(n.out,i(n))}return Oe(Vi(e,function(s){return!s.merged}),function(s){return Ya(s,["vs","i","barycenter","weight"])})}function DS(t,e){var r=0,i=0;t.weight&&(r+=t.barycenter*t.weight,i+=t.weight),e.weight&&(r+=e.barycenter*e.weight,i+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=r/i,t.weight=i,t.i=Math.min(e.i,t.i),e.merged=!0}function IS(t,e){var r=X9(t,function(u){return Qt(u,"barycenter")}),i=r.lhs,n=lo(r.rhs,function(u){return-u.i}),s=[],a=0,o=0,l=0;i.sort(MS(!!e)),l=yd(s,n,l),dt(i,function(u){l+=u.vs.length,s.push(u.vs),a+=u.barycenter*u.weight,o+=u.weight,l=yd(s,n,l)});var h={vs:qs(s)};return o&&(h.barycenter=a/o,h.weight=o),h}function yd(t,e,r){for(var i;e.length&&(i=Ll(e)).i<=r;)e.pop(),t.push(i.vs),r++;return r}function MS(t){return function(e,r){return e.barycenter<r.barycenter?-1:e.barycenter>r.barycenter?1:t?r.i-e.i:e.i-r.i}}function Ng(t,e,r,i){var n=t.children(e),s=t.node(e),a=s?s.borderLeft:void 0,o=s?s.borderRight:void 0,l={};a&&(n=Vi(n,function(m){return m!==a&&m!==o}));var h=AS(t,n);dt(h,function(m){if(t.children(m.v).length){var b=Ng(t,m.v,r,i);l[m.v]=b,Qt(b,"barycenter")&&RS(m,b)}});var u=LS(h,r);NS(u,l);var f=IS(u,i);if(a&&(f.vs=qs([a,f.vs,o]),t.predecessors(a).length)){var d=t.node(t.predecessors(a)[0]),p=t.node(t.predecessors(o)[0]);Qt(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+d.order+p.order)/(f.weight+2),f.weight+=2}return f}function NS(t,e){dt(t,function(r){r.vs=qs(r.vs.map(function(i){return e[i]?e[i].vs:i}))})}function RS(t,e){Be(t.barycenter)?(t.barycenter=e.barycenter,t.weight=e.weight):(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight)}function OS(t){var e=wg(t),r=md(t,Pn(1,e+1),"inEdges"),i=md(t,Pn(e-1,-1,-1),"outEdges"),n=SS(t);bd(t,n);for(var s=Number.POSITIVE_INFINITY,a,o=0,l=0;l<4;++o,++l){FS(o%2?r:i,o%4>=2),n=Mc(t);var h=ES(t,n);h<s&&(l=0,a=ZE(n),s=h)}bd(t,a)}function md(t,e,r){return Oe(e,function(i){return wS(t,i,r)})}function FS(t,e){var r=new Pe;dt(t,function(i){var n=i.graph().root,s=Ng(i,n,r,e);dt(s.vs,function(a,o){i.node(a).order=o}),kS(i,r,s.vs)})}function bd(t,e){dt(e,function(r){dt(r,function(i,n){t.node(i).order=n})})}function PS(t){var e=YS(t);dt(t.graph().dummyChains,function(r){for(var i=t.node(r),n=i.edgeObj,s=VS(t,e,n.v,n.w),a=s.path,o=s.lca,l=0,h=a[l],u=!0;r!==n.w;){if(i=t.node(r),u){for(;(h=a[l])!==o&&t.node(h).maxRank<i.rank;)l++;h===o&&(u=!1)}if(!u){for(;l<a.length-1&&t.node(h=a[l+1]).minRank<=i.rank;)l++;h=a[l]}t.setParent(r,h),r=t.successors(r)[0]}})}function VS(t,e,r,i){var n=[],s=[],a=Math.min(e[r].low,e[i].low),o=Math.max(e[r].lim,e[i].lim),l,h;l=r;do l=t.parent(l),n.push(l);while(l&&(e[l].low>a||o>e[l].lim));for(h=l,l=i;(l=t.parent(l))!==h;)s.push(l);return{path:n.concat(s.reverse()),lca:h}}function YS(t){var e={},r=0;function i(n){var s=r;dt(t.children(n),i),e[n]={low:s,lim:r++}}return dt(t.children(),i),e}function zS(t,e){var r={};function i(n,s){var a=0,o=0,l=n.length,h=Ll(s);return dt(s,function(u,f){var d=WS(t,u),p=d?t.node(d).order:l;(d||u===h)&&(dt(s.slice(o,f+1),function(m){dt(t.predecessors(m),function(b){var x=t.node(b),k=x.order;(k<a||p<k)&&!(x.dummy&&t.node(m).dummy)&&Rg(r,b,m)})}),o=f+1,a=p)}),s}return oo(e,i),r}function US(t,e){var r={};function i(s,a,o,l,h){var u;dt(Pn(a,o),function(f){u=s[f],t.node(u).dummy&&dt(t.predecessors(u),function(d){var p=t.node(d);p.dummy&&(p.order<l||p.order>h)&&Rg(r,d,u)})})}function n(s,a){var o=-1,l,h=0;return dt(a,function(u,f){if(t.node(u).dummy==="border"){var d=t.predecessors(u);d.length&&(l=t.node(d[0]).order,i(a,h,f,o,l),h=f,o=l)}i(a,h,a.length,l,s.length)}),a}return oo(e,n),r}function WS(t,e){if(t.node(e).dummy)return B1(t.predecessors(e),function(r){return t.node(r).dummy})}function Rg(t,e,r){if(e>r){var i=e;e=r,r=i}var n=t[e];n||(t[e]=n={}),n[r]=!0}function HS(t,e,r){if(e>r){var i=e;e=r,r=i}return Qt(t[e],r)}function qS(t,e,r,i){var n={},s={},a={};return dt(e,function(o){dt(o,function(l,h){n[l]=l,s[l]=l,a[l]=h})}),dt(e,function(o){var l=-1;dt(o,function(h){var u=i(h);if(u.length){u=lo(u,function(b){return a[b]});for(var f=(u.length-1)/2,d=Math.floor(f),p=Math.ceil(f);d<=p;++d){var m=u[d];s[h]===h&&l<a[m]&&!HS(r,h,m)&&(s[m]=h,s[h]=n[h]=n[m],l=a[m])}}})}),{root:n,align:s}}function GS(t,e,r,i,n){var s={},a=$S(t,e,r,n),o=n?"borderLeft":"borderRight";function l(f,d){for(var p=a.nodes(),m=p.pop(),b={};m;)b[m]?f(m):(b[m]=!0,p.push(m),p=p.concat(d(m))),m=p.pop()}function h(f){s[f]=a.inEdges(f).reduce(function(d,p){return Math.max(d,s[p.v]+a.edge(p))},0)}function u(f){var d=a.outEdges(f).reduce(function(m,b){return Math.min(m,s[b.w]-a.edge(b))},Number.POSITIVE_INFINITY),p=t.node(f);d!==Number.POSITIVE_INFINITY&&p.borderType!==o&&(s[f]=Math.max(s[f],d))}return l(h,a.predecessors.bind(a)),l(u,a.successors.bind(a)),dt(i,function(f){s[f]=s[r[f]]}),s}function $S(t,e,r,i){var n=new Pe,s=t.graph(),a=QS(s.nodesep,s.edgesep,i);return dt(e,function(o){var l;dt(o,function(h){var u=r[h];if(n.setNode(u),l){var f=r[l],d=n.edge(f,u);n.setEdge(f,u,Math.max(a(t,h,l),d||0))}l=h})}),n}function jS(t,e){return I1(Wi(e),function(r){var i=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY;return JC(r,function(s,a){var o=JS(t,a)/2;i=Math.max(s+o,i),n=Math.min(s-o,n)}),i-n})}function XS(t,e){var r=Wi(e),i=Va(r),n=Fn(r);dt(["u","d"],function(s){dt(["l","r"],function(a){var o=s+a,l=t[o],h;if(l!==e){var u=Wi(l);h=a==="l"?i-Va(u):n-Fn(u),h&&(t[o]=Dc(l,function(f){return f+h}))}})})}function KS(t,e){return Dc(t.ul,function(r,i){if(e)return t[e.toLowerCase()][i];var n=lo(Oe(t,i));return(n[1]+n[2])/2})}function ZS(t){var e=Mc(t),r=pu(zS(t,e),US(t,e)),i={},n;dt(["u","d"],function(a){n=a==="u"?e:Wi(e).reverse(),dt(["l","r"],function(o){o==="r"&&(n=Oe(n,function(f){return Wi(f).reverse()}));var l=(a==="u"?t.predecessors:t.successors).bind(t),h=qS(t,n,r,l),u=GS(t,n,h.root,h.align,o==="r");o==="r"&&(u=Dc(u,function(f){return-f})),i[a+o]=u})});var s=jS(t,i);return XS(i,s),KS(i,t.graph().align)}function QS(t,e,r){return function(i,n,s){var a=i.node(n),o=i.node(s),l=0,h;if(l+=a.width/2,Qt(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":h=-a.width/2;break;case"r":h=a.width/2;break}if(h&&(l+=r?h:-h),h=0,l+=(a.dummy?e:t)/2,l+=(o.dummy?e:t)/2,l+=o.width/2,Qt(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":h=o.width/2;break;case"r":h=-o.width/2;break}return h&&(l+=r?h:-h),h=0,l}}function JS(t,e){return t.node(e).width}function tA(t){t=kg(t),eA(t),dt(ZS(t),function(e,r){t.node(r).x=e})}function eA(t){var e=Mc(t),r=t.graph().ranksep,i=0;dt(e,function(n){var s=Fn(Oe(n,function(a){return t.node(a).height}));dt(n,function(a){t.node(a).y=i+s/2}),i+=s+r})}function $s(t,e){var r=e&&e.debugTiming?K9:Z9;r("layout",function(){var i=r(" buildLayoutGraph",function(){return fA(t)});r(" runLayout",function(){rA(i,r)}),r(" updateInputGraph",function(){iA(t,i)})})}function rA(t,e){e(" makeSpaceForEdgeLabels",function(){dA(t)}),e(" removeSelfEdges",function(){kA(t)}),e(" acyclic",function(){W9(t)}),e(" nestingGraph.run",function(){bS(t)}),e(" rank",function(){gS(kg(t))}),e(" injectEdgeLabelProxies",function(){pA(t)}),e(" removeEmptyRanks",function(){j9(t)}),e(" nestingGraph.cleanup",function(){vS(t)}),e(" normalizeRanks",function(){$9(t)}),e(" assignRankMinMax",function(){gA(t)}),e(" removeEdgeLabelProxies",function(){yA(t)}),e(" normalize.run",function(){iS(t)}),e(" parentDummyChains",function(){PS(t)}),e(" addBorderSegments",function(){Q9(t)}),e(" order",function(){OS(t)}),e(" insertSelfEdges",function(){wA(t)}),e(" adjustCoordinateSystem",function(){J9(t)}),e(" position",function(){tA(t)}),e(" positionSelfEdges",function(){TA(t)}),e(" removeBorderNodes",function(){vA(t)}),e(" normalize.undo",function(){sS(t)}),e(" fixupEdgeLabelCoords",function(){_A(t)}),e(" undoCoordinateSystem",function(){tS(t)}),e(" translateGraph",function(){mA(t)}),e(" assignNodeIntersects",function(){bA(t)}),e(" reversePoints",function(){xA(t)}),e(" acyclic.undo",function(){q9(t)})}function iA(t,e){dt(t.nodes(),function(r){var i=t.node(r),n=e.node(r);i&&(i.x=n.x,i.y=n.y,e.children(r).length&&(i.width=n.width,i.height=n.height))}),dt(t.edges(),function(r){var i=t.edge(r),n=e.edge(r);i.points=n.points,Qt(n,"x")&&(i.x=n.x,i.y=n.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}var nA=["nodesep","edgesep","ranksep","marginx","marginy"],sA={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},aA=["acyclicer","ranker","rankdir","align"],oA=["width","height"],lA={width:0,height:0},cA=["minlen","weight","width","height","labeloffset"],hA={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},uA=["labelpos"];function fA(t){var e=new Pe({multigraph:!0,compound:!0}),r=Bh(t.graph());return e.setGraph(pu({},sA,Lh(r,nA),Ya(r,aA))),dt(t.nodes(),function(i){var n=Bh(t.node(i));e.setNode(i,ns(Lh(n,oA),lA)),e.setParent(i,t.parent(i))}),dt(t.edges(),function(i){var n=Bh(t.edge(i));e.setEdge(i,pu({},hA,Lh(n,cA),Ya(n,uA)))}),e}function dA(t){var e=t.graph();e.ranksep/=2,dt(t.edges(),function(r){var i=t.edge(r);i.minlen*=2,i.labelpos.toLowerCase()!=="c"&&(e.rankdir==="TB"||e.rankdir==="BT"?i.width+=i.labeloffset:i.height+=i.labeloffset)})}function pA(t){dt(t.edges(),function(e){var r=t.edge(e);if(r.width&&r.height){var i=t.node(e.v),n=t.node(e.w),s={rank:(n.rank-i.rank)/2+i.rank,e};Gs(t,"edge-proxy",s,"_ep")}})}function gA(t){var e=0;dt(t.nodes(),function(r){var i=t.node(r);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,e=Fn(e,i.maxRank))}),t.graph().maxRank=e}function yA(t){dt(t.nodes(),function(e){var r=t.node(e);r.dummy==="edge-proxy"&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}function mA(t){var e=Number.POSITIVE_INFINITY,r=0,i=Number.POSITIVE_INFINITY,n=0,s=t.graph(),a=s.marginx||0,o=s.marginy||0;function l(h){var u=h.x,f=h.y,d=h.width,p=h.height;e=Math.min(e,u-d/2),r=Math.max(r,u+d/2),i=Math.min(i,f-p/2),n=Math.max(n,f+p/2)}dt(t.nodes(),function(h){l(t.node(h))}),dt(t.edges(),function(h){var u=t.edge(h);Qt(u,"x")&&l(u)}),e-=a,i-=o,dt(t.nodes(),function(h){var u=t.node(h);u.x-=e,u.y-=i}),dt(t.edges(),function(h){var u=t.edge(h);dt(u.points,function(f){f.x-=e,f.y-=i}),Qt(u,"x")&&(u.x-=e),Qt(u,"y")&&(u.y-=i)}),s.width=r-e+a,s.height=n-i+o}function bA(t){dt(t.edges(),function(e){var r=t.edge(e),i=t.node(e.v),n=t.node(e.w),s,a;r.points?(s=r.points[0],a=r.points[r.points.length-1]):(r.points=[],s=n,a=i),r.points.unshift(hd(i,s)),r.points.push(hd(n,a))})}function _A(t){dt(t.edges(),function(e){var r=t.edge(e);if(Qt(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function xA(t){dt(t.edges(),function(e){var r=t.edge(e);r.reversed&&r.points.reverse()})}function vA(t){dt(t.nodes(),function(e){if(t.children(e).length){var r=t.node(e),i=t.node(r.borderTop),n=t.node(r.borderBottom),s=t.node(Ll(r.borderLeft)),a=t.node(Ll(r.borderRight));r.width=Math.abs(a.x-s.x),r.height=Math.abs(n.y-i.y),r.x=s.x+r.width/2,r.y=i.y+r.height/2}}),dt(t.nodes(),function(e){t.node(e).dummy==="border"&&t.removeNode(e)})}function kA(t){dt(t.edges(),function(e){if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}})}function wA(t){var e=Mc(t);dt(e,function(r){var i=0;dt(r,function(n,s){var a=t.node(n);a.order=s+i,dt(a.selfEdges,function(o){Gs(t,"selfedge",{width:o.label.width,height:o.label.height,rank:a.rank,order:s+ ++i,e:o.e,label:o.label},"_se")}),delete a.selfEdges})})}function TA(t){dt(t.nodes(),function(e){var r=t.node(e);if(r.dummy==="selfedge"){var i=t.node(r.e.v),n=i.x+i.width/2,s=i.y,a=r.x-n,o=i.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:n+2*a/3,y:s-o},{x:n+5*a/6,y:s-o},{x:n+a,y:s},{x:n+5*a/6,y:s+o},{x:n+2*a/3,y:s+o}],r.label.x=r.x,r.label.y=r.y}})}function Lh(t,e){return Dc(Ya(t,e),Number)}function Bh(t){var e={};return dt(t,function(r,i){e[i.toLowerCase()]=r}),e}function Yi(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:EA(t),edges:CA(t)};return Be(t.graph())||(e.value=jE(t.graph())),e}function EA(t){return Oe(t.nodes(),function(e){var r=t.node(e),i=t.parent(e),n={v:e};return Be(r)||(n.value=r),Be(i)||(n.parent=i),n})}function CA(t){return Oe(t.edges(),function(e){var r=t.edge(e),i={v:e.v,w:e.w};return Be(e.name)||(i.name=e.name),Be(r)||(i.value=r),i})}function Og(t,e){return!!t.children(e).length}function Fg(t){return Dh(t.v)+":"+Dh(t.w)+":"+Dh(t.name)}var SA=/:/g;function Dh(t){return t?String(t).replace(SA,"\\:"):""}function xi(t,e){e&&t.attr("style",e)}function Pg(t,e,r){e&&t.attr("class",e).attr("class",r+" "+t.attr("class"))}function ti(t,e){var r=e.graph();if(Zp(r)){var i=r.transition;if(As(i))return i(t)}return t}var yu={normal:LA,vee:BA,undirected:DA};function AA(t){yu=t}function LA(t,e,r,i){var n=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=n.append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");xi(s,r[i+"Style"]),r[i+"Class"]&&s.attr("class",r[i+"Class"])}function BA(t,e,r,i){var n=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=n.append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");xi(s,r[i+"Style"]),r[i+"Class"]&&s.attr("class",r[i+"Class"])}function DA(t,e,r,i){var n=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=n.append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");xi(s,r[i+"Style"]),r[i+"Class"]&&s.attr("class",r[i+"Class"])}function O1(t,e){var r=t.append("foreignObject").attr("width","100000"),i=r.append("xhtml:div");i.attr("xmlns","http://www.w3.org/1999/xhtml");var n=e.label;switch(typeof n){case"function":i.insert(n);break;case"object":i.insert(function(){return n});break;default:i.html(n)}xi(i,e.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap");var s=i.node().getBoundingClientRect();return r.attr("width",s.width).attr("height",s.height),r}function IA(t,e){var r=t;return r.node().appendChild(e.label),xi(r,e.labelStyle),r}function MA(t,e){for(var r=t.append("text"),i=NA(e.label).split(`
9
- `),n=0;n<i.length;n++)r.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(i[n]);return xi(r,e.labelStyle),r}function NA(t){for(var e="",r=!1,i,n=0;n<t.length;++n)if(i=t[n],r){switch(i){case"n":e+=`
10
- `;break;default:e+=i}r=!1}else i==="\\"?r=!0:e+=i;return e}function F1(t,e,r){var i=e.label,n=t.append("g");e.labelType==="svg"?IA(n,e):typeof i!="string"||e.labelType==="html"?O1(n,e):MA(n,e);var s=n.node().getBBox(),a;switch(r){case"top":a=-e.height/2;break;case"bottom":a=e.height/2-s.height;break;default:a=-s.height/2}return n.attr("transform","translate("+-s.width/2+","+a+")"),n}var mu=function(t,e){var r=e.nodes().filter(function(s){return Og(e,s)}),i=t.selectAll("g.cluster").data(r,function(s){return s});ti(i.exit(),e).style("opacity",0).remove();var n=i.enter().append("g").attr("class","cluster").attr("id",function(s){var a=e.node(s);return a.id}).style("opacity",0).each(function(s){var a=e.node(s),o=_t(this);_t(this).append("rect");var l=o.append("g").attr("class","label");F1(l,a,a.clusterLabelPos)});return i=i.merge(n),i=ti(i,e).style("opacity",1),i.selectAll("rect").each(function(s){var a=e.node(s),o=_t(this);xi(o,a.style)}),i};function RA(t){mu=t}let bu=function(t,e){var r=t.selectAll("g.edgeLabel").data(e.edges(),function(n){return Fg(n)}).classed("update",!0);r.exit().remove(),r.enter().append("g").classed("edgeLabel",!0).style("opacity",0),r=t.selectAll("g.edgeLabel"),r.each(function(n){var s=_t(this);s.select(".label").remove();var a=e.edge(n),o=F1(s,e.edge(n),0).classed("label",!0),l=o.node().getBBox();a.labelId&&o.attr("id",a.labelId),Qt(a,"width")||(a.width=l.width),Qt(a,"height")||(a.height=l.height)});var i;return r.exit?i=r.exit():i=r.selectAll(null),ti(i,e).style("opacity",0).remove(),r};function OA(t){bu=t}function _d(t,e){return t.intersect(e)}var _u=function(t,e,r){var i=t.selectAll("g.edgePath").data(e.edges(),function(a){return Fg(a)}).classed("update",!0),n=zA(i,e);UA(i,e);var s=i.merge!==void 0?i.merge(n):i;return ti(s,e).style("opacity",1),s.each(function(a){var o=_t(this),l=e.edge(a);l.elem=this,l.id&&o.attr("id",l.id),Pg(o,l.class,(o.classed("update")?"update ":"")+"edgePath")}),s.selectAll("path.path").each(function(a){var o=e.edge(a);o.arrowheadId=Ic("arrowhead");var l=_t(this).attr("marker-end",function(){return"url("+PA(location.href,o.arrowheadId)+")"}).style("fill","none");ti(l,e).attr("d",function(h){return VA(e,h)}),xi(l,o.style)}),s.selectAll("defs *").remove(),s.selectAll("defs").each(function(a){var o=e.edge(a),l=r[o.arrowhead];l(_t(this),o.arrowheadId,o,"arrowhead")}),s};function FA(t){_u=t}function PA(t,e){var r=t.split("#")[0];return r+"#"+e}function VA(t,e){var r=t.edge(e),i=t.node(e.v),n=t.node(e.w),s=r.points.slice(1,r.points.length-1);return s.unshift(_d(i,s[0])),s.push(_d(n,s[s.length-1])),Vg(r,s)}function Vg(t,e){var r=(Us||i6.line)().x(function(i){return i.x}).y(function(i){return i.y});return(r.curve||r.interpolate)(t.curve),r(e)}function YA(t){var e=t.getBBox(),r=t.ownerSVGElement.getScreenCTM().inverse().multiply(t.getScreenCTM()).translate(e.width/2,e.height/2);return{x:r.e,y:r.f}}function zA(t,e){var r=t.enter().append("g").attr("class","edgePath").style("opacity",0);return r.append("path").attr("class","path").attr("d",function(i){var n=e.edge(i),s=e.node(i.v).elem,a=Pn(n.points.length).map(function(){return YA(s)});return Vg(n,a)}),r.append("defs"),r}function UA(t,e){var r=t.exit();ti(r,e).style("opacity",0).remove()}var xu=function(t,e,r){var i=e.nodes().filter(function(a){return!Og(e,a)}),n=t.selectAll("g.node").data(i,function(a){return a}).classed("update",!0);n.exit().remove(),n.enter().append("g").attr("class","node").style("opacity",0),n=t.selectAll("g.node"),n.each(function(a){var o=e.node(a),l=_t(this);Pg(l,o.class,(l.classed("update")?"update ":"")+"node"),l.select("g.label").remove();var h=l.append("g").attr("class","label"),u=F1(h,o),f=r[o.shape],d=Ya(u.node().getBBox(),"width","height");o.elem=this,o.id&&l.attr("id",o.id),o.labelId&&h.attr("id",o.labelId),Qt(o,"width")&&(d.width=o.width),Qt(o,"height")&&(d.height=o.height),d.width+=o.paddingLeft+o.paddingRight,d.height+=o.paddingTop+o.paddingBottom,h.attr("transform","translate("+(o.paddingLeft-o.paddingRight)/2+","+(o.paddingTop-o.paddingBottom)/2+")");var p=_t(this);p.select(".label-container").remove();var m=f(p,d,o).classed("label-container",!0);xi(m,o.style);var b=m.node().getBBox();o.width=b.width,o.height=b.height});var s;return n.exit?s=n.exit():s=n.selectAll(null),ti(s,e).style("opacity",0).remove(),n};function WA(t){xu=t}function HA(t,e){var r=t.filter(function(){return!_t(this).classed("update")});function i(n){var s=e.node(n);return"translate("+s.x+","+s.y+")"}r.attr("transform",i),ti(t,e).style("opacity",1).attr("transform",i),ti(r.selectAll("rect"),e).attr("width",function(n){return e.node(n).width}).attr("height",function(n){return e.node(n).height}).attr("x",function(n){var s=e.node(n);return-s.width/2}).attr("y",function(n){var s=e.node(n);return-s.height/2})}function qA(t,e){var r=t.filter(function(){return!_t(this).classed("update")});function i(n){var s=e.edge(n);return Qt(s,"x")?"translate("+s.x+","+s.y+")":""}r.attr("transform",i),ti(t,e).style("opacity",1).attr("transform",i)}function GA(t,e){var r=t.filter(function(){return!_t(this).classed("update")});function i(n){var s=e.node(n);return"translate("+s.x+","+s.y+")"}r.attr("transform",i),ti(t,e).style("opacity",1).attr("transform",i)}function Yg(t,e,r,i){var n=t.x,s=t.y,a=n-i.x,o=s-i.y,l=Math.sqrt(e*e*o*o+r*r*a*a),h=Math.abs(e*r*a/l);i.x<n&&(h=-h);var u=Math.abs(e*r*o/l);return i.y<s&&(u=-u),{x:n+h,y:s+u}}function $A(t,e,r){return Yg(t,e,e,r)}function jA(t,e,r,i){var n,s,a,o,l,h,u,f,d,p,m,b,x,k,v;if(n=e.y-t.y,a=t.x-e.x,l=e.x*t.y-t.x*e.y,d=n*r.x+a*r.y+l,p=n*i.x+a*i.y+l,!(d!==0&&p!==0&&xd(d,p))&&(s=i.y-r.y,o=r.x-i.x,h=i.x*r.y-r.x*i.y,u=s*t.x+o*t.y+h,f=s*e.x+o*e.y+h,!(u!==0&&f!==0&&xd(u,f))&&(m=n*o-s*a,m!==0)))return b=Math.abs(m/2),x=a*h-o*l,k=x<0?(x-b)/m:(x+b)/m,x=s*l-n*h,v=x<0?(x-b)/m:(x+b)/m,{x:k,y:v}}function xd(t,e){return t*e>0}function vi(t,e,r){var i=t.x,n=t.y,s=[],a=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;e.forEach(function(m){a=Math.min(a,m.x),o=Math.min(o,m.y)});for(var l=i-t.width/2-a,h=n-t.height/2-o,u=0;u<e.length;u++){var f=e[u],d=e[u<e.length-1?u+1:0],p=jA(t,r,{x:l+f.x,y:h+f.y},{x:l+d.x,y:h+d.y});p&&s.push(p)}return s.length?(s.length>1&&s.sort(function(m,b){var x=m.x-r.x,k=m.y-r.y,v=Math.sqrt(x*x+k*k),B=b.x-r.x,R=b.y-r.y,P=Math.sqrt(B*B+R*R);return v<P?-1:v===P?0:1}),s[0]):(console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t)}function P1(t,e){var r=t.x,i=t.y,n=e.x-r,s=e.y-i,a=t.width/2,o=t.height/2,l,h;return Math.abs(s)*a>Math.abs(n)*o?(s<0&&(o=-o),l=s===0?0:o*n/s,h=o):(n<0&&(a=-a),l=a,h=n===0?0:a*s/n),{x:r+l,y:i+h}}var vu={rect:KA,ellipse:ZA,circle:QA,diamond:JA};function XA(t){vu=t}function KA(t,e,r){var i=t.insert("rect",":first-child").attr("rx",r.rx).attr("ry",r.ry).attr("x",-e.width/2).attr("y",-e.height/2).attr("width",e.width).attr("height",e.height);return r.intersect=function(n){return P1(r,n)},i}function ZA(t,e,r){var i=e.width/2,n=e.height/2,s=t.insert("ellipse",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("rx",i).attr("ry",n);return r.intersect=function(a){return Yg(r,i,n,a)},s}function QA(t,e,r){var i=Math.max(e.width,e.height)/2,n=t.insert("circle",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("r",i);return r.intersect=function(s){return $A(r,i,s)},n}function JA(t,e,r){var i=e.width*Math.SQRT2/2,n=e.height*Math.SQRT2/2,s=[{x:0,y:-n},{x:-i,y:0},{x:0,y:n},{x:i,y:0}],a=t.insert("polygon",":first-child").attr("points",s.map(function(o){return o.x+","+o.y}).join(" "));return r.intersect=function(o){return vi(r,s,o)},a}function tL(){var t=function(e,r){iL(r);var i=ia(e,"output"),n=ia(i,"clusters"),s=ia(i,"edgePaths"),a=bu(ia(i,"edgeLabels"),r),o=xu(ia(i,"nodes"),r,vu);$s(r),GA(o,r),qA(a,r),_u(s,r,yu);var l=mu(n,r);HA(l,r),nL(r)};return t.createNodes=function(e){return arguments.length?(WA(e),t):xu},t.createClusters=function(e){return arguments.length?(RA(e),t):mu},t.createEdgeLabels=function(e){return arguments.length?(OA(e),t):bu},t.createEdgePaths=function(e){return arguments.length?(FA(e),t):_u},t.shapes=function(e){return arguments.length?(XA(e),t):vu},t.arrows=function(e){return arguments.length?(AA(e),t):yu},t}var eL={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},rL={arrowhead:"normal",curve:Cr};function iL(t){t.nodes().forEach(function(e){var r=t.node(e);!Qt(r,"label")&&!t.children(e).length&&(r.label=e),Qt(r,"paddingX")&&ns(r,{paddingLeft:r.paddingX,paddingRight:r.paddingX}),Qt(r,"paddingY")&&ns(r,{paddingTop:r.paddingY,paddingBottom:r.paddingY}),Qt(r,"padding")&&ns(r,{paddingLeft:r.padding,paddingRight:r.padding,paddingTop:r.padding,paddingBottom:r.padding}),ns(r,eL),dt(["paddingLeft","paddingRight","paddingTop","paddingBottom"],function(i){r[i]=Number(r[i])}),Qt(r,"width")&&(r._prevWidth=r.width),Qt(r,"height")&&(r._prevHeight=r.height)}),t.edges().forEach(function(e){var r=t.edge(e);Qt(r,"label")||(r.label=""),ns(r,rL)})}function nL(t){dt(t.nodes(),function(e){var r=t.node(e);Qt(r,"_prevWidth")?r.width=r._prevWidth:delete r.width,Qt(r,"_prevHeight")?r.height=r._prevHeight:delete r.height,delete r._prevWidth,delete r._prevHeight})}function ia(t,e){var r=t.select("g."+e);return r.empty()&&(r=t.append("g").attr("class",e)),r}var zg={exports:{}};(function(t,e){(function(r,i){t.exports=i()})(lc,function(){var r="day";return function(i,n,s){var a=function(h){return h.add(4-h.isoWeekday(),r)},o=n.prototype;o.isoWeekYear=function(){return a(this).year()},o.isoWeek=function(h){if(!this.$utils().u(h))return this.add(7*(h-this.isoWeek()),r);var u,f,d,p,m=a(this),b=(u=this.isoWeekYear(),f=this.$u,d=(f?s.utc:s)().year(u).startOf("year"),p=4-d.isoWeekday(),d.isoWeekday()>4&&(p+=7),d.add(p,r));return m.diff(b,"week")+1},o.isoWeekday=function(h){return this.$utils().u(h)?this.day()||7:this.day(this.day()%7?h:h-7)};var l=o.startOf;o.startOf=function(h,u){var f=this.$utils(),d=!!f.u(u)||u;return f.p(h)==="isoweek"?d?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):l.bind(this)(h,u)}}})})(zg);var sL=zg.exports;const aL=cc(sL);var Ug={exports:{}};(function(t,e){(function(r,i){t.exports=i()})(lc,function(){var r={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},i=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,s=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},l=function(b){return(b=+b)+(b>68?1900:2e3)},h=function(b){return function(x){this[b]=+x}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(b){(this.zone||(this.zone={})).offset=function(x){if(!x||x==="Z")return 0;var k=x.match(/([+-]|\d\d)/g),v=60*k[1]+(+k[2]||0);return v===0?0:k[0]==="+"?-v:v}(b)}],f=function(b){var x=o[b];return x&&(x.indexOf?x:x.s.concat(x.f))},d=function(b,x){var k,v=o.meridiem;if(v){for(var B=1;B<=24;B+=1)if(b.indexOf(v(B,0,x))>-1){k=B>12;break}}else k=b===(x?"pm":"PM");return k},p={A:[a,function(b){this.afternoon=d(b,!1)}],a:[a,function(b){this.afternoon=d(b,!0)}],S:[/\d/,function(b){this.milliseconds=100*+b}],SS:[n,function(b){this.milliseconds=10*+b}],SSS:[/\d{3}/,function(b){this.milliseconds=+b}],s:[s,h("seconds")],ss:[s,h("seconds")],m:[s,h("minutes")],mm:[s,h("minutes")],H:[s,h("hours")],h:[s,h("hours")],HH:[s,h("hours")],hh:[s,h("hours")],D:[s,h("day")],DD:[n,h("day")],Do:[a,function(b){var x=o.ordinal,k=b.match(/\d+/);if(this.day=k[0],x)for(var v=1;v<=31;v+=1)x(v).replace(/\[|\]/g,"")===b&&(this.day=v)}],M:[s,h("month")],MM:[n,h("month")],MMM:[a,function(b){var x=f("months"),k=(f("monthsShort")||x.map(function(v){return v.slice(0,3)})).indexOf(b)+1;if(k<1)throw new Error;this.month=k%12||k}],MMMM:[a,function(b){var x=f("months").indexOf(b)+1;if(x<1)throw new Error;this.month=x%12||x}],Y:[/[+-]?\d+/,h("year")],YY:[n,function(b){this.year=l(b)}],YYYY:[/\d{4}/,h("year")],Z:u,ZZ:u};function m(b){var x,k;x=b,k=o&&o.formats;for(var v=(b=x.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(C,S,E){var _=E&&E.toUpperCase();return S||k[E]||r[E]||k[_].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(w,g,D){return g||D.slice(1)})})).match(i),B=v.length,R=0;R<B;R+=1){var P=v[R],V=p[P],O=V&&V[0],F=V&&V[1];v[R]=F?{regex:O,parser:F}:P.replace(/^\[|\]$/g,"")}return function(C){for(var S={},E=0,_=0;E<B;E+=1){var w=v[E];if(typeof w=="string")_+=w.length;else{var g=w.regex,D=w.parser,y=C.slice(_),N=g.exec(y)[0];D.call(S,N),C=C.replace(N,"")}}return function(nt){var Y=nt.afternoon;if(Y!==void 0){var Z=nt.hours;Y?Z<12&&(nt.hours+=12):Z===12&&(nt.hours=0),delete nt.afternoon}}(S),S}}return function(b,x,k){k.p.customParseFormat=!0,b&&b.parseTwoDigitYear&&(l=b.parseTwoDigitYear);var v=x.prototype,B=v.parse;v.parse=function(R){var P=R.date,V=R.utc,O=R.args;this.$u=V;var F=O[1];if(typeof F=="string"){var C=O[2]===!0,S=O[3]===!0,E=C||S,_=O[2];S&&(_=O[2]),o=this.$locale(),!C&&_&&(o=k.Ls[_]),this.$d=function(y,N,nt){try{if(["x","X"].indexOf(N)>-1)return new Date((N==="X"?1e3:1)*y);var Y=m(N)(y),Z=Y.year,J=Y.month,X=Y.day,tt=Y.hours,ot=Y.minutes,at=Y.seconds,U=Y.milliseconds,Tt=Y.zone,$=new Date,j=X||(Z||J?1:$.getDate()),W=Z||$.getFullYear(),z=0;Z&&!J||(z=J>0?J-1:$.getMonth());var A=tt||0,M=ot||0,q=at||0,L=U||0;return Tt?new Date(Date.UTC(W,z,j,A,M,q,L+60*Tt.offset*1e3)):nt?new Date(Date.UTC(W,z,j,A,M,q,L)):new Date(W,z,j,A,M,q,L)}catch{return new Date("")}}(P,F,V),this.init(),_&&_!==!0&&(this.$L=this.locale(_).$L),E&&P!=this.format(F)&&(this.$d=new Date("")),o={}}else if(F instanceof Array)for(var w=F.length,g=1;g<=w;g+=1){O[1]=F[g-1];var D=k.apply(this,O);if(D.isValid()){this.$d=D.$d,this.$L=D.$L,this.init();break}g===w&&(this.$d=new Date(""))}else B.call(this,R)}}})})(Ug);var oL=Ug.exports;const lL=cc(oL);var Wg={exports:{}};(function(t,e){(function(r,i){t.exports=i()})(lc,function(){return function(r,i){var n=i.prototype,s=n.format;n.format=function(a){var o=this,l=this.$locale();if(!this.isValid())return s.bind(this)(a);var h=this.$utils(),u=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(f){switch(f){case"Q":return Math.ceil((o.$M+1)/3);case"Do":return l.ordinal(o.$D);case"gggg":return o.weekYear();case"GGGG":return o.isoWeekYear();case"wo":return l.ordinal(o.week(),"W");case"w":case"ww":return h.s(o.week(),f==="w"?1:2,"0");case"W":case"WW":return h.s(o.isoWeek(),f==="W"?1:2,"0");case"k":case"kk":return h.s(String(o.$H===0?24:o.$H),f==="k"?1:2,"0");case"X":return Math.floor(o.$d.getTime()/1e3);case"x":return o.$d.getTime();case"z":return"["+o.offsetName()+"]";case"zzz":return"["+o.offsetName("long")+"]";default:return f}});return s.bind(this)(u)}}})})(Wg);var cL=Wg.exports;const hL=cc(cL),Si={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},I={trace:(...t)=>{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},V1=function(t="fatal"){let e=Si.fatal;typeof t=="string"?(t=t.toLowerCase(),t in Si&&(e=Si[t])):typeof t=="number"&&(e=t),I.trace=()=>{},I.debug=()=>{},I.info=()=>{},I.warn=()=>{},I.error=()=>{},I.fatal=()=>{},e<=Si.fatal&&(I.fatal=console.error?console.error.bind(console,Rr("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Rr("FATAL"))),e<=Si.error&&(I.error=console.error?console.error.bind(console,Rr("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Rr("ERROR"))),e<=Si.warn&&(I.warn=console.warn?console.warn.bind(console,Rr("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Rr("WARN"))),e<=Si.info&&(I.info=console.info?console.info.bind(console,Rr("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Rr("INFO"))),e<=Si.debug&&(I.debug=console.debug?console.debug.bind(console,Rr("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Rr("DEBUG"))),e<=Si.trace&&(I.trace=console.debug?console.debug.bind(console,Rr("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Rr("TRACE")))},Rr=t=>`%c${xr().format("ss.SSS")} : ${t} : `,uL=t=>t?qg(t).replace(/\\n/g,"#br#").split("#br#"):[""],Hg=t=>Na.sanitize(t),vd=(t,e)=>{var r;if(((r=e.flowchart)==null?void 0:r.htmlLabels)!==!1){const i=e.securityLevel;i==="antiscript"||i==="strict"?t=Hg(t):i!=="loose"&&(t=qg(t),t=t.replace(/</g,"&lt;").replace(/>/g,"&gt;"),t=t.replace(/=/g,"&equals;"),t=gL(t))}return t},Ur=(t,e)=>t&&(e.dompurifyConfig?t=Na.sanitize(vd(t,e),e.dompurifyConfig).toString():t=Na.sanitize(vd(t,e),{FORBID_TAGS:["style"]}).toString(),t),fL=(t,e)=>typeof t=="string"?Ur(t,e):t.flat().map(r=>Ur(r,e)),Nc=/<br\s*\/?>/gi,dL=t=>Nc.test(t),pL=t=>t.split(Nc),gL=t=>t.replace(/#br#/g,"<br/>"),qg=t=>t.replace(Nc,"#br#"),yL=t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},Ke=t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),an=function(t){let e=t;if(t.split("~").length-1>=2){let r=e;do e=r,r=e.replace(/~([^\s,:;]+)~/,"<$1>");while(r!=e);return an(r)}else return e},Xt={getRows:uL,sanitizeText:Ur,sanitizeTextOrArray:fL,hasBreaks:dL,splitBreaks:pL,lineBreakRegex:Nc,removeScript:Hg,getUrl:yL,evaluate:Ke},hr=(t,e)=>e?lt(t,{s:-40,l:10}):lt(t,{s:-40,l:-10}),Rc="#ffffff",Oc="#f2f2f2";let mL=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||lt(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||lt(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||hr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||hr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||hr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||hr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||At(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||At(this.tertiaryColor),this.lineColor=this.lineColor||At(this.background),this.textColor=this.textColor||this.primaryTextColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Zt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Zt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||At(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||zt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||lt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||lt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||lt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||lt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||lt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||lt(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||lt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||lt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||lt(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=Zt(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=Zt(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||At(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||zt(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||Zt(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||lt(this.mainBkg,{h:180,s:-15,l:e*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||lt(this.mainBkg,{h:180,s:-15,l:e*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||lt(this.primaryColor,{h:64}),this.fillType3=this.fillType3||lt(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||lt(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||lt(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||lt(this.primaryColor,{h:128}),this.fillType7=this.fillType7||lt(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||lt(this.primaryColor,{l:-10}),this.pie5=this.pie5||lt(this.secondaryColor,{l:-10}),this.pie6=this.pie6||lt(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||lt(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||lt(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||lt(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||lt(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||lt(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||lt(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Zt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||lt(this.primaryColor,{h:-30}),this.git4=this.git4||lt(this.primaryColor,{h:-60}),this.git5=this.git5||lt(this.primaryColor,{h:-90}),this.git6=this.git6||lt(this.primaryColor,{h:60}),this.git7=this.git7||lt(this.primaryColor,{h:120}),this.darkMode?(this.git0=zt(this.git0,25),this.git1=zt(this.git1,25),this.git2=zt(this.git2,25),this.git3=zt(this.git3,25),this.git4=zt(this.git4,25),this.git5=zt(this.git5,25),this.git6=zt(this.git6,25),this.git7=zt(this.git7,25)):(this.git0=Zt(this.git0,25),this.git1=Zt(this.git1,25),this.git2=Zt(this.git2,25),this.git3=Zt(this.git3,25),this.git4=Zt(this.git4,25),this.git5=Zt(this.git5,25),this.git6=Zt(this.git6,25),this.git7=Zt(this.git7,25)),this.gitInv0=this.gitInv0||At(this.git0),this.gitInv1=this.gitInv1||At(this.git1),this.gitInv2=this.gitInv2||At(this.git2),this.gitInv3=this.gitInv3||At(this.git3),this.gitInv4=this.gitInv4||At(this.git4),this.gitInv5=this.gitInv5||At(this.git5),this.gitInv6=this.gitInv6||At(this.git6),this.gitInv7=this.gitInv7||At(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Rc,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oc}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}};const bL=t=>{const e=new mL;return e.calculate(t),e};let _L=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=zt(this.primaryColor,16),this.tertiaryColor=lt(this.primaryColor,{h:-160}),this.primaryBorderColor=At(this.background),this.secondaryBorderColor=hr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=hr(this.tertiaryColor,this.darkMode),this.primaryTextColor=At(this.primaryColor),this.secondaryTextColor=At(this.secondaryColor),this.tertiaryTextColor=At(this.tertiaryColor),this.lineColor=At(this.background),this.textColor=At(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=zt(At("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=ma(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=Zt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.taskBorderColor=ma(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=ma(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=zt(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=zt(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=zt(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=lt(this.primaryColor,{h:64}),this.fillType3=lt(this.secondaryColor,{h:64}),this.fillType4=lt(this.primaryColor,{h:-64}),this.fillType5=lt(this.secondaryColor,{h:-64}),this.fillType6=lt(this.primaryColor,{h:128}),this.fillType7=lt(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||lt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||lt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||lt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||lt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||lt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||lt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||lt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||lt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||lt(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||At(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||zt(this["cScale"+e],10);for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||lt(this.mainBkg,{h:30,s:-30,l:-(-10+e*4)}),this["surfacePeer"+e]=this["surfacePeer"+e]||lt(this.mainBkg,{h:30,s:-30,l:-(-7+e*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Zt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=zt(this.secondaryColor,20),this.git1=zt(this.pie2||this.secondaryColor,20),this.git2=zt(this.pie3||this.tertiaryColor,20),this.git3=zt(this.pie4||lt(this.primaryColor,{h:-30}),20),this.git4=zt(this.pie5||lt(this.primaryColor,{h:-60}),20),this.git5=zt(this.pie6||lt(this.primaryColor,{h:-90}),10),this.git6=zt(this.pie7||lt(this.primaryColor,{h:60}),10),this.git7=zt(this.pie8||lt(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||At(this.git0),this.gitInv1=this.gitInv1||At(this.git1),this.gitInv2=this.gitInv2||At(this.git2),this.gitInv3=this.gitInv3||At(this.git3),this.gitInv4=this.gitInv4||At(this.git4),this.gitInv5=this.gitInv5||At(this.git5),this.gitInv6=this.gitInv6||At(this.git6),this.gitInv7=this.gitInv7||At(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||zt(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||zt(this.background,2)}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}};const xL=t=>{const e=new _L;return e.calculate(t),e};let vL=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=lt(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=lt(this.primaryColor,{h:-160}),this.primaryBorderColor=hr(this.primaryColor,this.darkMode),this.secondaryBorderColor=hr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=hr(this.tertiaryColor,this.darkMode),this.primaryTextColor=At(this.primaryColor),this.secondaryTextColor=At(this.secondaryColor),this.tertiaryTextColor=At(this.tertiaryColor),this.lineColor=At(this.background),this.textColor=At(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=ma(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||lt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||lt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||lt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||lt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||lt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||lt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||lt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||lt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||lt(this.primaryColor,{h:330}),this["cScalePeer1"]=this["cScalePeer1"]||Zt(this.secondaryColor,45),this["cScalePeer2"]=this["cScalePeer2"]||Zt(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=Zt(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||Zt(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||lt(this["cScale"+e],{h:180});for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||lt(this.mainBkg,{h:30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||lt(this.mainBkg,{h:30,l:-(7+e*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||At(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||At(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=zt(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=lt(this.primaryColor,{h:64}),this.fillType3=lt(this.secondaryColor,{h:64}),this.fillType4=lt(this.primaryColor,{h:-64}),this.fillType5=lt(this.secondaryColor,{h:-64}),this.fillType6=lt(this.primaryColor,{h:128}),this.fillType7=lt(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||lt(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||lt(this.primaryColor,{l:-10}),this.pie5=this.pie5||lt(this.secondaryColor,{l:-30}),this.pie6=this.pie6||lt(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||lt(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||lt(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||lt(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||lt(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||lt(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||lt(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||lt(this.primaryColor,{h:-30}),this.git4=this.git4||lt(this.primaryColor,{h:-60}),this.git5=this.git5||lt(this.primaryColor,{h:-90}),this.git6=this.git6||lt(this.primaryColor,{h:60}),this.git7=this.git7||lt(this.primaryColor,{h:120}),this.darkMode?(this.git0=zt(this.git0,25),this.git1=zt(this.git1,25),this.git2=zt(this.git2,25),this.git3=zt(this.git3,25),this.git4=zt(this.git4,25),this.git5=zt(this.git5,25),this.git6=zt(this.git6,25),this.git7=zt(this.git7,25)):(this.git0=Zt(this.git0,25),this.git1=Zt(this.git1,25),this.git2=Zt(this.git2,25),this.git3=Zt(this.git3,25),this.git4=Zt(this.git4,25),this.git5=Zt(this.git5,25),this.git6=Zt(this.git6,25),this.git7=Zt(this.git7,25)),this.gitInv0=this.gitInv0||Zt(At(this.git0),25),this.gitInv1=this.gitInv1||At(this.git1),this.gitInv2=this.gitInv2||At(this.git2),this.gitInv3=this.gitInv3||At(this.git3),this.gitInv4=this.gitInv4||At(this.git4),this.gitInv5=this.gitInv5||At(this.git5),this.gitInv6=this.gitInv6||At(this.git6),this.gitInv7=this.gitInv7||At(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||At(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||At(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Rc,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oc}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}};const kL=t=>{const e=new vL;return e.calculate(t),e};let wL=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=zt("#cde498",10),this.primaryBorderColor=hr(this.primaryColor,this.darkMode),this.secondaryBorderColor=hr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=hr(this.tertiaryColor,this.darkMode),this.primaryTextColor=At(this.primaryColor),this.secondaryTextColor=At(this.secondaryColor),this.tertiaryTextColor=At(this.primaryColor),this.lineColor=At(this.background),this.textColor=At(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||lt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||lt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||lt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||lt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||lt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||lt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||lt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||lt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||lt(this.primaryColor,{h:330}),this["cScalePeer1"]=this["cScalePeer1"]||Zt(this.secondaryColor,45),this["cScalePeer2"]=this["cScalePeer2"]||Zt(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=Zt(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||Zt(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||lt(this["cScale"+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||lt(this.mainBkg,{h:30,s:-30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||lt(this.mainBkg,{h:30,s:-30,l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.actorBorder=Zt(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=lt(this.primaryColor,{h:64}),this.fillType3=lt(this.secondaryColor,{h:64}),this.fillType4=lt(this.primaryColor,{h:-64}),this.fillType5=lt(this.secondaryColor,{h:-64}),this.fillType6=lt(this.primaryColor,{h:128}),this.fillType7=lt(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||lt(this.primaryColor,{l:-30}),this.pie5=this.pie5||lt(this.secondaryColor,{l:-30}),this.pie6=this.pie6||lt(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||lt(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||lt(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||lt(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||lt(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||lt(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||lt(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||lt(this.primaryColor,{h:-30}),this.git4=this.git4||lt(this.primaryColor,{h:-60}),this.git5=this.git5||lt(this.primaryColor,{h:-90}),this.git6=this.git6||lt(this.primaryColor,{h:60}),this.git7=this.git7||lt(this.primaryColor,{h:120}),this.darkMode?(this.git0=zt(this.git0,25),this.git1=zt(this.git1,25),this.git2=zt(this.git2,25),this.git3=zt(this.git3,25),this.git4=zt(this.git4,25),this.git5=zt(this.git5,25),this.git6=zt(this.git6,25),this.git7=zt(this.git7,25)):(this.git0=Zt(this.git0,25),this.git1=Zt(this.git1,25),this.git2=Zt(this.git2,25),this.git3=Zt(this.git3,25),this.git4=Zt(this.git4,25),this.git5=Zt(this.git5,25),this.git6=Zt(this.git6,25),this.git7=Zt(this.git7,25)),this.gitInv0=this.gitInv0||At(this.git0),this.gitInv1=this.gitInv1||At(this.git1),this.gitInv2=this.gitInv2||At(this.git2),this.gitInv3=this.gitInv3||At(this.git3),this.gitInv4=this.gitInv4||At(this.git4),this.gitInv5=this.gitInv5||At(this.git5),this.gitInv6=this.gitInv6||At(this.git6),this.gitInv7=this.gitInv7||At(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Rc,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oc}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}};const TL=t=>{const e=new wL;return e.calculate(t),e};class EL{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=zt(this.contrast,55),this.background="#ffffff",this.tertiaryColor=lt(this.primaryColor,{h:-160}),this.primaryBorderColor=hr(this.primaryColor,this.darkMode),this.secondaryBorderColor=hr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=hr(this.tertiaryColor,this.darkMode),this.primaryTextColor=At(this.primaryColor),this.secondaryTextColor=At(this.secondaryColor),this.tertiaryTextColor=At(this.tertiaryColor),this.lineColor=At(this.background),this.textColor=At(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=zt(this.contrast,55),this.border2=this.contrast,this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||At(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||zt(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||Zt(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||lt(this.mainBkg,{l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||lt(this.mainBkg,{l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.actorBorder=zt(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.sectionBkgColor=zt(this.contrast,30),this.sectionBkgColor2=zt(this.contrast,30),this.taskBorderColor=Zt(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=zt(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=Zt(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=lt(this.primaryColor,{h:64}),this.fillType3=lt(this.secondaryColor,{h:64}),this.fillType4=lt(this.primaryColor,{h:-64}),this.fillType5=lt(this.secondaryColor,{h:-64}),this.fillType6=lt(this.primaryColor,{h:128}),this.fillType7=lt(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Zt(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||lt(this.primaryColor,{h:-30}),this.git4=this.pie5||lt(this.primaryColor,{h:-60}),this.git5=this.pie6||lt(this.primaryColor,{h:-90}),this.git6=this.pie7||lt(this.primaryColor,{h:60}),this.git7=this.pie8||lt(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||At(this.git0),this.gitInv1=this.gitInv1||At(this.git1),this.gitInv2=this.gitInv2||At(this.git2),this.gitInv3=this.gitInv3||At(this.git3),this.gitInv4=this.gitInv4||At(this.git4),this.gitInv5=this.gitInv5||At(this.git5),this.gitInv6=this.gitInv6||At(this.git6),this.gitInv7=this.gitInv7||At(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Rc,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oc}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}}const CL=t=>{const e=new EL;return e.calculate(t),e},Hi={base:{getThemeVariables:bL},dark:{getThemeVariables:xL},default:{getThemeVariables:kL},forest:{getThemeVariables:TL},neutral:{getThemeVariables:CL}},on={theme:"default",themeVariables:Hi.default.getThemeVariables(),themeCSS:void 0,maxTextSize:5e4,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],deterministicIds:!1,deterministicIDSeed:void 0,flowchart:{titleTopMargin:25,diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},sequence:{hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",tickInterval:void 0,useMaxWidth:!0,topAxis:!1,useWidth:void 0},journey:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},timeline:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},class:{titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},state:{titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},er:{titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12,useMaxWidth:!0},pie:{useWidth:void 0,useMaxWidth:!0},requirement:{useWidth:void 0,useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},gitGraph:{titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0},c4:{useWidth:void 0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,useMaxWidth:!0,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,personFont:function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},external_personFont:function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},systemFont:function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},external_systemFont:function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},system_dbFont:function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},external_system_dbFont:function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},system_queueFont:function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},external_system_queueFont:function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},containerFont:function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},external_containerFont:function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},container_dbFont:function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},external_container_dbFont:function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},container_queueFont:function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},external_container_queueFont:function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},componentFont:function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},external_componentFont:function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},component_dbFont:function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},external_component_dbFont:function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},component_queueFont:function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},external_component_queueFont:function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},boundaryFont:function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},fontSize:16};on.class&&(on.class.arrowMarkerAbsolute=on.arrowMarkerAbsolute);on.gitGraph&&(on.gitGraph.arrowMarkerAbsolute=on.arrowMarkerAbsolute);const Gg=(t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:typeof t[i]=="object"&&t[i]!==null?[...r,e+i,...Gg(t[i],"")]:[...r,e+i],[]),SL=Gg(on,""),AL=on;/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function $g(t){return typeof t>"u"||t===null}function LL(t){return typeof t=="object"&&t!==null}function BL(t){return Array.isArray(t)?t:$g(t)?[]:[t]}function DL(t,e){var r,i,n,s;if(e)for(s=Object.keys(e),r=0,i=s.length;r<i;r+=1)n=s[r],t[n]=e[n];return t}function IL(t,e){var r="",i;for(i=0;i<e;i+=1)r+=t;return r}function ML(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var NL=$g,RL=LL,OL=BL,FL=IL,PL=ML,VL=DL,cr={isNothing:NL,isObject:RL,toArray:OL,repeat:FL,isNegativeZero:PL,extend:VL};function jg(t,e){var r="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`
6
+ `)),a+=f+i[l+1]}),a}var v2={exports:{}};(function(t,e){(function(r,i){t.exports=i()})(lc,function(){var r=1e3,i=6e4,n=36e5,s="millisecond",a="second",o="minute",l="hour",h="day",u="week",f="month",d="quarter",p="year",m="date",b="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,k=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(w){var g=["th","st","nd","rd"],D=w%100;return"["+w+(g[(D-20)%10]||g[D]||g[0])+"]"}},B=function(w,g,D){var y=String(w);return!y||y.length>=g?w:""+Array(g+1-y.length).join(D)+w},R={s:B,z:function(w){var g=-w.utcOffset(),D=Math.abs(g),y=Math.floor(D/60),N=D%60;return(g<=0?"+":"-")+B(y,2,"0")+":"+B(N,2,"0")},m:function w(g,D){if(g.date()<D.date())return-w(D,g);var y=12*(D.year()-g.year())+(D.month()-g.month()),N=g.clone().add(y,f),nt=D-N<0,Y=g.clone().add(y+(nt?-1:1),f);return+(-(y+(D-N)/(nt?N-Y:Y-N))||0)},a:function(w){return w<0?Math.ceil(w)||0:Math.floor(w)},p:function(w){return{M:f,y:p,w:u,d:h,D:m,h:l,m:o,s:a,ms:s,Q:d}[w]||String(w||"").toLowerCase().replace(/s$/,"")},u:function(w){return w===void 0}},P="en",V={};V[P]=v;var O=function(w){return w instanceof E},F=function w(g,D,y){var N;if(!g)return P;if(typeof g=="string"){var nt=g.toLowerCase();V[nt]&&(N=nt),D&&(V[nt]=D,N=nt);var Y=g.split("-");if(!N&&Y.length>1)return w(Y[0])}else{var Z=g.name;V[Z]=g,N=Z}return!y&&N&&(P=N),N||!y&&P},C=function(w,g){if(O(w))return w.clone();var D=typeof g=="object"?g:{};return D.date=w,D.args=arguments,new E(D)},S=R;S.l=F,S.i=O,S.w=function(w,g){return C(w,{locale:g.$L,utc:g.$u,x:g.$x,$offset:g.$offset})};var E=function(){function w(D){this.$L=F(D.locale,null,!0),this.parse(D)}var g=w.prototype;return g.parse=function(D){this.$d=function(y){var N=y.date,nt=y.utc;if(N===null)return new Date(NaN);if(S.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var Y=N.match(x);if(Y){var Z=Y[2]-1||0,J=(Y[7]||"0").substring(0,3);return nt?new Date(Date.UTC(Y[1],Z,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,J)):new Date(Y[1],Z,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,J)}}return new Date(N)}(D),this.$x=D.x||{},this.init()},g.init=function(){var D=this.$d;this.$y=D.getFullYear(),this.$M=D.getMonth(),this.$D=D.getDate(),this.$W=D.getDay(),this.$H=D.getHours(),this.$m=D.getMinutes(),this.$s=D.getSeconds(),this.$ms=D.getMilliseconds()},g.$utils=function(){return S},g.isValid=function(){return this.$d.toString()!==b},g.isSame=function(D,y){var N=C(D);return this.startOf(y)<=N&&N<=this.endOf(y)},g.isAfter=function(D,y){return C(D)<this.startOf(y)},g.isBefore=function(D,y){return this.endOf(y)<C(D)},g.$g=function(D,y,N){return S.u(D)?this[y]:this.set(N,D)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(D,y){var N=this,nt=!!S.u(y)||y,Y=S.p(D),Z=function($,j){var W=S.w(N.$u?Date.UTC(N.$y,j,$):new Date(N.$y,j,$),N);return nt?W:W.endOf(h)},J=function($,j){return S.w(N.toDate()[$].apply(N.toDate("s"),(nt?[0,0,0,0]:[23,59,59,999]).slice(j)),N)},X=this.$W,tt=this.$M,ot=this.$D,at="set"+(this.$u?"UTC":"");switch(Y){case p:return nt?Z(1,0):Z(31,11);case f:return nt?Z(1,tt):Z(0,tt+1);case u:var U=this.$locale().weekStart||0,Tt=(X<U?X+7:X)-U;return Z(nt?ot-Tt:ot+(6-Tt),tt);case h:case m:return J(at+"Hours",0);case l:return J(at+"Minutes",1);case o:return J(at+"Seconds",2);case a:return J(at+"Milliseconds",3);default:return this.clone()}},g.endOf=function(D){return this.startOf(D,!1)},g.$set=function(D,y){var N,nt=S.p(D),Y="set"+(this.$u?"UTC":""),Z=(N={},N[h]=Y+"Date",N[m]=Y+"Date",N[f]=Y+"Month",N[p]=Y+"FullYear",N[l]=Y+"Hours",N[o]=Y+"Minutes",N[a]=Y+"Seconds",N[s]=Y+"Milliseconds",N)[nt],J=nt===h?this.$D+(y-this.$W):y;if(nt===f||nt===p){var X=this.clone().set(m,1);X.$d[Z](J),X.init(),this.$d=X.set(m,Math.min(this.$D,X.daysInMonth())).$d}else Z&&this.$d[Z](J);return this.init(),this},g.set=function(D,y){return this.clone().$set(D,y)},g.get=function(D){return this[S.p(D)]()},g.add=function(D,y){var N,nt=this;D=Number(D);var Y=S.p(y),Z=function(tt){var ot=C(nt);return S.w(ot.date(ot.date()+Math.round(tt*D)),nt)};if(Y===f)return this.set(f,this.$M+D);if(Y===p)return this.set(p,this.$y+D);if(Y===h)return Z(1);if(Y===u)return Z(7);var J=(N={},N[o]=i,N[l]=n,N[a]=r,N)[Y]||1,X=this.$d.getTime()+D*J;return S.w(X,this)},g.subtract=function(D,y){return this.add(-1*D,y)},g.format=function(D){var y=this,N=this.$locale();if(!this.isValid())return N.invalidDate||b;var nt=D||"YYYY-MM-DDTHH:mm:ssZ",Y=S.z(this),Z=this.$H,J=this.$m,X=this.$M,tt=N.weekdays,ot=N.months,at=function(j,W,z,A){return j&&(j[W]||j(y,nt))||z[W].slice(0,A)},U=function(j){return S.s(Z%12||12,j,"0")},Tt=N.meridiem||function(j,W,z){var A=j<12?"AM":"PM";return z?A.toLowerCase():A},$={YY:String(this.$y).slice(-2),YYYY:this.$y,M:X+1,MM:S.s(X+1,2,"0"),MMM:at(N.monthsShort,X,ot,3),MMMM:at(ot,X),D:this.$D,DD:S.s(this.$D,2,"0"),d:String(this.$W),dd:at(N.weekdaysMin,this.$W,tt,2),ddd:at(N.weekdaysShort,this.$W,tt,3),dddd:tt[this.$W],H:String(Z),HH:S.s(Z,2,"0"),h:U(1),hh:U(2),a:Tt(Z,J,!0),A:Tt(Z,J,!1),m:String(J),mm:S.s(J,2,"0"),s:String(this.$s),ss:S.s(this.$s,2,"0"),SSS:S.s(this.$ms,3,"0"),Z:Y};return nt.replace(k,function(j,W){return W||$[j]||Y.replace(":","")})},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(D,y,N){var nt,Y=S.p(y),Z=C(D),J=(Z.utcOffset()-this.utcOffset())*i,X=this-Z,tt=S.m(this,Z);return tt=(nt={},nt[p]=tt/12,nt[f]=tt,nt[d]=tt/3,nt[u]=(X-J)/6048e5,nt[h]=(X-J)/864e5,nt[l]=X/n,nt[o]=X/i,nt[a]=X/r,nt)[Y]||X,N?tt:S.a(tt)},g.daysInMonth=function(){return this.endOf(f).$D},g.$locale=function(){return V[this.$L]},g.locale=function(D,y){if(!D)return this.$L;var N=this.clone(),nt=F(D,y,!0);return nt&&(N.$L=nt),N},g.clone=function(){return S.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},w}(),_=E.prototype;return C.prototype=_,[["$ms",s],["$s",a],["$m",o],["$H",l],["$W",h],["$M",f],["$y",p],["$D",m]].forEach(function(w){_[w[1]]=function(g){return this.$g(g,w[0],w[1])}}),C.extend=function(w,g){return w.$i||(w(g,E,C),w.$i=!0),C},C.locale=F,C.isDayjs=O,C.unix=function(w){return C(1e3*w)},C.en=V[P],C.Ls=V,C.p={},C})})(v2);var j4=v2.exports;const xr=cc(j4);var n1={};Object.defineProperty(n1,"__esModule",{value:!0});var Ki=n1.sanitizeUrl=void 0,X4=/^([^\w]*)(javascript|data|vbscript)/im,K4=/&#(\w+)(^\w|;)?/g,Z4=/&(newline|tab);/gi,Q4=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,J4=/^.+(:|&colon;)/gim,t5=[".","/"];function e5(t){return t5.indexOf(t[0])>-1}function r5(t){return t.replace(K4,function(e,r){return String.fromCharCode(r)})}function i5(t){var e=r5(t||"").replace(Z4,"").replace(Q4,"").trim();if(!e)return"about:blank";if(e5(e))return e;var r=e.match(J4);if(!r)return e;var i=r[0];return X4.test(i)?"about:blank":e}Ki=n1.sanitizeUrl=i5;function Vo(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function n5(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function s1(t){let e,r,i;t.length!==2?(e=Vo,r=(o,l)=>Vo(t(o),l),i=(o,l)=>t(o)-l):(e=t===Vo||t===n5?t:s5,r=t,i=t);function n(o,l,h=0,u=o.length){if(h<u){if(e(l,l)!==0)return u;do{const f=h+u>>>1;r(o[f],l)<0?h=f+1:u=f}while(h<u)}return h}function s(o,l,h=0,u=o.length){if(h<u){if(e(l,l)!==0)return u;do{const f=h+u>>>1;r(o[f],l)<=0?h=f+1:u=f}while(h<u)}return h}function a(o,l,h=0,u=o.length){const f=n(o,l,h,u-1);return f>h&&i(o[f-1],l)>-i(o[f],l)?f-1:f}return{left:n,center:a,right:s}}function s5(){return 0}function a5(t){return t===null?NaN:+t}const o5=s1(Vo),l5=o5.right;s1(a5).center;const c5=l5;class N0 extends Map{constructor(e,r=f5){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(const[i,n]of e)this.set(i,n)}get(e){return super.get(R0(this,e))}has(e){return super.has(R0(this,e))}set(e,r){return super.set(h5(this,e),r)}delete(e){return super.delete(u5(this,e))}}function R0({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):r}function h5({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):(t.set(i,r),r)}function u5({_intern:t,_key:e},r){const i=e(r);return t.has(i)&&(r=t.get(i),t.delete(i)),r}function f5(t){return t!==null&&typeof t=="object"?t.valueOf():t}const d5=Math.sqrt(50),p5=Math.sqrt(10),g5=Math.sqrt(2);function ol(t,e,r){const i=(e-t)/Math.max(0,r),n=Math.floor(Math.log10(i)),s=i/Math.pow(10,n),a=s>=d5?10:s>=p5?5:s>=g5?2:1;let o,l,h;return n<0?(h=Math.pow(10,-n)/a,o=Math.round(t*h),l=Math.round(e*h),o/h<t&&++o,l/h>e&&--l,h=-h):(h=Math.pow(10,n)*a,o=Math.round(t/h),l=Math.round(e/h),o*h<t&&++o,l*h>e&&--l),l<o&&.5<=r&&r<2?ol(t,e,r*2):[o,l,h]}function y5(t,e,r){if(e=+e,t=+t,r=+r,!(r>0))return[];if(t===e)return[t];const i=e<t,[n,s,a]=i?ol(e,t,r):ol(t,e,r);if(!(s>=n))return[];const o=s-n+1,l=new Array(o);if(i)if(a<0)for(let h=0;h<o;++h)l[h]=(s-h)/-a;else for(let h=0;h<o;++h)l[h]=(s-h)*a;else if(a<0)for(let h=0;h<o;++h)l[h]=(n+h)/-a;else for(let h=0;h<o;++h)l[h]=(n+h)*a;return l}function Hh(t,e,r){return e=+e,t=+t,r=+r,ol(t,e,r)[2]}function qh(t,e,r){e=+e,t=+t,r=+r;const i=e<t,n=i?Hh(e,t,r):Hh(t,e,r);return(i?-1:1)*(n<0?1/-n:n)}function m5(t,e){let r;if(e===void 0)for(const i of t)i!=null&&(r<i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of t)(n=e(n,++i,t))!=null&&(r<n||r===void 0&&n>=n)&&(r=n)}return r}function b5(t,e){let r;if(e===void 0)for(const i of t)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of t)(n=e(n,++i,t))!=null&&(r>n||r===void 0&&n>=n)&&(r=n)}return r}function _5(t){return t}var Yo=1,rh=2,Gh=3,ko=4,O0=1e-6;function x5(t){return"translate("+t+",0)"}function v5(t){return"translate(0,"+t+")"}function k5(t){return e=>+t(e)}function w5(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function T5(){return!this.__axis}function k2(t,e){var r=[],i=null,n=null,s=6,a=6,o=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,h=t===Yo||t===ko?-1:1,u=t===ko||t===rh?"x":"y",f=t===Yo||t===Gh?x5:v5;function d(p){var m=i??(e.ticks?e.ticks.apply(e,r):e.domain()),b=n??(e.tickFormat?e.tickFormat.apply(e,r):_5),x=Math.max(s,0)+o,k=e.range(),v=+k[0]+l,B=+k[k.length-1]+l,R=(e.bandwidth?w5:k5)(e.copy(),l),P=p.selection?p.selection():p,V=P.selectAll(".domain").data([null]),O=P.selectAll(".tick").data(m,e).order(),F=O.exit(),C=O.enter().append("g").attr("class","tick"),S=O.select("line"),E=O.select("text");V=V.merge(V.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),O=O.merge(C),S=S.merge(C.append("line").attr("stroke","currentColor").attr(u+"2",h*s)),E=E.merge(C.append("text").attr("fill","currentColor").attr(u,h*x).attr("dy",t===Yo?"0em":t===Gh?"0.71em":"0.32em")),p!==P&&(V=V.transition(p),O=O.transition(p),S=S.transition(p),E=E.transition(p),F=F.transition(p).attr("opacity",O0).attr("transform",function(_){return isFinite(_=R(_))?f(_+l):this.getAttribute("transform")}),C.attr("opacity",O0).attr("transform",function(_){var w=this.parentNode.__axis;return f((w&&isFinite(w=w(_))?w:R(_))+l)})),F.remove(),V.attr("d",t===ko||t===rh?a?"M"+h*a+","+v+"H"+l+"V"+B+"H"+h*a:"M"+l+","+v+"V"+B:a?"M"+v+","+h*a+"V"+l+"H"+B+"V"+h*a:"M"+v+","+l+"H"+B),O.attr("opacity",1).attr("transform",function(_){return f(R(_)+l)}),S.attr(u+"2",h*s),E.attr(u,h*x).text(b),P.filter(T5).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===rh?"start":t===ko?"end":"middle"),P.each(function(){this.__axis=R})}return d.scale=function(p){return arguments.length?(e=p,d):e},d.ticks=function(){return r=Array.from(arguments),d},d.tickArguments=function(p){return arguments.length?(r=p==null?[]:Array.from(p),d):r.slice()},d.tickValues=function(p){return arguments.length?(i=p==null?null:Array.from(p),d):i&&i.slice()},d.tickFormat=function(p){return arguments.length?(n=p,d):n},d.tickSize=function(p){return arguments.length?(s=a=+p,d):s},d.tickSizeInner=function(p){return arguments.length?(s=+p,d):s},d.tickSizeOuter=function(p){return arguments.length?(a=+p,d):a},d.tickPadding=function(p){return arguments.length?(o=+p,d):o},d.offset=function(p){return arguments.length?(l=+p,d):l},d}function E5(t){return k2(Yo,t)}function C5(t){return k2(Gh,t)}var S5={value:()=>{}};function w2(){for(var t=0,e=arguments.length,r={},i;t<e;++t){if(!(i=arguments[t]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new zo(r)}function zo(t){this._=t}function A5(t,e){return t.trim().split(/^|\s+/).map(function(r){var i="",n=r.indexOf(".");if(n>=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}zo.prototype=w2.prototype={constructor:zo,on:function(t,e){var r=this._,i=A5(t+"",r),n,s=-1,a=i.length;if(arguments.length<2){for(;++s<a;)if((n=(t=i[s]).type)&&(n=L5(r[n],t.name)))return n;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++s<a;)if(n=(t=i[s]).type)r[n]=F0(r[n],t.name,e);else if(e==null)for(n in r)r[n]=F0(r[n],t.name,null);return this},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new zo(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var r=new Array(n),i=0,n,s;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],i=0,n=s.length;i<n;++i)s[i].value.apply(e,r)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],n=0,s=i.length;n<s;++n)i[n].value.apply(e,r)}};function L5(t,e){for(var r=0,i=t.length,n;r<i;++r)if((n=t[r]).name===e)return n.value}function F0(t,e,r){for(var i=0,n=t.length;i<n;++i)if(t[i].name===e){t[i]=S5,t=t.slice(0,i).concat(t.slice(i+1));break}return r!=null&&t.push({name:e,value:r}),t}var $h="http://www.w3.org/1999/xhtml";const P0={svg:"http://www.w3.org/2000/svg",xhtml:$h,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function hc(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),P0.hasOwnProperty(e)?{space:P0[e],local:t}:t}function B5(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===$h&&e.documentElement.namespaceURI===$h?e.createElement(t):e.createElementNS(r,t)}}function D5(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function T2(t){var e=hc(t);return(e.local?D5:B5)(e)}function I5(){}function a1(t){return t==null?I5:function(){return this.querySelector(t)}}function M5(t){typeof t!="function"&&(t=a1(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var s=e[n],a=s.length,o=i[n]=new Array(a),l,h,u=0;u<a;++u)(l=s[u])&&(h=t.call(l,l.__data__,u,s))&&("__data__"in l&&(h.__data__=l.__data__),o[u]=h);return new dr(i,this._parents)}function E2(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function N5(){return[]}function C2(t){return t==null?N5:function(){return this.querySelectorAll(t)}}function R5(t){return function(){return E2(t.apply(this,arguments))}}function O5(t){typeof t=="function"?t=R5(t):t=C2(t);for(var e=this._groups,r=e.length,i=[],n=[],s=0;s<r;++s)for(var a=e[s],o=a.length,l,h=0;h<o;++h)(l=a[h])&&(i.push(t.call(l,l.__data__,h,a)),n.push(l));return new dr(i,n)}function S2(t){return function(){return this.matches(t)}}function A2(t){return function(e){return e.matches(t)}}var F5=Array.prototype.find;function P5(t){return function(){return F5.call(this.children,t)}}function V5(){return this.firstElementChild}function Y5(t){return this.select(t==null?V5:P5(typeof t=="function"?t:A2(t)))}var z5=Array.prototype.filter;function U5(){return Array.from(this.children)}function W5(t){return function(){return z5.call(this.children,t)}}function H5(t){return this.selectAll(t==null?U5:W5(typeof t=="function"?t:A2(t)))}function q5(t){typeof t!="function"&&(t=S2(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var s=e[n],a=s.length,o=i[n]=[],l,h=0;h<a;++h)(l=s[h])&&t.call(l,l.__data__,h,s)&&o.push(l);return new dr(i,this._parents)}function L2(t){return new Array(t.length)}function G5(){return new dr(this._enter||this._groups.map(L2),this._parents)}function ll(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}ll.prototype={constructor:ll,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function $5(t){return function(){return t}}function j5(t,e,r,i,n,s){for(var a=0,o,l=e.length,h=s.length;a<h;++a)(o=e[a])?(o.__data__=s[a],i[a]=o):r[a]=new ll(t,s[a]);for(;a<l;++a)(o=e[a])&&(n[a]=o)}function X5(t,e,r,i,n,s,a){var o,l,h=new Map,u=e.length,f=s.length,d=new Array(u),p;for(o=0;o<u;++o)(l=e[o])&&(d[o]=p=a.call(l,l.__data__,o,e)+"",h.has(p)?n[o]=l:h.set(p,l));for(o=0;o<f;++o)p=a.call(t,s[o],o,s)+"",(l=h.get(p))?(i[o]=l,l.__data__=s[o],h.delete(p)):r[o]=new ll(t,s[o]);for(o=0;o<u;++o)(l=e[o])&&h.get(d[o])===l&&(n[o]=l)}function K5(t){return t.__data__}function Z5(t,e){if(!arguments.length)return Array.from(this,K5);var r=e?X5:j5,i=this._parents,n=this._groups;typeof t!="function"&&(t=$5(t));for(var s=n.length,a=new Array(s),o=new Array(s),l=new Array(s),h=0;h<s;++h){var u=i[h],f=n[h],d=f.length,p=Q5(t.call(u,u&&u.__data__,h,i)),m=p.length,b=o[h]=new Array(m),x=a[h]=new Array(m),k=l[h]=new Array(d);r(u,f,b,x,k,p,e);for(var v=0,B=0,R,P;v<m;++v)if(R=b[v]){for(v>=B&&(B=v+1);!(P=x[B])&&++B<m;);R._next=P||null}}return a=new dr(a,i),a._enter=o,a._exit=l,a}function Q5(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function J5(){return new dr(this._exit||this._groups.map(L2),this._parents)}function tb(t,e,r){var i=this.enter(),n=this,s=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(n=e(n),n&&(n=n.selection())),r==null?s.remove():r(s),i&&n?i.merge(n).order():n}function eb(t){for(var e=t.selection?t.selection():t,r=this._groups,i=e._groups,n=r.length,s=i.length,a=Math.min(n,s),o=new Array(n),l=0;l<a;++l)for(var h=r[l],u=i[l],f=h.length,d=o[l]=new Array(f),p,m=0;m<f;++m)(p=h[m]||u[m])&&(d[m]=p);for(;l<n;++l)o[l]=r[l];return new dr(o,this._parents)}function rb(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var i=t[e],n=i.length-1,s=i[n],a;--n>=0;)(a=i[n])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function ib(t){t||(t=nb);function e(f,d){return f&&d?t(f.__data__,d.__data__):!f-!d}for(var r=this._groups,i=r.length,n=new Array(i),s=0;s<i;++s){for(var a=r[s],o=a.length,l=n[s]=new Array(o),h,u=0;u<o;++u)(h=a[u])&&(l[u]=h);l.sort(e)}return new dr(n,this._parents).order()}function nb(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function sb(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function ab(){return Array.from(this)}function ob(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],n=0,s=i.length;n<s;++n){var a=i[n];if(a)return a}return null}function lb(){let t=0;for(const e of this)++t;return t}function cb(){return!this.node()}function hb(t){for(var e=this._groups,r=0,i=e.length;r<i;++r)for(var n=e[r],s=0,a=n.length,o;s<a;++s)(o=n[s])&&t.call(o,o.__data__,s,n);return this}function ub(t){return function(){this.removeAttribute(t)}}function fb(t){return function(){this.removeAttributeNS(t.space,t.local)}}function db(t,e){return function(){this.setAttribute(t,e)}}function pb(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function gb(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function yb(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function mb(t,e){var r=hc(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((e==null?r.local?fb:ub:typeof e=="function"?r.local?yb:gb:r.local?pb:db)(r,e))}function B2(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function bb(t){return function(){this.style.removeProperty(t)}}function _b(t,e,r){return function(){this.style.setProperty(t,e,r)}}function xb(t,e,r){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function vb(t,e,r){return arguments.length>1?this.each((e==null?bb:typeof e=="function"?xb:_b)(t,e,r??"")):vs(this.node(),t)}function vs(t,e){return t.style.getPropertyValue(e)||B2(t).getComputedStyle(t,null).getPropertyValue(e)}function kb(t){return function(){delete this[t]}}function wb(t,e){return function(){this[t]=e}}function Tb(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function Eb(t,e){return arguments.length>1?this.each((e==null?kb:typeof e=="function"?Tb:wb)(t,e)):this.node()[t]}function D2(t){return t.trim().split(/^|\s+/)}function o1(t){return t.classList||new I2(t)}function I2(t){this._node=t,this._names=D2(t.getAttribute("class")||"")}I2.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function M2(t,e){for(var r=o1(t),i=-1,n=e.length;++i<n;)r.add(e[i])}function N2(t,e){for(var r=o1(t),i=-1,n=e.length;++i<n;)r.remove(e[i])}function Cb(t){return function(){M2(this,t)}}function Sb(t){return function(){N2(this,t)}}function Ab(t,e){return function(){(e.apply(this,arguments)?M2:N2)(this,t)}}function Lb(t,e){var r=D2(t+"");if(arguments.length<2){for(var i=o1(this.node()),n=-1,s=r.length;++n<s;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof e=="function"?Ab:e?Cb:Sb)(r,e))}function Bb(){this.textContent=""}function Db(t){return function(){this.textContent=t}}function Ib(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Mb(t){return arguments.length?this.each(t==null?Bb:(typeof t=="function"?Ib:Db)(t)):this.node().textContent}function Nb(){this.innerHTML=""}function Rb(t){return function(){this.innerHTML=t}}function Ob(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Fb(t){return arguments.length?this.each(t==null?Nb:(typeof t=="function"?Ob:Rb)(t)):this.node().innerHTML}function Pb(){this.nextSibling&&this.parentNode.appendChild(this)}function Vb(){return this.each(Pb)}function Yb(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function zb(){return this.each(Yb)}function Ub(t){var e=typeof t=="function"?t:T2(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Wb(){return null}function Hb(t,e){var r=typeof t=="function"?t:T2(t),i=e==null?Wb:typeof e=="function"?e:a1(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function qb(){var t=this.parentNode;t&&t.removeChild(this)}function Gb(){return this.each(qb)}function $b(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function jb(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Xb(t){return this.select(t?jb:$b)}function Kb(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Zb(t){return function(e){t.call(this,e,this.__data__)}}function Qb(t){return t.trim().split(/^|\s+/).map(function(e){var r="",i=e.indexOf(".");return i>=0&&(r=e.slice(i+1),e=e.slice(0,i)),{type:e,name:r}})}function Jb(t){return function(){var e=this.__on;if(e){for(var r=0,i=-1,n=e.length,s;r<n;++r)s=e[r],(!t.type||s.type===t.type)&&s.name===t.name?this.removeEventListener(s.type,s.listener,s.options):e[++i]=s;++i?e.length=i:delete this.__on}}}function t_(t,e,r){return function(){var i=this.__on,n,s=Zb(e);if(i){for(var a=0,o=i.length;a<o;++a)if((n=i[a]).type===t.type&&n.name===t.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=s,n.options=r),n.value=e;return}}this.addEventListener(t.type,s,r),n={type:t.type,name:t.name,value:e,listener:s,options:r},i?i.push(n):this.__on=[n]}}function e_(t,e,r){var i=Qb(t+""),n,s=i.length,a;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,h=o.length,u;l<h;++l)for(n=0,u=o[l];n<s;++n)if((a=i[n]).type===u.type&&a.name===u.name)return u.value}return}for(o=e?t_:Jb,n=0;n<s;++n)this.each(o(i[n],e,r));return this}function R2(t,e,r){var i=B2(t),n=i.CustomEvent;typeof n=="function"?n=new n(e,r):(n=i.document.createEvent("Event"),r?(n.initEvent(e,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(e,!1,!1)),t.dispatchEvent(n)}function r_(t,e){return function(){return R2(this,t,e)}}function i_(t,e){return function(){return R2(this,t,e.apply(this,arguments))}}function n_(t,e){return this.each((typeof e=="function"?i_:r_)(t,e))}function*s_(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],n=0,s=i.length,a;n<s;++n)(a=i[n])&&(yield a)}var l1=[null];function dr(t,e){this._groups=t,this._parents=e}function io(){return new dr([[document.documentElement]],l1)}function a_(){return this}dr.prototype=io.prototype={constructor:dr,select:M5,selectAll:O5,selectChild:Y5,selectChildren:H5,filter:q5,data:Z5,enter:G5,exit:J5,join:tb,merge:eb,selection:a_,order:rb,sort:ib,call:sb,nodes:ab,node:ob,size:lb,empty:cb,each:hb,attr:mb,style:vb,property:Eb,classed:Lb,text:Mb,html:Fb,raise:Vb,lower:zb,append:Ub,insert:Hb,remove:Gb,clone:Xb,datum:Kb,on:e_,dispatch:n_,[Symbol.iterator]:s_};function _t(t){return typeof t=="string"?new dr([[document.querySelector(t)]],[document.documentElement]):new dr([[t]],l1)}function c1(t){return typeof t=="string"?new dr([document.querySelectorAll(t)],[document.documentElement]):new dr([E2(t)],l1)}function no(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function uc(t,e){var r=Object.create(t.prototype);for(var i in e)r[i]=e[i];return r}function qn(){}var Sa=.7,cl=1/Sa,ps="\\s*([+-]?\\d+)\\s*",Aa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",di="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",o_=/^#([0-9a-f]{3,8})$/,l_=new RegExp(`^rgb\\(${ps},${ps},${ps}\\)$`),c_=new RegExp(`^rgb\\(${di},${di},${di}\\)$`),h_=new RegExp(`^rgba\\(${ps},${ps},${ps},${Aa}\\)$`),u_=new RegExp(`^rgba\\(${di},${di},${di},${Aa}\\)$`),f_=new RegExp(`^hsl\\(${Aa},${di},${di}\\)$`),d_=new RegExp(`^hsla\\(${Aa},${di},${di},${Aa}\\)$`),V0={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};no(qn,Dn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Y0,formatHex:Y0,formatHex8:p_,formatHsl:g_,formatRgb:z0,toString:z0});function Y0(){return this.rgb().formatHex()}function p_(){return this.rgb().formatHex8()}function g_(){return F2(this).formatHsl()}function z0(){return this.rgb().formatRgb()}function Dn(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=o_.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?U0(e):r===3?new sr(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?wo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?wo(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=l_.exec(t))?new sr(e[1],e[2],e[3],1):(e=c_.exec(t))?new sr(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=h_.exec(t))?wo(e[1],e[2],e[3],e[4]):(e=u_.exec(t))?wo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=f_.exec(t))?q0(e[1],e[2]/100,e[3]/100,1):(e=d_.exec(t))?q0(e[1],e[2]/100,e[3]/100,e[4]):V0.hasOwnProperty(t)?U0(V0[t]):t==="transparent"?new sr(NaN,NaN,NaN,0):null}function U0(t){return new sr(t>>16&255,t>>8&255,t&255,1)}function wo(t,e,r,i){return i<=0&&(t=e=r=NaN),new sr(t,e,r,i)}function O2(t){return t instanceof qn||(t=Dn(t)),t?(t=t.rgb(),new sr(t.r,t.g,t.b,t.opacity)):new sr}function jh(t,e,r,i){return arguments.length===1?O2(t):new sr(t,e,r,i??1)}function sr(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}no(sr,jh,uc(qn,{brighter(t){return t=t==null?cl:Math.pow(cl,t),new sr(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Sa:Math.pow(Sa,t),new sr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new sr(Ln(this.r),Ln(this.g),Ln(this.b),hl(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:W0,formatHex:W0,formatHex8:y_,formatRgb:H0,toString:H0}));function W0(){return`#${An(this.r)}${An(this.g)}${An(this.b)}`}function y_(){return`#${An(this.r)}${An(this.g)}${An(this.b)}${An((isNaN(this.opacity)?1:this.opacity)*255)}`}function H0(){const t=hl(this.opacity);return`${t===1?"rgb(":"rgba("}${Ln(this.r)}, ${Ln(this.g)}, ${Ln(this.b)}${t===1?")":`, ${t})`}`}function hl(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ln(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function An(t){return t=Ln(t),(t<16?"0":"")+t.toString(16)}function q0(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Gr(t,e,r,i)}function F2(t){if(t instanceof Gr)return new Gr(t.h,t.s,t.l,t.opacity);if(t instanceof qn||(t=Dn(t)),!t)return new Gr;if(t instanceof Gr)return t;t=t.rgb();var e=t.r/255,r=t.g/255,i=t.b/255,n=Math.min(e,r,i),s=Math.max(e,r,i),a=NaN,o=s-n,l=(s+n)/2;return o?(e===s?a=(r-i)/o+(r<i)*6:r===s?a=(i-e)/o+2:a=(e-r)/o+4,o/=l<.5?s+n:2-s-n,a*=60):o=l>0&&l<1?0:a,new Gr(a,o,l,t.opacity)}function m_(t,e,r,i){return arguments.length===1?F2(t):new Gr(t,e,r,i??1)}function Gr(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}no(Gr,m_,uc(qn,{brighter(t){return t=t==null?cl:Math.pow(cl,t),new Gr(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Sa:Math.pow(Sa,t),new Gr(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*e,n=2*r-i;return new sr(ih(t>=240?t-240:t+120,n,i),ih(t,n,i),ih(t<120?t+240:t-120,n,i),this.opacity)},clamp(){return new Gr(G0(this.h),To(this.s),To(this.l),hl(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=hl(this.opacity);return`${t===1?"hsl(":"hsla("}${G0(this.h)}, ${To(this.s)*100}%, ${To(this.l)*100}%${t===1?")":`, ${t})`}`}}));function G0(t){return t=(t||0)%360,t<0?t+360:t}function To(t){return Math.max(0,Math.min(1,t||0))}function ih(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const b_=Math.PI/180,__=180/Math.PI,ul=18,P2=.96422,V2=1,Y2=.82521,z2=4/29,gs=6/29,U2=3*gs*gs,x_=gs*gs*gs;function W2(t){if(t instanceof pi)return new pi(t.l,t.a,t.b,t.opacity);if(t instanceof Oi)return H2(t);t instanceof sr||(t=O2(t));var e=oh(t.r),r=oh(t.g),i=oh(t.b),n=nh((.2225045*e+.7168786*r+.0606169*i)/V2),s,a;return e===r&&r===i?s=a=n:(s=nh((.4360747*e+.3850649*r+.1430804*i)/P2),a=nh((.0139322*e+.0971045*r+.7141733*i)/Y2)),new pi(116*n-16,500*(s-n),200*(n-a),t.opacity)}function v_(t,e,r,i){return arguments.length===1?W2(t):new pi(t,e,r,i??1)}function pi(t,e,r,i){this.l=+t,this.a=+e,this.b=+r,this.opacity=+i}no(pi,v_,uc(qn,{brighter(t){return new pi(this.l+ul*(t??1),this.a,this.b,this.opacity)},darker(t){return new pi(this.l-ul*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return e=P2*sh(e),t=V2*sh(t),r=Y2*sh(r),new sr(ah(3.1338561*e-1.6168667*t-.4906146*r),ah(-.9787684*e+1.9161415*t+.033454*r),ah(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}}));function nh(t){return t>x_?Math.pow(t,1/3):t/U2+z2}function sh(t){return t>gs?t*t*t:U2*(t-z2)}function ah(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function oh(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function k_(t){if(t instanceof Oi)return new Oi(t.h,t.c,t.l,t.opacity);if(t instanceof pi||(t=W2(t)),t.a===0&&t.b===0)return new Oi(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*__;return new Oi(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Xh(t,e,r,i){return arguments.length===1?k_(t):new Oi(t,e,r,i??1)}function Oi(t,e,r,i){this.h=+t,this.c=+e,this.l=+r,this.opacity=+i}function H2(t){if(isNaN(t.h))return new pi(t.l,0,0,t.opacity);var e=t.h*b_;return new pi(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}no(Oi,Xh,uc(qn,{brighter(t){return new Oi(this.h,this.c,this.l+ul*(t??1),this.opacity)},darker(t){return new Oi(this.h,this.c,this.l-ul*(t??1),this.opacity)},rgb(){return H2(this).rgb()}}));const fc=t=>()=>t;function q2(t,e){return function(r){return t+r*e}}function w_(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(i){return Math.pow(t+i*e,r)}}function T_(t,e){var r=e-t;return r?q2(t,r>180||r<-180?r-360*Math.round(r/360):r):fc(isNaN(t)?e:t)}function E_(t){return(t=+t)==1?ga:function(e,r){return r-e?w_(e,r,t):fc(isNaN(e)?r:e)}}function ga(t,e){var r=e-t;return r?q2(t,r):fc(isNaN(t)?e:t)}const fl=function t(e){var r=E_(e);function i(n,s){var a=r((n=jh(n)).r,(s=jh(s)).r),o=r(n.g,s.g),l=r(n.b,s.b),h=ga(n.opacity,s.opacity);return function(u){return n.r=a(u),n.g=o(u),n.b=l(u),n.opacity=h(u),n+""}}return i.gamma=t,i}(1);function C_(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,i=e.slice(),n;return function(s){for(n=0;n<r;++n)i[n]=t[n]*(1-s)+e[n]*s;return i}}function S_(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function A_(t,e){var r=e?e.length:0,i=t?Math.min(r,t.length):0,n=new Array(i),s=new Array(r),a;for(a=0;a<i;++a)n[a]=h1(t[a],e[a]);for(;a<r;++a)s[a]=e[a];return function(o){for(a=0;a<i;++a)s[a]=n[a](o);return s}}function L_(t,e){var r=new Date;return t=+t,e=+e,function(i){return r.setTime(t*(1-i)+e*i),r}}function qr(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function B_(t,e){var r={},i={},n;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(n in e)n in t?r[n]=h1(t[n],e[n]):i[n]=e[n];return function(s){for(n in r)i[n]=r[n](s);return i}}var Kh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,lh=new RegExp(Kh.source,"g");function D_(t){return function(){return t}}function I_(t){return function(e){return t(e)+""}}function G2(t,e){var r=Kh.lastIndex=lh.lastIndex=0,i,n,s,a=-1,o=[],l=[];for(t=t+"",e=e+"";(i=Kh.exec(t))&&(n=lh.exec(e));)(s=n.index)>r&&(s=e.slice(r,s),o[a]?o[a]+=s:o[++a]=s),(i=i[0])===(n=n[0])?o[a]?o[a]+=n:o[++a]=n:(o[++a]=null,l.push({i:a,x:qr(i,n)})),r=lh.lastIndex;return r<e.length&&(s=e.slice(r),o[a]?o[a]+=s:o[++a]=s),o.length<2?l[0]?I_(l[0].x):D_(e):(e=l.length,function(h){for(var u=0,f;u<e;++u)o[(f=l[u]).i]=f.x(h);return o.join("")})}function h1(t,e){var r=typeof e,i;return e==null||r==="boolean"?fc(e):(r==="number"?qr:r==="string"?(i=Dn(e))?(e=i,fl):G2:e instanceof Dn?fl:e instanceof Date?L_:S_(e)?C_:Array.isArray(e)?A_:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?B_:qr)(t,e)}function M_(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}var $0=180/Math.PI,Zh={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function $2(t,e,r,i,n,s){var a,o,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*r+e*i)&&(r-=t*l,i-=e*l),(o=Math.sqrt(r*r+i*i))&&(r/=o,i/=o,l/=o),t*i<e*r&&(t=-t,e=-e,l=-l,a=-a),{translateX:n,translateY:s,rotate:Math.atan2(e,t)*$0,skewX:Math.atan(l)*$0,scaleX:a,scaleY:o}}var Eo;function N_(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Zh:$2(e.a,e.b,e.c,e.d,e.e,e.f)}function R_(t){return t==null||(Eo||(Eo=document.createElementNS("http://www.w3.org/2000/svg","g")),Eo.setAttribute("transform",t),!(t=Eo.transform.baseVal.consolidate()))?Zh:(t=t.matrix,$2(t.a,t.b,t.c,t.d,t.e,t.f))}function j2(t,e,r,i){function n(h){return h.length?h.pop()+" ":""}function s(h,u,f,d,p,m){if(h!==f||u!==d){var b=p.push("translate(",null,e,null,r);m.push({i:b-4,x:qr(h,f)},{i:b-2,x:qr(u,d)})}else(f||d)&&p.push("translate("+f+e+d+r)}function a(h,u,f,d){h!==u?(h-u>180?u+=360:u-h>180&&(h+=360),d.push({i:f.push(n(f)+"rotate(",null,i)-2,x:qr(h,u)})):u&&f.push(n(f)+"rotate("+u+i)}function o(h,u,f,d){h!==u?d.push({i:f.push(n(f)+"skewX(",null,i)-2,x:qr(h,u)}):u&&f.push(n(f)+"skewX("+u+i)}function l(h,u,f,d,p,m){if(h!==f||u!==d){var b=p.push(n(p)+"scale(",null,",",null,")");m.push({i:b-4,x:qr(h,f)},{i:b-2,x:qr(u,d)})}else(f!==1||d!==1)&&p.push(n(p)+"scale("+f+","+d+")")}return function(h,u){var f=[],d=[];return h=t(h),u=t(u),s(h.translateX,h.translateY,u.translateX,u.translateY,f,d),a(h.rotate,u.rotate,f,d),o(h.skewX,u.skewX,f,d),l(h.scaleX,h.scaleY,u.scaleX,u.scaleY,f,d),h=u=null,function(p){for(var m=-1,b=d.length,x;++m<b;)f[(x=d[m]).i]=x.x(p);return f.join("")}}}var O_=j2(N_,"px, ","px)","deg)"),F_=j2(R_,", ",")",")");function P_(t){return function(e,r){var i=t((e=Xh(e)).h,(r=Xh(r)).h),n=ga(e.c,r.c),s=ga(e.l,r.l),a=ga(e.opacity,r.opacity);return function(o){return e.h=i(o),e.c=n(o),e.l=s(o),e.opacity=a(o),e+""}}}const V_=P_(T_);var ks=0,la=0,Zs=0,X2=1e3,dl,ca,pl=0,In=0,dc=0,La=typeof performance=="object"&&performance.now?performance:Date,K2=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function u1(){return In||(K2(Y_),In=La.now()+dc)}function Y_(){In=0}function gl(){this._call=this._time=this._next=null}gl.prototype=Z2.prototype={constructor:gl,restart:function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?u1():+r)+(e==null?0:+e),!this._next&&ca!==this&&(ca?ca._next=this:dl=this,ca=this),this._call=t,this._time=r,Qh()},stop:function(){this._call&&(this._call=null,this._time=1/0,Qh())}};function Z2(t,e,r){var i=new gl;return i.restart(t,e,r),i}function z_(){u1(),++ks;for(var t=dl,e;t;)(e=In-t._time)>=0&&t._call.call(void 0,e),t=t._next;--ks}function j0(){In=(pl=La.now())+dc,ks=la=0;try{z_()}finally{ks=0,W_(),In=0}}function U_(){var t=La.now(),e=t-pl;e>X2&&(dc-=e,pl=t)}function W_(){for(var t,e=dl,r,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:dl=r);ca=t,Qh(i)}function Qh(t){if(!ks){la&&(la=clearTimeout(la));var e=t-In;e>24?(t<1/0&&(la=setTimeout(j0,t-La.now()-dc)),Zs&&(Zs=clearInterval(Zs))):(Zs||(pl=La.now(),Zs=setInterval(U_,X2)),ks=1,K2(j0))}}function X0(t,e,r){var i=new gl;return e=e==null?0:+e,i.restart(n=>{i.stop(),t(n+e)},e,r),i}var H_=w2("start","end","cancel","interrupt"),q_=[],Q2=0,K0=1,Jh=2,Uo=3,Z0=4,tu=5,Wo=6;function pc(t,e,r,i,n,s){var a=t.__transition;if(!a)t.__transition={};else if(r in a)return;G_(t,r,{name:e,index:i,group:n,on:H_,tween:q_,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Q2})}function f1(t,e){var r=ri(t,e);if(r.state>Q2)throw new Error("too late; already scheduled");return r}function _i(t,e){var r=ri(t,e);if(r.state>Uo)throw new Error("too late; already running");return r}function ri(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function G_(t,e,r){var i=t.__transition,n;i[e]=r,r.timer=Z2(s,0,r.time);function s(h){r.state=K0,r.timer.restart(a,r.delay,r.time),r.delay<=h&&a(h-r.delay)}function a(h){var u,f,d,p;if(r.state!==K0)return l();for(u in i)if(p=i[u],p.name===r.name){if(p.state===Uo)return X0(a);p.state===Z0?(p.state=Wo,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete i[u]):+u<e&&(p.state=Wo,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete i[u])}if(X0(function(){r.state===Uo&&(r.state=Z0,r.timer.restart(o,r.delay,r.time),o(h))}),r.state=Jh,r.on.call("start",t,t.__data__,r.index,r.group),r.state===Jh){for(r.state=Uo,n=new Array(d=r.tween.length),u=0,f=-1;u<d;++u)(p=r.tween[u].value.call(t,t.__data__,r.index,r.group))&&(n[++f]=p);n.length=f+1}}function o(h){for(var u=h<r.duration?r.ease.call(null,h/r.duration):(r.timer.restart(l),r.state=tu,1),f=-1,d=n.length;++f<d;)n[f].call(t,u);r.state===tu&&(r.on.call("end",t,t.__data__,r.index,r.group),l())}function l(){r.state=Wo,r.timer.stop(),delete i[e];for(var h in i)return;delete t.__transition}}function $_(t,e){var r=t.__transition,i,n,s=!0,a;if(r){e=e==null?null:e+"";for(a in r){if((i=r[a]).name!==e){s=!1;continue}n=i.state>Jh&&i.state<tu,i.state=Wo,i.timer.stop(),i.on.call(n?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete r[a]}s&&delete t.__transition}}function j_(t){return this.each(function(){$_(this,t)})}function X_(t,e){var r,i;return function(){var n=_i(this,t),s=n.tween;if(s!==r){i=r=s;for(var a=0,o=i.length;a<o;++a)if(i[a].name===e){i=i.slice(),i.splice(a,1);break}}n.tween=i}}function K_(t,e,r){var i,n;if(typeof r!="function")throw new Error;return function(){var s=_i(this,t),a=s.tween;if(a!==i){n=(i=a).slice();for(var o={name:e,value:r},l=0,h=n.length;l<h;++l)if(n[l].name===e){n[l]=o;break}l===h&&n.push(o)}s.tween=n}}function Z_(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i=ri(this.node(),r).tween,n=0,s=i.length,a;n<s;++n)if((a=i[n]).name===t)return a.value;return null}return this.each((e==null?X_:K_)(r,t,e))}function d1(t,e,r){var i=t._id;return t.each(function(){var n=_i(this,i);(n.value||(n.value={}))[e]=r.apply(this,arguments)}),function(n){return ri(n,i).value[e]}}function J2(t,e){var r;return(typeof e=="number"?qr:e instanceof Dn?fl:(r=Dn(e))?(e=r,fl):G2)(t,e)}function Q_(t){return function(){this.removeAttribute(t)}}function J_(t){return function(){this.removeAttributeNS(t.space,t.local)}}function tx(t,e,r){var i,n=r+"",s;return function(){var a=this.getAttribute(t);return a===n?null:a===i?s:s=e(i=a,r)}}function ex(t,e,r){var i,n=r+"",s;return function(){var a=this.getAttributeNS(t.space,t.local);return a===n?null:a===i?s:s=e(i=a,r)}}function rx(t,e,r){var i,n,s;return function(){var a,o=r(this),l;return o==null?void this.removeAttribute(t):(a=this.getAttribute(t),l=o+"",a===l?null:a===i&&l===n?s:(n=l,s=e(i=a,o)))}}function ix(t,e,r){var i,n,s;return function(){var a,o=r(this),l;return o==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),l=o+"",a===l?null:a===i&&l===n?s:(n=l,s=e(i=a,o)))}}function nx(t,e){var r=hc(t),i=r==="transform"?F_:J2;return this.attrTween(t,typeof e=="function"?(r.local?ix:rx)(r,i,d1(this,"attr."+t,e)):e==null?(r.local?J_:Q_)(r):(r.local?ex:tx)(r,i,e))}function sx(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function ax(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function ox(t,e){var r,i;function n(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&ax(t,s)),r}return n._value=e,n}function lx(t,e){var r,i;function n(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&sx(t,s)),r}return n._value=e,n}function cx(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var i=hc(t);return this.tween(r,(i.local?ox:lx)(i,e))}function hx(t,e){return function(){f1(this,t).delay=+e.apply(this,arguments)}}function ux(t,e){return e=+e,function(){f1(this,t).delay=e}}function fx(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?hx:ux)(e,t)):ri(this.node(),e).delay}function dx(t,e){return function(){_i(this,t).duration=+e.apply(this,arguments)}}function px(t,e){return e=+e,function(){_i(this,t).duration=e}}function gx(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?dx:px)(e,t)):ri(this.node(),e).duration}function yx(t,e){if(typeof e!="function")throw new Error;return function(){_i(this,t).ease=e}}function mx(t){var e=this._id;return arguments.length?this.each(yx(e,t)):ri(this.node(),e).ease}function bx(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;_i(this,t).ease=r}}function _x(t){if(typeof t!="function")throw new Error;return this.each(bx(this._id,t))}function xx(t){typeof t!="function"&&(t=S2(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var s=e[n],a=s.length,o=i[n]=[],l,h=0;h<a;++h)(l=s[h])&&t.call(l,l.__data__,h,s)&&o.push(l);return new qi(i,this._parents,this._name,this._id)}function vx(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,i=e.length,n=r.length,s=Math.min(i,n),a=new Array(i),o=0;o<s;++o)for(var l=e[o],h=r[o],u=l.length,f=a[o]=new Array(u),d,p=0;p<u;++p)(d=l[p]||h[p])&&(f[p]=d);for(;o<i;++o)a[o]=e[o];return new qi(a,this._parents,this._name,this._id)}function kx(t){return(t+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function wx(t,e,r){var i,n,s=kx(e)?f1:_i;return function(){var a=s(this,t),o=a.on;o!==i&&(n=(i=o).copy()).on(e,r),a.on=n}}function Tx(t,e){var r=this._id;return arguments.length<2?ri(this.node(),r).on.on(t):this.each(wx(r,t,e))}function Ex(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function Cx(){return this.on("end.remove",Ex(this._id))}function Sx(t){var e=this._name,r=this._id;typeof t!="function"&&(t=a1(t));for(var i=this._groups,n=i.length,s=new Array(n),a=0;a<n;++a)for(var o=i[a],l=o.length,h=s[a]=new Array(l),u,f,d=0;d<l;++d)(u=o[d])&&(f=t.call(u,u.__data__,d,o))&&("__data__"in u&&(f.__data__=u.__data__),h[d]=f,pc(h[d],e,r,d,h,ri(u,r)));return new qi(s,this._parents,e,r)}function Ax(t){var e=this._name,r=this._id;typeof t!="function"&&(t=C2(t));for(var i=this._groups,n=i.length,s=[],a=[],o=0;o<n;++o)for(var l=i[o],h=l.length,u,f=0;f<h;++f)if(u=l[f]){for(var d=t.call(u,u.__data__,f,l),p,m=ri(u,r),b=0,x=d.length;b<x;++b)(p=d[b])&&pc(p,e,r,b,d,m);s.push(d),a.push(u)}return new qi(s,a,e,r)}var Lx=io.prototype.constructor;function Bx(){return new Lx(this._groups,this._parents)}function Dx(t,e){var r,i,n;return function(){var s=vs(this,t),a=(this.style.removeProperty(t),vs(this,t));return s===a?null:s===r&&a===i?n:n=e(r=s,i=a)}}function tp(t){return function(){this.style.removeProperty(t)}}function Ix(t,e,r){var i,n=r+"",s;return function(){var a=vs(this,t);return a===n?null:a===i?s:s=e(i=a,r)}}function Mx(t,e,r){var i,n,s;return function(){var a=vs(this,t),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(t),vs(this,t))),a===l?null:a===i&&l===n?s:(n=l,s=e(i=a,o))}}function Nx(t,e){var r,i,n,s="style."+e,a="end."+s,o;return function(){var l=_i(this,t),h=l.on,u=l.value[s]==null?o||(o=tp(e)):void 0;(h!==r||n!==u)&&(i=(r=h).copy()).on(a,n=u),l.on=i}}function Rx(t,e,r){var i=(t+="")=="transform"?O_:J2;return e==null?this.styleTween(t,Dx(t,i)).on("end.style."+t,tp(t)):typeof e=="function"?this.styleTween(t,Mx(t,i,d1(this,"style."+t,e))).each(Nx(this._id,t)):this.styleTween(t,Ix(t,i,e),r).on("end.style."+t,null)}function Ox(t,e,r){return function(i){this.style.setProperty(t,e.call(this,i),r)}}function Fx(t,e,r){var i,n;function s(){var a=e.apply(this,arguments);return a!==n&&(i=(n=a)&&Ox(t,a,r)),i}return s._value=e,s}function Px(t,e,r){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!="function")throw new Error;return this.tween(i,Fx(t,e,r??""))}function Vx(t){return function(){this.textContent=t}}function Yx(t){return function(){var e=t(this);this.textContent=e??""}}function zx(t){return this.tween("text",typeof t=="function"?Yx(d1(this,"text",t)):Vx(t==null?"":t+""))}function Ux(t){return function(e){this.textContent=t.call(this,e)}}function Wx(t){var e,r;function i(){var n=t.apply(this,arguments);return n!==r&&(e=(r=n)&&Ux(n)),e}return i._value=t,i}function Hx(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,Wx(t))}function qx(){for(var t=this._name,e=this._id,r=ep(),i=this._groups,n=i.length,s=0;s<n;++s)for(var a=i[s],o=a.length,l,h=0;h<o;++h)if(l=a[h]){var u=ri(l,e);pc(l,t,r,h,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new qi(i,this._parents,t,r)}function Gx(){var t,e,r=this,i=r._id,n=r.size();return new Promise(function(s,a){var o={value:a},l={value:function(){--n===0&&s()}};r.each(function(){var h=_i(this,i),u=h.on;u!==t&&(e=(t=u).copy(),e._.cancel.push(o),e._.interrupt.push(o),e._.end.push(l)),h.on=e}),n===0&&s()})}var $x=0;function qi(t,e,r,i){this._groups=t,this._parents=e,this._name=r,this._id=i}function ep(){return++$x}var Ci=io.prototype;qi.prototype={constructor:qi,select:Sx,selectAll:Ax,selectChild:Ci.selectChild,selectChildren:Ci.selectChildren,filter:xx,merge:vx,selection:Bx,transition:qx,call:Ci.call,nodes:Ci.nodes,node:Ci.node,size:Ci.size,empty:Ci.empty,each:Ci.each,on:Tx,attr:nx,attrTween:cx,style:Rx,styleTween:Px,text:zx,textTween:Hx,remove:Cx,tween:Z_,delay:fx,duration:gx,ease:mx,easeVarying:_x,end:Gx,[Symbol.iterator]:Ci[Symbol.iterator]};function jx(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Xx={time:null,delay:0,duration:250,ease:jx};function Kx(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function Zx(t){var e,r;t instanceof qi?(e=t._id,t=t._name):(e=ep(),(r=Xx).time=u1(),t=t==null?null:t+"");for(var i=this._groups,n=i.length,s=0;s<n;++s)for(var a=i[s],o=a.length,l,h=0;h<o;++h)(l=a[h])&&pc(l,t,e,h,a,r||Kx(l,e));return new qi(i,this._parents,t,e)}io.prototype.interrupt=j_;io.prototype.transition=Zx;const eu=Math.PI,ru=2*eu,Tn=1e-6,Qx=ru-Tn;function rp(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}function Jx(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return rp;const r=10**e;return function(i){this._+=i[0];for(let n=1,s=i.length;n<s;++n)this._+=Math.round(arguments[n]*r)/r+i[n]}}class t6{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?rp:Jx(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,i,n){this._append`Q${+e},${+r},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(e,r,i,n,s,a){this._append`C${+e},${+r},${+i},${+n},${this._x1=+s},${this._y1=+a}`}arcTo(e,r,i,n,s){if(e=+e,r=+r,i=+i,n=+n,s=+s,s<0)throw new Error(`negative radius: ${s}`);let a=this._x1,o=this._y1,l=i-e,h=n-r,u=a-e,f=o-r,d=u*u+f*f;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(d>Tn)if(!(Math.abs(f*l-h*u)>Tn)||!s)this._append`L${this._x1=e},${this._y1=r}`;else{let p=i-a,m=n-o,b=l*l+h*h,x=p*p+m*m,k=Math.sqrt(b),v=Math.sqrt(d),B=s*Math.tan((eu-Math.acos((b+d-x)/(2*k*v)))/2),R=B/v,P=B/k;Math.abs(R-1)>Tn&&this._append`L${e+R*u},${r+R*f}`,this._append`A${s},${s},0,0,${+(f*p>u*m)},${this._x1=e+P*l},${this._y1=r+P*h}`}}arc(e,r,i,n,s,a){if(e=+e,r=+r,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let o=i*Math.cos(n),l=i*Math.sin(n),h=e+o,u=r+l,f=1^a,d=a?n-s:s-n;this._x1===null?this._append`M${h},${u}`:(Math.abs(this._x1-h)>Tn||Math.abs(this._y1-u)>Tn)&&this._append`L${h},${u}`,i&&(d<0&&(d=d%ru+ru),d>Qx?this._append`A${i},${i},0,1,${f},${e-o},${r-l}A${i},${i},0,1,${f},${this._x1=h},${this._y1=u}`:d>Tn&&this._append`A${i},${i},0,${+(d>=eu)},${f},${this._x1=e+i*Math.cos(s)},${this._y1=r+i*Math.sin(s)}`)}rect(e,r,i,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}}function e6(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function r6(t,e){return fetch(t,e).then(e6)}function i6(t){return(e,r)=>r6(e,r).then(i=>new DOMParser().parseFromString(i,t))}var n6=i6("image/svg+xml");function s6(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function yl(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,i=t.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+t.slice(r+1)]}function ws(t){return t=yl(Math.abs(t)),t?t[1]:NaN}function a6(t,e){return function(r,i){for(var n=r.length,s=[],a=0,o=t[0],l=0;n>0&&o>0&&(l+o+1>i&&(o=Math.max(1,i-l)),s.push(r.substring(n-=o,n+o)),!((l+=o+1)>i));)o=t[a=(a+1)%t.length];return s.reverse().join(e)}}function o6(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var l6=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ml(t){if(!(e=l6.exec(t)))throw new Error("invalid format: "+t);var e;return new p1({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}ml.prototype=p1.prototype;function p1(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}p1.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function c6(t){t:for(var e=t.length,r=1,i=-1,n;r<e;++r)switch(t[r]){case".":i=n=r;break;case"0":i===0&&(i=r),n=r;break;default:if(!+t[r])break t;i>0&&(i=0);break}return i>0?t.slice(0,i)+t.slice(n+1):t}var ip;function h6(t,e){var r=yl(t,e);if(!r)return t+"";var i=r[0],n=r[1],s=n-(ip=Math.max(-8,Math.min(8,Math.floor(n/3)))*3)+1,a=i.length;return s===a?i:s>a?i+new Array(s-a+1).join("0"):s>0?i.slice(0,s)+"."+i.slice(s):"0."+new Array(1-s).join("0")+yl(t,Math.max(0,e+s-1))[0]}function Q0(t,e){var r=yl(t,e);if(!r)return t+"";var i=r[0],n=r[1];return n<0?"0."+new Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+new Array(n-i.length+2).join("0")}const J0={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:s6,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Q0(t*100,e),r:Q0,s:h6,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function tf(t){return t}var ef=Array.prototype.map,rf=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function u6(t){var e=t.grouping===void 0||t.thousands===void 0?tf:a6(ef.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",i=t.currency===void 0?"":t.currency[1]+"",n=t.decimal===void 0?".":t.decimal+"",s=t.numerals===void 0?tf:o6(ef.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",o=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function h(f){f=ml(f);var d=f.fill,p=f.align,m=f.sign,b=f.symbol,x=f.zero,k=f.width,v=f.comma,B=f.precision,R=f.trim,P=f.type;P==="n"?(v=!0,P="g"):J0[P]||(B===void 0&&(B=12),R=!0,P="g"),(x||d==="0"&&p==="=")&&(x=!0,d="0",p="=");var V=b==="$"?r:b==="#"&&/[boxX]/.test(P)?"0"+P.toLowerCase():"",O=b==="$"?i:/[%p]/.test(P)?a:"",F=J0[P],C=/[defgprs%]/.test(P);B=B===void 0?6:/[gprs]/.test(P)?Math.max(1,Math.min(21,B)):Math.max(0,Math.min(20,B));function S(E){var _=V,w=O,g,D,y;if(P==="c")w=F(E)+w,E="";else{E=+E;var N=E<0||1/E<0;if(E=isNaN(E)?l:F(Math.abs(E),B),R&&(E=c6(E)),N&&+E==0&&m!=="+"&&(N=!1),_=(N?m==="("?m:o:m==="-"||m==="("?"":m)+_,w=(P==="s"?rf[8+ip/3]:"")+w+(N&&m==="("?")":""),C){for(g=-1,D=E.length;++g<D;)if(y=E.charCodeAt(g),48>y||y>57){w=(y===46?n+E.slice(g+1):E.slice(g))+w,E=E.slice(0,g);break}}}v&&!x&&(E=e(E,1/0));var nt=_.length+E.length+w.length,Y=nt<k?new Array(k-nt+1).join(d):"";switch(v&&x&&(E=e(Y+E,Y.length?k-w.length:1/0),Y=""),p){case"<":E=_+E+w+Y;break;case"=":E=_+Y+E+w;break;case"^":E=Y.slice(0,nt=Y.length>>1)+_+E+w+Y.slice(nt);break;default:E=Y+_+E+w;break}return s(E)}return S.toString=function(){return f+""},S}function u(f,d){var p=h((f=ml(f),f.type="f",f)),m=Math.max(-8,Math.min(8,Math.floor(ws(d)/3)))*3,b=Math.pow(10,-m),x=rf[8+m/3];return function(k){return p(b*k)+x}}return{format:h,formatPrefix:u}}var Co,np,sp;f6({thousands:",",grouping:[3],currency:["$",""]});function f6(t){return Co=u6(t),np=Co.format,sp=Co.formatPrefix,Co}function d6(t){return Math.max(0,-ws(Math.abs(t)))}function p6(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ws(e)/3)))*3-ws(Math.abs(t)))}function g6(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,ws(e)-ws(t))+1}function g1(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const nf=Symbol("implicit");function ap(){var t=new N0,e=[],r=[],i=nf;function n(s){let a=t.get(s);if(a===void 0){if(i!==nf)return i;t.set(s,a=e.push(s)-1)}return r[a%r.length]}return n.domain=function(s){if(!arguments.length)return e.slice();e=[],t=new N0;for(const a of s)t.has(a)||t.set(a,e.push(a)-1);return n},n.range=function(s){return arguments.length?(r=Array.from(s),n):r.slice()},n.unknown=function(s){return arguments.length?(i=s,n):i},n.copy=function(){return ap(e,r).unknown(i)},g1.apply(n,arguments),n}function y6(t){return function(){return t}}function m6(t){return+t}var sf=[0,1];function as(t){return t}function iu(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:y6(isNaN(e)?NaN:.5)}function b6(t,e){var r;return t>e&&(r=t,t=e,e=r),function(i){return Math.max(t,Math.min(e,i))}}function _6(t,e,r){var i=t[0],n=t[1],s=e[0],a=e[1];return n<i?(i=iu(n,i),s=r(a,s)):(i=iu(i,n),s=r(s,a)),function(o){return s(i(o))}}function x6(t,e,r){var i=Math.min(t.length,e.length)-1,n=new Array(i),s=new Array(i),a=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<i;)n[a]=iu(t[a],t[a+1]),s[a]=r(e[a],e[a+1]);return function(o){var l=c5(t,o,1,i)-1;return s[l](n[l](o))}}function op(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function v6(){var t=sf,e=sf,r=h1,i,n,s,a=as,o,l,h;function u(){var d=Math.min(t.length,e.length);return a!==as&&(a=b6(t[0],t[d-1])),o=d>2?x6:_6,l=h=null,f}function f(d){return d==null||isNaN(d=+d)?s:(l||(l=o(t.map(i),e,r)))(i(a(d)))}return f.invert=function(d){return a(n((h||(h=o(e,t.map(i),qr)))(d)))},f.domain=function(d){return arguments.length?(t=Array.from(d,m6),u()):t.slice()},f.range=function(d){return arguments.length?(e=Array.from(d),u()):e.slice()},f.rangeRound=function(d){return e=Array.from(d),r=M_,u()},f.clamp=function(d){return arguments.length?(a=d?!0:as,u()):a!==as},f.interpolate=function(d){return arguments.length?(r=d,u()):r},f.unknown=function(d){return arguments.length?(s=d,f):s},function(d,p){return i=d,n=p,u()}}function lp(){return v6()(as,as)}function k6(t,e,r,i){var n=qh(t,e,r),s;switch(i=ml(i??",f"),i.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return i.precision==null&&!isNaN(s=p6(n,a))&&(i.precision=s),sp(i,a)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(s=g6(n,Math.max(Math.abs(t),Math.abs(e))))&&(i.precision=s-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(s=d6(n))&&(i.precision=s-(i.type==="%")*2);break}}return np(i)}function w6(t){var e=t.domain;return t.ticks=function(r){var i=e();return y5(i[0],i[i.length-1],r??10)},t.tickFormat=function(r,i){var n=e();return k6(n[0],n[n.length-1],r??10,i)},t.nice=function(r){r==null&&(r=10);var i=e(),n=0,s=i.length-1,a=i[n],o=i[s],l,h,u=10;for(o<a&&(h=a,a=o,o=h,h=n,n=s,s=h);u-- >0;){if(h=Hh(a,o,r),h===l)return i[n]=a,i[s]=o,e(i);if(h>0)a=Math.floor(a/h)*h,o=Math.ceil(o/h)*h;else if(h<0)a=Math.ceil(a*h)/h,o=Math.floor(o*h)/h;else break;l=h}return t},t}function cp(){var t=lp();return t.copy=function(){return op(t,cp())},g1.apply(t,arguments),w6(t)}function T6(t,e){t=t.slice();var r=0,i=t.length-1,n=t[r],s=t[i],a;return s<n&&(a=r,r=i,i=a,a=n,n=s,s=a),t[r]=e.floor(n),t[i]=e.ceil(s),t}const ch=new Date,hh=new Date;function He(t,e,r,i){function n(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return n.floor=s=>(t(s=new Date(+s)),s),n.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),n.round=s=>{const a=n(s),o=n.ceil(s);return s-a<o-s?a:o},n.offset=(s,a)=>(e(s=new Date(+s),a==null?1:Math.floor(a)),s),n.range=(s,a,o)=>{const l=[];if(s=n.ceil(s),o=o==null?1:Math.floor(o),!(s<a)||!(o>0))return l;let h;do l.push(h=new Date(+s)),e(s,o),t(s);while(h<s&&s<a);return l},n.filter=s=>He(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,o)=>{if(a>=a)if(o<0)for(;++o<=0;)for(;e(a,-1),!s(a););else for(;--o>=0;)for(;e(a,1),!s(a););}),r&&(n.count=(s,a)=>(ch.setTime(+s),hh.setTime(+a),t(ch),t(hh),Math.floor(r(ch,hh))),n.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?n.filter(i?a=>i(a)%s===0:a=>n.count(0,a)%s===0):n)),n}const bl=He(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);bl.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?He(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):bl);bl.range;const Fi=1e3,Vr=Fi*60,Pi=Vr*60,Gi=Pi*24,y1=Gi*7,af=Gi*30,uh=Gi*365,os=He(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*Fi)},(t,e)=>(e-t)/Fi,t=>t.getUTCSeconds());os.range;const Ba=He(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Fi)},(t,e)=>{t.setTime(+t+e*Vr)},(t,e)=>(e-t)/Vr,t=>t.getMinutes());Ba.range;const E6=He(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*Vr)},(t,e)=>(e-t)/Vr,t=>t.getUTCMinutes());E6.range;const Da=He(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Fi-t.getMinutes()*Vr)},(t,e)=>{t.setTime(+t+e*Pi)},(t,e)=>(e-t)/Pi,t=>t.getHours());Da.range;const C6=He(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Pi)},(t,e)=>(e-t)/Pi,t=>t.getUTCHours());C6.range;const Mn=He(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Vr)/Gi,t=>t.getDate()-1);Mn.range;const m1=He(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Gi,t=>t.getUTCDate()-1);m1.range;const S6=He(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Gi,t=>Math.floor(t/Gi));S6.range;function Gn(t){return He(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*Vr)/y1)}const Ts=Gn(0),_l=Gn(1),A6=Gn(2),L6=Gn(3),Es=Gn(4),B6=Gn(5),D6=Gn(6);Ts.range;_l.range;A6.range;L6.range;Es.range;B6.range;D6.range;function $n(t){return He(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/y1)}const hp=$n(0),xl=$n(1),I6=$n(2),M6=$n(3),Cs=$n(4),N6=$n(5),R6=$n(6);hp.range;xl.range;I6.range;M6.range;Cs.range;N6.range;R6.range;const Ia=He(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Ia.range;const O6=He(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());O6.range;const $i=He(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());$i.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:He(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)});$i.range;const Nn=He(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Nn.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:He(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)});Nn.range;function F6(t,e,r,i,n,s){const a=[[os,1,Fi],[os,5,5*Fi],[os,15,15*Fi],[os,30,30*Fi],[s,1,Vr],[s,5,5*Vr],[s,15,15*Vr],[s,30,30*Vr],[n,1,Pi],[n,3,3*Pi],[n,6,6*Pi],[n,12,12*Pi],[i,1,Gi],[i,2,2*Gi],[r,1,y1],[e,1,af],[e,3,3*af],[t,1,uh]];function o(h,u,f){const d=u<h;d&&([h,u]=[u,h]);const p=f&&typeof f.range=="function"?f:l(h,u,f),m=p?p.range(h,+u+1):[];return d?m.reverse():m}function l(h,u,f){const d=Math.abs(u-h)/f,p=s1(([,,x])=>x).right(a,d);if(p===a.length)return t.every(qh(h/uh,u/uh,f));if(p===0)return bl.every(Math.max(qh(h,u,f),1));const[m,b]=a[d/a[p-1][2]<a[p][2]/d?p-1:p];return m.every(b)}return[o,l]}const[P6,V6]=F6($i,Ia,Ts,Mn,Da,Ba);function fh(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function dh(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Qs(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function Y6(t){var e=t.dateTime,r=t.date,i=t.time,n=t.periods,s=t.days,a=t.shortDays,o=t.months,l=t.shortMonths,h=Js(n),u=ta(n),f=Js(s),d=ta(s),p=Js(a),m=ta(a),b=Js(o),x=ta(o),k=Js(l),v=ta(l),B={a:N,A:nt,b:Y,B:Z,c:null,d:ff,e:ff,f:cv,g:_v,G:vv,H:av,I:ov,j:lv,L:up,m:hv,M:uv,p:J,q:X,Q:gf,s:yf,S:fv,u:dv,U:pv,V:gv,w:yv,W:mv,x:null,X:null,y:bv,Y:xv,Z:kv,"%":pf},R={a:tt,A:ot,b:at,B:U,c:null,d:df,e:df,f:Cv,g:Ov,G:Pv,H:wv,I:Tv,j:Ev,L:dp,m:Sv,M:Av,p:Tt,q:$,Q:gf,s:yf,S:Lv,u:Bv,U:Dv,V:Iv,w:Mv,W:Nv,x:null,X:null,y:Rv,Y:Fv,Z:Vv,"%":pf},P={a:S,A:E,b:_,B:w,c:g,d:hf,e:hf,f:rv,g:cf,G:lf,H:uf,I:uf,j:Q6,L:ev,m:Z6,M:J6,p:C,q:K6,Q:nv,s:sv,S:tv,u:q6,U:G6,V:$6,w:H6,W:j6,x:D,X:y,y:cf,Y:lf,Z:X6,"%":iv};B.x=V(r,B),B.X=V(i,B),B.c=V(e,B),R.x=V(r,R),R.X=V(i,R),R.c=V(e,R);function V(j,W){return function(z){var A=[],M=-1,q=0,L=j.length,st,T,Dt;for(z instanceof Date||(z=new Date(+z));++M<L;)j.charCodeAt(M)===37&&(A.push(j.slice(q,M)),(T=of[st=j.charAt(++M)])!=null?st=j.charAt(++M):T=st==="e"?" ":"0",(Dt=W[st])&&(st=Dt(z,T)),A.push(st),q=M+1);return A.push(j.slice(q,M)),A.join("")}}function O(j,W){return function(z){var A=Qs(1900,void 0,1),M=F(A,j,z+="",0),q,L;if(M!=z.length)return null;if("Q"in A)return new Date(A.Q);if("s"in A)return new Date(A.s*1e3+("L"in A?A.L:0));if(W&&!("Z"in A)&&(A.Z=0),"p"in A&&(A.H=A.H%12+A.p*12),A.m===void 0&&(A.m="q"in A?A.q:0),"V"in A){if(A.V<1||A.V>53)return null;"w"in A||(A.w=1),"Z"in A?(q=dh(Qs(A.y,0,1)),L=q.getUTCDay(),q=L>4||L===0?xl.ceil(q):xl(q),q=m1.offset(q,(A.V-1)*7),A.y=q.getUTCFullYear(),A.m=q.getUTCMonth(),A.d=q.getUTCDate()+(A.w+6)%7):(q=fh(Qs(A.y,0,1)),L=q.getDay(),q=L>4||L===0?_l.ceil(q):_l(q),q=Mn.offset(q,(A.V-1)*7),A.y=q.getFullYear(),A.m=q.getMonth(),A.d=q.getDate()+(A.w+6)%7)}else("W"in A||"U"in A)&&("w"in A||(A.w="u"in A?A.u%7:"W"in A?1:0),L="Z"in A?dh(Qs(A.y,0,1)).getUTCDay():fh(Qs(A.y,0,1)).getDay(),A.m=0,A.d="W"in A?(A.w+6)%7+A.W*7-(L+5)%7:A.w+A.U*7-(L+6)%7);return"Z"in A?(A.H+=A.Z/100|0,A.M+=A.Z%100,dh(A)):fh(A)}}function F(j,W,z,A){for(var M=0,q=W.length,L=z.length,st,T;M<q;){if(A>=L)return-1;if(st=W.charCodeAt(M++),st===37){if(st=W.charAt(M++),T=P[st in of?W.charAt(M++):st],!T||(A=T(j,z,A))<0)return-1}else if(st!=z.charCodeAt(A++))return-1}return A}function C(j,W,z){var A=h.exec(W.slice(z));return A?(j.p=u.get(A[0].toLowerCase()),z+A[0].length):-1}function S(j,W,z){var A=p.exec(W.slice(z));return A?(j.w=m.get(A[0].toLowerCase()),z+A[0].length):-1}function E(j,W,z){var A=f.exec(W.slice(z));return A?(j.w=d.get(A[0].toLowerCase()),z+A[0].length):-1}function _(j,W,z){var A=k.exec(W.slice(z));return A?(j.m=v.get(A[0].toLowerCase()),z+A[0].length):-1}function w(j,W,z){var A=b.exec(W.slice(z));return A?(j.m=x.get(A[0].toLowerCase()),z+A[0].length):-1}function g(j,W,z){return F(j,e,W,z)}function D(j,W,z){return F(j,r,W,z)}function y(j,W,z){return F(j,i,W,z)}function N(j){return a[j.getDay()]}function nt(j){return s[j.getDay()]}function Y(j){return l[j.getMonth()]}function Z(j){return o[j.getMonth()]}function J(j){return n[+(j.getHours()>=12)]}function X(j){return 1+~~(j.getMonth()/3)}function tt(j){return a[j.getUTCDay()]}function ot(j){return s[j.getUTCDay()]}function at(j){return l[j.getUTCMonth()]}function U(j){return o[j.getUTCMonth()]}function Tt(j){return n[+(j.getUTCHours()>=12)]}function $(j){return 1+~~(j.getUTCMonth()/3)}return{format:function(j){var W=V(j+="",B);return W.toString=function(){return j},W},parse:function(j){var W=O(j+="",!1);return W.toString=function(){return j},W},utcFormat:function(j){var W=V(j+="",R);return W.toString=function(){return j},W},utcParse:function(j){var W=O(j+="",!0);return W.toString=function(){return j},W}}}var of={"-":"",_:" ",0:"0"},Ze=/^\s*\d+/,z6=/^%/,U6=/[\\^$*+?|[\]().{}]/g;function ue(t,e,r){var i=t<0?"-":"",n=(i?-t:t)+"",s=n.length;return i+(s<r?new Array(r-s+1).join(e)+n:n)}function W6(t){return t.replace(U6,"\\$&")}function Js(t){return new RegExp("^(?:"+t.map(W6).join("|")+")","i")}function ta(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}function H6(t,e,r){var i=Ze.exec(e.slice(r,r+1));return i?(t.w=+i[0],r+i[0].length):-1}function q6(t,e,r){var i=Ze.exec(e.slice(r,r+1));return i?(t.u=+i[0],r+i[0].length):-1}function G6(t,e,r){var i=Ze.exec(e.slice(r,r+2));return i?(t.U=+i[0],r+i[0].length):-1}function $6(t,e,r){var i=Ze.exec(e.slice(r,r+2));return i?(t.V=+i[0],r+i[0].length):-1}function j6(t,e,r){var i=Ze.exec(e.slice(r,r+2));return i?(t.W=+i[0],r+i[0].length):-1}function lf(t,e,r){var i=Ze.exec(e.slice(r,r+4));return i?(t.y=+i[0],r+i[0].length):-1}function cf(t,e,r){var i=Ze.exec(e.slice(r,r+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function X6(t,e,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function K6(t,e,r){var i=Ze.exec(e.slice(r,r+1));return i?(t.q=i[0]*3-3,r+i[0].length):-1}function Z6(t,e,r){var i=Ze.exec(e.slice(r,r+2));return i?(t.m=i[0]-1,r+i[0].length):-1}function hf(t,e,r){var i=Ze.exec(e.slice(r,r+2));return i?(t.d=+i[0],r+i[0].length):-1}function Q6(t,e,r){var i=Ze.exec(e.slice(r,r+3));return i?(t.m=0,t.d=+i[0],r+i[0].length):-1}function uf(t,e,r){var i=Ze.exec(e.slice(r,r+2));return i?(t.H=+i[0],r+i[0].length):-1}function J6(t,e,r){var i=Ze.exec(e.slice(r,r+2));return i?(t.M=+i[0],r+i[0].length):-1}function tv(t,e,r){var i=Ze.exec(e.slice(r,r+2));return i?(t.S=+i[0],r+i[0].length):-1}function ev(t,e,r){var i=Ze.exec(e.slice(r,r+3));return i?(t.L=+i[0],r+i[0].length):-1}function rv(t,e,r){var i=Ze.exec(e.slice(r,r+6));return i?(t.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function iv(t,e,r){var i=z6.exec(e.slice(r,r+1));return i?r+i[0].length:-1}function nv(t,e,r){var i=Ze.exec(e.slice(r));return i?(t.Q=+i[0],r+i[0].length):-1}function sv(t,e,r){var i=Ze.exec(e.slice(r));return i?(t.s=+i[0],r+i[0].length):-1}function ff(t,e){return ue(t.getDate(),e,2)}function av(t,e){return ue(t.getHours(),e,2)}function ov(t,e){return ue(t.getHours()%12||12,e,2)}function lv(t,e){return ue(1+Mn.count($i(t),t),e,3)}function up(t,e){return ue(t.getMilliseconds(),e,3)}function cv(t,e){return up(t,e)+"000"}function hv(t,e){return ue(t.getMonth()+1,e,2)}function uv(t,e){return ue(t.getMinutes(),e,2)}function fv(t,e){return ue(t.getSeconds(),e,2)}function dv(t){var e=t.getDay();return e===0?7:e}function pv(t,e){return ue(Ts.count($i(t)-1,t),e,2)}function fp(t){var e=t.getDay();return e>=4||e===0?Es(t):Es.ceil(t)}function gv(t,e){return t=fp(t),ue(Es.count($i(t),t)+($i(t).getDay()===4),e,2)}function yv(t){return t.getDay()}function mv(t,e){return ue(_l.count($i(t)-1,t),e,2)}function bv(t,e){return ue(t.getFullYear()%100,e,2)}function _v(t,e){return t=fp(t),ue(t.getFullYear()%100,e,2)}function xv(t,e){return ue(t.getFullYear()%1e4,e,4)}function vv(t,e){var r=t.getDay();return t=r>=4||r===0?Es(t):Es.ceil(t),ue(t.getFullYear()%1e4,e,4)}function kv(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+ue(e/60|0,"0",2)+ue(e%60,"0",2)}function df(t,e){return ue(t.getUTCDate(),e,2)}function wv(t,e){return ue(t.getUTCHours(),e,2)}function Tv(t,e){return ue(t.getUTCHours()%12||12,e,2)}function Ev(t,e){return ue(1+m1.count(Nn(t),t),e,3)}function dp(t,e){return ue(t.getUTCMilliseconds(),e,3)}function Cv(t,e){return dp(t,e)+"000"}function Sv(t,e){return ue(t.getUTCMonth()+1,e,2)}function Av(t,e){return ue(t.getUTCMinutes(),e,2)}function Lv(t,e){return ue(t.getUTCSeconds(),e,2)}function Bv(t){var e=t.getUTCDay();return e===0?7:e}function Dv(t,e){return ue(hp.count(Nn(t)-1,t),e,2)}function pp(t){var e=t.getUTCDay();return e>=4||e===0?Cs(t):Cs.ceil(t)}function Iv(t,e){return t=pp(t),ue(Cs.count(Nn(t),t)+(Nn(t).getUTCDay()===4),e,2)}function Mv(t){return t.getUTCDay()}function Nv(t,e){return ue(xl.count(Nn(t)-1,t),e,2)}function Rv(t,e){return ue(t.getUTCFullYear()%100,e,2)}function Ov(t,e){return t=pp(t),ue(t.getUTCFullYear()%100,e,2)}function Fv(t,e){return ue(t.getUTCFullYear()%1e4,e,4)}function Pv(t,e){var r=t.getUTCDay();return t=r>=4||r===0?Cs(t):Cs.ceil(t),ue(t.getUTCFullYear()%1e4,e,4)}function Vv(){return"+0000"}function pf(){return"%"}function gf(t){return+t}function yf(t){return Math.floor(+t/1e3)}var rs,vl;Yv({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Yv(t){return rs=Y6(t),vl=rs.format,rs.parse,rs.utcFormat,rs.utcParse,rs}function zv(t){return new Date(t)}function Uv(t){return t instanceof Date?+t:+new Date(+t)}function gp(t,e,r,i,n,s,a,o,l,h){var u=lp(),f=u.invert,d=u.domain,p=h(".%L"),m=h(":%S"),b=h("%I:%M"),x=h("%I %p"),k=h("%a %d"),v=h("%b %d"),B=h("%B"),R=h("%Y");function P(V){return(l(V)<V?p:o(V)<V?m:a(V)<V?b:s(V)<V?x:i(V)<V?n(V)<V?k:v:r(V)<V?B:R)(V)}return u.invert=function(V){return new Date(f(V))},u.domain=function(V){return arguments.length?d(Array.from(V,Uv)):d().map(zv)},u.ticks=function(V){var O=d();return t(O[0],O[O.length-1],V??10)},u.tickFormat=function(V,O){return O==null?P:h(O)},u.nice=function(V){var O=d();return(!V||typeof V.range!="function")&&(V=e(O[0],O[O.length-1],V??10)),V?d(T6(O,V)):u},u.copy=function(){return op(u,gp(t,e,r,i,n,s,a,o,l,h))},u}function Wv(){return g1.apply(gp(P6,V6,$i,Ia,Ts,Mn,Da,Ba,os,vl).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Le(t){return function(){return t}}const mf=Math.abs,er=Math.atan2,xn=Math.cos,Hv=Math.max,ph=Math.min,oi=Math.sin,ls=Math.sqrt,rr=1e-12,Ma=Math.PI,kl=Ma/2,Ho=2*Ma;function qv(t){return t>1?0:t<-1?Ma:Math.acos(t)}function bf(t){return t>=1?kl:t<=-1?-kl:Math.asin(t)}function yp(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);e=i}return t},()=>new t6(e)}function Gv(t){return t.innerRadius}function $v(t){return t.outerRadius}function jv(t){return t.startAngle}function Xv(t){return t.endAngle}function Kv(t){return t&&t.padAngle}function Zv(t,e,r,i,n,s,a,o){var l=r-t,h=i-e,u=a-n,f=o-s,d=f*l-u*h;if(!(d*d<rr))return d=(u*(e-s)-f*(t-n))/d,[t+d*l,e+d*h]}function So(t,e,r,i,n,s,a){var o=t-r,l=e-i,h=(a?s:-s)/ls(o*o+l*l),u=h*l,f=-h*o,d=t+u,p=e+f,m=r+u,b=i+f,x=(d+m)/2,k=(p+b)/2,v=m-d,B=b-p,R=v*v+B*B,P=n-s,V=d*b-m*p,O=(B<0?-1:1)*ls(Hv(0,P*P*R-V*V)),F=(V*B-v*O)/R,C=(-V*v-B*O)/R,S=(V*B+v*O)/R,E=(-V*v+B*O)/R,_=F-x,w=C-k,g=S-x,D=E-k;return _*_+w*w>g*g+D*D&&(F=S,C=E),{cx:F,cy:C,x01:-u,y01:-f,x11:F*(n/P-1),y11:C*(n/P-1)}}function nu(){var t=Gv,e=$v,r=Le(0),i=null,n=jv,s=Xv,a=Kv,o=null,l=yp(h);function h(){var u,f,d=+t.apply(this,arguments),p=+e.apply(this,arguments),m=n.apply(this,arguments)-kl,b=s.apply(this,arguments)-kl,x=mf(b-m),k=b>m;if(o||(o=u=l()),p<d&&(f=p,p=d,d=f),!(p>rr))o.moveTo(0,0);else if(x>Ho-rr)o.moveTo(p*xn(m),p*oi(m)),o.arc(0,0,p,m,b,!k),d>rr&&(o.moveTo(d*xn(b),d*oi(b)),o.arc(0,0,d,b,m,k));else{var v=m,B=b,R=m,P=b,V=x,O=x,F=a.apply(this,arguments)/2,C=F>rr&&(i?+i.apply(this,arguments):ls(d*d+p*p)),S=ph(mf(p-d)/2,+r.apply(this,arguments)),E=S,_=S,w,g;if(C>rr){var D=bf(C/d*oi(F)),y=bf(C/p*oi(F));(V-=D*2)>rr?(D*=k?1:-1,R+=D,P-=D):(V=0,R=P=(m+b)/2),(O-=y*2)>rr?(y*=k?1:-1,v+=y,B-=y):(O=0,v=B=(m+b)/2)}var N=p*xn(v),nt=p*oi(v),Y=d*xn(P),Z=d*oi(P);if(S>rr){var J=p*xn(B),X=p*oi(B),tt=d*xn(R),ot=d*oi(R),at;if(x<Ma)if(at=Zv(N,nt,tt,ot,J,X,Y,Z)){var U=N-at[0],Tt=nt-at[1],$=J-at[0],j=X-at[1],W=1/oi(qv((U*$+Tt*j)/(ls(U*U+Tt*Tt)*ls($*$+j*j)))/2),z=ls(at[0]*at[0]+at[1]*at[1]);E=ph(S,(d-z)/(W-1)),_=ph(S,(p-z)/(W+1))}else E=_=0}O>rr?_>rr?(w=So(tt,ot,N,nt,p,_,k),g=So(J,X,Y,Z,p,_,k),o.moveTo(w.cx+w.x01,w.cy+w.y01),_<S?o.arc(w.cx,w.cy,_,er(w.y01,w.x01),er(g.y01,g.x01),!k):(o.arc(w.cx,w.cy,_,er(w.y01,w.x01),er(w.y11,w.x11),!k),o.arc(0,0,p,er(w.cy+w.y11,w.cx+w.x11),er(g.cy+g.y11,g.cx+g.x11),!k),o.arc(g.cx,g.cy,_,er(g.y11,g.x11),er(g.y01,g.x01),!k))):(o.moveTo(N,nt),o.arc(0,0,p,v,B,!k)):o.moveTo(N,nt),!(d>rr)||!(V>rr)?o.lineTo(Y,Z):E>rr?(w=So(Y,Z,J,X,d,-E,k),g=So(N,nt,tt,ot,d,-E,k),o.lineTo(w.cx+w.x01,w.cy+w.y01),E<S?o.arc(w.cx,w.cy,E,er(w.y01,w.x01),er(g.y01,g.x01),!k):(o.arc(w.cx,w.cy,E,er(w.y01,w.x01),er(w.y11,w.x11),!k),o.arc(0,0,d,er(w.cy+w.y11,w.cx+w.x11),er(g.cy+g.y11,g.cx+g.x11),k),o.arc(g.cx,g.cy,E,er(g.y11,g.x11),er(g.y01,g.x01),!k))):o.arc(0,0,d,P,R,k)}if(o.closePath(),u)return o=null,u+""||null}return h.centroid=function(){var u=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,f=(+n.apply(this,arguments)+ +s.apply(this,arguments))/2-Ma/2;return[xn(f)*u,oi(f)*u]},h.innerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:Le(+u),h):t},h.outerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:Le(+u),h):e},h.cornerRadius=function(u){return arguments.length?(r=typeof u=="function"?u:Le(+u),h):r},h.padRadius=function(u){return arguments.length?(i=u==null?null:typeof u=="function"?u:Le(+u),h):i},h.startAngle=function(u){return arguments.length?(n=typeof u=="function"?u:Le(+u),h):n},h.endAngle=function(u){return arguments.length?(s=typeof u=="function"?u:Le(+u),h):s},h.padAngle=function(u){return arguments.length?(a=typeof u=="function"?u:Le(+u),h):a},h.context=function(u){return arguments.length?(o=u??null,h):o},h}function mp(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function bp(t){this._context=t}bp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function Cr(t){return new bp(t)}function Qv(t){return t[0]}function Jv(t){return t[1]}function Us(t,e){var r=Le(!0),i=null,n=Cr,s=null,a=yp(o);t=typeof t=="function"?t:t===void 0?Qv:Le(t),e=typeof e=="function"?e:e===void 0?Jv:Le(e);function o(l){var h,u=(l=mp(l)).length,f,d=!1,p;for(i==null&&(s=n(p=a())),h=0;h<=u;++h)!(h<u&&r(f=l[h],h,l))===d&&((d=!d)?s.lineStart():s.lineEnd()),d&&s.point(+t(f,h,l),+e(f,h,l));if(p)return s=null,p+""||null}return o.x=function(l){return arguments.length?(t=typeof l=="function"?l:Le(+l),o):t},o.y=function(l){return arguments.length?(e=typeof l=="function"?l:Le(+l),o):e},o.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Le(!!l),o):r},o.curve=function(l){return arguments.length?(n=l,i!=null&&(s=n(i)),o):n},o.context=function(l){return arguments.length?(l==null?i=s=null:s=n(i=l),o):i},o}function tk(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function ek(t){return t}function rk(){var t=ek,e=tk,r=null,i=Le(0),n=Le(Ho),s=Le(0);function a(o){var l,h=(o=mp(o)).length,u,f,d=0,p=new Array(h),m=new Array(h),b=+i.apply(this,arguments),x=Math.min(Ho,Math.max(-Ho,n.apply(this,arguments)-b)),k,v=Math.min(Math.abs(x)/h,s.apply(this,arguments)),B=v*(x<0?-1:1),R;for(l=0;l<h;++l)(R=m[p[l]=l]=+t(o[l],l,o))>0&&(d+=R);for(e!=null?p.sort(function(P,V){return e(m[P],m[V])}):r!=null&&p.sort(function(P,V){return r(o[P],o[V])}),l=0,f=d?(x-h*B)/d:0;l<h;++l,b=k)u=p[l],R=m[u],k=b+(R>0?R*f:0)+B,m[u]={data:o[u],index:l,value:R,startAngle:b,endAngle:k,padAngle:v};return m}return a.value=function(o){return arguments.length?(t=typeof o=="function"?o:Le(+o),a):t},a.sortValues=function(o){return arguments.length?(e=o,r=null,a):e},a.sort=function(o){return arguments.length?(r=o,e=null,a):r},a.startAngle=function(o){return arguments.length?(i=typeof o=="function"?o:Le(+o),a):i},a.endAngle=function(o){return arguments.length?(n=typeof o=="function"?o:Le(+o),a):n},a.padAngle=function(o){return arguments.length?(s=typeof o=="function"?o:Le(+o),a):s},a}class _p{constructor(e,r){this._context=e,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}}function ik(t){return new _p(t,!0)}function nk(t){return new _p(t,!1)}function un(){}function wl(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function gc(t){this._context=t}gc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:wl(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:wl(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Ss(t){return new gc(t)}function xp(t){this._context=t}xp.prototype={areaStart:un,areaEnd:un,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:wl(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function sk(t){return new xp(t)}function vp(t){this._context=t}vp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:wl(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function ak(t){return new vp(t)}function kp(t,e){this._basis=new gc(t),this._beta=e}kp.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var i=t[0],n=e[0],s=t[r]-i,a=e[r]-n,o=-1,l;++o<=r;)l=o/r,this._basis.point(this._beta*t[o]+(1-this._beta)*(i+l*s),this._beta*e[o]+(1-this._beta)*(n+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const ok=function t(e){function r(i){return e===1?new gc(i):new kp(i,e)}return r.beta=function(i){return t(+i)},r}(.85);function Tl(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function b1(t,e){this._context=t,this._k=(1-e)/6}b1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Tl(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Tl(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const lk=function t(e){function r(i){return new b1(i,e)}return r.tension=function(i){return t(+i)},r}(0);function _1(t,e){this._context=t,this._k=(1-e)/6}_1.prototype={areaStart:un,areaEnd:un,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Tl(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const ck=function t(e){function r(i){return new _1(i,e)}return r.tension=function(i){return t(+i)},r}(0);function x1(t,e){this._context=t,this._k=(1-e)/6}x1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Tl(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const hk=function t(e){function r(i){return new x1(i,e)}return r.tension=function(i){return t(+i)},r}(0);function v1(t,e,r){var i=t._x1,n=t._y1,s=t._x2,a=t._y2;if(t._l01_a>rr){var o=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*o-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,n=(n*o-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>rr){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);s=(s*h+t._x1*t._l23_2a-e*t._l12_2a)/u,a=(a*h+t._y1*t._l23_2a-r*t._l12_2a)/u}t._context.bezierCurveTo(i,n,s,a,t._x2,t._y2)}function wp(t,e){this._context=t,this._alpha=e}wp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:v1(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const uk=function t(e){function r(i){return e?new wp(i,e):new b1(i,0)}return r.alpha=function(i){return t(+i)},r}(.5);function Tp(t,e){this._context=t,this._alpha=e}Tp.prototype={areaStart:un,areaEnd:un,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:v1(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const fk=function t(e){function r(i){return e?new Tp(i,e):new _1(i,0)}return r.alpha=function(i){return t(+i)},r}(.5);function Ep(t,e){this._context=t,this._alpha=e}Ep.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:v1(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const dk=function t(e){function r(i){return e?new Ep(i,e):new x1(i,0)}return r.alpha=function(i){return t(+i)},r}(.5);function Cp(t){this._context=t}Cp.prototype={areaStart:un,areaEnd:un,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function pk(t){return new Cp(t)}function _f(t){return t<0?-1:1}function xf(t,e,r){var i=t._x1-t._x0,n=e-t._x1,s=(t._y1-t._y0)/(i||n<0&&-0),a=(r-t._y1)/(n||i<0&&-0),o=(s*n+a*i)/(i+n);return(_f(s)+_f(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(o))||0}function vf(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function gh(t,e,r){var i=t._x0,n=t._y0,s=t._x1,a=t._y1,o=(s-i)/3;t._context.bezierCurveTo(i+o,n+o*e,s-o,a-o*r,s,a)}function El(t){this._context=t}El.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:gh(this,this._t0,vf(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,gh(this,vf(this,r=xf(this,t,e)),r);break;default:gh(this,this._t0,r=xf(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function Sp(t){this._context=new Ap(t)}(Sp.prototype=Object.create(El.prototype)).point=function(t,e){El.prototype.point.call(this,e,t)};function Ap(t){this._context=t}Ap.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,i,n,s){this._context.bezierCurveTo(e,t,i,r,s,n)}};function gk(t){return new El(t)}function yk(t){return new Sp(t)}function Lp(t){this._context=t}Lp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var i=kf(t),n=kf(e),s=0,a=1;a<r;++s,++a)this._context.bezierCurveTo(i[0][s],n[0][s],i[1][s],n[1][s],t[a],e[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function kf(t){var e,r=t.length-1,i,n=new Array(r),s=new Array(r),a=new Array(r);for(n[0]=0,s[0]=2,a[0]=t[0]+2*t[1],e=1;e<r-1;++e)n[e]=1,s[e]=4,a[e]=4*t[e]+2*t[e+1];for(n[r-1]=2,s[r-1]=7,a[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)i=n[e]/s[e-1],s[e]-=i,a[e]-=i*a[e-1];for(n[r-1]=a[r-1]/s[r-1],e=r-2;e>=0;--e)n[e]=(a[e]-n[e+1])/s[e];for(s[r-1]=(t[r]+n[r-1])/2,e=0;e<r-1;++e)s[e]=2*t[e+1]-n[e+1];return[n,s]}function mk(t){return new Lp(t)}function yc(t,e){this._context=t,this._t=e}yc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e}};function bk(t){return new yc(t,.5)}function _k(t){return new yc(t,0)}function xk(t){return new yc(t,1)}function ha(t,e,r){this.k=t,this.x=e,this.y=r}ha.prototype={constructor:ha,scale:function(t){return t===1?this:new ha(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new ha(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};ha.prototype;/*! @license DOMPurify 2.4.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.3/LICENSE */function rn(t){"@babel/helpers - typeof";return rn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rn(t)}function su(t,e){return su=Object.setPrototypeOf||function(i,n){return i.__proto__=n,i},su(t,e)}function vk(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qo(t,e,r){return vk()?qo=Reflect.construct:qo=function(n,s,a){var o=[null];o.push.apply(o,s);var l=Function.bind.apply(n,o),h=new l;return a&&su(h,a.prototype),h},qo.apply(null,arguments)}function Hr(t){return kk(t)||wk(t)||Tk(t)||Ek()}function kk(t){if(Array.isArray(t))return au(t)}function wk(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Tk(t,e){if(t){if(typeof t=="string")return au(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return au(t,e)}}function au(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}function Ek(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
7
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ck=Object.hasOwnProperty,wf=Object.setPrototypeOf,Sk=Object.isFrozen,Ak=Object.getPrototypeOf,Lk=Object.getOwnPropertyDescriptor,pr=Object.freeze,Jr=Object.seal,Bk=Object.create,Bp=typeof Reflect<"u"&&Reflect,Cl=Bp.apply,ou=Bp.construct;Cl||(Cl=function(e,r,i){return e.apply(r,i)});pr||(pr=function(e){return e});Jr||(Jr=function(e){return e});ou||(ou=function(e,r){return qo(e,Hr(r))});var Dk=Yr(Array.prototype.forEach),Tf=Yr(Array.prototype.pop),ea=Yr(Array.prototype.push),Go=Yr(String.prototype.toLowerCase),yh=Yr(String.prototype.toString),Ik=Yr(String.prototype.match),Wr=Yr(String.prototype.replace),Mk=Yr(String.prototype.indexOf),Nk=Yr(String.prototype.trim),lr=Yr(RegExp.prototype.test),mh=Rk(TypeError);function Yr(t){return function(e){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return Cl(t,e,i)}}function Rk(t){return function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return ou(t,r)}}function le(t,e,r){r=r||Go,wf&&wf(t,null);for(var i=e.length;i--;){var n=e[i];if(typeof n=="string"){var s=r(n);s!==n&&(Sk(e)||(e[i]=s),n=s)}t[n]=!0}return t}function vn(t){var e=Bk(null),r;for(r in t)Cl(Ck,t,[r])===!0&&(e[r]=t[r]);return e}function Ao(t,e){for(;t!==null;){var r=Lk(t,e);if(r){if(r.get)return Yr(r.get);if(typeof r.value=="function")return Yr(r.value)}t=Ak(t)}function i(n){return console.warn("fallback value for",n),null}return i}var Ef=pr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),bh=pr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),_h=pr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Ok=pr(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),xh=pr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),Fk=pr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Cf=pr(["#text"]),Sf=pr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),vh=pr(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Af=pr(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Lo=pr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Pk=Jr(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Vk=Jr(/<%[\w\W]*|[\w\W]*%>/gm),Yk=Jr(/\${[\w\W]*}/gm),zk=Jr(/^data-[\-\w.\u00B7-\uFFFF]/),Uk=Jr(/^aria-[\-\w]+$/),Wk=Jr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Hk=Jr(/^(?:\w+script|data):/i),qk=Jr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Gk=Jr(/^html$/i),$k=function(){return typeof window>"u"?null:window},jk=function(e,r){if(rn(e)!=="object"||typeof e.createPolicy!="function")return null;var i=null,n="data-tt-policy-suffix";r.currentScript&&r.currentScript.hasAttribute(n)&&(i=r.currentScript.getAttribute(n));var s="dompurify"+(i?"#"+i:"");try{return e.createPolicy(s,{createHTML:function(o){return o},createScriptURL:function(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function Dp(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$k(),e=function(K){return Dp(K)};if(e.version="2.4.3",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;var r=t.document,i=t.document,n=t.DocumentFragment,s=t.HTMLTemplateElement,a=t.Node,o=t.Element,l=t.NodeFilter,h=t.NamedNodeMap,u=h===void 0?t.NamedNodeMap||t.MozNamedAttrMap:h,f=t.HTMLFormElement,d=t.DOMParser,p=t.trustedTypes,m=o.prototype,b=Ao(m,"cloneNode"),x=Ao(m,"nextSibling"),k=Ao(m,"childNodes"),v=Ao(m,"parentNode");if(typeof s=="function"){var B=i.createElement("template");B.content&&B.content.ownerDocument&&(i=B.content.ownerDocument)}var R=jk(p,r),P=R?R.createHTML(""):"",V=i,O=V.implementation,F=V.createNodeIterator,C=V.createDocumentFragment,S=V.getElementsByTagName,E=r.importNode,_={};try{_=vn(i).documentMode?i.documentMode:{}}catch{}var w={};e.isSupported=typeof v=="function"&&O&&typeof O.createHTMLDocument<"u"&&_!==9;var g=Pk,D=Vk,y=Yk,N=zk,nt=Uk,Y=Hk,Z=qk,J=Wk,X=null,tt=le({},[].concat(Hr(Ef),Hr(bh),Hr(_h),Hr(xh),Hr(Cf))),ot=null,at=le({},[].concat(Hr(Sf),Hr(vh),Hr(Af),Hr(Lo))),U=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Tt=null,$=null,j=!0,W=!0,z=!1,A=!1,M=!1,q=!1,L=!1,st=!1,T=!1,Dt=!1,et=!0,Et=!1,vt="user-content-",pt=!0,ut=!1,gt={},ht=null,yt=le({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),he=null,re=le({},["audio","video","img","source","image","track"]),Mt=null,Nt=le({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Kt="http://www.w3.org/1998/Math/MathML",fe="http://www.w3.org/2000/svg",qt="http://www.w3.org/1999/xhtml",Ft=qt,Bt=!1,bt=null,mt=le({},[Kt,fe,qt],yh),wt,ft=["application/xhtml+xml","text/html"],It="text/html",it,Wt=null,ct=i.createElement("form"),Gt=function(K){return K instanceof RegExp||K instanceof Function},Jt=function(K){Wt&&Wt===K||((!K||rn(K)!=="object")&&(K={}),K=vn(K),wt=ft.indexOf(K.PARSER_MEDIA_TYPE)===-1?wt=It:wt=K.PARSER_MEDIA_TYPE,it=wt==="application/xhtml+xml"?yh:Go,X="ALLOWED_TAGS"in K?le({},K.ALLOWED_TAGS,it):tt,ot="ALLOWED_ATTR"in K?le({},K.ALLOWED_ATTR,it):at,bt="ALLOWED_NAMESPACES"in K?le({},K.ALLOWED_NAMESPACES,yh):mt,Mt="ADD_URI_SAFE_ATTR"in K?le(vn(Nt),K.ADD_URI_SAFE_ATTR,it):Nt,he="ADD_DATA_URI_TAGS"in K?le(vn(re),K.ADD_DATA_URI_TAGS,it):re,ht="FORBID_CONTENTS"in K?le({},K.FORBID_CONTENTS,it):yt,Tt="FORBID_TAGS"in K?le({},K.FORBID_TAGS,it):{},$="FORBID_ATTR"in K?le({},K.FORBID_ATTR,it):{},gt="USE_PROFILES"in K?K.USE_PROFILES:!1,j=K.ALLOW_ARIA_ATTR!==!1,W=K.ALLOW_DATA_ATTR!==!1,z=K.ALLOW_UNKNOWN_PROTOCOLS||!1,A=K.SAFE_FOR_TEMPLATES||!1,M=K.WHOLE_DOCUMENT||!1,st=K.RETURN_DOM||!1,T=K.RETURN_DOM_FRAGMENT||!1,Dt=K.RETURN_TRUSTED_TYPE||!1,L=K.FORCE_BODY||!1,et=K.SANITIZE_DOM!==!1,Et=K.SANITIZE_NAMED_PROPS||!1,pt=K.KEEP_CONTENT!==!1,ut=K.IN_PLACE||!1,J=K.ALLOWED_URI_REGEXP||J,Ft=K.NAMESPACE||qt,K.CUSTOM_ELEMENT_HANDLING&&Gt(K.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(U.tagNameCheck=K.CUSTOM_ELEMENT_HANDLING.tagNameCheck),K.CUSTOM_ELEMENT_HANDLING&&Gt(K.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(U.attributeNameCheck=K.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),K.CUSTOM_ELEMENT_HANDLING&&typeof K.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(U.allowCustomizedBuiltInElements=K.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),A&&(W=!1),T&&(st=!0),gt&&(X=le({},Hr(Cf)),ot=[],gt.html===!0&&(le(X,Ef),le(ot,Sf)),gt.svg===!0&&(le(X,bh),le(ot,vh),le(ot,Lo)),gt.svgFilters===!0&&(le(X,_h),le(ot,vh),le(ot,Lo)),gt.mathMl===!0&&(le(X,xh),le(ot,Af),le(ot,Lo))),K.ADD_TAGS&&(X===tt&&(X=vn(X)),le(X,K.ADD_TAGS,it)),K.ADD_ATTR&&(ot===at&&(ot=vn(ot)),le(ot,K.ADD_ATTR,it)),K.ADD_URI_SAFE_ATTR&&le(Mt,K.ADD_URI_SAFE_ATTR,it),K.FORBID_CONTENTS&&(ht===yt&&(ht=vn(ht)),le(ht,K.FORBID_CONTENTS,it)),pt&&(X["#text"]=!0),M&&le(X,["html","head","body"]),X.table&&(le(X,["tbody"]),delete Tt.tbody),pr&&pr(K),Wt=K)},se=le({},["mi","mo","mn","ms","mtext"]),ie=le({},["foreignobject","desc","title","annotation-xml"]),ae=le({},["title","style","font","a","script"]),Rt=le({},bh);le(Rt,_h),le(Rt,Ok);var Ht=le({},xh);le(Ht,Fk);var ne=function(K){var xt=v(K);(!xt||!xt.tagName)&&(xt={namespaceURI:Ft,tagName:"template"});var Ct=Go(K.tagName),te=Go(xt.tagName);return bt[K.namespaceURI]?K.namespaceURI===fe?xt.namespaceURI===qt?Ct==="svg":xt.namespaceURI===Kt?Ct==="svg"&&(te==="annotation-xml"||se[te]):!!Rt[Ct]:K.namespaceURI===Kt?xt.namespaceURI===qt?Ct==="math":xt.namespaceURI===fe?Ct==="math"&&ie[te]:!!Ht[Ct]:K.namespaceURI===qt?xt.namespaceURI===fe&&!ie[te]||xt.namespaceURI===Kt&&!se[te]?!1:!Ht[Ct]&&(ae[Ct]||!Rt[Ct]):!!(wt==="application/xhtml+xml"&&bt[K.namespaceURI]):!1},Ut=function(K){ea(e.removed,{element:K});try{K.parentNode.removeChild(K)}catch{try{K.outerHTML=P}catch{K.remove()}}},ki=function(K,xt){try{ea(e.removed,{attribute:xt.getAttributeNode(K),from:xt})}catch{ea(e.removed,{attribute:null,from:xt})}if(xt.removeAttribute(K),K==="is"&&!ot[K])if(st||T)try{Ut(xt)}catch{}else try{xt.setAttribute(K,"")}catch{}},mn=function(K){var xt,Ct;if(L)K="<remove></remove>"+K;else{var te=Ik(K,/^[\r\n\t ]+/);Ct=te&&te[0]}wt==="application/xhtml+xml"&&Ft===qt&&(K='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+K+"</body></html>");var de=R?R.createHTML(K):K;if(Ft===qt)try{xt=new d().parseFromString(de,wt)}catch{}if(!xt||!xt.documentElement){xt=O.createDocument(Ft,"template",null);try{xt.documentElement.innerHTML=Bt?P:de}catch{}}var ge=xt.body||xt.documentElement;return K&&Ct&&ge.insertBefore(i.createTextNode(Ct),ge.childNodes[0]||null),Ft===qt?S.call(xt,M?"html":"body")[0]:M?xt.documentElement:ge},me=function(K){return F.call(K.ownerDocument||K,K,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},$t=function(K){return K instanceof f&&(typeof K.nodeName!="string"||typeof K.textContent!="string"||typeof K.removeChild!="function"||!(K.attributes instanceof u)||typeof K.removeAttribute!="function"||typeof K.setAttribute!="function"||typeof K.namespaceURI!="string"||typeof K.insertBefore!="function"||typeof K.hasChildNodes!="function")},Ce=function(K){return rn(a)==="object"?K instanceof a:K&&rn(K)==="object"&&typeof K.nodeType=="number"&&typeof K.nodeName=="string"},tr=function(K,xt,Ct){w[K]&&Dk(w[K],function(te){te.call(e,xt,Ct,Wt)})},Se=function(K){var xt;if(tr("beforeSanitizeElements",K,null),$t(K)||lr(/[\u0080-\uFFFF]/,K.nodeName))return Ut(K),!0;var Ct=it(K.nodeName);if(tr("uponSanitizeElement",K,{tagName:Ct,allowedTags:X}),K.hasChildNodes()&&!Ce(K.firstElementChild)&&(!Ce(K.content)||!Ce(K.content.firstElementChild))&&lr(/<[/\w]/g,K.innerHTML)&&lr(/<[/\w]/g,K.textContent)||Ct==="select"&&lr(/<template/i,K.innerHTML))return Ut(K),!0;if(!X[Ct]||Tt[Ct]){if(!Tt[Ct]&&be(Ct)&&(U.tagNameCheck instanceof RegExp&&lr(U.tagNameCheck,Ct)||U.tagNameCheck instanceof Function&&U.tagNameCheck(Ct)))return!1;if(pt&&!ht[Ct]){var te=v(K)||K.parentNode,de=k(K)||K.childNodes;if(de&&te)for(var ge=de.length,Me=ge-1;Me>=0;--Me)te.insertBefore(b(de[Me],!0),x(K))}return Ut(K),!0}return K instanceof o&&!ne(K)||(Ct==="noscript"||Ct==="noembed")&&lr(/<\/no(script|embed)/i,K.innerHTML)?(Ut(K),!0):(A&&K.nodeType===3&&(xt=K.textContent,xt=Wr(xt,g," "),xt=Wr(xt,D," "),xt=Wr(xt,y," "),K.textContent!==xt&&(ea(e.removed,{element:K.cloneNode()}),K.textContent=xt)),tr("afterSanitizeElements",K,null),!1)},Ve=function(K,xt,Ct){if(et&&(xt==="id"||xt==="name")&&(Ct in i||Ct in ct))return!1;if(!(W&&!$[xt]&&lr(N,xt))){if(!(j&&lr(nt,xt))){if(!ot[xt]||$[xt]){if(!(be(K)&&(U.tagNameCheck instanceof RegExp&&lr(U.tagNameCheck,K)||U.tagNameCheck instanceof Function&&U.tagNameCheck(K))&&(U.attributeNameCheck instanceof RegExp&&lr(U.attributeNameCheck,xt)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(xt))||xt==="is"&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&&lr(U.tagNameCheck,Ct)||U.tagNameCheck instanceof Function&&U.tagNameCheck(Ct))))return!1}else if(!Mt[xt]){if(!lr(J,Wr(Ct,Z,""))){if(!((xt==="src"||xt==="xlink:href"||xt==="href")&&K!=="script"&&Mk(Ct,"data:")===0&&he[K])){if(!(z&&!lr(Y,Wr(Ct,Z,"")))){if(Ct)return!1}}}}}}return!0},be=function(K){return K.indexOf("-")>0},Qe=function(K){var xt,Ct,te,de;tr("beforeSanitizeAttributes",K,null);var ge=K.attributes;if(ge){var Me={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ot};for(de=ge.length;de--;){xt=ge[de];var Ge=xt,we=Ge.name,Xs=Ge.namespaceURI;if(Ct=we==="value"?xt.value:Nk(xt.value),te=it(we),Me.attrName=te,Me.attrValue=Ct,Me.keepAttr=!0,Me.forceKeepAttr=void 0,tr("uponSanitizeAttribute",K,Me),Ct=Me.attrValue,!Me.forceKeepAttr&&(ki(we,K),!!Me.keepAttr)){if(lr(/\/>/i,Ct)){ki(we,K);continue}A&&(Ct=Wr(Ct,g," "),Ct=Wr(Ct,D," "),Ct=Wr(Ct,y," "));var ts=it(K.nodeName);if(Ve(ts,te,Ct)){if(Et&&(te==="id"||te==="name")&&(ki(we,K),Ct=vt+Ct),R&&rn(p)==="object"&&typeof p.getAttributeType=="function"&&!Xs)switch(p.getAttributeType(ts,te)){case"TrustedHTML":Ct=R.createHTML(Ct);break;case"TrustedScriptURL":Ct=R.createScriptURL(Ct);break}try{Xs?K.setAttributeNS(Xs,we,Ct):K.setAttribute(we,Ct),Tf(e.removed)}catch{}}}}tr("afterSanitizeAttributes",K,null)}},qe=function Lt(K){var xt,Ct=me(K);for(tr("beforeSanitizeShadowDOM",K,null);xt=Ct.nextNode();)tr("uponSanitizeShadowNode",xt,null),!Se(xt)&&(xt.content instanceof n&&Lt(xt.content),Qe(xt));tr("afterSanitizeShadowDOM",K,null)};return e.sanitize=function(Lt){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},xt,Ct,te,de,ge;if(Bt=!Lt,Bt&&(Lt="<!-->"),typeof Lt!="string"&&!Ce(Lt)){if(typeof Lt.toString!="function")throw mh("toString is not a function");if(Lt=Lt.toString(),typeof Lt!="string")throw mh("dirty is not a string, aborting")}if(!e.isSupported){if(rn(t.toStaticHTML)==="object"||typeof t.toStaticHTML=="function"){if(typeof Lt=="string")return t.toStaticHTML(Lt);if(Ce(Lt))return t.toStaticHTML(Lt.outerHTML)}return Lt}if(q||Jt(K),e.removed=[],typeof Lt=="string"&&(ut=!1),ut){if(Lt.nodeName){var Me=it(Lt.nodeName);if(!X[Me]||Tt[Me])throw mh("root node is forbidden and cannot be sanitized in-place")}}else if(Lt instanceof a)xt=mn("<!---->"),Ct=xt.ownerDocument.importNode(Lt,!0),Ct.nodeType===1&&Ct.nodeName==="BODY"||Ct.nodeName==="HTML"?xt=Ct:xt.appendChild(Ct);else{if(!st&&!A&&!M&&Lt.indexOf("<")===-1)return R&&Dt?R.createHTML(Lt):Lt;if(xt=mn(Lt),!xt)return st?null:Dt?P:""}xt&&L&&Ut(xt.firstChild);for(var Ge=me(ut?Lt:xt);te=Ge.nextNode();)te.nodeType===3&&te===de||Se(te)||(te.content instanceof n&&qe(te.content),Qe(te),de=te);if(de=null,ut)return Lt;if(st){if(T)for(ge=C.call(xt.ownerDocument);xt.firstChild;)ge.appendChild(xt.firstChild);else ge=xt;return ot.shadowroot&&(ge=E.call(r,ge,!0)),ge}var we=M?xt.outerHTML:xt.innerHTML;return M&&X["!doctype"]&&xt.ownerDocument&&xt.ownerDocument.doctype&&xt.ownerDocument.doctype.name&&lr(Gk,xt.ownerDocument.doctype.name)&&(we="<!DOCTYPE "+xt.ownerDocument.doctype.name+`>
8
+ `+we),A&&(we=Wr(we,g," "),we=Wr(we,D," "),we=Wr(we,y," ")),R&&Dt?R.createHTML(we):we},e.setConfig=function(Lt){Jt(Lt),q=!0},e.clearConfig=function(){Wt=null,q=!1},e.isValidAttribute=function(Lt,K,xt){Wt||Jt({});var Ct=it(Lt),te=it(K);return Ve(Ct,te,xt)},e.addHook=function(Lt,K){typeof K=="function"&&(w[Lt]=w[Lt]||[],ea(w[Lt],K))},e.removeHook=function(Lt){if(w[Lt])return Tf(w[Lt])},e.removeHooks=function(Lt){w[Lt]&&(w[Lt]=[])},e.removeAllHooks=function(){w={}},e}var Na=Dp();const $o={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},i)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;const n=r<.5?r*(1+e):r+e-r*e,s=2*r-n;switch(i){case"r":return $o.hue2rgb(s,n,t+1/3)*255;case"g":return $o.hue2rgb(s,n,t)*255;case"b":return $o.hue2rgb(s,n,t-1/3)*255}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;const n=Math.max(t,e,r),s=Math.min(t,e,r),a=(n+s)/2;if(i==="l")return a*100;if(n===s)return 0;const o=n-s,l=a>.5?o/(2-n-s):o/(n+s);if(i==="s")return l*100;switch(n){case t:return((e-r)/o+(e<r?6:0))*60;case e:return((r-t)/o+2)*60;case r:return((t-e)/o+4)*60;default:return-1}}},Xk=$o,Kk={clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},Zk=Kk,Qk={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},Jk=Qk,t8={channel:Xk,lang:Zk,unit:Jk},ee=t8,en={};for(let t=0;t<=255;t++)en[t]=ee.unit.dec2hex(t);const ir={ALL:0,RGB:1,HSL:2};class e8{constructor(){this.type=ir.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=ir.ALL}is(e){return this.type===e}}const r8=e8;class i8{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new r8}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=ir.ALL,this}_ensureHSL(){const e=this.data,{h:r,s:i,l:n}=e;r===void 0&&(e.h=ee.channel.rgb2hsl(e,"h")),i===void 0&&(e.s=ee.channel.rgb2hsl(e,"s")),n===void 0&&(e.l=ee.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r,g:i,b:n}=e;r===void 0&&(e.r=ee.channel.hsl2rgb(e,"r")),i===void 0&&(e.g=ee.channel.hsl2rgb(e,"g")),n===void 0&&(e.b=ee.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,r=e.r;return!this.type.is(ir.HSL)&&r!==void 0?r:(this._ensureHSL(),ee.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,r=e.g;return!this.type.is(ir.HSL)&&r!==void 0?r:(this._ensureHSL(),ee.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,r=e.b;return!this.type.is(ir.HSL)&&r!==void 0?r:(this._ensureHSL(),ee.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,r=e.h;return!this.type.is(ir.RGB)&&r!==void 0?r:(this._ensureRGB(),ee.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,r=e.s;return!this.type.is(ir.RGB)&&r!==void 0?r:(this._ensureRGB(),ee.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,r=e.l;return!this.type.is(ir.RGB)&&r!==void 0?r:(this._ensureRGB(),ee.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(ir.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(ir.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(ir.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(ir.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(ir.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(ir.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const n8=i8,s8=new n8({r:0,g:0,b:0,a:0},"transparent"),mc=s8,Ip={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;const e=t.match(Ip.re);if(!e)return;const r=e[1],i=parseInt(r,16),n=r.length,s=n%4===0,a=n>4,o=a?1:17,l=a?8:4,h=s?0:-1,u=a?255:15;return mc.set({r:(i>>l*(h+3)&u)*o,g:(i>>l*(h+2)&u)*o,b:(i>>l*(h+1)&u)*o,a:s?(i&u)*o/255:1},t)},stringify:t=>{const{r:e,g:r,b:i,a:n}=t;return n<1?`#${en[Math.round(e)]}${en[Math.round(r)]}${en[Math.round(i)]}${en[Math.round(n*255)]}`:`#${en[Math.round(e)]}${en[Math.round(r)]}${en[Math.round(i)]}`}},ya=Ip,jo={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(jo.hueRe);if(e){const[,r,i]=e;switch(i){case"grad":return ee.channel.clamp.h(parseFloat(r)*.9);case"rad":return ee.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return ee.channel.clamp.h(parseFloat(r)*360)}}return ee.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(e!==104&&e!==72)return;const r=t.match(jo.re);if(!r)return;const[,i,n,s,a,o]=r;return mc.set({h:jo._hue2deg(i),s:ee.channel.clamp.s(parseFloat(n)),l:ee.channel.clamp.l(parseFloat(s)),a:a?ee.channel.clamp.a(o?parseFloat(a)/100:parseFloat(a)):1},t)},stringify:t=>{const{h:e,s:r,l:i,a:n}=t;return n<1?`hsla(${ee.lang.round(e)}, ${ee.lang.round(r)}%, ${ee.lang.round(i)}%, ${n})`:`hsl(${ee.lang.round(e)}, ${ee.lang.round(r)}%, ${ee.lang.round(i)}%)`}},Bo=jo,Xo={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=Xo.colors[t];if(e)return ya.parse(e)},stringify:t=>{const e=ya.stringify(t);for(const r in Xo.colors)if(Xo.colors[r]===e)return r}},Lf=Xo,Mp={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(e!==114&&e!==82)return;const r=t.match(Mp.re);if(!r)return;const[,i,n,s,a,o,l,h,u]=r;return mc.set({r:ee.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:ee.channel.clamp.g(a?parseFloat(s)*2.55:parseFloat(s)),b:ee.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:h?ee.channel.clamp.a(u?parseFloat(h)/100:parseFloat(h)):1},t)},stringify:t=>{const{r:e,g:r,b:i,a:n}=t;return n<1?`rgba(${ee.lang.round(e)}, ${ee.lang.round(r)}, ${ee.lang.round(i)}, ${ee.lang.round(n)})`:`rgb(${ee.lang.round(e)}, ${ee.lang.round(r)}, ${ee.lang.round(i)})`}},Do=Mp,a8={format:{keyword:Lf,hex:ya,rgb:Do,rgba:Do,hsl:Bo,hsla:Bo},parse:t=>{if(typeof t!="string")return t;const e=ya.parse(t)||Do.parse(t)||Bo.parse(t)||Lf.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(ir.HSL)||t.data.r===void 0?Bo.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?Do.stringify(t):ya.stringify(t)},ji=a8,o8=(t,e)=>{const r=ji.parse(t);for(const i in e)r[i]=ee.channel.clamp[i](e[i]);return ji.stringify(r)},Np=o8,l8=(t,e,r=0,i=1)=>{if(typeof t!="number")return Np(t,{a:e});const n=mc.set({r:ee.channel.clamp.r(t),g:ee.channel.clamp.g(e),b:ee.channel.clamp.b(r),a:ee.channel.clamp.a(i)});return ji.stringify(n)},ma=l8,c8=(t,e,r)=>{const i=ji.parse(t),n=i[e],s=ee.channel.clamp[e](n+r);return n!==s&&(i[e]=s),ji.stringify(i)},Rp=c8,h8=(t,e)=>Rp(t,"l",e),zt=h8,u8=(t,e)=>Rp(t,"l",-e),Zt=u8,f8=(t,e)=>{const r=ji.parse(t),i={};for(const n in e)e[n]&&(i[n]=r[n]+e[n]);return Np(t,i)},lt=f8,d8=(t,e,r=50)=>{const{r:i,g:n,b:s,a}=ji.parse(t),{r:o,g:l,b:h,a:u}=ji.parse(e),f=r/100,d=f*2-1,p=a-u,b=((d*p===-1?d:(d+p)/(1+d*p))+1)/2,x=1-b,k=i*b+o*x,v=n*b+l*x,B=s*b+h*x,R=a*f+u*(1-f);return ma(k,v,B,R)},p8=d8,g8=(t,e=100)=>{const r=ji.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,p8(r,t,e)},At=g8;var y8=typeof global=="object"&&global&&global.Object===Object&&global;const Op=y8;var m8=typeof self=="object"&&self&&self.Object===Object&&self,b8=Op||m8||Function("return this")();const ii=b8;var _8=ii.Symbol;const zr=_8;var Fp=Object.prototype,x8=Fp.hasOwnProperty,v8=Fp.toString,ra=zr?zr.toStringTag:void 0;function k8(t){var e=x8.call(t,ra),r=t[ra];try{t[ra]=void 0;var i=!0}catch{}var n=v8.call(t);return i&&(e?t[ra]=r:delete t[ra]),n}var w8=Object.prototype,T8=w8.toString;function E8(t){return T8.call(t)}var C8="[object Null]",S8="[object Undefined]",Bf=zr?zr.toStringTag:void 0;function jn(t){return t==null?t===void 0?S8:C8:Bf&&Bf in Object(t)?k8(t):E8(t)}function Sr(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var A8="[object AsyncFunction]",L8="[object Function]",B8="[object GeneratorFunction]",D8="[object Proxy]";function As(t){if(!Sr(t))return!1;var e=jn(t);return e==L8||e==B8||e==A8||e==D8}var I8=ii["__core-js_shared__"];const kh=I8;var Df=function(){var t=/[^.]+$/.exec(kh&&kh.keys&&kh.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function M8(t){return!!Df&&Df in t}var N8=Function.prototype,R8=N8.toString;function Xn(t){if(t!=null){try{return R8.call(t)}catch{}try{return t+""}catch{}}return""}var O8=/[\\^$.*+?()[\]{}|]/g,F8=/^\[object .+?Constructor\]$/,P8=Function.prototype,V8=Object.prototype,Y8=P8.toString,z8=V8.hasOwnProperty,U8=RegExp("^"+Y8.call(z8).replace(O8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function W8(t){if(!Sr(t)||M8(t))return!1;var e=As(t)?U8:F8;return e.test(Xn(t))}function H8(t,e){return t==null?void 0:t[e]}function Kn(t,e){var r=H8(t,e);return W8(r)?r:void 0}var q8=Kn(Object,"create");const Ra=q8;function G8(){this.__data__=Ra?Ra(null):{},this.size=0}function $8(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var j8="__lodash_hash_undefined__",X8=Object.prototype,K8=X8.hasOwnProperty;function Z8(t){var e=this.__data__;if(Ra){var r=e[t];return r===j8?void 0:r}return K8.call(e,t)?e[t]:void 0}var Q8=Object.prototype,J8=Q8.hasOwnProperty;function t7(t){var e=this.__data__;return Ra?e[t]!==void 0:J8.call(e,t)}var e7="__lodash_hash_undefined__";function r7(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ra&&e===void 0?e7:e,this}function Rn(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}Rn.prototype.clear=G8;Rn.prototype.delete=$8;Rn.prototype.get=Z8;Rn.prototype.has=t7;Rn.prototype.set=r7;function i7(){this.__data__=[],this.size=0}function Ws(t,e){return t===e||t!==t&&e!==e}function bc(t,e){for(var r=t.length;r--;)if(Ws(t[r][0],e))return r;return-1}var n7=Array.prototype,s7=n7.splice;function a7(t){var e=this.__data__,r=bc(e,t);if(r<0)return!1;var i=e.length-1;return r==i?e.pop():s7.call(e,r,1),--this.size,!0}function o7(t){var e=this.__data__,r=bc(e,t);return r<0?void 0:e[r][1]}function l7(t){return bc(this.__data__,t)>-1}function c7(t,e){var r=this.__data__,i=bc(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}function Zi(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}Zi.prototype.clear=i7;Zi.prototype.delete=a7;Zi.prototype.get=o7;Zi.prototype.has=l7;Zi.prototype.set=c7;var h7=Kn(ii,"Map");const Oa=h7;function u7(){this.size=0,this.__data__={hash:new Rn,map:new(Oa||Zi),string:new Rn}}function f7(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function _c(t,e){var r=t.__data__;return f7(e)?r[typeof e=="string"?"string":"hash"]:r.map}function d7(t){var e=_c(this,t).delete(t);return this.size-=e?1:0,e}function p7(t){return _c(this,t).get(t)}function g7(t){return _c(this,t).has(t)}function y7(t,e){var r=_c(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}function Qi(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}Qi.prototype.clear=u7;Qi.prototype.delete=d7;Qi.prototype.get=p7;Qi.prototype.has=g7;Qi.prototype.set=y7;var m7="Expected a function";function Hs(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(m7);var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],s=r.cache;if(s.has(n))return s.get(n);var a=t.apply(this,i);return r.cache=s.set(n,a)||s,a};return r.cache=new(Hs.Cache||Qi),r}Hs.Cache=Qi;function mi(t){return t!=null&&typeof t=="object"}var b7="[object Symbol]";function On(t){return typeof t=="symbol"||mi(t)&&jn(t)==b7}function ys(t,e){for(var r=-1,i=t==null?0:t.length,n=Array(i);++r<i;)n[r]=e(t[r],r,t);return n}var _7=Array.isArray;const Fe=_7;var x7=1/0,If=zr?zr.prototype:void 0,Mf=If?If.toString:void 0;function Pp(t){if(typeof t=="string")return t;if(Fe(t))return ys(t,Pp)+"";if(On(t))return Mf?Mf.call(t):"";var e=t+"";return e=="0"&&1/t==-x7?"-0":e}var v7=/\s/;function k7(t){for(var e=t.length;e--&&v7.test(t.charAt(e)););return e}var w7=/^\s+/;function T7(t){return t&&t.slice(0,k7(t)+1).replace(w7,"")}var Nf=0/0,E7=/^[-+]0x[0-9a-f]+$/i,C7=/^0b[01]+$/i,S7=/^0o[0-7]+$/i,A7=parseInt;function L7(t){if(typeof t=="number")return t;if(On(t))return Nf;if(Sr(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Sr(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=T7(t);var r=C7.test(t);return r||S7.test(t)?A7(t.slice(2),r?2:8):E7.test(t)?Nf:+t}var Rf=1/0,B7=17976931348623157e292;function Ko(t){if(!t)return t===0?t:0;if(t=L7(t),t===Rf||t===-Rf){var e=t<0?-1:1;return e*B7}return t===t?t:0}function D7(t){var e=Ko(t),r=e%1;return e===e?r?e-r:e:0}function Zn(t){return t}var I7=Kn(ii,"WeakMap");const lu=I7;var Of=Object.create,M7=function(){function t(){}return function(e){if(!Sr(e))return{};if(Of)return Of(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();const N7=M7;function R7(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function O7(){}function Vp(t,e){var r=-1,i=t.length;for(e||(e=Array(i));++r<i;)e[r]=t[r];return e}var F7=800,P7=16,V7=Date.now;function Y7(t){var e=0,r=0;return function(){var i=V7(),n=P7-(i-r);if(r=i,n>0){if(++e>=F7)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function cs(t){return function(){return t}}var z7=function(){try{var t=Kn(Object,"defineProperty");return t({},"",{}),t}catch{}}();const Sl=z7;var U7=Sl?function(t,e){return Sl(t,"toString",{configurable:!0,enumerable:!1,value:cs(e),writable:!0})}:Zn;const W7=U7;var H7=Y7(W7);const Yp=H7;function zp(t,e){for(var r=-1,i=t==null?0:t.length;++r<i&&e(t[r],r,t)!==!1;);return t}function Up(t,e,r,i){for(var n=t.length,s=r+(i?1:-1);i?s--:++s<n;)if(e(t[s],s,t))return s;return-1}function q7(t){return t!==t}function G7(t,e,r){for(var i=r-1,n=t.length;++i<n;)if(t[i]===e)return i;return-1}function $7(t,e,r){return e===e?G7(t,e,r):Up(t,q7,r)}function j7(t,e){var r=t==null?0:t.length;return!!r&&$7(t,e,0)>-1}var X7=9007199254740991,K7=/^(?:0|[1-9]\d*)$/;function xc(t,e){var r=typeof t;return e=e??X7,!!e&&(r=="number"||r!="symbol"&&K7.test(t))&&t>-1&&t%1==0&&t<e}function vc(t,e,r){e=="__proto__"&&Sl?Sl(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var Z7=Object.prototype,Q7=Z7.hasOwnProperty;function kc(t,e,r){var i=t[e];(!(Q7.call(t,e)&&Ws(i,r))||r===void 0&&!(e in t))&&vc(t,e,r)}function so(t,e,r,i){var n=!r;r||(r={});for(var s=-1,a=e.length;++s<a;){var o=e[s],l=i?i(r[o],t[o],o,r,t):void 0;l===void 0&&(l=t[o]),n?vc(r,o,l):kc(r,o,l)}return r}var Ff=Math.max;function Wp(t,e,r){return e=Ff(e===void 0?t.length-1:e,0),function(){for(var i=arguments,n=-1,s=Ff(i.length-e,0),a=Array(s);++n<s;)a[n]=i[e+n];n=-1;for(var o=Array(e+1);++n<e;)o[n]=i[n];return o[e]=r(a),R7(t,this,o)}}function wc(t,e){return Yp(Wp(t,e,Zn),t+"")}var J7=9007199254740991;function k1(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=J7}function pn(t){return t!=null&&k1(t.length)&&!As(t)}function Fa(t,e,r){if(!Sr(r))return!1;var i=typeof e;return(i=="number"?pn(r)&&xc(e,r.length):i=="string"&&e in r)?Ws(r[e],t):!1}function tw(t){return wc(function(e,r){var i=-1,n=r.length,s=n>1?r[n-1]:void 0,a=n>2?r[2]:void 0;for(s=t.length>3&&typeof s=="function"?(n--,s):void 0,a&&Fa(r[0],r[1],a)&&(s=n<3?void 0:s,n=1),e=Object(e);++i<n;){var o=r[i];o&&t(e,o,i,s)}return e})}var ew=Object.prototype;function Tc(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||ew;return t===r}function rw(t,e){for(var r=-1,i=Array(t);++r<t;)i[r]=e(r);return i}var iw="[object Arguments]";function Pf(t){return mi(t)&&jn(t)==iw}var Hp=Object.prototype,nw=Hp.hasOwnProperty,sw=Hp.propertyIsEnumerable,aw=Pf(function(){return arguments}())?Pf:function(t){return mi(t)&&nw.call(t,"callee")&&!sw.call(t,"callee")};const Ls=aw;function ow(){return!1}var qp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vf=qp&&typeof module=="object"&&module&&!module.nodeType&&module,lw=Vf&&Vf.exports===qp,Yf=lw?ii.Buffer:void 0,cw=Yf?Yf.isBuffer:void 0,hw=cw||ow;const Bs=hw;var uw="[object Arguments]",fw="[object Array]",dw="[object Boolean]",pw="[object Date]",gw="[object Error]",yw="[object Function]",mw="[object Map]",bw="[object Number]",_w="[object Object]",xw="[object RegExp]",vw="[object Set]",kw="[object String]",ww="[object WeakMap]",Tw="[object ArrayBuffer]",Ew="[object DataView]",Cw="[object Float32Array]",Sw="[object Float64Array]",Aw="[object Int8Array]",Lw="[object Int16Array]",Bw="[object Int32Array]",Dw="[object Uint8Array]",Iw="[object Uint8ClampedArray]",Mw="[object Uint16Array]",Nw="[object Uint32Array]",ye={};ye[Cw]=ye[Sw]=ye[Aw]=ye[Lw]=ye[Bw]=ye[Dw]=ye[Iw]=ye[Mw]=ye[Nw]=!0;ye[uw]=ye[fw]=ye[Tw]=ye[dw]=ye[Ew]=ye[pw]=ye[gw]=ye[yw]=ye[mw]=ye[bw]=ye[_w]=ye[xw]=ye[vw]=ye[kw]=ye[ww]=!1;function Rw(t){return mi(t)&&k1(t.length)&&!!ye[jn(t)]}function Ec(t){return function(e){return t(e)}}var Gp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ba=Gp&&typeof module=="object"&&module&&!module.nodeType&&module,Ow=ba&&ba.exports===Gp,wh=Ow&&Op.process,Fw=function(){try{var t=ba&&ba.require&&ba.require("util").types;return t||wh&&wh.binding&&wh.binding("util")}catch{}}();const Ds=Fw;var zf=Ds&&Ds.isTypedArray,Pw=zf?Ec(zf):Rw;const Cc=Pw;var Vw=Object.prototype,Yw=Vw.hasOwnProperty;function $p(t,e){var r=Fe(t),i=!r&&Ls(t),n=!r&&!i&&Bs(t),s=!r&&!i&&!n&&Cc(t),a=r||i||n||s,o=a?rw(t.length,String):[],l=o.length;for(var h in t)(e||Yw.call(t,h))&&!(a&&(h=="length"||n&&(h=="offset"||h=="parent")||s&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||xc(h,l)))&&o.push(h);return o}function jp(t,e){return function(r){return t(e(r))}}var zw=jp(Object.keys,Object);const Uw=zw;var Ww=Object.prototype,Hw=Ww.hasOwnProperty;function Xp(t){if(!Tc(t))return Uw(t);var e=[];for(var r in Object(t))Hw.call(t,r)&&r!="constructor"&&e.push(r);return e}function Er(t){return pn(t)?$p(t):Xp(t)}function qw(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var Gw=Object.prototype,$w=Gw.hasOwnProperty;function jw(t){if(!Sr(t))return qw(t);var e=Tc(t),r=[];for(var i in t)i=="constructor"&&(e||!$w.call(t,i))||r.push(i);return r}function Qn(t){return pn(t)?$p(t,!0):jw(t)}var Xw=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Kw=/^\w*$/;function w1(t,e){if(Fe(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||On(t)?!0:Kw.test(t)||!Xw.test(t)||e!=null&&t in Object(e)}var Zw=500;function Qw(t){var e=Hs(t,function(i){return r.size===Zw&&r.clear(),i}),r=e.cache;return e}var Jw=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,tT=/\\(\\)?/g,eT=Qw(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Jw,function(r,i,n,s){e.push(n?s.replace(tT,"$1"):i||r)}),e});const rT=eT;function Kp(t){return t==null?"":Pp(t)}function Sc(t,e){return Fe(t)?t:w1(t,e)?[t]:rT(Kp(t))}var iT=1/0;function ao(t){if(typeof t=="string"||On(t))return t;var e=t+"";return e=="0"&&1/t==-iT?"-0":e}function Ac(t,e){e=Sc(e,t);for(var r=0,i=e.length;t!=null&&r<i;)t=t[ao(e[r++])];return r&&r==i?t:void 0}function nT(t,e,r){var i=t==null?void 0:Ac(t,e);return i===void 0?r:i}function T1(t,e){for(var r=-1,i=e.length,n=t.length;++r<i;)t[n+r]=e[r];return t}var Uf=zr?zr.isConcatSpreadable:void 0;function sT(t){return Fe(t)||Ls(t)||!!(Uf&&t&&t[Uf])}function Lc(t,e,r,i,n){var s=-1,a=t.length;for(r||(r=sT),n||(n=[]);++s<a;){var o=t[s];e>0&&r(o)?e>1?Lc(o,e-1,r,i,n):T1(n,o):i||(n[n.length]=o)}return n}function qs(t){var e=t==null?0:t.length;return e?Lc(t,1):[]}function aT(t){return Yp(Wp(t,void 0,qs),t+"")}var oT=jp(Object.getPrototypeOf,Object);const E1=oT;var lT="[object Object]",cT=Function.prototype,hT=Object.prototype,Zp=cT.toString,uT=hT.hasOwnProperty,fT=Zp.call(Object);function Qp(t){if(!mi(t)||jn(t)!=lT)return!1;var e=E1(t);if(e===null)return!0;var r=uT.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Zp.call(r)==fT}function dT(t,e,r,i){var n=-1,s=t==null?0:t.length;for(i&&s&&(r=t[++n]);++n<s;)r=e(r,t[n],n,t);return r}function pT(){this.__data__=new Zi,this.size=0}function gT(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function yT(t){return this.__data__.get(t)}function mT(t){return this.__data__.has(t)}var bT=200;function _T(t,e){var r=this.__data__;if(r instanceof Zi){var i=r.__data__;if(!Oa||i.length<bT-1)return i.push([t,e]),this.size=++r.size,this;r=this.__data__=new Qi(i)}return r.set(t,e),this.size=r.size,this}function Kr(t){var e=this.__data__=new Zi(t);this.size=e.size}Kr.prototype.clear=pT;Kr.prototype.delete=gT;Kr.prototype.get=yT;Kr.prototype.has=mT;Kr.prototype.set=_T;function xT(t,e){return t&&so(e,Er(e),t)}function vT(t,e){return t&&so(e,Qn(e),t)}var Jp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Wf=Jp&&typeof module=="object"&&module&&!module.nodeType&&module,kT=Wf&&Wf.exports===Jp,Hf=kT?ii.Buffer:void 0,qf=Hf?Hf.allocUnsafe:void 0;function tg(t,e){if(e)return t.slice();var r=t.length,i=qf?qf(r):new t.constructor(r);return t.copy(i),i}function eg(t,e){for(var r=-1,i=t==null?0:t.length,n=0,s=[];++r<i;){var a=t[r];e(a,r,t)&&(s[n++]=a)}return s}function rg(){return[]}var wT=Object.prototype,TT=wT.propertyIsEnumerable,Gf=Object.getOwnPropertySymbols,ET=Gf?function(t){return t==null?[]:(t=Object(t),eg(Gf(t),function(e){return TT.call(t,e)}))}:rg;const C1=ET;function CT(t,e){return so(t,C1(t),e)}var ST=Object.getOwnPropertySymbols,AT=ST?function(t){for(var e=[];t;)T1(e,C1(t)),t=E1(t);return e}:rg;const ig=AT;function LT(t,e){return so(t,ig(t),e)}function ng(t,e,r){var i=e(t);return Fe(t)?i:T1(i,r(t))}function cu(t){return ng(t,Er,C1)}function BT(t){return ng(t,Qn,ig)}var DT=Kn(ii,"DataView");const hu=DT;var IT=Kn(ii,"Promise");const uu=IT;var MT=Kn(ii,"Set");const ms=MT;var $f="[object Map]",NT="[object Object]",jf="[object Promise]",Xf="[object Set]",Kf="[object WeakMap]",Zf="[object DataView]",RT=Xn(hu),OT=Xn(Oa),FT=Xn(uu),PT=Xn(ms),VT=Xn(lu),En=jn;(hu&&En(new hu(new ArrayBuffer(1)))!=Zf||Oa&&En(new Oa)!=$f||uu&&En(uu.resolve())!=jf||ms&&En(new ms)!=Xf||lu&&En(new lu)!=Kf)&&(En=function(t){var e=jn(t),r=e==NT?t.constructor:void 0,i=r?Xn(r):"";if(i)switch(i){case RT:return Zf;case OT:return $f;case FT:return jf;case PT:return Xf;case VT:return Kf}return e});const Is=En;var YT=Object.prototype,zT=YT.hasOwnProperty;function UT(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&zT.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var WT=ii.Uint8Array;const Al=WT;function S1(t){var e=new t.constructor(t.byteLength);return new Al(e).set(new Al(t)),e}function HT(t,e){var r=e?S1(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var qT=/\w*$/;function GT(t){var e=new t.constructor(t.source,qT.exec(t));return e.lastIndex=t.lastIndex,e}var Qf=zr?zr.prototype:void 0,Jf=Qf?Qf.valueOf:void 0;function $T(t){return Jf?Object(Jf.call(t)):{}}function sg(t,e){var r=e?S1(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var jT="[object Boolean]",XT="[object Date]",KT="[object Map]",ZT="[object Number]",QT="[object RegExp]",JT="[object Set]",tE="[object String]",eE="[object Symbol]",rE="[object ArrayBuffer]",iE="[object DataView]",nE="[object Float32Array]",sE="[object Float64Array]",aE="[object Int8Array]",oE="[object Int16Array]",lE="[object Int32Array]",cE="[object Uint8Array]",hE="[object Uint8ClampedArray]",uE="[object Uint16Array]",fE="[object Uint32Array]";function dE(t,e,r){var i=t.constructor;switch(e){case rE:return S1(t);case jT:case XT:return new i(+t);case iE:return HT(t,r);case nE:case sE:case aE:case oE:case lE:case cE:case hE:case uE:case fE:return sg(t,r);case KT:return new i;case ZT:case tE:return new i(t);case QT:return GT(t);case JT:return new i;case eE:return $T(t)}}function ag(t){return typeof t.constructor=="function"&&!Tc(t)?N7(E1(t)):{}}var pE="[object Map]";function gE(t){return mi(t)&&Is(t)==pE}var td=Ds&&Ds.isMap,yE=td?Ec(td):gE;const mE=yE;var bE="[object Set]";function _E(t){return mi(t)&&Is(t)==bE}var ed=Ds&&Ds.isSet,xE=ed?Ec(ed):_E;const vE=xE;var kE=1,wE=2,TE=4,og="[object Arguments]",EE="[object Array]",CE="[object Boolean]",SE="[object Date]",AE="[object Error]",lg="[object Function]",LE="[object GeneratorFunction]",BE="[object Map]",DE="[object Number]",cg="[object Object]",IE="[object RegExp]",ME="[object Set]",NE="[object String]",RE="[object Symbol]",OE="[object WeakMap]",FE="[object ArrayBuffer]",PE="[object DataView]",VE="[object Float32Array]",YE="[object Float64Array]",zE="[object Int8Array]",UE="[object Int16Array]",WE="[object Int32Array]",HE="[object Uint8Array]",qE="[object Uint8ClampedArray]",GE="[object Uint16Array]",$E="[object Uint32Array]",pe={};pe[og]=pe[EE]=pe[FE]=pe[PE]=pe[CE]=pe[SE]=pe[VE]=pe[YE]=pe[zE]=pe[UE]=pe[WE]=pe[BE]=pe[DE]=pe[cg]=pe[IE]=pe[ME]=pe[NE]=pe[RE]=pe[HE]=pe[qE]=pe[GE]=pe[$E]=!0;pe[AE]=pe[lg]=pe[OE]=!1;function _a(t,e,r,i,n,s){var a,o=e&kE,l=e&wE,h=e&TE;if(r&&(a=n?r(t,i,n,s):r(t)),a!==void 0)return a;if(!Sr(t))return t;var u=Fe(t);if(u){if(a=UT(t),!o)return Vp(t,a)}else{var f=Is(t),d=f==lg||f==LE;if(Bs(t))return tg(t,o);if(f==cg||f==og||d&&!n){if(a=l||d?{}:ag(t),!o)return l?LT(t,vT(a,t)):CT(t,xT(a,t))}else{if(!pe[f])return n?t:{};a=dE(t,f,o)}}s||(s=new Kr);var p=s.get(t);if(p)return p;s.set(t,a),vE(t)?t.forEach(function(x){a.add(_a(x,e,r,x,t,s))}):mE(t)&&t.forEach(function(x,k){a.set(k,_a(x,e,r,k,t,s))});var m=h?l?BT:cu:l?Qn:Er,b=u?void 0:m(t);return zp(b||t,function(x,k){b&&(k=x,x=t[k]),kc(a,k,_a(x,e,r,k,t,s))}),a}var jE=4;function XE(t){return _a(t,jE)}var KE=1,ZE=4;function QE(t){return _a(t,KE|ZE)}var JE="__lodash_hash_undefined__";function tC(t){return this.__data__.set(t,JE),this}function eC(t){return this.__data__.has(t)}function Pa(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new Qi;++e<r;)this.add(t[e])}Pa.prototype.add=Pa.prototype.push=tC;Pa.prototype.has=eC;function rC(t,e){for(var r=-1,i=t==null?0:t.length;++r<i;)if(e(t[r],r,t))return!0;return!1}function hg(t,e){return t.has(e)}var iC=1,nC=2;function ug(t,e,r,i,n,s){var a=r&iC,o=t.length,l=e.length;if(o!=l&&!(a&&l>o))return!1;var h=s.get(t),u=s.get(e);if(h&&u)return h==e&&u==t;var f=-1,d=!0,p=r&nC?new Pa:void 0;for(s.set(t,e),s.set(e,t);++f<o;){var m=t[f],b=e[f];if(i)var x=a?i(b,m,f,e,t,s):i(m,b,f,t,e,s);if(x!==void 0){if(x)continue;d=!1;break}if(p){if(!rC(e,function(k,v){if(!hg(p,v)&&(m===k||n(m,k,r,i,s)))return p.push(v)})){d=!1;break}}else if(!(m===b||n(m,b,r,i,s))){d=!1;break}}return s.delete(t),s.delete(e),d}function sC(t){var e=-1,r=Array(t.size);return t.forEach(function(i,n){r[++e]=[n,i]}),r}function A1(t){var e=-1,r=Array(t.size);return t.forEach(function(i){r[++e]=i}),r}var aC=1,oC=2,lC="[object Boolean]",cC="[object Date]",hC="[object Error]",uC="[object Map]",fC="[object Number]",dC="[object RegExp]",pC="[object Set]",gC="[object String]",yC="[object Symbol]",mC="[object ArrayBuffer]",bC="[object DataView]",rd=zr?zr.prototype:void 0,Th=rd?rd.valueOf:void 0;function _C(t,e,r,i,n,s,a){switch(r){case bC:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case mC:return!(t.byteLength!=e.byteLength||!s(new Al(t),new Al(e)));case lC:case cC:case fC:return Ws(+t,+e);case hC:return t.name==e.name&&t.message==e.message;case dC:case gC:return t==e+"";case uC:var o=sC;case pC:var l=i&aC;if(o||(o=A1),t.size!=e.size&&!l)return!1;var h=a.get(t);if(h)return h==e;i|=oC,a.set(t,e);var u=ug(o(t),o(e),i,n,s,a);return a.delete(t),u;case yC:if(Th)return Th.call(t)==Th.call(e)}return!1}var xC=1,vC=Object.prototype,kC=vC.hasOwnProperty;function wC(t,e,r,i,n,s){var a=r&xC,o=cu(t),l=o.length,h=cu(e),u=h.length;if(l!=u&&!a)return!1;for(var f=l;f--;){var d=o[f];if(!(a?d in e:kC.call(e,d)))return!1}var p=s.get(t),m=s.get(e);if(p&&m)return p==e&&m==t;var b=!0;s.set(t,e),s.set(e,t);for(var x=a;++f<l;){d=o[f];var k=t[d],v=e[d];if(i)var B=a?i(v,k,d,e,t,s):i(k,v,d,t,e,s);if(!(B===void 0?k===v||n(k,v,r,i,s):B)){b=!1;break}x||(x=d=="constructor")}if(b&&!x){var R=t.constructor,P=e.constructor;R!=P&&"constructor"in t&&"constructor"in e&&!(typeof R=="function"&&R instanceof R&&typeof P=="function"&&P instanceof P)&&(b=!1)}return s.delete(t),s.delete(e),b}var TC=1,id="[object Arguments]",nd="[object Array]",Io="[object Object]",EC=Object.prototype,sd=EC.hasOwnProperty;function CC(t,e,r,i,n,s){var a=Fe(t),o=Fe(e),l=a?nd:Is(t),h=o?nd:Is(e);l=l==id?Io:l,h=h==id?Io:h;var u=l==Io,f=h==Io,d=l==h;if(d&&Bs(t)){if(!Bs(e))return!1;a=!0,u=!1}if(d&&!u)return s||(s=new Kr),a||Cc(t)?ug(t,e,r,i,n,s):_C(t,e,l,r,i,n,s);if(!(r&TC)){var p=u&&sd.call(t,"__wrapped__"),m=f&&sd.call(e,"__wrapped__");if(p||m){var b=p?t.value():t,x=m?e.value():e;return s||(s=new Kr),n(b,x,r,i,s)}}return d?(s||(s=new Kr),wC(t,e,r,i,n,s)):!1}function L1(t,e,r,i,n){return t===e?!0:t==null||e==null||!mi(t)&&!mi(e)?t!==t&&e!==e:CC(t,e,r,i,L1,n)}var SC=1,AC=2;function LC(t,e,r,i){var n=r.length,s=n,a=!i;if(t==null)return!s;for(t=Object(t);n--;){var o=r[n];if(a&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++n<s;){o=r[n];var l=o[0],h=t[l],u=o[1];if(a&&o[2]){if(h===void 0&&!(l in t))return!1}else{var f=new Kr;if(i)var d=i(h,u,l,t,e,f);if(!(d===void 0?L1(u,h,SC|AC,i,f):d))return!1}}return!0}function fg(t){return t===t&&!Sr(t)}function BC(t){for(var e=Er(t),r=e.length;r--;){var i=e[r],n=t[i];e[r]=[i,n,fg(n)]}return e}function dg(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}function DC(t){var e=BC(t);return e.length==1&&e[0][2]?dg(e[0][0],e[0][1]):function(r){return r===t||LC(r,t,e)}}function IC(t,e){return t!=null&&e in Object(t)}function pg(t,e,r){e=Sc(e,t);for(var i=-1,n=e.length,s=!1;++i<n;){var a=ao(e[i]);if(!(s=t!=null&&r(t,a)))break;t=t[a]}return s||++i!=n?s:(n=t==null?0:t.length,!!n&&k1(n)&&xc(a,n)&&(Fe(t)||Ls(t)))}function gg(t,e){return t!=null&&pg(t,e,IC)}var MC=1,NC=2;function RC(t,e){return w1(t)&&fg(e)?dg(ao(t),e):function(r){var i=nT(r,t);return i===void 0&&i===e?gg(r,t):L1(e,i,MC|NC)}}function OC(t){return function(e){return e==null?void 0:e[t]}}function FC(t){return function(e){return Ac(e,t)}}function PC(t){return w1(t)?OC(ao(t)):FC(t)}function gn(t){return typeof t=="function"?t:t==null?Zn:typeof t=="object"?Fe(t)?RC(t[0],t[1]):DC(t):PC(t)}function VC(t){return function(e,r,i){for(var n=-1,s=Object(e),a=i(e),o=a.length;o--;){var l=a[t?o:++n];if(r(s[l],l,s)===!1)break}return e}}var YC=VC();const B1=YC;function yg(t,e){return t&&B1(t,e,Er)}function zC(t,e){return function(r,i){if(r==null)return r;if(!pn(r))return t(r,i);for(var n=r.length,s=e?n:-1,a=Object(r);(e?s--:++s<n)&&i(a[s],s,a)!==!1;);return r}}var UC=zC(yg);const Bc=UC;var WC=function(){return ii.Date.now()};const ad=WC;var mg=Object.prototype,HC=mg.hasOwnProperty,qC=wc(function(t,e){t=Object(t);var r=-1,i=e.length,n=i>2?e[2]:void 0;for(n&&Fa(e[0],e[1],n)&&(i=1);++r<i;)for(var s=e[r],a=Qn(s),o=-1,l=a.length;++o<l;){var h=a[o],u=t[h];(u===void 0||Ws(u,mg[h])&&!HC.call(t,h))&&(t[h]=s[h])}return t});const ns=qC;function fu(t,e,r){(r!==void 0&&!Ws(t[e],r)||r===void 0&&!(e in t))&&vc(t,e,r)}function bg(t){return mi(t)&&pn(t)}function du(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function GC(t){return so(t,Qn(t))}function $C(t,e,r,i,n,s,a){var o=du(t,r),l=du(e,r),h=a.get(l);if(h){fu(t,r,h);return}var u=s?s(o,l,r+"",t,e,a):void 0,f=u===void 0;if(f){var d=Fe(l),p=!d&&Bs(l),m=!d&&!p&&Cc(l);u=l,d||p||m?Fe(o)?u=o:bg(o)?u=Vp(o):p?(f=!1,u=tg(l,!0)):m?(f=!1,u=sg(l,!0)):u=[]:Qp(l)||Ls(l)?(u=o,Ls(o)?u=GC(o):(!Sr(o)||As(o))&&(u=ag(l))):f=!1}f&&(a.set(l,u),n(u,l,i,s,a),a.delete(l)),fu(t,r,u)}function _g(t,e,r,i,n){t!==e&&B1(e,function(s,a){if(n||(n=new Kr),Sr(s))$C(t,e,a,r,_g,i,n);else{var o=i?i(du(t,a),s,a+"",t,e,n):void 0;o===void 0&&(o=s),fu(t,a,o)}},Qn)}function jC(t,e,r){for(var i=-1,n=t==null?0:t.length;++i<n;)if(r(e,t[i]))return!0;return!1}function Ll(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function xg(t){return typeof t=="function"?t:Zn}function dt(t,e){var r=Fe(t)?zp:Bc;return r(t,xg(e))}function XC(t,e){var r=[];return Bc(t,function(i,n,s){e(i,n,s)&&r.push(i)}),r}function Vi(t,e){var r=Fe(t)?eg:XC;return r(t,gn(e))}function KC(t){return function(e,r,i){var n=Object(e);if(!pn(e)){var s=gn(r);e=Er(e),r=function(o){return s(n[o],o,n)}}var a=t(e,r,i);return a>-1?n[s?e[a]:a]:void 0}}var ZC=Math.max;function QC(t,e,r){var i=t==null?0:t.length;if(!i)return-1;var n=r==null?0:D7(r);return n<0&&(n=ZC(i+n,0)),Up(t,gn(e),n)}var JC=KC(QC);const D1=JC;function vg(t,e){var r=-1,i=pn(t)?Array(t.length):[];return Bc(t,function(n,s,a){i[++r]=e(n,s,a)}),i}function Oe(t,e){var r=Fe(t)?ys:vg;return r(t,gn(e))}function t9(t,e){return t==null?t:B1(t,xg(e),Qn)}function e9(t,e){return t>e}var r9=Object.prototype,i9=r9.hasOwnProperty;function n9(t,e){return t!=null&&i9.call(t,e)}function Qt(t,e){return t!=null&&pg(t,e,n9)}function s9(t,e){return ys(e,function(r){return t[r]})}function Wi(t){return t==null?[]:s9(t,Er(t))}var a9="[object Map]",o9="[object Set]",l9=Object.prototype,c9=l9.hasOwnProperty;function bs(t){if(t==null)return!0;if(pn(t)&&(Fe(t)||typeof t=="string"||typeof t.splice=="function"||Bs(t)||Cc(t)||Ls(t)))return!t.length;var e=Is(t);if(e==a9||e==o9)return!t.size;if(Tc(t))return!Xp(t).length;for(var r in t)if(c9.call(t,r))return!1;return!0}function Be(t){return t===void 0}function kg(t,e){return t<e}function Dc(t,e){var r={};return e=gn(e),yg(t,function(i,n,s){vc(r,n,e(i,n,s))}),r}function I1(t,e,r){for(var i=-1,n=t.length;++i<n;){var s=t[i],a=e(s);if(a!=null&&(o===void 0?a===a&&!On(a):r(a,o)))var o=a,l=s}return l}function Fn(t){return t&&t.length?I1(t,Zn,e9):void 0}var h9=tw(function(t,e,r){_g(t,e,r)});const pu=h9;function Va(t){return t&&t.length?I1(t,Zn,kg):void 0}function M1(t,e){return t&&t.length?I1(t,gn(e),kg):void 0}function u9(t,e,r,i){if(!Sr(t))return t;e=Sc(e,t);for(var n=-1,s=e.length,a=s-1,o=t;o!=null&&++n<s;){var l=ao(e[n]),h=r;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(n!=a){var u=o[l];h=i?i(u,l,o):void 0,h===void 0&&(h=Sr(u)?u:xc(e[n+1])?[]:{})}kc(o,l,h),o=o[l]}return t}function f9(t,e,r){for(var i=-1,n=e.length,s={};++i<n;){var a=e[i],o=Ac(t,a);r(o,a)&&u9(s,Sc(a,t),o)}return s}function d9(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}function p9(t,e){if(t!==e){var r=t!==void 0,i=t===null,n=t===t,s=On(t),a=e!==void 0,o=e===null,l=e===e,h=On(e);if(!o&&!h&&!s&&t>e||s&&a&&l&&!o&&!h||i&&a&&l||!r&&l||!n)return 1;if(!i&&!s&&!h&&t<e||h&&r&&n&&!i&&!s||o&&r&&n||!a&&n||!l)return-1}return 0}function g9(t,e,r){for(var i=-1,n=t.criteria,s=e.criteria,a=n.length,o=r.length;++i<a;){var l=p9(n[i],s[i]);if(l){if(i>=o)return l;var h=r[i];return l*(h=="desc"?-1:1)}}return t.index-e.index}function y9(t,e,r){e.length?e=ys(e,function(s){return Fe(s)?function(a){return Ac(a,s.length===1?s[0]:s)}:s}):e=[Zn];var i=-1;e=ys(e,Ec(gn));var n=vg(t,function(s,a,o){var l=ys(e,function(h){return h(s)});return{criteria:l,index:++i,value:s}});return d9(n,function(s,a){return g9(s,a,r)})}function m9(t,e){return f9(t,e,function(r,i){return gg(t,i)})}var b9=aT(function(t,e){return t==null?{}:m9(t,e)});const Ya=b9;var _9=Math.ceil,x9=Math.max;function v9(t,e,r,i){for(var n=-1,s=x9(_9((e-t)/(r||1)),0),a=Array(s);s--;)a[i?s:++n]=t,t+=r;return a}function k9(t){return function(e,r,i){return i&&typeof i!="number"&&Fa(e,r,i)&&(r=i=void 0),e=Ko(e),r===void 0?(r=e,e=0):r=Ko(r),i=i===void 0?e<r?1:-1:Ko(i),v9(e,r,i,t)}}var w9=k9();const Pn=w9;function T9(t,e,r,i,n){return n(t,function(s,a,o){r=i?(i=!1,s):e(r,s,a,o)}),r}function oo(t,e,r){var i=Fe(t)?dT:T9,n=arguments.length<3;return i(t,gn(e),r,n,Bc)}var E9=wc(function(t,e){if(t==null)return[];var r=e.length;return r>1&&Fa(t,e[0],e[1])?e=[]:r>2&&Fa(e[0],e[1],e[2])&&(e=[e[0]]),y9(t,Lc(e,1),[])});const lo=E9;var C9=1/0,S9=ms&&1/A1(new ms([,-0]))[1]==C9?function(t){return new ms(t)}:O7;const A9=S9;var L9=200;function B9(t,e,r){var i=-1,n=j7,s=t.length,a=!0,o=[],l=o;if(r)a=!1,n=jC;else if(s>=L9){var h=e?null:A9(t);if(h)return A1(h);a=!1,n=hg,l=new Pa}else l=e?[]:o;t:for(;++i<s;){var u=t[i],f=e?e(u):u;if(u=r||u!==0?u:0,a&&f===f){for(var d=l.length;d--;)if(l[d]===f)continue t;e&&l.push(f),o.push(u)}else n(l,f,r)||(l!==o&&l.push(f),o.push(u))}return o}var D9=wc(function(t){return B9(Lc(t,1,bg,!0))});const I9=D9;var M9=0;function Ic(t){var e=++M9;return Kp(t)+e}function N9(t,e,r){for(var i=-1,n=t.length,s=e.length,a={};++i<n;){var o=i<s?e[i]:void 0;r(a,t[i],o)}return a}function R9(t,e){return N9(t||[],e||[],kc)}var O9="\0",kn="\0",od="";class Pe{constructor(e={}){this._isDirected=Qt(e,"directed")?e.directed:!0,this._isMultigraph=Qt(e,"multigraph")?e.multigraph:!1,this._isCompound=Qt(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=cs(void 0),this._defaultEdgeLabelFn=cs(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[kn]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return As(e)||(e=cs(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return Er(this._nodes)}sources(){var e=this;return Vi(this.nodes(),function(r){return bs(e._in[r])})}sinks(){var e=this;return Vi(this.nodes(),function(r){return bs(e._out[r])})}setNodes(e,r){var i=arguments,n=this;return dt(e,function(s){i.length>1?n.setNode(s,r):n.setNode(s)}),this}setNode(e,r){return Qt(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=r),this):(this._nodes[e]=arguments.length>1?r:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=kn,this._children[e]={},this._children[kn][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Qt(this._nodes,e)}removeNode(e){var r=this;if(Qt(this._nodes,e)){var i=function(n){r.removeEdge(r._edgeObjs[n])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],dt(this.children(e),function(n){r.setParent(n)}),delete this._children[e]),dt(Er(this._in[e]),i),delete this._in[e],delete this._preds[e],dt(Er(this._out[e]),i),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Be(r))r=kn;else{r+="";for(var i=r;!Be(i);i=this.parent(i))if(i===e)throw new Error("Setting "+r+" as parent of "+e+" would create a cycle");this.setNode(r)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=r,this._children[r][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var r=this._parent[e];if(r!==kn)return r}}children(e){if(Be(e)&&(e=kn),this._isCompound){var r=this._children[e];if(r)return Er(r)}else{if(e===kn)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var r=this._preds[e];if(r)return Er(r)}successors(e){var r=this._sucs[e];if(r)return Er(r)}neighbors(e){var r=this.predecessors(e);if(r)return I9(r,this.successors(e))}isLeaf(e){var r;return this.isDirected()?r=this.successors(e):r=this.neighbors(e),r.length===0}filterNodes(e){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var i=this;dt(this._nodes,function(a,o){e(o)&&r.setNode(o,a)}),dt(this._edgeObjs,function(a){r.hasNode(a.v)&&r.hasNode(a.w)&&r.setEdge(a,i.edge(a))});var n={};function s(a){var o=i.parent(a);return o===void 0||r.hasNode(o)?(n[a]=o,o):o in n?n[o]:s(o)}return this._isCompound&&dt(r.nodes(),function(a){r.setParent(a,s(a))}),r}setDefaultEdgeLabel(e){return As(e)||(e=cs(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return Wi(this._edgeObjs)}setPath(e,r){var i=this,n=arguments;return oo(e,function(s,a){return n.length>1?i.setEdge(s,a,r):i.setEdge(s,a),a}),this}setEdge(){var e,r,i,n,s=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(e=a.v,r=a.w,i=a.name,arguments.length===2&&(n=arguments[1],s=!0)):(e=a,r=arguments[1],i=arguments[3],arguments.length>2&&(n=arguments[2],s=!0)),e=""+e,r=""+r,Be(i)||(i=""+i);var o=ua(this._isDirected,e,r,i);if(Qt(this._edgeLabels,o))return s&&(this._edgeLabels[o]=n),this;if(!Be(i)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(r),this._edgeLabels[o]=s?n:this._defaultEdgeLabelFn(e,r,i);var l=F9(this._isDirected,e,r,i);return e=l.v,r=l.w,Object.freeze(l),this._edgeObjs[o]=l,ld(this._preds[r],e),ld(this._sucs[e],r),this._in[r][o]=l,this._out[e][o]=l,this._edgeCount++,this}edge(e,r,i){var n=arguments.length===1?Eh(this._isDirected,arguments[0]):ua(this._isDirected,e,r,i);return this._edgeLabels[n]}hasEdge(e,r,i){var n=arguments.length===1?Eh(this._isDirected,arguments[0]):ua(this._isDirected,e,r,i);return Qt(this._edgeLabels,n)}removeEdge(e,r,i){var n=arguments.length===1?Eh(this._isDirected,arguments[0]):ua(this._isDirected,e,r,i),s=this._edgeObjs[n];return s&&(e=s.v,r=s.w,delete this._edgeLabels[n],delete this._edgeObjs[n],cd(this._preds[r],e),cd(this._sucs[e],r),delete this._in[r][n],delete this._out[e][n],this._edgeCount--),this}inEdges(e,r){var i=this._in[e];if(i){var n=Wi(i);return r?Vi(n,function(s){return s.v===r}):n}}outEdges(e,r){var i=this._out[e];if(i){var n=Wi(i);return r?Vi(n,function(s){return s.w===r}):n}}nodeEdges(e,r){var i=this.inEdges(e,r);if(i)return i.concat(this.outEdges(e,r))}}Pe.prototype._nodeCount=0;Pe.prototype._edgeCount=0;function ld(t,e){t[e]?t[e]++:t[e]=1}function cd(t,e){--t[e]||delete t[e]}function ua(t,e,r,i){var n=""+e,s=""+r;if(!t&&n>s){var a=n;n=s,s=a}return n+od+s+od+(Be(i)?O9:i)}function F9(t,e,r,i){var n=""+e,s=""+r;if(!t&&n>s){var a=n;n=s,s=a}var o={v:n,w:s};return i&&(o.name=i),o}function Eh(t,e){return ua(t,e.v,e.w,e.name)}class P9{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,r=e._prev;if(r!==e)return hd(r),r}enqueue(e){var r=this._sentinel;e._prev&&e._next&&hd(e),e._next=r._next,r._next._prev=e,r._next=e,e._prev=r}toString(){for(var e=[],r=this._sentinel,i=r._prev;i!==r;)e.push(JSON.stringify(i,V9)),i=i._prev;return"["+e.join(", ")+"]"}}function hd(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function V9(t,e){if(t!=="_next"&&t!=="_prev")return e}var Y9=cs(1);function z9(t,e){if(t.nodeCount()<=1)return[];var r=W9(t,e||Y9),i=U9(r.graph,r.buckets,r.zeroIdx);return qs(Oe(i,function(n){return t.outEdges(n.v,n.w)}))}function U9(t,e,r){for(var i=[],n=e[e.length-1],s=e[0],a;t.nodeCount();){for(;a=s.dequeue();)Ch(t,e,r,a);for(;a=n.dequeue();)Ch(t,e,r,a);if(t.nodeCount()){for(var o=e.length-2;o>0;--o)if(a=e[o].dequeue(),a){i=i.concat(Ch(t,e,r,a,!0));break}}}return i}function Ch(t,e,r,i,n){var s=n?[]:void 0;return dt(t.inEdges(i.v),function(a){var o=t.edge(a),l=t.node(a.v);n&&s.push({v:a.v,w:a.w}),l.out-=o,gu(e,r,l)}),dt(t.outEdges(i.v),function(a){var o=t.edge(a),l=a.w,h=t.node(l);h.in-=o,gu(e,r,h)}),t.removeNode(i.v),s}function W9(t,e){var r=new Pe,i=0,n=0;dt(t.nodes(),function(o){r.setNode(o,{v:o,in:0,out:0})}),dt(t.edges(),function(o){var l=r.edge(o.v,o.w)||0,h=e(o),u=l+h;r.setEdge(o.v,o.w,u),n=Math.max(n,r.node(o.v).out+=h),i=Math.max(i,r.node(o.w).in+=h)});var s=Pn(n+i+3).map(function(){return new P9}),a=i+1;return dt(r.nodes(),function(o){gu(s,a,r.node(o))}),{graph:r,buckets:s,zeroIdx:a}}function gu(t,e,r){r.out?r.in?t[r.out-r.in+e].enqueue(r):t[t.length-1].enqueue(r):t[0].enqueue(r)}function H9(t){var e=t.graph().acyclicer==="greedy"?z9(t,r(t)):q9(t);dt(e,function(i){var n=t.edge(i);t.removeEdge(i),n.forwardName=i.name,n.reversed=!0,t.setEdge(i.w,i.v,n,Ic("rev"))});function r(i){return function(n){return i.edge(n).weight}}}function q9(t){var e=[],r={},i={};function n(s){Qt(i,s)||(i[s]=!0,r[s]=!0,dt(t.outEdges(s),function(a){Qt(r,a.w)?e.push(a):n(a.w)}),delete r[s])}return dt(t.nodes(),n),e}function G9(t){dt(t.edges(),function(e){var r=t.edge(e);if(r.reversed){t.removeEdge(e);var i=r.forwardName;delete r.reversed,delete r.forwardName,t.setEdge(e.w,e.v,r,i)}})}function Gs(t,e,r,i){var n;do n=Ic(i);while(t.hasNode(n));return r.dummy=e,t.setNode(n,r),n}function $9(t){var e=new Pe().setGraph(t.graph());return dt(t.nodes(),function(r){e.setNode(r,t.node(r))}),dt(t.edges(),function(r){var i=e.edge(r.v,r.w)||{weight:0,minlen:1},n=t.edge(r);e.setEdge(r.v,r.w,{weight:i.weight+n.weight,minlen:Math.max(i.minlen,n.minlen)})}),e}function wg(t){var e=new Pe({multigraph:t.isMultigraph()}).setGraph(t.graph());return dt(t.nodes(),function(r){t.children(r).length||e.setNode(r,t.node(r))}),dt(t.edges(),function(r){e.setEdge(r,t.edge(r))}),e}function ud(t,e){var r=t.x,i=t.y,n=e.x-r,s=e.y-i,a=t.width/2,o=t.height/2;if(!n&&!s)throw new Error("Not possible to find intersection inside of the rectangle");var l,h;return Math.abs(s)*a>Math.abs(n)*o?(s<0&&(o=-o),l=o*n/s,h=o):(n<0&&(a=-a),l=a,h=a*s/n),{x:r+l,y:i+h}}function Mc(t){var e=Oe(Pn(Tg(t)+1),function(){return[]});return dt(t.nodes(),function(r){var i=t.node(r),n=i.rank;Be(n)||(e[n][i.order]=r)}),e}function j9(t){var e=Va(Oe(t.nodes(),function(r){return t.node(r).rank}));dt(t.nodes(),function(r){var i=t.node(r);Qt(i,"rank")&&(i.rank-=e)})}function X9(t){var e=Va(Oe(t.nodes(),function(s){return t.node(s).rank})),r=[];dt(t.nodes(),function(s){var a=t.node(s).rank-e;r[a]||(r[a]=[]),r[a].push(s)});var i=0,n=t.graph().nodeRankFactor;dt(r,function(s,a){Be(s)&&a%n!==0?--i:i&&dt(s,function(o){t.node(o).rank+=i})})}function fd(t,e,r,i){var n={width:0,height:0};return arguments.length>=4&&(n.rank=r,n.order=i),Gs(t,"border",n,e)}function Tg(t){return Fn(Oe(t.nodes(),function(e){var r=t.node(e).rank;if(!Be(r))return r}))}function K9(t,e){var r={lhs:[],rhs:[]};return dt(t,function(i){e(i)?r.lhs.push(i):r.rhs.push(i)}),r}function Z9(t,e){var r=ad();try{return e()}finally{console.log(t+" time: "+(ad()-r)+"ms")}}function Q9(t,e){return e()}function J9(t){function e(r){var i=t.children(r),n=t.node(r);if(i.length&&dt(i,e),Qt(n,"minRank")){n.borderLeft=[],n.borderRight=[];for(var s=n.minRank,a=n.maxRank+1;s<a;++s)dd(t,"borderLeft","_bl",r,n,s),dd(t,"borderRight","_br",r,n,s)}}dt(t.children(),e)}function dd(t,e,r,i,n,s){var a={width:0,height:0,rank:s,borderType:e},o=n[e][s-1],l=Gs(t,"border",a,r);n[e][s]=l,t.setParent(l,i),o&&t.setEdge(o,l,{weight:1})}function tS(t){var e=t.graph().rankdir.toLowerCase();(e==="lr"||e==="rl")&&Eg(t)}function eS(t){var e=t.graph().rankdir.toLowerCase();(e==="bt"||e==="rl")&&rS(t),(e==="lr"||e==="rl")&&(iS(t),Eg(t))}function Eg(t){dt(t.nodes(),function(e){pd(t.node(e))}),dt(t.edges(),function(e){pd(t.edge(e))})}function pd(t){var e=t.width;t.width=t.height,t.height=e}function rS(t){dt(t.nodes(),function(e){Sh(t.node(e))}),dt(t.edges(),function(e){var r=t.edge(e);dt(r.points,Sh),Qt(r,"y")&&Sh(r)})}function Sh(t){t.y=-t.y}function iS(t){dt(t.nodes(),function(e){Ah(t.node(e))}),dt(t.edges(),function(e){var r=t.edge(e);dt(r.points,Ah),Qt(r,"x")&&Ah(r)})}function Ah(t){var e=t.x;t.x=t.y,t.y=e}function nS(t){t.graph().dummyChains=[],dt(t.edges(),function(e){sS(t,e)})}function sS(t,e){var r=e.v,i=t.node(r).rank,n=e.w,s=t.node(n).rank,a=e.name,o=t.edge(e),l=o.labelRank;if(s!==i+1){t.removeEdge(e);var h,u,f;for(f=0,++i;i<s;++f,++i)o.points=[],u={width:0,height:0,edgeLabel:o,edgeObj:e,rank:i},h=Gs(t,"edge",u,"_d"),i===l&&(u.width=o.width,u.height=o.height,u.dummy="edge-label",u.labelpos=o.labelpos),t.setEdge(r,h,{weight:o.weight},a),f===0&&t.graph().dummyChains.push(h),r=h;t.setEdge(r,n,{weight:o.weight},a)}}function aS(t){dt(t.graph().dummyChains,function(e){var r=t.node(e),i=r.edgeLabel,n;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)})}function N1(t){var e={};function r(i){var n=t.node(i);if(Qt(e,i))return n.rank;e[i]=!0;var s=Va(Oe(t.outEdges(i),function(a){return r(a.w)-t.edge(a).minlen}));return(s===Number.POSITIVE_INFINITY||s===void 0||s===null)&&(s=0),n.rank=s}dt(t.sources(),r)}function za(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}function Cg(t){var e=new Pe({directed:!1}),r=t.nodes()[0],i=t.nodeCount();e.setNode(r,{});for(var n,s;oS(e,t)<i;)n=lS(e,t),s=e.hasNode(n.v)?za(t,n):-za(t,n),cS(e,t,s);return e}function oS(t,e){function r(i){dt(e.nodeEdges(i),function(n){var s=n.v,a=i===s?n.w:s;!t.hasNode(a)&&!za(e,n)&&(t.setNode(a,{}),t.setEdge(i,a,{}),r(a))})}return dt(t.nodes(),r),t.nodeCount()}function lS(t,e){return M1(e.edges(),function(r){if(t.hasNode(r.v)!==t.hasNode(r.w))return za(e,r)})}function cS(t,e,r){dt(t.nodes(),function(i){e.node(i).rank+=r})}function hS(){}hS.prototype=new Error;function Sg(t,e,r){Fe(e)||(e=[e]);var i=(t.isDirected()?t.successors:t.neighbors).bind(t),n=[],s={};return dt(e,function(a){if(!t.hasNode(a))throw new Error("Graph does not have node: "+a);Ag(t,a,r==="post",s,i,n)}),n}function Ag(t,e,r,i,n,s){Qt(i,e)||(i[e]=!0,r||s.push(e),dt(n(e),function(a){Ag(t,a,r,i,n,s)}),r&&s.push(e))}function uS(t,e){return Sg(t,e,"post")}function fS(t,e){return Sg(t,e,"pre")}Jn.initLowLimValues=O1;Jn.initCutValues=R1;Jn.calcCutValue=Lg;Jn.leaveEdge=Dg;Jn.enterEdge=Ig;Jn.exchangeEdges=Mg;function Jn(t){t=$9(t),N1(t);var e=Cg(t);O1(e),R1(e,t);for(var r,i;r=Dg(e);)i=Ig(e,t,r),Mg(e,t,r,i)}function R1(t,e){var r=uS(t,t.nodes());r=r.slice(0,r.length-1),dt(r,function(i){dS(t,e,i)})}function dS(t,e,r){var i=t.node(r),n=i.parent;t.edge(r,n).cutvalue=Lg(t,e,r)}function Lg(t,e,r){var i=t.node(r),n=i.parent,s=!0,a=e.edge(r,n),o=0;return a||(s=!1,a=e.edge(n,r)),o=a.weight,dt(e.nodeEdges(r),function(l){var h=l.v===r,u=h?l.w:l.v;if(u!==n){var f=h===s,d=e.edge(l).weight;if(o+=f?d:-d,gS(t,r,u)){var p=t.edge(r,u).cutvalue;o+=f?-p:p}}}),o}function O1(t,e){arguments.length<2&&(e=t.nodes()[0]),Bg(t,{},1,e)}function Bg(t,e,r,i,n){var s=r,a=t.node(i);return e[i]=!0,dt(t.neighbors(i),function(o){Qt(e,o)||(r=Bg(t,e,r,o,i))}),a.low=s,a.lim=r++,n?a.parent=n:delete a.parent,r}function Dg(t){return D1(t.edges(),function(e){return t.edge(e).cutvalue<0})}function Ig(t,e,r){var i=r.v,n=r.w;e.hasEdge(i,n)||(i=r.w,n=r.v);var s=t.node(i),a=t.node(n),o=s,l=!1;s.lim>a.lim&&(o=a,l=!0);var h=Vi(e.edges(),function(u){return l===gd(t,t.node(u.v),o)&&l!==gd(t,t.node(u.w),o)});return M1(h,function(u){return za(e,u)})}function Mg(t,e,r,i){var n=r.v,s=r.w;t.removeEdge(n,s),t.setEdge(i.v,i.w,{}),O1(t),R1(t,e),pS(t,e)}function pS(t,e){var r=D1(t.nodes(),function(n){return!e.node(n).parent}),i=fS(t,r);i=i.slice(1),dt(i,function(n){var s=t.node(n).parent,a=e.edge(n,s),o=!1;a||(a=e.edge(s,n),o=!0),e.node(n).rank=e.node(s).rank+(o?a.minlen:-a.minlen)})}function gS(t,e,r){return t.hasEdge(e,r)}function gd(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}function yS(t){switch(t.graph().ranker){case"network-simplex":yd(t);break;case"tight-tree":bS(t);break;case"longest-path":mS(t);break;default:yd(t)}}var mS=N1;function bS(t){N1(t),Cg(t)}function yd(t){Jn(t)}function _S(t){var e=Gs(t,"root",{},"_root"),r=xS(t),i=Fn(Wi(r))-1,n=2*i+1;t.graph().nestingRoot=e,dt(t.edges(),function(a){t.edge(a).minlen*=n});var s=vS(t)+1;dt(t.children(),function(a){Ng(t,e,n,s,i,r,a)}),t.graph().nodeRankFactor=n}function Ng(t,e,r,i,n,s,a){var o=t.children(a);if(!o.length){a!==e&&t.setEdge(e,a,{weight:0,minlen:r});return}var l=fd(t,"_bt"),h=fd(t,"_bb"),u=t.node(a);t.setParent(l,a),u.borderTop=l,t.setParent(h,a),u.borderBottom=h,dt(o,function(f){Ng(t,e,r,i,n,s,f);var d=t.node(f),p=d.borderTop?d.borderTop:f,m=d.borderBottom?d.borderBottom:f,b=d.borderTop?i:2*i,x=p!==m?1:n-s[a]+1;t.setEdge(l,p,{weight:b,minlen:x,nestingEdge:!0}),t.setEdge(m,h,{weight:b,minlen:x,nestingEdge:!0})}),t.parent(a)||t.setEdge(e,l,{weight:0,minlen:n+s[a]})}function xS(t){var e={};function r(i,n){var s=t.children(i);s&&s.length&&dt(s,function(a){r(a,n+1)}),e[i]=n}return dt(t.children(),function(i){r(i,1)}),e}function vS(t){return oo(t.edges(),function(e,r){return e+t.edge(r).weight},0)}function kS(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,dt(t.edges(),function(r){var i=t.edge(r);i.nestingEdge&&t.removeEdge(r)})}function wS(t,e,r){var i={},n;dt(r,function(s){for(var a=t.parent(s),o,l;a;){if(o=t.parent(a),o?(l=i[o],i[o]=a):(l=n,n=a),l&&l!==a){e.setEdge(l,a);return}a=o}})}function TS(t,e,r){var i=ES(t),n=new Pe({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(s){return t.node(s)});return dt(t.nodes(),function(s){var a=t.node(s),o=t.parent(s);(a.rank===e||a.minRank<=e&&e<=a.maxRank)&&(n.setNode(s),n.setParent(s,o||i),dt(t[r](s),function(l){var h=l.v===s?l.w:l.v,u=n.edge(h,s),f=Be(u)?0:u.weight;n.setEdge(h,s,{weight:t.edge(l).weight+f})}),Qt(a,"minRank")&&n.setNode(s,{borderLeft:a.borderLeft[e],borderRight:a.borderRight[e]}))}),n}function ES(t){for(var e;t.hasNode(e=Ic("_root")););return e}function CS(t,e){for(var r=0,i=1;i<e.length;++i)r+=SS(t,e[i-1],e[i]);return r}function SS(t,e,r){for(var i=R9(r,Oe(r,function(h,u){return u})),n=qs(Oe(e,function(h){return lo(Oe(t.outEdges(h),function(u){return{pos:i[u.w],weight:t.edge(u).weight}}),"pos")})),s=1;s<r.length;)s<<=1;var a=2*s-1;s-=1;var o=Oe(new Array(a),function(){return 0}),l=0;return dt(n.forEach(function(h){var u=h.pos+s;o[u]+=h.weight;for(var f=0;u>0;)u%2&&(f+=o[u+1]),u=u-1>>1,o[u]+=h.weight;l+=h.weight*f})),l}function AS(t){var e={},r=Vi(t.nodes(),function(o){return!t.children(o).length}),i=Fn(Oe(r,function(o){return t.node(o).rank})),n=Oe(Pn(i+1),function(){return[]});function s(o){if(!Qt(e,o)){e[o]=!0;var l=t.node(o);n[l.rank].push(o),dt(t.successors(o),s)}}var a=lo(r,function(o){return t.node(o).rank});return dt(a,s),n}function LS(t,e){return Oe(e,function(r){var i=t.inEdges(r);if(i.length){var n=oo(i,function(s,a){var o=t.edge(a),l=t.node(a.v);return{sum:s.sum+o.weight*l.order,weight:s.weight+o.weight}},{sum:0,weight:0});return{v:r,barycenter:n.sum/n.weight,weight:n.weight}}else return{v:r}})}function BS(t,e){var r={};dt(t,function(n,s){var a=r[n.v]={indegree:0,in:[],out:[],vs:[n.v],i:s};Be(n.barycenter)||(a.barycenter=n.barycenter,a.weight=n.weight)}),dt(e.edges(),function(n){var s=r[n.v],a=r[n.w];!Be(s)&&!Be(a)&&(a.indegree++,s.out.push(r[n.w]))});var i=Vi(r,function(n){return!n.indegree});return DS(i)}function DS(t){var e=[];function r(s){return function(a){a.merged||(Be(a.barycenter)||Be(s.barycenter)||a.barycenter>=s.barycenter)&&IS(s,a)}}function i(s){return function(a){a.in.push(s),--a.indegree===0&&t.push(a)}}for(;t.length;){var n=t.pop();e.push(n),dt(n.in.reverse(),r(n)),dt(n.out,i(n))}return Oe(Vi(e,function(s){return!s.merged}),function(s){return Ya(s,["vs","i","barycenter","weight"])})}function IS(t,e){var r=0,i=0;t.weight&&(r+=t.barycenter*t.weight,i+=t.weight),e.weight&&(r+=e.barycenter*e.weight,i+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=r/i,t.weight=i,t.i=Math.min(e.i,t.i),e.merged=!0}function MS(t,e){var r=K9(t,function(u){return Qt(u,"barycenter")}),i=r.lhs,n=lo(r.rhs,function(u){return-u.i}),s=[],a=0,o=0,l=0;i.sort(NS(!!e)),l=md(s,n,l),dt(i,function(u){l+=u.vs.length,s.push(u.vs),a+=u.barycenter*u.weight,o+=u.weight,l=md(s,n,l)});var h={vs:qs(s)};return o&&(h.barycenter=a/o,h.weight=o),h}function md(t,e,r){for(var i;e.length&&(i=Ll(e)).i<=r;)e.pop(),t.push(i.vs),r++;return r}function NS(t){return function(e,r){return e.barycenter<r.barycenter?-1:e.barycenter>r.barycenter?1:t?r.i-e.i:e.i-r.i}}function Rg(t,e,r,i){var n=t.children(e),s=t.node(e),a=s?s.borderLeft:void 0,o=s?s.borderRight:void 0,l={};a&&(n=Vi(n,function(m){return m!==a&&m!==o}));var h=LS(t,n);dt(h,function(m){if(t.children(m.v).length){var b=Rg(t,m.v,r,i);l[m.v]=b,Qt(b,"barycenter")&&OS(m,b)}});var u=BS(h,r);RS(u,l);var f=MS(u,i);if(a&&(f.vs=qs([a,f.vs,o]),t.predecessors(a).length)){var d=t.node(t.predecessors(a)[0]),p=t.node(t.predecessors(o)[0]);Qt(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+d.order+p.order)/(f.weight+2),f.weight+=2}return f}function RS(t,e){dt(t,function(r){r.vs=qs(r.vs.map(function(i){return e[i]?e[i].vs:i}))})}function OS(t,e){Be(t.barycenter)?(t.barycenter=e.barycenter,t.weight=e.weight):(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight)}function FS(t){var e=Tg(t),r=bd(t,Pn(1,e+1),"inEdges"),i=bd(t,Pn(e-1,-1,-1),"outEdges"),n=AS(t);_d(t,n);for(var s=Number.POSITIVE_INFINITY,a,o=0,l=0;l<4;++o,++l){PS(o%2?r:i,o%4>=2),n=Mc(t);var h=CS(t,n);h<s&&(l=0,a=QE(n),s=h)}_d(t,a)}function bd(t,e,r){return Oe(e,function(i){return TS(t,i,r)})}function PS(t,e){var r=new Pe;dt(t,function(i){var n=i.graph().root,s=Rg(i,n,r,e);dt(s.vs,function(a,o){i.node(a).order=o}),wS(i,r,s.vs)})}function _d(t,e){dt(e,function(r){dt(r,function(i,n){t.node(i).order=n})})}function VS(t){var e=zS(t);dt(t.graph().dummyChains,function(r){for(var i=t.node(r),n=i.edgeObj,s=YS(t,e,n.v,n.w),a=s.path,o=s.lca,l=0,h=a[l],u=!0;r!==n.w;){if(i=t.node(r),u){for(;(h=a[l])!==o&&t.node(h).maxRank<i.rank;)l++;h===o&&(u=!1)}if(!u){for(;l<a.length-1&&t.node(h=a[l+1]).minRank<=i.rank;)l++;h=a[l]}t.setParent(r,h),r=t.successors(r)[0]}})}function YS(t,e,r,i){var n=[],s=[],a=Math.min(e[r].low,e[i].low),o=Math.max(e[r].lim,e[i].lim),l,h;l=r;do l=t.parent(l),n.push(l);while(l&&(e[l].low>a||o>e[l].lim));for(h=l,l=i;(l=t.parent(l))!==h;)s.push(l);return{path:n.concat(s.reverse()),lca:h}}function zS(t){var e={},r=0;function i(n){var s=r;dt(t.children(n),i),e[n]={low:s,lim:r++}}return dt(t.children(),i),e}function US(t,e){var r={};function i(n,s){var a=0,o=0,l=n.length,h=Ll(s);return dt(s,function(u,f){var d=HS(t,u),p=d?t.node(d).order:l;(d||u===h)&&(dt(s.slice(o,f+1),function(m){dt(t.predecessors(m),function(b){var x=t.node(b),k=x.order;(k<a||p<k)&&!(x.dummy&&t.node(m).dummy)&&Og(r,b,m)})}),o=f+1,a=p)}),s}return oo(e,i),r}function WS(t,e){var r={};function i(s,a,o,l,h){var u;dt(Pn(a,o),function(f){u=s[f],t.node(u).dummy&&dt(t.predecessors(u),function(d){var p=t.node(d);p.dummy&&(p.order<l||p.order>h)&&Og(r,d,u)})})}function n(s,a){var o=-1,l,h=0;return dt(a,function(u,f){if(t.node(u).dummy==="border"){var d=t.predecessors(u);d.length&&(l=t.node(d[0]).order,i(a,h,f,o,l),h=f,o=l)}i(a,h,a.length,l,s.length)}),a}return oo(e,n),r}function HS(t,e){if(t.node(e).dummy)return D1(t.predecessors(e),function(r){return t.node(r).dummy})}function Og(t,e,r){if(e>r){var i=e;e=r,r=i}var n=t[e];n||(t[e]=n={}),n[r]=!0}function qS(t,e,r){if(e>r){var i=e;e=r,r=i}return Qt(t[e],r)}function GS(t,e,r,i){var n={},s={},a={};return dt(e,function(o){dt(o,function(l,h){n[l]=l,s[l]=l,a[l]=h})}),dt(e,function(o){var l=-1;dt(o,function(h){var u=i(h);if(u.length){u=lo(u,function(b){return a[b]});for(var f=(u.length-1)/2,d=Math.floor(f),p=Math.ceil(f);d<=p;++d){var m=u[d];s[h]===h&&l<a[m]&&!qS(r,h,m)&&(s[m]=h,s[h]=n[h]=n[m],l=a[m])}}})}),{root:n,align:s}}function $S(t,e,r,i,n){var s={},a=jS(t,e,r,n),o=n?"borderLeft":"borderRight";function l(f,d){for(var p=a.nodes(),m=p.pop(),b={};m;)b[m]?f(m):(b[m]=!0,p.push(m),p=p.concat(d(m))),m=p.pop()}function h(f){s[f]=a.inEdges(f).reduce(function(d,p){return Math.max(d,s[p.v]+a.edge(p))},0)}function u(f){var d=a.outEdges(f).reduce(function(m,b){return Math.min(m,s[b.w]-a.edge(b))},Number.POSITIVE_INFINITY),p=t.node(f);d!==Number.POSITIVE_INFINITY&&p.borderType!==o&&(s[f]=Math.max(s[f],d))}return l(h,a.predecessors.bind(a)),l(u,a.successors.bind(a)),dt(i,function(f){s[f]=s[r[f]]}),s}function jS(t,e,r,i){var n=new Pe,s=t.graph(),a=JS(s.nodesep,s.edgesep,i);return dt(e,function(o){var l;dt(o,function(h){var u=r[h];if(n.setNode(u),l){var f=r[l],d=n.edge(f,u);n.setEdge(f,u,Math.max(a(t,h,l),d||0))}l=h})}),n}function XS(t,e){return M1(Wi(e),function(r){var i=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY;return t9(r,function(s,a){var o=tA(t,a)/2;i=Math.max(s+o,i),n=Math.min(s-o,n)}),i-n})}function KS(t,e){var r=Wi(e),i=Va(r),n=Fn(r);dt(["u","d"],function(s){dt(["l","r"],function(a){var o=s+a,l=t[o],h;if(l!==e){var u=Wi(l);h=a==="l"?i-Va(u):n-Fn(u),h&&(t[o]=Dc(l,function(f){return f+h}))}})})}function ZS(t,e){return Dc(t.ul,function(r,i){if(e)return t[e.toLowerCase()][i];var n=lo(Oe(t,i));return(n[1]+n[2])/2})}function QS(t){var e=Mc(t),r=pu(US(t,e),WS(t,e)),i={},n;dt(["u","d"],function(a){n=a==="u"?e:Wi(e).reverse(),dt(["l","r"],function(o){o==="r"&&(n=Oe(n,function(f){return Wi(f).reverse()}));var l=(a==="u"?t.predecessors:t.successors).bind(t),h=GS(t,n,r,l),u=$S(t,n,h.root,h.align,o==="r");o==="r"&&(u=Dc(u,function(f){return-f})),i[a+o]=u})});var s=XS(t,i);return KS(i,s),ZS(i,t.graph().align)}function JS(t,e,r){return function(i,n,s){var a=i.node(n),o=i.node(s),l=0,h;if(l+=a.width/2,Qt(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":h=-a.width/2;break;case"r":h=a.width/2;break}if(h&&(l+=r?h:-h),h=0,l+=(a.dummy?e:t)/2,l+=(o.dummy?e:t)/2,l+=o.width/2,Qt(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":h=o.width/2;break;case"r":h=-o.width/2;break}return h&&(l+=r?h:-h),h=0,l}}function tA(t,e){return t.node(e).width}function eA(t){t=wg(t),rA(t),dt(QS(t),function(e,r){t.node(r).x=e})}function rA(t){var e=Mc(t),r=t.graph().ranksep,i=0;dt(e,function(n){var s=Fn(Oe(n,function(a){return t.node(a).height}));dt(n,function(a){t.node(a).y=i+s/2}),i+=s+r})}function $s(t,e){var r=e&&e.debugTiming?Z9:Q9;r("layout",function(){var i=r(" buildLayoutGraph",function(){return dA(t)});r(" runLayout",function(){iA(i,r)}),r(" updateInputGraph",function(){nA(t,i)})})}function iA(t,e){e(" makeSpaceForEdgeLabels",function(){pA(t)}),e(" removeSelfEdges",function(){wA(t)}),e(" acyclic",function(){H9(t)}),e(" nestingGraph.run",function(){_S(t)}),e(" rank",function(){yS(wg(t))}),e(" injectEdgeLabelProxies",function(){gA(t)}),e(" removeEmptyRanks",function(){X9(t)}),e(" nestingGraph.cleanup",function(){kS(t)}),e(" normalizeRanks",function(){j9(t)}),e(" assignRankMinMax",function(){yA(t)}),e(" removeEdgeLabelProxies",function(){mA(t)}),e(" normalize.run",function(){nS(t)}),e(" parentDummyChains",function(){VS(t)}),e(" addBorderSegments",function(){J9(t)}),e(" order",function(){FS(t)}),e(" insertSelfEdges",function(){TA(t)}),e(" adjustCoordinateSystem",function(){tS(t)}),e(" position",function(){eA(t)}),e(" positionSelfEdges",function(){EA(t)}),e(" removeBorderNodes",function(){kA(t)}),e(" normalize.undo",function(){aS(t)}),e(" fixupEdgeLabelCoords",function(){xA(t)}),e(" undoCoordinateSystem",function(){eS(t)}),e(" translateGraph",function(){bA(t)}),e(" assignNodeIntersects",function(){_A(t)}),e(" reversePoints",function(){vA(t)}),e(" acyclic.undo",function(){G9(t)})}function nA(t,e){dt(t.nodes(),function(r){var i=t.node(r),n=e.node(r);i&&(i.x=n.x,i.y=n.y,e.children(r).length&&(i.width=n.width,i.height=n.height))}),dt(t.edges(),function(r){var i=t.edge(r),n=e.edge(r);i.points=n.points,Qt(n,"x")&&(i.x=n.x,i.y=n.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}var sA=["nodesep","edgesep","ranksep","marginx","marginy"],aA={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},oA=["acyclicer","ranker","rankdir","align"],lA=["width","height"],cA={width:0,height:0},hA=["minlen","weight","width","height","labeloffset"],uA={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},fA=["labelpos"];function dA(t){var e=new Pe({multigraph:!0,compound:!0}),r=Bh(t.graph());return e.setGraph(pu({},aA,Lh(r,sA),Ya(r,oA))),dt(t.nodes(),function(i){var n=Bh(t.node(i));e.setNode(i,ns(Lh(n,lA),cA)),e.setParent(i,t.parent(i))}),dt(t.edges(),function(i){var n=Bh(t.edge(i));e.setEdge(i,pu({},uA,Lh(n,hA),Ya(n,fA)))}),e}function pA(t){var e=t.graph();e.ranksep/=2,dt(t.edges(),function(r){var i=t.edge(r);i.minlen*=2,i.labelpos.toLowerCase()!=="c"&&(e.rankdir==="TB"||e.rankdir==="BT"?i.width+=i.labeloffset:i.height+=i.labeloffset)})}function gA(t){dt(t.edges(),function(e){var r=t.edge(e);if(r.width&&r.height){var i=t.node(e.v),n=t.node(e.w),s={rank:(n.rank-i.rank)/2+i.rank,e};Gs(t,"edge-proxy",s,"_ep")}})}function yA(t){var e=0;dt(t.nodes(),function(r){var i=t.node(r);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,e=Fn(e,i.maxRank))}),t.graph().maxRank=e}function mA(t){dt(t.nodes(),function(e){var r=t.node(e);r.dummy==="edge-proxy"&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}function bA(t){var e=Number.POSITIVE_INFINITY,r=0,i=Number.POSITIVE_INFINITY,n=0,s=t.graph(),a=s.marginx||0,o=s.marginy||0;function l(h){var u=h.x,f=h.y,d=h.width,p=h.height;e=Math.min(e,u-d/2),r=Math.max(r,u+d/2),i=Math.min(i,f-p/2),n=Math.max(n,f+p/2)}dt(t.nodes(),function(h){l(t.node(h))}),dt(t.edges(),function(h){var u=t.edge(h);Qt(u,"x")&&l(u)}),e-=a,i-=o,dt(t.nodes(),function(h){var u=t.node(h);u.x-=e,u.y-=i}),dt(t.edges(),function(h){var u=t.edge(h);dt(u.points,function(f){f.x-=e,f.y-=i}),Qt(u,"x")&&(u.x-=e),Qt(u,"y")&&(u.y-=i)}),s.width=r-e+a,s.height=n-i+o}function _A(t){dt(t.edges(),function(e){var r=t.edge(e),i=t.node(e.v),n=t.node(e.w),s,a;r.points?(s=r.points[0],a=r.points[r.points.length-1]):(r.points=[],s=n,a=i),r.points.unshift(ud(i,s)),r.points.push(ud(n,a))})}function xA(t){dt(t.edges(),function(e){var r=t.edge(e);if(Qt(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function vA(t){dt(t.edges(),function(e){var r=t.edge(e);r.reversed&&r.points.reverse()})}function kA(t){dt(t.nodes(),function(e){if(t.children(e).length){var r=t.node(e),i=t.node(r.borderTop),n=t.node(r.borderBottom),s=t.node(Ll(r.borderLeft)),a=t.node(Ll(r.borderRight));r.width=Math.abs(a.x-s.x),r.height=Math.abs(n.y-i.y),r.x=s.x+r.width/2,r.y=i.y+r.height/2}}),dt(t.nodes(),function(e){t.node(e).dummy==="border"&&t.removeNode(e)})}function wA(t){dt(t.edges(),function(e){if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}})}function TA(t){var e=Mc(t);dt(e,function(r){var i=0;dt(r,function(n,s){var a=t.node(n);a.order=s+i,dt(a.selfEdges,function(o){Gs(t,"selfedge",{width:o.label.width,height:o.label.height,rank:a.rank,order:s+ ++i,e:o.e,label:o.label},"_se")}),delete a.selfEdges})})}function EA(t){dt(t.nodes(),function(e){var r=t.node(e);if(r.dummy==="selfedge"){var i=t.node(r.e.v),n=i.x+i.width/2,s=i.y,a=r.x-n,o=i.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:n+2*a/3,y:s-o},{x:n+5*a/6,y:s-o},{x:n+a,y:s},{x:n+5*a/6,y:s+o},{x:n+2*a/3,y:s+o}],r.label.x=r.x,r.label.y=r.y}})}function Lh(t,e){return Dc(Ya(t,e),Number)}function Bh(t){var e={};return dt(t,function(r,i){e[i.toLowerCase()]=r}),e}function Yi(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:CA(t),edges:SA(t)};return Be(t.graph())||(e.value=XE(t.graph())),e}function CA(t){return Oe(t.nodes(),function(e){var r=t.node(e),i=t.parent(e),n={v:e};return Be(r)||(n.value=r),Be(i)||(n.parent=i),n})}function SA(t){return Oe(t.edges(),function(e){var r=t.edge(e),i={v:e.v,w:e.w};return Be(e.name)||(i.name=e.name),Be(r)||(i.value=r),i})}function Fg(t,e){return!!t.children(e).length}function Pg(t){return Dh(t.v)+":"+Dh(t.w)+":"+Dh(t.name)}var AA=/:/g;function Dh(t){return t?String(t).replace(AA,"\\:"):""}function xi(t,e){e&&t.attr("style",e)}function Vg(t,e,r){e&&t.attr("class",e).attr("class",r+" "+t.attr("class"))}function ti(t,e){var r=e.graph();if(Qp(r)){var i=r.transition;if(As(i))return i(t)}return t}var yu={normal:BA,vee:DA,undirected:IA};function LA(t){yu=t}function BA(t,e,r,i){var n=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=n.append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");xi(s,r[i+"Style"]),r[i+"Class"]&&s.attr("class",r[i+"Class"])}function DA(t,e,r,i){var n=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=n.append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");xi(s,r[i+"Style"]),r[i+"Class"]&&s.attr("class",r[i+"Class"])}function IA(t,e,r,i){var n=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=n.append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");xi(s,r[i+"Style"]),r[i+"Class"]&&s.attr("class",r[i+"Class"])}function F1(t,e){var r=t.append("foreignObject").attr("width","100000"),i=r.append("xhtml:div");i.attr("xmlns","http://www.w3.org/1999/xhtml");var n=e.label;switch(typeof n){case"function":i.insert(n);break;case"object":i.insert(function(){return n});break;default:i.html(n)}xi(i,e.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap");var s=i.node().getBoundingClientRect();return r.attr("width",s.width).attr("height",s.height),r}function MA(t,e){var r=t;return r.node().appendChild(e.label),xi(r,e.labelStyle),r}function NA(t,e){for(var r=t.append("text"),i=RA(e.label).split(`
9
+ `),n=0;n<i.length;n++)r.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(i[n]);return xi(r,e.labelStyle),r}function RA(t){for(var e="",r=!1,i,n=0;n<t.length;++n)if(i=t[n],r){switch(i){case"n":e+=`
10
+ `;break;default:e+=i}r=!1}else i==="\\"?r=!0:e+=i;return e}function P1(t,e,r){var i=e.label,n=t.append("g");e.labelType==="svg"?MA(n,e):typeof i!="string"||e.labelType==="html"?F1(n,e):NA(n,e);var s=n.node().getBBox(),a;switch(r){case"top":a=-e.height/2;break;case"bottom":a=e.height/2-s.height;break;default:a=-s.height/2}return n.attr("transform","translate("+-s.width/2+","+a+")"),n}var mu=function(t,e){var r=e.nodes().filter(function(s){return Fg(e,s)}),i=t.selectAll("g.cluster").data(r,function(s){return s});ti(i.exit(),e).style("opacity",0).remove();var n=i.enter().append("g").attr("class","cluster").attr("id",function(s){var a=e.node(s);return a.id}).style("opacity",0).each(function(s){var a=e.node(s),o=_t(this);_t(this).append("rect");var l=o.append("g").attr("class","label");P1(l,a,a.clusterLabelPos)});return i=i.merge(n),i=ti(i,e).style("opacity",1),i.selectAll("rect").each(function(s){var a=e.node(s),o=_t(this);xi(o,a.style)}),i};function OA(t){mu=t}let bu=function(t,e){var r=t.selectAll("g.edgeLabel").data(e.edges(),function(n){return Pg(n)}).classed("update",!0);r.exit().remove(),r.enter().append("g").classed("edgeLabel",!0).style("opacity",0),r=t.selectAll("g.edgeLabel"),r.each(function(n){var s=_t(this);s.select(".label").remove();var a=e.edge(n),o=P1(s,e.edge(n),0).classed("label",!0),l=o.node().getBBox();a.labelId&&o.attr("id",a.labelId),Qt(a,"width")||(a.width=l.width),Qt(a,"height")||(a.height=l.height)});var i;return r.exit?i=r.exit():i=r.selectAll(null),ti(i,e).style("opacity",0).remove(),r};function FA(t){bu=t}function xd(t,e){return t.intersect(e)}var _u=function(t,e,r){var i=t.selectAll("g.edgePath").data(e.edges(),function(a){return Pg(a)}).classed("update",!0),n=UA(i,e);WA(i,e);var s=i.merge!==void 0?i.merge(n):i;return ti(s,e).style("opacity",1),s.each(function(a){var o=_t(this),l=e.edge(a);l.elem=this,l.id&&o.attr("id",l.id),Vg(o,l.class,(o.classed("update")?"update ":"")+"edgePath")}),s.selectAll("path.path").each(function(a){var o=e.edge(a);o.arrowheadId=Ic("arrowhead");var l=_t(this).attr("marker-end",function(){return"url("+VA(location.href,o.arrowheadId)+")"}).style("fill","none");ti(l,e).attr("d",function(h){return YA(e,h)}),xi(l,o.style)}),s.selectAll("defs *").remove(),s.selectAll("defs").each(function(a){var o=e.edge(a),l=r[o.arrowhead];l(_t(this),o.arrowheadId,o,"arrowhead")}),s};function PA(t){_u=t}function VA(t,e){var r=t.split("#")[0];return r+"#"+e}function YA(t,e){var r=t.edge(e),i=t.node(e.v),n=t.node(e.w),s=r.points.slice(1,r.points.length-1);return s.unshift(xd(i,s[0])),s.push(xd(n,s[s.length-1])),Yg(r,s)}function Yg(t,e){var r=(Us||n6.line)().x(function(i){return i.x}).y(function(i){return i.y});return(r.curve||r.interpolate)(t.curve),r(e)}function zA(t){var e=t.getBBox(),r=t.ownerSVGElement.getScreenCTM().inverse().multiply(t.getScreenCTM()).translate(e.width/2,e.height/2);return{x:r.e,y:r.f}}function UA(t,e){var r=t.enter().append("g").attr("class","edgePath").style("opacity",0);return r.append("path").attr("class","path").attr("d",function(i){var n=e.edge(i),s=e.node(i.v).elem,a=Pn(n.points.length).map(function(){return zA(s)});return Yg(n,a)}),r.append("defs"),r}function WA(t,e){var r=t.exit();ti(r,e).style("opacity",0).remove()}var xu=function(t,e,r){var i=e.nodes().filter(function(a){return!Fg(e,a)}),n=t.selectAll("g.node").data(i,function(a){return a}).classed("update",!0);n.exit().remove(),n.enter().append("g").attr("class","node").style("opacity",0),n=t.selectAll("g.node"),n.each(function(a){var o=e.node(a),l=_t(this);Vg(l,o.class,(l.classed("update")?"update ":"")+"node"),l.select("g.label").remove();var h=l.append("g").attr("class","label"),u=P1(h,o),f=r[o.shape],d=Ya(u.node().getBBox(),"width","height");o.elem=this,o.id&&l.attr("id",o.id),o.labelId&&h.attr("id",o.labelId),Qt(o,"width")&&(d.width=o.width),Qt(o,"height")&&(d.height=o.height),d.width+=o.paddingLeft+o.paddingRight,d.height+=o.paddingTop+o.paddingBottom,h.attr("transform","translate("+(o.paddingLeft-o.paddingRight)/2+","+(o.paddingTop-o.paddingBottom)/2+")");var p=_t(this);p.select(".label-container").remove();var m=f(p,d,o).classed("label-container",!0);xi(m,o.style);var b=m.node().getBBox();o.width=b.width,o.height=b.height});var s;return n.exit?s=n.exit():s=n.selectAll(null),ti(s,e).style("opacity",0).remove(),n};function HA(t){xu=t}function qA(t,e){var r=t.filter(function(){return!_t(this).classed("update")});function i(n){var s=e.node(n);return"translate("+s.x+","+s.y+")"}r.attr("transform",i),ti(t,e).style("opacity",1).attr("transform",i),ti(r.selectAll("rect"),e).attr("width",function(n){return e.node(n).width}).attr("height",function(n){return e.node(n).height}).attr("x",function(n){var s=e.node(n);return-s.width/2}).attr("y",function(n){var s=e.node(n);return-s.height/2})}function GA(t,e){var r=t.filter(function(){return!_t(this).classed("update")});function i(n){var s=e.edge(n);return Qt(s,"x")?"translate("+s.x+","+s.y+")":""}r.attr("transform",i),ti(t,e).style("opacity",1).attr("transform",i)}function $A(t,e){var r=t.filter(function(){return!_t(this).classed("update")});function i(n){var s=e.node(n);return"translate("+s.x+","+s.y+")"}r.attr("transform",i),ti(t,e).style("opacity",1).attr("transform",i)}function zg(t,e,r,i){var n=t.x,s=t.y,a=n-i.x,o=s-i.y,l=Math.sqrt(e*e*o*o+r*r*a*a),h=Math.abs(e*r*a/l);i.x<n&&(h=-h);var u=Math.abs(e*r*o/l);return i.y<s&&(u=-u),{x:n+h,y:s+u}}function jA(t,e,r){return zg(t,e,e,r)}function XA(t,e,r,i){var n,s,a,o,l,h,u,f,d,p,m,b,x,k,v;if(n=e.y-t.y,a=t.x-e.x,l=e.x*t.y-t.x*e.y,d=n*r.x+a*r.y+l,p=n*i.x+a*i.y+l,!(d!==0&&p!==0&&vd(d,p))&&(s=i.y-r.y,o=r.x-i.x,h=i.x*r.y-r.x*i.y,u=s*t.x+o*t.y+h,f=s*e.x+o*e.y+h,!(u!==0&&f!==0&&vd(u,f))&&(m=n*o-s*a,m!==0)))return b=Math.abs(m/2),x=a*h-o*l,k=x<0?(x-b)/m:(x+b)/m,x=s*l-n*h,v=x<0?(x-b)/m:(x+b)/m,{x:k,y:v}}function vd(t,e){return t*e>0}function vi(t,e,r){var i=t.x,n=t.y,s=[],a=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;e.forEach(function(m){a=Math.min(a,m.x),o=Math.min(o,m.y)});for(var l=i-t.width/2-a,h=n-t.height/2-o,u=0;u<e.length;u++){var f=e[u],d=e[u<e.length-1?u+1:0],p=XA(t,r,{x:l+f.x,y:h+f.y},{x:l+d.x,y:h+d.y});p&&s.push(p)}return s.length?(s.length>1&&s.sort(function(m,b){var x=m.x-r.x,k=m.y-r.y,v=Math.sqrt(x*x+k*k),B=b.x-r.x,R=b.y-r.y,P=Math.sqrt(B*B+R*R);return v<P?-1:v===P?0:1}),s[0]):(console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t)}function V1(t,e){var r=t.x,i=t.y,n=e.x-r,s=e.y-i,a=t.width/2,o=t.height/2,l,h;return Math.abs(s)*a>Math.abs(n)*o?(s<0&&(o=-o),l=s===0?0:o*n/s,h=o):(n<0&&(a=-a),l=a,h=n===0?0:a*s/n),{x:r+l,y:i+h}}var vu={rect:ZA,ellipse:QA,circle:JA,diamond:tL};function KA(t){vu=t}function ZA(t,e,r){var i=t.insert("rect",":first-child").attr("rx",r.rx).attr("ry",r.ry).attr("x",-e.width/2).attr("y",-e.height/2).attr("width",e.width).attr("height",e.height);return r.intersect=function(n){return V1(r,n)},i}function QA(t,e,r){var i=e.width/2,n=e.height/2,s=t.insert("ellipse",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("rx",i).attr("ry",n);return r.intersect=function(a){return zg(r,i,n,a)},s}function JA(t,e,r){var i=Math.max(e.width,e.height)/2,n=t.insert("circle",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("r",i);return r.intersect=function(s){return jA(r,i,s)},n}function tL(t,e,r){var i=e.width*Math.SQRT2/2,n=e.height*Math.SQRT2/2,s=[{x:0,y:-n},{x:-i,y:0},{x:0,y:n},{x:i,y:0}],a=t.insert("polygon",":first-child").attr("points",s.map(function(o){return o.x+","+o.y}).join(" "));return r.intersect=function(o){return vi(r,s,o)},a}function eL(){var t=function(e,r){nL(r);var i=ia(e,"output"),n=ia(i,"clusters"),s=ia(i,"edgePaths"),a=bu(ia(i,"edgeLabels"),r),o=xu(ia(i,"nodes"),r,vu);$s(r),$A(o,r),GA(a,r),_u(s,r,yu);var l=mu(n,r);qA(l,r),sL(r)};return t.createNodes=function(e){return arguments.length?(HA(e),t):xu},t.createClusters=function(e){return arguments.length?(OA(e),t):mu},t.createEdgeLabels=function(e){return arguments.length?(FA(e),t):bu},t.createEdgePaths=function(e){return arguments.length?(PA(e),t):_u},t.shapes=function(e){return arguments.length?(KA(e),t):vu},t.arrows=function(e){return arguments.length?(LA(e),t):yu},t}var rL={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},iL={arrowhead:"normal",curve:Cr};function nL(t){t.nodes().forEach(function(e){var r=t.node(e);!Qt(r,"label")&&!t.children(e).length&&(r.label=e),Qt(r,"paddingX")&&ns(r,{paddingLeft:r.paddingX,paddingRight:r.paddingX}),Qt(r,"paddingY")&&ns(r,{paddingTop:r.paddingY,paddingBottom:r.paddingY}),Qt(r,"padding")&&ns(r,{paddingLeft:r.padding,paddingRight:r.padding,paddingTop:r.padding,paddingBottom:r.padding}),ns(r,rL),dt(["paddingLeft","paddingRight","paddingTop","paddingBottom"],function(i){r[i]=Number(r[i])}),Qt(r,"width")&&(r._prevWidth=r.width),Qt(r,"height")&&(r._prevHeight=r.height)}),t.edges().forEach(function(e){var r=t.edge(e);Qt(r,"label")||(r.label=""),ns(r,iL)})}function sL(t){dt(t.nodes(),function(e){var r=t.node(e);Qt(r,"_prevWidth")?r.width=r._prevWidth:delete r.width,Qt(r,"_prevHeight")?r.height=r._prevHeight:delete r.height,delete r._prevWidth,delete r._prevHeight})}function ia(t,e){var r=t.select("g."+e);return r.empty()&&(r=t.append("g").attr("class",e)),r}var Ug={exports:{}};(function(t,e){(function(r,i){t.exports=i()})(lc,function(){var r="day";return function(i,n,s){var a=function(h){return h.add(4-h.isoWeekday(),r)},o=n.prototype;o.isoWeekYear=function(){return a(this).year()},o.isoWeek=function(h){if(!this.$utils().u(h))return this.add(7*(h-this.isoWeek()),r);var u,f,d,p,m=a(this),b=(u=this.isoWeekYear(),f=this.$u,d=(f?s.utc:s)().year(u).startOf("year"),p=4-d.isoWeekday(),d.isoWeekday()>4&&(p+=7),d.add(p,r));return m.diff(b,"week")+1},o.isoWeekday=function(h){return this.$utils().u(h)?this.day()||7:this.day(this.day()%7?h:h-7)};var l=o.startOf;o.startOf=function(h,u){var f=this.$utils(),d=!!f.u(u)||u;return f.p(h)==="isoweek"?d?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):l.bind(this)(h,u)}}})})(Ug);var aL=Ug.exports;const oL=cc(aL);var Wg={exports:{}};(function(t,e){(function(r,i){t.exports=i()})(lc,function(){var r={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},i=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,s=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},l=function(b){return(b=+b)+(b>68?1900:2e3)},h=function(b){return function(x){this[b]=+x}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(b){(this.zone||(this.zone={})).offset=function(x){if(!x||x==="Z")return 0;var k=x.match(/([+-]|\d\d)/g),v=60*k[1]+(+k[2]||0);return v===0?0:k[0]==="+"?-v:v}(b)}],f=function(b){var x=o[b];return x&&(x.indexOf?x:x.s.concat(x.f))},d=function(b,x){var k,v=o.meridiem;if(v){for(var B=1;B<=24;B+=1)if(b.indexOf(v(B,0,x))>-1){k=B>12;break}}else k=b===(x?"pm":"PM");return k},p={A:[a,function(b){this.afternoon=d(b,!1)}],a:[a,function(b){this.afternoon=d(b,!0)}],S:[/\d/,function(b){this.milliseconds=100*+b}],SS:[n,function(b){this.milliseconds=10*+b}],SSS:[/\d{3}/,function(b){this.milliseconds=+b}],s:[s,h("seconds")],ss:[s,h("seconds")],m:[s,h("minutes")],mm:[s,h("minutes")],H:[s,h("hours")],h:[s,h("hours")],HH:[s,h("hours")],hh:[s,h("hours")],D:[s,h("day")],DD:[n,h("day")],Do:[a,function(b){var x=o.ordinal,k=b.match(/\d+/);if(this.day=k[0],x)for(var v=1;v<=31;v+=1)x(v).replace(/\[|\]/g,"")===b&&(this.day=v)}],M:[s,h("month")],MM:[n,h("month")],MMM:[a,function(b){var x=f("months"),k=(f("monthsShort")||x.map(function(v){return v.slice(0,3)})).indexOf(b)+1;if(k<1)throw new Error;this.month=k%12||k}],MMMM:[a,function(b){var x=f("months").indexOf(b)+1;if(x<1)throw new Error;this.month=x%12||x}],Y:[/[+-]?\d+/,h("year")],YY:[n,function(b){this.year=l(b)}],YYYY:[/\d{4}/,h("year")],Z:u,ZZ:u};function m(b){var x,k;x=b,k=o&&o.formats;for(var v=(b=x.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(C,S,E){var _=E&&E.toUpperCase();return S||k[E]||r[E]||k[_].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(w,g,D){return g||D.slice(1)})})).match(i),B=v.length,R=0;R<B;R+=1){var P=v[R],V=p[P],O=V&&V[0],F=V&&V[1];v[R]=F?{regex:O,parser:F}:P.replace(/^\[|\]$/g,"")}return function(C){for(var S={},E=0,_=0;E<B;E+=1){var w=v[E];if(typeof w=="string")_+=w.length;else{var g=w.regex,D=w.parser,y=C.slice(_),N=g.exec(y)[0];D.call(S,N),C=C.replace(N,"")}}return function(nt){var Y=nt.afternoon;if(Y!==void 0){var Z=nt.hours;Y?Z<12&&(nt.hours+=12):Z===12&&(nt.hours=0),delete nt.afternoon}}(S),S}}return function(b,x,k){k.p.customParseFormat=!0,b&&b.parseTwoDigitYear&&(l=b.parseTwoDigitYear);var v=x.prototype,B=v.parse;v.parse=function(R){var P=R.date,V=R.utc,O=R.args;this.$u=V;var F=O[1];if(typeof F=="string"){var C=O[2]===!0,S=O[3]===!0,E=C||S,_=O[2];S&&(_=O[2]),o=this.$locale(),!C&&_&&(o=k.Ls[_]),this.$d=function(y,N,nt){try{if(["x","X"].indexOf(N)>-1)return new Date((N==="X"?1e3:1)*y);var Y=m(N)(y),Z=Y.year,J=Y.month,X=Y.day,tt=Y.hours,ot=Y.minutes,at=Y.seconds,U=Y.milliseconds,Tt=Y.zone,$=new Date,j=X||(Z||J?1:$.getDate()),W=Z||$.getFullYear(),z=0;Z&&!J||(z=J>0?J-1:$.getMonth());var A=tt||0,M=ot||0,q=at||0,L=U||0;return Tt?new Date(Date.UTC(W,z,j,A,M,q,L+60*Tt.offset*1e3)):nt?new Date(Date.UTC(W,z,j,A,M,q,L)):new Date(W,z,j,A,M,q,L)}catch{return new Date("")}}(P,F,V),this.init(),_&&_!==!0&&(this.$L=this.locale(_).$L),E&&P!=this.format(F)&&(this.$d=new Date("")),o={}}else if(F instanceof Array)for(var w=F.length,g=1;g<=w;g+=1){O[1]=F[g-1];var D=k.apply(this,O);if(D.isValid()){this.$d=D.$d,this.$L=D.$L,this.init();break}g===w&&(this.$d=new Date(""))}else B.call(this,R)}}})})(Wg);var lL=Wg.exports;const cL=cc(lL);var Hg={exports:{}};(function(t,e){(function(r,i){t.exports=i()})(lc,function(){return function(r,i){var n=i.prototype,s=n.format;n.format=function(a){var o=this,l=this.$locale();if(!this.isValid())return s.bind(this)(a);var h=this.$utils(),u=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(f){switch(f){case"Q":return Math.ceil((o.$M+1)/3);case"Do":return l.ordinal(o.$D);case"gggg":return o.weekYear();case"GGGG":return o.isoWeekYear();case"wo":return l.ordinal(o.week(),"W");case"w":case"ww":return h.s(o.week(),f==="w"?1:2,"0");case"W":case"WW":return h.s(o.isoWeek(),f==="W"?1:2,"0");case"k":case"kk":return h.s(String(o.$H===0?24:o.$H),f==="k"?1:2,"0");case"X":return Math.floor(o.$d.getTime()/1e3);case"x":return o.$d.getTime();case"z":return"["+o.offsetName()+"]";case"zzz":return"["+o.offsetName("long")+"]";default:return f}});return s.bind(this)(u)}}})})(Hg);var hL=Hg.exports;const uL=cc(hL),Si={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},I={trace:(...t)=>{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},Y1=function(t="fatal"){let e=Si.fatal;typeof t=="string"?(t=t.toLowerCase(),t in Si&&(e=Si[t])):typeof t=="number"&&(e=t),I.trace=()=>{},I.debug=()=>{},I.info=()=>{},I.warn=()=>{},I.error=()=>{},I.fatal=()=>{},e<=Si.fatal&&(I.fatal=console.error?console.error.bind(console,Rr("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Rr("FATAL"))),e<=Si.error&&(I.error=console.error?console.error.bind(console,Rr("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Rr("ERROR"))),e<=Si.warn&&(I.warn=console.warn?console.warn.bind(console,Rr("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Rr("WARN"))),e<=Si.info&&(I.info=console.info?console.info.bind(console,Rr("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Rr("INFO"))),e<=Si.debug&&(I.debug=console.debug?console.debug.bind(console,Rr("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Rr("DEBUG"))),e<=Si.trace&&(I.trace=console.debug?console.debug.bind(console,Rr("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Rr("TRACE")))},Rr=t=>`%c${xr().format("ss.SSS")} : ${t} : `,fL=t=>t?Gg(t).replace(/\\n/g,"#br#").split("#br#"):[""],qg=t=>Na.sanitize(t),kd=(t,e)=>{var r;if(((r=e.flowchart)==null?void 0:r.htmlLabels)!==!1){const i=e.securityLevel;i==="antiscript"||i==="strict"?t=qg(t):i!=="loose"&&(t=Gg(t),t=t.replace(/</g,"&lt;").replace(/>/g,"&gt;"),t=t.replace(/=/g,"&equals;"),t=yL(t))}return t},Ur=(t,e)=>t&&(e.dompurifyConfig?t=Na.sanitize(kd(t,e),e.dompurifyConfig).toString():t=Na.sanitize(kd(t,e),{FORBID_TAGS:["style"]}).toString(),t),dL=(t,e)=>typeof t=="string"?Ur(t,e):t.flat().map(r=>Ur(r,e)),Nc=/<br\s*\/?>/gi,pL=t=>Nc.test(t),gL=t=>t.split(Nc),yL=t=>t.replace(/#br#/g,"<br/>"),Gg=t=>t.replace(Nc,"#br#"),mL=t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},Ke=t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),an=function(t){let e=t;if(t.split("~").length-1>=2){let r=e;do e=r,r=e.replace(/~([^\s,:;]+)~/,"<$1>");while(r!=e);return an(r)}else return e},Xt={getRows:fL,sanitizeText:Ur,sanitizeTextOrArray:dL,hasBreaks:pL,splitBreaks:gL,lineBreakRegex:Nc,removeScript:qg,getUrl:mL,evaluate:Ke},hr=(t,e)=>e?lt(t,{s:-40,l:10}):lt(t,{s:-40,l:-10}),Rc="#ffffff",Oc="#f2f2f2";let bL=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||lt(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||lt(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||hr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||hr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||hr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||hr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||At(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||At(this.tertiaryColor),this.lineColor=this.lineColor||At(this.background),this.textColor=this.textColor||this.primaryTextColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Zt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Zt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||At(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||zt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||lt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||lt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||lt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||lt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||lt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||lt(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||lt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||lt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||lt(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=Zt(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=Zt(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||At(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||zt(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||Zt(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||lt(this.mainBkg,{h:180,s:-15,l:e*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||lt(this.mainBkg,{h:180,s:-15,l:e*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||lt(this.primaryColor,{h:64}),this.fillType3=this.fillType3||lt(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||lt(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||lt(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||lt(this.primaryColor,{h:128}),this.fillType7=this.fillType7||lt(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||lt(this.primaryColor,{l:-10}),this.pie5=this.pie5||lt(this.secondaryColor,{l:-10}),this.pie6=this.pie6||lt(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||lt(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||lt(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||lt(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||lt(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||lt(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||lt(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Zt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||lt(this.primaryColor,{h:-30}),this.git4=this.git4||lt(this.primaryColor,{h:-60}),this.git5=this.git5||lt(this.primaryColor,{h:-90}),this.git6=this.git6||lt(this.primaryColor,{h:60}),this.git7=this.git7||lt(this.primaryColor,{h:120}),this.darkMode?(this.git0=zt(this.git0,25),this.git1=zt(this.git1,25),this.git2=zt(this.git2,25),this.git3=zt(this.git3,25),this.git4=zt(this.git4,25),this.git5=zt(this.git5,25),this.git6=zt(this.git6,25),this.git7=zt(this.git7,25)):(this.git0=Zt(this.git0,25),this.git1=Zt(this.git1,25),this.git2=Zt(this.git2,25),this.git3=Zt(this.git3,25),this.git4=Zt(this.git4,25),this.git5=Zt(this.git5,25),this.git6=Zt(this.git6,25),this.git7=Zt(this.git7,25)),this.gitInv0=this.gitInv0||At(this.git0),this.gitInv1=this.gitInv1||At(this.git1),this.gitInv2=this.gitInv2||At(this.git2),this.gitInv3=this.gitInv3||At(this.git3),this.gitInv4=this.gitInv4||At(this.git4),this.gitInv5=this.gitInv5||At(this.git5),this.gitInv6=this.gitInv6||At(this.git6),this.gitInv7=this.gitInv7||At(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Rc,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oc}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}};const _L=t=>{const e=new bL;return e.calculate(t),e};let xL=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=zt(this.primaryColor,16),this.tertiaryColor=lt(this.primaryColor,{h:-160}),this.primaryBorderColor=At(this.background),this.secondaryBorderColor=hr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=hr(this.tertiaryColor,this.darkMode),this.primaryTextColor=At(this.primaryColor),this.secondaryTextColor=At(this.secondaryColor),this.tertiaryTextColor=At(this.tertiaryColor),this.lineColor=At(this.background),this.textColor=At(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=zt(At("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=ma(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=Zt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.taskBorderColor=ma(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=ma(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=zt(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=zt(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=zt(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=lt(this.primaryColor,{h:64}),this.fillType3=lt(this.secondaryColor,{h:64}),this.fillType4=lt(this.primaryColor,{h:-64}),this.fillType5=lt(this.secondaryColor,{h:-64}),this.fillType6=lt(this.primaryColor,{h:128}),this.fillType7=lt(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||lt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||lt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||lt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||lt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||lt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||lt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||lt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||lt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||lt(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||At(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||zt(this["cScale"+e],10);for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||lt(this.mainBkg,{h:30,s:-30,l:-(-10+e*4)}),this["surfacePeer"+e]=this["surfacePeer"+e]||lt(this.mainBkg,{h:30,s:-30,l:-(-7+e*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Zt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=zt(this.secondaryColor,20),this.git1=zt(this.pie2||this.secondaryColor,20),this.git2=zt(this.pie3||this.tertiaryColor,20),this.git3=zt(this.pie4||lt(this.primaryColor,{h:-30}),20),this.git4=zt(this.pie5||lt(this.primaryColor,{h:-60}),20),this.git5=zt(this.pie6||lt(this.primaryColor,{h:-90}),10),this.git6=zt(this.pie7||lt(this.primaryColor,{h:60}),10),this.git7=zt(this.pie8||lt(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||At(this.git0),this.gitInv1=this.gitInv1||At(this.git1),this.gitInv2=this.gitInv2||At(this.git2),this.gitInv3=this.gitInv3||At(this.git3),this.gitInv4=this.gitInv4||At(this.git4),this.gitInv5=this.gitInv5||At(this.git5),this.gitInv6=this.gitInv6||At(this.git6),this.gitInv7=this.gitInv7||At(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||zt(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||zt(this.background,2)}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}};const vL=t=>{const e=new xL;return e.calculate(t),e};let kL=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=lt(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=lt(this.primaryColor,{h:-160}),this.primaryBorderColor=hr(this.primaryColor,this.darkMode),this.secondaryBorderColor=hr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=hr(this.tertiaryColor,this.darkMode),this.primaryTextColor=At(this.primaryColor),this.secondaryTextColor=At(this.secondaryColor),this.tertiaryTextColor=At(this.tertiaryColor),this.lineColor=At(this.background),this.textColor=At(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=ma(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||lt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||lt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||lt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||lt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||lt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||lt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||lt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||lt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||lt(this.primaryColor,{h:330}),this["cScalePeer1"]=this["cScalePeer1"]||Zt(this.secondaryColor,45),this["cScalePeer2"]=this["cScalePeer2"]||Zt(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=Zt(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||Zt(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||lt(this["cScale"+e],{h:180});for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||lt(this.mainBkg,{h:30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||lt(this.mainBkg,{h:30,l:-(7+e*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||At(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||At(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=zt(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=lt(this.primaryColor,{h:64}),this.fillType3=lt(this.secondaryColor,{h:64}),this.fillType4=lt(this.primaryColor,{h:-64}),this.fillType5=lt(this.secondaryColor,{h:-64}),this.fillType6=lt(this.primaryColor,{h:128}),this.fillType7=lt(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||lt(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||lt(this.primaryColor,{l:-10}),this.pie5=this.pie5||lt(this.secondaryColor,{l:-30}),this.pie6=this.pie6||lt(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||lt(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||lt(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||lt(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||lt(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||lt(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||lt(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||lt(this.primaryColor,{h:-30}),this.git4=this.git4||lt(this.primaryColor,{h:-60}),this.git5=this.git5||lt(this.primaryColor,{h:-90}),this.git6=this.git6||lt(this.primaryColor,{h:60}),this.git7=this.git7||lt(this.primaryColor,{h:120}),this.darkMode?(this.git0=zt(this.git0,25),this.git1=zt(this.git1,25),this.git2=zt(this.git2,25),this.git3=zt(this.git3,25),this.git4=zt(this.git4,25),this.git5=zt(this.git5,25),this.git6=zt(this.git6,25),this.git7=zt(this.git7,25)):(this.git0=Zt(this.git0,25),this.git1=Zt(this.git1,25),this.git2=Zt(this.git2,25),this.git3=Zt(this.git3,25),this.git4=Zt(this.git4,25),this.git5=Zt(this.git5,25),this.git6=Zt(this.git6,25),this.git7=Zt(this.git7,25)),this.gitInv0=this.gitInv0||Zt(At(this.git0),25),this.gitInv1=this.gitInv1||At(this.git1),this.gitInv2=this.gitInv2||At(this.git2),this.gitInv3=this.gitInv3||At(this.git3),this.gitInv4=this.gitInv4||At(this.git4),this.gitInv5=this.gitInv5||At(this.git5),this.gitInv6=this.gitInv6||At(this.git6),this.gitInv7=this.gitInv7||At(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||At(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||At(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Rc,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oc}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}};const wL=t=>{const e=new kL;return e.calculate(t),e};let TL=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=zt("#cde498",10),this.primaryBorderColor=hr(this.primaryColor,this.darkMode),this.secondaryBorderColor=hr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=hr(this.tertiaryColor,this.darkMode),this.primaryTextColor=At(this.primaryColor),this.secondaryTextColor=At(this.secondaryColor),this.tertiaryTextColor=At(this.primaryColor),this.lineColor=At(this.background),this.textColor=At(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||lt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||lt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||lt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||lt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||lt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||lt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||lt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||lt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||lt(this.primaryColor,{h:330}),this["cScalePeer1"]=this["cScalePeer1"]||Zt(this.secondaryColor,45),this["cScalePeer2"]=this["cScalePeer2"]||Zt(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=Zt(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||Zt(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||lt(this["cScale"+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||lt(this.mainBkg,{h:30,s:-30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||lt(this.mainBkg,{h:30,s:-30,l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.actorBorder=Zt(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=lt(this.primaryColor,{h:64}),this.fillType3=lt(this.secondaryColor,{h:64}),this.fillType4=lt(this.primaryColor,{h:-64}),this.fillType5=lt(this.secondaryColor,{h:-64}),this.fillType6=lt(this.primaryColor,{h:128}),this.fillType7=lt(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||lt(this.primaryColor,{l:-30}),this.pie5=this.pie5||lt(this.secondaryColor,{l:-30}),this.pie6=this.pie6||lt(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||lt(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||lt(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||lt(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||lt(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||lt(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||lt(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||lt(this.primaryColor,{h:-30}),this.git4=this.git4||lt(this.primaryColor,{h:-60}),this.git5=this.git5||lt(this.primaryColor,{h:-90}),this.git6=this.git6||lt(this.primaryColor,{h:60}),this.git7=this.git7||lt(this.primaryColor,{h:120}),this.darkMode?(this.git0=zt(this.git0,25),this.git1=zt(this.git1,25),this.git2=zt(this.git2,25),this.git3=zt(this.git3,25),this.git4=zt(this.git4,25),this.git5=zt(this.git5,25),this.git6=zt(this.git6,25),this.git7=zt(this.git7,25)):(this.git0=Zt(this.git0,25),this.git1=Zt(this.git1,25),this.git2=Zt(this.git2,25),this.git3=Zt(this.git3,25),this.git4=Zt(this.git4,25),this.git5=Zt(this.git5,25),this.git6=Zt(this.git6,25),this.git7=Zt(this.git7,25)),this.gitInv0=this.gitInv0||At(this.git0),this.gitInv1=this.gitInv1||At(this.git1),this.gitInv2=this.gitInv2||At(this.git2),this.gitInv3=this.gitInv3||At(this.git3),this.gitInv4=this.gitInv4||At(this.git4),this.gitInv5=this.gitInv5||At(this.git5),this.gitInv6=this.gitInv6||At(this.git6),this.gitInv7=this.gitInv7||At(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Rc,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oc}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}};const EL=t=>{const e=new TL;return e.calculate(t),e};class CL{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=zt(this.contrast,55),this.background="#ffffff",this.tertiaryColor=lt(this.primaryColor,{h:-160}),this.primaryBorderColor=hr(this.primaryColor,this.darkMode),this.secondaryBorderColor=hr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=hr(this.tertiaryColor,this.darkMode),this.primaryTextColor=At(this.primaryColor),this.secondaryTextColor=At(this.secondaryColor),this.tertiaryTextColor=At(this.tertiaryColor),this.lineColor=At(this.background),this.textColor=At(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=zt(this.contrast,55),this.border2=this.contrast,this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||At(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||zt(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||Zt(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||lt(this.mainBkg,{l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||lt(this.mainBkg,{l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.actorBorder=zt(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.sectionBkgColor=zt(this.contrast,30),this.sectionBkgColor2=zt(this.contrast,30),this.taskBorderColor=Zt(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=zt(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=Zt(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=lt(this.primaryColor,{h:64}),this.fillType3=lt(this.secondaryColor,{h:64}),this.fillType4=lt(this.primaryColor,{h:-64}),this.fillType5=lt(this.secondaryColor,{h:-64}),this.fillType6=lt(this.primaryColor,{h:128}),this.fillType7=lt(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Zt(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||lt(this.primaryColor,{h:-30}),this.git4=this.pie5||lt(this.primaryColor,{h:-60}),this.git5=this.pie6||lt(this.primaryColor,{h:-90}),this.git6=this.pie7||lt(this.primaryColor,{h:60}),this.git7=this.pie8||lt(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||At(this.git0),this.gitInv1=this.gitInv1||At(this.git1),this.gitInv2=this.gitInv2||At(this.git2),this.gitInv3=this.gitInv3||At(this.git3),this.gitInv4=this.gitInv4||At(this.git4),this.gitInv5=this.gitInv5||At(this.git5),this.gitInv6=this.gitInv6||At(this.git6),this.gitInv7=this.gitInv7||At(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Rc,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oc}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}}const SL=t=>{const e=new CL;return e.calculate(t),e},Hi={base:{getThemeVariables:_L},dark:{getThemeVariables:vL},default:{getThemeVariables:wL},forest:{getThemeVariables:EL},neutral:{getThemeVariables:SL}},on={theme:"default",themeVariables:Hi.default.getThemeVariables(),themeCSS:void 0,maxTextSize:5e4,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],deterministicIds:!1,deterministicIDSeed:void 0,flowchart:{titleTopMargin:25,diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},sequence:{hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",tickInterval:void 0,useMaxWidth:!0,topAxis:!1,useWidth:void 0},journey:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},timeline:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},class:{titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},state:{titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},er:{titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12,useMaxWidth:!0},pie:{useWidth:void 0,useMaxWidth:!0},requirement:{useWidth:void 0,useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},gitGraph:{titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0},c4:{useWidth:void 0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,useMaxWidth:!0,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,personFont:function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},external_personFont:function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},systemFont:function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},external_systemFont:function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},system_dbFont:function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},external_system_dbFont:function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},system_queueFont:function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},external_system_queueFont:function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},containerFont:function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},external_containerFont:function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},container_dbFont:function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},external_container_dbFont:function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},container_queueFont:function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},external_container_queueFont:function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},componentFont:function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},external_componentFont:function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},component_dbFont:function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},external_component_dbFont:function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},component_queueFont:function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},external_component_queueFont:function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},boundaryFont:function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},fontSize:16};on.class&&(on.class.arrowMarkerAbsolute=on.arrowMarkerAbsolute);on.gitGraph&&(on.gitGraph.arrowMarkerAbsolute=on.arrowMarkerAbsolute);const $g=(t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:typeof t[i]=="object"&&t[i]!==null?[...r,e+i,...$g(t[i],"")]:[...r,e+i],[]),AL=$g(on,""),LL=on;/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function jg(t){return typeof t>"u"||t===null}function BL(t){return typeof t=="object"&&t!==null}function DL(t){return Array.isArray(t)?t:jg(t)?[]:[t]}function IL(t,e){var r,i,n,s;if(e)for(s=Object.keys(e),r=0,i=s.length;r<i;r+=1)n=s[r],t[n]=e[n];return t}function ML(t,e){var r="",i;for(i=0;i<e;i+=1)r+=t;return r}function NL(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var RL=jg,OL=BL,FL=DL,PL=ML,VL=NL,YL=IL,cr={isNothing:RL,isObject:OL,toArray:FL,repeat:PL,isNegativeZero:VL,extend:YL};function Xg(t,e){var r="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`
11
11
 
12
- `+t.mark.snippet),i+" "+r):i}function Ua(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=jg(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Ua.prototype=Object.create(Error.prototype);Ua.prototype.constructor=Ua;Ua.prototype.toString=function(e){return this.name+": "+jg(this,e)};var Ni=Ua;function Ih(t,e,r,i,n){var s="",a="",o=Math.floor(n/2)-1;return i-e>o&&(s=" ... ",e=i-o+s.length),r-i>o&&(a=" ...",r=i+o-a.length),{str:s+t.slice(e,r).replace(/\t/g,"→")+a,pos:i-e+s.length}}function Mh(t,e){return cr.repeat(" ",e-t.length)+t}function YL(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],s,a=-1;s=r.exec(t.buffer);)n.push(s.index),i.push(s.index+s[0].length),t.position<=s.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var o="",l,h,u=Math.min(t.line+e.linesAfter,n.length).toString().length,f=e.maxLength-(e.indent+u+3);for(l=1;l<=e.linesBefore&&!(a-l<0);l++)h=Ih(t.buffer,i[a-l],n[a-l],t.position-(i[a]-i[a-l]),f),o=cr.repeat(" ",e.indent)+Mh((t.line-l+1).toString(),u)+" | "+h.str+`
12
+ `+t.mark.snippet),i+" "+r):i}function Ua(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=Xg(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Ua.prototype=Object.create(Error.prototype);Ua.prototype.constructor=Ua;Ua.prototype.toString=function(e){return this.name+": "+Xg(this,e)};var Ni=Ua;function Ih(t,e,r,i,n){var s="",a="",o=Math.floor(n/2)-1;return i-e>o&&(s=" ... ",e=i-o+s.length),r-i>o&&(a=" ...",r=i+o-a.length),{str:s+t.slice(e,r).replace(/\t/g,"→")+a,pos:i-e+s.length}}function Mh(t,e){return cr.repeat(" ",e-t.length)+t}function zL(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],s,a=-1;s=r.exec(t.buffer);)n.push(s.index),i.push(s.index+s[0].length),t.position<=s.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var o="",l,h,u=Math.min(t.line+e.linesAfter,n.length).toString().length,f=e.maxLength-(e.indent+u+3);for(l=1;l<=e.linesBefore&&!(a-l<0);l++)h=Ih(t.buffer,i[a-l],n[a-l],t.position-(i[a]-i[a-l]),f),o=cr.repeat(" ",e.indent)+Mh((t.line-l+1).toString(),u)+" | "+h.str+`
13
13
  `+o;for(h=Ih(t.buffer,i[a],n[a],t.position,f),o+=cr.repeat(" ",e.indent)+Mh((t.line+1).toString(),u)+" | "+h.str+`
14
14
  `,o+=cr.repeat("-",e.indent+u+3+h.pos)+`^
15
15
  `,l=1;l<=e.linesAfter&&!(a+l>=n.length);l++)h=Ih(t.buffer,i[a+l],n[a+l],t.position-(i[a]-i[a+l]),f),o+=cr.repeat(" ",e.indent)+Mh((t.line+l+1).toString(),u)+" | "+h.str+`
16
- `;return o.replace(/\n$/,"")}var zL=YL,UL=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],WL=["scalar","sequence","mapping"];function HL(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(i){e[String(i)]=r})}),e}function qL(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(UL.indexOf(r)===-1)throw new Ni('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=HL(e.styleAliases||null),WL.indexOf(this.kind)===-1)throw new Ni('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var ar=qL;function kd(t,e){var r=[];return t[e].forEach(function(i){var n=r.length;r.forEach(function(s,a){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(n=a)}),r[n]=i}),r}function GL(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function i(n){n.multi?(t.multi[n.kind].push(n),t.multi.fallback.push(n)):t[n.kind][n.tag]=t.fallback[n.tag]=n}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(i);return t}function ku(t){return this.extend(t)}ku.prototype.extend=function(e){var r=[],i=[];if(e instanceof ar)i.push(e);else if(Array.isArray(e))i=i.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(i=i.concat(e.explicit));else throw new Ni("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof ar))throw new Ni("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new Ni("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new Ni("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(s){if(!(s instanceof ar))throw new Ni("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(ku.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=kd(n,"implicit"),n.compiledExplicit=kd(n,"explicit"),n.compiledTypeMap=GL(n.compiledImplicit,n.compiledExplicit),n};var $L=ku,jL=new ar("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),XL=new ar("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),KL=new ar("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),Xg=new $L({explicit:[jL,XL,KL]});function ZL(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function QL(){return null}function JL(t){return t===null}var tB=new ar("tag:yaml.org,2002:null",{kind:"scalar",resolve:ZL,construct:QL,predicate:JL,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function eB(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function rB(t){return t==="true"||t==="True"||t==="TRUE"}function iB(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var nB=new ar("tag:yaml.org,2002:bool",{kind:"scalar",resolve:eB,construct:rB,predicate:iB,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function sB(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function aB(t){return 48<=t&&t<=55}function oB(t){return 48<=t&&t<=57}function lB(t){if(t===null)return!1;var e=t.length,r=0,i=!1,n;if(!e)return!1;if(n=t[r],(n==="-"||n==="+")&&(n=t[++r]),n==="0"){if(r+1===e)return!0;if(n=t[++r],n==="b"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(!sB(t.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(!aB(t.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<e;r++)if(n=t[r],n!=="_"){if(!oB(t.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}function cB(t){var e=t,r=1,i;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),i=e[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),e=e.slice(1),i=e[0]),e==="0")return 0;if(i==="0"){if(e[1]==="b")return r*parseInt(e.slice(2),2);if(e[1]==="x")return r*parseInt(e.slice(2),16);if(e[1]==="o")return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}function hB(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!cr.isNegativeZero(t)}var uB=new ar("tag:yaml.org,2002:int",{kind:"scalar",resolve:lB,construct:cB,predicate:hB,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),fB=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function dB(t){return!(t===null||!fB.test(t)||t[t.length-1]==="_")}function pB(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}var gB=/^[-+]?[0-9]+e/;function yB(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(cr.isNegativeZero(t))return"-0.0";return r=t.toString(10),gB.test(r)?r.replace("e",".e"):r}function mB(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||cr.isNegativeZero(t))}var bB=new ar("tag:yaml.org,2002:float",{kind:"scalar",resolve:dB,construct:pB,predicate:mB,represent:yB,defaultStyle:"lowercase"}),_B=Xg.extend({implicit:[tB,nB,uB,bB]}),xB=_B,Kg=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Zg=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function vB(t){return t===null?!1:Kg.exec(t)!==null||Zg.exec(t)!==null}function kB(t){var e,r,i,n,s,a,o,l=0,h=null,u,f,d;if(e=Kg.exec(t),e===null&&(e=Zg.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(r,i,n));if(s=+e[4],a=+e[5],o=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(u=+e[10],f=+(e[11]||0),h=(u*60+f)*6e4,e[9]==="-"&&(h=-h)),d=new Date(Date.UTC(r,i,n,s,a,o,l)),h&&d.setTime(d.getTime()-h),d}function wB(t){return t.toISOString()}var TB=new ar("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:vB,construct:kB,instanceOf:Date,represent:wB});function EB(t){return t==="<<"||t===null}var CB=new ar("tag:yaml.org,2002:merge",{kind:"scalar",resolve:EB}),Y1=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
17
- \r`;function SB(t){if(t===null)return!1;var e,r,i=0,n=t.length,s=Y1;for(r=0;r<n;r++)if(e=s.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;i+=6}return i%8===0}function AB(t){var e,r,i=t.replace(/[\r\n=]/g,""),n=i.length,s=Y1,a=0,o=[];for(e=0;e<n;e++)e%4===0&&e&&(o.push(a>>16&255),o.push(a>>8&255),o.push(a&255)),a=a<<6|s.indexOf(i.charAt(e));return r=n%4*6,r===0?(o.push(a>>16&255),o.push(a>>8&255),o.push(a&255)):r===18?(o.push(a>>10&255),o.push(a>>2&255)):r===12&&o.push(a>>4&255),new Uint8Array(o)}function LB(t){var e="",r=0,i,n,s=t.length,a=Y1;for(i=0;i<s;i++)i%3===0&&i&&(e+=a[r>>18&63],e+=a[r>>12&63],e+=a[r>>6&63],e+=a[r&63]),r=(r<<8)+t[i];return n=s%3,n===0?(e+=a[r>>18&63],e+=a[r>>12&63],e+=a[r>>6&63],e+=a[r&63]):n===2?(e+=a[r>>10&63],e+=a[r>>4&63],e+=a[r<<2&63],e+=a[64]):n===1&&(e+=a[r>>2&63],e+=a[r<<4&63],e+=a[64],e+=a[64]),e}function BB(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var DB=new ar("tag:yaml.org,2002:binary",{kind:"scalar",resolve:SB,construct:AB,predicate:BB,represent:LB}),IB=Object.prototype.hasOwnProperty,MB=Object.prototype.toString;function NB(t){if(t===null)return!0;var e=[],r,i,n,s,a,o=t;for(r=0,i=o.length;r<i;r+=1){if(n=o[r],a=!1,MB.call(n)!=="[object Object]")return!1;for(s in n)if(IB.call(n,s))if(!a)a=!0;else return!1;if(!a)return!1;if(e.indexOf(s)===-1)e.push(s);else return!1}return!0}function RB(t){return t!==null?t:[]}var OB=new ar("tag:yaml.org,2002:omap",{kind:"sequence",resolve:NB,construct:RB}),FB=Object.prototype.toString;function PB(t){if(t===null)return!0;var e,r,i,n,s,a=t;for(s=new Array(a.length),e=0,r=a.length;e<r;e+=1){if(i=a[e],FB.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;s[e]=[n[0],i[n[0]]]}return!0}function VB(t){if(t===null)return[];var e,r,i,n,s,a=t;for(s=new Array(a.length),e=0,r=a.length;e<r;e+=1)i=a[e],n=Object.keys(i),s[e]=[n[0],i[n[0]]];return s}var YB=new ar("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:PB,construct:VB}),zB=Object.prototype.hasOwnProperty;function UB(t){if(t===null)return!0;var e,r=t;for(e in r)if(zB.call(r,e)&&r[e]!==null)return!1;return!0}function WB(t){return t!==null?t:{}}var HB=new ar("tag:yaml.org,2002:set",{kind:"mapping",resolve:UB,construct:WB}),qB=xB.extend({implicit:[TB,CB],explicit:[DB,OB,YB,HB]}),fn=Object.prototype.hasOwnProperty,Bl=1,Qg=2,Jg=3,Dl=4,Nh=1,GB=2,wd=3,$B=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,jB=/[\x85\u2028\u2029]/,XB=/[,\[\]\{\}]/,ty=/^(?:!|!!|![a-z\-]+!)$/i,ey=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Td(t){return Object.prototype.toString.call(t)}function gi(t){return t===10||t===13}function Bn(t){return t===9||t===32}function vr(t){return t===9||t===32||t===10||t===13}function hs(t){return t===44||t===91||t===93||t===123||t===125}function KB(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function ZB(t){return t===120?2:t===117?4:t===85?8:0}function QB(t){return 48<=t&&t<=57?t-48:-1}function Ed(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
18
- `:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"…":t===95?" ":t===76?"\u2028":t===80?"\u2029":""}function JB(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var ry=new Array(256),iy=new Array(256);for(var is=0;is<256;is++)ry[is]=Ed(is)?1:0,iy[is]=Ed(is);function tD(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||qB,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function ny(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=zL(r),new Ni(e,r)}function Vt(t,e){throw ny(t,e)}function Il(t,e){t.onWarning&&t.onWarning.call(null,ny(t,e))}var Cd={YAML:function(e,r,i){var n,s,a;e.version!==null&&Vt(e,"duplication of %YAML directive"),i.length!==1&&Vt(e,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&Vt(e,"ill-formed argument of the YAML directive"),s=parseInt(n[1],10),a=parseInt(n[2],10),s!==1&&Vt(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&Il(e,"unsupported YAML version of the document")},TAG:function(e,r,i){var n,s;i.length!==2&&Vt(e,"TAG directive accepts exactly two arguments"),n=i[0],s=i[1],ty.test(n)||Vt(e,"ill-formed tag handle (first argument) of the TAG directive"),fn.call(e.tagMap,n)&&Vt(e,'there is a previously declared suffix for "'+n+'" tag handle'),ey.test(s)||Vt(e,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{Vt(e,"tag prefix is malformed: "+s)}e.tagMap[n]=s}};function ln(t,e,r,i){var n,s,a,o;if(e<r){if(o=t.input.slice(e,r),i)for(n=0,s=o.length;n<s;n+=1)a=o.charCodeAt(n),a===9||32<=a&&a<=1114111||Vt(t,"expected valid JSON character");else $B.test(o)&&Vt(t,"the stream contains non-printable characters");t.result+=o}}function Sd(t,e,r,i){var n,s,a,o;for(cr.isObject(r)||Vt(t,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),a=0,o=n.length;a<o;a+=1)s=n[a],fn.call(e,s)||(e[s]=r[s],i[s]=!0)}function us(t,e,r,i,n,s,a,o,l){var h,u;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),h=0,u=n.length;h<u;h+=1)Array.isArray(n[h])&&Vt(t,"nested arrays are not supported inside keys"),typeof n=="object"&&Td(n[h])==="[object Object]"&&(n[h]="[object Object]");if(typeof n=="object"&&Td(n)==="[object Object]"&&(n="[object Object]"),n=String(n),e===null&&(e={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(h=0,u=s.length;h<u;h+=1)Sd(t,e,s[h],r);else Sd(t,e,s,r);else!t.json&&!fn.call(r,n)&&fn.call(e,n)&&(t.line=a||t.line,t.lineStart=o||t.lineStart,t.position=l||t.position,Vt(t,"duplicated mapping key")),n==="__proto__"?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:s}):e[n]=s,delete r[n];return e}function z1(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):Vt(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function Re(t,e,r){for(var i=0,n=t.input.charCodeAt(t.position);n!==0;){for(;Bn(n);)n===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),n=t.input.charCodeAt(++t.position);if(e&&n===35)do n=t.input.charCodeAt(++t.position);while(n!==10&&n!==13&&n!==0);if(gi(n))for(z1(t),n=t.input.charCodeAt(t.position),i++,t.lineIndent=0;n===32;)t.lineIndent++,n=t.input.charCodeAt(++t.position);else break}return r!==-1&&i!==0&&t.lineIndent<r&&Il(t,"deficient indentation"),i}function Fc(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||vr(r)))}function U1(t,e){e===1?t.result+=" ":e>1&&(t.result+=cr.repeat(`
19
- `,e-1))}function eD(t,e,r){var i,n,s,a,o,l,h,u,f=t.kind,d=t.result,p;if(p=t.input.charCodeAt(t.position),vr(p)||hs(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(n=t.input.charCodeAt(t.position+1),vr(n)||r&&hs(n)))return!1;for(t.kind="scalar",t.result="",s=a=t.position,o=!1;p!==0;){if(p===58){if(n=t.input.charCodeAt(t.position+1),vr(n)||r&&hs(n))break}else if(p===35){if(i=t.input.charCodeAt(t.position-1),vr(i))break}else{if(t.position===t.lineStart&&Fc(t)||r&&hs(p))break;if(gi(p))if(l=t.line,h=t.lineStart,u=t.lineIndent,Re(t,!1,-1),t.lineIndent>=e){o=!0,p=t.input.charCodeAt(t.position);continue}else{t.position=a,t.line=l,t.lineStart=h,t.lineIndent=u;break}}o&&(ln(t,s,a,!1),U1(t,t.line-l),s=a=t.position,o=!1),Bn(p)||(a=t.position+1),p=t.input.charCodeAt(++t.position)}return ln(t,s,a,!1),t.result?!0:(t.kind=f,t.result=d,!1)}function rD(t,e){var r,i,n;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,i=n=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(ln(t,i,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)i=t.position,t.position++,n=t.position;else return!0;else gi(r)?(ln(t,i,n,!0),U1(t,Re(t,!1,e)),i=n=t.position):t.position===t.lineStart&&Fc(t)?Vt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,n=t.position);Vt(t,"unexpected end of the stream within a single quoted scalar")}function iD(t,e){var r,i,n,s,a,o;if(o=t.input.charCodeAt(t.position),o!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;(o=t.input.charCodeAt(t.position))!==0;){if(o===34)return ln(t,r,t.position,!0),t.position++,!0;if(o===92){if(ln(t,r,t.position,!0),o=t.input.charCodeAt(++t.position),gi(o))Re(t,!1,e);else if(o<256&&ry[o])t.result+=iy[o],t.position++;else if((a=ZB(o))>0){for(n=a,s=0;n>0;n--)o=t.input.charCodeAt(++t.position),(a=KB(o))>=0?s=(s<<4)+a:Vt(t,"expected hexadecimal character");t.result+=JB(s),t.position++}else Vt(t,"unknown escape sequence");r=i=t.position}else gi(o)?(ln(t,r,i,!0),U1(t,Re(t,!1,e)),r=i=t.position):t.position===t.lineStart&&Fc(t)?Vt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}Vt(t,"unexpected end of the stream within a double quoted scalar")}function nD(t,e){var r=!0,i,n,s,a=t.tag,o,l=t.anchor,h,u,f,d,p,m=Object.create(null),b,x,k,v;if(v=t.input.charCodeAt(t.position),v===91)u=93,p=!1,o=[];else if(v===123)u=125,p=!0,o={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),v=t.input.charCodeAt(++t.position);v!==0;){if(Re(t,!0,e),v=t.input.charCodeAt(t.position),v===u)return t.position++,t.tag=a,t.anchor=l,t.kind=p?"mapping":"sequence",t.result=o,!0;r?v===44&&Vt(t,"expected the node content, but found ','"):Vt(t,"missed comma between flow collection entries"),x=b=k=null,f=d=!1,v===63&&(h=t.input.charCodeAt(t.position+1),vr(h)&&(f=d=!0,t.position++,Re(t,!0,e))),i=t.line,n=t.lineStart,s=t.position,Ms(t,e,Bl,!1,!0),x=t.tag,b=t.result,Re(t,!0,e),v=t.input.charCodeAt(t.position),(d||t.line===i)&&v===58&&(f=!0,v=t.input.charCodeAt(++t.position),Re(t,!0,e),Ms(t,e,Bl,!1,!0),k=t.result),p?us(t,o,m,x,b,k,i,n,s):f?o.push(us(t,null,m,x,b,k,i,n,s)):o.push(b),Re(t,!0,e),v=t.input.charCodeAt(t.position),v===44?(r=!0,v=t.input.charCodeAt(++t.position)):r=!1}Vt(t,"unexpected end of the stream within a flow collection")}function sD(t,e){var r,i,n=Nh,s=!1,a=!1,o=e,l=0,h=!1,u,f;if(f=t.input.charCodeAt(t.position),f===124)i=!1;else if(f===62)i=!0;else return!1;for(t.kind="scalar",t.result="";f!==0;)if(f=t.input.charCodeAt(++t.position),f===43||f===45)Nh===n?n=f===43?wd:GB:Vt(t,"repeat of a chomping mode identifier");else if((u=QB(f))>=0)u===0?Vt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?Vt(t,"repeat of an indentation width identifier"):(o=e+u-1,a=!0);else break;if(Bn(f)){do f=t.input.charCodeAt(++t.position);while(Bn(f));if(f===35)do f=t.input.charCodeAt(++t.position);while(!gi(f)&&f!==0)}for(;f!==0;){for(z1(t),t.lineIndent=0,f=t.input.charCodeAt(t.position);(!a||t.lineIndent<o)&&f===32;)t.lineIndent++,f=t.input.charCodeAt(++t.position);if(!a&&t.lineIndent>o&&(o=t.lineIndent),gi(f)){l++;continue}if(t.lineIndent<o){n===wd?t.result+=cr.repeat(`
16
+ `;return o.replace(/\n$/,"")}var UL=zL,WL=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],HL=["scalar","sequence","mapping"];function qL(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(i){e[String(i)]=r})}),e}function GL(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(WL.indexOf(r)===-1)throw new Ni('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=qL(e.styleAliases||null),HL.indexOf(this.kind)===-1)throw new Ni('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var ar=GL;function wd(t,e){var r=[];return t[e].forEach(function(i){var n=r.length;r.forEach(function(s,a){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(n=a)}),r[n]=i}),r}function $L(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function i(n){n.multi?(t.multi[n.kind].push(n),t.multi.fallback.push(n)):t[n.kind][n.tag]=t.fallback[n.tag]=n}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(i);return t}function ku(t){return this.extend(t)}ku.prototype.extend=function(e){var r=[],i=[];if(e instanceof ar)i.push(e);else if(Array.isArray(e))i=i.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(i=i.concat(e.explicit));else throw new Ni("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof ar))throw new Ni("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new Ni("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new Ni("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(s){if(!(s instanceof ar))throw new Ni("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(ku.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=wd(n,"implicit"),n.compiledExplicit=wd(n,"explicit"),n.compiledTypeMap=$L(n.compiledImplicit,n.compiledExplicit),n};var jL=ku,XL=new ar("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),KL=new ar("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),ZL=new ar("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),Kg=new jL({explicit:[XL,KL,ZL]});function QL(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function JL(){return null}function tB(t){return t===null}var eB=new ar("tag:yaml.org,2002:null",{kind:"scalar",resolve:QL,construct:JL,predicate:tB,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function rB(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function iB(t){return t==="true"||t==="True"||t==="TRUE"}function nB(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var sB=new ar("tag:yaml.org,2002:bool",{kind:"scalar",resolve:rB,construct:iB,predicate:nB,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function aB(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function oB(t){return 48<=t&&t<=55}function lB(t){return 48<=t&&t<=57}function cB(t){if(t===null)return!1;var e=t.length,r=0,i=!1,n;if(!e)return!1;if(n=t[r],(n==="-"||n==="+")&&(n=t[++r]),n==="0"){if(r+1===e)return!0;if(n=t[++r],n==="b"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(!aB(t.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(!oB(t.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<e;r++)if(n=t[r],n!=="_"){if(!lB(t.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}function hB(t){var e=t,r=1,i;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),i=e[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),e=e.slice(1),i=e[0]),e==="0")return 0;if(i==="0"){if(e[1]==="b")return r*parseInt(e.slice(2),2);if(e[1]==="x")return r*parseInt(e.slice(2),16);if(e[1]==="o")return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}function uB(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!cr.isNegativeZero(t)}var fB=new ar("tag:yaml.org,2002:int",{kind:"scalar",resolve:cB,construct:hB,predicate:uB,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),dB=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function pB(t){return!(t===null||!dB.test(t)||t[t.length-1]==="_")}function gB(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}var yB=/^[-+]?[0-9]+e/;function mB(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(cr.isNegativeZero(t))return"-0.0";return r=t.toString(10),yB.test(r)?r.replace("e",".e"):r}function bB(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||cr.isNegativeZero(t))}var _B=new ar("tag:yaml.org,2002:float",{kind:"scalar",resolve:pB,construct:gB,predicate:bB,represent:mB,defaultStyle:"lowercase"}),xB=Kg.extend({implicit:[eB,sB,fB,_B]}),vB=xB,Zg=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Qg=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function kB(t){return t===null?!1:Zg.exec(t)!==null||Qg.exec(t)!==null}function wB(t){var e,r,i,n,s,a,o,l=0,h=null,u,f,d;if(e=Zg.exec(t),e===null&&(e=Qg.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(r,i,n));if(s=+e[4],a=+e[5],o=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(u=+e[10],f=+(e[11]||0),h=(u*60+f)*6e4,e[9]==="-"&&(h=-h)),d=new Date(Date.UTC(r,i,n,s,a,o,l)),h&&d.setTime(d.getTime()-h),d}function TB(t){return t.toISOString()}var EB=new ar("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:kB,construct:wB,instanceOf:Date,represent:TB});function CB(t){return t==="<<"||t===null}var SB=new ar("tag:yaml.org,2002:merge",{kind:"scalar",resolve:CB}),z1=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
17
+ \r`;function AB(t){if(t===null)return!1;var e,r,i=0,n=t.length,s=z1;for(r=0;r<n;r++)if(e=s.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;i+=6}return i%8===0}function LB(t){var e,r,i=t.replace(/[\r\n=]/g,""),n=i.length,s=z1,a=0,o=[];for(e=0;e<n;e++)e%4===0&&e&&(o.push(a>>16&255),o.push(a>>8&255),o.push(a&255)),a=a<<6|s.indexOf(i.charAt(e));return r=n%4*6,r===0?(o.push(a>>16&255),o.push(a>>8&255),o.push(a&255)):r===18?(o.push(a>>10&255),o.push(a>>2&255)):r===12&&o.push(a>>4&255),new Uint8Array(o)}function BB(t){var e="",r=0,i,n,s=t.length,a=z1;for(i=0;i<s;i++)i%3===0&&i&&(e+=a[r>>18&63],e+=a[r>>12&63],e+=a[r>>6&63],e+=a[r&63]),r=(r<<8)+t[i];return n=s%3,n===0?(e+=a[r>>18&63],e+=a[r>>12&63],e+=a[r>>6&63],e+=a[r&63]):n===2?(e+=a[r>>10&63],e+=a[r>>4&63],e+=a[r<<2&63],e+=a[64]):n===1&&(e+=a[r>>2&63],e+=a[r<<4&63],e+=a[64],e+=a[64]),e}function DB(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var IB=new ar("tag:yaml.org,2002:binary",{kind:"scalar",resolve:AB,construct:LB,predicate:DB,represent:BB}),MB=Object.prototype.hasOwnProperty,NB=Object.prototype.toString;function RB(t){if(t===null)return!0;var e=[],r,i,n,s,a,o=t;for(r=0,i=o.length;r<i;r+=1){if(n=o[r],a=!1,NB.call(n)!=="[object Object]")return!1;for(s in n)if(MB.call(n,s))if(!a)a=!0;else return!1;if(!a)return!1;if(e.indexOf(s)===-1)e.push(s);else return!1}return!0}function OB(t){return t!==null?t:[]}var FB=new ar("tag:yaml.org,2002:omap",{kind:"sequence",resolve:RB,construct:OB}),PB=Object.prototype.toString;function VB(t){if(t===null)return!0;var e,r,i,n,s,a=t;for(s=new Array(a.length),e=0,r=a.length;e<r;e+=1){if(i=a[e],PB.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;s[e]=[n[0],i[n[0]]]}return!0}function YB(t){if(t===null)return[];var e,r,i,n,s,a=t;for(s=new Array(a.length),e=0,r=a.length;e<r;e+=1)i=a[e],n=Object.keys(i),s[e]=[n[0],i[n[0]]];return s}var zB=new ar("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:VB,construct:YB}),UB=Object.prototype.hasOwnProperty;function WB(t){if(t===null)return!0;var e,r=t;for(e in r)if(UB.call(r,e)&&r[e]!==null)return!1;return!0}function HB(t){return t!==null?t:{}}var qB=new ar("tag:yaml.org,2002:set",{kind:"mapping",resolve:WB,construct:HB}),GB=vB.extend({implicit:[EB,SB],explicit:[IB,FB,zB,qB]}),fn=Object.prototype.hasOwnProperty,Bl=1,Jg=2,ty=3,Dl=4,Nh=1,$B=2,Td=3,jB=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,XB=/[\x85\u2028\u2029]/,KB=/[,\[\]\{\}]/,ey=/^(?:!|!!|![a-z\-]+!)$/i,ry=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ed(t){return Object.prototype.toString.call(t)}function gi(t){return t===10||t===13}function Bn(t){return t===9||t===32}function vr(t){return t===9||t===32||t===10||t===13}function hs(t){return t===44||t===91||t===93||t===123||t===125}function ZB(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function QB(t){return t===120?2:t===117?4:t===85?8:0}function JB(t){return 48<=t&&t<=57?t-48:-1}function Cd(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
18
+ `:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"…":t===95?" ":t===76?"\u2028":t===80?"\u2029":""}function tD(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var iy=new Array(256),ny=new Array(256);for(var is=0;is<256;is++)iy[is]=Cd(is)?1:0,ny[is]=Cd(is);function eD(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||GB,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function sy(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=UL(r),new Ni(e,r)}function Vt(t,e){throw sy(t,e)}function Il(t,e){t.onWarning&&t.onWarning.call(null,sy(t,e))}var Sd={YAML:function(e,r,i){var n,s,a;e.version!==null&&Vt(e,"duplication of %YAML directive"),i.length!==1&&Vt(e,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&Vt(e,"ill-formed argument of the YAML directive"),s=parseInt(n[1],10),a=parseInt(n[2],10),s!==1&&Vt(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&Il(e,"unsupported YAML version of the document")},TAG:function(e,r,i){var n,s;i.length!==2&&Vt(e,"TAG directive accepts exactly two arguments"),n=i[0],s=i[1],ey.test(n)||Vt(e,"ill-formed tag handle (first argument) of the TAG directive"),fn.call(e.tagMap,n)&&Vt(e,'there is a previously declared suffix for "'+n+'" tag handle'),ry.test(s)||Vt(e,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{Vt(e,"tag prefix is malformed: "+s)}e.tagMap[n]=s}};function ln(t,e,r,i){var n,s,a,o;if(e<r){if(o=t.input.slice(e,r),i)for(n=0,s=o.length;n<s;n+=1)a=o.charCodeAt(n),a===9||32<=a&&a<=1114111||Vt(t,"expected valid JSON character");else jB.test(o)&&Vt(t,"the stream contains non-printable characters");t.result+=o}}function Ad(t,e,r,i){var n,s,a,o;for(cr.isObject(r)||Vt(t,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),a=0,o=n.length;a<o;a+=1)s=n[a],fn.call(e,s)||(e[s]=r[s],i[s]=!0)}function us(t,e,r,i,n,s,a,o,l){var h,u;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),h=0,u=n.length;h<u;h+=1)Array.isArray(n[h])&&Vt(t,"nested arrays are not supported inside keys"),typeof n=="object"&&Ed(n[h])==="[object Object]"&&(n[h]="[object Object]");if(typeof n=="object"&&Ed(n)==="[object Object]"&&(n="[object Object]"),n=String(n),e===null&&(e={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(h=0,u=s.length;h<u;h+=1)Ad(t,e,s[h],r);else Ad(t,e,s,r);else!t.json&&!fn.call(r,n)&&fn.call(e,n)&&(t.line=a||t.line,t.lineStart=o||t.lineStart,t.position=l||t.position,Vt(t,"duplicated mapping key")),n==="__proto__"?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:s}):e[n]=s,delete r[n];return e}function U1(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):Vt(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function Re(t,e,r){for(var i=0,n=t.input.charCodeAt(t.position);n!==0;){for(;Bn(n);)n===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),n=t.input.charCodeAt(++t.position);if(e&&n===35)do n=t.input.charCodeAt(++t.position);while(n!==10&&n!==13&&n!==0);if(gi(n))for(U1(t),n=t.input.charCodeAt(t.position),i++,t.lineIndent=0;n===32;)t.lineIndent++,n=t.input.charCodeAt(++t.position);else break}return r!==-1&&i!==0&&t.lineIndent<r&&Il(t,"deficient indentation"),i}function Fc(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||vr(r)))}function W1(t,e){e===1?t.result+=" ":e>1&&(t.result+=cr.repeat(`
19
+ `,e-1))}function rD(t,e,r){var i,n,s,a,o,l,h,u,f=t.kind,d=t.result,p;if(p=t.input.charCodeAt(t.position),vr(p)||hs(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(n=t.input.charCodeAt(t.position+1),vr(n)||r&&hs(n)))return!1;for(t.kind="scalar",t.result="",s=a=t.position,o=!1;p!==0;){if(p===58){if(n=t.input.charCodeAt(t.position+1),vr(n)||r&&hs(n))break}else if(p===35){if(i=t.input.charCodeAt(t.position-1),vr(i))break}else{if(t.position===t.lineStart&&Fc(t)||r&&hs(p))break;if(gi(p))if(l=t.line,h=t.lineStart,u=t.lineIndent,Re(t,!1,-1),t.lineIndent>=e){o=!0,p=t.input.charCodeAt(t.position);continue}else{t.position=a,t.line=l,t.lineStart=h,t.lineIndent=u;break}}o&&(ln(t,s,a,!1),W1(t,t.line-l),s=a=t.position,o=!1),Bn(p)||(a=t.position+1),p=t.input.charCodeAt(++t.position)}return ln(t,s,a,!1),t.result?!0:(t.kind=f,t.result=d,!1)}function iD(t,e){var r,i,n;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,i=n=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(ln(t,i,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)i=t.position,t.position++,n=t.position;else return!0;else gi(r)?(ln(t,i,n,!0),W1(t,Re(t,!1,e)),i=n=t.position):t.position===t.lineStart&&Fc(t)?Vt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,n=t.position);Vt(t,"unexpected end of the stream within a single quoted scalar")}function nD(t,e){var r,i,n,s,a,o;if(o=t.input.charCodeAt(t.position),o!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;(o=t.input.charCodeAt(t.position))!==0;){if(o===34)return ln(t,r,t.position,!0),t.position++,!0;if(o===92){if(ln(t,r,t.position,!0),o=t.input.charCodeAt(++t.position),gi(o))Re(t,!1,e);else if(o<256&&iy[o])t.result+=ny[o],t.position++;else if((a=QB(o))>0){for(n=a,s=0;n>0;n--)o=t.input.charCodeAt(++t.position),(a=ZB(o))>=0?s=(s<<4)+a:Vt(t,"expected hexadecimal character");t.result+=tD(s),t.position++}else Vt(t,"unknown escape sequence");r=i=t.position}else gi(o)?(ln(t,r,i,!0),W1(t,Re(t,!1,e)),r=i=t.position):t.position===t.lineStart&&Fc(t)?Vt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}Vt(t,"unexpected end of the stream within a double quoted scalar")}function sD(t,e){var r=!0,i,n,s,a=t.tag,o,l=t.anchor,h,u,f,d,p,m=Object.create(null),b,x,k,v;if(v=t.input.charCodeAt(t.position),v===91)u=93,p=!1,o=[];else if(v===123)u=125,p=!0,o={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),v=t.input.charCodeAt(++t.position);v!==0;){if(Re(t,!0,e),v=t.input.charCodeAt(t.position),v===u)return t.position++,t.tag=a,t.anchor=l,t.kind=p?"mapping":"sequence",t.result=o,!0;r?v===44&&Vt(t,"expected the node content, but found ','"):Vt(t,"missed comma between flow collection entries"),x=b=k=null,f=d=!1,v===63&&(h=t.input.charCodeAt(t.position+1),vr(h)&&(f=d=!0,t.position++,Re(t,!0,e))),i=t.line,n=t.lineStart,s=t.position,Ms(t,e,Bl,!1,!0),x=t.tag,b=t.result,Re(t,!0,e),v=t.input.charCodeAt(t.position),(d||t.line===i)&&v===58&&(f=!0,v=t.input.charCodeAt(++t.position),Re(t,!0,e),Ms(t,e,Bl,!1,!0),k=t.result),p?us(t,o,m,x,b,k,i,n,s):f?o.push(us(t,null,m,x,b,k,i,n,s)):o.push(b),Re(t,!0,e),v=t.input.charCodeAt(t.position),v===44?(r=!0,v=t.input.charCodeAt(++t.position)):r=!1}Vt(t,"unexpected end of the stream within a flow collection")}function aD(t,e){var r,i,n=Nh,s=!1,a=!1,o=e,l=0,h=!1,u,f;if(f=t.input.charCodeAt(t.position),f===124)i=!1;else if(f===62)i=!0;else return!1;for(t.kind="scalar",t.result="";f!==0;)if(f=t.input.charCodeAt(++t.position),f===43||f===45)Nh===n?n=f===43?Td:$B:Vt(t,"repeat of a chomping mode identifier");else if((u=JB(f))>=0)u===0?Vt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?Vt(t,"repeat of an indentation width identifier"):(o=e+u-1,a=!0);else break;if(Bn(f)){do f=t.input.charCodeAt(++t.position);while(Bn(f));if(f===35)do f=t.input.charCodeAt(++t.position);while(!gi(f)&&f!==0)}for(;f!==0;){for(U1(t),t.lineIndent=0,f=t.input.charCodeAt(t.position);(!a||t.lineIndent<o)&&f===32;)t.lineIndent++,f=t.input.charCodeAt(++t.position);if(!a&&t.lineIndent>o&&(o=t.lineIndent),gi(f)){l++;continue}if(t.lineIndent<o){n===Td?t.result+=cr.repeat(`
20
20
  `,s?1+l:l):n===Nh&&s&&(t.result+=`
21
21
  `);break}for(i?Bn(f)?(h=!0,t.result+=cr.repeat(`
22
22
  `,s?1+l:l)):h?(h=!1,t.result+=cr.repeat(`
23
23
  `,l+1)):l===0?s&&(t.result+=" "):t.result+=cr.repeat(`
24
24
  `,l):t.result+=cr.repeat(`
25
- `,s?1+l:l),s=!0,a=!0,l=0,r=t.position;!gi(f)&&f!==0;)f=t.input.charCodeAt(++t.position);ln(t,r,t.position,!1)}return!0}function Ad(t,e){var r,i=t.tag,n=t.anchor,s=[],a,o=!1,l;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),l=t.input.charCodeAt(t.position);l!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Vt(t,"tab characters must not be used in indentation")),!(l!==45||(a=t.input.charCodeAt(t.position+1),!vr(a))));){if(o=!0,t.position++,Re(t,!0,-1)&&t.lineIndent<=e){s.push(null),l=t.input.charCodeAt(t.position);continue}if(r=t.line,Ms(t,e,Jg,!1,!0),s.push(t.result),Re(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&l!==0)Vt(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return o?(t.tag=i,t.anchor=n,t.kind="sequence",t.result=s,!0):!1}function aD(t,e,r){var i,n,s,a,o,l,h=t.tag,u=t.anchor,f={},d=Object.create(null),p=null,m=null,b=null,x=!1,k=!1,v;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=f),v=t.input.charCodeAt(t.position);v!==0;){if(!x&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Vt(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),s=t.line,(v===63||v===58)&&vr(i))v===63?(x&&(us(t,f,d,p,m,null,a,o,l),p=m=b=null),k=!0,x=!0,n=!0):x?(x=!1,n=!0):Vt(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,v=i;else{if(a=t.line,o=t.lineStart,l=t.position,!Ms(t,r,Qg,!1,!0))break;if(t.line===s){for(v=t.input.charCodeAt(t.position);Bn(v);)v=t.input.charCodeAt(++t.position);if(v===58)v=t.input.charCodeAt(++t.position),vr(v)||Vt(t,"a whitespace character is expected after the key-value separator within a block mapping"),x&&(us(t,f,d,p,m,null,a,o,l),p=m=b=null),k=!0,x=!1,n=!1,p=t.tag,m=t.result;else if(k)Vt(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=h,t.anchor=u,!0}else if(k)Vt(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=h,t.anchor=u,!0}if((t.line===s||t.lineIndent>e)&&(x&&(a=t.line,o=t.lineStart,l=t.position),Ms(t,e,Dl,!0,n)&&(x?m=t.result:b=t.result),x||(us(t,f,d,p,m,b,a,o,l),p=m=b=null),Re(t,!0,-1),v=t.input.charCodeAt(t.position)),(t.line===s||t.lineIndent>e)&&v!==0)Vt(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return x&&us(t,f,d,p,m,null,a,o,l),k&&(t.tag=h,t.anchor=u,t.kind="mapping",t.result=f),k}function oD(t){var e,r=!1,i=!1,n,s,a;if(a=t.input.charCodeAt(t.position),a!==33)return!1;if(t.tag!==null&&Vt(t,"duplication of a tag property"),a=t.input.charCodeAt(++t.position),a===60?(r=!0,a=t.input.charCodeAt(++t.position)):a===33?(i=!0,n="!!",a=t.input.charCodeAt(++t.position)):n="!",e=t.position,r){do a=t.input.charCodeAt(++t.position);while(a!==0&&a!==62);t.position<t.length?(s=t.input.slice(e,t.position),a=t.input.charCodeAt(++t.position)):Vt(t,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!vr(a);)a===33&&(i?Vt(t,"tag suffix cannot contain exclamation marks"):(n=t.input.slice(e-1,t.position+1),ty.test(n)||Vt(t,"named tag handle cannot contain such characters"),i=!0,e=t.position+1)),a=t.input.charCodeAt(++t.position);s=t.input.slice(e,t.position),XB.test(s)&&Vt(t,"tag suffix cannot contain flow indicator characters")}s&&!ey.test(s)&&Vt(t,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{Vt(t,"tag name is malformed: "+s)}return r?t.tag=s:fn.call(t.tagMap,n)?t.tag=t.tagMap[n]+s:n==="!"?t.tag="!"+s:n==="!!"?t.tag="tag:yaml.org,2002:"+s:Vt(t,'undeclared tag handle "'+n+'"'),!0}function lD(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&Vt(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!vr(r)&&!hs(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Vt(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function cD(t){var e,r,i;if(i=t.input.charCodeAt(t.position),i!==42)return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;i!==0&&!vr(i)&&!hs(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&Vt(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),fn.call(t.anchorMap,r)||Vt(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],Re(t,!0,-1),!0}function Ms(t,e,r,i,n){var s,a,o,l=1,h=!1,u=!1,f,d,p,m,b,x;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,s=a=o=Dl===r||Jg===r,i&&Re(t,!0,-1)&&(h=!0,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)),l===1)for(;oD(t)||lD(t);)Re(t,!0,-1)?(h=!0,o=s,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)):o=!1;if(o&&(o=h||n),(l===1||Dl===r)&&(Bl===r||Qg===r?b=e:b=e+1,x=t.position-t.lineStart,l===1?o&&(Ad(t,x)||aD(t,x,b))||nD(t,b)?u=!0:(a&&sD(t,b)||rD(t,b)||iD(t,b)?u=!0:cD(t)?(u=!0,(t.tag!==null||t.anchor!==null)&&Vt(t,"alias node should not have any properties")):eD(t,b,Bl===r)&&(u=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):l===0&&(u=o&&Ad(t,x))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&Vt(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),f=0,d=t.implicitTypes.length;f<d;f+=1)if(m=t.implicitTypes[f],m.resolve(t.result)){t.result=m.construct(t.result),t.tag=m.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(fn.call(t.typeMap[t.kind||"fallback"],t.tag))m=t.typeMap[t.kind||"fallback"][t.tag];else for(m=null,p=t.typeMap.multi[t.kind||"fallback"],f=0,d=p.length;f<d;f+=1)if(t.tag.slice(0,p[f].tag.length)===p[f].tag){m=p[f];break}m||Vt(t,"unknown tag !<"+t.tag+">"),t.result!==null&&m.kind!==t.kind&&Vt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+m.kind+'", not "'+t.kind+'"'),m.resolve(t.result,t.tag)?(t.result=m.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Vt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||u}function hD(t){var e=t.position,r,i,n,s=!1,a;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(a=t.input.charCodeAt(t.position))!==0&&(Re(t,!0,-1),a=t.input.charCodeAt(t.position),!(t.lineIndent>0||a!==37));){for(s=!0,a=t.input.charCodeAt(++t.position),r=t.position;a!==0&&!vr(a);)a=t.input.charCodeAt(++t.position);for(i=t.input.slice(r,t.position),n=[],i.length<1&&Vt(t,"directive name must not be less than one character in length");a!==0;){for(;Bn(a);)a=t.input.charCodeAt(++t.position);if(a===35){do a=t.input.charCodeAt(++t.position);while(a!==0&&!gi(a));break}if(gi(a))break;for(r=t.position;a!==0&&!vr(a);)a=t.input.charCodeAt(++t.position);n.push(t.input.slice(r,t.position))}a!==0&&z1(t),fn.call(Cd,i)?Cd[i](t,i,n):Il(t,'unknown document directive "'+i+'"')}if(Re(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,Re(t,!0,-1)):s&&Vt(t,"directives end mark is expected"),Ms(t,t.lineIndent-1,Dl,!1,!0),Re(t,!0,-1),t.checkLineBreaks&&jB.test(t.input.slice(e,t.position))&&Il(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Fc(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,Re(t,!0,-1));return}if(t.position<t.length-1)Vt(t,"end of the stream or a document separator is expected");else return}function sy(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
26
- `),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new tD(t,e),i=t.indexOf("\0");for(i!==-1&&(r.position=i,Vt(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)hD(r);return r.documents}function uD(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var i=sy(t,r);if(typeof e!="function")return i;for(var n=0,s=i.length;n<s;n+=1)e(i[n])}function fD(t,e){var r=sy(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new Ni("expected a single document in the stream, but found more")}}var dD=uD,pD=fD,gD={loadAll:dD,load:pD},yD=Xg,mD=gD.load;const ay=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s;function bD(t,e){var r;const i=t.match(ay);if(i){const n=mD(i[1],{schema:yD});return n!=null&&n.title&&((r=e.setDiagramTitle)==null||r.call(e,n.title)),t.slice(i[0].length)}else return t}const _D=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,xD=/\s*%%.*\n/gm,Ml={},W1=function(t,e){t=t.replace(ay,"").replace(_D,"").replace(xD,`
27
- `);for(const[r,{detector:i}]of Object.entries(Ml))if(i(t,e))return r;throw new Error(`No diagram type detected for text: ${t}`)},oy=(...t)=>{for(const{id:e,detector:r,loader:i}of t)ly(e,r,i)},ly=(t,e,r)=>{Ml[t]?I.error(`Detector with key ${t} already exists`):Ml[t]={detector:e,loader:r},I.debug(`Detector with key ${t} added${r?" with loader":""}`)},vD=t=>Ml[t].loader,wu=function(t,e,r){const{depth:i,clobber:n}=Object.assign({depth:2,clobber:!1},r);return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(s=>wu(t,s,r)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(s=>{t.includes(s)||t.push(s)}),t):t===void 0||i<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(s=>{typeof e[s]=="object"&&(t[s]===void 0||typeof t[s]=="object")?(t[s]===void 0&&(t[s]=Array.isArray(e[s])?[]:{}),t[s]=wu(t[s],e[s],{depth:i-1,clobber:n})):(n||typeof t[s]!="object"&&typeof e[s]!="object")&&(t[s]=e[s])}),t)},Xe=wu,kD={curveBasis:Ss,curveBasisClosed:nk,curveBasisOpen:sk,curveBumpX:rk,curveBumpY:ik,curveBundle:ak,curveCardinalClosed:lk,curveCardinalOpen:ck,curveCardinal:ok,curveCatmullRomClosed:uk,curveCatmullRomOpen:fk,curveCatmullRom:hk,curveLinear:Cr,curveLinearClosed:dk,curveMonotoneX:pk,curveMonotoneY:gk,curveNatural:yk,curveStep:mk,curveStepAfter:_k,curveStepBefore:bk},Rh=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,wD=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,TD=function(t,e){const r=cy(t,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const n=r.map(s=>s.args);Vn(n),i=Xe(i,[...n])}else i=r.args;if(i){let n=W1(t,e);["config"].forEach(s=>{i[s]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[s],delete i[s])})}return i},cy=function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${wD.source})(?=[}][%]{2}).*
25
+ `,s?1+l:l),s=!0,a=!0,l=0,r=t.position;!gi(f)&&f!==0;)f=t.input.charCodeAt(++t.position);ln(t,r,t.position,!1)}return!0}function Ld(t,e){var r,i=t.tag,n=t.anchor,s=[],a,o=!1,l;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),l=t.input.charCodeAt(t.position);l!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Vt(t,"tab characters must not be used in indentation")),!(l!==45||(a=t.input.charCodeAt(t.position+1),!vr(a))));){if(o=!0,t.position++,Re(t,!0,-1)&&t.lineIndent<=e){s.push(null),l=t.input.charCodeAt(t.position);continue}if(r=t.line,Ms(t,e,ty,!1,!0),s.push(t.result),Re(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&l!==0)Vt(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return o?(t.tag=i,t.anchor=n,t.kind="sequence",t.result=s,!0):!1}function oD(t,e,r){var i,n,s,a,o,l,h=t.tag,u=t.anchor,f={},d=Object.create(null),p=null,m=null,b=null,x=!1,k=!1,v;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=f),v=t.input.charCodeAt(t.position);v!==0;){if(!x&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Vt(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),s=t.line,(v===63||v===58)&&vr(i))v===63?(x&&(us(t,f,d,p,m,null,a,o,l),p=m=b=null),k=!0,x=!0,n=!0):x?(x=!1,n=!0):Vt(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,v=i;else{if(a=t.line,o=t.lineStart,l=t.position,!Ms(t,r,Jg,!1,!0))break;if(t.line===s){for(v=t.input.charCodeAt(t.position);Bn(v);)v=t.input.charCodeAt(++t.position);if(v===58)v=t.input.charCodeAt(++t.position),vr(v)||Vt(t,"a whitespace character is expected after the key-value separator within a block mapping"),x&&(us(t,f,d,p,m,null,a,o,l),p=m=b=null),k=!0,x=!1,n=!1,p=t.tag,m=t.result;else if(k)Vt(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=h,t.anchor=u,!0}else if(k)Vt(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=h,t.anchor=u,!0}if((t.line===s||t.lineIndent>e)&&(x&&(a=t.line,o=t.lineStart,l=t.position),Ms(t,e,Dl,!0,n)&&(x?m=t.result:b=t.result),x||(us(t,f,d,p,m,b,a,o,l),p=m=b=null),Re(t,!0,-1),v=t.input.charCodeAt(t.position)),(t.line===s||t.lineIndent>e)&&v!==0)Vt(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return x&&us(t,f,d,p,m,null,a,o,l),k&&(t.tag=h,t.anchor=u,t.kind="mapping",t.result=f),k}function lD(t){var e,r=!1,i=!1,n,s,a;if(a=t.input.charCodeAt(t.position),a!==33)return!1;if(t.tag!==null&&Vt(t,"duplication of a tag property"),a=t.input.charCodeAt(++t.position),a===60?(r=!0,a=t.input.charCodeAt(++t.position)):a===33?(i=!0,n="!!",a=t.input.charCodeAt(++t.position)):n="!",e=t.position,r){do a=t.input.charCodeAt(++t.position);while(a!==0&&a!==62);t.position<t.length?(s=t.input.slice(e,t.position),a=t.input.charCodeAt(++t.position)):Vt(t,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!vr(a);)a===33&&(i?Vt(t,"tag suffix cannot contain exclamation marks"):(n=t.input.slice(e-1,t.position+1),ey.test(n)||Vt(t,"named tag handle cannot contain such characters"),i=!0,e=t.position+1)),a=t.input.charCodeAt(++t.position);s=t.input.slice(e,t.position),KB.test(s)&&Vt(t,"tag suffix cannot contain flow indicator characters")}s&&!ry.test(s)&&Vt(t,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{Vt(t,"tag name is malformed: "+s)}return r?t.tag=s:fn.call(t.tagMap,n)?t.tag=t.tagMap[n]+s:n==="!"?t.tag="!"+s:n==="!!"?t.tag="tag:yaml.org,2002:"+s:Vt(t,'undeclared tag handle "'+n+'"'),!0}function cD(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&Vt(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!vr(r)&&!hs(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Vt(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function hD(t){var e,r,i;if(i=t.input.charCodeAt(t.position),i!==42)return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;i!==0&&!vr(i)&&!hs(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&Vt(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),fn.call(t.anchorMap,r)||Vt(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],Re(t,!0,-1),!0}function Ms(t,e,r,i,n){var s,a,o,l=1,h=!1,u=!1,f,d,p,m,b,x;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,s=a=o=Dl===r||ty===r,i&&Re(t,!0,-1)&&(h=!0,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)),l===1)for(;lD(t)||cD(t);)Re(t,!0,-1)?(h=!0,o=s,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)):o=!1;if(o&&(o=h||n),(l===1||Dl===r)&&(Bl===r||Jg===r?b=e:b=e+1,x=t.position-t.lineStart,l===1?o&&(Ld(t,x)||oD(t,x,b))||sD(t,b)?u=!0:(a&&aD(t,b)||iD(t,b)||nD(t,b)?u=!0:hD(t)?(u=!0,(t.tag!==null||t.anchor!==null)&&Vt(t,"alias node should not have any properties")):rD(t,b,Bl===r)&&(u=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):l===0&&(u=o&&Ld(t,x))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&Vt(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),f=0,d=t.implicitTypes.length;f<d;f+=1)if(m=t.implicitTypes[f],m.resolve(t.result)){t.result=m.construct(t.result),t.tag=m.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(fn.call(t.typeMap[t.kind||"fallback"],t.tag))m=t.typeMap[t.kind||"fallback"][t.tag];else for(m=null,p=t.typeMap.multi[t.kind||"fallback"],f=0,d=p.length;f<d;f+=1)if(t.tag.slice(0,p[f].tag.length)===p[f].tag){m=p[f];break}m||Vt(t,"unknown tag !<"+t.tag+">"),t.result!==null&&m.kind!==t.kind&&Vt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+m.kind+'", not "'+t.kind+'"'),m.resolve(t.result,t.tag)?(t.result=m.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Vt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||u}function uD(t){var e=t.position,r,i,n,s=!1,a;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(a=t.input.charCodeAt(t.position))!==0&&(Re(t,!0,-1),a=t.input.charCodeAt(t.position),!(t.lineIndent>0||a!==37));){for(s=!0,a=t.input.charCodeAt(++t.position),r=t.position;a!==0&&!vr(a);)a=t.input.charCodeAt(++t.position);for(i=t.input.slice(r,t.position),n=[],i.length<1&&Vt(t,"directive name must not be less than one character in length");a!==0;){for(;Bn(a);)a=t.input.charCodeAt(++t.position);if(a===35){do a=t.input.charCodeAt(++t.position);while(a!==0&&!gi(a));break}if(gi(a))break;for(r=t.position;a!==0&&!vr(a);)a=t.input.charCodeAt(++t.position);n.push(t.input.slice(r,t.position))}a!==0&&U1(t),fn.call(Sd,i)?Sd[i](t,i,n):Il(t,'unknown document directive "'+i+'"')}if(Re(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,Re(t,!0,-1)):s&&Vt(t,"directives end mark is expected"),Ms(t,t.lineIndent-1,Dl,!1,!0),Re(t,!0,-1),t.checkLineBreaks&&XB.test(t.input.slice(e,t.position))&&Il(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Fc(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,Re(t,!0,-1));return}if(t.position<t.length-1)Vt(t,"end of the stream or a document separator is expected");else return}function ay(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
26
+ `),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new eD(t,e),i=t.indexOf("\0");for(i!==-1&&(r.position=i,Vt(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)uD(r);return r.documents}function fD(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var i=ay(t,r);if(typeof e!="function")return i;for(var n=0,s=i.length;n<s;n+=1)e(i[n])}function dD(t,e){var r=ay(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new Ni("expected a single document in the stream, but found more")}}var pD=fD,gD=dD,yD={loadAll:pD,load:gD},mD=Kg,bD=yD.load;const oy=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s;function _D(t,e){var r;const i=t.match(oy);if(i){const n=bD(i[1],{schema:mD});return n!=null&&n.title&&((r=e.setDiagramTitle)==null||r.call(e,n.title)),t.slice(i[0].length)}else return t}const xD=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,vD=/\s*%%.*\n/gm,Ml={},H1=function(t,e){t=t.replace(oy,"").replace(xD,"").replace(vD,`
27
+ `);for(const[r,{detector:i}]of Object.entries(Ml))if(i(t,e))return r;throw new Error(`No diagram type detected for text: ${t}`)},ly=(...t)=>{for(const{id:e,detector:r,loader:i}of t)cy(e,r,i)},cy=(t,e,r)=>{Ml[t]?I.error(`Detector with key ${t} already exists`):Ml[t]={detector:e,loader:r},I.debug(`Detector with key ${t} added${r?" with loader":""}`)},kD=t=>Ml[t].loader,wu=function(t,e,r){const{depth:i,clobber:n}=Object.assign({depth:2,clobber:!1},r);return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(s=>wu(t,s,r)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(s=>{t.includes(s)||t.push(s)}),t):t===void 0||i<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(s=>{typeof e[s]=="object"&&(t[s]===void 0||typeof t[s]=="object")?(t[s]===void 0&&(t[s]=Array.isArray(e[s])?[]:{}),t[s]=wu(t[s],e[s],{depth:i-1,clobber:n})):(n||typeof t[s]!="object"&&typeof e[s]!="object")&&(t[s]=e[s])}),t)},Xe=wu,wD={curveBasis:Ss,curveBasisClosed:sk,curveBasisOpen:ak,curveBumpX:ik,curveBumpY:nk,curveBundle:ok,curveCardinalClosed:ck,curveCardinalOpen:hk,curveCardinal:lk,curveCatmullRomClosed:fk,curveCatmullRomOpen:dk,curveCatmullRom:uk,curveLinear:Cr,curveLinearClosed:pk,curveMonotoneX:gk,curveMonotoneY:yk,curveNatural:mk,curveStep:bk,curveStepAfter:xk,curveStepBefore:_k},Rh=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,TD=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ED=function(t,e){const r=hy(t,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const n=r.map(s=>s.args);Vn(n),i=Xe(i,[...n])}else i=r.args;if(i){let n=H1(t,e);["config"].forEach(s=>{i[s]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[s],delete i[s])})}return i},hy=function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${TD.source})(?=[}][%]{2}).*
28
28
  `,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),I.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let i;const n=[];for(;(i=Rh.exec(t))!==null;)if(i.index===Rh.lastIndex&&Rh.lastIndex++,i&&!e||e&&i[1]&&i[1].match(e)||e&&i[2]&&i[2].match(e)){const s=i[1]?i[1]:i[2],a=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;n.push({type:s,args:a})}return n.length===0&&n.push({type:t,args:null}),n.length===1?n[0]:n}catch(r){return I.error(`ERROR: ${r.message} - Unable to parse directive
29
- ${e!==null?" type:"+e:""} based on the text:${t}`),{type:null,args:null}}},ED=function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1};function Zr(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return kD[r]||e}function CD(t,e){const r=t.trim();if(r)return e.securityLevel!=="loose"?Ki(r):r}const SD=(t,...e)=>{const r=t.split("."),i=r.length-1,n=r[i];let s=window;for(let a=0;a<i;a++)if(s=s[r[a]],!s)return;s[n](...e)};function Nl(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function AD(t){let e,r=0;t.forEach(s=>{r+=Nl(s,e),e=s});let i=r/2,n;return e=void 0,t.forEach(s=>{if(e&&!n){const a=Nl(s,e);if(a<i)i-=a;else{const o=i/a;o<=0&&(n=e),o>=1&&(n={x:s.x,y:s.y}),o>0&&o<1&&(n={x:(1-o)*e.x+o*s.x,y:(1-o)*e.y+o*s.y})}}e=s}),n}function LD(t){return t.length===1?t[0]:AD(t)}const BD=(t,e,r)=>{let i;I.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());let s=25,a;i=void 0,e.forEach(u=>{if(i&&!a){const f=Nl(u,i);if(f<s)s-=f;else{const d=s/f;d<=0&&(a=i),d>=1&&(a={x:u.x,y:u.y}),d>0&&d<1&&(a={x:(1-d)*i.x+d*u.x,y:(1-d)*i.y+d*u.y})}}i=u});const o=t?10:5,l=Math.atan2(e[0].y-a.y,e[0].x-a.x),h={x:0,y:0};return h.x=Math.sin(l)*o+(e[0].x+a.x)/2,h.y=-Math.cos(l)*o+(e[0].y+a.y)/2,h};function DD(t,e,r){let i=JSON.parse(JSON.stringify(r)),n;I.info("our points",i),e!=="start_left"&&e!=="start_right"&&(i=i.reverse()),i.forEach(f=>{n=f});let a=25+t,o;n=void 0,i.forEach(f=>{if(n&&!o){const d=Nl(f,n);if(d<a)a-=d;else{const p=a/d;p<=0&&(o=n),p>=1&&(o={x:f.x,y:f.y}),p>0&&p<1&&(o={x:(1-p)*n.x+p*f.x,y:(1-p)*n.y+p*f.y})}}n=f});const l=10+t*.5,h=Math.atan2(i[0].y-o.y,i[0].x-o.x),u={x:0,y:0};return u.x=Math.sin(h)*l+(i[0].x+o.x)/2,u.y=-Math.cos(h)*l+(i[0].y+o.y)/2,e==="start_left"&&(u.x=Math.sin(h+Math.PI)*l+(i[0].x+o.x)/2,u.y=-Math.cos(h+Math.PI)*l+(i[0].y+o.y)/2),e==="end_right"&&(u.x=Math.sin(h-Math.PI)*l+(i[0].x+o.x)/2-5,u.y=-Math.cos(h-Math.PI)*l+(i[0].y+o.y)/2-5),e==="end_left"&&(u.x=Math.sin(h)*l+(i[0].x+o.x)/2-5,u.y=-Math.cos(h)*l+(i[0].y+o.y)/2-5),u}function dn(t){let e="",r="";for(const i of t)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}let Ld=0;const hy=()=>(Ld++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Ld);function ID(t){let e="";const r="0123456789abcdef",i=r.length;for(let n=0;n<t;n++)e+=r.charAt(Math.floor(Math.random()*i));return e}const uy=t=>ID(t.length),MD=function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0}},ND=function(t,e){const r=e.text.replace(Xt.lineBreakRegex," "),[,i]=co(e.fontSize),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.style("text-anchor",e.anchor),n.style("font-family",e.fontFamily),n.style("font-size",i),n.style("font-weight",e.fontWeight),n.attr("fill",e.fill),e.class!==void 0&&n.attr("class",e.class);const s=n.append("tspan");return s.attr("x",e.x+e.textMargin*2),s.attr("fill",e.fill),s.text(r),n},fy=Hs((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Xt.lineBreakRegex.test(t)))return t;const i=t.split(" "),n=[];let s="";return i.forEach((a,o)=>{const l=yi(`${a} `,r),h=yi(s,r);if(l>e){const{hyphenatedStrings:d,remainingWord:p}=RD(a,e,"-",r);n.push(s,...d),s=p}else h+l>=e?(n.push(s),s=a):s=[s,a].filter(Boolean).join(" ");o+1===i.length&&n.push(s)}),n.filter(a=>a!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),RD=Hs((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...t],s=[];let a="";return n.forEach((o,l)=>{const h=`${a}${o}`;if(yi(h,i)>=e){const f=l+1,d=n.length===f,p=`${h}${r}`;s.push(d?h:p),a=""}else a=h}),{hyphenatedStrings:s,remainingWord:a}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Tu(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),H1(t,e).height}function yi(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),H1(t,e).width}const H1=Hs((t,e)=>{e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e);const{fontSize:r,fontFamily:i,fontWeight:n}=e;if(!t)return{width:0,height:0};const[,s]=co(r),a=["sans-serif",i],o=t.split(Xt.lineBreakRegex),l=[],h=_t("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const u=h.append("svg");for(const d of a){let p=0;const m={width:0,height:0,lineHeight:0};for(const b of o){const x=MD();x.text=b;const k=ND(u,x).style("font-size",s).style("font-weight",n).style("font-family",d),v=(k._groups||k)[0][0].getBBox();m.width=Math.round(Math.max(m.width,v.width)),p=Math.round(v.height),m.height+=p,m.lineHeight=Math.round(Math.max(m.lineHeight,p))}l.push(m)}u.remove();const f=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[f]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),OD=class{constructor(e,r){this.deterministic=e,this.seed=r,this.count=r?r.length:0}next(){return this.deterministic?this.count++:Date.now()}};let Mo;const FD=function(t){return Mo=Mo||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Mo.innerHTML=t,unescape(Mo.textContent)},Vn=t=>{if(I.debug("directiveSanitizer called with",t),typeof t=="object"&&(t.length?t.forEach(e=>Vn(e)):Object.keys(t).forEach(e=>{I.debug("Checking key",e),e.startsWith("__")&&(I.debug("sanitize deleting __ option",e),delete t[e]),e.includes("proto")&&(I.debug("sanitize deleting proto option",e),delete t[e]),e.includes("constr")&&(I.debug("sanitize deleting constr option",e),delete t[e]),e.includes("themeCSS")&&(I.debug("sanitizing themeCss option"),t[e]=Zo(t[e])),e.includes("fontFamily")&&(I.debug("sanitizing fontFamily option"),t[e]=Zo(t[e])),e.includes("altFontFamily")&&(I.debug("sanitizing altFontFamily option"),t[e]=Zo(t[e])),SL.includes(e)?typeof t[e]=="object"&&(I.debug("sanitize deleting object",e),Vn(t[e])):(I.debug("sanitize deleting option",e),delete t[e])})),t.themeVariables){const e=Object.keys(t.themeVariables);for(const r of e){const i=t.themeVariables[r];i&&i.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[r]="")}}I.debug("After sanitization",t)},Zo=t=>{let e=0,r=0;for(const i of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?e++:i==="}"&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t};function q1(t){return"str"in t}function PD(t){return t instanceof Error?t.message:String(t)}const VD=(t,e,r,i)=>{if(!i)return;const n=t.node().getBBox();t.append("text").text(i).attr("x",n.x+n.width/2).attr("y",-r).attr("class",e)},co=t=>{if(typeof t=="number")return[t,t+"px"];const e=parseInt(t,10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},jt={assignWithDepth:Xe,wrapLabel:fy,calculateTextHeight:Tu,calculateTextWidth:yi,calculateTextDimensions:H1,detectInit:TD,detectDirective:cy,isSubstringInArray:ED,interpolateToCurve:Zr,calcLabelPosition:LD,calcCardinalityPosition:BD,calcTerminalLabelPosition:DD,formatUrl:CD,getStylesFromArray:dn,generateId:hy,random:uy,runFunc:SD,entityDecode:FD,initIdGenerator:OD,directiveSanitizer:Vn,sanitizeCss:Zo,insertTitle:VD,parseFontSize:co},Rl="9.4.3",Ns=Object.freeze(AL);let yr=Xe({},Ns),dy,Rs=[],xa=Xe({},Ns);const Pc=(t,e)=>{let r=Xe({},t),i={};for(const n of e)yy(n),i=Xe(i,n);if(r=Xe(r,i),i.theme&&i.theme in Hi){const n=Xe({},dy),s=Xe(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in Hi&&(r.themeVariables=Hi[r.theme].getThemeVariables(s))}return xa=r,by(xa),xa},YD=t=>(yr=Xe({},Ns),yr=Xe(yr,t),t.theme&&Hi[t.theme]&&(yr.themeVariables=Hi[t.theme].getThemeVariables(t.themeVariables)),Pc(yr,Rs),yr),zD=t=>{dy=Xe({},t)},UD=t=>(yr=Xe(yr,t),Pc(yr,Rs),yr),py=()=>Xe({},yr),gy=t=>(by(t),Xe(xa,t),G()),G=()=>Xe({},xa),yy=t=>{["secure",...yr.secure??[]].forEach(e=>{t[e]!==void 0&&(I.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.indexOf("__")===0&&delete t[e]}),Object.keys(t).forEach(e=>{typeof t[e]=="string"&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],typeof t[e]=="object"&&yy(t[e])})},G1=t=>{t.fontFamily&&(t.themeVariables?t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily}):t.themeVariables={fontFamily:t.fontFamily}),Rs.push(t),Pc(yr,Rs)},Wa=(t=yr)=>{Rs=[],Pc(t,Rs)};var my=(t=>(t.LAZY_LOAD_DEPRECATED="The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",t))(my||{});const Bd={},WD=t=>{Bd[t]||(I.warn(my[t]),Bd[t]=!0)},by=t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&WD("LAZY_LOAD_DEPRECATED")},HD=function(t,e){for(let r of e)t.attr(r[0],r[1])},qD=function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},ni=function(t,e,r,i){const n=qD(e,r,i);HD(t,n)},Vc=function(t,e,r,i){const n=e.node().getBBox(),s=n.width,a=n.height;I.info(`SVG bounds: ${s}x${a}`,n);let o=0,l=0;I.info(`Graph bounds: ${o}x${l}`,t),o=s+r*2,l=a+r*2,I.info(`Calculated bounds: ${o}x${l}`),ni(e,l,o,i);const h=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;e.attr("viewBox",h)},GD=t=>`g.classGroup text {
29
+ ${e!==null?" type:"+e:""} based on the text:${t}`),{type:null,args:null}}},CD=function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1};function Zr(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return wD[r]||e}function SD(t,e){const r=t.trim();if(r)return e.securityLevel!=="loose"?Ki(r):r}const AD=(t,...e)=>{const r=t.split("."),i=r.length-1,n=r[i];let s=window;for(let a=0;a<i;a++)if(s=s[r[a]],!s)return;s[n](...e)};function Nl(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function LD(t){let e,r=0;t.forEach(s=>{r+=Nl(s,e),e=s});let i=r/2,n;return e=void 0,t.forEach(s=>{if(e&&!n){const a=Nl(s,e);if(a<i)i-=a;else{const o=i/a;o<=0&&(n=e),o>=1&&(n={x:s.x,y:s.y}),o>0&&o<1&&(n={x:(1-o)*e.x+o*s.x,y:(1-o)*e.y+o*s.y})}}e=s}),n}function BD(t){return t.length===1?t[0]:LD(t)}const DD=(t,e,r)=>{let i;I.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());let s=25,a;i=void 0,e.forEach(u=>{if(i&&!a){const f=Nl(u,i);if(f<s)s-=f;else{const d=s/f;d<=0&&(a=i),d>=1&&(a={x:u.x,y:u.y}),d>0&&d<1&&(a={x:(1-d)*i.x+d*u.x,y:(1-d)*i.y+d*u.y})}}i=u});const o=t?10:5,l=Math.atan2(e[0].y-a.y,e[0].x-a.x),h={x:0,y:0};return h.x=Math.sin(l)*o+(e[0].x+a.x)/2,h.y=-Math.cos(l)*o+(e[0].y+a.y)/2,h};function ID(t,e,r){let i=JSON.parse(JSON.stringify(r)),n;I.info("our points",i),e!=="start_left"&&e!=="start_right"&&(i=i.reverse()),i.forEach(f=>{n=f});let a=25+t,o;n=void 0,i.forEach(f=>{if(n&&!o){const d=Nl(f,n);if(d<a)a-=d;else{const p=a/d;p<=0&&(o=n),p>=1&&(o={x:f.x,y:f.y}),p>0&&p<1&&(o={x:(1-p)*n.x+p*f.x,y:(1-p)*n.y+p*f.y})}}n=f});const l=10+t*.5,h=Math.atan2(i[0].y-o.y,i[0].x-o.x),u={x:0,y:0};return u.x=Math.sin(h)*l+(i[0].x+o.x)/2,u.y=-Math.cos(h)*l+(i[0].y+o.y)/2,e==="start_left"&&(u.x=Math.sin(h+Math.PI)*l+(i[0].x+o.x)/2,u.y=-Math.cos(h+Math.PI)*l+(i[0].y+o.y)/2),e==="end_right"&&(u.x=Math.sin(h-Math.PI)*l+(i[0].x+o.x)/2-5,u.y=-Math.cos(h-Math.PI)*l+(i[0].y+o.y)/2-5),e==="end_left"&&(u.x=Math.sin(h)*l+(i[0].x+o.x)/2-5,u.y=-Math.cos(h)*l+(i[0].y+o.y)/2-5),u}function dn(t){let e="",r="";for(const i of t)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}let Bd=0;const uy=()=>(Bd++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Bd);function MD(t){let e="";const r="0123456789abcdef",i=r.length;for(let n=0;n<t;n++)e+=r.charAt(Math.floor(Math.random()*i));return e}const fy=t=>MD(t.length),ND=function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0}},RD=function(t,e){const r=e.text.replace(Xt.lineBreakRegex," "),[,i]=co(e.fontSize),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.style("text-anchor",e.anchor),n.style("font-family",e.fontFamily),n.style("font-size",i),n.style("font-weight",e.fontWeight),n.attr("fill",e.fill),e.class!==void 0&&n.attr("class",e.class);const s=n.append("tspan");return s.attr("x",e.x+e.textMargin*2),s.attr("fill",e.fill),s.text(r),n},dy=Hs((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Xt.lineBreakRegex.test(t)))return t;const i=t.split(" "),n=[];let s="";return i.forEach((a,o)=>{const l=yi(`${a} `,r),h=yi(s,r);if(l>e){const{hyphenatedStrings:d,remainingWord:p}=OD(a,e,"-",r);n.push(s,...d),s=p}else h+l>=e?(n.push(s),s=a):s=[s,a].filter(Boolean).join(" ");o+1===i.length&&n.push(s)}),n.filter(a=>a!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),OD=Hs((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...t],s=[];let a="";return n.forEach((o,l)=>{const h=`${a}${o}`;if(yi(h,i)>=e){const f=l+1,d=n.length===f,p=`${h}${r}`;s.push(d?h:p),a=""}else a=h}),{hyphenatedStrings:s,remainingWord:a}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Tu(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),q1(t,e).height}function yi(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),q1(t,e).width}const q1=Hs((t,e)=>{e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e);const{fontSize:r,fontFamily:i,fontWeight:n}=e;if(!t)return{width:0,height:0};const[,s]=co(r),a=["sans-serif",i],o=t.split(Xt.lineBreakRegex),l=[],h=_t("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const u=h.append("svg");for(const d of a){let p=0;const m={width:0,height:0,lineHeight:0};for(const b of o){const x=ND();x.text=b;const k=RD(u,x).style("font-size",s).style("font-weight",n).style("font-family",d),v=(k._groups||k)[0][0].getBBox();m.width=Math.round(Math.max(m.width,v.width)),p=Math.round(v.height),m.height+=p,m.lineHeight=Math.round(Math.max(m.lineHeight,p))}l.push(m)}u.remove();const f=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[f]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),FD=class{constructor(e,r){this.deterministic=e,this.seed=r,this.count=r?r.length:0}next(){return this.deterministic?this.count++:Date.now()}};let Mo;const PD=function(t){return Mo=Mo||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Mo.innerHTML=t,unescape(Mo.textContent)},Vn=t=>{if(I.debug("directiveSanitizer called with",t),typeof t=="object"&&(t.length?t.forEach(e=>Vn(e)):Object.keys(t).forEach(e=>{I.debug("Checking key",e),e.startsWith("__")&&(I.debug("sanitize deleting __ option",e),delete t[e]),e.includes("proto")&&(I.debug("sanitize deleting proto option",e),delete t[e]),e.includes("constr")&&(I.debug("sanitize deleting constr option",e),delete t[e]),e.includes("themeCSS")&&(I.debug("sanitizing themeCss option"),t[e]=Zo(t[e])),e.includes("fontFamily")&&(I.debug("sanitizing fontFamily option"),t[e]=Zo(t[e])),e.includes("altFontFamily")&&(I.debug("sanitizing altFontFamily option"),t[e]=Zo(t[e])),AL.includes(e)?typeof t[e]=="object"&&(I.debug("sanitize deleting object",e),Vn(t[e])):(I.debug("sanitize deleting option",e),delete t[e])})),t.themeVariables){const e=Object.keys(t.themeVariables);for(const r of e){const i=t.themeVariables[r];i&&i.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[r]="")}}I.debug("After sanitization",t)},Zo=t=>{let e=0,r=0;for(const i of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?e++:i==="}"&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t};function G1(t){return"str"in t}function VD(t){return t instanceof Error?t.message:String(t)}const YD=(t,e,r,i)=>{if(!i)return;const n=t.node().getBBox();t.append("text").text(i).attr("x",n.x+n.width/2).attr("y",-r).attr("class",e)},co=t=>{if(typeof t=="number")return[t,t+"px"];const e=parseInt(t,10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},jt={assignWithDepth:Xe,wrapLabel:dy,calculateTextHeight:Tu,calculateTextWidth:yi,calculateTextDimensions:q1,detectInit:ED,detectDirective:hy,isSubstringInArray:CD,interpolateToCurve:Zr,calcLabelPosition:BD,calcCardinalityPosition:DD,calcTerminalLabelPosition:ID,formatUrl:SD,getStylesFromArray:dn,generateId:uy,random:fy,runFunc:AD,entityDecode:PD,initIdGenerator:FD,directiveSanitizer:Vn,sanitizeCss:Zo,insertTitle:YD,parseFontSize:co},Rl="9.4.3",Ns=Object.freeze(LL);let yr=Xe({},Ns),py,Rs=[],xa=Xe({},Ns);const Pc=(t,e)=>{let r=Xe({},t),i={};for(const n of e)my(n),i=Xe(i,n);if(r=Xe(r,i),i.theme&&i.theme in Hi){const n=Xe({},py),s=Xe(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in Hi&&(r.themeVariables=Hi[r.theme].getThemeVariables(s))}return xa=r,_y(xa),xa},zD=t=>(yr=Xe({},Ns),yr=Xe(yr,t),t.theme&&Hi[t.theme]&&(yr.themeVariables=Hi[t.theme].getThemeVariables(t.themeVariables)),Pc(yr,Rs),yr),UD=t=>{py=Xe({},t)},WD=t=>(yr=Xe(yr,t),Pc(yr,Rs),yr),gy=()=>Xe({},yr),yy=t=>(_y(t),Xe(xa,t),G()),G=()=>Xe({},xa),my=t=>{["secure",...yr.secure??[]].forEach(e=>{t[e]!==void 0&&(I.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.indexOf("__")===0&&delete t[e]}),Object.keys(t).forEach(e=>{typeof t[e]=="string"&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],typeof t[e]=="object"&&my(t[e])})},$1=t=>{t.fontFamily&&(t.themeVariables?t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily}):t.themeVariables={fontFamily:t.fontFamily}),Rs.push(t),Pc(yr,Rs)},Wa=(t=yr)=>{Rs=[],Pc(t,Rs)};var by=(t=>(t.LAZY_LOAD_DEPRECATED="The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",t))(by||{});const Dd={},HD=t=>{Dd[t]||(I.warn(by[t]),Dd[t]=!0)},_y=t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&HD("LAZY_LOAD_DEPRECATED")},qD=function(t,e){for(let r of e)t.attr(r[0],r[1])},GD=function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},ni=function(t,e,r,i){const n=GD(e,r,i);qD(t,n)},Vc=function(t,e,r,i){const n=e.node().getBBox(),s=n.width,a=n.height;I.info(`SVG bounds: ${s}x${a}`,n);let o=0,l=0;I.info(`Graph bounds: ${o}x${l}`,t),o=s+r*2,l=a+r*2,I.info(`Calculated bounds: ${o}x${l}`),ni(e,l,o,i);const h=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;e.attr("viewBox",h)},$D=t=>`g.classGroup text {
30
30
  fill: ${t.nodeBorder};
31
31
  fill: ${t.classText};
32
32
  stroke: none;
@@ -180,7 +180,7 @@ g.classGroup line {
180
180
  font-size: 18px;
181
181
  fill: ${t.textColor};
182
182
  }
183
- `,va=GD,$D=t=>`
183
+ `,va=$D,jD=t=>`
184
184
  .entityBox {
185
185
  fill: ${t.mainBkg};
186
186
  stroke: ${t.nodeBorder};
@@ -214,7 +214,7 @@ g.classGroup line {
214
214
  font-size: 18px;
215
215
  fill: ${t.textColor};
216
216
  }
217
- `,_y=$D,jD=()=>"",Eu=jD,XD=t=>`.label {
217
+ `,xy=jD,XD=()=>"",Eu=XD,KD=t=>`.label {
218
218
  font-family: ${t.fontFamily};
219
219
  color: ${t.nodeTextColor||t.textColor};
220
220
  }
@@ -307,7 +307,7 @@ g.classGroup line {
307
307
  font-size: 18px;
308
308
  fill: ${t.textColor};
309
309
  }
310
- `,Ol=XD,KD=t=>`
310
+ `,Ol=KD,ZD=t=>`
311
311
  .mermaid-main-font {
312
312
  font-family: "trebuchet ms", verdana, arial, sans-serif;
313
313
  font-family: var(--mermaid-font-family);
@@ -567,7 +567,7 @@ g.classGroup line {
567
567
  font-family: 'trebuchet ms', verdana, arial, sans-serif;
568
568
  font-family: var(--mermaid-font-family);
569
569
  }
570
- `,xy=KD,ZD=()=>"",vy=ZD,QD=t=>`
570
+ `,vy=ZD,QD=()=>"",ky=QD,JD=t=>`
571
571
  .pieCircle{
572
572
  stroke: ${t.pieStrokeColor};
573
573
  stroke-width : ${t.pieStrokeWidth};
@@ -590,7 +590,7 @@ g.classGroup line {
590
590
  font-family: ${t.fontFamily};
591
591
  font-size: ${t.pieLegendTextSize};
592
592
  }
593
- `,ky=QD,JD=t=>`
593
+ `,wy=JD,tI=t=>`
594
594
 
595
595
  marker {
596
596
  fill: ${t.relationColor};
@@ -633,7 +633,7 @@ g.classGroup line {
633
633
  fill: ${t.relationLabelColor};
634
634
  }
635
635
 
636
- `,wy=JD,tI=t=>`.actor {
636
+ `,Ty=tI,eI=t=>`.actor {
637
637
  stroke: ${t.actorBorder};
638
638
  fill: ${t.actorBkg};
639
639
  }
@@ -749,7 +749,7 @@ g.classGroup line {
749
749
  fill: ${t.actorBkg};
750
750
  stroke-width: 2px;
751
751
  }
752
- `,Ty=tI,eI=t=>`
752
+ `,Ey=eI,rI=t=>`
753
753
  defs #statediagram-barbEnd {
754
754
  fill: ${t.transitionColor};
755
755
  stroke: ${t.transitionColor};
@@ -950,7 +950,7 @@ g.stateGroup line {
950
950
  font-size: 18px;
951
951
  fill: ${t.textColor};
952
952
  }
953
- `,Fl=eI,rI=t=>`.label {
953
+ `,Fl=rI,iI=t=>`.label {
954
954
  font-family: 'trebuchet ms', verdana, arial, sans-serif;
955
955
  font-family: var(--mermaid-font-family);
956
956
  color: ${t.textColor};
@@ -1083,11 +1083,11 @@ g.stateGroup line {
1083
1083
  .actor-5 {
1084
1084
  ${t.actor5?`fill: ${t.actor5}`:""};
1085
1085
  }
1086
- `,Ey=rI,iI=t=>`.person {
1086
+ `,Cy=iI,nI=t=>`.person {
1087
1087
  stroke: ${t.personBorder};
1088
1088
  fill: ${t.personBkg};
1089
1089
  }
1090
- `,Cy=iI,Qo={flowchart:Ol,"flowchart-v2":Ol,sequence:Ty,gantt:xy,classDiagram:va,"classDiagram-v2":va,class:va,stateDiagram:Fl,state:Fl,info:vy,pie:ky,er:_y,error:Eu,journey:Ey,requirement:wy,c4:Cy},nI=(t,e,r)=>{let i="";return t in Qo&&Qo[t]?i=Qo[t](r):I.warn(`No theme found for ${t}`),` & {
1090
+ `,Sy=nI,Qo={flowchart:Ol,"flowchart-v2":Ol,sequence:Ey,gantt:vy,classDiagram:va,"classDiagram-v2":va,class:va,stateDiagram:Fl,state:Fl,info:ky,pie:wy,er:xy,error:Eu,journey:Cy,requirement:Ty,c4:Sy},sI=(t,e,r)=>{let i="";return t in Qo&&Qo[t]?i=Qo[t](r):I.warn(`No theme found for ${t}`),` & {
1091
1091
  font-family: ${r.fontFamily};
1092
1092
  font-size: ${r.fontSize};
1093
1093
  fill: ${r.textColor}
@@ -1136,20 +1136,20 @@ g.stateGroup line {
1136
1136
  ${i}
1137
1137
 
1138
1138
  ${e}
1139
- `},sI=(t,e)=>{Qo[t]=e},aI=nI;let $1="",Yc="",j1="";const X1=t=>Ur(t,G()),Lr=function(){$1="",j1="",Yc=""},kr=function(t){$1=X1(t).replace(/^\s+/g,"")},Br=function(){return $1||Yc},Dr=function(t){j1=X1(t).replace(/\n\s+/g,`
1140
- `)},Ir=function(){return j1},si=function(t){Yc=X1(t)},ai=function(){return Yc},oI={setAccTitle:kr,getAccTitle:Br,setDiagramTitle:si,getDiagramTitle:ai,getAccDescription:Ir,setAccDescription:Dr,clear:Lr},lI=Object.freeze(Object.defineProperty({__proto__:null,clear:Lr,default:oI,getAccDescription:Ir,getAccTitle:Br,getDiagramTitle:ai,setAccDescription:Dr,setAccTitle:kr,setDiagramTitle:si},Symbol.toStringTag,{value:"Module"}));let wn={};const Sy=function(t,e,r,i){I.debug("parseDirective is being called",e,r,i);try{if(e!==void 0)switch(e=e.trim(),r){case"open_directive":wn={};break;case"type_directive":if(!wn)throw new Error("currentDirective is undefined");wn.type=e.toLowerCase();break;case"arg_directive":if(!wn)throw new Error("currentDirective is undefined");wn.args=JSON.parse(e);break;case"close_directive":cI(t,wn,i),wn=void 0;break}}catch(n){I.error(`Error while rendering sequenceDiagram directive: ${e} jison context: ${r}`),I.error(n.message)}},cI=function(t,e,r){switch(I.info(`Directive type=${e.type} with args:`,e.args),e.type){case"init":case"initialize":{["config"].forEach(i=>{e.args[i]!==void 0&&(r==="flowchart-v2"&&(r="flowchart"),e.args[r]=e.args[i],delete e.args[i])}),I.info("sanitize in handleDirective",e.args),Vn(e.args),I.info("sanitize in handleDirective (done)",e.args),G1(e.args);break}case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap(e.type==="wrap");break;case"themeCss":I.warn("themeCss encountered");break;default:I.warn(`Unhandled directive: source: '%%{${e.type}: ${JSON.stringify(e.args?e.args:{})}}%%`,e);break}},hI=I,uI=V1,ho=G,fI=t=>Ur(t,ho()),Ay=Vc,dI=()=>lI,pI=(t,e,r,i)=>Sy(t,e,r,i),Pl={},Ye=(t,e,r)=>{if(Pl[t])throw new Error(`Diagram ${t} already registered.`);Pl[t]=e,r&&ly(t,r),sI(t,e.styles),e.injectUtils&&e.injectUtils(hI,uI,ho,fI,Ay,dI(),pI)},Ly=t=>{if(t in Pl)return Pl[t];throw new Error(`Diagram ${t} not found.`)};var Cu=function(){var t=function(F,C,S,E){for(S=S||{},E=F.length;E--;S[F[E]]=C);return S},e=[1,4],r=[1,7],i=[1,5],n=[1,9],s=[1,6],a=[2,6],o=[1,16],l=[6,8,14,20,22,24,25,27,29,32,37,40,50,55],h=[8,14,20,22,24,25,27,29,32,37,40],u=[8,13,14,20,22,24,25,27,29,32,37,40],f=[1,26],d=[6,8,14,50,55],p=[8,14,55],m=[1,53],b=[1,52],x=[8,14,30,33,35,38,55],k=[1,67],v=[1,68],B=[1,69],R=[8,14,33,35,42,55],P={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,GG:6,document:7,EOF:8,":":9,DIR:10,options:11,body:12,OPT:13,NL:14,line:15,statement:16,commitStatement:17,mergeStatement:18,cherryPickStatement:19,acc_title:20,acc_title_value:21,acc_descr:22,acc_descr_value:23,acc_descr_multiline_value:24,section:25,branchStatement:26,CHECKOUT:27,ref:28,BRANCH:29,ORDER:30,NUM:31,CHERRY_PICK:32,COMMIT_ID:33,STR:34,COMMIT_TAG:35,EMPTYSTR:36,MERGE:37,COMMIT_TYPE:38,commitType:39,COMMIT:40,commit_arg:41,COMMIT_MSG:42,NORMAL:43,REVERSE:44,HIGHLIGHT:45,openDirective:46,typeDirective:47,closeDirective:48,argDirective:49,open_directive:50,type_directive:51,arg_directive:52,close_directive:53,ID:54,";":55,$accept:0,$end:1},terminals_:{2:"error",6:"GG",8:"EOF",9:":",10:"DIR",13:"OPT",14:"NL",20:"acc_title",21:"acc_title_value",22:"acc_descr",23:"acc_descr_value",24:"acc_descr_multiline_value",25:"section",27:"CHECKOUT",29:"BRANCH",30:"ORDER",31:"NUM",32:"CHERRY_PICK",33:"COMMIT_ID",34:"STR",35:"COMMIT_TAG",36:"EMPTYSTR",37:"MERGE",38:"COMMIT_TYPE",40:"COMMIT",42:"COMMIT_MSG",43:"NORMAL",44:"REVERSE",45:"HIGHLIGHT",50:"open_directive",51:"type_directive",52:"arg_directive",53:"close_directive",54:"ID",55:";"},productions_:[0,[3,2],[3,2],[3,3],[3,4],[3,5],[7,0],[7,2],[11,2],[11,1],[12,0],[12,2],[15,2],[15,1],[16,1],[16,1],[16,1],[16,2],[16,2],[16,1],[16,1],[16,1],[16,2],[26,2],[26,4],[19,3],[19,5],[19,5],[19,5],[19,5],[18,2],[18,4],[18,4],[18,4],[18,6],[18,6],[18,6],[18,6],[18,6],[18,6],[18,8],[18,8],[18,8],[18,8],[18,8],[18,8],[17,2],[17,3],[17,3],[17,5],[17,5],[17,3],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,3],[17,5],[17,5],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[41,0],[41,1],[39,1],[39,1],[39,1],[5,3],[5,5],[46,1],[47,1],[49,1],[48,1],[28,1],[28,1],[4,1],[4,1],[4,1]],performAction:function(C,S,E,_,w,g,D){var y=g.length-1;switch(w){case 3:return g[y];case 4:return g[y-1];case 5:return _.setDirection(g[y-3]),g[y-1];case 7:_.setOptions(g[y-1]),this.$=g[y];break;case 8:g[y-1]+=g[y],this.$=g[y-1];break;case 10:this.$=[];break;case 11:g[y-1].push(g[y]),this.$=g[y-1];break;case 12:this.$=g[y-1];break;case 17:this.$=g[y].trim(),_.setAccTitle(this.$);break;case 18:case 19:this.$=g[y].trim(),_.setAccDescription(this.$);break;case 20:_.addSection(g[y].substr(8)),this.$=g[y].substr(8);break;case 22:_.checkout(g[y]);break;case 23:_.branch(g[y]);break;case 24:_.branch(g[y-2],g[y]);break;case 25:_.cherryPick(g[y],"",void 0);break;case 26:_.cherryPick(g[y-2],"",g[y]);break;case 27:case 29:_.cherryPick(g[y-2],"","");break;case 28:_.cherryPick(g[y],"",g[y-2]);break;case 30:_.merge(g[y],"","","");break;case 31:_.merge(g[y-2],g[y],"","");break;case 32:_.merge(g[y-2],"",g[y],"");break;case 33:_.merge(g[y-2],"","",g[y]);break;case 34:_.merge(g[y-4],g[y],"",g[y-2]);break;case 35:_.merge(g[y-4],"",g[y],g[y-2]);break;case 36:_.merge(g[y-4],"",g[y-2],g[y]);break;case 37:_.merge(g[y-4],g[y-2],g[y],"");break;case 38:_.merge(g[y-4],g[y-2],"",g[y]);break;case 39:_.merge(g[y-4],g[y],g[y-2],"");break;case 40:_.merge(g[y-6],g[y-4],g[y-2],g[y]);break;case 41:_.merge(g[y-6],g[y],g[y-4],g[y-2]);break;case 42:_.merge(g[y-6],g[y-4],g[y],g[y-2]);break;case 43:_.merge(g[y-6],g[y-2],g[y-4],g[y]);break;case 44:_.merge(g[y-6],g[y],g[y-2],g[y-4]);break;case 45:_.merge(g[y-6],g[y-2],g[y],g[y-4]);break;case 46:_.commit(g[y]);break;case 47:_.commit("","",_.commitType.NORMAL,g[y]);break;case 48:_.commit("","",g[y],"");break;case 49:_.commit("","",g[y],g[y-2]);break;case 50:_.commit("","",g[y-2],g[y]);break;case 51:_.commit("",g[y],_.commitType.NORMAL,"");break;case 52:_.commit("",g[y-2],_.commitType.NORMAL,g[y]);break;case 53:_.commit("",g[y],_.commitType.NORMAL,g[y-2]);break;case 54:_.commit("",g[y-2],g[y],"");break;case 55:_.commit("",g[y],g[y-2],"");break;case 56:_.commit("",g[y-4],g[y-2],g[y]);break;case 57:_.commit("",g[y-4],g[y],g[y-2]);break;case 58:_.commit("",g[y-2],g[y-4],g[y]);break;case 59:_.commit("",g[y],g[y-4],g[y-2]);break;case 60:_.commit("",g[y],g[y-2],g[y-4]);break;case 61:_.commit("",g[y-2],g[y],g[y-4]);break;case 62:_.commit(g[y],"",_.commitType.NORMAL,"");break;case 63:_.commit(g[y],"",_.commitType.NORMAL,g[y-2]);break;case 64:_.commit(g[y-2],"",_.commitType.NORMAL,g[y]);break;case 65:_.commit(g[y-2],"",g[y],"");break;case 66:_.commit(g[y],"",g[y-2],"");break;case 67:_.commit(g[y],g[y-2],_.commitType.NORMAL,"");break;case 68:_.commit(g[y-2],g[y],_.commitType.NORMAL,"");break;case 69:_.commit(g[y-4],"",g[y-2],g[y]);break;case 70:_.commit(g[y-4],"",g[y],g[y-2]);break;case 71:_.commit(g[y-2],"",g[y-4],g[y]);break;case 72:_.commit(g[y],"",g[y-4],g[y-2]);break;case 73:_.commit(g[y],"",g[y-2],g[y-4]);break;case 74:_.commit(g[y-2],"",g[y],g[y-4]);break;case 75:_.commit(g[y-4],g[y],g[y-2],"");break;case 76:_.commit(g[y-4],g[y-2],g[y],"");break;case 77:_.commit(g[y-2],g[y],g[y-4],"");break;case 78:_.commit(g[y],g[y-2],g[y-4],"");break;case 79:_.commit(g[y],g[y-4],g[y-2],"");break;case 80:_.commit(g[y-2],g[y-4],g[y],"");break;case 81:_.commit(g[y-4],g[y],_.commitType.NORMAL,g[y-2]);break;case 82:_.commit(g[y-4],g[y-2],_.commitType.NORMAL,g[y]);break;case 83:_.commit(g[y-2],g[y],_.commitType.NORMAL,g[y-4]);break;case 84:_.commit(g[y],g[y-2],_.commitType.NORMAL,g[y-4]);break;case 85:_.commit(g[y],g[y-4],_.commitType.NORMAL,g[y-2]);break;case 86:_.commit(g[y-2],g[y-4],_.commitType.NORMAL,g[y]);break;case 87:_.commit(g[y-6],g[y-4],g[y-2],g[y]);break;case 88:_.commit(g[y-6],g[y-4],g[y],g[y-2]);break;case 89:_.commit(g[y-6],g[y-2],g[y-4],g[y]);break;case 90:_.commit(g[y-6],g[y],g[y-4],g[y-2]);break;case 91:_.commit(g[y-6],g[y-2],g[y],g[y-4]);break;case 92:_.commit(g[y-6],g[y],g[y-2],g[y-4]);break;case 93:_.commit(g[y-4],g[y-6],g[y-2],g[y]);break;case 94:_.commit(g[y-4],g[y-6],g[y],g[y-2]);break;case 95:_.commit(g[y-2],g[y-6],g[y-4],g[y]);break;case 96:_.commit(g[y],g[y-6],g[y-4],g[y-2]);break;case 97:_.commit(g[y-2],g[y-6],g[y],g[y-4]);break;case 98:_.commit(g[y],g[y-6],g[y-2],g[y-4]);break;case 99:_.commit(g[y],g[y-4],g[y-2],g[y-6]);break;case 100:_.commit(g[y-2],g[y-4],g[y],g[y-6]);break;case 101:_.commit(g[y],g[y-2],g[y-4],g[y-6]);break;case 102:_.commit(g[y-2],g[y],g[y-4],g[y-6]);break;case 103:_.commit(g[y-4],g[y-2],g[y],g[y-6]);break;case 104:_.commit(g[y-4],g[y],g[y-2],g[y-6]);break;case 105:_.commit(g[y-2],g[y-4],g[y-6],g[y]);break;case 106:_.commit(g[y],g[y-4],g[y-6],g[y-2]);break;case 107:_.commit(g[y-2],g[y],g[y-6],g[y-4]);break;case 108:_.commit(g[y],g[y-2],g[y-6],g[y-4]);break;case 109:_.commit(g[y-4],g[y-2],g[y-6],g[y]);break;case 110:_.commit(g[y-4],g[y],g[y-6],g[y-2]);break;case 111:this.$="";break;case 112:this.$=g[y];break;case 113:this.$=_.commitType.NORMAL;break;case 114:this.$=_.commitType.REVERSE;break;case 115:this.$=_.commitType.HIGHLIGHT;break;case 118:_.parseDirective("%%{","open_directive");break;case 119:_.parseDirective(g[y],"type_directive");break;case 120:g[y]=g[y].trim().replace(/'/g,'"'),_.parseDirective(g[y],"arg_directive");break;case 121:_.parseDirective("}%%","close_directive","gitGraph");break}},table:[{3:1,4:2,5:3,6:e,8:r,14:i,46:8,50:n,55:s},{1:[3]},{3:10,4:2,5:3,6:e,8:r,14:i,46:8,50:n,55:s},{3:11,4:2,5:3,6:e,8:r,14:i,46:8,50:n,55:s},{7:12,8:a,9:[1,13],10:[1,14],11:15,14:o},t(l,[2,124]),t(l,[2,125]),t(l,[2,126]),{47:17,51:[1,18]},{51:[2,118]},{1:[2,1]},{1:[2,2]},{8:[1,19]},{7:20,8:a,11:15,14:o},{9:[1,21]},t(h,[2,10],{12:22,13:[1,23]}),t(u,[2,9]),{9:[1,25],48:24,53:f},t([9,53],[2,119]),{1:[2,3]},{8:[1,27]},{7:28,8:a,11:15,14:o},{8:[2,7],14:[1,31],15:29,16:30,17:32,18:33,19:34,20:[1,35],22:[1,36],24:[1,37],25:[1,38],26:39,27:[1,40],29:[1,44],32:[1,43],37:[1,42],40:[1,41]},t(u,[2,8]),t(d,[2,116]),{49:45,52:[1,46]},t(d,[2,121]),{1:[2,4]},{8:[1,47]},t(h,[2,11]),{4:48,8:r,14:i,55:s},t(h,[2,13]),t(p,[2,14]),t(p,[2,15]),t(p,[2,16]),{21:[1,49]},{23:[1,50]},t(p,[2,19]),t(p,[2,20]),t(p,[2,21]),{28:51,34:m,54:b},t(p,[2,111],{41:54,33:[1,57],34:[1,59],35:[1,55],38:[1,56],42:[1,58]}),{28:60,34:m,54:b},{33:[1,61],35:[1,62]},{28:63,34:m,54:b},{48:64,53:f},{53:[2,120]},{1:[2,5]},t(h,[2,12]),t(p,[2,17]),t(p,[2,18]),t(p,[2,22]),t(x,[2,122]),t(x,[2,123]),t(p,[2,46]),{34:[1,65]},{39:66,43:k,44:v,45:B},{34:[1,70]},{34:[1,71]},t(p,[2,112]),t(p,[2,30],{33:[1,72],35:[1,74],38:[1,73]}),{34:[1,75]},{34:[1,76],36:[1,77]},t(p,[2,23],{30:[1,78]}),t(d,[2,117]),t(p,[2,47],{33:[1,80],38:[1,79],42:[1,81]}),t(p,[2,48],{33:[1,83],35:[1,82],42:[1,84]}),t(R,[2,113]),t(R,[2,114]),t(R,[2,115]),t(p,[2,51],{35:[1,85],38:[1,86],42:[1,87]}),t(p,[2,62],{33:[1,90],35:[1,88],38:[1,89]}),{34:[1,91]},{39:92,43:k,44:v,45:B},{34:[1,93]},t(p,[2,25],{35:[1,94]}),{33:[1,95]},{33:[1,96]},{31:[1,97]},{39:98,43:k,44:v,45:B},{34:[1,99]},{34:[1,100]},{34:[1,101]},{34:[1,102]},{34:[1,103]},{34:[1,104]},{39:105,43:k,44:v,45:B},{34:[1,106]},{34:[1,107]},{39:108,43:k,44:v,45:B},{34:[1,109]},t(p,[2,31],{35:[1,111],38:[1,110]}),t(p,[2,32],{33:[1,113],35:[1,112]}),t(p,[2,33],{33:[1,114],38:[1,115]}),{34:[1,116],36:[1,117]},{34:[1,118]},{34:[1,119]},t(p,[2,24]),t(p,[2,49],{33:[1,120],42:[1,121]}),t(p,[2,53],{38:[1,122],42:[1,123]}),t(p,[2,63],{33:[1,125],38:[1,124]}),t(p,[2,50],{33:[1,126],42:[1,127]}),t(p,[2,55],{35:[1,128],42:[1,129]}),t(p,[2,66],{33:[1,131],35:[1,130]}),t(p,[2,52],{38:[1,132],42:[1,133]}),t(p,[2,54],{35:[1,134],42:[1,135]}),t(p,[2,67],{35:[1,137],38:[1,136]}),t(p,[2,64],{33:[1,139],38:[1,138]}),t(p,[2,65],{33:[1,141],35:[1,140]}),t(p,[2,68],{35:[1,143],38:[1,142]}),{39:144,43:k,44:v,45:B},{34:[1,145]},{34:[1,146]},{34:[1,147]},{34:[1,148]},{39:149,43:k,44:v,45:B},t(p,[2,26]),t(p,[2,27]),t(p,[2,28]),t(p,[2,29]),{34:[1,150]},{34:[1,151]},{39:152,43:k,44:v,45:B},{34:[1,153]},{39:154,43:k,44:v,45:B},{34:[1,155]},{34:[1,156]},{34:[1,157]},{34:[1,158]},{34:[1,159]},{34:[1,160]},{34:[1,161]},{39:162,43:k,44:v,45:B},{34:[1,163]},{34:[1,164]},{34:[1,165]},{39:166,43:k,44:v,45:B},{34:[1,167]},{39:168,43:k,44:v,45:B},{34:[1,169]},{34:[1,170]},{34:[1,171]},{39:172,43:k,44:v,45:B},{34:[1,173]},t(p,[2,37],{35:[1,174]}),t(p,[2,38],{38:[1,175]}),t(p,[2,36],{33:[1,176]}),t(p,[2,39],{35:[1,177]}),t(p,[2,34],{38:[1,178]}),t(p,[2,35],{33:[1,179]}),t(p,[2,60],{42:[1,180]}),t(p,[2,73],{33:[1,181]}),t(p,[2,61],{42:[1,182]}),t(p,[2,84],{38:[1,183]}),t(p,[2,74],{33:[1,184]}),t(p,[2,83],{38:[1,185]}),t(p,[2,59],{42:[1,186]}),t(p,[2,72],{33:[1,187]}),t(p,[2,58],{42:[1,188]}),t(p,[2,78],{35:[1,189]}),t(p,[2,71],{33:[1,190]}),t(p,[2,77],{35:[1,191]}),t(p,[2,57],{42:[1,192]}),t(p,[2,85],{38:[1,193]}),t(p,[2,56],{42:[1,194]}),t(p,[2,79],{35:[1,195]}),t(p,[2,80],{35:[1,196]}),t(p,[2,86],{38:[1,197]}),t(p,[2,70],{33:[1,198]}),t(p,[2,81],{38:[1,199]}),t(p,[2,69],{33:[1,200]}),t(p,[2,75],{35:[1,201]}),t(p,[2,76],{35:[1,202]}),t(p,[2,82],{38:[1,203]}),{34:[1,204]},{39:205,43:k,44:v,45:B},{34:[1,206]},{34:[1,207]},{39:208,43:k,44:v,45:B},{34:[1,209]},{34:[1,210]},{34:[1,211]},{34:[1,212]},{39:213,43:k,44:v,45:B},{34:[1,214]},{39:215,43:k,44:v,45:B},{34:[1,216]},{34:[1,217]},{34:[1,218]},{34:[1,219]},{34:[1,220]},{34:[1,221]},{34:[1,222]},{39:223,43:k,44:v,45:B},{34:[1,224]},{34:[1,225]},{34:[1,226]},{39:227,43:k,44:v,45:B},{34:[1,228]},{39:229,43:k,44:v,45:B},{34:[1,230]},{34:[1,231]},{34:[1,232]},{39:233,43:k,44:v,45:B},t(p,[2,40]),t(p,[2,42]),t(p,[2,41]),t(p,[2,43]),t(p,[2,45]),t(p,[2,44]),t(p,[2,101]),t(p,[2,102]),t(p,[2,99]),t(p,[2,100]),t(p,[2,104]),t(p,[2,103]),t(p,[2,108]),t(p,[2,107]),t(p,[2,106]),t(p,[2,105]),t(p,[2,110]),t(p,[2,109]),t(p,[2,98]),t(p,[2,97]),t(p,[2,96]),t(p,[2,95]),t(p,[2,93]),t(p,[2,94]),t(p,[2,92]),t(p,[2,91]),t(p,[2,90]),t(p,[2,89]),t(p,[2,87]),t(p,[2,88])],defaultActions:{9:[2,118],10:[2,1],11:[2,2],19:[2,3],27:[2,4],46:[2,120],47:[2,5]},parseError:function(C,S){if(S.recoverable)this.trace(C);else{var E=new Error(C);throw E.hash=S,E}},parse:function(C){var S=this,E=[0],_=[],w=[null],g=[],D=this.table,y="",N=0,nt=0,Y=2,Z=1,J=g.slice.call(arguments,1),X=Object.create(this.lexer),tt={yy:{}};for(var ot in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ot)&&(tt.yy[ot]=this.yy[ot]);X.setInput(C,tt.yy),tt.yy.lexer=X,tt.yy.parser=this,typeof X.yylloc>"u"&&(X.yylloc={});var at=X.yylloc;g.push(at);var U=X.options&&X.options.ranges;typeof tt.yy.parseError=="function"?this.parseError=tt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Tt(){var Dt;return Dt=_.pop()||X.lex()||Z,typeof Dt!="number"&&(Dt instanceof Array&&(_=Dt,Dt=_.pop()),Dt=S.symbols_[Dt]||Dt),Dt}for(var $,j,W,z,A={},M,q,L,st;;){if(j=E[E.length-1],this.defaultActions[j]?W=this.defaultActions[j]:(($===null||typeof $>"u")&&($=Tt()),W=D[j]&&D[j][$]),typeof W>"u"||!W.length||!W[0]){var T="";st=[];for(M in D[j])this.terminals_[M]&&M>Y&&st.push("'"+this.terminals_[M]+"'");X.showPosition?T="Parse error on line "+(N+1)+`:
1139
+ `},aI=(t,e)=>{Qo[t]=e},oI=sI;let j1="",Yc="",X1="";const K1=t=>Ur(t,G()),Lr=function(){j1="",X1="",Yc=""},kr=function(t){j1=K1(t).replace(/^\s+/g,"")},Br=function(){return j1||Yc},Dr=function(t){X1=K1(t).replace(/\n\s+/g,`
1140
+ `)},Ir=function(){return X1},si=function(t){Yc=K1(t)},ai=function(){return Yc},lI={setAccTitle:kr,getAccTitle:Br,setDiagramTitle:si,getDiagramTitle:ai,getAccDescription:Ir,setAccDescription:Dr,clear:Lr},cI=Object.freeze(Object.defineProperty({__proto__:null,clear:Lr,default:lI,getAccDescription:Ir,getAccTitle:Br,getDiagramTitle:ai,setAccDescription:Dr,setAccTitle:kr,setDiagramTitle:si},Symbol.toStringTag,{value:"Module"}));let wn={};const Ay=function(t,e,r,i){I.debug("parseDirective is being called",e,r,i);try{if(e!==void 0)switch(e=e.trim(),r){case"open_directive":wn={};break;case"type_directive":if(!wn)throw new Error("currentDirective is undefined");wn.type=e.toLowerCase();break;case"arg_directive":if(!wn)throw new Error("currentDirective is undefined");wn.args=JSON.parse(e);break;case"close_directive":hI(t,wn,i),wn=void 0;break}}catch(n){I.error(`Error while rendering sequenceDiagram directive: ${e} jison context: ${r}`),I.error(n.message)}},hI=function(t,e,r){switch(I.info(`Directive type=${e.type} with args:`,e.args),e.type){case"init":case"initialize":{["config"].forEach(i=>{e.args[i]!==void 0&&(r==="flowchart-v2"&&(r="flowchart"),e.args[r]=e.args[i],delete e.args[i])}),I.info("sanitize in handleDirective",e.args),Vn(e.args),I.info("sanitize in handleDirective (done)",e.args),$1(e.args);break}case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap(e.type==="wrap");break;case"themeCss":I.warn("themeCss encountered");break;default:I.warn(`Unhandled directive: source: '%%{${e.type}: ${JSON.stringify(e.args?e.args:{})}}%%`,e);break}},uI=I,fI=Y1,ho=G,dI=t=>Ur(t,ho()),Ly=Vc,pI=()=>cI,gI=(t,e,r,i)=>Ay(t,e,r,i),Pl={},Ye=(t,e,r)=>{if(Pl[t])throw new Error(`Diagram ${t} already registered.`);Pl[t]=e,r&&cy(t,r),aI(t,e.styles),e.injectUtils&&e.injectUtils(uI,fI,ho,dI,Ly,pI(),gI)},By=t=>{if(t in Pl)return Pl[t];throw new Error(`Diagram ${t} not found.`)};var Cu=function(){var t=function(F,C,S,E){for(S=S||{},E=F.length;E--;S[F[E]]=C);return S},e=[1,4],r=[1,7],i=[1,5],n=[1,9],s=[1,6],a=[2,6],o=[1,16],l=[6,8,14,20,22,24,25,27,29,32,37,40,50,55],h=[8,14,20,22,24,25,27,29,32,37,40],u=[8,13,14,20,22,24,25,27,29,32,37,40],f=[1,26],d=[6,8,14,50,55],p=[8,14,55],m=[1,53],b=[1,52],x=[8,14,30,33,35,38,55],k=[1,67],v=[1,68],B=[1,69],R=[8,14,33,35,42,55],P={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,GG:6,document:7,EOF:8,":":9,DIR:10,options:11,body:12,OPT:13,NL:14,line:15,statement:16,commitStatement:17,mergeStatement:18,cherryPickStatement:19,acc_title:20,acc_title_value:21,acc_descr:22,acc_descr_value:23,acc_descr_multiline_value:24,section:25,branchStatement:26,CHECKOUT:27,ref:28,BRANCH:29,ORDER:30,NUM:31,CHERRY_PICK:32,COMMIT_ID:33,STR:34,COMMIT_TAG:35,EMPTYSTR:36,MERGE:37,COMMIT_TYPE:38,commitType:39,COMMIT:40,commit_arg:41,COMMIT_MSG:42,NORMAL:43,REVERSE:44,HIGHLIGHT:45,openDirective:46,typeDirective:47,closeDirective:48,argDirective:49,open_directive:50,type_directive:51,arg_directive:52,close_directive:53,ID:54,";":55,$accept:0,$end:1},terminals_:{2:"error",6:"GG",8:"EOF",9:":",10:"DIR",13:"OPT",14:"NL",20:"acc_title",21:"acc_title_value",22:"acc_descr",23:"acc_descr_value",24:"acc_descr_multiline_value",25:"section",27:"CHECKOUT",29:"BRANCH",30:"ORDER",31:"NUM",32:"CHERRY_PICK",33:"COMMIT_ID",34:"STR",35:"COMMIT_TAG",36:"EMPTYSTR",37:"MERGE",38:"COMMIT_TYPE",40:"COMMIT",42:"COMMIT_MSG",43:"NORMAL",44:"REVERSE",45:"HIGHLIGHT",50:"open_directive",51:"type_directive",52:"arg_directive",53:"close_directive",54:"ID",55:";"},productions_:[0,[3,2],[3,2],[3,3],[3,4],[3,5],[7,0],[7,2],[11,2],[11,1],[12,0],[12,2],[15,2],[15,1],[16,1],[16,1],[16,1],[16,2],[16,2],[16,1],[16,1],[16,1],[16,2],[26,2],[26,4],[19,3],[19,5],[19,5],[19,5],[19,5],[18,2],[18,4],[18,4],[18,4],[18,6],[18,6],[18,6],[18,6],[18,6],[18,6],[18,8],[18,8],[18,8],[18,8],[18,8],[18,8],[17,2],[17,3],[17,3],[17,5],[17,5],[17,3],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,3],[17,5],[17,5],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[41,0],[41,1],[39,1],[39,1],[39,1],[5,3],[5,5],[46,1],[47,1],[49,1],[48,1],[28,1],[28,1],[4,1],[4,1],[4,1]],performAction:function(C,S,E,_,w,g,D){var y=g.length-1;switch(w){case 3:return g[y];case 4:return g[y-1];case 5:return _.setDirection(g[y-3]),g[y-1];case 7:_.setOptions(g[y-1]),this.$=g[y];break;case 8:g[y-1]+=g[y],this.$=g[y-1];break;case 10:this.$=[];break;case 11:g[y-1].push(g[y]),this.$=g[y-1];break;case 12:this.$=g[y-1];break;case 17:this.$=g[y].trim(),_.setAccTitle(this.$);break;case 18:case 19:this.$=g[y].trim(),_.setAccDescription(this.$);break;case 20:_.addSection(g[y].substr(8)),this.$=g[y].substr(8);break;case 22:_.checkout(g[y]);break;case 23:_.branch(g[y]);break;case 24:_.branch(g[y-2],g[y]);break;case 25:_.cherryPick(g[y],"",void 0);break;case 26:_.cherryPick(g[y-2],"",g[y]);break;case 27:case 29:_.cherryPick(g[y-2],"","");break;case 28:_.cherryPick(g[y],"",g[y-2]);break;case 30:_.merge(g[y],"","","");break;case 31:_.merge(g[y-2],g[y],"","");break;case 32:_.merge(g[y-2],"",g[y],"");break;case 33:_.merge(g[y-2],"","",g[y]);break;case 34:_.merge(g[y-4],g[y],"",g[y-2]);break;case 35:_.merge(g[y-4],"",g[y],g[y-2]);break;case 36:_.merge(g[y-4],"",g[y-2],g[y]);break;case 37:_.merge(g[y-4],g[y-2],g[y],"");break;case 38:_.merge(g[y-4],g[y-2],"",g[y]);break;case 39:_.merge(g[y-4],g[y],g[y-2],"");break;case 40:_.merge(g[y-6],g[y-4],g[y-2],g[y]);break;case 41:_.merge(g[y-6],g[y],g[y-4],g[y-2]);break;case 42:_.merge(g[y-6],g[y-4],g[y],g[y-2]);break;case 43:_.merge(g[y-6],g[y-2],g[y-4],g[y]);break;case 44:_.merge(g[y-6],g[y],g[y-2],g[y-4]);break;case 45:_.merge(g[y-6],g[y-2],g[y],g[y-4]);break;case 46:_.commit(g[y]);break;case 47:_.commit("","",_.commitType.NORMAL,g[y]);break;case 48:_.commit("","",g[y],"");break;case 49:_.commit("","",g[y],g[y-2]);break;case 50:_.commit("","",g[y-2],g[y]);break;case 51:_.commit("",g[y],_.commitType.NORMAL,"");break;case 52:_.commit("",g[y-2],_.commitType.NORMAL,g[y]);break;case 53:_.commit("",g[y],_.commitType.NORMAL,g[y-2]);break;case 54:_.commit("",g[y-2],g[y],"");break;case 55:_.commit("",g[y],g[y-2],"");break;case 56:_.commit("",g[y-4],g[y-2],g[y]);break;case 57:_.commit("",g[y-4],g[y],g[y-2]);break;case 58:_.commit("",g[y-2],g[y-4],g[y]);break;case 59:_.commit("",g[y],g[y-4],g[y-2]);break;case 60:_.commit("",g[y],g[y-2],g[y-4]);break;case 61:_.commit("",g[y-2],g[y],g[y-4]);break;case 62:_.commit(g[y],"",_.commitType.NORMAL,"");break;case 63:_.commit(g[y],"",_.commitType.NORMAL,g[y-2]);break;case 64:_.commit(g[y-2],"",_.commitType.NORMAL,g[y]);break;case 65:_.commit(g[y-2],"",g[y],"");break;case 66:_.commit(g[y],"",g[y-2],"");break;case 67:_.commit(g[y],g[y-2],_.commitType.NORMAL,"");break;case 68:_.commit(g[y-2],g[y],_.commitType.NORMAL,"");break;case 69:_.commit(g[y-4],"",g[y-2],g[y]);break;case 70:_.commit(g[y-4],"",g[y],g[y-2]);break;case 71:_.commit(g[y-2],"",g[y-4],g[y]);break;case 72:_.commit(g[y],"",g[y-4],g[y-2]);break;case 73:_.commit(g[y],"",g[y-2],g[y-4]);break;case 74:_.commit(g[y-2],"",g[y],g[y-4]);break;case 75:_.commit(g[y-4],g[y],g[y-2],"");break;case 76:_.commit(g[y-4],g[y-2],g[y],"");break;case 77:_.commit(g[y-2],g[y],g[y-4],"");break;case 78:_.commit(g[y],g[y-2],g[y-4],"");break;case 79:_.commit(g[y],g[y-4],g[y-2],"");break;case 80:_.commit(g[y-2],g[y-4],g[y],"");break;case 81:_.commit(g[y-4],g[y],_.commitType.NORMAL,g[y-2]);break;case 82:_.commit(g[y-4],g[y-2],_.commitType.NORMAL,g[y]);break;case 83:_.commit(g[y-2],g[y],_.commitType.NORMAL,g[y-4]);break;case 84:_.commit(g[y],g[y-2],_.commitType.NORMAL,g[y-4]);break;case 85:_.commit(g[y],g[y-4],_.commitType.NORMAL,g[y-2]);break;case 86:_.commit(g[y-2],g[y-4],_.commitType.NORMAL,g[y]);break;case 87:_.commit(g[y-6],g[y-4],g[y-2],g[y]);break;case 88:_.commit(g[y-6],g[y-4],g[y],g[y-2]);break;case 89:_.commit(g[y-6],g[y-2],g[y-4],g[y]);break;case 90:_.commit(g[y-6],g[y],g[y-4],g[y-2]);break;case 91:_.commit(g[y-6],g[y-2],g[y],g[y-4]);break;case 92:_.commit(g[y-6],g[y],g[y-2],g[y-4]);break;case 93:_.commit(g[y-4],g[y-6],g[y-2],g[y]);break;case 94:_.commit(g[y-4],g[y-6],g[y],g[y-2]);break;case 95:_.commit(g[y-2],g[y-6],g[y-4],g[y]);break;case 96:_.commit(g[y],g[y-6],g[y-4],g[y-2]);break;case 97:_.commit(g[y-2],g[y-6],g[y],g[y-4]);break;case 98:_.commit(g[y],g[y-6],g[y-2],g[y-4]);break;case 99:_.commit(g[y],g[y-4],g[y-2],g[y-6]);break;case 100:_.commit(g[y-2],g[y-4],g[y],g[y-6]);break;case 101:_.commit(g[y],g[y-2],g[y-4],g[y-6]);break;case 102:_.commit(g[y-2],g[y],g[y-4],g[y-6]);break;case 103:_.commit(g[y-4],g[y-2],g[y],g[y-6]);break;case 104:_.commit(g[y-4],g[y],g[y-2],g[y-6]);break;case 105:_.commit(g[y-2],g[y-4],g[y-6],g[y]);break;case 106:_.commit(g[y],g[y-4],g[y-6],g[y-2]);break;case 107:_.commit(g[y-2],g[y],g[y-6],g[y-4]);break;case 108:_.commit(g[y],g[y-2],g[y-6],g[y-4]);break;case 109:_.commit(g[y-4],g[y-2],g[y-6],g[y]);break;case 110:_.commit(g[y-4],g[y],g[y-6],g[y-2]);break;case 111:this.$="";break;case 112:this.$=g[y];break;case 113:this.$=_.commitType.NORMAL;break;case 114:this.$=_.commitType.REVERSE;break;case 115:this.$=_.commitType.HIGHLIGHT;break;case 118:_.parseDirective("%%{","open_directive");break;case 119:_.parseDirective(g[y],"type_directive");break;case 120:g[y]=g[y].trim().replace(/'/g,'"'),_.parseDirective(g[y],"arg_directive");break;case 121:_.parseDirective("}%%","close_directive","gitGraph");break}},table:[{3:1,4:2,5:3,6:e,8:r,14:i,46:8,50:n,55:s},{1:[3]},{3:10,4:2,5:3,6:e,8:r,14:i,46:8,50:n,55:s},{3:11,4:2,5:3,6:e,8:r,14:i,46:8,50:n,55:s},{7:12,8:a,9:[1,13],10:[1,14],11:15,14:o},t(l,[2,124]),t(l,[2,125]),t(l,[2,126]),{47:17,51:[1,18]},{51:[2,118]},{1:[2,1]},{1:[2,2]},{8:[1,19]},{7:20,8:a,11:15,14:o},{9:[1,21]},t(h,[2,10],{12:22,13:[1,23]}),t(u,[2,9]),{9:[1,25],48:24,53:f},t([9,53],[2,119]),{1:[2,3]},{8:[1,27]},{7:28,8:a,11:15,14:o},{8:[2,7],14:[1,31],15:29,16:30,17:32,18:33,19:34,20:[1,35],22:[1,36],24:[1,37],25:[1,38],26:39,27:[1,40],29:[1,44],32:[1,43],37:[1,42],40:[1,41]},t(u,[2,8]),t(d,[2,116]),{49:45,52:[1,46]},t(d,[2,121]),{1:[2,4]},{8:[1,47]},t(h,[2,11]),{4:48,8:r,14:i,55:s},t(h,[2,13]),t(p,[2,14]),t(p,[2,15]),t(p,[2,16]),{21:[1,49]},{23:[1,50]},t(p,[2,19]),t(p,[2,20]),t(p,[2,21]),{28:51,34:m,54:b},t(p,[2,111],{41:54,33:[1,57],34:[1,59],35:[1,55],38:[1,56],42:[1,58]}),{28:60,34:m,54:b},{33:[1,61],35:[1,62]},{28:63,34:m,54:b},{48:64,53:f},{53:[2,120]},{1:[2,5]},t(h,[2,12]),t(p,[2,17]),t(p,[2,18]),t(p,[2,22]),t(x,[2,122]),t(x,[2,123]),t(p,[2,46]),{34:[1,65]},{39:66,43:k,44:v,45:B},{34:[1,70]},{34:[1,71]},t(p,[2,112]),t(p,[2,30],{33:[1,72],35:[1,74],38:[1,73]}),{34:[1,75]},{34:[1,76],36:[1,77]},t(p,[2,23],{30:[1,78]}),t(d,[2,117]),t(p,[2,47],{33:[1,80],38:[1,79],42:[1,81]}),t(p,[2,48],{33:[1,83],35:[1,82],42:[1,84]}),t(R,[2,113]),t(R,[2,114]),t(R,[2,115]),t(p,[2,51],{35:[1,85],38:[1,86],42:[1,87]}),t(p,[2,62],{33:[1,90],35:[1,88],38:[1,89]}),{34:[1,91]},{39:92,43:k,44:v,45:B},{34:[1,93]},t(p,[2,25],{35:[1,94]}),{33:[1,95]},{33:[1,96]},{31:[1,97]},{39:98,43:k,44:v,45:B},{34:[1,99]},{34:[1,100]},{34:[1,101]},{34:[1,102]},{34:[1,103]},{34:[1,104]},{39:105,43:k,44:v,45:B},{34:[1,106]},{34:[1,107]},{39:108,43:k,44:v,45:B},{34:[1,109]},t(p,[2,31],{35:[1,111],38:[1,110]}),t(p,[2,32],{33:[1,113],35:[1,112]}),t(p,[2,33],{33:[1,114],38:[1,115]}),{34:[1,116],36:[1,117]},{34:[1,118]},{34:[1,119]},t(p,[2,24]),t(p,[2,49],{33:[1,120],42:[1,121]}),t(p,[2,53],{38:[1,122],42:[1,123]}),t(p,[2,63],{33:[1,125],38:[1,124]}),t(p,[2,50],{33:[1,126],42:[1,127]}),t(p,[2,55],{35:[1,128],42:[1,129]}),t(p,[2,66],{33:[1,131],35:[1,130]}),t(p,[2,52],{38:[1,132],42:[1,133]}),t(p,[2,54],{35:[1,134],42:[1,135]}),t(p,[2,67],{35:[1,137],38:[1,136]}),t(p,[2,64],{33:[1,139],38:[1,138]}),t(p,[2,65],{33:[1,141],35:[1,140]}),t(p,[2,68],{35:[1,143],38:[1,142]}),{39:144,43:k,44:v,45:B},{34:[1,145]},{34:[1,146]},{34:[1,147]},{34:[1,148]},{39:149,43:k,44:v,45:B},t(p,[2,26]),t(p,[2,27]),t(p,[2,28]),t(p,[2,29]),{34:[1,150]},{34:[1,151]},{39:152,43:k,44:v,45:B},{34:[1,153]},{39:154,43:k,44:v,45:B},{34:[1,155]},{34:[1,156]},{34:[1,157]},{34:[1,158]},{34:[1,159]},{34:[1,160]},{34:[1,161]},{39:162,43:k,44:v,45:B},{34:[1,163]},{34:[1,164]},{34:[1,165]},{39:166,43:k,44:v,45:B},{34:[1,167]},{39:168,43:k,44:v,45:B},{34:[1,169]},{34:[1,170]},{34:[1,171]},{39:172,43:k,44:v,45:B},{34:[1,173]},t(p,[2,37],{35:[1,174]}),t(p,[2,38],{38:[1,175]}),t(p,[2,36],{33:[1,176]}),t(p,[2,39],{35:[1,177]}),t(p,[2,34],{38:[1,178]}),t(p,[2,35],{33:[1,179]}),t(p,[2,60],{42:[1,180]}),t(p,[2,73],{33:[1,181]}),t(p,[2,61],{42:[1,182]}),t(p,[2,84],{38:[1,183]}),t(p,[2,74],{33:[1,184]}),t(p,[2,83],{38:[1,185]}),t(p,[2,59],{42:[1,186]}),t(p,[2,72],{33:[1,187]}),t(p,[2,58],{42:[1,188]}),t(p,[2,78],{35:[1,189]}),t(p,[2,71],{33:[1,190]}),t(p,[2,77],{35:[1,191]}),t(p,[2,57],{42:[1,192]}),t(p,[2,85],{38:[1,193]}),t(p,[2,56],{42:[1,194]}),t(p,[2,79],{35:[1,195]}),t(p,[2,80],{35:[1,196]}),t(p,[2,86],{38:[1,197]}),t(p,[2,70],{33:[1,198]}),t(p,[2,81],{38:[1,199]}),t(p,[2,69],{33:[1,200]}),t(p,[2,75],{35:[1,201]}),t(p,[2,76],{35:[1,202]}),t(p,[2,82],{38:[1,203]}),{34:[1,204]},{39:205,43:k,44:v,45:B},{34:[1,206]},{34:[1,207]},{39:208,43:k,44:v,45:B},{34:[1,209]},{34:[1,210]},{34:[1,211]},{34:[1,212]},{39:213,43:k,44:v,45:B},{34:[1,214]},{39:215,43:k,44:v,45:B},{34:[1,216]},{34:[1,217]},{34:[1,218]},{34:[1,219]},{34:[1,220]},{34:[1,221]},{34:[1,222]},{39:223,43:k,44:v,45:B},{34:[1,224]},{34:[1,225]},{34:[1,226]},{39:227,43:k,44:v,45:B},{34:[1,228]},{39:229,43:k,44:v,45:B},{34:[1,230]},{34:[1,231]},{34:[1,232]},{39:233,43:k,44:v,45:B},t(p,[2,40]),t(p,[2,42]),t(p,[2,41]),t(p,[2,43]),t(p,[2,45]),t(p,[2,44]),t(p,[2,101]),t(p,[2,102]),t(p,[2,99]),t(p,[2,100]),t(p,[2,104]),t(p,[2,103]),t(p,[2,108]),t(p,[2,107]),t(p,[2,106]),t(p,[2,105]),t(p,[2,110]),t(p,[2,109]),t(p,[2,98]),t(p,[2,97]),t(p,[2,96]),t(p,[2,95]),t(p,[2,93]),t(p,[2,94]),t(p,[2,92]),t(p,[2,91]),t(p,[2,90]),t(p,[2,89]),t(p,[2,87]),t(p,[2,88])],defaultActions:{9:[2,118],10:[2,1],11:[2,2],19:[2,3],27:[2,4],46:[2,120],47:[2,5]},parseError:function(C,S){if(S.recoverable)this.trace(C);else{var E=new Error(C);throw E.hash=S,E}},parse:function(C){var S=this,E=[0],_=[],w=[null],g=[],D=this.table,y="",N=0,nt=0,Y=2,Z=1,J=g.slice.call(arguments,1),X=Object.create(this.lexer),tt={yy:{}};for(var ot in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ot)&&(tt.yy[ot]=this.yy[ot]);X.setInput(C,tt.yy),tt.yy.lexer=X,tt.yy.parser=this,typeof X.yylloc>"u"&&(X.yylloc={});var at=X.yylloc;g.push(at);var U=X.options&&X.options.ranges;typeof tt.yy.parseError=="function"?this.parseError=tt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Tt(){var Dt;return Dt=_.pop()||X.lex()||Z,typeof Dt!="number"&&(Dt instanceof Array&&(_=Dt,Dt=_.pop()),Dt=S.symbols_[Dt]||Dt),Dt}for(var $,j,W,z,A={},M,q,L,st;;){if(j=E[E.length-1],this.defaultActions[j]?W=this.defaultActions[j]:(($===null||typeof $>"u")&&($=Tt()),W=D[j]&&D[j][$]),typeof W>"u"||!W.length||!W[0]){var T="";st=[];for(M in D[j])this.terminals_[M]&&M>Y&&st.push("'"+this.terminals_[M]+"'");X.showPosition?T="Parse error on line "+(N+1)+`:
1141
1141
  `+X.showPosition()+`
1142
1142
  Expecting `+st.join(", ")+", got '"+(this.terminals_[$]||$)+"'":T="Parse error on line "+(N+1)+": Unexpected "+($==Z?"end of input":"'"+(this.terminals_[$]||$)+"'"),this.parseError(T,{text:X.match,token:this.terminals_[$]||$,line:X.yylineno,loc:at,expected:st})}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+$);switch(W[0]){case 1:E.push($),w.push(X.yytext),g.push(X.yylloc),E.push(W[1]),$=null,nt=X.yyleng,y=X.yytext,N=X.yylineno,at=X.yylloc;break;case 2:if(q=this.productions_[W[1]][1],A.$=w[w.length-q],A._$={first_line:g[g.length-(q||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(q||1)].first_column,last_column:g[g.length-1].last_column},U&&(A._$.range=[g[g.length-(q||1)].range[0],g[g.length-1].range[1]]),z=this.performAction.apply(A,[y,nt,N,tt.yy,W[1],w,g].concat(J)),typeof z<"u")return z;q&&(E=E.slice(0,-1*q*2),w=w.slice(0,-1*q),g=g.slice(0,-1*q)),E.push(this.productions_[W[1]][0]),w.push(A.$),g.push(A._$),L=D[E[E.length-2]][E[E.length-1]],E.push(L);break;case 3:return!0}}return!0}},V=function(){var F={EOF:1,parseError:function(S,E){if(this.yy.parser)this.yy.parser.parseError(S,E);else throw new Error(S)},setInput:function(C,S){return this.yy=S||this.yy||{},this._input=C,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},input:function(){var C=this._input[0];this.yytext+=C,this.yyleng++,this.offset++,this.match+=C,this.matched+=C;var S=C.match(/(?:\r\n?|\n).*/g);return S?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),C},unput:function(C){var S=C.length,E=C.split(/(?:\r\n?|\n)/g);this._input=C+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-S),this.offset-=S;var _=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),E.length-1&&(this.yylineno-=E.length-1);var w=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:E?(E.length===_.length?this.yylloc.first_column:0)+_[_.length-E.length].length-E[0].length:this.yylloc.first_column-S},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-S]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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).
1143
1143
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(C){this.unput(this.match.slice(C))},pastInput:function(){var C=this.matched.substr(0,this.matched.length-this.match.length);return(C.length>20?"...":"")+C.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var C=this.match;return C.length<20&&(C+=this._input.substr(0,20-C.length)),(C.substr(0,20)+(C.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var C=this.pastInput(),S=new Array(C.length+1).join("-");return C+this.upcomingInput()+`
1144
1144
  `+S+"^"},test_match:function(C,S){var E,_,w;if(this.options.backtrack_lexer&&(w={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&&(w.yylloc.range=this.yylloc.range.slice(0))),_=C[0].match(/(?:\r\n?|\n).*/g),_&&(this.yylineno+=_.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:_?_[_.length-1].length-_[_.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+C[0].length},this.yytext+=C[0],this.match+=C[0],this.matches=C,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(C[0].length),this.matched+=C[0],E=this.performAction.call(this,this.yy,this,S,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),E)return E;if(this._backtrack){for(var g in w)this[g]=w[g];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var C,S,E,_;this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),g=0;g<w.length;g++)if(E=this._input.match(this.rules[w[g]]),E&&(!S||E[0].length>S[0].length)){if(S=E,_=g,this.options.backtrack_lexer){if(C=this.test_match(E,w[g]),C!==!1)return C;if(this._backtrack){S=!1;continue}else return!1}else if(!this.options.flex)break}return S?(C=this.test_match(S,w[_]),C!==!1?C:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1145
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var S=this.next();return S||this.lex()},begin:function(S){this.conditionStack.push(S)},popState:function(){var S=this.conditionStack.length-1;return S>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(S){return S=this.conditionStack.length-1-Math.abs(S||0),S>=0?this.conditionStack[S]:"INITIAL"},pushState:function(S){this.begin(S)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(S,E,_,w){switch(_){case 0:return this.begin("open_directive"),50;case 1:return this.begin("type_directive"),51;case 2:return this.popState(),this.begin("arg_directive"),9;case 3:return this.popState(),this.popState(),53;case 4:return 52;case 5:return this.begin("acc_title"),20;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),22;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:return 14;case 13:break;case 14:break;case 15:return 6;case 16:return 40;case 17:return 33;case 18:return 38;case 19:return 42;case 20:return 43;case 21:return 44;case 22:return 45;case 23:return 35;case 24:return 29;case 25:return 30;case 26:return 37;case 27:return 32;case 28:return 27;case 29:return 10;case 30:return 10;case 31:return 9;case 32:return"CARET";case 33:this.begin("options");break;case 34:this.popState();break;case 35:return 13;case 36:return 36;case 37:this.begin("string");break;case 38:this.popState();break;case 39:return 34;case 40:return 31;case 41:return 54;case 42:return 8}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit(?=\s|$))/i,/^(?:id:)/i,/^(?:type:)/i,/^(?:msg:)/i,/^(?:NORMAL\b)/i,/^(?:REVERSE\b)/i,/^(?:HIGHLIGHT\b)/i,/^(?:tag:)/i,/^(?:branch(?=\s|$))/i,/^(?:order:)/i,/^(?:merge(?=\s|$))/i,/^(?:cherry-pick(?=\s|$))/i,/^(?:checkout(?=\s|$))/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:[ \r\n\t]+end\b)/i,/^(?:[\s\S]+(?=[ \r\n\t]+end))/i,/^(?:["]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[0-9]+(?=\s|$))/i,/^(?:\w([-\./\w]*[-\w])?)/i,/^(?:$)/i,/^(?:\s+)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},options:{rules:[34,35],inclusive:!1},string:{rules:[38,39],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,36,37,40,41,42,43],inclusive:!0}}};return F}();P.lexer=V;function O(){this.yy={}}return O.prototype=P,P.Parser=O,new O}();Cu.parser=Cu;const gI=Cu,yI=t=>t.match(/^\s*gitGraph/)!==null;let Vl=G().gitGraph.mainBranchName,mI=G().gitGraph.mainBranchOrder,We={},ur=null,Ha={};Ha[Vl]={name:Vl,order:mI};let Ne={};Ne[Vl]=ur;let je=Vl,By="LR",Yn=0;function K1(){return uy({length:7})}const bI=function(t,e,r){xe.parseDirective(this,t,e,r)};function _I(t,e){const r=Object.create(null);return t.reduce((i,n)=>{const s=e(n);return r[s]||(r[s]=!0,i.push(n)),i},[])}const xI=function(t){By=t};let Dy={};const vI=function(t){I.debug("options str",t),t=t&&t.trim(),t=t||"{}";try{Dy=JSON.parse(t)}catch(e){I.error("error while parsing gitGraph options",e.message)}},kI=function(){return Dy},wI=function(t,e,r,i){I.debug("Entering commit:",t,e,r,i),e=Xt.sanitizeText(e,G()),t=Xt.sanitizeText(t,G()),i=Xt.sanitizeText(i,G());const n={id:e||Yn+"-"+K1(),message:t,seq:Yn++,type:r||qa.NORMAL,tag:i||"",parents:ur==null?[]:[ur.id],branch:je};ur=n,We[n.id]=n,Ne[je]=n.id,I.debug("in pushCommit "+n.id)},TI=function(t,e){if(t=Xt.sanitizeText(t,G()),Ne[t]===void 0)Ne[t]=ur!=null?ur.id:null,Ha[t]={name:t,order:e?parseInt(e,10):null},Iy(t),I.debug("in createBranch");else{let r=new Error('Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout '+t+'")');throw r.hash={text:"branch "+t,token:"branch "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+t+'"']},r}},EI=function(t,e,r,i){t=Xt.sanitizeText(t,G()),e=Xt.sanitizeText(e,G());const n=We[Ne[je]],s=We[Ne[t]];if(je===t){let o=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},o}else if(n===void 0||!n){let o=new Error('Incorrect usage of "merge". Current branch ('+je+")has no commits");throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["commit"]},o}else if(Ne[t]===void 0){let o=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch "+t]},o}else if(s===void 0||!s){let o=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"commit"']},o}else if(n===s){let o=new Error('Incorrect usage of "merge". Both branches have same head');throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},o}else if(e&&We[e]!==void 0){let o=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom Id");throw o.hash={text:"merge "+t+e+r+i,token:"merge "+t+e+r+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["merge "+t+" "+e+"_UNIQUE "+r+" "+i]},o}const a={id:e||Yn+"-"+K1(),message:"merged branch "+t+" into "+je,seq:Yn++,parents:[ur==null?null:ur.id,Ne[t]],branch:je,type:qa.MERGE,customType:r,customId:!!e,tag:i||""};ur=a,We[a.id]=a,Ne[je]=a.id,I.debug(Ne),I.debug("in mergeBranch")},CI=function(t,e,r){if(I.debug("Entering cherryPick:",t,e,r),t=Xt.sanitizeText(t,G()),e=Xt.sanitizeText(e,G()),r=Xt.sanitizeText(r,G()),!t||We[t]===void 0){let s=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw s.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},s}let i=We[t],n=i.branch;if(i.type===qa.MERGE){let s=new Error('Incorrect usage of "cherryPick". Source commit should not be a merge commit');throw s.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},s}if(!e||We[e]===void 0){if(n===je){let o=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw o.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},o}const s=We[Ne[je]];if(s===void 0||!s){let o=new Error('Incorrect usage of "cherry-pick". Current branch ('+je+")has no commits");throw o.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},o}const a={id:Yn+"-"+K1(),message:"cherry-picked "+i+" into "+je,seq:Yn++,parents:[ur==null?null:ur.id,i.id],branch:je,type:qa.CHERRY_PICK,tag:r??"cherry-pick:"+i.id};ur=a,We[a.id]=a,Ne[je]=a.id,I.debug(Ne),I.debug("in cherryPick")}},Iy=function(t){if(t=Xt.sanitizeText(t,G()),Ne[t]===void 0){let e=new Error('Trying to checkout branch which is not yet created. (Help try using "branch '+t+'")');throw e.hash={text:"checkout "+t,token:"checkout "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"branch '+t+'"']},e}else{je=t;const e=Ne[je];ur=We[e]}};function Dd(t,e,r){const i=t.indexOf(e);i===-1?t.push(r):t.splice(i,1,r)}function My(t){const e=t.reduce((n,s)=>n.seq>s.seq?n:s,t[0]);let r="";t.forEach(function(n){n===e?r+=" *":r+=" |"});const i=[r,e.id,e.seq];for(let n in Ne)Ne[n]===e.id&&i.push(n);if(I.debug(i.join(" ")),e.parents&&e.parents.length==2){const n=We[e.parents[0]];Dd(t,e,n),t.push(We[e.parents[1]])}else{if(e.parents.length==0)return;{const n=We[e.parents];Dd(t,e,n)}}t=_I(t,n=>n.id),My(t)}const SI=function(){I.debug(We);const t=Ny()[0];My([t])},AI=function(){We={},ur=null;let t=G().gitGraph.mainBranchName,e=G().gitGraph.mainBranchOrder;Ne={},Ne[t]=null,Ha={},Ha[t]={name:t,order:e},je=t,Yn=0,Lr()},LI=function(){return Object.values(Ha).map((e,r)=>e.order!==null?e:{...e,order:parseFloat(`0.${r}`,10)}).sort((e,r)=>e.order-r.order).map(({name:e})=>({name:e}))},BI=function(){return Ne},DI=function(){return We},Ny=function(){const t=Object.keys(We).map(function(e){return We[e]});return t.forEach(function(e){I.debug(e.id)}),t.sort((e,r)=>e.seq-r.seq),t},II=function(){return je},MI=function(){return By},NI=function(){return ur},qa={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},RI={parseDirective:bI,getConfig:()=>G().gitGraph,setDirection:xI,setOptions:vI,getOptions:kI,commit:wI,branch:TI,merge:EI,cherryPick:CI,checkout:Iy,prettyPrint:SI,clear:AI,getBranchesAsObjArray:LI,getBranches:BI,getCommits:DI,getCommitsArray:Ny,getCurrentBranch:II,getDirection:MI,getHead:NI,setAccTitle:kr,getAccTitle:Br,getAccDescription:Ir,setAccDescription:Dr,setDiagramTitle:si,getDiagramTitle:ai,commitType:qa};let fa={};const wr={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Cn=8;let mr={},Yl={},zl=[],Ul=0;const OI=()=>{mr={},Yl={},fa={},Ul=0,zl=[]},FI=t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");let r=[];typeof t=="string"?r=t.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(t)?r=t:r=[];for(const i of r){const n=document.createElementNS("http://www.w3.org/2000/svg","tspan");n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),n.setAttribute("dy","1em"),n.setAttribute("x","0"),n.setAttribute("class","row"),n.textContent=i.trim(),e.appendChild(n)}return e},Id=(t,e,r)=>{const i=ho().gitGraph,n=t.append("g").attr("class","commit-bullets"),s=t.append("g").attr("class","commit-labels");let a=0;Object.keys(e).sort((h,u)=>e[h].seq-e[u].seq).forEach(h=>{const u=e[h],f=mr[u.branch].pos,d=a+10;if(r){let p,m=u.customType!==void 0&&u.customType!==""?u.customType:u.type;switch(m){case wr.NORMAL:p="commit-normal";break;case wr.REVERSE:p="commit-reverse";break;case wr.HIGHLIGHT:p="commit-highlight";break;case wr.MERGE:p="commit-merge";break;case wr.CHERRY_PICK:p="commit-cherry-pick";break;default:p="commit-normal"}if(m===wr.HIGHLIGHT){const b=n.append("rect");b.attr("x",d-10),b.attr("y",f-10),b.attr("height",20),b.attr("width",20),b.attr("class",`commit ${u.id} commit-highlight${mr[u.branch].index%Cn} ${p}-outer`),n.append("rect").attr("x",d-6).attr("y",f-6).attr("height",12).attr("width",12).attr("class",`commit ${u.id} commit${mr[u.branch].index%Cn} ${p}-inner`)}else if(m===wr.CHERRY_PICK)n.append("circle").attr("cx",d).attr("cy",f).attr("r",10).attr("class",`commit ${u.id} ${p}`),n.append("circle").attr("cx",d-3).attr("cy",f+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${u.id} ${p}`),n.append("circle").attr("cx",d+3).attr("cy",f+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${u.id} ${p}`),n.append("line").attr("x1",d+3).attr("y1",f+1).attr("x2",d).attr("y2",f-5).attr("stroke","#fff").attr("class",`commit ${u.id} ${p}`),n.append("line").attr("x1",d-3).attr("y1",f+1).attr("x2",d).attr("y2",f-5).attr("stroke","#fff").attr("class",`commit ${u.id} ${p}`);else{const b=n.append("circle");if(b.attr("cx",d),b.attr("cy",f),b.attr("r",u.type===wr.MERGE?9:10),b.attr("class",`commit ${u.id} commit${mr[u.branch].index%Cn}`),m===wr.MERGE){const x=n.append("circle");x.attr("cx",d),x.attr("cy",f),x.attr("r",6),x.attr("class",`commit ${p} ${u.id} commit${mr[u.branch].index%Cn}`)}m===wr.REVERSE&&n.append("path").attr("d",`M ${d-5},${f-5}L${d+5},${f+5}M${d-5},${f+5}L${d+5},${f-5}`).attr("class",`commit ${p} ${u.id} commit${mr[u.branch].index%Cn}`)}}if(Yl[u.id]={x:a+10,y:f},r){if(u.type!==wr.CHERRY_PICK&&(u.customId&&u.type===wr.MERGE||u.type!==wr.MERGE)&&i.showCommitLabel){const b=s.append("g"),x=b.insert("rect").attr("class","commit-label-bkg"),k=b.append("text").attr("x",a).attr("y",f+25).attr("class","commit-label").text(u.id);let v=k.node().getBBox();if(x.attr("x",a+10-v.width/2-2).attr("y",f+13.5).attr("width",v.width+2*2).attr("height",v.height+2*2),k.attr("x",a+10-v.width/2),i.rotateCommitLabel){let B=-7.5-(v.width+10)/25*9.5,R=10+v.width/25*8.5;b.attr("transform","translate("+B+", "+R+") rotate(-45, "+a+", "+f+")")}}if(u.tag){const b=s.insert("polygon"),x=s.append("circle"),k=s.append("text").attr("y",f-16).attr("class","tag-label").text(u.tag);let v=k.node().getBBox();k.attr("x",a+10-v.width/2);const B=v.height/2,R=f-19.2;b.attr("class","tag-label-bkg").attr("points",`
1145
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var S=this.next();return S||this.lex()},begin:function(S){this.conditionStack.push(S)},popState:function(){var S=this.conditionStack.length-1;return S>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(S){return S=this.conditionStack.length-1-Math.abs(S||0),S>=0?this.conditionStack[S]:"INITIAL"},pushState:function(S){this.begin(S)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(S,E,_,w){switch(_){case 0:return this.begin("open_directive"),50;case 1:return this.begin("type_directive"),51;case 2:return this.popState(),this.begin("arg_directive"),9;case 3:return this.popState(),this.popState(),53;case 4:return 52;case 5:return this.begin("acc_title"),20;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),22;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:return 14;case 13:break;case 14:break;case 15:return 6;case 16:return 40;case 17:return 33;case 18:return 38;case 19:return 42;case 20:return 43;case 21:return 44;case 22:return 45;case 23:return 35;case 24:return 29;case 25:return 30;case 26:return 37;case 27:return 32;case 28:return 27;case 29:return 10;case 30:return 10;case 31:return 9;case 32:return"CARET";case 33:this.begin("options");break;case 34:this.popState();break;case 35:return 13;case 36:return 36;case 37:this.begin("string");break;case 38:this.popState();break;case 39:return 34;case 40:return 31;case 41:return 54;case 42:return 8}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit(?=\s|$))/i,/^(?:id:)/i,/^(?:type:)/i,/^(?:msg:)/i,/^(?:NORMAL\b)/i,/^(?:REVERSE\b)/i,/^(?:HIGHLIGHT\b)/i,/^(?:tag:)/i,/^(?:branch(?=\s|$))/i,/^(?:order:)/i,/^(?:merge(?=\s|$))/i,/^(?:cherry-pick(?=\s|$))/i,/^(?:checkout(?=\s|$))/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:[ \r\n\t]+end\b)/i,/^(?:[\s\S]+(?=[ \r\n\t]+end))/i,/^(?:["]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[0-9]+(?=\s|$))/i,/^(?:\w([-\./\w]*[-\w])?)/i,/^(?:$)/i,/^(?:\s+)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},options:{rules:[34,35],inclusive:!1},string:{rules:[38,39],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,36,37,40,41,42,43],inclusive:!0}}};return F}();P.lexer=V;function O(){this.yy={}}return O.prototype=P,P.Parser=O,new O}();Cu.parser=Cu;const yI=Cu,mI=t=>t.match(/^\s*gitGraph/)!==null;let Vl=G().gitGraph.mainBranchName,bI=G().gitGraph.mainBranchOrder,We={},ur=null,Ha={};Ha[Vl]={name:Vl,order:bI};let Ne={};Ne[Vl]=ur;let je=Vl,Dy="LR",Yn=0;function Z1(){return fy({length:7})}const _I=function(t,e,r){xe.parseDirective(this,t,e,r)};function xI(t,e){const r=Object.create(null);return t.reduce((i,n)=>{const s=e(n);return r[s]||(r[s]=!0,i.push(n)),i},[])}const vI=function(t){Dy=t};let Iy={};const kI=function(t){I.debug("options str",t),t=t&&t.trim(),t=t||"{}";try{Iy=JSON.parse(t)}catch(e){I.error("error while parsing gitGraph options",e.message)}},wI=function(){return Iy},TI=function(t,e,r,i){I.debug("Entering commit:",t,e,r,i),e=Xt.sanitizeText(e,G()),t=Xt.sanitizeText(t,G()),i=Xt.sanitizeText(i,G());const n={id:e||Yn+"-"+Z1(),message:t,seq:Yn++,type:r||qa.NORMAL,tag:i||"",parents:ur==null?[]:[ur.id],branch:je};ur=n,We[n.id]=n,Ne[je]=n.id,I.debug("in pushCommit "+n.id)},EI=function(t,e){if(t=Xt.sanitizeText(t,G()),Ne[t]===void 0)Ne[t]=ur!=null?ur.id:null,Ha[t]={name:t,order:e?parseInt(e,10):null},My(t),I.debug("in createBranch");else{let r=new Error('Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout '+t+'")');throw r.hash={text:"branch "+t,token:"branch "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+t+'"']},r}},CI=function(t,e,r,i){t=Xt.sanitizeText(t,G()),e=Xt.sanitizeText(e,G());const n=We[Ne[je]],s=We[Ne[t]];if(je===t){let o=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},o}else if(n===void 0||!n){let o=new Error('Incorrect usage of "merge". Current branch ('+je+")has no commits");throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["commit"]},o}else if(Ne[t]===void 0){let o=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch "+t]},o}else if(s===void 0||!s){let o=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"commit"']},o}else if(n===s){let o=new Error('Incorrect usage of "merge". Both branches have same head');throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},o}else if(e&&We[e]!==void 0){let o=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom Id");throw o.hash={text:"merge "+t+e+r+i,token:"merge "+t+e+r+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["merge "+t+" "+e+"_UNIQUE "+r+" "+i]},o}const a={id:e||Yn+"-"+Z1(),message:"merged branch "+t+" into "+je,seq:Yn++,parents:[ur==null?null:ur.id,Ne[t]],branch:je,type:qa.MERGE,customType:r,customId:!!e,tag:i||""};ur=a,We[a.id]=a,Ne[je]=a.id,I.debug(Ne),I.debug("in mergeBranch")},SI=function(t,e,r){if(I.debug("Entering cherryPick:",t,e,r),t=Xt.sanitizeText(t,G()),e=Xt.sanitizeText(e,G()),r=Xt.sanitizeText(r,G()),!t||We[t]===void 0){let s=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw s.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},s}let i=We[t],n=i.branch;if(i.type===qa.MERGE){let s=new Error('Incorrect usage of "cherryPick". Source commit should not be a merge commit');throw s.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},s}if(!e||We[e]===void 0){if(n===je){let o=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw o.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},o}const s=We[Ne[je]];if(s===void 0||!s){let o=new Error('Incorrect usage of "cherry-pick". Current branch ('+je+")has no commits");throw o.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},o}const a={id:Yn+"-"+Z1(),message:"cherry-picked "+i+" into "+je,seq:Yn++,parents:[ur==null?null:ur.id,i.id],branch:je,type:qa.CHERRY_PICK,tag:r??"cherry-pick:"+i.id};ur=a,We[a.id]=a,Ne[je]=a.id,I.debug(Ne),I.debug("in cherryPick")}},My=function(t){if(t=Xt.sanitizeText(t,G()),Ne[t]===void 0){let e=new Error('Trying to checkout branch which is not yet created. (Help try using "branch '+t+'")');throw e.hash={text:"checkout "+t,token:"checkout "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"branch '+t+'"']},e}else{je=t;const e=Ne[je];ur=We[e]}};function Id(t,e,r){const i=t.indexOf(e);i===-1?t.push(r):t.splice(i,1,r)}function Ny(t){const e=t.reduce((n,s)=>n.seq>s.seq?n:s,t[0]);let r="";t.forEach(function(n){n===e?r+=" *":r+=" |"});const i=[r,e.id,e.seq];for(let n in Ne)Ne[n]===e.id&&i.push(n);if(I.debug(i.join(" ")),e.parents&&e.parents.length==2){const n=We[e.parents[0]];Id(t,e,n),t.push(We[e.parents[1]])}else{if(e.parents.length==0)return;{const n=We[e.parents];Id(t,e,n)}}t=xI(t,n=>n.id),Ny(t)}const AI=function(){I.debug(We);const t=Ry()[0];Ny([t])},LI=function(){We={},ur=null;let t=G().gitGraph.mainBranchName,e=G().gitGraph.mainBranchOrder;Ne={},Ne[t]=null,Ha={},Ha[t]={name:t,order:e},je=t,Yn=0,Lr()},BI=function(){return Object.values(Ha).map((e,r)=>e.order!==null?e:{...e,order:parseFloat(`0.${r}`,10)}).sort((e,r)=>e.order-r.order).map(({name:e})=>({name:e}))},DI=function(){return Ne},II=function(){return We},Ry=function(){const t=Object.keys(We).map(function(e){return We[e]});return t.forEach(function(e){I.debug(e.id)}),t.sort((e,r)=>e.seq-r.seq),t},MI=function(){return je},NI=function(){return Dy},RI=function(){return ur},qa={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},OI={parseDirective:_I,getConfig:()=>G().gitGraph,setDirection:vI,setOptions:kI,getOptions:wI,commit:TI,branch:EI,merge:CI,cherryPick:SI,checkout:My,prettyPrint:AI,clear:LI,getBranchesAsObjArray:BI,getBranches:DI,getCommits:II,getCommitsArray:Ry,getCurrentBranch:MI,getDirection:NI,getHead:RI,setAccTitle:kr,getAccTitle:Br,getAccDescription:Ir,setAccDescription:Dr,setDiagramTitle:si,getDiagramTitle:ai,commitType:qa};let fa={};const wr={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Cn=8;let mr={},Yl={},zl=[],Ul=0;const FI=()=>{mr={},Yl={},fa={},Ul=0,zl=[]},PI=t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");let r=[];typeof t=="string"?r=t.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(t)?r=t:r=[];for(const i of r){const n=document.createElementNS("http://www.w3.org/2000/svg","tspan");n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),n.setAttribute("dy","1em"),n.setAttribute("x","0"),n.setAttribute("class","row"),n.textContent=i.trim(),e.appendChild(n)}return e},Md=(t,e,r)=>{const i=ho().gitGraph,n=t.append("g").attr("class","commit-bullets"),s=t.append("g").attr("class","commit-labels");let a=0;Object.keys(e).sort((h,u)=>e[h].seq-e[u].seq).forEach(h=>{const u=e[h],f=mr[u.branch].pos,d=a+10;if(r){let p,m=u.customType!==void 0&&u.customType!==""?u.customType:u.type;switch(m){case wr.NORMAL:p="commit-normal";break;case wr.REVERSE:p="commit-reverse";break;case wr.HIGHLIGHT:p="commit-highlight";break;case wr.MERGE:p="commit-merge";break;case wr.CHERRY_PICK:p="commit-cherry-pick";break;default:p="commit-normal"}if(m===wr.HIGHLIGHT){const b=n.append("rect");b.attr("x",d-10),b.attr("y",f-10),b.attr("height",20),b.attr("width",20),b.attr("class",`commit ${u.id} commit-highlight${mr[u.branch].index%Cn} ${p}-outer`),n.append("rect").attr("x",d-6).attr("y",f-6).attr("height",12).attr("width",12).attr("class",`commit ${u.id} commit${mr[u.branch].index%Cn} ${p}-inner`)}else if(m===wr.CHERRY_PICK)n.append("circle").attr("cx",d).attr("cy",f).attr("r",10).attr("class",`commit ${u.id} ${p}`),n.append("circle").attr("cx",d-3).attr("cy",f+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${u.id} ${p}`),n.append("circle").attr("cx",d+3).attr("cy",f+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${u.id} ${p}`),n.append("line").attr("x1",d+3).attr("y1",f+1).attr("x2",d).attr("y2",f-5).attr("stroke","#fff").attr("class",`commit ${u.id} ${p}`),n.append("line").attr("x1",d-3).attr("y1",f+1).attr("x2",d).attr("y2",f-5).attr("stroke","#fff").attr("class",`commit ${u.id} ${p}`);else{const b=n.append("circle");if(b.attr("cx",d),b.attr("cy",f),b.attr("r",u.type===wr.MERGE?9:10),b.attr("class",`commit ${u.id} commit${mr[u.branch].index%Cn}`),m===wr.MERGE){const x=n.append("circle");x.attr("cx",d),x.attr("cy",f),x.attr("r",6),x.attr("class",`commit ${p} ${u.id} commit${mr[u.branch].index%Cn}`)}m===wr.REVERSE&&n.append("path").attr("d",`M ${d-5},${f-5}L${d+5},${f+5}M${d-5},${f+5}L${d+5},${f-5}`).attr("class",`commit ${p} ${u.id} commit${mr[u.branch].index%Cn}`)}}if(Yl[u.id]={x:a+10,y:f},r){if(u.type!==wr.CHERRY_PICK&&(u.customId&&u.type===wr.MERGE||u.type!==wr.MERGE)&&i.showCommitLabel){const b=s.append("g"),x=b.insert("rect").attr("class","commit-label-bkg"),k=b.append("text").attr("x",a).attr("y",f+25).attr("class","commit-label").text(u.id);let v=k.node().getBBox();if(x.attr("x",a+10-v.width/2-2).attr("y",f+13.5).attr("width",v.width+2*2).attr("height",v.height+2*2),k.attr("x",a+10-v.width/2),i.rotateCommitLabel){let B=-7.5-(v.width+10)/25*9.5,R=10+v.width/25*8.5;b.attr("transform","translate("+B+", "+R+") rotate(-45, "+a+", "+f+")")}}if(u.tag){const b=s.insert("polygon"),x=s.append("circle"),k=s.append("text").attr("y",f-16).attr("class","tag-label").text(u.tag);let v=k.node().getBBox();k.attr("x",a+10-v.width/2);const B=v.height/2,R=f-19.2;b.attr("class","tag-label-bkg").attr("points",`
1146
1146
  ${a-v.width/2-4/2},${R+2}
1147
1147
  ${a-v.width/2-4/2},${R-2}
1148
1148
  ${a+10-v.width/2-4},${R-B-2}
1149
1149
  ${a+10+v.width/2+4},${R-B-2}
1150
1150
  ${a+10+v.width/2+4},${R+B+2}
1151
- ${a+10-v.width/2-4},${R+B+2}`),x.attr("cx",a-v.width/2+4/2).attr("cy",R).attr("r",1.5).attr("class","tag-hole")}}a+=50,a>Ul&&(Ul=a)})},PI=(t,e,r)=>Object.keys(r).filter(s=>r[s].branch===e.branch&&r[s].seq>t.seq&&r[s].seq<e.seq).length>0,Su=(t,e,r=0)=>{const i=t+Math.abs(t-e)/2;if(r>5)return i;if(zl.every(a=>Math.abs(a-i)>=10))return zl.push(i),i;const s=Math.abs(t-e);return Su(t,e-s/5,r+1)},VI=(t,e,r,i)=>{const n=Yl[e.id],s=Yl[r.id],a=PI(e,r,i);let o="",l="",h=0,u=0,f=mr[r.branch].index,d;if(a){o="A 10 10, 0, 0, 0,",l="A 10 10, 0, 0, 1,",h=10,u=10,f=mr[r.branch].index;const p=n.y<s.y?Su(n.y,s.y):Su(s.y,n.y);n.y<s.y?d=`M ${n.x} ${n.y} L ${n.x} ${p-h} ${o} ${n.x+u} ${p} L ${s.x-h} ${p} ${l} ${s.x} ${p+u} L ${s.x} ${s.y}`:d=`M ${n.x} ${n.y} L ${n.x} ${p+h} ${l} ${n.x+u} ${p} L ${s.x-h} ${p} ${o} ${s.x} ${p-u} L ${s.x} ${s.y}`}else n.y<s.y&&(o="A 20 20, 0, 0, 0,",h=20,u=20,f=mr[r.branch].index,d=`M ${n.x} ${n.y} L ${n.x} ${s.y-h} ${o} ${n.x+u} ${s.y} L ${s.x} ${s.y}`),n.y>s.y&&(o="A 20 20, 0, 0, 0,",h=20,u=20,f=mr[e.branch].index,d=`M ${n.x} ${n.y} L ${s.x-h} ${n.y} ${o} ${s.x} ${n.y-u} L ${s.x} ${s.y}`),n.y===s.y&&(f=mr[e.branch].index,d=`M ${n.x} ${n.y} L ${n.x} ${s.y-h} ${o} ${n.x+u} ${s.y} L ${s.x} ${s.y}`);t.append("path").attr("d",d).attr("class","arrow arrow"+f%Cn)},YI=(t,e)=>{const r=t.append("g").attr("class","commit-arrows");Object.keys(e).forEach(i=>{const n=e[i];n.parents&&n.parents.length>0&&n.parents.forEach(s=>{VI(r,e[s],n,e)})})},zI=(t,e)=>{const r=ho().gitGraph,i=t.append("g");e.forEach((n,s)=>{const a=s%Cn,o=mr[n.name].pos,l=i.append("line");l.attr("x1",0),l.attr("y1",o),l.attr("x2",Ul),l.attr("y2",o),l.attr("class","branch branch"+a),zl.push(o);let h=n.name;const u=FI(h),f=i.insert("rect"),p=i.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+a);p.node().appendChild(u);let m=u.getBBox();f.attr("class","branchLabelBkg label"+a).attr("rx",4).attr("ry",4).attr("x",-m.width-4-(r.rotateCommitLabel===!0?30:0)).attr("y",-m.height/2+8).attr("width",m.width+18).attr("height",m.height+4),p.attr("transform","translate("+(-m.width-14-(r.rotateCommitLabel===!0?30:0))+", "+(o-m.height/2-1)+")"),f.attr("transform","translate(-19, "+(o-m.height/2)+")")})},UI=function(t,e,r,i){OI();const n=ho(),s=n.gitGraph;I.debug("in gitgraph renderer",t+`
1152
- `,"id:",e,r),fa=i.db.getCommits();const a=i.db.getBranchesAsObjArray();let o=0;a.forEach((h,u)=>{mr[h.name]={pos:o,index:u},o+=50+(s.rotateCommitLabel?40:0)});const l=_t(`[id="${e}"]`);Id(l,fa,!1),s.showBranches&&zI(l,a),YI(l,fa),Id(l,fa,!0),jt.insertTitle(l,"gitTitleText",s.titleTopMargin,i.db.getDiagramTitle()),Ay(void 0,l,s.diagramPadding,s.useMaxWidth??n.useMaxWidth)},WI={draw:UI},HI=t=>`
1151
+ ${a+10-v.width/2-4},${R+B+2}`),x.attr("cx",a-v.width/2+4/2).attr("cy",R).attr("r",1.5).attr("class","tag-hole")}}a+=50,a>Ul&&(Ul=a)})},VI=(t,e,r)=>Object.keys(r).filter(s=>r[s].branch===e.branch&&r[s].seq>t.seq&&r[s].seq<e.seq).length>0,Su=(t,e,r=0)=>{const i=t+Math.abs(t-e)/2;if(r>5)return i;if(zl.every(a=>Math.abs(a-i)>=10))return zl.push(i),i;const s=Math.abs(t-e);return Su(t,e-s/5,r+1)},YI=(t,e,r,i)=>{const n=Yl[e.id],s=Yl[r.id],a=VI(e,r,i);let o="",l="",h=0,u=0,f=mr[r.branch].index,d;if(a){o="A 10 10, 0, 0, 0,",l="A 10 10, 0, 0, 1,",h=10,u=10,f=mr[r.branch].index;const p=n.y<s.y?Su(n.y,s.y):Su(s.y,n.y);n.y<s.y?d=`M ${n.x} ${n.y} L ${n.x} ${p-h} ${o} ${n.x+u} ${p} L ${s.x-h} ${p} ${l} ${s.x} ${p+u} L ${s.x} ${s.y}`:d=`M ${n.x} ${n.y} L ${n.x} ${p+h} ${l} ${n.x+u} ${p} L ${s.x-h} ${p} ${o} ${s.x} ${p-u} L ${s.x} ${s.y}`}else n.y<s.y&&(o="A 20 20, 0, 0, 0,",h=20,u=20,f=mr[r.branch].index,d=`M ${n.x} ${n.y} L ${n.x} ${s.y-h} ${o} ${n.x+u} ${s.y} L ${s.x} ${s.y}`),n.y>s.y&&(o="A 20 20, 0, 0, 0,",h=20,u=20,f=mr[e.branch].index,d=`M ${n.x} ${n.y} L ${s.x-h} ${n.y} ${o} ${s.x} ${n.y-u} L ${s.x} ${s.y}`),n.y===s.y&&(f=mr[e.branch].index,d=`M ${n.x} ${n.y} L ${n.x} ${s.y-h} ${o} ${n.x+u} ${s.y} L ${s.x} ${s.y}`);t.append("path").attr("d",d).attr("class","arrow arrow"+f%Cn)},zI=(t,e)=>{const r=t.append("g").attr("class","commit-arrows");Object.keys(e).forEach(i=>{const n=e[i];n.parents&&n.parents.length>0&&n.parents.forEach(s=>{YI(r,e[s],n,e)})})},UI=(t,e)=>{const r=ho().gitGraph,i=t.append("g");e.forEach((n,s)=>{const a=s%Cn,o=mr[n.name].pos,l=i.append("line");l.attr("x1",0),l.attr("y1",o),l.attr("x2",Ul),l.attr("y2",o),l.attr("class","branch branch"+a),zl.push(o);let h=n.name;const u=PI(h),f=i.insert("rect"),p=i.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+a);p.node().appendChild(u);let m=u.getBBox();f.attr("class","branchLabelBkg label"+a).attr("rx",4).attr("ry",4).attr("x",-m.width-4-(r.rotateCommitLabel===!0?30:0)).attr("y",-m.height/2+8).attr("width",m.width+18).attr("height",m.height+4),p.attr("transform","translate("+(-m.width-14-(r.rotateCommitLabel===!0?30:0))+", "+(o-m.height/2-1)+")"),f.attr("transform","translate(-19, "+(o-m.height/2)+")")})},WI=function(t,e,r,i){FI();const n=ho(),s=n.gitGraph;I.debug("in gitgraph renderer",t+`
1152
+ `,"id:",e,r),fa=i.db.getCommits();const a=i.db.getBranchesAsObjArray();let o=0;a.forEach((h,u)=>{mr[h.name]={pos:o,index:u},o+=50+(s.rotateCommitLabel?40:0)});const l=_t(`[id="${e}"]`);Md(l,fa,!1),s.showBranches&&UI(l,a),zI(l,fa),Md(l,fa,!0),jt.insertTitle(l,"gitTitleText",s.titleTopMargin,i.db.getDiagramTitle()),Ly(void 0,l,s.diagramPadding,s.useMaxWidth??n.useMaxWidth)},HI={draw:WI},qI=t=>`
1153
1153
  .commit-id,
1154
1154
  .commit-msg,
1155
1155
  .branch-label {
@@ -1201,98 +1201,98 @@ Expecting `+st.join(", ")+", got '"+(this.terminals_[$]||$)+"'":T="Parse error o
1201
1201
  fill: ${t.textColor};
1202
1202
  }
1203
1203
  }
1204
- `,qI=HI;var Wl=function(){var t=function(Bt,bt,mt,wt){for(mt=mt||{},wt=Bt.length;wt--;mt[Bt[wt]]=bt);return mt},e=[1,6],r=[1,7],i=[1,8],n=[1,9],s=[1,16],a=[1,11],o=[1,12],l=[1,13],h=[1,14],u=[1,15],f=[1,27],d=[1,33],p=[1,34],m=[1,35],b=[1,36],x=[1,37],k=[1,72],v=[1,73],B=[1,74],R=[1,75],P=[1,76],V=[1,77],O=[1,78],F=[1,38],C=[1,39],S=[1,40],E=[1,41],_=[1,42],w=[1,43],g=[1,44],D=[1,45],y=[1,46],N=[1,47],nt=[1,48],Y=[1,49],Z=[1,50],J=[1,51],X=[1,52],tt=[1,53],ot=[1,54],at=[1,55],U=[1,56],Tt=[1,57],$=[1,59],j=[1,60],W=[1,61],z=[1,62],A=[1,63],M=[1,64],q=[1,65],L=[1,66],st=[1,67],T=[1,68],Dt=[1,69],et=[24,52],Et=[24,44,46,47,48,49,50,51,52,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],vt=[15,24,44,46,47,48,49,50,51,52,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],pt=[1,94],ut=[1,95],gt=[1,96],ht=[1,97],yt=[15,24,52],he=[7,8,9,10,18,22,25,26,27,28],re=[15,24,43,52],Mt=[15,24,43,52,86,87,89,90],Nt=[15,43],Kt=[44,46,47,48,49,50,51,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],fe={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,directive:6,direction_tb:7,direction_bt:8,direction_rl:9,direction_lr:10,graphConfig:11,openDirective:12,typeDirective:13,closeDirective:14,NEWLINE:15,":":16,argDirective:17,open_directive:18,type_directive:19,arg_directive:20,close_directive:21,C4_CONTEXT:22,statements:23,EOF:24,C4_CONTAINER:25,C4_COMPONENT:26,C4_DYNAMIC:27,C4_DEPLOYMENT:28,otherStatements:29,diagramStatements:30,otherStatement:31,title:32,accDescription:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,boundaryStatement:39,boundaryStartStatement:40,boundaryStopStatement:41,boundaryStart:42,LBRACE:43,ENTERPRISE_BOUNDARY:44,attributes:45,SYSTEM_BOUNDARY:46,BOUNDARY:47,CONTAINER_BOUNDARY:48,NODE:49,NODE_L:50,NODE_R:51,RBRACE:52,diagramStatement:53,PERSON:54,PERSON_EXT:55,SYSTEM:56,SYSTEM_DB:57,SYSTEM_QUEUE:58,SYSTEM_EXT:59,SYSTEM_EXT_DB:60,SYSTEM_EXT_QUEUE:61,CONTAINER:62,CONTAINER_DB:63,CONTAINER_QUEUE:64,CONTAINER_EXT:65,CONTAINER_EXT_DB:66,CONTAINER_EXT_QUEUE:67,COMPONENT:68,COMPONENT_DB:69,COMPONENT_QUEUE:70,COMPONENT_EXT:71,COMPONENT_EXT_DB:72,COMPONENT_EXT_QUEUE:73,REL:74,BIREL:75,REL_U:76,REL_D:77,REL_L:78,REL_R:79,REL_B:80,REL_INDEX:81,UPDATE_EL_STYLE:82,UPDATE_REL_STYLE:83,UPDATE_LAYOUT_CONFIG:84,attribute:85,STR:86,STR_KEY:87,STR_VALUE:88,ATTRIBUTE:89,ATTRIBUTE_EMPTY:90,$accept:0,$end:1},terminals_:{2:"error",7:"direction_tb",8:"direction_bt",9:"direction_rl",10:"direction_lr",15:"NEWLINE",16:":",18:"open_directive",19:"type_directive",20:"arg_directive",21:"close_directive",22:"C4_CONTEXT",24:"EOF",25:"C4_CONTAINER",26:"C4_COMPONENT",27:"C4_DYNAMIC",28:"C4_DEPLOYMENT",32:"title",33:"accDescription",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",43:"LBRACE",44:"ENTERPRISE_BOUNDARY",46:"SYSTEM_BOUNDARY",47:"BOUNDARY",48:"CONTAINER_BOUNDARY",49:"NODE",50:"NODE_L",51:"NODE_R",52:"RBRACE",54:"PERSON",55:"PERSON_EXT",56:"SYSTEM",57:"SYSTEM_DB",58:"SYSTEM_QUEUE",59:"SYSTEM_EXT",60:"SYSTEM_EXT_DB",61:"SYSTEM_EXT_QUEUE",62:"CONTAINER",63:"CONTAINER_DB",64:"CONTAINER_QUEUE",65:"CONTAINER_EXT",66:"CONTAINER_EXT_DB",67:"CONTAINER_EXT_QUEUE",68:"COMPONENT",69:"COMPONENT_DB",70:"COMPONENT_QUEUE",71:"COMPONENT_EXT",72:"COMPONENT_EXT_DB",73:"COMPONENT_EXT_QUEUE",74:"REL",75:"BIREL",76:"REL_U",77:"REL_D",78:"REL_L",79:"REL_R",80:"REL_B",81:"REL_INDEX",82:"UPDATE_EL_STYLE",83:"UPDATE_REL_STYLE",84:"UPDATE_LAYOUT_CONFIG",86:"STR",87:"STR_KEY",88:"STR_VALUE",89:"ATTRIBUTE",90:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[3,2],[5,1],[5,1],[5,1],[5,1],[4,1],[6,4],[6,6],[12,1],[13,1],[17,1],[14,1],[11,4],[11,4],[11,4],[11,4],[11,4],[23,1],[23,1],[23,2],[29,1],[29,2],[29,3],[31,1],[31,1],[31,2],[31,2],[31,1],[39,3],[40,3],[40,3],[40,4],[42,2],[42,2],[42,2],[42,2],[42,2],[42,2],[42,2],[41,1],[30,1],[30,2],[30,3],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,1],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[45,1],[45,2],[85,1],[85,2],[85,1],[85,1]],performAction:function(bt,mt,wt,ft,It,it,Wt){var ct=it.length-1;switch(It){case 4:ft.setDirection("TB");break;case 5:ft.setDirection("BT");break;case 6:ft.setDirection("RL");break;case 7:ft.setDirection("LR");break;case 11:ft.parseDirective("%%{","open_directive");break;case 12:break;case 13:it[ct]=it[ct].trim().replace(/'/g,'"'),ft.parseDirective(it[ct],"arg_directive");break;case 14:ft.parseDirective("}%%","close_directive","c4Context");break;case 15:case 16:case 17:case 18:case 19:ft.setC4Type(it[ct-3]);break;case 26:ft.setTitle(it[ct].substring(6)),this.$=it[ct].substring(6);break;case 27:ft.setAccDescription(it[ct].substring(15)),this.$=it[ct].substring(15);break;case 28:this.$=it[ct].trim(),ft.setTitle(this.$);break;case 29:case 30:this.$=it[ct].trim(),ft.setAccDescription(this.$);break;case 35:case 36:it[ct].splice(2,0,"ENTERPRISE"),ft.addPersonOrSystemBoundary(...it[ct]),this.$=it[ct];break;case 37:ft.addPersonOrSystemBoundary(...it[ct]),this.$=it[ct];break;case 38:it[ct].splice(2,0,"CONTAINER"),ft.addContainerBoundary(...it[ct]),this.$=it[ct];break;case 39:ft.addDeploymentNode("node",...it[ct]),this.$=it[ct];break;case 40:ft.addDeploymentNode("nodeL",...it[ct]),this.$=it[ct];break;case 41:ft.addDeploymentNode("nodeR",...it[ct]),this.$=it[ct];break;case 42:ft.popBoundaryParseStack();break;case 46:ft.addPersonOrSystem("person",...it[ct]),this.$=it[ct];break;case 47:ft.addPersonOrSystem("external_person",...it[ct]),this.$=it[ct];break;case 48:ft.addPersonOrSystem("system",...it[ct]),this.$=it[ct];break;case 49:ft.addPersonOrSystem("system_db",...it[ct]),this.$=it[ct];break;case 50:ft.addPersonOrSystem("system_queue",...it[ct]),this.$=it[ct];break;case 51:ft.addPersonOrSystem("external_system",...it[ct]),this.$=it[ct];break;case 52:ft.addPersonOrSystem("external_system_db",...it[ct]),this.$=it[ct];break;case 53:ft.addPersonOrSystem("external_system_queue",...it[ct]),this.$=it[ct];break;case 54:ft.addContainer("container",...it[ct]),this.$=it[ct];break;case 55:ft.addContainer("container_db",...it[ct]),this.$=it[ct];break;case 56:ft.addContainer("container_queue",...it[ct]),this.$=it[ct];break;case 57:ft.addContainer("external_container",...it[ct]),this.$=it[ct];break;case 58:ft.addContainer("external_container_db",...it[ct]),this.$=it[ct];break;case 59:ft.addContainer("external_container_queue",...it[ct]),this.$=it[ct];break;case 60:ft.addComponent("component",...it[ct]),this.$=it[ct];break;case 61:ft.addComponent("component_db",...it[ct]),this.$=it[ct];break;case 62:ft.addComponent("component_queue",...it[ct]),this.$=it[ct];break;case 63:ft.addComponent("external_component",...it[ct]),this.$=it[ct];break;case 64:ft.addComponent("external_component_db",...it[ct]),this.$=it[ct];break;case 65:ft.addComponent("external_component_queue",...it[ct]),this.$=it[ct];break;case 67:ft.addRel("rel",...it[ct]),this.$=it[ct];break;case 68:ft.addRel("birel",...it[ct]),this.$=it[ct];break;case 69:ft.addRel("rel_u",...it[ct]),this.$=it[ct];break;case 70:ft.addRel("rel_d",...it[ct]),this.$=it[ct];break;case 71:ft.addRel("rel_l",...it[ct]),this.$=it[ct];break;case 72:ft.addRel("rel_r",...it[ct]),this.$=it[ct];break;case 73:ft.addRel("rel_b",...it[ct]),this.$=it[ct];break;case 74:it[ct].splice(0,1),ft.addRel("rel",...it[ct]),this.$=it[ct];break;case 75:ft.updateElStyle("update_el_style",...it[ct]),this.$=it[ct];break;case 76:ft.updateRelStyle("update_rel_style",...it[ct]),this.$=it[ct];break;case 77:ft.updateLayoutConfig("update_layout_config",...it[ct]),this.$=it[ct];break;case 78:this.$=[it[ct]];break;case 79:it[ct].unshift(it[ct-1]),this.$=it[ct];break;case 80:case 82:this.$=it[ct].trim();break;case 81:let Gt={};Gt[it[ct-1].trim()]=it[ct].trim(),this.$=Gt;break;case 83:this.$="";break}},table:[{3:1,4:2,5:3,6:4,7:e,8:r,9:i,10:n,11:5,12:10,18:s,22:a,25:o,26:l,27:h,28:u},{1:[3]},{1:[2,1]},{1:[2,2]},{3:17,4:2,5:3,6:4,7:e,8:r,9:i,10:n,11:5,12:10,18:s,22:a,25:o,26:l,27:h,28:u},{1:[2,8]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{1:[2,7]},{13:18,19:[1,19]},{15:[1,20]},{15:[1,21]},{15:[1,22]},{15:[1,23]},{15:[1,24]},{19:[2,11]},{1:[2,3]},{14:25,16:[1,26],21:f},t([16,21],[2,12]),{23:28,29:29,30:30,31:31,32:d,33:p,34:m,36:b,38:x,39:58,40:70,42:71,44:k,46:v,47:B,48:R,49:P,50:V,51:O,53:32,54:F,55:C,56:S,57:E,58:_,59:w,60:g,61:D,62:y,63:N,64:nt,65:Y,66:Z,67:J,68:X,69:tt,70:ot,71:at,72:U,73:Tt,74:$,75:j,76:W,77:z,78:A,79:M,80:q,81:L,82:st,83:T,84:Dt},{23:79,29:29,30:30,31:31,32:d,33:p,34:m,36:b,38:x,39:58,40:70,42:71,44:k,46:v,47:B,48:R,49:P,50:V,51:O,53:32,54:F,55:C,56:S,57:E,58:_,59:w,60:g,61:D,62:y,63:N,64:nt,65:Y,66:Z,67:J,68:X,69:tt,70:ot,71:at,72:U,73:Tt,74:$,75:j,76:W,77:z,78:A,79:M,80:q,81:L,82:st,83:T,84:Dt},{23:80,29:29,30:30,31:31,32:d,33:p,34:m,36:b,38:x,39:58,40:70,42:71,44:k,46:v,47:B,48:R,49:P,50:V,51:O,53:32,54:F,55:C,56:S,57:E,58:_,59:w,60:g,61:D,62:y,63:N,64:nt,65:Y,66:Z,67:J,68:X,69:tt,70:ot,71:at,72:U,73:Tt,74:$,75:j,76:W,77:z,78:A,79:M,80:q,81:L,82:st,83:T,84:Dt},{23:81,29:29,30:30,31:31,32:d,33:p,34:m,36:b,38:x,39:58,40:70,42:71,44:k,46:v,47:B,48:R,49:P,50:V,51:O,53:32,54:F,55:C,56:S,57:E,58:_,59:w,60:g,61:D,62:y,63:N,64:nt,65:Y,66:Z,67:J,68:X,69:tt,70:ot,71:at,72:U,73:Tt,74:$,75:j,76:W,77:z,78:A,79:M,80:q,81:L,82:st,83:T,84:Dt},{23:82,29:29,30:30,31:31,32:d,33:p,34:m,36:b,38:x,39:58,40:70,42:71,44:k,46:v,47:B,48:R,49:P,50:V,51:O,53:32,54:F,55:C,56:S,57:E,58:_,59:w,60:g,61:D,62:y,63:N,64:nt,65:Y,66:Z,67:J,68:X,69:tt,70:ot,71:at,72:U,73:Tt,74:$,75:j,76:W,77:z,78:A,79:M,80:q,81:L,82:st,83:T,84:Dt},{15:[1,83]},{17:84,20:[1,85]},{15:[2,14]},{24:[1,86]},t(et,[2,20],{53:32,39:58,40:70,42:71,30:87,44:k,46:v,47:B,48:R,49:P,50:V,51:O,54:F,55:C,56:S,57:E,58:_,59:w,60:g,61:D,62:y,63:N,64:nt,65:Y,66:Z,67:J,68:X,69:tt,70:ot,71:at,72:U,73:Tt,74:$,75:j,76:W,77:z,78:A,79:M,80:q,81:L,82:st,83:T,84:Dt}),t(et,[2,21]),t(Et,[2,23],{15:[1,88]}),t(et,[2,43],{15:[1,89]}),t(vt,[2,26]),t(vt,[2,27]),{35:[1,90]},{37:[1,91]},t(vt,[2,30]),{45:92,85:93,86:pt,87:ut,89:gt,90:ht},{45:98,85:93,86:pt,87:ut,89:gt,90:ht},{45:99,85:93,86:pt,87:ut,89:gt,90:ht},{45:100,85:93,86:pt,87:ut,89:gt,90:ht},{45:101,85:93,86:pt,87:ut,89:gt,90:ht},{45:102,85:93,86:pt,87:ut,89:gt,90:ht},{45:103,85:93,86:pt,87:ut,89:gt,90:ht},{45:104,85:93,86:pt,87:ut,89:gt,90:ht},{45:105,85:93,86:pt,87:ut,89:gt,90:ht},{45:106,85:93,86:pt,87:ut,89:gt,90:ht},{45:107,85:93,86:pt,87:ut,89:gt,90:ht},{45:108,85:93,86:pt,87:ut,89:gt,90:ht},{45:109,85:93,86:pt,87:ut,89:gt,90:ht},{45:110,85:93,86:pt,87:ut,89:gt,90:ht},{45:111,85:93,86:pt,87:ut,89:gt,90:ht},{45:112,85:93,86:pt,87:ut,89:gt,90:ht},{45:113,85:93,86:pt,87:ut,89:gt,90:ht},{45:114,85:93,86:pt,87:ut,89:gt,90:ht},{45:115,85:93,86:pt,87:ut,89:gt,90:ht},{45:116,85:93,86:pt,87:ut,89:gt,90:ht},t(yt,[2,66]),{45:117,85:93,86:pt,87:ut,89:gt,90:ht},{45:118,85:93,86:pt,87:ut,89:gt,90:ht},{45:119,85:93,86:pt,87:ut,89:gt,90:ht},{45:120,85:93,86:pt,87:ut,89:gt,90:ht},{45:121,85:93,86:pt,87:ut,89:gt,90:ht},{45:122,85:93,86:pt,87:ut,89:gt,90:ht},{45:123,85:93,86:pt,87:ut,89:gt,90:ht},{45:124,85:93,86:pt,87:ut,89:gt,90:ht},{45:125,85:93,86:pt,87:ut,89:gt,90:ht},{45:126,85:93,86:pt,87:ut,89:gt,90:ht},{45:127,85:93,86:pt,87:ut,89:gt,90:ht},{30:128,39:58,40:70,42:71,44:k,46:v,47:B,48:R,49:P,50:V,51:O,53:32,54:F,55:C,56:S,57:E,58:_,59:w,60:g,61:D,62:y,63:N,64:nt,65:Y,66:Z,67:J,68:X,69:tt,70:ot,71:at,72:U,73:Tt,74:$,75:j,76:W,77:z,78:A,79:M,80:q,81:L,82:st,83:T,84:Dt},{15:[1,130],43:[1,129]},{45:131,85:93,86:pt,87:ut,89:gt,90:ht},{45:132,85:93,86:pt,87:ut,89:gt,90:ht},{45:133,85:93,86:pt,87:ut,89:gt,90:ht},{45:134,85:93,86:pt,87:ut,89:gt,90:ht},{45:135,85:93,86:pt,87:ut,89:gt,90:ht},{45:136,85:93,86:pt,87:ut,89:gt,90:ht},{45:137,85:93,86:pt,87:ut,89:gt,90:ht},{24:[1,138]},{24:[1,139]},{24:[1,140]},{24:[1,141]},t(he,[2,9]),{14:142,21:f},{21:[2,13]},{1:[2,15]},t(et,[2,22]),t(Et,[2,24],{31:31,29:143,32:d,33:p,34:m,36:b,38:x}),t(et,[2,44],{29:29,30:30,31:31,53:32,39:58,40:70,42:71,23:144,32:d,33:p,34:m,36:b,38:x,44:k,46:v,47:B,48:R,49:P,50:V,51:O,54:F,55:C,56:S,57:E,58:_,59:w,60:g,61:D,62:y,63:N,64:nt,65:Y,66:Z,67:J,68:X,69:tt,70:ot,71:at,72:U,73:Tt,74:$,75:j,76:W,77:z,78:A,79:M,80:q,81:L,82:st,83:T,84:Dt}),t(vt,[2,28]),t(vt,[2,29]),t(yt,[2,46]),t(re,[2,78],{85:93,45:145,86:pt,87:ut,89:gt,90:ht}),t(Mt,[2,80]),{88:[1,146]},t(Mt,[2,82]),t(Mt,[2,83]),t(yt,[2,47]),t(yt,[2,48]),t(yt,[2,49]),t(yt,[2,50]),t(yt,[2,51]),t(yt,[2,52]),t(yt,[2,53]),t(yt,[2,54]),t(yt,[2,55]),t(yt,[2,56]),t(yt,[2,57]),t(yt,[2,58]),t(yt,[2,59]),t(yt,[2,60]),t(yt,[2,61]),t(yt,[2,62]),t(yt,[2,63]),t(yt,[2,64]),t(yt,[2,65]),t(yt,[2,67]),t(yt,[2,68]),t(yt,[2,69]),t(yt,[2,70]),t(yt,[2,71]),t(yt,[2,72]),t(yt,[2,73]),t(yt,[2,74]),t(yt,[2,75]),t(yt,[2,76]),t(yt,[2,77]),{41:147,52:[1,148]},{15:[1,149]},{43:[1,150]},t(Nt,[2,35]),t(Nt,[2,36]),t(Nt,[2,37]),t(Nt,[2,38]),t(Nt,[2,39]),t(Nt,[2,40]),t(Nt,[2,41]),{1:[2,16]},{1:[2,17]},{1:[2,18]},{1:[2,19]},{15:[1,151]},t(Et,[2,25]),t(et,[2,45]),t(re,[2,79]),t(Mt,[2,81]),t(yt,[2,31]),t(yt,[2,42]),t(Kt,[2,32]),t(Kt,[2,33],{15:[1,152]}),t(he,[2,10]),t(Kt,[2,34])],defaultActions:{2:[2,1],3:[2,2],5:[2,8],6:[2,4],7:[2,5],8:[2,6],9:[2,7],16:[2,11],17:[2,3],27:[2,14],85:[2,13],86:[2,15],138:[2,16],139:[2,17],140:[2,18],141:[2,19]},parseError:function(bt,mt){if(mt.recoverable)this.trace(bt);else{var wt=new Error(bt);throw wt.hash=mt,wt}},parse:function(bt){var mt=this,wt=[0],ft=[],It=[null],it=[],Wt=this.table,ct="",Gt=0,Jt=0,se=2,ie=1,ae=it.slice.call(arguments,1),Rt=Object.create(this.lexer),Ht={yy:{}};for(var ne in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ne)&&(Ht.yy[ne]=this.yy[ne]);Rt.setInput(bt,Ht.yy),Ht.yy.lexer=Rt,Ht.yy.parser=this,typeof Rt.yylloc>"u"&&(Rt.yylloc={});var Ut=Rt.yylloc;it.push(Ut);var ki=Rt.options&&Rt.options.ranges;typeof Ht.yy.parseError=="function"?this.parseError=Ht.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function mn(){var K;return K=ft.pop()||Rt.lex()||ie,typeof K!="number"&&(K instanceof Array&&(ft=K,K=ft.pop()),K=mt.symbols_[K]||K),K}for(var me,$t,Ce,tr,Se={},Ve,be,Qe,qe;;){if($t=wt[wt.length-1],this.defaultActions[$t]?Ce=this.defaultActions[$t]:((me===null||typeof me>"u")&&(me=mn()),Ce=Wt[$t]&&Wt[$t][me]),typeof Ce>"u"||!Ce.length||!Ce[0]){var Lt="";qe=[];for(Ve in Wt[$t])this.terminals_[Ve]&&Ve>se&&qe.push("'"+this.terminals_[Ve]+"'");Rt.showPosition?Lt="Parse error on line "+(Gt+1)+`:
1204
+ `,GI=qI;var Wl=function(){var t=function(Bt,bt,mt,wt){for(mt=mt||{},wt=Bt.length;wt--;mt[Bt[wt]]=bt);return mt},e=[1,6],r=[1,7],i=[1,8],n=[1,9],s=[1,16],a=[1,11],o=[1,12],l=[1,13],h=[1,14],u=[1,15],f=[1,27],d=[1,33],p=[1,34],m=[1,35],b=[1,36],x=[1,37],k=[1,72],v=[1,73],B=[1,74],R=[1,75],P=[1,76],V=[1,77],O=[1,78],F=[1,38],C=[1,39],S=[1,40],E=[1,41],_=[1,42],w=[1,43],g=[1,44],D=[1,45],y=[1,46],N=[1,47],nt=[1,48],Y=[1,49],Z=[1,50],J=[1,51],X=[1,52],tt=[1,53],ot=[1,54],at=[1,55],U=[1,56],Tt=[1,57],$=[1,59],j=[1,60],W=[1,61],z=[1,62],A=[1,63],M=[1,64],q=[1,65],L=[1,66],st=[1,67],T=[1,68],Dt=[1,69],et=[24,52],Et=[24,44,46,47,48,49,50,51,52,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],vt=[15,24,44,46,47,48,49,50,51,52,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],pt=[1,94],ut=[1,95],gt=[1,96],ht=[1,97],yt=[15,24,52],he=[7,8,9,10,18,22,25,26,27,28],re=[15,24,43,52],Mt=[15,24,43,52,86,87,89,90],Nt=[15,43],Kt=[44,46,47,48,49,50,51,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],fe={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,directive:6,direction_tb:7,direction_bt:8,direction_rl:9,direction_lr:10,graphConfig:11,openDirective:12,typeDirective:13,closeDirective:14,NEWLINE:15,":":16,argDirective:17,open_directive:18,type_directive:19,arg_directive:20,close_directive:21,C4_CONTEXT:22,statements:23,EOF:24,C4_CONTAINER:25,C4_COMPONENT:26,C4_DYNAMIC:27,C4_DEPLOYMENT:28,otherStatements:29,diagramStatements:30,otherStatement:31,title:32,accDescription:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,boundaryStatement:39,boundaryStartStatement:40,boundaryStopStatement:41,boundaryStart:42,LBRACE:43,ENTERPRISE_BOUNDARY:44,attributes:45,SYSTEM_BOUNDARY:46,BOUNDARY:47,CONTAINER_BOUNDARY:48,NODE:49,NODE_L:50,NODE_R:51,RBRACE:52,diagramStatement:53,PERSON:54,PERSON_EXT:55,SYSTEM:56,SYSTEM_DB:57,SYSTEM_QUEUE:58,SYSTEM_EXT:59,SYSTEM_EXT_DB:60,SYSTEM_EXT_QUEUE:61,CONTAINER:62,CONTAINER_DB:63,CONTAINER_QUEUE:64,CONTAINER_EXT:65,CONTAINER_EXT_DB:66,CONTAINER_EXT_QUEUE:67,COMPONENT:68,COMPONENT_DB:69,COMPONENT_QUEUE:70,COMPONENT_EXT:71,COMPONENT_EXT_DB:72,COMPONENT_EXT_QUEUE:73,REL:74,BIREL:75,REL_U:76,REL_D:77,REL_L:78,REL_R:79,REL_B:80,REL_INDEX:81,UPDATE_EL_STYLE:82,UPDATE_REL_STYLE:83,UPDATE_LAYOUT_CONFIG:84,attribute:85,STR:86,STR_KEY:87,STR_VALUE:88,ATTRIBUTE:89,ATTRIBUTE_EMPTY:90,$accept:0,$end:1},terminals_:{2:"error",7:"direction_tb",8:"direction_bt",9:"direction_rl",10:"direction_lr",15:"NEWLINE",16:":",18:"open_directive",19:"type_directive",20:"arg_directive",21:"close_directive",22:"C4_CONTEXT",24:"EOF",25:"C4_CONTAINER",26:"C4_COMPONENT",27:"C4_DYNAMIC",28:"C4_DEPLOYMENT",32:"title",33:"accDescription",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",43:"LBRACE",44:"ENTERPRISE_BOUNDARY",46:"SYSTEM_BOUNDARY",47:"BOUNDARY",48:"CONTAINER_BOUNDARY",49:"NODE",50:"NODE_L",51:"NODE_R",52:"RBRACE",54:"PERSON",55:"PERSON_EXT",56:"SYSTEM",57:"SYSTEM_DB",58:"SYSTEM_QUEUE",59:"SYSTEM_EXT",60:"SYSTEM_EXT_DB",61:"SYSTEM_EXT_QUEUE",62:"CONTAINER",63:"CONTAINER_DB",64:"CONTAINER_QUEUE",65:"CONTAINER_EXT",66:"CONTAINER_EXT_DB",67:"CONTAINER_EXT_QUEUE",68:"COMPONENT",69:"COMPONENT_DB",70:"COMPONENT_QUEUE",71:"COMPONENT_EXT",72:"COMPONENT_EXT_DB",73:"COMPONENT_EXT_QUEUE",74:"REL",75:"BIREL",76:"REL_U",77:"REL_D",78:"REL_L",79:"REL_R",80:"REL_B",81:"REL_INDEX",82:"UPDATE_EL_STYLE",83:"UPDATE_REL_STYLE",84:"UPDATE_LAYOUT_CONFIG",86:"STR",87:"STR_KEY",88:"STR_VALUE",89:"ATTRIBUTE",90:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[3,2],[5,1],[5,1],[5,1],[5,1],[4,1],[6,4],[6,6],[12,1],[13,1],[17,1],[14,1],[11,4],[11,4],[11,4],[11,4],[11,4],[23,1],[23,1],[23,2],[29,1],[29,2],[29,3],[31,1],[31,1],[31,2],[31,2],[31,1],[39,3],[40,3],[40,3],[40,4],[42,2],[42,2],[42,2],[42,2],[42,2],[42,2],[42,2],[41,1],[30,1],[30,2],[30,3],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,1],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[45,1],[45,2],[85,1],[85,2],[85,1],[85,1]],performAction:function(bt,mt,wt,ft,It,it,Wt){var ct=it.length-1;switch(It){case 4:ft.setDirection("TB");break;case 5:ft.setDirection("BT");break;case 6:ft.setDirection("RL");break;case 7:ft.setDirection("LR");break;case 11:ft.parseDirective("%%{","open_directive");break;case 12:break;case 13:it[ct]=it[ct].trim().replace(/'/g,'"'),ft.parseDirective(it[ct],"arg_directive");break;case 14:ft.parseDirective("}%%","close_directive","c4Context");break;case 15:case 16:case 17:case 18:case 19:ft.setC4Type(it[ct-3]);break;case 26:ft.setTitle(it[ct].substring(6)),this.$=it[ct].substring(6);break;case 27:ft.setAccDescription(it[ct].substring(15)),this.$=it[ct].substring(15);break;case 28:this.$=it[ct].trim(),ft.setTitle(this.$);break;case 29:case 30:this.$=it[ct].trim(),ft.setAccDescription(this.$);break;case 35:case 36:it[ct].splice(2,0,"ENTERPRISE"),ft.addPersonOrSystemBoundary(...it[ct]),this.$=it[ct];break;case 37:ft.addPersonOrSystemBoundary(...it[ct]),this.$=it[ct];break;case 38:it[ct].splice(2,0,"CONTAINER"),ft.addContainerBoundary(...it[ct]),this.$=it[ct];break;case 39:ft.addDeploymentNode("node",...it[ct]),this.$=it[ct];break;case 40:ft.addDeploymentNode("nodeL",...it[ct]),this.$=it[ct];break;case 41:ft.addDeploymentNode("nodeR",...it[ct]),this.$=it[ct];break;case 42:ft.popBoundaryParseStack();break;case 46:ft.addPersonOrSystem("person",...it[ct]),this.$=it[ct];break;case 47:ft.addPersonOrSystem("external_person",...it[ct]),this.$=it[ct];break;case 48:ft.addPersonOrSystem("system",...it[ct]),this.$=it[ct];break;case 49:ft.addPersonOrSystem("system_db",...it[ct]),this.$=it[ct];break;case 50:ft.addPersonOrSystem("system_queue",...it[ct]),this.$=it[ct];break;case 51:ft.addPersonOrSystem("external_system",...it[ct]),this.$=it[ct];break;case 52:ft.addPersonOrSystem("external_system_db",...it[ct]),this.$=it[ct];break;case 53:ft.addPersonOrSystem("external_system_queue",...it[ct]),this.$=it[ct];break;case 54:ft.addContainer("container",...it[ct]),this.$=it[ct];break;case 55:ft.addContainer("container_db",...it[ct]),this.$=it[ct];break;case 56:ft.addContainer("container_queue",...it[ct]),this.$=it[ct];break;case 57:ft.addContainer("external_container",...it[ct]),this.$=it[ct];break;case 58:ft.addContainer("external_container_db",...it[ct]),this.$=it[ct];break;case 59:ft.addContainer("external_container_queue",...it[ct]),this.$=it[ct];break;case 60:ft.addComponent("component",...it[ct]),this.$=it[ct];break;case 61:ft.addComponent("component_db",...it[ct]),this.$=it[ct];break;case 62:ft.addComponent("component_queue",...it[ct]),this.$=it[ct];break;case 63:ft.addComponent("external_component",...it[ct]),this.$=it[ct];break;case 64:ft.addComponent("external_component_db",...it[ct]),this.$=it[ct];break;case 65:ft.addComponent("external_component_queue",...it[ct]),this.$=it[ct];break;case 67:ft.addRel("rel",...it[ct]),this.$=it[ct];break;case 68:ft.addRel("birel",...it[ct]),this.$=it[ct];break;case 69:ft.addRel("rel_u",...it[ct]),this.$=it[ct];break;case 70:ft.addRel("rel_d",...it[ct]),this.$=it[ct];break;case 71:ft.addRel("rel_l",...it[ct]),this.$=it[ct];break;case 72:ft.addRel("rel_r",...it[ct]),this.$=it[ct];break;case 73:ft.addRel("rel_b",...it[ct]),this.$=it[ct];break;case 74:it[ct].splice(0,1),ft.addRel("rel",...it[ct]),this.$=it[ct];break;case 75:ft.updateElStyle("update_el_style",...it[ct]),this.$=it[ct];break;case 76:ft.updateRelStyle("update_rel_style",...it[ct]),this.$=it[ct];break;case 77:ft.updateLayoutConfig("update_layout_config",...it[ct]),this.$=it[ct];break;case 78:this.$=[it[ct]];break;case 79:it[ct].unshift(it[ct-1]),this.$=it[ct];break;case 80:case 82:this.$=it[ct].trim();break;case 81:let Gt={};Gt[it[ct-1].trim()]=it[ct].trim(),this.$=Gt;break;case 83:this.$="";break}},table:[{3:1,4:2,5:3,6:4,7:e,8:r,9:i,10:n,11:5,12:10,18:s,22:a,25:o,26:l,27:h,28:u},{1:[3]},{1:[2,1]},{1:[2,2]},{3:17,4:2,5:3,6:4,7:e,8:r,9:i,10:n,11:5,12:10,18:s,22:a,25:o,26:l,27:h,28:u},{1:[2,8]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{1:[2,7]},{13:18,19:[1,19]},{15:[1,20]},{15:[1,21]},{15:[1,22]},{15:[1,23]},{15:[1,24]},{19:[2,11]},{1:[2,3]},{14:25,16:[1,26],21:f},t([16,21],[2,12]),{23:28,29:29,30:30,31:31,32:d,33:p,34:m,36:b,38:x,39:58,40:70,42:71,44:k,46:v,47:B,48:R,49:P,50:V,51:O,53:32,54:F,55:C,56:S,57:E,58:_,59:w,60:g,61:D,62:y,63:N,64:nt,65:Y,66:Z,67:J,68:X,69:tt,70:ot,71:at,72:U,73:Tt,74:$,75:j,76:W,77:z,78:A,79:M,80:q,81:L,82:st,83:T,84:Dt},{23:79,29:29,30:30,31:31,32:d,33:p,34:m,36:b,38:x,39:58,40:70,42:71,44:k,46:v,47:B,48:R,49:P,50:V,51:O,53:32,54:F,55:C,56:S,57:E,58:_,59:w,60:g,61:D,62:y,63:N,64:nt,65:Y,66:Z,67:J,68:X,69:tt,70:ot,71:at,72:U,73:Tt,74:$,75:j,76:W,77:z,78:A,79:M,80:q,81:L,82:st,83:T,84:Dt},{23:80,29:29,30:30,31:31,32:d,33:p,34:m,36:b,38:x,39:58,40:70,42:71,44:k,46:v,47:B,48:R,49:P,50:V,51:O,53:32,54:F,55:C,56:S,57:E,58:_,59:w,60:g,61:D,62:y,63:N,64:nt,65:Y,66:Z,67:J,68:X,69:tt,70:ot,71:at,72:U,73:Tt,74:$,75:j,76:W,77:z,78:A,79:M,80:q,81:L,82:st,83:T,84:Dt},{23:81,29:29,30:30,31:31,32:d,33:p,34:m,36:b,38:x,39:58,40:70,42:71,44:k,46:v,47:B,48:R,49:P,50:V,51:O,53:32,54:F,55:C,56:S,57:E,58:_,59:w,60:g,61:D,62:y,63:N,64:nt,65:Y,66:Z,67:J,68:X,69:tt,70:ot,71:at,72:U,73:Tt,74:$,75:j,76:W,77:z,78:A,79:M,80:q,81:L,82:st,83:T,84:Dt},{23:82,29:29,30:30,31:31,32:d,33:p,34:m,36:b,38:x,39:58,40:70,42:71,44:k,46:v,47:B,48:R,49:P,50:V,51:O,53:32,54:F,55:C,56:S,57:E,58:_,59:w,60:g,61:D,62:y,63:N,64:nt,65:Y,66:Z,67:J,68:X,69:tt,70:ot,71:at,72:U,73:Tt,74:$,75:j,76:W,77:z,78:A,79:M,80:q,81:L,82:st,83:T,84:Dt},{15:[1,83]},{17:84,20:[1,85]},{15:[2,14]},{24:[1,86]},t(et,[2,20],{53:32,39:58,40:70,42:71,30:87,44:k,46:v,47:B,48:R,49:P,50:V,51:O,54:F,55:C,56:S,57:E,58:_,59:w,60:g,61:D,62:y,63:N,64:nt,65:Y,66:Z,67:J,68:X,69:tt,70:ot,71:at,72:U,73:Tt,74:$,75:j,76:W,77:z,78:A,79:M,80:q,81:L,82:st,83:T,84:Dt}),t(et,[2,21]),t(Et,[2,23],{15:[1,88]}),t(et,[2,43],{15:[1,89]}),t(vt,[2,26]),t(vt,[2,27]),{35:[1,90]},{37:[1,91]},t(vt,[2,30]),{45:92,85:93,86:pt,87:ut,89:gt,90:ht},{45:98,85:93,86:pt,87:ut,89:gt,90:ht},{45:99,85:93,86:pt,87:ut,89:gt,90:ht},{45:100,85:93,86:pt,87:ut,89:gt,90:ht},{45:101,85:93,86:pt,87:ut,89:gt,90:ht},{45:102,85:93,86:pt,87:ut,89:gt,90:ht},{45:103,85:93,86:pt,87:ut,89:gt,90:ht},{45:104,85:93,86:pt,87:ut,89:gt,90:ht},{45:105,85:93,86:pt,87:ut,89:gt,90:ht},{45:106,85:93,86:pt,87:ut,89:gt,90:ht},{45:107,85:93,86:pt,87:ut,89:gt,90:ht},{45:108,85:93,86:pt,87:ut,89:gt,90:ht},{45:109,85:93,86:pt,87:ut,89:gt,90:ht},{45:110,85:93,86:pt,87:ut,89:gt,90:ht},{45:111,85:93,86:pt,87:ut,89:gt,90:ht},{45:112,85:93,86:pt,87:ut,89:gt,90:ht},{45:113,85:93,86:pt,87:ut,89:gt,90:ht},{45:114,85:93,86:pt,87:ut,89:gt,90:ht},{45:115,85:93,86:pt,87:ut,89:gt,90:ht},{45:116,85:93,86:pt,87:ut,89:gt,90:ht},t(yt,[2,66]),{45:117,85:93,86:pt,87:ut,89:gt,90:ht},{45:118,85:93,86:pt,87:ut,89:gt,90:ht},{45:119,85:93,86:pt,87:ut,89:gt,90:ht},{45:120,85:93,86:pt,87:ut,89:gt,90:ht},{45:121,85:93,86:pt,87:ut,89:gt,90:ht},{45:122,85:93,86:pt,87:ut,89:gt,90:ht},{45:123,85:93,86:pt,87:ut,89:gt,90:ht},{45:124,85:93,86:pt,87:ut,89:gt,90:ht},{45:125,85:93,86:pt,87:ut,89:gt,90:ht},{45:126,85:93,86:pt,87:ut,89:gt,90:ht},{45:127,85:93,86:pt,87:ut,89:gt,90:ht},{30:128,39:58,40:70,42:71,44:k,46:v,47:B,48:R,49:P,50:V,51:O,53:32,54:F,55:C,56:S,57:E,58:_,59:w,60:g,61:D,62:y,63:N,64:nt,65:Y,66:Z,67:J,68:X,69:tt,70:ot,71:at,72:U,73:Tt,74:$,75:j,76:W,77:z,78:A,79:M,80:q,81:L,82:st,83:T,84:Dt},{15:[1,130],43:[1,129]},{45:131,85:93,86:pt,87:ut,89:gt,90:ht},{45:132,85:93,86:pt,87:ut,89:gt,90:ht},{45:133,85:93,86:pt,87:ut,89:gt,90:ht},{45:134,85:93,86:pt,87:ut,89:gt,90:ht},{45:135,85:93,86:pt,87:ut,89:gt,90:ht},{45:136,85:93,86:pt,87:ut,89:gt,90:ht},{45:137,85:93,86:pt,87:ut,89:gt,90:ht},{24:[1,138]},{24:[1,139]},{24:[1,140]},{24:[1,141]},t(he,[2,9]),{14:142,21:f},{21:[2,13]},{1:[2,15]},t(et,[2,22]),t(Et,[2,24],{31:31,29:143,32:d,33:p,34:m,36:b,38:x}),t(et,[2,44],{29:29,30:30,31:31,53:32,39:58,40:70,42:71,23:144,32:d,33:p,34:m,36:b,38:x,44:k,46:v,47:B,48:R,49:P,50:V,51:O,54:F,55:C,56:S,57:E,58:_,59:w,60:g,61:D,62:y,63:N,64:nt,65:Y,66:Z,67:J,68:X,69:tt,70:ot,71:at,72:U,73:Tt,74:$,75:j,76:W,77:z,78:A,79:M,80:q,81:L,82:st,83:T,84:Dt}),t(vt,[2,28]),t(vt,[2,29]),t(yt,[2,46]),t(re,[2,78],{85:93,45:145,86:pt,87:ut,89:gt,90:ht}),t(Mt,[2,80]),{88:[1,146]},t(Mt,[2,82]),t(Mt,[2,83]),t(yt,[2,47]),t(yt,[2,48]),t(yt,[2,49]),t(yt,[2,50]),t(yt,[2,51]),t(yt,[2,52]),t(yt,[2,53]),t(yt,[2,54]),t(yt,[2,55]),t(yt,[2,56]),t(yt,[2,57]),t(yt,[2,58]),t(yt,[2,59]),t(yt,[2,60]),t(yt,[2,61]),t(yt,[2,62]),t(yt,[2,63]),t(yt,[2,64]),t(yt,[2,65]),t(yt,[2,67]),t(yt,[2,68]),t(yt,[2,69]),t(yt,[2,70]),t(yt,[2,71]),t(yt,[2,72]),t(yt,[2,73]),t(yt,[2,74]),t(yt,[2,75]),t(yt,[2,76]),t(yt,[2,77]),{41:147,52:[1,148]},{15:[1,149]},{43:[1,150]},t(Nt,[2,35]),t(Nt,[2,36]),t(Nt,[2,37]),t(Nt,[2,38]),t(Nt,[2,39]),t(Nt,[2,40]),t(Nt,[2,41]),{1:[2,16]},{1:[2,17]},{1:[2,18]},{1:[2,19]},{15:[1,151]},t(Et,[2,25]),t(et,[2,45]),t(re,[2,79]),t(Mt,[2,81]),t(yt,[2,31]),t(yt,[2,42]),t(Kt,[2,32]),t(Kt,[2,33],{15:[1,152]}),t(he,[2,10]),t(Kt,[2,34])],defaultActions:{2:[2,1],3:[2,2],5:[2,8],6:[2,4],7:[2,5],8:[2,6],9:[2,7],16:[2,11],17:[2,3],27:[2,14],85:[2,13],86:[2,15],138:[2,16],139:[2,17],140:[2,18],141:[2,19]},parseError:function(bt,mt){if(mt.recoverable)this.trace(bt);else{var wt=new Error(bt);throw wt.hash=mt,wt}},parse:function(bt){var mt=this,wt=[0],ft=[],It=[null],it=[],Wt=this.table,ct="",Gt=0,Jt=0,se=2,ie=1,ae=it.slice.call(arguments,1),Rt=Object.create(this.lexer),Ht={yy:{}};for(var ne in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ne)&&(Ht.yy[ne]=this.yy[ne]);Rt.setInput(bt,Ht.yy),Ht.yy.lexer=Rt,Ht.yy.parser=this,typeof Rt.yylloc>"u"&&(Rt.yylloc={});var Ut=Rt.yylloc;it.push(Ut);var ki=Rt.options&&Rt.options.ranges;typeof Ht.yy.parseError=="function"?this.parseError=Ht.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function mn(){var K;return K=ft.pop()||Rt.lex()||ie,typeof K!="number"&&(K instanceof Array&&(ft=K,K=ft.pop()),K=mt.symbols_[K]||K),K}for(var me,$t,Ce,tr,Se={},Ve,be,Qe,qe;;){if($t=wt[wt.length-1],this.defaultActions[$t]?Ce=this.defaultActions[$t]:((me===null||typeof me>"u")&&(me=mn()),Ce=Wt[$t]&&Wt[$t][me]),typeof Ce>"u"||!Ce.length||!Ce[0]){var Lt="";qe=[];for(Ve in Wt[$t])this.terminals_[Ve]&&Ve>se&&qe.push("'"+this.terminals_[Ve]+"'");Rt.showPosition?Lt="Parse error on line "+(Gt+1)+`:
1205
1205
  `+Rt.showPosition()+`
1206
1206
  Expecting `+qe.join(", ")+", got '"+(this.terminals_[me]||me)+"'":Lt="Parse error on line "+(Gt+1)+": Unexpected "+(me==ie?"end of input":"'"+(this.terminals_[me]||me)+"'"),this.parseError(Lt,{text:Rt.match,token:this.terminals_[me]||me,line:Rt.yylineno,loc:Ut,expected:qe})}if(Ce[0]instanceof Array&&Ce.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$t+", token: "+me);switch(Ce[0]){case 1:wt.push(me),It.push(Rt.yytext),it.push(Rt.yylloc),wt.push(Ce[1]),me=null,Jt=Rt.yyleng,ct=Rt.yytext,Gt=Rt.yylineno,Ut=Rt.yylloc;break;case 2:if(be=this.productions_[Ce[1]][1],Se.$=It[It.length-be],Se._$={first_line:it[it.length-(be||1)].first_line,last_line:it[it.length-1].last_line,first_column:it[it.length-(be||1)].first_column,last_column:it[it.length-1].last_column},ki&&(Se._$.range=[it[it.length-(be||1)].range[0],it[it.length-1].range[1]]),tr=this.performAction.apply(Se,[ct,Jt,Gt,Ht.yy,Ce[1],It,it].concat(ae)),typeof tr<"u")return tr;be&&(wt=wt.slice(0,-1*be*2),It=It.slice(0,-1*be),it=it.slice(0,-1*be)),wt.push(this.productions_[Ce[1]][0]),It.push(Se.$),it.push(Se._$),Qe=Wt[wt[wt.length-2]][wt[wt.length-1]],wt.push(Qe);break;case 3:return!0}}return!0}},qt=function(){var Bt={EOF:1,parseError:function(mt,wt){if(this.yy.parser)this.yy.parser.parseError(mt,wt);else throw new Error(mt)},setInput:function(bt,mt){return this.yy=mt||this.yy||{},this._input=bt,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},input:function(){var bt=this._input[0];this.yytext+=bt,this.yyleng++,this.offset++,this.match+=bt,this.matched+=bt;var mt=bt.match(/(?:\r\n?|\n).*/g);return mt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),bt},unput:function(bt){var mt=bt.length,wt=bt.split(/(?:\r\n?|\n)/g);this._input=bt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-mt),this.offset-=mt;var ft=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),wt.length-1&&(this.yylineno-=wt.length-1);var It=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:wt?(wt.length===ft.length?this.yylloc.first_column:0)+ft[ft.length-wt.length].length-wt[0].length:this.yylloc.first_column-mt},this.options.ranges&&(this.yylloc.range=[It[0],It[0]+this.yyleng-mt]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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).
1207
1207
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(bt){this.unput(this.match.slice(bt))},pastInput:function(){var bt=this.matched.substr(0,this.matched.length-this.match.length);return(bt.length>20?"...":"")+bt.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var bt=this.match;return bt.length<20&&(bt+=this._input.substr(0,20-bt.length)),(bt.substr(0,20)+(bt.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var bt=this.pastInput(),mt=new Array(bt.length+1).join("-");return bt+this.upcomingInput()+`
1208
1208
  `+mt+"^"},test_match:function(bt,mt){var wt,ft,It;if(this.options.backtrack_lexer&&(It={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&&(It.yylloc.range=this.yylloc.range.slice(0))),ft=bt[0].match(/(?:\r\n?|\n).*/g),ft&&(this.yylineno+=ft.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ft?ft[ft.length-1].length-ft[ft.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+bt[0].length},this.yytext+=bt[0],this.match+=bt[0],this.matches=bt,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(bt[0].length),this.matched+=bt[0],wt=this.performAction.call(this,this.yy,this,mt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),wt)return wt;if(this._backtrack){for(var it in It)this[it]=It[it];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var bt,mt,wt,ft;this._more||(this.yytext="",this.match="");for(var It=this._currentRules(),it=0;it<It.length;it++)if(wt=this._input.match(this.rules[It[it]]),wt&&(!mt||wt[0].length>mt[0].length)){if(mt=wt,ft=it,this.options.backtrack_lexer){if(bt=this.test_match(wt,It[it]),bt!==!1)return bt;if(this._backtrack){mt=!1;continue}else return!1}else if(!this.options.flex)break}return mt?(bt=this.test_match(mt,It[ft]),bt!==!1?bt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1209
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var mt=this.next();return mt||this.lex()},begin:function(mt){this.conditionStack.push(mt)},popState:function(){var mt=this.conditionStack.length-1;return mt>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(mt){return mt=this.conditionStack.length-1-Math.abs(mt||0),mt>=0?this.conditionStack[mt]:"INITIAL"},pushState:function(mt){this.begin(mt)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(mt,wt,ft,It){switch(ft){case 0:return this.begin("open_directive"),18;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 10;case 5:return this.begin("type_directive"),19;case 6:return this.popState(),this.begin("arg_directive"),16;case 7:return this.popState(),this.popState(),21;case 8:return 20;case 9:return 32;case 10:return 33;case 11:return this.begin("acc_title"),34;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),36;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:break;case 19:c;break;case 20:return 15;case 21:break;case 22:return 22;case 23:return 25;case 24:return 26;case 25:return 27;case 26:return 28;case 27:return this.begin("person_ext"),55;case 28:return this.begin("person"),54;case 29:return this.begin("system_ext_queue"),61;case 30:return this.begin("system_ext_db"),60;case 31:return this.begin("system_ext"),59;case 32:return this.begin("system_queue"),58;case 33:return this.begin("system_db"),57;case 34:return this.begin("system"),56;case 35:return this.begin("boundary"),47;case 36:return this.begin("enterprise_boundary"),44;case 37:return this.begin("system_boundary"),46;case 38:return this.begin("container_ext_queue"),67;case 39:return this.begin("container_ext_db"),66;case 40:return this.begin("container_ext"),65;case 41:return this.begin("container_queue"),64;case 42:return this.begin("container_db"),63;case 43:return this.begin("container"),62;case 44:return this.begin("container_boundary"),48;case 45:return this.begin("component_ext_queue"),73;case 46:return this.begin("component_ext_db"),72;case 47:return this.begin("component_ext"),71;case 48:return this.begin("component_queue"),70;case 49:return this.begin("component_db"),69;case 50:return this.begin("component"),68;case 51:return this.begin("node"),49;case 52:return this.begin("node"),49;case 53:return this.begin("node_l"),50;case 54:return this.begin("node_r"),51;case 55:return this.begin("rel"),74;case 56:return this.begin("birel"),75;case 57:return this.begin("rel_u"),76;case 58:return this.begin("rel_u"),76;case 59:return this.begin("rel_d"),77;case 60:return this.begin("rel_d"),77;case 61:return this.begin("rel_l"),78;case 62:return this.begin("rel_l"),78;case 63:return this.begin("rel_r"),79;case 64:return this.begin("rel_r"),79;case 65:return this.begin("rel_b"),80;case 66:return this.begin("rel_index"),81;case 67:return this.begin("update_el_style"),82;case 68:return this.begin("update_rel_style"),83;case 69:return this.begin("update_layout_config"),84;case 70:return"EOF_IN_STRUCT";case 71:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 72:this.begin("attribute");break;case 73:this.popState(),this.popState();break;case 74:return 90;case 75:break;case 76:return 90;case 77:this.begin("string");break;case 78:this.popState();break;case 79:return"STR";case 80:this.begin("string_kv");break;case 81:return this.begin("string_kv_key"),"STR_KEY";case 82:this.popState(),this.begin("string_kv_value");break;case 83:return"STR_VALUE";case 84:this.popState(),this.popState();break;case 85:return"STR";case 86:return"LBRACE";case 87:return"RBRACE";case 88:return"SPACE";case 89:return"EOL";case 90:return 24}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},string_kv_value:{rules:[83,84],inclusive:!1},string_kv_key:{rules:[82],inclusive:!1},string_kv:{rules:[81],inclusive:!1},string:{rules:[78,79],inclusive:!1},attribute:{rules:[73,74,75,76,77,80,85],inclusive:!1},update_layout_config:{rules:[70,71,72,73],inclusive:!1},update_rel_style:{rules:[70,71,72,73],inclusive:!1},update_el_style:{rules:[70,71,72,73],inclusive:!1},rel_b:{rules:[70,71,72,73],inclusive:!1},rel_r:{rules:[70,71,72,73],inclusive:!1},rel_l:{rules:[70,71,72,73],inclusive:!1},rel_d:{rules:[70,71,72,73],inclusive:!1},rel_u:{rules:[70,71,72,73],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[70,71,72,73],inclusive:!1},node_r:{rules:[70,71,72,73],inclusive:!1},node_l:{rules:[70,71,72,73],inclusive:!1},node:{rules:[70,71,72,73],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[70,71,72,73],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[70,71,72,73],inclusive:!1},component_ext:{rules:[70,71,72,73],inclusive:!1},component_queue:{rules:[70,71,72,73],inclusive:!1},component_db:{rules:[70,71,72,73],inclusive:!1},component:{rules:[70,71,72,73],inclusive:!1},container_boundary:{rules:[70,71,72,73],inclusive:!1},container_ext_queue:{rules:[],inclusive:!1},container_ext_db:{rules:[70,71,72,73],inclusive:!1},container_ext:{rules:[70,71,72,73],inclusive:!1},container_queue:{rules:[70,71,72,73],inclusive:!1},container_db:{rules:[70,71,72,73],inclusive:!1},container:{rules:[70,71,72,73],inclusive:!1},birel:{rules:[70,71,72,73],inclusive:!1},system_boundary:{rules:[70,71,72,73],inclusive:!1},enterprise_boundary:{rules:[70,71,72,73],inclusive:!1},boundary:{rules:[70,71,72,73],inclusive:!1},system_ext_queue:{rules:[70,71,72,73],inclusive:!1},system_ext_db:{rules:[70,71,72,73],inclusive:!1},system_ext:{rules:[70,71,72,73],inclusive:!1},system_queue:{rules:[70,71,72,73],inclusive:!1},system_db:{rules:[70,71,72,73],inclusive:!1},system:{rules:[70,71,72,73],inclusive:!1},person_ext:{rules:[70,71,72,73],inclusive:!1},person:{rules:[70,71,72,73],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,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,86,87,88,89,90],inclusive:!0}}};return Bt}();fe.lexer=qt;function Ft(){this.yy={}}return Ft.prototype=fe,fe.Parser=Ft,new Ft}();Wl.parser=Wl;const GI=Wl,$I=t=>t.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/)!==null;let ei=[],cn=[""],fr="global",Qr="",bi=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Ga=[],Z1="",Q1=!1,Hl=4,ql=2;var Ry;const jI=function(){return Ry},XI=function(t){Ry=Ur(t,G())},KI=function(t,e,r){xe.parseDirective(this,t,e,r)},ZI=function(t,e,r,i,n,s,a,o,l){if(t==null||e===void 0||e===null||r===void 0||r===null||i===void 0||i===null)return;let h={};const u=Ga.find(f=>f.from===e&&f.to===r);if(u?h=u:Ga.push(h),h.type=t,h.from=e,h.to=r,h.label={text:i},n==null)h.techn={text:""};else if(typeof n=="object"){let[f,d]=Object.entries(n)[0];h[f]={text:d}}else h.techn={text:n};if(s==null)h.descr={text:""};else if(typeof s=="object"){let[f,d]=Object.entries(s)[0];h[f]={text:d}}else h.descr={text:s};if(typeof a=="object"){let[f,d]=Object.entries(a)[0];h[f]=d}else h.sprite=a;if(typeof o=="object"){let[f,d]=Object.entries(o)[0];h[f]=d}else h.tags=o;if(typeof l=="object"){let[f,d]=Object.entries(l)[0];h[f]=d}else h.link=l;h.wrap=yn()},QI=function(t,e,r,i,n,s,a){if(e===null||r===null)return;let o={};const l=ei.find(h=>h.alias===e);if(l&&e===l.alias?o=l:(o.alias=e,ei.push(o)),r==null?o.label={text:""}:o.label={text:r},i==null)o.descr={text:""};else if(typeof i=="object"){let[h,u]=Object.entries(i)[0];o[h]={text:u}}else o.descr={text:i};if(typeof n=="object"){let[h,u]=Object.entries(n)[0];o[h]=u}else o.sprite=n;if(typeof s=="object"){let[h,u]=Object.entries(s)[0];o[h]=u}else o.tags=s;if(typeof a=="object"){let[h,u]=Object.entries(a)[0];o[h]=u}else o.link=a;o.typeC4Shape={text:t},o.parentBoundary=fr,o.wrap=yn()},JI=function(t,e,r,i,n,s,a,o){if(e===null||r===null)return;let l={};const h=ei.find(u=>u.alias===e);if(h&&e===h.alias?l=h:(l.alias=e,ei.push(l)),r==null?l.label={text:""}:l.label={text:r},i==null)l.techn={text:""};else if(typeof i=="object"){let[u,f]=Object.entries(i)[0];l[u]={text:f}}else l.techn={text:i};if(n==null)l.descr={text:""};else if(typeof n=="object"){let[u,f]=Object.entries(n)[0];l[u]={text:f}}else l.descr={text:n};if(typeof s=="object"){let[u,f]=Object.entries(s)[0];l[u]=f}else l.sprite=s;if(typeof a=="object"){let[u,f]=Object.entries(a)[0];l[u]=f}else l.tags=a;if(typeof o=="object"){let[u,f]=Object.entries(o)[0];l[u]=f}else l.link=o;l.wrap=yn(),l.typeC4Shape={text:t},l.parentBoundary=fr},tM=function(t,e,r,i,n,s,a,o){if(e===null||r===null)return;let l={};const h=ei.find(u=>u.alias===e);if(h&&e===h.alias?l=h:(l.alias=e,ei.push(l)),r==null?l.label={text:""}:l.label={text:r},i==null)l.techn={text:""};else if(typeof i=="object"){let[u,f]=Object.entries(i)[0];l[u]={text:f}}else l.techn={text:i};if(n==null)l.descr={text:""};else if(typeof n=="object"){let[u,f]=Object.entries(n)[0];l[u]={text:f}}else l.descr={text:n};if(typeof s=="object"){let[u,f]=Object.entries(s)[0];l[u]=f}else l.sprite=s;if(typeof a=="object"){let[u,f]=Object.entries(a)[0];l[u]=f}else l.tags=a;if(typeof o=="object"){let[u,f]=Object.entries(o)[0];l[u]=f}else l.link=o;l.wrap=yn(),l.typeC4Shape={text:t},l.parentBoundary=fr},eM=function(t,e,r,i,n){if(t===null||e===null)return;let s={};const a=bi.find(o=>o.alias===t);if(a&&t===a.alias?s=a:(s.alias=t,bi.push(s)),e==null?s.label={text:""}:s.label={text:e},r==null)s.type={text:"system"};else if(typeof r=="object"){let[o,l]=Object.entries(r)[0];s[o]={text:l}}else s.type={text:r};if(typeof i=="object"){let[o,l]=Object.entries(i)[0];s[o]=l}else s.tags=i;if(typeof n=="object"){let[o,l]=Object.entries(n)[0];s[o]=l}else s.link=n;s.parentBoundary=fr,s.wrap=yn(),Qr=fr,fr=t,cn.push(Qr)},rM=function(t,e,r,i,n){if(t===null||e===null)return;let s={};const a=bi.find(o=>o.alias===t);if(a&&t===a.alias?s=a:(s.alias=t,bi.push(s)),e==null?s.label={text:""}:s.label={text:e},r==null)s.type={text:"container"};else if(typeof r=="object"){let[o,l]=Object.entries(r)[0];s[o]={text:l}}else s.type={text:r};if(typeof i=="object"){let[o,l]=Object.entries(i)[0];s[o]=l}else s.tags=i;if(typeof n=="object"){let[o,l]=Object.entries(n)[0];s[o]=l}else s.link=n;s.parentBoundary=fr,s.wrap=yn(),Qr=fr,fr=t,cn.push(Qr)},iM=function(t,e,r,i,n,s,a,o){if(e===null||r===null)return;let l={};const h=bi.find(u=>u.alias===e);if(h&&e===h.alias?l=h:(l.alias=e,bi.push(l)),r==null?l.label={text:""}:l.label={text:r},i==null)l.type={text:"node"};else if(typeof i=="object"){let[u,f]=Object.entries(i)[0];l[u]={text:f}}else l.type={text:i};if(n==null)l.descr={text:""};else if(typeof n=="object"){let[u,f]=Object.entries(n)[0];l[u]={text:f}}else l.descr={text:n};if(typeof a=="object"){let[u,f]=Object.entries(a)[0];l[u]=f}else l.tags=a;if(typeof o=="object"){let[u,f]=Object.entries(o)[0];l[u]=f}else l.link=o;l.nodeType=t,l.parentBoundary=fr,l.wrap=yn(),Qr=fr,fr=e,cn.push(Qr)},nM=function(){fr=Qr,cn.pop(),Qr=cn.pop(),cn.push(Qr)},sM=function(t,e,r,i,n,s,a,o,l,h,u){let f=ei.find(d=>d.alias===e);if(!(f===void 0&&(f=bi.find(d=>d.alias===e),f===void 0))){if(r!=null)if(typeof r=="object"){let[d,p]=Object.entries(r)[0];f[d]=p}else f.bgColor=r;if(i!=null)if(typeof i=="object"){let[d,p]=Object.entries(i)[0];f[d]=p}else f.fontColor=i;if(n!=null)if(typeof n=="object"){let[d,p]=Object.entries(n)[0];f[d]=p}else f.borderColor=n;if(s!=null)if(typeof s=="object"){let[d,p]=Object.entries(s)[0];f[d]=p}else f.shadowing=s;if(a!=null)if(typeof a=="object"){let[d,p]=Object.entries(a)[0];f[d]=p}else f.shape=a;if(o!=null)if(typeof o=="object"){let[d,p]=Object.entries(o)[0];f[d]=p}else f.sprite=o;if(l!=null)if(typeof l=="object"){let[d,p]=Object.entries(l)[0];f[d]=p}else f.techn=l;if(h!=null)if(typeof h=="object"){let[d,p]=Object.entries(h)[0];f[d]=p}else f.legendText=h;if(u!=null)if(typeof u=="object"){let[d,p]=Object.entries(u)[0];f[d]=p}else f.legendSprite=u}},aM=function(t,e,r,i,n,s,a){const o=Ga.find(l=>l.from===e&&l.to===r);if(o!==void 0){if(i!=null)if(typeof i=="object"){let[l,h]=Object.entries(i)[0];o[l]=h}else o.textColor=i;if(n!=null)if(typeof n=="object"){let[l,h]=Object.entries(n)[0];o[l]=h}else o.lineColor=n;if(s!=null)if(typeof s=="object"){let[l,h]=Object.entries(s)[0];o[l]=parseInt(h)}else o.offsetX=parseInt(s);if(a!=null)if(typeof a=="object"){let[l,h]=Object.entries(a)[0];o[l]=parseInt(h)}else o.offsetY=parseInt(a)}},oM=function(t,e,r){let i=Hl,n=ql;if(typeof e=="object"){const s=Object.values(e)[0];i=parseInt(s)}else i=parseInt(e);if(typeof r=="object"){const s=Object.values(r)[0];n=parseInt(s)}else n=parseInt(r);i>=1&&(Hl=i),n>=1&&(ql=n)},lM=function(){return Hl},cM=function(){return ql},hM=function(){return fr},uM=function(){return Qr},Oy=function(t){return t==null?ei:ei.filter(e=>e.parentBoundary===t)},fM=function(t){return ei.find(e=>e.alias===t)},dM=function(t){return Object.keys(Oy(t))},pM=function(t){return t==null?bi:bi.filter(e=>e.parentBoundary===t)},gM=function(){return Ga},yM=function(){return Z1},mM=function(t){Q1=t},yn=function(){return Q1},bM=function(){ei=[],bi=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Qr="",fr="global",cn=[""],Ga=[],cn=[""],Z1="",Q1=!1,Hl=4,ql=2},_M={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},xM={FILLED:0,OPEN:1},vM={LEFTOF:0,RIGHTOF:1,OVER:2},kM=function(t){Z1=Ur(t,G())},Fy={addPersonOrSystem:QI,addPersonOrSystemBoundary:eM,addContainer:JI,addContainerBoundary:rM,addComponent:tM,addDeploymentNode:iM,popBoundaryParseStack:nM,addRel:ZI,updateElStyle:sM,updateRelStyle:aM,updateLayoutConfig:oM,autoWrap:yn,setWrap:mM,getC4ShapeArray:Oy,getC4Shape:fM,getC4ShapeKeys:dM,getBoundarys:pM,getCurrentBoundaryParse:hM,getParentBoundaryParse:uM,getRels:gM,getTitle:yM,getC4Type:jI,getC4ShapeInRow:lM,getC4BoundaryInRow:cM,setAccTitle:kr,getAccTitle:Br,getAccDescription:Ir,setAccDescription:Dr,parseDirective:KI,getConfig:()=>G().c4,clear:bM,LINETYPE:_M,ARROWTYPE:xM,PLACEMENT:vM,setTitle:kM,setC4Type:XI},J1=function(t,e){const r=t.append("rect");if(r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),e.attrs!=="undefined"&&e.attrs!==null)for(let i in e.attrs)r.attr(i,e.attrs[i]);return e.class!=="undefined"&&r.attr("class",e.class),r},Py=function(t,e,r,i,n,s){const a=t.append("image");a.attr("width",e),a.attr("height",r),a.attr("x",i),a.attr("y",n);let o=s.startsWith("data:image/png;base64")?s:Ki(s);a.attr("xlink:href",o)},wM=(t,e,r)=>{const i=t.append("g");let n=0;for(let s of e){let a=s.textColor?s.textColor:"#444444",o=s.lineColor?s.lineColor:"#444444",l=s.offsetX?parseInt(s.offsetX):0,h=s.offsetY?parseInt(s.offsetY):0,u="";if(n===0){let d=i.append("line");d.attr("x1",s.startPoint.x),d.attr("y1",s.startPoint.y),d.attr("x2",s.endPoint.x),d.attr("y2",s.endPoint.y),d.attr("stroke-width","1"),d.attr("stroke",o),d.style("fill","none"),s.type!=="rel_b"&&d.attr("marker-end","url("+u+"#arrowhead)"),(s.type==="birel"||s.type==="rel_b")&&d.attr("marker-start","url("+u+"#arrowend)"),n=-1}else{let d=i.append("path");d.attr("fill","none").attr("stroke-width","1").attr("stroke",o).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",s.startPoint.x).replaceAll("starty",s.startPoint.y).replaceAll("controlx",s.startPoint.x+(s.endPoint.x-s.startPoint.x)/2-(s.endPoint.x-s.startPoint.x)/4).replaceAll("controly",s.startPoint.y+(s.endPoint.y-s.startPoint.y)/2).replaceAll("stopx",s.endPoint.x).replaceAll("stopy",s.endPoint.y)),s.type!=="rel_b"&&d.attr("marker-end","url("+u+"#arrowhead)"),(s.type==="birel"||s.type==="rel_b")&&d.attr("marker-start","url("+u+"#arrowend)")}let f=r.messageFont();zi(r)(s.label.text,i,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+l,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+h,s.label.width,s.label.height,{fill:a},f),s.techn&&s.techn.text!==""&&(f=r.messageFont(),zi(r)("["+s.techn.text+"]",i,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+l,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+r.messageFontSize+5+h,Math.max(s.label.width,s.techn.width),s.techn.height,{fill:a,"font-style":"italic"},f))}},TM=function(t,e,r){const i=t.append("g");let n=e.bgColor?e.bgColor:"none",s=e.borderColor?e.borderColor:"#444444",a=e.fontColor?e.fontColor:"black",o={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(o={"stroke-width":1});let l={x:e.x,y:e.y,fill:n,stroke:s,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:o};J1(i,l);let h=r.boundaryFont();h.fontWeight="bold",h.fontSize=h.fontSize+2,h.fontColor=a,zi(r)(e.label.text,i,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},h),e.type&&e.type.text!==""&&(h=r.boundaryFont(),h.fontColor=a,zi(r)(e.type.text,i,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},h)),e.descr&&e.descr.text!==""&&(h=r.boundaryFont(),h.fontSize=h.fontSize-2,h.fontColor=a,zi(r)(e.descr.text,i,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},h))},EM=function(t,e,r){var i;let n=e.bgColor?e.bgColor:r[e.typeC4Shape.text+"_bg_color"],s=e.borderColor?e.borderColor:r[e.typeC4Shape.text+"_border_color"],a=e.fontColor?e.fontColor:"#FFFFFF",o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}const l=t.append("g");l.attr("class","person-man");const h=Vy();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":h.x=e.x,h.y=e.y,h.fill=n,h.width=e.width,h.height=e.height,h.stroke=s,h.rx=2.5,h.ry=2.5,h.attrs={"stroke-width":.5},J1(l,h);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":l.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",s).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",s).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":l.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",s).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",s).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2));break}let u=NM(r,e.typeC4Shape.text);switch(l.append("text").attr("fill",a).attr("font-family",u.fontFamily).attr("font-size",u.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":Py(l,48,48,e.x+e.width/2-24,e.y+e.image.Y,o);break}let f=r[e.typeC4Shape.text+"Font"]();return f.fontWeight="bold",f.fontSize=f.fontSize+2,f.fontColor=a,zi(r)(e.label.text,l,e.x,e.y+e.label.Y,e.width,e.height,{fill:a},f),f=r[e.typeC4Shape.text+"Font"](),f.fontColor=a,e.techn&&((i=e.techn)==null?void 0:i.text)!==""?zi(r)(e.techn.text,l,e.x,e.y+e.techn.Y,e.width,e.height,{fill:a,"font-style":"italic"},f):e.type&&e.type.text!==""&&zi(r)(e.type.text,l,e.x,e.y+e.type.Y,e.width,e.height,{fill:a,"font-style":"italic"},f),e.descr&&e.descr.text!==""&&(f=r.personFont(),f.fontColor=a,zi(r)(e.descr.text,l,e.x,e.y+e.descr.Y,e.width,e.height,{fill:a},f)),e.height},CM=function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},SM=function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},AM=function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},LM=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},BM=function(t){t.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},DM=function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},IM=function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},MM=function(t){const r=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);r.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),r.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},Vy=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},NM=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),zi=function(){function t(n,s,a,o,l,h,u){const f=s.append("text").attr("x",a+l/2).attr("y",o+h/2+5).style("text-anchor","middle").text(n);i(f,u)}function e(n,s,a,o,l,h,u,f){const{fontSize:d,fontFamily:p,fontWeight:m}=f,b=n.split(Xt.lineBreakRegex);for(let x=0;x<b.length;x++){const k=x*d-d*(b.length-1)/2,v=s.append("text").attr("x",a+l/2).attr("y",o).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",d).style("font-weight",m).style("font-family",p);v.append("tspan").attr("dy",k).text(b[x]).attr("alignment-baseline","mathematical"),i(v,u)}}function r(n,s,a,o,l,h,u,f){const d=s.append("switch"),m=d.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",h).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");m.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,d,a,o,l,h,u,f),i(m,u)}function i(n,s){for(const a in s)s.hasOwnProperty(a)&&n.attr(a,s[a])}return function(n){return n.textPlacement==="fo"?r:n.textPlacement==="old"?t:e}}(),ci={drawRect:J1,drawBoundary:TM,drawC4Shape:EM,drawRels:wM,drawImage:Py,insertArrowHead:LM,insertArrowEnd:BM,insertArrowFilledHead:DM,insertDynamicNumber:IM,insertArrowCrossHead:MM,insertDatabaseIcon:CM,insertComputerIcon:SM,insertClockIcon:AM,getNoteRect:Vy,sanitizeUrl:Ki};let Gl=0,$l=0,Yy=4,Au=2;Wl.yy=Fy;let Ot={};class zy{constructor(e){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,Lu(e.db.getConfig())}setData(e,r,i,n){this.nextData.startx=this.data.startx=e,this.nextData.stopx=this.data.stopx=r,this.nextData.starty=this.data.starty=i,this.nextData.stopy=this.data.stopy=n}updateVal(e,r,i,n){e[r]===void 0?e[r]=i:e[r]=n(i,e[r])}insert(e){this.nextData.cnt=this.nextData.cnt+1;let r=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+e.margin:this.nextData.stopx+e.margin*2,i=r+e.width,n=this.nextData.starty+e.margin*2,s=n+e.height;(r>=this.data.widthLimit||i>=this.data.widthLimit||this.nextData.cnt>Yy)&&(r=this.nextData.startx+e.margin+Ot.nextLinePaddingX,n=this.nextData.stopy+e.margin*2,this.nextData.stopx=i=r+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=s=n+e.height,this.nextData.cnt=1),e.x=r,e.y=n,this.updateVal(this.data,"startx",r,Math.min),this.updateVal(this.data,"starty",n,Math.min),this.updateVal(this.data,"stopx",i,Math.max),this.updateVal(this.data,"stopy",s,Math.max),this.updateVal(this.nextData,"startx",r,Math.min),this.updateVal(this.nextData,"starty",n,Math.min),this.updateVal(this.nextData,"stopx",i,Math.max),this.updateVal(this.nextData,"stopy",s,Math.max)}init(e){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},Lu(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}}const Lu=function(t){Xe(Ot,t),t.fontFamily&&(Ot.personFontFamily=Ot.systemFontFamily=Ot.messageFontFamily=t.fontFamily),t.fontSize&&(Ot.personFontSize=Ot.systemFontSize=Ot.messageFontSize=t.fontSize),t.fontWeight&&(Ot.personFontWeight=Ot.systemFontWeight=Ot.messageFontWeight=t.fontWeight)},na=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),Jo=t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),RM=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight});function jr(t,e,r,i,n){if(!e[t].width)if(r)e[t].text=fy(e[t].text,n,i),e[t].textLines=e[t].text.split(Xt.lineBreakRegex).length,e[t].width=n,e[t].height=Tu(e[t].text,i);else{let s=e[t].text.split(Xt.lineBreakRegex);e[t].textLines=s.length;let a=0;e[t].height=0,e[t].width=0;for(const o of s)e[t].width=Math.max(yi(o,i),e[t].width),a=Tu(o,i),e[t].height=e[t].height+a}}const Uy=function(t,e,r){e.x=r.data.startx,e.y=r.data.starty,e.width=r.data.stopx-r.data.startx,e.height=r.data.stopy-r.data.starty,e.label.y=Ot.c4ShapeMargin-35;let i=e.wrap&&Ot.wrap,n=Jo(Ot);n.fontSize=n.fontSize+2,n.fontWeight="bold";let s=yi(e.label.text,n);jr("label",e,i,n,s),ci.drawBoundary(t,e,Ot)},Wy=function(t,e,r,i){let n=0;for(const s of i){n=0;const a=r[s];let o=na(Ot,a.typeC4Shape.text);switch(o.fontSize=o.fontSize-2,a.typeC4Shape.width=yi("<<"+a.typeC4Shape.text+">>",o),a.typeC4Shape.height=o.fontSize+2,a.typeC4Shape.Y=Ot.c4ShapePadding,n=a.typeC4Shape.Y+a.typeC4Shape.height-4,a.image={width:0,height:0,Y:0},a.typeC4Shape.text){case"person":case"external_person":a.image.width=48,a.image.height=48,a.image.Y=n,n=a.image.Y+a.image.height;break}a.sprite&&(a.image.width=48,a.image.height=48,a.image.Y=n,n=a.image.Y+a.image.height);let l=a.wrap&&Ot.wrap,h=Ot.width-Ot.c4ShapePadding*2,u=na(Ot,a.typeC4Shape.text);if(u.fontSize=u.fontSize+2,u.fontWeight="bold",jr("label",a,l,u,h),a.label.Y=n+8,n=a.label.Y+a.label.height,a.type&&a.type.text!==""){a.type.text="["+a.type.text+"]";let p=na(Ot,a.typeC4Shape.text);jr("type",a,l,p,h),a.type.Y=n+5,n=a.type.Y+a.type.height}else if(a.techn&&a.techn.text!==""){a.techn.text="["+a.techn.text+"]";let p=na(Ot,a.techn.text);jr("techn",a,l,p,h),a.techn.Y=n+5,n=a.techn.Y+a.techn.height}let f=n,d=a.label.width;if(a.descr&&a.descr.text!==""){let p=na(Ot,a.typeC4Shape.text);jr("descr",a,l,p,h),a.descr.Y=n+20,n=a.descr.Y+a.descr.height,d=Math.max(a.label.width,a.descr.width),f=n-a.descr.textLines*5}d=d+Ot.c4ShapePadding,a.width=Math.max(a.width||Ot.width,d,Ot.width),a.height=Math.max(a.height||Ot.height,f,Ot.height),a.margin=a.margin||Ot.c4ShapeMargin,t.insert(a),ci.drawC4Shape(e,a,Ot)}t.bumpLastMargin(Ot.c4ShapeMargin)};class Or{constructor(e,r){this.x=e,this.y=r}}let Md=function(t,e){let r=t.x,i=t.y,n=e.x,s=e.y,a=r+t.width/2,o=i+t.height/2,l=Math.abs(r-n),h=Math.abs(i-s),u=h/l,f=t.height/t.width,d=null;return i==s&&r<n?d=new Or(r+t.width,o):i==s&&r>n?d=new Or(r,o):r==n&&i<s?d=new Or(a,i+t.height):r==n&&i>s&&(d=new Or(a,i)),r>n&&i<s?f>=u?d=new Or(r,o+u*t.width/2):d=new Or(a-l/h*t.height/2,i+t.height):r<n&&i<s?f>=u?d=new Or(r+t.width,o+u*t.width/2):d=new Or(a+l/h*t.height/2,i+t.height):r<n&&i>s?f>=u?d=new Or(r+t.width,o-u*t.width/2):d=new Or(a+t.height/2*l/h,i):r>n&&i>s&&(f>=u?d=new Or(r,o-t.width/2*u):d=new Or(a-t.height/2*l/h,i)),d},OM=function(t,e){let r={x:0,y:0};r.x=e.x+e.width/2,r.y=e.y+e.height/2;let i=Md(t,r);r.x=t.x+t.width/2,r.y=t.y+t.height/2;let n=Md(e,r);return{startPoint:i,endPoint:n}};const FM=function(t,e,r,i){let n=0;for(let s of e){n=n+1;let a=s.wrap&&Ot.wrap,o=RM(Ot);i.db.getC4Type()==="C4Dynamic"&&(s.label.text=n+": "+s.label.text);let h=yi(s.label.text,o);jr("label",s,a,o,h),s.techn&&s.techn.text!==""&&(h=yi(s.techn.text,o),jr("techn",s,a,o,h)),s.descr&&s.descr.text!==""&&(h=yi(s.descr.text,o),jr("descr",s,a,o,h));let u=r(s.from),f=r(s.to),d=OM(u,f);s.startPoint=d.startPoint,s.endPoint=d.endPoint}ci.drawRels(t,e,Ot)};function Hy(t,e,r,i,n){let s=new zy(n);s.data.widthLimit=r.data.widthLimit/Math.min(Au,i.length);for(let[a,o]of i.entries()){let l=0;o.image={width:0,height:0,Y:0},o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=l,l=o.image.Y+o.image.height);let h=o.wrap&&Ot.wrap,u=Jo(Ot);if(u.fontSize=u.fontSize+2,u.fontWeight="bold",jr("label",o,h,u,s.data.widthLimit),o.label.Y=l+8,l=o.label.Y+o.label.height,o.type&&o.type.text!==""){o.type.text="["+o.type.text+"]";let m=Jo(Ot);jr("type",o,h,m,s.data.widthLimit),o.type.Y=l+5,l=o.type.Y+o.type.height}if(o.descr&&o.descr.text!==""){let m=Jo(Ot);m.fontSize=m.fontSize-2,jr("descr",o,h,m,s.data.widthLimit),o.descr.Y=l+20,l=o.descr.Y+o.descr.height}if(a==0||a%Au===0){let m=r.data.startx+Ot.diagramMarginX,b=r.data.stopy+Ot.diagramMarginY+l;s.setData(m,m,b,b)}else{let m=s.data.stopx!==s.data.startx?s.data.stopx+Ot.diagramMarginX:s.data.startx,b=s.data.starty;s.setData(m,m,b,b)}s.name=o.alias;let f=n.db.getC4ShapeArray(o.alias),d=n.db.getC4ShapeKeys(o.alias);d.length>0&&Wy(s,t,f,d),e=o.alias;let p=n.db.getBoundarys(e);p.length>0&&Hy(t,e,s,p,n),o.alias!=="global"&&Uy(t,o,s),r.data.stopy=Math.max(s.data.stopy+Ot.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(s.data.stopx+Ot.c4ShapeMargin,r.data.stopx),Gl=Math.max(Gl,r.data.stopx),$l=Math.max($l,r.data.stopy)}}const PM=function(t,e,r,i){Ot=G().c4;const n=G().securityLevel;let s;n==="sandbox"&&(s=_t("#i"+e));const a=_t(n==="sandbox"?s.nodes()[0].contentDocument.body:"body");let o=i.db;i.db.setWrap(Ot.wrap),Yy=o.getC4ShapeInRow(),Au=o.getC4BoundaryInRow(),I.debug(`C:${JSON.stringify(Ot,null,2)}`);const l=n==="sandbox"?a.select(`[id="${e}"]`):_t(`[id="${e}"]`);ci.insertComputerIcon(l),ci.insertDatabaseIcon(l),ci.insertClockIcon(l);let h=new zy(i);h.setData(Ot.diagramMarginX,Ot.diagramMarginX,Ot.diagramMarginY,Ot.diagramMarginY),h.data.widthLimit=screen.availWidth,Gl=Ot.diagramMarginX,$l=Ot.diagramMarginY;const u=i.db.getTitle();let f=i.db.getBoundarys("");Hy(l,"",h,f,i),ci.insertArrowHead(l),ci.insertArrowEnd(l),ci.insertArrowCrossHead(l),ci.insertArrowFilledHead(l),FM(l,i.db.getRels(),i.db.getC4Shape,i),h.data.stopx=Gl,h.data.stopy=$l;const d=h.data;let m=d.stopy-d.starty+2*Ot.diagramMarginY;const x=d.stopx-d.startx+2*Ot.diagramMarginX;u&&l.append("text").text(u).attr("x",(d.stopx-d.startx)/2-4*Ot.diagramMarginX).attr("y",d.starty+Ot.diagramMarginY),ni(l,m,x,Ot.useMaxWidth);const k=u?60:0;l.attr("viewBox",d.startx-Ot.diagramMarginX+" -"+(Ot.diagramMarginY+k)+" "+x+" "+(m+k)),I.debug("models:",d)},Nd={drawPersonOrSystemArray:Wy,drawBoundary:Uy,setConf:Lu,draw:PM};var Bu=function(){var t=function(z,A,M,q){for(M=M||{},q=z.length;q--;M[z[q]]=A);return M},e=[1,3],r=[1,7],i=[1,8],n=[1,9],s=[1,10],a=[1,13],o=[1,12],l=[1,16,25],h=[1,20],u=[1,32],f=[1,33],d=[1,34],p=[1,36],m=[1,39],b=[1,37],x=[1,38],k=[1,44],v=[1,45],B=[1,40],R=[1,41],P=[1,42],V=[1,43],O=[1,48],F=[1,49],C=[1,50],S=[1,51],E=[16,25],_=[1,65],w=[1,66],g=[1,67],D=[1,68],y=[1,69],N=[1,70],nt=[1,71],Y=[1,80],Z=[16,25,32,45,46,54,60,61,62,63,64,65,66,71,73],J=[16,25,30,32,45,46,50,54,60,61,62,63,64,65,66,71,73,88,89,90,91],X=[5,8,9,10,11,16,19,23,25],tt=[54,88,89,90,91],ot=[54,65,66,88,89,90,91],at=[54,60,61,62,63,64,88,89,90,91],U=[16,25,32],Tt=[1,107],$={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statments:5,direction:6,directive:7,direction_tb:8,direction_bt:9,direction_rl:10,direction_lr:11,graphConfig:12,openDirective:13,typeDirective:14,closeDirective:15,NEWLINE:16,":":17,argDirective:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,CLASS_DIAGRAM:23,statements:24,EOF:25,statement:26,className:27,alphaNumToken:28,classLiteralName:29,GENERICTYPE:30,relationStatement:31,LABEL:32,classStatement:33,methodStatement:34,annotationStatement:35,clickStatement:36,cssClassStatement:37,noteStatement:38,acc_title:39,acc_title_value:40,acc_descr:41,acc_descr_value:42,acc_descr_multiline_value:43,CLASS:44,STYLE_SEPARATOR:45,STRUCT_START:46,members:47,STRUCT_STOP:48,ANNOTATION_START:49,ANNOTATION_END:50,MEMBER:51,SEPARATOR:52,relation:53,STR:54,NOTE_FOR:55,noteText:56,NOTE:57,relationType:58,lineType:59,AGGREGATION:60,EXTENSION:61,COMPOSITION:62,DEPENDENCY:63,LOLLIPOP:64,LINE:65,DOTTED_LINE:66,CALLBACK:67,LINK:68,LINK_TARGET:69,CLICK:70,CALLBACK_NAME:71,CALLBACK_ARGS:72,HREF:73,CSSCLASS:74,commentToken:75,textToken:76,graphCodeTokens:77,textNoTagsToken:78,TAGSTART:79,TAGEND:80,"==":81,"--":82,PCT:83,DEFAULT:84,SPACE:85,MINUS:86,keywords:87,UNICODE_TEXT:88,NUM:89,ALPHA:90,BQUOTE_STR:91,$accept:0,$end:1},terminals_:{2:"error",5:"statments",8:"direction_tb",9:"direction_bt",10:"direction_rl",11:"direction_lr",16:"NEWLINE",17:":",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",23:"CLASS_DIAGRAM",25:"EOF",30:"GENERICTYPE",32:"LABEL",39:"acc_title",40:"acc_title_value",41:"acc_descr",42:"acc_descr_value",43:"acc_descr_multiline_value",44:"CLASS",45:"STYLE_SEPARATOR",46:"STRUCT_START",48:"STRUCT_STOP",49:"ANNOTATION_START",50:"ANNOTATION_END",51:"MEMBER",52:"SEPARATOR",54:"STR",55:"NOTE_FOR",57:"NOTE",60:"AGGREGATION",61:"EXTENSION",62:"COMPOSITION",63:"DEPENDENCY",64:"LOLLIPOP",65:"LINE",66:"DOTTED_LINE",67:"CALLBACK",68:"LINK",69:"LINK_TARGET",70:"CLICK",71:"CALLBACK_NAME",72:"CALLBACK_ARGS",73:"HREF",74:"CSSCLASS",77:"graphCodeTokens",79:"TAGSTART",80:"TAGEND",81:"==",82:"--",83:"PCT",84:"DEFAULT",85:"SPACE",86:"MINUS",87:"keywords",88:"UNICODE_TEXT",89:"NUM",90:"ALPHA",91:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[3,1],[3,2],[6,1],[6,1],[6,1],[6,1],[4,1],[7,4],[7,6],[13,1],[14,1],[18,1],[15,1],[12,4],[24,1],[24,2],[24,3],[27,1],[27,1],[27,2],[27,2],[27,2],[26,1],[26,2],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,2],[26,2],[26,1],[33,2],[33,4],[33,5],[33,7],[35,4],[47,1],[47,2],[34,1],[34,2],[34,1],[34,1],[31,3],[31,4],[31,4],[31,5],[38,3],[38,2],[53,3],[53,2],[53,2],[53,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[36,3],[36,4],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[37,3],[75,1],[75,1],[76,1],[76,1],[76,1],[76,1],[76,1],[76,1],[76,1],[78,1],[78,1],[78,1],[78,1],[28,1],[28,1],[28,1],[29,1],[56,1]],performAction:function(A,M,q,L,st,T,Dt){var et=T.length-1;switch(st){case 5:L.setDirection("TB");break;case 6:L.setDirection("BT");break;case 7:L.setDirection("RL");break;case 8:L.setDirection("LR");break;case 12:L.parseDirective("%%{","open_directive");break;case 13:L.parseDirective(T[et],"type_directive");break;case 14:T[et]=T[et].trim().replace(/'/g,'"'),L.parseDirective(T[et],"arg_directive");break;case 15:L.parseDirective("}%%","close_directive","class");break;case 20:case 21:this.$=T[et];break;case 22:this.$=T[et-1]+T[et];break;case 23:case 24:this.$=T[et-1]+"~"+T[et];break;case 25:L.addRelation(T[et]);break;case 26:T[et-1].title=L.cleanupLabel(T[et]),L.addRelation(T[et-1]);break;case 35:this.$=T[et].trim(),L.setAccTitle(this.$);break;case 36:case 37:this.$=T[et].trim(),L.setAccDescription(this.$);break;case 38:L.addClass(T[et]);break;case 39:L.addClass(T[et-2]),L.setCssClass(T[et-2],T[et]);break;case 40:L.addClass(T[et-3]),L.addMembers(T[et-3],T[et-1]);break;case 41:L.addClass(T[et-5]),L.setCssClass(T[et-5],T[et-3]),L.addMembers(T[et-5],T[et-1]);break;case 42:L.addAnnotation(T[et],T[et-2]);break;case 43:this.$=[T[et]];break;case 44:T[et].push(T[et-1]),this.$=T[et];break;case 45:break;case 46:L.addMember(T[et-1],L.cleanupLabel(T[et]));break;case 47:break;case 48:break;case 49:this.$={id1:T[et-2],id2:T[et],relation:T[et-1],relationTitle1:"none",relationTitle2:"none"};break;case 50:this.$={id1:T[et-3],id2:T[et],relation:T[et-1],relationTitle1:T[et-2],relationTitle2:"none"};break;case 51:this.$={id1:T[et-3],id2:T[et],relation:T[et-2],relationTitle1:"none",relationTitle2:T[et-1]};break;case 52:this.$={id1:T[et-4],id2:T[et],relation:T[et-2],relationTitle1:T[et-3],relationTitle2:T[et-1]};break;case 53:L.addNote(T[et],T[et-1]);break;case 54:L.addNote(T[et]);break;case 55:this.$={type1:T[et-2],type2:T[et],lineType:T[et-1]};break;case 56:this.$={type1:"none",type2:T[et],lineType:T[et-1]};break;case 57:this.$={type1:T[et-1],type2:"none",lineType:T[et]};break;case 58:this.$={type1:"none",type2:"none",lineType:T[et]};break;case 59:this.$=L.relationType.AGGREGATION;break;case 60:this.$=L.relationType.EXTENSION;break;case 61:this.$=L.relationType.COMPOSITION;break;case 62:this.$=L.relationType.DEPENDENCY;break;case 63:this.$=L.relationType.LOLLIPOP;break;case 64:this.$=L.lineType.LINE;break;case 65:this.$=L.lineType.DOTTED_LINE;break;case 66:case 72:this.$=T[et-2],L.setClickEvent(T[et-1],T[et]);break;case 67:case 73:this.$=T[et-3],L.setClickEvent(T[et-2],T[et-1]),L.setTooltip(T[et-2],T[et]);break;case 68:case 76:this.$=T[et-2],L.setLink(T[et-1],T[et]);break;case 69:this.$=T[et-3],L.setLink(T[et-2],T[et-1],T[et]);break;case 70:case 78:this.$=T[et-3],L.setLink(T[et-2],T[et-1]),L.setTooltip(T[et-2],T[et]);break;case 71:case 79:this.$=T[et-4],L.setLink(T[et-3],T[et-2],T[et]),L.setTooltip(T[et-3],T[et-1]);break;case 74:this.$=T[et-3],L.setClickEvent(T[et-2],T[et-1],T[et]);break;case 75:this.$=T[et-4],L.setClickEvent(T[et-3],T[et-2],T[et-1]),L.setTooltip(T[et-3],T[et]);break;case 77:this.$=T[et-3],L.setLink(T[et-2],T[et-1],T[et]);break;case 80:L.setCssClass(T[et-1],T[et]);break}},table:[{3:1,4:2,5:e,6:4,7:5,8:r,9:i,10:n,11:s,12:6,13:11,19:a,23:o},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{3:14,4:2,5:e,6:4,7:5,8:r,9:i,10:n,11:s,12:6,13:11,19:a,23:o},{1:[2,9]},t(l,[2,5]),t(l,[2,6]),t(l,[2,7]),t(l,[2,8]),{14:15,20:[1,16]},{16:[1,17]},{20:[2,12]},{1:[2,4]},{15:18,17:[1,19],22:h},t([17,22],[2,13]),{6:31,7:30,8:r,9:i,10:n,11:s,13:11,19:a,24:21,26:22,27:35,28:46,29:47,31:23,33:24,34:25,35:26,36:27,37:28,38:29,39:u,41:f,43:d,44:p,49:m,51:b,52:x,55:k,57:v,67:B,68:R,70:P,74:V,88:O,89:F,90:C,91:S},{16:[1,52]},{18:53,21:[1,54]},{16:[2,15]},{25:[1,55]},{16:[1,56],25:[2,17]},t(E,[2,25],{32:[1,57]}),t(E,[2,27]),t(E,[2,28]),t(E,[2,29]),t(E,[2,30]),t(E,[2,31]),t(E,[2,32]),t(E,[2,33]),t(E,[2,34]),{40:[1,58]},{42:[1,59]},t(E,[2,37]),t(E,[2,45],{53:60,58:63,59:64,32:[1,62],54:[1,61],60:_,61:w,62:g,63:D,64:y,65:N,66:nt}),{27:72,28:46,29:47,88:O,89:F,90:C,91:S},t(E,[2,47]),t(E,[2,48]),{28:73,88:O,89:F,90:C},{27:74,28:46,29:47,88:O,89:F,90:C,91:S},{27:75,28:46,29:47,88:O,89:F,90:C,91:S},{27:76,28:46,29:47,88:O,89:F,90:C,91:S},{54:[1,77]},{27:78,28:46,29:47,88:O,89:F,90:C,91:S},{54:Y,56:79},t(Z,[2,20],{28:46,29:47,27:81,30:[1,82],88:O,89:F,90:C,91:S}),t(Z,[2,21],{30:[1,83]}),t(J,[2,94]),t(J,[2,95]),t(J,[2,96]),t([16,25,30,32,45,46,54,60,61,62,63,64,65,66,71,73],[2,97]),t(X,[2,10]),{15:84,22:h},{22:[2,14]},{1:[2,16]},{6:31,7:30,8:r,9:i,10:n,11:s,13:11,19:a,24:85,25:[2,18],26:22,27:35,28:46,29:47,31:23,33:24,34:25,35:26,36:27,37:28,38:29,39:u,41:f,43:d,44:p,49:m,51:b,52:x,55:k,57:v,67:B,68:R,70:P,74:V,88:O,89:F,90:C,91:S},t(E,[2,26]),t(E,[2,35]),t(E,[2,36]),{27:86,28:46,29:47,54:[1,87],88:O,89:F,90:C,91:S},{53:88,58:63,59:64,60:_,61:w,62:g,63:D,64:y,65:N,66:nt},t(E,[2,46]),{59:89,65:N,66:nt},t(tt,[2,58],{58:90,60:_,61:w,62:g,63:D,64:y}),t(ot,[2,59]),t(ot,[2,60]),t(ot,[2,61]),t(ot,[2,62]),t(ot,[2,63]),t(at,[2,64]),t(at,[2,65]),t(E,[2,38],{45:[1,91],46:[1,92]}),{50:[1,93]},{54:[1,94]},{54:[1,95]},{71:[1,96],73:[1,97]},{28:98,88:O,89:F,90:C},{54:Y,56:99},t(E,[2,54]),t(E,[2,98]),t(Z,[2,22]),t(Z,[2,23]),t(Z,[2,24]),{16:[1,100]},{25:[2,19]},t(U,[2,49]),{27:101,28:46,29:47,88:O,89:F,90:C,91:S},{27:102,28:46,29:47,54:[1,103],88:O,89:F,90:C,91:S},t(tt,[2,57],{58:104,60:_,61:w,62:g,63:D,64:y}),t(tt,[2,56]),{28:105,88:O,89:F,90:C},{47:106,51:Tt},{27:108,28:46,29:47,88:O,89:F,90:C,91:S},t(E,[2,66],{54:[1,109]}),t(E,[2,68],{54:[1,111],69:[1,110]}),t(E,[2,72],{54:[1,112],72:[1,113]}),t(E,[2,76],{54:[1,115],69:[1,114]}),t(E,[2,80]),t(E,[2,53]),t(X,[2,11]),t(U,[2,51]),t(U,[2,50]),{27:116,28:46,29:47,88:O,89:F,90:C,91:S},t(tt,[2,55]),t(E,[2,39],{46:[1,117]}),{48:[1,118]},{47:119,48:[2,43],51:Tt},t(E,[2,42]),t(E,[2,67]),t(E,[2,69]),t(E,[2,70],{69:[1,120]}),t(E,[2,73]),t(E,[2,74],{54:[1,121]}),t(E,[2,77]),t(E,[2,78],{69:[1,122]}),t(U,[2,52]),{47:123,51:Tt},t(E,[2,40]),{48:[2,44]},t(E,[2,71]),t(E,[2,75]),t(E,[2,79]),{48:[1,124]},t(E,[2,41])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],6:[2,9],13:[2,12],14:[2,4],20:[2,15],54:[2,14],55:[2,16],85:[2,19],119:[2,44]},parseError:function(A,M){if(M.recoverable)this.trace(A);else{var q=new Error(A);throw q.hash=M,q}},parse:function(A){var M=this,q=[0],L=[],st=[null],T=[],Dt=this.table,et="",Et=0,vt=0,pt=2,ut=1,gt=T.slice.call(arguments,1),ht=Object.create(this.lexer),yt={yy:{}};for(var he in this.yy)Object.prototype.hasOwnProperty.call(this.yy,he)&&(yt.yy[he]=this.yy[he]);ht.setInput(A,yt.yy),yt.yy.lexer=ht,yt.yy.parser=this,typeof ht.yylloc>"u"&&(ht.yylloc={});var re=ht.yylloc;T.push(re);var Mt=ht.options&&ht.options.ranges;typeof yt.yy.parseError=="function"?this.parseError=yt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Nt(){var it;return it=L.pop()||ht.lex()||ut,typeof it!="number"&&(it instanceof Array&&(L=it,it=L.pop()),it=M.symbols_[it]||it),it}for(var Kt,fe,qt,Ft,Bt={},bt,mt,wt,ft;;){if(fe=q[q.length-1],this.defaultActions[fe]?qt=this.defaultActions[fe]:((Kt===null||typeof Kt>"u")&&(Kt=Nt()),qt=Dt[fe]&&Dt[fe][Kt]),typeof qt>"u"||!qt.length||!qt[0]){var It="";ft=[];for(bt in Dt[fe])this.terminals_[bt]&&bt>pt&&ft.push("'"+this.terminals_[bt]+"'");ht.showPosition?It="Parse error on line "+(Et+1)+`:
1209
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var mt=this.next();return mt||this.lex()},begin:function(mt){this.conditionStack.push(mt)},popState:function(){var mt=this.conditionStack.length-1;return mt>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(mt){return mt=this.conditionStack.length-1-Math.abs(mt||0),mt>=0?this.conditionStack[mt]:"INITIAL"},pushState:function(mt){this.begin(mt)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(mt,wt,ft,It){switch(ft){case 0:return this.begin("open_directive"),18;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 10;case 5:return this.begin("type_directive"),19;case 6:return this.popState(),this.begin("arg_directive"),16;case 7:return this.popState(),this.popState(),21;case 8:return 20;case 9:return 32;case 10:return 33;case 11:return this.begin("acc_title"),34;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),36;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:break;case 19:c;break;case 20:return 15;case 21:break;case 22:return 22;case 23:return 25;case 24:return 26;case 25:return 27;case 26:return 28;case 27:return this.begin("person_ext"),55;case 28:return this.begin("person"),54;case 29:return this.begin("system_ext_queue"),61;case 30:return this.begin("system_ext_db"),60;case 31:return this.begin("system_ext"),59;case 32:return this.begin("system_queue"),58;case 33:return this.begin("system_db"),57;case 34:return this.begin("system"),56;case 35:return this.begin("boundary"),47;case 36:return this.begin("enterprise_boundary"),44;case 37:return this.begin("system_boundary"),46;case 38:return this.begin("container_ext_queue"),67;case 39:return this.begin("container_ext_db"),66;case 40:return this.begin("container_ext"),65;case 41:return this.begin("container_queue"),64;case 42:return this.begin("container_db"),63;case 43:return this.begin("container"),62;case 44:return this.begin("container_boundary"),48;case 45:return this.begin("component_ext_queue"),73;case 46:return this.begin("component_ext_db"),72;case 47:return this.begin("component_ext"),71;case 48:return this.begin("component_queue"),70;case 49:return this.begin("component_db"),69;case 50:return this.begin("component"),68;case 51:return this.begin("node"),49;case 52:return this.begin("node"),49;case 53:return this.begin("node_l"),50;case 54:return this.begin("node_r"),51;case 55:return this.begin("rel"),74;case 56:return this.begin("birel"),75;case 57:return this.begin("rel_u"),76;case 58:return this.begin("rel_u"),76;case 59:return this.begin("rel_d"),77;case 60:return this.begin("rel_d"),77;case 61:return this.begin("rel_l"),78;case 62:return this.begin("rel_l"),78;case 63:return this.begin("rel_r"),79;case 64:return this.begin("rel_r"),79;case 65:return this.begin("rel_b"),80;case 66:return this.begin("rel_index"),81;case 67:return this.begin("update_el_style"),82;case 68:return this.begin("update_rel_style"),83;case 69:return this.begin("update_layout_config"),84;case 70:return"EOF_IN_STRUCT";case 71:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 72:this.begin("attribute");break;case 73:this.popState(),this.popState();break;case 74:return 90;case 75:break;case 76:return 90;case 77:this.begin("string");break;case 78:this.popState();break;case 79:return"STR";case 80:this.begin("string_kv");break;case 81:return this.begin("string_kv_key"),"STR_KEY";case 82:this.popState(),this.begin("string_kv_value");break;case 83:return"STR_VALUE";case 84:this.popState(),this.popState();break;case 85:return"STR";case 86:return"LBRACE";case 87:return"RBRACE";case 88:return"SPACE";case 89:return"EOL";case 90:return 24}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},string_kv_value:{rules:[83,84],inclusive:!1},string_kv_key:{rules:[82],inclusive:!1},string_kv:{rules:[81],inclusive:!1},string:{rules:[78,79],inclusive:!1},attribute:{rules:[73,74,75,76,77,80,85],inclusive:!1},update_layout_config:{rules:[70,71,72,73],inclusive:!1},update_rel_style:{rules:[70,71,72,73],inclusive:!1},update_el_style:{rules:[70,71,72,73],inclusive:!1},rel_b:{rules:[70,71,72,73],inclusive:!1},rel_r:{rules:[70,71,72,73],inclusive:!1},rel_l:{rules:[70,71,72,73],inclusive:!1},rel_d:{rules:[70,71,72,73],inclusive:!1},rel_u:{rules:[70,71,72,73],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[70,71,72,73],inclusive:!1},node_r:{rules:[70,71,72,73],inclusive:!1},node_l:{rules:[70,71,72,73],inclusive:!1},node:{rules:[70,71,72,73],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[70,71,72,73],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[70,71,72,73],inclusive:!1},component_ext:{rules:[70,71,72,73],inclusive:!1},component_queue:{rules:[70,71,72,73],inclusive:!1},component_db:{rules:[70,71,72,73],inclusive:!1},component:{rules:[70,71,72,73],inclusive:!1},container_boundary:{rules:[70,71,72,73],inclusive:!1},container_ext_queue:{rules:[],inclusive:!1},container_ext_db:{rules:[70,71,72,73],inclusive:!1},container_ext:{rules:[70,71,72,73],inclusive:!1},container_queue:{rules:[70,71,72,73],inclusive:!1},container_db:{rules:[70,71,72,73],inclusive:!1},container:{rules:[70,71,72,73],inclusive:!1},birel:{rules:[70,71,72,73],inclusive:!1},system_boundary:{rules:[70,71,72,73],inclusive:!1},enterprise_boundary:{rules:[70,71,72,73],inclusive:!1},boundary:{rules:[70,71,72,73],inclusive:!1},system_ext_queue:{rules:[70,71,72,73],inclusive:!1},system_ext_db:{rules:[70,71,72,73],inclusive:!1},system_ext:{rules:[70,71,72,73],inclusive:!1},system_queue:{rules:[70,71,72,73],inclusive:!1},system_db:{rules:[70,71,72,73],inclusive:!1},system:{rules:[70,71,72,73],inclusive:!1},person_ext:{rules:[70,71,72,73],inclusive:!1},person:{rules:[70,71,72,73],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,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,86,87,88,89,90],inclusive:!0}}};return Bt}();fe.lexer=qt;function Ft(){this.yy={}}return Ft.prototype=fe,fe.Parser=Ft,new Ft}();Wl.parser=Wl;const $I=Wl,jI=t=>t.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/)!==null;let ei=[],cn=[""],fr="global",Qr="",bi=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Ga=[],Q1="",J1=!1,Hl=4,ql=2;var Oy;const XI=function(){return Oy},KI=function(t){Oy=Ur(t,G())},ZI=function(t,e,r){xe.parseDirective(this,t,e,r)},QI=function(t,e,r,i,n,s,a,o,l){if(t==null||e===void 0||e===null||r===void 0||r===null||i===void 0||i===null)return;let h={};const u=Ga.find(f=>f.from===e&&f.to===r);if(u?h=u:Ga.push(h),h.type=t,h.from=e,h.to=r,h.label={text:i},n==null)h.techn={text:""};else if(typeof n=="object"){let[f,d]=Object.entries(n)[0];h[f]={text:d}}else h.techn={text:n};if(s==null)h.descr={text:""};else if(typeof s=="object"){let[f,d]=Object.entries(s)[0];h[f]={text:d}}else h.descr={text:s};if(typeof a=="object"){let[f,d]=Object.entries(a)[0];h[f]=d}else h.sprite=a;if(typeof o=="object"){let[f,d]=Object.entries(o)[0];h[f]=d}else h.tags=o;if(typeof l=="object"){let[f,d]=Object.entries(l)[0];h[f]=d}else h.link=l;h.wrap=yn()},JI=function(t,e,r,i,n,s,a){if(e===null||r===null)return;let o={};const l=ei.find(h=>h.alias===e);if(l&&e===l.alias?o=l:(o.alias=e,ei.push(o)),r==null?o.label={text:""}:o.label={text:r},i==null)o.descr={text:""};else if(typeof i=="object"){let[h,u]=Object.entries(i)[0];o[h]={text:u}}else o.descr={text:i};if(typeof n=="object"){let[h,u]=Object.entries(n)[0];o[h]=u}else o.sprite=n;if(typeof s=="object"){let[h,u]=Object.entries(s)[0];o[h]=u}else o.tags=s;if(typeof a=="object"){let[h,u]=Object.entries(a)[0];o[h]=u}else o.link=a;o.typeC4Shape={text:t},o.parentBoundary=fr,o.wrap=yn()},tM=function(t,e,r,i,n,s,a,o){if(e===null||r===null)return;let l={};const h=ei.find(u=>u.alias===e);if(h&&e===h.alias?l=h:(l.alias=e,ei.push(l)),r==null?l.label={text:""}:l.label={text:r},i==null)l.techn={text:""};else if(typeof i=="object"){let[u,f]=Object.entries(i)[0];l[u]={text:f}}else l.techn={text:i};if(n==null)l.descr={text:""};else if(typeof n=="object"){let[u,f]=Object.entries(n)[0];l[u]={text:f}}else l.descr={text:n};if(typeof s=="object"){let[u,f]=Object.entries(s)[0];l[u]=f}else l.sprite=s;if(typeof a=="object"){let[u,f]=Object.entries(a)[0];l[u]=f}else l.tags=a;if(typeof o=="object"){let[u,f]=Object.entries(o)[0];l[u]=f}else l.link=o;l.wrap=yn(),l.typeC4Shape={text:t},l.parentBoundary=fr},eM=function(t,e,r,i,n,s,a,o){if(e===null||r===null)return;let l={};const h=ei.find(u=>u.alias===e);if(h&&e===h.alias?l=h:(l.alias=e,ei.push(l)),r==null?l.label={text:""}:l.label={text:r},i==null)l.techn={text:""};else if(typeof i=="object"){let[u,f]=Object.entries(i)[0];l[u]={text:f}}else l.techn={text:i};if(n==null)l.descr={text:""};else if(typeof n=="object"){let[u,f]=Object.entries(n)[0];l[u]={text:f}}else l.descr={text:n};if(typeof s=="object"){let[u,f]=Object.entries(s)[0];l[u]=f}else l.sprite=s;if(typeof a=="object"){let[u,f]=Object.entries(a)[0];l[u]=f}else l.tags=a;if(typeof o=="object"){let[u,f]=Object.entries(o)[0];l[u]=f}else l.link=o;l.wrap=yn(),l.typeC4Shape={text:t},l.parentBoundary=fr},rM=function(t,e,r,i,n){if(t===null||e===null)return;let s={};const a=bi.find(o=>o.alias===t);if(a&&t===a.alias?s=a:(s.alias=t,bi.push(s)),e==null?s.label={text:""}:s.label={text:e},r==null)s.type={text:"system"};else if(typeof r=="object"){let[o,l]=Object.entries(r)[0];s[o]={text:l}}else s.type={text:r};if(typeof i=="object"){let[o,l]=Object.entries(i)[0];s[o]=l}else s.tags=i;if(typeof n=="object"){let[o,l]=Object.entries(n)[0];s[o]=l}else s.link=n;s.parentBoundary=fr,s.wrap=yn(),Qr=fr,fr=t,cn.push(Qr)},iM=function(t,e,r,i,n){if(t===null||e===null)return;let s={};const a=bi.find(o=>o.alias===t);if(a&&t===a.alias?s=a:(s.alias=t,bi.push(s)),e==null?s.label={text:""}:s.label={text:e},r==null)s.type={text:"container"};else if(typeof r=="object"){let[o,l]=Object.entries(r)[0];s[o]={text:l}}else s.type={text:r};if(typeof i=="object"){let[o,l]=Object.entries(i)[0];s[o]=l}else s.tags=i;if(typeof n=="object"){let[o,l]=Object.entries(n)[0];s[o]=l}else s.link=n;s.parentBoundary=fr,s.wrap=yn(),Qr=fr,fr=t,cn.push(Qr)},nM=function(t,e,r,i,n,s,a,o){if(e===null||r===null)return;let l={};const h=bi.find(u=>u.alias===e);if(h&&e===h.alias?l=h:(l.alias=e,bi.push(l)),r==null?l.label={text:""}:l.label={text:r},i==null)l.type={text:"node"};else if(typeof i=="object"){let[u,f]=Object.entries(i)[0];l[u]={text:f}}else l.type={text:i};if(n==null)l.descr={text:""};else if(typeof n=="object"){let[u,f]=Object.entries(n)[0];l[u]={text:f}}else l.descr={text:n};if(typeof a=="object"){let[u,f]=Object.entries(a)[0];l[u]=f}else l.tags=a;if(typeof o=="object"){let[u,f]=Object.entries(o)[0];l[u]=f}else l.link=o;l.nodeType=t,l.parentBoundary=fr,l.wrap=yn(),Qr=fr,fr=e,cn.push(Qr)},sM=function(){fr=Qr,cn.pop(),Qr=cn.pop(),cn.push(Qr)},aM=function(t,e,r,i,n,s,a,o,l,h,u){let f=ei.find(d=>d.alias===e);if(!(f===void 0&&(f=bi.find(d=>d.alias===e),f===void 0))){if(r!=null)if(typeof r=="object"){let[d,p]=Object.entries(r)[0];f[d]=p}else f.bgColor=r;if(i!=null)if(typeof i=="object"){let[d,p]=Object.entries(i)[0];f[d]=p}else f.fontColor=i;if(n!=null)if(typeof n=="object"){let[d,p]=Object.entries(n)[0];f[d]=p}else f.borderColor=n;if(s!=null)if(typeof s=="object"){let[d,p]=Object.entries(s)[0];f[d]=p}else f.shadowing=s;if(a!=null)if(typeof a=="object"){let[d,p]=Object.entries(a)[0];f[d]=p}else f.shape=a;if(o!=null)if(typeof o=="object"){let[d,p]=Object.entries(o)[0];f[d]=p}else f.sprite=o;if(l!=null)if(typeof l=="object"){let[d,p]=Object.entries(l)[0];f[d]=p}else f.techn=l;if(h!=null)if(typeof h=="object"){let[d,p]=Object.entries(h)[0];f[d]=p}else f.legendText=h;if(u!=null)if(typeof u=="object"){let[d,p]=Object.entries(u)[0];f[d]=p}else f.legendSprite=u}},oM=function(t,e,r,i,n,s,a){const o=Ga.find(l=>l.from===e&&l.to===r);if(o!==void 0){if(i!=null)if(typeof i=="object"){let[l,h]=Object.entries(i)[0];o[l]=h}else o.textColor=i;if(n!=null)if(typeof n=="object"){let[l,h]=Object.entries(n)[0];o[l]=h}else o.lineColor=n;if(s!=null)if(typeof s=="object"){let[l,h]=Object.entries(s)[0];o[l]=parseInt(h)}else o.offsetX=parseInt(s);if(a!=null)if(typeof a=="object"){let[l,h]=Object.entries(a)[0];o[l]=parseInt(h)}else o.offsetY=parseInt(a)}},lM=function(t,e,r){let i=Hl,n=ql;if(typeof e=="object"){const s=Object.values(e)[0];i=parseInt(s)}else i=parseInt(e);if(typeof r=="object"){const s=Object.values(r)[0];n=parseInt(s)}else n=parseInt(r);i>=1&&(Hl=i),n>=1&&(ql=n)},cM=function(){return Hl},hM=function(){return ql},uM=function(){return fr},fM=function(){return Qr},Fy=function(t){return t==null?ei:ei.filter(e=>e.parentBoundary===t)},dM=function(t){return ei.find(e=>e.alias===t)},pM=function(t){return Object.keys(Fy(t))},gM=function(t){return t==null?bi:bi.filter(e=>e.parentBoundary===t)},yM=function(){return Ga},mM=function(){return Q1},bM=function(t){J1=t},yn=function(){return J1},_M=function(){ei=[],bi=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Qr="",fr="global",cn=[""],Ga=[],cn=[""],Q1="",J1=!1,Hl=4,ql=2},xM={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},vM={FILLED:0,OPEN:1},kM={LEFTOF:0,RIGHTOF:1,OVER:2},wM=function(t){Q1=Ur(t,G())},Py={addPersonOrSystem:JI,addPersonOrSystemBoundary:rM,addContainer:tM,addContainerBoundary:iM,addComponent:eM,addDeploymentNode:nM,popBoundaryParseStack:sM,addRel:QI,updateElStyle:aM,updateRelStyle:oM,updateLayoutConfig:lM,autoWrap:yn,setWrap:bM,getC4ShapeArray:Fy,getC4Shape:dM,getC4ShapeKeys:pM,getBoundarys:gM,getCurrentBoundaryParse:uM,getParentBoundaryParse:fM,getRels:yM,getTitle:mM,getC4Type:XI,getC4ShapeInRow:cM,getC4BoundaryInRow:hM,setAccTitle:kr,getAccTitle:Br,getAccDescription:Ir,setAccDescription:Dr,parseDirective:ZI,getConfig:()=>G().c4,clear:_M,LINETYPE:xM,ARROWTYPE:vM,PLACEMENT:kM,setTitle:wM,setC4Type:KI},t0=function(t,e){const r=t.append("rect");if(r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),e.attrs!=="undefined"&&e.attrs!==null)for(let i in e.attrs)r.attr(i,e.attrs[i]);return e.class!=="undefined"&&r.attr("class",e.class),r},Vy=function(t,e,r,i,n,s){const a=t.append("image");a.attr("width",e),a.attr("height",r),a.attr("x",i),a.attr("y",n);let o=s.startsWith("data:image/png;base64")?s:Ki(s);a.attr("xlink:href",o)},TM=(t,e,r)=>{const i=t.append("g");let n=0;for(let s of e){let a=s.textColor?s.textColor:"#444444",o=s.lineColor?s.lineColor:"#444444",l=s.offsetX?parseInt(s.offsetX):0,h=s.offsetY?parseInt(s.offsetY):0,u="";if(n===0){let d=i.append("line");d.attr("x1",s.startPoint.x),d.attr("y1",s.startPoint.y),d.attr("x2",s.endPoint.x),d.attr("y2",s.endPoint.y),d.attr("stroke-width","1"),d.attr("stroke",o),d.style("fill","none"),s.type!=="rel_b"&&d.attr("marker-end","url("+u+"#arrowhead)"),(s.type==="birel"||s.type==="rel_b")&&d.attr("marker-start","url("+u+"#arrowend)"),n=-1}else{let d=i.append("path");d.attr("fill","none").attr("stroke-width","1").attr("stroke",o).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",s.startPoint.x).replaceAll("starty",s.startPoint.y).replaceAll("controlx",s.startPoint.x+(s.endPoint.x-s.startPoint.x)/2-(s.endPoint.x-s.startPoint.x)/4).replaceAll("controly",s.startPoint.y+(s.endPoint.y-s.startPoint.y)/2).replaceAll("stopx",s.endPoint.x).replaceAll("stopy",s.endPoint.y)),s.type!=="rel_b"&&d.attr("marker-end","url("+u+"#arrowhead)"),(s.type==="birel"||s.type==="rel_b")&&d.attr("marker-start","url("+u+"#arrowend)")}let f=r.messageFont();zi(r)(s.label.text,i,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+l,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+h,s.label.width,s.label.height,{fill:a},f),s.techn&&s.techn.text!==""&&(f=r.messageFont(),zi(r)("["+s.techn.text+"]",i,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+l,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+r.messageFontSize+5+h,Math.max(s.label.width,s.techn.width),s.techn.height,{fill:a,"font-style":"italic"},f))}},EM=function(t,e,r){const i=t.append("g");let n=e.bgColor?e.bgColor:"none",s=e.borderColor?e.borderColor:"#444444",a=e.fontColor?e.fontColor:"black",o={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(o={"stroke-width":1});let l={x:e.x,y:e.y,fill:n,stroke:s,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:o};t0(i,l);let h=r.boundaryFont();h.fontWeight="bold",h.fontSize=h.fontSize+2,h.fontColor=a,zi(r)(e.label.text,i,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},h),e.type&&e.type.text!==""&&(h=r.boundaryFont(),h.fontColor=a,zi(r)(e.type.text,i,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},h)),e.descr&&e.descr.text!==""&&(h=r.boundaryFont(),h.fontSize=h.fontSize-2,h.fontColor=a,zi(r)(e.descr.text,i,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},h))},CM=function(t,e,r){var i;let n=e.bgColor?e.bgColor:r[e.typeC4Shape.text+"_bg_color"],s=e.borderColor?e.borderColor:r[e.typeC4Shape.text+"_border_color"],a=e.fontColor?e.fontColor:"#FFFFFF",o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}const l=t.append("g");l.attr("class","person-man");const h=Yy();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":h.x=e.x,h.y=e.y,h.fill=n,h.width=e.width,h.height=e.height,h.stroke=s,h.rx=2.5,h.ry=2.5,h.attrs={"stroke-width":.5},t0(l,h);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":l.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",s).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",s).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":l.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",s).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",s).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2));break}let u=RM(r,e.typeC4Shape.text);switch(l.append("text").attr("fill",a).attr("font-family",u.fontFamily).attr("font-size",u.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":Vy(l,48,48,e.x+e.width/2-24,e.y+e.image.Y,o);break}let f=r[e.typeC4Shape.text+"Font"]();return f.fontWeight="bold",f.fontSize=f.fontSize+2,f.fontColor=a,zi(r)(e.label.text,l,e.x,e.y+e.label.Y,e.width,e.height,{fill:a},f),f=r[e.typeC4Shape.text+"Font"](),f.fontColor=a,e.techn&&((i=e.techn)==null?void 0:i.text)!==""?zi(r)(e.techn.text,l,e.x,e.y+e.techn.Y,e.width,e.height,{fill:a,"font-style":"italic"},f):e.type&&e.type.text!==""&&zi(r)(e.type.text,l,e.x,e.y+e.type.Y,e.width,e.height,{fill:a,"font-style":"italic"},f),e.descr&&e.descr.text!==""&&(f=r.personFont(),f.fontColor=a,zi(r)(e.descr.text,l,e.x,e.y+e.descr.Y,e.width,e.height,{fill:a},f)),e.height},SM=function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},AM=function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},LM=function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},BM=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},DM=function(t){t.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},IM=function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},MM=function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},NM=function(t){const r=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);r.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),r.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},Yy=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},RM=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),zi=function(){function t(n,s,a,o,l,h,u){const f=s.append("text").attr("x",a+l/2).attr("y",o+h/2+5).style("text-anchor","middle").text(n);i(f,u)}function e(n,s,a,o,l,h,u,f){const{fontSize:d,fontFamily:p,fontWeight:m}=f,b=n.split(Xt.lineBreakRegex);for(let x=0;x<b.length;x++){const k=x*d-d*(b.length-1)/2,v=s.append("text").attr("x",a+l/2).attr("y",o).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",d).style("font-weight",m).style("font-family",p);v.append("tspan").attr("dy",k).text(b[x]).attr("alignment-baseline","mathematical"),i(v,u)}}function r(n,s,a,o,l,h,u,f){const d=s.append("switch"),m=d.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",h).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");m.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,d,a,o,l,h,u,f),i(m,u)}function i(n,s){for(const a in s)s.hasOwnProperty(a)&&n.attr(a,s[a])}return function(n){return n.textPlacement==="fo"?r:n.textPlacement==="old"?t:e}}(),ci={drawRect:t0,drawBoundary:EM,drawC4Shape:CM,drawRels:TM,drawImage:Vy,insertArrowHead:BM,insertArrowEnd:DM,insertArrowFilledHead:IM,insertDynamicNumber:MM,insertArrowCrossHead:NM,insertDatabaseIcon:SM,insertComputerIcon:AM,insertClockIcon:LM,getNoteRect:Yy,sanitizeUrl:Ki};let Gl=0,$l=0,zy=4,Au=2;Wl.yy=Py;let Ot={};class Uy{constructor(e){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,Lu(e.db.getConfig())}setData(e,r,i,n){this.nextData.startx=this.data.startx=e,this.nextData.stopx=this.data.stopx=r,this.nextData.starty=this.data.starty=i,this.nextData.stopy=this.data.stopy=n}updateVal(e,r,i,n){e[r]===void 0?e[r]=i:e[r]=n(i,e[r])}insert(e){this.nextData.cnt=this.nextData.cnt+1;let r=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+e.margin:this.nextData.stopx+e.margin*2,i=r+e.width,n=this.nextData.starty+e.margin*2,s=n+e.height;(r>=this.data.widthLimit||i>=this.data.widthLimit||this.nextData.cnt>zy)&&(r=this.nextData.startx+e.margin+Ot.nextLinePaddingX,n=this.nextData.stopy+e.margin*2,this.nextData.stopx=i=r+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=s=n+e.height,this.nextData.cnt=1),e.x=r,e.y=n,this.updateVal(this.data,"startx",r,Math.min),this.updateVal(this.data,"starty",n,Math.min),this.updateVal(this.data,"stopx",i,Math.max),this.updateVal(this.data,"stopy",s,Math.max),this.updateVal(this.nextData,"startx",r,Math.min),this.updateVal(this.nextData,"starty",n,Math.min),this.updateVal(this.nextData,"stopx",i,Math.max),this.updateVal(this.nextData,"stopy",s,Math.max)}init(e){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},Lu(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}}const Lu=function(t){Xe(Ot,t),t.fontFamily&&(Ot.personFontFamily=Ot.systemFontFamily=Ot.messageFontFamily=t.fontFamily),t.fontSize&&(Ot.personFontSize=Ot.systemFontSize=Ot.messageFontSize=t.fontSize),t.fontWeight&&(Ot.personFontWeight=Ot.systemFontWeight=Ot.messageFontWeight=t.fontWeight)},na=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),Jo=t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),OM=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight});function jr(t,e,r,i,n){if(!e[t].width)if(r)e[t].text=dy(e[t].text,n,i),e[t].textLines=e[t].text.split(Xt.lineBreakRegex).length,e[t].width=n,e[t].height=Tu(e[t].text,i);else{let s=e[t].text.split(Xt.lineBreakRegex);e[t].textLines=s.length;let a=0;e[t].height=0,e[t].width=0;for(const o of s)e[t].width=Math.max(yi(o,i),e[t].width),a=Tu(o,i),e[t].height=e[t].height+a}}const Wy=function(t,e,r){e.x=r.data.startx,e.y=r.data.starty,e.width=r.data.stopx-r.data.startx,e.height=r.data.stopy-r.data.starty,e.label.y=Ot.c4ShapeMargin-35;let i=e.wrap&&Ot.wrap,n=Jo(Ot);n.fontSize=n.fontSize+2,n.fontWeight="bold";let s=yi(e.label.text,n);jr("label",e,i,n,s),ci.drawBoundary(t,e,Ot)},Hy=function(t,e,r,i){let n=0;for(const s of i){n=0;const a=r[s];let o=na(Ot,a.typeC4Shape.text);switch(o.fontSize=o.fontSize-2,a.typeC4Shape.width=yi("<<"+a.typeC4Shape.text+">>",o),a.typeC4Shape.height=o.fontSize+2,a.typeC4Shape.Y=Ot.c4ShapePadding,n=a.typeC4Shape.Y+a.typeC4Shape.height-4,a.image={width:0,height:0,Y:0},a.typeC4Shape.text){case"person":case"external_person":a.image.width=48,a.image.height=48,a.image.Y=n,n=a.image.Y+a.image.height;break}a.sprite&&(a.image.width=48,a.image.height=48,a.image.Y=n,n=a.image.Y+a.image.height);let l=a.wrap&&Ot.wrap,h=Ot.width-Ot.c4ShapePadding*2,u=na(Ot,a.typeC4Shape.text);if(u.fontSize=u.fontSize+2,u.fontWeight="bold",jr("label",a,l,u,h),a.label.Y=n+8,n=a.label.Y+a.label.height,a.type&&a.type.text!==""){a.type.text="["+a.type.text+"]";let p=na(Ot,a.typeC4Shape.text);jr("type",a,l,p,h),a.type.Y=n+5,n=a.type.Y+a.type.height}else if(a.techn&&a.techn.text!==""){a.techn.text="["+a.techn.text+"]";let p=na(Ot,a.techn.text);jr("techn",a,l,p,h),a.techn.Y=n+5,n=a.techn.Y+a.techn.height}let f=n,d=a.label.width;if(a.descr&&a.descr.text!==""){let p=na(Ot,a.typeC4Shape.text);jr("descr",a,l,p,h),a.descr.Y=n+20,n=a.descr.Y+a.descr.height,d=Math.max(a.label.width,a.descr.width),f=n-a.descr.textLines*5}d=d+Ot.c4ShapePadding,a.width=Math.max(a.width||Ot.width,d,Ot.width),a.height=Math.max(a.height||Ot.height,f,Ot.height),a.margin=a.margin||Ot.c4ShapeMargin,t.insert(a),ci.drawC4Shape(e,a,Ot)}t.bumpLastMargin(Ot.c4ShapeMargin)};class Or{constructor(e,r){this.x=e,this.y=r}}let Nd=function(t,e){let r=t.x,i=t.y,n=e.x,s=e.y,a=r+t.width/2,o=i+t.height/2,l=Math.abs(r-n),h=Math.abs(i-s),u=h/l,f=t.height/t.width,d=null;return i==s&&r<n?d=new Or(r+t.width,o):i==s&&r>n?d=new Or(r,o):r==n&&i<s?d=new Or(a,i+t.height):r==n&&i>s&&(d=new Or(a,i)),r>n&&i<s?f>=u?d=new Or(r,o+u*t.width/2):d=new Or(a-l/h*t.height/2,i+t.height):r<n&&i<s?f>=u?d=new Or(r+t.width,o+u*t.width/2):d=new Or(a+l/h*t.height/2,i+t.height):r<n&&i>s?f>=u?d=new Or(r+t.width,o-u*t.width/2):d=new Or(a+t.height/2*l/h,i):r>n&&i>s&&(f>=u?d=new Or(r,o-t.width/2*u):d=new Or(a-t.height/2*l/h,i)),d},FM=function(t,e){let r={x:0,y:0};r.x=e.x+e.width/2,r.y=e.y+e.height/2;let i=Nd(t,r);r.x=t.x+t.width/2,r.y=t.y+t.height/2;let n=Nd(e,r);return{startPoint:i,endPoint:n}};const PM=function(t,e,r,i){let n=0;for(let s of e){n=n+1;let a=s.wrap&&Ot.wrap,o=OM(Ot);i.db.getC4Type()==="C4Dynamic"&&(s.label.text=n+": "+s.label.text);let h=yi(s.label.text,o);jr("label",s,a,o,h),s.techn&&s.techn.text!==""&&(h=yi(s.techn.text,o),jr("techn",s,a,o,h)),s.descr&&s.descr.text!==""&&(h=yi(s.descr.text,o),jr("descr",s,a,o,h));let u=r(s.from),f=r(s.to),d=FM(u,f);s.startPoint=d.startPoint,s.endPoint=d.endPoint}ci.drawRels(t,e,Ot)};function qy(t,e,r,i,n){let s=new Uy(n);s.data.widthLimit=r.data.widthLimit/Math.min(Au,i.length);for(let[a,o]of i.entries()){let l=0;o.image={width:0,height:0,Y:0},o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=l,l=o.image.Y+o.image.height);let h=o.wrap&&Ot.wrap,u=Jo(Ot);if(u.fontSize=u.fontSize+2,u.fontWeight="bold",jr("label",o,h,u,s.data.widthLimit),o.label.Y=l+8,l=o.label.Y+o.label.height,o.type&&o.type.text!==""){o.type.text="["+o.type.text+"]";let m=Jo(Ot);jr("type",o,h,m,s.data.widthLimit),o.type.Y=l+5,l=o.type.Y+o.type.height}if(o.descr&&o.descr.text!==""){let m=Jo(Ot);m.fontSize=m.fontSize-2,jr("descr",o,h,m,s.data.widthLimit),o.descr.Y=l+20,l=o.descr.Y+o.descr.height}if(a==0||a%Au===0){let m=r.data.startx+Ot.diagramMarginX,b=r.data.stopy+Ot.diagramMarginY+l;s.setData(m,m,b,b)}else{let m=s.data.stopx!==s.data.startx?s.data.stopx+Ot.diagramMarginX:s.data.startx,b=s.data.starty;s.setData(m,m,b,b)}s.name=o.alias;let f=n.db.getC4ShapeArray(o.alias),d=n.db.getC4ShapeKeys(o.alias);d.length>0&&Hy(s,t,f,d),e=o.alias;let p=n.db.getBoundarys(e);p.length>0&&qy(t,e,s,p,n),o.alias!=="global"&&Wy(t,o,s),r.data.stopy=Math.max(s.data.stopy+Ot.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(s.data.stopx+Ot.c4ShapeMargin,r.data.stopx),Gl=Math.max(Gl,r.data.stopx),$l=Math.max($l,r.data.stopy)}}const VM=function(t,e,r,i){Ot=G().c4;const n=G().securityLevel;let s;n==="sandbox"&&(s=_t("#i"+e));const a=_t(n==="sandbox"?s.nodes()[0].contentDocument.body:"body");let o=i.db;i.db.setWrap(Ot.wrap),zy=o.getC4ShapeInRow(),Au=o.getC4BoundaryInRow(),I.debug(`C:${JSON.stringify(Ot,null,2)}`);const l=n==="sandbox"?a.select(`[id="${e}"]`):_t(`[id="${e}"]`);ci.insertComputerIcon(l),ci.insertDatabaseIcon(l),ci.insertClockIcon(l);let h=new Uy(i);h.setData(Ot.diagramMarginX,Ot.diagramMarginX,Ot.diagramMarginY,Ot.diagramMarginY),h.data.widthLimit=screen.availWidth,Gl=Ot.diagramMarginX,$l=Ot.diagramMarginY;const u=i.db.getTitle();let f=i.db.getBoundarys("");qy(l,"",h,f,i),ci.insertArrowHead(l),ci.insertArrowEnd(l),ci.insertArrowCrossHead(l),ci.insertArrowFilledHead(l),PM(l,i.db.getRels(),i.db.getC4Shape,i),h.data.stopx=Gl,h.data.stopy=$l;const d=h.data;let m=d.stopy-d.starty+2*Ot.diagramMarginY;const x=d.stopx-d.startx+2*Ot.diagramMarginX;u&&l.append("text").text(u).attr("x",(d.stopx-d.startx)/2-4*Ot.diagramMarginX).attr("y",d.starty+Ot.diagramMarginY),ni(l,m,x,Ot.useMaxWidth);const k=u?60:0;l.attr("viewBox",d.startx-Ot.diagramMarginX+" -"+(Ot.diagramMarginY+k)+" "+x+" "+(m+k)),I.debug("models:",d)},Rd={drawPersonOrSystemArray:Hy,drawBoundary:Wy,setConf:Lu,draw:VM};var Bu=function(){var t=function(z,A,M,q){for(M=M||{},q=z.length;q--;M[z[q]]=A);return M},e=[1,3],r=[1,7],i=[1,8],n=[1,9],s=[1,10],a=[1,13],o=[1,12],l=[1,16,25],h=[1,20],u=[1,32],f=[1,33],d=[1,34],p=[1,36],m=[1,39],b=[1,37],x=[1,38],k=[1,44],v=[1,45],B=[1,40],R=[1,41],P=[1,42],V=[1,43],O=[1,48],F=[1,49],C=[1,50],S=[1,51],E=[16,25],_=[1,65],w=[1,66],g=[1,67],D=[1,68],y=[1,69],N=[1,70],nt=[1,71],Y=[1,80],Z=[16,25,32,45,46,54,60,61,62,63,64,65,66,71,73],J=[16,25,30,32,45,46,50,54,60,61,62,63,64,65,66,71,73,88,89,90,91],X=[5,8,9,10,11,16,19,23,25],tt=[54,88,89,90,91],ot=[54,65,66,88,89,90,91],at=[54,60,61,62,63,64,88,89,90,91],U=[16,25,32],Tt=[1,107],$={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statments:5,direction:6,directive:7,direction_tb:8,direction_bt:9,direction_rl:10,direction_lr:11,graphConfig:12,openDirective:13,typeDirective:14,closeDirective:15,NEWLINE:16,":":17,argDirective:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,CLASS_DIAGRAM:23,statements:24,EOF:25,statement:26,className:27,alphaNumToken:28,classLiteralName:29,GENERICTYPE:30,relationStatement:31,LABEL:32,classStatement:33,methodStatement:34,annotationStatement:35,clickStatement:36,cssClassStatement:37,noteStatement:38,acc_title:39,acc_title_value:40,acc_descr:41,acc_descr_value:42,acc_descr_multiline_value:43,CLASS:44,STYLE_SEPARATOR:45,STRUCT_START:46,members:47,STRUCT_STOP:48,ANNOTATION_START:49,ANNOTATION_END:50,MEMBER:51,SEPARATOR:52,relation:53,STR:54,NOTE_FOR:55,noteText:56,NOTE:57,relationType:58,lineType:59,AGGREGATION:60,EXTENSION:61,COMPOSITION:62,DEPENDENCY:63,LOLLIPOP:64,LINE:65,DOTTED_LINE:66,CALLBACK:67,LINK:68,LINK_TARGET:69,CLICK:70,CALLBACK_NAME:71,CALLBACK_ARGS:72,HREF:73,CSSCLASS:74,commentToken:75,textToken:76,graphCodeTokens:77,textNoTagsToken:78,TAGSTART:79,TAGEND:80,"==":81,"--":82,PCT:83,DEFAULT:84,SPACE:85,MINUS:86,keywords:87,UNICODE_TEXT:88,NUM:89,ALPHA:90,BQUOTE_STR:91,$accept:0,$end:1},terminals_:{2:"error",5:"statments",8:"direction_tb",9:"direction_bt",10:"direction_rl",11:"direction_lr",16:"NEWLINE",17:":",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",23:"CLASS_DIAGRAM",25:"EOF",30:"GENERICTYPE",32:"LABEL",39:"acc_title",40:"acc_title_value",41:"acc_descr",42:"acc_descr_value",43:"acc_descr_multiline_value",44:"CLASS",45:"STYLE_SEPARATOR",46:"STRUCT_START",48:"STRUCT_STOP",49:"ANNOTATION_START",50:"ANNOTATION_END",51:"MEMBER",52:"SEPARATOR",54:"STR",55:"NOTE_FOR",57:"NOTE",60:"AGGREGATION",61:"EXTENSION",62:"COMPOSITION",63:"DEPENDENCY",64:"LOLLIPOP",65:"LINE",66:"DOTTED_LINE",67:"CALLBACK",68:"LINK",69:"LINK_TARGET",70:"CLICK",71:"CALLBACK_NAME",72:"CALLBACK_ARGS",73:"HREF",74:"CSSCLASS",77:"graphCodeTokens",79:"TAGSTART",80:"TAGEND",81:"==",82:"--",83:"PCT",84:"DEFAULT",85:"SPACE",86:"MINUS",87:"keywords",88:"UNICODE_TEXT",89:"NUM",90:"ALPHA",91:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[3,1],[3,2],[6,1],[6,1],[6,1],[6,1],[4,1],[7,4],[7,6],[13,1],[14,1],[18,1],[15,1],[12,4],[24,1],[24,2],[24,3],[27,1],[27,1],[27,2],[27,2],[27,2],[26,1],[26,2],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,2],[26,2],[26,1],[33,2],[33,4],[33,5],[33,7],[35,4],[47,1],[47,2],[34,1],[34,2],[34,1],[34,1],[31,3],[31,4],[31,4],[31,5],[38,3],[38,2],[53,3],[53,2],[53,2],[53,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[36,3],[36,4],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[37,3],[75,1],[75,1],[76,1],[76,1],[76,1],[76,1],[76,1],[76,1],[76,1],[78,1],[78,1],[78,1],[78,1],[28,1],[28,1],[28,1],[29,1],[56,1]],performAction:function(A,M,q,L,st,T,Dt){var et=T.length-1;switch(st){case 5:L.setDirection("TB");break;case 6:L.setDirection("BT");break;case 7:L.setDirection("RL");break;case 8:L.setDirection("LR");break;case 12:L.parseDirective("%%{","open_directive");break;case 13:L.parseDirective(T[et],"type_directive");break;case 14:T[et]=T[et].trim().replace(/'/g,'"'),L.parseDirective(T[et],"arg_directive");break;case 15:L.parseDirective("}%%","close_directive","class");break;case 20:case 21:this.$=T[et];break;case 22:this.$=T[et-1]+T[et];break;case 23:case 24:this.$=T[et-1]+"~"+T[et];break;case 25:L.addRelation(T[et]);break;case 26:T[et-1].title=L.cleanupLabel(T[et]),L.addRelation(T[et-1]);break;case 35:this.$=T[et].trim(),L.setAccTitle(this.$);break;case 36:case 37:this.$=T[et].trim(),L.setAccDescription(this.$);break;case 38:L.addClass(T[et]);break;case 39:L.addClass(T[et-2]),L.setCssClass(T[et-2],T[et]);break;case 40:L.addClass(T[et-3]),L.addMembers(T[et-3],T[et-1]);break;case 41:L.addClass(T[et-5]),L.setCssClass(T[et-5],T[et-3]),L.addMembers(T[et-5],T[et-1]);break;case 42:L.addAnnotation(T[et],T[et-2]);break;case 43:this.$=[T[et]];break;case 44:T[et].push(T[et-1]),this.$=T[et];break;case 45:break;case 46:L.addMember(T[et-1],L.cleanupLabel(T[et]));break;case 47:break;case 48:break;case 49:this.$={id1:T[et-2],id2:T[et],relation:T[et-1],relationTitle1:"none",relationTitle2:"none"};break;case 50:this.$={id1:T[et-3],id2:T[et],relation:T[et-1],relationTitle1:T[et-2],relationTitle2:"none"};break;case 51:this.$={id1:T[et-3],id2:T[et],relation:T[et-2],relationTitle1:"none",relationTitle2:T[et-1]};break;case 52:this.$={id1:T[et-4],id2:T[et],relation:T[et-2],relationTitle1:T[et-3],relationTitle2:T[et-1]};break;case 53:L.addNote(T[et],T[et-1]);break;case 54:L.addNote(T[et]);break;case 55:this.$={type1:T[et-2],type2:T[et],lineType:T[et-1]};break;case 56:this.$={type1:"none",type2:T[et],lineType:T[et-1]};break;case 57:this.$={type1:T[et-1],type2:"none",lineType:T[et]};break;case 58:this.$={type1:"none",type2:"none",lineType:T[et]};break;case 59:this.$=L.relationType.AGGREGATION;break;case 60:this.$=L.relationType.EXTENSION;break;case 61:this.$=L.relationType.COMPOSITION;break;case 62:this.$=L.relationType.DEPENDENCY;break;case 63:this.$=L.relationType.LOLLIPOP;break;case 64:this.$=L.lineType.LINE;break;case 65:this.$=L.lineType.DOTTED_LINE;break;case 66:case 72:this.$=T[et-2],L.setClickEvent(T[et-1],T[et]);break;case 67:case 73:this.$=T[et-3],L.setClickEvent(T[et-2],T[et-1]),L.setTooltip(T[et-2],T[et]);break;case 68:case 76:this.$=T[et-2],L.setLink(T[et-1],T[et]);break;case 69:this.$=T[et-3],L.setLink(T[et-2],T[et-1],T[et]);break;case 70:case 78:this.$=T[et-3],L.setLink(T[et-2],T[et-1]),L.setTooltip(T[et-2],T[et]);break;case 71:case 79:this.$=T[et-4],L.setLink(T[et-3],T[et-2],T[et]),L.setTooltip(T[et-3],T[et-1]);break;case 74:this.$=T[et-3],L.setClickEvent(T[et-2],T[et-1],T[et]);break;case 75:this.$=T[et-4],L.setClickEvent(T[et-3],T[et-2],T[et-1]),L.setTooltip(T[et-3],T[et]);break;case 77:this.$=T[et-3],L.setLink(T[et-2],T[et-1],T[et]);break;case 80:L.setCssClass(T[et-1],T[et]);break}},table:[{3:1,4:2,5:e,6:4,7:5,8:r,9:i,10:n,11:s,12:6,13:11,19:a,23:o},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{3:14,4:2,5:e,6:4,7:5,8:r,9:i,10:n,11:s,12:6,13:11,19:a,23:o},{1:[2,9]},t(l,[2,5]),t(l,[2,6]),t(l,[2,7]),t(l,[2,8]),{14:15,20:[1,16]},{16:[1,17]},{20:[2,12]},{1:[2,4]},{15:18,17:[1,19],22:h},t([17,22],[2,13]),{6:31,7:30,8:r,9:i,10:n,11:s,13:11,19:a,24:21,26:22,27:35,28:46,29:47,31:23,33:24,34:25,35:26,36:27,37:28,38:29,39:u,41:f,43:d,44:p,49:m,51:b,52:x,55:k,57:v,67:B,68:R,70:P,74:V,88:O,89:F,90:C,91:S},{16:[1,52]},{18:53,21:[1,54]},{16:[2,15]},{25:[1,55]},{16:[1,56],25:[2,17]},t(E,[2,25],{32:[1,57]}),t(E,[2,27]),t(E,[2,28]),t(E,[2,29]),t(E,[2,30]),t(E,[2,31]),t(E,[2,32]),t(E,[2,33]),t(E,[2,34]),{40:[1,58]},{42:[1,59]},t(E,[2,37]),t(E,[2,45],{53:60,58:63,59:64,32:[1,62],54:[1,61],60:_,61:w,62:g,63:D,64:y,65:N,66:nt}),{27:72,28:46,29:47,88:O,89:F,90:C,91:S},t(E,[2,47]),t(E,[2,48]),{28:73,88:O,89:F,90:C},{27:74,28:46,29:47,88:O,89:F,90:C,91:S},{27:75,28:46,29:47,88:O,89:F,90:C,91:S},{27:76,28:46,29:47,88:O,89:F,90:C,91:S},{54:[1,77]},{27:78,28:46,29:47,88:O,89:F,90:C,91:S},{54:Y,56:79},t(Z,[2,20],{28:46,29:47,27:81,30:[1,82],88:O,89:F,90:C,91:S}),t(Z,[2,21],{30:[1,83]}),t(J,[2,94]),t(J,[2,95]),t(J,[2,96]),t([16,25,30,32,45,46,54,60,61,62,63,64,65,66,71,73],[2,97]),t(X,[2,10]),{15:84,22:h},{22:[2,14]},{1:[2,16]},{6:31,7:30,8:r,9:i,10:n,11:s,13:11,19:a,24:85,25:[2,18],26:22,27:35,28:46,29:47,31:23,33:24,34:25,35:26,36:27,37:28,38:29,39:u,41:f,43:d,44:p,49:m,51:b,52:x,55:k,57:v,67:B,68:R,70:P,74:V,88:O,89:F,90:C,91:S},t(E,[2,26]),t(E,[2,35]),t(E,[2,36]),{27:86,28:46,29:47,54:[1,87],88:O,89:F,90:C,91:S},{53:88,58:63,59:64,60:_,61:w,62:g,63:D,64:y,65:N,66:nt},t(E,[2,46]),{59:89,65:N,66:nt},t(tt,[2,58],{58:90,60:_,61:w,62:g,63:D,64:y}),t(ot,[2,59]),t(ot,[2,60]),t(ot,[2,61]),t(ot,[2,62]),t(ot,[2,63]),t(at,[2,64]),t(at,[2,65]),t(E,[2,38],{45:[1,91],46:[1,92]}),{50:[1,93]},{54:[1,94]},{54:[1,95]},{71:[1,96],73:[1,97]},{28:98,88:O,89:F,90:C},{54:Y,56:99},t(E,[2,54]),t(E,[2,98]),t(Z,[2,22]),t(Z,[2,23]),t(Z,[2,24]),{16:[1,100]},{25:[2,19]},t(U,[2,49]),{27:101,28:46,29:47,88:O,89:F,90:C,91:S},{27:102,28:46,29:47,54:[1,103],88:O,89:F,90:C,91:S},t(tt,[2,57],{58:104,60:_,61:w,62:g,63:D,64:y}),t(tt,[2,56]),{28:105,88:O,89:F,90:C},{47:106,51:Tt},{27:108,28:46,29:47,88:O,89:F,90:C,91:S},t(E,[2,66],{54:[1,109]}),t(E,[2,68],{54:[1,111],69:[1,110]}),t(E,[2,72],{54:[1,112],72:[1,113]}),t(E,[2,76],{54:[1,115],69:[1,114]}),t(E,[2,80]),t(E,[2,53]),t(X,[2,11]),t(U,[2,51]),t(U,[2,50]),{27:116,28:46,29:47,88:O,89:F,90:C,91:S},t(tt,[2,55]),t(E,[2,39],{46:[1,117]}),{48:[1,118]},{47:119,48:[2,43],51:Tt},t(E,[2,42]),t(E,[2,67]),t(E,[2,69]),t(E,[2,70],{69:[1,120]}),t(E,[2,73]),t(E,[2,74],{54:[1,121]}),t(E,[2,77]),t(E,[2,78],{69:[1,122]}),t(U,[2,52]),{47:123,51:Tt},t(E,[2,40]),{48:[2,44]},t(E,[2,71]),t(E,[2,75]),t(E,[2,79]),{48:[1,124]},t(E,[2,41])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],6:[2,9],13:[2,12],14:[2,4],20:[2,15],54:[2,14],55:[2,16],85:[2,19],119:[2,44]},parseError:function(A,M){if(M.recoverable)this.trace(A);else{var q=new Error(A);throw q.hash=M,q}},parse:function(A){var M=this,q=[0],L=[],st=[null],T=[],Dt=this.table,et="",Et=0,vt=0,pt=2,ut=1,gt=T.slice.call(arguments,1),ht=Object.create(this.lexer),yt={yy:{}};for(var he in this.yy)Object.prototype.hasOwnProperty.call(this.yy,he)&&(yt.yy[he]=this.yy[he]);ht.setInput(A,yt.yy),yt.yy.lexer=ht,yt.yy.parser=this,typeof ht.yylloc>"u"&&(ht.yylloc={});var re=ht.yylloc;T.push(re);var Mt=ht.options&&ht.options.ranges;typeof yt.yy.parseError=="function"?this.parseError=yt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Nt(){var it;return it=L.pop()||ht.lex()||ut,typeof it!="number"&&(it instanceof Array&&(L=it,it=L.pop()),it=M.symbols_[it]||it),it}for(var Kt,fe,qt,Ft,Bt={},bt,mt,wt,ft;;){if(fe=q[q.length-1],this.defaultActions[fe]?qt=this.defaultActions[fe]:((Kt===null||typeof Kt>"u")&&(Kt=Nt()),qt=Dt[fe]&&Dt[fe][Kt]),typeof qt>"u"||!qt.length||!qt[0]){var It="";ft=[];for(bt in Dt[fe])this.terminals_[bt]&&bt>pt&&ft.push("'"+this.terminals_[bt]+"'");ht.showPosition?It="Parse error on line "+(Et+1)+`:
1210
1210
  `+ht.showPosition()+`
1211
1211
  Expecting `+ft.join(", ")+", got '"+(this.terminals_[Kt]||Kt)+"'":It="Parse error on line "+(Et+1)+": Unexpected "+(Kt==ut?"end of input":"'"+(this.terminals_[Kt]||Kt)+"'"),this.parseError(It,{text:ht.match,token:this.terminals_[Kt]||Kt,line:ht.yylineno,loc:re,expected:ft})}if(qt[0]instanceof Array&&qt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+fe+", token: "+Kt);switch(qt[0]){case 1:q.push(Kt),st.push(ht.yytext),T.push(ht.yylloc),q.push(qt[1]),Kt=null,vt=ht.yyleng,et=ht.yytext,Et=ht.yylineno,re=ht.yylloc;break;case 2:if(mt=this.productions_[qt[1]][1],Bt.$=st[st.length-mt],Bt._$={first_line:T[T.length-(mt||1)].first_line,last_line:T[T.length-1].last_line,first_column:T[T.length-(mt||1)].first_column,last_column:T[T.length-1].last_column},Mt&&(Bt._$.range=[T[T.length-(mt||1)].range[0],T[T.length-1].range[1]]),Ft=this.performAction.apply(Bt,[et,vt,Et,yt.yy,qt[1],st,T].concat(gt)),typeof Ft<"u")return Ft;mt&&(q=q.slice(0,-1*mt*2),st=st.slice(0,-1*mt),T=T.slice(0,-1*mt)),q.push(this.productions_[qt[1]][0]),st.push(Bt.$),T.push(Bt._$),wt=Dt[q[q.length-2]][q[q.length-1]],q.push(wt);break;case 3:return!0}}return!0}},j=function(){var z={EOF:1,parseError:function(M,q){if(this.yy.parser)this.yy.parser.parseError(M,q);else throw new Error(M)},setInput:function(A,M){return this.yy=M||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},input:function(){var A=this._input[0];this.yytext+=A,this.yyleng++,this.offset++,this.match+=A,this.matched+=A;var M=A.match(/(?:\r\n?|\n).*/g);return M?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),A},unput:function(A){var M=A.length,q=A.split(/(?:\r\n?|\n)/g);this._input=A+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-M),this.offset-=M;var L=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),q.length-1&&(this.yylineno-=q.length-1);var st=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:q?(q.length===L.length?this.yylloc.first_column:0)+L[L.length-q.length].length-q[0].length:this.yylloc.first_column-M},this.options.ranges&&(this.yylloc.range=[st[0],st[0]+this.yyleng-M]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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).
1212
1212
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(A){this.unput(this.match.slice(A))},pastInput:function(){var A=this.matched.substr(0,this.matched.length-this.match.length);return(A.length>20?"...":"")+A.substr(-20).replace(/\n/g,"")},upcomingInput: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,"")},showPosition:function(){var A=this.pastInput(),M=new Array(A.length+1).join("-");return A+this.upcomingInput()+`
1213
1213
  `+M+"^"},test_match:function(A,M){var q,L,st;if(this.options.backtrack_lexer&&(st={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&&(st.yylloc.range=this.yylloc.range.slice(0))),L=A[0].match(/(?:\r\n?|\n).*/g),L&&(this.yylineno+=L.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:L?L[L.length-1].length-L[L.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],q=this.performAction.call(this,this.yy,this,M,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),q)return q;if(this._backtrack){for(var T in st)this[T]=st[T];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var A,M,q,L;this._more||(this.yytext="",this.match="");for(var st=this._currentRules(),T=0;T<st.length;T++)if(q=this._input.match(this.rules[st[T]]),q&&(!M||q[0].length>M[0].length)){if(M=q,L=T,this.options.backtrack_lexer){if(A=this.test_match(q,st[T]),A!==!1)return A;if(this._backtrack){M=!1;continue}else return!1}else if(!this.options.flex)break}return M?(A=this.test_match(M,st[L]),A!==!1?A:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1214
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var M=this.next();return M||this.lex()},begin:function(M){this.conditionStack.push(M)},popState:function(){var M=this.conditionStack.length-1;return M>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(M){return M=this.conditionStack.length-1-Math.abs(M||0),M>=0?this.conditionStack[M]:"INITIAL"},pushState:function(M){this.begin(M)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(M,q,L,st){switch(L){case 0:return this.begin("open_directive"),19;case 1:return 8;case 2:return 9;case 3:return 10;case 4:return 11;case 5:return this.begin("type_directive"),20;case 6:return this.popState(),this.begin("arg_directive"),17;case 7:return this.popState(),this.popState(),22;case 8:return 21;case 9:break;case 10:break;case 11:return this.begin("acc_title"),39;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),41;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:return 16;case 19:break;case 20:return 23;case 21:return 23;case 22:return this.begin("struct"),46;case 23:return"EDGE_STATE";case 24:return"EOF_IN_STRUCT";case 25:return"OPEN_IN_STRUCT";case 26:return this.popState(),48;case 27:break;case 28:return"MEMBER";case 29:return 44;case 30:return 74;case 31:return 67;case 32:return 68;case 33:return 70;case 34:return 55;case 35:return 57;case 36:return 49;case 37:return 50;case 38:this.begin("generic");break;case 39:this.popState();break;case 40:return"GENERICTYPE";case 41:this.begin("string");break;case 42:this.popState();break;case 43:return"STR";case 44:this.begin("bqstring");break;case 45:this.popState();break;case 46:return"BQUOTE_STR";case 47:this.begin("href");break;case 48:this.popState();break;case 49:return 73;case 50:this.begin("callback_name");break;case 51:this.popState();break;case 52:this.popState(),this.begin("callback_args");break;case 53:return 71;case 54:this.popState();break;case 55:return 72;case 56:return 69;case 57:return 69;case 58:return 69;case 59:return 69;case 60:return 61;case 61:return 61;case 62:return 63;case 63:return 63;case 64:return 62;case 65:return 60;case 66:return 64;case 67:return 65;case 68:return 66;case 69:return 32;case 70:return 45;case 71:return 86;case 72:return"DOT";case 73:return"PLUS";case 74:return 83;case 75:return"EQUALS";case 76:return"EQUALS";case 77:return 90;case 78:return"PUNCTUATION";case 79:return 89;case 80:return 88;case 81:return 85;case 82:return 25}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[{])/,/^(?:\[\*\])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[`])/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},callback_args:{rules:[54,55],inclusive:!1},callback_name:{rules:[51,52,53],inclusive:!1},href:{rules:[48,49],inclusive:!1},struct:{rules:[23,24,25,26,27,28],inclusive:!1},generic:{rules:[39,40],inclusive:!1},bqstring:{rules:[45,46],inclusive:!1},string:{rules:[42,43],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,23,29,30,31,32,33,34,35,36,37,38,41,44,47,50,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82],inclusive:!0}}};return z}();$.lexer=j;function W(){this.yy={}}return W.prototype=$,$.Parser=W,new W}();Bu.parser=Bu;const Rd=Bu,VM=(t,e)=>{var r;return((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:t.match(/^\s*classDiagram/)!==null},YM=(t,e)=>{var r;return t.match(/^\s*classDiagram/)!==null&&((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:t.match(/^\s*classDiagram-v2/)!==null},t0="classid-";let e0=[],De={},jl=[],Od=0,$a=[];const ka=t=>Xt.sanitizeText(t,G()),zM=function(t,e,r){xe.parseDirective(this,t,e,r)},ja=function(t){let e="",r=t;if(t.indexOf("~")>0){let i=t.split("~");r=i[0],e=Xt.sanitizeText(i[1],G())}return{className:r,type:e}},Du=function(t){let e=ja(t);De[e.className]===void 0&&(De[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:t0+e.className+"-"+Od},Od++)},qy=function(t){const e=Object.keys(De);for(const r of e)if(De[r].id===t)return De[r].domId},UM=function(){e0=[],De={},jl=[],$a=[],$a.push($y),Lr()},WM=function(t){return De[t]},HM=function(){return De},qM=function(){return e0},GM=function(){return jl},$M=function(t){I.debug("Adding relation: "+JSON.stringify(t)),Du(t.id1),Du(t.id2),t.id1=ja(t.id1).className,t.id2=ja(t.id2).className,t.relationTitle1=Xt.sanitizeText(t.relationTitle1.trim(),G()),t.relationTitle2=Xt.sanitizeText(t.relationTitle2.trim(),G()),e0.push(t)},jM=function(t,e){const r=ja(t).className;De[r].annotations.push(e)},Gy=function(t,e){const r=ja(t).className,i=De[r];if(typeof e=="string"){const n=e.trim();n.startsWith("<<")&&n.endsWith(">>")?i.annotations.push(ka(n.substring(2,n.length-2))):n.indexOf(")")>0?i.methods.push(ka(n)):n&&i.members.push(ka(n))}},XM=function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach(r=>Gy(t,r)))},KM=function(t,e){const r={id:`note${jl.length}`,class:e,text:t};jl.push(r)},ZM=function(t){return t.substring(0,1)===":"?Xt.sanitizeText(t.substr(1).trim(),G()):ka(t.trim())},r0=function(t,e){t.split(",").forEach(function(r){let i=r;r[0].match(/\d/)&&(i=t0+i),De[i]!==void 0&&De[i].cssClasses.push(e)})},QM=function(t,e){const r=G();t.split(",").forEach(function(i){e!==void 0&&(De[i].tooltip=Xt.sanitizeText(e,r))})},JM=function(t){return De[t].tooltip},tN=function(t,e,r){const i=G();t.split(",").forEach(function(n){let s=n;n[0].match(/\d/)&&(s=t0+s),De[s]!==void 0&&(De[s].link=jt.formatUrl(e,i),i.securityLevel==="sandbox"?De[s].linkTarget="_top":typeof r=="string"?De[s].linkTarget=ka(r):De[s].linkTarget="_blank")}),r0(t,"clickable")},eN=function(t,e,r){t.split(",").forEach(function(i){rN(i,e,r),De[i].haveCallback=!0}),r0(t,"clickable")},rN=function(t,e,r){const i=G();let n=t,s=qy(n);if(i.securityLevel==="loose"&&e!==void 0&&De[n]!==void 0){let a=[];if(typeof r=="string"){a=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let o=0;o<a.length;o++){let l=a[o].trim();l.charAt(0)==='"'&&l.charAt(l.length-1)==='"'&&(l=l.substr(1,l.length-2)),a[o]=l}}a.length===0&&a.push(s),$a.push(function(){const o=document.querySelector(`[id="${s}"]`);o!==null&&o.addEventListener("click",function(){jt.runFunc(e,...a)},!1)})}},iN=function(t){$a.forEach(function(e){e(t)})},nN={LINE:0,DOTTED_LINE:1},sN={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},$y=function(t){let e=_t(".mermaidTooltip");(e._groups||e)[0][0]===null&&(e=_t("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),_t(t).select("svg").selectAll("g.node").on("mouseover",function(){const n=_t(this);if(n.attr("title")===null)return;const a=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(n.attr("title")).style("left",window.scrollX+a.left+(a.right-a.left)/2+"px").style("top",window.scrollY+a.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/&lt;br\/&gt;/g,"<br/>")),n.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),_t(this).classed("hover",!1)})};$a.push($y);let jy="TB";const aN=()=>jy,oN=t=>{jy=t},fs={parseDirective:zM,setAccTitle:kr,getAccTitle:Br,getAccDescription:Ir,setAccDescription:Dr,getConfig:()=>G().class,addClass:Du,bindFunctions:iN,clear:UM,getClass:WM,getClasses:HM,getNotes:GM,addAnnotation:jM,addNote:KM,getRelations:qM,addRelation:$M,getDirection:aN,setDirection:oN,addMember:Gy,addMembers:XM,cleanupLabel:ZM,lineType:nN,relationType:sN,setClickEvent:eN,setCssClass:r0,setLink:tN,getTooltip:JM,setTooltip:QM,lookUpDomId:qy,setDiagramTitle:si,getDiagramTitle:ai};let Fd=0;const lN=function(t,e,r,i,n){const s=function(v){switch(v){case n.db.relationType.AGGREGATION:return"aggregation";case n.db.relationType.EXTENSION:return"extension";case n.db.relationType.COMPOSITION:return"composition";case n.db.relationType.DEPENDENCY:return"dependency";case n.db.relationType.LOLLIPOP:return"lollipop"}};e.points=e.points.filter(v=>!Number.isNaN(v.y));const a=e.points,o=Us().x(function(v){return v.x}).y(function(v){return v.y}).curve(Ss),l=t.append("path").attr("d",o(a)).attr("id","edge"+Fd).attr("class","relation");let h="";i.arrowMarkerAbsolute&&(h=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,h=h.replace(/\(/g,"\\("),h=h.replace(/\)/g,"\\)")),r.relation.lineType==1&&l.attr("class","relation dashed-line"),r.relation.lineType==10&&l.attr("class","relation dotted-line"),r.relation.type1!=="none"&&l.attr("marker-start","url("+h+"#"+s(r.relation.type1)+"Start)"),r.relation.type2!=="none"&&l.attr("marker-end","url("+h+"#"+s(r.relation.type2)+"End)");let u,f;const d=e.points.length;let p=jt.calcLabelPosition(e.points);u=p.x,f=p.y;let m,b,x,k;if(d%2!==0&&d>1){let v=jt.calcCardinalityPosition(r.relation.type1!=="none",e.points,e.points[0]),B=jt.calcCardinalityPosition(r.relation.type2!=="none",e.points,e.points[d-1]);I.debug("cardinality_1_point "+JSON.stringify(v)),I.debug("cardinality_2_point "+JSON.stringify(B)),m=v.x,b=v.y,x=B.x,k=B.y}if(r.title!==void 0){const v=t.append("g").attr("class","classLabel"),B=v.append("text").attr("class","label").attr("x",u).attr("y",f).attr("fill","red").attr("text-anchor","middle").text(r.title);window.label=B;const R=B.node().getBBox();v.insert("rect",":first-child").attr("class","box").attr("x",R.x-i.padding/2).attr("y",R.y-i.padding/2).attr("width",R.width+i.padding).attr("height",R.height+i.padding)}I.info("Rendering relation "+JSON.stringify(r)),r.relationTitle1!==void 0&&r.relationTitle1!=="none"&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",m).attr("y",b).attr("fill","black").attr("font-size","6").text(r.relationTitle1),r.relationTitle2!==void 0&&r.relationTitle2!=="none"&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",x).attr("y",k).attr("fill","black").attr("font-size","6").text(r.relationTitle2),Fd++},cN=function(t,e,r,i){I.debug("Rendering class ",e,r);const n=e.id,s={id:n,label:e.id,width:0,height:0},a=t.append("g").attr("id",i.db.lookUpDomId(n)).attr("class","classGroup");let o;e.link?o=a.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",r.textHeight+r.padding).attr("x",0):o=a.append("text").attr("y",r.textHeight+r.padding).attr("x",0);let l=!0;e.annotations.forEach(function(P){const V=o.append("tspan").text("«"+P+"»");l||V.attr("dy",r.textHeight),l=!1});let h=e.id;e.type!==void 0&&e.type!==""&&(h+="<"+e.type+">");const u=o.append("tspan").text(h).attr("class","title");l||u.attr("dy",r.textHeight);const f=o.node().getBBox().height,d=a.append("line").attr("x1",0).attr("y1",r.padding+f+r.dividerMargin/2).attr("y2",r.padding+f+r.dividerMargin/2),p=a.append("text").attr("x",r.padding).attr("y",f+r.dividerMargin+r.textHeight).attr("fill","white").attr("class","classText");l=!0,e.members.forEach(function(P){Pd(p,P,l,r),l=!1});const m=p.node().getBBox(),b=a.append("line").attr("x1",0).attr("y1",r.padding+f+r.dividerMargin+m.height).attr("y2",r.padding+f+r.dividerMargin+m.height),x=a.append("text").attr("x",r.padding).attr("y",f+2*r.dividerMargin+m.height+r.textHeight).attr("fill","white").attr("class","classText");l=!0,e.methods.forEach(function(P){Pd(x,P,l,r),l=!1});const k=a.node().getBBox();var v=" ";e.cssClasses.length>0&&(v=v+e.cssClasses.join(" "));const R=a.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",k.width+2*r.padding).attr("height",k.height+r.padding+.5*r.dividerMargin).attr("class",v).node().getBBox().width;return o.node().childNodes.forEach(function(P){P.setAttribute("x",(R-P.getBBox().width)/2)}),e.tooltip&&o.insert("title").text(e.tooltip),d.attr("x2",R),b.attr("x2",R),s.width=R,s.height=k.height+r.padding+.5*r.dividerMargin,s},hN=function(t,e,r,i){I.debug("Rendering note ",e,r);const n=e.id,s={id:n,text:e.text,width:0,height:0},a=t.append("g").attr("id",n).attr("class","classGroup");let o=a.append("text").attr("y",r.textHeight+r.padding).attr("x",0);const l=JSON.parse(`"${e.text}"`).split(`
1215
- `);l.forEach(function(d){I.debug(`Adding line: ${d}`),o.append("tspan").text(d).attr("class","title").attr("dy",r.textHeight)});const h=a.node().getBBox(),f=a.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",h.width+2*r.padding).attr("height",h.height+l.length*r.textHeight+r.padding+.5*r.dividerMargin).node().getBBox().width;return o.node().childNodes.forEach(function(d){d.setAttribute("x",(f-d.getBBox().width)/2)}),s.width=f,s.height=h.height+l.length*r.textHeight+r.padding+.5*r.dividerMargin,s},Xl=function(t){const e=/^([#+~-])?(\w+)(~\w+~|\[])?\s+(\w+) *([$*])?$/,r=/^([#+|~-])?(\w+) *\( *(.*)\) *([$*])? *(\w*[[\]|~]*\s*\w*~?)$/;let i=t.match(e),n=t.match(r);return i&&!n?uN(i):n?fN(n):dN(t)},uN=function(t){let e="",r="";try{let i=t[1]?t[1].trim():"",n=t[2]?t[2].trim():"",s=t[3]?an(t[3].trim()):"",a=t[4]?t[4].trim():"",o=t[5]?t[5].trim():"";r=i+n+s+" "+a,e=i0(o)}catch{r=t}return{displayText:r,cssStyle:e}},fN=function(t){let e="",r="";try{let i=t[1]?t[1].trim():"",n=t[2]?t[2].trim():"",s=t[3]?an(t[3].trim()):"",a=t[4]?t[4].trim():"",o=t[5]?" : "+an(t[5]).trim():"";r=i+n+"("+s+")"+o,e=i0(a)}catch{r=t}return{displayText:r,cssStyle:e}},dN=function(t){let e="",r="",i="",n=t.indexOf("("),s=t.indexOf(")");if(n>1&&s>n&&s<=t.length){let a="",o="",l=t.substring(0,1);l.match(/\w/)?o=t.substring(0,n).trim():(l.match(/[#+~-]/)&&(a=l),o=t.substring(1,n).trim());const h=t.substring(n+1,s);t.substring(s+1,1),r=i0(t.substring(s+1,s+2)),e=a+o+"("+an(h.trim())+")",s<t.length&&(i=t.substring(s+2).trim(),i!==""&&(i=" : "+an(i),e+=i))}else e=an(t);return{displayText:e,cssStyle:r}},Pd=function(t,e,r,i){let n=Xl(e);const s=t.append("tspan").attr("x",i.padding).text(n.displayText);n.cssStyle!==""&&s.attr("style",n.cssStyle),r||s.attr("dy",i.textHeight)},i0=function(t){switch(t){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}},Oh={drawClass:cN,drawEdge:lN,drawNote:hN,parseMember:Xl};let tl={};const No=20,sa=function(t){const e=Object.entries(tl).find(r=>r[1].label===t);if(e)return e[0]},pN=function(t){t.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},gN=function(t,e,r,i){const n=G().class;tl={},I.info("Rendering diagram "+t);const s=G().securityLevel;let a;s==="sandbox"&&(a=_t("#i"+e));const o=_t(s==="sandbox"?a.nodes()[0].contentDocument.body:"body"),l=o.select(`[id='${e}']`);pN(l);const h=new Pe({multigraph:!0});h.setGraph({isMultiGraph:!0}),h.setDefaultEdgeLabel(function(){return{}});const u=i.db.getClasses(),f=Object.keys(u);for(const v of f){const B=u[v],R=Oh.drawClass(l,B,n,i);tl[R.id]=R,h.setNode(R.id,R),I.info("Org height: "+R.height)}i.db.getRelations().forEach(function(v){I.info("tjoho"+sa(v.id1)+sa(v.id2)+JSON.stringify(v)),h.setEdge(sa(v.id1),sa(v.id2),{relation:v},v.title||"DEFAULT")}),i.db.getNotes().forEach(function(v){I.debug(`Adding note: ${JSON.stringify(v)}`);const B=Oh.drawNote(l,v,n,i);tl[B.id]=B,h.setNode(B.id,B),v.class&&v.class in u&&h.setEdge(v.id,sa(v.class),{relation:{id1:v.id,id2:v.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),$s(h),h.nodes().forEach(function(v){v!==void 0&&h.node(v)!==void 0&&(I.debug("Node "+v+": "+JSON.stringify(h.node(v))),o.select("#"+(i.db.lookUpDomId(v)||v)).attr("transform","translate("+(h.node(v).x-h.node(v).width/2)+","+(h.node(v).y-h.node(v).height/2)+" )"))}),h.edges().forEach(function(v){v!==void 0&&h.edge(v)!==void 0&&(I.debug("Edge "+v.v+" -> "+v.w+": "+JSON.stringify(h.edge(v))),Oh.drawEdge(l,h.edge(v),h.edge(v).relation,n,i))});const m=l.node().getBBox(),b=m.width+No*2,x=m.height+No*2;ni(l,x,b,n.useMaxWidth);const k=`${m.x-No} ${m.y-No} ${b} ${x}`;I.debug(`viewBox ${k}`),l.attr("viewBox",k)},yN={draw:gN},mN=(t,e,r,i)=>{e.forEach(n=>{SN[n](t,r,i)})},bN=(t,e,r)=>{I.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",e+"-extensionStart").attr("class","marker extension "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},_N=(t,e)=>{t.append("defs").append("marker").attr("id",e+"-compositionStart").attr("class","marker composition "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},xN=(t,e)=>{t.append("defs").append("marker").attr("id",e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},vN=(t,e)=>{t.append("defs").append("marker").attr("id",e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},kN=(t,e)=>{t.append("defs").append("marker").attr("id",e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","white").attr("cx",6).attr("cy",7).attr("r",6)},wN=(t,e)=>{t.append("marker").attr("id",e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 12 20").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},TN=(t,e)=>{t.append("marker").attr("id",e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},EN=(t,e)=>{t.append("marker").attr("id",e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},CN=(t,e)=>{t.append("defs").append("marker").attr("id",e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},SN={extension:bN,composition:_N,aggregation:xN,dependency:vN,lollipop:kN,point:wN,circle:TN,cross:EN,barb:CN},AN=mN;function LN(t,e){e&&t.attr("style",e)}function BN(t){const e=_t(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),i=t.label,n=t.isNode?"nodeLabel":"edgeLabel";return r.html('<span class="'+n+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+i+"</span>"),LN(r,t.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}const DN=(t,e,r,i)=>{let n=t||"";if(typeof n=="object"&&(n=n[0]),Ke(G().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"<br />"),I.info("vertexText"+n);const s={isNode:i,label:L0(n).replace(/fa[blrs]?:fa-[\w-]+/g,o=>`<i class='${o.replace(":"," ")}'></i>`),labelStyle:e.replace("fill:","color:")};return BN(s)}else{const s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",e.replace("color:","fill:"));let a=[];typeof n=="string"?a=n.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(n)?a=n:a=[];for(const o of a){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=o.trim(),s.appendChild(l)}return s}},br=DN,or=(t,e,r,i)=>{let n;r?n=r:n="node default";const s=t.insert("g").attr("class",n).attr("id",e.domId||e.id),a=s.insert("g").attr("class","label").attr("style",e.labelStyle);let o;e.labelText===void 0?o="":o=typeof e.labelText=="string"?e.labelText:e.labelText[0];const l=a.node().appendChild(br(Ur(L0(o),G()),e.labelStyle,!1,i));let h=l.getBBox();if(Ke(G().flowchart.htmlLabels)){const f=l.children[0],d=_t(l);h=f.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)}const u=e.padding/2;return a.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),{shapeSvg:s,bbox:h,halfPadding:u,label:a}},Ie=(t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height};function Ji(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}let ce={},Xr={},Xy={};const IN=()=>{Xr={},Xy={},ce={}},Kl=(t,e)=>(I.trace("In isDecendant",e," ",t," = ",Xr[e].includes(t)),!!Xr[e].includes(t)),MN=(t,e)=>(I.info("Decendants of ",e," is ",Xr[e]),I.info("Edge is ",t),t.v===e||t.w===e?!1:Xr[e]?Xr[e].includes(t.v)||Kl(t.v,e)||Kl(t.w,e)||Xr[e].includes(t.w):(I.debug("Tilt, ",e,",not in decendants"),!1)),Ky=(t,e,r,i)=>{I.warn("Copying children of ",t,"root",i,"data",e.node(t),i);const n=e.children(t)||[];t!==i&&n.push(t),I.warn("Copying (nodes) clusterId",t,"nodes",n),n.forEach(s=>{if(e.children(s).length>0)Ky(s,e,r,i);else{const a=e.node(s);I.info("cp ",s," to ",i," with parent ",t),r.setNode(s,a),i!==e.parent(s)&&(I.warn("Setting parent",s,e.parent(s)),r.setParent(s,e.parent(s))),t!==i&&s!==t?(I.debug("Setting parent",s,t),r.setParent(s,t)):(I.info("In copy ",t,"root",i,"data",e.node(t),i),I.debug("Not Setting parent for node=",s,"cluster!==rootId",t!==i,"node!==clusterId",s!==t));const o=e.edges(s);I.debug("Copying Edges",o),o.forEach(l=>{I.info("Edge",l);const h=e.edge(l.v,l.w,l.name);I.info("Edge data",h,i);try{MN(l,i)?(I.info("Copying as ",l.v,l.w,h,l.name),r.setEdge(l.v,l.w,h,l.name),I.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):I.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",i," clusterId:",t)}catch(u){I.error(u)}})}I.debug("Removing node",s),e.removeNode(s)})},Zy=(t,e)=>{const r=e.children(t);let i=[...r];for(const n of r)Xy[n]=t,i=[...i,...Zy(n,e)];return i},Xa=(t,e)=>{I.trace("Searching",t);const r=e.children(t);if(I.trace("Searching children of id ",t,r),r.length<1)return I.trace("This is a valid node",t),t;for(const i of r){const n=Xa(i,e);if(n)return I.trace("Found replacement for",t," => ",n),n}},Ro=t=>!ce[t]||!ce[t].externalConnections?t:ce[t]?ce[t].id:t,NN=(t,e)=>{if(!t||e>10){I.debug("Opting out, no graph ");return}else I.debug("Opting in, graph ");t.nodes().forEach(function(r){t.children(r).length>0&&(I.warn("Cluster identified",r," Replacement id in edges: ",Xa(r,t)),Xr[r]=Zy(r,t),ce[r]={id:Xa(r,t),clusterData:t.node(r)})}),t.nodes().forEach(function(r){const i=t.children(r),n=t.edges();i.length>0?(I.debug("Cluster identified",r,Xr),n.forEach(s=>{if(s.v!==r&&s.w!==r){const a=Kl(s.v,r),o=Kl(s.w,r);a^o&&(I.warn("Edge: ",s," leaves cluster ",r),I.warn("Decendants of XXX ",r,": ",Xr[r]),ce[r].externalConnections=!0)}})):I.debug("Not a cluster ",r,Xr)}),t.edges().forEach(function(r){const i=t.edge(r);I.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),I.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(t.edge(r)));let n=r.v,s=r.w;if(I.warn("Fix XXX",ce,"ids:",r.v,r.w,"Translating: ",ce[r.v]," --- ",ce[r.w]),ce[r.v]&&ce[r.w]&&ce[r.v]===ce[r.w]){I.warn("Fixing and trixing link to self - removing XXX",r.v,r.w,r.name),I.warn("Fixing and trixing - removing XXX",r.v,r.w,r.name),n=Ro(r.v),s=Ro(r.w),t.removeEdge(r.v,r.w,r.name);const a=r.w+"---"+r.v;t.setNode(a,{domId:a,id:a,labelStyle:"",labelText:i.label,padding:0,shape:"labelRect",style:""});const o=JSON.parse(JSON.stringify(i)),l=JSON.parse(JSON.stringify(i));o.label="",o.arrowTypeEnd="none",l.label="",o.fromCluster=r.v,l.toCluster=r.v,t.setEdge(n,a,o,r.name+"-cyclic-special"),t.setEdge(a,s,l,r.name+"-cyclic-special")}else(ce[r.v]||ce[r.w])&&(I.warn("Fixing and trixing - removing XXX",r.v,r.w,r.name),n=Ro(r.v),s=Ro(r.w),t.removeEdge(r.v,r.w,r.name),n!==r.v&&(i.fromCluster=r.v),s!==r.w&&(i.toCluster=r.w),I.warn("Fix Replacing with XXX",n,s,r.name),t.setEdge(n,s,i,r.name))}),I.warn("Adjusted Graph",Yi(t)),Qy(t,0),I.trace(ce)},Qy=(t,e)=>{if(I.warn("extractor - ",e,Yi(t),t.children("D")),e>10){I.error("Bailing out");return}let r=t.nodes(),i=!1;for(const n of r){const s=t.children(n);i=i||s.length>0}if(!i){I.debug("Done, no node has children",t.nodes());return}I.debug("Nodes = ",r,e);for(const n of r)if(I.debug("Extracting node",n,ce,ce[n]&&!ce[n].externalConnections,!t.parent(n),t.node(n),t.children("D")," Depth ",e),!ce[n])I.debug("Not a cluster",n,e);else if(!ce[n].externalConnections&&t.children(n)&&t.children(n).length>0){I.warn("Cluster without external connections, without a parent and with children",n,e);let a=t.graph().rankdir==="TB"?"LR":"TB";ce[n]&&ce[n].clusterData&&ce[n].clusterData.dir&&(a=ce[n].clusterData.dir,I.warn("Fixing dir",ce[n].clusterData.dir,a));const o=new Pe({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});I.warn("Old graph before copy",Yi(t)),Ky(n,t,o,n),t.setNode(n,{clusterNode:!0,id:n,clusterData:ce[n].clusterData,labelText:ce[n].labelText,graph:o}),I.warn("New graph after copy node: (",n,")",Yi(o)),I.debug("Old graph after copy",Yi(t))}else I.warn("Cluster ** ",n," **not meeting the criteria !externalConnections:",!ce[n].externalConnections," no parent: ",!t.parent(n)," children ",t.children(n)&&t.children(n).length>0,t.children("D"),e),I.debug(ce);r=t.nodes(),I.warn("New list of nodes",r);for(const n of r){const s=t.node(n);I.warn(" Now next level",n,s),s.clusterNode&&Qy(s.graph,e+1)}},Jy=(t,e)=>{if(e.length===0)return[];let r=Object.assign(e);return e.forEach(i=>{const n=t.children(i),s=Jy(t,n);r=[...r,...s]}),r},RN=t=>Jy(t,t.children());function ON(t,e){return t.intersect(e)}function tm(t,e,r,i){var n=t.x,s=t.y,a=n-i.x,o=s-i.y,l=Math.sqrt(e*e*o*o+r*r*a*a),h=Math.abs(e*r*a/l);i.x<n&&(h=-h);var u=Math.abs(e*r*o/l);return i.y<s&&(u=-u),{x:n+h,y:s+u}}function FN(t,e,r){return tm(t,e,e,r)}function PN(t,e,r,i){var n,s,a,o,l,h,u,f,d,p,m,b,x,k,v;if(n=e.y-t.y,a=t.x-e.x,l=e.x*t.y-t.x*e.y,d=n*r.x+a*r.y+l,p=n*i.x+a*i.y+l,!(d!==0&&p!==0&&Vd(d,p))&&(s=i.y-r.y,o=r.x-i.x,h=i.x*r.y-r.x*i.y,u=s*t.x+o*t.y+h,f=s*e.x+o*e.y+h,!(u!==0&&f!==0&&Vd(u,f))&&(m=n*o-s*a,m!==0)))return b=Math.abs(m/2),x=a*h-o*l,k=x<0?(x-b)/m:(x+b)/m,x=s*l-n*h,v=x<0?(x-b)/m:(x+b)/m,{x:k,y:v}}function Vd(t,e){return t*e>0}function VN(t,e,r){var i=t.x,n=t.y,s=[],a=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(m){a=Math.min(a,m.x),o=Math.min(o,m.y)}):(a=Math.min(a,e.x),o=Math.min(o,e.y));for(var l=i-t.width/2-a,h=n-t.height/2-o,u=0;u<e.length;u++){var f=e[u],d=e[u<e.length-1?u+1:0],p=PN(t,r,{x:l+f.x,y:h+f.y},{x:l+d.x,y:h+d.y});p&&s.push(p)}return s.length?(s.length>1&&s.sort(function(m,b){var x=m.x-r.x,k=m.y-r.y,v=Math.sqrt(x*x+k*k),B=b.x-r.x,R=b.y-r.y,P=Math.sqrt(B*B+R*R);return v<P?-1:v===P?0:1}),s[0]):t}const YN=(t,e)=>{var r=t.x,i=t.y,n=e.x-r,s=e.y-i,a=t.width/2,o=t.height/2,l,h;return Math.abs(s)*a>Math.abs(n)*o?(s<0&&(o=-o),l=s===0?0:o*n/s,h=o):(n<0&&(a=-a),l=a,h=n===0?0:a*s/n),{x:r+l,y:i+h}},uo=YN,Ee={node:ON,circle:FN,ellipse:tm,polygon:VN,rect:uo},zN=(t,e)=>{const{shapeSvg:r,bbox:i,halfPadding:n}=or(t,e,"node "+e.classes,!0);I.info("Classes = ",e.classes);const s=r.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-n).attr("y",-i.height/2-n).attr("width",i.width+e.padding).attr("height",i.height+e.padding),Ie(e,s),e.intersect=function(a){return Ee.rect(e,a)},r},UN=zN,Yd=(t,e)=>{const{shapeSvg:r,bbox:i}=or(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=n+s,o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];I.info("Question main (Circle)");const l=Ji(r,a,a,o);return l.attr("style",e.style),Ie(e,l),e.intersect=function(h){return I.warn("Intersect called"),Ee.polygon(e,o,h)},r},WN=(t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=28,n=[{x:0,y:i/2},{x:i/2,y:0},{x:0,y:-i/2},{x:-i/2,y:0}];return r.insert("polygon",":first-child").attr("points",n.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(a){return Ee.circle(e,14,a)},r},HN=(t,e)=>{const{shapeSvg:r,bbox:i}=or(t,e,void 0,!0),n=4,s=i.height+e.padding,a=s/n,o=i.width+2*a+e.padding,l=[{x:a,y:0},{x:o-a,y:0},{x:o,y:-s/2},{x:o-a,y:-s},{x:a,y:-s},{x:0,y:-s/2}],h=Ji(r,o,s,l);return h.attr("style",e.style),Ie(e,h),e.intersect=function(u){return Ee.polygon(e,l,u)},r},qN=(t,e)=>{const{shapeSvg:r,bbox:i}=or(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=[{x:-s/2,y:0},{x:n,y:0},{x:n,y:-s},{x:-s/2,y:-s},{x:0,y:-s/2}];return Ji(r,n,s,a).attr("style",e.style),e.width=n+s,e.height=s,e.intersect=function(l){return Ee.polygon(e,a,l)},r},GN=(t,e)=>{const{shapeSvg:r,bbox:i}=or(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=[{x:-2*s/6,y:0},{x:n-s/6,y:0},{x:n+2*s/6,y:-s},{x:s/6,y:-s}],o=Ji(r,n,s,a);return o.attr("style",e.style),Ie(e,o),e.intersect=function(l){return Ee.polygon(e,a,l)},r},$N=(t,e)=>{const{shapeSvg:r,bbox:i}=or(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=[{x:2*s/6,y:0},{x:n+s/6,y:0},{x:n-2*s/6,y:-s},{x:-s/6,y:-s}],o=Ji(r,n,s,a);return o.attr("style",e.style),Ie(e,o),e.intersect=function(l){return Ee.polygon(e,a,l)},r},jN=(t,e)=>{const{shapeSvg:r,bbox:i}=or(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=[{x:-2*s/6,y:0},{x:n+2*s/6,y:0},{x:n-s/6,y:-s},{x:s/6,y:-s}],o=Ji(r,n,s,a);return o.attr("style",e.style),Ie(e,o),e.intersect=function(l){return Ee.polygon(e,a,l)},r},XN=(t,e)=>{const{shapeSvg:r,bbox:i}=or(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=[{x:s/6,y:0},{x:n-s/6,y:0},{x:n+2*s/6,y:-s},{x:-2*s/6,y:-s}],o=Ji(r,n,s,a);return o.attr("style",e.style),Ie(e,o),e.intersect=function(l){return Ee.polygon(e,a,l)},r},KN=(t,e)=>{const{shapeSvg:r,bbox:i}=or(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=[{x:0,y:0},{x:n+s/2,y:0},{x:n,y:-s/2},{x:n+s/2,y:-s},{x:0,y:-s}],o=Ji(r,n,s,a);return o.attr("style",e.style),Ie(e,o),e.intersect=function(l){return Ee.polygon(e,a,l)},r},ZN=(t,e)=>{const{shapeSvg:r,bbox:i}=or(t,e,void 0,!0),n=i.width+e.padding,s=n/2,a=s/(2.5+n/50),o=i.height+a+e.padding,l="M 0,"+a+" a "+s+","+a+" 0,0,0 "+n+" 0 a "+s+","+a+" 0,0,0 "+-n+" 0 l 0,"+o+" a "+s+","+a+" 0,0,0 "+n+" 0 l 0,"+-o,h=r.attr("label-offset-y",a).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-n/2+","+-(o/2+a)+")");return Ie(e,h),e.intersect=function(u){const f=Ee.rect(e,u),d=f.x-e.x;if(s!=0&&(Math.abs(d)<e.width/2||Math.abs(d)==e.width/2&&Math.abs(f.y-e.y)>e.height/2-a)){let p=a*a*(1-d*d/(s*s));p!=0&&(p=Math.sqrt(p)),p=a-p,u.y-e.y>0&&(p=-p),f.y+=p}return f},r},QN=(t,e)=>{const{shapeSvg:r,bbox:i,halfPadding:n}=or(t,e,"node "+e.classes,!0);I.trace("Classes = ",e.classes);const s=r.insert("rect",":first-child"),a=i.width+e.padding,o=i.height+e.padding;if(s.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-n).attr("y",-i.height/2-n).attr("width",a).attr("height",o),e.props){const l=new Set(Object.keys(e.props));e.props.borders&&(em(s,e.props.borders,a,o),l.delete("borders")),l.forEach(h=>{I.warn(`Unknown node property ${h}`)})}return Ie(e,s),e.intersect=function(l){return Ee.rect(e,l)},r},JN=(t,e)=>{const{shapeSvg:r}=or(t,e,"label",!0);I.trace("Classes = ",e.classes);const i=r.insert("rect",":first-child"),n=0,s=0;if(i.attr("width",n).attr("height",s),r.attr("class","label edgeLabel"),e.props){const a=new Set(Object.keys(e.props));e.props.borders&&(em(i,e.props.borders,n,s),a.delete("borders")),a.forEach(o=>{I.warn(`Unknown node property ${o}`)})}return Ie(e,i),e.intersect=function(a){return Ee.rect(e,a)},r};function em(t,e,r,i){const n=[],s=o=>{n.push(o,0)},a=o=>{n.push(0,o)};e.includes("t")?(I.debug("add top border"),s(r)):a(r),e.includes("r")?(I.debug("add right border"),s(i)):a(i),e.includes("b")?(I.debug("add bottom border"),s(r)):a(r),e.includes("l")?(I.debug("add left border"),s(i)):a(i),t.attr("stroke-dasharray",n.join(" "))}const tR=(t,e)=>{let r;e.classes?r="node "+e.classes:r="node default";const i=t.insert("g").attr("class",r).attr("id",e.domId||e.id),n=i.insert("rect",":first-child"),s=i.insert("line"),a=i.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText;let l="";typeof o=="object"?l=o[0]:l=o,I.info("Label text abc79",l,o,typeof o=="object");const h=a.node().appendChild(br(l,e.labelStyle,!0,!0));let u={width:0,height:0};if(Ke(G().flowchart.htmlLabels)){const b=h.children[0],x=_t(h);u=b.getBoundingClientRect(),x.attr("width",u.width),x.attr("height",u.height)}I.info("Text 2",o);const f=o.slice(1,o.length);let d=h.getBBox();const p=a.node().appendChild(br(f.join?f.join("<br/>"):f,e.labelStyle,!0,!0));if(Ke(G().flowchart.htmlLabels)){const b=p.children[0],x=_t(p);u=b.getBoundingClientRect(),x.attr("width",u.width),x.attr("height",u.height)}const m=e.padding/2;return _t(p).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+m+5)+")"),_t(h).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=a.node().getBBox(),a.attr("transform","translate("+-u.width/2+", "+(-u.height/2-m+3)+")"),n.attr("class","outer title-state").attr("x",-u.width/2-m).attr("y",-u.height/2-m).attr("width",u.width+e.padding).attr("height",u.height+e.padding),s.attr("class","divider").attr("x1",-u.width/2-m).attr("x2",u.width/2+m).attr("y1",-u.height/2-m+d.height+m).attr("y2",-u.height/2-m+d.height+m),Ie(e,n),e.intersect=function(b){return Ee.rect(e,b)},i},eR=(t,e)=>{const{shapeSvg:r,bbox:i}=or(t,e,void 0,!0),n=i.height+e.padding,s=i.width+n/4+e.padding,a=r.insert("rect",":first-child").attr("style",e.style).attr("rx",n/2).attr("ry",n/2).attr("x",-s/2).attr("y",-n/2).attr("width",s).attr("height",n);return Ie(e,a),e.intersect=function(o){return Ee.rect(e,o)},r},rR=(t,e)=>{const{shapeSvg:r,bbox:i,halfPadding:n}=or(t,e,void 0,!0),s=r.insert("circle",":first-child");return s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+n).attr("width",i.width+e.padding).attr("height",i.height+e.padding),I.info("Circle main"),Ie(e,s),e.intersect=function(a){return I.info("Circle intersect",e,i.width/2+n,a),Ee.circle(e,i.width/2+n,a)},r},iR=(t,e)=>{const{shapeSvg:r,bbox:i,halfPadding:n}=or(t,e,void 0,!0),s=5,a=r.insert("g",":first-child"),o=a.insert("circle"),l=a.insert("circle");return o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+n+s).attr("width",i.width+e.padding+s*2).attr("height",i.height+e.padding+s*2),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+n).attr("width",i.width+e.padding).attr("height",i.height+e.padding),I.info("DoubleCircle main"),Ie(e,o),e.intersect=function(h){return I.info("DoubleCircle intersect",e,i.width/2+n+s,h),Ee.circle(e,i.width/2+n+s,h)},r},nR=(t,e)=>{const{shapeSvg:r,bbox:i}=or(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=[{x:0,y:0},{x:n,y:0},{x:n,y:-s},{x:0,y:-s},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-s},{x:-8,y:-s},{x:-8,y:0}],o=Ji(r,n,s,a);return o.attr("style",e.style),Ie(e,o),e.intersect=function(l){return Ee.polygon(e,a,l)},r},sR=(t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Ie(e,i),e.intersect=function(n){return Ee.circle(e,7,n)},r},zd=(t,e,r)=>{const i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let n=70,s=10;r==="LR"&&(n=10,s=70);const a=i.append("rect").attr("x",-1*n/2).attr("y",-1*s/2).attr("width",n).attr("height",s).attr("class","fork-join");return Ie(e,a),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(o){return Ee.rect(e,o)},i},aR=(t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=r.insert("circle",":first-child"),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),i.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),Ie(e,n),e.intersect=function(s){return Ee.circle(e,7,s)},r},oR=(t,e)=>{const r=e.padding/2,i=4,n=8;let s;e.classes?s="node "+e.classes:s="node default";const a=t.insert("g").attr("class",s).attr("id",e.domId||e.id),o=a.insert("rect",":first-child"),l=a.insert("line"),h=a.insert("line");let u=0,f=i;const d=a.insert("g").attr("class","label");let p=0;const m=e.classData.annotations&&e.classData.annotations[0],b=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",x=d.node().appendChild(br(b,e.labelStyle,!0,!0));let k=x.getBBox();if(Ke(G().flowchart.htmlLabels)){const F=x.children[0],C=_t(x);k=F.getBoundingClientRect(),C.attr("width",k.width),C.attr("height",k.height)}e.classData.annotations[0]&&(f+=k.height+i,u+=k.width);let v=e.classData.id;e.classData.type!==void 0&&e.classData.type!==""&&(G().flowchart.htmlLabels?v+="&lt;"+e.classData.type+"&gt;":v+="<"+e.classData.type+">");const B=d.node().appendChild(br(v,e.labelStyle,!0,!0));_t(B).attr("class","classTitle");let R=B.getBBox();if(Ke(G().flowchart.htmlLabels)){const F=B.children[0],C=_t(B);R=F.getBoundingClientRect(),C.attr("width",R.width),C.attr("height",R.height)}f+=R.height+i,R.width>u&&(u=R.width);const P=[];e.classData.members.forEach(F=>{const C=Xl(F);let S=C.displayText;G().flowchart.htmlLabels&&(S=S.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const E=d.node().appendChild(br(S,C.cssStyle?C.cssStyle:e.labelStyle,!0,!0));let _=E.getBBox();if(Ke(G().flowchart.htmlLabels)){const w=E.children[0],g=_t(E);_=w.getBoundingClientRect(),g.attr("width",_.width),g.attr("height",_.height)}_.width>u&&(u=_.width),f+=_.height+i,P.push(E)}),f+=n;const V=[];if(e.classData.methods.forEach(F=>{const C=Xl(F);let S=C.displayText;G().flowchart.htmlLabels&&(S=S.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const E=d.node().appendChild(br(S,C.cssStyle?C.cssStyle:e.labelStyle,!0,!0));let _=E.getBBox();if(Ke(G().flowchart.htmlLabels)){const w=E.children[0],g=_t(E);_=w.getBoundingClientRect(),g.attr("width",_.width),g.attr("height",_.height)}_.width>u&&(u=_.width),f+=_.height+i,V.push(E)}),f+=n,m){let F=(u-k.width)/2;_t(x).attr("transform","translate( "+(-1*u/2+F)+", "+-1*f/2+")"),p=k.height+i}let O=(u-R.width)/2;return _t(B).attr("transform","translate( "+(-1*u/2+O)+", "+(-1*f/2+p)+")"),p+=R.height+i,l.attr("class","divider").attr("x1",-u/2-r).attr("x2",u/2+r).attr("y1",-f/2-r+n+p).attr("y2",-f/2-r+n+p),p+=n,P.forEach(F=>{_t(F).attr("transform","translate( "+-u/2+", "+(-1*f/2+p+n/2)+")"),p+=R.height+i}),p+=n,h.attr("class","divider").attr("x1",-u/2-r).attr("x2",u/2+r).attr("y1",-f/2-r+n+p).attr("y2",-f/2-r+n+p),p+=n,V.forEach(F=>{_t(F).attr("transform","translate( "+-u/2+", "+(-1*f/2+p)+")"),p+=R.height+i}),o.attr("class","outer title-state").attr("x",-u/2-r).attr("y",-(f/2)-r).attr("width",u+e.padding).attr("height",f+e.padding),Ie(e,o),e.intersect=function(F){return Ee.rect(e,F)},a},Ud={rhombus:Yd,question:Yd,rect:QN,labelRect:JN,rectWithTitle:tR,choice:WN,circle:rR,doublecircle:iR,stadium:eR,hexagon:HN,rect_left_inv_arrow:qN,lean_right:GN,lean_left:$N,trapezoid:jN,inv_trapezoid:XN,rect_right_inv_arrow:KN,cylinder:ZN,start:sR,end:aR,note:UN,subroutine:nR,fork:zd,join:zd,class_box:oR};let _s={};const lR=(t,e,r)=>{let i,n;if(e.link){let s;G().securityLevel==="sandbox"?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s),n=Ud[e.shape](i,e,r)}else n=Ud[e.shape](t,e,r),i=n;return e.tooltip&&n.attr("title",e.tooltip),e.class&&n.attr("class","node default "+e.class),_s[e.id]=i,e.haveCallback&&_s[e.id].attr("class",_s[e.id].attr("class")+" clickable"),i},cR=(t,e)=>{_s[e.id]=t},hR=()=>{_s={}},Wd=t=>{const e=_s[t.id];I.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=8,i=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+i-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),i},uR=(t,e)=>{I.trace("Creating subgraph rect for ",e.id,e);const r=t.insert("g").attr("class","cluster"+(e.class?" "+e.class:"")).attr("id",e.id),i=r.insert("rect",":first-child"),n=r.insert("g").attr("class","cluster-label"),s=n.node().appendChild(br(e.labelText,e.labelStyle,void 0,!0));let a=s.getBBox();if(Ke(G().flowchart.htmlLabels)){const f=s.children[0],d=_t(s);a=f.getBoundingClientRect(),d.attr("width",a.width),d.attr("height",a.height)}const o=0*e.padding,l=o/2,h=e.width<=a.width+o?a.width+o:e.width;e.width<=a.width+o?e.diff=(a.width-e.width)/2-e.padding/2:e.diff=-e.padding/2,I.trace("Data ",e,JSON.stringify(e)),i.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-h/2).attr("y",e.y-e.height/2-l).attr("width",h).attr("height",e.height+o),n.attr("transform","translate("+(e.x-a.width/2)+", "+(e.y-e.height/2)+")");const u=i.node().getBBox();return e.width=u.width,e.height=u.height,e.intersect=function(f){return uo(e,f)},r},fR=(t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.id),i=r.insert("rect",":first-child"),n=0*e.padding,s=n/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-s).attr("y",e.y-e.height/2-s).attr("width",e.width+n).attr("height",e.height+n).attr("fill","none");const a=i.node().getBBox();return e.width=a.width,e.height=a.height,e.intersect=function(o){return uo(e,o)},r},dR=(t,e)=>{const r=t.insert("g").attr("class",e.classes).attr("id",e.id),i=r.insert("rect",":first-child"),n=r.insert("g").attr("class","cluster-label"),s=r.append("rect"),a=n.node().appendChild(br(e.labelText,e.labelStyle,void 0,!0));let o=a.getBBox();if(Ke(G().flowchart.htmlLabels)){const d=a.children[0],p=_t(a);o=d.getBoundingClientRect(),p.attr("width",o.width),p.attr("height",o.height)}o=a.getBBox();const l=0*e.padding,h=l/2,u=e.width<=o.width+e.padding?o.width+e.padding:e.width;e.width<=o.width+e.padding?e.diff=(o.width+e.padding*0-e.width)/2:e.diff=-e.padding/2,i.attr("class","outer").attr("x",e.x-u/2-h).attr("y",e.y-e.height/2-h).attr("width",u+l).attr("height",e.height+l),s.attr("class","inner").attr("x",e.x-u/2-h).attr("y",e.y-e.height/2-h+o.height-1).attr("width",u+l).attr("height",e.height+l-o.height-3),n.attr("transform","translate("+(e.x-o.width/2)+", "+(e.y-e.height/2-e.padding/3+(Ke(G().flowchart.htmlLabels)?5:3))+")");const f=i.node().getBBox();return e.height=f.height,e.intersect=function(d){return uo(e,d)},r},pR=(t,e)=>{const r=t.insert("g").attr("class",e.classes).attr("id",e.id),i=r.insert("rect",":first-child"),n=0*e.padding,s=n/2;i.attr("class","divider").attr("x",e.x-e.width/2-s).attr("y",e.y-e.height/2).attr("width",e.width+n).attr("height",e.height+n);const a=i.node().getBBox();return e.width=a.width,e.height=a.height,e.diff=-e.padding/2,e.intersect=function(o){return uo(e,o)},r},gR={rect:uR,roundedWithTitle:dR,noteGroup:fR,divider:pR};let rm={};const yR=(t,e)=>{I.trace("Inserting cluster");const r=e.shape||"rect";rm[e.id]=gR[r](t,e)},mR=()=>{rm={}};let Zl={},Je={};const bR=()=>{Zl={},Je={}},_R=(t,e)=>{const r=br(e.label,e.labelStyle),i=t.insert("g").attr("class","edgeLabel"),n=i.insert("g").attr("class","label");n.node().appendChild(r);let s=r.getBBox();if(Ke(G().flowchart.htmlLabels)){const o=r.children[0],l=_t(r);s=o.getBoundingClientRect(),l.attr("width",s.width),l.attr("height",s.height)}n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),Zl[e.id]=i,e.width=s.width,e.height=s.height;let a;if(e.startLabelLeft){const o=br(e.startLabelLeft,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");a=h.node().appendChild(o);const u=o.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),Je[e.id]||(Je[e.id]={}),Je[e.id].startLeft=l,Oo(a,e.startLabelLeft)}if(e.startLabelRight){const o=br(e.startLabelRight,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");a=l.node().appendChild(o),h.node().appendChild(o);const u=o.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),Je[e.id]||(Je[e.id]={}),Je[e.id].startRight=l,Oo(a,e.startLabelRight)}if(e.endLabelLeft){const o=br(e.endLabelLeft,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");a=h.node().appendChild(o);const u=o.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),l.node().appendChild(o),Je[e.id]||(Je[e.id]={}),Je[e.id].endLeft=l,Oo(a,e.endLabelLeft)}if(e.endLabelRight){const o=br(e.endLabelRight,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");a=h.node().appendChild(o);const u=o.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),l.node().appendChild(o),Je[e.id]||(Je[e.id]={}),Je[e.id].endRight=l,Oo(a,e.endLabelRight)}return r};function Oo(t,e){G().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}const xR=(t,e)=>{I.info("Moving label abc78 ",t.id,t.label,Zl[t.id]);let r=e.updatedPath?e.updatedPath:e.originalPath;if(t.label){const i=Zl[t.id];let n=t.x,s=t.y;if(r){const a=jt.calcLabelPosition(r);I.info("Moving label "+t.label+" from (",n,",",s,") to (",a.x,",",a.y,") abc78"),e.updatedPath&&(n=a.x,s=a.y)}i.attr("transform","translate("+n+", "+s+")")}if(t.startLabelLeft){const i=Je[t.id].startLeft;let n=t.x,s=t.y;if(r){const a=jt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);n=a.x,s=a.y}i.attr("transform","translate("+n+", "+s+")")}if(t.startLabelRight){const i=Je[t.id].startRight;let n=t.x,s=t.y;if(r){const a=jt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);n=a.x,s=a.y}i.attr("transform","translate("+n+", "+s+")")}if(t.endLabelLeft){const i=Je[t.id].endLeft;let n=t.x,s=t.y;if(r){const a=jt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);n=a.x,s=a.y}i.attr("transform","translate("+n+", "+s+")")}if(t.endLabelRight){const i=Je[t.id].endRight;let n=t.x,s=t.y;if(r){const a=jt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);n=a.x,s=a.y}i.attr("transform","translate("+n+", "+s+")")}},vR=(t,e)=>{const r=t.x,i=t.y,n=Math.abs(e.x-r),s=Math.abs(e.y-i),a=t.width/2,o=t.height/2;return n>=a||s>=o},kR=(t,e,r)=>{I.warn(`intersection calc abc89:
1214
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var M=this.next();return M||this.lex()},begin:function(M){this.conditionStack.push(M)},popState:function(){var M=this.conditionStack.length-1;return M>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(M){return M=this.conditionStack.length-1-Math.abs(M||0),M>=0?this.conditionStack[M]:"INITIAL"},pushState:function(M){this.begin(M)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(M,q,L,st){switch(L){case 0:return this.begin("open_directive"),19;case 1:return 8;case 2:return 9;case 3:return 10;case 4:return 11;case 5:return this.begin("type_directive"),20;case 6:return this.popState(),this.begin("arg_directive"),17;case 7:return this.popState(),this.popState(),22;case 8:return 21;case 9:break;case 10:break;case 11:return this.begin("acc_title"),39;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),41;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:return 16;case 19:break;case 20:return 23;case 21:return 23;case 22:return this.begin("struct"),46;case 23:return"EDGE_STATE";case 24:return"EOF_IN_STRUCT";case 25:return"OPEN_IN_STRUCT";case 26:return this.popState(),48;case 27:break;case 28:return"MEMBER";case 29:return 44;case 30:return 74;case 31:return 67;case 32:return 68;case 33:return 70;case 34:return 55;case 35:return 57;case 36:return 49;case 37:return 50;case 38:this.begin("generic");break;case 39:this.popState();break;case 40:return"GENERICTYPE";case 41:this.begin("string");break;case 42:this.popState();break;case 43:return"STR";case 44:this.begin("bqstring");break;case 45:this.popState();break;case 46:return"BQUOTE_STR";case 47:this.begin("href");break;case 48:this.popState();break;case 49:return 73;case 50:this.begin("callback_name");break;case 51:this.popState();break;case 52:this.popState(),this.begin("callback_args");break;case 53:return 71;case 54:this.popState();break;case 55:return 72;case 56:return 69;case 57:return 69;case 58:return 69;case 59:return 69;case 60:return 61;case 61:return 61;case 62:return 63;case 63:return 63;case 64:return 62;case 65:return 60;case 66:return 64;case 67:return 65;case 68:return 66;case 69:return 32;case 70:return 45;case 71:return 86;case 72:return"DOT";case 73:return"PLUS";case 74:return 83;case 75:return"EQUALS";case 76:return"EQUALS";case 77:return 90;case 78:return"PUNCTUATION";case 79:return 89;case 80:return 88;case 81:return 85;case 82:return 25}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[{])/,/^(?:\[\*\])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[`])/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},callback_args:{rules:[54,55],inclusive:!1},callback_name:{rules:[51,52,53],inclusive:!1},href:{rules:[48,49],inclusive:!1},struct:{rules:[23,24,25,26,27,28],inclusive:!1},generic:{rules:[39,40],inclusive:!1},bqstring:{rules:[45,46],inclusive:!1},string:{rules:[42,43],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,23,29,30,31,32,33,34,35,36,37,38,41,44,47,50,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82],inclusive:!0}}};return z}();$.lexer=j;function W(){this.yy={}}return W.prototype=$,$.Parser=W,new W}();Bu.parser=Bu;const Od=Bu,YM=(t,e)=>{var r;return((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:t.match(/^\s*classDiagram/)!==null},zM=(t,e)=>{var r;return t.match(/^\s*classDiagram/)!==null&&((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:t.match(/^\s*classDiagram-v2/)!==null},e0="classid-";let r0=[],De={},jl=[],Fd=0,$a=[];const ka=t=>Xt.sanitizeText(t,G()),UM=function(t,e,r){xe.parseDirective(this,t,e,r)},ja=function(t){let e="",r=t;if(t.indexOf("~")>0){let i=t.split("~");r=i[0],e=Xt.sanitizeText(i[1],G())}return{className:r,type:e}},Du=function(t){let e=ja(t);De[e.className]===void 0&&(De[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:e0+e.className+"-"+Fd},Fd++)},Gy=function(t){const e=Object.keys(De);for(const r of e)if(De[r].id===t)return De[r].domId},WM=function(){r0=[],De={},jl=[],$a=[],$a.push(jy),Lr()},HM=function(t){return De[t]},qM=function(){return De},GM=function(){return r0},$M=function(){return jl},jM=function(t){I.debug("Adding relation: "+JSON.stringify(t)),Du(t.id1),Du(t.id2),t.id1=ja(t.id1).className,t.id2=ja(t.id2).className,t.relationTitle1=Xt.sanitizeText(t.relationTitle1.trim(),G()),t.relationTitle2=Xt.sanitizeText(t.relationTitle2.trim(),G()),r0.push(t)},XM=function(t,e){const r=ja(t).className;De[r].annotations.push(e)},$y=function(t,e){const r=ja(t).className,i=De[r];if(typeof e=="string"){const n=e.trim();n.startsWith("<<")&&n.endsWith(">>")?i.annotations.push(ka(n.substring(2,n.length-2))):n.indexOf(")")>0?i.methods.push(ka(n)):n&&i.members.push(ka(n))}},KM=function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach(r=>$y(t,r)))},ZM=function(t,e){const r={id:`note${jl.length}`,class:e,text:t};jl.push(r)},QM=function(t){return t.substring(0,1)===":"?Xt.sanitizeText(t.substr(1).trim(),G()):ka(t.trim())},i0=function(t,e){t.split(",").forEach(function(r){let i=r;r[0].match(/\d/)&&(i=e0+i),De[i]!==void 0&&De[i].cssClasses.push(e)})},JM=function(t,e){const r=G();t.split(",").forEach(function(i){e!==void 0&&(De[i].tooltip=Xt.sanitizeText(e,r))})},tN=function(t){return De[t].tooltip},eN=function(t,e,r){const i=G();t.split(",").forEach(function(n){let s=n;n[0].match(/\d/)&&(s=e0+s),De[s]!==void 0&&(De[s].link=jt.formatUrl(e,i),i.securityLevel==="sandbox"?De[s].linkTarget="_top":typeof r=="string"?De[s].linkTarget=ka(r):De[s].linkTarget="_blank")}),i0(t,"clickable")},rN=function(t,e,r){t.split(",").forEach(function(i){iN(i,e,r),De[i].haveCallback=!0}),i0(t,"clickable")},iN=function(t,e,r){const i=G();let n=t,s=Gy(n);if(i.securityLevel==="loose"&&e!==void 0&&De[n]!==void 0){let a=[];if(typeof r=="string"){a=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let o=0;o<a.length;o++){let l=a[o].trim();l.charAt(0)==='"'&&l.charAt(l.length-1)==='"'&&(l=l.substr(1,l.length-2)),a[o]=l}}a.length===0&&a.push(s),$a.push(function(){const o=document.querySelector(`[id="${s}"]`);o!==null&&o.addEventListener("click",function(){jt.runFunc(e,...a)},!1)})}},nN=function(t){$a.forEach(function(e){e(t)})},sN={LINE:0,DOTTED_LINE:1},aN={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},jy=function(t){let e=_t(".mermaidTooltip");(e._groups||e)[0][0]===null&&(e=_t("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),_t(t).select("svg").selectAll("g.node").on("mouseover",function(){const n=_t(this);if(n.attr("title")===null)return;const a=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(n.attr("title")).style("left",window.scrollX+a.left+(a.right-a.left)/2+"px").style("top",window.scrollY+a.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/&lt;br\/&gt;/g,"<br/>")),n.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),_t(this).classed("hover",!1)})};$a.push(jy);let Xy="TB";const oN=()=>Xy,lN=t=>{Xy=t},fs={parseDirective:UM,setAccTitle:kr,getAccTitle:Br,getAccDescription:Ir,setAccDescription:Dr,getConfig:()=>G().class,addClass:Du,bindFunctions:nN,clear:WM,getClass:HM,getClasses:qM,getNotes:$M,addAnnotation:XM,addNote:ZM,getRelations:GM,addRelation:jM,getDirection:oN,setDirection:lN,addMember:$y,addMembers:KM,cleanupLabel:QM,lineType:sN,relationType:aN,setClickEvent:rN,setCssClass:i0,setLink:eN,getTooltip:tN,setTooltip:JM,lookUpDomId:Gy,setDiagramTitle:si,getDiagramTitle:ai};let Pd=0;const cN=function(t,e,r,i,n){const s=function(v){switch(v){case n.db.relationType.AGGREGATION:return"aggregation";case n.db.relationType.EXTENSION:return"extension";case n.db.relationType.COMPOSITION:return"composition";case n.db.relationType.DEPENDENCY:return"dependency";case n.db.relationType.LOLLIPOP:return"lollipop"}};e.points=e.points.filter(v=>!Number.isNaN(v.y));const a=e.points,o=Us().x(function(v){return v.x}).y(function(v){return v.y}).curve(Ss),l=t.append("path").attr("d",o(a)).attr("id","edge"+Pd).attr("class","relation");let h="";i.arrowMarkerAbsolute&&(h=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,h=h.replace(/\(/g,"\\("),h=h.replace(/\)/g,"\\)")),r.relation.lineType==1&&l.attr("class","relation dashed-line"),r.relation.lineType==10&&l.attr("class","relation dotted-line"),r.relation.type1!=="none"&&l.attr("marker-start","url("+h+"#"+s(r.relation.type1)+"Start)"),r.relation.type2!=="none"&&l.attr("marker-end","url("+h+"#"+s(r.relation.type2)+"End)");let u,f;const d=e.points.length;let p=jt.calcLabelPosition(e.points);u=p.x,f=p.y;let m,b,x,k;if(d%2!==0&&d>1){let v=jt.calcCardinalityPosition(r.relation.type1!=="none",e.points,e.points[0]),B=jt.calcCardinalityPosition(r.relation.type2!=="none",e.points,e.points[d-1]);I.debug("cardinality_1_point "+JSON.stringify(v)),I.debug("cardinality_2_point "+JSON.stringify(B)),m=v.x,b=v.y,x=B.x,k=B.y}if(r.title!==void 0){const v=t.append("g").attr("class","classLabel"),B=v.append("text").attr("class","label").attr("x",u).attr("y",f).attr("fill","red").attr("text-anchor","middle").text(r.title);window.label=B;const R=B.node().getBBox();v.insert("rect",":first-child").attr("class","box").attr("x",R.x-i.padding/2).attr("y",R.y-i.padding/2).attr("width",R.width+i.padding).attr("height",R.height+i.padding)}I.info("Rendering relation "+JSON.stringify(r)),r.relationTitle1!==void 0&&r.relationTitle1!=="none"&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",m).attr("y",b).attr("fill","black").attr("font-size","6").text(r.relationTitle1),r.relationTitle2!==void 0&&r.relationTitle2!=="none"&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",x).attr("y",k).attr("fill","black").attr("font-size","6").text(r.relationTitle2),Pd++},hN=function(t,e,r,i){I.debug("Rendering class ",e,r);const n=e.id,s={id:n,label:e.id,width:0,height:0},a=t.append("g").attr("id",i.db.lookUpDomId(n)).attr("class","classGroup");let o;e.link?o=a.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",r.textHeight+r.padding).attr("x",0):o=a.append("text").attr("y",r.textHeight+r.padding).attr("x",0);let l=!0;e.annotations.forEach(function(P){const V=o.append("tspan").text("«"+P+"»");l||V.attr("dy",r.textHeight),l=!1});let h=e.id;e.type!==void 0&&e.type!==""&&(h+="<"+e.type+">");const u=o.append("tspan").text(h).attr("class","title");l||u.attr("dy",r.textHeight);const f=o.node().getBBox().height,d=a.append("line").attr("x1",0).attr("y1",r.padding+f+r.dividerMargin/2).attr("y2",r.padding+f+r.dividerMargin/2),p=a.append("text").attr("x",r.padding).attr("y",f+r.dividerMargin+r.textHeight).attr("fill","white").attr("class","classText");l=!0,e.members.forEach(function(P){Vd(p,P,l,r),l=!1});const m=p.node().getBBox(),b=a.append("line").attr("x1",0).attr("y1",r.padding+f+r.dividerMargin+m.height).attr("y2",r.padding+f+r.dividerMargin+m.height),x=a.append("text").attr("x",r.padding).attr("y",f+2*r.dividerMargin+m.height+r.textHeight).attr("fill","white").attr("class","classText");l=!0,e.methods.forEach(function(P){Vd(x,P,l,r),l=!1});const k=a.node().getBBox();var v=" ";e.cssClasses.length>0&&(v=v+e.cssClasses.join(" "));const R=a.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",k.width+2*r.padding).attr("height",k.height+r.padding+.5*r.dividerMargin).attr("class",v).node().getBBox().width;return o.node().childNodes.forEach(function(P){P.setAttribute("x",(R-P.getBBox().width)/2)}),e.tooltip&&o.insert("title").text(e.tooltip),d.attr("x2",R),b.attr("x2",R),s.width=R,s.height=k.height+r.padding+.5*r.dividerMargin,s},uN=function(t,e,r,i){I.debug("Rendering note ",e,r);const n=e.id,s={id:n,text:e.text,width:0,height:0},a=t.append("g").attr("id",n).attr("class","classGroup");let o=a.append("text").attr("y",r.textHeight+r.padding).attr("x",0);const l=JSON.parse(`"${e.text}"`).split(`
1215
+ `);l.forEach(function(d){I.debug(`Adding line: ${d}`),o.append("tspan").text(d).attr("class","title").attr("dy",r.textHeight)});const h=a.node().getBBox(),f=a.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",h.width+2*r.padding).attr("height",h.height+l.length*r.textHeight+r.padding+.5*r.dividerMargin).node().getBBox().width;return o.node().childNodes.forEach(function(d){d.setAttribute("x",(f-d.getBBox().width)/2)}),s.width=f,s.height=h.height+l.length*r.textHeight+r.padding+.5*r.dividerMargin,s},Xl=function(t){const e=/^([#+~-])?(\w+)(~\w+~|\[])?\s+(\w+) *([$*])?$/,r=/^([#+|~-])?(\w+) *\( *(.*)\) *([$*])? *(\w*[[\]|~]*\s*\w*~?)$/;let i=t.match(e),n=t.match(r);return i&&!n?fN(i):n?dN(n):pN(t)},fN=function(t){let e="",r="";try{let i=t[1]?t[1].trim():"",n=t[2]?t[2].trim():"",s=t[3]?an(t[3].trim()):"",a=t[4]?t[4].trim():"",o=t[5]?t[5].trim():"";r=i+n+s+" "+a,e=n0(o)}catch{r=t}return{displayText:r,cssStyle:e}},dN=function(t){let e="",r="";try{let i=t[1]?t[1].trim():"",n=t[2]?t[2].trim():"",s=t[3]?an(t[3].trim()):"",a=t[4]?t[4].trim():"",o=t[5]?" : "+an(t[5]).trim():"";r=i+n+"("+s+")"+o,e=n0(a)}catch{r=t}return{displayText:r,cssStyle:e}},pN=function(t){let e="",r="",i="",n=t.indexOf("("),s=t.indexOf(")");if(n>1&&s>n&&s<=t.length){let a="",o="",l=t.substring(0,1);l.match(/\w/)?o=t.substring(0,n).trim():(l.match(/[#+~-]/)&&(a=l),o=t.substring(1,n).trim());const h=t.substring(n+1,s);t.substring(s+1,1),r=n0(t.substring(s+1,s+2)),e=a+o+"("+an(h.trim())+")",s<t.length&&(i=t.substring(s+2).trim(),i!==""&&(i=" : "+an(i),e+=i))}else e=an(t);return{displayText:e,cssStyle:r}},Vd=function(t,e,r,i){let n=Xl(e);const s=t.append("tspan").attr("x",i.padding).text(n.displayText);n.cssStyle!==""&&s.attr("style",n.cssStyle),r||s.attr("dy",i.textHeight)},n0=function(t){switch(t){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}},Oh={drawClass:hN,drawEdge:cN,drawNote:uN,parseMember:Xl};let tl={};const No=20,sa=function(t){const e=Object.entries(tl).find(r=>r[1].label===t);if(e)return e[0]},gN=function(t){t.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},yN=function(t,e,r,i){const n=G().class;tl={},I.info("Rendering diagram "+t);const s=G().securityLevel;let a;s==="sandbox"&&(a=_t("#i"+e));const o=_t(s==="sandbox"?a.nodes()[0].contentDocument.body:"body"),l=o.select(`[id='${e}']`);gN(l);const h=new Pe({multigraph:!0});h.setGraph({isMultiGraph:!0}),h.setDefaultEdgeLabel(function(){return{}});const u=i.db.getClasses(),f=Object.keys(u);for(const v of f){const B=u[v],R=Oh.drawClass(l,B,n,i);tl[R.id]=R,h.setNode(R.id,R),I.info("Org height: "+R.height)}i.db.getRelations().forEach(function(v){I.info("tjoho"+sa(v.id1)+sa(v.id2)+JSON.stringify(v)),h.setEdge(sa(v.id1),sa(v.id2),{relation:v},v.title||"DEFAULT")}),i.db.getNotes().forEach(function(v){I.debug(`Adding note: ${JSON.stringify(v)}`);const B=Oh.drawNote(l,v,n,i);tl[B.id]=B,h.setNode(B.id,B),v.class&&v.class in u&&h.setEdge(v.id,sa(v.class),{relation:{id1:v.id,id2:v.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),$s(h),h.nodes().forEach(function(v){v!==void 0&&h.node(v)!==void 0&&(I.debug("Node "+v+": "+JSON.stringify(h.node(v))),o.select("#"+(i.db.lookUpDomId(v)||v)).attr("transform","translate("+(h.node(v).x-h.node(v).width/2)+","+(h.node(v).y-h.node(v).height/2)+" )"))}),h.edges().forEach(function(v){v!==void 0&&h.edge(v)!==void 0&&(I.debug("Edge "+v.v+" -> "+v.w+": "+JSON.stringify(h.edge(v))),Oh.drawEdge(l,h.edge(v),h.edge(v).relation,n,i))});const m=l.node().getBBox(),b=m.width+No*2,x=m.height+No*2;ni(l,x,b,n.useMaxWidth);const k=`${m.x-No} ${m.y-No} ${b} ${x}`;I.debug(`viewBox ${k}`),l.attr("viewBox",k)},mN={draw:yN},bN=(t,e,r,i)=>{e.forEach(n=>{AN[n](t,r,i)})},_N=(t,e,r)=>{I.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",e+"-extensionStart").attr("class","marker extension "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},xN=(t,e)=>{t.append("defs").append("marker").attr("id",e+"-compositionStart").attr("class","marker composition "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},vN=(t,e)=>{t.append("defs").append("marker").attr("id",e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},kN=(t,e)=>{t.append("defs").append("marker").attr("id",e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},wN=(t,e)=>{t.append("defs").append("marker").attr("id",e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","white").attr("cx",6).attr("cy",7).attr("r",6)},TN=(t,e)=>{t.append("marker").attr("id",e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 12 20").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},EN=(t,e)=>{t.append("marker").attr("id",e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},CN=(t,e)=>{t.append("marker").attr("id",e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},SN=(t,e)=>{t.append("defs").append("marker").attr("id",e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},AN={extension:_N,composition:xN,aggregation:vN,dependency:kN,lollipop:wN,point:TN,circle:EN,cross:CN,barb:SN},LN=bN;function BN(t,e){e&&t.attr("style",e)}function DN(t){const e=_t(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),i=t.label,n=t.isNode?"nodeLabel":"edgeLabel";return r.html('<span class="'+n+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+i+"</span>"),BN(r,t.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}const IN=(t,e,r,i)=>{let n=t||"";if(typeof n=="object"&&(n=n[0]),Ke(G().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"<br />"),I.info("vertexText"+n);const s={isNode:i,label:B0(n).replace(/fa[blrs]?:fa-[\w-]+/g,o=>`<i class='${o.replace(":"," ")}'></i>`),labelStyle:e.replace("fill:","color:")};return DN(s)}else{const s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",e.replace("color:","fill:"));let a=[];typeof n=="string"?a=n.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(n)?a=n:a=[];for(const o of a){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=o.trim(),s.appendChild(l)}return s}},br=IN,or=(t,e,r,i)=>{let n;r?n=r:n="node default";const s=t.insert("g").attr("class",n).attr("id",e.domId||e.id),a=s.insert("g").attr("class","label").attr("style",e.labelStyle);let o;e.labelText===void 0?o="":o=typeof e.labelText=="string"?e.labelText:e.labelText[0];const l=a.node().appendChild(br(Ur(B0(o),G()),e.labelStyle,!1,i));let h=l.getBBox();if(Ke(G().flowchart.htmlLabels)){const f=l.children[0],d=_t(l);h=f.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)}const u=e.padding/2;return a.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),{shapeSvg:s,bbox:h,halfPadding:u,label:a}},Ie=(t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height};function Ji(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}let ce={},Xr={},Ky={};const MN=()=>{Xr={},Ky={},ce={}},Kl=(t,e)=>(I.trace("In isDecendant",e," ",t," = ",Xr[e].includes(t)),!!Xr[e].includes(t)),NN=(t,e)=>(I.info("Decendants of ",e," is ",Xr[e]),I.info("Edge is ",t),t.v===e||t.w===e?!1:Xr[e]?Xr[e].includes(t.v)||Kl(t.v,e)||Kl(t.w,e)||Xr[e].includes(t.w):(I.debug("Tilt, ",e,",not in decendants"),!1)),Zy=(t,e,r,i)=>{I.warn("Copying children of ",t,"root",i,"data",e.node(t),i);const n=e.children(t)||[];t!==i&&n.push(t),I.warn("Copying (nodes) clusterId",t,"nodes",n),n.forEach(s=>{if(e.children(s).length>0)Zy(s,e,r,i);else{const a=e.node(s);I.info("cp ",s," to ",i," with parent ",t),r.setNode(s,a),i!==e.parent(s)&&(I.warn("Setting parent",s,e.parent(s)),r.setParent(s,e.parent(s))),t!==i&&s!==t?(I.debug("Setting parent",s,t),r.setParent(s,t)):(I.info("In copy ",t,"root",i,"data",e.node(t),i),I.debug("Not Setting parent for node=",s,"cluster!==rootId",t!==i,"node!==clusterId",s!==t));const o=e.edges(s);I.debug("Copying Edges",o),o.forEach(l=>{I.info("Edge",l);const h=e.edge(l.v,l.w,l.name);I.info("Edge data",h,i);try{NN(l,i)?(I.info("Copying as ",l.v,l.w,h,l.name),r.setEdge(l.v,l.w,h,l.name),I.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):I.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",i," clusterId:",t)}catch(u){I.error(u)}})}I.debug("Removing node",s),e.removeNode(s)})},Qy=(t,e)=>{const r=e.children(t);let i=[...r];for(const n of r)Ky[n]=t,i=[...i,...Qy(n,e)];return i},Xa=(t,e)=>{I.trace("Searching",t);const r=e.children(t);if(I.trace("Searching children of id ",t,r),r.length<1)return I.trace("This is a valid node",t),t;for(const i of r){const n=Xa(i,e);if(n)return I.trace("Found replacement for",t," => ",n),n}},Ro=t=>!ce[t]||!ce[t].externalConnections?t:ce[t]?ce[t].id:t,RN=(t,e)=>{if(!t||e>10){I.debug("Opting out, no graph ");return}else I.debug("Opting in, graph ");t.nodes().forEach(function(r){t.children(r).length>0&&(I.warn("Cluster identified",r," Replacement id in edges: ",Xa(r,t)),Xr[r]=Qy(r,t),ce[r]={id:Xa(r,t),clusterData:t.node(r)})}),t.nodes().forEach(function(r){const i=t.children(r),n=t.edges();i.length>0?(I.debug("Cluster identified",r,Xr),n.forEach(s=>{if(s.v!==r&&s.w!==r){const a=Kl(s.v,r),o=Kl(s.w,r);a^o&&(I.warn("Edge: ",s," leaves cluster ",r),I.warn("Decendants of XXX ",r,": ",Xr[r]),ce[r].externalConnections=!0)}})):I.debug("Not a cluster ",r,Xr)}),t.edges().forEach(function(r){const i=t.edge(r);I.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),I.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(t.edge(r)));let n=r.v,s=r.w;if(I.warn("Fix XXX",ce,"ids:",r.v,r.w,"Translating: ",ce[r.v]," --- ",ce[r.w]),ce[r.v]&&ce[r.w]&&ce[r.v]===ce[r.w]){I.warn("Fixing and trixing link to self - removing XXX",r.v,r.w,r.name),I.warn("Fixing and trixing - removing XXX",r.v,r.w,r.name),n=Ro(r.v),s=Ro(r.w),t.removeEdge(r.v,r.w,r.name);const a=r.w+"---"+r.v;t.setNode(a,{domId:a,id:a,labelStyle:"",labelText:i.label,padding:0,shape:"labelRect",style:""});const o=JSON.parse(JSON.stringify(i)),l=JSON.parse(JSON.stringify(i));o.label="",o.arrowTypeEnd="none",l.label="",o.fromCluster=r.v,l.toCluster=r.v,t.setEdge(n,a,o,r.name+"-cyclic-special"),t.setEdge(a,s,l,r.name+"-cyclic-special")}else(ce[r.v]||ce[r.w])&&(I.warn("Fixing and trixing - removing XXX",r.v,r.w,r.name),n=Ro(r.v),s=Ro(r.w),t.removeEdge(r.v,r.w,r.name),n!==r.v&&(i.fromCluster=r.v),s!==r.w&&(i.toCluster=r.w),I.warn("Fix Replacing with XXX",n,s,r.name),t.setEdge(n,s,i,r.name))}),I.warn("Adjusted Graph",Yi(t)),Jy(t,0),I.trace(ce)},Jy=(t,e)=>{if(I.warn("extractor - ",e,Yi(t),t.children("D")),e>10){I.error("Bailing out");return}let r=t.nodes(),i=!1;for(const n of r){const s=t.children(n);i=i||s.length>0}if(!i){I.debug("Done, no node has children",t.nodes());return}I.debug("Nodes = ",r,e);for(const n of r)if(I.debug("Extracting node",n,ce,ce[n]&&!ce[n].externalConnections,!t.parent(n),t.node(n),t.children("D")," Depth ",e),!ce[n])I.debug("Not a cluster",n,e);else if(!ce[n].externalConnections&&t.children(n)&&t.children(n).length>0){I.warn("Cluster without external connections, without a parent and with children",n,e);let a=t.graph().rankdir==="TB"?"LR":"TB";ce[n]&&ce[n].clusterData&&ce[n].clusterData.dir&&(a=ce[n].clusterData.dir,I.warn("Fixing dir",ce[n].clusterData.dir,a));const o=new Pe({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});I.warn("Old graph before copy",Yi(t)),Zy(n,t,o,n),t.setNode(n,{clusterNode:!0,id:n,clusterData:ce[n].clusterData,labelText:ce[n].labelText,graph:o}),I.warn("New graph after copy node: (",n,")",Yi(o)),I.debug("Old graph after copy",Yi(t))}else I.warn("Cluster ** ",n," **not meeting the criteria !externalConnections:",!ce[n].externalConnections," no parent: ",!t.parent(n)," children ",t.children(n)&&t.children(n).length>0,t.children("D"),e),I.debug(ce);r=t.nodes(),I.warn("New list of nodes",r);for(const n of r){const s=t.node(n);I.warn(" Now next level",n,s),s.clusterNode&&Jy(s.graph,e+1)}},tm=(t,e)=>{if(e.length===0)return[];let r=Object.assign(e);return e.forEach(i=>{const n=t.children(i),s=tm(t,n);r=[...r,...s]}),r},ON=t=>tm(t,t.children());function FN(t,e){return t.intersect(e)}function em(t,e,r,i){var n=t.x,s=t.y,a=n-i.x,o=s-i.y,l=Math.sqrt(e*e*o*o+r*r*a*a),h=Math.abs(e*r*a/l);i.x<n&&(h=-h);var u=Math.abs(e*r*o/l);return i.y<s&&(u=-u),{x:n+h,y:s+u}}function PN(t,e,r){return em(t,e,e,r)}function VN(t,e,r,i){var n,s,a,o,l,h,u,f,d,p,m,b,x,k,v;if(n=e.y-t.y,a=t.x-e.x,l=e.x*t.y-t.x*e.y,d=n*r.x+a*r.y+l,p=n*i.x+a*i.y+l,!(d!==0&&p!==0&&Yd(d,p))&&(s=i.y-r.y,o=r.x-i.x,h=i.x*r.y-r.x*i.y,u=s*t.x+o*t.y+h,f=s*e.x+o*e.y+h,!(u!==0&&f!==0&&Yd(u,f))&&(m=n*o-s*a,m!==0)))return b=Math.abs(m/2),x=a*h-o*l,k=x<0?(x-b)/m:(x+b)/m,x=s*l-n*h,v=x<0?(x-b)/m:(x+b)/m,{x:k,y:v}}function Yd(t,e){return t*e>0}function YN(t,e,r){var i=t.x,n=t.y,s=[],a=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(m){a=Math.min(a,m.x),o=Math.min(o,m.y)}):(a=Math.min(a,e.x),o=Math.min(o,e.y));for(var l=i-t.width/2-a,h=n-t.height/2-o,u=0;u<e.length;u++){var f=e[u],d=e[u<e.length-1?u+1:0],p=VN(t,r,{x:l+f.x,y:h+f.y},{x:l+d.x,y:h+d.y});p&&s.push(p)}return s.length?(s.length>1&&s.sort(function(m,b){var x=m.x-r.x,k=m.y-r.y,v=Math.sqrt(x*x+k*k),B=b.x-r.x,R=b.y-r.y,P=Math.sqrt(B*B+R*R);return v<P?-1:v===P?0:1}),s[0]):t}const zN=(t,e)=>{var r=t.x,i=t.y,n=e.x-r,s=e.y-i,a=t.width/2,o=t.height/2,l,h;return Math.abs(s)*a>Math.abs(n)*o?(s<0&&(o=-o),l=s===0?0:o*n/s,h=o):(n<0&&(a=-a),l=a,h=n===0?0:a*s/n),{x:r+l,y:i+h}},uo=zN,Ee={node:FN,circle:PN,ellipse:em,polygon:YN,rect:uo},UN=(t,e)=>{const{shapeSvg:r,bbox:i,halfPadding:n}=or(t,e,"node "+e.classes,!0);I.info("Classes = ",e.classes);const s=r.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-n).attr("y",-i.height/2-n).attr("width",i.width+e.padding).attr("height",i.height+e.padding),Ie(e,s),e.intersect=function(a){return Ee.rect(e,a)},r},WN=UN,zd=(t,e)=>{const{shapeSvg:r,bbox:i}=or(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=n+s,o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];I.info("Question main (Circle)");const l=Ji(r,a,a,o);return l.attr("style",e.style),Ie(e,l),e.intersect=function(h){return I.warn("Intersect called"),Ee.polygon(e,o,h)},r},HN=(t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=28,n=[{x:0,y:i/2},{x:i/2,y:0},{x:0,y:-i/2},{x:-i/2,y:0}];return r.insert("polygon",":first-child").attr("points",n.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(a){return Ee.circle(e,14,a)},r},qN=(t,e)=>{const{shapeSvg:r,bbox:i}=or(t,e,void 0,!0),n=4,s=i.height+e.padding,a=s/n,o=i.width+2*a+e.padding,l=[{x:a,y:0},{x:o-a,y:0},{x:o,y:-s/2},{x:o-a,y:-s},{x:a,y:-s},{x:0,y:-s/2}],h=Ji(r,o,s,l);return h.attr("style",e.style),Ie(e,h),e.intersect=function(u){return Ee.polygon(e,l,u)},r},GN=(t,e)=>{const{shapeSvg:r,bbox:i}=or(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=[{x:-s/2,y:0},{x:n,y:0},{x:n,y:-s},{x:-s/2,y:-s},{x:0,y:-s/2}];return Ji(r,n,s,a).attr("style",e.style),e.width=n+s,e.height=s,e.intersect=function(l){return Ee.polygon(e,a,l)},r},$N=(t,e)=>{const{shapeSvg:r,bbox:i}=or(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=[{x:-2*s/6,y:0},{x:n-s/6,y:0},{x:n+2*s/6,y:-s},{x:s/6,y:-s}],o=Ji(r,n,s,a);return o.attr("style",e.style),Ie(e,o),e.intersect=function(l){return Ee.polygon(e,a,l)},r},jN=(t,e)=>{const{shapeSvg:r,bbox:i}=or(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=[{x:2*s/6,y:0},{x:n+s/6,y:0},{x:n-2*s/6,y:-s},{x:-s/6,y:-s}],o=Ji(r,n,s,a);return o.attr("style",e.style),Ie(e,o),e.intersect=function(l){return Ee.polygon(e,a,l)},r},XN=(t,e)=>{const{shapeSvg:r,bbox:i}=or(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=[{x:-2*s/6,y:0},{x:n+2*s/6,y:0},{x:n-s/6,y:-s},{x:s/6,y:-s}],o=Ji(r,n,s,a);return o.attr("style",e.style),Ie(e,o),e.intersect=function(l){return Ee.polygon(e,a,l)},r},KN=(t,e)=>{const{shapeSvg:r,bbox:i}=or(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=[{x:s/6,y:0},{x:n-s/6,y:0},{x:n+2*s/6,y:-s},{x:-2*s/6,y:-s}],o=Ji(r,n,s,a);return o.attr("style",e.style),Ie(e,o),e.intersect=function(l){return Ee.polygon(e,a,l)},r},ZN=(t,e)=>{const{shapeSvg:r,bbox:i}=or(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=[{x:0,y:0},{x:n+s/2,y:0},{x:n,y:-s/2},{x:n+s/2,y:-s},{x:0,y:-s}],o=Ji(r,n,s,a);return o.attr("style",e.style),Ie(e,o),e.intersect=function(l){return Ee.polygon(e,a,l)},r},QN=(t,e)=>{const{shapeSvg:r,bbox:i}=or(t,e,void 0,!0),n=i.width+e.padding,s=n/2,a=s/(2.5+n/50),o=i.height+a+e.padding,l="M 0,"+a+" a "+s+","+a+" 0,0,0 "+n+" 0 a "+s+","+a+" 0,0,0 "+-n+" 0 l 0,"+o+" a "+s+","+a+" 0,0,0 "+n+" 0 l 0,"+-o,h=r.attr("label-offset-y",a).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-n/2+","+-(o/2+a)+")");return Ie(e,h),e.intersect=function(u){const f=Ee.rect(e,u),d=f.x-e.x;if(s!=0&&(Math.abs(d)<e.width/2||Math.abs(d)==e.width/2&&Math.abs(f.y-e.y)>e.height/2-a)){let p=a*a*(1-d*d/(s*s));p!=0&&(p=Math.sqrt(p)),p=a-p,u.y-e.y>0&&(p=-p),f.y+=p}return f},r},JN=(t,e)=>{const{shapeSvg:r,bbox:i,halfPadding:n}=or(t,e,"node "+e.classes,!0);I.trace("Classes = ",e.classes);const s=r.insert("rect",":first-child"),a=i.width+e.padding,o=i.height+e.padding;if(s.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-n).attr("y",-i.height/2-n).attr("width",a).attr("height",o),e.props){const l=new Set(Object.keys(e.props));e.props.borders&&(rm(s,e.props.borders,a,o),l.delete("borders")),l.forEach(h=>{I.warn(`Unknown node property ${h}`)})}return Ie(e,s),e.intersect=function(l){return Ee.rect(e,l)},r},tR=(t,e)=>{const{shapeSvg:r}=or(t,e,"label",!0);I.trace("Classes = ",e.classes);const i=r.insert("rect",":first-child"),n=0,s=0;if(i.attr("width",n).attr("height",s),r.attr("class","label edgeLabel"),e.props){const a=new Set(Object.keys(e.props));e.props.borders&&(rm(i,e.props.borders,n,s),a.delete("borders")),a.forEach(o=>{I.warn(`Unknown node property ${o}`)})}return Ie(e,i),e.intersect=function(a){return Ee.rect(e,a)},r};function rm(t,e,r,i){const n=[],s=o=>{n.push(o,0)},a=o=>{n.push(0,o)};e.includes("t")?(I.debug("add top border"),s(r)):a(r),e.includes("r")?(I.debug("add right border"),s(i)):a(i),e.includes("b")?(I.debug("add bottom border"),s(r)):a(r),e.includes("l")?(I.debug("add left border"),s(i)):a(i),t.attr("stroke-dasharray",n.join(" "))}const eR=(t,e)=>{let r;e.classes?r="node "+e.classes:r="node default";const i=t.insert("g").attr("class",r).attr("id",e.domId||e.id),n=i.insert("rect",":first-child"),s=i.insert("line"),a=i.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText;let l="";typeof o=="object"?l=o[0]:l=o,I.info("Label text abc79",l,o,typeof o=="object");const h=a.node().appendChild(br(l,e.labelStyle,!0,!0));let u={width:0,height:0};if(Ke(G().flowchart.htmlLabels)){const b=h.children[0],x=_t(h);u=b.getBoundingClientRect(),x.attr("width",u.width),x.attr("height",u.height)}I.info("Text 2",o);const f=o.slice(1,o.length);let d=h.getBBox();const p=a.node().appendChild(br(f.join?f.join("<br/>"):f,e.labelStyle,!0,!0));if(Ke(G().flowchart.htmlLabels)){const b=p.children[0],x=_t(p);u=b.getBoundingClientRect(),x.attr("width",u.width),x.attr("height",u.height)}const m=e.padding/2;return _t(p).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+m+5)+")"),_t(h).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=a.node().getBBox(),a.attr("transform","translate("+-u.width/2+", "+(-u.height/2-m+3)+")"),n.attr("class","outer title-state").attr("x",-u.width/2-m).attr("y",-u.height/2-m).attr("width",u.width+e.padding).attr("height",u.height+e.padding),s.attr("class","divider").attr("x1",-u.width/2-m).attr("x2",u.width/2+m).attr("y1",-u.height/2-m+d.height+m).attr("y2",-u.height/2-m+d.height+m),Ie(e,n),e.intersect=function(b){return Ee.rect(e,b)},i},rR=(t,e)=>{const{shapeSvg:r,bbox:i}=or(t,e,void 0,!0),n=i.height+e.padding,s=i.width+n/4+e.padding,a=r.insert("rect",":first-child").attr("style",e.style).attr("rx",n/2).attr("ry",n/2).attr("x",-s/2).attr("y",-n/2).attr("width",s).attr("height",n);return Ie(e,a),e.intersect=function(o){return Ee.rect(e,o)},r},iR=(t,e)=>{const{shapeSvg:r,bbox:i,halfPadding:n}=or(t,e,void 0,!0),s=r.insert("circle",":first-child");return s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+n).attr("width",i.width+e.padding).attr("height",i.height+e.padding),I.info("Circle main"),Ie(e,s),e.intersect=function(a){return I.info("Circle intersect",e,i.width/2+n,a),Ee.circle(e,i.width/2+n,a)},r},nR=(t,e)=>{const{shapeSvg:r,bbox:i,halfPadding:n}=or(t,e,void 0,!0),s=5,a=r.insert("g",":first-child"),o=a.insert("circle"),l=a.insert("circle");return o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+n+s).attr("width",i.width+e.padding+s*2).attr("height",i.height+e.padding+s*2),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+n).attr("width",i.width+e.padding).attr("height",i.height+e.padding),I.info("DoubleCircle main"),Ie(e,o),e.intersect=function(h){return I.info("DoubleCircle intersect",e,i.width/2+n+s,h),Ee.circle(e,i.width/2+n+s,h)},r},sR=(t,e)=>{const{shapeSvg:r,bbox:i}=or(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=[{x:0,y:0},{x:n,y:0},{x:n,y:-s},{x:0,y:-s},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-s},{x:-8,y:-s},{x:-8,y:0}],o=Ji(r,n,s,a);return o.attr("style",e.style),Ie(e,o),e.intersect=function(l){return Ee.polygon(e,a,l)},r},aR=(t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Ie(e,i),e.intersect=function(n){return Ee.circle(e,7,n)},r},Ud=(t,e,r)=>{const i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let n=70,s=10;r==="LR"&&(n=10,s=70);const a=i.append("rect").attr("x",-1*n/2).attr("y",-1*s/2).attr("width",n).attr("height",s).attr("class","fork-join");return Ie(e,a),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(o){return Ee.rect(e,o)},i},oR=(t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=r.insert("circle",":first-child"),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),i.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),Ie(e,n),e.intersect=function(s){return Ee.circle(e,7,s)},r},lR=(t,e)=>{const r=e.padding/2,i=4,n=8;let s;e.classes?s="node "+e.classes:s="node default";const a=t.insert("g").attr("class",s).attr("id",e.domId||e.id),o=a.insert("rect",":first-child"),l=a.insert("line"),h=a.insert("line");let u=0,f=i;const d=a.insert("g").attr("class","label");let p=0;const m=e.classData.annotations&&e.classData.annotations[0],b=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",x=d.node().appendChild(br(b,e.labelStyle,!0,!0));let k=x.getBBox();if(Ke(G().flowchart.htmlLabels)){const F=x.children[0],C=_t(x);k=F.getBoundingClientRect(),C.attr("width",k.width),C.attr("height",k.height)}e.classData.annotations[0]&&(f+=k.height+i,u+=k.width);let v=e.classData.id;e.classData.type!==void 0&&e.classData.type!==""&&(G().flowchart.htmlLabels?v+="&lt;"+e.classData.type+"&gt;":v+="<"+e.classData.type+">");const B=d.node().appendChild(br(v,e.labelStyle,!0,!0));_t(B).attr("class","classTitle");let R=B.getBBox();if(Ke(G().flowchart.htmlLabels)){const F=B.children[0],C=_t(B);R=F.getBoundingClientRect(),C.attr("width",R.width),C.attr("height",R.height)}f+=R.height+i,R.width>u&&(u=R.width);const P=[];e.classData.members.forEach(F=>{const C=Xl(F);let S=C.displayText;G().flowchart.htmlLabels&&(S=S.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const E=d.node().appendChild(br(S,C.cssStyle?C.cssStyle:e.labelStyle,!0,!0));let _=E.getBBox();if(Ke(G().flowchart.htmlLabels)){const w=E.children[0],g=_t(E);_=w.getBoundingClientRect(),g.attr("width",_.width),g.attr("height",_.height)}_.width>u&&(u=_.width),f+=_.height+i,P.push(E)}),f+=n;const V=[];if(e.classData.methods.forEach(F=>{const C=Xl(F);let S=C.displayText;G().flowchart.htmlLabels&&(S=S.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const E=d.node().appendChild(br(S,C.cssStyle?C.cssStyle:e.labelStyle,!0,!0));let _=E.getBBox();if(Ke(G().flowchart.htmlLabels)){const w=E.children[0],g=_t(E);_=w.getBoundingClientRect(),g.attr("width",_.width),g.attr("height",_.height)}_.width>u&&(u=_.width),f+=_.height+i,V.push(E)}),f+=n,m){let F=(u-k.width)/2;_t(x).attr("transform","translate( "+(-1*u/2+F)+", "+-1*f/2+")"),p=k.height+i}let O=(u-R.width)/2;return _t(B).attr("transform","translate( "+(-1*u/2+O)+", "+(-1*f/2+p)+")"),p+=R.height+i,l.attr("class","divider").attr("x1",-u/2-r).attr("x2",u/2+r).attr("y1",-f/2-r+n+p).attr("y2",-f/2-r+n+p),p+=n,P.forEach(F=>{_t(F).attr("transform","translate( "+-u/2+", "+(-1*f/2+p+n/2)+")"),p+=R.height+i}),p+=n,h.attr("class","divider").attr("x1",-u/2-r).attr("x2",u/2+r).attr("y1",-f/2-r+n+p).attr("y2",-f/2-r+n+p),p+=n,V.forEach(F=>{_t(F).attr("transform","translate( "+-u/2+", "+(-1*f/2+p)+")"),p+=R.height+i}),o.attr("class","outer title-state").attr("x",-u/2-r).attr("y",-(f/2)-r).attr("width",u+e.padding).attr("height",f+e.padding),Ie(e,o),e.intersect=function(F){return Ee.rect(e,F)},a},Wd={rhombus:zd,question:zd,rect:JN,labelRect:tR,rectWithTitle:eR,choice:HN,circle:iR,doublecircle:nR,stadium:rR,hexagon:qN,rect_left_inv_arrow:GN,lean_right:$N,lean_left:jN,trapezoid:XN,inv_trapezoid:KN,rect_right_inv_arrow:ZN,cylinder:QN,start:aR,end:oR,note:WN,subroutine:sR,fork:Ud,join:Ud,class_box:lR};let _s={};const cR=(t,e,r)=>{let i,n;if(e.link){let s;G().securityLevel==="sandbox"?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s),n=Wd[e.shape](i,e,r)}else n=Wd[e.shape](t,e,r),i=n;return e.tooltip&&n.attr("title",e.tooltip),e.class&&n.attr("class","node default "+e.class),_s[e.id]=i,e.haveCallback&&_s[e.id].attr("class",_s[e.id].attr("class")+" clickable"),i},hR=(t,e)=>{_s[e.id]=t},uR=()=>{_s={}},Hd=t=>{const e=_s[t.id];I.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=8,i=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+i-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),i},fR=(t,e)=>{I.trace("Creating subgraph rect for ",e.id,e);const r=t.insert("g").attr("class","cluster"+(e.class?" "+e.class:"")).attr("id",e.id),i=r.insert("rect",":first-child"),n=r.insert("g").attr("class","cluster-label"),s=n.node().appendChild(br(e.labelText,e.labelStyle,void 0,!0));let a=s.getBBox();if(Ke(G().flowchart.htmlLabels)){const f=s.children[0],d=_t(s);a=f.getBoundingClientRect(),d.attr("width",a.width),d.attr("height",a.height)}const o=0*e.padding,l=o/2,h=e.width<=a.width+o?a.width+o:e.width;e.width<=a.width+o?e.diff=(a.width-e.width)/2-e.padding/2:e.diff=-e.padding/2,I.trace("Data ",e,JSON.stringify(e)),i.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-h/2).attr("y",e.y-e.height/2-l).attr("width",h).attr("height",e.height+o),n.attr("transform","translate("+(e.x-a.width/2)+", "+(e.y-e.height/2)+")");const u=i.node().getBBox();return e.width=u.width,e.height=u.height,e.intersect=function(f){return uo(e,f)},r},dR=(t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.id),i=r.insert("rect",":first-child"),n=0*e.padding,s=n/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-s).attr("y",e.y-e.height/2-s).attr("width",e.width+n).attr("height",e.height+n).attr("fill","none");const a=i.node().getBBox();return e.width=a.width,e.height=a.height,e.intersect=function(o){return uo(e,o)},r},pR=(t,e)=>{const r=t.insert("g").attr("class",e.classes).attr("id",e.id),i=r.insert("rect",":first-child"),n=r.insert("g").attr("class","cluster-label"),s=r.append("rect"),a=n.node().appendChild(br(e.labelText,e.labelStyle,void 0,!0));let o=a.getBBox();if(Ke(G().flowchart.htmlLabels)){const d=a.children[0],p=_t(a);o=d.getBoundingClientRect(),p.attr("width",o.width),p.attr("height",o.height)}o=a.getBBox();const l=0*e.padding,h=l/2,u=e.width<=o.width+e.padding?o.width+e.padding:e.width;e.width<=o.width+e.padding?e.diff=(o.width+e.padding*0-e.width)/2:e.diff=-e.padding/2,i.attr("class","outer").attr("x",e.x-u/2-h).attr("y",e.y-e.height/2-h).attr("width",u+l).attr("height",e.height+l),s.attr("class","inner").attr("x",e.x-u/2-h).attr("y",e.y-e.height/2-h+o.height-1).attr("width",u+l).attr("height",e.height+l-o.height-3),n.attr("transform","translate("+(e.x-o.width/2)+", "+(e.y-e.height/2-e.padding/3+(Ke(G().flowchart.htmlLabels)?5:3))+")");const f=i.node().getBBox();return e.height=f.height,e.intersect=function(d){return uo(e,d)},r},gR=(t,e)=>{const r=t.insert("g").attr("class",e.classes).attr("id",e.id),i=r.insert("rect",":first-child"),n=0*e.padding,s=n/2;i.attr("class","divider").attr("x",e.x-e.width/2-s).attr("y",e.y-e.height/2).attr("width",e.width+n).attr("height",e.height+n);const a=i.node().getBBox();return e.width=a.width,e.height=a.height,e.diff=-e.padding/2,e.intersect=function(o){return uo(e,o)},r},yR={rect:fR,roundedWithTitle:pR,noteGroup:dR,divider:gR};let im={};const mR=(t,e)=>{I.trace("Inserting cluster");const r=e.shape||"rect";im[e.id]=yR[r](t,e)},bR=()=>{im={}};let Zl={},Je={};const _R=()=>{Zl={},Je={}},xR=(t,e)=>{const r=br(e.label,e.labelStyle),i=t.insert("g").attr("class","edgeLabel"),n=i.insert("g").attr("class","label");n.node().appendChild(r);let s=r.getBBox();if(Ke(G().flowchart.htmlLabels)){const o=r.children[0],l=_t(r);s=o.getBoundingClientRect(),l.attr("width",s.width),l.attr("height",s.height)}n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),Zl[e.id]=i,e.width=s.width,e.height=s.height;let a;if(e.startLabelLeft){const o=br(e.startLabelLeft,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");a=h.node().appendChild(o);const u=o.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),Je[e.id]||(Je[e.id]={}),Je[e.id].startLeft=l,Oo(a,e.startLabelLeft)}if(e.startLabelRight){const o=br(e.startLabelRight,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");a=l.node().appendChild(o),h.node().appendChild(o);const u=o.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),Je[e.id]||(Je[e.id]={}),Je[e.id].startRight=l,Oo(a,e.startLabelRight)}if(e.endLabelLeft){const o=br(e.endLabelLeft,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");a=h.node().appendChild(o);const u=o.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),l.node().appendChild(o),Je[e.id]||(Je[e.id]={}),Je[e.id].endLeft=l,Oo(a,e.endLabelLeft)}if(e.endLabelRight){const o=br(e.endLabelRight,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");a=h.node().appendChild(o);const u=o.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),l.node().appendChild(o),Je[e.id]||(Je[e.id]={}),Je[e.id].endRight=l,Oo(a,e.endLabelRight)}return r};function Oo(t,e){G().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}const vR=(t,e)=>{I.info("Moving label abc78 ",t.id,t.label,Zl[t.id]);let r=e.updatedPath?e.updatedPath:e.originalPath;if(t.label){const i=Zl[t.id];let n=t.x,s=t.y;if(r){const a=jt.calcLabelPosition(r);I.info("Moving label "+t.label+" from (",n,",",s,") to (",a.x,",",a.y,") abc78"),e.updatedPath&&(n=a.x,s=a.y)}i.attr("transform","translate("+n+", "+s+")")}if(t.startLabelLeft){const i=Je[t.id].startLeft;let n=t.x,s=t.y;if(r){const a=jt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);n=a.x,s=a.y}i.attr("transform","translate("+n+", "+s+")")}if(t.startLabelRight){const i=Je[t.id].startRight;let n=t.x,s=t.y;if(r){const a=jt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);n=a.x,s=a.y}i.attr("transform","translate("+n+", "+s+")")}if(t.endLabelLeft){const i=Je[t.id].endLeft;let n=t.x,s=t.y;if(r){const a=jt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);n=a.x,s=a.y}i.attr("transform","translate("+n+", "+s+")")}if(t.endLabelRight){const i=Je[t.id].endRight;let n=t.x,s=t.y;if(r){const a=jt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);n=a.x,s=a.y}i.attr("transform","translate("+n+", "+s+")")}},kR=(t,e)=>{const r=t.x,i=t.y,n=Math.abs(e.x-r),s=Math.abs(e.y-i),a=t.width/2,o=t.height/2;return n>=a||s>=o},wR=(t,e,r)=>{I.warn(`intersection calc abc89:
1216
1216
  outsidePoint: ${JSON.stringify(e)}
1217
1217
  insidePoint : ${JSON.stringify(r)}
1218
- node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const i=t.x,n=t.y,s=Math.abs(i-r.x),a=t.width/2;let o=r.x<e.x?a-s:a+s;const l=t.height/2,h=Math.abs(e.y-r.y),u=Math.abs(e.x-r.x);if(Math.abs(n-e.y)*a>Math.abs(i-e.x)*l){let f=r.y<e.y?e.y-l-n:n-l-e.y;o=u*f/h;const d={x:r.x<e.x?r.x+o:r.x-u+o,y:r.y<e.y?r.y+h-f:r.y-h+f};return o===0&&(d.x=e.x,d.y=e.y),u===0&&(d.x=e.x),h===0&&(d.y=e.y),I.warn(`abc89 topp/bott calc, Q ${h}, q ${f}, R ${u}, r ${o}`,d),d}else{r.x<e.x?o=e.x-a-i:o=i-a-e.x;let f=h*o/u,d=r.x<e.x?r.x+u-o:r.x-u+o,p=r.y<e.y?r.y+f:r.y-f;return I.warn(`sides calc abc89, Q ${h}, q ${f}, R ${u}, r ${o}`,{_x:d,_y:p}),o===0&&(d=e.x,p=e.y),u===0&&(d=e.x),h===0&&(p=e.y),{x:d,y:p}}},Hd=(t,e)=>{I.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],n=!1;return t.forEach(s=>{if(I.info("abc88 checking point",s,e),!vR(e,s)&&!n){const a=kR(e,i,s);I.warn("abc88 inside",s,i,a),I.warn("abc88 intersection",a);let o=!1;r.forEach(l=>{o=o||l.x===a.x&&l.y===a.y}),r.some(l=>l.x===a.x&&l.y===a.y)?I.warn("abc88 no intersect",a,r):r.push(a),n=!0}else I.warn("abc88 outside",s,i),i=s,n||r.push(s)}),I.warn("abc88 returning points",r),r},wR=function(t,e,r,i,n,s){let a=r.points,o=!1;const l=s.node(e.v);var h=s.node(e.w);I.info("abc88 InsertEdge: ",r),h.intersect&&l.intersect&&(a=a.slice(1,r.points.length-1),a.unshift(l.intersect(a[0])),I.info("Last point",a[a.length-1],h,h.intersect(a[a.length-1])),a.push(h.intersect(a[a.length-1]))),r.toCluster&&(I.info("to cluster abc88",i[r.toCluster]),a=Hd(r.points,i[r.toCluster].node),o=!0),r.fromCluster&&(I.info("from cluster abc88",i[r.fromCluster]),a=Hd(a.reverse(),i[r.fromCluster].node).reverse(),o=!0);const u=a.filter(k=>!Number.isNaN(k.y));let f;n==="graph"||n==="flowchart"?f=r.curve||Ss:f=Ss;const d=Us().x(function(k){return k.x}).y(function(k){return k.y}).curve(f);let p;switch(r.thickness){case"normal":p="edge-thickness-normal";break;case"thick":p="edge-thickness-thick";break;default:p=""}switch(r.pattern){case"solid":p+=" edge-pattern-solid";break;case"dotted":p+=" edge-pattern-dotted";break;case"dashed":p+=" edge-pattern-dashed";break}const m=t.append("path").attr("d",d(u)).attr("id",r.id).attr("class"," "+p+(r.classes?" "+r.classes:"")).attr("style",r.style);let b="";switch((G().flowchart.arrowMarkerAbsolute||G().state.arrowMarkerAbsolute)&&(b=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,b=b.replace(/\(/g,"\\("),b=b.replace(/\)/g,"\\)")),I.info("arrowTypeStart",r.arrowTypeStart),I.info("arrowTypeEnd",r.arrowTypeEnd),r.arrowTypeStart){case"arrow_cross":m.attr("marker-start","url("+b+"#"+n+"-crossStart)");break;case"arrow_point":m.attr("marker-start","url("+b+"#"+n+"-pointStart)");break;case"arrow_barb":m.attr("marker-start","url("+b+"#"+n+"-barbStart)");break;case"arrow_circle":m.attr("marker-start","url("+b+"#"+n+"-circleStart)");break;case"aggregation":m.attr("marker-start","url("+b+"#"+n+"-aggregationStart)");break;case"extension":m.attr("marker-start","url("+b+"#"+n+"-extensionStart)");break;case"composition":m.attr("marker-start","url("+b+"#"+n+"-compositionStart)");break;case"dependency":m.attr("marker-start","url("+b+"#"+n+"-dependencyStart)");break;case"lollipop":m.attr("marker-start","url("+b+"#"+n+"-lollipopStart)");break}switch(r.arrowTypeEnd){case"arrow_cross":m.attr("marker-end","url("+b+"#"+n+"-crossEnd)");break;case"arrow_point":m.attr("marker-end","url("+b+"#"+n+"-pointEnd)");break;case"arrow_barb":m.attr("marker-end","url("+b+"#"+n+"-barbEnd)");break;case"arrow_circle":m.attr("marker-end","url("+b+"#"+n+"-circleEnd)");break;case"aggregation":m.attr("marker-end","url("+b+"#"+n+"-aggregationEnd)");break;case"extension":m.attr("marker-end","url("+b+"#"+n+"-extensionEnd)");break;case"composition":m.attr("marker-end","url("+b+"#"+n+"-compositionEnd)");break;case"dependency":m.attr("marker-end","url("+b+"#"+n+"-dependencyEnd)");break;case"lollipop":m.attr("marker-end","url("+b+"#"+n+"-lollipopEnd)");break}let x={};return o&&(x.updatedPath=a),x.originalPath=r.points,x},im=(t,e,r,i)=>{I.info("Graph in recursive render: XXX",Yi(e),i);const n=e.graph().rankdir;I.trace("Dir in recursive render - dir:",n);const s=t.insert("g").attr("class","root");e.nodes()?I.info("Recursive render XXX",e.nodes()):I.info("No nodes found for",e),e.edges().length>0&&I.trace("Recursive edges",e.edge(e.edges()[0]));const a=s.insert("g").attr("class","clusters"),o=s.insert("g").attr("class","edgePaths"),l=s.insert("g").attr("class","edgeLabels"),h=s.insert("g").attr("class","nodes");e.nodes().forEach(function(f){const d=e.node(f);if(i!==void 0){const p=JSON.parse(JSON.stringify(i.clusterData));I.info("Setting data for cluster XXX (",f,") ",p,i),e.setNode(i.id,p),e.parent(f)||(I.trace("Setting parent",f,i.id),e.setParent(f,i.id,p))}if(I.info("(Insert) Node XXX"+f+": "+JSON.stringify(e.node(f))),d&&d.clusterNode){I.info("Cluster identified",f,d.width,e.node(f));const p=im(h,d.graph,r,e.node(f)),m=p.elem;Ie(d,m),d.diff=p.diff||0,I.info("Node bounds (abc123)",f,d,d.width,d.x,d.y),cR(m,d),I.warn("Recursive render complete ",m,d)}else e.children(f).length>0?(I.info("Cluster - the non recursive path XXX",f,d.id,d,e),I.info(Xa(d.id,e)),ce[d.id]={id:Xa(d.id,e),node:d}):(I.info("Node - the non recursive path",f,d.id,d),lR(h,e.node(f),n))}),e.edges().forEach(function(f){const d=e.edge(f.v,f.w,f.name);I.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(f)),I.info("Edge "+f.v+" -> "+f.w+": ",f," ",JSON.stringify(e.edge(f))),I.info("Fix",ce,"ids:",f.v,f.w,"Translateing: ",ce[f.v],ce[f.w]),_R(l,d)}),e.edges().forEach(function(f){I.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(f))}),I.info("#############################################"),I.info("### Layout ###"),I.info("#############################################"),I.info(e),$s(e),I.info("Graph after layout:",Yi(e));let u=0;return RN(e).forEach(function(f){const d=e.node(f);I.info("Position "+f+": "+JSON.stringify(e.node(f))),I.info("Position "+f+": ("+d.x,","+d.y,") width: ",d.width," height: ",d.height),d&&d.clusterNode?Wd(d):e.children(f).length>0?(yR(a,d),ce[d.id].node=d):Wd(d)}),e.edges().forEach(function(f){const d=e.edge(f);I.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(d),d);const p=wR(o,f,d,ce,r,e);xR(d,p)}),e.nodes().forEach(function(f){const d=e.node(f);I.info(f,d.type,d.diff),d.type==="group"&&(u=d.diff)}),{elem:s,diff:u}},n0=(t,e,r,i,n)=>{AN(t,r,i,n),hR(),bR(),mR(),IN(),I.warn("Graph at first:",Yi(e)),NN(e),I.warn("Graph after:",Yi(e)),im(t,e,i)},nm=t=>Xt.sanitizeText(t,G());let sm={dividerMargin:10,padding:5,textHeight:10};const TR=function(t,e,r,i){const n=Object.keys(t);I.info("keys:",n),I.info(t),n.forEach(function(s){const a=t[s];let o="";a.cssClasses.length>0&&(o=o+" "+a.cssClasses.join(" "));const l={labelStyle:""};let h=a.text!==void 0?a.text:a.id,u=0,f="";switch(a.type){case"class":f="class_box";break;default:f="class_box"}e.setNode(a.id,{labelStyle:l.labelStyle,shape:f,labelText:nm(h),classData:a,rx:u,ry:u,class:o,style:l.style,id:a.id,domId:a.domId,tooltip:i.db.getTooltip(a.id)||"",haveCallback:a.haveCallback,link:a.link,width:a.type==="group"?500:void 0,type:a.type,padding:G().flowchart.padding}),I.info("setNode",{labelStyle:l.labelStyle,shape:f,labelText:h,rx:u,ry:u,class:o,style:l.style,id:a.id,width:a.type==="group"?500:void 0,type:a.type,padding:G().flowchart.padding})})},ER=function(t,e,r,i){I.info(t),t.forEach(function(n,s){const a=n;let o="";const l={labelStyle:"",style:""};let h=a.text,u=0,f="note";if(e.setNode(a.id,{labelStyle:l.labelStyle,shape:f,labelText:nm(h),noteData:a,rx:u,ry:u,class:o,style:l.style,id:a.id,domId:a.id,tooltip:"",type:"note",padding:G().flowchart.padding}),I.info("setNode",{labelStyle:l.labelStyle,shape:f,labelText:h,rx:u,ry:u,style:l.style,id:a.id,type:"note",padding:G().flowchart.padding}),!a.class||!(a.class in i))return;const d=r+s,p={};p.classes="relation",p.pattern="dotted",p.id=`edgeNote${d}`,p.arrowhead="none",I.info(`Note edge: ${JSON.stringify(p)}, ${JSON.stringify(a)}`),p.startLabelRight="",p.endLabelLeft="",p.arrowTypeStart="none",p.arrowTypeEnd="none";let m="fill:none",b="";p.style=m,p.labelStyle=b,p.curve=Zr(sm.curve,Cr),e.setEdge(a.id,a.class,p,d)})},CR=function(t,e){const r=G().flowchart;let i=0;t.forEach(function(n){i++;const s={};s.classes="relation",s.pattern=n.relation.lineType==1?"dashed":"solid",s.id="id"+i,n.type==="arrow_open"?s.arrowhead="none":s.arrowhead="normal",I.info(s,n),s.startLabelRight=n.relationTitle1==="none"?"":n.relationTitle1,s.endLabelLeft=n.relationTitle2==="none"?"":n.relationTitle2,s.arrowTypeStart=qd(n.relation.type1),s.arrowTypeEnd=qd(n.relation.type2);let a="",o="";if(n.style!==void 0){const l=dn(n.style);a=l.style,o=l.labelStyle}else a="fill:none";s.style=a,s.labelStyle=o,n.interpolate!==void 0?s.curve=Zr(n.interpolate,Cr):t.defaultInterpolate!==void 0?s.curve=Zr(t.defaultInterpolate,Cr):s.curve=Zr(r.curve,Cr),n.text=n.title,n.text===void 0?n.style!==void 0&&(s.arrowheadStyle="fill: #333"):(s.arrowheadStyle="fill: #333",s.labelpos="c",G().flowchart.htmlLabels?(s.labelType="html",s.label='<span class="edgeLabel">'+n.text+"</span>"):(s.labelType="text",s.label=n.text.replace(Xt.lineBreakRegex,`
1219
- `),n.style===void 0&&(s.style=s.style||"stroke: #333; stroke-width: 1.5px;fill:none"),s.labelStyle=s.labelStyle.replace("color:","fill:"))),e.setEdge(n.id1,n.id2,s,i)})},SR=function(t){Object.keys(t).forEach(function(r){sm[r]=t[r]})},AR=function(t,e,r,i){I.info("Drawing class - ",e);const n=G().flowchart,s=G().securityLevel;I.info("config:",n);const a=n.nodeSpacing||50,o=n.rankSpacing||50,l=new Pe({multigraph:!0,compound:!0}).setGraph({rankdir:i.db.getDirection(),nodesep:a,ranksep:o,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),h=i.db.getClasses(),u=i.db.getRelations(),f=i.db.getNotes();I.info(u),TR(h,l,e,i),CR(u,l),ER(f,l,u.length+1,h);let d;s==="sandbox"&&(d=_t("#i"+e));const p=_t(s==="sandbox"?d.nodes()[0].contentDocument.body:"body"),m=p.select(`[id="${e}"]`),b=p.select("#"+e+" g");if(n0(b,l,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",e),jt.insertTitle(m,"classTitleText",n.titleTopMargin,i.db.getDiagramTitle()),Vc(l,m,n.diagramPadding,n.useMaxWidth),!n.htmlLabels){const x=s==="sandbox"?d.nodes()[0].contentDocument:document,k=x.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const v of k){const B=v.getBBox(),R=x.createElementNS("http://www.w3.org/2000/svg","rect");R.setAttribute("rx",0),R.setAttribute("ry",0),R.setAttribute("width",B.width),R.setAttribute("height",B.height),v.insertBefore(R,v.firstChild)}}};function qd(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}const LR={setConf:SR,draw:AR};var Iu=function(){var t=function(E,_,w,g){for(w=w||{},g=E.length;g--;w[E[g]]=_);return w},e=[1,2],r=[1,5],i=[6,9,11,23,25,27,29,30,31,51],n=[1,17],s=[1,18],a=[1,19],o=[1,20],l=[1,21],h=[1,22],u=[1,25],f=[1,30],d=[1,31],p=[1,32],m=[1,33],b=[6,9,11,15,20,23,25,27,29,30,31,44,45,46,47,51],x=[1,45],k=[30,31,48,49],v=[4,6,9,11,23,25,27,29,30,31,51],B=[44,45,46,47],R=[22,37],P=[1,65],V=[1,64],O=[22,37,39,41],F={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,entityName:17,relSpec:18,role:19,BLOCK_START:20,attributes:21,BLOCK_STOP:22,title:23,title_value:24,acc_title:25,acc_title_value:26,acc_descr:27,acc_descr_value:28,acc_descr_multiline_value:29,ALPHANUM:30,ENTITY_NAME:31,attribute:32,attributeType:33,attributeName:34,attributeKeyTypeList:35,attributeComment:36,ATTRIBUTE_WORD:37,attributeKeyType:38,COMMA:39,ATTRIBUTE_KEY:40,COMMENT:41,cardinality:42,relType:43,ZERO_OR_ONE:44,ZERO_OR_MORE:45,ONE_OR_MORE:46,ONLY_ONE:47,NON_IDENTIFYING:48,IDENTIFYING:49,WORD:50,open_directive:51,type_directive:52,arg_directive:53,close_directive:54,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"BLOCK_START",22:"BLOCK_STOP",23:"title",24:"title_value",25:"acc_title",26:"acc_title_value",27:"acc_descr",28:"acc_descr_value",29:"acc_descr_multiline_value",30:"ALPHANUM",31:"ENTITY_NAME",37:"ATTRIBUTE_WORD",39:"COMMA",40:"ATTRIBUTE_KEY",41:"COMMENT",44:"ZERO_OR_ONE",45:"ZERO_OR_MORE",46:"ONE_OR_MORE",47:"ONLY_ONE",48:"NON_IDENTIFYING",49:"IDENTIFYING",50:"WORD",51:"open_directive",52:"type_directive",53:"arg_directive",54:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[10,4],[10,3],[10,1],[10,2],[10,2],[10,2],[10,1],[17,1],[17,1],[21,1],[21,2],[32,2],[32,3],[32,3],[32,4],[33,1],[34,1],[35,1],[35,3],[38,1],[36,1],[18,3],[42,1],[42,1],[42,1],[42,1],[43,1],[43,1],[19,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(_,w,g,D,y,N,nt){var Y=N.length-1;switch(y){case 1:break;case 3:this.$=[];break;case 4:N[Y-1].push(N[Y]),this.$=N[Y-1];break;case 5:case 6:this.$=N[Y];break;case 7:case 8:this.$=[];break;case 12:D.addEntity(N[Y-4]),D.addEntity(N[Y-2]),D.addRelationship(N[Y-4],N[Y],N[Y-2],N[Y-3]);break;case 13:D.addEntity(N[Y-3]),D.addAttributes(N[Y-3],N[Y-1]);break;case 14:D.addEntity(N[Y-2]);break;case 15:D.addEntity(N[Y]);break;case 16:case 17:this.$=N[Y].trim(),D.setAccTitle(this.$);break;case 18:case 19:this.$=N[Y].trim(),D.setAccDescription(this.$);break;case 20:case 43:this.$=N[Y];break;case 21:case 41:case 42:this.$=N[Y].replace(/"/g,"");break;case 22:case 30:this.$=[N[Y]];break;case 23:N[Y].push(N[Y-1]),this.$=N[Y];break;case 24:this.$={attributeType:N[Y-1],attributeName:N[Y]};break;case 25:this.$={attributeType:N[Y-2],attributeName:N[Y-1],attributeKeyTypeList:N[Y]};break;case 26:this.$={attributeType:N[Y-2],attributeName:N[Y-1],attributeComment:N[Y]};break;case 27:this.$={attributeType:N[Y-3],attributeName:N[Y-2],attributeKeyTypeList:N[Y-1],attributeComment:N[Y]};break;case 28:case 29:case 32:this.$=N[Y];break;case 31:N[Y-2].push(N[Y]),this.$=N[Y-2];break;case 33:this.$=N[Y].replace(/"/g,"");break;case 34:this.$={cardA:N[Y],relType:N[Y-1],cardB:N[Y-2]};break;case 35:this.$=D.Cardinality.ZERO_OR_ONE;break;case 36:this.$=D.Cardinality.ZERO_OR_MORE;break;case 37:this.$=D.Cardinality.ONE_OR_MORE;break;case 38:this.$=D.Cardinality.ONLY_ONE;break;case 39:this.$=D.Identification.NON_IDENTIFYING;break;case 40:this.$=D.Identification.IDENTIFYING;break;case 44:D.parseDirective("%%{","open_directive");break;case 45:D.parseDirective(N[Y],"type_directive");break;case 46:N[Y]=N[Y].trim().replace(/'/g,'"'),D.parseDirective(N[Y],"arg_directive");break;case 47:D.parseDirective("}%%","close_directive","er");break}},table:[{3:1,4:e,7:3,12:4,51:r},{1:[3]},t(i,[2,3],{5:6}),{3:7,4:e,7:3,12:4,51:r},{13:8,52:[1,9]},{52:[2,44]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,23:n,25:s,27:a,29:o,30:l,31:h,51:r},{1:[2,2]},{14:23,15:[1,24],54:u},t([15,54],[2,45]),t(i,[2,8],{1:[2,1]}),t(i,[2,4]),{7:15,10:26,12:4,17:16,23:n,25:s,27:a,29:o,30:l,31:h,51:r},t(i,[2,6]),t(i,[2,7]),t(i,[2,11]),t(i,[2,15],{18:27,42:29,20:[1,28],44:f,45:d,46:p,47:m}),{24:[1,34]},{26:[1,35]},{28:[1,36]},t(i,[2,19]),t(b,[2,20]),t(b,[2,21]),{11:[1,37]},{16:38,53:[1,39]},{11:[2,47]},t(i,[2,5]),{17:40,30:l,31:h},{21:41,22:[1,42],32:43,33:44,37:x},{43:46,48:[1,47],49:[1,48]},t(k,[2,35]),t(k,[2,36]),t(k,[2,37]),t(k,[2,38]),t(i,[2,16]),t(i,[2,17]),t(i,[2,18]),t(v,[2,9]),{14:49,54:u},{54:[2,46]},{15:[1,50]},{22:[1,51]},t(i,[2,14]),{21:52,22:[2,22],32:43,33:44,37:x},{34:53,37:[1,54]},{37:[2,28]},{42:55,44:f,45:d,46:p,47:m},t(B,[2,39]),t(B,[2,40]),{11:[1,56]},{19:57,30:[1,60],31:[1,59],50:[1,58]},t(i,[2,13]),{22:[2,23]},t(R,[2,24],{35:61,36:62,38:63,40:P,41:V}),t([22,37,40,41],[2,29]),t([30,31],[2,34]),t(v,[2,10]),t(i,[2,12]),t(i,[2,41]),t(i,[2,42]),t(i,[2,43]),t(R,[2,25],{36:66,39:[1,67],41:V}),t(R,[2,26]),t(O,[2,30]),t(R,[2,33]),t(O,[2,32]),t(R,[2,27]),{38:68,40:P},t(O,[2,31])],defaultActions:{5:[2,44],7:[2,2],25:[2,47],39:[2,46],45:[2,28],52:[2,23]},parseError:function(_,w){if(w.recoverable)this.trace(_);else{var g=new Error(_);throw g.hash=w,g}},parse:function(_){var w=this,g=[0],D=[],y=[null],N=[],nt=this.table,Y="",Z=0,J=0,X=2,tt=1,ot=N.slice.call(arguments,1),at=Object.create(this.lexer),U={yy:{}};for(var Tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Tt)&&(U.yy[Tt]=this.yy[Tt]);at.setInput(_,U.yy),U.yy.lexer=at,U.yy.parser=this,typeof at.yylloc>"u"&&(at.yylloc={});var $=at.yylloc;N.push($);var j=at.options&&at.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function W(){var vt;return vt=D.pop()||at.lex()||tt,typeof vt!="number"&&(vt instanceof Array&&(D=vt,vt=D.pop()),vt=w.symbols_[vt]||vt),vt}for(var z,A,M,q,L={},st,T,Dt,et;;){if(A=g[g.length-1],this.defaultActions[A]?M=this.defaultActions[A]:((z===null||typeof z>"u")&&(z=W()),M=nt[A]&&nt[A][z]),typeof M>"u"||!M.length||!M[0]){var Et="";et=[];for(st in nt[A])this.terminals_[st]&&st>X&&et.push("'"+this.terminals_[st]+"'");at.showPosition?Et="Parse error on line "+(Z+1)+`:
1218
+ node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const i=t.x,n=t.y,s=Math.abs(i-r.x),a=t.width/2;let o=r.x<e.x?a-s:a+s;const l=t.height/2,h=Math.abs(e.y-r.y),u=Math.abs(e.x-r.x);if(Math.abs(n-e.y)*a>Math.abs(i-e.x)*l){let f=r.y<e.y?e.y-l-n:n-l-e.y;o=u*f/h;const d={x:r.x<e.x?r.x+o:r.x-u+o,y:r.y<e.y?r.y+h-f:r.y-h+f};return o===0&&(d.x=e.x,d.y=e.y),u===0&&(d.x=e.x),h===0&&(d.y=e.y),I.warn(`abc89 topp/bott calc, Q ${h}, q ${f}, R ${u}, r ${o}`,d),d}else{r.x<e.x?o=e.x-a-i:o=i-a-e.x;let f=h*o/u,d=r.x<e.x?r.x+u-o:r.x-u+o,p=r.y<e.y?r.y+f:r.y-f;return I.warn(`sides calc abc89, Q ${h}, q ${f}, R ${u}, r ${o}`,{_x:d,_y:p}),o===0&&(d=e.x,p=e.y),u===0&&(d=e.x),h===0&&(p=e.y),{x:d,y:p}}},qd=(t,e)=>{I.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],n=!1;return t.forEach(s=>{if(I.info("abc88 checking point",s,e),!kR(e,s)&&!n){const a=wR(e,i,s);I.warn("abc88 inside",s,i,a),I.warn("abc88 intersection",a);let o=!1;r.forEach(l=>{o=o||l.x===a.x&&l.y===a.y}),r.some(l=>l.x===a.x&&l.y===a.y)?I.warn("abc88 no intersect",a,r):r.push(a),n=!0}else I.warn("abc88 outside",s,i),i=s,n||r.push(s)}),I.warn("abc88 returning points",r),r},TR=function(t,e,r,i,n,s){let a=r.points,o=!1;const l=s.node(e.v);var h=s.node(e.w);I.info("abc88 InsertEdge: ",r),h.intersect&&l.intersect&&(a=a.slice(1,r.points.length-1),a.unshift(l.intersect(a[0])),I.info("Last point",a[a.length-1],h,h.intersect(a[a.length-1])),a.push(h.intersect(a[a.length-1]))),r.toCluster&&(I.info("to cluster abc88",i[r.toCluster]),a=qd(r.points,i[r.toCluster].node),o=!0),r.fromCluster&&(I.info("from cluster abc88",i[r.fromCluster]),a=qd(a.reverse(),i[r.fromCluster].node).reverse(),o=!0);const u=a.filter(k=>!Number.isNaN(k.y));let f;n==="graph"||n==="flowchart"?f=r.curve||Ss:f=Ss;const d=Us().x(function(k){return k.x}).y(function(k){return k.y}).curve(f);let p;switch(r.thickness){case"normal":p="edge-thickness-normal";break;case"thick":p="edge-thickness-thick";break;default:p=""}switch(r.pattern){case"solid":p+=" edge-pattern-solid";break;case"dotted":p+=" edge-pattern-dotted";break;case"dashed":p+=" edge-pattern-dashed";break}const m=t.append("path").attr("d",d(u)).attr("id",r.id).attr("class"," "+p+(r.classes?" "+r.classes:"")).attr("style",r.style);let b="";switch((G().flowchart.arrowMarkerAbsolute||G().state.arrowMarkerAbsolute)&&(b=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,b=b.replace(/\(/g,"\\("),b=b.replace(/\)/g,"\\)")),I.info("arrowTypeStart",r.arrowTypeStart),I.info("arrowTypeEnd",r.arrowTypeEnd),r.arrowTypeStart){case"arrow_cross":m.attr("marker-start","url("+b+"#"+n+"-crossStart)");break;case"arrow_point":m.attr("marker-start","url("+b+"#"+n+"-pointStart)");break;case"arrow_barb":m.attr("marker-start","url("+b+"#"+n+"-barbStart)");break;case"arrow_circle":m.attr("marker-start","url("+b+"#"+n+"-circleStart)");break;case"aggregation":m.attr("marker-start","url("+b+"#"+n+"-aggregationStart)");break;case"extension":m.attr("marker-start","url("+b+"#"+n+"-extensionStart)");break;case"composition":m.attr("marker-start","url("+b+"#"+n+"-compositionStart)");break;case"dependency":m.attr("marker-start","url("+b+"#"+n+"-dependencyStart)");break;case"lollipop":m.attr("marker-start","url("+b+"#"+n+"-lollipopStart)");break}switch(r.arrowTypeEnd){case"arrow_cross":m.attr("marker-end","url("+b+"#"+n+"-crossEnd)");break;case"arrow_point":m.attr("marker-end","url("+b+"#"+n+"-pointEnd)");break;case"arrow_barb":m.attr("marker-end","url("+b+"#"+n+"-barbEnd)");break;case"arrow_circle":m.attr("marker-end","url("+b+"#"+n+"-circleEnd)");break;case"aggregation":m.attr("marker-end","url("+b+"#"+n+"-aggregationEnd)");break;case"extension":m.attr("marker-end","url("+b+"#"+n+"-extensionEnd)");break;case"composition":m.attr("marker-end","url("+b+"#"+n+"-compositionEnd)");break;case"dependency":m.attr("marker-end","url("+b+"#"+n+"-dependencyEnd)");break;case"lollipop":m.attr("marker-end","url("+b+"#"+n+"-lollipopEnd)");break}let x={};return o&&(x.updatedPath=a),x.originalPath=r.points,x},nm=(t,e,r,i)=>{I.info("Graph in recursive render: XXX",Yi(e),i);const n=e.graph().rankdir;I.trace("Dir in recursive render - dir:",n);const s=t.insert("g").attr("class","root");e.nodes()?I.info("Recursive render XXX",e.nodes()):I.info("No nodes found for",e),e.edges().length>0&&I.trace("Recursive edges",e.edge(e.edges()[0]));const a=s.insert("g").attr("class","clusters"),o=s.insert("g").attr("class","edgePaths"),l=s.insert("g").attr("class","edgeLabels"),h=s.insert("g").attr("class","nodes");e.nodes().forEach(function(f){const d=e.node(f);if(i!==void 0){const p=JSON.parse(JSON.stringify(i.clusterData));I.info("Setting data for cluster XXX (",f,") ",p,i),e.setNode(i.id,p),e.parent(f)||(I.trace("Setting parent",f,i.id),e.setParent(f,i.id,p))}if(I.info("(Insert) Node XXX"+f+": "+JSON.stringify(e.node(f))),d&&d.clusterNode){I.info("Cluster identified",f,d.width,e.node(f));const p=nm(h,d.graph,r,e.node(f)),m=p.elem;Ie(d,m),d.diff=p.diff||0,I.info("Node bounds (abc123)",f,d,d.width,d.x,d.y),hR(m,d),I.warn("Recursive render complete ",m,d)}else e.children(f).length>0?(I.info("Cluster - the non recursive path XXX",f,d.id,d,e),I.info(Xa(d.id,e)),ce[d.id]={id:Xa(d.id,e),node:d}):(I.info("Node - the non recursive path",f,d.id,d),cR(h,e.node(f),n))}),e.edges().forEach(function(f){const d=e.edge(f.v,f.w,f.name);I.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(f)),I.info("Edge "+f.v+" -> "+f.w+": ",f," ",JSON.stringify(e.edge(f))),I.info("Fix",ce,"ids:",f.v,f.w,"Translateing: ",ce[f.v],ce[f.w]),xR(l,d)}),e.edges().forEach(function(f){I.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(f))}),I.info("#############################################"),I.info("### Layout ###"),I.info("#############################################"),I.info(e),$s(e),I.info("Graph after layout:",Yi(e));let u=0;return ON(e).forEach(function(f){const d=e.node(f);I.info("Position "+f+": "+JSON.stringify(e.node(f))),I.info("Position "+f+": ("+d.x,","+d.y,") width: ",d.width," height: ",d.height),d&&d.clusterNode?Hd(d):e.children(f).length>0?(mR(a,d),ce[d.id].node=d):Hd(d)}),e.edges().forEach(function(f){const d=e.edge(f);I.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(d),d);const p=TR(o,f,d,ce,r,e);vR(d,p)}),e.nodes().forEach(function(f){const d=e.node(f);I.info(f,d.type,d.diff),d.type==="group"&&(u=d.diff)}),{elem:s,diff:u}},s0=(t,e,r,i,n)=>{LN(t,r,i,n),uR(),_R(),bR(),MN(),I.warn("Graph at first:",Yi(e)),RN(e),I.warn("Graph after:",Yi(e)),nm(t,e,i)},sm=t=>Xt.sanitizeText(t,G());let am={dividerMargin:10,padding:5,textHeight:10};const ER=function(t,e,r,i){const n=Object.keys(t);I.info("keys:",n),I.info(t),n.forEach(function(s){const a=t[s];let o="";a.cssClasses.length>0&&(o=o+" "+a.cssClasses.join(" "));const l={labelStyle:""};let h=a.text!==void 0?a.text:a.id,u=0,f="";switch(a.type){case"class":f="class_box";break;default:f="class_box"}e.setNode(a.id,{labelStyle:l.labelStyle,shape:f,labelText:sm(h),classData:a,rx:u,ry:u,class:o,style:l.style,id:a.id,domId:a.domId,tooltip:i.db.getTooltip(a.id)||"",haveCallback:a.haveCallback,link:a.link,width:a.type==="group"?500:void 0,type:a.type,padding:G().flowchart.padding}),I.info("setNode",{labelStyle:l.labelStyle,shape:f,labelText:h,rx:u,ry:u,class:o,style:l.style,id:a.id,width:a.type==="group"?500:void 0,type:a.type,padding:G().flowchart.padding})})},CR=function(t,e,r,i){I.info(t),t.forEach(function(n,s){const a=n;let o="";const l={labelStyle:"",style:""};let h=a.text,u=0,f="note";if(e.setNode(a.id,{labelStyle:l.labelStyle,shape:f,labelText:sm(h),noteData:a,rx:u,ry:u,class:o,style:l.style,id:a.id,domId:a.id,tooltip:"",type:"note",padding:G().flowchart.padding}),I.info("setNode",{labelStyle:l.labelStyle,shape:f,labelText:h,rx:u,ry:u,style:l.style,id:a.id,type:"note",padding:G().flowchart.padding}),!a.class||!(a.class in i))return;const d=r+s,p={};p.classes="relation",p.pattern="dotted",p.id=`edgeNote${d}`,p.arrowhead="none",I.info(`Note edge: ${JSON.stringify(p)}, ${JSON.stringify(a)}`),p.startLabelRight="",p.endLabelLeft="",p.arrowTypeStart="none",p.arrowTypeEnd="none";let m="fill:none",b="";p.style=m,p.labelStyle=b,p.curve=Zr(am.curve,Cr),e.setEdge(a.id,a.class,p,d)})},SR=function(t,e){const r=G().flowchart;let i=0;t.forEach(function(n){i++;const s={};s.classes="relation",s.pattern=n.relation.lineType==1?"dashed":"solid",s.id="id"+i,n.type==="arrow_open"?s.arrowhead="none":s.arrowhead="normal",I.info(s,n),s.startLabelRight=n.relationTitle1==="none"?"":n.relationTitle1,s.endLabelLeft=n.relationTitle2==="none"?"":n.relationTitle2,s.arrowTypeStart=Gd(n.relation.type1),s.arrowTypeEnd=Gd(n.relation.type2);let a="",o="";if(n.style!==void 0){const l=dn(n.style);a=l.style,o=l.labelStyle}else a="fill:none";s.style=a,s.labelStyle=o,n.interpolate!==void 0?s.curve=Zr(n.interpolate,Cr):t.defaultInterpolate!==void 0?s.curve=Zr(t.defaultInterpolate,Cr):s.curve=Zr(r.curve,Cr),n.text=n.title,n.text===void 0?n.style!==void 0&&(s.arrowheadStyle="fill: #333"):(s.arrowheadStyle="fill: #333",s.labelpos="c",G().flowchart.htmlLabels?(s.labelType="html",s.label='<span class="edgeLabel">'+n.text+"</span>"):(s.labelType="text",s.label=n.text.replace(Xt.lineBreakRegex,`
1219
+ `),n.style===void 0&&(s.style=s.style||"stroke: #333; stroke-width: 1.5px;fill:none"),s.labelStyle=s.labelStyle.replace("color:","fill:"))),e.setEdge(n.id1,n.id2,s,i)})},AR=function(t){Object.keys(t).forEach(function(r){am[r]=t[r]})},LR=function(t,e,r,i){I.info("Drawing class - ",e);const n=G().flowchart,s=G().securityLevel;I.info("config:",n);const a=n.nodeSpacing||50,o=n.rankSpacing||50,l=new Pe({multigraph:!0,compound:!0}).setGraph({rankdir:i.db.getDirection(),nodesep:a,ranksep:o,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),h=i.db.getClasses(),u=i.db.getRelations(),f=i.db.getNotes();I.info(u),ER(h,l,e,i),SR(u,l),CR(f,l,u.length+1,h);let d;s==="sandbox"&&(d=_t("#i"+e));const p=_t(s==="sandbox"?d.nodes()[0].contentDocument.body:"body"),m=p.select(`[id="${e}"]`),b=p.select("#"+e+" g");if(s0(b,l,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",e),jt.insertTitle(m,"classTitleText",n.titleTopMargin,i.db.getDiagramTitle()),Vc(l,m,n.diagramPadding,n.useMaxWidth),!n.htmlLabels){const x=s==="sandbox"?d.nodes()[0].contentDocument:document,k=x.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const v of k){const B=v.getBBox(),R=x.createElementNS("http://www.w3.org/2000/svg","rect");R.setAttribute("rx",0),R.setAttribute("ry",0),R.setAttribute("width",B.width),R.setAttribute("height",B.height),v.insertBefore(R,v.firstChild)}}};function Gd(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}const BR={setConf:AR,draw:LR};var Iu=function(){var t=function(E,_,w,g){for(w=w||{},g=E.length;g--;w[E[g]]=_);return w},e=[1,2],r=[1,5],i=[6,9,11,23,25,27,29,30,31,51],n=[1,17],s=[1,18],a=[1,19],o=[1,20],l=[1,21],h=[1,22],u=[1,25],f=[1,30],d=[1,31],p=[1,32],m=[1,33],b=[6,9,11,15,20,23,25,27,29,30,31,44,45,46,47,51],x=[1,45],k=[30,31,48,49],v=[4,6,9,11,23,25,27,29,30,31,51],B=[44,45,46,47],R=[22,37],P=[1,65],V=[1,64],O=[22,37,39,41],F={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,entityName:17,relSpec:18,role:19,BLOCK_START:20,attributes:21,BLOCK_STOP:22,title:23,title_value:24,acc_title:25,acc_title_value:26,acc_descr:27,acc_descr_value:28,acc_descr_multiline_value:29,ALPHANUM:30,ENTITY_NAME:31,attribute:32,attributeType:33,attributeName:34,attributeKeyTypeList:35,attributeComment:36,ATTRIBUTE_WORD:37,attributeKeyType:38,COMMA:39,ATTRIBUTE_KEY:40,COMMENT:41,cardinality:42,relType:43,ZERO_OR_ONE:44,ZERO_OR_MORE:45,ONE_OR_MORE:46,ONLY_ONE:47,NON_IDENTIFYING:48,IDENTIFYING:49,WORD:50,open_directive:51,type_directive:52,arg_directive:53,close_directive:54,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"BLOCK_START",22:"BLOCK_STOP",23:"title",24:"title_value",25:"acc_title",26:"acc_title_value",27:"acc_descr",28:"acc_descr_value",29:"acc_descr_multiline_value",30:"ALPHANUM",31:"ENTITY_NAME",37:"ATTRIBUTE_WORD",39:"COMMA",40:"ATTRIBUTE_KEY",41:"COMMENT",44:"ZERO_OR_ONE",45:"ZERO_OR_MORE",46:"ONE_OR_MORE",47:"ONLY_ONE",48:"NON_IDENTIFYING",49:"IDENTIFYING",50:"WORD",51:"open_directive",52:"type_directive",53:"arg_directive",54:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[10,4],[10,3],[10,1],[10,2],[10,2],[10,2],[10,1],[17,1],[17,1],[21,1],[21,2],[32,2],[32,3],[32,3],[32,4],[33,1],[34,1],[35,1],[35,3],[38,1],[36,1],[18,3],[42,1],[42,1],[42,1],[42,1],[43,1],[43,1],[19,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(_,w,g,D,y,N,nt){var Y=N.length-1;switch(y){case 1:break;case 3:this.$=[];break;case 4:N[Y-1].push(N[Y]),this.$=N[Y-1];break;case 5:case 6:this.$=N[Y];break;case 7:case 8:this.$=[];break;case 12:D.addEntity(N[Y-4]),D.addEntity(N[Y-2]),D.addRelationship(N[Y-4],N[Y],N[Y-2],N[Y-3]);break;case 13:D.addEntity(N[Y-3]),D.addAttributes(N[Y-3],N[Y-1]);break;case 14:D.addEntity(N[Y-2]);break;case 15:D.addEntity(N[Y]);break;case 16:case 17:this.$=N[Y].trim(),D.setAccTitle(this.$);break;case 18:case 19:this.$=N[Y].trim(),D.setAccDescription(this.$);break;case 20:case 43:this.$=N[Y];break;case 21:case 41:case 42:this.$=N[Y].replace(/"/g,"");break;case 22:case 30:this.$=[N[Y]];break;case 23:N[Y].push(N[Y-1]),this.$=N[Y];break;case 24:this.$={attributeType:N[Y-1],attributeName:N[Y]};break;case 25:this.$={attributeType:N[Y-2],attributeName:N[Y-1],attributeKeyTypeList:N[Y]};break;case 26:this.$={attributeType:N[Y-2],attributeName:N[Y-1],attributeComment:N[Y]};break;case 27:this.$={attributeType:N[Y-3],attributeName:N[Y-2],attributeKeyTypeList:N[Y-1],attributeComment:N[Y]};break;case 28:case 29:case 32:this.$=N[Y];break;case 31:N[Y-2].push(N[Y]),this.$=N[Y-2];break;case 33:this.$=N[Y].replace(/"/g,"");break;case 34:this.$={cardA:N[Y],relType:N[Y-1],cardB:N[Y-2]};break;case 35:this.$=D.Cardinality.ZERO_OR_ONE;break;case 36:this.$=D.Cardinality.ZERO_OR_MORE;break;case 37:this.$=D.Cardinality.ONE_OR_MORE;break;case 38:this.$=D.Cardinality.ONLY_ONE;break;case 39:this.$=D.Identification.NON_IDENTIFYING;break;case 40:this.$=D.Identification.IDENTIFYING;break;case 44:D.parseDirective("%%{","open_directive");break;case 45:D.parseDirective(N[Y],"type_directive");break;case 46:N[Y]=N[Y].trim().replace(/'/g,'"'),D.parseDirective(N[Y],"arg_directive");break;case 47:D.parseDirective("}%%","close_directive","er");break}},table:[{3:1,4:e,7:3,12:4,51:r},{1:[3]},t(i,[2,3],{5:6}),{3:7,4:e,7:3,12:4,51:r},{13:8,52:[1,9]},{52:[2,44]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,23:n,25:s,27:a,29:o,30:l,31:h,51:r},{1:[2,2]},{14:23,15:[1,24],54:u},t([15,54],[2,45]),t(i,[2,8],{1:[2,1]}),t(i,[2,4]),{7:15,10:26,12:4,17:16,23:n,25:s,27:a,29:o,30:l,31:h,51:r},t(i,[2,6]),t(i,[2,7]),t(i,[2,11]),t(i,[2,15],{18:27,42:29,20:[1,28],44:f,45:d,46:p,47:m}),{24:[1,34]},{26:[1,35]},{28:[1,36]},t(i,[2,19]),t(b,[2,20]),t(b,[2,21]),{11:[1,37]},{16:38,53:[1,39]},{11:[2,47]},t(i,[2,5]),{17:40,30:l,31:h},{21:41,22:[1,42],32:43,33:44,37:x},{43:46,48:[1,47],49:[1,48]},t(k,[2,35]),t(k,[2,36]),t(k,[2,37]),t(k,[2,38]),t(i,[2,16]),t(i,[2,17]),t(i,[2,18]),t(v,[2,9]),{14:49,54:u},{54:[2,46]},{15:[1,50]},{22:[1,51]},t(i,[2,14]),{21:52,22:[2,22],32:43,33:44,37:x},{34:53,37:[1,54]},{37:[2,28]},{42:55,44:f,45:d,46:p,47:m},t(B,[2,39]),t(B,[2,40]),{11:[1,56]},{19:57,30:[1,60],31:[1,59],50:[1,58]},t(i,[2,13]),{22:[2,23]},t(R,[2,24],{35:61,36:62,38:63,40:P,41:V}),t([22,37,40,41],[2,29]),t([30,31],[2,34]),t(v,[2,10]),t(i,[2,12]),t(i,[2,41]),t(i,[2,42]),t(i,[2,43]),t(R,[2,25],{36:66,39:[1,67],41:V}),t(R,[2,26]),t(O,[2,30]),t(R,[2,33]),t(O,[2,32]),t(R,[2,27]),{38:68,40:P},t(O,[2,31])],defaultActions:{5:[2,44],7:[2,2],25:[2,47],39:[2,46],45:[2,28],52:[2,23]},parseError:function(_,w){if(w.recoverable)this.trace(_);else{var g=new Error(_);throw g.hash=w,g}},parse:function(_){var w=this,g=[0],D=[],y=[null],N=[],nt=this.table,Y="",Z=0,J=0,X=2,tt=1,ot=N.slice.call(arguments,1),at=Object.create(this.lexer),U={yy:{}};for(var Tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Tt)&&(U.yy[Tt]=this.yy[Tt]);at.setInput(_,U.yy),U.yy.lexer=at,U.yy.parser=this,typeof at.yylloc>"u"&&(at.yylloc={});var $=at.yylloc;N.push($);var j=at.options&&at.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function W(){var vt;return vt=D.pop()||at.lex()||tt,typeof vt!="number"&&(vt instanceof Array&&(D=vt,vt=D.pop()),vt=w.symbols_[vt]||vt),vt}for(var z,A,M,q,L={},st,T,Dt,et;;){if(A=g[g.length-1],this.defaultActions[A]?M=this.defaultActions[A]:((z===null||typeof z>"u")&&(z=W()),M=nt[A]&&nt[A][z]),typeof M>"u"||!M.length||!M[0]){var Et="";et=[];for(st in nt[A])this.terminals_[st]&&st>X&&et.push("'"+this.terminals_[st]+"'");at.showPosition?Et="Parse error on line "+(Z+1)+`:
1220
1220
  `+at.showPosition()+`
1221
1221
  Expecting `+et.join(", ")+", got '"+(this.terminals_[z]||z)+"'":Et="Parse error on line "+(Z+1)+": Unexpected "+(z==tt?"end of input":"'"+(this.terminals_[z]||z)+"'"),this.parseError(Et,{text:at.match,token:this.terminals_[z]||z,line:at.yylineno,loc:$,expected:et})}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+z);switch(M[0]){case 1:g.push(z),y.push(at.yytext),N.push(at.yylloc),g.push(M[1]),z=null,J=at.yyleng,Y=at.yytext,Z=at.yylineno,$=at.yylloc;break;case 2:if(T=this.productions_[M[1]][1],L.$=y[y.length-T],L._$={first_line:N[N.length-(T||1)].first_line,last_line:N[N.length-1].last_line,first_column:N[N.length-(T||1)].first_column,last_column:N[N.length-1].last_column},j&&(L._$.range=[N[N.length-(T||1)].range[0],N[N.length-1].range[1]]),q=this.performAction.apply(L,[Y,J,Z,U.yy,M[1],y,N].concat(ot)),typeof q<"u")return q;T&&(g=g.slice(0,-1*T*2),y=y.slice(0,-1*T),N=N.slice(0,-1*T)),g.push(this.productions_[M[1]][0]),y.push(L.$),N.push(L._$),Dt=nt[g[g.length-2]][g[g.length-1]],g.push(Dt);break;case 3:return!0}}return!0}},C=function(){var E={EOF:1,parseError:function(w,g){if(this.yy.parser)this.yy.parser.parseError(w,g);else throw new Error(w)},setInput:function(_,w){return this.yy=w||this.yy||{},this._input=_,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},input:function(){var _=this._input[0];this.yytext+=_,this.yyleng++,this.offset++,this.match+=_,this.matched+=_;var w=_.match(/(?:\r\n?|\n).*/g);return w?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),_},unput:function(_){var w=_.length,g=_.split(/(?:\r\n?|\n)/g);this._input=_+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-w),this.offset-=w;var D=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),g.length-1&&(this.yylineno-=g.length-1);var y=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:g?(g.length===D.length?this.yylloc.first_column:0)+D[D.length-g.length].length-g[0].length:this.yylloc.first_column-w},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-w]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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).
1222
1222
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(_){this.unput(this.match.slice(_))},pastInput:function(){var _=this.matched.substr(0,this.matched.length-this.match.length);return(_.length>20?"...":"")+_.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var _=this.match;return _.length<20&&(_+=this._input.substr(0,20-_.length)),(_.substr(0,20)+(_.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var _=this.pastInput(),w=new Array(_.length+1).join("-");return _+this.upcomingInput()+`
1223
1223
  `+w+"^"},test_match:function(_,w){var g,D,y;if(this.options.backtrack_lexer&&(y={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&&(y.yylloc.range=this.yylloc.range.slice(0))),D=_[0].match(/(?:\r\n?|\n).*/g),D&&(this.yylineno+=D.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:D?D[D.length-1].length-D[D.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+_[0].length},this.yytext+=_[0],this.match+=_[0],this.matches=_,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(_[0].length),this.matched+=_[0],g=this.performAction.call(this,this.yy,this,w,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var N in y)this[N]=y[N];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var _,w,g,D;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),N=0;N<y.length;N++)if(g=this._input.match(this.rules[y[N]]),g&&(!w||g[0].length>w[0].length)){if(w=g,D=N,this.options.backtrack_lexer){if(_=this.test_match(g,y[N]),_!==!1)return _;if(this._backtrack){w=!1;continue}else return!1}else if(!this.options.flex)break}return w?(_=this.test_match(w,y[D]),_!==!1?_:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1224
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var w=this.next();return w||this.lex()},begin:function(w){this.conditionStack.push(w)},popState:function(){var w=this.conditionStack.length-1;return w>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(w){return w=this.conditionStack.length-1-Math.abs(w||0),w>=0?this.conditionStack[w]:"INITIAL"},pushState:function(w){this.begin(w)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(w,g,D,y){switch(D){case 0:return this.begin("acc_title"),25;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),27;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.begin("open_directive"),51;case 8:return this.begin("type_directive"),52;case 9:return this.popState(),this.begin("arg_directive"),15;case 10:return this.popState(),this.popState(),54;case 11:return 53;case 12:break;case 13:break;case 14:return 11;case 15:break;case 16:return 9;case 17:return 31;case 18:return 50;case 19:return 4;case 20:return this.begin("block"),20;case 21:return 39;case 22:break;case 23:return 40;case 24:return 37;case 25:return 37;case 26:return 41;case 27:break;case 28:return this.popState(),22;case 29:return g.yytext[0];case 30:return 44;case 31:return 46;case 32:return 46;case 33:return 46;case 34:return 44;case 35:return 44;case 36:return 45;case 37:return 45;case 38:return 45;case 39:return 45;case 40:return 45;case 41:return 46;case 42:return 45;case 43:return 46;case 44:return 47;case 45:return 47;case 46:return 47;case 47:return 47;case 48:return 44;case 49:return 45;case 50:return 46;case 51:return 48;case 52:return 49;case 53:return 49;case 54:return 48;case 55:return 48;case 56:return 48;case 57:return 30;case 58:return g.yytext[0];case 59:return 6}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:,)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/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,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},open_directive:{rules:[8],inclusive:!1},type_directive:{rules:[9,10],inclusive:!1},arg_directive:{rules:[10,11],inclusive:!1},block:{rules:[21,22,23,24,25,26,27,28,29],inclusive:!1},INITIAL:{rules:[0,2,4,7,12,13,14,15,16,17,18,19,20,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59],inclusive:!0}}};return E}();F.lexer=C;function S(){this.yy={}}return S.prototype=F,F.Parser=S,new S}();Iu.parser=Iu;const BR=Iu,DR=t=>t.match(/^\s*erDiagram/)!==null;let wa={},s0=[];const IR={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE"},MR={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},NR=function(t,e,r){xe.parseDirective(this,t,e,r)},am=function(t){return wa[t]===void 0&&(wa[t]={attributes:[]},I.info("Added new entity :",t)),wa[t]},RR=()=>wa,OR=function(t,e){let r=am(t),i;for(i=e.length-1;i>=0;i--)r.attributes.push(e[i]),I.debug("Added attribute ",e[i].attributeName)},FR=function(t,e,r,i){let n={entityA:t,roleA:e,entityB:r,relSpec:i};s0.push(n),I.debug("Added new relationship :",n)},PR=()=>s0,VR=function(){wa={},s0=[],Lr()},YR={Cardinality:IR,Identification:MR,parseDirective:NR,getConfig:()=>G().er,addEntity:am,addAttributes:OR,getEntities:RR,addRelationship:FR,getRelationships:PR,clear:VR,setAccTitle:kr,getAccTitle:Br,setAccDescription:Dr,getAccDescription:Ir,setDiagramTitle:si,getDiagramTitle:ai},Di={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END"},zR=function(t,e){let r;t.append("defs").append("marker").attr("id",Di.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",Di.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",Di.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",Di.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",Di.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",Di.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),r=t.append("defs").append("marker").attr("id",Di.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),r=t.append("defs").append("marker").attr("id",Di.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},Ii={ERMarkers:Di,insertMarkers:zR},UR=/[^\dA-Za-z](\W)*/g;let Ue={},Ka=new Map;const WR=function(t){const e=Object.keys(t);for(const r of e)Ue[r]=t[r]},HR=(t,e,r)=>{const i=Ue.entityPadding/3,n=Ue.entityPadding/3,s=Ue.fontSize*.85,a=e.node().getBBox(),o=[];let l=!1,h=!1,u=0,f=0,d=0,p=0,m=a.height+i*2,b=1;r.forEach(B=>{B.attributeKeyTypeList!==void 0&&B.attributeKeyTypeList.length>0&&(l=!0),B.attributeComment!==void 0&&(h=!0)}),r.forEach(B=>{const R=`${e.node().id}-attr-${b}`;let P=0;const V=an(B.attributeType),O=t.append("text").classed("er entityLabel",!0).attr("id",`${R}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",G().fontFamily).style("font-size",s+"px").text(V),F=t.append("text").classed("er entityLabel",!0).attr("id",`${R}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",G().fontFamily).style("font-size",s+"px").text(B.attributeName),C={};C.tn=O,C.nn=F;const S=O.node().getBBox(),E=F.node().getBBox();if(u=Math.max(u,S.width),f=Math.max(f,E.width),P=Math.max(S.height,E.height),l){const _=B.attributeKeyTypeList!==void 0?B.attributeKeyTypeList.join(","):"",w=t.append("text").classed("er entityLabel",!0).attr("id",`${R}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",G().fontFamily).style("font-size",s+"px").text(_);C.kn=w;const g=w.node().getBBox();d=Math.max(d,g.width),P=Math.max(P,g.height)}if(h){const _=t.append("text").classed("er entityLabel",!0).attr("id",`${R}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",G().fontFamily).style("font-size",s+"px").text(B.attributeComment||"");C.cn=_;const w=_.node().getBBox();p=Math.max(p,w.width),P=Math.max(P,w.height)}C.height=P,o.push(C),m+=P+i*2,b+=1});let x=4;l&&(x+=2),h&&(x+=2);const k=u+f+d+p,v={width:Math.max(Ue.minEntityWidth,Math.max(a.width+Ue.entityPadding*2,k+n*x)),height:r.length>0?m:Math.max(Ue.minEntityHeight,a.height+Ue.entityPadding*2)};if(r.length>0){const B=Math.max(0,(v.width-k-n*x)/(x/2));e.attr("transform","translate("+v.width/2+","+(i+a.height/2)+")");let R=a.height+i*2,P="attributeBoxOdd";o.forEach(V=>{const O=R+i+V.height/2;V.tn.attr("transform","translate("+n+","+O+")");const F=t.insert("rect","#"+V.tn.node().id).classed(`er ${P}`,!0).attr("x",0).attr("y",R).attr("width",u+n*2+B).attr("height",V.height+i*2),C=parseFloat(F.attr("x"))+parseFloat(F.attr("width"));V.nn.attr("transform","translate("+(C+n)+","+O+")");const S=t.insert("rect","#"+V.nn.node().id).classed(`er ${P}`,!0).attr("x",C).attr("y",R).attr("width",f+n*2+B).attr("height",V.height+i*2);let E=parseFloat(S.attr("x"))+parseFloat(S.attr("width"));if(l){V.kn.attr("transform","translate("+(E+n)+","+O+")");const _=t.insert("rect","#"+V.kn.node().id).classed(`er ${P}`,!0).attr("x",E).attr("y",R).attr("width",d+n*2+B).attr("height",V.height+i*2);E=parseFloat(_.attr("x"))+parseFloat(_.attr("width"))}h&&(V.cn.attr("transform","translate("+(E+n)+","+O+")"),t.insert("rect","#"+V.cn.node().id).classed(`er ${P}`,"true").attr("x",E).attr("y",R).attr("width",p+n*2+B).attr("height",V.height+i*2)),R+=V.height+i*2,P=P==="attributeBoxOdd"?"attributeBoxEven":"attributeBoxOdd"})}else v.height=Math.max(Ue.minEntityHeight,m),e.attr("transform","translate("+v.width/2+","+v.height/2+")");return v},qR=function(t,e,r){const i=Object.keys(e);let n;return i.forEach(function(s){const a=ZR(s,"entity");Ka.set(s,a);const o=t.append("g").attr("id",a);n=n===void 0?a:n;const l="text-"+a,h=o.append("text").classed("er entityLabel",!0).attr("id",l).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",G().fontFamily).style("font-size",Ue.fontSize+"px").text(s),{width:u,height:f}=HR(o,h,e[s].attributes),p=o.insert("rect","#"+l).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",u).attr("height",f).node().getBBox();r.setNode(a,{width:p.width,height:p.height,shape:"rect",id:a})}),n},GR=function(t,e){e.nodes().forEach(function(r){r!==void 0&&e.node(r)!==void 0&&t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )")})},om=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},$R=function(t,e){return t.forEach(function(r){e.setEdge(Ka.get(r.entityA),Ka.get(r.entityB),{relationship:r},om(r))}),t};let Gd=0;const jR=function(t,e,r,i,n){Gd++;const s=r.edge(Ka.get(e.entityA),Ka.get(e.entityB),om(e)),a=Us().x(function(m){return m.x}).y(function(m){return m.y}).curve(Ss),o=t.insert("path","#"+i).classed("er relationshipLine",!0).attr("d",a(s.points)).style("stroke",Ue.stroke).style("fill","none");e.relSpec.relType===n.db.Identification.NON_IDENTIFYING&&o.attr("stroke-dasharray","8,8");let l="";switch(Ue.arrowMarkerAbsolute&&(l=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,l=l.replace(/\(/g,"\\("),l=l.replace(/\)/g,"\\)")),e.relSpec.cardA){case n.db.Cardinality.ZERO_OR_ONE:o.attr("marker-end","url("+l+"#"+Ii.ERMarkers.ZERO_OR_ONE_END+")");break;case n.db.Cardinality.ZERO_OR_MORE:o.attr("marker-end","url("+l+"#"+Ii.ERMarkers.ZERO_OR_MORE_END+")");break;case n.db.Cardinality.ONE_OR_MORE:o.attr("marker-end","url("+l+"#"+Ii.ERMarkers.ONE_OR_MORE_END+")");break;case n.db.Cardinality.ONLY_ONE:o.attr("marker-end","url("+l+"#"+Ii.ERMarkers.ONLY_ONE_END+")");break}switch(e.relSpec.cardB){case n.db.Cardinality.ZERO_OR_ONE:o.attr("marker-start","url("+l+"#"+Ii.ERMarkers.ZERO_OR_ONE_START+")");break;case n.db.Cardinality.ZERO_OR_MORE:o.attr("marker-start","url("+l+"#"+Ii.ERMarkers.ZERO_OR_MORE_START+")");break;case n.db.Cardinality.ONE_OR_MORE:o.attr("marker-start","url("+l+"#"+Ii.ERMarkers.ONE_OR_MORE_START+")");break;case n.db.Cardinality.ONLY_ONE:o.attr("marker-start","url("+l+"#"+Ii.ERMarkers.ONLY_ONE_START+")");break}const h=o.node().getTotalLength(),u=o.node().getPointAtLength(h*.5),f="rel"+Gd,p=t.append("text").classed("er relationshipLabel",!0).attr("id",f).attr("x",u.x).attr("y",u.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",G().fontFamily).style("font-size",Ue.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+f).classed("er relationshipLabelBox",!0).attr("x",u.x-p.width/2).attr("y",u.y-p.height/2).attr("width",p.width).attr("height",p.height)},XR=function(t,e,r,i){Ue=G().er,I.info("Drawing ER diagram");const n=G().securityLevel;let s;n==="sandbox"&&(s=_t("#i"+e));const o=_t(n==="sandbox"?s.nodes()[0].contentDocument.body:"body").select(`[id='${e}']`);Ii.insertMarkers(o,Ue);let l;l=new Pe({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:Ue.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});const h=qR(o,i.db.getEntities(),l),u=$R(i.db.getRelationships(),l);$s(l),GR(o,l),u.forEach(function(b){jR(o,b,l,h,i)});const f=Ue.diagramPadding;jt.insertTitle(o,"entityTitleText",Ue.titleTopMargin,i.db.getDiagramTitle());const d=o.node().getBBox(),p=d.width+f*2,m=d.height+f*2;ni(o,m,p,Ue.useMaxWidth),o.attr("viewBox",`${d.x-f} ${d.y-f} ${p} ${m}`)},KR="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";function ZR(t="",e=""){const r=t.replace(UR,"");return`${$d(e)}${$d(r)}${G4(t,KR)}`}function $d(t=""){return t.length>0?`${t}-`:""}const QR={setConf:WR,draw:XR};var Mu=function(){var t=function(wi,Pt,Yt,oe){for(Yt=Yt||{},oe=wi.length;oe--;Yt[wi[oe]]=Pt);return Yt},e=[1,9],r=[1,7],i=[1,6],n=[1,8],s=[1,20,21,22,23,38,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],a=[2,10],o=[1,20],l=[1,21],h=[1,22],u=[1,23],f=[1,30],d=[1,32],p=[1,33],m=[1,34],b=[1,62],x=[1,48],k=[1,52],v=[1,36],B=[1,37],R=[1,38],P=[1,39],V=[1,40],O=[1,56],F=[1,63],C=[1,51],S=[1,53],E=[1,55],_=[1,59],w=[1,60],g=[1,41],D=[1,42],y=[1,43],N=[1,44],nt=[1,61],Y=[1,50],Z=[1,54],J=[1,57],X=[1,58],tt=[1,49],ot=[1,66],at=[1,71],U=[1,20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],Tt=[1,75],$=[1,74],j=[1,76],W=[20,21,23,81,82],z=[1,99],A=[1,104],M=[1,107],q=[1,108],L=[1,101],st=[1,106],T=[1,109],Dt=[1,102],et=[1,114],Et=[1,113],vt=[1,103],pt=[1,105],ut=[1,110],gt=[1,111],ht=[1,112],yt=[1,115],he=[20,21,22,23,81,82],re=[20,21,22,23,53,81,82],Mt=[20,21,22,23,40,52,53,55,57,59,61,63,65,66,67,69,71,73,74,76,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],Nt=[20,21,23],Kt=[20,21,23,52,66,67,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],fe=[1,12,20,21,22,23,24,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],qt=[52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],Ft=[1,149],Bt=[1,157],bt=[1,158],mt=[1,159],wt=[1,160],ft=[1,144],It=[1,145],it=[1,141],Wt=[1,152],ct=[1,153],Gt=[1,154],Jt=[1,155],se=[1,156],ie=[1,161],ae=[1,162],Rt=[1,147],Ht=[1,150],ne=[1,146],Ut=[1,143],ki=[20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],mn=[1,165],me=[20,21,22,23,26,52,66,67,91,105,106,109,111,112,122,123,124,125,126,127],$t=[20,21,22,23,24,26,38,40,41,42,52,56,58,60,62,64,66,67,68,70,72,73,75,77,81,82,86,87,88,89,90,91,92,95,105,106,109,111,112,113,114,122,123,124,125,126,127],Ce=[12,21,22,24],tr=[22,106],Se=[1,250],Ve=[1,245],be=[1,246],Qe=[1,254],qe=[1,251],Lt=[1,248],K=[1,247],xt=[1,249],Ct=[1,252],te=[1,253],de=[1,255],ge=[1,273],Me=[20,21,23,106],Ge=[20,21,22,23,66,67,86,102,105,106,109,110,111,112,113],we={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,openDirective:6,typeDirective:7,closeDirective:8,separator:9,":":10,argDirective:11,open_directive:12,type_directive:13,arg_directive:14,close_directive:15,graphConfig:16,document:17,line:18,statement:19,SEMI:20,NEWLINE:21,SPACE:22,EOF:23,GRAPH:24,NODIR:25,DIR:26,FirstStmtSeperator:27,ending:28,endToken:29,spaceList:30,spaceListNewline:31,verticeStatement:32,styleStatement:33,linkStyleStatement:34,classDefStatement:35,classStatement:36,clickStatement:37,subgraph:38,text:39,SQS:40,SQE:41,end:42,direction:43,acc_title:44,acc_title_value:45,acc_descr:46,acc_descr_value:47,acc_descr_multiline_value:48,link:49,node:50,vertex:51,AMP:52,STYLE_SEPARATOR:53,idString:54,DOUBLECIRCLESTART:55,DOUBLECIRCLEEND:56,PS:57,PE:58,"(-":59,"-)":60,STADIUMSTART:61,STADIUMEND:62,SUBROUTINESTART:63,SUBROUTINEEND:64,VERTEX_WITH_PROPS_START:65,ALPHA:66,COLON:67,PIPE:68,CYLINDERSTART:69,CYLINDEREND:70,DIAMOND_START:71,DIAMOND_STOP:72,TAGEND:73,TRAPSTART:74,TRAPEND:75,INVTRAPSTART:76,INVTRAPEND:77,linkStatement:78,arrowText:79,TESTSTR:80,START_LINK:81,LINK:82,textToken:83,STR:84,keywords:85,STYLE:86,LINKSTYLE:87,CLASSDEF:88,CLASS:89,CLICK:90,DOWN:91,UP:92,textNoTags:93,textNoTagsToken:94,DEFAULT:95,stylesOpt:96,alphaNum:97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,HEX:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,MINUS:109,UNIT:110,BRKT:111,DOT:112,PCT:113,TAGSTART:114,alphaNumToken:115,idStringToken:116,alphaNumStatement:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,PUNCTUATION:122,UNICODE_TEXT:123,PLUS:124,EQUALS:125,MULT:126,UNDERSCORE:127,graphCodeTokens:128,ARROW_CROSS:129,ARROW_POINT:130,ARROW_CIRCLE:131,ARROW_OPEN:132,QUOTE:133,$accept:0,$end:1},terminals_:{2:"error",10:":",12:"open_directive",13:"type_directive",14:"arg_directive",15:"close_directive",20:"SEMI",21:"NEWLINE",22:"SPACE",23:"EOF",24:"GRAPH",25:"NODIR",26:"DIR",38:"subgraph",40:"SQS",41:"SQE",42:"end",44:"acc_title",45:"acc_title_value",46:"acc_descr",47:"acc_descr_value",48:"acc_descr_multiline_value",52:"AMP",53:"STYLE_SEPARATOR",55:"DOUBLECIRCLESTART",56:"DOUBLECIRCLEEND",57:"PS",58:"PE",59:"(-",60:"-)",61:"STADIUMSTART",62:"STADIUMEND",63:"SUBROUTINESTART",64:"SUBROUTINEEND",65:"VERTEX_WITH_PROPS_START",66:"ALPHA",67:"COLON",68:"PIPE",69:"CYLINDERSTART",70:"CYLINDEREND",71:"DIAMOND_START",72:"DIAMOND_STOP",73:"TAGEND",74:"TRAPSTART",75:"TRAPEND",76:"INVTRAPSTART",77:"INVTRAPEND",80:"TESTSTR",81:"START_LINK",82:"LINK",84:"STR",86:"STYLE",87:"LINKSTYLE",88:"CLASSDEF",89:"CLASS",90:"CLICK",91:"DOWN",92:"UP",95:"DEFAULT",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"HEX",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"MINUS",110:"UNIT",111:"BRKT",112:"DOT",113:"PCT",114:"TAGSTART",118:"direction_tb",119:"direction_bt",120:"direction_rl",121:"direction_lr",122:"PUNCTUATION",123:"UNICODE_TEXT",124:"PLUS",125:"EQUALS",126:"MULT",127:"UNDERSCORE",129:"ARROW_CROSS",130:"ARROW_POINT",131:"ARROW_CIRCLE",132:"ARROW_OPEN",133:"QUOTE"},productions_:[0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[19,1],[19,2],[19,2],[19,1],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[50,1],[50,5],[50,3],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,8],[51,4],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,4],[51,4],[51,1],[49,2],[49,3],[49,3],[49,1],[49,3],[78,1],[79,3],[39,1],[39,2],[39,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[93,1],[93,2],[35,5],[35,5],[36,5],[37,2],[37,4],[37,3],[37,5],[37,2],[37,4],[37,4],[37,6],[37,2],[37,4],[37,2],[37,4],[37,4],[37,6],[33,5],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[103,1],[103,3],[96,1],[96,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[94,1],[94,1],[94,1],[94,1],[54,1],[54,2],[97,1],[97,2],[117,1],[117,1],[117,1],[117,1],[43,1],[43,1],[43,1],[43,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1]],performAction:function(Pt,Yt,oe,St,ve,H,Ks){var Q=H.length-1;switch(ve){case 5:St.parseDirective("%%{","open_directive");break;case 6:St.parseDirective(H[Q],"type_directive");break;case 7:H[Q]=H[Q].trim().replace(/'/g,'"'),St.parseDirective(H[Q],"arg_directive");break;case 8:St.parseDirective("}%%","close_directive","flowchart");break;case 10:this.$=[];break;case 11:(!Array.isArray(H[Q])||H[Q].length>0)&&H[Q-1].push(H[Q]),this.$=H[Q-1];break;case 12:case 82:case 84:case 96:case 152:case 154:case 155:this.$=H[Q];break;case 19:St.setDirection("TB"),this.$="TB";break;case 20:St.setDirection(H[Q-1]),this.$=H[Q-1];break;case 35:this.$=H[Q-1].nodes;break;case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 41:this.$=St.addSubGraph(H[Q-6],H[Q-1],H[Q-4]);break;case 42:this.$=St.addSubGraph(H[Q-3],H[Q-1],H[Q-3]);break;case 43:this.$=St.addSubGraph(void 0,H[Q-1],void 0);break;case 45:this.$=H[Q].trim(),St.setAccTitle(this.$);break;case 46:case 47:this.$=H[Q].trim(),St.setAccDescription(this.$);break;case 51:St.addLink(H[Q-2].stmt,H[Q],H[Q-1]),this.$={stmt:H[Q],nodes:H[Q].concat(H[Q-2].nodes)};break;case 52:St.addLink(H[Q-3].stmt,H[Q-1],H[Q-2]),this.$={stmt:H[Q-1],nodes:H[Q-1].concat(H[Q-3].nodes)};break;case 53:this.$={stmt:H[Q-1],nodes:H[Q-1]};break;case 54:this.$={stmt:H[Q],nodes:H[Q]};break;case 55:this.$=[H[Q]];break;case 56:this.$=H[Q-4].concat(H[Q]);break;case 57:this.$=[H[Q-2]],St.setClass(H[Q-2],H[Q]);break;case 58:this.$=H[Q-3],St.addVertex(H[Q-3],H[Q-1],"square");break;case 59:this.$=H[Q-3],St.addVertex(H[Q-3],H[Q-1],"doublecircle");break;case 60:this.$=H[Q-5],St.addVertex(H[Q-5],H[Q-2],"circle");break;case 61:this.$=H[Q-3],St.addVertex(H[Q-3],H[Q-1],"ellipse");break;case 62:this.$=H[Q-3],St.addVertex(H[Q-3],H[Q-1],"stadium");break;case 63:this.$=H[Q-3],St.addVertex(H[Q-3],H[Q-1],"subroutine");break;case 64:this.$=H[Q-7],St.addVertex(H[Q-7],H[Q-1],"rect",void 0,void 0,void 0,Object.fromEntries([[H[Q-5],H[Q-3]]]));break;case 65:this.$=H[Q-3],St.addVertex(H[Q-3],H[Q-1],"cylinder");break;case 66:this.$=H[Q-3],St.addVertex(H[Q-3],H[Q-1],"round");break;case 67:this.$=H[Q-3],St.addVertex(H[Q-3],H[Q-1],"diamond");break;case 68:this.$=H[Q-5],St.addVertex(H[Q-5],H[Q-2],"hexagon");break;case 69:this.$=H[Q-3],St.addVertex(H[Q-3],H[Q-1],"odd");break;case 70:this.$=H[Q-3],St.addVertex(H[Q-3],H[Q-1],"trapezoid");break;case 71:this.$=H[Q-3],St.addVertex(H[Q-3],H[Q-1],"inv_trapezoid");break;case 72:this.$=H[Q-3],St.addVertex(H[Q-3],H[Q-1],"lean_right");break;case 73:this.$=H[Q-3],St.addVertex(H[Q-3],H[Q-1],"lean_left");break;case 74:this.$=H[Q],St.addVertex(H[Q]);break;case 75:H[Q-1].text=H[Q],this.$=H[Q-1];break;case 76:case 77:H[Q-2].text=H[Q-1],this.$=H[Q-2];break;case 78:this.$=H[Q];break;case 79:var Mr=St.destructLink(H[Q],H[Q-2]);this.$={type:Mr.type,stroke:Mr.stroke,length:Mr.length,text:H[Q-1]};break;case 80:var Mr=St.destructLink(H[Q]);this.$={type:Mr.type,stroke:Mr.stroke,length:Mr.length};break;case 81:this.$=H[Q-1];break;case 83:case 97:case 153:this.$=H[Q-1]+""+H[Q];break;case 98:case 99:this.$=H[Q-4],St.addClass(H[Q-2],H[Q]);break;case 100:this.$=H[Q-4],St.setClass(H[Q-2],H[Q]);break;case 101:case 109:this.$=H[Q-1],St.setClickEvent(H[Q-1],H[Q]);break;case 102:case 110:this.$=H[Q-3],St.setClickEvent(H[Q-3],H[Q-2]),St.setTooltip(H[Q-3],H[Q]);break;case 103:this.$=H[Q-2],St.setClickEvent(H[Q-2],H[Q-1],H[Q]);break;case 104:this.$=H[Q-4],St.setClickEvent(H[Q-4],H[Q-3],H[Q-2]),St.setTooltip(H[Q-4],H[Q]);break;case 105:case 111:this.$=H[Q-1],St.setLink(H[Q-1],H[Q]);break;case 106:case 112:this.$=H[Q-3],St.setLink(H[Q-3],H[Q-2]),St.setTooltip(H[Q-3],H[Q]);break;case 107:case 113:this.$=H[Q-3],St.setLink(H[Q-3],H[Q-2],H[Q]);break;case 108:case 114:this.$=H[Q-5],St.setLink(H[Q-5],H[Q-4],H[Q]),St.setTooltip(H[Q-5],H[Q-2]);break;case 115:this.$=H[Q-4],St.addVertex(H[Q-2],void 0,void 0,H[Q]);break;case 116:case 118:this.$=H[Q-4],St.updateLink(H[Q-2],H[Q]);break;case 117:this.$=H[Q-4],St.updateLink([H[Q-2]],H[Q]);break;case 119:this.$=H[Q-8],St.updateLinkInterpolate([H[Q-6]],H[Q-2]),St.updateLink([H[Q-6]],H[Q]);break;case 120:this.$=H[Q-8],St.updateLinkInterpolate(H[Q-6],H[Q-2]),St.updateLink(H[Q-6],H[Q]);break;case 121:this.$=H[Q-6],St.updateLinkInterpolate([H[Q-4]],H[Q]);break;case 122:this.$=H[Q-6],St.updateLinkInterpolate(H[Q-4],H[Q]);break;case 123:case 125:this.$=[H[Q]];break;case 124:case 126:H[Q-2].push(H[Q]),this.$=H[Q-2];break;case 128:this.$=H[Q-1]+H[Q];break;case 150:this.$=H[Q];break;case 151:this.$=H[Q-1]+""+H[Q];break;case 156:this.$="v";break;case 157:this.$="-";break;case 158:this.$={stmt:"dir",value:"TB"};break;case 159:this.$={stmt:"dir",value:"BT"};break;case 160:this.$={stmt:"dir",value:"RL"};break;case 161:this.$={stmt:"dir",value:"LR"};break}},table:[{3:1,4:2,5:3,6:5,12:e,16:4,21:r,22:i,24:n},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:e,16:4,21:r,22:i,24:n},t(s,a,{17:11}),{7:12,13:[1,13]},{16:14,21:r,22:i,24:n},{16:15,21:r,22:i,24:n},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:o,21:l,22:h,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:f,43:31,44:d,46:p,48:m,50:35,51:45,52:b,54:46,66:x,67:k,86:v,87:B,88:R,89:P,90:V,91:O,95:F,105:C,106:S,109:E,111:_,112:w,116:47,118:g,119:D,120:y,121:N,122:nt,123:Y,124:Z,125:J,126:X,127:tt},{8:64,10:[1,65],15:ot},t([10,15],[2,6]),t(s,[2,17]),t(s,[2,18]),t(s,[2,19]),{20:[1,68],21:[1,69],22:at,27:67,30:70},t(U,[2,11]),t(U,[2,12]),t(U,[2,13]),t(U,[2,14]),t(U,[2,15]),t(U,[2,16]),{9:72,20:Tt,21:$,23:j,49:73,78:77,81:[1,78],82:[1,79]},{9:80,20:Tt,21:$,23:j},{9:81,20:Tt,21:$,23:j},{9:82,20:Tt,21:$,23:j},{9:83,20:Tt,21:$,23:j},{9:84,20:Tt,21:$,23:j},{9:86,20:Tt,21:$,22:[1,85],23:j},t(U,[2,44]),{45:[1,87]},{47:[1,88]},t(U,[2,47]),t(W,[2,54],{30:89,22:at}),{22:[1,90]},{22:[1,91]},{22:[1,92]},{22:[1,93]},{26:z,52:A,66:M,67:q,84:[1,97],91:L,97:96,98:[1,94],100:[1,95],105:st,106:T,109:Dt,111:et,112:Et,115:100,117:98,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},t(U,[2,158]),t(U,[2,159]),t(U,[2,160]),t(U,[2,161]),t(he,[2,55],{53:[1,116]}),t(re,[2,74],{116:129,40:[1,117],52:b,55:[1,118],57:[1,119],59:[1,120],61:[1,121],63:[1,122],65:[1,123],66:x,67:k,69:[1,124],71:[1,125],73:[1,126],74:[1,127],76:[1,128],91:O,95:F,105:C,106:S,109:E,111:_,112:w,122:nt,123:Y,124:Z,125:J,126:X,127:tt}),t(Mt,[2,150]),t(Mt,[2,175]),t(Mt,[2,176]),t(Mt,[2,177]),t(Mt,[2,178]),t(Mt,[2,179]),t(Mt,[2,180]),t(Mt,[2,181]),t(Mt,[2,182]),t(Mt,[2,183]),t(Mt,[2,184]),t(Mt,[2,185]),t(Mt,[2,186]),t(Mt,[2,187]),t(Mt,[2,188]),t(Mt,[2,189]),t(Mt,[2,190]),{9:130,20:Tt,21:$,23:j},{11:131,14:[1,132]},t(Nt,[2,8]),t(s,[2,20]),t(s,[2,26]),t(s,[2,27]),{21:[1,133]},t(Kt,[2,34],{30:134,22:at}),t(U,[2,35]),{50:135,51:45,52:b,54:46,66:x,67:k,91:O,95:F,105:C,106:S,109:E,111:_,112:w,116:47,122:nt,123:Y,124:Z,125:J,126:X,127:tt},t(fe,[2,48]),t(fe,[2,49]),t(fe,[2,50]),t(qt,[2,78],{79:136,68:[1,138],80:[1,137]}),{22:Ft,24:Bt,26:bt,38:mt,39:139,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},t([52,66,67,68,80,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,80]),t(U,[2,36]),t(U,[2,37]),t(U,[2,38]),t(U,[2,39]),t(U,[2,40]),{22:Ft,24:Bt,26:bt,38:mt,39:163,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},t(ki,a,{17:164}),t(U,[2,45]),t(U,[2,46]),t(W,[2,53],{52:mn}),{26:z,52:A,66:M,67:q,91:L,97:166,102:[1,167],105:st,106:T,109:Dt,111:et,112:Et,115:100,117:98,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{95:[1,168],103:169,105:[1,170]},{26:z,52:A,66:M,67:q,91:L,95:[1,171],97:172,105:st,106:T,109:Dt,111:et,112:Et,115:100,117:98,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{26:z,52:A,66:M,67:q,91:L,97:173,105:st,106:T,109:Dt,111:et,112:Et,115:100,117:98,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},t(Nt,[2,101],{22:[1,174],99:[1,175]}),t(Nt,[2,105],{22:[1,176]}),t(Nt,[2,109],{115:100,117:178,22:[1,177],26:z,52:A,66:M,67:q,91:L,105:st,106:T,109:Dt,111:et,112:Et,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt}),t(Nt,[2,111],{22:[1,179]}),t(me,[2,152]),t(me,[2,154]),t(me,[2,155]),t(me,[2,156]),t(me,[2,157]),t($t,[2,162]),t($t,[2,163]),t($t,[2,164]),t($t,[2,165]),t($t,[2,166]),t($t,[2,167]),t($t,[2,168]),t($t,[2,169]),t($t,[2,170]),t($t,[2,171]),t($t,[2,172]),t($t,[2,173]),t($t,[2,174]),{52:b,54:180,66:x,67:k,91:O,95:F,105:C,106:S,109:E,111:_,112:w,116:47,122:nt,123:Y,124:Z,125:J,126:X,127:tt},{22:Ft,24:Bt,26:bt,38:mt,39:181,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,39:182,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,39:184,42:wt,52:A,57:[1,183],66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,39:185,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,39:186,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,39:187,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{66:[1,188]},{22:Ft,24:Bt,26:bt,38:mt,39:189,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,39:190,42:wt,52:A,66:M,67:q,71:[1,191],73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,39:192,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,39:193,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,39:194,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},t(Mt,[2,151]),t(Ce,[2,3]),{8:195,15:ot},{15:[2,7]},t(s,[2,28]),t(Kt,[2,33]),t(W,[2,51],{30:196,22:at}),t(qt,[2,75],{22:[1,197]}),{22:[1,198]},{22:Ft,24:Bt,26:bt,38:mt,39:199,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,42:wt,52:A,66:M,67:q,73:ft,81:It,82:[1,200],83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},t($t,[2,82]),t($t,[2,84]),t($t,[2,140]),t($t,[2,141]),t($t,[2,142]),t($t,[2,143]),t($t,[2,144]),t($t,[2,145]),t($t,[2,146]),t($t,[2,147]),t($t,[2,148]),t($t,[2,149]),t($t,[2,85]),t($t,[2,86]),t($t,[2,87]),t($t,[2,88]),t($t,[2,89]),t($t,[2,90]),t($t,[2,91]),t($t,[2,92]),t($t,[2,93]),t($t,[2,94]),t($t,[2,95]),{9:203,20:Tt,21:$,22:Ft,23:j,24:Bt,26:bt,38:mt,40:[1,202],42:wt,52:A,66:M,67:q,73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{18:18,19:19,20:o,21:l,22:h,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:f,42:[1,204],43:31,44:d,46:p,48:m,50:35,51:45,52:b,54:46,66:x,67:k,86:v,87:B,88:R,89:P,90:V,91:O,95:F,105:C,106:S,109:E,111:_,112:w,116:47,118:g,119:D,120:y,121:N,122:nt,123:Y,124:Z,125:J,126:X,127:tt},{22:at,30:205},{22:[1,206],26:z,52:A,66:M,67:q,91:L,105:st,106:T,109:Dt,111:et,112:Et,115:100,117:178,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:[1,207]},{22:[1,208]},{22:[1,209],106:[1,210]},t(tr,[2,123]),{22:[1,211]},{22:[1,212],26:z,52:A,66:M,67:q,91:L,105:st,106:T,109:Dt,111:et,112:Et,115:100,117:178,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:[1,213],26:z,52:A,66:M,67:q,91:L,105:st,106:T,109:Dt,111:et,112:Et,115:100,117:178,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{84:[1,214]},t(Nt,[2,103],{22:[1,215]}),{84:[1,216],101:[1,217]},{84:[1,218]},t(me,[2,153]),{84:[1,219],101:[1,220]},t(he,[2,57],{116:129,52:b,66:x,67:k,91:O,95:F,105:C,106:S,109:E,111:_,112:w,122:nt,123:Y,124:Z,125:J,126:X,127:tt}),{22:Ft,24:Bt,26:bt,38:mt,41:[1,221],42:wt,52:A,66:M,67:q,73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,42:wt,52:A,56:[1,222],66:M,67:q,73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,39:223,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,42:wt,52:A,58:[1,224],66:M,67:q,73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,42:wt,52:A,60:[1,225],66:M,67:q,73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,42:wt,52:A,62:[1,226],66:M,67:q,73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,42:wt,52:A,64:[1,227],66:M,67:q,73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{67:[1,228]},{22:Ft,24:Bt,26:bt,38:mt,42:wt,52:A,66:M,67:q,70:[1,229],73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,42:wt,52:A,66:M,67:q,72:[1,230],73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,39:231,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,41:[1,232],42:wt,52:A,66:M,67:q,73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,42:wt,52:A,66:M,67:q,73:ft,75:[1,233],77:[1,234],81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,42:wt,52:A,66:M,67:q,73:ft,75:[1,236],77:[1,235],81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{9:237,20:Tt,21:$,23:j},t(W,[2,52],{52:mn}),t(qt,[2,77]),t(qt,[2,76]),{22:Ft,24:Bt,26:bt,38:mt,42:wt,52:A,66:M,67:q,68:[1,238],73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},t(qt,[2,79]),t($t,[2,83]),{22:Ft,24:Bt,26:bt,38:mt,39:239,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},t(ki,a,{17:240}),t(U,[2,43]),{51:241,52:b,54:46,66:x,67:k,91:O,95:F,105:C,106:S,109:E,111:_,112:w,116:47,122:nt,123:Y,124:Z,125:J,126:X,127:tt},{22:Se,66:Ve,67:be,86:Qe,96:242,102:qe,105:Lt,107:243,108:244,109:K,110:xt,111:Ct,112:te,113:de},{22:Se,66:Ve,67:be,86:Qe,96:256,102:qe,105:Lt,107:243,108:244,109:K,110:xt,111:Ct,112:te,113:de},{22:Se,66:Ve,67:be,86:Qe,96:257,102:qe,104:[1,258],105:Lt,107:243,108:244,109:K,110:xt,111:Ct,112:te,113:de},{22:Se,66:Ve,67:be,86:Qe,96:259,102:qe,104:[1,260],105:Lt,107:243,108:244,109:K,110:xt,111:Ct,112:te,113:de},{105:[1,261]},{22:Se,66:Ve,67:be,86:Qe,96:262,102:qe,105:Lt,107:243,108:244,109:K,110:xt,111:Ct,112:te,113:de},{22:Se,66:Ve,67:be,86:Qe,96:263,102:qe,105:Lt,107:243,108:244,109:K,110:xt,111:Ct,112:te,113:de},{26:z,52:A,66:M,67:q,91:L,97:264,105:st,106:T,109:Dt,111:et,112:Et,115:100,117:98,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},t(Nt,[2,102]),{84:[1,265]},t(Nt,[2,106],{22:[1,266]}),t(Nt,[2,107]),t(Nt,[2,110]),t(Nt,[2,112],{22:[1,267]}),t(Nt,[2,113]),t(re,[2,58]),t(re,[2,59]),{22:Ft,24:Bt,26:bt,38:mt,42:wt,52:A,58:[1,268],66:M,67:q,73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},t(re,[2,66]),t(re,[2,61]),t(re,[2,62]),t(re,[2,63]),{66:[1,269]},t(re,[2,65]),t(re,[2,67]),{22:Ft,24:Bt,26:bt,38:mt,42:wt,52:A,66:M,67:q,72:[1,270],73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},t(re,[2,69]),t(re,[2,70]),t(re,[2,72]),t(re,[2,71]),t(re,[2,73]),t(Ce,[2,4]),t([22,52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,81]),{22:Ft,24:Bt,26:bt,38:mt,41:[1,271],42:wt,52:A,66:M,67:q,73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{18:18,19:19,20:o,21:l,22:h,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:f,42:[1,272],43:31,44:d,46:p,48:m,50:35,51:45,52:b,54:46,66:x,67:k,86:v,87:B,88:R,89:P,90:V,91:O,95:F,105:C,106:S,109:E,111:_,112:w,116:47,118:g,119:D,120:y,121:N,122:nt,123:Y,124:Z,125:J,126:X,127:tt},t(he,[2,56]),t(Nt,[2,115],{106:ge}),t(Me,[2,125],{108:274,22:Se,66:Ve,67:be,86:Qe,102:qe,105:Lt,109:K,110:xt,111:Ct,112:te,113:de}),t(Ge,[2,127]),t(Ge,[2,129]),t(Ge,[2,130]),t(Ge,[2,131]),t(Ge,[2,132]),t(Ge,[2,133]),t(Ge,[2,134]),t(Ge,[2,135]),t(Ge,[2,136]),t(Ge,[2,137]),t(Ge,[2,138]),t(Ge,[2,139]),t(Nt,[2,116],{106:ge}),t(Nt,[2,117],{106:ge}),{22:[1,275]},t(Nt,[2,118],{106:ge}),{22:[1,276]},t(tr,[2,124]),t(Nt,[2,98],{106:ge}),t(Nt,[2,99],{106:ge}),t(Nt,[2,100],{115:100,117:178,26:z,52:A,66:M,67:q,91:L,105:st,106:T,109:Dt,111:et,112:Et,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt}),t(Nt,[2,104]),{101:[1,277]},{101:[1,278]},{58:[1,279]},{68:[1,280]},{72:[1,281]},{9:282,20:Tt,21:$,23:j},t(U,[2,42]),{22:Se,66:Ve,67:be,86:Qe,102:qe,105:Lt,107:283,108:244,109:K,110:xt,111:Ct,112:te,113:de},t(Ge,[2,128]),{26:z,52:A,66:M,67:q,91:L,97:284,105:st,106:T,109:Dt,111:et,112:Et,115:100,117:98,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{26:z,52:A,66:M,67:q,91:L,97:285,105:st,106:T,109:Dt,111:et,112:Et,115:100,117:98,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},t(Nt,[2,108]),t(Nt,[2,114]),t(re,[2,60]),{22:Ft,24:Bt,26:bt,38:mt,39:286,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},t(re,[2,68]),t(ki,a,{17:287}),t(Me,[2,126],{108:274,22:Se,66:Ve,67:be,86:Qe,102:qe,105:Lt,109:K,110:xt,111:Ct,112:te,113:de}),t(Nt,[2,121],{115:100,117:178,22:[1,288],26:z,52:A,66:M,67:q,91:L,105:st,106:T,109:Dt,111:et,112:Et,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt}),t(Nt,[2,122],{115:100,117:178,22:[1,289],26:z,52:A,66:M,67:q,91:L,105:st,106:T,109:Dt,111:et,112:Et,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt}),{22:Ft,24:Bt,26:bt,38:mt,41:[1,290],42:wt,52:A,66:M,67:q,73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{18:18,19:19,20:o,21:l,22:h,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:f,42:[1,291],43:31,44:d,46:p,48:m,50:35,51:45,52:b,54:46,66:x,67:k,86:v,87:B,88:R,89:P,90:V,91:O,95:F,105:C,106:S,109:E,111:_,112:w,116:47,118:g,119:D,120:y,121:N,122:nt,123:Y,124:Z,125:J,126:X,127:tt},{22:Se,66:Ve,67:be,86:Qe,96:292,102:qe,105:Lt,107:243,108:244,109:K,110:xt,111:Ct,112:te,113:de},{22:Se,66:Ve,67:be,86:Qe,96:293,102:qe,105:Lt,107:243,108:244,109:K,110:xt,111:Ct,112:te,113:de},t(re,[2,64]),t(U,[2,41]),t(Nt,[2,119],{106:ge}),t(Nt,[2,120],{106:ge})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],132:[2,7]},parseError:function(Pt,Yt){if(Yt.recoverable)this.trace(Pt);else{var oe=new Error(Pt);throw oe.hash=Yt,oe}},parse:function(Pt){var Yt=this,oe=[0],St=[],ve=[null],H=[],Ks=this.table,Q="",Mr=0,B0=0,x4=2,D0=1,v4=H.slice.call(arguments,1),$e=Object.create(this.lexer),bn={yy:{}};for(var Zc in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Zc)&&(bn.yy[Zc]=this.yy[Zc]);$e.setInput(Pt,bn.yy),bn.yy.lexer=$e,bn.yy.parser=this,typeof $e.yylloc>"u"&&($e.yylloc={});var Qc=$e.yylloc;H.push(Qc);var k4=$e.options&&$e.options.ranges;typeof bn.yy.parseError=="function"?this.parseError=bn.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function w4(){var Ei;return Ei=St.pop()||$e.lex()||D0,typeof Ei!="number"&&(Ei instanceof Array&&(St=Ei,Ei=St.pop()),Ei=Yt.symbols_[Ei]||Ei),Ei}for(var gr,_n,Nr,Jc,es={},xo,Ti,I0,vo;;){if(_n=oe[oe.length-1],this.defaultActions[_n]?Nr=this.defaultActions[_n]:((gr===null||typeof gr>"u")&&(gr=w4()),Nr=Ks[_n]&&Ks[_n][gr]),typeof Nr>"u"||!Nr.length||!Nr[0]){var th="";vo=[];for(xo in Ks[_n])this.terminals_[xo]&&xo>x4&&vo.push("'"+this.terminals_[xo]+"'");$e.showPosition?th="Parse error on line "+(Mr+1)+`:
1224
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var w=this.next();return w||this.lex()},begin:function(w){this.conditionStack.push(w)},popState:function(){var w=this.conditionStack.length-1;return w>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(w){return w=this.conditionStack.length-1-Math.abs(w||0),w>=0?this.conditionStack[w]:"INITIAL"},pushState:function(w){this.begin(w)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(w,g,D,y){switch(D){case 0:return this.begin("acc_title"),25;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),27;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.begin("open_directive"),51;case 8:return this.begin("type_directive"),52;case 9:return this.popState(),this.begin("arg_directive"),15;case 10:return this.popState(),this.popState(),54;case 11:return 53;case 12:break;case 13:break;case 14:return 11;case 15:break;case 16:return 9;case 17:return 31;case 18:return 50;case 19:return 4;case 20:return this.begin("block"),20;case 21:return 39;case 22:break;case 23:return 40;case 24:return 37;case 25:return 37;case 26:return 41;case 27:break;case 28:return this.popState(),22;case 29:return g.yytext[0];case 30:return 44;case 31:return 46;case 32:return 46;case 33:return 46;case 34:return 44;case 35:return 44;case 36:return 45;case 37:return 45;case 38:return 45;case 39:return 45;case 40:return 45;case 41:return 46;case 42:return 45;case 43:return 46;case 44:return 47;case 45:return 47;case 46:return 47;case 47:return 47;case 48:return 44;case 49:return 45;case 50:return 46;case 51:return 48;case 52:return 49;case 53:return 49;case 54:return 48;case 55:return 48;case 56:return 48;case 57:return 30;case 58:return g.yytext[0];case 59:return 6}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:,)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/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,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},open_directive:{rules:[8],inclusive:!1},type_directive:{rules:[9,10],inclusive:!1},arg_directive:{rules:[10,11],inclusive:!1},block:{rules:[21,22,23,24,25,26,27,28,29],inclusive:!1},INITIAL:{rules:[0,2,4,7,12,13,14,15,16,17,18,19,20,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59],inclusive:!0}}};return E}();F.lexer=C;function S(){this.yy={}}return S.prototype=F,F.Parser=S,new S}();Iu.parser=Iu;const DR=Iu,IR=t=>t.match(/^\s*erDiagram/)!==null;let wa={},a0=[];const MR={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE"},NR={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},RR=function(t,e,r){xe.parseDirective(this,t,e,r)},om=function(t){return wa[t]===void 0&&(wa[t]={attributes:[]},I.info("Added new entity :",t)),wa[t]},OR=()=>wa,FR=function(t,e){let r=om(t),i;for(i=e.length-1;i>=0;i--)r.attributes.push(e[i]),I.debug("Added attribute ",e[i].attributeName)},PR=function(t,e,r,i){let n={entityA:t,roleA:e,entityB:r,relSpec:i};a0.push(n),I.debug("Added new relationship :",n)},VR=()=>a0,YR=function(){wa={},a0=[],Lr()},zR={Cardinality:MR,Identification:NR,parseDirective:RR,getConfig:()=>G().er,addEntity:om,addAttributes:FR,getEntities:OR,addRelationship:PR,getRelationships:VR,clear:YR,setAccTitle:kr,getAccTitle:Br,setAccDescription:Dr,getAccDescription:Ir,setDiagramTitle:si,getDiagramTitle:ai},Di={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END"},UR=function(t,e){let r;t.append("defs").append("marker").attr("id",Di.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",Di.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",Di.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",Di.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",Di.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",Di.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),r=t.append("defs").append("marker").attr("id",Di.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),r=t.append("defs").append("marker").attr("id",Di.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},Ii={ERMarkers:Di,insertMarkers:UR},WR=/[^\dA-Za-z](\W)*/g;let Ue={},Ka=new Map;const HR=function(t){const e=Object.keys(t);for(const r of e)Ue[r]=t[r]},qR=(t,e,r)=>{const i=Ue.entityPadding/3,n=Ue.entityPadding/3,s=Ue.fontSize*.85,a=e.node().getBBox(),o=[];let l=!1,h=!1,u=0,f=0,d=0,p=0,m=a.height+i*2,b=1;r.forEach(B=>{B.attributeKeyTypeList!==void 0&&B.attributeKeyTypeList.length>0&&(l=!0),B.attributeComment!==void 0&&(h=!0)}),r.forEach(B=>{const R=`${e.node().id}-attr-${b}`;let P=0;const V=an(B.attributeType),O=t.append("text").classed("er entityLabel",!0).attr("id",`${R}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",G().fontFamily).style("font-size",s+"px").text(V),F=t.append("text").classed("er entityLabel",!0).attr("id",`${R}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",G().fontFamily).style("font-size",s+"px").text(B.attributeName),C={};C.tn=O,C.nn=F;const S=O.node().getBBox(),E=F.node().getBBox();if(u=Math.max(u,S.width),f=Math.max(f,E.width),P=Math.max(S.height,E.height),l){const _=B.attributeKeyTypeList!==void 0?B.attributeKeyTypeList.join(","):"",w=t.append("text").classed("er entityLabel",!0).attr("id",`${R}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",G().fontFamily).style("font-size",s+"px").text(_);C.kn=w;const g=w.node().getBBox();d=Math.max(d,g.width),P=Math.max(P,g.height)}if(h){const _=t.append("text").classed("er entityLabel",!0).attr("id",`${R}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",G().fontFamily).style("font-size",s+"px").text(B.attributeComment||"");C.cn=_;const w=_.node().getBBox();p=Math.max(p,w.width),P=Math.max(P,w.height)}C.height=P,o.push(C),m+=P+i*2,b+=1});let x=4;l&&(x+=2),h&&(x+=2);const k=u+f+d+p,v={width:Math.max(Ue.minEntityWidth,Math.max(a.width+Ue.entityPadding*2,k+n*x)),height:r.length>0?m:Math.max(Ue.minEntityHeight,a.height+Ue.entityPadding*2)};if(r.length>0){const B=Math.max(0,(v.width-k-n*x)/(x/2));e.attr("transform","translate("+v.width/2+","+(i+a.height/2)+")");let R=a.height+i*2,P="attributeBoxOdd";o.forEach(V=>{const O=R+i+V.height/2;V.tn.attr("transform","translate("+n+","+O+")");const F=t.insert("rect","#"+V.tn.node().id).classed(`er ${P}`,!0).attr("x",0).attr("y",R).attr("width",u+n*2+B).attr("height",V.height+i*2),C=parseFloat(F.attr("x"))+parseFloat(F.attr("width"));V.nn.attr("transform","translate("+(C+n)+","+O+")");const S=t.insert("rect","#"+V.nn.node().id).classed(`er ${P}`,!0).attr("x",C).attr("y",R).attr("width",f+n*2+B).attr("height",V.height+i*2);let E=parseFloat(S.attr("x"))+parseFloat(S.attr("width"));if(l){V.kn.attr("transform","translate("+(E+n)+","+O+")");const _=t.insert("rect","#"+V.kn.node().id).classed(`er ${P}`,!0).attr("x",E).attr("y",R).attr("width",d+n*2+B).attr("height",V.height+i*2);E=parseFloat(_.attr("x"))+parseFloat(_.attr("width"))}h&&(V.cn.attr("transform","translate("+(E+n)+","+O+")"),t.insert("rect","#"+V.cn.node().id).classed(`er ${P}`,"true").attr("x",E).attr("y",R).attr("width",p+n*2+B).attr("height",V.height+i*2)),R+=V.height+i*2,P=P==="attributeBoxOdd"?"attributeBoxEven":"attributeBoxOdd"})}else v.height=Math.max(Ue.minEntityHeight,m),e.attr("transform","translate("+v.width/2+","+v.height/2+")");return v},GR=function(t,e,r){const i=Object.keys(e);let n;return i.forEach(function(s){const a=QR(s,"entity");Ka.set(s,a);const o=t.append("g").attr("id",a);n=n===void 0?a:n;const l="text-"+a,h=o.append("text").classed("er entityLabel",!0).attr("id",l).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",G().fontFamily).style("font-size",Ue.fontSize+"px").text(s),{width:u,height:f}=qR(o,h,e[s].attributes),p=o.insert("rect","#"+l).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",u).attr("height",f).node().getBBox();r.setNode(a,{width:p.width,height:p.height,shape:"rect",id:a})}),n},$R=function(t,e){e.nodes().forEach(function(r){r!==void 0&&e.node(r)!==void 0&&t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )")})},lm=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},jR=function(t,e){return t.forEach(function(r){e.setEdge(Ka.get(r.entityA),Ka.get(r.entityB),{relationship:r},lm(r))}),t};let $d=0;const XR=function(t,e,r,i,n){$d++;const s=r.edge(Ka.get(e.entityA),Ka.get(e.entityB),lm(e)),a=Us().x(function(m){return m.x}).y(function(m){return m.y}).curve(Ss),o=t.insert("path","#"+i).classed("er relationshipLine",!0).attr("d",a(s.points)).style("stroke",Ue.stroke).style("fill","none");e.relSpec.relType===n.db.Identification.NON_IDENTIFYING&&o.attr("stroke-dasharray","8,8");let l="";switch(Ue.arrowMarkerAbsolute&&(l=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,l=l.replace(/\(/g,"\\("),l=l.replace(/\)/g,"\\)")),e.relSpec.cardA){case n.db.Cardinality.ZERO_OR_ONE:o.attr("marker-end","url("+l+"#"+Ii.ERMarkers.ZERO_OR_ONE_END+")");break;case n.db.Cardinality.ZERO_OR_MORE:o.attr("marker-end","url("+l+"#"+Ii.ERMarkers.ZERO_OR_MORE_END+")");break;case n.db.Cardinality.ONE_OR_MORE:o.attr("marker-end","url("+l+"#"+Ii.ERMarkers.ONE_OR_MORE_END+")");break;case n.db.Cardinality.ONLY_ONE:o.attr("marker-end","url("+l+"#"+Ii.ERMarkers.ONLY_ONE_END+")");break}switch(e.relSpec.cardB){case n.db.Cardinality.ZERO_OR_ONE:o.attr("marker-start","url("+l+"#"+Ii.ERMarkers.ZERO_OR_ONE_START+")");break;case n.db.Cardinality.ZERO_OR_MORE:o.attr("marker-start","url("+l+"#"+Ii.ERMarkers.ZERO_OR_MORE_START+")");break;case n.db.Cardinality.ONE_OR_MORE:o.attr("marker-start","url("+l+"#"+Ii.ERMarkers.ONE_OR_MORE_START+")");break;case n.db.Cardinality.ONLY_ONE:o.attr("marker-start","url("+l+"#"+Ii.ERMarkers.ONLY_ONE_START+")");break}const h=o.node().getTotalLength(),u=o.node().getPointAtLength(h*.5),f="rel"+$d,p=t.append("text").classed("er relationshipLabel",!0).attr("id",f).attr("x",u.x).attr("y",u.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",G().fontFamily).style("font-size",Ue.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+f).classed("er relationshipLabelBox",!0).attr("x",u.x-p.width/2).attr("y",u.y-p.height/2).attr("width",p.width).attr("height",p.height)},KR=function(t,e,r,i){Ue=G().er,I.info("Drawing ER diagram");const n=G().securityLevel;let s;n==="sandbox"&&(s=_t("#i"+e));const o=_t(n==="sandbox"?s.nodes()[0].contentDocument.body:"body").select(`[id='${e}']`);Ii.insertMarkers(o,Ue);let l;l=new Pe({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:Ue.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});const h=GR(o,i.db.getEntities(),l),u=jR(i.db.getRelationships(),l);$s(l),$R(o,l),u.forEach(function(b){XR(o,b,l,h,i)});const f=Ue.diagramPadding;jt.insertTitle(o,"entityTitleText",Ue.titleTopMargin,i.db.getDiagramTitle());const d=o.node().getBBox(),p=d.width+f*2,m=d.height+f*2;ni(o,m,p,Ue.useMaxWidth),o.attr("viewBox",`${d.x-f} ${d.y-f} ${p} ${m}`)},ZR="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";function QR(t="",e=""){const r=t.replace(WR,"");return`${jd(e)}${jd(r)}${$4(t,ZR)}`}function jd(t=""){return t.length>0?`${t}-`:""}const JR={setConf:HR,draw:KR};var Mu=function(){var t=function(wi,Pt,Yt,oe){for(Yt=Yt||{},oe=wi.length;oe--;Yt[wi[oe]]=Pt);return Yt},e=[1,9],r=[1,7],i=[1,6],n=[1,8],s=[1,20,21,22,23,38,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],a=[2,10],o=[1,20],l=[1,21],h=[1,22],u=[1,23],f=[1,30],d=[1,32],p=[1,33],m=[1,34],b=[1,62],x=[1,48],k=[1,52],v=[1,36],B=[1,37],R=[1,38],P=[1,39],V=[1,40],O=[1,56],F=[1,63],C=[1,51],S=[1,53],E=[1,55],_=[1,59],w=[1,60],g=[1,41],D=[1,42],y=[1,43],N=[1,44],nt=[1,61],Y=[1,50],Z=[1,54],J=[1,57],X=[1,58],tt=[1,49],ot=[1,66],at=[1,71],U=[1,20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],Tt=[1,75],$=[1,74],j=[1,76],W=[20,21,23,81,82],z=[1,99],A=[1,104],M=[1,107],q=[1,108],L=[1,101],st=[1,106],T=[1,109],Dt=[1,102],et=[1,114],Et=[1,113],vt=[1,103],pt=[1,105],ut=[1,110],gt=[1,111],ht=[1,112],yt=[1,115],he=[20,21,22,23,81,82],re=[20,21,22,23,53,81,82],Mt=[20,21,22,23,40,52,53,55,57,59,61,63,65,66,67,69,71,73,74,76,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],Nt=[20,21,23],Kt=[20,21,23,52,66,67,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],fe=[1,12,20,21,22,23,24,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],qt=[52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],Ft=[1,149],Bt=[1,157],bt=[1,158],mt=[1,159],wt=[1,160],ft=[1,144],It=[1,145],it=[1,141],Wt=[1,152],ct=[1,153],Gt=[1,154],Jt=[1,155],se=[1,156],ie=[1,161],ae=[1,162],Rt=[1,147],Ht=[1,150],ne=[1,146],Ut=[1,143],ki=[20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],mn=[1,165],me=[20,21,22,23,26,52,66,67,91,105,106,109,111,112,122,123,124,125,126,127],$t=[20,21,22,23,24,26,38,40,41,42,52,56,58,60,62,64,66,67,68,70,72,73,75,77,81,82,86,87,88,89,90,91,92,95,105,106,109,111,112,113,114,122,123,124,125,126,127],Ce=[12,21,22,24],tr=[22,106],Se=[1,250],Ve=[1,245],be=[1,246],Qe=[1,254],qe=[1,251],Lt=[1,248],K=[1,247],xt=[1,249],Ct=[1,252],te=[1,253],de=[1,255],ge=[1,273],Me=[20,21,23,106],Ge=[20,21,22,23,66,67,86,102,105,106,109,110,111,112,113],we={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,openDirective:6,typeDirective:7,closeDirective:8,separator:9,":":10,argDirective:11,open_directive:12,type_directive:13,arg_directive:14,close_directive:15,graphConfig:16,document:17,line:18,statement:19,SEMI:20,NEWLINE:21,SPACE:22,EOF:23,GRAPH:24,NODIR:25,DIR:26,FirstStmtSeperator:27,ending:28,endToken:29,spaceList:30,spaceListNewline:31,verticeStatement:32,styleStatement:33,linkStyleStatement:34,classDefStatement:35,classStatement:36,clickStatement:37,subgraph:38,text:39,SQS:40,SQE:41,end:42,direction:43,acc_title:44,acc_title_value:45,acc_descr:46,acc_descr_value:47,acc_descr_multiline_value:48,link:49,node:50,vertex:51,AMP:52,STYLE_SEPARATOR:53,idString:54,DOUBLECIRCLESTART:55,DOUBLECIRCLEEND:56,PS:57,PE:58,"(-":59,"-)":60,STADIUMSTART:61,STADIUMEND:62,SUBROUTINESTART:63,SUBROUTINEEND:64,VERTEX_WITH_PROPS_START:65,ALPHA:66,COLON:67,PIPE:68,CYLINDERSTART:69,CYLINDEREND:70,DIAMOND_START:71,DIAMOND_STOP:72,TAGEND:73,TRAPSTART:74,TRAPEND:75,INVTRAPSTART:76,INVTRAPEND:77,linkStatement:78,arrowText:79,TESTSTR:80,START_LINK:81,LINK:82,textToken:83,STR:84,keywords:85,STYLE:86,LINKSTYLE:87,CLASSDEF:88,CLASS:89,CLICK:90,DOWN:91,UP:92,textNoTags:93,textNoTagsToken:94,DEFAULT:95,stylesOpt:96,alphaNum:97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,HEX:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,MINUS:109,UNIT:110,BRKT:111,DOT:112,PCT:113,TAGSTART:114,alphaNumToken:115,idStringToken:116,alphaNumStatement:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,PUNCTUATION:122,UNICODE_TEXT:123,PLUS:124,EQUALS:125,MULT:126,UNDERSCORE:127,graphCodeTokens:128,ARROW_CROSS:129,ARROW_POINT:130,ARROW_CIRCLE:131,ARROW_OPEN:132,QUOTE:133,$accept:0,$end:1},terminals_:{2:"error",10:":",12:"open_directive",13:"type_directive",14:"arg_directive",15:"close_directive",20:"SEMI",21:"NEWLINE",22:"SPACE",23:"EOF",24:"GRAPH",25:"NODIR",26:"DIR",38:"subgraph",40:"SQS",41:"SQE",42:"end",44:"acc_title",45:"acc_title_value",46:"acc_descr",47:"acc_descr_value",48:"acc_descr_multiline_value",52:"AMP",53:"STYLE_SEPARATOR",55:"DOUBLECIRCLESTART",56:"DOUBLECIRCLEEND",57:"PS",58:"PE",59:"(-",60:"-)",61:"STADIUMSTART",62:"STADIUMEND",63:"SUBROUTINESTART",64:"SUBROUTINEEND",65:"VERTEX_WITH_PROPS_START",66:"ALPHA",67:"COLON",68:"PIPE",69:"CYLINDERSTART",70:"CYLINDEREND",71:"DIAMOND_START",72:"DIAMOND_STOP",73:"TAGEND",74:"TRAPSTART",75:"TRAPEND",76:"INVTRAPSTART",77:"INVTRAPEND",80:"TESTSTR",81:"START_LINK",82:"LINK",84:"STR",86:"STYLE",87:"LINKSTYLE",88:"CLASSDEF",89:"CLASS",90:"CLICK",91:"DOWN",92:"UP",95:"DEFAULT",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"HEX",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"MINUS",110:"UNIT",111:"BRKT",112:"DOT",113:"PCT",114:"TAGSTART",118:"direction_tb",119:"direction_bt",120:"direction_rl",121:"direction_lr",122:"PUNCTUATION",123:"UNICODE_TEXT",124:"PLUS",125:"EQUALS",126:"MULT",127:"UNDERSCORE",129:"ARROW_CROSS",130:"ARROW_POINT",131:"ARROW_CIRCLE",132:"ARROW_OPEN",133:"QUOTE"},productions_:[0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[19,1],[19,2],[19,2],[19,1],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[50,1],[50,5],[50,3],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,8],[51,4],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,4],[51,4],[51,1],[49,2],[49,3],[49,3],[49,1],[49,3],[78,1],[79,3],[39,1],[39,2],[39,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[93,1],[93,2],[35,5],[35,5],[36,5],[37,2],[37,4],[37,3],[37,5],[37,2],[37,4],[37,4],[37,6],[37,2],[37,4],[37,2],[37,4],[37,4],[37,6],[33,5],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[103,1],[103,3],[96,1],[96,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[94,1],[94,1],[94,1],[94,1],[54,1],[54,2],[97,1],[97,2],[117,1],[117,1],[117,1],[117,1],[43,1],[43,1],[43,1],[43,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1]],performAction:function(Pt,Yt,oe,St,ve,H,Ks){var Q=H.length-1;switch(ve){case 5:St.parseDirective("%%{","open_directive");break;case 6:St.parseDirective(H[Q],"type_directive");break;case 7:H[Q]=H[Q].trim().replace(/'/g,'"'),St.parseDirective(H[Q],"arg_directive");break;case 8:St.parseDirective("}%%","close_directive","flowchart");break;case 10:this.$=[];break;case 11:(!Array.isArray(H[Q])||H[Q].length>0)&&H[Q-1].push(H[Q]),this.$=H[Q-1];break;case 12:case 82:case 84:case 96:case 152:case 154:case 155:this.$=H[Q];break;case 19:St.setDirection("TB"),this.$="TB";break;case 20:St.setDirection(H[Q-1]),this.$=H[Q-1];break;case 35:this.$=H[Q-1].nodes;break;case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 41:this.$=St.addSubGraph(H[Q-6],H[Q-1],H[Q-4]);break;case 42:this.$=St.addSubGraph(H[Q-3],H[Q-1],H[Q-3]);break;case 43:this.$=St.addSubGraph(void 0,H[Q-1],void 0);break;case 45:this.$=H[Q].trim(),St.setAccTitle(this.$);break;case 46:case 47:this.$=H[Q].trim(),St.setAccDescription(this.$);break;case 51:St.addLink(H[Q-2].stmt,H[Q],H[Q-1]),this.$={stmt:H[Q],nodes:H[Q].concat(H[Q-2].nodes)};break;case 52:St.addLink(H[Q-3].stmt,H[Q-1],H[Q-2]),this.$={stmt:H[Q-1],nodes:H[Q-1].concat(H[Q-3].nodes)};break;case 53:this.$={stmt:H[Q-1],nodes:H[Q-1]};break;case 54:this.$={stmt:H[Q],nodes:H[Q]};break;case 55:this.$=[H[Q]];break;case 56:this.$=H[Q-4].concat(H[Q]);break;case 57:this.$=[H[Q-2]],St.setClass(H[Q-2],H[Q]);break;case 58:this.$=H[Q-3],St.addVertex(H[Q-3],H[Q-1],"square");break;case 59:this.$=H[Q-3],St.addVertex(H[Q-3],H[Q-1],"doublecircle");break;case 60:this.$=H[Q-5],St.addVertex(H[Q-5],H[Q-2],"circle");break;case 61:this.$=H[Q-3],St.addVertex(H[Q-3],H[Q-1],"ellipse");break;case 62:this.$=H[Q-3],St.addVertex(H[Q-3],H[Q-1],"stadium");break;case 63:this.$=H[Q-3],St.addVertex(H[Q-3],H[Q-1],"subroutine");break;case 64:this.$=H[Q-7],St.addVertex(H[Q-7],H[Q-1],"rect",void 0,void 0,void 0,Object.fromEntries([[H[Q-5],H[Q-3]]]));break;case 65:this.$=H[Q-3],St.addVertex(H[Q-3],H[Q-1],"cylinder");break;case 66:this.$=H[Q-3],St.addVertex(H[Q-3],H[Q-1],"round");break;case 67:this.$=H[Q-3],St.addVertex(H[Q-3],H[Q-1],"diamond");break;case 68:this.$=H[Q-5],St.addVertex(H[Q-5],H[Q-2],"hexagon");break;case 69:this.$=H[Q-3],St.addVertex(H[Q-3],H[Q-1],"odd");break;case 70:this.$=H[Q-3],St.addVertex(H[Q-3],H[Q-1],"trapezoid");break;case 71:this.$=H[Q-3],St.addVertex(H[Q-3],H[Q-1],"inv_trapezoid");break;case 72:this.$=H[Q-3],St.addVertex(H[Q-3],H[Q-1],"lean_right");break;case 73:this.$=H[Q-3],St.addVertex(H[Q-3],H[Q-1],"lean_left");break;case 74:this.$=H[Q],St.addVertex(H[Q]);break;case 75:H[Q-1].text=H[Q],this.$=H[Q-1];break;case 76:case 77:H[Q-2].text=H[Q-1],this.$=H[Q-2];break;case 78:this.$=H[Q];break;case 79:var Mr=St.destructLink(H[Q],H[Q-2]);this.$={type:Mr.type,stroke:Mr.stroke,length:Mr.length,text:H[Q-1]};break;case 80:var Mr=St.destructLink(H[Q]);this.$={type:Mr.type,stroke:Mr.stroke,length:Mr.length};break;case 81:this.$=H[Q-1];break;case 83:case 97:case 153:this.$=H[Q-1]+""+H[Q];break;case 98:case 99:this.$=H[Q-4],St.addClass(H[Q-2],H[Q]);break;case 100:this.$=H[Q-4],St.setClass(H[Q-2],H[Q]);break;case 101:case 109:this.$=H[Q-1],St.setClickEvent(H[Q-1],H[Q]);break;case 102:case 110:this.$=H[Q-3],St.setClickEvent(H[Q-3],H[Q-2]),St.setTooltip(H[Q-3],H[Q]);break;case 103:this.$=H[Q-2],St.setClickEvent(H[Q-2],H[Q-1],H[Q]);break;case 104:this.$=H[Q-4],St.setClickEvent(H[Q-4],H[Q-3],H[Q-2]),St.setTooltip(H[Q-4],H[Q]);break;case 105:case 111:this.$=H[Q-1],St.setLink(H[Q-1],H[Q]);break;case 106:case 112:this.$=H[Q-3],St.setLink(H[Q-3],H[Q-2]),St.setTooltip(H[Q-3],H[Q]);break;case 107:case 113:this.$=H[Q-3],St.setLink(H[Q-3],H[Q-2],H[Q]);break;case 108:case 114:this.$=H[Q-5],St.setLink(H[Q-5],H[Q-4],H[Q]),St.setTooltip(H[Q-5],H[Q-2]);break;case 115:this.$=H[Q-4],St.addVertex(H[Q-2],void 0,void 0,H[Q]);break;case 116:case 118:this.$=H[Q-4],St.updateLink(H[Q-2],H[Q]);break;case 117:this.$=H[Q-4],St.updateLink([H[Q-2]],H[Q]);break;case 119:this.$=H[Q-8],St.updateLinkInterpolate([H[Q-6]],H[Q-2]),St.updateLink([H[Q-6]],H[Q]);break;case 120:this.$=H[Q-8],St.updateLinkInterpolate(H[Q-6],H[Q-2]),St.updateLink(H[Q-6],H[Q]);break;case 121:this.$=H[Q-6],St.updateLinkInterpolate([H[Q-4]],H[Q]);break;case 122:this.$=H[Q-6],St.updateLinkInterpolate(H[Q-4],H[Q]);break;case 123:case 125:this.$=[H[Q]];break;case 124:case 126:H[Q-2].push(H[Q]),this.$=H[Q-2];break;case 128:this.$=H[Q-1]+H[Q];break;case 150:this.$=H[Q];break;case 151:this.$=H[Q-1]+""+H[Q];break;case 156:this.$="v";break;case 157:this.$="-";break;case 158:this.$={stmt:"dir",value:"TB"};break;case 159:this.$={stmt:"dir",value:"BT"};break;case 160:this.$={stmt:"dir",value:"RL"};break;case 161:this.$={stmt:"dir",value:"LR"};break}},table:[{3:1,4:2,5:3,6:5,12:e,16:4,21:r,22:i,24:n},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:e,16:4,21:r,22:i,24:n},t(s,a,{17:11}),{7:12,13:[1,13]},{16:14,21:r,22:i,24:n},{16:15,21:r,22:i,24:n},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:o,21:l,22:h,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:f,43:31,44:d,46:p,48:m,50:35,51:45,52:b,54:46,66:x,67:k,86:v,87:B,88:R,89:P,90:V,91:O,95:F,105:C,106:S,109:E,111:_,112:w,116:47,118:g,119:D,120:y,121:N,122:nt,123:Y,124:Z,125:J,126:X,127:tt},{8:64,10:[1,65],15:ot},t([10,15],[2,6]),t(s,[2,17]),t(s,[2,18]),t(s,[2,19]),{20:[1,68],21:[1,69],22:at,27:67,30:70},t(U,[2,11]),t(U,[2,12]),t(U,[2,13]),t(U,[2,14]),t(U,[2,15]),t(U,[2,16]),{9:72,20:Tt,21:$,23:j,49:73,78:77,81:[1,78],82:[1,79]},{9:80,20:Tt,21:$,23:j},{9:81,20:Tt,21:$,23:j},{9:82,20:Tt,21:$,23:j},{9:83,20:Tt,21:$,23:j},{9:84,20:Tt,21:$,23:j},{9:86,20:Tt,21:$,22:[1,85],23:j},t(U,[2,44]),{45:[1,87]},{47:[1,88]},t(U,[2,47]),t(W,[2,54],{30:89,22:at}),{22:[1,90]},{22:[1,91]},{22:[1,92]},{22:[1,93]},{26:z,52:A,66:M,67:q,84:[1,97],91:L,97:96,98:[1,94],100:[1,95],105:st,106:T,109:Dt,111:et,112:Et,115:100,117:98,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},t(U,[2,158]),t(U,[2,159]),t(U,[2,160]),t(U,[2,161]),t(he,[2,55],{53:[1,116]}),t(re,[2,74],{116:129,40:[1,117],52:b,55:[1,118],57:[1,119],59:[1,120],61:[1,121],63:[1,122],65:[1,123],66:x,67:k,69:[1,124],71:[1,125],73:[1,126],74:[1,127],76:[1,128],91:O,95:F,105:C,106:S,109:E,111:_,112:w,122:nt,123:Y,124:Z,125:J,126:X,127:tt}),t(Mt,[2,150]),t(Mt,[2,175]),t(Mt,[2,176]),t(Mt,[2,177]),t(Mt,[2,178]),t(Mt,[2,179]),t(Mt,[2,180]),t(Mt,[2,181]),t(Mt,[2,182]),t(Mt,[2,183]),t(Mt,[2,184]),t(Mt,[2,185]),t(Mt,[2,186]),t(Mt,[2,187]),t(Mt,[2,188]),t(Mt,[2,189]),t(Mt,[2,190]),{9:130,20:Tt,21:$,23:j},{11:131,14:[1,132]},t(Nt,[2,8]),t(s,[2,20]),t(s,[2,26]),t(s,[2,27]),{21:[1,133]},t(Kt,[2,34],{30:134,22:at}),t(U,[2,35]),{50:135,51:45,52:b,54:46,66:x,67:k,91:O,95:F,105:C,106:S,109:E,111:_,112:w,116:47,122:nt,123:Y,124:Z,125:J,126:X,127:tt},t(fe,[2,48]),t(fe,[2,49]),t(fe,[2,50]),t(qt,[2,78],{79:136,68:[1,138],80:[1,137]}),{22:Ft,24:Bt,26:bt,38:mt,39:139,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},t([52,66,67,68,80,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,80]),t(U,[2,36]),t(U,[2,37]),t(U,[2,38]),t(U,[2,39]),t(U,[2,40]),{22:Ft,24:Bt,26:bt,38:mt,39:163,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},t(ki,a,{17:164}),t(U,[2,45]),t(U,[2,46]),t(W,[2,53],{52:mn}),{26:z,52:A,66:M,67:q,91:L,97:166,102:[1,167],105:st,106:T,109:Dt,111:et,112:Et,115:100,117:98,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{95:[1,168],103:169,105:[1,170]},{26:z,52:A,66:M,67:q,91:L,95:[1,171],97:172,105:st,106:T,109:Dt,111:et,112:Et,115:100,117:98,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{26:z,52:A,66:M,67:q,91:L,97:173,105:st,106:T,109:Dt,111:et,112:Et,115:100,117:98,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},t(Nt,[2,101],{22:[1,174],99:[1,175]}),t(Nt,[2,105],{22:[1,176]}),t(Nt,[2,109],{115:100,117:178,22:[1,177],26:z,52:A,66:M,67:q,91:L,105:st,106:T,109:Dt,111:et,112:Et,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt}),t(Nt,[2,111],{22:[1,179]}),t(me,[2,152]),t(me,[2,154]),t(me,[2,155]),t(me,[2,156]),t(me,[2,157]),t($t,[2,162]),t($t,[2,163]),t($t,[2,164]),t($t,[2,165]),t($t,[2,166]),t($t,[2,167]),t($t,[2,168]),t($t,[2,169]),t($t,[2,170]),t($t,[2,171]),t($t,[2,172]),t($t,[2,173]),t($t,[2,174]),{52:b,54:180,66:x,67:k,91:O,95:F,105:C,106:S,109:E,111:_,112:w,116:47,122:nt,123:Y,124:Z,125:J,126:X,127:tt},{22:Ft,24:Bt,26:bt,38:mt,39:181,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,39:182,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,39:184,42:wt,52:A,57:[1,183],66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,39:185,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,39:186,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,39:187,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{66:[1,188]},{22:Ft,24:Bt,26:bt,38:mt,39:189,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,39:190,42:wt,52:A,66:M,67:q,71:[1,191],73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,39:192,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,39:193,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,39:194,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},t(Mt,[2,151]),t(Ce,[2,3]),{8:195,15:ot},{15:[2,7]},t(s,[2,28]),t(Kt,[2,33]),t(W,[2,51],{30:196,22:at}),t(qt,[2,75],{22:[1,197]}),{22:[1,198]},{22:Ft,24:Bt,26:bt,38:mt,39:199,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,42:wt,52:A,66:M,67:q,73:ft,81:It,82:[1,200],83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},t($t,[2,82]),t($t,[2,84]),t($t,[2,140]),t($t,[2,141]),t($t,[2,142]),t($t,[2,143]),t($t,[2,144]),t($t,[2,145]),t($t,[2,146]),t($t,[2,147]),t($t,[2,148]),t($t,[2,149]),t($t,[2,85]),t($t,[2,86]),t($t,[2,87]),t($t,[2,88]),t($t,[2,89]),t($t,[2,90]),t($t,[2,91]),t($t,[2,92]),t($t,[2,93]),t($t,[2,94]),t($t,[2,95]),{9:203,20:Tt,21:$,22:Ft,23:j,24:Bt,26:bt,38:mt,40:[1,202],42:wt,52:A,66:M,67:q,73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{18:18,19:19,20:o,21:l,22:h,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:f,42:[1,204],43:31,44:d,46:p,48:m,50:35,51:45,52:b,54:46,66:x,67:k,86:v,87:B,88:R,89:P,90:V,91:O,95:F,105:C,106:S,109:E,111:_,112:w,116:47,118:g,119:D,120:y,121:N,122:nt,123:Y,124:Z,125:J,126:X,127:tt},{22:at,30:205},{22:[1,206],26:z,52:A,66:M,67:q,91:L,105:st,106:T,109:Dt,111:et,112:Et,115:100,117:178,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:[1,207]},{22:[1,208]},{22:[1,209],106:[1,210]},t(tr,[2,123]),{22:[1,211]},{22:[1,212],26:z,52:A,66:M,67:q,91:L,105:st,106:T,109:Dt,111:et,112:Et,115:100,117:178,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:[1,213],26:z,52:A,66:M,67:q,91:L,105:st,106:T,109:Dt,111:et,112:Et,115:100,117:178,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{84:[1,214]},t(Nt,[2,103],{22:[1,215]}),{84:[1,216],101:[1,217]},{84:[1,218]},t(me,[2,153]),{84:[1,219],101:[1,220]},t(he,[2,57],{116:129,52:b,66:x,67:k,91:O,95:F,105:C,106:S,109:E,111:_,112:w,122:nt,123:Y,124:Z,125:J,126:X,127:tt}),{22:Ft,24:Bt,26:bt,38:mt,41:[1,221],42:wt,52:A,66:M,67:q,73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,42:wt,52:A,56:[1,222],66:M,67:q,73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,39:223,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,42:wt,52:A,58:[1,224],66:M,67:q,73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,42:wt,52:A,60:[1,225],66:M,67:q,73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,42:wt,52:A,62:[1,226],66:M,67:q,73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,42:wt,52:A,64:[1,227],66:M,67:q,73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{67:[1,228]},{22:Ft,24:Bt,26:bt,38:mt,42:wt,52:A,66:M,67:q,70:[1,229],73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,42:wt,52:A,66:M,67:q,72:[1,230],73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,39:231,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,41:[1,232],42:wt,52:A,66:M,67:q,73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,42:wt,52:A,66:M,67:q,73:ft,75:[1,233],77:[1,234],81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{22:Ft,24:Bt,26:bt,38:mt,42:wt,52:A,66:M,67:q,73:ft,75:[1,236],77:[1,235],81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{9:237,20:Tt,21:$,23:j},t(W,[2,52],{52:mn}),t(qt,[2,77]),t(qt,[2,76]),{22:Ft,24:Bt,26:bt,38:mt,42:wt,52:A,66:M,67:q,68:[1,238],73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},t(qt,[2,79]),t($t,[2,83]),{22:Ft,24:Bt,26:bt,38:mt,39:239,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},t(ki,a,{17:240}),t(U,[2,43]),{51:241,52:b,54:46,66:x,67:k,91:O,95:F,105:C,106:S,109:E,111:_,112:w,116:47,122:nt,123:Y,124:Z,125:J,126:X,127:tt},{22:Se,66:Ve,67:be,86:Qe,96:242,102:qe,105:Lt,107:243,108:244,109:K,110:xt,111:Ct,112:te,113:de},{22:Se,66:Ve,67:be,86:Qe,96:256,102:qe,105:Lt,107:243,108:244,109:K,110:xt,111:Ct,112:te,113:de},{22:Se,66:Ve,67:be,86:Qe,96:257,102:qe,104:[1,258],105:Lt,107:243,108:244,109:K,110:xt,111:Ct,112:te,113:de},{22:Se,66:Ve,67:be,86:Qe,96:259,102:qe,104:[1,260],105:Lt,107:243,108:244,109:K,110:xt,111:Ct,112:te,113:de},{105:[1,261]},{22:Se,66:Ve,67:be,86:Qe,96:262,102:qe,105:Lt,107:243,108:244,109:K,110:xt,111:Ct,112:te,113:de},{22:Se,66:Ve,67:be,86:Qe,96:263,102:qe,105:Lt,107:243,108:244,109:K,110:xt,111:Ct,112:te,113:de},{26:z,52:A,66:M,67:q,91:L,97:264,105:st,106:T,109:Dt,111:et,112:Et,115:100,117:98,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},t(Nt,[2,102]),{84:[1,265]},t(Nt,[2,106],{22:[1,266]}),t(Nt,[2,107]),t(Nt,[2,110]),t(Nt,[2,112],{22:[1,267]}),t(Nt,[2,113]),t(re,[2,58]),t(re,[2,59]),{22:Ft,24:Bt,26:bt,38:mt,42:wt,52:A,58:[1,268],66:M,67:q,73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},t(re,[2,66]),t(re,[2,61]),t(re,[2,62]),t(re,[2,63]),{66:[1,269]},t(re,[2,65]),t(re,[2,67]),{22:Ft,24:Bt,26:bt,38:mt,42:wt,52:A,66:M,67:q,72:[1,270],73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},t(re,[2,69]),t(re,[2,70]),t(re,[2,72]),t(re,[2,71]),t(re,[2,73]),t(Ce,[2,4]),t([22,52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,81]),{22:Ft,24:Bt,26:bt,38:mt,41:[1,271],42:wt,52:A,66:M,67:q,73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{18:18,19:19,20:o,21:l,22:h,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:f,42:[1,272],43:31,44:d,46:p,48:m,50:35,51:45,52:b,54:46,66:x,67:k,86:v,87:B,88:R,89:P,90:V,91:O,95:F,105:C,106:S,109:E,111:_,112:w,116:47,118:g,119:D,120:y,121:N,122:nt,123:Y,124:Z,125:J,126:X,127:tt},t(he,[2,56]),t(Nt,[2,115],{106:ge}),t(Me,[2,125],{108:274,22:Se,66:Ve,67:be,86:Qe,102:qe,105:Lt,109:K,110:xt,111:Ct,112:te,113:de}),t(Ge,[2,127]),t(Ge,[2,129]),t(Ge,[2,130]),t(Ge,[2,131]),t(Ge,[2,132]),t(Ge,[2,133]),t(Ge,[2,134]),t(Ge,[2,135]),t(Ge,[2,136]),t(Ge,[2,137]),t(Ge,[2,138]),t(Ge,[2,139]),t(Nt,[2,116],{106:ge}),t(Nt,[2,117],{106:ge}),{22:[1,275]},t(Nt,[2,118],{106:ge}),{22:[1,276]},t(tr,[2,124]),t(Nt,[2,98],{106:ge}),t(Nt,[2,99],{106:ge}),t(Nt,[2,100],{115:100,117:178,26:z,52:A,66:M,67:q,91:L,105:st,106:T,109:Dt,111:et,112:Et,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt}),t(Nt,[2,104]),{101:[1,277]},{101:[1,278]},{58:[1,279]},{68:[1,280]},{72:[1,281]},{9:282,20:Tt,21:$,23:j},t(U,[2,42]),{22:Se,66:Ve,67:be,86:Qe,102:qe,105:Lt,107:283,108:244,109:K,110:xt,111:Ct,112:te,113:de},t(Ge,[2,128]),{26:z,52:A,66:M,67:q,91:L,97:284,105:st,106:T,109:Dt,111:et,112:Et,115:100,117:98,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{26:z,52:A,66:M,67:q,91:L,97:285,105:st,106:T,109:Dt,111:et,112:Et,115:100,117:98,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},t(Nt,[2,108]),t(Nt,[2,114]),t(re,[2,60]),{22:Ft,24:Bt,26:bt,38:mt,39:286,42:wt,52:A,66:M,67:q,73:ft,81:It,83:140,84:it,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},t(re,[2,68]),t(ki,a,{17:287}),t(Me,[2,126],{108:274,22:Se,66:Ve,67:be,86:Qe,102:qe,105:Lt,109:K,110:xt,111:Ct,112:te,113:de}),t(Nt,[2,121],{115:100,117:178,22:[1,288],26:z,52:A,66:M,67:q,91:L,105:st,106:T,109:Dt,111:et,112:Et,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt}),t(Nt,[2,122],{115:100,117:178,22:[1,289],26:z,52:A,66:M,67:q,91:L,105:st,106:T,109:Dt,111:et,112:Et,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt}),{22:Ft,24:Bt,26:bt,38:mt,41:[1,290],42:wt,52:A,66:M,67:q,73:ft,81:It,83:201,85:151,86:Wt,87:ct,88:Gt,89:Jt,90:se,91:ie,92:ae,94:142,95:Rt,105:st,106:T,109:Ht,111:et,112:Et,113:ne,114:Ut,115:148,122:vt,123:pt,124:ut,125:gt,126:ht,127:yt},{18:18,19:19,20:o,21:l,22:h,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:f,42:[1,291],43:31,44:d,46:p,48:m,50:35,51:45,52:b,54:46,66:x,67:k,86:v,87:B,88:R,89:P,90:V,91:O,95:F,105:C,106:S,109:E,111:_,112:w,116:47,118:g,119:D,120:y,121:N,122:nt,123:Y,124:Z,125:J,126:X,127:tt},{22:Se,66:Ve,67:be,86:Qe,96:292,102:qe,105:Lt,107:243,108:244,109:K,110:xt,111:Ct,112:te,113:de},{22:Se,66:Ve,67:be,86:Qe,96:293,102:qe,105:Lt,107:243,108:244,109:K,110:xt,111:Ct,112:te,113:de},t(re,[2,64]),t(U,[2,41]),t(Nt,[2,119],{106:ge}),t(Nt,[2,120],{106:ge})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],132:[2,7]},parseError:function(Pt,Yt){if(Yt.recoverable)this.trace(Pt);else{var oe=new Error(Pt);throw oe.hash=Yt,oe}},parse:function(Pt){var Yt=this,oe=[0],St=[],ve=[null],H=[],Ks=this.table,Q="",Mr=0,D0=0,v4=2,I0=1,k4=H.slice.call(arguments,1),$e=Object.create(this.lexer),bn={yy:{}};for(var Zc in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Zc)&&(bn.yy[Zc]=this.yy[Zc]);$e.setInput(Pt,bn.yy),bn.yy.lexer=$e,bn.yy.parser=this,typeof $e.yylloc>"u"&&($e.yylloc={});var Qc=$e.yylloc;H.push(Qc);var w4=$e.options&&$e.options.ranges;typeof bn.yy.parseError=="function"?this.parseError=bn.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function T4(){var Ei;return Ei=St.pop()||$e.lex()||I0,typeof Ei!="number"&&(Ei instanceof Array&&(St=Ei,Ei=St.pop()),Ei=Yt.symbols_[Ei]||Ei),Ei}for(var gr,_n,Nr,Jc,es={},xo,Ti,M0,vo;;){if(_n=oe[oe.length-1],this.defaultActions[_n]?Nr=this.defaultActions[_n]:((gr===null||typeof gr>"u")&&(gr=T4()),Nr=Ks[_n]&&Ks[_n][gr]),typeof Nr>"u"||!Nr.length||!Nr[0]){var th="";vo=[];for(xo in Ks[_n])this.terminals_[xo]&&xo>v4&&vo.push("'"+this.terminals_[xo]+"'");$e.showPosition?th="Parse error on line "+(Mr+1)+`:
1225
1225
  `+$e.showPosition()+`
1226
- Expecting `+vo.join(", ")+", got '"+(this.terminals_[gr]||gr)+"'":th="Parse error on line "+(Mr+1)+": Unexpected "+(gr==D0?"end of input":"'"+(this.terminals_[gr]||gr)+"'"),this.parseError(th,{text:$e.match,token:this.terminals_[gr]||gr,line:$e.yylineno,loc:Qc,expected:vo})}if(Nr[0]instanceof Array&&Nr.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_n+", token: "+gr);switch(Nr[0]){case 1:oe.push(gr),ve.push($e.yytext),H.push($e.yylloc),oe.push(Nr[1]),gr=null,B0=$e.yyleng,Q=$e.yytext,Mr=$e.yylineno,Qc=$e.yylloc;break;case 2:if(Ti=this.productions_[Nr[1]][1],es.$=ve[ve.length-Ti],es._$={first_line:H[H.length-(Ti||1)].first_line,last_line:H[H.length-1].last_line,first_column:H[H.length-(Ti||1)].first_column,last_column:H[H.length-1].last_column},k4&&(es._$.range=[H[H.length-(Ti||1)].range[0],H[H.length-1].range[1]]),Jc=this.performAction.apply(es,[Q,B0,Mr,bn.yy,Nr[1],ve,H].concat(v4)),typeof Jc<"u")return Jc;Ti&&(oe=oe.slice(0,-1*Ti*2),ve=ve.slice(0,-1*Ti),H=H.slice(0,-1*Ti)),oe.push(this.productions_[Nr[1]][0]),ve.push(es.$),H.push(es._$),I0=Ks[oe[oe.length-2]][oe[oe.length-1]],oe.push(I0);break;case 3:return!0}}return!0}},Xs=function(){var wi={EOF:1,parseError:function(Yt,oe){if(this.yy.parser)this.yy.parser.parseError(Yt,oe);else throw new Error(Yt)},setInput:function(Pt,Yt){return this.yy=Yt||this.yy||{},this._input=Pt,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},input:function(){var Pt=this._input[0];this.yytext+=Pt,this.yyleng++,this.offset++,this.match+=Pt,this.matched+=Pt;var Yt=Pt.match(/(?:\r\n?|\n).*/g);return Yt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Pt},unput:function(Pt){var Yt=Pt.length,oe=Pt.split(/(?:\r\n?|\n)/g);this._input=Pt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Yt),this.offset-=Yt;var St=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),oe.length-1&&(this.yylineno-=oe.length-1);var ve=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:oe?(oe.length===St.length?this.yylloc.first_column:0)+St[St.length-oe.length].length-oe[0].length:this.yylloc.first_column-Yt},this.options.ranges&&(this.yylloc.range=[ve[0],ve[0]+this.yyleng-Yt]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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).
1226
+ Expecting `+vo.join(", ")+", got '"+(this.terminals_[gr]||gr)+"'":th="Parse error on line "+(Mr+1)+": Unexpected "+(gr==I0?"end of input":"'"+(this.terminals_[gr]||gr)+"'"),this.parseError(th,{text:$e.match,token:this.terminals_[gr]||gr,line:$e.yylineno,loc:Qc,expected:vo})}if(Nr[0]instanceof Array&&Nr.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_n+", token: "+gr);switch(Nr[0]){case 1:oe.push(gr),ve.push($e.yytext),H.push($e.yylloc),oe.push(Nr[1]),gr=null,D0=$e.yyleng,Q=$e.yytext,Mr=$e.yylineno,Qc=$e.yylloc;break;case 2:if(Ti=this.productions_[Nr[1]][1],es.$=ve[ve.length-Ti],es._$={first_line:H[H.length-(Ti||1)].first_line,last_line:H[H.length-1].last_line,first_column:H[H.length-(Ti||1)].first_column,last_column:H[H.length-1].last_column},w4&&(es._$.range=[H[H.length-(Ti||1)].range[0],H[H.length-1].range[1]]),Jc=this.performAction.apply(es,[Q,D0,Mr,bn.yy,Nr[1],ve,H].concat(k4)),typeof Jc<"u")return Jc;Ti&&(oe=oe.slice(0,-1*Ti*2),ve=ve.slice(0,-1*Ti),H=H.slice(0,-1*Ti)),oe.push(this.productions_[Nr[1]][0]),ve.push(es.$),H.push(es._$),M0=Ks[oe[oe.length-2]][oe[oe.length-1]],oe.push(M0);break;case 3:return!0}}return!0}},Xs=function(){var wi={EOF:1,parseError:function(Yt,oe){if(this.yy.parser)this.yy.parser.parseError(Yt,oe);else throw new Error(Yt)},setInput:function(Pt,Yt){return this.yy=Yt||this.yy||{},this._input=Pt,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},input:function(){var Pt=this._input[0];this.yytext+=Pt,this.yyleng++,this.offset++,this.match+=Pt,this.matched+=Pt;var Yt=Pt.match(/(?:\r\n?|\n).*/g);return Yt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Pt},unput:function(Pt){var Yt=Pt.length,oe=Pt.split(/(?:\r\n?|\n)/g);this._input=Pt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Yt),this.offset-=Yt;var St=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),oe.length-1&&(this.yylineno-=oe.length-1);var ve=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:oe?(oe.length===St.length?this.yylloc.first_column:0)+St[St.length-oe.length].length-oe[0].length:this.yylloc.first_column-Yt},this.options.ranges&&(this.yylloc.range=[ve[0],ve[0]+this.yyleng-Yt]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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).
1227
1227
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(Pt){this.unput(this.match.slice(Pt))},pastInput:function(){var Pt=this.matched.substr(0,this.matched.length-this.match.length);return(Pt.length>20?"...":"")+Pt.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var Pt=this.match;return Pt.length<20&&(Pt+=this._input.substr(0,20-Pt.length)),(Pt.substr(0,20)+(Pt.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var Pt=this.pastInput(),Yt=new Array(Pt.length+1).join("-");return Pt+this.upcomingInput()+`
1228
1228
  `+Yt+"^"},test_match:function(Pt,Yt){var oe,St,ve;if(this.options.backtrack_lexer&&(ve={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&&(ve.yylloc.range=this.yylloc.range.slice(0))),St=Pt[0].match(/(?:\r\n?|\n).*/g),St&&(this.yylineno+=St.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:St?St[St.length-1].length-St[St.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Pt[0].length},this.yytext+=Pt[0],this.match+=Pt[0],this.matches=Pt,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(Pt[0].length),this.matched+=Pt[0],oe=this.performAction.call(this,this.yy,this,Yt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),oe)return oe;if(this._backtrack){for(var H in ve)this[H]=ve[H];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Pt,Yt,oe,St;this._more||(this.yytext="",this.match="");for(var ve=this._currentRules(),H=0;H<ve.length;H++)if(oe=this._input.match(this.rules[ve[H]]),oe&&(!Yt||oe[0].length>Yt[0].length)){if(Yt=oe,St=H,this.options.backtrack_lexer){if(Pt=this.test_match(oe,ve[H]),Pt!==!1)return Pt;if(this._backtrack){Yt=!1;continue}else return!1}else if(!this.options.flex)break}return Yt?(Pt=this.test_match(Yt,ve[St]),Pt!==!1?Pt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1229
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var Yt=this.next();return Yt||this.lex()},begin:function(Yt){this.conditionStack.push(Yt)},popState:function(){var Yt=this.conditionStack.length-1;return Yt>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(Yt){return Yt=this.conditionStack.length-1-Math.abs(Yt||0),Yt>=0?this.conditionStack[Yt]:"INITIAL"},pushState:function(Yt){this.begin(Yt)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(Yt,oe,St,ve){switch(St){case 0:return this.begin("open_directive"),12;case 1:return this.begin("type_directive"),13;case 2:return this.popState(),this.begin("arg_directive"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:break;case 6:break;case 7:return this.begin("acc_title"),44;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),46;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:this.begin("string");break;case 15:this.popState();break;case 16:return"STR";case 17:return 86;case 18:return 95;case 19:return 87;case 20:return 104;case 21:return 88;case 22:return 89;case 23:this.begin("href");break;case 24:this.popState();break;case 25:return 100;case 26:this.begin("callbackname");break;case 27:this.popState();break;case 28:this.popState(),this.begin("callbackargs");break;case 29:return 98;case 30:this.popState();break;case 31:return 99;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 90;case 35:return Yt.lex.firstGraph()&&this.begin("dir"),24;case 36:return Yt.lex.firstGraph()&&this.begin("dir"),24;case 37:return Yt.lex.firstGraph()&&this.begin("dir"),24;case 38:return 38;case 39:return 42;case 40:return 101;case 41:return 101;case 42:return 101;case 43:return 101;case 44:return this.popState(),25;case 45:return this.popState(),26;case 46:return this.popState(),26;case 47:return this.popState(),26;case 48:return this.popState(),26;case 49:return this.popState(),26;case 50:return this.popState(),26;case 51:return this.popState(),26;case 52:return this.popState(),26;case 53:return this.popState(),26;case 54:return this.popState(),26;case 55:return 118;case 56:return 119;case 57:return 120;case 58:return 121;case 59:return 105;case 60:return 111;case 61:return 53;case 62:return 67;case 63:return 52;case 64:return 20;case 65:return 106;case 66:return 126;case 67:return 82;case 68:return 82;case 69:return 82;case 70:return 81;case 71:return 81;case 72:return 81;case 73:return 59;case 74:return 60;case 75:return 61;case 76:return 62;case 77:return 63;case 78:return 64;case 79:return 65;case 80:return 69;case 81:return 70;case 82:return 55;case 83:return 56;case 84:return 109;case 85:return 112;case 86:return 127;case 87:return 124;case 88:return 113;case 89:return 125;case 90:return 125;case 91:return 114;case 92:return 73;case 93:return 92;case 94:return"SEP";case 95:return 91;case 96:return 66;case 97:return 75;case 98:return 74;case 99:return 77;case 100:return 76;case 101:return 122;case 102:return 123;case 103:return 68;case 104:return 57;case 105:return 58;case 106:return 40;case 107:return 41;case 108:return 71;case 109:return 72;case 110:return 133;case 111:return 21;case 112:return 22;case 113:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\[)/,/^(?:\]\))/,/^(?:\[\[)/,/^(?:\]\])/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\])/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_/])/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[30,31],inclusive:!1},callbackname:{rules:[27,28,29],inclusive:!1},href:{rules:[24,25],inclusive:!1},click:{rules:[33,34],inclusive:!1},vertex:{rules:[],inclusive:!1},dir:{rules:[44,45,46,47,48,49,50,51,52,53,54],inclusive:!1},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},string:{rules:[15,16],inclusive:!1},INITIAL:{rules:[0,5,6,7,9,11,14,17,18,19,20,21,22,23,26,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113],inclusive:!0}}};return wi}();we.lexer=Xs;function ts(){this.yy={}}return ts.prototype=we,we.Parser=ts,new ts}();Mu.parser=Mu;const jd=Mu,JR=(t,e)=>{var r,i;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:t.match(/^\s*graph/)!==null},tO=(t,e)=>{var r,i;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"||((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:t.match(/^\s*graph/)!==null?!0:t.match(/^\s*flowchart/)!==null},eO="flowchart-";let Xd=0,a0=G(),_e={},zn=[],ds={},Xi=[],Ql={},o0={},el=0,Nu=!0,Fr,zc,Uc=[];const Wc=t=>Xt.sanitizeText(t,a0),lm=function(t,e,r){xe.parseDirective(this,t,e,r)},fo=function(t){const e=Object.keys(_e);for(const r of e)if(_e[r].id===t)return _e[r].domId;return t},cm=function(t,e,r,i,n,s,a={}){let o,l=t;l!==void 0&&l.trim().length!==0&&(_e[l]===void 0&&(_e[l]={id:l,domId:eO+l+"-"+Xd,styles:[],classes:[]}),Xd++,e!==void 0?(a0=G(),o=Wc(e.trim()),o[0]==='"'&&o[o.length-1]==='"'&&(o=o.substring(1,o.length-1)),_e[l].text=o):_e[l].text===void 0&&(_e[l].text=t),r!==void 0&&(_e[l].type=r),i!=null&&i.forEach(function(h){_e[l].styles.push(h)}),n!=null&&n.forEach(function(h){_e[l].classes.push(h)}),s!==void 0&&(_e[l].dir=s),_e[l].props===void 0?_e[l].props=a:a!==void 0&&Object.assign(_e[l].props,a))},hm=function(t,e,r,i){const a={start:t,end:e,type:void 0,text:""};i=r.text,i!==void 0&&(a.text=Wc(i.trim()),a.text[0]==='"'&&a.text[a.text.length-1]==='"'&&(a.text=a.text.substring(1,a.text.length-1))),r!==void 0&&(a.type=r.type,a.stroke=r.stroke,a.length=r.length),zn.push(a)},um=function(t,e,r,i){let n,s;for(n=0;n<t.length;n++)for(s=0;s<e.length;s++)hm(t[n],e[s],r,i)},fm=function(t,e){t.forEach(function(r){r==="default"?zn.defaultInterpolate=e:zn[r].interpolate=e})},dm=function(t,e){t.forEach(function(r){r==="default"?zn.defaultStyle=e:(jt.isSubstringInArray("fill",e)===-1&&e.push("fill:none"),zn[r].style=e)})},pm=function(t,e){ds[t]===void 0&&(ds[t]={id:t,styles:[],textStyles:[]}),e!=null&&e.forEach(function(r){if(r.match("color")){const n=r.replace("fill","bgFill").replace("color","fill");ds[t].textStyles.push(n)}ds[t].styles.push(r)})},gm=function(t){Fr=t,Fr.match(/.*</)&&(Fr="RL"),Fr.match(/.*\^/)&&(Fr="BT"),Fr.match(/.*>/)&&(Fr="LR"),Fr.match(/.*v/)&&(Fr="TB"),Fr==="TD"&&(Fr="TB")},Hc=function(t,e){t.split(",").forEach(function(r){let i=r;_e[i]!==void 0&&_e[i].classes.push(e),Ql[i]!==void 0&&Ql[i].classes.push(e)})},rO=function(t,e){t.split(",").forEach(function(r){e!==void 0&&(o0[zc==="gen-1"?fo(r):r]=Wc(e))})},iO=function(t,e,r){let i=fo(t);if(G().securityLevel!=="loose"||e===void 0)return;let n=[];if(typeof r=="string"){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let s=0;s<n.length;s++){let a=n[s].trim();a.charAt(0)==='"'&&a.charAt(a.length-1)==='"'&&(a=a.substr(1,a.length-2)),n[s]=a}}n.length===0&&n.push(t),_e[t]!==void 0&&(_e[t].haveCallback=!0,Uc.push(function(){const s=document.querySelector(`[id="${i}"]`);s!==null&&s.addEventListener("click",function(){jt.runFunc(e,...n)},!1)}))},ym=function(t,e,r){t.split(",").forEach(function(i){_e[i]!==void 0&&(_e[i].link=jt.formatUrl(e,a0),_e[i].linkTarget=r)}),Hc(t,"clickable")},mm=function(t){return o0[t]},bm=function(t,e,r){t.split(",").forEach(function(i){iO(i,e,r)}),Hc(t,"clickable")},_m=function(t){Uc.forEach(function(e){e(t)})},xm=function(){return Fr.trim()},vm=function(){return _e},km=function(){return zn},wm=function(){return ds},Tm=function(t){let e=_t(".mermaidTooltip");(e._groups||e)[0][0]===null&&(e=_t("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),_t(t).select("svg").selectAll("g.node").on("mouseover",function(){const n=_t(this);if(n.attr("title")===null)return;const a=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(n.attr("title")).style("left",window.scrollX+a.left+(a.right-a.left)/2+"px").style("top",window.scrollY+a.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/&lt;br\/&gt;/g,"<br/>")),n.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),_t(this).classed("hover",!1)})};Uc.push(Tm);const Em=function(t="gen-1"){_e={},ds={},zn=[],Uc=[Tm],Xi=[],Ql={},el=0,o0=[],Nu=!0,zc=t,Lr()},Cm=t=>{zc=t||"gen-2"},Sm=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},Am=function(t,e,r){let i=t.trim(),n=r;t===r&&r.match(/\s/)&&(i=void 0);function s(u){const f={boolean:{},number:{},string:{}},d=[];let p;return{nodeList:u.filter(function(b){const x=typeof b;return b.stmt&&b.stmt==="dir"?(p=b.value,!1):b.trim()===""?!1:x in f?f[x].hasOwnProperty(b)?!1:f[x][b]=!0:d.includes(b)?!1:d.push(b)}),dir:p}}let a=[];const{nodeList:o,dir:l}=s(a.concat.apply(a,e));if(a=o,zc==="gen-1")for(let u=0;u<a.length;u++)a[u]=fo(a[u]);i=i||"subGraph"+el,n=n||"",n=Wc(n),el=el+1;const h={id:i,nodes:a,title:n.trim(),classes:[],dir:l};return I.info("Adding",h.id,h.nodes,h.dir),h.nodes=Fm(h,Xi).nodes,Xi.push(h),Ql[i]=h,i},nO=function(t){for(const[e,r]of Xi.entries())if(r.id===t)return e;return-1};let da=-1;const Lm=[],Bm=function(t,e){const r=Xi[e].nodes;if(da=da+1,da>2e3)return;if(Lm[da]=e,Xi[e].id===t)return{result:!0,count:0};let i=0,n=1;for(;i<r.length;){const s=nO(r[i]);if(s>=0){const a=Bm(t,s);if(a.result)return{result:!0,count:n+a.count};n=n+a.count}i=i+1}return{result:!1,count:n}},Dm=function(t){return Lm[t]},Im=function(){da=-1,Xi.length>0&&Bm("none",Xi.length-1)},Mm=function(){return Xi},Nm=()=>Nu?(Nu=!1,!0):!1,sO=t=>{let e=t.trim(),r="arrow_open";switch(e[0]){case"<":r="arrow_point",e=e.slice(1);break;case"x":r="arrow_cross",e=e.slice(1);break;case"o":r="arrow_circle",e=e.slice(1);break}let i="normal";return e.includes("=")&&(i="thick"),e.includes(".")&&(i="dotted"),{type:r,stroke:i}},aO=(t,e)=>{const r=e.length;let i=0;for(let n=0;n<r;++n)e[n]===t&&++i;return i},oO=t=>{const e=t.trim();let r=e.slice(0,-1),i="arrow_open";switch(e.slice(-1)){case"x":i="arrow_cross",e[0]==="x"&&(i="double_"+i,r=r.slice(1));break;case">":i="arrow_point",e[0]==="<"&&(i="double_"+i,r=r.slice(1));break;case"o":i="arrow_circle",e[0]==="o"&&(i="double_"+i,r=r.slice(1));break}let n="normal",s=r.length-1;r[0]==="="&&(n="thick");let a=aO(".",r);return a&&(n="dotted",s=a),{type:i,stroke:n,length:s}},Rm=(t,e)=>{const r=oO(t);let i;if(e){if(i=sO(e),i.stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if(i.type==="arrow_open")i.type=r.type;else{if(i.type!==r.type)return{type:"INVALID",stroke:"INVALID"};i.type="double_"+i.type}return i.type==="double_arrow"&&(i.type="double_arrow_point"),i.length=r.length,i}return r},Om=(t,e)=>{let r=!1;return t.forEach(i=>{i.nodes.indexOf(e)>=0&&(r=!0)}),r},Fm=(t,e)=>{const r=[];return t.nodes.forEach((i,n)=>{Om(e,i)||r.push(t.nodes[n])}),{nodes:r}},Pm={firstGraph:Nm},hi={parseDirective:lm,defaultConfig:()=>Ns.flowchart,setAccTitle:kr,getAccTitle:Br,getAccDescription:Ir,setAccDescription:Dr,addVertex:cm,lookUpDomId:fo,addLink:um,updateLinkInterpolate:fm,updateLink:dm,addClass:pm,setDirection:gm,setClass:Hc,setTooltip:rO,getTooltip:mm,setClickEvent:bm,setLink:ym,bindFunctions:_m,getDirection:xm,getVertices:vm,getEdges:km,getClasses:wm,clear:Em,setGen:Cm,defaultStyle:Sm,addSubGraph:Am,getDepthFirstPos:Dm,indexNodes:Im,getSubGraphs:Mm,destructLink:Rm,lex:Pm,exists:Om,makeUniq:Fm,setDiagramTitle:si,getDiagramTitle:ai},Mz=Object.freeze(Object.defineProperty({__proto__:null,addClass:pm,addLink:um,addSingleLink:hm,addSubGraph:Am,addVertex:cm,bindFunctions:_m,clear:Em,default:hi,defaultStyle:Sm,destructLink:Rm,firstGraph:Nm,getClasses:wm,getDepthFirstPos:Dm,getDirection:xm,getEdges:km,getSubGraphs:Mm,getTooltip:mm,getVertices:vm,indexNodes:Im,lex:Pm,lookUpDomId:fo,parseDirective:lm,setClass:Hc,setClickEvent:bm,setDirection:gm,setGen:Cm,setLink:ym,updateLink:dm,updateLinkInterpolate:fm},Symbol.toStringTag,{value:"Module"}));function Vm(t,e,r){const i=e.width,n=e.height,s=(i+n)*.9,a=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}],o=tn(t,s,s,a);return r.intersect=function(l){return vi(r,a,l)},o}function Ym(t,e,r){const n=e.height,s=n/4,a=e.width+2*s,o=[{x:s,y:0},{x:a-s,y:0},{x:a,y:-n/2},{x:a-s,y:-n},{x:s,y:-n},{x:0,y:-n/2}],l=tn(t,a,n,o);return r.intersect=function(h){return vi(r,o,h)},l}function zm(t,e,r){const i=e.width,n=e.height,s=[{x:-n/2,y:0},{x:i,y:0},{x:i,y:-n},{x:-n/2,y:-n},{x:0,y:-n/2}],a=tn(t,i,n,s);return r.intersect=function(o){return vi(r,s,o)},a}function Um(t,e,r){const i=e.width,n=e.height,s=[{x:-2*n/6,y:0},{x:i-n/6,y:0},{x:i+2*n/6,y:-n},{x:n/6,y:-n}],a=tn(t,i,n,s);return r.intersect=function(o){return vi(r,s,o)},a}function Wm(t,e,r){const i=e.width,n=e.height,s=[{x:2*n/6,y:0},{x:i+n/6,y:0},{x:i-2*n/6,y:-n},{x:-n/6,y:-n}],a=tn(t,i,n,s);return r.intersect=function(o){return vi(r,s,o)},a}function Hm(t,e,r){const i=e.width,n=e.height,s=[{x:-2*n/6,y:0},{x:i+2*n/6,y:0},{x:i-n/6,y:-n},{x:n/6,y:-n}],a=tn(t,i,n,s);return r.intersect=function(o){return vi(r,s,o)},a}function qm(t,e,r){const i=e.width,n=e.height,s=[{x:n/6,y:0},{x:i-n/6,y:0},{x:i+2*n/6,y:-n},{x:-2*n/6,y:-n}],a=tn(t,i,n,s);return r.intersect=function(o){return vi(r,s,o)},a}function Gm(t,e,r){const i=e.width,n=e.height,s=[{x:0,y:0},{x:i+n/2,y:0},{x:i,y:-n/2},{x:i+n/2,y:-n},{x:0,y:-n}],a=tn(t,i,n,s);return r.intersect=function(o){return vi(r,s,o)},a}function $m(t,e,r){const i=e.height,n=e.width+i/4,s=t.insert("rect",":first-child").attr("rx",i/2).attr("ry",i/2).attr("x",-n/2).attr("y",-i/2).attr("width",n).attr("height",i);return r.intersect=function(a){return P1(r,a)},s}function jm(t,e,r){const i=e.width,n=e.height,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-n},{x:0,y:-n},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-n},{x:-8,y:-n},{x:-8,y:0}],a=tn(t,i,n,s);return r.intersect=function(o){return vi(r,s,o)},a}function Xm(t,e,r){const i=e.width,n=i/2,s=n/(2.5+i/50),a=e.height+s,o="M 0,"+s+" a "+n+","+s+" 0,0,0 "+i+" 0 a "+n+","+s+" 0,0,0 "+-i+" 0 l 0,"+a+" a "+n+","+s+" 0,0,0 "+i+" 0 l 0,"+-a,l=t.attr("label-offset-y",s).insert("path",":first-child").attr("d",o).attr("transform","translate("+-i/2+","+-(a/2+s)+")");return r.intersect=function(h){const u=P1(r,h),f=u.x-r.x;if(n!=0&&(Math.abs(f)<r.width/2||Math.abs(f)==r.width/2&&Math.abs(u.y-r.y)>r.height/2-s)){let d=s*s*(1-f*f/(n*n));d!=0&&(d=Math.sqrt(d)),d=s-d,h.y-r.y>0&&(d=-d),u.y+=d}return u},l}function lO(t){t.shapes().question=Vm,t.shapes().hexagon=Ym,t.shapes().stadium=$m,t.shapes().subroutine=jm,t.shapes().cylinder=Xm,t.shapes().rect_left_inv_arrow=zm,t.shapes().lean_right=Um,t.shapes().lean_left=Wm,t.shapes().trapezoid=Hm,t.shapes().inv_trapezoid=qm,t.shapes().rect_right_inv_arrow=Gm}function cO(t){t({question:Vm}),t({hexagon:Ym}),t({stadium:$m}),t({subroutine:jm}),t({cylinder:Xm}),t({rect_left_inv_arrow:zm}),t({lean_right:Um}),t({lean_left:Wm}),t({trapezoid:Hm}),t({inv_trapezoid:qm}),t({rect_right_inv_arrow:Gm})}function tn(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("transform","translate("+-e/2+","+r/2+")")}const hO={addToRender:lO,addToRenderV2:cO},Km={},uO=function(t){const e=Object.keys(t);for(const r of e)Km[r]=t[r]},Zm=function(t,e,r,i,n,s){const a=i?i.select(`[id="${r}"]`):_t(`[id="${r}"]`),o=n||document;Object.keys(t).forEach(function(h){const u=t[h];let f="default";u.classes.length>0&&(f=u.classes.join(" "));const d=dn(u.styles);let p=u.text!==void 0?u.text:u.id,m;if(Ke(G().flowchart.htmlLabels)){const k={label:p.replace(/fa[blrs]?:fa-[\w-]+/g,v=>`<i class='${v.replace(":"," ")}'></i>`)};m=O1(a,k).node(),m.parentNode.removeChild(m)}else{const k=o.createElementNS("http://www.w3.org/2000/svg","text");k.setAttribute("style",d.labelStyle.replace("color:","fill:"));const v=p.split(Xt.lineBreakRegex);for(const B of v){const R=o.createElementNS("http://www.w3.org/2000/svg","tspan");R.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),R.setAttribute("dy","1em"),R.setAttribute("x","1"),R.textContent=B,k.appendChild(R)}m=k}let b=0,x="";switch(u.type){case"round":b=5,x="rect";break;case"square":x="rect";break;case"diamond":x="question";break;case"hexagon":x="hexagon";break;case"odd":x="rect_left_inv_arrow";break;case"lean_right":x="lean_right";break;case"lean_left":x="lean_left";break;case"trapezoid":x="trapezoid";break;case"inv_trapezoid":x="inv_trapezoid";break;case"odd_right":x="rect_left_inv_arrow";break;case"circle":x="circle";break;case"ellipse":x="ellipse";break;case"stadium":x="stadium";break;case"subroutine":x="subroutine";break;case"cylinder":x="cylinder";break;case"group":x="rect";break;default:x="rect"}I.warn("Adding node",u.id,u.domId),e.setNode(s.db.lookUpDomId(u.id),{labelType:"svg",labelStyle:d.labelStyle,shape:x,label:m,rx:b,ry:b,class:f,style:d.style,id:s.db.lookUpDomId(u.id)})})},Qm=function(t,e,r){let i=0,n,s;if(t.defaultStyle!==void 0){const a=dn(t.defaultStyle);n=a.style,s=a.labelStyle}t.forEach(function(a){i++;var o="L-"+a.start+"-"+a.end,l="LS-"+a.start,h="LE-"+a.end;const u={};a.type==="arrow_open"?u.arrowhead="none":u.arrowhead="normal";let f="",d="";if(a.style!==void 0){const p=dn(a.style);f=p.style,d=p.labelStyle}else switch(a.stroke){case"normal":f="fill:none",n!==void 0&&(f=n),s!==void 0&&(d=s);break;case"dotted":f="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":f=" stroke-width: 3.5px;fill:none";break}u.style=f,u.labelStyle=d,a.interpolate!==void 0?u.curve=Zr(a.interpolate,Cr):t.defaultInterpolate!==void 0?u.curve=Zr(t.defaultInterpolate,Cr):u.curve=Zr(Km.curve,Cr),a.text===void 0?a.style!==void 0&&(u.arrowheadStyle="fill: #333"):(u.arrowheadStyle="fill: #333",u.labelpos="c",Ke(G().flowchart.htmlLabels)?(u.labelType="html",u.label=`<span id="L-${o}" class="edgeLabel L-${l}' L-${h}" style="${u.labelStyle}">${a.text.replace(/fa[blrs]?:fa-[\w-]+/g,p=>`<i class='${p.replace(":"," ")}'></i>`)}</span>`):(u.labelType="text",u.label=a.text.replace(Xt.lineBreakRegex,`
1230
- `),a.style===void 0&&(u.style=u.style||"stroke: #333; stroke-width: 1.5px;fill:none"),u.labelStyle=u.labelStyle.replace("color:","fill:"))),u.id=o,u.class=l+" "+h,u.minlen=a.length||1,e.setEdge(r.db.lookUpDomId(a.start),r.db.lookUpDomId(a.end),u,i)})},fO=function(t,e){I.info("Extracting classes"),e.db.clear();try{return e.parse(t),e.db.getClasses()}catch(r){return I.error(r),{}}},dO=function(t,e,r,i){I.info("Drawing flowchart"),i.db.clear();const{securityLevel:n,flowchart:s}=G();let a;n==="sandbox"&&(a=_t("#i"+e));const o=_t(n==="sandbox"?a.nodes()[0].contentDocument.body:"body"),l=n==="sandbox"?a.nodes()[0].contentDocument:document;try{i.parser.parse(t)}catch{I.debug("Parsing failed")}let h=i.db.getDirection();h===void 0&&(h="TD");const u=s.nodeSpacing||50,f=s.rankSpacing||50,d=new Pe({multigraph:!0,compound:!0}).setGraph({rankdir:h,nodesep:u,ranksep:f,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});let p;const m=i.db.getSubGraphs();for(let V=m.length-1;V>=0;V--)p=m[V],i.db.addVertex(p.id,p.title,"group",void 0,p.classes);const b=i.db.getVertices();I.warn("Get vertices",b);const x=i.db.getEdges();let k=0;for(k=m.length-1;k>=0;k--){p=m[k],l1("cluster").append("text");for(let V=0;V<p.nodes.length;V++)I.warn("Setting subgraph",p.nodes[V],i.db.lookUpDomId(p.nodes[V]),i.db.lookUpDomId(p.id)),d.setParent(i.db.lookUpDomId(p.nodes[V]),i.db.lookUpDomId(p.id))}Zm(b,d,e,o,l,i),Qm(x,d,i);const v=new tL;hO.addToRender(v),v.arrows().none=function(O,F,C,S){const _=O.append("marker").attr("id",F).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 0 0 L 0 0 z");xi(_,C[S+"Style"])},v.arrows().normal=function(O,F){O.append("marker").attr("id",F).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowheadPath").style("stroke-width",1).style("stroke-dasharray","1,0")};const B=o.select(`[id="${e}"]`),R=o.select("#"+e+" g");for(v(R,d),R.selectAll("g.node").attr("title",function(){return i.db.getTooltip(this.id)}),i.db.indexNodes("subGraph"+k),k=0;k<m.length;k++)if(p=m[k],p.title!=="undefined"){const V=l.querySelectorAll("#"+e+' [id="'+i.db.lookUpDomId(p.id)+'"] rect'),O=l.querySelectorAll("#"+e+' [id="'+i.db.lookUpDomId(p.id)+'"]'),F=V[0].x.baseVal.value,C=V[0].y.baseVal.value,S=V[0].width.baseVal.value,_=_t(O[0]).select(".label");_.attr("transform",`translate(${F+S/2}, ${C+14})`),_.attr("id",e+"Text");for(let w=0;w<p.classes.length;w++)O[0].classList.add(p.classes[w])}if(!s.htmlLabels){const V=l.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const O of V){const F=O.getBBox(),C=l.createElementNS("http://www.w3.org/2000/svg","rect");C.setAttribute("rx",0),C.setAttribute("ry",0),C.setAttribute("width",F.width),C.setAttribute("height",F.height),O.insertBefore(C,O.firstChild)}}Vc(d,B,s.diagramPadding,s.useMaxWidth),Object.keys(b).forEach(function(V){const O=b[V];if(O.link){const F=o.select("#"+e+' [id="'+i.db.lookUpDomId(V)+'"]');if(F){const C=l.createElementNS("http://www.w3.org/2000/svg","a");C.setAttributeNS("http://www.w3.org/2000/svg","class",O.classes.join(" ")),C.setAttributeNS("http://www.w3.org/2000/svg","href",O.link),C.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),n==="sandbox"?C.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):O.linkTarget&&C.setAttributeNS("http://www.w3.org/2000/svg","target",O.linkTarget);const S=F.insert(function(){return C},":first-child"),E=F.select(".label-container");E&&S.append(function(){return E.node()});const _=F.select(".label");_&&S.append(function(){return _.node()})}}})},pO={setConf:uO,addVertices:Zm,addEdges:Qm,getClasses:fO,draw:dO},Jm={},gO=function(t){const e=Object.keys(t);for(const r of e)Jm[r]=t[r]},t3=function(t,e,r,i,n,s){const a=i.select(`[id="${r}"]`);Object.keys(t).forEach(function(l){const h=t[l];let u="default";h.classes.length>0&&(u=h.classes.join(" "));const f=dn(h.styles);let d=h.text!==void 0?h.text:h.id,p;if(Ke(G().flowchart.htmlLabels)){const x={label:d.replace(/fa[blrs]?:fa-[\w-]+/g,k=>`<i class='${k.replace(":"," ")}'></i>`)};p=O1(a,x).node(),p.parentNode.removeChild(p)}else{const x=n.createElementNS("http://www.w3.org/2000/svg","text");x.setAttribute("style",f.labelStyle.replace("color:","fill:"));const k=d.split(Xt.lineBreakRegex);for(const v of k){const B=n.createElementNS("http://www.w3.org/2000/svg","tspan");B.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),B.setAttribute("dy","1em"),B.setAttribute("x","1"),B.textContent=v,x.appendChild(B)}p=x}let m=0,b="";switch(h.type){case"round":m=5,b="rect";break;case"square":b="rect";break;case"diamond":b="question";break;case"hexagon":b="hexagon";break;case"odd":b="rect_left_inv_arrow";break;case"lean_right":b="lean_right";break;case"lean_left":b="lean_left";break;case"trapezoid":b="trapezoid";break;case"inv_trapezoid":b="inv_trapezoid";break;case"odd_right":b="rect_left_inv_arrow";break;case"circle":b="circle";break;case"ellipse":b="ellipse";break;case"stadium":b="stadium";break;case"subroutine":b="subroutine";break;case"cylinder":b="cylinder";break;case"group":b="rect";break;case"doublecircle":b="doublecircle";break;default:b="rect"}e.setNode(h.id,{labelStyle:f.labelStyle,shape:b,labelText:d,rx:m,ry:m,class:u,style:f.style,id:h.id,link:h.link,linkTarget:h.linkTarget,tooltip:s.db.getTooltip(h.id)||"",domId:s.db.lookUpDomId(h.id),haveCallback:h.haveCallback,width:h.type==="group"?500:void 0,dir:h.dir,type:h.type,props:h.props,padding:G().flowchart.padding}),I.info("setNode",{labelStyle:f.labelStyle,shape:b,labelText:d,rx:m,ry:m,class:u,style:f.style,id:h.id,domId:s.db.lookUpDomId(h.id),width:h.type==="group"?500:void 0,type:h.type,dir:h.dir,props:h.props,padding:G().flowchart.padding})})},e3=function(t,e,r){I.info("abc78 edges = ",t);let i=0,n={},s,a;if(t.defaultStyle!==void 0){const o=dn(t.defaultStyle);s=o.style,a=o.labelStyle}t.forEach(function(o){i++;var l="L-"+o.start+"-"+o.end;n[l]===void 0?(n[l]=0,I.info("abc78 new entry",l,n[l])):(n[l]++,I.info("abc78 new entry",l,n[l]));let h=l+"-"+n[l];I.info("abc78 new link id to be used is",l,h,n[l]);var u="LS-"+o.start,f="LE-"+o.end;const d={style:"",labelStyle:""};switch(d.minlen=o.length||1,o.type==="arrow_open"?d.arrowhead="none":d.arrowhead="normal",d.arrowTypeStart="arrow_open",d.arrowTypeEnd="arrow_open",o.type){case"double_arrow_cross":d.arrowTypeStart="arrow_cross";case"arrow_cross":d.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":d.arrowTypeStart="arrow_point";case"arrow_point":d.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":d.arrowTypeStart="arrow_circle";case"arrow_circle":d.arrowTypeEnd="arrow_circle";break}let p="",m="";switch(o.stroke){case"normal":p="fill:none;",s!==void 0&&(p=s),a!==void 0&&(m=a),d.thickness="normal",d.pattern="solid";break;case"dotted":d.thickness="normal",d.pattern="dotted",d.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":d.thickness="thick",d.pattern="solid",d.style="stroke-width: 3.5px;fill:none;";break}if(o.style!==void 0){const b=dn(o.style);p=b.style,m=b.labelStyle}d.style=d.style+=p,d.labelStyle=d.labelStyle+=m,o.interpolate!==void 0?d.curve=Zr(o.interpolate,Cr):t.defaultInterpolate!==void 0?d.curve=Zr(t.defaultInterpolate,Cr):d.curve=Zr(Jm.curve,Cr),o.text===void 0?o.style!==void 0&&(d.arrowheadStyle="fill: #333"):(d.arrowheadStyle="fill: #333",d.labelpos="c"),d.labelType="text",d.label=o.text.replace(Xt.lineBreakRegex,`
1231
- `),o.style===void 0&&(d.style=d.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),d.labelStyle=d.labelStyle.replace("color:","fill:"),d.id=h,d.classes="flowchart-link "+u+" "+f,e.setEdge(o.start,o.end,d,i)})},yO=function(t,e){I.info("Extracting classes"),e.db.clear();try{return e.parse(t),e.db.getClasses()}catch{return}},mO=function(t,e,r,i){I.info("Drawing flowchart"),i.db.clear(),hi.setGen("gen-2"),i.parser.parse(t);let n=i.db.getDirection();n===void 0&&(n="TD");const{securityLevel:s,flowchart:a}=G(),o=a.nodeSpacing||50,l=a.rankSpacing||50;let h;s==="sandbox"&&(h=_t("#i"+e));const u=_t(s==="sandbox"?h.nodes()[0].contentDocument.body:"body"),f=s==="sandbox"?h.nodes()[0].contentDocument:document,d=new Pe({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:o,ranksep:l,marginx:0,marginy:0}).setDefaultEdgeLabel(function(){return{}});let p;const m=i.db.getSubGraphs();I.info("Subgraphs - ",m);for(let P=m.length-1;P>=0;P--)p=m[P],I.info("Subgraph - ",p),i.db.addVertex(p.id,p.title,"group",void 0,p.classes,p.dir);const b=i.db.getVertices(),x=i.db.getEdges();I.info("Edges",x);let k=0;for(k=m.length-1;k>=0;k--){p=m[k],l1("cluster").append("text");for(let P=0;P<p.nodes.length;P++)I.info("Setting up subgraphs",p.nodes[P],p.id),d.setParent(p.nodes[P],p.id)}t3(b,d,e,u,f,i),e3(x,d);const v=u.select(`[id="${e}"]`),B=u.select("#"+e+" g");if(n0(B,d,["point","circle","cross"],"flowchart",e),jt.insertTitle(v,"flowchartTitleText",a.titleTopMargin,i.db.getDiagramTitle()),Vc(d,v,a.diagramPadding,a.useMaxWidth),i.db.indexNodes("subGraph"+k),!a.htmlLabels){const P=f.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const V of P){const O=V.getBBox(),F=f.createElementNS("http://www.w3.org/2000/svg","rect");F.setAttribute("rx",0),F.setAttribute("ry",0),F.setAttribute("width",O.width),F.setAttribute("height",O.height),V.insertBefore(F,V.firstChild)}}Object.keys(b).forEach(function(P){const V=b[P];if(V.link){const O=_t("#"+e+' [id="'+P+'"]');if(O){const F=f.createElementNS("http://www.w3.org/2000/svg","a");F.setAttributeNS("http://www.w3.org/2000/svg","class",V.classes.join(" ")),F.setAttributeNS("http://www.w3.org/2000/svg","href",V.link),F.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),s==="sandbox"?F.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):V.linkTarget&&F.setAttributeNS("http://www.w3.org/2000/svg","target",V.linkTarget);const C=O.insert(function(){return F},":first-child"),S=O.select(".label-container");S&&C.append(function(){return S.node()});const E=O.select(".label");E&&C.append(function(){return E.node()})}}})},Fh={setConf:gO,addVertices:t3,addEdges:e3,getClasses:yO,draw:mO};var Ru=function(){var t=function(F,C,S,E){for(S=S||{},E=F.length;E--;S[F[E]]=C);return S},e=[1,3],r=[1,5],i=[7,9,11,12,13,14,15,16,17,18,19,20,21,23,25,26,28,35,40],n=[1,15],s=[1,16],a=[1,17],o=[1,18],l=[1,19],h=[1,20],u=[1,21],f=[1,22],d=[1,23],p=[1,24],m=[1,25],b=[1,26],x=[1,27],k=[1,29],v=[1,31],B=[1,34],R=[5,7,9,11,12,13,14,15,16,17,18,19,20,21,23,25,26,28,35,40],P={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,gantt:5,document:6,EOF:7,line:8,SPACE:9,statement:10,NL:11,dateFormat:12,inclusiveEndDates:13,topAxis:14,axisFormat:15,tickInterval:16,excludes:17,includes:18,todayMarker:19,title:20,acc_title:21,acc_title_value:22,acc_descr:23,acc_descr_value:24,acc_descr_multiline_value:25,section:26,clickStatement:27,taskTxt:28,taskData:29,openDirective:30,typeDirective:31,closeDirective:32,":":33,argDirective:34,click:35,callbackname:36,callbackargs:37,href:38,clickStatementDebug:39,open_directive:40,type_directive:41,arg_directive:42,close_directive:43,$accept:0,$end:1},terminals_:{2:"error",5:"gantt",7:"EOF",9:"SPACE",11:"NL",12:"dateFormat",13:"inclusiveEndDates",14:"topAxis",15:"axisFormat",16:"tickInterval",17:"excludes",18:"includes",19:"todayMarker",20:"title",21:"acc_title",22:"acc_title_value",23:"acc_descr",24:"acc_descr_value",25:"acc_descr_multiline_value",26:"section",28:"taskTxt",29:"taskData",33:":",35:"click",36:"callbackname",37:"callbackargs",38:"href",40:"open_directive",41:"type_directive",42:"arg_directive",43:"close_directive"},productions_:[0,[3,2],[3,3],[6,0],[6,2],[8,2],[8,1],[8,1],[8,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[10,1],[10,1],[10,2],[10,1],[4,4],[4,6],[27,2],[27,3],[27,3],[27,4],[27,3],[27,4],[27,2],[39,2],[39,3],[39,3],[39,4],[39,3],[39,4],[39,2],[30,1],[31,1],[34,1],[32,1]],performAction:function(C,S,E,_,w,g,D){var y=g.length-1;switch(w){case 2:return g[y-1];case 3:this.$=[];break;case 4:g[y-1].push(g[y]),this.$=g[y-1];break;case 5:case 6:this.$=g[y];break;case 7:case 8:this.$=[];break;case 9:_.setDateFormat(g[y].substr(11)),this.$=g[y].substr(11);break;case 10:_.enableInclusiveEndDates(),this.$=g[y].substr(18);break;case 11:_.TopAxis(),this.$=g[y].substr(8);break;case 12:_.setAxisFormat(g[y].substr(11)),this.$=g[y].substr(11);break;case 13:_.setTickInterval(g[y].substr(13)),this.$=g[y].substr(13);break;case 14:_.setExcludes(g[y].substr(9)),this.$=g[y].substr(9);break;case 15:_.setIncludes(g[y].substr(9)),this.$=g[y].substr(9);break;case 16:_.setTodayMarker(g[y].substr(12)),this.$=g[y].substr(12);break;case 17:_.setDiagramTitle(g[y].substr(6)),this.$=g[y].substr(6);break;case 18:this.$=g[y].trim(),_.setAccTitle(this.$);break;case 19:case 20:this.$=g[y].trim(),_.setAccDescription(this.$);break;case 21:_.addSection(g[y].substr(8)),this.$=g[y].substr(8);break;case 23:_.addTask(g[y-1],g[y]),this.$="task";break;case 27:this.$=g[y-1],_.setClickEvent(g[y-1],g[y],null);break;case 28:this.$=g[y-2],_.setClickEvent(g[y-2],g[y-1],g[y]);break;case 29:this.$=g[y-2],_.setClickEvent(g[y-2],g[y-1],null),_.setLink(g[y-2],g[y]);break;case 30:this.$=g[y-3],_.setClickEvent(g[y-3],g[y-2],g[y-1]),_.setLink(g[y-3],g[y]);break;case 31:this.$=g[y-2],_.setClickEvent(g[y-2],g[y],null),_.setLink(g[y-2],g[y-1]);break;case 32:this.$=g[y-3],_.setClickEvent(g[y-3],g[y-1],g[y]),_.setLink(g[y-3],g[y-2]);break;case 33:this.$=g[y-1],_.setLink(g[y-1],g[y]);break;case 34:case 40:this.$=g[y-1]+" "+g[y];break;case 35:case 36:case 38:this.$=g[y-2]+" "+g[y-1]+" "+g[y];break;case 37:case 39:this.$=g[y-3]+" "+g[y-2]+" "+g[y-1]+" "+g[y];break;case 41:_.parseDirective("%%{","open_directive");break;case 42:_.parseDirective(g[y],"type_directive");break;case 43:g[y]=g[y].trim().replace(/'/g,'"'),_.parseDirective(g[y],"arg_directive");break;case 44:_.parseDirective("}%%","close_directive","gantt");break}},table:[{3:1,4:2,5:e,30:4,40:r},{1:[3]},{3:6,4:2,5:e,30:4,40:r},t(i,[2,3],{6:7}),{31:8,41:[1,9]},{41:[2,41]},{1:[2,1]},{4:30,7:[1,10],8:11,9:[1,12],10:13,11:[1,14],12:n,13:s,14:a,15:o,16:l,17:h,18:u,19:f,20:d,21:p,23:m,25:b,26:x,27:28,28:k,30:4,35:v,40:r},{32:32,33:[1,33],43:B},t([33,43],[2,42]),t(i,[2,8],{1:[2,2]}),t(i,[2,4]),{4:30,10:35,12:n,13:s,14:a,15:o,16:l,17:h,18:u,19:f,20:d,21:p,23:m,25:b,26:x,27:28,28:k,30:4,35:v,40:r},t(i,[2,6]),t(i,[2,7]),t(i,[2,9]),t(i,[2,10]),t(i,[2,11]),t(i,[2,12]),t(i,[2,13]),t(i,[2,14]),t(i,[2,15]),t(i,[2,16]),t(i,[2,17]),{22:[1,36]},{24:[1,37]},t(i,[2,20]),t(i,[2,21]),t(i,[2,22]),{29:[1,38]},t(i,[2,24]),{36:[1,39],38:[1,40]},{11:[1,41]},{34:42,42:[1,43]},{11:[2,44]},t(i,[2,5]),t(i,[2,18]),t(i,[2,19]),t(i,[2,23]),t(i,[2,27],{37:[1,44],38:[1,45]}),t(i,[2,33],{36:[1,46]}),t(R,[2,25]),{32:47,43:B},{43:[2,43]},t(i,[2,28],{38:[1,48]}),t(i,[2,29]),t(i,[2,31],{37:[1,49]}),{11:[1,50]},t(i,[2,30]),t(i,[2,32]),t(R,[2,26])],defaultActions:{5:[2,41],6:[2,1],34:[2,44],43:[2,43]},parseError:function(C,S){if(S.recoverable)this.trace(C);else{var E=new Error(C);throw E.hash=S,E}},parse:function(C){var S=this,E=[0],_=[],w=[null],g=[],D=this.table,y="",N=0,nt=0,Y=2,Z=1,J=g.slice.call(arguments,1),X=Object.create(this.lexer),tt={yy:{}};for(var ot in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ot)&&(tt.yy[ot]=this.yy[ot]);X.setInput(C,tt.yy),tt.yy.lexer=X,tt.yy.parser=this,typeof X.yylloc>"u"&&(X.yylloc={});var at=X.yylloc;g.push(at);var U=X.options&&X.options.ranges;typeof tt.yy.parseError=="function"?this.parseError=tt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Tt(){var Dt;return Dt=_.pop()||X.lex()||Z,typeof Dt!="number"&&(Dt instanceof Array&&(_=Dt,Dt=_.pop()),Dt=S.symbols_[Dt]||Dt),Dt}for(var $,j,W,z,A={},M,q,L,st;;){if(j=E[E.length-1],this.defaultActions[j]?W=this.defaultActions[j]:(($===null||typeof $>"u")&&($=Tt()),W=D[j]&&D[j][$]),typeof W>"u"||!W.length||!W[0]){var T="";st=[];for(M in D[j])this.terminals_[M]&&M>Y&&st.push("'"+this.terminals_[M]+"'");X.showPosition?T="Parse error on line "+(N+1)+`:
1229
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var Yt=this.next();return Yt||this.lex()},begin:function(Yt){this.conditionStack.push(Yt)},popState:function(){var Yt=this.conditionStack.length-1;return Yt>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(Yt){return Yt=this.conditionStack.length-1-Math.abs(Yt||0),Yt>=0?this.conditionStack[Yt]:"INITIAL"},pushState:function(Yt){this.begin(Yt)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(Yt,oe,St,ve){switch(St){case 0:return this.begin("open_directive"),12;case 1:return this.begin("type_directive"),13;case 2:return this.popState(),this.begin("arg_directive"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:break;case 6:break;case 7:return this.begin("acc_title"),44;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),46;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:this.begin("string");break;case 15:this.popState();break;case 16:return"STR";case 17:return 86;case 18:return 95;case 19:return 87;case 20:return 104;case 21:return 88;case 22:return 89;case 23:this.begin("href");break;case 24:this.popState();break;case 25:return 100;case 26:this.begin("callbackname");break;case 27:this.popState();break;case 28:this.popState(),this.begin("callbackargs");break;case 29:return 98;case 30:this.popState();break;case 31:return 99;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 90;case 35:return Yt.lex.firstGraph()&&this.begin("dir"),24;case 36:return Yt.lex.firstGraph()&&this.begin("dir"),24;case 37:return Yt.lex.firstGraph()&&this.begin("dir"),24;case 38:return 38;case 39:return 42;case 40:return 101;case 41:return 101;case 42:return 101;case 43:return 101;case 44:return this.popState(),25;case 45:return this.popState(),26;case 46:return this.popState(),26;case 47:return this.popState(),26;case 48:return this.popState(),26;case 49:return this.popState(),26;case 50:return this.popState(),26;case 51:return this.popState(),26;case 52:return this.popState(),26;case 53:return this.popState(),26;case 54:return this.popState(),26;case 55:return 118;case 56:return 119;case 57:return 120;case 58:return 121;case 59:return 105;case 60:return 111;case 61:return 53;case 62:return 67;case 63:return 52;case 64:return 20;case 65:return 106;case 66:return 126;case 67:return 82;case 68:return 82;case 69:return 82;case 70:return 81;case 71:return 81;case 72:return 81;case 73:return 59;case 74:return 60;case 75:return 61;case 76:return 62;case 77:return 63;case 78:return 64;case 79:return 65;case 80:return 69;case 81:return 70;case 82:return 55;case 83:return 56;case 84:return 109;case 85:return 112;case 86:return 127;case 87:return 124;case 88:return 113;case 89:return 125;case 90:return 125;case 91:return 114;case 92:return 73;case 93:return 92;case 94:return"SEP";case 95:return 91;case 96:return 66;case 97:return 75;case 98:return 74;case 99:return 77;case 100:return 76;case 101:return 122;case 102:return 123;case 103:return 68;case 104:return 57;case 105:return 58;case 106:return 40;case 107:return 41;case 108:return 71;case 109:return 72;case 110:return 133;case 111:return 21;case 112:return 22;case 113:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\[)/,/^(?:\]\))/,/^(?:\[\[)/,/^(?:\]\])/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\])/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_/])/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[30,31],inclusive:!1},callbackname:{rules:[27,28,29],inclusive:!1},href:{rules:[24,25],inclusive:!1},click:{rules:[33,34],inclusive:!1},vertex:{rules:[],inclusive:!1},dir:{rules:[44,45,46,47,48,49,50,51,52,53,54],inclusive:!1},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},string:{rules:[15,16],inclusive:!1},INITIAL:{rules:[0,5,6,7,9,11,14,17,18,19,20,21,22,23,26,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113],inclusive:!0}}};return wi}();we.lexer=Xs;function ts(){this.yy={}}return ts.prototype=we,we.Parser=ts,new ts}();Mu.parser=Mu;const Xd=Mu,tO=(t,e)=>{var r,i;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:t.match(/^\s*graph/)!==null},eO=(t,e)=>{var r,i;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"||((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:t.match(/^\s*graph/)!==null?!0:t.match(/^\s*flowchart/)!==null},rO="flowchart-";let Kd=0,o0=G(),_e={},zn=[],ds={},Xi=[],Ql={},l0={},el=0,Nu=!0,Fr,zc,Uc=[];const Wc=t=>Xt.sanitizeText(t,o0),cm=function(t,e,r){xe.parseDirective(this,t,e,r)},fo=function(t){const e=Object.keys(_e);for(const r of e)if(_e[r].id===t)return _e[r].domId;return t},hm=function(t,e,r,i,n,s,a={}){let o,l=t;l!==void 0&&l.trim().length!==0&&(_e[l]===void 0&&(_e[l]={id:l,domId:rO+l+"-"+Kd,styles:[],classes:[]}),Kd++,e!==void 0?(o0=G(),o=Wc(e.trim()),o[0]==='"'&&o[o.length-1]==='"'&&(o=o.substring(1,o.length-1)),_e[l].text=o):_e[l].text===void 0&&(_e[l].text=t),r!==void 0&&(_e[l].type=r),i!=null&&i.forEach(function(h){_e[l].styles.push(h)}),n!=null&&n.forEach(function(h){_e[l].classes.push(h)}),s!==void 0&&(_e[l].dir=s),_e[l].props===void 0?_e[l].props=a:a!==void 0&&Object.assign(_e[l].props,a))},um=function(t,e,r,i){const a={start:t,end:e,type:void 0,text:""};i=r.text,i!==void 0&&(a.text=Wc(i.trim()),a.text[0]==='"'&&a.text[a.text.length-1]==='"'&&(a.text=a.text.substring(1,a.text.length-1))),r!==void 0&&(a.type=r.type,a.stroke=r.stroke,a.length=r.length),zn.push(a)},fm=function(t,e,r,i){let n,s;for(n=0;n<t.length;n++)for(s=0;s<e.length;s++)um(t[n],e[s],r,i)},dm=function(t,e){t.forEach(function(r){r==="default"?zn.defaultInterpolate=e:zn[r].interpolate=e})},pm=function(t,e){t.forEach(function(r){r==="default"?zn.defaultStyle=e:(jt.isSubstringInArray("fill",e)===-1&&e.push("fill:none"),zn[r].style=e)})},gm=function(t,e){ds[t]===void 0&&(ds[t]={id:t,styles:[],textStyles:[]}),e!=null&&e.forEach(function(r){if(r.match("color")){const n=r.replace("fill","bgFill").replace("color","fill");ds[t].textStyles.push(n)}ds[t].styles.push(r)})},ym=function(t){Fr=t,Fr.match(/.*</)&&(Fr="RL"),Fr.match(/.*\^/)&&(Fr="BT"),Fr.match(/.*>/)&&(Fr="LR"),Fr.match(/.*v/)&&(Fr="TB"),Fr==="TD"&&(Fr="TB")},Hc=function(t,e){t.split(",").forEach(function(r){let i=r;_e[i]!==void 0&&_e[i].classes.push(e),Ql[i]!==void 0&&Ql[i].classes.push(e)})},iO=function(t,e){t.split(",").forEach(function(r){e!==void 0&&(l0[zc==="gen-1"?fo(r):r]=Wc(e))})},nO=function(t,e,r){let i=fo(t);if(G().securityLevel!=="loose"||e===void 0)return;let n=[];if(typeof r=="string"){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let s=0;s<n.length;s++){let a=n[s].trim();a.charAt(0)==='"'&&a.charAt(a.length-1)==='"'&&(a=a.substr(1,a.length-2)),n[s]=a}}n.length===0&&n.push(t),_e[t]!==void 0&&(_e[t].haveCallback=!0,Uc.push(function(){const s=document.querySelector(`[id="${i}"]`);s!==null&&s.addEventListener("click",function(){jt.runFunc(e,...n)},!1)}))},mm=function(t,e,r){t.split(",").forEach(function(i){_e[i]!==void 0&&(_e[i].link=jt.formatUrl(e,o0),_e[i].linkTarget=r)}),Hc(t,"clickable")},bm=function(t){return l0[t]},_m=function(t,e,r){t.split(",").forEach(function(i){nO(i,e,r)}),Hc(t,"clickable")},xm=function(t){Uc.forEach(function(e){e(t)})},vm=function(){return Fr.trim()},km=function(){return _e},wm=function(){return zn},Tm=function(){return ds},Em=function(t){let e=_t(".mermaidTooltip");(e._groups||e)[0][0]===null&&(e=_t("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),_t(t).select("svg").selectAll("g.node").on("mouseover",function(){const n=_t(this);if(n.attr("title")===null)return;const a=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(n.attr("title")).style("left",window.scrollX+a.left+(a.right-a.left)/2+"px").style("top",window.scrollY+a.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/&lt;br\/&gt;/g,"<br/>")),n.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),_t(this).classed("hover",!1)})};Uc.push(Em);const Cm=function(t="gen-1"){_e={},ds={},zn=[],Uc=[Em],Xi=[],Ql={},el=0,l0=[],Nu=!0,zc=t,Lr()},Sm=t=>{zc=t||"gen-2"},Am=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},Lm=function(t,e,r){let i=t.trim(),n=r;t===r&&r.match(/\s/)&&(i=void 0);function s(u){const f={boolean:{},number:{},string:{}},d=[];let p;return{nodeList:u.filter(function(b){const x=typeof b;return b.stmt&&b.stmt==="dir"?(p=b.value,!1):b.trim()===""?!1:x in f?f[x].hasOwnProperty(b)?!1:f[x][b]=!0:d.includes(b)?!1:d.push(b)}),dir:p}}let a=[];const{nodeList:o,dir:l}=s(a.concat.apply(a,e));if(a=o,zc==="gen-1")for(let u=0;u<a.length;u++)a[u]=fo(a[u]);i=i||"subGraph"+el,n=n||"",n=Wc(n),el=el+1;const h={id:i,nodes:a,title:n.trim(),classes:[],dir:l};return I.info("Adding",h.id,h.nodes,h.dir),h.nodes=Pm(h,Xi).nodes,Xi.push(h),Ql[i]=h,i},sO=function(t){for(const[e,r]of Xi.entries())if(r.id===t)return e;return-1};let da=-1;const Bm=[],Dm=function(t,e){const r=Xi[e].nodes;if(da=da+1,da>2e3)return;if(Bm[da]=e,Xi[e].id===t)return{result:!0,count:0};let i=0,n=1;for(;i<r.length;){const s=sO(r[i]);if(s>=0){const a=Dm(t,s);if(a.result)return{result:!0,count:n+a.count};n=n+a.count}i=i+1}return{result:!1,count:n}},Im=function(t){return Bm[t]},Mm=function(){da=-1,Xi.length>0&&Dm("none",Xi.length-1)},Nm=function(){return Xi},Rm=()=>Nu?(Nu=!1,!0):!1,aO=t=>{let e=t.trim(),r="arrow_open";switch(e[0]){case"<":r="arrow_point",e=e.slice(1);break;case"x":r="arrow_cross",e=e.slice(1);break;case"o":r="arrow_circle",e=e.slice(1);break}let i="normal";return e.includes("=")&&(i="thick"),e.includes(".")&&(i="dotted"),{type:r,stroke:i}},oO=(t,e)=>{const r=e.length;let i=0;for(let n=0;n<r;++n)e[n]===t&&++i;return i},lO=t=>{const e=t.trim();let r=e.slice(0,-1),i="arrow_open";switch(e.slice(-1)){case"x":i="arrow_cross",e[0]==="x"&&(i="double_"+i,r=r.slice(1));break;case">":i="arrow_point",e[0]==="<"&&(i="double_"+i,r=r.slice(1));break;case"o":i="arrow_circle",e[0]==="o"&&(i="double_"+i,r=r.slice(1));break}let n="normal",s=r.length-1;r[0]==="="&&(n="thick");let a=oO(".",r);return a&&(n="dotted",s=a),{type:i,stroke:n,length:s}},Om=(t,e)=>{const r=lO(t);let i;if(e){if(i=aO(e),i.stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if(i.type==="arrow_open")i.type=r.type;else{if(i.type!==r.type)return{type:"INVALID",stroke:"INVALID"};i.type="double_"+i.type}return i.type==="double_arrow"&&(i.type="double_arrow_point"),i.length=r.length,i}return r},Fm=(t,e)=>{let r=!1;return t.forEach(i=>{i.nodes.indexOf(e)>=0&&(r=!0)}),r},Pm=(t,e)=>{const r=[];return t.nodes.forEach((i,n)=>{Fm(e,i)||r.push(t.nodes[n])}),{nodes:r}},Vm={firstGraph:Rm},hi={parseDirective:cm,defaultConfig:()=>Ns.flowchart,setAccTitle:kr,getAccTitle:Br,getAccDescription:Ir,setAccDescription:Dr,addVertex:hm,lookUpDomId:fo,addLink:fm,updateLinkInterpolate:dm,updateLink:pm,addClass:gm,setDirection:ym,setClass:Hc,setTooltip:iO,getTooltip:bm,setClickEvent:_m,setLink:mm,bindFunctions:xm,getDirection:vm,getVertices:km,getEdges:wm,getClasses:Tm,clear:Cm,setGen:Sm,defaultStyle:Am,addSubGraph:Lm,getDepthFirstPos:Im,indexNodes:Mm,getSubGraphs:Nm,destructLink:Om,lex:Vm,exists:Fm,makeUniq:Pm,setDiagramTitle:si,getDiagramTitle:ai},Nz=Object.freeze(Object.defineProperty({__proto__:null,addClass:gm,addLink:fm,addSingleLink:um,addSubGraph:Lm,addVertex:hm,bindFunctions:xm,clear:Cm,default:hi,defaultStyle:Am,destructLink:Om,firstGraph:Rm,getClasses:Tm,getDepthFirstPos:Im,getDirection:vm,getEdges:wm,getSubGraphs:Nm,getTooltip:bm,getVertices:km,indexNodes:Mm,lex:Vm,lookUpDomId:fo,parseDirective:cm,setClass:Hc,setClickEvent:_m,setDirection:ym,setGen:Sm,setLink:mm,updateLink:pm,updateLinkInterpolate:dm},Symbol.toStringTag,{value:"Module"}));function Ym(t,e,r){const i=e.width,n=e.height,s=(i+n)*.9,a=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}],o=tn(t,s,s,a);return r.intersect=function(l){return vi(r,a,l)},o}function zm(t,e,r){const n=e.height,s=n/4,a=e.width+2*s,o=[{x:s,y:0},{x:a-s,y:0},{x:a,y:-n/2},{x:a-s,y:-n},{x:s,y:-n},{x:0,y:-n/2}],l=tn(t,a,n,o);return r.intersect=function(h){return vi(r,o,h)},l}function Um(t,e,r){const i=e.width,n=e.height,s=[{x:-n/2,y:0},{x:i,y:0},{x:i,y:-n},{x:-n/2,y:-n},{x:0,y:-n/2}],a=tn(t,i,n,s);return r.intersect=function(o){return vi(r,s,o)},a}function Wm(t,e,r){const i=e.width,n=e.height,s=[{x:-2*n/6,y:0},{x:i-n/6,y:0},{x:i+2*n/6,y:-n},{x:n/6,y:-n}],a=tn(t,i,n,s);return r.intersect=function(o){return vi(r,s,o)},a}function Hm(t,e,r){const i=e.width,n=e.height,s=[{x:2*n/6,y:0},{x:i+n/6,y:0},{x:i-2*n/6,y:-n},{x:-n/6,y:-n}],a=tn(t,i,n,s);return r.intersect=function(o){return vi(r,s,o)},a}function qm(t,e,r){const i=e.width,n=e.height,s=[{x:-2*n/6,y:0},{x:i+2*n/6,y:0},{x:i-n/6,y:-n},{x:n/6,y:-n}],a=tn(t,i,n,s);return r.intersect=function(o){return vi(r,s,o)},a}function Gm(t,e,r){const i=e.width,n=e.height,s=[{x:n/6,y:0},{x:i-n/6,y:0},{x:i+2*n/6,y:-n},{x:-2*n/6,y:-n}],a=tn(t,i,n,s);return r.intersect=function(o){return vi(r,s,o)},a}function $m(t,e,r){const i=e.width,n=e.height,s=[{x:0,y:0},{x:i+n/2,y:0},{x:i,y:-n/2},{x:i+n/2,y:-n},{x:0,y:-n}],a=tn(t,i,n,s);return r.intersect=function(o){return vi(r,s,o)},a}function jm(t,e,r){const i=e.height,n=e.width+i/4,s=t.insert("rect",":first-child").attr("rx",i/2).attr("ry",i/2).attr("x",-n/2).attr("y",-i/2).attr("width",n).attr("height",i);return r.intersect=function(a){return V1(r,a)},s}function Xm(t,e,r){const i=e.width,n=e.height,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-n},{x:0,y:-n},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-n},{x:-8,y:-n},{x:-8,y:0}],a=tn(t,i,n,s);return r.intersect=function(o){return vi(r,s,o)},a}function Km(t,e,r){const i=e.width,n=i/2,s=n/(2.5+i/50),a=e.height+s,o="M 0,"+s+" a "+n+","+s+" 0,0,0 "+i+" 0 a "+n+","+s+" 0,0,0 "+-i+" 0 l 0,"+a+" a "+n+","+s+" 0,0,0 "+i+" 0 l 0,"+-a,l=t.attr("label-offset-y",s).insert("path",":first-child").attr("d",o).attr("transform","translate("+-i/2+","+-(a/2+s)+")");return r.intersect=function(h){const u=V1(r,h),f=u.x-r.x;if(n!=0&&(Math.abs(f)<r.width/2||Math.abs(f)==r.width/2&&Math.abs(u.y-r.y)>r.height/2-s)){let d=s*s*(1-f*f/(n*n));d!=0&&(d=Math.sqrt(d)),d=s-d,h.y-r.y>0&&(d=-d),u.y+=d}return u},l}function cO(t){t.shapes().question=Ym,t.shapes().hexagon=zm,t.shapes().stadium=jm,t.shapes().subroutine=Xm,t.shapes().cylinder=Km,t.shapes().rect_left_inv_arrow=Um,t.shapes().lean_right=Wm,t.shapes().lean_left=Hm,t.shapes().trapezoid=qm,t.shapes().inv_trapezoid=Gm,t.shapes().rect_right_inv_arrow=$m}function hO(t){t({question:Ym}),t({hexagon:zm}),t({stadium:jm}),t({subroutine:Xm}),t({cylinder:Km}),t({rect_left_inv_arrow:Um}),t({lean_right:Wm}),t({lean_left:Hm}),t({trapezoid:qm}),t({inv_trapezoid:Gm}),t({rect_right_inv_arrow:$m})}function tn(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("transform","translate("+-e/2+","+r/2+")")}const uO={addToRender:cO,addToRenderV2:hO},Zm={},fO=function(t){const e=Object.keys(t);for(const r of e)Zm[r]=t[r]},Qm=function(t,e,r,i,n,s){const a=i?i.select(`[id="${r}"]`):_t(`[id="${r}"]`),o=n||document;Object.keys(t).forEach(function(h){const u=t[h];let f="default";u.classes.length>0&&(f=u.classes.join(" "));const d=dn(u.styles);let p=u.text!==void 0?u.text:u.id,m;if(Ke(G().flowchart.htmlLabels)){const k={label:p.replace(/fa[blrs]?:fa-[\w-]+/g,v=>`<i class='${v.replace(":"," ")}'></i>`)};m=F1(a,k).node(),m.parentNode.removeChild(m)}else{const k=o.createElementNS("http://www.w3.org/2000/svg","text");k.setAttribute("style",d.labelStyle.replace("color:","fill:"));const v=p.split(Xt.lineBreakRegex);for(const B of v){const R=o.createElementNS("http://www.w3.org/2000/svg","tspan");R.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),R.setAttribute("dy","1em"),R.setAttribute("x","1"),R.textContent=B,k.appendChild(R)}m=k}let b=0,x="";switch(u.type){case"round":b=5,x="rect";break;case"square":x="rect";break;case"diamond":x="question";break;case"hexagon":x="hexagon";break;case"odd":x="rect_left_inv_arrow";break;case"lean_right":x="lean_right";break;case"lean_left":x="lean_left";break;case"trapezoid":x="trapezoid";break;case"inv_trapezoid":x="inv_trapezoid";break;case"odd_right":x="rect_left_inv_arrow";break;case"circle":x="circle";break;case"ellipse":x="ellipse";break;case"stadium":x="stadium";break;case"subroutine":x="subroutine";break;case"cylinder":x="cylinder";break;case"group":x="rect";break;default:x="rect"}I.warn("Adding node",u.id,u.domId),e.setNode(s.db.lookUpDomId(u.id),{labelType:"svg",labelStyle:d.labelStyle,shape:x,label:m,rx:b,ry:b,class:f,style:d.style,id:s.db.lookUpDomId(u.id)})})},Jm=function(t,e,r){let i=0,n,s;if(t.defaultStyle!==void 0){const a=dn(t.defaultStyle);n=a.style,s=a.labelStyle}t.forEach(function(a){i++;var o="L-"+a.start+"-"+a.end,l="LS-"+a.start,h="LE-"+a.end;const u={};a.type==="arrow_open"?u.arrowhead="none":u.arrowhead="normal";let f="",d="";if(a.style!==void 0){const p=dn(a.style);f=p.style,d=p.labelStyle}else switch(a.stroke){case"normal":f="fill:none",n!==void 0&&(f=n),s!==void 0&&(d=s);break;case"dotted":f="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":f=" stroke-width: 3.5px;fill:none";break}u.style=f,u.labelStyle=d,a.interpolate!==void 0?u.curve=Zr(a.interpolate,Cr):t.defaultInterpolate!==void 0?u.curve=Zr(t.defaultInterpolate,Cr):u.curve=Zr(Zm.curve,Cr),a.text===void 0?a.style!==void 0&&(u.arrowheadStyle="fill: #333"):(u.arrowheadStyle="fill: #333",u.labelpos="c",Ke(G().flowchart.htmlLabels)?(u.labelType="html",u.label=`<span id="L-${o}" class="edgeLabel L-${l}' L-${h}" style="${u.labelStyle}">${a.text.replace(/fa[blrs]?:fa-[\w-]+/g,p=>`<i class='${p.replace(":"," ")}'></i>`)}</span>`):(u.labelType="text",u.label=a.text.replace(Xt.lineBreakRegex,`
1230
+ `),a.style===void 0&&(u.style=u.style||"stroke: #333; stroke-width: 1.5px;fill:none"),u.labelStyle=u.labelStyle.replace("color:","fill:"))),u.id=o,u.class=l+" "+h,u.minlen=a.length||1,e.setEdge(r.db.lookUpDomId(a.start),r.db.lookUpDomId(a.end),u,i)})},dO=function(t,e){I.info("Extracting classes"),e.db.clear();try{return e.parse(t),e.db.getClasses()}catch(r){return I.error(r),{}}},pO=function(t,e,r,i){I.info("Drawing flowchart"),i.db.clear();const{securityLevel:n,flowchart:s}=G();let a;n==="sandbox"&&(a=_t("#i"+e));const o=_t(n==="sandbox"?a.nodes()[0].contentDocument.body:"body"),l=n==="sandbox"?a.nodes()[0].contentDocument:document;try{i.parser.parse(t)}catch{I.debug("Parsing failed")}let h=i.db.getDirection();h===void 0&&(h="TD");const u=s.nodeSpacing||50,f=s.rankSpacing||50,d=new Pe({multigraph:!0,compound:!0}).setGraph({rankdir:h,nodesep:u,ranksep:f,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});let p;const m=i.db.getSubGraphs();for(let V=m.length-1;V>=0;V--)p=m[V],i.db.addVertex(p.id,p.title,"group",void 0,p.classes);const b=i.db.getVertices();I.warn("Get vertices",b);const x=i.db.getEdges();let k=0;for(k=m.length-1;k>=0;k--){p=m[k],c1("cluster").append("text");for(let V=0;V<p.nodes.length;V++)I.warn("Setting subgraph",p.nodes[V],i.db.lookUpDomId(p.nodes[V]),i.db.lookUpDomId(p.id)),d.setParent(i.db.lookUpDomId(p.nodes[V]),i.db.lookUpDomId(p.id))}Qm(b,d,e,o,l,i),Jm(x,d,i);const v=new eL;uO.addToRender(v),v.arrows().none=function(O,F,C,S){const _=O.append("marker").attr("id",F).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 0 0 L 0 0 z");xi(_,C[S+"Style"])},v.arrows().normal=function(O,F){O.append("marker").attr("id",F).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowheadPath").style("stroke-width",1).style("stroke-dasharray","1,0")};const B=o.select(`[id="${e}"]`),R=o.select("#"+e+" g");for(v(R,d),R.selectAll("g.node").attr("title",function(){return i.db.getTooltip(this.id)}),i.db.indexNodes("subGraph"+k),k=0;k<m.length;k++)if(p=m[k],p.title!=="undefined"){const V=l.querySelectorAll("#"+e+' [id="'+i.db.lookUpDomId(p.id)+'"] rect'),O=l.querySelectorAll("#"+e+' [id="'+i.db.lookUpDomId(p.id)+'"]'),F=V[0].x.baseVal.value,C=V[0].y.baseVal.value,S=V[0].width.baseVal.value,_=_t(O[0]).select(".label");_.attr("transform",`translate(${F+S/2}, ${C+14})`),_.attr("id",e+"Text");for(let w=0;w<p.classes.length;w++)O[0].classList.add(p.classes[w])}if(!s.htmlLabels){const V=l.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const O of V){const F=O.getBBox(),C=l.createElementNS("http://www.w3.org/2000/svg","rect");C.setAttribute("rx",0),C.setAttribute("ry",0),C.setAttribute("width",F.width),C.setAttribute("height",F.height),O.insertBefore(C,O.firstChild)}}Vc(d,B,s.diagramPadding,s.useMaxWidth),Object.keys(b).forEach(function(V){const O=b[V];if(O.link){const F=o.select("#"+e+' [id="'+i.db.lookUpDomId(V)+'"]');if(F){const C=l.createElementNS("http://www.w3.org/2000/svg","a");C.setAttributeNS("http://www.w3.org/2000/svg","class",O.classes.join(" ")),C.setAttributeNS("http://www.w3.org/2000/svg","href",O.link),C.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),n==="sandbox"?C.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):O.linkTarget&&C.setAttributeNS("http://www.w3.org/2000/svg","target",O.linkTarget);const S=F.insert(function(){return C},":first-child"),E=F.select(".label-container");E&&S.append(function(){return E.node()});const _=F.select(".label");_&&S.append(function(){return _.node()})}}})},gO={setConf:fO,addVertices:Qm,addEdges:Jm,getClasses:dO,draw:pO},t3={},yO=function(t){const e=Object.keys(t);for(const r of e)t3[r]=t[r]},e3=function(t,e,r,i,n,s){const a=i.select(`[id="${r}"]`);Object.keys(t).forEach(function(l){const h=t[l];let u="default";h.classes.length>0&&(u=h.classes.join(" "));const f=dn(h.styles);let d=h.text!==void 0?h.text:h.id,p;if(Ke(G().flowchart.htmlLabels)){const x={label:d.replace(/fa[blrs]?:fa-[\w-]+/g,k=>`<i class='${k.replace(":"," ")}'></i>`)};p=F1(a,x).node(),p.parentNode.removeChild(p)}else{const x=n.createElementNS("http://www.w3.org/2000/svg","text");x.setAttribute("style",f.labelStyle.replace("color:","fill:"));const k=d.split(Xt.lineBreakRegex);for(const v of k){const B=n.createElementNS("http://www.w3.org/2000/svg","tspan");B.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),B.setAttribute("dy","1em"),B.setAttribute("x","1"),B.textContent=v,x.appendChild(B)}p=x}let m=0,b="";switch(h.type){case"round":m=5,b="rect";break;case"square":b="rect";break;case"diamond":b="question";break;case"hexagon":b="hexagon";break;case"odd":b="rect_left_inv_arrow";break;case"lean_right":b="lean_right";break;case"lean_left":b="lean_left";break;case"trapezoid":b="trapezoid";break;case"inv_trapezoid":b="inv_trapezoid";break;case"odd_right":b="rect_left_inv_arrow";break;case"circle":b="circle";break;case"ellipse":b="ellipse";break;case"stadium":b="stadium";break;case"subroutine":b="subroutine";break;case"cylinder":b="cylinder";break;case"group":b="rect";break;case"doublecircle":b="doublecircle";break;default:b="rect"}e.setNode(h.id,{labelStyle:f.labelStyle,shape:b,labelText:d,rx:m,ry:m,class:u,style:f.style,id:h.id,link:h.link,linkTarget:h.linkTarget,tooltip:s.db.getTooltip(h.id)||"",domId:s.db.lookUpDomId(h.id),haveCallback:h.haveCallback,width:h.type==="group"?500:void 0,dir:h.dir,type:h.type,props:h.props,padding:G().flowchart.padding}),I.info("setNode",{labelStyle:f.labelStyle,shape:b,labelText:d,rx:m,ry:m,class:u,style:f.style,id:h.id,domId:s.db.lookUpDomId(h.id),width:h.type==="group"?500:void 0,type:h.type,dir:h.dir,props:h.props,padding:G().flowchart.padding})})},r3=function(t,e,r){I.info("abc78 edges = ",t);let i=0,n={},s,a;if(t.defaultStyle!==void 0){const o=dn(t.defaultStyle);s=o.style,a=o.labelStyle}t.forEach(function(o){i++;var l="L-"+o.start+"-"+o.end;n[l]===void 0?(n[l]=0,I.info("abc78 new entry",l,n[l])):(n[l]++,I.info("abc78 new entry",l,n[l]));let h=l+"-"+n[l];I.info("abc78 new link id to be used is",l,h,n[l]);var u="LS-"+o.start,f="LE-"+o.end;const d={style:"",labelStyle:""};switch(d.minlen=o.length||1,o.type==="arrow_open"?d.arrowhead="none":d.arrowhead="normal",d.arrowTypeStart="arrow_open",d.arrowTypeEnd="arrow_open",o.type){case"double_arrow_cross":d.arrowTypeStart="arrow_cross";case"arrow_cross":d.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":d.arrowTypeStart="arrow_point";case"arrow_point":d.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":d.arrowTypeStart="arrow_circle";case"arrow_circle":d.arrowTypeEnd="arrow_circle";break}let p="",m="";switch(o.stroke){case"normal":p="fill:none;",s!==void 0&&(p=s),a!==void 0&&(m=a),d.thickness="normal",d.pattern="solid";break;case"dotted":d.thickness="normal",d.pattern="dotted",d.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":d.thickness="thick",d.pattern="solid",d.style="stroke-width: 3.5px;fill:none;";break}if(o.style!==void 0){const b=dn(o.style);p=b.style,m=b.labelStyle}d.style=d.style+=p,d.labelStyle=d.labelStyle+=m,o.interpolate!==void 0?d.curve=Zr(o.interpolate,Cr):t.defaultInterpolate!==void 0?d.curve=Zr(t.defaultInterpolate,Cr):d.curve=Zr(t3.curve,Cr),o.text===void 0?o.style!==void 0&&(d.arrowheadStyle="fill: #333"):(d.arrowheadStyle="fill: #333",d.labelpos="c"),d.labelType="text",d.label=o.text.replace(Xt.lineBreakRegex,`
1231
+ `),o.style===void 0&&(d.style=d.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),d.labelStyle=d.labelStyle.replace("color:","fill:"),d.id=h,d.classes="flowchart-link "+u+" "+f,e.setEdge(o.start,o.end,d,i)})},mO=function(t,e){I.info("Extracting classes"),e.db.clear();try{return e.parse(t),e.db.getClasses()}catch{return}},bO=function(t,e,r,i){I.info("Drawing flowchart"),i.db.clear(),hi.setGen("gen-2"),i.parser.parse(t);let n=i.db.getDirection();n===void 0&&(n="TD");const{securityLevel:s,flowchart:a}=G(),o=a.nodeSpacing||50,l=a.rankSpacing||50;let h;s==="sandbox"&&(h=_t("#i"+e));const u=_t(s==="sandbox"?h.nodes()[0].contentDocument.body:"body"),f=s==="sandbox"?h.nodes()[0].contentDocument:document,d=new Pe({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:o,ranksep:l,marginx:0,marginy:0}).setDefaultEdgeLabel(function(){return{}});let p;const m=i.db.getSubGraphs();I.info("Subgraphs - ",m);for(let P=m.length-1;P>=0;P--)p=m[P],I.info("Subgraph - ",p),i.db.addVertex(p.id,p.title,"group",void 0,p.classes,p.dir);const b=i.db.getVertices(),x=i.db.getEdges();I.info("Edges",x);let k=0;for(k=m.length-1;k>=0;k--){p=m[k],c1("cluster").append("text");for(let P=0;P<p.nodes.length;P++)I.info("Setting up subgraphs",p.nodes[P],p.id),d.setParent(p.nodes[P],p.id)}e3(b,d,e,u,f,i),r3(x,d);const v=u.select(`[id="${e}"]`),B=u.select("#"+e+" g");if(s0(B,d,["point","circle","cross"],"flowchart",e),jt.insertTitle(v,"flowchartTitleText",a.titleTopMargin,i.db.getDiagramTitle()),Vc(d,v,a.diagramPadding,a.useMaxWidth),i.db.indexNodes("subGraph"+k),!a.htmlLabels){const P=f.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const V of P){const O=V.getBBox(),F=f.createElementNS("http://www.w3.org/2000/svg","rect");F.setAttribute("rx",0),F.setAttribute("ry",0),F.setAttribute("width",O.width),F.setAttribute("height",O.height),V.insertBefore(F,V.firstChild)}}Object.keys(b).forEach(function(P){const V=b[P];if(V.link){const O=_t("#"+e+' [id="'+P+'"]');if(O){const F=f.createElementNS("http://www.w3.org/2000/svg","a");F.setAttributeNS("http://www.w3.org/2000/svg","class",V.classes.join(" ")),F.setAttributeNS("http://www.w3.org/2000/svg","href",V.link),F.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),s==="sandbox"?F.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):V.linkTarget&&F.setAttributeNS("http://www.w3.org/2000/svg","target",V.linkTarget);const C=O.insert(function(){return F},":first-child"),S=O.select(".label-container");S&&C.append(function(){return S.node()});const E=O.select(".label");E&&C.append(function(){return E.node()})}}})},Fh={setConf:yO,addVertices:e3,addEdges:r3,getClasses:mO,draw:bO};var Ru=function(){var t=function(F,C,S,E){for(S=S||{},E=F.length;E--;S[F[E]]=C);return S},e=[1,3],r=[1,5],i=[7,9,11,12,13,14,15,16,17,18,19,20,21,23,25,26,28,35,40],n=[1,15],s=[1,16],a=[1,17],o=[1,18],l=[1,19],h=[1,20],u=[1,21],f=[1,22],d=[1,23],p=[1,24],m=[1,25],b=[1,26],x=[1,27],k=[1,29],v=[1,31],B=[1,34],R=[5,7,9,11,12,13,14,15,16,17,18,19,20,21,23,25,26,28,35,40],P={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,gantt:5,document:6,EOF:7,line:8,SPACE:9,statement:10,NL:11,dateFormat:12,inclusiveEndDates:13,topAxis:14,axisFormat:15,tickInterval:16,excludes:17,includes:18,todayMarker:19,title:20,acc_title:21,acc_title_value:22,acc_descr:23,acc_descr_value:24,acc_descr_multiline_value:25,section:26,clickStatement:27,taskTxt:28,taskData:29,openDirective:30,typeDirective:31,closeDirective:32,":":33,argDirective:34,click:35,callbackname:36,callbackargs:37,href:38,clickStatementDebug:39,open_directive:40,type_directive:41,arg_directive:42,close_directive:43,$accept:0,$end:1},terminals_:{2:"error",5:"gantt",7:"EOF",9:"SPACE",11:"NL",12:"dateFormat",13:"inclusiveEndDates",14:"topAxis",15:"axisFormat",16:"tickInterval",17:"excludes",18:"includes",19:"todayMarker",20:"title",21:"acc_title",22:"acc_title_value",23:"acc_descr",24:"acc_descr_value",25:"acc_descr_multiline_value",26:"section",28:"taskTxt",29:"taskData",33:":",35:"click",36:"callbackname",37:"callbackargs",38:"href",40:"open_directive",41:"type_directive",42:"arg_directive",43:"close_directive"},productions_:[0,[3,2],[3,3],[6,0],[6,2],[8,2],[8,1],[8,1],[8,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[10,1],[10,1],[10,2],[10,1],[4,4],[4,6],[27,2],[27,3],[27,3],[27,4],[27,3],[27,4],[27,2],[39,2],[39,3],[39,3],[39,4],[39,3],[39,4],[39,2],[30,1],[31,1],[34,1],[32,1]],performAction:function(C,S,E,_,w,g,D){var y=g.length-1;switch(w){case 2:return g[y-1];case 3:this.$=[];break;case 4:g[y-1].push(g[y]),this.$=g[y-1];break;case 5:case 6:this.$=g[y];break;case 7:case 8:this.$=[];break;case 9:_.setDateFormat(g[y].substr(11)),this.$=g[y].substr(11);break;case 10:_.enableInclusiveEndDates(),this.$=g[y].substr(18);break;case 11:_.TopAxis(),this.$=g[y].substr(8);break;case 12:_.setAxisFormat(g[y].substr(11)),this.$=g[y].substr(11);break;case 13:_.setTickInterval(g[y].substr(13)),this.$=g[y].substr(13);break;case 14:_.setExcludes(g[y].substr(9)),this.$=g[y].substr(9);break;case 15:_.setIncludes(g[y].substr(9)),this.$=g[y].substr(9);break;case 16:_.setTodayMarker(g[y].substr(12)),this.$=g[y].substr(12);break;case 17:_.setDiagramTitle(g[y].substr(6)),this.$=g[y].substr(6);break;case 18:this.$=g[y].trim(),_.setAccTitle(this.$);break;case 19:case 20:this.$=g[y].trim(),_.setAccDescription(this.$);break;case 21:_.addSection(g[y].substr(8)),this.$=g[y].substr(8);break;case 23:_.addTask(g[y-1],g[y]),this.$="task";break;case 27:this.$=g[y-1],_.setClickEvent(g[y-1],g[y],null);break;case 28:this.$=g[y-2],_.setClickEvent(g[y-2],g[y-1],g[y]);break;case 29:this.$=g[y-2],_.setClickEvent(g[y-2],g[y-1],null),_.setLink(g[y-2],g[y]);break;case 30:this.$=g[y-3],_.setClickEvent(g[y-3],g[y-2],g[y-1]),_.setLink(g[y-3],g[y]);break;case 31:this.$=g[y-2],_.setClickEvent(g[y-2],g[y],null),_.setLink(g[y-2],g[y-1]);break;case 32:this.$=g[y-3],_.setClickEvent(g[y-3],g[y-1],g[y]),_.setLink(g[y-3],g[y-2]);break;case 33:this.$=g[y-1],_.setLink(g[y-1],g[y]);break;case 34:case 40:this.$=g[y-1]+" "+g[y];break;case 35:case 36:case 38:this.$=g[y-2]+" "+g[y-1]+" "+g[y];break;case 37:case 39:this.$=g[y-3]+" "+g[y-2]+" "+g[y-1]+" "+g[y];break;case 41:_.parseDirective("%%{","open_directive");break;case 42:_.parseDirective(g[y],"type_directive");break;case 43:g[y]=g[y].trim().replace(/'/g,'"'),_.parseDirective(g[y],"arg_directive");break;case 44:_.parseDirective("}%%","close_directive","gantt");break}},table:[{3:1,4:2,5:e,30:4,40:r},{1:[3]},{3:6,4:2,5:e,30:4,40:r},t(i,[2,3],{6:7}),{31:8,41:[1,9]},{41:[2,41]},{1:[2,1]},{4:30,7:[1,10],8:11,9:[1,12],10:13,11:[1,14],12:n,13:s,14:a,15:o,16:l,17:h,18:u,19:f,20:d,21:p,23:m,25:b,26:x,27:28,28:k,30:4,35:v,40:r},{32:32,33:[1,33],43:B},t([33,43],[2,42]),t(i,[2,8],{1:[2,2]}),t(i,[2,4]),{4:30,10:35,12:n,13:s,14:a,15:o,16:l,17:h,18:u,19:f,20:d,21:p,23:m,25:b,26:x,27:28,28:k,30:4,35:v,40:r},t(i,[2,6]),t(i,[2,7]),t(i,[2,9]),t(i,[2,10]),t(i,[2,11]),t(i,[2,12]),t(i,[2,13]),t(i,[2,14]),t(i,[2,15]),t(i,[2,16]),t(i,[2,17]),{22:[1,36]},{24:[1,37]},t(i,[2,20]),t(i,[2,21]),t(i,[2,22]),{29:[1,38]},t(i,[2,24]),{36:[1,39],38:[1,40]},{11:[1,41]},{34:42,42:[1,43]},{11:[2,44]},t(i,[2,5]),t(i,[2,18]),t(i,[2,19]),t(i,[2,23]),t(i,[2,27],{37:[1,44],38:[1,45]}),t(i,[2,33],{36:[1,46]}),t(R,[2,25]),{32:47,43:B},{43:[2,43]},t(i,[2,28],{38:[1,48]}),t(i,[2,29]),t(i,[2,31],{37:[1,49]}),{11:[1,50]},t(i,[2,30]),t(i,[2,32]),t(R,[2,26])],defaultActions:{5:[2,41],6:[2,1],34:[2,44],43:[2,43]},parseError:function(C,S){if(S.recoverable)this.trace(C);else{var E=new Error(C);throw E.hash=S,E}},parse:function(C){var S=this,E=[0],_=[],w=[null],g=[],D=this.table,y="",N=0,nt=0,Y=2,Z=1,J=g.slice.call(arguments,1),X=Object.create(this.lexer),tt={yy:{}};for(var ot in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ot)&&(tt.yy[ot]=this.yy[ot]);X.setInput(C,tt.yy),tt.yy.lexer=X,tt.yy.parser=this,typeof X.yylloc>"u"&&(X.yylloc={});var at=X.yylloc;g.push(at);var U=X.options&&X.options.ranges;typeof tt.yy.parseError=="function"?this.parseError=tt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Tt(){var Dt;return Dt=_.pop()||X.lex()||Z,typeof Dt!="number"&&(Dt instanceof Array&&(_=Dt,Dt=_.pop()),Dt=S.symbols_[Dt]||Dt),Dt}for(var $,j,W,z,A={},M,q,L,st;;){if(j=E[E.length-1],this.defaultActions[j]?W=this.defaultActions[j]:(($===null||typeof $>"u")&&($=Tt()),W=D[j]&&D[j][$]),typeof W>"u"||!W.length||!W[0]){var T="";st=[];for(M in D[j])this.terminals_[M]&&M>Y&&st.push("'"+this.terminals_[M]+"'");X.showPosition?T="Parse error on line "+(N+1)+`:
1232
1232
  `+X.showPosition()+`
1233
1233
  Expecting `+st.join(", ")+", got '"+(this.terminals_[$]||$)+"'":T="Parse error on line "+(N+1)+": Unexpected "+($==Z?"end of input":"'"+(this.terminals_[$]||$)+"'"),this.parseError(T,{text:X.match,token:this.terminals_[$]||$,line:X.yylineno,loc:at,expected:st})}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+$);switch(W[0]){case 1:E.push($),w.push(X.yytext),g.push(X.yylloc),E.push(W[1]),$=null,nt=X.yyleng,y=X.yytext,N=X.yylineno,at=X.yylloc;break;case 2:if(q=this.productions_[W[1]][1],A.$=w[w.length-q],A._$={first_line:g[g.length-(q||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(q||1)].first_column,last_column:g[g.length-1].last_column},U&&(A._$.range=[g[g.length-(q||1)].range[0],g[g.length-1].range[1]]),z=this.performAction.apply(A,[y,nt,N,tt.yy,W[1],w,g].concat(J)),typeof z<"u")return z;q&&(E=E.slice(0,-1*q*2),w=w.slice(0,-1*q),g=g.slice(0,-1*q)),E.push(this.productions_[W[1]][0]),w.push(A.$),g.push(A._$),L=D[E[E.length-2]][E[E.length-1]],E.push(L);break;case 3:return!0}}return!0}},V=function(){var F={EOF:1,parseError:function(S,E){if(this.yy.parser)this.yy.parser.parseError(S,E);else throw new Error(S)},setInput:function(C,S){return this.yy=S||this.yy||{},this._input=C,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},input:function(){var C=this._input[0];this.yytext+=C,this.yyleng++,this.offset++,this.match+=C,this.matched+=C;var S=C.match(/(?:\r\n?|\n).*/g);return S?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),C},unput:function(C){var S=C.length,E=C.split(/(?:\r\n?|\n)/g);this._input=C+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-S),this.offset-=S;var _=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),E.length-1&&(this.yylineno-=E.length-1);var w=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:E?(E.length===_.length?this.yylloc.first_column:0)+_[_.length-E.length].length-E[0].length:this.yylloc.first_column-S},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-S]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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).
1234
1234
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(C){this.unput(this.match.slice(C))},pastInput:function(){var C=this.matched.substr(0,this.matched.length-this.match.length);return(C.length>20?"...":"")+C.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var C=this.match;return C.length<20&&(C+=this._input.substr(0,20-C.length)),(C.substr(0,20)+(C.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var C=this.pastInput(),S=new Array(C.length+1).join("-");return C+this.upcomingInput()+`
1235
1235
  `+S+"^"},test_match:function(C,S){var E,_,w;if(this.options.backtrack_lexer&&(w={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&&(w.yylloc.range=this.yylloc.range.slice(0))),_=C[0].match(/(?:\r\n?|\n).*/g),_&&(this.yylineno+=_.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:_?_[_.length-1].length-_[_.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+C[0].length},this.yytext+=C[0],this.match+=C[0],this.matches=C,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(C[0].length),this.matched+=C[0],E=this.performAction.call(this,this.yy,this,S,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),E)return E;if(this._backtrack){for(var g in w)this[g]=w[g];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var C,S,E,_;this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),g=0;g<w.length;g++)if(E=this._input.match(this.rules[w[g]]),E&&(!S||E[0].length>S[0].length)){if(S=E,_=g,this.options.backtrack_lexer){if(C=this.test_match(E,w[g]),C!==!1)return C;if(this._backtrack){S=!1;continue}else return!1}else if(!this.options.flex)break}return S?(C=this.test_match(S,w[_]),C!==!1?C:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1236
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var S=this.next();return S||this.lex()},begin:function(S){this.conditionStack.push(S)},popState:function(){var S=this.conditionStack.length-1;return S>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(S){return S=this.conditionStack.length-1-Math.abs(S||0),S>=0?this.conditionStack[S]:"INITIAL"},pushState:function(S){this.begin(S)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(S,E,_,w){switch(_){case 0:return this.begin("open_directive"),40;case 1:return this.begin("type_directive"),41;case 2:return this.popState(),this.begin("arg_directive"),33;case 3:return this.popState(),this.popState(),43;case 4:return 42;case 5:return this.begin("acc_title"),21;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),23;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:break;case 13:break;case 14:break;case 15:return 11;case 16:break;case 17:break;case 18:break;case 19:this.begin("href");break;case 20:this.popState();break;case 21:return 38;case 22:this.begin("callbackname");break;case 23:this.popState();break;case 24:this.popState(),this.begin("callbackargs");break;case 25:return 36;case 26:this.popState();break;case 27:return 37;case 28:this.begin("click");break;case 29:this.popState();break;case 30:return 35;case 31:return 5;case 32:return 12;case 33:return 13;case 34:return 14;case 35:return 15;case 36:return 16;case 37:return 18;case 38:return 17;case 39:return 19;case 40:return"date";case 41:return 20;case 42:return"accDescription";case 43:return 26;case 44:return 28;case 45:return 29;case 46:return 33;case 47:return 7;case 48:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[26,27],inclusive:!1},callbackname:{rules:[23,24,25],inclusive:!1},href:{rules:[20,21],inclusive:!1},click:{rules:[29,30],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,22,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],inclusive:!0}}};return F}();P.lexer=V;function O(){this.yy={}}return O.prototype=P,P.Parser=O,new O}();Ru.parser=Ru;const bO=Ru,_O=t=>t.match(/^\s*gantt/)!==null;xr.extend(aL);xr.extend(lL);xr.extend(hL);let fi="",l0="",c0,h0="",po=[],go=[],u0={},f0=[],Jl=[],Os="";const r3=["active","done","crit","milestone"];let d0=[],yo=!1,p0=!1,Ou=0;const xO=function(t,e,r){xe.parseDirective(this,t,e,r)},vO=function(){f0=[],Jl=[],Os="",d0=[],rl=0,Pu=void 0,il=void 0,ze=[],fi="",l0="",c0=void 0,h0="",po=[],go=[],yo=!1,p0=!1,Ou=0,u0={},Lr()},kO=function(t){l0=t},wO=function(){return l0},TO=function(t){c0=t},EO=function(){return c0},CO=function(t){h0=t},SO=function(){return h0},AO=function(t){fi=t},LO=function(){yo=!0},BO=function(){return yo},DO=function(){p0=!0},IO=function(){return p0},MO=function(){return fi},NO=function(t){po=t.toLowerCase().split(/[\s,]+/)},RO=function(){return po},OO=function(t){go=t.toLowerCase().split(/[\s,]+/)},FO=function(){return go},PO=function(){return u0},VO=function(t){Os=t,f0.push(t)},YO=function(){return f0},zO=function(){let t=Kd();const e=10;let r=0;for(;!t&&r<e;)t=Kd(),r++;return Jl=ze,Jl},i3=function(t,e,r,i){return i.includes(t.format(e.trim()))?!1:t.isoWeekday()>=6&&r.includes("weekends")||r.includes(t.format("dddd").toLowerCase())?!0:r.includes(t.format(e.trim()))},n3=function(t,e,r,i){if(!r.length||t.manualEndTime)return;let n;t.startTime instanceof Date?n=xr(t.startTime):n=xr(t.startTime,e,!0),n=n.add(1,"d");let s;t.endTime instanceof Date?s=xr(t.endTime):s=xr(t.endTime,e,!0);const[a,o]=UO(n,s,e,r,i);t.endTime=a.toDate(),t.renderEndTime=o},UO=function(t,e,r,i,n){let s=!1,a=null;for(;t<=e;)s||(a=e.toDate()),s=i3(t,r,i,n),s&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,a]},Fu=function(t,e,r){r=r.trim();const n=/^after\s+([\d\w- ]+)/.exec(r.trim());if(n!==null){let a=null;if(n[1].split(" ").forEach(function(o){let l=js(o);l!==void 0&&(a?l.endTime>a.endTime&&(a=l):a=l)}),a)return a.endTime;{const o=new Date;return o.setHours(0,0,0,0),o}}let s=xr(r,e.trim(),!0);if(s.isValid())return s.toDate();{I.debug("Invalid date:"+r),I.debug("With date format:"+e.trim());const a=new Date(r);if(a===void 0||isNaN(a.getTime()))throw new Error("Invalid date:"+r);return a}},s3=function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},a3=function(t,e,r,i=!1){r=r.trim();let n=xr(r,e.trim(),!0);if(n.isValid())return i&&(n=n.add(1,"d")),n.toDate();let s=xr(t);const[a,o]=s3(r);if(!Number.isNaN(a)){const l=s.add(a,o);l.isValid()&&(s=l)}return s.toDate()};let rl=0;const xs=function(t){return t===void 0?(rl=rl+1,"task"+rl):t},WO=function(t,e){let r;e.substr(0,1)===":"?r=e.substr(1,e.length):r=e;const i=r.split(","),n={};h3(i,n,r3);for(let a=0;a<i.length;a++)i[a]=i[a].trim();let s="";switch(i.length){case 1:n.id=xs(),n.startTime=t.endTime,s=i[0];break;case 2:n.id=xs(),n.startTime=Fu(void 0,fi,i[0]),s=i[1];break;case 3:n.id=xs(i[0]),n.startTime=Fu(void 0,fi,i[1]),s=i[2];break}return s&&(n.endTime=a3(n.startTime,fi,s,yo),n.manualEndTime=xr(s,"YYYY-MM-DD",!0).isValid(),n3(n,fi,go,po)),n},HO=function(t,e){let r;e.substr(0,1)===":"?r=e.substr(1,e.length):r=e;const i=r.split(","),n={};h3(i,n,r3);for(let s=0;s<i.length;s++)i[s]=i[s].trim();switch(i.length){case 1:n.id=xs(),n.startTime={type:"prevTaskEnd",id:t},n.endTime={data:i[0]};break;case 2:n.id=xs(),n.startTime={type:"getStartDate",startData:i[0]},n.endTime={data:i[1]};break;case 3:n.id=xs(i[0]),n.startTime={type:"getStartDate",startData:i[1]},n.endTime={data:i[2]};break}return n};let Pu,il,ze=[];const o3={},qO=function(t,e){const r={section:Os,type:Os,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},i=HO(il,e);r.raw.startTime=i.startTime,r.raw.endTime=i.endTime,r.id=i.id,r.prevTaskId=il,r.active=i.active,r.done=i.done,r.crit=i.crit,r.milestone=i.milestone,r.order=Ou,Ou++;const n=ze.push(r);il=r.id,o3[r.id]=n-1},js=function(t){const e=o3[t];return ze[e]},GO=function(t,e){const r={section:Os,type:Os,description:t,task:t,classes:[]},i=WO(Pu,e);r.startTime=i.startTime,r.endTime=i.endTime,r.id=i.id,r.active=i.active,r.done=i.done,r.crit=i.crit,r.milestone=i.milestone,Pu=r,Jl.push(r)},Kd=function(){const t=function(r){const i=ze[r];let n="";switch(ze[r].raw.startTime.type){case"prevTaskEnd":{const s=js(i.prevTaskId);i.startTime=s.endTime;break}case"getStartDate":n=Fu(void 0,fi,ze[r].raw.startTime.startData),n&&(ze[r].startTime=n);break}return ze[r].startTime&&(ze[r].endTime=a3(ze[r].startTime,fi,ze[r].raw.endTime.data,yo),ze[r].endTime&&(ze[r].processed=!0,ze[r].manualEndTime=xr(ze[r].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),n3(ze[r],fi,go,po))),ze[r].processed};let e=!0;for(const[r,i]of ze.entries())t(r),e=e&&i.processed;return e},$O=function(t,e){let r=e;G().securityLevel!=="loose"&&(r=Ki(e)),t.split(",").forEach(function(i){js(i)!==void 0&&(c3(i,()=>{window.open(r,"_self")}),u0[i]=r)}),l3(t,"clickable")},l3=function(t,e){t.split(",").forEach(function(r){let i=js(r);i!==void 0&&i.classes.push(e)})},jO=function(t,e,r){if(G().securityLevel!=="loose"||e===void 0)return;let i=[];if(typeof r=="string"){i=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let s=0;s<i.length;s++){let a=i[s].trim();a.charAt(0)==='"'&&a.charAt(a.length-1)==='"'&&(a=a.substr(1,a.length-2)),i[s]=a}}i.length===0&&i.push(t),js(t)!==void 0&&c3(t,()=>{jt.runFunc(e,...i)})},c3=function(t,e){d0.push(function(){const r=document.querySelector(`[id="${t}"]`);r!==null&&r.addEventListener("click",function(){e()})},function(){const r=document.querySelector(`[id="${t}-text"]`);r!==null&&r.addEventListener("click",function(){e()})})},XO=function(t,e,r){t.split(",").forEach(function(i){jO(i,e,r)}),l3(t,"clickable")},KO=function(t){d0.forEach(function(e){e(t)})},g0={parseDirective:xO,getConfig:()=>G().gantt,clear:vO,setDateFormat:AO,getDateFormat:MO,enableInclusiveEndDates:LO,endDatesAreInclusive:BO,enableTopAxis:DO,topAxisEnabled:IO,setAxisFormat:kO,getAxisFormat:wO,setTickInterval:TO,getTickInterval:EO,setTodayMarker:CO,getTodayMarker:SO,setAccTitle:kr,getAccTitle:Br,setDiagramTitle:si,getDiagramTitle:ai,setAccDescription:Dr,getAccDescription:Ir,addSection:VO,getSections:YO,getTasks:zO,addTask:qO,findTaskById:js,addTaskOrg:GO,setIncludes:NO,getIncludes:RO,setExcludes:OO,getExcludes:FO,setClickEvent:XO,setLink:$O,getLinks:PO,bindFunctions:KO,parseDuration:s3,isInvalidDate:i3};function h3(t,e,r){let i=!0;for(;i;)i=!1,r.forEach(function(n){const s="^\\s*"+n+"\\s*$",a=new RegExp(s);t[0].match(a)&&(e[n]=!0,t.shift(1),i=!0)})}const ZO=function(){I.debug("Something is calling, setConf, remove the call")};let Ai;const QO=function(t,e,r,i){const n=G().gantt,s=G().securityLevel;let a;s==="sandbox"&&(a=_t("#i"+e));const o=_t(s==="sandbox"?a.nodes()[0].contentDocument.body:"body"),l=s==="sandbox"?a.nodes()[0].contentDocument:document,h=l.getElementById(e);Ai=h.parentElement.offsetWidth,Ai===void 0&&(Ai=1200),n.useWidth!==void 0&&(Ai=n.useWidth);const u=i.db.getTasks(),f=u.length*(n.barHeight+n.barGap)+2*n.topPadding;h.setAttribute("viewBox","0 0 "+Ai+" "+f);const d=o.select(`[id="${e}"]`),p=Uv().domain([m5(u,function(S){return S.startTime}),y5(u,function(S){return S.endTime})]).rangeRound([0,Ai-n.leftPadding-n.rightPadding]);let m=[];for(const S of u)m.push(S.type);const b=m;m=O(m);function x(S,E){const _=S.startTime,w=E.startTime;let g=0;return _>w?g=1:_<w&&(g=-1),g}u.sort(x),k(u,Ai,f),ni(d,f,Ai,n.useMaxWidth),d.append("text").text(i.db.getDiagramTitle()).attr("x",Ai/2).attr("y",n.titleTopMargin).attr("class","titleText");function k(S,E,_){const w=n.barHeight,g=w+n.barGap,D=n.topPadding,y=n.leftPadding,N=lp().domain([0,m.length]).range(["#00B9FA","#F95002"]).interpolate(P_);B(g,D,y,E,_,S,i.db.getExcludes(),i.db.getIncludes()),R(y,D,E,_),v(S,g,D,y,w,N,E),P(g,D),V(y,D,E,_)}function v(S,E,_,w,g,D,y){d.append("g").selectAll("rect").data(S).enter().append("rect").attr("x",0).attr("y",function(Z,J){return J=Z.order,J*E+_-2}).attr("width",function(){return y-n.rightPadding/2}).attr("height",E).attr("class",function(Z){for(const[J,X]of m.entries())if(Z.type===X)return"section section"+J%n.numberSectionStyles;return"section section0"});const N=d.append("g").selectAll("rect").data(S).enter(),nt=i.db.getLinks();if(N.append("rect").attr("id",function(Z){return Z.id}).attr("rx",3).attr("ry",3).attr("x",function(Z){return Z.milestone?p(Z.startTime)+w+.5*(p(Z.endTime)-p(Z.startTime))-.5*g:p(Z.startTime)+w}).attr("y",function(Z,J){return J=Z.order,J*E+_}).attr("width",function(Z){return Z.milestone?g:p(Z.renderEndTime||Z.endTime)-p(Z.startTime)}).attr("height",g).attr("transform-origin",function(Z,J){return J=Z.order,(p(Z.startTime)+w+.5*(p(Z.endTime)-p(Z.startTime))).toString()+"px "+(J*E+_+.5*g).toString()+"px"}).attr("class",function(Z){const J="task";let X="";Z.classes.length>0&&(X=Z.classes.join(" "));let tt=0;for(const[at,U]of m.entries())Z.type===U&&(tt=at%n.numberSectionStyles);let ot="";return Z.active?Z.crit?ot+=" activeCrit":ot=" active":Z.done?Z.crit?ot=" doneCrit":ot=" done":Z.crit&&(ot+=" crit"),ot.length===0&&(ot=" task"),Z.milestone&&(ot=" milestone "+ot),ot+=tt,ot+=" "+X,J+ot}),N.append("text").attr("id",function(Z){return Z.id+"-text"}).text(function(Z){return Z.task}).attr("font-size",n.fontSize).attr("x",function(Z){let J=p(Z.startTime),X=p(Z.renderEndTime||Z.endTime);Z.milestone&&(J+=.5*(p(Z.endTime)-p(Z.startTime))-.5*g),Z.milestone&&(X=J+g);const tt=this.getBBox().width;return tt>X-J?X+tt+1.5*n.leftPadding>y?J+w-5:X+w+5:(X-J)/2+J+w}).attr("y",function(Z,J){return J=Z.order,J*E+n.barHeight/2+(n.fontSize/2-2)+_}).attr("text-height",g).attr("class",function(Z){const J=p(Z.startTime);let X=p(Z.endTime);Z.milestone&&(X=J+g);const tt=this.getBBox().width;let ot="";Z.classes.length>0&&(ot=Z.classes.join(" "));let at=0;for(const[Tt,$]of m.entries())Z.type===$&&(at=Tt%n.numberSectionStyles);let U="";return Z.active&&(Z.crit?U="activeCritText"+at:U="activeText"+at),Z.done?Z.crit?U=U+" doneCritText"+at:U=U+" doneText"+at:Z.crit&&(U=U+" critText"+at),Z.milestone&&(U+=" milestoneText"),tt>X-J?X+tt+1.5*n.leftPadding>y?ot+" taskTextOutsideLeft taskTextOutside"+at+" "+U:ot+" taskTextOutsideRight taskTextOutside"+at+" "+U+" width-"+tt:ot+" taskText taskText"+at+" "+U+" width-"+tt}),G().securityLevel==="sandbox"){let Z;Z=_t("#i"+e);const J=Z.nodes()[0].contentDocument;N.filter(function(X){return nt[X.id]!==void 0}).each(function(X){var tt=J.querySelector("#"+X.id),ot=J.querySelector("#"+X.id+"-text");const at=tt.parentNode;var U=J.createElement("a");U.setAttribute("xlink:href",nt[X.id]),U.setAttribute("target","_top"),at.appendChild(U),U.appendChild(tt),U.appendChild(ot)})}}function B(S,E,_,w,g,D,y,N){const nt=D.reduce((at,{startTime:U})=>at?Math.min(at,U):U,0),Y=D.reduce((at,{endTime:U})=>at?Math.max(at,U):U,0),Z=i.db.getDateFormat();if(!nt||!Y)return;const J=[];let X=null,tt=xr(nt);for(;tt.valueOf()<=Y;)i.db.isInvalidDate(tt,Z,y,N)?X?X.end=tt:X={start:tt,end:tt}:X&&(J.push(X),X=null),tt=tt.add(1,"d");d.append("g").selectAll("rect").data(J).enter().append("rect").attr("id",function(at){return"exclude-"+at.start.format("YYYY-MM-DD")}).attr("x",function(at){return p(at.start)+_}).attr("y",n.gridLineStartPadding).attr("width",function(at){const U=at.end.add(1,"day");return p(U)-p(at.start)}).attr("height",g-E-n.gridLineStartPadding).attr("transform-origin",function(at,U){return(p(at.start)+_+.5*(p(at.end)-p(at.start))).toString()+"px "+(U*S+.5*g).toString()+"px"}).attr("class","exclude-range")}function R(S,E,_,w){let g=E5(p).tickSize(-w+E+n.gridLineStartPadding).tickFormat(vl(i.db.getAxisFormat()||n.axisFormat||"%Y-%m-%d"));const y=/^([1-9]\d*)(minute|hour|day|week|month)$/.exec(i.db.getTickInterval()||n.tickInterval);if(y!==null){const N=y[1];switch(y[2]){case"minute":g.ticks(Ba.every(N));break;case"hour":g.ticks(Da.every(N));break;case"day":g.ticks(Mn.every(N));break;case"week":g.ticks(Ts.every(N));break;case"month":g.ticks(Ia.every(N));break}}if(d.append("g").attr("class","grid").attr("transform","translate("+S+", "+(w-50)+")").call(g).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),i.db.topAxisEnabled()||n.topAxis){let N=T5(p).tickSize(-w+E+n.gridLineStartPadding).tickFormat(vl(i.db.getAxisFormat()||n.axisFormat||"%Y-%m-%d"));if(y!==null){const nt=y[1];switch(y[2]){case"minute":N.ticks(Ba.every(nt));break;case"hour":N.ticks(Da.every(nt));break;case"day":N.ticks(Mn.every(nt));break;case"week":N.ticks(Ts.every(nt));break;case"month":N.ticks(Ia.every(nt));break}}d.append("g").attr("class","grid").attr("transform","translate("+S+", "+E+")").call(N).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function P(S,E){const _=[];let w=0;for(const[g,D]of m.entries())_[g]=[D,C(D,b)];d.append("g").selectAll("text").data(_).enter().append(function(g){const D=g[0].split(Xt.lineBreakRegex),y=-(D.length-1)/2,N=l.createElementNS("http://www.w3.org/2000/svg","text");N.setAttribute("dy",y+"em");for(const[nt,Y]of D.entries()){const Z=l.createElementNS("http://www.w3.org/2000/svg","tspan");Z.setAttribute("alignment-baseline","central"),Z.setAttribute("x","10"),nt>0&&Z.setAttribute("dy","1em"),Z.textContent=Y,N.appendChild(Z)}return N}).attr("x",10).attr("y",function(g,D){if(D>0)for(let y=0;y<D;y++)return w+=_[D-1][1],g[1]*S/2+w*S+E;else return g[1]*S/2+E}).attr("font-size",n.sectionFontSize).attr("font-size",n.sectionFontSize).attr("class",function(g){for(const[D,y]of m.entries())if(g[0]===y)return"sectionTitle sectionTitle"+D%n.numberSectionStyles;return"sectionTitle"})}function V(S,E,_,w){const g=i.db.getTodayMarker();if(g==="off")return;const D=d.append("g").attr("class","today"),y=new Date,N=D.append("line");N.attr("x1",p(y)+S).attr("x2",p(y)+S).attr("y1",n.titleTopMargin).attr("y2",w-n.titleTopMargin).attr("class","today"),g!==""&&N.attr("style",g.replace(/,/g,";"))}function O(S){const E={},_=[];for(let w=0,g=S.length;w<g;++w)Object.prototype.hasOwnProperty.call(E,S[w])||(E[S[w]]=!0,_.push(S[w]));return _}function F(S){let E=S.length;const _={};for(;E;)_[S[--E]]=(_[S[E]]||0)+1;return _}function C(S,E){return F(E)[S]||0}},JO={setConf:ZO,draw:QO};var Vu=function(){var t=function(s,a,o,l){for(o=o||{},l=s.length;l--;o[s[l]]=a);return o},e=[6,9,10],r={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(a,o,l,h,u,f,d){switch(f.length-1,u){case 1:return h;case 4:break;case 6:h.setInfo(!0);break}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},t(e,[2,3]),t(e,[2,4]),t(e,[2,5]),t(e,[2,6])],defaultActions:{4:[2,1]},parseError:function(a,o){if(o.recoverable)this.trace(a);else{var l=new Error(a);throw l.hash=o,l}},parse:function(a){var o=this,l=[0],h=[],u=[null],f=[],d=this.table,p="",m=0,b=0,x=2,k=1,v=f.slice.call(arguments,1),B=Object.create(this.lexer),R={yy:{}};for(var P in this.yy)Object.prototype.hasOwnProperty.call(this.yy,P)&&(R.yy[P]=this.yy[P]);B.setInput(a,R.yy),R.yy.lexer=B,R.yy.parser=this,typeof B.yylloc>"u"&&(B.yylloc={});var V=B.yylloc;f.push(V);var O=B.options&&B.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function F(){var Y;return Y=h.pop()||B.lex()||k,typeof Y!="number"&&(Y instanceof Array&&(h=Y,Y=h.pop()),Y=o.symbols_[Y]||Y),Y}for(var C,S,E,_,w={},g,D,y,N;;){if(S=l[l.length-1],this.defaultActions[S]?E=this.defaultActions[S]:((C===null||typeof C>"u")&&(C=F()),E=d[S]&&d[S][C]),typeof E>"u"||!E.length||!E[0]){var nt="";N=[];for(g in d[S])this.terminals_[g]&&g>x&&N.push("'"+this.terminals_[g]+"'");B.showPosition?nt="Parse error on line "+(m+1)+`:
1236
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var S=this.next();return S||this.lex()},begin:function(S){this.conditionStack.push(S)},popState:function(){var S=this.conditionStack.length-1;return S>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(S){return S=this.conditionStack.length-1-Math.abs(S||0),S>=0?this.conditionStack[S]:"INITIAL"},pushState:function(S){this.begin(S)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(S,E,_,w){switch(_){case 0:return this.begin("open_directive"),40;case 1:return this.begin("type_directive"),41;case 2:return this.popState(),this.begin("arg_directive"),33;case 3:return this.popState(),this.popState(),43;case 4:return 42;case 5:return this.begin("acc_title"),21;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),23;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:break;case 13:break;case 14:break;case 15:return 11;case 16:break;case 17:break;case 18:break;case 19:this.begin("href");break;case 20:this.popState();break;case 21:return 38;case 22:this.begin("callbackname");break;case 23:this.popState();break;case 24:this.popState(),this.begin("callbackargs");break;case 25:return 36;case 26:this.popState();break;case 27:return 37;case 28:this.begin("click");break;case 29:this.popState();break;case 30:return 35;case 31:return 5;case 32:return 12;case 33:return 13;case 34:return 14;case 35:return 15;case 36:return 16;case 37:return 18;case 38:return 17;case 39:return 19;case 40:return"date";case 41:return 20;case 42:return"accDescription";case 43:return 26;case 44:return 28;case 45:return 29;case 46:return 33;case 47:return 7;case 48:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[26,27],inclusive:!1},callbackname:{rules:[23,24,25],inclusive:!1},href:{rules:[20,21],inclusive:!1},click:{rules:[29,30],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,22,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],inclusive:!0}}};return F}();P.lexer=V;function O(){this.yy={}}return O.prototype=P,P.Parser=O,new O}();Ru.parser=Ru;const _O=Ru,xO=t=>t.match(/^\s*gantt/)!==null;xr.extend(oL);xr.extend(cL);xr.extend(uL);let fi="",c0="",h0,u0="",po=[],go=[],f0={},d0=[],Jl=[],Os="";const i3=["active","done","crit","milestone"];let p0=[],yo=!1,g0=!1,Ou=0;const vO=function(t,e,r){xe.parseDirective(this,t,e,r)},kO=function(){d0=[],Jl=[],Os="",p0=[],rl=0,Pu=void 0,il=void 0,ze=[],fi="",c0="",h0=void 0,u0="",po=[],go=[],yo=!1,g0=!1,Ou=0,f0={},Lr()},wO=function(t){c0=t},TO=function(){return c0},EO=function(t){h0=t},CO=function(){return h0},SO=function(t){u0=t},AO=function(){return u0},LO=function(t){fi=t},BO=function(){yo=!0},DO=function(){return yo},IO=function(){g0=!0},MO=function(){return g0},NO=function(){return fi},RO=function(t){po=t.toLowerCase().split(/[\s,]+/)},OO=function(){return po},FO=function(t){go=t.toLowerCase().split(/[\s,]+/)},PO=function(){return go},VO=function(){return f0},YO=function(t){Os=t,d0.push(t)},zO=function(){return d0},UO=function(){let t=Zd();const e=10;let r=0;for(;!t&&r<e;)t=Zd(),r++;return Jl=ze,Jl},n3=function(t,e,r,i){return i.includes(t.format(e.trim()))?!1:t.isoWeekday()>=6&&r.includes("weekends")||r.includes(t.format("dddd").toLowerCase())?!0:r.includes(t.format(e.trim()))},s3=function(t,e,r,i){if(!r.length||t.manualEndTime)return;let n;t.startTime instanceof Date?n=xr(t.startTime):n=xr(t.startTime,e,!0),n=n.add(1,"d");let s;t.endTime instanceof Date?s=xr(t.endTime):s=xr(t.endTime,e,!0);const[a,o]=WO(n,s,e,r,i);t.endTime=a.toDate(),t.renderEndTime=o},WO=function(t,e,r,i,n){let s=!1,a=null;for(;t<=e;)s||(a=e.toDate()),s=n3(t,r,i,n),s&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,a]},Fu=function(t,e,r){r=r.trim();const n=/^after\s+([\d\w- ]+)/.exec(r.trim());if(n!==null){let a=null;if(n[1].split(" ").forEach(function(o){let l=js(o);l!==void 0&&(a?l.endTime>a.endTime&&(a=l):a=l)}),a)return a.endTime;{const o=new Date;return o.setHours(0,0,0,0),o}}let s=xr(r,e.trim(),!0);if(s.isValid())return s.toDate();{I.debug("Invalid date:"+r),I.debug("With date format:"+e.trim());const a=new Date(r);if(a===void 0||isNaN(a.getTime()))throw new Error("Invalid date:"+r);return a}},a3=function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},o3=function(t,e,r,i=!1){r=r.trim();let n=xr(r,e.trim(),!0);if(n.isValid())return i&&(n=n.add(1,"d")),n.toDate();let s=xr(t);const[a,o]=a3(r);if(!Number.isNaN(a)){const l=s.add(a,o);l.isValid()&&(s=l)}return s.toDate()};let rl=0;const xs=function(t){return t===void 0?(rl=rl+1,"task"+rl):t},HO=function(t,e){let r;e.substr(0,1)===":"?r=e.substr(1,e.length):r=e;const i=r.split(","),n={};u3(i,n,i3);for(let a=0;a<i.length;a++)i[a]=i[a].trim();let s="";switch(i.length){case 1:n.id=xs(),n.startTime=t.endTime,s=i[0];break;case 2:n.id=xs(),n.startTime=Fu(void 0,fi,i[0]),s=i[1];break;case 3:n.id=xs(i[0]),n.startTime=Fu(void 0,fi,i[1]),s=i[2];break}return s&&(n.endTime=o3(n.startTime,fi,s,yo),n.manualEndTime=xr(s,"YYYY-MM-DD",!0).isValid(),s3(n,fi,go,po)),n},qO=function(t,e){let r;e.substr(0,1)===":"?r=e.substr(1,e.length):r=e;const i=r.split(","),n={};u3(i,n,i3);for(let s=0;s<i.length;s++)i[s]=i[s].trim();switch(i.length){case 1:n.id=xs(),n.startTime={type:"prevTaskEnd",id:t},n.endTime={data:i[0]};break;case 2:n.id=xs(),n.startTime={type:"getStartDate",startData:i[0]},n.endTime={data:i[1]};break;case 3:n.id=xs(i[0]),n.startTime={type:"getStartDate",startData:i[1]},n.endTime={data:i[2]};break}return n};let Pu,il,ze=[];const l3={},GO=function(t,e){const r={section:Os,type:Os,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},i=qO(il,e);r.raw.startTime=i.startTime,r.raw.endTime=i.endTime,r.id=i.id,r.prevTaskId=il,r.active=i.active,r.done=i.done,r.crit=i.crit,r.milestone=i.milestone,r.order=Ou,Ou++;const n=ze.push(r);il=r.id,l3[r.id]=n-1},js=function(t){const e=l3[t];return ze[e]},$O=function(t,e){const r={section:Os,type:Os,description:t,task:t,classes:[]},i=HO(Pu,e);r.startTime=i.startTime,r.endTime=i.endTime,r.id=i.id,r.active=i.active,r.done=i.done,r.crit=i.crit,r.milestone=i.milestone,Pu=r,Jl.push(r)},Zd=function(){const t=function(r){const i=ze[r];let n="";switch(ze[r].raw.startTime.type){case"prevTaskEnd":{const s=js(i.prevTaskId);i.startTime=s.endTime;break}case"getStartDate":n=Fu(void 0,fi,ze[r].raw.startTime.startData),n&&(ze[r].startTime=n);break}return ze[r].startTime&&(ze[r].endTime=o3(ze[r].startTime,fi,ze[r].raw.endTime.data,yo),ze[r].endTime&&(ze[r].processed=!0,ze[r].manualEndTime=xr(ze[r].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),s3(ze[r],fi,go,po))),ze[r].processed};let e=!0;for(const[r,i]of ze.entries())t(r),e=e&&i.processed;return e},jO=function(t,e){let r=e;G().securityLevel!=="loose"&&(r=Ki(e)),t.split(",").forEach(function(i){js(i)!==void 0&&(h3(i,()=>{window.open(r,"_self")}),f0[i]=r)}),c3(t,"clickable")},c3=function(t,e){t.split(",").forEach(function(r){let i=js(r);i!==void 0&&i.classes.push(e)})},XO=function(t,e,r){if(G().securityLevel!=="loose"||e===void 0)return;let i=[];if(typeof r=="string"){i=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let s=0;s<i.length;s++){let a=i[s].trim();a.charAt(0)==='"'&&a.charAt(a.length-1)==='"'&&(a=a.substr(1,a.length-2)),i[s]=a}}i.length===0&&i.push(t),js(t)!==void 0&&h3(t,()=>{jt.runFunc(e,...i)})},h3=function(t,e){p0.push(function(){const r=document.querySelector(`[id="${t}"]`);r!==null&&r.addEventListener("click",function(){e()})},function(){const r=document.querySelector(`[id="${t}-text"]`);r!==null&&r.addEventListener("click",function(){e()})})},KO=function(t,e,r){t.split(",").forEach(function(i){XO(i,e,r)}),c3(t,"clickable")},ZO=function(t){p0.forEach(function(e){e(t)})},y0={parseDirective:vO,getConfig:()=>G().gantt,clear:kO,setDateFormat:LO,getDateFormat:NO,enableInclusiveEndDates:BO,endDatesAreInclusive:DO,enableTopAxis:IO,topAxisEnabled:MO,setAxisFormat:wO,getAxisFormat:TO,setTickInterval:EO,getTickInterval:CO,setTodayMarker:SO,getTodayMarker:AO,setAccTitle:kr,getAccTitle:Br,setDiagramTitle:si,getDiagramTitle:ai,setAccDescription:Dr,getAccDescription:Ir,addSection:YO,getSections:zO,getTasks:UO,addTask:GO,findTaskById:js,addTaskOrg:$O,setIncludes:RO,getIncludes:OO,setExcludes:FO,getExcludes:PO,setClickEvent:KO,setLink:jO,getLinks:VO,bindFunctions:ZO,parseDuration:a3,isInvalidDate:n3};function u3(t,e,r){let i=!0;for(;i;)i=!1,r.forEach(function(n){const s="^\\s*"+n+"\\s*$",a=new RegExp(s);t[0].match(a)&&(e[n]=!0,t.shift(1),i=!0)})}const QO=function(){I.debug("Something is calling, setConf, remove the call")};let Ai;const JO=function(t,e,r,i){const n=G().gantt,s=G().securityLevel;let a;s==="sandbox"&&(a=_t("#i"+e));const o=_t(s==="sandbox"?a.nodes()[0].contentDocument.body:"body"),l=s==="sandbox"?a.nodes()[0].contentDocument:document,h=l.getElementById(e);Ai=h.parentElement.offsetWidth,Ai===void 0&&(Ai=1200),n.useWidth!==void 0&&(Ai=n.useWidth);const u=i.db.getTasks(),f=u.length*(n.barHeight+n.barGap)+2*n.topPadding;h.setAttribute("viewBox","0 0 "+Ai+" "+f);const d=o.select(`[id="${e}"]`),p=Wv().domain([b5(u,function(S){return S.startTime}),m5(u,function(S){return S.endTime})]).rangeRound([0,Ai-n.leftPadding-n.rightPadding]);let m=[];for(const S of u)m.push(S.type);const b=m;m=O(m);function x(S,E){const _=S.startTime,w=E.startTime;let g=0;return _>w?g=1:_<w&&(g=-1),g}u.sort(x),k(u,Ai,f),ni(d,f,Ai,n.useMaxWidth),d.append("text").text(i.db.getDiagramTitle()).attr("x",Ai/2).attr("y",n.titleTopMargin).attr("class","titleText");function k(S,E,_){const w=n.barHeight,g=w+n.barGap,D=n.topPadding,y=n.leftPadding,N=cp().domain([0,m.length]).range(["#00B9FA","#F95002"]).interpolate(V_);B(g,D,y,E,_,S,i.db.getExcludes(),i.db.getIncludes()),R(y,D,E,_),v(S,g,D,y,w,N,E),P(g,D),V(y,D,E,_)}function v(S,E,_,w,g,D,y){d.append("g").selectAll("rect").data(S).enter().append("rect").attr("x",0).attr("y",function(Z,J){return J=Z.order,J*E+_-2}).attr("width",function(){return y-n.rightPadding/2}).attr("height",E).attr("class",function(Z){for(const[J,X]of m.entries())if(Z.type===X)return"section section"+J%n.numberSectionStyles;return"section section0"});const N=d.append("g").selectAll("rect").data(S).enter(),nt=i.db.getLinks();if(N.append("rect").attr("id",function(Z){return Z.id}).attr("rx",3).attr("ry",3).attr("x",function(Z){return Z.milestone?p(Z.startTime)+w+.5*(p(Z.endTime)-p(Z.startTime))-.5*g:p(Z.startTime)+w}).attr("y",function(Z,J){return J=Z.order,J*E+_}).attr("width",function(Z){return Z.milestone?g:p(Z.renderEndTime||Z.endTime)-p(Z.startTime)}).attr("height",g).attr("transform-origin",function(Z,J){return J=Z.order,(p(Z.startTime)+w+.5*(p(Z.endTime)-p(Z.startTime))).toString()+"px "+(J*E+_+.5*g).toString()+"px"}).attr("class",function(Z){const J="task";let X="";Z.classes.length>0&&(X=Z.classes.join(" "));let tt=0;for(const[at,U]of m.entries())Z.type===U&&(tt=at%n.numberSectionStyles);let ot="";return Z.active?Z.crit?ot+=" activeCrit":ot=" active":Z.done?Z.crit?ot=" doneCrit":ot=" done":Z.crit&&(ot+=" crit"),ot.length===0&&(ot=" task"),Z.milestone&&(ot=" milestone "+ot),ot+=tt,ot+=" "+X,J+ot}),N.append("text").attr("id",function(Z){return Z.id+"-text"}).text(function(Z){return Z.task}).attr("font-size",n.fontSize).attr("x",function(Z){let J=p(Z.startTime),X=p(Z.renderEndTime||Z.endTime);Z.milestone&&(J+=.5*(p(Z.endTime)-p(Z.startTime))-.5*g),Z.milestone&&(X=J+g);const tt=this.getBBox().width;return tt>X-J?X+tt+1.5*n.leftPadding>y?J+w-5:X+w+5:(X-J)/2+J+w}).attr("y",function(Z,J){return J=Z.order,J*E+n.barHeight/2+(n.fontSize/2-2)+_}).attr("text-height",g).attr("class",function(Z){const J=p(Z.startTime);let X=p(Z.endTime);Z.milestone&&(X=J+g);const tt=this.getBBox().width;let ot="";Z.classes.length>0&&(ot=Z.classes.join(" "));let at=0;for(const[Tt,$]of m.entries())Z.type===$&&(at=Tt%n.numberSectionStyles);let U="";return Z.active&&(Z.crit?U="activeCritText"+at:U="activeText"+at),Z.done?Z.crit?U=U+" doneCritText"+at:U=U+" doneText"+at:Z.crit&&(U=U+" critText"+at),Z.milestone&&(U+=" milestoneText"),tt>X-J?X+tt+1.5*n.leftPadding>y?ot+" taskTextOutsideLeft taskTextOutside"+at+" "+U:ot+" taskTextOutsideRight taskTextOutside"+at+" "+U+" width-"+tt:ot+" taskText taskText"+at+" "+U+" width-"+tt}),G().securityLevel==="sandbox"){let Z;Z=_t("#i"+e);const J=Z.nodes()[0].contentDocument;N.filter(function(X){return nt[X.id]!==void 0}).each(function(X){var tt=J.querySelector("#"+X.id),ot=J.querySelector("#"+X.id+"-text");const at=tt.parentNode;var U=J.createElement("a");U.setAttribute("xlink:href",nt[X.id]),U.setAttribute("target","_top"),at.appendChild(U),U.appendChild(tt),U.appendChild(ot)})}}function B(S,E,_,w,g,D,y,N){const nt=D.reduce((at,{startTime:U})=>at?Math.min(at,U):U,0),Y=D.reduce((at,{endTime:U})=>at?Math.max(at,U):U,0),Z=i.db.getDateFormat();if(!nt||!Y)return;const J=[];let X=null,tt=xr(nt);for(;tt.valueOf()<=Y;)i.db.isInvalidDate(tt,Z,y,N)?X?X.end=tt:X={start:tt,end:tt}:X&&(J.push(X),X=null),tt=tt.add(1,"d");d.append("g").selectAll("rect").data(J).enter().append("rect").attr("id",function(at){return"exclude-"+at.start.format("YYYY-MM-DD")}).attr("x",function(at){return p(at.start)+_}).attr("y",n.gridLineStartPadding).attr("width",function(at){const U=at.end.add(1,"day");return p(U)-p(at.start)}).attr("height",g-E-n.gridLineStartPadding).attr("transform-origin",function(at,U){return(p(at.start)+_+.5*(p(at.end)-p(at.start))).toString()+"px "+(U*S+.5*g).toString()+"px"}).attr("class","exclude-range")}function R(S,E,_,w){let g=C5(p).tickSize(-w+E+n.gridLineStartPadding).tickFormat(vl(i.db.getAxisFormat()||n.axisFormat||"%Y-%m-%d"));const y=/^([1-9]\d*)(minute|hour|day|week|month)$/.exec(i.db.getTickInterval()||n.tickInterval);if(y!==null){const N=y[1];switch(y[2]){case"minute":g.ticks(Ba.every(N));break;case"hour":g.ticks(Da.every(N));break;case"day":g.ticks(Mn.every(N));break;case"week":g.ticks(Ts.every(N));break;case"month":g.ticks(Ia.every(N));break}}if(d.append("g").attr("class","grid").attr("transform","translate("+S+", "+(w-50)+")").call(g).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),i.db.topAxisEnabled()||n.topAxis){let N=E5(p).tickSize(-w+E+n.gridLineStartPadding).tickFormat(vl(i.db.getAxisFormat()||n.axisFormat||"%Y-%m-%d"));if(y!==null){const nt=y[1];switch(y[2]){case"minute":N.ticks(Ba.every(nt));break;case"hour":N.ticks(Da.every(nt));break;case"day":N.ticks(Mn.every(nt));break;case"week":N.ticks(Ts.every(nt));break;case"month":N.ticks(Ia.every(nt));break}}d.append("g").attr("class","grid").attr("transform","translate("+S+", "+E+")").call(N).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function P(S,E){const _=[];let w=0;for(const[g,D]of m.entries())_[g]=[D,C(D,b)];d.append("g").selectAll("text").data(_).enter().append(function(g){const D=g[0].split(Xt.lineBreakRegex),y=-(D.length-1)/2,N=l.createElementNS("http://www.w3.org/2000/svg","text");N.setAttribute("dy",y+"em");for(const[nt,Y]of D.entries()){const Z=l.createElementNS("http://www.w3.org/2000/svg","tspan");Z.setAttribute("alignment-baseline","central"),Z.setAttribute("x","10"),nt>0&&Z.setAttribute("dy","1em"),Z.textContent=Y,N.appendChild(Z)}return N}).attr("x",10).attr("y",function(g,D){if(D>0)for(let y=0;y<D;y++)return w+=_[D-1][1],g[1]*S/2+w*S+E;else return g[1]*S/2+E}).attr("font-size",n.sectionFontSize).attr("font-size",n.sectionFontSize).attr("class",function(g){for(const[D,y]of m.entries())if(g[0]===y)return"sectionTitle sectionTitle"+D%n.numberSectionStyles;return"sectionTitle"})}function V(S,E,_,w){const g=i.db.getTodayMarker();if(g==="off")return;const D=d.append("g").attr("class","today"),y=new Date,N=D.append("line");N.attr("x1",p(y)+S).attr("x2",p(y)+S).attr("y1",n.titleTopMargin).attr("y2",w-n.titleTopMargin).attr("class","today"),g!==""&&N.attr("style",g.replace(/,/g,";"))}function O(S){const E={},_=[];for(let w=0,g=S.length;w<g;++w)Object.prototype.hasOwnProperty.call(E,S[w])||(E[S[w]]=!0,_.push(S[w]));return _}function F(S){let E=S.length;const _={};for(;E;)_[S[--E]]=(_[S[E]]||0)+1;return _}function C(S,E){return F(E)[S]||0}},tF={setConf:QO,draw:JO};var Vu=function(){var t=function(s,a,o,l){for(o=o||{},l=s.length;l--;o[s[l]]=a);return o},e=[6,9,10],r={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(a,o,l,h,u,f,d){switch(f.length-1,u){case 1:return h;case 4:break;case 6:h.setInfo(!0);break}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},t(e,[2,3]),t(e,[2,4]),t(e,[2,5]),t(e,[2,6])],defaultActions:{4:[2,1]},parseError:function(a,o){if(o.recoverable)this.trace(a);else{var l=new Error(a);throw l.hash=o,l}},parse:function(a){var o=this,l=[0],h=[],u=[null],f=[],d=this.table,p="",m=0,b=0,x=2,k=1,v=f.slice.call(arguments,1),B=Object.create(this.lexer),R={yy:{}};for(var P in this.yy)Object.prototype.hasOwnProperty.call(this.yy,P)&&(R.yy[P]=this.yy[P]);B.setInput(a,R.yy),R.yy.lexer=B,R.yy.parser=this,typeof B.yylloc>"u"&&(B.yylloc={});var V=B.yylloc;f.push(V);var O=B.options&&B.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function F(){var Y;return Y=h.pop()||B.lex()||k,typeof Y!="number"&&(Y instanceof Array&&(h=Y,Y=h.pop()),Y=o.symbols_[Y]||Y),Y}for(var C,S,E,_,w={},g,D,y,N;;){if(S=l[l.length-1],this.defaultActions[S]?E=this.defaultActions[S]:((C===null||typeof C>"u")&&(C=F()),E=d[S]&&d[S][C]),typeof E>"u"||!E.length||!E[0]){var nt="";N=[];for(g in d[S])this.terminals_[g]&&g>x&&N.push("'"+this.terminals_[g]+"'");B.showPosition?nt="Parse error on line "+(m+1)+`:
1237
1237
  `+B.showPosition()+`
1238
1238
  Expecting `+N.join(", ")+", got '"+(this.terminals_[C]||C)+"'":nt="Parse error on line "+(m+1)+": Unexpected "+(C==k?"end of input":"'"+(this.terminals_[C]||C)+"'"),this.parseError(nt,{text:B.match,token:this.terminals_[C]||C,line:B.yylineno,loc:V,expected:N})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+S+", token: "+C);switch(E[0]){case 1:l.push(C),u.push(B.yytext),f.push(B.yylloc),l.push(E[1]),C=null,b=B.yyleng,p=B.yytext,m=B.yylineno,V=B.yylloc;break;case 2:if(D=this.productions_[E[1]][1],w.$=u[u.length-D],w._$={first_line:f[f.length-(D||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(D||1)].first_column,last_column:f[f.length-1].last_column},O&&(w._$.range=[f[f.length-(D||1)].range[0],f[f.length-1].range[1]]),_=this.performAction.apply(w,[p,b,m,R.yy,E[1],u,f].concat(v)),typeof _<"u")return _;D&&(l=l.slice(0,-1*D*2),u=u.slice(0,-1*D),f=f.slice(0,-1*D)),l.push(this.productions_[E[1]][0]),u.push(w.$),f.push(w._$),y=d[l[l.length-2]][l[l.length-1]],l.push(y);break;case 3:return!0}}return!0}},i=function(){var s={EOF:1,parseError:function(o,l){if(this.yy.parser)this.yy.parser.parseError(o,l);else throw new Error(o)},setInput: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},input: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},unput:function(a){var o=a.length,l=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 h=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),l.length-1&&(this.yylineno-=l.length-1);var u=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:l?(l.length===h.length?this.yylloc.first_column:0)+h[h.length-l.length].length-l[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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).
1239
1239
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput: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,"")},showPosition:function(){var a=this.pastInput(),o=new Array(a.length+1).join("-");return a+this.upcomingInput()+`
1240
1240
  `+o+"^"},test_match:function(a,o){var l,h,u;if(this.options.backtrack_lexer&&(u={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&&(u.yylloc.range=this.yylloc.range.slice(0))),h=a[0].match(/(?:\r\n?|\n).*/g),h&&(this.yylineno+=h.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:h?h[h.length-1].length-h[h.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],l=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var f in u)this[f]=u[f];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,o,l,h;this._more||(this.yytext="",this.match="");for(var u=this._currentRules(),f=0;f<u.length;f++)if(l=this._input.match(this.rules[u[f]]),l&&(!o||l[0].length>o[0].length)){if(o=l,h=f,this.options.backtrack_lexer){if(a=this.test_match(l,u[f]),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,u[h]),a!==!1?a:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1241
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var o=this.next();return o||this.lex()},begin:function(o){this.conditionStack.push(o)},popState:function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},pushState:function(o){this.begin(o)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(o,l,h,u){switch(h){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};return s}();r.lexer=i;function n(){this.yy={}}return n.prototype=r,r.Parser=n,new n}();Vu.parser=Vu;const tF=Vu;var u3="",f3=!1;const eF=t=>{I.debug("Setting message to: "+t),u3=t},rF=()=>u3,iF=t=>{f3=t},nF=()=>f3,sF={setMessage:eF,getMessage:rF,setInfo:iF,getInfo:nF,clear:Lr},aF=(t,e,r)=>{try{I.debug(`Rendering info diagram
1242
- `+t);const i=G().securityLevel;let n;i==="sandbox"&&(n=_t("#i"+e));const a=_t(i==="sandbox"?n.nodes()[0].contentDocument.body:"body").select("#"+e);a.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+r),a.attr("height",100),a.attr("width",400)}catch(i){I.error("Error while rendering info diagram"),I.error(i.message)}},oF={draw:aF},lF=t=>t.match(/^\s*info/)!==null;var Yu=function(){var t=function(V,O,F,C){for(F=F||{},C=V.length;C--;F[V[C]]=O);return F},e=[1,4],r=[1,5],i=[1,6],n=[1,7],s=[1,9],a=[1,11,13,15,17,19,20,26,27,28,29],o=[2,5],l=[1,6,11,13,15,17,19,20,26,27,28,29],h=[26,27,28],u=[2,8],f=[1,18],d=[1,19],p=[1,20],m=[1,21],b=[1,22],x=[1,23],k=[1,28],v=[6,26,27,28,29],B={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,PIE:6,document:7,showData:8,line:9,statement:10,txt:11,value:12,title:13,title_value:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,openDirective:21,typeDirective:22,closeDirective:23,":":24,argDirective:25,NEWLINE:26,";":27,EOF:28,open_directive:29,type_directive:30,arg_directive:31,close_directive:32,$accept:0,$end:1},terminals_:{2:"error",6:"PIE",8:"showData",11:"txt",12:"value",13:"title",14:"title_value",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",24:":",26:"NEWLINE",27:";",28:"EOF",29:"open_directive",30:"type_directive",31:"arg_directive",32:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,3],[7,0],[7,2],[9,2],[10,0],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,1],[5,3],[5,5],[4,1],[4,1],[4,1],[21,1],[22,1],[25,1],[23,1]],performAction:function(O,F,C,S,E,_,w){var g=_.length-1;switch(E){case 4:S.setShowData(!0);break;case 7:this.$=_[g-1];break;case 9:S.addSection(_[g-1],S.cleanupValue(_[g]));break;case 10:this.$=_[g].trim(),S.setDiagramTitle(this.$);break;case 11:this.$=_[g].trim(),S.setAccTitle(this.$);break;case 12:case 13:this.$=_[g].trim(),S.setAccDescription(this.$);break;case 14:S.addSection(_[g].substr(8)),this.$=_[g].substr(8);break;case 21:S.parseDirective("%%{","open_directive");break;case 22:S.parseDirective(_[g],"type_directive");break;case 23:_[g]=_[g].trim().replace(/'/g,'"'),S.parseDirective(_[g],"arg_directive");break;case 24:S.parseDirective("}%%","close_directive","pie");break}},table:[{3:1,4:2,5:3,6:e,21:8,26:r,27:i,28:n,29:s},{1:[3]},{3:10,4:2,5:3,6:e,21:8,26:r,27:i,28:n,29:s},{3:11,4:2,5:3,6:e,21:8,26:r,27:i,28:n,29:s},t(a,o,{7:12,8:[1,13]}),t(l,[2,18]),t(l,[2,19]),t(l,[2,20]),{22:14,30:[1,15]},{30:[2,21]},{1:[2,1]},{1:[2,2]},t(h,u,{21:8,9:16,10:17,5:24,1:[2,3],11:f,13:d,15:p,17:m,19:b,20:x,29:s}),t(a,o,{7:25}),{23:26,24:[1,27],32:k},t([24,32],[2,22]),t(a,[2,6]),{4:29,26:r,27:i,28:n},{12:[1,30]},{14:[1,31]},{16:[1,32]},{18:[1,33]},t(h,[2,13]),t(h,[2,14]),t(h,[2,15]),t(h,u,{21:8,9:16,10:17,5:24,1:[2,4],11:f,13:d,15:p,17:m,19:b,20:x,29:s}),t(v,[2,16]),{25:34,31:[1,35]},t(v,[2,24]),t(a,[2,7]),t(h,[2,9]),t(h,[2,10]),t(h,[2,11]),t(h,[2,12]),{23:36,32:k},{32:[2,23]},t(v,[2,17])],defaultActions:{9:[2,21],10:[2,1],11:[2,2],35:[2,23]},parseError:function(O,F){if(F.recoverable)this.trace(O);else{var C=new Error(O);throw C.hash=F,C}},parse:function(O){var F=this,C=[0],S=[],E=[null],_=[],w=this.table,g="",D=0,y=0,N=2,nt=1,Y=_.slice.call(arguments,1),Z=Object.create(this.lexer),J={yy:{}};for(var X in this.yy)Object.prototype.hasOwnProperty.call(this.yy,X)&&(J.yy[X]=this.yy[X]);Z.setInput(O,J.yy),J.yy.lexer=Z,J.yy.parser=this,typeof Z.yylloc>"u"&&(Z.yylloc={});var tt=Z.yylloc;_.push(tt);var ot=Z.options&&Z.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function at(){var st;return st=S.pop()||Z.lex()||nt,typeof st!="number"&&(st instanceof Array&&(S=st,st=S.pop()),st=F.symbols_[st]||st),st}for(var U,Tt,$,j,W={},z,A,M,q;;){if(Tt=C[C.length-1],this.defaultActions[Tt]?$=this.defaultActions[Tt]:((U===null||typeof U>"u")&&(U=at()),$=w[Tt]&&w[Tt][U]),typeof $>"u"||!$.length||!$[0]){var L="";q=[];for(z in w[Tt])this.terminals_[z]&&z>N&&q.push("'"+this.terminals_[z]+"'");Z.showPosition?L="Parse error on line "+(D+1)+`:
1241
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var o=this.next();return o||this.lex()},begin:function(o){this.conditionStack.push(o)},popState:function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},pushState:function(o){this.begin(o)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(o,l,h,u){switch(h){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};return s}();r.lexer=i;function n(){this.yy={}}return n.prototype=r,r.Parser=n,new n}();Vu.parser=Vu;const eF=Vu;var f3="",d3=!1;const rF=t=>{I.debug("Setting message to: "+t),f3=t},iF=()=>f3,nF=t=>{d3=t},sF=()=>d3,aF={setMessage:rF,getMessage:iF,setInfo:nF,getInfo:sF,clear:Lr},oF=(t,e,r)=>{try{I.debug(`Rendering info diagram
1242
+ `+t);const i=G().securityLevel;let n;i==="sandbox"&&(n=_t("#i"+e));const a=_t(i==="sandbox"?n.nodes()[0].contentDocument.body:"body").select("#"+e);a.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+r),a.attr("height",100),a.attr("width",400)}catch(i){I.error("Error while rendering info diagram"),I.error(i.message)}},lF={draw:oF},cF=t=>t.match(/^\s*info/)!==null;var Yu=function(){var t=function(V,O,F,C){for(F=F||{},C=V.length;C--;F[V[C]]=O);return F},e=[1,4],r=[1,5],i=[1,6],n=[1,7],s=[1,9],a=[1,11,13,15,17,19,20,26,27,28,29],o=[2,5],l=[1,6,11,13,15,17,19,20,26,27,28,29],h=[26,27,28],u=[2,8],f=[1,18],d=[1,19],p=[1,20],m=[1,21],b=[1,22],x=[1,23],k=[1,28],v=[6,26,27,28,29],B={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,PIE:6,document:7,showData:8,line:9,statement:10,txt:11,value:12,title:13,title_value:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,openDirective:21,typeDirective:22,closeDirective:23,":":24,argDirective:25,NEWLINE:26,";":27,EOF:28,open_directive:29,type_directive:30,arg_directive:31,close_directive:32,$accept:0,$end:1},terminals_:{2:"error",6:"PIE",8:"showData",11:"txt",12:"value",13:"title",14:"title_value",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",24:":",26:"NEWLINE",27:";",28:"EOF",29:"open_directive",30:"type_directive",31:"arg_directive",32:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,3],[7,0],[7,2],[9,2],[10,0],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,1],[5,3],[5,5],[4,1],[4,1],[4,1],[21,1],[22,1],[25,1],[23,1]],performAction:function(O,F,C,S,E,_,w){var g=_.length-1;switch(E){case 4:S.setShowData(!0);break;case 7:this.$=_[g-1];break;case 9:S.addSection(_[g-1],S.cleanupValue(_[g]));break;case 10:this.$=_[g].trim(),S.setDiagramTitle(this.$);break;case 11:this.$=_[g].trim(),S.setAccTitle(this.$);break;case 12:case 13:this.$=_[g].trim(),S.setAccDescription(this.$);break;case 14:S.addSection(_[g].substr(8)),this.$=_[g].substr(8);break;case 21:S.parseDirective("%%{","open_directive");break;case 22:S.parseDirective(_[g],"type_directive");break;case 23:_[g]=_[g].trim().replace(/'/g,'"'),S.parseDirective(_[g],"arg_directive");break;case 24:S.parseDirective("}%%","close_directive","pie");break}},table:[{3:1,4:2,5:3,6:e,21:8,26:r,27:i,28:n,29:s},{1:[3]},{3:10,4:2,5:3,6:e,21:8,26:r,27:i,28:n,29:s},{3:11,4:2,5:3,6:e,21:8,26:r,27:i,28:n,29:s},t(a,o,{7:12,8:[1,13]}),t(l,[2,18]),t(l,[2,19]),t(l,[2,20]),{22:14,30:[1,15]},{30:[2,21]},{1:[2,1]},{1:[2,2]},t(h,u,{21:8,9:16,10:17,5:24,1:[2,3],11:f,13:d,15:p,17:m,19:b,20:x,29:s}),t(a,o,{7:25}),{23:26,24:[1,27],32:k},t([24,32],[2,22]),t(a,[2,6]),{4:29,26:r,27:i,28:n},{12:[1,30]},{14:[1,31]},{16:[1,32]},{18:[1,33]},t(h,[2,13]),t(h,[2,14]),t(h,[2,15]),t(h,u,{21:8,9:16,10:17,5:24,1:[2,4],11:f,13:d,15:p,17:m,19:b,20:x,29:s}),t(v,[2,16]),{25:34,31:[1,35]},t(v,[2,24]),t(a,[2,7]),t(h,[2,9]),t(h,[2,10]),t(h,[2,11]),t(h,[2,12]),{23:36,32:k},{32:[2,23]},t(v,[2,17])],defaultActions:{9:[2,21],10:[2,1],11:[2,2],35:[2,23]},parseError:function(O,F){if(F.recoverable)this.trace(O);else{var C=new Error(O);throw C.hash=F,C}},parse:function(O){var F=this,C=[0],S=[],E=[null],_=[],w=this.table,g="",D=0,y=0,N=2,nt=1,Y=_.slice.call(arguments,1),Z=Object.create(this.lexer),J={yy:{}};for(var X in this.yy)Object.prototype.hasOwnProperty.call(this.yy,X)&&(J.yy[X]=this.yy[X]);Z.setInput(O,J.yy),J.yy.lexer=Z,J.yy.parser=this,typeof Z.yylloc>"u"&&(Z.yylloc={});var tt=Z.yylloc;_.push(tt);var ot=Z.options&&Z.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function at(){var st;return st=S.pop()||Z.lex()||nt,typeof st!="number"&&(st instanceof Array&&(S=st,st=S.pop()),st=F.symbols_[st]||st),st}for(var U,Tt,$,j,W={},z,A,M,q;;){if(Tt=C[C.length-1],this.defaultActions[Tt]?$=this.defaultActions[Tt]:((U===null||typeof U>"u")&&(U=at()),$=w[Tt]&&w[Tt][U]),typeof $>"u"||!$.length||!$[0]){var L="";q=[];for(z in w[Tt])this.terminals_[z]&&z>N&&q.push("'"+this.terminals_[z]+"'");Z.showPosition?L="Parse error on line "+(D+1)+`:
1243
1243
  `+Z.showPosition()+`
1244
1244
  Expecting `+q.join(", ")+", got '"+(this.terminals_[U]||U)+"'":L="Parse error on line "+(D+1)+": Unexpected "+(U==nt?"end of input":"'"+(this.terminals_[U]||U)+"'"),this.parseError(L,{text:Z.match,token:this.terminals_[U]||U,line:Z.yylineno,loc:tt,expected:q})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Tt+", token: "+U);switch($[0]){case 1:C.push(U),E.push(Z.yytext),_.push(Z.yylloc),C.push($[1]),U=null,y=Z.yyleng,g=Z.yytext,D=Z.yylineno,tt=Z.yylloc;break;case 2:if(A=this.productions_[$[1]][1],W.$=E[E.length-A],W._$={first_line:_[_.length-(A||1)].first_line,last_line:_[_.length-1].last_line,first_column:_[_.length-(A||1)].first_column,last_column:_[_.length-1].last_column},ot&&(W._$.range=[_[_.length-(A||1)].range[0],_[_.length-1].range[1]]),j=this.performAction.apply(W,[g,y,D,J.yy,$[1],E,_].concat(Y)),typeof j<"u")return j;A&&(C=C.slice(0,-1*A*2),E=E.slice(0,-1*A),_=_.slice(0,-1*A)),C.push(this.productions_[$[1]][0]),E.push(W.$),_.push(W._$),M=w[C[C.length-2]][C[C.length-1]],C.push(M);break;case 3:return!0}}return!0}},R=function(){var V={EOF:1,parseError:function(F,C){if(this.yy.parser)this.yy.parser.parseError(F,C);else throw new Error(F)},setInput:function(O,F){return this.yy=F||this.yy||{},this._input=O,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},input:function(){var O=this._input[0];this.yytext+=O,this.yyleng++,this.offset++,this.match+=O,this.matched+=O;var F=O.match(/(?:\r\n?|\n).*/g);return F?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),O},unput:function(O){var F=O.length,C=O.split(/(?:\r\n?|\n)/g);this._input=O+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-F),this.offset-=F;var S=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),C.length-1&&(this.yylineno-=C.length-1);var E=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:C?(C.length===S.length?this.yylloc.first_column:0)+S[S.length-C.length].length-C[0].length:this.yylloc.first_column-F},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-F]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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).
1245
1245
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(O){this.unput(this.match.slice(O))},pastInput:function(){var O=this.matched.substr(0,this.matched.length-this.match.length);return(O.length>20?"...":"")+O.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var O=this.match;return O.length<20&&(O+=this._input.substr(0,20-O.length)),(O.substr(0,20)+(O.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var O=this.pastInput(),F=new Array(O.length+1).join("-");return O+this.upcomingInput()+`
1246
1246
  `+F+"^"},test_match:function(O,F){var C,S,E;if(this.options.backtrack_lexer&&(E={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&&(E.yylloc.range=this.yylloc.range.slice(0))),S=O[0].match(/(?:\r\n?|\n).*/g),S&&(this.yylineno+=S.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:S?S[S.length-1].length-S[S.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+O[0].length},this.yytext+=O[0],this.match+=O[0],this.matches=O,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(O[0].length),this.matched+=O[0],C=this.performAction.call(this,this.yy,this,F,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),C)return C;if(this._backtrack){for(var _ in E)this[_]=E[_];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var O,F,C,S;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),_=0;_<E.length;_++)if(C=this._input.match(this.rules[E[_]]),C&&(!F||C[0].length>F[0].length)){if(F=C,S=_,this.options.backtrack_lexer){if(O=this.test_match(C,E[_]),O!==!1)return O;if(this._backtrack){F=!1;continue}else return!1}else if(!this.options.flex)break}return F?(O=this.test_match(F,E[S]),O!==!1?O:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1247
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var F=this.next();return F||this.lex()},begin:function(F){this.conditionStack.push(F)},popState:function(){var F=this.conditionStack.length-1;return F>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(F){return F=this.conditionStack.length-1-Math.abs(F||0),F>=0?this.conditionStack[F]:"INITIAL"},pushState:function(F){this.begin(F)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(F,C,S,E){switch(S){case 0:return this.begin("open_directive"),29;case 1:return this.begin("type_directive"),30;case 2:return this.popState(),this.begin("arg_directive"),24;case 3:return this.popState(),this.popState(),32;case 4:return 31;case 5:break;case 6:break;case 7:return 26;case 8:break;case 9:break;case 10:return this.begin("title"),13;case 11:return this.popState(),"title_value";case 12:return this.begin("acc_title"),15;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),17;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:this.begin("string");break;case 20:this.popState();break;case 21:return"txt";case 22:return 6;case 23:return 8;case 24:return"value";case 25:return 28}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[11],inclusive:!1},string:{rules:[20,21],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,14,16,19,22,23,24,25],inclusive:!0}}};return V}();B.lexer=R;function P(){this.yy={}}return P.prototype=B,B.Parser=P,new P}();Yu.parser=Yu;const cF=Yu,hF=t=>t.match(/^\s*pie/)!==null||t.match(/^\s*bar/)!==null;let tc={},y0=!1;const uF=function(t,e,r){xe.parseDirective(this,t,e,r)},fF=function(t,e){t=Xt.sanitizeText(t,G()),tc[t]===void 0&&(tc[t]=e,I.debug("Added new section :",t))},dF=()=>tc,pF=function(t){y0=t},gF=function(){return y0},yF=function(t){return t.substring(0,1)===":"&&(t=t.substring(1).trim()),Number(t.trim())},mF=function(){tc={},y0=!1,Lr()},bF={parseDirective:uF,getConfig:()=>G().pie,addSection:fF,getSections:dF,cleanupValue:yF,clear:mF,setAccTitle:kr,getAccTitle:Br,setDiagramTitle:si,getDiagramTitle:ai,setShowData:pF,getShowData:gF,getAccDescription:Ir,setAccDescription:Dr};let Li=G(),Bi;const aa=450,_F=(t,e,r,i)=>{try{Li=G(),I.debug(`Rendering info diagram
1248
- `+t);const v=G().securityLevel;let B;v==="sandbox"&&(B=_t("#i"+e));const R=_t(v==="sandbox"?B.nodes()[0].contentDocument.body:"body"),P=v==="sandbox"?B.nodes()[0].contentDocument:document;i.db.clear(),i.parser.parse(t),I.debug("Parsed info diagram");const V=P.getElementById(e);Bi=V.parentElement.offsetWidth,Bi===void 0&&(Bi=1200),Li.useWidth!==void 0&&(Bi=Li.useWidth),Li.pie.useWidth!==void 0&&(Bi=Li.pie.useWidth);const O=R.select("#"+e);ni(O,aa,Bi,Li.pie.useMaxWidth),V.setAttribute("viewBox","0 0 "+Bi+" "+aa);var n=40,s=18,a=4,o=Math.min(Bi,aa)/2-n,l=O.append("g").attr("transform","translate("+Bi/2+","+aa/2+")"),h=i.db.getSections(),u=0;Object.keys(h).forEach(function(C){u+=h[C]});const F=Li.themeVariables;var f=[F.pie1,F.pie2,F.pie3,F.pie4,F.pie5,F.pie6,F.pie7,F.pie8,F.pie9,F.pie10,F.pie11,F.pie12],d=sp().range(f),p=Object.entries(h).map(function(C,S){return{order:S,name:C[0],value:C[1]}}),m=ek().value(function(C){return C.value}).sort(function(C,S){return C.order-S.order}),b=m(p),x=nu().innerRadius(0).outerRadius(o);l.selectAll("mySlices").data(b).enter().append("path").attr("d",x).attr("fill",function(C){return d(C.data.name)}).attr("class","pieCircle"),l.selectAll("mySlices").data(b).enter().append("text").text(function(C){return(C.data.value/u*100).toFixed(0)+"%"}).attr("transform",function(C){return"translate("+x.centroid(C)+")"}).style("text-anchor","middle").attr("class","slice"),l.append("text").text(i.db.getDiagramTitle()).attr("x",0).attr("y",-(aa-50)/2).attr("class","pieTitleText");var k=l.selectAll(".legend").data(d.domain()).enter().append("g").attr("class","legend").attr("transform",function(C,S){const E=s+a,_=E*d.domain().length/2,w=12*s,g=S*E-_;return"translate("+w+","+g+")"});k.append("rect").attr("width",s).attr("height",s).style("fill",d).style("stroke",d),k.data(b).append("text").attr("x",s+a).attr("y",s-a).text(function(C){return i.db.getShowData()||Li.showData||Li.pie.showData?C.data.name+" ["+C.data.value+"]":C.data.name})}catch(v){I.error("Error while rendering info diagram"),I.error(v)}},xF={draw:_F};var zu=function(){var t=function(Tt,$,j,W){for(j=j||{},W=Tt.length;W--;j[Tt[W]]=$);return j},e=[1,3],r=[1,5],i=[1,6],n=[1,7],s=[1,8],a=[5,6,8,14,16,18,19,40,41,42,43,44,45,53,71,72],o=[1,22],l=[2,13],h=[1,26],u=[1,27],f=[1,28],d=[1,29],p=[1,30],m=[1,31],b=[1,24],x=[1,32],k=[1,33],v=[1,36],B=[71,72],R=[5,8,14,16,18,19,40,41,42,43,44,45,53,60,62,71,72],P=[1,56],V=[1,57],O=[1,58],F=[1,59],C=[1,60],S=[1,61],E=[1,62],_=[62,63],w=[1,74],g=[1,70],D=[1,71],y=[1,72],N=[1,73],nt=[1,75],Y=[1,79],Z=[1,80],J=[1,77],X=[1,78],tt=[5,8,14,16,18,19,40,41,42,43,44,45,53,71,72],ot={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,openDirective:9,typeDirective:10,closeDirective:11,":":12,argDirective:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,requirementDef:23,elementDef:24,relationshipDef:25,requirementType:26,requirementName:27,STRUCT_START:28,requirementBody:29,ID:30,COLONSEP:31,id:32,TEXT:33,text:34,RISK:35,riskLevel:36,VERIFYMTHD:37,verifyType:38,STRUCT_STOP:39,REQUIREMENT:40,FUNCTIONAL_REQUIREMENT:41,INTERFACE_REQUIREMENT:42,PERFORMANCE_REQUIREMENT:43,PHYSICAL_REQUIREMENT:44,DESIGN_CONSTRAINT:45,LOW_RISK:46,MED_RISK:47,HIGH_RISK:48,VERIFY_ANALYSIS:49,VERIFY_DEMONSTRATION:50,VERIFY_INSPECTION:51,VERIFY_TEST:52,ELEMENT:53,elementName:54,elementBody:55,TYPE:56,type:57,DOCREF:58,ref:59,END_ARROW_L:60,relationship:61,LINE:62,END_ARROW_R:63,CONTAINS:64,COPIES:65,DERIVES:66,SATISFIES:67,VERIFIES:68,REFINES:69,TRACES:70,unqString:71,qString:72,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",12:":",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",28:"STRUCT_START",30:"ID",31:"COLONSEP",33:"TEXT",35:"RISK",37:"VERIFYMTHD",39:"STRUCT_STOP",40:"REQUIREMENT",41:"FUNCTIONAL_REQUIREMENT",42:"INTERFACE_REQUIREMENT",43:"PERFORMANCE_REQUIREMENT",44:"PHYSICAL_REQUIREMENT",45:"DESIGN_CONSTRAINT",46:"LOW_RISK",47:"MED_RISK",48:"HIGH_RISK",49:"VERIFY_ANALYSIS",50:"VERIFY_DEMONSTRATION",51:"VERIFY_INSPECTION",52:"VERIFY_TEST",53:"ELEMENT",56:"TYPE",58:"DOCREF",60:"END_ARROW_L",62:"LINE",63:"END_ARROW_R",64:"CONTAINS",65:"COPIES",66:"DERIVES",67:"SATISFIES",68:"VERIFIES",69:"REFINES",70:"TRACES",71:"unqString",72:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,3],[4,5],[4,2],[4,2],[4,1],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[23,5],[29,5],[29,5],[29,5],[29,5],[29,2],[29,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[36,1],[36,1],[36,1],[38,1],[38,1],[38,1],[38,1],[24,5],[55,5],[55,5],[55,2],[55,1],[25,5],[25,5],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[27,1],[27,1],[32,1],[32,1],[34,1],[34,1],[54,1],[54,1],[57,1],[57,1],[59,1],[59,1]],performAction:function($,j,W,z,A,M,q){var L=M.length-1;switch(A){case 6:this.$=M[L].trim(),z.setAccTitle(this.$);break;case 7:case 8:this.$=M[L].trim(),z.setAccDescription(this.$);break;case 9:z.parseDirective("%%{","open_directive");break;case 10:z.parseDirective(M[L],"type_directive");break;case 11:M[L]=M[L].trim().replace(/'/g,'"'),z.parseDirective(M[L],"arg_directive");break;case 12:z.parseDirective("}%%","close_directive","pie");break;case 13:this.$=[];break;case 19:z.addRequirement(M[L-3],M[L-4]);break;case 20:z.setNewReqId(M[L-2]);break;case 21:z.setNewReqText(M[L-2]);break;case 22:z.setNewReqRisk(M[L-2]);break;case 23:z.setNewReqVerifyMethod(M[L-2]);break;case 26:this.$=z.RequirementType.REQUIREMENT;break;case 27:this.$=z.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 28:this.$=z.RequirementType.INTERFACE_REQUIREMENT;break;case 29:this.$=z.RequirementType.PERFORMANCE_REQUIREMENT;break;case 30:this.$=z.RequirementType.PHYSICAL_REQUIREMENT;break;case 31:this.$=z.RequirementType.DESIGN_CONSTRAINT;break;case 32:this.$=z.RiskLevel.LOW_RISK;break;case 33:this.$=z.RiskLevel.MED_RISK;break;case 34:this.$=z.RiskLevel.HIGH_RISK;break;case 35:this.$=z.VerifyType.VERIFY_ANALYSIS;break;case 36:this.$=z.VerifyType.VERIFY_DEMONSTRATION;break;case 37:this.$=z.VerifyType.VERIFY_INSPECTION;break;case 38:this.$=z.VerifyType.VERIFY_TEST;break;case 39:z.addElement(M[L-3]);break;case 40:z.setNewElementType(M[L-2]);break;case 41:z.setNewElementDocRef(M[L-2]);break;case 44:z.addRelationship(M[L-2],M[L],M[L-4]);break;case 45:z.addRelationship(M[L-2],M[L-4],M[L]);break;case 46:this.$=z.Relationships.CONTAINS;break;case 47:this.$=z.Relationships.COPIES;break;case 48:this.$=z.Relationships.DERIVES;break;case 49:this.$=z.Relationships.SATISFIES;break;case 50:this.$=z.Relationships.VERIFIES;break;case 51:this.$=z.Relationships.REFINES;break;case 52:this.$=z.Relationships.TRACES;break}},table:[{3:1,4:2,6:e,9:4,14:r,16:i,18:n,19:s},{1:[3]},{3:10,4:2,5:[1,9],6:e,9:4,14:r,16:i,18:n,19:s},{5:[1,11]},{10:12,20:[1,13]},{15:[1,14]},{17:[1,15]},t(a,[2,8]),{20:[2,9]},{3:16,4:2,6:e,9:4,14:r,16:i,18:n,19:s},{1:[2,2]},{4:21,5:o,7:17,8:l,9:4,14:r,16:i,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:f,43:d,44:p,45:m,53:b,71:x,72:k},{11:34,12:[1,35],22:v},t([12,22],[2,10]),t(a,[2,6]),t(a,[2,7]),{1:[2,1]},{8:[1,37]},{4:21,5:o,7:38,8:l,9:4,14:r,16:i,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:f,43:d,44:p,45:m,53:b,71:x,72:k},{4:21,5:o,7:39,8:l,9:4,14:r,16:i,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:f,43:d,44:p,45:m,53:b,71:x,72:k},{4:21,5:o,7:40,8:l,9:4,14:r,16:i,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:f,43:d,44:p,45:m,53:b,71:x,72:k},{4:21,5:o,7:41,8:l,9:4,14:r,16:i,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:f,43:d,44:p,45:m,53:b,71:x,72:k},{4:21,5:o,7:42,8:l,9:4,14:r,16:i,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:f,43:d,44:p,45:m,53:b,71:x,72:k},{27:43,71:[1,44],72:[1,45]},{54:46,71:[1,47],72:[1,48]},{60:[1,49],62:[1,50]},t(B,[2,26]),t(B,[2,27]),t(B,[2,28]),t(B,[2,29]),t(B,[2,30]),t(B,[2,31]),t(R,[2,55]),t(R,[2,56]),t(a,[2,4]),{13:51,21:[1,52]},t(a,[2,12]),{1:[2,3]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{8:[2,17]},{8:[2,18]},{28:[1,53]},{28:[2,53]},{28:[2,54]},{28:[1,54]},{28:[2,59]},{28:[2,60]},{61:55,64:P,65:V,66:O,67:F,68:C,69:S,70:E},{61:63,64:P,65:V,66:O,67:F,68:C,69:S,70:E},{11:64,22:v},{22:[2,11]},{5:[1,65]},{5:[1,66]},{62:[1,67]},t(_,[2,46]),t(_,[2,47]),t(_,[2,48]),t(_,[2,49]),t(_,[2,50]),t(_,[2,51]),t(_,[2,52]),{63:[1,68]},t(a,[2,5]),{5:w,29:69,30:g,33:D,35:y,37:N,39:nt},{5:Y,39:Z,55:76,56:J,58:X},{32:81,71:x,72:k},{32:82,71:x,72:k},t(tt,[2,19]),{31:[1,83]},{31:[1,84]},{31:[1,85]},{31:[1,86]},{5:w,29:87,30:g,33:D,35:y,37:N,39:nt},t(tt,[2,25]),t(tt,[2,39]),{31:[1,88]},{31:[1,89]},{5:Y,39:Z,55:90,56:J,58:X},t(tt,[2,43]),t(tt,[2,44]),t(tt,[2,45]),{32:91,71:x,72:k},{34:92,71:[1,93],72:[1,94]},{36:95,46:[1,96],47:[1,97],48:[1,98]},{38:99,49:[1,100],50:[1,101],51:[1,102],52:[1,103]},t(tt,[2,24]),{57:104,71:[1,105],72:[1,106]},{59:107,71:[1,108],72:[1,109]},t(tt,[2,42]),{5:[1,110]},{5:[1,111]},{5:[2,57]},{5:[2,58]},{5:[1,112]},{5:[2,32]},{5:[2,33]},{5:[2,34]},{5:[1,113]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[2,38]},{5:[1,114]},{5:[2,61]},{5:[2,62]},{5:[1,115]},{5:[2,63]},{5:[2,64]},{5:w,29:116,30:g,33:D,35:y,37:N,39:nt},{5:w,29:117,30:g,33:D,35:y,37:N,39:nt},{5:w,29:118,30:g,33:D,35:y,37:N,39:nt},{5:w,29:119,30:g,33:D,35:y,37:N,39:nt},{5:Y,39:Z,55:120,56:J,58:X},{5:Y,39:Z,55:121,56:J,58:X},t(tt,[2,20]),t(tt,[2,21]),t(tt,[2,22]),t(tt,[2,23]),t(tt,[2,40]),t(tt,[2,41])],defaultActions:{8:[2,9],10:[2,2],16:[2,1],37:[2,3],38:[2,14],39:[2,15],40:[2,16],41:[2,17],42:[2,18],44:[2,53],45:[2,54],47:[2,59],48:[2,60],52:[2,11],93:[2,57],94:[2,58],96:[2,32],97:[2,33],98:[2,34],100:[2,35],101:[2,36],102:[2,37],103:[2,38],105:[2,61],106:[2,62],108:[2,63],109:[2,64]},parseError:function($,j){if(j.recoverable)this.trace($);else{var W=new Error($);throw W.hash=j,W}},parse:function($){var j=this,W=[0],z=[],A=[null],M=[],q=this.table,L="",st=0,T=0,Dt=2,et=1,Et=M.slice.call(arguments,1),vt=Object.create(this.lexer),pt={yy:{}};for(var ut in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ut)&&(pt.yy[ut]=this.yy[ut]);vt.setInput($,pt.yy),pt.yy.lexer=vt,pt.yy.parser=this,typeof vt.yylloc>"u"&&(vt.yylloc={});var gt=vt.yylloc;M.push(gt);var ht=vt.options&&vt.options.ranges;typeof pt.yy.parseError=="function"?this.parseError=pt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function yt(){var mt;return mt=z.pop()||vt.lex()||et,typeof mt!="number"&&(mt instanceof Array&&(z=mt,mt=z.pop()),mt=j.symbols_[mt]||mt),mt}for(var he,re,Mt,Nt,Kt={},fe,qt,Ft,Bt;;){if(re=W[W.length-1],this.defaultActions[re]?Mt=this.defaultActions[re]:((he===null||typeof he>"u")&&(he=yt()),Mt=q[re]&&q[re][he]),typeof Mt>"u"||!Mt.length||!Mt[0]){var bt="";Bt=[];for(fe in q[re])this.terminals_[fe]&&fe>Dt&&Bt.push("'"+this.terminals_[fe]+"'");vt.showPosition?bt="Parse error on line "+(st+1)+`:
1247
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var F=this.next();return F||this.lex()},begin:function(F){this.conditionStack.push(F)},popState:function(){var F=this.conditionStack.length-1;return F>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(F){return F=this.conditionStack.length-1-Math.abs(F||0),F>=0?this.conditionStack[F]:"INITIAL"},pushState:function(F){this.begin(F)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(F,C,S,E){switch(S){case 0:return this.begin("open_directive"),29;case 1:return this.begin("type_directive"),30;case 2:return this.popState(),this.begin("arg_directive"),24;case 3:return this.popState(),this.popState(),32;case 4:return 31;case 5:break;case 6:break;case 7:return 26;case 8:break;case 9:break;case 10:return this.begin("title"),13;case 11:return this.popState(),"title_value";case 12:return this.begin("acc_title"),15;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),17;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:this.begin("string");break;case 20:this.popState();break;case 21:return"txt";case 22:return 6;case 23:return 8;case 24:return"value";case 25:return 28}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[11],inclusive:!1},string:{rules:[20,21],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,14,16,19,22,23,24,25],inclusive:!0}}};return V}();B.lexer=R;function P(){this.yy={}}return P.prototype=B,B.Parser=P,new P}();Yu.parser=Yu;const hF=Yu,uF=t=>t.match(/^\s*pie/)!==null||t.match(/^\s*bar/)!==null;let tc={},m0=!1;const fF=function(t,e,r){xe.parseDirective(this,t,e,r)},dF=function(t,e){t=Xt.sanitizeText(t,G()),tc[t]===void 0&&(tc[t]=e,I.debug("Added new section :",t))},pF=()=>tc,gF=function(t){m0=t},yF=function(){return m0},mF=function(t){return t.substring(0,1)===":"&&(t=t.substring(1).trim()),Number(t.trim())},bF=function(){tc={},m0=!1,Lr()},_F={parseDirective:fF,getConfig:()=>G().pie,addSection:dF,getSections:pF,cleanupValue:mF,clear:bF,setAccTitle:kr,getAccTitle:Br,setDiagramTitle:si,getDiagramTitle:ai,setShowData:gF,getShowData:yF,getAccDescription:Ir,setAccDescription:Dr};let Li=G(),Bi;const aa=450,xF=(t,e,r,i)=>{try{Li=G(),I.debug(`Rendering info diagram
1248
+ `+t);const v=G().securityLevel;let B;v==="sandbox"&&(B=_t("#i"+e));const R=_t(v==="sandbox"?B.nodes()[0].contentDocument.body:"body"),P=v==="sandbox"?B.nodes()[0].contentDocument:document;i.db.clear(),i.parser.parse(t),I.debug("Parsed info diagram");const V=P.getElementById(e);Bi=V.parentElement.offsetWidth,Bi===void 0&&(Bi=1200),Li.useWidth!==void 0&&(Bi=Li.useWidth),Li.pie.useWidth!==void 0&&(Bi=Li.pie.useWidth);const O=R.select("#"+e);ni(O,aa,Bi,Li.pie.useMaxWidth),V.setAttribute("viewBox","0 0 "+Bi+" "+aa);var n=40,s=18,a=4,o=Math.min(Bi,aa)/2-n,l=O.append("g").attr("transform","translate("+Bi/2+","+aa/2+")"),h=i.db.getSections(),u=0;Object.keys(h).forEach(function(C){u+=h[C]});const F=Li.themeVariables;var f=[F.pie1,F.pie2,F.pie3,F.pie4,F.pie5,F.pie6,F.pie7,F.pie8,F.pie9,F.pie10,F.pie11,F.pie12],d=ap().range(f),p=Object.entries(h).map(function(C,S){return{order:S,name:C[0],value:C[1]}}),m=rk().value(function(C){return C.value}).sort(function(C,S){return C.order-S.order}),b=m(p),x=nu().innerRadius(0).outerRadius(o);l.selectAll("mySlices").data(b).enter().append("path").attr("d",x).attr("fill",function(C){return d(C.data.name)}).attr("class","pieCircle"),l.selectAll("mySlices").data(b).enter().append("text").text(function(C){return(C.data.value/u*100).toFixed(0)+"%"}).attr("transform",function(C){return"translate("+x.centroid(C)+")"}).style("text-anchor","middle").attr("class","slice"),l.append("text").text(i.db.getDiagramTitle()).attr("x",0).attr("y",-(aa-50)/2).attr("class","pieTitleText");var k=l.selectAll(".legend").data(d.domain()).enter().append("g").attr("class","legend").attr("transform",function(C,S){const E=s+a,_=E*d.domain().length/2,w=12*s,g=S*E-_;return"translate("+w+","+g+")"});k.append("rect").attr("width",s).attr("height",s).style("fill",d).style("stroke",d),k.data(b).append("text").attr("x",s+a).attr("y",s-a).text(function(C){return i.db.getShowData()||Li.showData||Li.pie.showData?C.data.name+" ["+C.data.value+"]":C.data.name})}catch(v){I.error("Error while rendering info diagram"),I.error(v)}},vF={draw:xF};var zu=function(){var t=function(Tt,$,j,W){for(j=j||{},W=Tt.length;W--;j[Tt[W]]=$);return j},e=[1,3],r=[1,5],i=[1,6],n=[1,7],s=[1,8],a=[5,6,8,14,16,18,19,40,41,42,43,44,45,53,71,72],o=[1,22],l=[2,13],h=[1,26],u=[1,27],f=[1,28],d=[1,29],p=[1,30],m=[1,31],b=[1,24],x=[1,32],k=[1,33],v=[1,36],B=[71,72],R=[5,8,14,16,18,19,40,41,42,43,44,45,53,60,62,71,72],P=[1,56],V=[1,57],O=[1,58],F=[1,59],C=[1,60],S=[1,61],E=[1,62],_=[62,63],w=[1,74],g=[1,70],D=[1,71],y=[1,72],N=[1,73],nt=[1,75],Y=[1,79],Z=[1,80],J=[1,77],X=[1,78],tt=[5,8,14,16,18,19,40,41,42,43,44,45,53,71,72],ot={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,openDirective:9,typeDirective:10,closeDirective:11,":":12,argDirective:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,requirementDef:23,elementDef:24,relationshipDef:25,requirementType:26,requirementName:27,STRUCT_START:28,requirementBody:29,ID:30,COLONSEP:31,id:32,TEXT:33,text:34,RISK:35,riskLevel:36,VERIFYMTHD:37,verifyType:38,STRUCT_STOP:39,REQUIREMENT:40,FUNCTIONAL_REQUIREMENT:41,INTERFACE_REQUIREMENT:42,PERFORMANCE_REQUIREMENT:43,PHYSICAL_REQUIREMENT:44,DESIGN_CONSTRAINT:45,LOW_RISK:46,MED_RISK:47,HIGH_RISK:48,VERIFY_ANALYSIS:49,VERIFY_DEMONSTRATION:50,VERIFY_INSPECTION:51,VERIFY_TEST:52,ELEMENT:53,elementName:54,elementBody:55,TYPE:56,type:57,DOCREF:58,ref:59,END_ARROW_L:60,relationship:61,LINE:62,END_ARROW_R:63,CONTAINS:64,COPIES:65,DERIVES:66,SATISFIES:67,VERIFIES:68,REFINES:69,TRACES:70,unqString:71,qString:72,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",12:":",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",28:"STRUCT_START",30:"ID",31:"COLONSEP",33:"TEXT",35:"RISK",37:"VERIFYMTHD",39:"STRUCT_STOP",40:"REQUIREMENT",41:"FUNCTIONAL_REQUIREMENT",42:"INTERFACE_REQUIREMENT",43:"PERFORMANCE_REQUIREMENT",44:"PHYSICAL_REQUIREMENT",45:"DESIGN_CONSTRAINT",46:"LOW_RISK",47:"MED_RISK",48:"HIGH_RISK",49:"VERIFY_ANALYSIS",50:"VERIFY_DEMONSTRATION",51:"VERIFY_INSPECTION",52:"VERIFY_TEST",53:"ELEMENT",56:"TYPE",58:"DOCREF",60:"END_ARROW_L",62:"LINE",63:"END_ARROW_R",64:"CONTAINS",65:"COPIES",66:"DERIVES",67:"SATISFIES",68:"VERIFIES",69:"REFINES",70:"TRACES",71:"unqString",72:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,3],[4,5],[4,2],[4,2],[4,1],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[23,5],[29,5],[29,5],[29,5],[29,5],[29,2],[29,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[36,1],[36,1],[36,1],[38,1],[38,1],[38,1],[38,1],[24,5],[55,5],[55,5],[55,2],[55,1],[25,5],[25,5],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[27,1],[27,1],[32,1],[32,1],[34,1],[34,1],[54,1],[54,1],[57,1],[57,1],[59,1],[59,1]],performAction:function($,j,W,z,A,M,q){var L=M.length-1;switch(A){case 6:this.$=M[L].trim(),z.setAccTitle(this.$);break;case 7:case 8:this.$=M[L].trim(),z.setAccDescription(this.$);break;case 9:z.parseDirective("%%{","open_directive");break;case 10:z.parseDirective(M[L],"type_directive");break;case 11:M[L]=M[L].trim().replace(/'/g,'"'),z.parseDirective(M[L],"arg_directive");break;case 12:z.parseDirective("}%%","close_directive","pie");break;case 13:this.$=[];break;case 19:z.addRequirement(M[L-3],M[L-4]);break;case 20:z.setNewReqId(M[L-2]);break;case 21:z.setNewReqText(M[L-2]);break;case 22:z.setNewReqRisk(M[L-2]);break;case 23:z.setNewReqVerifyMethod(M[L-2]);break;case 26:this.$=z.RequirementType.REQUIREMENT;break;case 27:this.$=z.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 28:this.$=z.RequirementType.INTERFACE_REQUIREMENT;break;case 29:this.$=z.RequirementType.PERFORMANCE_REQUIREMENT;break;case 30:this.$=z.RequirementType.PHYSICAL_REQUIREMENT;break;case 31:this.$=z.RequirementType.DESIGN_CONSTRAINT;break;case 32:this.$=z.RiskLevel.LOW_RISK;break;case 33:this.$=z.RiskLevel.MED_RISK;break;case 34:this.$=z.RiskLevel.HIGH_RISK;break;case 35:this.$=z.VerifyType.VERIFY_ANALYSIS;break;case 36:this.$=z.VerifyType.VERIFY_DEMONSTRATION;break;case 37:this.$=z.VerifyType.VERIFY_INSPECTION;break;case 38:this.$=z.VerifyType.VERIFY_TEST;break;case 39:z.addElement(M[L-3]);break;case 40:z.setNewElementType(M[L-2]);break;case 41:z.setNewElementDocRef(M[L-2]);break;case 44:z.addRelationship(M[L-2],M[L],M[L-4]);break;case 45:z.addRelationship(M[L-2],M[L-4],M[L]);break;case 46:this.$=z.Relationships.CONTAINS;break;case 47:this.$=z.Relationships.COPIES;break;case 48:this.$=z.Relationships.DERIVES;break;case 49:this.$=z.Relationships.SATISFIES;break;case 50:this.$=z.Relationships.VERIFIES;break;case 51:this.$=z.Relationships.REFINES;break;case 52:this.$=z.Relationships.TRACES;break}},table:[{3:1,4:2,6:e,9:4,14:r,16:i,18:n,19:s},{1:[3]},{3:10,4:2,5:[1,9],6:e,9:4,14:r,16:i,18:n,19:s},{5:[1,11]},{10:12,20:[1,13]},{15:[1,14]},{17:[1,15]},t(a,[2,8]),{20:[2,9]},{3:16,4:2,6:e,9:4,14:r,16:i,18:n,19:s},{1:[2,2]},{4:21,5:o,7:17,8:l,9:4,14:r,16:i,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:f,43:d,44:p,45:m,53:b,71:x,72:k},{11:34,12:[1,35],22:v},t([12,22],[2,10]),t(a,[2,6]),t(a,[2,7]),{1:[2,1]},{8:[1,37]},{4:21,5:o,7:38,8:l,9:4,14:r,16:i,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:f,43:d,44:p,45:m,53:b,71:x,72:k},{4:21,5:o,7:39,8:l,9:4,14:r,16:i,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:f,43:d,44:p,45:m,53:b,71:x,72:k},{4:21,5:o,7:40,8:l,9:4,14:r,16:i,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:f,43:d,44:p,45:m,53:b,71:x,72:k},{4:21,5:o,7:41,8:l,9:4,14:r,16:i,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:f,43:d,44:p,45:m,53:b,71:x,72:k},{4:21,5:o,7:42,8:l,9:4,14:r,16:i,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:f,43:d,44:p,45:m,53:b,71:x,72:k},{27:43,71:[1,44],72:[1,45]},{54:46,71:[1,47],72:[1,48]},{60:[1,49],62:[1,50]},t(B,[2,26]),t(B,[2,27]),t(B,[2,28]),t(B,[2,29]),t(B,[2,30]),t(B,[2,31]),t(R,[2,55]),t(R,[2,56]),t(a,[2,4]),{13:51,21:[1,52]},t(a,[2,12]),{1:[2,3]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{8:[2,17]},{8:[2,18]},{28:[1,53]},{28:[2,53]},{28:[2,54]},{28:[1,54]},{28:[2,59]},{28:[2,60]},{61:55,64:P,65:V,66:O,67:F,68:C,69:S,70:E},{61:63,64:P,65:V,66:O,67:F,68:C,69:S,70:E},{11:64,22:v},{22:[2,11]},{5:[1,65]},{5:[1,66]},{62:[1,67]},t(_,[2,46]),t(_,[2,47]),t(_,[2,48]),t(_,[2,49]),t(_,[2,50]),t(_,[2,51]),t(_,[2,52]),{63:[1,68]},t(a,[2,5]),{5:w,29:69,30:g,33:D,35:y,37:N,39:nt},{5:Y,39:Z,55:76,56:J,58:X},{32:81,71:x,72:k},{32:82,71:x,72:k},t(tt,[2,19]),{31:[1,83]},{31:[1,84]},{31:[1,85]},{31:[1,86]},{5:w,29:87,30:g,33:D,35:y,37:N,39:nt},t(tt,[2,25]),t(tt,[2,39]),{31:[1,88]},{31:[1,89]},{5:Y,39:Z,55:90,56:J,58:X},t(tt,[2,43]),t(tt,[2,44]),t(tt,[2,45]),{32:91,71:x,72:k},{34:92,71:[1,93],72:[1,94]},{36:95,46:[1,96],47:[1,97],48:[1,98]},{38:99,49:[1,100],50:[1,101],51:[1,102],52:[1,103]},t(tt,[2,24]),{57:104,71:[1,105],72:[1,106]},{59:107,71:[1,108],72:[1,109]},t(tt,[2,42]),{5:[1,110]},{5:[1,111]},{5:[2,57]},{5:[2,58]},{5:[1,112]},{5:[2,32]},{5:[2,33]},{5:[2,34]},{5:[1,113]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[2,38]},{5:[1,114]},{5:[2,61]},{5:[2,62]},{5:[1,115]},{5:[2,63]},{5:[2,64]},{5:w,29:116,30:g,33:D,35:y,37:N,39:nt},{5:w,29:117,30:g,33:D,35:y,37:N,39:nt},{5:w,29:118,30:g,33:D,35:y,37:N,39:nt},{5:w,29:119,30:g,33:D,35:y,37:N,39:nt},{5:Y,39:Z,55:120,56:J,58:X},{5:Y,39:Z,55:121,56:J,58:X},t(tt,[2,20]),t(tt,[2,21]),t(tt,[2,22]),t(tt,[2,23]),t(tt,[2,40]),t(tt,[2,41])],defaultActions:{8:[2,9],10:[2,2],16:[2,1],37:[2,3],38:[2,14],39:[2,15],40:[2,16],41:[2,17],42:[2,18],44:[2,53],45:[2,54],47:[2,59],48:[2,60],52:[2,11],93:[2,57],94:[2,58],96:[2,32],97:[2,33],98:[2,34],100:[2,35],101:[2,36],102:[2,37],103:[2,38],105:[2,61],106:[2,62],108:[2,63],109:[2,64]},parseError:function($,j){if(j.recoverable)this.trace($);else{var W=new Error($);throw W.hash=j,W}},parse:function($){var j=this,W=[0],z=[],A=[null],M=[],q=this.table,L="",st=0,T=0,Dt=2,et=1,Et=M.slice.call(arguments,1),vt=Object.create(this.lexer),pt={yy:{}};for(var ut in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ut)&&(pt.yy[ut]=this.yy[ut]);vt.setInput($,pt.yy),pt.yy.lexer=vt,pt.yy.parser=this,typeof vt.yylloc>"u"&&(vt.yylloc={});var gt=vt.yylloc;M.push(gt);var ht=vt.options&&vt.options.ranges;typeof pt.yy.parseError=="function"?this.parseError=pt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function yt(){var mt;return mt=z.pop()||vt.lex()||et,typeof mt!="number"&&(mt instanceof Array&&(z=mt,mt=z.pop()),mt=j.symbols_[mt]||mt),mt}for(var he,re,Mt,Nt,Kt={},fe,qt,Ft,Bt;;){if(re=W[W.length-1],this.defaultActions[re]?Mt=this.defaultActions[re]:((he===null||typeof he>"u")&&(he=yt()),Mt=q[re]&&q[re][he]),typeof Mt>"u"||!Mt.length||!Mt[0]){var bt="";Bt=[];for(fe in q[re])this.terminals_[fe]&&fe>Dt&&Bt.push("'"+this.terminals_[fe]+"'");vt.showPosition?bt="Parse error on line "+(st+1)+`:
1249
1249
  `+vt.showPosition()+`
1250
1250
  Expecting `+Bt.join(", ")+", got '"+(this.terminals_[he]||he)+"'":bt="Parse error on line "+(st+1)+": Unexpected "+(he==et?"end of input":"'"+(this.terminals_[he]||he)+"'"),this.parseError(bt,{text:vt.match,token:this.terminals_[he]||he,line:vt.yylineno,loc:gt,expected:Bt})}if(Mt[0]instanceof Array&&Mt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+re+", token: "+he);switch(Mt[0]){case 1:W.push(he),A.push(vt.yytext),M.push(vt.yylloc),W.push(Mt[1]),he=null,T=vt.yyleng,L=vt.yytext,st=vt.yylineno,gt=vt.yylloc;break;case 2:if(qt=this.productions_[Mt[1]][1],Kt.$=A[A.length-qt],Kt._$={first_line:M[M.length-(qt||1)].first_line,last_line:M[M.length-1].last_line,first_column:M[M.length-(qt||1)].first_column,last_column:M[M.length-1].last_column},ht&&(Kt._$.range=[M[M.length-(qt||1)].range[0],M[M.length-1].range[1]]),Nt=this.performAction.apply(Kt,[L,T,st,pt.yy,Mt[1],A,M].concat(Et)),typeof Nt<"u")return Nt;qt&&(W=W.slice(0,-1*qt*2),A=A.slice(0,-1*qt),M=M.slice(0,-1*qt)),W.push(this.productions_[Mt[1]][0]),A.push(Kt.$),M.push(Kt._$),Ft=q[W[W.length-2]][W[W.length-1]],W.push(Ft);break;case 3:return!0}}return!0}},at=function(){var Tt={EOF:1,parseError:function(j,W){if(this.yy.parser)this.yy.parser.parseError(j,W);else throw new Error(j)},setInput:function($,j){return this.yy=j||this.yy||{},this._input=$,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},input:function(){var $=this._input[0];this.yytext+=$,this.yyleng++,this.offset++,this.match+=$,this.matched+=$;var j=$.match(/(?:\r\n?|\n).*/g);return j?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),$},unput:function($){var j=$.length,W=$.split(/(?:\r\n?|\n)/g);this._input=$+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-j),this.offset-=j;var z=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),W.length-1&&(this.yylineno-=W.length-1);var A=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:W?(W.length===z.length?this.yylloc.first_column:0)+z[z.length-W.length].length-W[0].length:this.yylloc.first_column-j},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-j]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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).
1251
1251
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function($){this.unput(this.match.slice($))},pastInput:function(){var $=this.matched.substr(0,this.matched.length-this.match.length);return($.length>20?"...":"")+$.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var $=this.match;return $.length<20&&($+=this._input.substr(0,20-$.length)),($.substr(0,20)+($.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var $=this.pastInput(),j=new Array($.length+1).join("-");return $+this.upcomingInput()+`
1252
1252
  `+j+"^"},test_match:function($,j){var W,z,A;if(this.options.backtrack_lexer&&(A={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&&(A.yylloc.range=this.yylloc.range.slice(0))),z=$[0].match(/(?:\r\n?|\n).*/g),z&&(this.yylineno+=z.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:z?z[z.length-1].length-z[z.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+$[0].length},this.yytext+=$[0],this.match+=$[0],this.matches=$,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($[0].length),this.matched+=$[0],W=this.performAction.call(this,this.yy,this,j,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),W)return W;if(this._backtrack){for(var M in A)this[M]=A[M];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var $,j,W,z;this._more||(this.yytext="",this.match="");for(var A=this._currentRules(),M=0;M<A.length;M++)if(W=this._input.match(this.rules[A[M]]),W&&(!j||W[0].length>j[0].length)){if(j=W,z=M,this.options.backtrack_lexer){if($=this.test_match(W,A[M]),$!==!1)return $;if(this._backtrack){j=!1;continue}else return!1}else if(!this.options.flex)break}return j?($=this.test_match(j,A[z]),$!==!1?$:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1253
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var j=this.next();return j||this.lex()},begin:function(j){this.conditionStack.push(j)},popState:function(){var j=this.conditionStack.length-1;return j>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(j){return j=this.conditionStack.length-1-Math.abs(j||0),j>=0?this.conditionStack[j]:"INITIAL"},pushState:function(j){this.begin(j)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(j,W,z,A){switch(z){case 0:return this.begin("open_directive"),19;case 1:return this.begin("type_directive"),20;case 2:return this.popState(),this.begin("arg_directive"),12;case 3:return this.popState(),this.popState(),22;case 4:return 21;case 5:return"title";case 6:return this.begin("acc_title"),14;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),16;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 5;case 14:break;case 15:break;case 16:break;case 17:return 8;case 18:return 6;case 19:return 28;case 20:return 39;case 21:return 31;case 22:return 30;case 23:return 33;case 24:return 35;case 25:return 37;case 26:return 40;case 27:return 41;case 28:return 42;case 29:return 43;case 30:return 44;case 31:return 45;case 32:return 46;case 33:return 47;case 34:return 48;case 35:return 49;case 36:return 50;case 37:return 51;case 38:return 52;case 39:return 53;case 40:return 64;case 41:return 65;case 42:return 66;case 43:return 67;case 44:return 68;case 45:return 69;case 46:return 70;case 47:return 56;case 48:return 58;case 49:return 60;case 50:return 63;case 51:return 62;case 52:this.begin("string");break;case 53:this.popState();break;case 54:return"qString";case 55:return W.yytext=W.yytext.trim(),71}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[53,54],inclusive:!1},INITIAL:{rules:[0,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,55],inclusive:!0}}};return Tt}();ot.lexer=at;function U(){this.yy={}}return U.prototype=ot,ot.Parser=U,new U}();zu.parser=zu;const vF=zu,kF=t=>t.match(/^\s*requirement(Diagram)?/)!==null;let m0=[],_r={},Ta={},hn={},Ea={};const wF={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},TF={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},EF={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},CF={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},SF=function(t,e,r){xe.parseDirective(this,t,e,r)},AF=(t,e)=>(Ta[t]===void 0&&(Ta[t]={name:t,type:e,id:_r.id,text:_r.text,risk:_r.risk,verifyMethod:_r.verifyMethod}),_r={},Ta[t]),LF=()=>Ta,BF=t=>{_r!==void 0&&(_r.id=t)},DF=t=>{_r!==void 0&&(_r.text=t)},IF=t=>{_r!==void 0&&(_r.risk=t)},MF=t=>{_r!==void 0&&(_r.verifyMethod=t)},NF=t=>(Ea[t]===void 0&&(Ea[t]={name:t,type:hn.type,docRef:hn.docRef},I.info("Added new requirement: ",t)),hn={},Ea[t]),RF=()=>Ea,OF=t=>{hn!==void 0&&(hn.type=t)},FF=t=>{hn!==void 0&&(hn.docRef=t)},PF=(t,e,r)=>{m0.push({type:t,src:e,dst:r})},VF=()=>m0,YF=()=>{m0=[],_r={},Ta={},hn={},Ea={},Lr()},zF={RequirementType:wF,RiskLevel:TF,VerifyType:EF,Relationships:CF,parseDirective:SF,getConfig:()=>G().req,addRequirement:AF,getRequirements:LF,setNewReqId:BF,setNewReqText:DF,setNewReqRisk:IF,setNewReqVerifyMethod:MF,setAccTitle:kr,getAccTitle:Br,setAccDescription:Dr,getAccDescription:Ir,addElement:NF,getElements:RF,setNewElementType:OF,setNewElementDocRef:FF,addRelationship:PF,getRelationships:VF,clear:YF},Uu={CONTAINS:"contains",ARROW:"arrow"},UF=(t,e)=>{let r=t.append("defs").append("marker").attr("id",Uu.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");r.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),r.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),r.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",Uu.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d",`M0,0
1253
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var j=this.next();return j||this.lex()},begin:function(j){this.conditionStack.push(j)},popState:function(){var j=this.conditionStack.length-1;return j>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(j){return j=this.conditionStack.length-1-Math.abs(j||0),j>=0?this.conditionStack[j]:"INITIAL"},pushState:function(j){this.begin(j)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(j,W,z,A){switch(z){case 0:return this.begin("open_directive"),19;case 1:return this.begin("type_directive"),20;case 2:return this.popState(),this.begin("arg_directive"),12;case 3:return this.popState(),this.popState(),22;case 4:return 21;case 5:return"title";case 6:return this.begin("acc_title"),14;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),16;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 5;case 14:break;case 15:break;case 16:break;case 17:return 8;case 18:return 6;case 19:return 28;case 20:return 39;case 21:return 31;case 22:return 30;case 23:return 33;case 24:return 35;case 25:return 37;case 26:return 40;case 27:return 41;case 28:return 42;case 29:return 43;case 30:return 44;case 31:return 45;case 32:return 46;case 33:return 47;case 34:return 48;case 35:return 49;case 36:return 50;case 37:return 51;case 38:return 52;case 39:return 53;case 40:return 64;case 41:return 65;case 42:return 66;case 43:return 67;case 44:return 68;case 45:return 69;case 46:return 70;case 47:return 56;case 48:return 58;case 49:return 60;case 50:return 63;case 51:return 62;case 52:this.begin("string");break;case 53:this.popState();break;case 54:return"qString";case 55:return W.yytext=W.yytext.trim(),71}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[53,54],inclusive:!1},INITIAL:{rules:[0,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,55],inclusive:!0}}};return Tt}();ot.lexer=at;function U(){this.yy={}}return U.prototype=ot,ot.Parser=U,new U}();zu.parser=zu;const kF=zu,wF=t=>t.match(/^\s*requirement(Diagram)?/)!==null;let b0=[],_r={},Ta={},hn={},Ea={};const TF={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},EF={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},CF={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},SF={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},AF=function(t,e,r){xe.parseDirective(this,t,e,r)},LF=(t,e)=>(Ta[t]===void 0&&(Ta[t]={name:t,type:e,id:_r.id,text:_r.text,risk:_r.risk,verifyMethod:_r.verifyMethod}),_r={},Ta[t]),BF=()=>Ta,DF=t=>{_r!==void 0&&(_r.id=t)},IF=t=>{_r!==void 0&&(_r.text=t)},MF=t=>{_r!==void 0&&(_r.risk=t)},NF=t=>{_r!==void 0&&(_r.verifyMethod=t)},RF=t=>(Ea[t]===void 0&&(Ea[t]={name:t,type:hn.type,docRef:hn.docRef},I.info("Added new requirement: ",t)),hn={},Ea[t]),OF=()=>Ea,FF=t=>{hn!==void 0&&(hn.type=t)},PF=t=>{hn!==void 0&&(hn.docRef=t)},VF=(t,e,r)=>{b0.push({type:t,src:e,dst:r})},YF=()=>b0,zF=()=>{b0=[],_r={},Ta={},hn={},Ea={},Lr()},UF={RequirementType:TF,RiskLevel:EF,VerifyType:CF,Relationships:SF,parseDirective:AF,getConfig:()=>G().req,addRequirement:LF,getRequirements:BF,setNewReqId:DF,setNewReqText:IF,setNewReqRisk:MF,setNewReqVerifyMethod:NF,setAccTitle:kr,getAccTitle:Br,setAccDescription:Dr,getAccDescription:Ir,addElement:RF,getElements:OF,setNewElementType:FF,setNewElementDocRef:PF,addRelationship:VF,getRelationships:YF,clear:zF},Uu={CONTAINS:"contains",ARROW:"arrow"},WF=(t,e)=>{let r=t.append("defs").append("marker").attr("id",Uu.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");r.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),r.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),r.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",Uu.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d",`M0,0
1254
1254
  L${e.line_height},${e.line_height/2}
1255
1255
  M${e.line_height},${e.line_height/2}
1256
- L0,${e.line_height}`).attr("stroke-width",1)},d3={ReqMarkers:Uu,insertLineEndings:UF};let Te={},Zd=0;const p3=(t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",Te.rect_min_width+"px").attr("height",Te.rect_min_height+"px"),g3=(t,e,r)=>{let i=Te.rect_min_width/2,n=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",i).attr("y",Te.rect_padding).attr("dominant-baseline","hanging"),s=0;r.forEach(h=>{s==0?n.append("tspan").attr("text-anchor","middle").attr("x",Te.rect_min_width/2).attr("dy",0).text(h):n.append("tspan").attr("text-anchor","middle").attr("x",Te.rect_min_width/2).attr("dy",Te.line_height*.75).text(h),s++});let a=1.5*Te.rect_padding,o=s*Te.line_height*.75,l=a+o;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",Te.rect_min_width).attr("y1",l).attr("y2",l),{titleNode:n,y:l}},y3=(t,e,r,i)=>{let n=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",Te.rect_padding).attr("y",i).attr("dominant-baseline","hanging"),s=0;const a=30;let o=[];return r.forEach(l=>{let h=l.length;for(;h>a&&s<3;){let u=l.substring(0,a);l=l.substring(a,l.length),h=l.length,o[o.length]=u,s++}if(s==3){let u=o[o.length-1];o[o.length-1]=u.substring(0,u.length-4)+"..."}else o[o.length]=l;s=0}),o.forEach(l=>{n.append("tspan").attr("x",Te.rect_padding).attr("dy",Te.line_height).text(l)}),n},WF=(t,e,r,i)=>{const n=e.node().getTotalLength(),s=e.node().getPointAtLength(n*.5),a="rel"+Zd;Zd++;const l=t.append("text").attr("class","req relationshipLabel").attr("id",a).attr("x",s.x).attr("y",s.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(i).node().getBBox();t.insert("rect","#"+a).attr("class","req reqLabelBox").attr("x",s.x-l.width/2).attr("y",s.y-l.height/2).attr("width",l.width).attr("height",l.height).attr("fill","white").attr("fill-opacity","85%")},HF=function(t,e,r,i,n){const s=r.edge(Fs(e.src),Fs(e.dst)),a=Us().x(function(l){return l.x}).y(function(l){return l.y}),o=t.insert("path","#"+i).attr("class","er relationshipLine").attr("d",a(s.points)).attr("fill","none");e.type==n.db.Relationships.CONTAINS?o.attr("marker-start","url("+Xt.getUrl(Te.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(o.attr("stroke-dasharray","10,7"),o.attr("marker-end","url("+Xt.getUrl(Te.arrowMarkerAbsolute)+"#"+d3.ReqMarkers.ARROW+"_line_ending)")),WF(t,o,Te,`<<${e.type}>>`)},qF=(t,e,r)=>{Object.keys(t).forEach(i=>{let n=t[i];i=Fs(i),I.info("Added new requirement: ",i);const s=r.append("g").attr("id",i),a="req-"+i,o=p3(s,a);let l=g3(s,i+"_title",[`<<${n.type}>>`,`${n.name}`]);y3(s,i+"_body",[`Id: ${n.id}`,`Text: ${n.text}`,`Risk: ${n.risk}`,`Verification: ${n.verifyMethod}`],l.y);const h=o.node().getBBox();e.setNode(i,{width:h.width,height:h.height,shape:"rect",id:i})})},GF=(t,e,r)=>{Object.keys(t).forEach(i=>{let n=t[i];const s=Fs(i),a=r.append("g").attr("id",s),o="element-"+s,l=p3(a,o);let h=g3(a,o+"_title",["<<Element>>",`${i}`]);y3(a,o+"_body",[`Type: ${n.type||"Not Specified"}`,`Doc Ref: ${n.docRef||"None"}`],h.y);const u=l.node().getBBox();e.setNode(s,{width:u.width,height:u.height,shape:"rect",id:s})})},$F=(t,e)=>(t.forEach(function(r){let i=Fs(r.src),n=Fs(r.dst);e.setEdge(i,n,{relationship:r})}),t),jF=function(t,e){e.nodes().forEach(function(r){r!==void 0&&e.node(r)!==void 0&&(t.select("#"+r),t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )"))})},Fs=t=>t.replace(/\s/g,"").replace(/\./g,"_"),XF=(t,e,r,i)=>{Te=G().requirement,i.db.clear(),i.parser.parse(t);const n=Te.securityLevel;let s;n==="sandbox"&&(s=_t("#i"+e));const o=_t(n==="sandbox"?s.nodes()[0].contentDocument.body:"body").select(`[id='${e}']`);d3.insertLineEndings(o,Te);const l=new Pe({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:Te.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});let h=i.db.getRequirements(),u=i.db.getElements(),f=i.db.getRelationships();qF(h,l,o),GF(u,l,o),$F(f,l),$s(l),jF(o,l),f.forEach(function(x){HF(o,x,l,e,i)});const d=Te.rect_padding,p=o.node().getBBox(),m=p.width+d*2,b=p.height+d*2;ni(o,b,m,Te.useMaxWidth),o.attr("viewBox",`${p.x-d} ${p.y-d} ${m} ${b}`)},KF={draw:XF};var Wu=function(){var t=function(j,W,z,A){for(z=z||{},A=j.length;A--;z[j[A]]=W);return z},e=[1,2],r=[1,3],i=[1,5],n=[1,7],s=[2,5],a=[1,15],o=[1,17],l=[1,19],h=[1,21],u=[1,22],f=[1,23],d=[1,29],p=[1,30],m=[1,31],b=[1,32],x=[1,33],k=[1,34],v=[1,35],B=[1,36],R=[1,37],P=[1,38],V=[1,39],O=[1,40],F=[1,42],C=[1,43],S=[1,45],E=[1,46],_=[1,47],w=[1,48],g=[1,49],D=[1,50],y=[1,53],N=[1,4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,51,52,53,54,56,57,62,63,64,65,73,83],nt=[4,5,21,54,56],Y=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,54,56,57,62,63,64,65,73,83],Z=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,53,54,56,57,62,63,64,65,73,83],J=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,52,54,56,57,62,63,64,65,73,83],X=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,51,54,56,57,62,63,64,65,73,83],tt=[71,72,73],ot=[1,125],at=[1,4,5,7,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,51,52,53,54,56,57,62,63,64,65,73,83],U={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,box_section:11,box_line:12,participant_statement:13,openDirective:14,typeDirective:15,closeDirective:16,":":17,argDirective:18,box:19,restOfLine:20,end:21,signal:22,autonumber:23,NUM:24,off:25,activate:26,actor:27,deactivate:28,note_statement:29,links_statement:30,link_statement:31,properties_statement:32,details_statement:33,title:34,legacy_title:35,acc_title:36,acc_title_value:37,acc_descr:38,acc_descr_value:39,acc_descr_multiline_value:40,loop:41,rect:42,opt:43,alt:44,else_sections:45,par:46,par_sections:47,critical:48,option_sections:49,break:50,option:51,and:52,else:53,participant:54,AS:55,participant_actor:56,note:57,placement:58,text2:59,over:60,actor_pair:61,links:62,link:63,properties:64,details:65,spaceList:66,",":67,left_of:68,right_of:69,signaltype:70,"+":71,"-":72,ACTOR:73,SOLID_OPEN_ARROW:74,DOTTED_OPEN_ARROW:75,SOLID_ARROW:76,DOTTED_ARROW:77,SOLID_CROSS:78,DOTTED_CROSS:79,SOLID_POINT:80,DOTTED_POINT:81,TXT:82,open_directive:83,type_directive:84,arg_directive:85,close_directive:86,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",17:":",19:"box",20:"restOfLine",21:"end",23:"autonumber",24:"NUM",25:"off",26:"activate",28:"deactivate",34:"title",35:"legacy_title",36:"acc_title",37:"acc_title_value",38:"acc_descr",39:"acc_descr_value",40:"acc_descr_multiline_value",41:"loop",42:"rect",43:"opt",44:"alt",46:"par",48:"critical",50:"break",51:"option",52:"and",53:"else",54:"participant",55:"AS",56:"participant_actor",57:"note",60:"over",62:"links",63:"link",64:"properties",65:"details",67:",",68:"left_of",69:"right_of",71:"+",72:"-",73:"ACTOR",74:"SOLID_OPEN_ARROW",75:"DOTTED_OPEN_ARROW",76:"SOLID_ARROW",77:"DOTTED_ARROW",78:"SOLID_CROSS",79:"DOTTED_CROSS",80:"SOLID_POINT",81:"DOTTED_POINT",82:"TXT",83:"open_directive",84:"type_directive",85:"arg_directive",86:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[11,0],[11,2],[12,2],[12,1],[12,1],[6,4],[6,6],[10,1],[10,4],[10,2],[10,4],[10,3],[10,3],[10,2],[10,3],[10,3],[10,2],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,2],[10,2],[10,1],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[49,1],[49,4],[47,1],[47,4],[45,1],[45,4],[13,5],[13,3],[13,5],[13,3],[29,4],[29,4],[30,3],[31,3],[32,3],[33,3],[66,2],[66,1],[61,3],[61,1],[58,1],[58,1],[22,5],[22,5],[22,4],[27,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[59,1],[14,1],[15,1],[18,1],[16,1]],performAction:function(W,z,A,M,q,L,st){var T=L.length-1;switch(q){case 4:return M.apply(L[T]),L[T];case 5:case 10:this.$=[];break;case 6:case 11:L[T-1].push(L[T]),this.$=L[T-1];break;case 7:case 8:case 12:case 13:this.$=L[T];break;case 9:case 14:this.$=[];break;case 18:L[T-1].unshift({type:"boxStart",boxData:M.parseBoxData(L[T-2])}),L[T-1].push({type:"boxEnd",boxText:L[T-2]}),this.$=L[T-1];break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(L[T-2]),sequenceIndexStep:Number(L[T-1]),sequenceVisible:!0,signalType:M.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceIndex:Number(L[T-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:M.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:M.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:M.LINETYPE.AUTONUMBER};break;case 24:this.$={type:"activeStart",signalType:M.LINETYPE.ACTIVE_START,actor:L[T-1]};break;case 25:this.$={type:"activeEnd",signalType:M.LINETYPE.ACTIVE_END,actor:L[T-1]};break;case 31:M.setDiagramTitle(L[T].substring(6)),this.$=L[T].substring(6);break;case 32:M.setDiagramTitle(L[T].substring(7)),this.$=L[T].substring(7);break;case 33:this.$=L[T].trim(),M.setAccTitle(this.$);break;case 34:case 35:this.$=L[T].trim(),M.setAccDescription(this.$);break;case 36:L[T-1].unshift({type:"loopStart",loopText:M.parseMessage(L[T-2]),signalType:M.LINETYPE.LOOP_START}),L[T-1].push({type:"loopEnd",loopText:L[T-2],signalType:M.LINETYPE.LOOP_END}),this.$=L[T-1];break;case 37:L[T-1].unshift({type:"rectStart",color:M.parseMessage(L[T-2]),signalType:M.LINETYPE.RECT_START}),L[T-1].push({type:"rectEnd",color:M.parseMessage(L[T-2]),signalType:M.LINETYPE.RECT_END}),this.$=L[T-1];break;case 38:L[T-1].unshift({type:"optStart",optText:M.parseMessage(L[T-2]),signalType:M.LINETYPE.OPT_START}),L[T-1].push({type:"optEnd",optText:M.parseMessage(L[T-2]),signalType:M.LINETYPE.OPT_END}),this.$=L[T-1];break;case 39:L[T-1].unshift({type:"altStart",altText:M.parseMessage(L[T-2]),signalType:M.LINETYPE.ALT_START}),L[T-1].push({type:"altEnd",signalType:M.LINETYPE.ALT_END}),this.$=L[T-1];break;case 40:L[T-1].unshift({type:"parStart",parText:M.parseMessage(L[T-2]),signalType:M.LINETYPE.PAR_START}),L[T-1].push({type:"parEnd",signalType:M.LINETYPE.PAR_END}),this.$=L[T-1];break;case 41:L[T-1].unshift({type:"criticalStart",criticalText:M.parseMessage(L[T-2]),signalType:M.LINETYPE.CRITICAL_START}),L[T-1].push({type:"criticalEnd",signalType:M.LINETYPE.CRITICAL_END}),this.$=L[T-1];break;case 42:L[T-1].unshift({type:"breakStart",breakText:M.parseMessage(L[T-2]),signalType:M.LINETYPE.BREAK_START}),L[T-1].push({type:"breakEnd",optText:M.parseMessage(L[T-2]),signalType:M.LINETYPE.BREAK_END}),this.$=L[T-1];break;case 45:this.$=L[T-3].concat([{type:"option",optionText:M.parseMessage(L[T-1]),signalType:M.LINETYPE.CRITICAL_OPTION},L[T]]);break;case 47:this.$=L[T-3].concat([{type:"and",parText:M.parseMessage(L[T-1]),signalType:M.LINETYPE.PAR_AND},L[T]]);break;case 49:this.$=L[T-3].concat([{type:"else",altText:M.parseMessage(L[T-1]),signalType:M.LINETYPE.ALT_ELSE},L[T]]);break;case 50:L[T-3].type="addParticipant",L[T-3].description=M.parseMessage(L[T-1]),this.$=L[T-3];break;case 51:L[T-1].type="addParticipant",this.$=L[T-1];break;case 52:L[T-3].type="addActor",L[T-3].description=M.parseMessage(L[T-1]),this.$=L[T-3];break;case 53:L[T-1].type="addActor",this.$=L[T-1];break;case 54:this.$=[L[T-1],{type:"addNote",placement:L[T-2],actor:L[T-1].actor,text:L[T]}];break;case 55:L[T-2]=[].concat(L[T-1],L[T-1]).slice(0,2),L[T-2][0]=L[T-2][0].actor,L[T-2][1]=L[T-2][1].actor,this.$=[L[T-1],{type:"addNote",placement:M.PLACEMENT.OVER,actor:L[T-2].slice(0,2),text:L[T]}];break;case 56:this.$=[L[T-1],{type:"addLinks",actor:L[T-1].actor,text:L[T]}];break;case 57:this.$=[L[T-1],{type:"addALink",actor:L[T-1].actor,text:L[T]}];break;case 58:this.$=[L[T-1],{type:"addProperties",actor:L[T-1].actor,text:L[T]}];break;case 59:this.$=[L[T-1],{type:"addDetails",actor:L[T-1].actor,text:L[T]}];break;case 62:this.$=[L[T-2],L[T]];break;case 63:this.$=L[T];break;case 64:this.$=M.PLACEMENT.LEFTOF;break;case 65:this.$=M.PLACEMENT.RIGHTOF;break;case 66:this.$=[L[T-4],L[T-1],{type:"addMessage",from:L[T-4].actor,to:L[T-1].actor,signalType:L[T-3],msg:L[T]},{type:"activeStart",signalType:M.LINETYPE.ACTIVE_START,actor:L[T-1]}];break;case 67:this.$=[L[T-4],L[T-1],{type:"addMessage",from:L[T-4].actor,to:L[T-1].actor,signalType:L[T-3],msg:L[T]},{type:"activeEnd",signalType:M.LINETYPE.ACTIVE_END,actor:L[T-4]}];break;case 68:this.$=[L[T-3],L[T-1],{type:"addMessage",from:L[T-3].actor,to:L[T-1].actor,signalType:L[T-2],msg:L[T]}];break;case 69:this.$={type:"addParticipant",actor:L[T]};break;case 70:this.$=M.LINETYPE.SOLID_OPEN;break;case 71:this.$=M.LINETYPE.DOTTED_OPEN;break;case 72:this.$=M.LINETYPE.SOLID;break;case 73:this.$=M.LINETYPE.DOTTED;break;case 74:this.$=M.LINETYPE.SOLID_CROSS;break;case 75:this.$=M.LINETYPE.DOTTED_CROSS;break;case 76:this.$=M.LINETYPE.SOLID_POINT;break;case 77:this.$=M.LINETYPE.DOTTED_POINT;break;case 78:this.$=M.parseMessage(L[T].trim().substring(1));break;case 79:M.parseDirective("%%{","open_directive");break;case 80:M.parseDirective(L[T],"type_directive");break;case 81:L[T]=L[T].trim().replace(/'/g,'"'),M.parseDirective(L[T],"arg_directive");break;case 82:M.parseDirective("}%%","close_directive","sequence");break}},table:[{3:1,4:e,5:r,6:4,7:i,14:6,83:n},{1:[3]},{3:8,4:e,5:r,6:4,7:i,14:6,83:n},{3:9,4:e,5:r,6:4,7:i,14:6,83:n},{3:10,4:e,5:r,6:4,7:i,14:6,83:n},t([1,4,5,19,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,54,56,57,62,63,64,65,73,83],s,{8:11}),{15:12,84:[1,13]},{84:[2,79]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,22:20,23:h,26:u,27:44,28:f,29:24,30:25,31:26,32:27,33:28,34:d,35:p,36:m,38:b,40:x,41:k,42:v,43:B,44:R,46:P,48:V,50:O,54:F,56:C,57:S,62:E,63:_,64:w,65:g,73:D,83:n},{16:51,17:[1,52],86:y},t([17,86],[2,80]),t(N,[2,6]),{6:41,10:54,13:18,14:6,19:l,22:20,23:h,26:u,27:44,28:f,29:24,30:25,31:26,32:27,33:28,34:d,35:p,36:m,38:b,40:x,41:k,42:v,43:B,44:R,46:P,48:V,50:O,54:F,56:C,57:S,62:E,63:_,64:w,65:g,73:D,83:n},t(N,[2,8]),t(N,[2,9]),t(N,[2,17]),{20:[1,55]},{5:[1,56]},{5:[1,59],24:[1,57],25:[1,58]},{27:60,73:D},{27:61,73:D},{5:[1,62]},{5:[1,63]},{5:[1,64]},{5:[1,65]},{5:[1,66]},t(N,[2,31]),t(N,[2,32]),{37:[1,67]},{39:[1,68]},t(N,[2,35]),{20:[1,69]},{20:[1,70]},{20:[1,71]},{20:[1,72]},{20:[1,73]},{20:[1,74]},{20:[1,75]},t(N,[2,43]),{27:76,73:D},{27:77,73:D},{70:78,74:[1,79],75:[1,80],76:[1,81],77:[1,82],78:[1,83],79:[1,84],80:[1,85],81:[1,86]},{58:87,60:[1,88],68:[1,89],69:[1,90]},{27:91,73:D},{27:92,73:D},{27:93,73:D},{27:94,73:D},t([5,55,67,74,75,76,77,78,79,80,81,82],[2,69]),{5:[1,95]},{18:96,85:[1,97]},{5:[2,82]},t(N,[2,7]),t(nt,[2,10],{11:98}),t(N,[2,19]),{5:[1,100],24:[1,99]},{5:[1,101]},t(N,[2,23]),{5:[1,102]},{5:[1,103]},t(N,[2,26]),t(N,[2,27]),t(N,[2,28]),t(N,[2,29]),t(N,[2,30]),t(N,[2,33]),t(N,[2,34]),t(Y,s,{8:104}),t(Y,s,{8:105}),t(Y,s,{8:106}),t(Z,s,{45:107,8:108}),t(J,s,{47:109,8:110}),t(X,s,{49:111,8:112}),t(Y,s,{8:113}),{5:[1,115],55:[1,114]},{5:[1,117],55:[1,116]},{27:120,71:[1,118],72:[1,119],73:D},t(tt,[2,70]),t(tt,[2,71]),t(tt,[2,72]),t(tt,[2,73]),t(tt,[2,74]),t(tt,[2,75]),t(tt,[2,76]),t(tt,[2,77]),{27:121,73:D},{27:123,61:122,73:D},{73:[2,64]},{73:[2,65]},{59:124,82:ot},{59:126,82:ot},{59:127,82:ot},{59:128,82:ot},t(at,[2,15]),{16:129,86:y},{86:[2,81]},{4:[1,132],5:[1,134],12:131,13:133,21:[1,130],54:F,56:C},{5:[1,135]},t(N,[2,21]),t(N,[2,22]),t(N,[2,24]),t(N,[2,25]),{4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,21:[1,136],22:20,23:h,26:u,27:44,28:f,29:24,30:25,31:26,32:27,33:28,34:d,35:p,36:m,38:b,40:x,41:k,42:v,43:B,44:R,46:P,48:V,50:O,54:F,56:C,57:S,62:E,63:_,64:w,65:g,73:D,83:n},{4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,21:[1,137],22:20,23:h,26:u,27:44,28:f,29:24,30:25,31:26,32:27,33:28,34:d,35:p,36:m,38:b,40:x,41:k,42:v,43:B,44:R,46:P,48:V,50:O,54:F,56:C,57:S,62:E,63:_,64:w,65:g,73:D,83:n},{4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,21:[1,138],22:20,23:h,26:u,27:44,28:f,29:24,30:25,31:26,32:27,33:28,34:d,35:p,36:m,38:b,40:x,41:k,42:v,43:B,44:R,46:P,48:V,50:O,54:F,56:C,57:S,62:E,63:_,64:w,65:g,73:D,83:n},{21:[1,139]},{4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,21:[2,48],22:20,23:h,26:u,27:44,28:f,29:24,30:25,31:26,32:27,33:28,34:d,35:p,36:m,38:b,40:x,41:k,42:v,43:B,44:R,46:P,48:V,50:O,53:[1,140],54:F,56:C,57:S,62:E,63:_,64:w,65:g,73:D,83:n},{21:[1,141]},{4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,21:[2,46],22:20,23:h,26:u,27:44,28:f,29:24,30:25,31:26,32:27,33:28,34:d,35:p,36:m,38:b,40:x,41:k,42:v,43:B,44:R,46:P,48:V,50:O,52:[1,142],54:F,56:C,57:S,62:E,63:_,64:w,65:g,73:D,83:n},{21:[1,143]},{4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,21:[2,44],22:20,23:h,26:u,27:44,28:f,29:24,30:25,31:26,32:27,33:28,34:d,35:p,36:m,38:b,40:x,41:k,42:v,43:B,44:R,46:P,48:V,50:O,51:[1,144],54:F,56:C,57:S,62:E,63:_,64:w,65:g,73:D,83:n},{4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,21:[1,145],22:20,23:h,26:u,27:44,28:f,29:24,30:25,31:26,32:27,33:28,34:d,35:p,36:m,38:b,40:x,41:k,42:v,43:B,44:R,46:P,48:V,50:O,54:F,56:C,57:S,62:E,63:_,64:w,65:g,73:D,83:n},{20:[1,146]},t(N,[2,51]),{20:[1,147]},t(N,[2,53]),{27:148,73:D},{27:149,73:D},{59:150,82:ot},{59:151,82:ot},{59:152,82:ot},{67:[1,153],82:[2,63]},{5:[2,56]},{5:[2,78]},{5:[2,57]},{5:[2,58]},{5:[2,59]},{5:[1,154]},t(N,[2,18]),t(nt,[2,11]),{13:155,54:F,56:C},t(nt,[2,13]),t(nt,[2,14]),t(N,[2,20]),t(N,[2,36]),t(N,[2,37]),t(N,[2,38]),t(N,[2,39]),{20:[1,156]},t(N,[2,40]),{20:[1,157]},t(N,[2,41]),{20:[1,158]},t(N,[2,42]),{5:[1,159]},{5:[1,160]},{59:161,82:ot},{59:162,82:ot},{5:[2,68]},{5:[2,54]},{5:[2,55]},{27:163,73:D},t(at,[2,16]),t(nt,[2,12]),t(Z,s,{8:108,45:164}),t(J,s,{8:110,47:165}),t(X,s,{8:112,49:166}),t(N,[2,50]),t(N,[2,52]),{5:[2,66]},{5:[2,67]},{82:[2,62]},{21:[2,49]},{21:[2,47]},{21:[2,45]}],defaultActions:{7:[2,79],8:[2,1],9:[2,2],10:[2,3],53:[2,82],89:[2,64],90:[2,65],97:[2,81],124:[2,56],125:[2,78],126:[2,57],127:[2,58],128:[2,59],150:[2,68],151:[2,54],152:[2,55],161:[2,66],162:[2,67],163:[2,62],164:[2,49],165:[2,47],166:[2,45]},parseError:function(W,z){if(z.recoverable)this.trace(W);else{var A=new Error(W);throw A.hash=z,A}},parse:function(W){var z=this,A=[0],M=[],q=[null],L=[],st=this.table,T="",Dt=0,et=0,Et=2,vt=1,pt=L.slice.call(arguments,1),ut=Object.create(this.lexer),gt={yy:{}};for(var ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ht)&&(gt.yy[ht]=this.yy[ht]);ut.setInput(W,gt.yy),gt.yy.lexer=ut,gt.yy.parser=this,typeof ut.yylloc>"u"&&(ut.yylloc={});var yt=ut.yylloc;L.push(yt);var he=ut.options&&ut.options.ranges;typeof gt.yy.parseError=="function"?this.parseError=gt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function re(){var ft;return ft=M.pop()||ut.lex()||vt,typeof ft!="number"&&(ft instanceof Array&&(M=ft,ft=M.pop()),ft=z.symbols_[ft]||ft),ft}for(var Mt,Nt,Kt,fe,qt={},Ft,Bt,bt,mt;;){if(Nt=A[A.length-1],this.defaultActions[Nt]?Kt=this.defaultActions[Nt]:((Mt===null||typeof Mt>"u")&&(Mt=re()),Kt=st[Nt]&&st[Nt][Mt]),typeof Kt>"u"||!Kt.length||!Kt[0]){var wt="";mt=[];for(Ft in st[Nt])this.terminals_[Ft]&&Ft>Et&&mt.push("'"+this.terminals_[Ft]+"'");ut.showPosition?wt="Parse error on line "+(Dt+1)+`:
1256
+ L0,${e.line_height}`).attr("stroke-width",1)},p3={ReqMarkers:Uu,insertLineEndings:WF};let Te={},Qd=0;const g3=(t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",Te.rect_min_width+"px").attr("height",Te.rect_min_height+"px"),y3=(t,e,r)=>{let i=Te.rect_min_width/2,n=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",i).attr("y",Te.rect_padding).attr("dominant-baseline","hanging"),s=0;r.forEach(h=>{s==0?n.append("tspan").attr("text-anchor","middle").attr("x",Te.rect_min_width/2).attr("dy",0).text(h):n.append("tspan").attr("text-anchor","middle").attr("x",Te.rect_min_width/2).attr("dy",Te.line_height*.75).text(h),s++});let a=1.5*Te.rect_padding,o=s*Te.line_height*.75,l=a+o;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",Te.rect_min_width).attr("y1",l).attr("y2",l),{titleNode:n,y:l}},m3=(t,e,r,i)=>{let n=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",Te.rect_padding).attr("y",i).attr("dominant-baseline","hanging"),s=0;const a=30;let o=[];return r.forEach(l=>{let h=l.length;for(;h>a&&s<3;){let u=l.substring(0,a);l=l.substring(a,l.length),h=l.length,o[o.length]=u,s++}if(s==3){let u=o[o.length-1];o[o.length-1]=u.substring(0,u.length-4)+"..."}else o[o.length]=l;s=0}),o.forEach(l=>{n.append("tspan").attr("x",Te.rect_padding).attr("dy",Te.line_height).text(l)}),n},HF=(t,e,r,i)=>{const n=e.node().getTotalLength(),s=e.node().getPointAtLength(n*.5),a="rel"+Qd;Qd++;const l=t.append("text").attr("class","req relationshipLabel").attr("id",a).attr("x",s.x).attr("y",s.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(i).node().getBBox();t.insert("rect","#"+a).attr("class","req reqLabelBox").attr("x",s.x-l.width/2).attr("y",s.y-l.height/2).attr("width",l.width).attr("height",l.height).attr("fill","white").attr("fill-opacity","85%")},qF=function(t,e,r,i,n){const s=r.edge(Fs(e.src),Fs(e.dst)),a=Us().x(function(l){return l.x}).y(function(l){return l.y}),o=t.insert("path","#"+i).attr("class","er relationshipLine").attr("d",a(s.points)).attr("fill","none");e.type==n.db.Relationships.CONTAINS?o.attr("marker-start","url("+Xt.getUrl(Te.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(o.attr("stroke-dasharray","10,7"),o.attr("marker-end","url("+Xt.getUrl(Te.arrowMarkerAbsolute)+"#"+p3.ReqMarkers.ARROW+"_line_ending)")),HF(t,o,Te,`<<${e.type}>>`)},GF=(t,e,r)=>{Object.keys(t).forEach(i=>{let n=t[i];i=Fs(i),I.info("Added new requirement: ",i);const s=r.append("g").attr("id",i),a="req-"+i,o=g3(s,a);let l=y3(s,i+"_title",[`<<${n.type}>>`,`${n.name}`]);m3(s,i+"_body",[`Id: ${n.id}`,`Text: ${n.text}`,`Risk: ${n.risk}`,`Verification: ${n.verifyMethod}`],l.y);const h=o.node().getBBox();e.setNode(i,{width:h.width,height:h.height,shape:"rect",id:i})})},$F=(t,e,r)=>{Object.keys(t).forEach(i=>{let n=t[i];const s=Fs(i),a=r.append("g").attr("id",s),o="element-"+s,l=g3(a,o);let h=y3(a,o+"_title",["<<Element>>",`${i}`]);m3(a,o+"_body",[`Type: ${n.type||"Not Specified"}`,`Doc Ref: ${n.docRef||"None"}`],h.y);const u=l.node().getBBox();e.setNode(s,{width:u.width,height:u.height,shape:"rect",id:s})})},jF=(t,e)=>(t.forEach(function(r){let i=Fs(r.src),n=Fs(r.dst);e.setEdge(i,n,{relationship:r})}),t),XF=function(t,e){e.nodes().forEach(function(r){r!==void 0&&e.node(r)!==void 0&&(t.select("#"+r),t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )"))})},Fs=t=>t.replace(/\s/g,"").replace(/\./g,"_"),KF=(t,e,r,i)=>{Te=G().requirement,i.db.clear(),i.parser.parse(t);const n=Te.securityLevel;let s;n==="sandbox"&&(s=_t("#i"+e));const o=_t(n==="sandbox"?s.nodes()[0].contentDocument.body:"body").select(`[id='${e}']`);p3.insertLineEndings(o,Te);const l=new Pe({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:Te.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});let h=i.db.getRequirements(),u=i.db.getElements(),f=i.db.getRelationships();GF(h,l,o),$F(u,l,o),jF(f,l),$s(l),XF(o,l),f.forEach(function(x){qF(o,x,l,e,i)});const d=Te.rect_padding,p=o.node().getBBox(),m=p.width+d*2,b=p.height+d*2;ni(o,b,m,Te.useMaxWidth),o.attr("viewBox",`${p.x-d} ${p.y-d} ${m} ${b}`)},ZF={draw:KF};var Wu=function(){var t=function(j,W,z,A){for(z=z||{},A=j.length;A--;z[j[A]]=W);return z},e=[1,2],r=[1,3],i=[1,5],n=[1,7],s=[2,5],a=[1,15],o=[1,17],l=[1,19],h=[1,21],u=[1,22],f=[1,23],d=[1,29],p=[1,30],m=[1,31],b=[1,32],x=[1,33],k=[1,34],v=[1,35],B=[1,36],R=[1,37],P=[1,38],V=[1,39],O=[1,40],F=[1,42],C=[1,43],S=[1,45],E=[1,46],_=[1,47],w=[1,48],g=[1,49],D=[1,50],y=[1,53],N=[1,4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,51,52,53,54,56,57,62,63,64,65,73,83],nt=[4,5,21,54,56],Y=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,54,56,57,62,63,64,65,73,83],Z=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,53,54,56,57,62,63,64,65,73,83],J=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,52,54,56,57,62,63,64,65,73,83],X=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,51,54,56,57,62,63,64,65,73,83],tt=[71,72,73],ot=[1,125],at=[1,4,5,7,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,51,52,53,54,56,57,62,63,64,65,73,83],U={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,box_section:11,box_line:12,participant_statement:13,openDirective:14,typeDirective:15,closeDirective:16,":":17,argDirective:18,box:19,restOfLine:20,end:21,signal:22,autonumber:23,NUM:24,off:25,activate:26,actor:27,deactivate:28,note_statement:29,links_statement:30,link_statement:31,properties_statement:32,details_statement:33,title:34,legacy_title:35,acc_title:36,acc_title_value:37,acc_descr:38,acc_descr_value:39,acc_descr_multiline_value:40,loop:41,rect:42,opt:43,alt:44,else_sections:45,par:46,par_sections:47,critical:48,option_sections:49,break:50,option:51,and:52,else:53,participant:54,AS:55,participant_actor:56,note:57,placement:58,text2:59,over:60,actor_pair:61,links:62,link:63,properties:64,details:65,spaceList:66,",":67,left_of:68,right_of:69,signaltype:70,"+":71,"-":72,ACTOR:73,SOLID_OPEN_ARROW:74,DOTTED_OPEN_ARROW:75,SOLID_ARROW:76,DOTTED_ARROW:77,SOLID_CROSS:78,DOTTED_CROSS:79,SOLID_POINT:80,DOTTED_POINT:81,TXT:82,open_directive:83,type_directive:84,arg_directive:85,close_directive:86,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",17:":",19:"box",20:"restOfLine",21:"end",23:"autonumber",24:"NUM",25:"off",26:"activate",28:"deactivate",34:"title",35:"legacy_title",36:"acc_title",37:"acc_title_value",38:"acc_descr",39:"acc_descr_value",40:"acc_descr_multiline_value",41:"loop",42:"rect",43:"opt",44:"alt",46:"par",48:"critical",50:"break",51:"option",52:"and",53:"else",54:"participant",55:"AS",56:"participant_actor",57:"note",60:"over",62:"links",63:"link",64:"properties",65:"details",67:",",68:"left_of",69:"right_of",71:"+",72:"-",73:"ACTOR",74:"SOLID_OPEN_ARROW",75:"DOTTED_OPEN_ARROW",76:"SOLID_ARROW",77:"DOTTED_ARROW",78:"SOLID_CROSS",79:"DOTTED_CROSS",80:"SOLID_POINT",81:"DOTTED_POINT",82:"TXT",83:"open_directive",84:"type_directive",85:"arg_directive",86:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[11,0],[11,2],[12,2],[12,1],[12,1],[6,4],[6,6],[10,1],[10,4],[10,2],[10,4],[10,3],[10,3],[10,2],[10,3],[10,3],[10,2],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,2],[10,2],[10,1],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[49,1],[49,4],[47,1],[47,4],[45,1],[45,4],[13,5],[13,3],[13,5],[13,3],[29,4],[29,4],[30,3],[31,3],[32,3],[33,3],[66,2],[66,1],[61,3],[61,1],[58,1],[58,1],[22,5],[22,5],[22,4],[27,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[59,1],[14,1],[15,1],[18,1],[16,1]],performAction:function(W,z,A,M,q,L,st){var T=L.length-1;switch(q){case 4:return M.apply(L[T]),L[T];case 5:case 10:this.$=[];break;case 6:case 11:L[T-1].push(L[T]),this.$=L[T-1];break;case 7:case 8:case 12:case 13:this.$=L[T];break;case 9:case 14:this.$=[];break;case 18:L[T-1].unshift({type:"boxStart",boxData:M.parseBoxData(L[T-2])}),L[T-1].push({type:"boxEnd",boxText:L[T-2]}),this.$=L[T-1];break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(L[T-2]),sequenceIndexStep:Number(L[T-1]),sequenceVisible:!0,signalType:M.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceIndex:Number(L[T-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:M.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:M.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:M.LINETYPE.AUTONUMBER};break;case 24:this.$={type:"activeStart",signalType:M.LINETYPE.ACTIVE_START,actor:L[T-1]};break;case 25:this.$={type:"activeEnd",signalType:M.LINETYPE.ACTIVE_END,actor:L[T-1]};break;case 31:M.setDiagramTitle(L[T].substring(6)),this.$=L[T].substring(6);break;case 32:M.setDiagramTitle(L[T].substring(7)),this.$=L[T].substring(7);break;case 33:this.$=L[T].trim(),M.setAccTitle(this.$);break;case 34:case 35:this.$=L[T].trim(),M.setAccDescription(this.$);break;case 36:L[T-1].unshift({type:"loopStart",loopText:M.parseMessage(L[T-2]),signalType:M.LINETYPE.LOOP_START}),L[T-1].push({type:"loopEnd",loopText:L[T-2],signalType:M.LINETYPE.LOOP_END}),this.$=L[T-1];break;case 37:L[T-1].unshift({type:"rectStart",color:M.parseMessage(L[T-2]),signalType:M.LINETYPE.RECT_START}),L[T-1].push({type:"rectEnd",color:M.parseMessage(L[T-2]),signalType:M.LINETYPE.RECT_END}),this.$=L[T-1];break;case 38:L[T-1].unshift({type:"optStart",optText:M.parseMessage(L[T-2]),signalType:M.LINETYPE.OPT_START}),L[T-1].push({type:"optEnd",optText:M.parseMessage(L[T-2]),signalType:M.LINETYPE.OPT_END}),this.$=L[T-1];break;case 39:L[T-1].unshift({type:"altStart",altText:M.parseMessage(L[T-2]),signalType:M.LINETYPE.ALT_START}),L[T-1].push({type:"altEnd",signalType:M.LINETYPE.ALT_END}),this.$=L[T-1];break;case 40:L[T-1].unshift({type:"parStart",parText:M.parseMessage(L[T-2]),signalType:M.LINETYPE.PAR_START}),L[T-1].push({type:"parEnd",signalType:M.LINETYPE.PAR_END}),this.$=L[T-1];break;case 41:L[T-1].unshift({type:"criticalStart",criticalText:M.parseMessage(L[T-2]),signalType:M.LINETYPE.CRITICAL_START}),L[T-1].push({type:"criticalEnd",signalType:M.LINETYPE.CRITICAL_END}),this.$=L[T-1];break;case 42:L[T-1].unshift({type:"breakStart",breakText:M.parseMessage(L[T-2]),signalType:M.LINETYPE.BREAK_START}),L[T-1].push({type:"breakEnd",optText:M.parseMessage(L[T-2]),signalType:M.LINETYPE.BREAK_END}),this.$=L[T-1];break;case 45:this.$=L[T-3].concat([{type:"option",optionText:M.parseMessage(L[T-1]),signalType:M.LINETYPE.CRITICAL_OPTION},L[T]]);break;case 47:this.$=L[T-3].concat([{type:"and",parText:M.parseMessage(L[T-1]),signalType:M.LINETYPE.PAR_AND},L[T]]);break;case 49:this.$=L[T-3].concat([{type:"else",altText:M.parseMessage(L[T-1]),signalType:M.LINETYPE.ALT_ELSE},L[T]]);break;case 50:L[T-3].type="addParticipant",L[T-3].description=M.parseMessage(L[T-1]),this.$=L[T-3];break;case 51:L[T-1].type="addParticipant",this.$=L[T-1];break;case 52:L[T-3].type="addActor",L[T-3].description=M.parseMessage(L[T-1]),this.$=L[T-3];break;case 53:L[T-1].type="addActor",this.$=L[T-1];break;case 54:this.$=[L[T-1],{type:"addNote",placement:L[T-2],actor:L[T-1].actor,text:L[T]}];break;case 55:L[T-2]=[].concat(L[T-1],L[T-1]).slice(0,2),L[T-2][0]=L[T-2][0].actor,L[T-2][1]=L[T-2][1].actor,this.$=[L[T-1],{type:"addNote",placement:M.PLACEMENT.OVER,actor:L[T-2].slice(0,2),text:L[T]}];break;case 56:this.$=[L[T-1],{type:"addLinks",actor:L[T-1].actor,text:L[T]}];break;case 57:this.$=[L[T-1],{type:"addALink",actor:L[T-1].actor,text:L[T]}];break;case 58:this.$=[L[T-1],{type:"addProperties",actor:L[T-1].actor,text:L[T]}];break;case 59:this.$=[L[T-1],{type:"addDetails",actor:L[T-1].actor,text:L[T]}];break;case 62:this.$=[L[T-2],L[T]];break;case 63:this.$=L[T];break;case 64:this.$=M.PLACEMENT.LEFTOF;break;case 65:this.$=M.PLACEMENT.RIGHTOF;break;case 66:this.$=[L[T-4],L[T-1],{type:"addMessage",from:L[T-4].actor,to:L[T-1].actor,signalType:L[T-3],msg:L[T]},{type:"activeStart",signalType:M.LINETYPE.ACTIVE_START,actor:L[T-1]}];break;case 67:this.$=[L[T-4],L[T-1],{type:"addMessage",from:L[T-4].actor,to:L[T-1].actor,signalType:L[T-3],msg:L[T]},{type:"activeEnd",signalType:M.LINETYPE.ACTIVE_END,actor:L[T-4]}];break;case 68:this.$=[L[T-3],L[T-1],{type:"addMessage",from:L[T-3].actor,to:L[T-1].actor,signalType:L[T-2],msg:L[T]}];break;case 69:this.$={type:"addParticipant",actor:L[T]};break;case 70:this.$=M.LINETYPE.SOLID_OPEN;break;case 71:this.$=M.LINETYPE.DOTTED_OPEN;break;case 72:this.$=M.LINETYPE.SOLID;break;case 73:this.$=M.LINETYPE.DOTTED;break;case 74:this.$=M.LINETYPE.SOLID_CROSS;break;case 75:this.$=M.LINETYPE.DOTTED_CROSS;break;case 76:this.$=M.LINETYPE.SOLID_POINT;break;case 77:this.$=M.LINETYPE.DOTTED_POINT;break;case 78:this.$=M.parseMessage(L[T].trim().substring(1));break;case 79:M.parseDirective("%%{","open_directive");break;case 80:M.parseDirective(L[T],"type_directive");break;case 81:L[T]=L[T].trim().replace(/'/g,'"'),M.parseDirective(L[T],"arg_directive");break;case 82:M.parseDirective("}%%","close_directive","sequence");break}},table:[{3:1,4:e,5:r,6:4,7:i,14:6,83:n},{1:[3]},{3:8,4:e,5:r,6:4,7:i,14:6,83:n},{3:9,4:e,5:r,6:4,7:i,14:6,83:n},{3:10,4:e,5:r,6:4,7:i,14:6,83:n},t([1,4,5,19,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,54,56,57,62,63,64,65,73,83],s,{8:11}),{15:12,84:[1,13]},{84:[2,79]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,22:20,23:h,26:u,27:44,28:f,29:24,30:25,31:26,32:27,33:28,34:d,35:p,36:m,38:b,40:x,41:k,42:v,43:B,44:R,46:P,48:V,50:O,54:F,56:C,57:S,62:E,63:_,64:w,65:g,73:D,83:n},{16:51,17:[1,52],86:y},t([17,86],[2,80]),t(N,[2,6]),{6:41,10:54,13:18,14:6,19:l,22:20,23:h,26:u,27:44,28:f,29:24,30:25,31:26,32:27,33:28,34:d,35:p,36:m,38:b,40:x,41:k,42:v,43:B,44:R,46:P,48:V,50:O,54:F,56:C,57:S,62:E,63:_,64:w,65:g,73:D,83:n},t(N,[2,8]),t(N,[2,9]),t(N,[2,17]),{20:[1,55]},{5:[1,56]},{5:[1,59],24:[1,57],25:[1,58]},{27:60,73:D},{27:61,73:D},{5:[1,62]},{5:[1,63]},{5:[1,64]},{5:[1,65]},{5:[1,66]},t(N,[2,31]),t(N,[2,32]),{37:[1,67]},{39:[1,68]},t(N,[2,35]),{20:[1,69]},{20:[1,70]},{20:[1,71]},{20:[1,72]},{20:[1,73]},{20:[1,74]},{20:[1,75]},t(N,[2,43]),{27:76,73:D},{27:77,73:D},{70:78,74:[1,79],75:[1,80],76:[1,81],77:[1,82],78:[1,83],79:[1,84],80:[1,85],81:[1,86]},{58:87,60:[1,88],68:[1,89],69:[1,90]},{27:91,73:D},{27:92,73:D},{27:93,73:D},{27:94,73:D},t([5,55,67,74,75,76,77,78,79,80,81,82],[2,69]),{5:[1,95]},{18:96,85:[1,97]},{5:[2,82]},t(N,[2,7]),t(nt,[2,10],{11:98}),t(N,[2,19]),{5:[1,100],24:[1,99]},{5:[1,101]},t(N,[2,23]),{5:[1,102]},{5:[1,103]},t(N,[2,26]),t(N,[2,27]),t(N,[2,28]),t(N,[2,29]),t(N,[2,30]),t(N,[2,33]),t(N,[2,34]),t(Y,s,{8:104}),t(Y,s,{8:105}),t(Y,s,{8:106}),t(Z,s,{45:107,8:108}),t(J,s,{47:109,8:110}),t(X,s,{49:111,8:112}),t(Y,s,{8:113}),{5:[1,115],55:[1,114]},{5:[1,117],55:[1,116]},{27:120,71:[1,118],72:[1,119],73:D},t(tt,[2,70]),t(tt,[2,71]),t(tt,[2,72]),t(tt,[2,73]),t(tt,[2,74]),t(tt,[2,75]),t(tt,[2,76]),t(tt,[2,77]),{27:121,73:D},{27:123,61:122,73:D},{73:[2,64]},{73:[2,65]},{59:124,82:ot},{59:126,82:ot},{59:127,82:ot},{59:128,82:ot},t(at,[2,15]),{16:129,86:y},{86:[2,81]},{4:[1,132],5:[1,134],12:131,13:133,21:[1,130],54:F,56:C},{5:[1,135]},t(N,[2,21]),t(N,[2,22]),t(N,[2,24]),t(N,[2,25]),{4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,21:[1,136],22:20,23:h,26:u,27:44,28:f,29:24,30:25,31:26,32:27,33:28,34:d,35:p,36:m,38:b,40:x,41:k,42:v,43:B,44:R,46:P,48:V,50:O,54:F,56:C,57:S,62:E,63:_,64:w,65:g,73:D,83:n},{4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,21:[1,137],22:20,23:h,26:u,27:44,28:f,29:24,30:25,31:26,32:27,33:28,34:d,35:p,36:m,38:b,40:x,41:k,42:v,43:B,44:R,46:P,48:V,50:O,54:F,56:C,57:S,62:E,63:_,64:w,65:g,73:D,83:n},{4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,21:[1,138],22:20,23:h,26:u,27:44,28:f,29:24,30:25,31:26,32:27,33:28,34:d,35:p,36:m,38:b,40:x,41:k,42:v,43:B,44:R,46:P,48:V,50:O,54:F,56:C,57:S,62:E,63:_,64:w,65:g,73:D,83:n},{21:[1,139]},{4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,21:[2,48],22:20,23:h,26:u,27:44,28:f,29:24,30:25,31:26,32:27,33:28,34:d,35:p,36:m,38:b,40:x,41:k,42:v,43:B,44:R,46:P,48:V,50:O,53:[1,140],54:F,56:C,57:S,62:E,63:_,64:w,65:g,73:D,83:n},{21:[1,141]},{4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,21:[2,46],22:20,23:h,26:u,27:44,28:f,29:24,30:25,31:26,32:27,33:28,34:d,35:p,36:m,38:b,40:x,41:k,42:v,43:B,44:R,46:P,48:V,50:O,52:[1,142],54:F,56:C,57:S,62:E,63:_,64:w,65:g,73:D,83:n},{21:[1,143]},{4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,21:[2,44],22:20,23:h,26:u,27:44,28:f,29:24,30:25,31:26,32:27,33:28,34:d,35:p,36:m,38:b,40:x,41:k,42:v,43:B,44:R,46:P,48:V,50:O,51:[1,144],54:F,56:C,57:S,62:E,63:_,64:w,65:g,73:D,83:n},{4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,21:[1,145],22:20,23:h,26:u,27:44,28:f,29:24,30:25,31:26,32:27,33:28,34:d,35:p,36:m,38:b,40:x,41:k,42:v,43:B,44:R,46:P,48:V,50:O,54:F,56:C,57:S,62:E,63:_,64:w,65:g,73:D,83:n},{20:[1,146]},t(N,[2,51]),{20:[1,147]},t(N,[2,53]),{27:148,73:D},{27:149,73:D},{59:150,82:ot},{59:151,82:ot},{59:152,82:ot},{67:[1,153],82:[2,63]},{5:[2,56]},{5:[2,78]},{5:[2,57]},{5:[2,58]},{5:[2,59]},{5:[1,154]},t(N,[2,18]),t(nt,[2,11]),{13:155,54:F,56:C},t(nt,[2,13]),t(nt,[2,14]),t(N,[2,20]),t(N,[2,36]),t(N,[2,37]),t(N,[2,38]),t(N,[2,39]),{20:[1,156]},t(N,[2,40]),{20:[1,157]},t(N,[2,41]),{20:[1,158]},t(N,[2,42]),{5:[1,159]},{5:[1,160]},{59:161,82:ot},{59:162,82:ot},{5:[2,68]},{5:[2,54]},{5:[2,55]},{27:163,73:D},t(at,[2,16]),t(nt,[2,12]),t(Z,s,{8:108,45:164}),t(J,s,{8:110,47:165}),t(X,s,{8:112,49:166}),t(N,[2,50]),t(N,[2,52]),{5:[2,66]},{5:[2,67]},{82:[2,62]},{21:[2,49]},{21:[2,47]},{21:[2,45]}],defaultActions:{7:[2,79],8:[2,1],9:[2,2],10:[2,3],53:[2,82],89:[2,64],90:[2,65],97:[2,81],124:[2,56],125:[2,78],126:[2,57],127:[2,58],128:[2,59],150:[2,68],151:[2,54],152:[2,55],161:[2,66],162:[2,67],163:[2,62],164:[2,49],165:[2,47],166:[2,45]},parseError:function(W,z){if(z.recoverable)this.trace(W);else{var A=new Error(W);throw A.hash=z,A}},parse:function(W){var z=this,A=[0],M=[],q=[null],L=[],st=this.table,T="",Dt=0,et=0,Et=2,vt=1,pt=L.slice.call(arguments,1),ut=Object.create(this.lexer),gt={yy:{}};for(var ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ht)&&(gt.yy[ht]=this.yy[ht]);ut.setInput(W,gt.yy),gt.yy.lexer=ut,gt.yy.parser=this,typeof ut.yylloc>"u"&&(ut.yylloc={});var yt=ut.yylloc;L.push(yt);var he=ut.options&&ut.options.ranges;typeof gt.yy.parseError=="function"?this.parseError=gt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function re(){var ft;return ft=M.pop()||ut.lex()||vt,typeof ft!="number"&&(ft instanceof Array&&(M=ft,ft=M.pop()),ft=z.symbols_[ft]||ft),ft}for(var Mt,Nt,Kt,fe,qt={},Ft,Bt,bt,mt;;){if(Nt=A[A.length-1],this.defaultActions[Nt]?Kt=this.defaultActions[Nt]:((Mt===null||typeof Mt>"u")&&(Mt=re()),Kt=st[Nt]&&st[Nt][Mt]),typeof Kt>"u"||!Kt.length||!Kt[0]){var wt="";mt=[];for(Ft in st[Nt])this.terminals_[Ft]&&Ft>Et&&mt.push("'"+this.terminals_[Ft]+"'");ut.showPosition?wt="Parse error on line "+(Dt+1)+`:
1257
1257
  `+ut.showPosition()+`
1258
1258
  Expecting `+mt.join(", ")+", got '"+(this.terminals_[Mt]||Mt)+"'":wt="Parse error on line "+(Dt+1)+": Unexpected "+(Mt==vt?"end of input":"'"+(this.terminals_[Mt]||Mt)+"'"),this.parseError(wt,{text:ut.match,token:this.terminals_[Mt]||Mt,line:ut.yylineno,loc:yt,expected:mt})}if(Kt[0]instanceof Array&&Kt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Nt+", token: "+Mt);switch(Kt[0]){case 1:A.push(Mt),q.push(ut.yytext),L.push(ut.yylloc),A.push(Kt[1]),Mt=null,et=ut.yyleng,T=ut.yytext,Dt=ut.yylineno,yt=ut.yylloc;break;case 2:if(Bt=this.productions_[Kt[1]][1],qt.$=q[q.length-Bt],qt._$={first_line:L[L.length-(Bt||1)].first_line,last_line:L[L.length-1].last_line,first_column:L[L.length-(Bt||1)].first_column,last_column:L[L.length-1].last_column},he&&(qt._$.range=[L[L.length-(Bt||1)].range[0],L[L.length-1].range[1]]),fe=this.performAction.apply(qt,[T,et,Dt,gt.yy,Kt[1],q,L].concat(pt)),typeof fe<"u")return fe;Bt&&(A=A.slice(0,-1*Bt*2),q=q.slice(0,-1*Bt),L=L.slice(0,-1*Bt)),A.push(this.productions_[Kt[1]][0]),q.push(qt.$),L.push(qt._$),bt=st[A[A.length-2]][A[A.length-1]],A.push(bt);break;case 3:return!0}}return!0}},Tt=function(){var j={EOF:1,parseError:function(z,A){if(this.yy.parser)this.yy.parser.parseError(z,A);else throw new Error(z)},setInput:function(W,z){return this.yy=z||this.yy||{},this._input=W,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},input:function(){var W=this._input[0];this.yytext+=W,this.yyleng++,this.offset++,this.match+=W,this.matched+=W;var z=W.match(/(?:\r\n?|\n).*/g);return z?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),W},unput:function(W){var z=W.length,A=W.split(/(?:\r\n?|\n)/g);this._input=W+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-z),this.offset-=z;var M=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),A.length-1&&(this.yylineno-=A.length-1);var q=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:A?(A.length===M.length?this.yylloc.first_column:0)+M[M.length-A.length].length-A[0].length:this.yylloc.first_column-z},this.options.ranges&&(this.yylloc.range=[q[0],q[0]+this.yyleng-z]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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).
1259
1259
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(W){this.unput(this.match.slice(W))},pastInput:function(){var W=this.matched.substr(0,this.matched.length-this.match.length);return(W.length>20?"...":"")+W.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var W=this.match;return W.length<20&&(W+=this._input.substr(0,20-W.length)),(W.substr(0,20)+(W.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var W=this.pastInput(),z=new Array(W.length+1).join("-");return W+this.upcomingInput()+`
1260
1260
  `+z+"^"},test_match:function(W,z){var A,M,q;if(this.options.backtrack_lexer&&(q={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&&(q.yylloc.range=this.yylloc.range.slice(0))),M=W[0].match(/(?:\r\n?|\n).*/g),M&&(this.yylineno+=M.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:M?M[M.length-1].length-M[M.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+W[0].length},this.yytext+=W[0],this.match+=W[0],this.matches=W,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(W[0].length),this.matched+=W[0],A=this.performAction.call(this,this.yy,this,z,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),A)return A;if(this._backtrack){for(var L in q)this[L]=q[L];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var W,z,A,M;this._more||(this.yytext="",this.match="");for(var q=this._currentRules(),L=0;L<q.length;L++)if(A=this._input.match(this.rules[q[L]]),A&&(!z||A[0].length>z[0].length)){if(z=A,M=L,this.options.backtrack_lexer){if(W=this.test_match(A,q[L]),W!==!1)return W;if(this._backtrack){z=!1;continue}else return!1}else if(!this.options.flex)break}return z?(W=this.test_match(z,q[M]),W!==!1?W:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1261
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var z=this.next();return z||this.lex()},begin:function(z){this.conditionStack.push(z)},popState:function(){var z=this.conditionStack.length-1;return z>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(z){return z=this.conditionStack.length-1-Math.abs(z||0),z>=0?this.conditionStack[z]:"INITIAL"},pushState:function(z){this.begin(z)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(z,A,M,q){switch(M){case 0:return this.begin("open_directive"),83;case 1:return this.begin("type_directive"),84;case 2:return this.popState(),this.begin("arg_directive"),17;case 3:return this.popState(),this.popState(),86;case 4:return 85;case 5:return 5;case 6:break;case 7:break;case 8:break;case 9:break;case 10:break;case 11:return 24;case 12:return this.begin("LINE"),19;case 13:return this.begin("ID"),54;case 14:return this.begin("ID"),56;case 15:return A.yytext=A.yytext.trim(),this.begin("ALIAS"),73;case 16:return this.popState(),this.popState(),this.begin("LINE"),55;case 17:return this.popState(),this.popState(),5;case 18:return this.begin("LINE"),41;case 19:return this.begin("LINE"),42;case 20:return this.begin("LINE"),43;case 21:return this.begin("LINE"),44;case 22:return this.begin("LINE"),53;case 23:return this.begin("LINE"),46;case 24:return this.begin("LINE"),52;case 25:return this.begin("LINE"),48;case 26:return this.begin("LINE"),51;case 27:return this.begin("LINE"),50;case 28:return this.popState(),20;case 29:return 21;case 30:return 68;case 31:return 69;case 32:return 62;case 33:return 63;case 34:return 64;case 35:return 65;case 36:return 60;case 37:return 57;case 38:return this.begin("ID"),26;case 39:return this.begin("ID"),28;case 40:return 34;case 41:return 35;case 42:return this.begin("acc_title"),36;case 43:return this.popState(),"acc_title_value";case 44:return this.begin("acc_descr"),38;case 45:return this.popState(),"acc_descr_value";case 46:this.begin("acc_descr_multiline");break;case 47:this.popState();break;case 48:return"acc_descr_multiline_value";case 49:return 7;case 50:return 23;case 51:return 25;case 52:return 67;case 53:return 5;case 54:return A.yytext=A.yytext.trim(),73;case 55:return 76;case 56:return 77;case 57:return 74;case 58:return 75;case 59:return 78;case 60:return 79;case 61:return 80;case 62:return 81;case 63:return 82;case 64:return 71;case 65:return 72;case 66:return 5;case 67:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[47,48],inclusive:!1},acc_descr:{rules:[45],inclusive:!1},acc_title:{rules:[43],inclusive:!1},open_directive:{rules:[1,8],inclusive:!1},type_directive:{rules:[2,3,8],inclusive:!1},arg_directive:{rules:[3,4,8],inclusive:!1},ID:{rules:[7,8,15],inclusive:!1},ALIAS:{rules:[7,8,16,17],inclusive:!1},LINE:{rules:[7,8,28],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,12,13,14,18,19,20,21,22,23,24,25,26,27,29,30,31,32,33,34,35,36,37,38,39,40,41,42,44,46,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}};return j}();U.lexer=Tt;function $(){this.yy={}}return $.prototype=U,U.Parser=$,new $}();Wu.parser=Wu;const ZF=Wu,QF=t=>t.match(/^\s*sequenceDiagram/)!==null;let oa,sn={},Ps=[],$r=[],qc=!1,Hu,Mi;const JF=function(t,e,r){xe.parseDirective(this,t,e,r)},tP=function(t){Ps.push({name:t.text,wrap:t.wrap===void 0&&Un()||!!t.wrap,fill:t.color,actorKeys:[]}),Mi=Ps.slice(-1)[0]},qu=function(t,e,r,i){let n=Mi;const s=sn[t];if(s){if(Mi&&s.box&&Mi!==s.box)throw new Error("A same participant should only be defined in one Box: "+s.name+" can't be in '"+s.box.name+"' and in '"+Mi.name+"' at the same time.");if(n=s.box?s.box:Mi,s.box=n,s&&e===s.name&&r==null)return}(r==null||r.text==null)&&(r={text:e,wrap:null,type:i}),(i==null||r.text==null)&&(r={text:e,wrap:null,type:i}),sn[t]={box:n,name:e,description:r.text,wrap:r.wrap===void 0&&Un()||!!r.wrap,prevActor:oa,links:{},properties:{},actorCnt:null,rectData:null,type:i||"participant"},oa&&sn[oa]&&(sn[oa].nextActor=t),Mi&&Mi.actorKeys.push(t),oa=t},eP=t=>{let e,r=0;for(e=0;e<$r.length;e++)$r[e].type===Za.ACTIVE_START&&$r[e].from.actor===t&&r++,$r[e].type===Za.ACTIVE_END&&$r[e].from.actor===t&&r--;return r},rP=function(t,e,r,i){$r.push({from:t,to:e,message:r.text,wrap:r.wrap===void 0&&Un()||!!r.wrap,answer:i})},Ae=function(t,e,r={text:void 0,wrap:void 0},i){if(i===Za.ACTIVE_END&&eP(t.actor)<1){let s=new Error("Trying to inactivate an inactive participant ("+t.actor+")");throw s.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},s}return $r.push({from:t,to:e,message:r.text,wrap:r.wrap===void 0&&Un()||!!r.wrap,type:i}),!0},iP=function(){return Ps.length>0},nP=function(){return Ps.some(t=>t.name)},sP=function(){return $r},aP=function(){return Ps},oP=function(){return sn},mo=function(t){return sn[t]},lP=function(){return Object.keys(sn)},cP=function(){qc=!0},hP=function(){qc=!1},uP=()=>qc,fP=function(t){Hu=t},Un=()=>Hu!==void 0?Hu:G().sequence.wrap,dP=function(){sn={},Ps=[],$r=[],qc=!1,Lr()},pP=function(t){const e=t.trim(),r={text:e.replace(/^:?(?:no)?wrap:/,"").trim(),wrap:e.match(/^:?wrap:/)!==null?!0:e.match(/^:?nowrap:/)!==null?!1:void 0};return I.debug("parseMessage:",r),r},gP=function(t){const e=t.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/);let r=e!=null&&e[1]?e[1].trim():"transparent",i=e!=null&&e[2]?e[2].trim():void 0;if(window&&window.CSS)window.CSS.supports("color",r)||(r="transparent",i=t.trim());else{const s=new Option().style;s.color=r,s.color!==r&&(r="transparent",i=t.trim())}return{color:r,text:i!==void 0?Ur(i.replace(/^:?(?:no)?wrap:/,""),G()):void 0,wrap:i!==void 0?i.match(/^:?wrap:/)!==null?!0:i.match(/^:?nowrap:/)!==null?!1:void 0:void 0}},Za={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31},yP={FILLED:0,OPEN:1},mP={LEFTOF:0,RIGHTOF:1,OVER:2},m3=function(t,e,r){r.text,r.wrap===void 0&&Un()||r.wrap;const i=[].concat(t,t);$r.push({from:i[0],to:i[1],message:r.text,wrap:r.wrap===void 0&&Un()||!!r.wrap,type:Za.NOTE,placement:e})},b3=function(t,e){const r=mo(t);try{let i=Ur(e.text,G());i=i.replace(/&amp;/g,"&"),i=i.replace(/&equals;/g,"=");const n=JSON.parse(i);b0(r,n)}catch(i){I.error("error while parsing actor link text",i)}},bP=function(t,e){const r=mo(t);try{const a={};let o=Ur(e.text,G());var i=o.indexOf("@");o=o.replace(/&amp;/g,"&"),o=o.replace(/&equals;/g,"=");var n=o.slice(0,i-1).trim(),s=o.slice(i+1).trim();a[n]=s,b0(r,a)}catch(a){I.error("error while parsing actor link text",a)}};function b0(t,e){if(t.links==null)t.links=e;else for(let r in e)t.links[r]=e[r]}const _3=function(t,e){const r=mo(t);try{let i=Ur(e.text,G());const n=JSON.parse(i);x3(r,n)}catch(i){I.error("error while parsing actor properties text",i)}};function x3(t,e){if(t.properties==null)t.properties=e;else for(let r in e)t.properties[r]=e[r]}function _P(){Mi=void 0}const v3=function(t,e){const r=mo(t),i=document.getElementById(e.text);try{const n=i.innerHTML,s=JSON.parse(n);s.properties&&x3(r,s.properties),s.links&&b0(r,s.links)}catch(n){I.error("error while parsing actor details text",n)}},xP=function(t,e){if(t!==void 0&&t.properties!==void 0)return t.properties[e]},k3=function(t){if(Array.isArray(t))t.forEach(function(e){k3(e)});else switch(t.type){case"sequenceIndex":$r.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":qu(t.actor,t.actor,t.description,"participant");break;case"addActor":qu(t.actor,t.actor,t.description,"actor");break;case"activeStart":Ae(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":Ae(t.actor,void 0,void 0,t.signalType);break;case"addNote":m3(t.actor,t.placement,t.text);break;case"addLinks":b3(t.actor,t.text);break;case"addALink":bP(t.actor,t.text);break;case"addProperties":_3(t.actor,t.text);break;case"addDetails":v3(t.actor,t.text);break;case"addMessage":Ae(t.from,t.to,t.msg,t.signalType);break;case"boxStart":tP(t.boxData);break;case"boxEnd":_P();break;case"loopStart":Ae(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":Ae(void 0,void 0,void 0,t.signalType);break;case"rectStart":Ae(void 0,void 0,t.color,t.signalType);break;case"rectEnd":Ae(void 0,void 0,void 0,t.signalType);break;case"optStart":Ae(void 0,void 0,t.optText,t.signalType);break;case"optEnd":Ae(void 0,void 0,void 0,t.signalType);break;case"altStart":Ae(void 0,void 0,t.altText,t.signalType);break;case"else":Ae(void 0,void 0,t.altText,t.signalType);break;case"altEnd":Ae(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":kr(t.text);break;case"parStart":Ae(void 0,void 0,t.parText,t.signalType);break;case"and":Ae(void 0,void 0,t.parText,t.signalType);break;case"parEnd":Ae(void 0,void 0,void 0,t.signalType);break;case"criticalStart":Ae(void 0,void 0,t.criticalText,t.signalType);break;case"option":Ae(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":Ae(void 0,void 0,void 0,t.signalType);break;case"breakStart":Ae(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":Ae(void 0,void 0,void 0,t.signalType);break}},Qd={addActor:qu,addMessage:rP,addSignal:Ae,addLinks:b3,addDetails:v3,addProperties:_3,autoWrap:Un,setWrap:fP,enableSequenceNumbers:cP,disableSequenceNumbers:hP,showSequenceNumbers:uP,getMessages:sP,getActors:oP,getActor:mo,getActorKeys:lP,getActorProperty:xP,getAccTitle:Br,getBoxes:aP,getDiagramTitle:ai,setDiagramTitle:si,parseDirective:JF,getConfig:()=>G().sequence,clear:dP,parseMessage:pP,parseBoxData:gP,LINETYPE:Za,ARROWTYPE:yP,PLACEMENT:mP,addNote:m3,setAccTitle:kr,apply:k3,setAccDescription:Dr,getAccDescription:Ir,hasAtLeastOneBox:iP,hasAtLeastOneBoxWithTitle:nP};let Gu=[];const vP=t=>{Gu.push(t)},w3=()=>{Gu.forEach(t=>{t()}),Gu=[]},Gc=function(t,e){const r=t.append("rect");return r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),e.class!==void 0&&r.attr("class",e.class),r},T3=(t,e)=>{vP(()=>{const r=document.querySelectorAll(t);r.length!==0&&(r[0].addEventListener("mouseover",function(){EP("actor"+e+"_popup")}),r[0].addEventListener("mouseout",function(){CP("actor"+e+"_popup")}))})},kP=function(t,e,r,i,n){if(e.links===void 0||e.links===null||Object.keys(e.links).length===0)return{height:0,width:0};const s=e.links,a=e.actorCnt,o=e.rectData;var l="none";n&&(l="block !important");const h=t.append("g");h.attr("id","actor"+a+"_popup"),h.attr("class","actorPopupMenu"),h.attr("display",l),T3("#actor"+a+"_popup",a);var u="";o.class!==void 0&&(u=" "+o.class);let f=o.width>r?o.width:r;const d=h.append("rect");if(d.attr("class","actorPopupMenuPanel"+u),d.attr("x",o.x),d.attr("y",o.height),d.attr("fill",o.fill),d.attr("stroke",o.stroke),d.attr("width",f),d.attr("height",o.height),d.attr("rx",o.rx),d.attr("ry",o.ry),s!=null){var p=20;for(let x in s){var m=h.append("a"),b=Ki(s[x]);m.attr("xlink:href",b),m.attr("target","_blank"),zP(i)(x,m,o.x+10,o.height+p,f,20,{class:"actor"},i),p+=30}}return d.attr("height",p),{height:o.height+p,width:f}},E3=function(t,e,r,i){const n=t.append("image");n.attr("x",e),n.attr("y",r);var s=Ki(i);n.attr("xlink:href",s)},C3=function(t,e,r,i){const n=t.append("use");n.attr("x",e),n.attr("y",r);var s=Ki(i);n.attr("xlink:href","#"+s)},wP=function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = 'block'; }"},TP=function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = 'none'; }"},EP=function(t){var e=document.getElementById(t);e!=null&&(e.style.display="block")},CP=function(t){var e=document.getElementById(t);e!=null&&(e.style.display="none")},Vs=function(t,e){let r=0,i=0;const n=e.text.split(Xt.lineBreakRegex),[s,a]=co(e.fontSize);let o=[],l=0,h=()=>e.y;if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)switch(e.valign){case"top":case"start":h=()=>Math.round(e.y+e.textMargin);break;case"middle":case"center":h=()=>Math.round(e.y+(r+i+e.textMargin)/2);break;case"bottom":case"end":h=()=>Math.round(e.y+(r+i+2*e.textMargin)-e.textMargin);break}if(e.anchor!==void 0&&e.textMargin!==void 0&&e.width!==void 0)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle";break}for(let[u,f]of n.entries()){e.textMargin!==void 0&&e.textMargin===0&&s!==void 0&&(l=u*s);const d=t.append("text");if(d.attr("x",e.x),d.attr("y",h()),e.anchor!==void 0&&d.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),e.fontFamily!==void 0&&d.style("font-family",e.fontFamily),a!==void 0&&d.style("font-size",a),e.fontWeight!==void 0&&d.style("font-weight",e.fontWeight),e.fill!==void 0&&d.attr("fill",e.fill),e.class!==void 0&&d.attr("class",e.class),e.dy!==void 0?d.attr("dy",e.dy):l!==0&&d.attr("dy",l),e.tspan){const p=d.append("tspan");p.attr("x",e.x),e.fill!==void 0&&p.attr("fill",e.fill),p.text(f)}else d.text(f);e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0&&(i+=(d._groups||d)[0][0].getBBox().height,r=i),o.push(d)}return o},S3=function(t,e){function r(n,s,a,o,l){return n+","+s+" "+(n+a)+","+s+" "+(n+a)+","+(s+o-l)+" "+(n+a-l*1.2)+","+(s+o)+" "+n+","+(s+o)}const i=t.append("polygon");return i.attr("points",r(e.x,e.y,e.width,e.height,7)),i.attr("class","labelBox"),e.y=e.y+e.height/2,Vs(t,e),i};let ui=-1;const A3=(t,e)=>{t.selectAll&&t.selectAll(".actor-line").attr("class","200").attr("y2",e-55)},SP=function(t,e,r,i){const n=e.x+e.width/2,s=e.y+5,a=t.append("g");var o=a;i||(ui++,o.append("line").attr("id","actor"+ui).attr("x1",n).attr("y1",s).attr("x2",n).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"),o=a.append("g"),e.actorCnt=ui,e.links!=null&&(o.attr("id","root-"+ui),T3("#root-"+ui,ui)));const l=$c();var h="actor";e.properties!=null&&e.properties.class?h=e.properties.class:l.fill="#eaeaea",l.x=e.x,l.y=e.y,l.width=e.width,l.height=e.height,l.class=h,l.rx=3,l.ry=3;const u=Gc(o,l);if(e.rectData=l,e.properties!=null&&e.properties.icon){const d=e.properties.icon.trim();d.charAt(0)==="@"?C3(o,l.x+l.width-20,l.y+10,d.substr(1)):E3(o,l.x+l.width-20,l.y+10,d)}_0(r)(e.description,o,l.x,l.y,l.width,l.height,{class:"actor"},r);let f=e.height;if(u.node){const d=u.node().getBBox();e.height=d.height,f=d.height}return f},AP=function(t,e,r,i){const n=e.x+e.width/2,s=e.y+80;i||(ui++,t.append("line").attr("id","actor"+ui).attr("x1",n).attr("y1",s).attr("x2",n).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));const a=t.append("g");a.attr("class","actor-man");const o=$c();o.x=e.x,o.y=e.y,o.fill="#eaeaea",o.width=e.width,o.height=e.height,o.class="actor",o.rx=3,o.ry=3,a.append("line").attr("id","actor-man-torso"+ui).attr("x1",n).attr("y1",e.y+25).attr("x2",n).attr("y2",e.y+45),a.append("line").attr("id","actor-man-arms"+ui).attr("x1",n-18).attr("y1",e.y+33).attr("x2",n+18).attr("y2",e.y+33),a.append("line").attr("x1",n-18).attr("y1",e.y+60).attr("x2",n).attr("y2",e.y+45),a.append("line").attr("x1",n).attr("y1",e.y+45).attr("x2",n+16).attr("y2",e.y+60);const l=a.append("circle");l.attr("cx",e.x+e.width/2),l.attr("cy",e.y+10),l.attr("r",15),l.attr("width",e.width),l.attr("height",e.height);const h=a.node().getBBox();return e.height=h.height,_0(r)(e.description,a,o.x,o.y+35,o.width,o.height,{class:"actor"},r),e.height},LP=function(t,e,r,i){switch(e.type){case"actor":return AP(t,e,r,i);case"participant":return SP(t,e,r,i)}},BP=function(t,e,r){const n=t.append("g");L3(n,e),e.name&&_0(r)(e.name,n,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},r),n.lower()},DP=function(t){return t.append("g")},IP=function(t,e,r,i,n){const s=$c(),a=e.anchored;s.x=e.startx,s.y=e.starty,s.class="activation"+n%3,s.width=e.stopx-e.startx,s.height=r-e.starty,Gc(a,s)},MP=function(t,e,r,i){const{boxMargin:n,boxTextMargin:s,labelBoxHeight:a,labelBoxWidth:o,messageFontFamily:l,messageFontSize:h,messageFontWeight:u}=i,f=t.append("g"),d=function(b,x,k,v){return f.append("line").attr("x1",b).attr("y1",x).attr("x2",k).attr("y2",v).attr("class","loopLine")};d(e.startx,e.starty,e.stopx,e.starty),d(e.stopx,e.starty,e.stopx,e.stopy),d(e.startx,e.stopy,e.stopx,e.stopy),d(e.startx,e.starty,e.startx,e.stopy),e.sections!==void 0&&e.sections.forEach(function(b){d(e.startx,b.y,e.stopx,b.y).style("stroke-dasharray","3, 3")});let p=$u();p.text=r,p.x=e.startx,p.y=e.starty,p.fontFamily=l,p.fontSize=h,p.fontWeight=u,p.anchor="middle",p.valign="middle",p.tspan=!1,p.width=o||50,p.height=a||20,p.textMargin=s,p.class="labelText",S3(f,p),p=$u(),p.text=e.title,p.x=e.startx+o/2+(e.stopx-e.startx)/2,p.y=e.starty+n+s,p.anchor="middle",p.valign="middle",p.textMargin=s,p.class="loopText",p.fontFamily=l,p.fontSize=h,p.fontWeight=u,p.wrap=!0;let m=Vs(f,p);return e.sectionTitles!==void 0&&e.sectionTitles.forEach(function(b,x){if(b.message){p.text=b.message,p.x=e.startx+(e.stopx-e.startx)/2,p.y=e.sections[x].y+n+s,p.class="loopText",p.anchor="middle",p.valign="middle",p.tspan=!1,p.fontFamily=l,p.fontSize=h,p.fontWeight=u,p.wrap=e.wrap,m=Vs(f,p);let k=Math.round(m.map(v=>(v._groups||v)[0][0].getBBox().height).reduce((v,B)=>v+B));e.sections[x].height+=k-(n+s)}}),e.height=Math.round(e.stopy-e.starty),f},L3=function(t,e){Gc(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},NP=function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},RP=function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},OP=function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},FP=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},PP=function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},VP=function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},YP=function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},$u=function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},$c=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},_0=function(){function t(n,s,a,o,l,h,u){const f=s.append("text").attr("x",a+l/2).attr("y",o+h/2+5).style("text-anchor","middle").text(n);i(f,u)}function e(n,s,a,o,l,h,u,f){const{actorFontSize:d,actorFontFamily:p,actorFontWeight:m}=f,[b,x]=co(d),k=n.split(Xt.lineBreakRegex);for(let v=0;v<k.length;v++){const B=v*b-b*(k.length-1)/2,R=s.append("text").attr("x",a+l/2).attr("y",o).style("text-anchor","middle").style("font-size",x).style("font-weight",m).style("font-family",p);R.append("tspan").attr("x",a+l/2).attr("dy",B).text(k[v]),R.attr("y",o+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(R,u)}}function r(n,s,a,o,l,h,u,f){const d=s.append("switch"),m=d.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",h).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");m.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,d,a,o,l,h,u,f),i(m,u)}function i(n,s){for(const a in s)s.hasOwnProperty(a)&&n.attr(a,s[a])}return function(n){return n.textPlacement==="fo"?r:n.textPlacement==="old"?t:e}}(),zP=function(){function t(n,s,a,o,l,h,u){const f=s.append("text").attr("x",a).attr("y",o).style("text-anchor","start").text(n);i(f,u)}function e(n,s,a,o,l,h,u,f){const{actorFontSize:d,actorFontFamily:p,actorFontWeight:m}=f,b=n.split(Xt.lineBreakRegex);for(let x=0;x<b.length;x++){const k=x*d-d*(b.length-1)/2,v=s.append("text").attr("x",a).attr("y",o).style("text-anchor","start").style("font-size",d).style("font-weight",m).style("font-family",p);v.append("tspan").attr("x",a).attr("dy",k).text(b[x]),v.attr("y",o+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(v,u)}}function r(n,s,a,o,l,h,u,f){const d=s.append("switch"),m=d.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",h).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");m.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,d,a,o,l,h,u,f),i(m,u)}function i(n,s){for(const a in s)s.hasOwnProperty(a)&&n.attr(a,s[a])}return function(n){return n.textPlacement==="fo"?r:n.textPlacement==="old"?t:e}}(),ke={drawRect:Gc,drawText:Vs,drawLabel:S3,drawActor:LP,drawBox:BP,drawPopup:kP,drawImage:E3,drawEmbeddedImage:C3,anchorElement:DP,drawActivation:IP,drawLoop:MP,drawBackgroundRect:L3,insertArrowHead:FP,insertArrowFilledHead:PP,insertSequenceNumber:VP,insertArrowCrossHead:YP,insertDatabaseIcon:NP,insertComputerIcon:RP,insertClockIcon:OP,getTextObj:$u,getNoteRect:$c,popupMenu:wP,popdownMenu:TP,fixLifeLineHeights:A3,sanitizeUrl:Ki};let rt={};const kt={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(t=>t.height||0))+(this.loops.length===0?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.messages.length===0?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.notes.length===0?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},clear:function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},addBox:function(t){this.boxes.push(t)},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],boxes:[],loops:[],messages:[],notes:[]},init:function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,D3(G())},updateVal:function(t,e,r,i){t[e]===void 0?t[e]=r:t[e]=i(r,t[e])},updateBounds:function(t,e,r,i){const n=this;let s=0;function a(o){return function(h){s++;const u=n.sequenceItems.length-s+1;n.updateVal(h,"starty",e-u*rt.boxMargin,Math.min),n.updateVal(h,"stopy",i+u*rt.boxMargin,Math.max),n.updateVal(kt.data,"startx",t-u*rt.boxMargin,Math.min),n.updateVal(kt.data,"stopx",r+u*rt.boxMargin,Math.max),o!=="activation"&&(n.updateVal(h,"startx",t-u*rt.boxMargin,Math.min),n.updateVal(h,"stopx",r+u*rt.boxMargin,Math.max),n.updateVal(kt.data,"starty",e-u*rt.boxMargin,Math.min),n.updateVal(kt.data,"stopy",i+u*rt.boxMargin,Math.max))}}this.sequenceItems.forEach(a()),this.activations.forEach(a("activation"))},insert:function(t,e,r,i){const n=Math.min(t,r),s=Math.max(t,r),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(kt.data,"startx",n,Math.min),this.updateVal(kt.data,"starty",a,Math.min),this.updateVal(kt.data,"stopx",s,Math.max),this.updateVal(kt.data,"stopy",o,Math.max),this.updateBounds(n,a,s,o)},newActivation:function(t,e,r){const i=r[t.from.actor],n=jc(t.from.actor).length||0,s=i.x+i.width/2+(n-1)*rt.activationWidth/2;this.activations.push({startx:s,starty:this.verticalPos+2,stopx:s+rt.activationWidth,stopy:void 0,actor:t.from.actor,anchored:ke.anchorElement(e)})},endActivation:function(t){const e=this.activations.map(function(r){return r.actor}).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop:function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},newLoop:function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:kt.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},UP=function(t,e){kt.bumpVerticalPos(rt.boxMargin),e.height=rt.boxMargin,e.starty=kt.getVerticalPos();const r=ke.getNoteRect();r.x=e.startx,r.y=e.starty,r.width=e.width||rt.width,r.class="note";const i=t.append("g"),n=ke.drawRect(i,r),s=ke.getTextObj();s.x=e.startx,s.y=e.starty,s.width=r.width,s.dy="1em",s.text=e.message,s.class="noteText",s.fontFamily=rt.noteFontFamily,s.fontSize=rt.noteFontSize,s.fontWeight=rt.noteFontWeight,s.anchor=rt.noteAlign,s.textMargin=rt.noteMargin,s.valign="center";const a=Vs(i,s),o=Math.round(a.map(l=>(l._groups||l)[0][0].getBBox().height).reduce((l,h)=>l+h));n.attr("height",o+2*rt.noteMargin),e.height+=o+2*rt.noteMargin,kt.bumpVerticalPos(o+2*rt.noteMargin),e.stopy=e.starty+o+2*rt.noteMargin,e.stopx=e.startx+r.width,kt.insert(e.startx,e.starty,e.stopx,e.stopy),kt.models.addNote(e)},Wn=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),ss=t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),ju=t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight});function WP(t,e){kt.bumpVerticalPos(10);const{startx:r,stopx:i,message:n}=e,s=Xt.splitBreaks(n).length,a=jt.calculateTextDimensions(n,Wn(rt)),o=a.height/s;e.height+=o,kt.bumpVerticalPos(o);let l,h=a.height-10;const u=a.width;if(r===i){l=kt.getVerticalPos()+h,rt.rightAngles||(h+=rt.boxMargin,l=kt.getVerticalPos()+h),h+=30;const f=Math.max(u/2,rt.width/2);kt.insert(r-f,kt.getVerticalPos()-10+h,i+f,kt.getVerticalPos()+30+h)}else h+=rt.boxMargin,l=kt.getVerticalPos()+h,kt.insert(r,l-10,i,l);return kt.bumpVerticalPos(h),e.height+=h,e.stopy=e.starty+e.height,kt.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),l}const HP=function(t,e,r,i){const{startx:n,stopx:s,starty:a,message:o,type:l,sequenceIndex:h,sequenceVisible:u}=e,f=jt.calculateTextDimensions(o,Wn(rt)),d=ke.getTextObj();d.x=n,d.y=a+10,d.width=s-n,d.class="messageText",d.dy="1em",d.text=o,d.fontFamily=rt.messageFontFamily,d.fontSize=rt.messageFontSize,d.fontWeight=rt.messageFontWeight,d.anchor=rt.messageAlign,d.valign="center",d.textMargin=rt.wrapPadding,d.tspan=!1,Vs(t,d);const p=f.width;let m;n===s?rt.rightAngles?m=t.append("path").attr("d",`M ${n},${r} H ${n+Math.max(rt.width/2,p/2)} V ${r+25} H ${n}`):m=t.append("path").attr("d","M "+n+","+r+" C "+(n+60)+","+(r-10)+" "+(n+60)+","+(r+30)+" "+n+","+(r+20)):(m=t.append("line"),m.attr("x1",n),m.attr("y1",r),m.attr("x2",s),m.attr("y2",r)),l===i.db.LINETYPE.DOTTED||l===i.db.LINETYPE.DOTTED_CROSS||l===i.db.LINETYPE.DOTTED_POINT||l===i.db.LINETYPE.DOTTED_OPEN?(m.style("stroke-dasharray","3, 3"),m.attr("class","messageLine1")):m.attr("class","messageLine0");let b="";rt.arrowMarkerAbsolute&&(b=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,b=b.replace(/\(/g,"\\("),b=b.replace(/\)/g,"\\)")),m.attr("stroke-width",2),m.attr("stroke","none"),m.style("fill","none"),(l===i.db.LINETYPE.SOLID||l===i.db.LINETYPE.DOTTED)&&m.attr("marker-end","url("+b+"#arrowhead)"),(l===i.db.LINETYPE.SOLID_POINT||l===i.db.LINETYPE.DOTTED_POINT)&&m.attr("marker-end","url("+b+"#filled-head)"),(l===i.db.LINETYPE.SOLID_CROSS||l===i.db.LINETYPE.DOTTED_CROSS)&&m.attr("marker-end","url("+b+"#crosshead)"),(u||rt.showSequenceNumbers)&&(m.attr("marker-start","url("+b+"#sequencenumber)"),t.append("text").attr("x",n).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(h))},Xu=function(t,e,r,i,n,s,a){if(n.hideUnusedParticipants===!0){const f=new Set;s.forEach(d=>{f.add(d.from),f.add(d.to)}),r=r.filter(d=>f.has(d))}let o=0,l=0,h=0,u;for(const f of r){const d=e[f],p=d.box;u&&u!=p&&(a||kt.models.addBox(u),l+=rt.boxMargin+u.margin),p&&p!=u&&(a||(p.x=o+l,p.y=i),l+=p.margin),d.width=d.width||rt.width,d.height=Math.max(d.height||rt.height,rt.height),d.margin=d.margin||rt.actorMargin,d.x=o+l,d.y=kt.getVerticalPos();const m=ke.drawActor(t,d,rt,a);h=Math.max(h,m),kt.insert(d.x,i,d.x+d.width,d.height),o+=d.width+l,d.box&&(d.box.width=o+p.margin-d.box.x),l=d.margin,u=d.box,kt.models.addActor(d)}u&&!a&&kt.models.addBox(u),kt.bumpVerticalPos(h)},B3=function(t,e,r,i){let n=0,s=0;for(const a of r){const o=e[a],l=$P(o),h=ke.drawPopup(t,o,l,rt,rt.forceMenus,i);h.height>n&&(n=h.height),h.width+o.x>s&&(s=h.width+o.x)}return{maxHeight:n,maxWidth:s}},D3=function(t){Xe(rt,t),t.fontFamily&&(rt.actorFontFamily=rt.noteFontFamily=rt.messageFontFamily=t.fontFamily),t.fontSize&&(rt.actorFontSize=rt.noteFontSize=rt.messageFontSize=t.fontSize),t.fontWeight&&(rt.actorFontWeight=rt.noteFontWeight=rt.messageFontWeight=t.fontWeight)},jc=function(t){return kt.activations.filter(function(e){return e.actor===t})},Jd=function(t,e){const r=e[t],i=jc(t),n=i.reduce(function(a,o){return Math.min(a,o.startx)},r.x+r.width/2),s=i.reduce(function(a,o){return Math.max(a,o.stopx)},r.x+r.width/2);return[n,s]};function li(t,e,r,i,n){kt.bumpVerticalPos(r);let s=i;if(e.id&&e.message&&t[e.id]){const a=t[e.id].width,o=Wn(rt);e.message=jt.wrapLabel(`[${e.message}]`,a-2*rt.wrapPadding,o),e.width=a,e.wrap=!0;const l=jt.calculateTextDimensions(e.message,o),h=Math.max(l.height,rt.labelBoxHeight);s=i+h,I.debug(`${h} - ${e.message}`)}n(e),kt.bumpVerticalPos(s)}const qP=function(t,e,r,i){const{securityLevel:n,sequence:s}=G();rt=s,i.db.clear(),i.parser.parse(t);let a;n==="sandbox"&&(a=_t("#i"+e));const o=_t(n==="sandbox"?a.nodes()[0].contentDocument.body:"body"),l=n==="sandbox"?a.nodes()[0].contentDocument:document;kt.init(),I.debug(i.db);const h=n==="sandbox"?o.select(`[id="${e}"]`):_t(`[id="${e}"]`),u=i.db.getActors(),f=i.db.getBoxes(),d=i.db.getActorKeys(),p=i.db.getMessages(),m=i.db.getDiagramTitle(),b=i.db.hasAtLeastOneBox(),x=i.db.hasAtLeastOneBoxWithTitle(),k=GP(u,p,i);rt.height=jP(u,k,f),ke.insertComputerIcon(h),ke.insertDatabaseIcon(h),ke.insertClockIcon(h),b&&(kt.bumpVerticalPos(rt.boxMargin),x&&kt.bumpVerticalPos(f[0].textMaxHeight)),Xu(h,u,d,0,rt,p,!1);const v=ZP(p,u,k,i);ke.insertArrowHead(h),ke.insertArrowCrossHead(h),ke.insertArrowFilledHead(h),ke.insertSequenceNumber(h);function B(D,y){const N=kt.endActivation(D);N.starty+18>y&&(N.starty=y-6,y+=12),ke.drawActivation(h,N,y,rt,jc(D.from.actor).length),kt.insert(N.startx,y-10,N.stopx,y)}let R=1,P=1;const V=[];p.forEach(function(D){let y,N,nt;switch(D.type){case i.db.LINETYPE.NOTE:N=D.noteModel,UP(h,N);break;case i.db.LINETYPE.ACTIVE_START:kt.newActivation(D,h,u);break;case i.db.LINETYPE.ACTIVE_END:B(D,kt.getVerticalPos());break;case i.db.LINETYPE.LOOP_START:li(v,D,rt.boxMargin,rt.boxMargin+rt.boxTextMargin,Y=>kt.newLoop(Y));break;case i.db.LINETYPE.LOOP_END:y=kt.endLoop(),ke.drawLoop(h,y,"loop",rt),kt.bumpVerticalPos(y.stopy-kt.getVerticalPos()),kt.models.addLoop(y);break;case i.db.LINETYPE.RECT_START:li(v,D,rt.boxMargin,rt.boxMargin,Y=>kt.newLoop(void 0,Y.message));break;case i.db.LINETYPE.RECT_END:y=kt.endLoop(),ke.drawBackgroundRect(h,y),kt.models.addLoop(y),kt.bumpVerticalPos(y.stopy-kt.getVerticalPos());break;case i.db.LINETYPE.OPT_START:li(v,D,rt.boxMargin,rt.boxMargin+rt.boxTextMargin,Y=>kt.newLoop(Y));break;case i.db.LINETYPE.OPT_END:y=kt.endLoop(),ke.drawLoop(h,y,"opt",rt),kt.bumpVerticalPos(y.stopy-kt.getVerticalPos()),kt.models.addLoop(y);break;case i.db.LINETYPE.ALT_START:li(v,D,rt.boxMargin,rt.boxMargin+rt.boxTextMargin,Y=>kt.newLoop(Y));break;case i.db.LINETYPE.ALT_ELSE:li(v,D,rt.boxMargin+rt.boxTextMargin,rt.boxMargin,Y=>kt.addSectionToLoop(Y));break;case i.db.LINETYPE.ALT_END:y=kt.endLoop(),ke.drawLoop(h,y,"alt",rt),kt.bumpVerticalPos(y.stopy-kt.getVerticalPos()),kt.models.addLoop(y);break;case i.db.LINETYPE.PAR_START:li(v,D,rt.boxMargin,rt.boxMargin+rt.boxTextMargin,Y=>kt.newLoop(Y));break;case i.db.LINETYPE.PAR_AND:li(v,D,rt.boxMargin+rt.boxTextMargin,rt.boxMargin,Y=>kt.addSectionToLoop(Y));break;case i.db.LINETYPE.PAR_END:y=kt.endLoop(),ke.drawLoop(h,y,"par",rt),kt.bumpVerticalPos(y.stopy-kt.getVerticalPos()),kt.models.addLoop(y);break;case i.db.LINETYPE.AUTONUMBER:R=D.message.start||R,P=D.message.step||P,D.message.visible?i.db.enableSequenceNumbers():i.db.disableSequenceNumbers();break;case i.db.LINETYPE.CRITICAL_START:li(v,D,rt.boxMargin,rt.boxMargin+rt.boxTextMargin,Y=>kt.newLoop(Y));break;case i.db.LINETYPE.CRITICAL_OPTION:li(v,D,rt.boxMargin+rt.boxTextMargin,rt.boxMargin,Y=>kt.addSectionToLoop(Y));break;case i.db.LINETYPE.CRITICAL_END:y=kt.endLoop(),ke.drawLoop(h,y,"critical",rt),kt.bumpVerticalPos(y.stopy-kt.getVerticalPos()),kt.models.addLoop(y);break;case i.db.LINETYPE.BREAK_START:li(v,D,rt.boxMargin,rt.boxMargin+rt.boxTextMargin,Y=>kt.newLoop(Y));break;case i.db.LINETYPE.BREAK_END:y=kt.endLoop(),ke.drawLoop(h,y,"break",rt),kt.bumpVerticalPos(y.stopy-kt.getVerticalPos()),kt.models.addLoop(y);break;default:try{nt=D.msgModel,nt.starty=kt.getVerticalPos(),nt.sequenceIndex=R,nt.sequenceVisible=i.db.showSequenceNumbers();const Y=WP(h,nt);V.push({messageModel:nt,lineStartY:Y}),kt.models.addMessage(nt)}catch(Y){I.error("error while drawing message",Y)}}[i.db.LINETYPE.SOLID_OPEN,i.db.LINETYPE.DOTTED_OPEN,i.db.LINETYPE.SOLID,i.db.LINETYPE.DOTTED,i.db.LINETYPE.SOLID_CROSS,i.db.LINETYPE.DOTTED_CROSS,i.db.LINETYPE.SOLID_POINT,i.db.LINETYPE.DOTTED_POINT].includes(D.type)&&(R=R+P)}),V.forEach(D=>HP(h,D.messageModel,D.lineStartY,i)),rt.mirrorActors&&(kt.bumpVerticalPos(rt.boxMargin*2),Xu(h,u,d,kt.getVerticalPos(),rt,p,!0),kt.bumpVerticalPos(rt.boxMargin),A3(h,kt.getVerticalPos())),kt.models.boxes.forEach(function(D){D.height=kt.getVerticalPos()-D.y,kt.insert(D.x,D.y,D.x+D.width,D.height),D.startx=D.x,D.starty=D.y,D.stopx=D.startx+D.width,D.stopy=D.starty+D.height,D.stroke="rgb(0,0,0, 0.5)",ke.drawBox(h,D,rt)}),b&&kt.bumpVerticalPos(rt.boxMargin);const O=B3(h,u,d,l),{bounds:F}=kt.getBounds();I.debug("For line height fix Querying: #"+e+" .actor-line"),l1("#"+e+" .actor-line").attr("y2",F.stopy);let S=F.stopy-F.starty;S<O.maxHeight&&(S=O.maxHeight);let E=S+2*rt.diagramMarginY;rt.mirrorActors&&(E=E-rt.boxMargin+rt.bottomMarginAdj);let _=F.stopx-F.startx;_<O.maxWidth&&(_=O.maxWidth);const w=_+2*rt.diagramMarginX;m&&h.append("text").text(m).attr("x",(F.stopx-F.startx)/2-2*rt.diagramMarginX).attr("y",-25),ni(h,E,w,rt.useMaxWidth);const g=m?40:0;h.attr("viewBox",F.startx-rt.diagramMarginX+" -"+(rt.diagramMarginY+g)+" "+w+" "+(E+g)),I.debug("models:",kt.models)};function GP(t,e,r){const i={};return e.forEach(function(n){if(t[n.to]&&t[n.from]){const s=t[n.to];if(n.placement===r.db.PLACEMENT.LEFTOF&&!s.prevActor||n.placement===r.db.PLACEMENT.RIGHTOF&&!s.nextActor)return;const a=n.placement!==void 0,o=!a,l=a?ss(rt):Wn(rt),h=n.wrap?jt.wrapLabel(n.message,rt.width-2*rt.wrapPadding,l):n.message,f=jt.calculateTextDimensions(h,l).width+2*rt.wrapPadding;o&&n.from===s.nextActor?i[n.to]=Math.max(i[n.to]||0,f):o&&n.from===s.prevActor?i[n.from]=Math.max(i[n.from]||0,f):o&&n.from===n.to?(i[n.from]=Math.max(i[n.from]||0,f/2),i[n.to]=Math.max(i[n.to]||0,f/2)):n.placement===r.db.PLACEMENT.RIGHTOF?i[n.from]=Math.max(i[n.from]||0,f):n.placement===r.db.PLACEMENT.LEFTOF?i[s.prevActor]=Math.max(i[s.prevActor]||0,f):n.placement===r.db.PLACEMENT.OVER&&(s.prevActor&&(i[s.prevActor]=Math.max(i[s.prevActor]||0,f/2)),s.nextActor&&(i[n.from]=Math.max(i[n.from]||0,f/2)))}}),I.debug("maxMessageWidthPerActor:",i),i}const $P=function(t){let e=0;const r=ju(rt);for(const i in t.links){const s=jt.calculateTextDimensions(i,r).width+2*rt.wrapPadding+2*rt.boxMargin;e<s&&(e=s)}return e};function jP(t,e,r){let i=0;Object.keys(t).forEach(s=>{const a=t[s];a.wrap&&(a.description=jt.wrapLabel(a.description,rt.width-2*rt.wrapPadding,ju(rt)));const o=jt.calculateTextDimensions(a.description,ju(rt));a.width=a.wrap?rt.width:Math.max(rt.width,o.width+2*rt.wrapPadding),a.height=a.wrap?Math.max(o.height,rt.height):rt.height,i=Math.max(i,a.height)});for(const s in e){const a=t[s];if(!a)continue;const o=t[a.nextActor];if(!o){const f=e[s]+rt.actorMargin-a.width/2;a.margin=Math.max(f,rt.actorMargin);continue}const h=e[s]+rt.actorMargin-a.width/2-o.width/2;a.margin=Math.max(h,rt.actorMargin)}let n=0;return r.forEach(s=>{const a=Wn(rt);let o=s.actorKeys.reduce((u,f)=>u+=t[f].width+(t[f].margin||0),0);o-=2*rt.boxTextMargin,s.wrap&&(s.name=jt.wrapLabel(s.name,o-2*rt.wrapPadding,a));const l=jt.calculateTextDimensions(s.name,a);n=Math.max(l.height,n);const h=Math.max(o,l.width+2*rt.wrapPadding);if(s.margin=rt.boxTextMargin,o<h){const u=(h-o)/2;s.margin+=u}}),r.forEach(s=>s.textMaxHeight=n),Math.max(i,rt.height)}const XP=function(t,e,r){const i=e[t.from].x,n=e[t.to].x,s=t.wrap&&t.message;let a=jt.calculateTextDimensions(s?jt.wrapLabel(t.message,rt.width,ss(rt)):t.message,ss(rt));const o={width:s?rt.width:Math.max(rt.width,a.width+2*rt.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===r.db.PLACEMENT.RIGHTOF?(o.width=s?Math.max(rt.width,a.width):Math.max(e[t.from].width/2+e[t.to].width/2,a.width+2*rt.noteMargin),o.startx=i+(e[t.from].width+rt.actorMargin)/2):t.placement===r.db.PLACEMENT.LEFTOF?(o.width=Math.max(s?rt.width:e[t.from].width/2+e[t.to].width/2,a.width+2*rt.noteMargin),o.startx=i-o.width+(e[t.from].width-rt.actorMargin)/2):t.to===t.from?(a=jt.calculateTextDimensions(s?jt.wrapLabel(t.message,Math.max(rt.width,e[t.from].width),ss(rt)):t.message,ss(rt)),o.width=s?Math.max(rt.width,e[t.from].width):Math.max(e[t.from].width,rt.width,a.width+2*rt.noteMargin),o.startx=i+(e[t.from].width-o.width)/2):(o.width=Math.abs(i+e[t.from].width/2-(n+e[t.to].width/2))+rt.actorMargin,o.startx=i<n?i+e[t.from].width/2-rt.actorMargin/2:n+e[t.to].width/2-rt.actorMargin/2),s&&(o.message=jt.wrapLabel(t.message,o.width-2*rt.wrapPadding,ss(rt))),I.debug(`NM:[${o.startx},${o.stopx},${o.starty},${o.stopy}:${o.width},${o.height}=${t.message}]`),o},KP=function(t,e,r){let i=!1;if([r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT].includes(t.type)&&(i=!0),!i)return{};const n=Jd(t.from,e),s=Jd(t.to,e),a=n[0]<=s[0]?1:0,o=n[0]<s[0]?0:1,l=[...n,...s],h=Math.abs(s[o]-n[a]);t.wrap&&t.message&&(t.message=jt.wrapLabel(t.message,Math.max(h+2*rt.wrapPadding,rt.width),Wn(rt)));const u=jt.calculateTextDimensions(t.message,Wn(rt));return{width:Math.max(t.wrap?0:u.width+2*rt.wrapPadding,h+2*rt.wrapPadding,rt.width),height:0,startx:n[a],stopx:s[o],starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,l),toBounds:Math.max.apply(null,l)}},ZP=function(t,e,r,i){const n={},s=[];let a,o,l;return t.forEach(function(h){switch(h.id=jt.random({length:10}),h.type){case i.db.LINETYPE.LOOP_START:case i.db.LINETYPE.ALT_START:case i.db.LINETYPE.OPT_START:case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.CRITICAL_START:case i.db.LINETYPE.BREAK_START:s.push({id:h.id,msg:h.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case i.db.LINETYPE.ALT_ELSE:case i.db.LINETYPE.PAR_AND:case i.db.LINETYPE.CRITICAL_OPTION:h.message&&(a=s.pop(),n[a.id]=a,n[h.id]=a,s.push(a));break;case i.db.LINETYPE.LOOP_END:case i.db.LINETYPE.ALT_END:case i.db.LINETYPE.OPT_END:case i.db.LINETYPE.PAR_END:case i.db.LINETYPE.CRITICAL_END:case i.db.LINETYPE.BREAK_END:a=s.pop(),n[a.id]=a;break;case i.db.LINETYPE.ACTIVE_START:{const f=e[h.from?h.from.actor:h.to.actor],d=jc(h.from?h.from.actor:h.to.actor).length,p=f.x+f.width/2+(d-1)*rt.activationWidth/2,m={startx:p,stopx:p+rt.activationWidth,actor:h.from.actor,enabled:!0};kt.activations.push(m)}break;case i.db.LINETYPE.ACTIVE_END:{const f=kt.activations.map(d=>d.actor).lastIndexOf(h.from.actor);delete kt.activations.splice(f,1)[0]}break}h.placement!==void 0?(o=XP(h,e,i),h.noteModel=o,s.forEach(f=>{a=f,a.from=Math.min(a.from,o.startx),a.to=Math.max(a.to,o.startx+o.width),a.width=Math.max(a.width,Math.abs(a.from-a.to))-rt.labelBoxWidth})):(l=KP(h,e,i),h.msgModel=l,l.startx&&l.stopx&&s.length>0&&s.forEach(f=>{if(a=f,l.startx===l.stopx){const d=e[h.from],p=e[h.to];a.from=Math.min(d.x-l.width/2,d.x-d.width/2,a.from),a.to=Math.max(p.x+l.width/2,p.x+d.width/2,a.to),a.width=Math.max(a.width,Math.abs(a.to-a.from))-rt.labelBoxWidth}else a.from=Math.min(l.startx,a.from),a.to=Math.max(l.stopx,a.to),a.width=Math.max(a.width,l.width)-rt.labelBoxWidth}))}),kt.activations=[],I.debug("Loop type widths:",n),n},t2={bounds:kt,drawActors:Xu,drawActorsPopup:B3,setConf:D3,draw:qP};var Ku=function(){var t=function(Z,J,X,tt){for(X=X||{},tt=Z.length;tt--;X[Z[tt]]=J);return X},e=[1,2],r=[1,3],i=[1,5],n=[1,7],s=[2,5],a=[1,15],o=[1,17],l=[1,21],h=[1,22],u=[1,23],f=[1,24],d=[1,37],p=[1,25],m=[1,26],b=[1,27],x=[1,28],k=[1,29],v=[1,32],B=[1,33],R=[1,34],P=[1,35],V=[1,36],O=[1,39],F=[1,40],C=[1,41],S=[1,42],E=[1,38],_=[1,45],w=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],g=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],D=[1,4,5,7,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],y=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],N={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,directive:6,SD:7,document:8,line:9,statement:10,classDefStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,class:42,CLASSENTITY_IDS:43,STYLECLASS:44,openDirective:45,typeDirective:46,closeDirective:47,":":48,argDirective:49,direction_tb:50,direction_bt:51,direction_rl:52,direction_lr:53,eol:54,";":55,EDGE_STATE:56,STYLE_SEPARATOR:57,left_of:58,right_of:59,open_directive:60,type_directive:61,arg_directive:62,close_directive:63,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",7:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"class",43:"CLASSENTITY_IDS",44:"STYLECLASS",48:":",50:"direction_tb",51:"direction_bt",52:"direction_rl",53:"direction_lr",55:";",56:"EDGE_STATE",57:"STYLE_SEPARATOR",58:"left_of",59:"right_of",60:"open_directive",61:"type_directive",62:"arg_directive",63:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[10,1],[10,1],[10,1],[10,2],[10,3],[10,4],[10,1],[10,2],[10,1],[10,4],[10,3],[10,6],[10,1],[10,1],[10,1],[10,1],[10,4],[10,4],[10,1],[10,1],[10,2],[10,2],[10,1],[11,3],[11,3],[12,3],[6,3],[6,5],[32,1],[32,1],[32,1],[32,1],[54,1],[54,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1],[45,1],[46,1],[49,1],[47,1]],performAction:function(J,X,tt,ot,at,U,Tt){var $=U.length-1;switch(at){case 4:return ot.setRootDoc(U[$]),U[$];case 5:this.$=[];break;case 6:U[$]!="nl"&&(U[$-1].push(U[$]),this.$=U[$-1]);break;case 7:case 8:this.$=U[$];break;case 9:this.$="nl";break;case 12:this.$=U[$];break;case 13:const A=U[$-1];A.description=ot.trimColon(U[$]),this.$=A;break;case 14:this.$={stmt:"relation",state1:U[$-2],state2:U[$]};break;case 15:const M=ot.trimColon(U[$]);this.$={stmt:"relation",state1:U[$-3],state2:U[$-1],description:M};break;case 19:this.$={stmt:"state",id:U[$-3],type:"default",description:"",doc:U[$-1]};break;case 20:var j=U[$],W=U[$-2].trim();if(U[$].match(":")){var z=U[$].split(":");j=z[0],W=[W,z[1]]}this.$={stmt:"state",id:j,type:"default",description:W};break;case 21:this.$={stmt:"state",id:U[$-3],type:"default",description:U[$-5],doc:U[$-1]};break;case 22:this.$={stmt:"state",id:U[$],type:"fork"};break;case 23:this.$={stmt:"state",id:U[$],type:"join"};break;case 24:this.$={stmt:"state",id:U[$],type:"choice"};break;case 25:this.$={stmt:"state",id:ot.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:U[$-1].trim(),note:{position:U[$-2].trim(),text:U[$].trim()}};break;case 30:this.$=U[$].trim(),ot.setAccTitle(this.$);break;case 31:case 32:this.$=U[$].trim(),ot.setAccDescription(this.$);break;case 33:case 34:this.$={stmt:"classDef",id:U[$-1].trim(),classes:U[$].trim()};break;case 35:this.$={stmt:"applyClass",id:U[$-1].trim(),styleClass:U[$].trim()};break;case 38:ot.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:ot.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:ot.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:ot.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:U[$].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:U[$-2].trim(),classes:[U[$].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:U[$-2].trim(),classes:[U[$].trim()],type:"default",description:""};break;case 50:ot.parseDirective("%%{","open_directive");break;case 51:ot.parseDirective(U[$],"type_directive");break;case 52:U[$]=U[$].trim().replace(/'/g,'"'),ot.parseDirective(U[$],"arg_directive");break;case 53:ot.parseDirective("}%%","close_directive","state");break}},table:[{3:1,4:e,5:r,6:4,7:i,45:6,60:n},{1:[3]},{3:8,4:e,5:r,6:4,7:i,45:6,60:n},{3:9,4:e,5:r,6:4,7:i,45:6,60:n},{3:10,4:e,5:r,6:4,7:i,45:6,60:n},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],s,{8:11}),{46:12,61:[1,13]},{61:[2,50]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:a,5:o,6:30,9:14,10:16,11:18,12:19,13:20,16:l,17:h,19:u,22:f,24:d,25:p,26:m,27:b,28:x,29:k,32:31,33:v,35:B,37:R,38:P,42:V,45:6,50:O,51:F,52:C,53:S,56:E,60:n},{47:43,48:[1,44],63:_},t([48,63],[2,51]),t(w,[2,6]),{6:30,10:46,11:18,12:19,13:20,16:l,17:h,19:u,22:f,24:d,25:p,26:m,27:b,28:x,29:k,32:31,33:v,35:B,37:R,38:P,42:V,45:6,50:O,51:F,52:C,53:S,56:E,60:n},t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(w,[2,11]),t(w,[2,12],{14:[1,47],15:[1,48]}),t(w,[2,16]),{18:[1,49]},t(w,[2,18],{20:[1,50]}),{23:[1,51]},t(w,[2,22]),t(w,[2,23]),t(w,[2,24]),t(w,[2,25]),{30:52,31:[1,53],58:[1,54],59:[1,55]},t(w,[2,28]),t(w,[2,29]),{34:[1,56]},{36:[1,57]},t(w,[2,32]),{39:[1,58],41:[1,59]},{43:[1,60]},t(g,[2,44],{57:[1,61]}),t(g,[2,45],{57:[1,62]}),t(w,[2,38]),t(w,[2,39]),t(w,[2,40]),t(w,[2,41]),t(D,[2,36]),{49:63,62:[1,64]},t(D,[2,53]),t(w,[2,7]),t(w,[2,13]),{13:65,24:d,56:E},t(w,[2,17]),t(y,s,{8:66}),{24:[1,67]},{24:[1,68]},{23:[1,69]},{24:[2,48]},{24:[2,49]},t(w,[2,30]),t(w,[2,31]),{40:[1,70]},{40:[1,71]},{44:[1,72]},{24:[1,73]},{24:[1,74]},{47:75,63:_},{63:[2,52]},t(w,[2,14],{14:[1,76]}),{4:a,5:o,6:30,9:14,10:16,11:18,12:19,13:20,16:l,17:h,19:u,21:[1,77],22:f,24:d,25:p,26:m,27:b,28:x,29:k,32:31,33:v,35:B,37:R,38:P,42:V,45:6,50:O,51:F,52:C,53:S,56:E,60:n},t(w,[2,20],{20:[1,78]}),{31:[1,79]},{24:[1,80]},t(w,[2,33]),t(w,[2,34]),t(w,[2,35]),t(g,[2,46]),t(g,[2,47]),t(D,[2,37]),t(w,[2,15]),t(w,[2,19]),t(y,s,{8:81}),t(w,[2,26]),t(w,[2,27]),{4:a,5:o,6:30,9:14,10:16,11:18,12:19,13:20,16:l,17:h,19:u,21:[1,82],22:f,24:d,25:p,26:m,27:b,28:x,29:k,32:31,33:v,35:B,37:R,38:P,42:V,45:6,50:O,51:F,52:C,53:S,56:E,60:n},t(w,[2,21])],defaultActions:{7:[2,50],8:[2,1],9:[2,2],10:[2,3],54:[2,48],55:[2,49],64:[2,52]},parseError:function(J,X){if(X.recoverable)this.trace(J);else{var tt=new Error(J);throw tt.hash=X,tt}},parse:function(J){var X=this,tt=[0],ot=[],at=[null],U=[],Tt=this.table,$="",j=0,W=0,z=2,A=1,M=U.slice.call(arguments,1),q=Object.create(this.lexer),L={yy:{}};for(var st in this.yy)Object.prototype.hasOwnProperty.call(this.yy,st)&&(L.yy[st]=this.yy[st]);q.setInput(J,L.yy),L.yy.lexer=q,L.yy.parser=this,typeof q.yylloc>"u"&&(q.yylloc={});var T=q.yylloc;U.push(T);var Dt=q.options&&q.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function et(){var Nt;return Nt=ot.pop()||q.lex()||A,typeof Nt!="number"&&(Nt instanceof Array&&(ot=Nt,Nt=ot.pop()),Nt=X.symbols_[Nt]||Nt),Nt}for(var Et,vt,pt,ut,gt={},ht,yt,he,re;;){if(vt=tt[tt.length-1],this.defaultActions[vt]?pt=this.defaultActions[vt]:((Et===null||typeof Et>"u")&&(Et=et()),pt=Tt[vt]&&Tt[vt][Et]),typeof pt>"u"||!pt.length||!pt[0]){var Mt="";re=[];for(ht in Tt[vt])this.terminals_[ht]&&ht>z&&re.push("'"+this.terminals_[ht]+"'");q.showPosition?Mt="Parse error on line "+(j+1)+`:
1261
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var z=this.next();return z||this.lex()},begin:function(z){this.conditionStack.push(z)},popState:function(){var z=this.conditionStack.length-1;return z>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(z){return z=this.conditionStack.length-1-Math.abs(z||0),z>=0?this.conditionStack[z]:"INITIAL"},pushState:function(z){this.begin(z)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(z,A,M,q){switch(M){case 0:return this.begin("open_directive"),83;case 1:return this.begin("type_directive"),84;case 2:return this.popState(),this.begin("arg_directive"),17;case 3:return this.popState(),this.popState(),86;case 4:return 85;case 5:return 5;case 6:break;case 7:break;case 8:break;case 9:break;case 10:break;case 11:return 24;case 12:return this.begin("LINE"),19;case 13:return this.begin("ID"),54;case 14:return this.begin("ID"),56;case 15:return A.yytext=A.yytext.trim(),this.begin("ALIAS"),73;case 16:return this.popState(),this.popState(),this.begin("LINE"),55;case 17:return this.popState(),this.popState(),5;case 18:return this.begin("LINE"),41;case 19:return this.begin("LINE"),42;case 20:return this.begin("LINE"),43;case 21:return this.begin("LINE"),44;case 22:return this.begin("LINE"),53;case 23:return this.begin("LINE"),46;case 24:return this.begin("LINE"),52;case 25:return this.begin("LINE"),48;case 26:return this.begin("LINE"),51;case 27:return this.begin("LINE"),50;case 28:return this.popState(),20;case 29:return 21;case 30:return 68;case 31:return 69;case 32:return 62;case 33:return 63;case 34:return 64;case 35:return 65;case 36:return 60;case 37:return 57;case 38:return this.begin("ID"),26;case 39:return this.begin("ID"),28;case 40:return 34;case 41:return 35;case 42:return this.begin("acc_title"),36;case 43:return this.popState(),"acc_title_value";case 44:return this.begin("acc_descr"),38;case 45:return this.popState(),"acc_descr_value";case 46:this.begin("acc_descr_multiline");break;case 47:this.popState();break;case 48:return"acc_descr_multiline_value";case 49:return 7;case 50:return 23;case 51:return 25;case 52:return 67;case 53:return 5;case 54:return A.yytext=A.yytext.trim(),73;case 55:return 76;case 56:return 77;case 57:return 74;case 58:return 75;case 59:return 78;case 60:return 79;case 61:return 80;case 62:return 81;case 63:return 82;case 64:return 71;case 65:return 72;case 66:return 5;case 67:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[47,48],inclusive:!1},acc_descr:{rules:[45],inclusive:!1},acc_title:{rules:[43],inclusive:!1},open_directive:{rules:[1,8],inclusive:!1},type_directive:{rules:[2,3,8],inclusive:!1},arg_directive:{rules:[3,4,8],inclusive:!1},ID:{rules:[7,8,15],inclusive:!1},ALIAS:{rules:[7,8,16,17],inclusive:!1},LINE:{rules:[7,8,28],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,12,13,14,18,19,20,21,22,23,24,25,26,27,29,30,31,32,33,34,35,36,37,38,39,40,41,42,44,46,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}};return j}();U.lexer=Tt;function $(){this.yy={}}return $.prototype=U,U.Parser=$,new $}();Wu.parser=Wu;const QF=Wu,JF=t=>t.match(/^\s*sequenceDiagram/)!==null;let oa,sn={},Ps=[],$r=[],qc=!1,Hu,Mi;const tP=function(t,e,r){xe.parseDirective(this,t,e,r)},eP=function(t){Ps.push({name:t.text,wrap:t.wrap===void 0&&Un()||!!t.wrap,fill:t.color,actorKeys:[]}),Mi=Ps.slice(-1)[0]},qu=function(t,e,r,i){let n=Mi;const s=sn[t];if(s){if(Mi&&s.box&&Mi!==s.box)throw new Error("A same participant should only be defined in one Box: "+s.name+" can't be in '"+s.box.name+"' and in '"+Mi.name+"' at the same time.");if(n=s.box?s.box:Mi,s.box=n,s&&e===s.name&&r==null)return}(r==null||r.text==null)&&(r={text:e,wrap:null,type:i}),(i==null||r.text==null)&&(r={text:e,wrap:null,type:i}),sn[t]={box:n,name:e,description:r.text,wrap:r.wrap===void 0&&Un()||!!r.wrap,prevActor:oa,links:{},properties:{},actorCnt:null,rectData:null,type:i||"participant"},oa&&sn[oa]&&(sn[oa].nextActor=t),Mi&&Mi.actorKeys.push(t),oa=t},rP=t=>{let e,r=0;for(e=0;e<$r.length;e++)$r[e].type===Za.ACTIVE_START&&$r[e].from.actor===t&&r++,$r[e].type===Za.ACTIVE_END&&$r[e].from.actor===t&&r--;return r},iP=function(t,e,r,i){$r.push({from:t,to:e,message:r.text,wrap:r.wrap===void 0&&Un()||!!r.wrap,answer:i})},Ae=function(t,e,r={text:void 0,wrap:void 0},i){if(i===Za.ACTIVE_END&&rP(t.actor)<1){let s=new Error("Trying to inactivate an inactive participant ("+t.actor+")");throw s.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},s}return $r.push({from:t,to:e,message:r.text,wrap:r.wrap===void 0&&Un()||!!r.wrap,type:i}),!0},nP=function(){return Ps.length>0},sP=function(){return Ps.some(t=>t.name)},aP=function(){return $r},oP=function(){return Ps},lP=function(){return sn},mo=function(t){return sn[t]},cP=function(){return Object.keys(sn)},hP=function(){qc=!0},uP=function(){qc=!1},fP=()=>qc,dP=function(t){Hu=t},Un=()=>Hu!==void 0?Hu:G().sequence.wrap,pP=function(){sn={},Ps=[],$r=[],qc=!1,Lr()},gP=function(t){const e=t.trim(),r={text:e.replace(/^:?(?:no)?wrap:/,"").trim(),wrap:e.match(/^:?wrap:/)!==null?!0:e.match(/^:?nowrap:/)!==null?!1:void 0};return I.debug("parseMessage:",r),r},yP=function(t){const e=t.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/);let r=e!=null&&e[1]?e[1].trim():"transparent",i=e!=null&&e[2]?e[2].trim():void 0;if(window&&window.CSS)window.CSS.supports("color",r)||(r="transparent",i=t.trim());else{const s=new Option().style;s.color=r,s.color!==r&&(r="transparent",i=t.trim())}return{color:r,text:i!==void 0?Ur(i.replace(/^:?(?:no)?wrap:/,""),G()):void 0,wrap:i!==void 0?i.match(/^:?wrap:/)!==null?!0:i.match(/^:?nowrap:/)!==null?!1:void 0:void 0}},Za={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31},mP={FILLED:0,OPEN:1},bP={LEFTOF:0,RIGHTOF:1,OVER:2},b3=function(t,e,r){r.text,r.wrap===void 0&&Un()||r.wrap;const i=[].concat(t,t);$r.push({from:i[0],to:i[1],message:r.text,wrap:r.wrap===void 0&&Un()||!!r.wrap,type:Za.NOTE,placement:e})},_3=function(t,e){const r=mo(t);try{let i=Ur(e.text,G());i=i.replace(/&amp;/g,"&"),i=i.replace(/&equals;/g,"=");const n=JSON.parse(i);_0(r,n)}catch(i){I.error("error while parsing actor link text",i)}},_P=function(t,e){const r=mo(t);try{const a={};let o=Ur(e.text,G());var i=o.indexOf("@");o=o.replace(/&amp;/g,"&"),o=o.replace(/&equals;/g,"=");var n=o.slice(0,i-1).trim(),s=o.slice(i+1).trim();a[n]=s,_0(r,a)}catch(a){I.error("error while parsing actor link text",a)}};function _0(t,e){if(t.links==null)t.links=e;else for(let r in e)t.links[r]=e[r]}const x3=function(t,e){const r=mo(t);try{let i=Ur(e.text,G());const n=JSON.parse(i);v3(r,n)}catch(i){I.error("error while parsing actor properties text",i)}};function v3(t,e){if(t.properties==null)t.properties=e;else for(let r in e)t.properties[r]=e[r]}function xP(){Mi=void 0}const k3=function(t,e){const r=mo(t),i=document.getElementById(e.text);try{const n=i.innerHTML,s=JSON.parse(n);s.properties&&v3(r,s.properties),s.links&&_0(r,s.links)}catch(n){I.error("error while parsing actor details text",n)}},vP=function(t,e){if(t!==void 0&&t.properties!==void 0)return t.properties[e]},w3=function(t){if(Array.isArray(t))t.forEach(function(e){w3(e)});else switch(t.type){case"sequenceIndex":$r.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":qu(t.actor,t.actor,t.description,"participant");break;case"addActor":qu(t.actor,t.actor,t.description,"actor");break;case"activeStart":Ae(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":Ae(t.actor,void 0,void 0,t.signalType);break;case"addNote":b3(t.actor,t.placement,t.text);break;case"addLinks":_3(t.actor,t.text);break;case"addALink":_P(t.actor,t.text);break;case"addProperties":x3(t.actor,t.text);break;case"addDetails":k3(t.actor,t.text);break;case"addMessage":Ae(t.from,t.to,t.msg,t.signalType);break;case"boxStart":eP(t.boxData);break;case"boxEnd":xP();break;case"loopStart":Ae(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":Ae(void 0,void 0,void 0,t.signalType);break;case"rectStart":Ae(void 0,void 0,t.color,t.signalType);break;case"rectEnd":Ae(void 0,void 0,void 0,t.signalType);break;case"optStart":Ae(void 0,void 0,t.optText,t.signalType);break;case"optEnd":Ae(void 0,void 0,void 0,t.signalType);break;case"altStart":Ae(void 0,void 0,t.altText,t.signalType);break;case"else":Ae(void 0,void 0,t.altText,t.signalType);break;case"altEnd":Ae(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":kr(t.text);break;case"parStart":Ae(void 0,void 0,t.parText,t.signalType);break;case"and":Ae(void 0,void 0,t.parText,t.signalType);break;case"parEnd":Ae(void 0,void 0,void 0,t.signalType);break;case"criticalStart":Ae(void 0,void 0,t.criticalText,t.signalType);break;case"option":Ae(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":Ae(void 0,void 0,void 0,t.signalType);break;case"breakStart":Ae(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":Ae(void 0,void 0,void 0,t.signalType);break}},Jd={addActor:qu,addMessage:iP,addSignal:Ae,addLinks:_3,addDetails:k3,addProperties:x3,autoWrap:Un,setWrap:dP,enableSequenceNumbers:hP,disableSequenceNumbers:uP,showSequenceNumbers:fP,getMessages:aP,getActors:lP,getActor:mo,getActorKeys:cP,getActorProperty:vP,getAccTitle:Br,getBoxes:oP,getDiagramTitle:ai,setDiagramTitle:si,parseDirective:tP,getConfig:()=>G().sequence,clear:pP,parseMessage:gP,parseBoxData:yP,LINETYPE:Za,ARROWTYPE:mP,PLACEMENT:bP,addNote:b3,setAccTitle:kr,apply:w3,setAccDescription:Dr,getAccDescription:Ir,hasAtLeastOneBox:nP,hasAtLeastOneBoxWithTitle:sP};let Gu=[];const kP=t=>{Gu.push(t)},T3=()=>{Gu.forEach(t=>{t()}),Gu=[]},Gc=function(t,e){const r=t.append("rect");return r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),e.class!==void 0&&r.attr("class",e.class),r},E3=(t,e)=>{kP(()=>{const r=document.querySelectorAll(t);r.length!==0&&(r[0].addEventListener("mouseover",function(){CP("actor"+e+"_popup")}),r[0].addEventListener("mouseout",function(){SP("actor"+e+"_popup")}))})},wP=function(t,e,r,i,n){if(e.links===void 0||e.links===null||Object.keys(e.links).length===0)return{height:0,width:0};const s=e.links,a=e.actorCnt,o=e.rectData;var l="none";n&&(l="block !important");const h=t.append("g");h.attr("id","actor"+a+"_popup"),h.attr("class","actorPopupMenu"),h.attr("display",l),E3("#actor"+a+"_popup",a);var u="";o.class!==void 0&&(u=" "+o.class);let f=o.width>r?o.width:r;const d=h.append("rect");if(d.attr("class","actorPopupMenuPanel"+u),d.attr("x",o.x),d.attr("y",o.height),d.attr("fill",o.fill),d.attr("stroke",o.stroke),d.attr("width",f),d.attr("height",o.height),d.attr("rx",o.rx),d.attr("ry",o.ry),s!=null){var p=20;for(let x in s){var m=h.append("a"),b=Ki(s[x]);m.attr("xlink:href",b),m.attr("target","_blank"),UP(i)(x,m,o.x+10,o.height+p,f,20,{class:"actor"},i),p+=30}}return d.attr("height",p),{height:o.height+p,width:f}},C3=function(t,e,r,i){const n=t.append("image");n.attr("x",e),n.attr("y",r);var s=Ki(i);n.attr("xlink:href",s)},S3=function(t,e,r,i){const n=t.append("use");n.attr("x",e),n.attr("y",r);var s=Ki(i);n.attr("xlink:href","#"+s)},TP=function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = 'block'; }"},EP=function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = 'none'; }"},CP=function(t){var e=document.getElementById(t);e!=null&&(e.style.display="block")},SP=function(t){var e=document.getElementById(t);e!=null&&(e.style.display="none")},Vs=function(t,e){let r=0,i=0;const n=e.text.split(Xt.lineBreakRegex),[s,a]=co(e.fontSize);let o=[],l=0,h=()=>e.y;if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)switch(e.valign){case"top":case"start":h=()=>Math.round(e.y+e.textMargin);break;case"middle":case"center":h=()=>Math.round(e.y+(r+i+e.textMargin)/2);break;case"bottom":case"end":h=()=>Math.round(e.y+(r+i+2*e.textMargin)-e.textMargin);break}if(e.anchor!==void 0&&e.textMargin!==void 0&&e.width!==void 0)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle";break}for(let[u,f]of n.entries()){e.textMargin!==void 0&&e.textMargin===0&&s!==void 0&&(l=u*s);const d=t.append("text");if(d.attr("x",e.x),d.attr("y",h()),e.anchor!==void 0&&d.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),e.fontFamily!==void 0&&d.style("font-family",e.fontFamily),a!==void 0&&d.style("font-size",a),e.fontWeight!==void 0&&d.style("font-weight",e.fontWeight),e.fill!==void 0&&d.attr("fill",e.fill),e.class!==void 0&&d.attr("class",e.class),e.dy!==void 0?d.attr("dy",e.dy):l!==0&&d.attr("dy",l),e.tspan){const p=d.append("tspan");p.attr("x",e.x),e.fill!==void 0&&p.attr("fill",e.fill),p.text(f)}else d.text(f);e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0&&(i+=(d._groups||d)[0][0].getBBox().height,r=i),o.push(d)}return o},A3=function(t,e){function r(n,s,a,o,l){return n+","+s+" "+(n+a)+","+s+" "+(n+a)+","+(s+o-l)+" "+(n+a-l*1.2)+","+(s+o)+" "+n+","+(s+o)}const i=t.append("polygon");return i.attr("points",r(e.x,e.y,e.width,e.height,7)),i.attr("class","labelBox"),e.y=e.y+e.height/2,Vs(t,e),i};let ui=-1;const L3=(t,e)=>{t.selectAll&&t.selectAll(".actor-line").attr("class","200").attr("y2",e-55)},AP=function(t,e,r,i){const n=e.x+e.width/2,s=e.y+5,a=t.append("g");var o=a;i||(ui++,o.append("line").attr("id","actor"+ui).attr("x1",n).attr("y1",s).attr("x2",n).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"),o=a.append("g"),e.actorCnt=ui,e.links!=null&&(o.attr("id","root-"+ui),E3("#root-"+ui,ui)));const l=$c();var h="actor";e.properties!=null&&e.properties.class?h=e.properties.class:l.fill="#eaeaea",l.x=e.x,l.y=e.y,l.width=e.width,l.height=e.height,l.class=h,l.rx=3,l.ry=3;const u=Gc(o,l);if(e.rectData=l,e.properties!=null&&e.properties.icon){const d=e.properties.icon.trim();d.charAt(0)==="@"?S3(o,l.x+l.width-20,l.y+10,d.substr(1)):C3(o,l.x+l.width-20,l.y+10,d)}x0(r)(e.description,o,l.x,l.y,l.width,l.height,{class:"actor"},r);let f=e.height;if(u.node){const d=u.node().getBBox();e.height=d.height,f=d.height}return f},LP=function(t,e,r,i){const n=e.x+e.width/2,s=e.y+80;i||(ui++,t.append("line").attr("id","actor"+ui).attr("x1",n).attr("y1",s).attr("x2",n).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));const a=t.append("g");a.attr("class","actor-man");const o=$c();o.x=e.x,o.y=e.y,o.fill="#eaeaea",o.width=e.width,o.height=e.height,o.class="actor",o.rx=3,o.ry=3,a.append("line").attr("id","actor-man-torso"+ui).attr("x1",n).attr("y1",e.y+25).attr("x2",n).attr("y2",e.y+45),a.append("line").attr("id","actor-man-arms"+ui).attr("x1",n-18).attr("y1",e.y+33).attr("x2",n+18).attr("y2",e.y+33),a.append("line").attr("x1",n-18).attr("y1",e.y+60).attr("x2",n).attr("y2",e.y+45),a.append("line").attr("x1",n).attr("y1",e.y+45).attr("x2",n+16).attr("y2",e.y+60);const l=a.append("circle");l.attr("cx",e.x+e.width/2),l.attr("cy",e.y+10),l.attr("r",15),l.attr("width",e.width),l.attr("height",e.height);const h=a.node().getBBox();return e.height=h.height,x0(r)(e.description,a,o.x,o.y+35,o.width,o.height,{class:"actor"},r),e.height},BP=function(t,e,r,i){switch(e.type){case"actor":return LP(t,e,r,i);case"participant":return AP(t,e,r,i)}},DP=function(t,e,r){const n=t.append("g");B3(n,e),e.name&&x0(r)(e.name,n,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},r),n.lower()},IP=function(t){return t.append("g")},MP=function(t,e,r,i,n){const s=$c(),a=e.anchored;s.x=e.startx,s.y=e.starty,s.class="activation"+n%3,s.width=e.stopx-e.startx,s.height=r-e.starty,Gc(a,s)},NP=function(t,e,r,i){const{boxMargin:n,boxTextMargin:s,labelBoxHeight:a,labelBoxWidth:o,messageFontFamily:l,messageFontSize:h,messageFontWeight:u}=i,f=t.append("g"),d=function(b,x,k,v){return f.append("line").attr("x1",b).attr("y1",x).attr("x2",k).attr("y2",v).attr("class","loopLine")};d(e.startx,e.starty,e.stopx,e.starty),d(e.stopx,e.starty,e.stopx,e.stopy),d(e.startx,e.stopy,e.stopx,e.stopy),d(e.startx,e.starty,e.startx,e.stopy),e.sections!==void 0&&e.sections.forEach(function(b){d(e.startx,b.y,e.stopx,b.y).style("stroke-dasharray","3, 3")});let p=$u();p.text=r,p.x=e.startx,p.y=e.starty,p.fontFamily=l,p.fontSize=h,p.fontWeight=u,p.anchor="middle",p.valign="middle",p.tspan=!1,p.width=o||50,p.height=a||20,p.textMargin=s,p.class="labelText",A3(f,p),p=$u(),p.text=e.title,p.x=e.startx+o/2+(e.stopx-e.startx)/2,p.y=e.starty+n+s,p.anchor="middle",p.valign="middle",p.textMargin=s,p.class="loopText",p.fontFamily=l,p.fontSize=h,p.fontWeight=u,p.wrap=!0;let m=Vs(f,p);return e.sectionTitles!==void 0&&e.sectionTitles.forEach(function(b,x){if(b.message){p.text=b.message,p.x=e.startx+(e.stopx-e.startx)/2,p.y=e.sections[x].y+n+s,p.class="loopText",p.anchor="middle",p.valign="middle",p.tspan=!1,p.fontFamily=l,p.fontSize=h,p.fontWeight=u,p.wrap=e.wrap,m=Vs(f,p);let k=Math.round(m.map(v=>(v._groups||v)[0][0].getBBox().height).reduce((v,B)=>v+B));e.sections[x].height+=k-(n+s)}}),e.height=Math.round(e.stopy-e.starty),f},B3=function(t,e){Gc(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},RP=function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},OP=function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},FP=function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},PP=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},VP=function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},YP=function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},zP=function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},$u=function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},$c=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},x0=function(){function t(n,s,a,o,l,h,u){const f=s.append("text").attr("x",a+l/2).attr("y",o+h/2+5).style("text-anchor","middle").text(n);i(f,u)}function e(n,s,a,o,l,h,u,f){const{actorFontSize:d,actorFontFamily:p,actorFontWeight:m}=f,[b,x]=co(d),k=n.split(Xt.lineBreakRegex);for(let v=0;v<k.length;v++){const B=v*b-b*(k.length-1)/2,R=s.append("text").attr("x",a+l/2).attr("y",o).style("text-anchor","middle").style("font-size",x).style("font-weight",m).style("font-family",p);R.append("tspan").attr("x",a+l/2).attr("dy",B).text(k[v]),R.attr("y",o+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(R,u)}}function r(n,s,a,o,l,h,u,f){const d=s.append("switch"),m=d.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",h).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");m.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,d,a,o,l,h,u,f),i(m,u)}function i(n,s){for(const a in s)s.hasOwnProperty(a)&&n.attr(a,s[a])}return function(n){return n.textPlacement==="fo"?r:n.textPlacement==="old"?t:e}}(),UP=function(){function t(n,s,a,o,l,h,u){const f=s.append("text").attr("x",a).attr("y",o).style("text-anchor","start").text(n);i(f,u)}function e(n,s,a,o,l,h,u,f){const{actorFontSize:d,actorFontFamily:p,actorFontWeight:m}=f,b=n.split(Xt.lineBreakRegex);for(let x=0;x<b.length;x++){const k=x*d-d*(b.length-1)/2,v=s.append("text").attr("x",a).attr("y",o).style("text-anchor","start").style("font-size",d).style("font-weight",m).style("font-family",p);v.append("tspan").attr("x",a).attr("dy",k).text(b[x]),v.attr("y",o+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(v,u)}}function r(n,s,a,o,l,h,u,f){const d=s.append("switch"),m=d.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",h).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");m.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,d,a,o,l,h,u,f),i(m,u)}function i(n,s){for(const a in s)s.hasOwnProperty(a)&&n.attr(a,s[a])}return function(n){return n.textPlacement==="fo"?r:n.textPlacement==="old"?t:e}}(),ke={drawRect:Gc,drawText:Vs,drawLabel:A3,drawActor:BP,drawBox:DP,drawPopup:wP,drawImage:C3,drawEmbeddedImage:S3,anchorElement:IP,drawActivation:MP,drawLoop:NP,drawBackgroundRect:B3,insertArrowHead:PP,insertArrowFilledHead:VP,insertSequenceNumber:YP,insertArrowCrossHead:zP,insertDatabaseIcon:RP,insertComputerIcon:OP,insertClockIcon:FP,getTextObj:$u,getNoteRect:$c,popupMenu:TP,popdownMenu:EP,fixLifeLineHeights:L3,sanitizeUrl:Ki};let rt={};const kt={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(t=>t.height||0))+(this.loops.length===0?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.messages.length===0?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.notes.length===0?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},clear:function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},addBox:function(t){this.boxes.push(t)},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],boxes:[],loops:[],messages:[],notes:[]},init:function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,I3(G())},updateVal:function(t,e,r,i){t[e]===void 0?t[e]=r:t[e]=i(r,t[e])},updateBounds:function(t,e,r,i){const n=this;let s=0;function a(o){return function(h){s++;const u=n.sequenceItems.length-s+1;n.updateVal(h,"starty",e-u*rt.boxMargin,Math.min),n.updateVal(h,"stopy",i+u*rt.boxMargin,Math.max),n.updateVal(kt.data,"startx",t-u*rt.boxMargin,Math.min),n.updateVal(kt.data,"stopx",r+u*rt.boxMargin,Math.max),o!=="activation"&&(n.updateVal(h,"startx",t-u*rt.boxMargin,Math.min),n.updateVal(h,"stopx",r+u*rt.boxMargin,Math.max),n.updateVal(kt.data,"starty",e-u*rt.boxMargin,Math.min),n.updateVal(kt.data,"stopy",i+u*rt.boxMargin,Math.max))}}this.sequenceItems.forEach(a()),this.activations.forEach(a("activation"))},insert:function(t,e,r,i){const n=Math.min(t,r),s=Math.max(t,r),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(kt.data,"startx",n,Math.min),this.updateVal(kt.data,"starty",a,Math.min),this.updateVal(kt.data,"stopx",s,Math.max),this.updateVal(kt.data,"stopy",o,Math.max),this.updateBounds(n,a,s,o)},newActivation:function(t,e,r){const i=r[t.from.actor],n=jc(t.from.actor).length||0,s=i.x+i.width/2+(n-1)*rt.activationWidth/2;this.activations.push({startx:s,starty:this.verticalPos+2,stopx:s+rt.activationWidth,stopy:void 0,actor:t.from.actor,anchored:ke.anchorElement(e)})},endActivation:function(t){const e=this.activations.map(function(r){return r.actor}).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop:function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},newLoop:function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:kt.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},WP=function(t,e){kt.bumpVerticalPos(rt.boxMargin),e.height=rt.boxMargin,e.starty=kt.getVerticalPos();const r=ke.getNoteRect();r.x=e.startx,r.y=e.starty,r.width=e.width||rt.width,r.class="note";const i=t.append("g"),n=ke.drawRect(i,r),s=ke.getTextObj();s.x=e.startx,s.y=e.starty,s.width=r.width,s.dy="1em",s.text=e.message,s.class="noteText",s.fontFamily=rt.noteFontFamily,s.fontSize=rt.noteFontSize,s.fontWeight=rt.noteFontWeight,s.anchor=rt.noteAlign,s.textMargin=rt.noteMargin,s.valign="center";const a=Vs(i,s),o=Math.round(a.map(l=>(l._groups||l)[0][0].getBBox().height).reduce((l,h)=>l+h));n.attr("height",o+2*rt.noteMargin),e.height+=o+2*rt.noteMargin,kt.bumpVerticalPos(o+2*rt.noteMargin),e.stopy=e.starty+o+2*rt.noteMargin,e.stopx=e.startx+r.width,kt.insert(e.startx,e.starty,e.stopx,e.stopy),kt.models.addNote(e)},Wn=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),ss=t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),ju=t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight});function HP(t,e){kt.bumpVerticalPos(10);const{startx:r,stopx:i,message:n}=e,s=Xt.splitBreaks(n).length,a=jt.calculateTextDimensions(n,Wn(rt)),o=a.height/s;e.height+=o,kt.bumpVerticalPos(o);let l,h=a.height-10;const u=a.width;if(r===i){l=kt.getVerticalPos()+h,rt.rightAngles||(h+=rt.boxMargin,l=kt.getVerticalPos()+h),h+=30;const f=Math.max(u/2,rt.width/2);kt.insert(r-f,kt.getVerticalPos()-10+h,i+f,kt.getVerticalPos()+30+h)}else h+=rt.boxMargin,l=kt.getVerticalPos()+h,kt.insert(r,l-10,i,l);return kt.bumpVerticalPos(h),e.height+=h,e.stopy=e.starty+e.height,kt.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),l}const qP=function(t,e,r,i){const{startx:n,stopx:s,starty:a,message:o,type:l,sequenceIndex:h,sequenceVisible:u}=e,f=jt.calculateTextDimensions(o,Wn(rt)),d=ke.getTextObj();d.x=n,d.y=a+10,d.width=s-n,d.class="messageText",d.dy="1em",d.text=o,d.fontFamily=rt.messageFontFamily,d.fontSize=rt.messageFontSize,d.fontWeight=rt.messageFontWeight,d.anchor=rt.messageAlign,d.valign="center",d.textMargin=rt.wrapPadding,d.tspan=!1,Vs(t,d);const p=f.width;let m;n===s?rt.rightAngles?m=t.append("path").attr("d",`M ${n},${r} H ${n+Math.max(rt.width/2,p/2)} V ${r+25} H ${n}`):m=t.append("path").attr("d","M "+n+","+r+" C "+(n+60)+","+(r-10)+" "+(n+60)+","+(r+30)+" "+n+","+(r+20)):(m=t.append("line"),m.attr("x1",n),m.attr("y1",r),m.attr("x2",s),m.attr("y2",r)),l===i.db.LINETYPE.DOTTED||l===i.db.LINETYPE.DOTTED_CROSS||l===i.db.LINETYPE.DOTTED_POINT||l===i.db.LINETYPE.DOTTED_OPEN?(m.style("stroke-dasharray","3, 3"),m.attr("class","messageLine1")):m.attr("class","messageLine0");let b="";rt.arrowMarkerAbsolute&&(b=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,b=b.replace(/\(/g,"\\("),b=b.replace(/\)/g,"\\)")),m.attr("stroke-width",2),m.attr("stroke","none"),m.style("fill","none"),(l===i.db.LINETYPE.SOLID||l===i.db.LINETYPE.DOTTED)&&m.attr("marker-end","url("+b+"#arrowhead)"),(l===i.db.LINETYPE.SOLID_POINT||l===i.db.LINETYPE.DOTTED_POINT)&&m.attr("marker-end","url("+b+"#filled-head)"),(l===i.db.LINETYPE.SOLID_CROSS||l===i.db.LINETYPE.DOTTED_CROSS)&&m.attr("marker-end","url("+b+"#crosshead)"),(u||rt.showSequenceNumbers)&&(m.attr("marker-start","url("+b+"#sequencenumber)"),t.append("text").attr("x",n).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(h))},Xu=function(t,e,r,i,n,s,a){if(n.hideUnusedParticipants===!0){const f=new Set;s.forEach(d=>{f.add(d.from),f.add(d.to)}),r=r.filter(d=>f.has(d))}let o=0,l=0,h=0,u;for(const f of r){const d=e[f],p=d.box;u&&u!=p&&(a||kt.models.addBox(u),l+=rt.boxMargin+u.margin),p&&p!=u&&(a||(p.x=o+l,p.y=i),l+=p.margin),d.width=d.width||rt.width,d.height=Math.max(d.height||rt.height,rt.height),d.margin=d.margin||rt.actorMargin,d.x=o+l,d.y=kt.getVerticalPos();const m=ke.drawActor(t,d,rt,a);h=Math.max(h,m),kt.insert(d.x,i,d.x+d.width,d.height),o+=d.width+l,d.box&&(d.box.width=o+p.margin-d.box.x),l=d.margin,u=d.box,kt.models.addActor(d)}u&&!a&&kt.models.addBox(u),kt.bumpVerticalPos(h)},D3=function(t,e,r,i){let n=0,s=0;for(const a of r){const o=e[a],l=jP(o),h=ke.drawPopup(t,o,l,rt,rt.forceMenus,i);h.height>n&&(n=h.height),h.width+o.x>s&&(s=h.width+o.x)}return{maxHeight:n,maxWidth:s}},I3=function(t){Xe(rt,t),t.fontFamily&&(rt.actorFontFamily=rt.noteFontFamily=rt.messageFontFamily=t.fontFamily),t.fontSize&&(rt.actorFontSize=rt.noteFontSize=rt.messageFontSize=t.fontSize),t.fontWeight&&(rt.actorFontWeight=rt.noteFontWeight=rt.messageFontWeight=t.fontWeight)},jc=function(t){return kt.activations.filter(function(e){return e.actor===t})},t2=function(t,e){const r=e[t],i=jc(t),n=i.reduce(function(a,o){return Math.min(a,o.startx)},r.x+r.width/2),s=i.reduce(function(a,o){return Math.max(a,o.stopx)},r.x+r.width/2);return[n,s]};function li(t,e,r,i,n){kt.bumpVerticalPos(r);let s=i;if(e.id&&e.message&&t[e.id]){const a=t[e.id].width,o=Wn(rt);e.message=jt.wrapLabel(`[${e.message}]`,a-2*rt.wrapPadding,o),e.width=a,e.wrap=!0;const l=jt.calculateTextDimensions(e.message,o),h=Math.max(l.height,rt.labelBoxHeight);s=i+h,I.debug(`${h} - ${e.message}`)}n(e),kt.bumpVerticalPos(s)}const GP=function(t,e,r,i){const{securityLevel:n,sequence:s}=G();rt=s,i.db.clear(),i.parser.parse(t);let a;n==="sandbox"&&(a=_t("#i"+e));const o=_t(n==="sandbox"?a.nodes()[0].contentDocument.body:"body"),l=n==="sandbox"?a.nodes()[0].contentDocument:document;kt.init(),I.debug(i.db);const h=n==="sandbox"?o.select(`[id="${e}"]`):_t(`[id="${e}"]`),u=i.db.getActors(),f=i.db.getBoxes(),d=i.db.getActorKeys(),p=i.db.getMessages(),m=i.db.getDiagramTitle(),b=i.db.hasAtLeastOneBox(),x=i.db.hasAtLeastOneBoxWithTitle(),k=$P(u,p,i);rt.height=XP(u,k,f),ke.insertComputerIcon(h),ke.insertDatabaseIcon(h),ke.insertClockIcon(h),b&&(kt.bumpVerticalPos(rt.boxMargin),x&&kt.bumpVerticalPos(f[0].textMaxHeight)),Xu(h,u,d,0,rt,p,!1);const v=QP(p,u,k,i);ke.insertArrowHead(h),ke.insertArrowCrossHead(h),ke.insertArrowFilledHead(h),ke.insertSequenceNumber(h);function B(D,y){const N=kt.endActivation(D);N.starty+18>y&&(N.starty=y-6,y+=12),ke.drawActivation(h,N,y,rt,jc(D.from.actor).length),kt.insert(N.startx,y-10,N.stopx,y)}let R=1,P=1;const V=[];p.forEach(function(D){let y,N,nt;switch(D.type){case i.db.LINETYPE.NOTE:N=D.noteModel,WP(h,N);break;case i.db.LINETYPE.ACTIVE_START:kt.newActivation(D,h,u);break;case i.db.LINETYPE.ACTIVE_END:B(D,kt.getVerticalPos());break;case i.db.LINETYPE.LOOP_START:li(v,D,rt.boxMargin,rt.boxMargin+rt.boxTextMargin,Y=>kt.newLoop(Y));break;case i.db.LINETYPE.LOOP_END:y=kt.endLoop(),ke.drawLoop(h,y,"loop",rt),kt.bumpVerticalPos(y.stopy-kt.getVerticalPos()),kt.models.addLoop(y);break;case i.db.LINETYPE.RECT_START:li(v,D,rt.boxMargin,rt.boxMargin,Y=>kt.newLoop(void 0,Y.message));break;case i.db.LINETYPE.RECT_END:y=kt.endLoop(),ke.drawBackgroundRect(h,y),kt.models.addLoop(y),kt.bumpVerticalPos(y.stopy-kt.getVerticalPos());break;case i.db.LINETYPE.OPT_START:li(v,D,rt.boxMargin,rt.boxMargin+rt.boxTextMargin,Y=>kt.newLoop(Y));break;case i.db.LINETYPE.OPT_END:y=kt.endLoop(),ke.drawLoop(h,y,"opt",rt),kt.bumpVerticalPos(y.stopy-kt.getVerticalPos()),kt.models.addLoop(y);break;case i.db.LINETYPE.ALT_START:li(v,D,rt.boxMargin,rt.boxMargin+rt.boxTextMargin,Y=>kt.newLoop(Y));break;case i.db.LINETYPE.ALT_ELSE:li(v,D,rt.boxMargin+rt.boxTextMargin,rt.boxMargin,Y=>kt.addSectionToLoop(Y));break;case i.db.LINETYPE.ALT_END:y=kt.endLoop(),ke.drawLoop(h,y,"alt",rt),kt.bumpVerticalPos(y.stopy-kt.getVerticalPos()),kt.models.addLoop(y);break;case i.db.LINETYPE.PAR_START:li(v,D,rt.boxMargin,rt.boxMargin+rt.boxTextMargin,Y=>kt.newLoop(Y));break;case i.db.LINETYPE.PAR_AND:li(v,D,rt.boxMargin+rt.boxTextMargin,rt.boxMargin,Y=>kt.addSectionToLoop(Y));break;case i.db.LINETYPE.PAR_END:y=kt.endLoop(),ke.drawLoop(h,y,"par",rt),kt.bumpVerticalPos(y.stopy-kt.getVerticalPos()),kt.models.addLoop(y);break;case i.db.LINETYPE.AUTONUMBER:R=D.message.start||R,P=D.message.step||P,D.message.visible?i.db.enableSequenceNumbers():i.db.disableSequenceNumbers();break;case i.db.LINETYPE.CRITICAL_START:li(v,D,rt.boxMargin,rt.boxMargin+rt.boxTextMargin,Y=>kt.newLoop(Y));break;case i.db.LINETYPE.CRITICAL_OPTION:li(v,D,rt.boxMargin+rt.boxTextMargin,rt.boxMargin,Y=>kt.addSectionToLoop(Y));break;case i.db.LINETYPE.CRITICAL_END:y=kt.endLoop(),ke.drawLoop(h,y,"critical",rt),kt.bumpVerticalPos(y.stopy-kt.getVerticalPos()),kt.models.addLoop(y);break;case i.db.LINETYPE.BREAK_START:li(v,D,rt.boxMargin,rt.boxMargin+rt.boxTextMargin,Y=>kt.newLoop(Y));break;case i.db.LINETYPE.BREAK_END:y=kt.endLoop(),ke.drawLoop(h,y,"break",rt),kt.bumpVerticalPos(y.stopy-kt.getVerticalPos()),kt.models.addLoop(y);break;default:try{nt=D.msgModel,nt.starty=kt.getVerticalPos(),nt.sequenceIndex=R,nt.sequenceVisible=i.db.showSequenceNumbers();const Y=HP(h,nt);V.push({messageModel:nt,lineStartY:Y}),kt.models.addMessage(nt)}catch(Y){I.error("error while drawing message",Y)}}[i.db.LINETYPE.SOLID_OPEN,i.db.LINETYPE.DOTTED_OPEN,i.db.LINETYPE.SOLID,i.db.LINETYPE.DOTTED,i.db.LINETYPE.SOLID_CROSS,i.db.LINETYPE.DOTTED_CROSS,i.db.LINETYPE.SOLID_POINT,i.db.LINETYPE.DOTTED_POINT].includes(D.type)&&(R=R+P)}),V.forEach(D=>qP(h,D.messageModel,D.lineStartY,i)),rt.mirrorActors&&(kt.bumpVerticalPos(rt.boxMargin*2),Xu(h,u,d,kt.getVerticalPos(),rt,p,!0),kt.bumpVerticalPos(rt.boxMargin),L3(h,kt.getVerticalPos())),kt.models.boxes.forEach(function(D){D.height=kt.getVerticalPos()-D.y,kt.insert(D.x,D.y,D.x+D.width,D.height),D.startx=D.x,D.starty=D.y,D.stopx=D.startx+D.width,D.stopy=D.starty+D.height,D.stroke="rgb(0,0,0, 0.5)",ke.drawBox(h,D,rt)}),b&&kt.bumpVerticalPos(rt.boxMargin);const O=D3(h,u,d,l),{bounds:F}=kt.getBounds();I.debug("For line height fix Querying: #"+e+" .actor-line"),c1("#"+e+" .actor-line").attr("y2",F.stopy);let S=F.stopy-F.starty;S<O.maxHeight&&(S=O.maxHeight);let E=S+2*rt.diagramMarginY;rt.mirrorActors&&(E=E-rt.boxMargin+rt.bottomMarginAdj);let _=F.stopx-F.startx;_<O.maxWidth&&(_=O.maxWidth);const w=_+2*rt.diagramMarginX;m&&h.append("text").text(m).attr("x",(F.stopx-F.startx)/2-2*rt.diagramMarginX).attr("y",-25),ni(h,E,w,rt.useMaxWidth);const g=m?40:0;h.attr("viewBox",F.startx-rt.diagramMarginX+" -"+(rt.diagramMarginY+g)+" "+w+" "+(E+g)),I.debug("models:",kt.models)};function $P(t,e,r){const i={};return e.forEach(function(n){if(t[n.to]&&t[n.from]){const s=t[n.to];if(n.placement===r.db.PLACEMENT.LEFTOF&&!s.prevActor||n.placement===r.db.PLACEMENT.RIGHTOF&&!s.nextActor)return;const a=n.placement!==void 0,o=!a,l=a?ss(rt):Wn(rt),h=n.wrap?jt.wrapLabel(n.message,rt.width-2*rt.wrapPadding,l):n.message,f=jt.calculateTextDimensions(h,l).width+2*rt.wrapPadding;o&&n.from===s.nextActor?i[n.to]=Math.max(i[n.to]||0,f):o&&n.from===s.prevActor?i[n.from]=Math.max(i[n.from]||0,f):o&&n.from===n.to?(i[n.from]=Math.max(i[n.from]||0,f/2),i[n.to]=Math.max(i[n.to]||0,f/2)):n.placement===r.db.PLACEMENT.RIGHTOF?i[n.from]=Math.max(i[n.from]||0,f):n.placement===r.db.PLACEMENT.LEFTOF?i[s.prevActor]=Math.max(i[s.prevActor]||0,f):n.placement===r.db.PLACEMENT.OVER&&(s.prevActor&&(i[s.prevActor]=Math.max(i[s.prevActor]||0,f/2)),s.nextActor&&(i[n.from]=Math.max(i[n.from]||0,f/2)))}}),I.debug("maxMessageWidthPerActor:",i),i}const jP=function(t){let e=0;const r=ju(rt);for(const i in t.links){const s=jt.calculateTextDimensions(i,r).width+2*rt.wrapPadding+2*rt.boxMargin;e<s&&(e=s)}return e};function XP(t,e,r){let i=0;Object.keys(t).forEach(s=>{const a=t[s];a.wrap&&(a.description=jt.wrapLabel(a.description,rt.width-2*rt.wrapPadding,ju(rt)));const o=jt.calculateTextDimensions(a.description,ju(rt));a.width=a.wrap?rt.width:Math.max(rt.width,o.width+2*rt.wrapPadding),a.height=a.wrap?Math.max(o.height,rt.height):rt.height,i=Math.max(i,a.height)});for(const s in e){const a=t[s];if(!a)continue;const o=t[a.nextActor];if(!o){const f=e[s]+rt.actorMargin-a.width/2;a.margin=Math.max(f,rt.actorMargin);continue}const h=e[s]+rt.actorMargin-a.width/2-o.width/2;a.margin=Math.max(h,rt.actorMargin)}let n=0;return r.forEach(s=>{const a=Wn(rt);let o=s.actorKeys.reduce((u,f)=>u+=t[f].width+(t[f].margin||0),0);o-=2*rt.boxTextMargin,s.wrap&&(s.name=jt.wrapLabel(s.name,o-2*rt.wrapPadding,a));const l=jt.calculateTextDimensions(s.name,a);n=Math.max(l.height,n);const h=Math.max(o,l.width+2*rt.wrapPadding);if(s.margin=rt.boxTextMargin,o<h){const u=(h-o)/2;s.margin+=u}}),r.forEach(s=>s.textMaxHeight=n),Math.max(i,rt.height)}const KP=function(t,e,r){const i=e[t.from].x,n=e[t.to].x,s=t.wrap&&t.message;let a=jt.calculateTextDimensions(s?jt.wrapLabel(t.message,rt.width,ss(rt)):t.message,ss(rt));const o={width:s?rt.width:Math.max(rt.width,a.width+2*rt.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===r.db.PLACEMENT.RIGHTOF?(o.width=s?Math.max(rt.width,a.width):Math.max(e[t.from].width/2+e[t.to].width/2,a.width+2*rt.noteMargin),o.startx=i+(e[t.from].width+rt.actorMargin)/2):t.placement===r.db.PLACEMENT.LEFTOF?(o.width=Math.max(s?rt.width:e[t.from].width/2+e[t.to].width/2,a.width+2*rt.noteMargin),o.startx=i-o.width+(e[t.from].width-rt.actorMargin)/2):t.to===t.from?(a=jt.calculateTextDimensions(s?jt.wrapLabel(t.message,Math.max(rt.width,e[t.from].width),ss(rt)):t.message,ss(rt)),o.width=s?Math.max(rt.width,e[t.from].width):Math.max(e[t.from].width,rt.width,a.width+2*rt.noteMargin),o.startx=i+(e[t.from].width-o.width)/2):(o.width=Math.abs(i+e[t.from].width/2-(n+e[t.to].width/2))+rt.actorMargin,o.startx=i<n?i+e[t.from].width/2-rt.actorMargin/2:n+e[t.to].width/2-rt.actorMargin/2),s&&(o.message=jt.wrapLabel(t.message,o.width-2*rt.wrapPadding,ss(rt))),I.debug(`NM:[${o.startx},${o.stopx},${o.starty},${o.stopy}:${o.width},${o.height}=${t.message}]`),o},ZP=function(t,e,r){let i=!1;if([r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT].includes(t.type)&&(i=!0),!i)return{};const n=t2(t.from,e),s=t2(t.to,e),a=n[0]<=s[0]?1:0,o=n[0]<s[0]?0:1,l=[...n,...s],h=Math.abs(s[o]-n[a]);t.wrap&&t.message&&(t.message=jt.wrapLabel(t.message,Math.max(h+2*rt.wrapPadding,rt.width),Wn(rt)));const u=jt.calculateTextDimensions(t.message,Wn(rt));return{width:Math.max(t.wrap?0:u.width+2*rt.wrapPadding,h+2*rt.wrapPadding,rt.width),height:0,startx:n[a],stopx:s[o],starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,l),toBounds:Math.max.apply(null,l)}},QP=function(t,e,r,i){const n={},s=[];let a,o,l;return t.forEach(function(h){switch(h.id=jt.random({length:10}),h.type){case i.db.LINETYPE.LOOP_START:case i.db.LINETYPE.ALT_START:case i.db.LINETYPE.OPT_START:case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.CRITICAL_START:case i.db.LINETYPE.BREAK_START:s.push({id:h.id,msg:h.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case i.db.LINETYPE.ALT_ELSE:case i.db.LINETYPE.PAR_AND:case i.db.LINETYPE.CRITICAL_OPTION:h.message&&(a=s.pop(),n[a.id]=a,n[h.id]=a,s.push(a));break;case i.db.LINETYPE.LOOP_END:case i.db.LINETYPE.ALT_END:case i.db.LINETYPE.OPT_END:case i.db.LINETYPE.PAR_END:case i.db.LINETYPE.CRITICAL_END:case i.db.LINETYPE.BREAK_END:a=s.pop(),n[a.id]=a;break;case i.db.LINETYPE.ACTIVE_START:{const f=e[h.from?h.from.actor:h.to.actor],d=jc(h.from?h.from.actor:h.to.actor).length,p=f.x+f.width/2+(d-1)*rt.activationWidth/2,m={startx:p,stopx:p+rt.activationWidth,actor:h.from.actor,enabled:!0};kt.activations.push(m)}break;case i.db.LINETYPE.ACTIVE_END:{const f=kt.activations.map(d=>d.actor).lastIndexOf(h.from.actor);delete kt.activations.splice(f,1)[0]}break}h.placement!==void 0?(o=KP(h,e,i),h.noteModel=o,s.forEach(f=>{a=f,a.from=Math.min(a.from,o.startx),a.to=Math.max(a.to,o.startx+o.width),a.width=Math.max(a.width,Math.abs(a.from-a.to))-rt.labelBoxWidth})):(l=ZP(h,e,i),h.msgModel=l,l.startx&&l.stopx&&s.length>0&&s.forEach(f=>{if(a=f,l.startx===l.stopx){const d=e[h.from],p=e[h.to];a.from=Math.min(d.x-l.width/2,d.x-d.width/2,a.from),a.to=Math.max(p.x+l.width/2,p.x+d.width/2,a.to),a.width=Math.max(a.width,Math.abs(a.to-a.from))-rt.labelBoxWidth}else a.from=Math.min(l.startx,a.from),a.to=Math.max(l.stopx,a.to),a.width=Math.max(a.width,l.width)-rt.labelBoxWidth}))}),kt.activations=[],I.debug("Loop type widths:",n),n},e2={bounds:kt,drawActors:Xu,drawActorsPopup:D3,setConf:I3,draw:GP};var Ku=function(){var t=function(Z,J,X,tt){for(X=X||{},tt=Z.length;tt--;X[Z[tt]]=J);return X},e=[1,2],r=[1,3],i=[1,5],n=[1,7],s=[2,5],a=[1,15],o=[1,17],l=[1,21],h=[1,22],u=[1,23],f=[1,24],d=[1,37],p=[1,25],m=[1,26],b=[1,27],x=[1,28],k=[1,29],v=[1,32],B=[1,33],R=[1,34],P=[1,35],V=[1,36],O=[1,39],F=[1,40],C=[1,41],S=[1,42],E=[1,38],_=[1,45],w=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],g=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],D=[1,4,5,7,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],y=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],N={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,directive:6,SD:7,document:8,line:9,statement:10,classDefStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,class:42,CLASSENTITY_IDS:43,STYLECLASS:44,openDirective:45,typeDirective:46,closeDirective:47,":":48,argDirective:49,direction_tb:50,direction_bt:51,direction_rl:52,direction_lr:53,eol:54,";":55,EDGE_STATE:56,STYLE_SEPARATOR:57,left_of:58,right_of:59,open_directive:60,type_directive:61,arg_directive:62,close_directive:63,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",7:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"class",43:"CLASSENTITY_IDS",44:"STYLECLASS",48:":",50:"direction_tb",51:"direction_bt",52:"direction_rl",53:"direction_lr",55:";",56:"EDGE_STATE",57:"STYLE_SEPARATOR",58:"left_of",59:"right_of",60:"open_directive",61:"type_directive",62:"arg_directive",63:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[10,1],[10,1],[10,1],[10,2],[10,3],[10,4],[10,1],[10,2],[10,1],[10,4],[10,3],[10,6],[10,1],[10,1],[10,1],[10,1],[10,4],[10,4],[10,1],[10,1],[10,2],[10,2],[10,1],[11,3],[11,3],[12,3],[6,3],[6,5],[32,1],[32,1],[32,1],[32,1],[54,1],[54,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1],[45,1],[46,1],[49,1],[47,1]],performAction:function(J,X,tt,ot,at,U,Tt){var $=U.length-1;switch(at){case 4:return ot.setRootDoc(U[$]),U[$];case 5:this.$=[];break;case 6:U[$]!="nl"&&(U[$-1].push(U[$]),this.$=U[$-1]);break;case 7:case 8:this.$=U[$];break;case 9:this.$="nl";break;case 12:this.$=U[$];break;case 13:const A=U[$-1];A.description=ot.trimColon(U[$]),this.$=A;break;case 14:this.$={stmt:"relation",state1:U[$-2],state2:U[$]};break;case 15:const M=ot.trimColon(U[$]);this.$={stmt:"relation",state1:U[$-3],state2:U[$-1],description:M};break;case 19:this.$={stmt:"state",id:U[$-3],type:"default",description:"",doc:U[$-1]};break;case 20:var j=U[$],W=U[$-2].trim();if(U[$].match(":")){var z=U[$].split(":");j=z[0],W=[W,z[1]]}this.$={stmt:"state",id:j,type:"default",description:W};break;case 21:this.$={stmt:"state",id:U[$-3],type:"default",description:U[$-5],doc:U[$-1]};break;case 22:this.$={stmt:"state",id:U[$],type:"fork"};break;case 23:this.$={stmt:"state",id:U[$],type:"join"};break;case 24:this.$={stmt:"state",id:U[$],type:"choice"};break;case 25:this.$={stmt:"state",id:ot.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:U[$-1].trim(),note:{position:U[$-2].trim(),text:U[$].trim()}};break;case 30:this.$=U[$].trim(),ot.setAccTitle(this.$);break;case 31:case 32:this.$=U[$].trim(),ot.setAccDescription(this.$);break;case 33:case 34:this.$={stmt:"classDef",id:U[$-1].trim(),classes:U[$].trim()};break;case 35:this.$={stmt:"applyClass",id:U[$-1].trim(),styleClass:U[$].trim()};break;case 38:ot.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:ot.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:ot.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:ot.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:U[$].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:U[$-2].trim(),classes:[U[$].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:U[$-2].trim(),classes:[U[$].trim()],type:"default",description:""};break;case 50:ot.parseDirective("%%{","open_directive");break;case 51:ot.parseDirective(U[$],"type_directive");break;case 52:U[$]=U[$].trim().replace(/'/g,'"'),ot.parseDirective(U[$],"arg_directive");break;case 53:ot.parseDirective("}%%","close_directive","state");break}},table:[{3:1,4:e,5:r,6:4,7:i,45:6,60:n},{1:[3]},{3:8,4:e,5:r,6:4,7:i,45:6,60:n},{3:9,4:e,5:r,6:4,7:i,45:6,60:n},{3:10,4:e,5:r,6:4,7:i,45:6,60:n},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],s,{8:11}),{46:12,61:[1,13]},{61:[2,50]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:a,5:o,6:30,9:14,10:16,11:18,12:19,13:20,16:l,17:h,19:u,22:f,24:d,25:p,26:m,27:b,28:x,29:k,32:31,33:v,35:B,37:R,38:P,42:V,45:6,50:O,51:F,52:C,53:S,56:E,60:n},{47:43,48:[1,44],63:_},t([48,63],[2,51]),t(w,[2,6]),{6:30,10:46,11:18,12:19,13:20,16:l,17:h,19:u,22:f,24:d,25:p,26:m,27:b,28:x,29:k,32:31,33:v,35:B,37:R,38:P,42:V,45:6,50:O,51:F,52:C,53:S,56:E,60:n},t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(w,[2,11]),t(w,[2,12],{14:[1,47],15:[1,48]}),t(w,[2,16]),{18:[1,49]},t(w,[2,18],{20:[1,50]}),{23:[1,51]},t(w,[2,22]),t(w,[2,23]),t(w,[2,24]),t(w,[2,25]),{30:52,31:[1,53],58:[1,54],59:[1,55]},t(w,[2,28]),t(w,[2,29]),{34:[1,56]},{36:[1,57]},t(w,[2,32]),{39:[1,58],41:[1,59]},{43:[1,60]},t(g,[2,44],{57:[1,61]}),t(g,[2,45],{57:[1,62]}),t(w,[2,38]),t(w,[2,39]),t(w,[2,40]),t(w,[2,41]),t(D,[2,36]),{49:63,62:[1,64]},t(D,[2,53]),t(w,[2,7]),t(w,[2,13]),{13:65,24:d,56:E},t(w,[2,17]),t(y,s,{8:66}),{24:[1,67]},{24:[1,68]},{23:[1,69]},{24:[2,48]},{24:[2,49]},t(w,[2,30]),t(w,[2,31]),{40:[1,70]},{40:[1,71]},{44:[1,72]},{24:[1,73]},{24:[1,74]},{47:75,63:_},{63:[2,52]},t(w,[2,14],{14:[1,76]}),{4:a,5:o,6:30,9:14,10:16,11:18,12:19,13:20,16:l,17:h,19:u,21:[1,77],22:f,24:d,25:p,26:m,27:b,28:x,29:k,32:31,33:v,35:B,37:R,38:P,42:V,45:6,50:O,51:F,52:C,53:S,56:E,60:n},t(w,[2,20],{20:[1,78]}),{31:[1,79]},{24:[1,80]},t(w,[2,33]),t(w,[2,34]),t(w,[2,35]),t(g,[2,46]),t(g,[2,47]),t(D,[2,37]),t(w,[2,15]),t(w,[2,19]),t(y,s,{8:81}),t(w,[2,26]),t(w,[2,27]),{4:a,5:o,6:30,9:14,10:16,11:18,12:19,13:20,16:l,17:h,19:u,21:[1,82],22:f,24:d,25:p,26:m,27:b,28:x,29:k,32:31,33:v,35:B,37:R,38:P,42:V,45:6,50:O,51:F,52:C,53:S,56:E,60:n},t(w,[2,21])],defaultActions:{7:[2,50],8:[2,1],9:[2,2],10:[2,3],54:[2,48],55:[2,49],64:[2,52]},parseError:function(J,X){if(X.recoverable)this.trace(J);else{var tt=new Error(J);throw tt.hash=X,tt}},parse:function(J){var X=this,tt=[0],ot=[],at=[null],U=[],Tt=this.table,$="",j=0,W=0,z=2,A=1,M=U.slice.call(arguments,1),q=Object.create(this.lexer),L={yy:{}};for(var st in this.yy)Object.prototype.hasOwnProperty.call(this.yy,st)&&(L.yy[st]=this.yy[st]);q.setInput(J,L.yy),L.yy.lexer=q,L.yy.parser=this,typeof q.yylloc>"u"&&(q.yylloc={});var T=q.yylloc;U.push(T);var Dt=q.options&&q.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function et(){var Nt;return Nt=ot.pop()||q.lex()||A,typeof Nt!="number"&&(Nt instanceof Array&&(ot=Nt,Nt=ot.pop()),Nt=X.symbols_[Nt]||Nt),Nt}for(var Et,vt,pt,ut,gt={},ht,yt,he,re;;){if(vt=tt[tt.length-1],this.defaultActions[vt]?pt=this.defaultActions[vt]:((Et===null||typeof Et>"u")&&(Et=et()),pt=Tt[vt]&&Tt[vt][Et]),typeof pt>"u"||!pt.length||!pt[0]){var Mt="";re=[];for(ht in Tt[vt])this.terminals_[ht]&&ht>z&&re.push("'"+this.terminals_[ht]+"'");q.showPosition?Mt="Parse error on line "+(j+1)+`:
1262
1262
  `+q.showPosition()+`
1263
1263
  Expecting `+re.join(", ")+", got '"+(this.terminals_[Et]||Et)+"'":Mt="Parse error on line "+(j+1)+": Unexpected "+(Et==A?"end of input":"'"+(this.terminals_[Et]||Et)+"'"),this.parseError(Mt,{text:q.match,token:this.terminals_[Et]||Et,line:q.yylineno,loc:T,expected:re})}if(pt[0]instanceof Array&&pt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+vt+", token: "+Et);switch(pt[0]){case 1:tt.push(Et),at.push(q.yytext),U.push(q.yylloc),tt.push(pt[1]),Et=null,W=q.yyleng,$=q.yytext,j=q.yylineno,T=q.yylloc;break;case 2:if(yt=this.productions_[pt[1]][1],gt.$=at[at.length-yt],gt._$={first_line:U[U.length-(yt||1)].first_line,last_line:U[U.length-1].last_line,first_column:U[U.length-(yt||1)].first_column,last_column:U[U.length-1].last_column},Dt&&(gt._$.range=[U[U.length-(yt||1)].range[0],U[U.length-1].range[1]]),ut=this.performAction.apply(gt,[$,W,j,L.yy,pt[1],at,U].concat(M)),typeof ut<"u")return ut;yt&&(tt=tt.slice(0,-1*yt*2),at=at.slice(0,-1*yt),U=U.slice(0,-1*yt)),tt.push(this.productions_[pt[1]][0]),at.push(gt.$),U.push(gt._$),he=Tt[tt[tt.length-2]][tt[tt.length-1]],tt.push(he);break;case 3:return!0}}return!0}},nt=function(){var Z={EOF:1,parseError:function(X,tt){if(this.yy.parser)this.yy.parser.parseError(X,tt);else throw new Error(X)},setInput:function(J,X){return this.yy=X||this.yy||{},this._input=J,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},input:function(){var J=this._input[0];this.yytext+=J,this.yyleng++,this.offset++,this.match+=J,this.matched+=J;var X=J.match(/(?:\r\n?|\n).*/g);return X?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),J},unput:function(J){var X=J.length,tt=J.split(/(?:\r\n?|\n)/g);this._input=J+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-X),this.offset-=X;var ot=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),tt.length-1&&(this.yylineno-=tt.length-1);var at=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:tt?(tt.length===ot.length?this.yylloc.first_column:0)+ot[ot.length-tt.length].length-tt[0].length:this.yylloc.first_column-X},this.options.ranges&&(this.yylloc.range=[at[0],at[0]+this.yyleng-X]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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).
1264
1264
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(J){this.unput(this.match.slice(J))},pastInput:function(){var J=this.matched.substr(0,this.matched.length-this.match.length);return(J.length>20?"...":"")+J.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var J=this.match;return J.length<20&&(J+=this._input.substr(0,20-J.length)),(J.substr(0,20)+(J.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var J=this.pastInput(),X=new Array(J.length+1).join("-");return J+this.upcomingInput()+`
1265
1265
  `+X+"^"},test_match:function(J,X){var tt,ot,at;if(this.options.backtrack_lexer&&(at={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&&(at.yylloc.range=this.yylloc.range.slice(0))),ot=J[0].match(/(?:\r\n?|\n).*/g),ot&&(this.yylineno+=ot.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ot?ot[ot.length-1].length-ot[ot.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+J[0].length},this.yytext+=J[0],this.match+=J[0],this.matches=J,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(J[0].length),this.matched+=J[0],tt=this.performAction.call(this,this.yy,this,X,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),tt)return tt;if(this._backtrack){for(var U in at)this[U]=at[U];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var J,X,tt,ot;this._more||(this.yytext="",this.match="");for(var at=this._currentRules(),U=0;U<at.length;U++)if(tt=this._input.match(this.rules[at[U]]),tt&&(!X||tt[0].length>X[0].length)){if(X=tt,ot=U,this.options.backtrack_lexer){if(J=this.test_match(tt,at[U]),J!==!1)return J;if(this._backtrack){X=!1;continue}else return!1}else if(!this.options.flex)break}return X?(J=this.test_match(X,at[ot]),J!==!1?J:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1266
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var X=this.next();return X||this.lex()},begin:function(X){this.conditionStack.push(X)},popState:function(){var X=this.conditionStack.length-1;return X>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(X){return X=this.conditionStack.length-1-Math.abs(X||0),X>=0?this.conditionStack[X]:"INITIAL"},pushState:function(X){this.begin(X)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(X,tt,ot,at){switch(ot){case 0:return 41;case 1:return 50;case 2:return 51;case 3:return 52;case 4:return 53;case 5:return this.begin("open_directive"),60;case 6:return this.begin("type_directive"),61;case 7:return this.popState(),this.begin("arg_directive"),48;case 8:return this.popState(),this.popState(),63;case 9:return 62;case 10:break;case 11:break;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:break;case 17:return this.pushState("SCALE"),17;case 18:return 18;case 19:this.popState();break;case 20:return this.begin("acc_title"),33;case 21:return this.popState(),"acc_title_value";case 22:return this.begin("acc_descr"),35;case 23:return this.popState(),"acc_descr_value";case 24:this.begin("acc_descr_multiline");break;case 25:this.popState();break;case 26:return"acc_descr_multiline_value";case 27:return this.pushState("CLASSDEF"),38;case 28:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 29:return this.popState(),this.pushState("CLASSDEFID"),39;case 30:return this.popState(),40;case 31:return this.pushState("CLASS"),42;case 32:return this.popState(),this.pushState("CLASS_STYLE"),43;case 33:return this.popState(),44;case 34:return this.pushState("SCALE"),17;case 35:return 18;case 36:this.popState();break;case 37:this.pushState("STATE");break;case 38:return this.popState(),tt.yytext=tt.yytext.slice(0,-8).trim(),25;case 39:return this.popState(),tt.yytext=tt.yytext.slice(0,-8).trim(),26;case 40:return this.popState(),tt.yytext=tt.yytext.slice(0,-10).trim(),27;case 41:return this.popState(),tt.yytext=tt.yytext.slice(0,-8).trim(),25;case 42:return this.popState(),tt.yytext=tt.yytext.slice(0,-8).trim(),26;case 43:return this.popState(),tt.yytext=tt.yytext.slice(0,-10).trim(),27;case 44:return 50;case 45:return 51;case 46:return 52;case 47:return 53;case 48:this.pushState("STATE_STRING");break;case 49:return this.pushState("STATE_ID"),"AS";case 50:return this.popState(),"ID";case 51:this.popState();break;case 52:return"STATE_DESCR";case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState("struct"),20;case 56:break;case 57:return this.popState(),21;case 58:break;case 59:return this.begin("NOTE"),29;case 60:return this.popState(),this.pushState("NOTE_ID"),58;case 61:return this.popState(),this.pushState("NOTE_ID"),59;case 62:this.popState(),this.pushState("FLOATING_NOTE");break;case 63:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 64:break;case 65:return"NOTE_TEXT";case 66:return this.popState(),"ID";case 67:return this.popState(),this.pushState("NOTE_TEXT"),24;case 68:return this.popState(),tt.yytext=tt.yytext.substr(2).trim(),31;case 69:return this.popState(),tt.yytext=tt.yytext.slice(0,-8).trim(),31;case 70:return 7;case 71:return 7;case 72:return 16;case 73:return 56;case 74:return 24;case 75:return tt.yytext=tt.yytext.trim(),14;case 76:return 15;case 77:return 28;case 78:return 57;case 79:return 5;case 80:return"INVALID"}},rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[14,15],inclusive:!1},close_directive:{rules:[14,15],inclusive:!1},arg_directive:{rules:[8,9,14,15],inclusive:!1},type_directive:{rules:[7,8,14,15],inclusive:!1},open_directive:{rules:[6,14,15],inclusive:!1},struct:{rules:[14,15,27,31,37,44,45,46,47,56,57,58,59,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[66],inclusive:!1},FLOATING_NOTE:{rules:[63,64,65],inclusive:!1},NOTE_TEXT:{rules:[68,69],inclusive:!1},NOTE_ID:{rules:[67],inclusive:!1},NOTE:{rules:[60,61,62],inclusive:!1},CLASS_STYLE:{rules:[33],inclusive:!1},CLASS:{rules:[32],inclusive:!1},CLASSDEFID:{rules:[30],inclusive:!1},CLASSDEF:{rules:[28,29],inclusive:!1},acc_descr_multiline:{rules:[25,26],inclusive:!1},acc_descr:{rules:[23],inclusive:!1},acc_title:{rules:[21],inclusive:!1},SCALE:{rules:[18,19,35,36],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[50],inclusive:!1},STATE_STRING:{rules:[51,52],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[14,15,38,39,40,41,42,43,48,49,53,54,55],inclusive:!1},ID:{rules:[14,15],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,10,11,12,13,15,16,17,20,22,24,27,31,34,37,55,59,70,71,72,73,74,75,76,78,79,80],inclusive:!0}}};return Z}();N.lexer=nt;function Y(){this.yy={}}return Y.prototype=N,N.Parser=Y,new Y}();Ku.parser=Ku;const e2=Ku,QP=(t,e)=>{var r;return((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:t.match(/^\s*stateDiagram/)!==null},JP=(t,e)=>{var r;return!!(t.match(/^\s*stateDiagram-v2/)!==null||t.match(/^\s*stateDiagram/)&&((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},tV="LR",eV="TB",ec="state",x0="relation",rV="classDef",iV="applyClass",bo="default",I3="divider",v0="[*]",M3="start",N3=v0,R3="end",r2="color",i2="fill",nV="bgFill",sV=",";function O3(){return{}}let F3=tV,rc=[],Ca=O3();const P3=()=>({relations:[],states:{},documents:{}});let ic={root:P3()},nr=ic.root,Qa=0,n2=0;const aV={LINE:0,DOTTED_LINE:1},oV={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},Fo=t=>JSON.parse(JSON.stringify(t)),lV=function(t,e,r){xe.parseDirective(this,t,e,r)},cV=t=>{I.info("Setting root doc",t),rc=t},hV=()=>rc,nl=(t,e,r)=>{if(e.stmt===x0)nl(t,e.state1,!0),nl(t,e.state2,!1);else if(e.stmt===ec&&(e.id==="[*]"?(e.id=r?t.id+"_start":t.id+"_end",e.start=r):e.id=e.id.trim()),e.doc){const i=[];let n=[],s;for(s=0;s<e.doc.length;s++)if(e.doc[s].type===I3){const a=Fo(e.doc[s]);a.doc=Fo(n),i.push(a),n=[]}else n.push(e.doc[s]);if(i.length>0&&n.length>0){const a={stmt:ec,id:hy(),type:"divider",doc:Fo(n)};i.push(Fo(a)),e.doc=i}e.doc.forEach(a=>nl(e,a,!0))}},uV=()=>(nl({id:"root"},{id:"root",doc:rc},!0),{id:"root",doc:rc}),fV=t=>{let e;t.doc?e=t.doc:e=t,I.info(e),V3(!0),I.info("Extract",e),e.forEach(r=>{switch(r.stmt){case ec:Hn(r.id.trim(),r.type,r.doc,r.description,r.note,r.classes,r.styles,r.textStyles);break;case x0:Y3(r.state1,r.state2,r.description);break;case rV:z3(r.id.trim(),r.classes);break;case iV:k0(r.id.trim(),r.styleClass);break}})},Hn=function(t,e=bo,r=null,i=null,n=null,s=null,a=null,o=null){const l=t==null?void 0:t.trim();nr.states[l]===void 0?(I.info("Adding state ",l,i),nr.states[l]={id:l,descriptions:[],type:e,doc:r,note:n,classes:[],styles:[],textStyles:[]}):(nr.states[l].doc||(nr.states[l].doc=r),nr.states[l].type||(nr.states[l].type=e)),i&&(I.info("Setting state description",l,i),typeof i=="string"&&Ju(l,i.trim()),typeof i=="object"&&i.forEach(h=>Ju(l,h.trim()))),n&&(nr.states[l].note=n,nr.states[l].note.text=Xt.sanitizeText(nr.states[l].note.text,G())),s&&(I.info("Setting state classes",l,s),(typeof s=="string"?[s]:s).forEach(u=>k0(l,u.trim()))),a&&(I.info("Setting state styles",l,a),(typeof a=="string"?[a]:a).forEach(u=>kV(l,u.trim()))),o&&(I.info("Setting state styles",l,a),(typeof o=="string"?[o]:o).forEach(u=>wV(l,u.trim())))},V3=function(t){ic={root:P3()},nr=ic.root,Qa=0,Ca=O3(),t||Lr()},Ja=function(t){return nr.states[t]},dV=function(){return nr.states},pV=function(){I.info("Documents = ",ic)},gV=function(){return nr.relations};function Zu(t=""){let e=t;return t===v0&&(Qa++,e=`${M3}${Qa}`),e}function Qu(t="",e=bo){return t===v0?M3:e}function yV(t=""){let e=t;return t===N3&&(Qa++,e=`${R3}${Qa}`),e}function mV(t="",e=bo){return t===N3?R3:e}function bV(t,e,r){let i=Zu(t.id.trim()),n=Qu(t.id.trim(),t.type),s=Zu(e.id.trim()),a=Qu(e.id.trim(),e.type);Hn(i,n,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),Hn(s,a,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),nr.relations.push({id1:i,id2:s,relationTitle:Xt.sanitizeText(r,G())})}const Y3=function(t,e,r){if(typeof t=="object")bV(t,e,r);else{const i=Zu(t.trim()),n=Qu(t),s=yV(e.trim()),a=mV(e);Hn(i,n),Hn(s,a),nr.relations.push({id1:i,id2:s,title:Xt.sanitizeText(r,G())})}},Ju=function(t,e){const r=nr.states[t],i=e.startsWith(":")?e.replace(":","").trim():e;r.descriptions.push(Xt.sanitizeText(i,G()))},_V=function(t){return t.substring(0,1)===":"?t.substr(2).trim():t.trim()},xV=()=>(n2++,"divider-id-"+n2),z3=function(t,e=""){Ca[t]===void 0&&(Ca[t]={id:t,styles:[],textStyles:[]});const r=Ca[t];e!=null&&e.split(sV).forEach(i=>{const n=i.replace(/([^;]*);/,"$1").trim();if(i.match(r2)){const a=n.replace(i2,nV).replace(r2,i2);r.textStyles.push(a)}r.styles.push(n)})},vV=function(){return Ca},k0=function(t,e){t.split(",").forEach(function(r){let i=Ja(r);if(i===void 0){const n=r.trim();Hn(n),i=Ja(n)}i.classes.push(e)})},kV=function(t,e){const r=Ja(t);r!==void 0&&r.textStyles.push(e)},wV=function(t,e){const r=Ja(t);r!==void 0&&r.textStyles.push(e)},TV=()=>F3,EV=t=>{F3=t},CV=t=>t&&t[0]===":"?t.substr(1).trim():t.trim(),Ri={parseDirective:lV,getConfig:()=>G().state,addState:Hn,clear:V3,getState:Ja,getStates:dV,getRelations:gV,getClasses:vV,getDirection:TV,addRelation:Y3,getDividerId:xV,setDirection:EV,cleanupLabel:_V,lineType:aV,relationType:oV,logDocuments:pV,getRootDoc:hV,setRootDoc:cV,getRootDocV2:uV,extract:fV,trimColon:CV,getAccTitle:Br,setAccTitle:kr,getAccDescription:Ir,setAccDescription:Dr,addStyleClass:z3,setCssClass:k0,addDescription:Ju,setDiagramTitle:si,getDiagramTitle:ai},SV=t=>t.append("circle").attr("class","start-state").attr("r",G().state.sizeUnit).attr("cx",G().state.padding+G().state.sizeUnit).attr("cy",G().state.padding+G().state.sizeUnit),AV=t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",G().state.textHeight).attr("class","divider").attr("x2",G().state.textHeight*2).attr("y1",0).attr("y2",0),LV=(t,e)=>{const r=t.append("text").attr("x",2*G().state.padding).attr("y",G().state.textHeight+2*G().state.padding).attr("font-size",G().state.fontSize).attr("class","state-title").text(e.id),i=r.node().getBBox();return t.insert("rect",":first-child").attr("x",G().state.padding).attr("y",G().state.padding).attr("width",i.width+2*G().state.padding).attr("height",i.height+2*G().state.padding).attr("rx",G().state.radius),r},BV=(t,e)=>{const r=function(d,p,m){const b=d.append("tspan").attr("x",2*G().state.padding).text(p);m||b.attr("dy",G().state.textHeight)},n=t.append("text").attr("x",2*G().state.padding).attr("y",G().state.textHeight+1.3*G().state.padding).attr("font-size",G().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),s=n.height,a=t.append("text").attr("x",G().state.padding).attr("y",s+G().state.padding*.4+G().state.dividerMargin+G().state.textHeight).attr("class","state-description");let o=!0,l=!0;e.descriptions.forEach(function(d){o||(r(a,d,l),l=!1),o=!1});const h=t.append("line").attr("x1",G().state.padding).attr("y1",G().state.padding+s+G().state.dividerMargin/2).attr("y2",G().state.padding+s+G().state.dividerMargin/2).attr("class","descr-divider"),u=a.node().getBBox(),f=Math.max(u.width,n.width);return h.attr("x2",f+3*G().state.padding),t.insert("rect",":first-child").attr("x",G().state.padding).attr("y",G().state.padding).attr("width",f+2*G().state.padding).attr("height",u.height+s+2*G().state.padding).attr("rx",G().state.radius),t},DV=(t,e,r)=>{const i=G().state.padding,n=2*G().state.padding,s=t.node().getBBox(),a=s.width,o=s.x,l=t.append("text").attr("x",0).attr("y",G().state.titleShift).attr("font-size",G().state.fontSize).attr("class","state-title").text(e.id),u=l.node().getBBox().width+n;let f=Math.max(u,a);f===a&&(f=f+n);let d;const p=t.node().getBBox();e.doc,d=o-i,u>a&&(d=(a-f)/2+i),Math.abs(o-p.x)<i&&u>a&&(d=o-(u-a)/2);const m=1-G().state.textHeight;return t.insert("rect",":first-child").attr("x",d).attr("y",m).attr("class",r?"alt-composit":"composit").attr("width",f).attr("height",p.height+G().state.textHeight+G().state.titleShift+1).attr("rx","0"),l.attr("x",d+i),u<=a&&l.attr("x",o+(f-n)/2-u/2+i),t.insert("rect",":first-child").attr("x",d).attr("y",G().state.titleShift-G().state.textHeight-G().state.padding).attr("width",f).attr("height",G().state.textHeight*3).attr("rx",G().state.radius),t.insert("rect",":first-child").attr("x",d).attr("y",G().state.titleShift-G().state.textHeight-G().state.padding).attr("width",f).attr("height",p.height+3+2*G().state.textHeight).attr("rx",G().state.radius),t},IV=t=>(t.append("circle").attr("class","end-state-outer").attr("r",G().state.sizeUnit+G().state.miniPadding).attr("cx",G().state.padding+G().state.sizeUnit+G().state.miniPadding).attr("cy",G().state.padding+G().state.sizeUnit+G().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",G().state.sizeUnit).attr("cx",G().state.padding+G().state.sizeUnit+2).attr("cy",G().state.padding+G().state.sizeUnit+2)),MV=(t,e)=>{let r=G().state.forkWidth,i=G().state.forkHeight;if(e.parentId){let n=r;r=i,i=n}return t.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",i).attr("x",G().state.padding).attr("y",G().state.padding)},NV=(t,e,r,i)=>{let n=0;const s=i.append("text");s.style("text-anchor","start"),s.attr("class","noteText");let a=t.replace(/\r\n/g,"<br/>");a=a.replace(/\n/g,"<br/>");const o=a.split(Xt.lineBreakRegex);let l=1.25*G().state.noteMargin;for(const h of o){const u=h.trim();if(u.length>0){const f=s.append("tspan");if(f.text(u),l===0){const d=f.node().getBBox();l+=d.height}n+=l,f.attr("x",e+G().state.noteMargin),f.attr("y",r+n+1.25*G().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:n}},RV=(t,e)=>{e.attr("class","state-note");const r=e.append("rect").attr("x",0).attr("y",G().state.padding),i=e.append("g"),{textWidth:n,textHeight:s}=NV(t,0,0,i);return r.attr("height",s+2*G().state.noteMargin),r.attr("width",n+G().state.noteMargin*2),r},s2=function(t,e){const r=e.id,i={id:r,label:e.id,width:0,height:0},n=t.append("g").attr("id",r).attr("class","stateGroup");e.type==="start"&&SV(n),e.type==="end"&&IV(n),(e.type==="fork"||e.type==="join")&&MV(n,e),e.type==="note"&&RV(e.note.text,n),e.type==="divider"&&AV(n),e.type==="default"&&e.descriptions.length===0&&LV(n,e),e.type==="default"&&e.descriptions.length>0&&BV(n,e);const s=n.node().getBBox();return i.width=s.width+2*G().state.padding,i.height=s.height+2*G().state.padding,i};let a2=0;const OV=function(t,e,r){const i=function(l){switch(l){case Ri.relationType.AGGREGATION:return"aggregation";case Ri.relationType.EXTENSION:return"extension";case Ri.relationType.COMPOSITION:return"composition";case Ri.relationType.DEPENDENCY:return"dependency"}};e.points=e.points.filter(l=>!Number.isNaN(l.y));const n=e.points,s=Us().x(function(l){return l.x}).y(function(l){return l.y}).curve(Ss),a=t.append("path").attr("d",s(n)).attr("id","edge"+a2).attr("class","transition");let o="";if(G().state.arrowMarkerAbsolute&&(o=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,o=o.replace(/\(/g,"\\("),o=o.replace(/\)/g,"\\)")),a.attr("marker-end","url("+o+"#"+i(Ri.relationType.DEPENDENCY)+"End)"),r.title!==void 0){const l=t.append("g").attr("class","stateLabel"),{x:h,y:u}=jt.calcLabelPosition(e.points),f=Xt.getRows(r.title);let d=0;const p=[];let m=0,b=0;for(let v=0;v<=f.length;v++){const B=l.append("text").attr("text-anchor","middle").text(f[v]).attr("x",h).attr("y",u+d),R=B.node().getBBox();m=Math.max(m,R.width),b=Math.min(b,R.x),I.info(R.x,h,u+d),d===0&&(d=B.node().getBBox().height,I.info("Title height",d,u)),p.push(B)}let x=d*f.length;if(f.length>1){const v=(f.length-1)*d*.5;p.forEach((B,R)=>B.attr("y",u+R*d-v)),x=d*f.length}const k=l.node().getBBox();l.insert("rect",":first-child").attr("class","box").attr("x",h-m/2-G().state.padding/2).attr("y",u-x/2-G().state.padding/2-3.5).attr("width",m+G().state.padding).attr("height",x+G().state.padding),I.info(k)}a2++};let Tr;const Ph={},FV=function(){},PV=function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},VV=function(t,e,r,i){Tr=G().state;const n=G().securityLevel;let s;n==="sandbox"&&(s=_t("#i"+e));const a=_t(n==="sandbox"?s.nodes()[0].contentDocument.body:"body"),o=n==="sandbox"?s.nodes()[0].contentDocument:document;I.debug("Rendering diagram "+t);const l=a.select(`[id='${e}']`);PV(l),new Pe({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel(function(){return{}});const u=i.db.getRootDoc();U3(u,l,void 0,!1,a,o,i);const f=Tr.padding,d=l.node().getBBox(),p=d.width+f*2,m=d.height+f*2,b=p*1.75;ni(l,m,b,Tr.useMaxWidth),l.attr("viewBox",`${d.x-Tr.padding} ${d.y-Tr.padding} `+p+" "+m)},YV=t=>t?t.length*Tr.fontSizeFactor:1,U3=(t,e,r,i,n,s,a)=>{const o=new Pe({compound:!0,multigraph:!0});let l,h=!0;for(l=0;l<t.length;l++)if(t[l].stmt==="relation"){h=!1;break}r?o.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:h?1:Tr.edgeLengthFactor,nodeSep:h?1:50,isMultiGraph:!0}):o.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:h?1:Tr.edgeLengthFactor,nodeSep:h?1:50,ranker:"tight-tree",isMultiGraph:!0}),o.setDefaultEdgeLabel(function(){return{}}),a.db.extract(t);const u=a.db.getStates(),f=a.db.getRelations(),d=Object.keys(u);for(const k of d){const v=u[k];r&&(v.parentId=r);let B;if(v.doc){let R=e.append("g").attr("id",v.id).attr("class","stateGroup");B=U3(v.doc,R,v.id,!i,n,s,a);{R=DV(R,v,i);let P=R.node().getBBox();B.width=P.width,B.height=P.height+Tr.padding/2,Ph[v.id]={y:Tr.compositTitleSize}}}else B=s2(e,v);if(v.note){const R={descriptions:[],id:v.id+"-note",note:v.note,type:"note"},P=s2(e,R);v.note.position==="left of"?(o.setNode(B.id+"-note",P),o.setNode(B.id,B)):(o.setNode(B.id,B),o.setNode(B.id+"-note",P)),o.setParent(B.id,B.id+"-group"),o.setParent(B.id+"-note",B.id+"-group")}else o.setNode(B.id,B)}I.debug("Count=",o.nodeCount(),o);let p=0;f.forEach(function(k){p++,I.debug("Setting edge",k),o.setEdge(k.id1,k.id2,{relation:k,width:YV(k.title),height:Tr.labelHeight*Xt.getRows(k.title).length,labelpos:"c"},"id"+p)}),$s(o),I.debug("Graph after layout",o.nodes());const m=e.node();o.nodes().forEach(function(k){k!==void 0&&o.node(k)!==void 0?(I.warn("Node "+k+": "+JSON.stringify(o.node(k))),n.select("#"+m.id+" #"+k).attr("transform","translate("+(o.node(k).x-o.node(k).width/2)+","+(o.node(k).y+(Ph[k]?Ph[k].y:0)-o.node(k).height/2)+" )"),n.select("#"+m.id+" #"+k).attr("data-x-shift",o.node(k).x-o.node(k).width/2),s.querySelectorAll("#"+m.id+" #"+k+" .divider").forEach(B=>{const R=B.parentElement;let P=0,V=0;R&&(R.parentElement&&(P=R.parentElement.getBBox().width),V=parseInt(R.getAttribute("data-x-shift"),10),Number.isNaN(V)&&(V=0)),B.setAttribute("x1",0-V+8),B.setAttribute("x2",P-V-8)})):I.debug("No Node "+k+": "+JSON.stringify(o.node(k)))});let b=m.getBBox();o.edges().forEach(function(k){k!==void 0&&o.edge(k)!==void 0&&(I.debug("Edge "+k.v+" -> "+k.w+": "+JSON.stringify(o.edge(k))),OV(e,o.edge(k),o.edge(k).relation))}),b=m.getBBox();const x={id:r||"root",label:r||"root",width:0,height:0};return x.width=b.width+2*Tr.padding,x.height=b.height+2*Tr.padding,I.debug("Doc rendered",x,o),x},zV={setConf:FV,draw:VV},sl="rect",Vh="rectWithTitle",UV="start",WV="end",HV="divider",qV="roundedWithTitle",GV="note",$V="noteGroup",Ys="statediagram",jV="state",XV=`${Ys}-${jV}`,W3="transition",KV="note",ZV="note-edge",QV=`${W3} ${ZV}`,JV=`${Ys}-${KV}`,tY="cluster",eY=`${Ys}-${tY}`,rY="cluster-alt",iY=`${Ys}-${rY}`,H3="parent",q3="note",nY="state",w0="----",sY=`${w0}${q3}`,o2=`${w0}${H3}`,G3="fill:none",$3="fill: #333",j3="c",X3="text",K3="normal";let al={},nn=0;const aY=function(t){const e=Object.keys(t);for(const r of e)t[r]},oY=function(t,e){I.trace("Extracting classes"),e.db.clear();try{return e.parser.parse(t),e.db.extract(e.db.getRootDocV2()),e.db.getClasses()}catch(r){return r}};function lY(t){return t==null?"":t.classes?t.classes.join(" "):""}function Yh(t="",e=0,r="",i=w0){const n=r!==null&&r.length>0?`${i}${r}`:"";return`${nY}-${t}${n}-${e}`}const pa=(t,e,r,i,n,s)=>{const a=r.id,o=lY(i[a]);if(a!=="root"){let l=sl;r.start===!0&&(l=UV),r.start===!1&&(l=WV),r.type!==bo&&(l=r.type),al[a]||(al[a]={id:a,shape:l,description:Xt.sanitizeText(a,G()),classes:`${o} ${XV}`});const h=al[a];r.description&&(Array.isArray(h.description)?(h.shape=Vh,h.description.push(r.description)):h.description.length>0?(h.shape=Vh,h.description===a?h.description=[r.description]:h.description=[h.description,r.description]):(h.shape=sl,h.description=r.description),h.description=Xt.sanitizeTextOrArray(h.description,G())),h.description.length===1&&h.shape===Vh&&(h.shape=sl),!h.type&&r.doc&&(I.info("Setting cluster for ",a,t1(r)),h.type="group",h.dir=t1(r),h.shape=r.type===I3?HV:qV,h.classes=h.classes+" "+eY+" "+(s?iY:""));const u={labelStyle:"",shape:h.shape,labelText:h.description,classes:h.classes,style:"",id:a,dir:h.dir,domId:Yh(a,nn),type:h.type,padding:15};if(r.note){const f={labelStyle:"",shape:GV,labelText:r.note.text,classes:JV,style:"",id:a+sY+"-"+nn,domId:Yh(a,nn,q3),type:h.type,padding:15},d={labelStyle:"",shape:$V,labelText:r.note.text,classes:h.classes,style:"",id:a+o2,domId:Yh(a,nn,H3),type:"group",padding:0};nn++;const p=a+o2;t.setNode(p,d),t.setNode(f.id,f),t.setNode(a,u),t.setParent(a,p),t.setParent(f.id,p);let m=a,b=f.id;r.note.position==="left of"&&(m=f.id,b=a),t.setEdge(m,b,{arrowhead:"none",arrowType:"",style:G3,labelStyle:"",classes:QV,arrowheadStyle:$3,labelpos:j3,labelType:X3,thickness:K3})}else t.setNode(a,u)}e&&e.id!=="root"&&(I.trace("Setting node ",a," to be child of its parent ",e.id),t.setParent(a,e.id)),r.doc&&(I.trace("Adding nodes children "),cY(t,r,r.doc,i,n,!s))},cY=(t,e,r,i,n,s)=>{I.trace("items",r),r.forEach(a=>{switch(a.stmt){case ec:pa(t,e,a,i,n,s);break;case bo:pa(t,e,a,i,n,s);break;case x0:{pa(t,e,a.state1,i,n,s),pa(t,e,a.state2,i,n,s);const o={id:"edge"+nn,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:G3,labelStyle:"",label:Xt.sanitizeText(a.description,G()),arrowheadStyle:$3,labelpos:j3,labelType:X3,thickness:K3,classes:W3};t.setEdge(a.state1.id,a.state2.id,o,nn),nn++}break}})},t1=(t,e=eV)=>{let r=e;if(t.doc)for(let i=0;i<t.doc.length;i++){const n=t.doc[i];n.stmt==="dir"&&(r=n.value)}return r},hY=function(t,e,r,i){I.info("Drawing state diagram (v2)",e),al={},i.db.getDirection();const{securityLevel:n,state:s}=G(),a=s.nodeSpacing||50,o=s.rankSpacing||50;I.info(i.db.getRootDocV2()),i.db.extract(i.db.getRootDocV2()),I.info(i.db.getRootDocV2());const l=i.db.getStates(),h=new Pe({multigraph:!0,compound:!0}).setGraph({rankdir:t1(i.db.getRootDocV2()),nodesep:a,ranksep:o,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});pa(h,void 0,i.db.getRootDocV2(),l,i.db,!0);let u;n==="sandbox"&&(u=_t("#i"+e));const f=_t(n==="sandbox"?u.nodes()[0].contentDocument.body:"body"),d=f.select(`[id="${e}"]`),p=f.select("#"+e+" g");n0(p,h,["barb"],Ys,e);const m=8;jt.insertTitle(d,"statediagramTitleText",s.titleTopMargin,i.db.getDiagramTitle());const b=d.node().getBBox(),x=b.width+m*2,k=b.height+m*2;d.attr("class",Ys);const v=d.node().getBBox();ni(d,k,x,s.useMaxWidth);const B=`${v.x-m} ${v.y-m} ${x} ${k}`;I.debug(`viewBox ${B}`),d.attr("viewBox",B);const R=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const P of R){const V=P.getBBox(),O=document.createElementNS("http://www.w3.org/2000/svg",sl);O.setAttribute("rx",0),O.setAttribute("ry",0),O.setAttribute("width",V.width),O.setAttribute("height",V.height),P.insertBefore(O,P.firstChild)}},uY={setConf:aY,getClasses:oY,draw:hY};var e1=function(){var t=function(b,x,k,v){for(k=k||{},v=b.length;v--;k[b[v]]=x);return k},e=[1,2],r=[1,5],i=[6,9,11,17,18,20,22,23,24,26],n=[1,15],s=[1,16],a=[1,17],o=[1,18],l=[1,19],h=[1,20],u=[1,24],f=[4,6,9,11,17,18,20,22,23,24,26],d={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,acc_title:18,acc_title_value:19,acc_descr:20,acc_descr_value:21,acc_descr_multiline_value:22,section:23,taskName:24,taskData:25,open_directive:26,type_directive:27,arg_directive:28,close_directive:29,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"acc_title",19:"acc_title_value",20:"acc_descr",21:"acc_descr_value",22:"acc_descr_multiline_value",23:"section",24:"taskName",25:"taskData",26:"open_directive",27:"type_directive",28:"arg_directive",29:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,2],[10,2],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(x,k,v,B,R,P,V){var O=P.length-1;switch(R){case 1:return P[O-1];case 3:this.$=[];break;case 4:P[O-1].push(P[O]),this.$=P[O-1];break;case 5:case 6:this.$=P[O];break;case 7:case 8:this.$=[];break;case 11:B.setDiagramTitle(P[O].substr(6)),this.$=P[O].substr(6);break;case 12:this.$=P[O].trim(),B.setAccTitle(this.$);break;case 13:case 14:this.$=P[O].trim(),B.setAccDescription(this.$);break;case 15:B.addSection(P[O].substr(8)),this.$=P[O].substr(8);break;case 16:B.addTask(P[O-1],P[O]),this.$="task";break;case 18:B.parseDirective("%%{","open_directive");break;case 19:B.parseDirective(P[O],"type_directive");break;case 20:P[O]=P[O].trim().replace(/'/g,'"'),B.parseDirective(P[O],"arg_directive");break;case 21:B.parseDirective("}%%","close_directive","journey");break}},table:[{3:1,4:e,7:3,12:4,26:r},{1:[3]},t(i,[2,3],{5:6}),{3:7,4:e,7:3,12:4,26:r},{13:8,27:[1,9]},{27:[2,18]},{6:[1,10],7:21,8:11,9:[1,12],10:13,11:[1,14],12:4,17:n,18:s,20:a,22:o,23:l,24:h,26:r},{1:[2,2]},{14:22,15:[1,23],29:u},t([15,29],[2,19]),t(i,[2,8],{1:[2,1]}),t(i,[2,4]),{7:21,10:25,12:4,17:n,18:s,20:a,22:o,23:l,24:h,26:r},t(i,[2,6]),t(i,[2,7]),t(i,[2,11]),{19:[1,26]},{21:[1,27]},t(i,[2,14]),t(i,[2,15]),{25:[1,28]},t(i,[2,17]),{11:[1,29]},{16:30,28:[1,31]},{11:[2,21]},t(i,[2,5]),t(i,[2,12]),t(i,[2,13]),t(i,[2,16]),t(f,[2,9]),{14:32,29:u},{29:[2,20]},{11:[1,33]},t(f,[2,10])],defaultActions:{5:[2,18],7:[2,2],24:[2,21],31:[2,20]},parseError:function(x,k){if(k.recoverable)this.trace(x);else{var v=new Error(x);throw v.hash=k,v}},parse:function(x){var k=this,v=[0],B=[],R=[null],P=[],V=this.table,O="",F=0,C=0,S=2,E=1,_=P.slice.call(arguments,1),w=Object.create(this.lexer),g={yy:{}};for(var D in this.yy)Object.prototype.hasOwnProperty.call(this.yy,D)&&(g.yy[D]=this.yy[D]);w.setInput(x,g.yy),g.yy.lexer=w,g.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var y=w.yylloc;P.push(y);var N=w.options&&w.options.ranges;typeof g.yy.parseError=="function"?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function nt(){var j;return j=B.pop()||w.lex()||E,typeof j!="number"&&(j instanceof Array&&(B=j,j=B.pop()),j=k.symbols_[j]||j),j}for(var Y,Z,J,X,tt={},ot,at,U,Tt;;){if(Z=v[v.length-1],this.defaultActions[Z]?J=this.defaultActions[Z]:((Y===null||typeof Y>"u")&&(Y=nt()),J=V[Z]&&V[Z][Y]),typeof J>"u"||!J.length||!J[0]){var $="";Tt=[];for(ot in V[Z])this.terminals_[ot]&&ot>S&&Tt.push("'"+this.terminals_[ot]+"'");w.showPosition?$="Parse error on line "+(F+1)+`:
1266
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var X=this.next();return X||this.lex()},begin:function(X){this.conditionStack.push(X)},popState:function(){var X=this.conditionStack.length-1;return X>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(X){return X=this.conditionStack.length-1-Math.abs(X||0),X>=0?this.conditionStack[X]:"INITIAL"},pushState:function(X){this.begin(X)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(X,tt,ot,at){switch(ot){case 0:return 41;case 1:return 50;case 2:return 51;case 3:return 52;case 4:return 53;case 5:return this.begin("open_directive"),60;case 6:return this.begin("type_directive"),61;case 7:return this.popState(),this.begin("arg_directive"),48;case 8:return this.popState(),this.popState(),63;case 9:return 62;case 10:break;case 11:break;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:break;case 17:return this.pushState("SCALE"),17;case 18:return 18;case 19:this.popState();break;case 20:return this.begin("acc_title"),33;case 21:return this.popState(),"acc_title_value";case 22:return this.begin("acc_descr"),35;case 23:return this.popState(),"acc_descr_value";case 24:this.begin("acc_descr_multiline");break;case 25:this.popState();break;case 26:return"acc_descr_multiline_value";case 27:return this.pushState("CLASSDEF"),38;case 28:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 29:return this.popState(),this.pushState("CLASSDEFID"),39;case 30:return this.popState(),40;case 31:return this.pushState("CLASS"),42;case 32:return this.popState(),this.pushState("CLASS_STYLE"),43;case 33:return this.popState(),44;case 34:return this.pushState("SCALE"),17;case 35:return 18;case 36:this.popState();break;case 37:this.pushState("STATE");break;case 38:return this.popState(),tt.yytext=tt.yytext.slice(0,-8).trim(),25;case 39:return this.popState(),tt.yytext=tt.yytext.slice(0,-8).trim(),26;case 40:return this.popState(),tt.yytext=tt.yytext.slice(0,-10).trim(),27;case 41:return this.popState(),tt.yytext=tt.yytext.slice(0,-8).trim(),25;case 42:return this.popState(),tt.yytext=tt.yytext.slice(0,-8).trim(),26;case 43:return this.popState(),tt.yytext=tt.yytext.slice(0,-10).trim(),27;case 44:return 50;case 45:return 51;case 46:return 52;case 47:return 53;case 48:this.pushState("STATE_STRING");break;case 49:return this.pushState("STATE_ID"),"AS";case 50:return this.popState(),"ID";case 51:this.popState();break;case 52:return"STATE_DESCR";case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState("struct"),20;case 56:break;case 57:return this.popState(),21;case 58:break;case 59:return this.begin("NOTE"),29;case 60:return this.popState(),this.pushState("NOTE_ID"),58;case 61:return this.popState(),this.pushState("NOTE_ID"),59;case 62:this.popState(),this.pushState("FLOATING_NOTE");break;case 63:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 64:break;case 65:return"NOTE_TEXT";case 66:return this.popState(),"ID";case 67:return this.popState(),this.pushState("NOTE_TEXT"),24;case 68:return this.popState(),tt.yytext=tt.yytext.substr(2).trim(),31;case 69:return this.popState(),tt.yytext=tt.yytext.slice(0,-8).trim(),31;case 70:return 7;case 71:return 7;case 72:return 16;case 73:return 56;case 74:return 24;case 75:return tt.yytext=tt.yytext.trim(),14;case 76:return 15;case 77:return 28;case 78:return 57;case 79:return 5;case 80:return"INVALID"}},rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[14,15],inclusive:!1},close_directive:{rules:[14,15],inclusive:!1},arg_directive:{rules:[8,9,14,15],inclusive:!1},type_directive:{rules:[7,8,14,15],inclusive:!1},open_directive:{rules:[6,14,15],inclusive:!1},struct:{rules:[14,15,27,31,37,44,45,46,47,56,57,58,59,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[66],inclusive:!1},FLOATING_NOTE:{rules:[63,64,65],inclusive:!1},NOTE_TEXT:{rules:[68,69],inclusive:!1},NOTE_ID:{rules:[67],inclusive:!1},NOTE:{rules:[60,61,62],inclusive:!1},CLASS_STYLE:{rules:[33],inclusive:!1},CLASS:{rules:[32],inclusive:!1},CLASSDEFID:{rules:[30],inclusive:!1},CLASSDEF:{rules:[28,29],inclusive:!1},acc_descr_multiline:{rules:[25,26],inclusive:!1},acc_descr:{rules:[23],inclusive:!1},acc_title:{rules:[21],inclusive:!1},SCALE:{rules:[18,19,35,36],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[50],inclusive:!1},STATE_STRING:{rules:[51,52],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[14,15,38,39,40,41,42,43,48,49,53,54,55],inclusive:!1},ID:{rules:[14,15],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,10,11,12,13,15,16,17,20,22,24,27,31,34,37,55,59,70,71,72,73,74,75,76,78,79,80],inclusive:!0}}};return Z}();N.lexer=nt;function Y(){this.yy={}}return Y.prototype=N,N.Parser=Y,new Y}();Ku.parser=Ku;const r2=Ku,JP=(t,e)=>{var r;return((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:t.match(/^\s*stateDiagram/)!==null},tV=(t,e)=>{var r;return!!(t.match(/^\s*stateDiagram-v2/)!==null||t.match(/^\s*stateDiagram/)&&((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},eV="LR",rV="TB",ec="state",v0="relation",iV="classDef",nV="applyClass",bo="default",M3="divider",k0="[*]",N3="start",R3=k0,O3="end",i2="color",n2="fill",sV="bgFill",aV=",";function F3(){return{}}let P3=eV,rc=[],Ca=F3();const V3=()=>({relations:[],states:{},documents:{}});let ic={root:V3()},nr=ic.root,Qa=0,s2=0;const oV={LINE:0,DOTTED_LINE:1},lV={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},Fo=t=>JSON.parse(JSON.stringify(t)),cV=function(t,e,r){xe.parseDirective(this,t,e,r)},hV=t=>{I.info("Setting root doc",t),rc=t},uV=()=>rc,nl=(t,e,r)=>{if(e.stmt===v0)nl(t,e.state1,!0),nl(t,e.state2,!1);else if(e.stmt===ec&&(e.id==="[*]"?(e.id=r?t.id+"_start":t.id+"_end",e.start=r):e.id=e.id.trim()),e.doc){const i=[];let n=[],s;for(s=0;s<e.doc.length;s++)if(e.doc[s].type===M3){const a=Fo(e.doc[s]);a.doc=Fo(n),i.push(a),n=[]}else n.push(e.doc[s]);if(i.length>0&&n.length>0){const a={stmt:ec,id:uy(),type:"divider",doc:Fo(n)};i.push(Fo(a)),e.doc=i}e.doc.forEach(a=>nl(e,a,!0))}},fV=()=>(nl({id:"root"},{id:"root",doc:rc},!0),{id:"root",doc:rc}),dV=t=>{let e;t.doc?e=t.doc:e=t,I.info(e),Y3(!0),I.info("Extract",e),e.forEach(r=>{switch(r.stmt){case ec:Hn(r.id.trim(),r.type,r.doc,r.description,r.note,r.classes,r.styles,r.textStyles);break;case v0:z3(r.state1,r.state2,r.description);break;case iV:U3(r.id.trim(),r.classes);break;case nV:w0(r.id.trim(),r.styleClass);break}})},Hn=function(t,e=bo,r=null,i=null,n=null,s=null,a=null,o=null){const l=t==null?void 0:t.trim();nr.states[l]===void 0?(I.info("Adding state ",l,i),nr.states[l]={id:l,descriptions:[],type:e,doc:r,note:n,classes:[],styles:[],textStyles:[]}):(nr.states[l].doc||(nr.states[l].doc=r),nr.states[l].type||(nr.states[l].type=e)),i&&(I.info("Setting state description",l,i),typeof i=="string"&&Ju(l,i.trim()),typeof i=="object"&&i.forEach(h=>Ju(l,h.trim()))),n&&(nr.states[l].note=n,nr.states[l].note.text=Xt.sanitizeText(nr.states[l].note.text,G())),s&&(I.info("Setting state classes",l,s),(typeof s=="string"?[s]:s).forEach(u=>w0(l,u.trim()))),a&&(I.info("Setting state styles",l,a),(typeof a=="string"?[a]:a).forEach(u=>wV(l,u.trim()))),o&&(I.info("Setting state styles",l,a),(typeof o=="string"?[o]:o).forEach(u=>TV(l,u.trim())))},Y3=function(t){ic={root:V3()},nr=ic.root,Qa=0,Ca=F3(),t||Lr()},Ja=function(t){return nr.states[t]},pV=function(){return nr.states},gV=function(){I.info("Documents = ",ic)},yV=function(){return nr.relations};function Zu(t=""){let e=t;return t===k0&&(Qa++,e=`${N3}${Qa}`),e}function Qu(t="",e=bo){return t===k0?N3:e}function mV(t=""){let e=t;return t===R3&&(Qa++,e=`${O3}${Qa}`),e}function bV(t="",e=bo){return t===R3?O3:e}function _V(t,e,r){let i=Zu(t.id.trim()),n=Qu(t.id.trim(),t.type),s=Zu(e.id.trim()),a=Qu(e.id.trim(),e.type);Hn(i,n,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),Hn(s,a,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),nr.relations.push({id1:i,id2:s,relationTitle:Xt.sanitizeText(r,G())})}const z3=function(t,e,r){if(typeof t=="object")_V(t,e,r);else{const i=Zu(t.trim()),n=Qu(t),s=mV(e.trim()),a=bV(e);Hn(i,n),Hn(s,a),nr.relations.push({id1:i,id2:s,title:Xt.sanitizeText(r,G())})}},Ju=function(t,e){const r=nr.states[t],i=e.startsWith(":")?e.replace(":","").trim():e;r.descriptions.push(Xt.sanitizeText(i,G()))},xV=function(t){return t.substring(0,1)===":"?t.substr(2).trim():t.trim()},vV=()=>(s2++,"divider-id-"+s2),U3=function(t,e=""){Ca[t]===void 0&&(Ca[t]={id:t,styles:[],textStyles:[]});const r=Ca[t];e!=null&&e.split(aV).forEach(i=>{const n=i.replace(/([^;]*);/,"$1").trim();if(i.match(i2)){const a=n.replace(n2,sV).replace(i2,n2);r.textStyles.push(a)}r.styles.push(n)})},kV=function(){return Ca},w0=function(t,e){t.split(",").forEach(function(r){let i=Ja(r);if(i===void 0){const n=r.trim();Hn(n),i=Ja(n)}i.classes.push(e)})},wV=function(t,e){const r=Ja(t);r!==void 0&&r.textStyles.push(e)},TV=function(t,e){const r=Ja(t);r!==void 0&&r.textStyles.push(e)},EV=()=>P3,CV=t=>{P3=t},SV=t=>t&&t[0]===":"?t.substr(1).trim():t.trim(),Ri={parseDirective:cV,getConfig:()=>G().state,addState:Hn,clear:Y3,getState:Ja,getStates:pV,getRelations:yV,getClasses:kV,getDirection:EV,addRelation:z3,getDividerId:vV,setDirection:CV,cleanupLabel:xV,lineType:oV,relationType:lV,logDocuments:gV,getRootDoc:uV,setRootDoc:hV,getRootDocV2:fV,extract:dV,trimColon:SV,getAccTitle:Br,setAccTitle:kr,getAccDescription:Ir,setAccDescription:Dr,addStyleClass:U3,setCssClass:w0,addDescription:Ju,setDiagramTitle:si,getDiagramTitle:ai},AV=t=>t.append("circle").attr("class","start-state").attr("r",G().state.sizeUnit).attr("cx",G().state.padding+G().state.sizeUnit).attr("cy",G().state.padding+G().state.sizeUnit),LV=t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",G().state.textHeight).attr("class","divider").attr("x2",G().state.textHeight*2).attr("y1",0).attr("y2",0),BV=(t,e)=>{const r=t.append("text").attr("x",2*G().state.padding).attr("y",G().state.textHeight+2*G().state.padding).attr("font-size",G().state.fontSize).attr("class","state-title").text(e.id),i=r.node().getBBox();return t.insert("rect",":first-child").attr("x",G().state.padding).attr("y",G().state.padding).attr("width",i.width+2*G().state.padding).attr("height",i.height+2*G().state.padding).attr("rx",G().state.radius),r},DV=(t,e)=>{const r=function(d,p,m){const b=d.append("tspan").attr("x",2*G().state.padding).text(p);m||b.attr("dy",G().state.textHeight)},n=t.append("text").attr("x",2*G().state.padding).attr("y",G().state.textHeight+1.3*G().state.padding).attr("font-size",G().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),s=n.height,a=t.append("text").attr("x",G().state.padding).attr("y",s+G().state.padding*.4+G().state.dividerMargin+G().state.textHeight).attr("class","state-description");let o=!0,l=!0;e.descriptions.forEach(function(d){o||(r(a,d,l),l=!1),o=!1});const h=t.append("line").attr("x1",G().state.padding).attr("y1",G().state.padding+s+G().state.dividerMargin/2).attr("y2",G().state.padding+s+G().state.dividerMargin/2).attr("class","descr-divider"),u=a.node().getBBox(),f=Math.max(u.width,n.width);return h.attr("x2",f+3*G().state.padding),t.insert("rect",":first-child").attr("x",G().state.padding).attr("y",G().state.padding).attr("width",f+2*G().state.padding).attr("height",u.height+s+2*G().state.padding).attr("rx",G().state.radius),t},IV=(t,e,r)=>{const i=G().state.padding,n=2*G().state.padding,s=t.node().getBBox(),a=s.width,o=s.x,l=t.append("text").attr("x",0).attr("y",G().state.titleShift).attr("font-size",G().state.fontSize).attr("class","state-title").text(e.id),u=l.node().getBBox().width+n;let f=Math.max(u,a);f===a&&(f=f+n);let d;const p=t.node().getBBox();e.doc,d=o-i,u>a&&(d=(a-f)/2+i),Math.abs(o-p.x)<i&&u>a&&(d=o-(u-a)/2);const m=1-G().state.textHeight;return t.insert("rect",":first-child").attr("x",d).attr("y",m).attr("class",r?"alt-composit":"composit").attr("width",f).attr("height",p.height+G().state.textHeight+G().state.titleShift+1).attr("rx","0"),l.attr("x",d+i),u<=a&&l.attr("x",o+(f-n)/2-u/2+i),t.insert("rect",":first-child").attr("x",d).attr("y",G().state.titleShift-G().state.textHeight-G().state.padding).attr("width",f).attr("height",G().state.textHeight*3).attr("rx",G().state.radius),t.insert("rect",":first-child").attr("x",d).attr("y",G().state.titleShift-G().state.textHeight-G().state.padding).attr("width",f).attr("height",p.height+3+2*G().state.textHeight).attr("rx",G().state.radius),t},MV=t=>(t.append("circle").attr("class","end-state-outer").attr("r",G().state.sizeUnit+G().state.miniPadding).attr("cx",G().state.padding+G().state.sizeUnit+G().state.miniPadding).attr("cy",G().state.padding+G().state.sizeUnit+G().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",G().state.sizeUnit).attr("cx",G().state.padding+G().state.sizeUnit+2).attr("cy",G().state.padding+G().state.sizeUnit+2)),NV=(t,e)=>{let r=G().state.forkWidth,i=G().state.forkHeight;if(e.parentId){let n=r;r=i,i=n}return t.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",i).attr("x",G().state.padding).attr("y",G().state.padding)},RV=(t,e,r,i)=>{let n=0;const s=i.append("text");s.style("text-anchor","start"),s.attr("class","noteText");let a=t.replace(/\r\n/g,"<br/>");a=a.replace(/\n/g,"<br/>");const o=a.split(Xt.lineBreakRegex);let l=1.25*G().state.noteMargin;for(const h of o){const u=h.trim();if(u.length>0){const f=s.append("tspan");if(f.text(u),l===0){const d=f.node().getBBox();l+=d.height}n+=l,f.attr("x",e+G().state.noteMargin),f.attr("y",r+n+1.25*G().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:n}},OV=(t,e)=>{e.attr("class","state-note");const r=e.append("rect").attr("x",0).attr("y",G().state.padding),i=e.append("g"),{textWidth:n,textHeight:s}=RV(t,0,0,i);return r.attr("height",s+2*G().state.noteMargin),r.attr("width",n+G().state.noteMargin*2),r},a2=function(t,e){const r=e.id,i={id:r,label:e.id,width:0,height:0},n=t.append("g").attr("id",r).attr("class","stateGroup");e.type==="start"&&AV(n),e.type==="end"&&MV(n),(e.type==="fork"||e.type==="join")&&NV(n,e),e.type==="note"&&OV(e.note.text,n),e.type==="divider"&&LV(n),e.type==="default"&&e.descriptions.length===0&&BV(n,e),e.type==="default"&&e.descriptions.length>0&&DV(n,e);const s=n.node().getBBox();return i.width=s.width+2*G().state.padding,i.height=s.height+2*G().state.padding,i};let o2=0;const FV=function(t,e,r){const i=function(l){switch(l){case Ri.relationType.AGGREGATION:return"aggregation";case Ri.relationType.EXTENSION:return"extension";case Ri.relationType.COMPOSITION:return"composition";case Ri.relationType.DEPENDENCY:return"dependency"}};e.points=e.points.filter(l=>!Number.isNaN(l.y));const n=e.points,s=Us().x(function(l){return l.x}).y(function(l){return l.y}).curve(Ss),a=t.append("path").attr("d",s(n)).attr("id","edge"+o2).attr("class","transition");let o="";if(G().state.arrowMarkerAbsolute&&(o=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,o=o.replace(/\(/g,"\\("),o=o.replace(/\)/g,"\\)")),a.attr("marker-end","url("+o+"#"+i(Ri.relationType.DEPENDENCY)+"End)"),r.title!==void 0){const l=t.append("g").attr("class","stateLabel"),{x:h,y:u}=jt.calcLabelPosition(e.points),f=Xt.getRows(r.title);let d=0;const p=[];let m=0,b=0;for(let v=0;v<=f.length;v++){const B=l.append("text").attr("text-anchor","middle").text(f[v]).attr("x",h).attr("y",u+d),R=B.node().getBBox();m=Math.max(m,R.width),b=Math.min(b,R.x),I.info(R.x,h,u+d),d===0&&(d=B.node().getBBox().height,I.info("Title height",d,u)),p.push(B)}let x=d*f.length;if(f.length>1){const v=(f.length-1)*d*.5;p.forEach((B,R)=>B.attr("y",u+R*d-v)),x=d*f.length}const k=l.node().getBBox();l.insert("rect",":first-child").attr("class","box").attr("x",h-m/2-G().state.padding/2).attr("y",u-x/2-G().state.padding/2-3.5).attr("width",m+G().state.padding).attr("height",x+G().state.padding),I.info(k)}o2++};let Tr;const Ph={},PV=function(){},VV=function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},YV=function(t,e,r,i){Tr=G().state;const n=G().securityLevel;let s;n==="sandbox"&&(s=_t("#i"+e));const a=_t(n==="sandbox"?s.nodes()[0].contentDocument.body:"body"),o=n==="sandbox"?s.nodes()[0].contentDocument:document;I.debug("Rendering diagram "+t);const l=a.select(`[id='${e}']`);VV(l),new Pe({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel(function(){return{}});const u=i.db.getRootDoc();W3(u,l,void 0,!1,a,o,i);const f=Tr.padding,d=l.node().getBBox(),p=d.width+f*2,m=d.height+f*2,b=p*1.75;ni(l,m,b,Tr.useMaxWidth),l.attr("viewBox",`${d.x-Tr.padding} ${d.y-Tr.padding} `+p+" "+m)},zV=t=>t?t.length*Tr.fontSizeFactor:1,W3=(t,e,r,i,n,s,a)=>{const o=new Pe({compound:!0,multigraph:!0});let l,h=!0;for(l=0;l<t.length;l++)if(t[l].stmt==="relation"){h=!1;break}r?o.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:h?1:Tr.edgeLengthFactor,nodeSep:h?1:50,isMultiGraph:!0}):o.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:h?1:Tr.edgeLengthFactor,nodeSep:h?1:50,ranker:"tight-tree",isMultiGraph:!0}),o.setDefaultEdgeLabel(function(){return{}}),a.db.extract(t);const u=a.db.getStates(),f=a.db.getRelations(),d=Object.keys(u);for(const k of d){const v=u[k];r&&(v.parentId=r);let B;if(v.doc){let R=e.append("g").attr("id",v.id).attr("class","stateGroup");B=W3(v.doc,R,v.id,!i,n,s,a);{R=IV(R,v,i);let P=R.node().getBBox();B.width=P.width,B.height=P.height+Tr.padding/2,Ph[v.id]={y:Tr.compositTitleSize}}}else B=a2(e,v);if(v.note){const R={descriptions:[],id:v.id+"-note",note:v.note,type:"note"},P=a2(e,R);v.note.position==="left of"?(o.setNode(B.id+"-note",P),o.setNode(B.id,B)):(o.setNode(B.id,B),o.setNode(B.id+"-note",P)),o.setParent(B.id,B.id+"-group"),o.setParent(B.id+"-note",B.id+"-group")}else o.setNode(B.id,B)}I.debug("Count=",o.nodeCount(),o);let p=0;f.forEach(function(k){p++,I.debug("Setting edge",k),o.setEdge(k.id1,k.id2,{relation:k,width:zV(k.title),height:Tr.labelHeight*Xt.getRows(k.title).length,labelpos:"c"},"id"+p)}),$s(o),I.debug("Graph after layout",o.nodes());const m=e.node();o.nodes().forEach(function(k){k!==void 0&&o.node(k)!==void 0?(I.warn("Node "+k+": "+JSON.stringify(o.node(k))),n.select("#"+m.id+" #"+k).attr("transform","translate("+(o.node(k).x-o.node(k).width/2)+","+(o.node(k).y+(Ph[k]?Ph[k].y:0)-o.node(k).height/2)+" )"),n.select("#"+m.id+" #"+k).attr("data-x-shift",o.node(k).x-o.node(k).width/2),s.querySelectorAll("#"+m.id+" #"+k+" .divider").forEach(B=>{const R=B.parentElement;let P=0,V=0;R&&(R.parentElement&&(P=R.parentElement.getBBox().width),V=parseInt(R.getAttribute("data-x-shift"),10),Number.isNaN(V)&&(V=0)),B.setAttribute("x1",0-V+8),B.setAttribute("x2",P-V-8)})):I.debug("No Node "+k+": "+JSON.stringify(o.node(k)))});let b=m.getBBox();o.edges().forEach(function(k){k!==void 0&&o.edge(k)!==void 0&&(I.debug("Edge "+k.v+" -> "+k.w+": "+JSON.stringify(o.edge(k))),FV(e,o.edge(k),o.edge(k).relation))}),b=m.getBBox();const x={id:r||"root",label:r||"root",width:0,height:0};return x.width=b.width+2*Tr.padding,x.height=b.height+2*Tr.padding,I.debug("Doc rendered",x,o),x},UV={setConf:PV,draw:YV},sl="rect",Vh="rectWithTitle",WV="start",HV="end",qV="divider",GV="roundedWithTitle",$V="note",jV="noteGroup",Ys="statediagram",XV="state",KV=`${Ys}-${XV}`,H3="transition",ZV="note",QV="note-edge",JV=`${H3} ${QV}`,tY=`${Ys}-${ZV}`,eY="cluster",rY=`${Ys}-${eY}`,iY="cluster-alt",nY=`${Ys}-${iY}`,q3="parent",G3="note",sY="state",T0="----",aY=`${T0}${G3}`,l2=`${T0}${q3}`,$3="fill:none",j3="fill: #333",X3="c",K3="text",Z3="normal";let al={},nn=0;const oY=function(t){const e=Object.keys(t);for(const r of e)t[r]},lY=function(t,e){I.trace("Extracting classes"),e.db.clear();try{return e.parser.parse(t),e.db.extract(e.db.getRootDocV2()),e.db.getClasses()}catch(r){return r}};function cY(t){return t==null?"":t.classes?t.classes.join(" "):""}function Yh(t="",e=0,r="",i=T0){const n=r!==null&&r.length>0?`${i}${r}`:"";return`${sY}-${t}${n}-${e}`}const pa=(t,e,r,i,n,s)=>{const a=r.id,o=cY(i[a]);if(a!=="root"){let l=sl;r.start===!0&&(l=WV),r.start===!1&&(l=HV),r.type!==bo&&(l=r.type),al[a]||(al[a]={id:a,shape:l,description:Xt.sanitizeText(a,G()),classes:`${o} ${KV}`});const h=al[a];r.description&&(Array.isArray(h.description)?(h.shape=Vh,h.description.push(r.description)):h.description.length>0?(h.shape=Vh,h.description===a?h.description=[r.description]:h.description=[h.description,r.description]):(h.shape=sl,h.description=r.description),h.description=Xt.sanitizeTextOrArray(h.description,G())),h.description.length===1&&h.shape===Vh&&(h.shape=sl),!h.type&&r.doc&&(I.info("Setting cluster for ",a,t1(r)),h.type="group",h.dir=t1(r),h.shape=r.type===M3?qV:GV,h.classes=h.classes+" "+rY+" "+(s?nY:""));const u={labelStyle:"",shape:h.shape,labelText:h.description,classes:h.classes,style:"",id:a,dir:h.dir,domId:Yh(a,nn),type:h.type,padding:15};if(r.note){const f={labelStyle:"",shape:$V,labelText:r.note.text,classes:tY,style:"",id:a+aY+"-"+nn,domId:Yh(a,nn,G3),type:h.type,padding:15},d={labelStyle:"",shape:jV,labelText:r.note.text,classes:h.classes,style:"",id:a+l2,domId:Yh(a,nn,q3),type:"group",padding:0};nn++;const p=a+l2;t.setNode(p,d),t.setNode(f.id,f),t.setNode(a,u),t.setParent(a,p),t.setParent(f.id,p);let m=a,b=f.id;r.note.position==="left of"&&(m=f.id,b=a),t.setEdge(m,b,{arrowhead:"none",arrowType:"",style:$3,labelStyle:"",classes:JV,arrowheadStyle:j3,labelpos:X3,labelType:K3,thickness:Z3})}else t.setNode(a,u)}e&&e.id!=="root"&&(I.trace("Setting node ",a," to be child of its parent ",e.id),t.setParent(a,e.id)),r.doc&&(I.trace("Adding nodes children "),hY(t,r,r.doc,i,n,!s))},hY=(t,e,r,i,n,s)=>{I.trace("items",r),r.forEach(a=>{switch(a.stmt){case ec:pa(t,e,a,i,n,s);break;case bo:pa(t,e,a,i,n,s);break;case v0:{pa(t,e,a.state1,i,n,s),pa(t,e,a.state2,i,n,s);const o={id:"edge"+nn,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:$3,labelStyle:"",label:Xt.sanitizeText(a.description,G()),arrowheadStyle:j3,labelpos:X3,labelType:K3,thickness:Z3,classes:H3};t.setEdge(a.state1.id,a.state2.id,o,nn),nn++}break}})},t1=(t,e=rV)=>{let r=e;if(t.doc)for(let i=0;i<t.doc.length;i++){const n=t.doc[i];n.stmt==="dir"&&(r=n.value)}return r},uY=function(t,e,r,i){I.info("Drawing state diagram (v2)",e),al={},i.db.getDirection();const{securityLevel:n,state:s}=G(),a=s.nodeSpacing||50,o=s.rankSpacing||50;I.info(i.db.getRootDocV2()),i.db.extract(i.db.getRootDocV2()),I.info(i.db.getRootDocV2());const l=i.db.getStates(),h=new Pe({multigraph:!0,compound:!0}).setGraph({rankdir:t1(i.db.getRootDocV2()),nodesep:a,ranksep:o,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});pa(h,void 0,i.db.getRootDocV2(),l,i.db,!0);let u;n==="sandbox"&&(u=_t("#i"+e));const f=_t(n==="sandbox"?u.nodes()[0].contentDocument.body:"body"),d=f.select(`[id="${e}"]`),p=f.select("#"+e+" g");s0(p,h,["barb"],Ys,e);const m=8;jt.insertTitle(d,"statediagramTitleText",s.titleTopMargin,i.db.getDiagramTitle());const b=d.node().getBBox(),x=b.width+m*2,k=b.height+m*2;d.attr("class",Ys);const v=d.node().getBBox();ni(d,k,x,s.useMaxWidth);const B=`${v.x-m} ${v.y-m} ${x} ${k}`;I.debug(`viewBox ${B}`),d.attr("viewBox",B);const R=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const P of R){const V=P.getBBox(),O=document.createElementNS("http://www.w3.org/2000/svg",sl);O.setAttribute("rx",0),O.setAttribute("ry",0),O.setAttribute("width",V.width),O.setAttribute("height",V.height),P.insertBefore(O,P.firstChild)}},fY={setConf:oY,getClasses:lY,draw:uY};var e1=function(){var t=function(b,x,k,v){for(k=k||{},v=b.length;v--;k[b[v]]=x);return k},e=[1,2],r=[1,5],i=[6,9,11,17,18,20,22,23,24,26],n=[1,15],s=[1,16],a=[1,17],o=[1,18],l=[1,19],h=[1,20],u=[1,24],f=[4,6,9,11,17,18,20,22,23,24,26],d={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,acc_title:18,acc_title_value:19,acc_descr:20,acc_descr_value:21,acc_descr_multiline_value:22,section:23,taskName:24,taskData:25,open_directive:26,type_directive:27,arg_directive:28,close_directive:29,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"acc_title",19:"acc_title_value",20:"acc_descr",21:"acc_descr_value",22:"acc_descr_multiline_value",23:"section",24:"taskName",25:"taskData",26:"open_directive",27:"type_directive",28:"arg_directive",29:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,2],[10,2],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(x,k,v,B,R,P,V){var O=P.length-1;switch(R){case 1:return P[O-1];case 3:this.$=[];break;case 4:P[O-1].push(P[O]),this.$=P[O-1];break;case 5:case 6:this.$=P[O];break;case 7:case 8:this.$=[];break;case 11:B.setDiagramTitle(P[O].substr(6)),this.$=P[O].substr(6);break;case 12:this.$=P[O].trim(),B.setAccTitle(this.$);break;case 13:case 14:this.$=P[O].trim(),B.setAccDescription(this.$);break;case 15:B.addSection(P[O].substr(8)),this.$=P[O].substr(8);break;case 16:B.addTask(P[O-1],P[O]),this.$="task";break;case 18:B.parseDirective("%%{","open_directive");break;case 19:B.parseDirective(P[O],"type_directive");break;case 20:P[O]=P[O].trim().replace(/'/g,'"'),B.parseDirective(P[O],"arg_directive");break;case 21:B.parseDirective("}%%","close_directive","journey");break}},table:[{3:1,4:e,7:3,12:4,26:r},{1:[3]},t(i,[2,3],{5:6}),{3:7,4:e,7:3,12:4,26:r},{13:8,27:[1,9]},{27:[2,18]},{6:[1,10],7:21,8:11,9:[1,12],10:13,11:[1,14],12:4,17:n,18:s,20:a,22:o,23:l,24:h,26:r},{1:[2,2]},{14:22,15:[1,23],29:u},t([15,29],[2,19]),t(i,[2,8],{1:[2,1]}),t(i,[2,4]),{7:21,10:25,12:4,17:n,18:s,20:a,22:o,23:l,24:h,26:r},t(i,[2,6]),t(i,[2,7]),t(i,[2,11]),{19:[1,26]},{21:[1,27]},t(i,[2,14]),t(i,[2,15]),{25:[1,28]},t(i,[2,17]),{11:[1,29]},{16:30,28:[1,31]},{11:[2,21]},t(i,[2,5]),t(i,[2,12]),t(i,[2,13]),t(i,[2,16]),t(f,[2,9]),{14:32,29:u},{29:[2,20]},{11:[1,33]},t(f,[2,10])],defaultActions:{5:[2,18],7:[2,2],24:[2,21],31:[2,20]},parseError:function(x,k){if(k.recoverable)this.trace(x);else{var v=new Error(x);throw v.hash=k,v}},parse:function(x){var k=this,v=[0],B=[],R=[null],P=[],V=this.table,O="",F=0,C=0,S=2,E=1,_=P.slice.call(arguments,1),w=Object.create(this.lexer),g={yy:{}};for(var D in this.yy)Object.prototype.hasOwnProperty.call(this.yy,D)&&(g.yy[D]=this.yy[D]);w.setInput(x,g.yy),g.yy.lexer=w,g.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var y=w.yylloc;P.push(y);var N=w.options&&w.options.ranges;typeof g.yy.parseError=="function"?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function nt(){var j;return j=B.pop()||w.lex()||E,typeof j!="number"&&(j instanceof Array&&(B=j,j=B.pop()),j=k.symbols_[j]||j),j}for(var Y,Z,J,X,tt={},ot,at,U,Tt;;){if(Z=v[v.length-1],this.defaultActions[Z]?J=this.defaultActions[Z]:((Y===null||typeof Y>"u")&&(Y=nt()),J=V[Z]&&V[Z][Y]),typeof J>"u"||!J.length||!J[0]){var $="";Tt=[];for(ot in V[Z])this.terminals_[ot]&&ot>S&&Tt.push("'"+this.terminals_[ot]+"'");w.showPosition?$="Parse error on line "+(F+1)+`:
1267
1267
  `+w.showPosition()+`
1268
1268
  Expecting `+Tt.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":$="Parse error on line "+(F+1)+": Unexpected "+(Y==E?"end of input":"'"+(this.terminals_[Y]||Y)+"'"),this.parseError($,{text:w.match,token:this.terminals_[Y]||Y,line:w.yylineno,loc:y,expected:Tt})}if(J[0]instanceof Array&&J.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Z+", token: "+Y);switch(J[0]){case 1:v.push(Y),R.push(w.yytext),P.push(w.yylloc),v.push(J[1]),Y=null,C=w.yyleng,O=w.yytext,F=w.yylineno,y=w.yylloc;break;case 2:if(at=this.productions_[J[1]][1],tt.$=R[R.length-at],tt._$={first_line:P[P.length-(at||1)].first_line,last_line:P[P.length-1].last_line,first_column:P[P.length-(at||1)].first_column,last_column:P[P.length-1].last_column},N&&(tt._$.range=[P[P.length-(at||1)].range[0],P[P.length-1].range[1]]),X=this.performAction.apply(tt,[O,C,F,g.yy,J[1],R,P].concat(_)),typeof X<"u")return X;at&&(v=v.slice(0,-1*at*2),R=R.slice(0,-1*at),P=P.slice(0,-1*at)),v.push(this.productions_[J[1]][0]),R.push(tt.$),P.push(tt._$),U=V[v[v.length-2]][v[v.length-1]],v.push(U);break;case 3:return!0}}return!0}},p=function(){var b={EOF:1,parseError:function(k,v){if(this.yy.parser)this.yy.parser.parseError(k,v);else throw new Error(k)},setInput:function(x,k){return this.yy=k||this.yy||{},this._input=x,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},input:function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var k=x.match(/(?:\r\n?|\n).*/g);return k?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},unput:function(x){var k=x.length,v=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-k),this.offset-=k;var B=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),v.length-1&&(this.yylineno-=v.length-1);var R=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:v?(v.length===B.length?this.yylloc.first_column:0)+B[B.length-v.length].length-v[0].length:this.yylloc.first_column-k},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-k]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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).
1269
1269
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(x){this.unput(this.match.slice(x))},pastInput:function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var x=this.pastInput(),k=new Array(x.length+1).join("-");return x+this.upcomingInput()+`
1270
1270
  `+k+"^"},test_match:function(x,k){var v,B,R;if(this.options.backtrack_lexer&&(R={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(R.yylloc.range=this.yylloc.range.slice(0))),B=x[0].match(/(?:\r\n?|\n).*/g),B&&(this.yylineno+=B.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:B?B[B.length-1].length-B[B.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+x[0].length},this.yytext+=x[0],this.match+=x[0],this.matches=x,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(x[0].length),this.matched+=x[0],v=this.performAction.call(this,this.yy,this,k,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),v)return v;if(this._backtrack){for(var P in R)this[P]=R[P];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var x,k,v,B;this._more||(this.yytext="",this.match="");for(var R=this._currentRules(),P=0;P<R.length;P++)if(v=this._input.match(this.rules[R[P]]),v&&(!k||v[0].length>k[0].length)){if(k=v,B=P,this.options.backtrack_lexer){if(x=this.test_match(v,R[P]),x!==!1)return x;if(this._backtrack){k=!1;continue}else return!1}else if(!this.options.flex)break}return k?(x=this.test_match(k,R[B]),x!==!1?x:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1271
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var k=this.next();return k||this.lex()},begin:function(k){this.conditionStack.push(k)},popState:function(){var k=this.conditionStack.length-1;return k>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(k){return k=this.conditionStack.length-1-Math.abs(k||0),k>=0?this.conditionStack[k]:"INITIAL"},pushState:function(k){this.begin(k)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(k,v,B,R){switch(B){case 0:return this.begin("open_directive"),26;case 1:return this.begin("type_directive"),27;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),29;case 4:return 28;case 5:break;case 6:break;case 7:return 11;case 8:break;case 9:break;case 10:return 4;case 11:return 17;case 12:return this.begin("acc_title"),18;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),20;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:return 23;case 20:return 24;case 21:return 25;case 22:return 15;case 23:return 6;case 24:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23,24],inclusive:!0}}};return b}();d.lexer=p;function m(){this.yy={}}return m.prototype=d,d.Parser=m,new m}();e1.parser=e1;const fY=e1,dY=t=>t.match(/^\s*journey/)!==null;let zs="";const T0=[],to=[],eo=[],pY=function(t,e,r){xe.parseDirective(this,t,e,r)},gY=function(){T0.length=0,to.length=0,zs="",eo.length=0,Lr()},yY=function(t){zs=t,T0.push(t)},mY=function(){return T0},bY=function(){let t=l2();const e=100;let r=0;for(;!t&&r<e;)t=l2(),r++;return to.push(...eo),to},_Y=function(){const t=[];return to.forEach(r=>{r.people&&t.push(...r.people)}),[...new Set(t)].sort()},xY=function(t,e){const r=e.substr(1).split(":");let i=0,n=[];r.length===1?(i=Number(r[0]),n=[]):(i=Number(r[0]),n=r[1].split(","));const s=n.map(o=>o.trim()),a={section:zs,type:zs,people:s,task:t,score:i};eo.push(a)},vY=function(t){const e={section:zs,type:zs,description:t,task:t,classes:[]};to.push(e)},l2=function(){const t=function(r){return eo[r].processed};let e=!0;for(const[r,i]of eo.entries())t(r),e=e&&i.processed;return e},kY=function(){return _Y()},c2={parseDirective:pY,getConfig:()=>G().journey,clear:gY,setDiagramTitle:si,getDiagramTitle:ai,setAccTitle:kr,getAccTitle:Br,setAccDescription:Dr,getAccDescription:Ir,addSection:yY,getSections:mY,getTasks:bY,addTask:xY,addTaskOrg:vY,getActors:kY},Xc=function(t,e){const r=t.append("rect");return r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),e.class!==void 0&&r.attr("class",e.class),r},wY=function(t,e){const i=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),n=t.append("g");n.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),n.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function s(l){const h=nu().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function a(l){const h=nu().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function o(l){l.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return e.score>3?s(n):e.score<3?a(n):o(n),i},Z3=function(t,e){const r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},Q3=function(t,e){const r=e.text.replace(/<br\s*\/?>/gi," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),e.class!==void 0&&i.attr("class",e.class);const n=i.append("tspan");return n.attr("x",e.x+e.textMargin*2),n.text(r),i},TY=function(t,e){function r(n,s,a,o,l){return n+","+s+" "+(n+a)+","+s+" "+(n+a)+","+(s+o-l)+" "+(n+a-l*1.2)+","+(s+o)+" "+n+","+(s+o)}const i=t.append("polygon");i.attr("points",r(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,Q3(t,e)},EY=function(t,e,r){const i=t.append("g"),n=E0();n.x=e.x,n.y=e.y,n.fill=e.fill,n.width=r.width,n.height=r.height,n.class="journey-section section-type-"+e.num,n.rx=3,n.ry=3,Xc(i,n),J3(r)(e.text,i,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},r,e.colour)};let h2=-1;const CY=function(t,e,r){const i=e.x+r.width/2,n=t.append("g");h2++;const s=300+5*30;n.append("line").attr("id","task"+h2).attr("x1",i).attr("y1",e.y).attr("x2",i).attr("y2",s).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),wY(n,{cx:i,cy:300+(5-e.score)*30,score:e.score});const a=E0();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=r.width,a.height=r.height,a.class="task task-type-"+e.num,a.rx=3,a.ry=3,Xc(n,a);let o=e.x+14;e.people.forEach(l=>{const h=e.actors[l].color,u={cx:o,cy:e.y,r:7,fill:h,stroke:"#000",title:l,pos:e.actors[l].position};Z3(n,u),o+=10}),J3(r)(e.task,n,a.x,a.y,a.width,a.height,{class:"task"},r,e.colour)},SY=function(t,e){Xc(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},AY=function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},E0=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},J3=function(){function t(n,s,a,o,l,h,u,f){const d=s.append("text").attr("x",a+l/2).attr("y",o+h/2+5).style("font-color",f).style("text-anchor","middle").text(n);i(d,u)}function e(n,s,a,o,l,h,u,f,d){const{taskFontSize:p,taskFontFamily:m}=f,b=n.split(/<br\s*\/?>/gi);for(let x=0;x<b.length;x++){const k=x*p-p*(b.length-1)/2,v=s.append("text").attr("x",a+l/2).attr("y",o).attr("fill",d).style("text-anchor","middle").style("font-size",p).style("font-family",m);v.append("tspan").attr("x",a+l/2).attr("dy",k).text(b[x]),v.attr("y",o+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(v,u)}}function r(n,s,a,o,l,h,u,f){const d=s.append("switch"),m=d.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",h).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");m.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,d,a,o,l,h,u,f),i(m,u)}function i(n,s){for(const a in s)a in s&&n.attr(a,s[a])}return function(n){return n.textPlacement==="fo"?r:n.textPlacement==="old"?t:e}}(),LY=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},ro={drawRect:Xc,drawCircle:Z3,drawSection:EY,drawText:Q3,drawLabel:TY,drawTask:CY,drawBackgroundRect:SY,getTextObj:AY,getNoteRect:E0,initGraphics:LY},BY=function(t){Object.keys(t).forEach(function(r){Kc[r]=t[r]})},Ui={};function DY(t){const e=G().journey;let r=60;Object.keys(Ui).forEach(i=>{const n=Ui[i].color,s={cx:20,cy:r,r:7,fill:n,stroke:"#000",pos:Ui[i].position};ro.drawCircle(t,s);const a={x:40,y:r+7,fill:"#666",text:i,textMargin:e.boxTextMargin|5};ro.drawText(t,a),r+=20})}const Kc=G().journey,Sn=Kc.leftMargin,IY=function(t,e,r,i){const n=G().journey;i.db.clear(),i.parser.parse(t+`
1272
- `);const s=G().securityLevel;let a;s==="sandbox"&&(a=_t("#i"+e));const o=_t(s==="sandbox"?a.nodes()[0].contentDocument.body:"body");Pr.init();const l=o.select("#"+e);ro.initGraphics(l);const h=i.db.getTasks(),u=i.db.getDiagramTitle(),f=i.db.getActors();for(const k in Ui)delete Ui[k];let d=0;f.forEach(k=>{Ui[k]={color:n.actorColours[d%n.actorColours.length],position:d},d++}),DY(l),Pr.insert(0,0,Sn,Object.keys(Ui).length*50),MY(l,h,0);const p=Pr.getBounds();u&&l.append("text").text(u).attr("x",Sn).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const m=p.stopy-p.starty+2*n.diagramMarginY,b=Sn+p.stopx+2*n.diagramMarginX;ni(l,m,b,n.useMaxWidth),l.append("line").attr("x1",Sn).attr("y1",n.height*4).attr("x2",b-Sn-4).attr("y2",n.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const x=u?70:0;l.attr("viewBox",`${p.startx} -25 ${b} ${m+x}`),l.attr("preserveAspectRatio","xMinYMin meet"),l.attr("height",m+x+25)},Pr={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,r,i){t[e]===void 0?t[e]=r:t[e]=i(r,t[e])},updateBounds:function(t,e,r,i){const n=G().journey,s=this;let a=0;function o(l){return function(u){a++;const f=s.sequenceItems.length-a+1;s.updateVal(u,"starty",e-f*n.boxMargin,Math.min),s.updateVal(u,"stopy",i+f*n.boxMargin,Math.max),s.updateVal(Pr.data,"startx",t-f*n.boxMargin,Math.min),s.updateVal(Pr.data,"stopx",r+f*n.boxMargin,Math.max),l!=="activation"&&(s.updateVal(u,"startx",t-f*n.boxMargin,Math.min),s.updateVal(u,"stopx",r+f*n.boxMargin,Math.max),s.updateVal(Pr.data,"starty",e-f*n.boxMargin,Math.min),s.updateVal(Pr.data,"stopy",i+f*n.boxMargin,Math.max))}}this.sequenceItems.forEach(o())},insert:function(t,e,r,i){const n=Math.min(t,r),s=Math.max(t,r),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(Pr.data,"startx",n,Math.min),this.updateVal(Pr.data,"starty",a,Math.min),this.updateVal(Pr.data,"stopx",s,Math.max),this.updateVal(Pr.data,"stopy",o,Math.max),this.updateBounds(n,a,s,o)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},zh=Kc.sectionFills,u2=Kc.sectionColours,MY=function(t,e,r){const i=G().journey;let n="";const s=i.height*2+i.diagramMarginY,a=r+s;let o=0,l="#CCC",h="black",u=0;for(const[f,d]of e.entries()){if(n!==d.section){l=zh[o%zh.length],u=o%zh.length,h=u2[o%u2.length];const m={x:f*i.taskMargin+f*i.width+Sn,y:50,text:d.section,fill:l,num:u,colour:h};ro.drawSection(t,m,i),n=d.section,o++}const p=d.people.reduce((m,b)=>(Ui[b]&&(m[b]=Ui[b]),m),{});d.x=f*i.taskMargin+f*i.width+Sn,d.y=a,d.width=i.diagramMarginX,d.height=i.diagramMarginY,d.colour=h,d.fill=l,d.num=u,d.actors=p,ro.drawTask(t,d,i),Pr.insert(d.x,d.y,d.x+d.width+i.taskMargin,300+5*30)}},f2={setConf:BY,draw:IY};let d2={};const NY=function(t){d2={...d2,...t}},RY=(t,e,r)=>{try{I.debug(`Renering svg for syntax error
1273
- `);const i=_t("#"+e),n=i.append("g");n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in graph"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+r),i.attr("height",100),i.attr("width",500),i.attr("viewBox","768 0 912 512")}catch(i){I.error("Error while rendering info diagram"),I.error(PD(i))}},nc={setConf:NY,draw:RY},t4="flowchart-elk",OY=(t,e)=>{var r;return!!(t.match(/^\s*flowchart-elk/)||t.match(/^\s*flowchart|graph/)&&((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk")},FY=async()=>{const{diagram:t}=await import("./flowchart-elk-definition-170a3958-543f0844.js");return{id:t4,diagram:t}},PY={id:t4,detector:OY,loader:FY},VY=PY,e4="timeline",YY=t=>t.match(/^\s*timeline/)!==null,zY=async()=>{const{diagram:t}=await import("./timeline-definition-8e5a9bc6-6c09f608.js");return{id:e4,diagram:t}},UY={id:e4,detector:YY,loader:zY},WY=UY,r4="mindmap",HY=t=>t.match(/^\s*mindmap/)!==null,qY=async()=>{const{diagram:t}=await import("./mindmap-definition-44684416-ac92f950.js");return{id:r4,diagram:t}},GY={id:r4,detector:HY,loader:qY},$Y=GY;let p2=!1;const _o=()=>{p2||(p2=!0,oy(VY,WY,$Y),Ye("error",{db:{clear:()=>{}},styles:Eu,renderer:nc,parser:{parser:{yy:{}},parse:()=>{}},init:()=>{}},t=>t.toLowerCase().trim()==="error"),Ye("---",{db:{clear:()=>{}},styles:Eu,renderer:nc,parser:{parser:{yy:{}},parse:()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with unindented `---` blocks")}},init:()=>null},t=>t.toLowerCase().trimStart().startsWith("---")),Ye("c4",{parser:GI,db:Fy,renderer:Nd,styles:Cy,init:t=>{Nd.setConf(t.c4)}},$I),Ye("class",{parser:Rd,db:fs,renderer:yN,styles:va,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,fs.clear()}},VM),Ye("classDiagram",{parser:Rd,db:fs,renderer:LR,styles:va,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,fs.clear()}},YM),Ye("er",{parser:BR,db:YR,renderer:QR,styles:_y},DR),Ye("gantt",{parser:bO,db:g0,renderer:JO,styles:xy},_O),Ye("info",{parser:tF,db:sF,renderer:oF,styles:vy},lF),Ye("pie",{parser:cF,db:bF,renderer:xF,styles:ky},hF),Ye("requirement",{parser:vF,db:zF,renderer:KF,styles:wy},kF),Ye("sequence",{parser:ZF,db:Qd,renderer:t2,styles:Ty,init:t=>{if(t.sequence||(t.sequence={}),t.sequence.arrowMarkerAbsolute=t.arrowMarkerAbsolute,"sequenceDiagram"in t)throw new Error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.");Qd.setWrap(t.wrap),t2.setConf(t.sequence)}},QF),Ye("state",{parser:e2,db:Ri,renderer:zV,styles:Fl,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Ri.clear()}},QP),Ye("stateDiagram",{parser:e2,db:Ri,renderer:uY,styles:Fl,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Ri.clear()}},JP),Ye("journey",{parser:fY,db:c2,renderer:f2,styles:Ey,init:t=>{f2.setConf(t.journey),c2.clear()}},dY),Ye("flowchart",{parser:jd,db:hi,renderer:Fh,styles:Ol,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,pO.setConf(t.flowchart),hi.clear(),hi.setGen("gen-1")}},JR),Ye("flowchart-v2",{parser:jd,db:hi,renderer:Fh,styles:Ol,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,gy({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),Fh.setConf(t.flowchart),hi.clear(),hi.setGen("gen-2")}},tO),Ye("gitGraph",{parser:gI,db:RI,renderer:WI,styles:qI},yI))};class r1{constructor(e,r){var i,n;this.txt=e,this.type="graph",this.detectTypeFailed=!1;const s=G();this.txt=e;try{this.type=W1(e,s)}catch(l){this.handleError(l,r),this.type="error",this.detectTypeFailed=!0}const a=Ly(this.type);I.debug("Type "+this.type),this.db=a.db,(n=(i=this.db).clear)==null||n.call(i),this.renderer=a.renderer,this.parser=a.parser;const o=this.parser.parse.bind(this.parser);this.parser.parse=l=>o(bD(l,this.db)),this.parser.parser.yy=this.db,a.init&&(a.init(s),I.info("Initialized diagram "+this.type,s)),this.txt+=`
1271
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var k=this.next();return k||this.lex()},begin:function(k){this.conditionStack.push(k)},popState:function(){var k=this.conditionStack.length-1;return k>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(k){return k=this.conditionStack.length-1-Math.abs(k||0),k>=0?this.conditionStack[k]:"INITIAL"},pushState:function(k){this.begin(k)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(k,v,B,R){switch(B){case 0:return this.begin("open_directive"),26;case 1:return this.begin("type_directive"),27;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),29;case 4:return 28;case 5:break;case 6:break;case 7:return 11;case 8:break;case 9:break;case 10:return 4;case 11:return 17;case 12:return this.begin("acc_title"),18;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),20;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:return 23;case 20:return 24;case 21:return 25;case 22:return 15;case 23:return 6;case 24:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23,24],inclusive:!0}}};return b}();d.lexer=p;function m(){this.yy={}}return m.prototype=d,d.Parser=m,new m}();e1.parser=e1;const dY=e1,pY=t=>t.match(/^\s*journey/)!==null;let zs="";const E0=[],to=[],eo=[],gY=function(t,e,r){xe.parseDirective(this,t,e,r)},yY=function(){E0.length=0,to.length=0,zs="",eo.length=0,Lr()},mY=function(t){zs=t,E0.push(t)},bY=function(){return E0},_Y=function(){let t=c2();const e=100;let r=0;for(;!t&&r<e;)t=c2(),r++;return to.push(...eo),to},xY=function(){const t=[];return to.forEach(r=>{r.people&&t.push(...r.people)}),[...new Set(t)].sort()},vY=function(t,e){const r=e.substr(1).split(":");let i=0,n=[];r.length===1?(i=Number(r[0]),n=[]):(i=Number(r[0]),n=r[1].split(","));const s=n.map(o=>o.trim()),a={section:zs,type:zs,people:s,task:t,score:i};eo.push(a)},kY=function(t){const e={section:zs,type:zs,description:t,task:t,classes:[]};to.push(e)},c2=function(){const t=function(r){return eo[r].processed};let e=!0;for(const[r,i]of eo.entries())t(r),e=e&&i.processed;return e},wY=function(){return xY()},h2={parseDirective:gY,getConfig:()=>G().journey,clear:yY,setDiagramTitle:si,getDiagramTitle:ai,setAccTitle:kr,getAccTitle:Br,setAccDescription:Dr,getAccDescription:Ir,addSection:mY,getSections:bY,getTasks:_Y,addTask:vY,addTaskOrg:kY,getActors:wY},Xc=function(t,e){const r=t.append("rect");return r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),e.class!==void 0&&r.attr("class",e.class),r},TY=function(t,e){const i=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),n=t.append("g");n.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),n.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function s(l){const h=nu().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function a(l){const h=nu().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function o(l){l.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return e.score>3?s(n):e.score<3?a(n):o(n),i},Q3=function(t,e){const r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},J3=function(t,e){const r=e.text.replace(/<br\s*\/?>/gi," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),e.class!==void 0&&i.attr("class",e.class);const n=i.append("tspan");return n.attr("x",e.x+e.textMargin*2),n.text(r),i},EY=function(t,e){function r(n,s,a,o,l){return n+","+s+" "+(n+a)+","+s+" "+(n+a)+","+(s+o-l)+" "+(n+a-l*1.2)+","+(s+o)+" "+n+","+(s+o)}const i=t.append("polygon");i.attr("points",r(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,J3(t,e)},CY=function(t,e,r){const i=t.append("g"),n=C0();n.x=e.x,n.y=e.y,n.fill=e.fill,n.width=r.width,n.height=r.height,n.class="journey-section section-type-"+e.num,n.rx=3,n.ry=3,Xc(i,n),t4(r)(e.text,i,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},r,e.colour)};let u2=-1;const SY=function(t,e,r){const i=e.x+r.width/2,n=t.append("g");u2++;const s=300+5*30;n.append("line").attr("id","task"+u2).attr("x1",i).attr("y1",e.y).attr("x2",i).attr("y2",s).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),TY(n,{cx:i,cy:300+(5-e.score)*30,score:e.score});const a=C0();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=r.width,a.height=r.height,a.class="task task-type-"+e.num,a.rx=3,a.ry=3,Xc(n,a);let o=e.x+14;e.people.forEach(l=>{const h=e.actors[l].color,u={cx:o,cy:e.y,r:7,fill:h,stroke:"#000",title:l,pos:e.actors[l].position};Q3(n,u),o+=10}),t4(r)(e.task,n,a.x,a.y,a.width,a.height,{class:"task"},r,e.colour)},AY=function(t,e){Xc(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},LY=function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},C0=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},t4=function(){function t(n,s,a,o,l,h,u,f){const d=s.append("text").attr("x",a+l/2).attr("y",o+h/2+5).style("font-color",f).style("text-anchor","middle").text(n);i(d,u)}function e(n,s,a,o,l,h,u,f,d){const{taskFontSize:p,taskFontFamily:m}=f,b=n.split(/<br\s*\/?>/gi);for(let x=0;x<b.length;x++){const k=x*p-p*(b.length-1)/2,v=s.append("text").attr("x",a+l/2).attr("y",o).attr("fill",d).style("text-anchor","middle").style("font-size",p).style("font-family",m);v.append("tspan").attr("x",a+l/2).attr("dy",k).text(b[x]),v.attr("y",o+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(v,u)}}function r(n,s,a,o,l,h,u,f){const d=s.append("switch"),m=d.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",h).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");m.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,d,a,o,l,h,u,f),i(m,u)}function i(n,s){for(const a in s)a in s&&n.attr(a,s[a])}return function(n){return n.textPlacement==="fo"?r:n.textPlacement==="old"?t:e}}(),BY=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},ro={drawRect:Xc,drawCircle:Q3,drawSection:CY,drawText:J3,drawLabel:EY,drawTask:SY,drawBackgroundRect:AY,getTextObj:LY,getNoteRect:C0,initGraphics:BY},DY=function(t){Object.keys(t).forEach(function(r){Kc[r]=t[r]})},Ui={};function IY(t){const e=G().journey;let r=60;Object.keys(Ui).forEach(i=>{const n=Ui[i].color,s={cx:20,cy:r,r:7,fill:n,stroke:"#000",pos:Ui[i].position};ro.drawCircle(t,s);const a={x:40,y:r+7,fill:"#666",text:i,textMargin:e.boxTextMargin|5};ro.drawText(t,a),r+=20})}const Kc=G().journey,Sn=Kc.leftMargin,MY=function(t,e,r,i){const n=G().journey;i.db.clear(),i.parser.parse(t+`
1272
+ `);const s=G().securityLevel;let a;s==="sandbox"&&(a=_t("#i"+e));const o=_t(s==="sandbox"?a.nodes()[0].contentDocument.body:"body");Pr.init();const l=o.select("#"+e);ro.initGraphics(l);const h=i.db.getTasks(),u=i.db.getDiagramTitle(),f=i.db.getActors();for(const k in Ui)delete Ui[k];let d=0;f.forEach(k=>{Ui[k]={color:n.actorColours[d%n.actorColours.length],position:d},d++}),IY(l),Pr.insert(0,0,Sn,Object.keys(Ui).length*50),NY(l,h,0);const p=Pr.getBounds();u&&l.append("text").text(u).attr("x",Sn).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const m=p.stopy-p.starty+2*n.diagramMarginY,b=Sn+p.stopx+2*n.diagramMarginX;ni(l,m,b,n.useMaxWidth),l.append("line").attr("x1",Sn).attr("y1",n.height*4).attr("x2",b-Sn-4).attr("y2",n.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const x=u?70:0;l.attr("viewBox",`${p.startx} -25 ${b} ${m+x}`),l.attr("preserveAspectRatio","xMinYMin meet"),l.attr("height",m+x+25)},Pr={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,r,i){t[e]===void 0?t[e]=r:t[e]=i(r,t[e])},updateBounds:function(t,e,r,i){const n=G().journey,s=this;let a=0;function o(l){return function(u){a++;const f=s.sequenceItems.length-a+1;s.updateVal(u,"starty",e-f*n.boxMargin,Math.min),s.updateVal(u,"stopy",i+f*n.boxMargin,Math.max),s.updateVal(Pr.data,"startx",t-f*n.boxMargin,Math.min),s.updateVal(Pr.data,"stopx",r+f*n.boxMargin,Math.max),l!=="activation"&&(s.updateVal(u,"startx",t-f*n.boxMargin,Math.min),s.updateVal(u,"stopx",r+f*n.boxMargin,Math.max),s.updateVal(Pr.data,"starty",e-f*n.boxMargin,Math.min),s.updateVal(Pr.data,"stopy",i+f*n.boxMargin,Math.max))}}this.sequenceItems.forEach(o())},insert:function(t,e,r,i){const n=Math.min(t,r),s=Math.max(t,r),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(Pr.data,"startx",n,Math.min),this.updateVal(Pr.data,"starty",a,Math.min),this.updateVal(Pr.data,"stopx",s,Math.max),this.updateVal(Pr.data,"stopy",o,Math.max),this.updateBounds(n,a,s,o)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},zh=Kc.sectionFills,f2=Kc.sectionColours,NY=function(t,e,r){const i=G().journey;let n="";const s=i.height*2+i.diagramMarginY,a=r+s;let o=0,l="#CCC",h="black",u=0;for(const[f,d]of e.entries()){if(n!==d.section){l=zh[o%zh.length],u=o%zh.length,h=f2[o%f2.length];const m={x:f*i.taskMargin+f*i.width+Sn,y:50,text:d.section,fill:l,num:u,colour:h};ro.drawSection(t,m,i),n=d.section,o++}const p=d.people.reduce((m,b)=>(Ui[b]&&(m[b]=Ui[b]),m),{});d.x=f*i.taskMargin+f*i.width+Sn,d.y=a,d.width=i.diagramMarginX,d.height=i.diagramMarginY,d.colour=h,d.fill=l,d.num=u,d.actors=p,ro.drawTask(t,d,i),Pr.insert(d.x,d.y,d.x+d.width+i.taskMargin,300+5*30)}},d2={setConf:DY,draw:MY};let p2={};const RY=function(t){p2={...p2,...t}},OY=(t,e,r)=>{try{I.debug(`Renering svg for syntax error
1273
+ `);const i=_t("#"+e),n=i.append("g");n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in graph"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+r),i.attr("height",100),i.attr("width",500),i.attr("viewBox","768 0 912 512")}catch(i){I.error("Error while rendering info diagram"),I.error(VD(i))}},nc={setConf:RY,draw:OY},e4="flowchart-elk",FY=(t,e)=>{var r;return!!(t.match(/^\s*flowchart-elk/)||t.match(/^\s*flowchart|graph/)&&((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk")},PY=async()=>{const{diagram:t}=await i1(()=>import("./flowchart-elk-definition-170a3958-5ea9fc56.js"),[]);return{id:e4,diagram:t}},VY={id:e4,detector:FY,loader:PY},YY=VY,r4="timeline",zY=t=>t.match(/^\s*timeline/)!==null,UY=async()=>{const{diagram:t}=await i1(()=>import("./timeline-definition-8e5a9bc6-24fd1725.js"),[]);return{id:r4,diagram:t}},WY={id:r4,detector:zY,loader:UY},HY=WY,i4="mindmap",qY=t=>t.match(/^\s*mindmap/)!==null,GY=async()=>{const{diagram:t}=await i1(()=>import("./mindmap-definition-44684416-254e936e.js"),[]);return{id:i4,diagram:t}},$Y={id:i4,detector:qY,loader:GY},jY=$Y;let g2=!1;const _o=()=>{g2||(g2=!0,ly(YY,HY,jY),Ye("error",{db:{clear:()=>{}},styles:Eu,renderer:nc,parser:{parser:{yy:{}},parse:()=>{}},init:()=>{}},t=>t.toLowerCase().trim()==="error"),Ye("---",{db:{clear:()=>{}},styles:Eu,renderer:nc,parser:{parser:{yy:{}},parse:()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with unindented `---` blocks")}},init:()=>null},t=>t.toLowerCase().trimStart().startsWith("---")),Ye("c4",{parser:$I,db:Py,renderer:Rd,styles:Sy,init:t=>{Rd.setConf(t.c4)}},jI),Ye("class",{parser:Od,db:fs,renderer:mN,styles:va,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,fs.clear()}},YM),Ye("classDiagram",{parser:Od,db:fs,renderer:BR,styles:va,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,fs.clear()}},zM),Ye("er",{parser:DR,db:zR,renderer:JR,styles:xy},IR),Ye("gantt",{parser:_O,db:y0,renderer:tF,styles:vy},xO),Ye("info",{parser:eF,db:aF,renderer:lF,styles:ky},cF),Ye("pie",{parser:hF,db:_F,renderer:vF,styles:wy},uF),Ye("requirement",{parser:kF,db:UF,renderer:ZF,styles:Ty},wF),Ye("sequence",{parser:QF,db:Jd,renderer:e2,styles:Ey,init:t=>{if(t.sequence||(t.sequence={}),t.sequence.arrowMarkerAbsolute=t.arrowMarkerAbsolute,"sequenceDiagram"in t)throw new Error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.");Jd.setWrap(t.wrap),e2.setConf(t.sequence)}},JF),Ye("state",{parser:r2,db:Ri,renderer:UV,styles:Fl,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Ri.clear()}},JP),Ye("stateDiagram",{parser:r2,db:Ri,renderer:fY,styles:Fl,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Ri.clear()}},tV),Ye("journey",{parser:dY,db:h2,renderer:d2,styles:Cy,init:t=>{d2.setConf(t.journey),h2.clear()}},pY),Ye("flowchart",{parser:Xd,db:hi,renderer:Fh,styles:Ol,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,gO.setConf(t.flowchart),hi.clear(),hi.setGen("gen-1")}},tO),Ye("flowchart-v2",{parser:Xd,db:hi,renderer:Fh,styles:Ol,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,yy({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),Fh.setConf(t.flowchart),hi.clear(),hi.setGen("gen-2")}},eO),Ye("gitGraph",{parser:yI,db:OI,renderer:HI,styles:GI},mI))};class r1{constructor(e,r){var i,n;this.txt=e,this.type="graph",this.detectTypeFailed=!1;const s=G();this.txt=e;try{this.type=H1(e,s)}catch(l){this.handleError(l,r),this.type="error",this.detectTypeFailed=!0}const a=By(this.type);I.debug("Type "+this.type),this.db=a.db,(n=(i=this.db).clear)==null||n.call(i),this.renderer=a.renderer,this.parser=a.parser;const o=this.parser.parse.bind(this.parser);this.parser.parse=l=>o(_D(l,this.db)),this.parser.parser.yy=this.db,a.init&&(a.init(s),I.info("Initialized diagram "+this.type,s)),this.txt+=`
1274
1274
  `,this.parse(this.txt,r)}parse(e,r){var i,n;if(this.detectTypeFailed)return!1;try{return e=e+`
1275
- `,(n=(i=this.db).clear)==null||n.call(i),this.parser.parse(e),!0}catch(s){this.handleError(s,r)}return!1}handleError(e,r){if(r===void 0)throw e;if(q1(e)){r(e.str,e.hash);return}r(e)}getParser(){return this.parser}getType(){return this.type}}const C0=(t,e)=>{const r=W1(t,G());try{Ly(r)}catch{const n=vD(r);if(!n)throw new Error(`Diagram ${r} not found.`);return n().then(({diagram:s})=>(Ye(r,s,void 0),new r1(t,e)))}return new r1(t,e)},S0=r1,jY="graphics-document document";function XY(t,e){t.attr("role",jY),bs(e)||t.attr("aria-roledescription",e)}function KY(t,e,r,i){if(t.insert!==void 0)if(e||r){if(r){const n="chart-desc-"+i;t.attr("aria-describedby",n),t.insert("desc",":first-child").attr("id",n).text(r)}if(e){const n="chart-title-"+i;t.attr("aria-labelledby",n),t.insert("title",":first-child").attr("id",n).text(e)}}else return}const A0=["graph","flowchart","flowchart-v2","stateDiagram","stateDiagram-v2"],i4="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",n4="sandbox",s4="loose",ZY="http://www.w3.org/2000/svg",a4="http://www.w3.org/1999/xlink",o4="http://www.w3.org/1999/xhtml",QY="100%",JY="100%",tz="border:0;margin:0;",ez="margin:0",rz="allow-top-navigation-by-user-activation allow-popups",iz='The "iframe" tag is not supported by your browser.',l4=["foreignobject"],c4=["dominant-baseline"];function nz(t,e){return _o(),new S0(t,e).parse(t,e)}async function sz(t,e){return _o(),(await C0(t,e)).parse(t,e)}const h4=function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),e},L0=function(t){let e=t;return e=e.replace(/fl°°/g,"&#"),e=e.replace(/fl°/g,"&"),e=e.replace(/¶ß/g,";"),e},g2=(t,e,r=[])=>`
1276
- .${t} ${e} { ${r.join(" !important; ")} !important; }`,az=(t,e,r={})=>{var i;let n="";if(t.themeCSS!==void 0&&(n+=`
1275
+ `,(n=(i=this.db).clear)==null||n.call(i),this.parser.parse(e),!0}catch(s){this.handleError(s,r)}return!1}handleError(e,r){if(r===void 0)throw e;if(G1(e)){r(e.str,e.hash);return}r(e)}getParser(){return this.parser}getType(){return this.type}}const S0=(t,e)=>{const r=H1(t,G());try{By(r)}catch{const n=kD(r);if(!n)throw new Error(`Diagram ${r} not found.`);return n().then(({diagram:s})=>(Ye(r,s,void 0),new r1(t,e)))}return new r1(t,e)},A0=r1,XY="graphics-document document";function KY(t,e){t.attr("role",XY),bs(e)||t.attr("aria-roledescription",e)}function ZY(t,e,r,i){if(t.insert!==void 0)if(e||r){if(r){const n="chart-desc-"+i;t.attr("aria-describedby",n),t.insert("desc",":first-child").attr("id",n).text(r)}if(e){const n="chart-title-"+i;t.attr("aria-labelledby",n),t.insert("title",":first-child").attr("id",n).text(e)}}else return}const L0=["graph","flowchart","flowchart-v2","stateDiagram","stateDiagram-v2"],n4="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",s4="sandbox",a4="loose",QY="http://www.w3.org/2000/svg",o4="http://www.w3.org/1999/xlink",l4="http://www.w3.org/1999/xhtml",JY="100%",tz="100%",ez="border:0;margin:0;",rz="margin:0",iz="allow-top-navigation-by-user-activation allow-popups",nz='The "iframe" tag is not supported by your browser.',c4=["foreignobject"],h4=["dominant-baseline"];function sz(t,e){return _o(),new A0(t,e).parse(t,e)}async function az(t,e){return _o(),(await S0(t,e)).parse(t,e)}const u4=function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),e},B0=function(t){let e=t;return e=e.replace(/fl°°/g,"&#"),e=e.replace(/fl°/g,"&"),e=e.replace(/¶ß/g,";"),e},y2=(t,e,r=[])=>`
1276
+ .${t} ${e} { ${r.join(" !important; ")} !important; }`,oz=(t,e,r={})=>{var i;let n="";if(t.themeCSS!==void 0&&(n+=`
1277
1277
  ${t.themeCSS}`),t.fontFamily!==void 0&&(n+=`
1278
1278
  :root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(n+=`
1279
- :root { --mermaid-alt-font-family: ${t.altFontFamily}}`),!bs(r)&&A0.includes(e)){const l=t.htmlLabels||((i=t.flowchart)==null?void 0:i.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(const h in r){const u=r[h];bs(u.styles)||l.forEach(f=>{n+=g2(u.id,f,u.styles)}),bs(u.textStyles)||(n+=g2(u.id,"tspan",u.textStyles))}}return n},u4=(t,e,r,i)=>{const n=az(t,e,r),s=aI(e,n,t.themeVariables);return E4(C4(`${i}{${s}}`),S4)},f4=(t="",e,r)=>{let i=t;return!r&&!e&&(i=i.replace(/marker-end="url\(.*?#/g,'marker-end="url(#')),i=L0(i),i=i.replace(/<br>/g,"<br/>"),i},d4=(t="",e)=>{const r=e?e.viewBox.baseVal.height+"px":JY,i=btoa('<body style="'+ez+'">'+t+"</body>");return`<iframe style="width:${QY};height:${r};${tz}" src="data:text/html;base64,${i}" sandbox="${rz}">
1280
- ${iz}
1281
- </iframe>`},sc=(t,e,r,i,n)=>{const s=t.append("div");s.attr("id",r),i&&s.attr("style",i);const a=s.append("svg").attr("id",e).attr("width","100%").attr("xmlns",ZY);return n&&a.attr("xmlns:xlink",n),a.append("g"),t};function ac(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const p4=(t,e,r,i)=>{var n,s,a;(n=t.getElementById(e))==null||n.remove(),(s=t.getElementById(r))==null||s.remove(),(a=t.getElementById(i))==null||a.remove()},oz=function(t,e,r,i){var n,s,a,o;_o(),Wa();const l=jt.detectInit(e);l&&(Vn(l),G1(l));const h=G();I.debug(h),e.length>((h==null?void 0:h.maxTextSize)??5e4)&&(e=i4),e=e.replace(/\r\n?/g,`
1282
- `);const u="#"+t,f="i"+t,d="#"+f,p="d"+t,m="#"+p;let b=_t("body");const x=h.securityLevel===n4,k=h.securityLevel===s4,v=h.fontFamily;if(i!==void 0){if(i&&(i.innerHTML=""),x){const nt=ac(_t(i),f);b=_t(nt.nodes()[0].contentDocument.body),b.node().style.margin=0}else b=_t(i);sc(b,t,p,`font-family: ${v}`,a4)}else{if(p4(document,t,p,f),x){const nt=ac(_t("body"),f);b=_t(nt.nodes()[0].contentDocument.body),b.node().style.margin=0}else b=_t("body");sc(b,t,p)}e=h4(e);let B,R;try{if(B=C0(e),"then"in B)throw new Error("Diagram is a promise. Use renderAsync.")}catch(nt){B=new S0("error"),R=nt}const P=b.select(m).node(),V=B.type,O=P.firstChild,F=O.firstChild,C=A0.includes(V)?B.renderer.getClasses(e,B):{},S=u4(h,V,C,u),E=document.createElement("style");E.innerHTML=S,O.insertBefore(E,F);try{B.renderer.draw(e,t,Rl,B)}catch(nt){throw nc.draw(e,t,Rl),nt}const _=b.select(`${m} svg`),w=(s=(n=B.db).getAccTitle)==null?void 0:s.call(n),g=(o=(a=B.db).getAccDescription)==null?void 0:o.call(a);g4(V,_,w,g),b.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",o4);let D=b.select(m).node().innerHTML;if(I.debug("config.arrowMarkerAbsolute",h.arrowMarkerAbsolute),D=f4(D,x,Ke(h.arrowMarkerAbsolute)),x){const nt=b.select(m+" svg").node();D=d4(D,nt)}else k||(D=Na.sanitize(D,{ADD_TAGS:l4,ADD_ATTR:c4}));if(r!==void 0)switch(V){case"flowchart":case"flowchart-v2":r(D,hi.bindFunctions);break;case"gantt":r(D,g0.bindFunctions);break;case"class":case"classDiagram":r(D,fs.bindFunctions);break;default:r(D)}else I.debug("CB = undefined!");w3();const N=_t(x?d:m).node();if(N&&"remove"in N&&N.remove(),R)throw R;return D},lz=async function(t,e,r,i){var n,s,a,o;_o(),Wa();const l=jt.detectInit(e);l&&(Vn(l),G1(l));const h=G();I.debug(h),e.length>((h==null?void 0:h.maxTextSize)??5e4)&&(e=i4),e=e.replace(/\r\n?/g,`
1283
- `);const u="#"+t,f="i"+t,d="#"+f,p="d"+t,m="#"+p;let b=_t("body");const x=h.securityLevel===n4,k=h.securityLevel===s4,v=h.fontFamily;if(i!==void 0){if(i&&(i.innerHTML=""),x){const nt=ac(_t(i),f);b=_t(nt.nodes()[0].contentDocument.body),b.node().style.margin=0}else b=_t(i);sc(b,t,p,`font-family: ${v}`,a4)}else{if(p4(document,t,p,f),x){const nt=ac(_t("body"),f);b=_t(nt.nodes()[0].contentDocument.body),b.node().style.margin=0}else b=_t("body");sc(b,t,p)}e=h4(e);let B,R;try{B=await C0(e)}catch(nt){B=new S0("error"),R=nt}const P=b.select(m).node(),V=B.type,O=P.firstChild,F=O.firstChild,C=A0.includes(V)?B.renderer.getClasses(e,B):{},S=u4(h,V,C,u),E=document.createElement("style");E.innerHTML=S,O.insertBefore(E,F);try{await B.renderer.draw(e,t,Rl,B)}catch(nt){throw nc.draw(e,t,Rl),nt}const _=b.select(`${m} svg`),w=(s=(n=B.db).getAccTitle)==null?void 0:s.call(n),g=(o=(a=B.db).getAccDescription)==null?void 0:o.call(a);g4(V,_,w,g),b.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",o4);let D=b.select(m).node().innerHTML;if(I.debug("config.arrowMarkerAbsolute",h.arrowMarkerAbsolute),D=f4(D,x,Ke(h.arrowMarkerAbsolute)),x){const nt=b.select(m+" svg").node();D=d4(D,nt)}else k||(D=Na.sanitize(D,{ADD_TAGS:l4,ADD_ATTR:c4}));if(r!==void 0)switch(V){case"flowchart":case"flowchart-v2":r(D,hi.bindFunctions);break;case"gantt":r(D,g0.bindFunctions);break;case"class":case"classDiagram":r(D,fs.bindFunctions);break;default:r(D)}else I.debug("CB = undefined!");w3();const N=_t(x?d:m).node();if(N&&"remove"in N&&N.remove(),R)throw R;return D};function cz(t={}){var e;t!=null&&t.fontFamily&&!((e=t.themeVariables)!=null&&e.fontFamily)&&(t.themeVariables={fontFamily:t.fontFamily}),zD(t),t!=null&&t.theme&&t.theme in Hi?t.themeVariables=Hi[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Hi.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?YD(t):py();V1(r.logLevel),_o()}function g4(t,e,r,i){XY(e,t),KY(e,r,i,e.attr("id"))}const xe=Object.freeze({render:oz,renderAsync:lz,parse:nz,parseAsync:sz,parseDirective:Sy,initialize:cz,getConfig:G,setConfig:gy,getSiteConfig:py,updateSiteConfig:UD,reset:()=>{Wa()},globalReset:()=>{Wa(Ns)},defaultConfig:Ns});V1(G().logLevel);Wa(G());const hz=async function(t,e,r){try{await m4(t,e,r)}catch(i){I.warn("Syntax Error rendering"),q1(i)&&I.warn(i.str),Ar.parseError&&Ar.parseError(i)}},y4=(t,e,r)=>{I.warn(t),q1(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},uz=function(t,e,r){const i=xe.getConfig();t&&(Ar.sequenceConfig=t),I.debug(`${r?"":"No "}Callback function found`);let n;if(e===void 0)n=document.querySelectorAll(".mermaid");else if(typeof e=="string")n=document.querySelectorAll(e);else if(e instanceof HTMLElement)n=[e];else if(e instanceof NodeList)n=e;else throw new Error("Invalid argument nodes for mermaid.init");I.debug(`Found ${n.length} diagrams`),(t==null?void 0:t.startOnLoad)!==void 0&&(I.debug("Start On Load: "+(t==null?void 0:t.startOnLoad)),xe.updateSiteConfig({startOnLoad:t==null?void 0:t.startOnLoad}));const s=new jt.initIdGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const o=[];for(const l of Array.from(n)){I.info("Rendering diagram: "+l.id);/*! Check if previously processed */if(l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const h=`mermaid-${s.next()}`;a=l.innerHTML,a=_2(jt.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const u=jt.detectInit(a);u&&I.debug("Detected early reinit: ",u);try{xe.render(h,a,(f,d)=>{l.innerHTML=f,r!==void 0&&r(h),d&&d(l)},l)}catch(f){y4(f,o,Ar.parseError)}}if(o.length>0)throw o[0]},fz=async(...t)=>{I.debug(`Loading ${t.length} external diagrams`);const r=(await Promise.allSettled(t.map(async({id:i,detector:n,loader:s})=>{const{diagram:a}=await s();Ye(i,a,n)}))).filter(i=>i.status==="rejected");if(r.length>0){I.error(`Failed to load ${r.length} external diagrams`);for(const i of r)I.error(i);throw new Error(`Failed to load ${r.length} external diagrams`)}},m4=async function(t,e,r){const i=xe.getConfig();t&&(Ar.sequenceConfig=t),I.debug(`${r?"":"No "}Callback function found`);let n;if(e===void 0)n=document.querySelectorAll(".mermaid");else if(typeof e=="string")n=document.querySelectorAll(e);else if(e instanceof HTMLElement)n=[e];else if(e instanceof NodeList)n=e;else throw new Error("Invalid argument nodes for mermaid.init");I.debug(`Found ${n.length} diagrams`),(t==null?void 0:t.startOnLoad)!==void 0&&(I.debug("Start On Load: "+(t==null?void 0:t.startOnLoad)),xe.updateSiteConfig({startOnLoad:t==null?void 0:t.startOnLoad}));const s=new jt.initIdGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const o=[];for(const l of Array.from(n)){I.info("Rendering diagram: "+l.id);/*! Check if previously processed */if(l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const h=`mermaid-${s.next()}`;a=l.innerHTML,a=_2(jt.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const u=jt.detectInit(a);u&&I.debug("Detected early reinit: ",u);try{await xe.renderAsync(h,a,(f,d)=>{l.innerHTML=f,r!==void 0&&r(h),d&&d(l)},l)}catch(f){y4(f,o,Ar.parseError)}}if(o.length>0)throw o[0]},dz=function(t){xe.initialize(t)},pz=async(t,{lazyLoad:e=!0}={})=>{e?oy(...t):await fz(...t)},b4=function(){if(Ar.startOnLoad){const{startOnLoad:t}=xe.getConfig();t&&Ar.init().catch(e=>I.error("Mermaid failed to initialize",e))}};if(typeof document<"u"){/*!
1279
+ :root { --mermaid-alt-font-family: ${t.altFontFamily}}`),!bs(r)&&L0.includes(e)){const l=t.htmlLabels||((i=t.flowchart)==null?void 0:i.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(const h in r){const u=r[h];bs(u.styles)||l.forEach(f=>{n+=y2(u.id,f,u.styles)}),bs(u.textStyles)||(n+=y2(u.id,"tspan",u.textStyles))}}return n},f4=(t,e,r,i)=>{const n=oz(t,e,r),s=oI(e,n,t.themeVariables);return C4(S4(`${i}{${s}}`),A4)},d4=(t="",e,r)=>{let i=t;return!r&&!e&&(i=i.replace(/marker-end="url\(.*?#/g,'marker-end="url(#')),i=B0(i),i=i.replace(/<br>/g,"<br/>"),i},p4=(t="",e)=>{const r=e?e.viewBox.baseVal.height+"px":tz,i=btoa('<body style="'+rz+'">'+t+"</body>");return`<iframe style="width:${JY};height:${r};${ez}" src="data:text/html;base64,${i}" sandbox="${iz}">
1280
+ ${nz}
1281
+ </iframe>`},sc=(t,e,r,i,n)=>{const s=t.append("div");s.attr("id",r),i&&s.attr("style",i);const a=s.append("svg").attr("id",e).attr("width","100%").attr("xmlns",QY);return n&&a.attr("xmlns:xlink",n),a.append("g"),t};function ac(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const g4=(t,e,r,i)=>{var n,s,a;(n=t.getElementById(e))==null||n.remove(),(s=t.getElementById(r))==null||s.remove(),(a=t.getElementById(i))==null||a.remove()},lz=function(t,e,r,i){var n,s,a,o;_o(),Wa();const l=jt.detectInit(e);l&&(Vn(l),$1(l));const h=G();I.debug(h),e.length>((h==null?void 0:h.maxTextSize)??5e4)&&(e=n4),e=e.replace(/\r\n?/g,`
1282
+ `);const u="#"+t,f="i"+t,d="#"+f,p="d"+t,m="#"+p;let b=_t("body");const x=h.securityLevel===s4,k=h.securityLevel===a4,v=h.fontFamily;if(i!==void 0){if(i&&(i.innerHTML=""),x){const nt=ac(_t(i),f);b=_t(nt.nodes()[0].contentDocument.body),b.node().style.margin=0}else b=_t(i);sc(b,t,p,`font-family: ${v}`,o4)}else{if(g4(document,t,p,f),x){const nt=ac(_t("body"),f);b=_t(nt.nodes()[0].contentDocument.body),b.node().style.margin=0}else b=_t("body");sc(b,t,p)}e=u4(e);let B,R;try{if(B=S0(e),"then"in B)throw new Error("Diagram is a promise. Use renderAsync.")}catch(nt){B=new A0("error"),R=nt}const P=b.select(m).node(),V=B.type,O=P.firstChild,F=O.firstChild,C=L0.includes(V)?B.renderer.getClasses(e,B):{},S=f4(h,V,C,u),E=document.createElement("style");E.innerHTML=S,O.insertBefore(E,F);try{B.renderer.draw(e,t,Rl,B)}catch(nt){throw nc.draw(e,t,Rl),nt}const _=b.select(`${m} svg`),w=(s=(n=B.db).getAccTitle)==null?void 0:s.call(n),g=(o=(a=B.db).getAccDescription)==null?void 0:o.call(a);y4(V,_,w,g),b.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",l4);let D=b.select(m).node().innerHTML;if(I.debug("config.arrowMarkerAbsolute",h.arrowMarkerAbsolute),D=d4(D,x,Ke(h.arrowMarkerAbsolute)),x){const nt=b.select(m+" svg").node();D=p4(D,nt)}else k||(D=Na.sanitize(D,{ADD_TAGS:c4,ADD_ATTR:h4}));if(r!==void 0)switch(V){case"flowchart":case"flowchart-v2":r(D,hi.bindFunctions);break;case"gantt":r(D,y0.bindFunctions);break;case"class":case"classDiagram":r(D,fs.bindFunctions);break;default:r(D)}else I.debug("CB = undefined!");T3();const N=_t(x?d:m).node();if(N&&"remove"in N&&N.remove(),R)throw R;return D},cz=async function(t,e,r,i){var n,s,a,o;_o(),Wa();const l=jt.detectInit(e);l&&(Vn(l),$1(l));const h=G();I.debug(h),e.length>((h==null?void 0:h.maxTextSize)??5e4)&&(e=n4),e=e.replace(/\r\n?/g,`
1283
+ `);const u="#"+t,f="i"+t,d="#"+f,p="d"+t,m="#"+p;let b=_t("body");const x=h.securityLevel===s4,k=h.securityLevel===a4,v=h.fontFamily;if(i!==void 0){if(i&&(i.innerHTML=""),x){const nt=ac(_t(i),f);b=_t(nt.nodes()[0].contentDocument.body),b.node().style.margin=0}else b=_t(i);sc(b,t,p,`font-family: ${v}`,o4)}else{if(g4(document,t,p,f),x){const nt=ac(_t("body"),f);b=_t(nt.nodes()[0].contentDocument.body),b.node().style.margin=0}else b=_t("body");sc(b,t,p)}e=u4(e);let B,R;try{B=await S0(e)}catch(nt){B=new A0("error"),R=nt}const P=b.select(m).node(),V=B.type,O=P.firstChild,F=O.firstChild,C=L0.includes(V)?B.renderer.getClasses(e,B):{},S=f4(h,V,C,u),E=document.createElement("style");E.innerHTML=S,O.insertBefore(E,F);try{await B.renderer.draw(e,t,Rl,B)}catch(nt){throw nc.draw(e,t,Rl),nt}const _=b.select(`${m} svg`),w=(s=(n=B.db).getAccTitle)==null?void 0:s.call(n),g=(o=(a=B.db).getAccDescription)==null?void 0:o.call(a);y4(V,_,w,g),b.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",l4);let D=b.select(m).node().innerHTML;if(I.debug("config.arrowMarkerAbsolute",h.arrowMarkerAbsolute),D=d4(D,x,Ke(h.arrowMarkerAbsolute)),x){const nt=b.select(m+" svg").node();D=p4(D,nt)}else k||(D=Na.sanitize(D,{ADD_TAGS:c4,ADD_ATTR:h4}));if(r!==void 0)switch(V){case"flowchart":case"flowchart-v2":r(D,hi.bindFunctions);break;case"gantt":r(D,y0.bindFunctions);break;case"class":case"classDiagram":r(D,fs.bindFunctions);break;default:r(D)}else I.debug("CB = undefined!");T3();const N=_t(x?d:m).node();if(N&&"remove"in N&&N.remove(),R)throw R;return D};function hz(t={}){var e;t!=null&&t.fontFamily&&!((e=t.themeVariables)!=null&&e.fontFamily)&&(t.themeVariables={fontFamily:t.fontFamily}),UD(t),t!=null&&t.theme&&t.theme in Hi?t.themeVariables=Hi[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Hi.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?zD(t):gy();Y1(r.logLevel),_o()}function y4(t,e,r,i){KY(e,t),ZY(e,r,i,e.attr("id"))}const xe=Object.freeze({render:lz,renderAsync:cz,parse:sz,parseAsync:az,parseDirective:Ay,initialize:hz,getConfig:G,setConfig:yy,getSiteConfig:gy,updateSiteConfig:WD,reset:()=>{Wa()},globalReset:()=>{Wa(Ns)},defaultConfig:Ns});Y1(G().logLevel);Wa(G());const uz=async function(t,e,r){try{await b4(t,e,r)}catch(i){I.warn("Syntax Error rendering"),G1(i)&&I.warn(i.str),Ar.parseError&&Ar.parseError(i)}},m4=(t,e,r)=>{I.warn(t),G1(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},fz=function(t,e,r){const i=xe.getConfig();t&&(Ar.sequenceConfig=t),I.debug(`${r?"":"No "}Callback function found`);let n;if(e===void 0)n=document.querySelectorAll(".mermaid");else if(typeof e=="string")n=document.querySelectorAll(e);else if(e instanceof HTMLElement)n=[e];else if(e instanceof NodeList)n=e;else throw new Error("Invalid argument nodes for mermaid.init");I.debug(`Found ${n.length} diagrams`),(t==null?void 0:t.startOnLoad)!==void 0&&(I.debug("Start On Load: "+(t==null?void 0:t.startOnLoad)),xe.updateSiteConfig({startOnLoad:t==null?void 0:t.startOnLoad}));const s=new jt.initIdGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const o=[];for(const l of Array.from(n)){I.info("Rendering diagram: "+l.id);/*! Check if previously processed */if(l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const h=`mermaid-${s.next()}`;a=l.innerHTML,a=x2(jt.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const u=jt.detectInit(a);u&&I.debug("Detected early reinit: ",u);try{xe.render(h,a,(f,d)=>{l.innerHTML=f,r!==void 0&&r(h),d&&d(l)},l)}catch(f){m4(f,o,Ar.parseError)}}if(o.length>0)throw o[0]},dz=async(...t)=>{I.debug(`Loading ${t.length} external diagrams`);const r=(await Promise.allSettled(t.map(async({id:i,detector:n,loader:s})=>{const{diagram:a}=await s();Ye(i,a,n)}))).filter(i=>i.status==="rejected");if(r.length>0){I.error(`Failed to load ${r.length} external diagrams`);for(const i of r)I.error(i);throw new Error(`Failed to load ${r.length} external diagrams`)}},b4=async function(t,e,r){const i=xe.getConfig();t&&(Ar.sequenceConfig=t),I.debug(`${r?"":"No "}Callback function found`);let n;if(e===void 0)n=document.querySelectorAll(".mermaid");else if(typeof e=="string")n=document.querySelectorAll(e);else if(e instanceof HTMLElement)n=[e];else if(e instanceof NodeList)n=e;else throw new Error("Invalid argument nodes for mermaid.init");I.debug(`Found ${n.length} diagrams`),(t==null?void 0:t.startOnLoad)!==void 0&&(I.debug("Start On Load: "+(t==null?void 0:t.startOnLoad)),xe.updateSiteConfig({startOnLoad:t==null?void 0:t.startOnLoad}));const s=new jt.initIdGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const o=[];for(const l of Array.from(n)){I.info("Rendering diagram: "+l.id);/*! Check if previously processed */if(l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const h=`mermaid-${s.next()}`;a=l.innerHTML,a=x2(jt.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const u=jt.detectInit(a);u&&I.debug("Detected early reinit: ",u);try{await xe.renderAsync(h,a,(f,d)=>{l.innerHTML=f,r!==void 0&&r(h),d&&d(l)},l)}catch(f){m4(f,o,Ar.parseError)}}if(o.length>0)throw o[0]},pz=function(t){xe.initialize(t)},gz=async(t,{lazyLoad:e=!0}={})=>{e?ly(...t):await dz(...t)},_4=function(){if(Ar.startOnLoad){const{startOnLoad:t}=xe.getConfig();t&&Ar.init().catch(e=>I.error("Mermaid failed to initialize",e))}};if(typeof document<"u"){/*!
1284
1284
  * Wait for document loaded before starting the execution
1285
- */window.addEventListener("load",b4,!1)}const gz=function(t){Ar.parseError=t},yz=t=>xe.parse(t,Ar.parseError),oc=[];let Uh=!1;const _4=async()=>{if(!Uh){for(Uh=!0;oc.length>0;){const t=oc.shift();if(t)try{await t()}catch(e){I.error("Error executing queue",e)}}Uh=!1}},mz=t=>new Promise((e,r)=>{const i=()=>new Promise((n,s)=>{xe.parseAsync(t,Ar.parseError).then(a=>{n(a),e(a)},a=>{I.error("Error parsing",a),s(a),r(a)})});oc.push(i),_4().catch(r)}),bz=(t,e,r,i)=>new Promise((n,s)=>{const a=()=>new Promise((o,l)=>{xe.renderAsync(t,e,r,i).then(h=>{o(h),n(h)},h=>{I.error("Error parsing",h),l(h),s(h)})});oc.push(a),_4().catch(s)}),Ar={startOnLoad:!0,diagrams:{},mermaidAPI:xe,parse:yz,parseAsync:mz,render:xe.render,renderAsync:bz,init:hz,initThrowsErrors:uz,initThrowsErrorsAsync:m4,registerExternalDiagrams:pz,initialize:dz,parseError:void 0,contentLoaded:b4,setParseErrorHandler:gz},_z=m2("div")(({theme:t})=>({display:"flex",justifyContent:"center","#mermaid":{".edgeLabel":{backgroundColor:t.palette.background.paper,color:t.palette.text.primary},".nodeLabel":{color:t.palette.secondary.dark},".edgePaths > path":{stroke:t.palette.secondary.dark},".arrowMarkerPath":{fill:t.palette.secondary.dark,stroke:"transparent"}},"&&& #mermaid .node rect":{stroke:t.palette.secondary.border,fill:t.palette.secondary.light}}));Ar.initialize({startOnLoad:!1,theme:"default",themeCSS:`
1285
+ */window.addEventListener("load",_4,!1)}const yz=function(t){Ar.parseError=t},mz=t=>xe.parse(t,Ar.parseError),oc=[];let Uh=!1;const x4=async()=>{if(!Uh){for(Uh=!0;oc.length>0;){const t=oc.shift();if(t)try{await t()}catch(e){I.error("Error executing queue",e)}}Uh=!1}},bz=t=>new Promise((e,r)=>{const i=()=>new Promise((n,s)=>{xe.parseAsync(t,Ar.parseError).then(a=>{n(a),e(a)},a=>{I.error("Error parsing",a),s(a),r(a)})});oc.push(i),x4().catch(r)}),_z=(t,e,r,i)=>new Promise((n,s)=>{const a=()=>new Promise((o,l)=>{xe.renderAsync(t,e,r,i).then(h=>{o(h),n(h)},h=>{I.error("Error parsing",h),l(h),s(h)})});oc.push(a),x4().catch(s)}),Ar={startOnLoad:!0,diagrams:{},mermaidAPI:xe,parse:mz,parseAsync:bz,render:xe.render,renderAsync:_z,init:uz,initThrowsErrors:fz,initThrowsErrorsAsync:b4,registerExternalDiagrams:gz,initialize:pz,parseError:void 0,contentLoaded:_4,setParseErrorHandler:yz},xz=b2("div")(({theme:t})=>({display:"flex",justifyContent:"center","#mermaid":{".edgeLabel":{backgroundColor:t.palette.background.paper,color:t.palette.text.primary},".nodeLabel":{color:t.palette.secondary.dark},".edgePaths > path":{stroke:t.palette.secondary.dark},".arrowMarkerPath":{fill:t.palette.secondary.dark,stroke:"transparent"}},"&&& #mermaid .node rect":{stroke:t.palette.secondary.border,fill:t.palette.secondary.light}}));Ar.initialize({startOnLoad:!1,theme:"default",themeCSS:`
1286
1286
  .clusters #_ rect {
1287
1287
  fill: transparent;
1288
1288
  stroke: transparent;
1289
1289
  }
1290
- `});const xz=({children:t,...e})=>{const r=Wh.useRef(null);return Wh.useEffect(()=>{Ar.render("mermaid",t,i=>{r.current&&(r.current.innerHTML=i)})},[t]),Po(_z,{ref:r,...e})},vz=m2(xz)(({theme:t})=>({"#mermaid .node rect":{fill:t.palette.secondary.light,stroke:t.palette.secondary.border},"#mermaid .unleash-logo":{padding:t.spacing(1)}})),kz=t=>t[0]*1e3>new Date().getTime()-6e5,wz=t=>{var n,s;const r=(t.values||[]).filter(a=>kz(a)),i=r.length?parseFloat(r[r.length-1][1]):0;return{label:t.label,reqs:i,type:b2((s=(n=t.metric)==null?void 0:n.endpoint)==null?void 0:s.split("/")[2])}},Tz=(t,e)=>{var i;const r=e.label+e.type;return t[r]={...e,reqs:e.reqs+(((i=t[r])==null?void 0:i.reqs)??0)},t},Ez=t=>{var i,n;const r=(((n=(i=t==null?void 0:t.data)==null?void 0:i.result)==null?void 0:n.map(s=>{var a;return{...s,label:b2((a=s.metric)==null?void 0:a.appName)}}).filter(s=>s.label!=="unknown"))||[]).map(wz).reduce(Tz,{});return Object.values(r).map(s=>({...s,reqs:s.reqs.toFixed(2)})).filter(s=>s.reqs!=="0.00")??[]},y2=()=>{A4("Network - Overview");const{themeMode:t}=L4(),{metrics:e}=R4(),r=Wh.useMemo(()=>Ez(e),[e]),i=`
1290
+ `});const vz=({children:t,...e})=>{const r=Wh.useRef(null);return Wh.useEffect(()=>{Ar.render("mermaid",t,i=>{r.current&&(r.current.innerHTML=i)})},[t]),Po(xz,{ref:r,...e})},kz=b2(vz)(({theme:t})=>({"#mermaid .node rect":{fill:t.palette.secondary.light,stroke:t.palette.secondary.border},"#mermaid .unleash-logo":{padding:t.spacing(1)}})),wz=t=>t[0]*1e3>new Date().getTime()-6e5,Tz=t=>{var n,s;const r=(t.values||[]).filter(a=>wz(a)),i=r.length?parseFloat(r[r.length-1][1]):0;return{label:t.label,reqs:i,type:_2((s=(n=t.metric)==null?void 0:n.endpoint)==null?void 0:s.split("/")[2])}},Ez=(t,e)=>{var i;const r=e.label+e.type;return t[r]={...e,reqs:e.reqs+(((i=t[r])==null?void 0:i.reqs)??0)},t},Cz=t=>{var i,n;const r=(((n=(i=t==null?void 0:t.data)==null?void 0:i.result)==null?void 0:n.map(s=>{var a;return{...s,label:_2((a=s.metric)==null?void 0:a.appName)}}).filter(s=>s.label!=="unknown"))||[]).map(Tz).reduce(Ez,{});return Object.values(r).map(s=>({...s,reqs:s.reqs.toFixed(2)})).filter(s=>s.reqs!=="0.00")??[]},m2=()=>{L4("Network - Overview");const{themeMode:t}=B4(),{metrics:e}=O4(),r=Wh.useMemo(()=>Cz(e),[e]),i=`
1291
1291
  graph TD
1292
1292
  subgraph _[ ]
1293
1293
  direction BT
1294
- Unleash(<img src='${B4(t==="dark"?M4:N4)}' width='72' height='72' class='unleash-logo'/><br/>Unleash)
1294
+ Unleash(<img src='${D4(t==="dark"?N4:R4)}' width='72' height='72' class='unleash-logo'/><br/>Unleash)
1295
1295
  ${r.map(({label:n,reqs:s,type:a},o)=>`app-${o}("${n.replaceAll('"',"&quot;")}") -- ${s} req/s<br>${a} --> Unleash`).join(`
1296
1296
  `)}
1297
1297
  end
1298
- `;return Po(D4,{condition:r.length===0,show:Po(I4,{severity:"warning",children:"No data available."}),elseShow:Po(vz,{children:i})})},Nz=Object.freeze(Object.defineProperty({__proto__:null,NetworkOverview:y2,default:y2},Symbol.toStringTag,{value:"Module"}));export{ji as C,Nz as N,ee as _,Vc as a,dn as b,O1 as c,Mz as d,Ke as e,Xt as f,G as g,lR as h,AN as i,Zr as j,Cr as k,I as l,_R as m,Us as n,lI as o,jd as p,Sy as q,Lr as r,_t as s,zt as t,Zt as u,nu as v,Ur as w};
1298
+ `;return Po(I4,{condition:r.length===0,show:Po(M4,{severity:"warning",children:"No data available."}),elseShow:Po(kz,{children:i})})},Rz=Object.freeze(Object.defineProperty({__proto__:null,NetworkOverview:m2,default:m2},Symbol.toStringTag,{value:"Module"}));export{ji as C,Rz as N,ee as _,Vc as a,dn as b,F1 as c,Nz as d,Ke as e,Xt as f,G as g,cR as h,LN as i,Zr as j,Cr as k,I as l,xR as m,Us as n,cI as o,Xd as p,Ay as q,Lr as r,_t as s,zt as t,Zt as u,nu as v,Ur as w};