unleash-server 5.1.9 → 5.2.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.
- package/dist/lib/create-config.js +5 -2
- package/dist/lib/create-config.js.map +1 -1
- package/dist/lib/db/access-store.d.ts +2 -1
- package/dist/lib/db/access-store.js +17 -3
- package/dist/lib/db/access-store.js.map +1 -1
- package/dist/lib/db/client-metrics-store-v2.js +19 -30
- package/dist/lib/db/client-metrics-store-v2.js.map +1 -1
- package/dist/lib/db/context-field-store.d.ts +4 -1
- package/dist/lib/db/context-field-store.js +44 -14
- package/dist/lib/db/context-field-store.js.map +1 -1
- package/dist/lib/db/environment-store.d.ts +1 -0
- package/dist/lib/db/environment-store.js +6 -0
- package/dist/lib/db/environment-store.js.map +1 -1
- package/dist/lib/db/event-store.js +2 -1
- package/dist/lib/db/event-store.js.map +1 -1
- package/dist/lib/db/feature-strategy-store.d.ts +2 -0
- package/dist/lib/db/feature-strategy-store.js +25 -0
- package/dist/lib/db/feature-strategy-store.js.map +1 -1
- package/dist/lib/db/feature-strategy-store.test.js +75 -0
- package/dist/lib/db/feature-strategy-store.test.js.map +1 -0
- package/dist/lib/db/group-store.d.ts +1 -1
- package/dist/lib/db/group-store.js +2 -2
- package/dist/lib/db/group-store.js.map +1 -1
- package/dist/lib/db/index.js +2 -2
- package/dist/lib/db/index.js.map +1 -1
- package/dist/lib/db/role-store.js +2 -2
- package/dist/lib/db/role-store.js.map +1 -1
- package/dist/lib/db/segment-store.d.ts +6 -2
- package/dist/lib/db/segment-store.js +27 -6
- package/dist/lib/db/segment-store.js.map +1 -1
- package/dist/lib/error/no-access-error.d.ts +3 -2
- package/dist/lib/error/no-access-error.js +10 -4
- package/dist/lib/error/no-access-error.js.map +1 -1
- package/dist/lib/error/unleash-error.test.js +8 -2
- package/dist/lib/error/unleash-error.test.js.map +1 -1
- package/dist/lib/features/access/createAccessService.js +5 -5
- package/dist/lib/features/access/createAccessService.js.map +1 -1
- package/dist/lib/features/export-import-toggles/createExportImportService.js +4 -2
- package/dist/lib/features/export-import-toggles/createExportImportService.js.map +1 -1
- package/dist/lib/features/export-import-toggles/export-import-api-usage.test.d.ts +1 -0
- package/dist/lib/features/export-import-toggles/export-import-api-usage.test.js +69 -0
- package/dist/lib/features/export-import-toggles/export-import-api-usage.test.js.map +1 -0
- package/dist/lib/features/export-import-toggles/export-import-controller.js +5 -1
- package/dist/lib/features/export-import-toggles/export-import-controller.js.map +1 -1
- package/dist/lib/features/export-import-toggles/export-import-service.js +7 -2
- package/dist/lib/features/export-import-toggles/export-import-service.js.map +1 -1
- package/dist/lib/features/feature-toggle/createFeatureToggleService.js +4 -4
- package/dist/lib/features/feature-toggle/createFeatureToggleService.js.map +1 -1
- package/dist/lib/features/playground/advanced-playground.test.d.ts +1 -0
- package/dist/lib/features/playground/advanced-playground.test.js +238 -0
- package/dist/lib/features/playground/advanced-playground.test.js.map +1 -0
- package/dist/lib/{util → features/playground}/feature-evaluator/client.d.ts +3 -2
- package/dist/lib/{util → features/playground}/feature-evaluator/client.js +1 -1
- package/dist/lib/features/playground/feature-evaluator/client.js.map +1 -0
- package/dist/lib/features/playground/feature-evaluator/constraint.js.map +1 -0
- package/dist/lib/features/playground/feature-evaluator/context.js.map +1 -0
- package/dist/lib/features/playground/feature-evaluator/feature-evaluator.js.map +1 -0
- package/dist/lib/features/playground/feature-evaluator/feature.js.map +1 -0
- package/dist/lib/{util → features/playground}/feature-evaluator/helpers.d.ts +1 -1
- package/dist/lib/features/playground/feature-evaluator/helpers.js.map +1 -0
- package/dist/lib/{util → features/playground}/feature-evaluator/index.d.ts +1 -1
- package/dist/lib/{util → features/playground}/feature-evaluator/index.js +2 -2
- package/dist/lib/features/playground/feature-evaluator/index.js.map +1 -0
- package/dist/lib/features/playground/feature-evaluator/repository/bootstrap-provider.js.map +1 -0
- package/dist/lib/features/playground/feature-evaluator/repository/index.js.map +1 -0
- package/dist/lib/features/playground/feature-evaluator/repository/storage-provider-in-mem.js.map +1 -0
- package/dist/lib/features/playground/feature-evaluator/repository/storage-provider.js.map +1 -0
- package/dist/lib/features/playground/feature-evaluator/strategy/application-hostname-strategy.js.map +1 -0
- package/dist/lib/features/playground/feature-evaluator/strategy/default-strategy.js.map +1 -0
- package/dist/lib/features/playground/feature-evaluator/strategy/flexible-rollout-strategy.js.map +1 -0
- package/dist/lib/features/playground/feature-evaluator/strategy/gradual-rollout-random.js.map +1 -0
- package/dist/lib/features/playground/feature-evaluator/strategy/gradual-rollout-session-id.js.map +1 -0
- package/dist/lib/features/playground/feature-evaluator/strategy/gradual-rollout-user-id.js.map +1 -0
- package/dist/lib/features/playground/feature-evaluator/strategy/index.js.map +1 -0
- package/dist/lib/features/playground/feature-evaluator/strategy/remote-address-strategy.js.map +1 -0
- package/dist/lib/features/playground/feature-evaluator/strategy/strategy.js.map +1 -0
- package/dist/lib/{util → features/playground}/feature-evaluator/strategy/unknown-strategy.js +1 -1
- package/dist/lib/features/playground/feature-evaluator/strategy/unknown-strategy.js.map +1 -0
- package/dist/lib/features/playground/feature-evaluator/strategy/user-with-id-strategy.js.map +1 -0
- package/dist/lib/features/playground/feature-evaluator/strategy/util.js.map +1 -0
- package/dist/lib/features/playground/feature-evaluator/variant.js.map +1 -0
- package/dist/lib/features/playground/generateObjectCombinations.d.ts +7 -0
- package/dist/lib/features/playground/generateObjectCombinations.js +16 -0
- package/dist/lib/features/playground/generateObjectCombinations.js.map +1 -0
- package/dist/lib/features/playground/generateObjectCombinations.test.d.ts +1 -0
- package/dist/lib/features/playground/generateObjectCombinations.test.js +33 -0
- package/dist/lib/features/playground/generateObjectCombinations.test.js.map +1 -0
- package/dist/lib/{util → features/playground}/offline-unleash-client.js +2 -2
- package/dist/lib/features/playground/offline-unleash-client.js.map +1 -0
- package/dist/lib/{util → features/playground}/offline-unleash-client.test.js +1 -1
- package/dist/lib/features/playground/offline-unleash-client.test.js.map +1 -0
- package/dist/lib/features/playground/playground-service.d.ts +34 -0
- package/dist/lib/features/playground/playground-service.js +114 -0
- package/dist/lib/features/playground/playground-service.js.map +1 -0
- package/dist/lib/features/playground/playground-view-model.d.ts +4 -0
- package/dist/lib/features/playground/playground-view-model.js +49 -0
- package/dist/lib/features/playground/playground-view-model.js.map +1 -0
- package/dist/lib/features/playground/playground-view-model.test.d.ts +1 -0
- package/dist/lib/features/playground/playground-view-model.test.js +122 -0
- package/dist/lib/features/playground/playground-view-model.test.js.map +1 -0
- package/dist/lib/features/playground/playground.d.ts +16 -0
- package/dist/lib/features/playground/playground.js +78 -0
- package/dist/lib/features/playground/playground.js.map +1 -0
- package/dist/lib/features/playground/playground.test.d.ts +1 -0
- package/dist/lib/{routes/admin-api → features/playground}/playground.test.js +3 -2
- package/dist/lib/features/playground/playground.test.js.map +1 -0
- package/dist/lib/features/playground/validateQueryComplexity.d.ts +1 -0
- package/dist/lib/features/playground/validateQueryComplexity.js +15 -0
- package/dist/lib/features/playground/validateQueryComplexity.js.map +1 -0
- package/dist/lib/features/playground/validateQueryComplexity.test.d.ts +1 -0
- package/dist/lib/features/playground/validateQueryComplexity.test.js +19 -0
- package/dist/lib/features/playground/validateQueryComplexity.test.js.map +1 -0
- package/dist/lib/middleware/rbac-middleware.d.ts +1 -1
- package/dist/lib/middleware/rbac-middleware.js +7 -4
- package/dist/lib/middleware/rbac-middleware.js.map +1 -1
- package/dist/lib/middleware/rbac-middleware.test.js +8 -8
- package/dist/lib/middleware/rbac-middleware.test.js.map +1 -1
- package/dist/lib/openapi/endpoint-descriptions.d.ts +4 -0
- package/dist/lib/openapi/endpoint-descriptions.js +4 -0
- package/dist/lib/openapi/endpoint-descriptions.js.map +1 -1
- package/dist/lib/openapi/index.js +7 -0
- package/dist/lib/openapi/index.js.map +1 -1
- package/dist/lib/openapi/meta-schema-rules.test.js +16 -25
- package/dist/lib/openapi/meta-schema-rules.test.js.map +1 -1
- package/dist/lib/openapi/spec/advanced-playground-environment-feature-schema.d.ts +652 -0
- package/dist/lib/openapi/spec/advanced-playground-environment-feature-schema.js +146 -0
- package/dist/lib/openapi/spec/advanced-playground-environment-feature-schema.js.map +1 -0
- package/dist/lib/openapi/spec/advanced-playground-feature-schema.d.ts +1217 -0
- package/dist/lib/openapi/spec/advanced-playground-feature-schema.js +51 -0
- package/dist/lib/openapi/spec/advanced-playground-feature-schema.js.map +1 -0
- package/dist/lib/openapi/spec/advanced-playground-request-schema.d.ts +95 -0
- package/dist/lib/openapi/spec/advanced-playground-request-schema.js +49 -0
- package/dist/lib/openapi/spec/advanced-playground-request-schema.js.map +1 -0
- package/dist/lib/openapi/spec/advanced-playground-response-schema.d.ts +2560 -0
- package/dist/lib/openapi/spec/advanced-playground-response-schema.js +50 -0
- package/dist/lib/openapi/spec/advanced-playground-response-schema.js.map +1 -0
- package/dist/lib/openapi/spec/client-application-schema.d.ts +17 -0
- package/dist/lib/openapi/spec/client-application-schema.js +17 -0
- package/dist/lib/openapi/spec/client-application-schema.js.map +1 -1
- package/dist/lib/openapi/spec/client-feature-schema.d.ts +44 -13
- package/dist/lib/openapi/spec/client-feature-schema.js +17 -12
- package/dist/lib/openapi/spec/client-feature-schema.js.map +1 -1
- package/dist/lib/openapi/spec/client-features-query-schema.d.ts +12 -0
- package/dist/lib/openapi/spec/client-features-query-schema.js +12 -0
- package/dist/lib/openapi/spec/client-features-query-schema.js.map +1 -1
- package/dist/lib/openapi/spec/client-features-schema.d.ts +90 -14
- package/dist/lib/openapi/spec/client-features-schema.js +7 -0
- package/dist/lib/openapi/spec/client-features-schema.js.map +1 -1
- package/dist/lib/openapi/spec/client-features-schema.test.js +5 -12
- package/dist/lib/openapi/spec/client-features-schema.test.js.map +1 -1
- package/dist/lib/openapi/spec/client-metrics-schema.d.ts +1 -1
- package/dist/lib/openapi/spec/client-metrics-schema.js +1 -1
- package/dist/lib/openapi/spec/client-metrics-schema.js.map +1 -1
- package/dist/lib/openapi/spec/context-field-schema.d.ts +13 -0
- package/dist/lib/openapi/spec/context-field-schema.js +13 -0
- package/dist/lib/openapi/spec/context-field-schema.js.map +1 -1
- package/dist/lib/openapi/spec/context-field-strategies-schema.d.ts +43 -0
- package/dist/lib/openapi/spec/context-field-strategies-schema.js +51 -0
- package/dist/lib/openapi/spec/context-field-strategies-schema.js.map +1 -0
- package/dist/lib/openapi/spec/context-fields-schema.d.ts +13 -0
- package/dist/lib/openapi/spec/create-application-schema.d.ts +0 -1
- package/dist/lib/openapi/spec/create-application-schema.js +0 -1
- package/dist/lib/openapi/spec/create-application-schema.js.map +1 -1
- package/dist/lib/openapi/spec/export-result-schema.d.ts +137 -4
- package/dist/lib/openapi/spec/feature-environment-schema.d.ts +22 -1
- package/dist/lib/openapi/spec/feature-schema.d.ts +49 -2
- package/dist/lib/openapi/spec/feature-schema.test.js +1 -1
- package/dist/lib/openapi/spec/feature-schema.test.js.map +1 -1
- package/dist/lib/openapi/spec/feature-strategy-schema.d.ts +1 -1
- package/dist/lib/openapi/spec/feature-strategy-schema.js +1 -1
- package/dist/lib/openapi/spec/feature-strategy-schema.js.map +1 -1
- package/dist/lib/openapi/spec/feature-variants-schema.d.ts +26 -0
- package/dist/lib/openapi/spec/features-schema.d.ts +98 -4
- package/dist/lib/openapi/spec/health-check-schema.d.ts +3 -0
- package/dist/lib/openapi/spec/health-check-schema.js +3 -0
- package/dist/lib/openapi/spec/health-check-schema.js.map +1 -1
- package/dist/lib/openapi/spec/health-overview-schema.d.ts +98 -4
- package/dist/lib/openapi/spec/health-report-schema.d.ts +98 -4
- package/dist/lib/openapi/spec/import-toggles-schema.d.ts +274 -8
- package/dist/lib/openapi/spec/index.d.ts +3 -0
- package/dist/lib/openapi/spec/index.js +3 -0
- package/dist/lib/openapi/spec/index.js.map +1 -1
- package/dist/lib/openapi/spec/instance-admin-stats-schema.d.ts +65 -2
- package/dist/lib/openapi/spec/instance-admin-stats-schema.js +65 -2
- package/dist/lib/openapi/spec/instance-admin-stats-schema.js.map +1 -1
- package/dist/lib/openapi/spec/override-schema.d.ts +5 -0
- package/dist/lib/openapi/spec/override-schema.js +5 -0
- package/dist/lib/openapi/spec/override-schema.js.map +1 -1
- package/dist/lib/openapi/spec/password-schema.d.ts +3 -0
- package/dist/lib/openapi/spec/password-schema.js +3 -0
- package/dist/lib/openapi/spec/password-schema.js.map +1 -1
- package/dist/lib/openapi/spec/playground-feature-schema.d.ts +41 -1
- package/dist/lib/openapi/spec/playground-feature-schema.js +6 -1
- package/dist/lib/openapi/spec/playground-feature-schema.js.map +1 -1
- package/dist/lib/openapi/spec/playground-feature-schema.test.js +3 -0
- package/dist/lib/openapi/spec/playground-feature-schema.test.js.map +1 -1
- package/dist/lib/openapi/spec/playground-request-schema.d.ts +7 -1
- package/dist/lib/openapi/spec/playground-request-schema.js +1 -1
- package/dist/lib/openapi/spec/playground-request-schema.js.map +1 -1
- package/dist/lib/openapi/spec/playground-response-schema.d.ts +93 -3
- package/dist/lib/openapi/spec/playground-strategy-schema.d.ts +13 -1
- package/dist/lib/openapi/spec/playground-strategy-schema.js +13 -0
- package/dist/lib/openapi/spec/playground-strategy-schema.js.map +1 -1
- package/dist/lib/openapi/spec/profile-schema.d.ts +49 -2
- package/dist/lib/openapi/spec/project-overview-schema.d.ts +98 -4
- package/dist/lib/openapi/spec/push-variants-schema.d.ts +26 -0
- package/dist/lib/openapi/spec/sdk-context-schema.d.ts +6 -0
- package/dist/lib/openapi/spec/sdk-context-schema.js +14 -2
- package/dist/lib/openapi/spec/sdk-context-schema.js.map +1 -1
- package/dist/lib/openapi/spec/state-schema.d.ts +72 -4
- package/dist/lib/openapi/spec/variant-schema.d.ts +21 -0
- package/dist/lib/openapi/spec/variant-schema.js +13 -0
- package/dist/lib/openapi/spec/variant-schema.js.map +1 -1
- package/dist/lib/openapi/spec/variants-schema.d.ts +26 -0
- package/dist/lib/openapi/util/create-response-schema.d.ts +1 -0
- package/dist/lib/openapi/util/create-response-schema.js +7 -1
- package/dist/lib/openapi/util/create-response-schema.js.map +1 -1
- package/dist/lib/proxy/proxy-repository.js +1 -1
- package/dist/lib/proxy/proxy-repository.js.map +1 -1
- package/dist/lib/routes/admin-api/api-token.d.ts +2 -0
- package/dist/lib/routes/admin-api/api-token.js +120 -11
- package/dist/lib/routes/admin-api/api-token.js.map +1 -1
- package/dist/lib/routes/admin-api/context.d.ts +3 -0
- package/dist/lib/routes/admin-api/context.js +21 -0
- package/dist/lib/routes/admin-api/context.js.map +1 -1
- package/dist/lib/routes/admin-api/index.js +1 -1
- package/dist/lib/routes/admin-api/index.js.map +1 -1
- package/dist/lib/routes/admin-api/instance-admin.d.ts +3 -1
- package/dist/lib/routes/admin-api/instance-admin.js +41 -0
- package/dist/lib/routes/admin-api/instance-admin.js.map +1 -1
- package/dist/lib/routes/admin-api/metrics.test.js +12 -0
- package/dist/lib/routes/admin-api/metrics.test.js.map +1 -1
- package/dist/lib/routes/admin-api/project/api-token.js +7 -0
- package/dist/lib/routes/admin-api/project/api-token.js.map +1 -1
- package/dist/lib/routes/admin-api/user/user.js +5 -4
- package/dist/lib/routes/admin-api/user/user.js.map +1 -1
- package/dist/lib/routes/admin-api/user/user.test.js +30 -5
- package/dist/lib/routes/admin-api/user/user.test.js.map +1 -1
- package/dist/lib/routes/admin-api/user-admin.js +0 -1
- package/dist/lib/routes/admin-api/user-admin.js.map +1 -1
- package/dist/lib/routes/client-api/feature.js +4 -0
- package/dist/lib/routes/client-api/feature.js.map +1 -1
- package/dist/lib/routes/client-api/metrics.js +2 -0
- package/dist/lib/routes/client-api/metrics.js.map +1 -1
- package/dist/lib/routes/client-api/register.js +2 -0
- package/dist/lib/routes/client-api/register.js.map +1 -1
- package/dist/lib/routes/controller.d.ts +8 -7
- package/dist/lib/routes/controller.js +11 -10
- package/dist/lib/routes/controller.js.map +1 -1
- package/dist/lib/routes/health-check.js +2 -0
- package/dist/lib/routes/health-check.js.map +1 -1
- package/dist/lib/server-impl.js +1 -1
- package/dist/lib/server-impl.js.map +1 -1
- package/dist/lib/services/access-service.d.ts +6 -4
- package/dist/lib/services/access-service.js +47 -11
- package/dist/lib/services/access-service.js.map +1 -1
- package/dist/lib/services/access-service.test.js +39 -22
- package/dist/lib/services/access-service.test.js.map +1 -1
- package/dist/lib/services/api-token-service.d.ts +1 -0
- package/dist/lib/services/api-token-service.js +3 -0
- package/dist/lib/services/api-token-service.js.map +1 -1
- package/dist/lib/services/context-service.d.ts +4 -1
- package/dist/lib/services/context-service.js +14 -1
- package/dist/lib/services/context-service.js.map +1 -1
- package/dist/lib/services/feature-toggle-service.d.ts +1 -1
- package/dist/lib/services/feature-toggle-service.js +6 -7
- package/dist/lib/services/feature-toggle-service.js.map +1 -1
- package/dist/lib/services/group-service.js +1 -3
- package/dist/lib/services/group-service.js.map +1 -1
- package/dist/lib/services/index.d.ts +1 -1
- package/dist/lib/services/index.js +1 -1
- package/dist/lib/services/index.js.map +1 -1
- package/dist/lib/services/instance-stats-service.d.ts +2 -3
- package/dist/lib/services/user-service.d.ts +1 -0
- package/dist/lib/services/user-service.js +8 -0
- package/dist/lib/services/user-service.js.map +1 -1
- package/dist/lib/services/version-service.d.ts +37 -1
- package/dist/lib/services/version-service.js +76 -5
- package/dist/lib/services/version-service.js.map +1 -1
- package/dist/lib/services/version-service.test.js +196 -9
- package/dist/lib/services/version-service.test.js.map +1 -1
- package/dist/lib/types/experimental.d.ts +1 -1
- package/dist/lib/types/experimental.js +6 -2
- package/dist/lib/types/experimental.js.map +1 -1
- package/dist/lib/types/model.d.ts +8 -4
- package/dist/lib/types/model.js +1 -0
- package/dist/lib/types/model.js.map +1 -1
- package/dist/lib/types/option.d.ts +2 -0
- package/dist/lib/types/permissions.d.ts +34 -27
- package/dist/lib/types/permissions.js +85 -29
- package/dist/lib/types/permissions.js.map +1 -1
- package/dist/lib/types/services.d.ts +1 -1
- package/dist/lib/types/stores/access-store.d.ts +1 -1
- package/dist/lib/types/stores/context-field-store.d.ts +2 -0
- package/dist/lib/types/stores/environment-store.d.ts +1 -0
- package/dist/lib/types/stores/feature-strategies-store.d.ts +2 -0
- package/dist/lib/types/stores/feature-toggle-store.d.ts +1 -1
- package/dist/lib/types/stores/group-store.d.ts +1 -1
- package/dist/lib/util/constants.d.ts +7 -1
- package/dist/lib/util/constants.js +8 -2
- package/dist/lib/util/constants.js.map +1 -1
- package/dist/lib/util/ensureArray.d.ts +1 -0
- package/dist/lib/util/ensureArray.js +8 -0
- package/dist/lib/util/ensureArray.js.map +1 -0
- package/dist/lib/util/index.d.ts +1 -1
- package/dist/lib/util/index.js +1 -1
- package/dist/lib/util/index.js.map +1 -1
- package/dist/migrations/20230615122909-fix-env-sort-order.d.ts +2 -0
- package/dist/migrations/20230615122909-fix-env-sort-order.js +28 -0
- package/dist/migrations/20230615122909-fix-env-sort-order.js.map +1 -0
- package/dist/migrations/20230619105029-new-fine-grained-api-token-permissions.d.ts +2 -0
- package/dist/migrations/20230619105029-new-fine-grained-api-token-permissions.js +26 -0
- package/dist/migrations/20230619105029-new-fine-grained-api-token-permissions.js.map +1 -0
- package/dist/migrations/20230619110243-assign-apitoken-permissions-to-rootroles.d.ts +2 -0
- package/dist/migrations/20230619110243-assign-apitoken-permissions-to-rootroles.js +23 -0
- package/dist/migrations/20230619110243-assign-apitoken-permissions-to-rootroles.js.map +1 -0
- package/dist/migrations/20230621141239-refactor-api-token-permissions.d.ts +2 -0
- package/dist/migrations/20230621141239-refactor-api-token-permissions.js +19 -0
- package/dist/migrations/20230621141239-refactor-api-token-permissions.js.map +1 -0
- package/dist/server-dev.js +3 -3
- package/dist/server-dev.js.map +1 -1
- package/dist/test/arbitraries.test.js +3 -1
- package/dist/test/arbitraries.test.js.map +1 -1
- package/dist/test/config/test-config.js +0 -1
- package/dist/test/config/test-config.js.map +1 -1
- package/dist/test/e2e/api/admin/api-token.auth.e2e.test.js +542 -3
- package/dist/test/e2e/api/admin/api-token.auth.e2e.test.js.map +1 -1
- package/dist/test/e2e/api/admin/api-token.e2e.test.js +14 -1
- package/dist/test/e2e/api/admin/api-token.e2e.test.js.map +1 -1
- package/dist/test/e2e/api/admin/client-metrics.e2e.test.js +1 -8
- package/dist/test/e2e/api/admin/client-metrics.e2e.test.js.map +1 -1
- package/dist/test/e2e/api/admin/context.e2e.test.js +47 -1
- package/dist/test/e2e/api/admin/context.e2e.test.js.map +1 -1
- package/dist/test/e2e/api/admin/project/features.e2e.test.js +14 -14
- package/dist/test/e2e/api/admin/project/features.e2e.test.js.map +1 -1
- package/dist/test/e2e/helpers/test-helper.d.ts +1 -1
- package/dist/test/e2e/helpers/test-helper.js +4 -2
- package/dist/test/e2e/helpers/test-helper.js.map +1 -1
- package/dist/test/e2e/services/access-service.e2e.test.js +1 -1
- package/dist/test/e2e/services/access-service.e2e.test.js.map +1 -1
- package/dist/test/e2e/services/playground-service.test.js +2 -2
- package/dist/test/e2e/services/playground-service.test.js.map +1 -1
- package/dist/test/fixtures/access-service-mock.js +1 -1
- package/dist/test/fixtures/access-service-mock.js.map +1 -1
- package/dist/test/fixtures/fake-access-store.d.ts +5 -3
- package/dist/test/fixtures/fake-access-store.js +24 -9
- package/dist/test/fixtures/fake-access-store.js.map +1 -1
- package/dist/test/fixtures/fake-environment-store.d.ts +1 -0
- package/dist/test/fixtures/fake-environment-store.js +3 -0
- package/dist/test/fixtures/fake-environment-store.js.map +1 -1
- package/dist/test/fixtures/fake-feature-strategies-store.d.ts +2 -0
- package/dist/test/fixtures/fake-feature-strategies-store.js +7 -0
- package/dist/test/fixtures/fake-feature-strategies-store.js.map +1 -1
- package/dist/test/fixtures/fake-group-store.d.ts +1 -1
- package/dist/test/fixtures/fake-group-store.js +1 -1
- package/dist/test/fixtures/fake-group-store.js.map +1 -1
- package/dist/test/fixtures/fake-role-store.d.ts +1 -1
- package/dist/test/fixtures/fake-role-store.js +9 -4
- package/dist/test/fixtures/fake-role-store.js.map +1 -1
- package/frontend/build/index.html +1 -1
- package/frontend/build/static/AdvancedPlayground-520a25e1.js +1 -0
- package/frontend/build/static/CreateProject-c430691b.js +4 -0
- package/frontend/build/static/{Error-fa3099b2.js → Error-492e8b38.js} +1 -1
- package/frontend/build/static/FeatureArchiveDialog-70daa567.js +10 -0
- package/frontend/build/static/{FeatureMetricsChart-caa58088.js → FeatureMetricsChart-bc99b364.js} +2 -2
- package/frontend/build/static/FeatureViewLazyExport-01d70575.js +7 -0
- package/frontend/build/static/LazyAdminExport-e2c90193.js +37 -0
- package/frontend/build/static/LazyProjectExport-fa62d2fe.js +13 -0
- package/frontend/build/static/NetworkOverview-3b72e4ea.js +1298 -0
- package/frontend/build/static/NetworkTraffic-365db744.js +1 -0
- package/frontend/build/static/Playground-b473b399.js +1 -0
- package/frontend/build/static/{Playground-3eeb2ce7.js → PlaygroundGuidancePopper-8e3e97db.js} +12 -12
- package/frontend/build/static/RoleCell-9bb513a8.js +1 -0
- package/frontend/build/static/StrategyItemContainer-1f7503c7.js +1 -0
- package/frontend/build/static/{chartjs-adapter-date-fns.esm-d0669d39.js → chartjs-adapter-date-fns.esm-db338d44.js} +1 -1
- package/frontend/build/static/flowchart-elk-definition-170a3958-a428dd25.js +134 -0
- package/frontend/build/static/index-0a56292a.js +450 -0
- package/frontend/build/static/{index-70a530dd.js → index-d362ae7a.js} +1 -1
- package/frontend/build/static/{index-5ae801ef.js → index-dc5debe9.js} +1 -1
- package/frontend/build/static/is_dark-884249e0.js +1 -0
- package/frontend/build/static/mindmap-definition-44684416-3c9425ff.js +101 -0
- package/frontend/build/static/stringify-ec884b6d.js +1 -0
- package/frontend/build/static/timeline-definition-8e5a9bc6-d289cd6d.js +62 -0
- package/frontend/build/static/{unknownify-d86d026c.js → unknownify-5b23bf29.js} +1 -1
- package/frontend/package.json +18 -17
- package/package.json +16 -13
- package/dist/lib/routes/admin-api/playground.d.ts +0 -12
- package/dist/lib/routes/admin-api/playground.js +0 -46
- package/dist/lib/routes/admin-api/playground.js.map +0 -1
- package/dist/lib/routes/admin-api/playground.test.js.map +0 -1
- package/dist/lib/services/playground-service.d.ts +0 -12
- package/dist/lib/services/playground-service.js +0 -65
- package/dist/lib/services/playground-service.js.map +0 -1
- package/dist/lib/util/feature-evaluator/client.js.map +0 -1
- package/dist/lib/util/feature-evaluator/constraint.js.map +0 -1
- package/dist/lib/util/feature-evaluator/context.js.map +0 -1
- package/dist/lib/util/feature-evaluator/feature-evaluator.js.map +0 -1
- package/dist/lib/util/feature-evaluator/feature.js.map +0 -1
- package/dist/lib/util/feature-evaluator/helpers.js.map +0 -1
- package/dist/lib/util/feature-evaluator/index.js.map +0 -1
- package/dist/lib/util/feature-evaluator/repository/bootstrap-provider.js.map +0 -1
- package/dist/lib/util/feature-evaluator/repository/index.js.map +0 -1
- package/dist/lib/util/feature-evaluator/repository/storage-provider-in-mem.js.map +0 -1
- package/dist/lib/util/feature-evaluator/repository/storage-provider.js.map +0 -1
- package/dist/lib/util/feature-evaluator/strategy/application-hostname-strategy.js.map +0 -1
- package/dist/lib/util/feature-evaluator/strategy/default-strategy.js.map +0 -1
- package/dist/lib/util/feature-evaluator/strategy/flexible-rollout-strategy.js.map +0 -1
- package/dist/lib/util/feature-evaluator/strategy/gradual-rollout-random.js.map +0 -1
- package/dist/lib/util/feature-evaluator/strategy/gradual-rollout-session-id.js.map +0 -1
- package/dist/lib/util/feature-evaluator/strategy/gradual-rollout-user-id.js.map +0 -1
- package/dist/lib/util/feature-evaluator/strategy/index.js.map +0 -1
- package/dist/lib/util/feature-evaluator/strategy/remote-address-strategy.js.map +0 -1
- package/dist/lib/util/feature-evaluator/strategy/strategy.js.map +0 -1
- package/dist/lib/util/feature-evaluator/strategy/unknown-strategy.js.map +0 -1
- package/dist/lib/util/feature-evaluator/strategy/user-with-id-strategy.js.map +0 -1
- package/dist/lib/util/feature-evaluator/strategy/util.js.map +0 -1
- package/dist/lib/util/feature-evaluator/variant.js.map +0 -1
- package/dist/lib/util/offline-unleash-client.js.map +0 -1
- package/dist/lib/util/offline-unleash-client.test.js.map +0 -1
- package/frontend/build/static/CreateProject-0e1caafd.js +0 -4
- package/frontend/build/static/FeatureArchiveDialog-ec9e5524.js +0 -4
- package/frontend/build/static/FeatureViewLazyExport-4da2d0f1.js +0 -7
- package/frontend/build/static/LazyAdminExport-b294bdfc.js +0 -43
- package/frontend/build/static/LazyProjectExport-fc25f20d.js +0 -19
- package/frontend/build/static/NetworkOverview-9038e532.js +0 -1296
- package/frontend/build/static/NetworkTraffic-de75c58b.js +0 -1
- package/frontend/build/static/StrategyItemContainer-4f8afe80.js +0 -1
- package/frontend/build/static/index-e59cfb08.js +0 -450
- package/frontend/build/static/useProjectRole-cddab9e6.js +0 -1
- package/frontend/build/static/v4-a960c1f4.js +0 -1
- /package/dist/lib/{routes/admin-api/playground.test.d.ts → db/feature-strategy-store.test.d.ts} +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/constraint.d.ts +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/constraint.js +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/context.d.ts +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/context.js +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/feature-evaluator.d.ts +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/feature-evaluator.js +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/feature.d.ts +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/feature.js +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/helpers.js +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/repository/bootstrap-provider.d.ts +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/repository/bootstrap-provider.js +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/repository/index.d.ts +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/repository/index.js +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/repository/storage-provider-in-mem.d.ts +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/repository/storage-provider-in-mem.js +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/repository/storage-provider.d.ts +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/repository/storage-provider.js +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/application-hostname-strategy.d.ts +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/application-hostname-strategy.js +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/default-strategy.d.ts +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/default-strategy.js +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/flexible-rollout-strategy.d.ts +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/flexible-rollout-strategy.js +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/gradual-rollout-random.d.ts +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/gradual-rollout-random.js +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/gradual-rollout-session-id.d.ts +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/gradual-rollout-session-id.js +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/gradual-rollout-user-id.d.ts +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/gradual-rollout-user-id.js +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/index.d.ts +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/index.js +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/remote-address-strategy.d.ts +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/remote-address-strategy.js +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/strategy.d.ts +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/strategy.js +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/unknown-strategy.d.ts +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/user-with-id-strategy.d.ts +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/user-with-id-strategy.js +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/util.d.ts +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/util.js +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/variant.d.ts +0 -0
- /package/dist/lib/{util → features/playground}/feature-evaluator/variant.js +0 -0
- /package/dist/lib/{util → features/playground}/offline-unleash-client.d.ts +0 -0
- /package/dist/lib/{util → features/playground}/offline-unleash-client.test.d.ts +0 -0
|
@@ -1,1296 +0,0 @@
|
|
|
1
|
-
import{fv as z4,fw as W4,fx as H4,fy as G4,fz as q4,s as dp,r as Lh,j as Cl,bS as j4,fA as $4,fB as X4,C as K4,A as Z4,fC as Q4,fD as J4}from"./index-e59cfb08.js";import{v as tb}from"./v4-a960c1f4.js";import{u as eb,a as fp}from"./unknownify-d86d026c.js";function rb(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var pp={exports:{}};(function(t,e){(function(r,i){t.exports=i()})(z4,function(){var r;function i(){return r.apply(null,arguments)}function n(h){return h instanceof Array||Object.prototype.toString.call(h)==="[object Array]"}function s(h){return h!=null&&Object.prototype.toString.call(h)==="[object Object]"}function a(h,y){return Object.prototype.hasOwnProperty.call(h,y)}function o(h){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(h).length===0;for(var y in h)if(a(h,y))return;return 1}function l(h){return h===void 0}function u(h){return typeof h=="number"||Object.prototype.toString.call(h)==="[object Number]"}function d(h){return h instanceof Date||Object.prototype.toString.call(h)==="[object Date]"}function f(h,y){for(var x=[],E=h.length,R=0;R<E;++R)x.push(y(h[R],R));return x}function p(h,y){for(var x in y)a(y,x)&&(h[x]=y[x]);return a(y,"toString")&&(h.toString=y.toString),a(y,"valueOf")&&(h.valueOf=y.valueOf),h}function g(h,y,x,E){return mr(h,y,x,E,!0).utc()}function _(h){return h._pf==null&&(h._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),h._pf}function k(h){if(h._isValid==null){var y=_(h),x=S.call(y.parsedDateParts,function(E){return E!=null}),x=!isNaN(h._d.getTime())&&y.overflow<0&&!y.empty&&!y.invalidEra&&!y.invalidMonth&&!y.invalidWeekday&&!y.weekdayMismatch&&!y.nullInput&&!y.invalidFormat&&!y.userInvalidated&&(!y.meridiem||y.meridiem&&x);if(h._strict&&(x=x&&y.charsLeftOver===0&&y.unusedTokens.length===0&&y.bigHour===void 0),Object.isFrozen!=null&&Object.isFrozen(h))return x;h._isValid=x}return h._isValid}function w(h){var y=g(NaN);return h!=null?p(_(y),h):_(y).userInvalidated=!0,y}var S=Array.prototype.some||function(h){for(var y=Object(this),x=y.length>>>0,E=0;E<x;E++)if(E in y&&h.call(this,y[E],E,y))return!0;return!1},A=i.momentProperties=[],O=!1;function P(h,y){var x,E,R,nt=A.length;if(l(y._isAMomentObject)||(h._isAMomentObject=y._isAMomentObject),l(y._i)||(h._i=y._i),l(y._f)||(h._f=y._f),l(y._l)||(h._l=y._l),l(y._strict)||(h._strict=y._strict),l(y._tzm)||(h._tzm=y._tzm),l(y._isUTC)||(h._isUTC=y._isUTC),l(y._offset)||(h._offset=y._offset),l(y._pf)||(h._pf=_(y)),l(y._locale)||(h._locale=y._locale),0<nt)for(x=0;x<nt;x++)l(R=y[E=A[x]])||(h[E]=R);return h}function W(h){P(this,h),this._d=new Date(h._d!=null?h._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),O===!1&&(O=!0,i.updateOffset(this),O=!1)}function q(h){return h instanceof W||h!=null&&h._isAMomentObject!=null}function z(h){i.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+h)}function H(h,y){var x=!0;return p(function(){if(i.deprecationHandler!=null&&i.deprecationHandler(null,h),x){for(var E,R,nt=[],yt=arguments.length,Ct=0;Ct<yt;Ct++){if(E="",typeof arguments[Ct]=="object"){for(R in E+=`
|
|
2
|
-
[`+Ct+"] ",arguments[0])a(arguments[0],R)&&(E+=R+": "+arguments[0][R]+", ");E=E.slice(0,-2)}else E=arguments[Ct];nt.push(E)}z(h+`
|
|
3
|
-
Arguments: `+Array.prototype.slice.call(nt).join("")+`
|
|
4
|
-
`+new Error().stack),x=!1}return y.apply(this,arguments)},y)}var N={};function M(h,y){i.deprecationHandler!=null&&i.deprecationHandler(h,y),N[h]||(z(y),N[h]=!0)}function C(h){return typeof Function<"u"&&h instanceof Function||Object.prototype.toString.call(h)==="[object Function]"}function v(h,y){var x,E=p({},h);for(x in y)a(y,x)&&(s(h[x])&&s(y[x])?(E[x]={},p(E[x],h[x]),p(E[x],y[x])):y[x]!=null?E[x]=y[x]:delete E[x]);for(x in h)a(h,x)&&!a(y,x)&&s(h[x])&&(E[x]=p({},E[x]));return E}function D(h){h!=null&&this.set(h)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null;var m=Object.keys||function(h){var y,x=[];for(y in h)a(h,y)&&x.push(y);return x};function Q(h,y,x){var E=""+Math.abs(h);return(0<=h?x?"+":"":"-")+Math.pow(10,Math.max(0,y-E.length)).toString().substr(1)+E}var b=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ct=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Dt={},vt={};function j(h,y,x,E){var R=typeof E=="string"?function(){return this[E]()}:E;h&&(vt[h]=R),y&&(vt[y[0]]=function(){return Q(R.apply(this,arguments),y[1],y[2])}),x&&(vt[x]=function(){return this.localeData().ordinal(R.apply(this,arguments),h)})}function ot(h,y){return h.isValid()?(y=rt(y,h.localeData()),Dt[y]=Dt[y]||function(x){for(var E,R=x.match(b),nt=0,yt=R.length;nt<yt;nt++)vt[R[nt]]?R[nt]=vt[R[nt]]:R[nt]=(E=R[nt]).match(/\[[\s\S]/)?E.replace(/^\[|\]$/g,""):E.replace(/\\/g,"");return function(Ct){for(var Pt="",It=0;It<yt;It++)Pt+=C(R[It])?R[It].call(Ct,x):R[It];return Pt}}(y),Dt[y](h)):h.localeData().invalidDate()}function rt(h,y){var x=5;function E(R){return y.longDateFormat(R)||R}for(ct.lastIndex=0;0<=x&&ct.test(h);)h=h.replace(ct,E),ct.lastIndex=0,--x;return h}var it={};function ut(h,y){var x=h.toLowerCase();it[x]=it[x+"s"]=it[y]=h}function bt(h){return typeof h=="string"?it[h]||it[h.toLowerCase()]:void 0}function K(h){var y,x,E={};for(x in h)a(h,x)&&(y=bt(x))&&(E[y]=h[x]);return E}var Ot={};function Y(h,y){Ot[h]=y}function U(h){return h%4==0&&h%100!=0||h%400==0}function X(h){return h<0?Math.ceil(h)||0:Math.floor(h)}function F(y){var y=+y,x=0;return x=y!=0&&isFinite(y)?X(y):x}function I(h,y){return function(x){return x!=null?(J(this,h,x),i.updateOffset(this,y),this):L(this,h)}}function L(h,y){return h.isValid()?h._d["get"+(h._isUTC?"UTC":"")+y]():NaN}function J(h,y,x){h.isValid()&&!isNaN(x)&&(y==="FullYear"&&U(h.year())&&h.month()===1&&h.date()===29?(x=F(x),h._d["set"+(h._isUTC?"UTC":"")+y](x,h.month(),dt(x,h.month()))):h._d["set"+(h._isUTC?"UTC":"")+y](x))}var T=/\d/,ce=/\d\d/,ht=/\d{3}/,Jn=/\d{4}/,Bn=/[+-]?\d{6}/,V=/\d\d?/,Yt=/\d\d\d\d?/,et=/\d\d\d\d\d\d?/,Mt=/\d{1,3}/,In=/\d{1,4}/,Nn=/[+-]?\d{1,6}/,Tt=/\d+/,gt=/[+-]?\d+/,Et=/Z|[+-]\d\d:?\d\d/gi,wt=/Z|[+-]\d\d(?::?\d\d)?/gi,pt=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function st(h,y,x){jt[h]=C(y)?y:function(E,R){return E&&x?x:y}}function le(h,y){return a(jt,h)?jt[h](y._strict,y._locale):new RegExp(Xt(h.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(x,E,R,nt,yt){return E||R||nt||yt})))}function Xt(h){return h.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var jt={},Kt={};function Gt(h,y){var x,E,R=y;for(typeof h=="string"&&(h=[h]),u(y)&&(R=function(nt,yt){yt[y]=F(nt)}),E=h.length,x=0;x<E;x++)Kt[h[x]]=R}function Ee(h,y){Gt(h,function(x,E,R,nt){R._w=R._w||{},y(x,R._w,R,nt)})}var Ht,Vt=0,Ft=1,xt=2,ft=3,Lt=4,_t=5,Ut=6,at=7,ie=8;function dt(h,y){if(isNaN(h)||isNaN(y))return NaN;var x=(y%(x=12)+x)%x;return h+=(y-x)/12,x==1?U(h)?29:28:31-x%7%2}Ht=Array.prototype.indexOf||function(h){for(var y=0;y<this.length;++y)if(this[y]===h)return y;return-1},j("M",["MM",2],"Mo",function(){return this.month()+1}),j("MMM",0,0,function(h){return this.localeData().monthsShort(this,h)}),j("MMMM",0,0,function(h){return this.localeData().months(this,h)}),ut("month","M"),Y("month",8),st("M",V),st("MM",V,ce),st("MMM",function(h,y){return y.monthsShortRegex(h)}),st("MMMM",function(h,y){return y.monthsRegex(h)}),Gt(["M","MM"],function(h,y){y[Ft]=F(h)-1}),Gt(["MMM","MMMM"],function(h,y,x,E){E=x._locale.monthsParse(h,E,x._strict),E!=null?y[Ft]=E:_(x).invalidMonth=h});var ee="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),de="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),me=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,be=pt,ke=pt;function $t(h,y){var x;if(h.isValid()){if(typeof y=="string"){if(/^\d+$/.test(y))y=F(y);else if(!u(y=h.localeData().monthsParse(y)))return}x=Math.min(h.date(),dt(h.year(),y)),h._d["set"+(h._isUTC?"UTC":"")+"Month"](y,x)}}function ne(h){return h!=null?($t(this,h),i.updateOffset(this,!0),this):L(this,"Month")}function ge(){function h(yt,Ct){return Ct.length-yt.length}for(var y,x=[],E=[],R=[],nt=0;nt<12;nt++)y=g([2e3,nt]),x.push(this.monthsShort(y,"")),E.push(this.months(y,"")),R.push(this.months(y,"")),R.push(this.monthsShort(y,""));for(x.sort(h),E.sort(h),R.sort(h),nt=0;nt<12;nt++)x[nt]=Xt(x[nt]),E[nt]=Xt(E[nt]);for(nt=0;nt<24;nt++)R[nt]=Xt(R[nt]);this._monthsRegex=new RegExp("^("+R.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+E.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+x.join("|")+")","i")}function Qt(h){return U(h)?366:365}j("Y",0,0,function(){var h=this.year();return h<=9999?Q(h,4):"+"+h}),j(0,["YY",2],0,function(){return this.year()%100}),j(0,["YYYY",4],0,"year"),j(0,["YYYYY",5],0,"year"),j(0,["YYYYYY",6,!0],0,"year"),ut("year","y"),Y("year",1),st("Y",gt),st("YY",V,ce),st("YYYY",In,Jn),st("YYYYY",Nn,Bn),st("YYYYYY",Nn,Bn),Gt(["YYYYY","YYYYYY"],Vt),Gt("YYYY",function(h,y){y[Vt]=h.length===2?i.parseTwoDigitYear(h):F(h)}),Gt("YY",function(h,y){y[Vt]=i.parseTwoDigitYear(h)}),Gt("Y",function(h,y){y[Vt]=parseInt(h,10)}),i.parseTwoDigitYear=function(h){return F(h)+(68<F(h)?1900:2e3)};var ll=I("FullYear",!0);function ii(h,y,x,E,R,nt,yt){var Ct;return h<100&&0<=h?(Ct=new Date(h+400,y,x,E,R,nt,yt),isFinite(Ct.getFullYear())&&Ct.setFullYear(h)):Ct=new Date(h,y,x,E,R,nt,yt),Ct}function Ur(h){var y;return h<100&&0<=h?((y=Array.prototype.slice.call(arguments))[0]=h+400,y=new Date(Date.UTC.apply(null,y)),isFinite(y.getUTCFullYear())&&y.setUTCFullYear(h)):y=new Date(Date.UTC.apply(null,arguments)),y}function De(h,y,x){return x=7+y-x,x-(7+Ur(h,0,x).getUTCDay()-y)%7-1}function ae(h,yt,Ct,E,R){var nt,yt=1+7*(yt-1)+(7+Ct-E)%7+De(h,E,R),Ct=yt<=0?Qt(nt=h-1)+yt:yt>Qt(h)?(nt=h+1,yt-Qt(h)):(nt=h,yt);return{year:nt,dayOfYear:Ct}}function Be(h,y,x){var E,R,nt=De(h.year(),y,x),nt=Math.floor((h.dayOfYear()-nt-1)/7)+1;return nt<1?E=nt+Oe(R=h.year()-1,y,x):nt>Oe(h.year(),y,x)?(E=nt-Oe(h.year(),y,x),R=h.year()+1):(R=h.year(),E=nt),{week:E,year:R}}function Oe(h,R,x){var E=De(h,R,x),R=De(h+1,R,x);return(Qt(h)-E+R)/7}j("w",["ww",2],"wo","week"),j("W",["WW",2],"Wo","isoWeek"),ut("week","w"),ut("isoWeek","W"),Y("week",5),Y("isoWeek",5),st("w",V),st("ww",V,ce),st("W",V),st("WW",V,ce),Ee(["w","ww","W","WW"],function(h,y,x,E){y[E.substr(0,1)]=F(h)});function Fe(h,y){return h.slice(y,7).concat(h.slice(0,y))}j("d",0,"do","day"),j("dd",0,0,function(h){return this.localeData().weekdaysMin(this,h)}),j("ddd",0,0,function(h){return this.localeData().weekdaysShort(this,h)}),j("dddd",0,0,function(h){return this.localeData().weekdays(this,h)}),j("e",0,0,"weekday"),j("E",0,0,"isoWeekday"),ut("day","d"),ut("weekday","e"),ut("isoWeekday","E"),Y("day",11),Y("weekday",11),Y("isoWeekday",11),st("d",V),st("e",V),st("E",V),st("dd",function(h,y){return y.weekdaysMinRegex(h)}),st("ddd",function(h,y){return y.weekdaysShortRegex(h)}),st("dddd",function(h,y){return y.weekdaysRegex(h)}),Ee(["dd","ddd","dddd"],function(h,y,x,E){E=x._locale.weekdaysParse(h,E,x._strict),E!=null?y.d=E:_(x).invalidWeekday=h}),Ee(["d","e","E"],function(h,y,x,E){y[E]=F(h)});var Pe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ie="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ge="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),tr=pt,zt=pt,Z=pt;function St(){function h(It,ue){return ue.length-It.length}for(var y,x,E,R=[],nt=[],yt=[],Ct=[],Pt=0;Pt<7;Pt++)E=g([2e3,1]).day(Pt),y=Xt(this.weekdaysMin(E,"")),x=Xt(this.weekdaysShort(E,"")),E=Xt(this.weekdays(E,"")),R.push(y),nt.push(x),yt.push(E),Ct.push(y),Ct.push(x),Ct.push(E);R.sort(h),nt.sort(h),yt.sort(h),Ct.sort(h),this._weekdaysRegex=new RegExp("^("+Ct.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+yt.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+nt.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+R.join("|")+")","i")}function Nt(){return this.hours()%12||12}function fe(h,y){j(h,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),y)})}function Me(h,y){return y._meridiemParse}j("H",["HH",2],0,"hour"),j("h",["hh",2],0,Nt),j("k",["kk",2],0,function(){return this.hours()||24}),j("hmm",0,0,function(){return""+Nt.apply(this)+Q(this.minutes(),2)}),j("hmmss",0,0,function(){return""+Nt.apply(this)+Q(this.minutes(),2)+Q(this.seconds(),2)}),j("Hmm",0,0,function(){return""+this.hours()+Q(this.minutes(),2)}),j("Hmmss",0,0,function(){return""+this.hours()+Q(this.minutes(),2)+Q(this.seconds(),2)}),fe("a",!0),fe("A",!1),ut("hour","h"),Y("hour",13),st("a",Me),st("A",Me),st("H",V),st("h",V),st("k",V),st("HH",V,ce),st("hh",V,ce),st("kk",V,ce),st("hmm",Yt),st("hmmss",et),st("Hmm",Yt),st("Hmmss",et),Gt(["H","HH"],ft),Gt(["k","kk"],function(h,y,x){h=F(h),y[ft]=h===24?0:h}),Gt(["a","A"],function(h,y,x){x._isPm=x._locale.isPM(h),x._meridiem=h}),Gt(["h","hh"],function(h,y,x){y[ft]=F(h),_(x).bigHour=!0}),Gt("hmm",function(h,y,x){var E=h.length-2;y[ft]=F(h.substr(0,E)),y[Lt]=F(h.substr(E)),_(x).bigHour=!0}),Gt("hmmss",function(h,y,x){var E=h.length-4,R=h.length-2;y[ft]=F(h.substr(0,E)),y[Lt]=F(h.substr(E,2)),y[_t]=F(h.substr(R)),_(x).bigHour=!0}),Gt("Hmm",function(h,y,x){var E=h.length-2;y[ft]=F(h.substr(0,E)),y[Lt]=F(h.substr(E))}),Gt("Hmmss",function(h,y,x){var E=h.length-4,R=h.length-2;y[ft]=F(h.substr(0,E)),y[Lt]=F(h.substr(E,2)),y[_t]=F(h.substr(R))}),pt=I("Hours",!0);var Le,We={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{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"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:ee,monthsShort:de,week:{dow:0,doy:6},weekdays:Pe,weekdaysMin:Ge,weekdaysShort:Ie,meridiemParse:/[ap]\.?m?\.?/i},xe={},Ne={};function Ln(h){return h&&h.toLowerCase().replace("_","-")}function Dn(h){for(var y,x,E,R,nt=0;nt<h.length;){for(y=(R=Ln(h[nt]).split("-")).length,x=(x=Ln(h[nt+1]))?x.split("-"):null;0<y;){if(E=Ir(R.slice(0,y).join("-")))return E;if(x&&x.length>=y&&function(yt,Ct){for(var Pt=Math.min(yt.length,Ct.length),It=0;It<Pt;It+=1)if(yt[It]!==Ct[It])return It;return Pt}(R,x)>=y-1)break;y--}nt++}return Le}function Ir(h){var y;if(xe[h]===void 0&&t&&t.exports&&h.match("^[^/\\\\]*$")!=null)try{y=Le._abbr,rb("./locale/"+h),qt(y)}catch{xe[h]=null}return xe[h]}function qt(h,y){return h&&((y=l(y)?oe(h):te(h,y))?Le=y:typeof console<"u"&&console.warn&&console.warn("Locale "+h+" not found. Did you forget to load it?")),Le._abbr}function te(h,y){if(y===null)return delete xe[h],null;var x,E=We;if(y.abbr=h,xe[h]!=null)M("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),E=xe[h]._config;else if(y.parentLocale!=null)if(xe[y.parentLocale]!=null)E=xe[y.parentLocale]._config;else{if((x=Ir(y.parentLocale))==null)return Ne[y.parentLocale]||(Ne[y.parentLocale]=[]),Ne[y.parentLocale].push({name:h,config:y}),null;E=x._config}return xe[h]=new D(v(E,y)),Ne[h]&&Ne[h].forEach(function(R){te(R.name,R.config)}),qt(h),xe[h]}function oe(h){var y;if(!(h=h&&h._locale&&h._locale._abbr?h._locale._abbr:h))return Le;if(!n(h)){if(y=Ir(h))return y;h=[h]}return Dn(h)}function Rt(h){var y=h._a;return y&&_(h).overflow===-2&&(y=y[Ft]<0||11<y[Ft]?Ft:y[xt]<1||y[xt]>dt(y[Vt],y[Ft])?xt:y[ft]<0||24<y[ft]||y[ft]===24&&(y[Lt]!==0||y[_t]!==0||y[Ut]!==0)?ft:y[Lt]<0||59<y[Lt]?Lt:y[_t]<0||59<y[_t]?_t:y[Ut]<0||999<y[Ut]?Ut:-1,_(h)._overflowDayOfYear&&(y<Vt||xt<y)&&(y=xt),_(h)._overflowWeeks&&y===-1&&(y=at),_(h)._overflowWeekday&&y===-1&&(y=ie),_(h).overflow=y),h}var Ye=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,G=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Xn=/Z|[+-]\d\d(?::?\d\d)?/,tt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],_r=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],el=/^\/?Date\((-?\d+)/i,Iu=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,rl={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function il(h){var y,x,E,R,nt,yt,Pt=h._i,Ct=Ye.exec(Pt)||G.exec(Pt),Pt=tt.length,It=_r.length;if(Ct){for(_(h).iso=!0,y=0,x=Pt;y<x;y++)if(tt[y][1].exec(Ct[1])){R=tt[y][0],E=tt[y][2]!==!1;break}if(R==null)h._isValid=!1;else{if(Ct[3]){for(y=0,x=It;y<x;y++)if(_r[y][1].exec(Ct[3])){nt=(Ct[2]||" ")+_r[y][0];break}if(nt==null)return void(h._isValid=!1)}if(E||nt==null){if(Ct[4]){if(!Xn.exec(Ct[4]))return void(h._isValid=!1);yt="Z"}h._f=R+(nt||"")+(yt||""),Ma(h)}else h._isValid=!1}}else h._isValid=!1}function er(h,y,x,E,R,nt){return h=[function(yt){yt=parseInt(yt,10);{if(yt<=49)return 2e3+yt;if(yt<=999)return 1900+yt}return yt}(h),de.indexOf(y),parseInt(x,10),parseInt(E,10),parseInt(R,10)],nt&&h.push(parseInt(nt,10)),h}function Li(h){var y,x,E,R,nt=Iu.exec(h._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));nt?(y=er(nt[4],nt[3],nt[2],nt[5],nt[6],nt[7]),x=nt[1],E=y,R=h,x&&Ie.indexOf(x)!==new Date(E[0],E[1],E[2]).getDay()?(_(R).weekdayMismatch=!0,R._isValid=!1):(h._a=y,h._tzm=(x=nt[8],E=nt[9],R=nt[10],x?rl[x]:E?0:60*(((x=parseInt(R,10))-(E=x%100))/100)+E),h._d=Ur.apply(null,h._a),h._d.setUTCMinutes(h._d.getUTCMinutes()-h._tzm),_(h).rfc2822=!0)):h._isValid=!1}function Di(h,y,x){return h??y??x}function Kn(h){var y,x,E,R,nt,yt,Ct,Pt,It,ue,re,He=[];if(!h._d){for(E=h,R=new Date(i.now()),x=E._useUTC?[R.getUTCFullYear(),R.getUTCMonth(),R.getUTCDate()]:[R.getFullYear(),R.getMonth(),R.getDate()],h._w&&h._a[xt]==null&&h._a[Ft]==null&&((R=(E=h)._w).GG!=null||R.W!=null||R.E!=null?(Pt=1,It=4,nt=Di(R.GG,E._a[Vt],Be(Se(),1,4).year),yt=Di(R.W,1),((Ct=Di(R.E,1))<1||7<Ct)&&(ue=!0)):(Pt=E._locale._week.dow,It=E._locale._week.doy,re=Be(Se(),Pt,It),nt=Di(R.gg,E._a[Vt],re.year),yt=Di(R.w,re.week),R.d!=null?((Ct=R.d)<0||6<Ct)&&(ue=!0):R.e!=null?(Ct=R.e+Pt,(R.e<0||6<R.e)&&(ue=!0)):Ct=Pt),yt<1||yt>Oe(nt,Pt,It)?_(E)._overflowWeeks=!0:ue!=null?_(E)._overflowWeekday=!0:(re=ae(nt,yt,Ct,Pt,It),E._a[Vt]=re.year,E._dayOfYear=re.dayOfYear)),h._dayOfYear!=null&&(R=Di(h._a[Vt],x[Vt]),(h._dayOfYear>Qt(R)||h._dayOfYear===0)&&(_(h)._overflowDayOfYear=!0),ue=Ur(R,0,h._dayOfYear),h._a[Ft]=ue.getUTCMonth(),h._a[xt]=ue.getUTCDate()),y=0;y<3&&h._a[y]==null;++y)h._a[y]=He[y]=x[y];for(;y<7;y++)h._a[y]=He[y]=h._a[y]==null?y===2?1:0:h._a[y];h._a[ft]===24&&h._a[Lt]===0&&h._a[_t]===0&&h._a[Ut]===0&&(h._nextDay=!0,h._a[ft]=0),h._d=(h._useUTC?Ur:ii).apply(null,He),nt=h._useUTC?h._d.getUTCDay():h._d.getDay(),h._tzm!=null&&h._d.setUTCMinutes(h._d.getUTCMinutes()-h._tzm),h._nextDay&&(h._a[ft]=24),h._w&&h._w.d!==void 0&&h._w.d!==nt&&(_(h).weekdayMismatch=!0)}}function Ma(h){if(h._f===i.ISO_8601)il(h);else if(h._f===i.RFC_2822)Li(h);else{h._a=[],_(h).empty=!0;for(var y,x,E,R,nt,yt=""+h._i,Ct=yt.length,Pt=0,It=rt(h._f,h._locale).match(b)||[],ue=It.length,re=0;re<ue;re++)x=It[re],(y=(yt.match(le(x,h))||[])[0])&&(0<(E=yt.substr(0,yt.indexOf(y))).length&&_(h).unusedInput.push(E),yt=yt.slice(yt.indexOf(y)+y.length),Pt+=y.length),vt[x]?(y?_(h).empty=!1:_(h).unusedTokens.push(x),E=x,nt=h,(R=y)!=null&&a(Kt,E)&&Kt[E](R,nt._a,nt,E)):h._strict&&!y&&_(h).unusedTokens.push(x);_(h).charsLeftOver=Ct-Pt,0<yt.length&&_(h).unusedInput.push(yt),h._a[ft]<=12&&_(h).bigHour===!0&&0<h._a[ft]&&(_(h).bigHour=void 0),_(h).parsedDateParts=h._a.slice(0),_(h).meridiem=h._meridiem,h._a[ft]=function(He,rr,ai){return ai==null?rr:He.meridiemHour!=null?He.meridiemHour(rr,ai):He.isPM!=null?((He=He.isPM(ai))&&rr<12&&(rr+=12),rr=He||rr!==12?rr:0):rr}(h._locale,h._a[ft],h._meridiem),(Ct=_(h).era)!==null&&(h._a[Vt]=h._locale.erasConvertYear(Ct,h._a[Vt])),Kn(h),Rt(h)}}function nl(h){var y,x,E,R=h._i,nt=h._f;return h._locale=h._locale||oe(h._l),R===null||nt===void 0&&R===""?w({nullInput:!0}):(typeof R=="string"&&(h._i=R=h._locale.preparse(R)),q(R)?new W(Rt(R)):(d(R)?h._d=R:n(nt)?function(yt){var Ct,Pt,It,ue,re,He,rr=!1,ai=yt._f.length;if(ai===0)return _(yt).invalidFormat=!0,yt._d=new Date(NaN);for(ue=0;ue<ai;ue++)re=0,He=!1,Ct=P({},yt),yt._useUTC!=null&&(Ct._useUTC=yt._useUTC),Ct._f=yt._f[ue],Ma(Ct),k(Ct)&&(He=!0),re=(re+=_(Ct).charsLeftOver)+10*_(Ct).unusedTokens.length,_(Ct).score=re,rr?re<It&&(It=re,Pt=Ct):(It==null||re<It||He)&&(It=re,Pt=Ct,He&&(rr=!0));p(yt,Pt||Ct)}(h):nt?Ma(h):l(nt=(R=h)._i)?R._d=new Date(i.now()):d(nt)?R._d=new Date(nt.valueOf()):typeof nt=="string"?(x=R,(y=el.exec(x._i))!==null?x._d=new Date(+y[1]):(il(x),x._isValid===!1&&(delete x._isValid,Li(x),x._isValid===!1&&(delete x._isValid,x._strict?x._isValid=!1:i.createFromInputFallback(x))))):n(nt)?(R._a=f(nt.slice(0),function(yt){return parseInt(yt,10)}),Kn(R)):s(nt)?(y=R)._d||(E=(x=K(y._i)).day===void 0?x.date:x.day,y._a=f([x.year,x.month,E,x.hour,x.minute,x.second,x.millisecond],function(yt){return yt&&parseInt(yt,10)}),Kn(y)):u(nt)?R._d=new Date(nt):i.createFromInputFallback(R),k(h)||(h._d=null),h))}function mr(h,y,x,E,R){var nt={};return y!==!0&&y!==!1||(E=y,y=void 0),x!==!0&&x!==!1||(E=x,x=void 0),(s(h)&&o(h)||n(h)&&h.length===0)&&(h=void 0),nt._isAMomentObject=!0,nt._useUTC=nt._isUTC=R,nt._l=x,nt._i=h,nt._f=y,nt._strict=E,(R=new W(Rt(nl(R=nt))))._nextDay&&(R.add(1,"d"),R._nextDay=void 0),R}function Se(h,y,x,E){return mr(h,y,x,E,!1)}i.createFromInputFallback=H("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(h){h._d=new Date(h._i+(h._useUTC?" UTC":""))}),i.ISO_8601=function(){},i.RFC_2822=function(){},Yt=H("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var h=Se.apply(null,arguments);return this.isValid()&&h.isValid()?h<this?this:h:w()}),et=H("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var h=Se.apply(null,arguments);return this.isValid()&&h.isValid()?this<h?this:h:w()});function Cr(h,y){var x,E;if(!(y=y.length===1&&n(y[0])?y[0]:y).length)return Se();for(x=y[0],E=1;E<y.length;++E)y[E].isValid()&&!y[E][h](x)||(x=y[E]);return x}var qi=["year","quarter","month","week","day","hour","minute","second","millisecond"];function ni(y){var y=K(y),x=y.year||0,E=y.quarter||0,R=y.month||0,nt=y.week||y.isoWeek||0,yt=y.day||0,Ct=y.hour||0,Pt=y.minute||0,It=y.second||0,ue=y.millisecond||0;this._isValid=function(re){var He,rr,ai=!1,Uu=qi.length;for(He in re)if(a(re,He)&&(Ht.call(qi,He)===-1||re[He]!=null&&isNaN(re[He])))return!1;for(rr=0;rr<Uu;++rr)if(re[qi[rr]]){if(ai)return!1;parseFloat(re[qi[rr]])!==F(re[qi[rr]])&&(ai=!0)}return!0}(y),this._milliseconds=+ue+1e3*It+6e4*Pt+1e3*Ct*60*60,this._days=+yt+7*nt,this._months=+R+3*E+12*x,this._data={},this._locale=oe(),this._bubble()}function ji(h){return h instanceof ni}function zr(h){return h<0?-1*Math.round(-1*h):Math.round(h)}function Na(h,y){j(h,0,0,function(){var x=this.utcOffset(),E="+";return x<0&&(x=-x,E="-"),E+Q(~~(x/60),2)+y+Q(~~x%60,2)})}Na("Z",":"),Na("ZZ",""),st("Z",wt),st("ZZ",wt),Gt(["Z","ZZ"],function(h,y,x){x._useUTC=!0,x._tzm=Zn(wt,h)});var Bs=/([\+\-]|\d\d)/gi;function Zn(h,x){var x=(x||"").match(h);return x===null?null:(x=60*(h=((x[x.length-1]||[])+"").match(Bs)||["-",0,0])[1]+F(h[2]))===0?0:h[0]==="+"?x:-x}function Wr(h,y){var x;return y._isUTC?(y=y.clone(),x=(q(h)||d(h)?h:Se(h)).valueOf()-y.valueOf(),y._d.setTime(y._d.valueOf()+x),i.updateOffset(y,!1),y):Se(h).local()}function Ou(h){return-Math.round(h._d.getTimezoneOffset())}function pd(){return!!this.isValid()&&this._isUTC&&this._offset===0}i.updateOffset=function(){};var I4=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,O4=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function si(h,y){var x,E=h,R=null;return ji(h)?E={ms:h._milliseconds,d:h._days,M:h._months}:u(h)||!isNaN(+h)?(E={},y?E[y]=+h:E.milliseconds=+h):(R=I4.exec(h))?(x=R[1]==="-"?-1:1,E={y:0,d:F(R[xt])*x,h:F(R[ft])*x,m:F(R[Lt])*x,s:F(R[_t])*x,ms:F(zr(1e3*R[Ut]))*x}):(R=O4.exec(h))?(x=R[1]==="-"?-1:1,E={y:Qn(R[2],x),M:Qn(R[3],x),w:Qn(R[4],x),d:Qn(R[5],x),h:Qn(R[6],x),m:Qn(R[7],x),s:Qn(R[8],x)}):E==null?E={}:typeof E=="object"&&("from"in E||"to"in E)&&(y=function(nt,yt){var Ct;return!nt.isValid()||!yt.isValid()?{milliseconds:0,months:0}:(yt=Wr(yt,nt),nt.isBefore(yt)?Ct=gd(nt,yt):((Ct=gd(yt,nt)).milliseconds=-Ct.milliseconds,Ct.months=-Ct.months),Ct)}(Se(E.from),Se(E.to)),(E={}).ms=y.milliseconds,E.M=y.months),R=new ni(E),ji(h)&&a(h,"_locale")&&(R._locale=h._locale),ji(h)&&a(h,"_isValid")&&(R._isValid=h._isValid),R}function Qn(h,y){return h=h&&parseFloat(h.replace(",",".")),(isNaN(h)?0:h)*y}function gd(h,y){var x={};return x.months=y.month()-h.month()+12*(y.year()-h.year()),h.clone().add(x.months,"M").isAfter(y)&&--x.months,x.milliseconds=+y-+h.clone().add(x.months,"M"),x}function yd(h,y){return function(x,E){var R;return E===null||isNaN(+E)||(M(y,"moment()."+y+"(period, number) is deprecated. Please use moment()."+y+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),R=x,x=E,E=R),md(this,si(x,E),h),this}}function md(h,yt,x,E){var R=yt._milliseconds,nt=zr(yt._days),yt=zr(yt._months);h.isValid()&&(E=E==null||E,yt&&$t(h,L(h,"Month")+yt*x),nt&&J(h,"Date",L(h,"Date")+nt*x),R&&h._d.setTime(h._d.valueOf()+R*x),E&&i.updateOffset(h,nt||yt))}si.fn=ni.prototype,si.invalid=function(){return si(NaN)},ee=yd(1,"add"),Pe=yd(-1,"subtract");function bd(h){return typeof h=="string"||h instanceof String}function R4(h){return q(h)||d(h)||bd(h)||u(h)||function(y){var x=n(y),E=!1;return x&&(E=y.filter(function(R){return!u(R)&&bd(y)}).length===0),x&&E}(h)||function(y){var x,E,R=s(y)&&!o(y),nt=!1,yt=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],Ct=yt.length;for(x=0;x<Ct;x+=1)E=yt[x],nt=nt||a(y,E);return R&&nt}(h)||h==null}function sl(h,R){if(h.date()<R.date())return-sl(R,h);var x=12*(R.year()-h.year())+(R.month()-h.month()),E=h.clone().add(x,"months"),R=R-E<0?(R-E)/(E-h.clone().add(x-1,"months")):(R-E)/(h.clone().add(1+x,"months")-E);return-(x+R)||0}function _d(h){return h===void 0?this._locale._abbr:((h=oe(h))!=null&&(this._locale=h),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]",Ge=H("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(h){return h===void 0?this.localeData():this.locale(h)});function xd(){return this._locale}var vd=126227808e5;function Is(h,y){return(h%y+y)%y}function kd(h,y,x){return h<100&&0<=h?new Date(h+400,y,x)-vd:new Date(h,y,x).valueOf()}function wd(h,y,x){return h<100&&0<=h?Date.UTC(h+400,y,x)-vd:Date.UTC(h,y,x)}function Ru(h,y){return y.erasAbbrRegex(h)}function Fu(){for(var h=[],y=[],x=[],E=[],R=this.eras(),nt=0,yt=R.length;nt<yt;++nt)y.push(Xt(R[nt].name)),h.push(Xt(R[nt].abbr)),x.push(Xt(R[nt].narrow)),E.push(Xt(R[nt].name)),E.push(Xt(R[nt].abbr)),E.push(Xt(R[nt].narrow));this._erasRegex=new RegExp("^("+E.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+y.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+h.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+x.join("|")+")","i")}function al(h,y){j(0,[h,h.length],0,y)}function Td(h,y,x,E,R){var nt;return h==null?Be(this,E,R).year:(nt=Oe(h,E,R),function(yt,Ct,Pt,It,ue){return yt=ae(yt,Ct,Pt,It,ue),Ct=Ur(yt.year,0,yt.dayOfYear),this.year(Ct.getUTCFullYear()),this.month(Ct.getUTCMonth()),this.date(Ct.getUTCDate()),this}.call(this,h,y=nt<y?nt:y,x,E,R))}j("N",0,0,"eraAbbr"),j("NN",0,0,"eraAbbr"),j("NNN",0,0,"eraAbbr"),j("NNNN",0,0,"eraName"),j("NNNNN",0,0,"eraNarrow"),j("y",["y",1],"yo","eraYear"),j("y",["yy",2],0,"eraYear"),j("y",["yyy",3],0,"eraYear"),j("y",["yyyy",4],0,"eraYear"),st("N",Ru),st("NN",Ru),st("NNN",Ru),st("NNNN",function(h,y){return y.erasNameRegex(h)}),st("NNNNN",function(h,y){return y.erasNarrowRegex(h)}),Gt(["N","NN","NNN","NNNN","NNNNN"],function(h,y,x,E){E=x._locale.erasParse(h,E,x._strict),E?_(x).era=E:_(x).invalidEra=h}),st("y",Tt),st("yy",Tt),st("yyy",Tt),st("yyyy",Tt),st("yo",function(h,y){return y._eraYearOrdinalRegex||Tt}),Gt(["y","yy","yyy","yyyy"],Vt),Gt(["yo"],function(h,y,x,E){var R;x._locale._eraYearOrdinalRegex&&(R=h.match(x._locale._eraYearOrdinalRegex)),x._locale.eraYearOrdinalParse?y[Vt]=x._locale.eraYearOrdinalParse(h,R):y[Vt]=parseInt(h,10)}),j(0,["gg",2],0,function(){return this.weekYear()%100}),j(0,["GG",2],0,function(){return this.isoWeekYear()%100}),al("gggg","weekYear"),al("ggggg","weekYear"),al("GGGG","isoWeekYear"),al("GGGGG","isoWeekYear"),ut("weekYear","gg"),ut("isoWeekYear","GG"),Y("weekYear",1),Y("isoWeekYear",1),st("G",gt),st("g",gt),st("GG",V,ce),st("gg",V,ce),st("GGGG",In,Jn),st("gggg",In,Jn),st("GGGGG",Nn,Bn),st("ggggg",Nn,Bn),Ee(["gggg","ggggg","GGGG","GGGGG"],function(h,y,x,E){y[E.substr(0,2)]=F(h)}),Ee(["gg","GG"],function(h,y,x,E){y[E]=i.parseTwoDigitYear(h)}),j("Q",0,"Qo","quarter"),ut("quarter","Q"),Y("quarter",7),st("Q",T),Gt("Q",function(h,y){y[Ft]=3*(F(h)-1)}),j("D",["DD",2],"Do","date"),ut("date","D"),Y("date",9),st("D",V),st("DD",V,ce),st("Do",function(h,y){return h?y._dayOfMonthOrdinalParse||y._ordinalParse:y._dayOfMonthOrdinalParseLenient}),Gt(["D","DD"],xt),Gt("Do",function(h,y){y[xt]=F(h.match(V)[0])}),In=I("Date",!0),j("DDD",["DDDD",3],"DDDo","dayOfYear"),ut("dayOfYear","DDD"),Y("dayOfYear",4),st("DDD",Mt),st("DDDD",ht),Gt(["DDD","DDDD"],function(h,y,x){x._dayOfYear=F(h)}),j("m",["mm",2],0,"minute"),ut("minute","m"),Y("minute",14),st("m",V),st("mm",V,ce),Gt(["m","mm"],Lt);var Mn,Jn=I("Minutes",!1),Nn=(j("s",["ss",2],0,"second"),ut("second","s"),Y("second",15),st("s",V),st("ss",V,ce),Gt(["s","ss"],_t),I("Seconds",!1));for(j("S",0,0,function(){return~~(this.millisecond()/100)}),j(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),j(0,["SSS",3],0,"millisecond"),j(0,["SSSS",4],0,function(){return 10*this.millisecond()}),j(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),j(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),j(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),j(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),j(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),ut("millisecond","ms"),Y("millisecond",16),st("S",Mt,T),st("SS",Mt,ce),st("SSS",Mt,ht),Mn="SSSS";Mn.length<=9;Mn+="S")st(Mn,Tt);function F4(h,y){y[Ut]=F(1e3*("0."+h))}for(Mn="S";Mn.length<=9;Mn+="S")Gt(Mn,F4);Bn=I("Milliseconds",!1),j("z",0,0,"zoneAbbr"),j("zz",0,0,"zoneName"),T=W.prototype;function Ed(h){return h}T.add=ee,T.calendar=function(x,R){arguments.length===1&&(arguments[0]?R4(arguments[0])?(x=arguments[0],R=void 0):function(nt){for(var yt=s(nt)&&!o(nt),Ct=!1,Pt=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],It=0;It<Pt.length;It+=1)Ct=Ct||a(nt,Pt[It]);return yt&&Ct}(arguments[0])&&(R=arguments[0],x=void 0):R=x=void 0);var x=x||Se(),E=Wr(x,this).startOf("day"),E=i.calendarFormat(this,E)||"sameElse",R=R&&(C(R[E])?R[E].call(this,x):R[E]);return this.format(R||this.localeData().calendar(E,this,Se(x)))},T.clone=function(){return new W(this)},T.diff=function(h,y,x){var E,R,nt;if(!this.isValid())return NaN;if(!(E=Wr(h,this)).isValid())return NaN;switch(R=6e4*(E.utcOffset()-this.utcOffset()),y=bt(y)){case"year":nt=sl(this,E)/12;break;case"month":nt=sl(this,E);break;case"quarter":nt=sl(this,E)/3;break;case"second":nt=(this-E)/1e3;break;case"minute":nt=(this-E)/6e4;break;case"hour":nt=(this-E)/36e5;break;case"day":nt=(this-E-R)/864e5;break;case"week":nt=(this-E-R)/6048e5;break;default:nt=this-E}return x?nt:X(nt)},T.endOf=function(h){var y,x;if((h=bt(h))===void 0||h==="millisecond"||!this.isValid())return this;switch(x=this._isUTC?wd:kd,h){case"year":y=x(this.year()+1,0,1)-1;break;case"quarter":y=x(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":y=x(this.year(),this.month()+1,1)-1;break;case"week":y=x(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":y=x(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":y=x(this.year(),this.month(),this.date()+1)-1;break;case"hour":y=this._d.valueOf(),y+=36e5-Is(y+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":y=this._d.valueOf(),y+=6e4-Is(y,6e4)-1;break;case"second":y=this._d.valueOf(),y+=1e3-Is(y,1e3)-1;break}return this._d.setTime(y),i.updateOffset(this,!0),this},T.format=function(h){return h=h||(this.isUtc()?i.defaultFormatUtc:i.defaultFormat),h=ot(this,h),this.localeData().postformat(h)},T.from=function(h,y){return this.isValid()&&(q(h)&&h.isValid()||Se(h).isValid())?si({to:this,from:h}).locale(this.locale()).humanize(!y):this.localeData().invalidDate()},T.fromNow=function(h){return this.from(Se(),h)},T.to=function(h,y){return this.isValid()&&(q(h)&&h.isValid()||Se(h).isValid())?si({from:this,to:h}).locale(this.locale()).humanize(!y):this.localeData().invalidDate()},T.toNow=function(h){return this.to(Se(),h)},T.get=function(h){return C(this[h=bt(h)])?this[h]():this},T.invalidAt=function(){return _(this).overflow},T.isAfter=function(h,y){return h=q(h)?h:Se(h),!(!this.isValid()||!h.isValid())&&((y=bt(y)||"millisecond")==="millisecond"?this.valueOf()>h.valueOf():h.valueOf()<this.clone().startOf(y).valueOf())},T.isBefore=function(h,y){return h=q(h)?h:Se(h),!(!this.isValid()||!h.isValid())&&((y=bt(y)||"millisecond")==="millisecond"?this.valueOf()<h.valueOf():this.clone().endOf(y).valueOf()<h.valueOf())},T.isBetween=function(h,y,x,E){return h=q(h)?h:Se(h),y=q(y)?y:Se(y),!!(this.isValid()&&h.isValid()&&y.isValid())&&((E=E||"()")[0]==="("?this.isAfter(h,x):!this.isBefore(h,x))&&(E[1]===")"?this.isBefore(y,x):!this.isAfter(y,x))},T.isSame=function(x,y){var x=q(x)?x:Se(x);return!(!this.isValid()||!x.isValid())&&((y=bt(y)||"millisecond")==="millisecond"?this.valueOf()===x.valueOf():(x=x.valueOf(),this.clone().startOf(y).valueOf()<=x&&x<=this.clone().endOf(y).valueOf()))},T.isSameOrAfter=function(h,y){return this.isSame(h,y)||this.isAfter(h,y)},T.isSameOrBefore=function(h,y){return this.isSame(h,y)||this.isBefore(h,y)},T.isValid=function(){return k(this)},T.lang=Ge,T.locale=_d,T.localeData=xd,T.max=et,T.min=Yt,T.parsingFlags=function(){return p({},_(this))},T.set=function(h,y){if(typeof h=="object")for(var x=function(nt){var yt,Ct=[];for(yt in nt)a(nt,yt)&&Ct.push({unit:yt,priority:Ot[yt]});return Ct.sort(function(Pt,It){return Pt.priority-It.priority}),Ct}(h=K(h)),E=x.length,R=0;R<E;R++)this[x[R].unit](h[x[R].unit]);else if(C(this[h=bt(h)]))return this[h](y);return this},T.startOf=function(h){var y,x;if((h=bt(h))===void 0||h==="millisecond"||!this.isValid())return this;switch(x=this._isUTC?wd:kd,h){case"year":y=x(this.year(),0,1);break;case"quarter":y=x(this.year(),this.month()-this.month()%3,1);break;case"month":y=x(this.year(),this.month(),1);break;case"week":y=x(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":y=x(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":y=x(this.year(),this.month(),this.date());break;case"hour":y=this._d.valueOf(),y-=Is(y+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":y=this._d.valueOf(),y-=Is(y,6e4);break;case"second":y=this._d.valueOf(),y-=Is(y,1e3);break}return this._d.setTime(y),i.updateOffset(this,!0),this},T.subtract=Pe,T.toArray=function(){var h=this;return[h.year(),h.month(),h.date(),h.hour(),h.minute(),h.second(),h.millisecond()]},T.toObject=function(){var h=this;return{years:h.year(),months:h.month(),date:h.date(),hours:h.hours(),minutes:h.minutes(),seconds:h.seconds(),milliseconds:h.milliseconds()}},T.toDate=function(){return new Date(this.valueOf())},T.toISOString=function(h){if(!this.isValid())return null;var y=(h=h!==!0)?this.clone().utc():this;return y.year()<0||9999<y.year()?ot(y,h?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):C(Date.prototype.toISOString)?h?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",ot(y,"Z")):ot(y,h?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},T.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var h,y="moment",x="";return this.isLocal()||(y=this.utcOffset()===0?"moment.utc":"moment.parseZone",x="Z"),y="["+y+'("]',h=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(y+h+"-MM-DD[T]HH:mm:ss.SSS"+(x+'[")]'))},typeof Symbol<"u"&&Symbol.for!=null&&(T[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),T.toJSON=function(){return this.isValid()?this.toISOString():null},T.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},T.unix=function(){return Math.floor(this.valueOf()/1e3)},T.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},T.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},T.eraName=function(){for(var h,y=this.localeData().eras(),x=0,E=y.length;x<E;++x)if(h=this.clone().startOf("day").valueOf(),y[x].since<=h&&h<=y[x].until||y[x].until<=h&&h<=y[x].since)return y[x].name;return""},T.eraNarrow=function(){for(var h,y=this.localeData().eras(),x=0,E=y.length;x<E;++x)if(h=this.clone().startOf("day").valueOf(),y[x].since<=h&&h<=y[x].until||y[x].until<=h&&h<=y[x].since)return y[x].narrow;return""},T.eraAbbr=function(){for(var h,y=this.localeData().eras(),x=0,E=y.length;x<E;++x)if(h=this.clone().startOf("day").valueOf(),y[x].since<=h&&h<=y[x].until||y[x].until<=h&&h<=y[x].since)return y[x].abbr;return""},T.eraYear=function(){for(var h,y,x=this.localeData().eras(),E=0,R=x.length;E<R;++E)if(h=x[E].since<=x[E].until?1:-1,y=this.clone().startOf("day").valueOf(),x[E].since<=y&&y<=x[E].until||x[E].until<=y&&y<=x[E].since)return(this.year()-i(x[E].since).year())*h+x[E].offset;return this.year()},T.year=ll,T.isLeapYear=function(){return U(this.year())},T.weekYear=function(h){return Td.call(this,h,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},T.isoWeekYear=function(h){return Td.call(this,h,this.isoWeek(),this.isoWeekday(),1,4)},T.quarter=T.quarters=function(h){return h==null?Math.ceil((this.month()+1)/3):this.month(3*(h-1)+this.month()%3)},T.month=ne,T.daysInMonth=function(){return dt(this.year(),this.month())},T.week=T.weeks=function(h){var y=this.localeData().week(this);return h==null?y:this.add(7*(h-y),"d")},T.isoWeek=T.isoWeeks=function(h){var y=Be(this,1,4).week;return h==null?y:this.add(7*(h-y),"d")},T.weeksInYear=function(){var h=this.localeData()._week;return Oe(this.year(),h.dow,h.doy)},T.weeksInWeekYear=function(){var h=this.localeData()._week;return Oe(this.weekYear(),h.dow,h.doy)},T.isoWeeksInYear=function(){return Oe(this.year(),1,4)},T.isoWeeksInISOWeekYear=function(){return Oe(this.isoWeekYear(),1,4)},T.date=In,T.day=T.days=function(h){if(!this.isValid())return h!=null?this:NaN;var y,x,E=this._isUTC?this._d.getUTCDay():this._d.getDay();return h!=null?(y=h,x=this.localeData(),h=typeof y!="string"?y:isNaN(y)?typeof(y=x.weekdaysParse(y))=="number"?y:null:parseInt(y,10),this.add(h-E,"d")):E},T.weekday=function(h){if(!this.isValid())return h!=null?this:NaN;var y=(this.day()+7-this.localeData()._week.dow)%7;return h==null?y:this.add(h-y,"d")},T.isoWeekday=function(h){return this.isValid()?h!=null?(y=h,x=this.localeData(),x=typeof y=="string"?x.weekdaysParse(y)%7||7:isNaN(y)?null:y,this.day(this.day()%7?x:x-7)):this.day()||7:h!=null?this:NaN;var y,x},T.dayOfYear=function(h){var y=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return h==null?y:this.add(h-y,"d")},T.hour=T.hours=pt,T.minute=T.minutes=Jn,T.second=T.seconds=Nn,T.millisecond=T.milliseconds=Bn,T.utcOffset=function(h,y,x){var E,R=this._offset||0;if(!this.isValid())return h!=null?this:NaN;if(h==null)return this._isUTC?R:Ou(this);if(typeof h=="string"){if((h=Zn(wt,h))===null)return this}else Math.abs(h)<16&&!x&&(h*=60);return!this._isUTC&&y&&(E=Ou(this)),this._offset=h,this._isUTC=!0,E!=null&&this.add(E,"m"),R!==h&&(!y||this._changeInProgress?md(this,si(h-R,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this},T.utc=function(h){return this.utcOffset(0,h)},T.local=function(h){return this._isUTC&&(this.utcOffset(0,h),this._isUTC=!1,h&&this.subtract(Ou(this),"m")),this},T.parseZone=function(){var h;return this._tzm!=null?this.utcOffset(this._tzm,!1,!0):typeof this._i=="string"&&((h=Zn(Et,this._i))!=null?this.utcOffset(h):this.utcOffset(0,!0)),this},T.hasAlignedHourOffset=function(h){return!!this.isValid()&&(h=h?Se(h).utcOffset():0,(this.utcOffset()-h)%60==0)},T.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},T.isLocal=function(){return!!this.isValid()&&!this._isUTC},T.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},T.isUtc=pd,T.isUTC=pd,T.zoneAbbr=function(){return this._isUTC?"UTC":""},T.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},T.dates=H("dates accessor is deprecated. Use date instead.",In),T.months=H("months accessor is deprecated. Use month instead",ne),T.years=H("years accessor is deprecated. Use year instead",ll),T.zone=H("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(h,y){return h!=null?(this.utcOffset(h=typeof h!="string"?-h:h,y),this):-this.utcOffset()}),T.isDSTShifted=H("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var h,y={};return P(y,this),(y=nl(y))._a?(h=(y._isUTC?g:Se)(y._a),this._isDSTShifted=this.isValid()&&0<function(x,E,R){for(var nt=Math.min(x.length,E.length),yt=Math.abs(x.length-E.length),Ct=0,Pt=0;Pt<nt;Pt++)(R&&x[Pt]!==E[Pt]||!R&&F(x[Pt])!==F(E[Pt]))&&Ct++;return Ct+yt}(y._a,h.toArray())):this._isDSTShifted=!1,this._isDSTShifted}),ce=D.prototype;function ol(h,y,x,nt){var R=oe(),nt=g().set(nt,y);return R[x](nt,h)}function Cd(h,y,x){if(u(h)&&(y=h,h=void 0),h=h||"",y!=null)return ol(h,y,x,"month");for(var E=[],R=0;R<12;R++)E[R]=ol(h,R,x,"month");return E}function Pu(h,y,x,E){y=(typeof h=="boolean"?u(y)&&(x=y,y=void 0):(y=h,h=!1,u(x=y)&&(x=y,y=void 0)),y||"");var R,nt=oe(),yt=h?nt._week.dow:0,Ct=[];if(x!=null)return ol(y,(x+yt)%7,E,"day");for(R=0;R<7;R++)Ct[R]=ol(y,(R+yt)%7,E,"day");return Ct}ce.calendar=function(h,y,x){return C(h=this._calendar[h]||this._calendar.sameElse)?h.call(y,x):h},ce.longDateFormat=function(h){var y=this._longDateFormat[h],x=this._longDateFormat[h.toUpperCase()];return y||!x?y:(this._longDateFormat[h]=x.match(b).map(function(E){return E==="MMMM"||E==="MM"||E==="DD"||E==="dddd"?E.slice(1):E}).join(""),this._longDateFormat[h])},ce.invalidDate=function(){return this._invalidDate},ce.ordinal=function(h){return this._ordinal.replace("%d",h)},ce.preparse=Ed,ce.postformat=Ed,ce.relativeTime=function(h,y,x,E){var R=this._relativeTime[x];return C(R)?R(h,y,x,E):R.replace(/%d/i,h)},ce.pastFuture=function(h,y){return C(h=this._relativeTime[0<h?"future":"past"])?h(y):h.replace(/%s/i,y)},ce.set=function(h){var y,x;for(x in h)a(h,x)&&(C(y=h[x])?this[x]=y:this["_"+x]=y);this._config=h,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},ce.eras=function(h,y){for(var x,E=this._eras||oe("en")._eras,R=0,nt=E.length;R<nt;++R){switch(typeof E[R].since){case"string":x=i(E[R].since).startOf("day"),E[R].since=x.valueOf();break}switch(typeof E[R].until){case"undefined":E[R].until=1/0;break;case"string":x=i(E[R].until).startOf("day").valueOf(),E[R].until=x.valueOf();break}}return E},ce.erasParse=function(h,y,x){var E,R,nt,yt,Ct,Pt=this.eras();for(h=h.toUpperCase(),E=0,R=Pt.length;E<R;++E)if(nt=Pt[E].name.toUpperCase(),yt=Pt[E].abbr.toUpperCase(),Ct=Pt[E].narrow.toUpperCase(),x)switch(y){case"N":case"NN":case"NNN":if(yt===h)return Pt[E];break;case"NNNN":if(nt===h)return Pt[E];break;case"NNNNN":if(Ct===h)return Pt[E];break}else if(0<=[nt,yt,Ct].indexOf(h))return Pt[E]},ce.erasConvertYear=function(h,y){var x=h.since<=h.until?1:-1;return y===void 0?i(h.since).year():i(h.since).year()+(y-h.offset)*x},ce.erasAbbrRegex=function(h){return a(this,"_erasAbbrRegex")||Fu.call(this),h?this._erasAbbrRegex:this._erasRegex},ce.erasNameRegex=function(h){return a(this,"_erasNameRegex")||Fu.call(this),h?this._erasNameRegex:this._erasRegex},ce.erasNarrowRegex=function(h){return a(this,"_erasNarrowRegex")||Fu.call(this),h?this._erasNarrowRegex:this._erasRegex},ce.months=function(h,y){return h?(n(this._months)?this._months:this._months[(this._months.isFormat||me).test(y)?"format":"standalone"])[h.month()]:n(this._months)?this._months:this._months.standalone},ce.monthsShort=function(h,y){return h?(n(this._monthsShort)?this._monthsShort:this._monthsShort[me.test(y)?"format":"standalone"])[h.month()]:n(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},ce.monthsParse=function(h,y,x){var E,R;if(this._monthsParseExact)return function(re,yt,Ct){var Pt,It,ue,re=re.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],Pt=0;Pt<12;++Pt)ue=g([2e3,Pt]),this._shortMonthsParse[Pt]=this.monthsShort(ue,"").toLocaleLowerCase(),this._longMonthsParse[Pt]=this.months(ue,"").toLocaleLowerCase();return Ct?yt==="MMM"?(It=Ht.call(this._shortMonthsParse,re))!==-1?It:null:(It=Ht.call(this._longMonthsParse,re))!==-1?It:null:yt==="MMM"?(It=Ht.call(this._shortMonthsParse,re))!==-1||(It=Ht.call(this._longMonthsParse,re))!==-1?It:null:(It=Ht.call(this._longMonthsParse,re))!==-1||(It=Ht.call(this._shortMonthsParse,re))!==-1?It:null}.call(this,h,y,x);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),E=0;E<12;E++)if(R=g([2e3,E]),x&&!this._longMonthsParse[E]&&(this._longMonthsParse[E]=new RegExp("^"+this.months(R,"").replace(".","")+"$","i"),this._shortMonthsParse[E]=new RegExp("^"+this.monthsShort(R,"").replace(".","")+"$","i")),x||this._monthsParse[E]||(R="^"+this.months(R,"")+"|^"+this.monthsShort(R,""),this._monthsParse[E]=new RegExp(R.replace(".",""),"i")),x&&y==="MMMM"&&this._longMonthsParse[E].test(h)||x&&y==="MMM"&&this._shortMonthsParse[E].test(h)||!x&&this._monthsParse[E].test(h))return E},ce.monthsRegex=function(h){return this._monthsParseExact?(a(this,"_monthsRegex")||ge.call(this),h?this._monthsStrictRegex:this._monthsRegex):(a(this,"_monthsRegex")||(this._monthsRegex=ke),this._monthsStrictRegex&&h?this._monthsStrictRegex:this._monthsRegex)},ce.monthsShortRegex=function(h){return this._monthsParseExact?(a(this,"_monthsRegex")||ge.call(this),h?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,"_monthsShortRegex")||(this._monthsShortRegex=be),this._monthsShortStrictRegex&&h?this._monthsShortStrictRegex:this._monthsShortRegex)},ce.week=function(h){return Be(h,this._week.dow,this._week.doy).week},ce.firstDayOfYear=function(){return this._week.doy},ce.firstDayOfWeek=function(){return this._week.dow},ce.weekdays=function(h,y){return y=n(this._weekdays)?this._weekdays:this._weekdays[h&&h!==!0&&this._weekdays.isFormat.test(y)?"format":"standalone"],h===!0?Fe(y,this._week.dow):h?y[h.day()]:y},ce.weekdaysMin=function(h){return h===!0?Fe(this._weekdaysMin,this._week.dow):h?this._weekdaysMin[h.day()]:this._weekdaysMin},ce.weekdaysShort=function(h){return h===!0?Fe(this._weekdaysShort,this._week.dow):h?this._weekdaysShort[h.day()]:this._weekdaysShort},ce.weekdaysParse=function(h,y,x){var E,R;if(this._weekdaysParseExact)return function(re,yt,Ct){var Pt,It,ue,re=re.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],Pt=0;Pt<7;++Pt)ue=g([2e3,1]).day(Pt),this._minWeekdaysParse[Pt]=this.weekdaysMin(ue,"").toLocaleLowerCase(),this._shortWeekdaysParse[Pt]=this.weekdaysShort(ue,"").toLocaleLowerCase(),this._weekdaysParse[Pt]=this.weekdays(ue,"").toLocaleLowerCase();return Ct?yt==="dddd"?(It=Ht.call(this._weekdaysParse,re))!==-1?It:null:yt==="ddd"?(It=Ht.call(this._shortWeekdaysParse,re))!==-1?It:null:(It=Ht.call(this._minWeekdaysParse,re))!==-1?It:null:yt==="dddd"?(It=Ht.call(this._weekdaysParse,re))!==-1||(It=Ht.call(this._shortWeekdaysParse,re))!==-1||(It=Ht.call(this._minWeekdaysParse,re))!==-1?It:null:yt==="ddd"?(It=Ht.call(this._shortWeekdaysParse,re))!==-1||(It=Ht.call(this._weekdaysParse,re))!==-1||(It=Ht.call(this._minWeekdaysParse,re))!==-1?It:null:(It=Ht.call(this._minWeekdaysParse,re))!==-1||(It=Ht.call(this._weekdaysParse,re))!==-1||(It=Ht.call(this._shortWeekdaysParse,re))!==-1?It:null}.call(this,h,y,x);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),E=0;E<7;E++)if(R=g([2e3,1]).day(E),x&&!this._fullWeekdaysParse[E]&&(this._fullWeekdaysParse[E]=new RegExp("^"+this.weekdays(R,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[E]=new RegExp("^"+this.weekdaysShort(R,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[E]=new RegExp("^"+this.weekdaysMin(R,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[E]||(R="^"+this.weekdays(R,"")+"|^"+this.weekdaysShort(R,"")+"|^"+this.weekdaysMin(R,""),this._weekdaysParse[E]=new RegExp(R.replace(".",""),"i")),x&&y==="dddd"&&this._fullWeekdaysParse[E].test(h)||x&&y==="ddd"&&this._shortWeekdaysParse[E].test(h)||x&&y==="dd"&&this._minWeekdaysParse[E].test(h)||!x&&this._weekdaysParse[E].test(h))return E},ce.weekdaysRegex=function(h){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||St.call(this),h?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=tr),this._weekdaysStrictRegex&&h?this._weekdaysStrictRegex:this._weekdaysRegex)},ce.weekdaysShortRegex=function(h){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||St.call(this),h?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=zt),this._weekdaysShortStrictRegex&&h?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},ce.weekdaysMinRegex=function(h){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||St.call(this),h?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Z),this._weekdaysMinStrictRegex&&h?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},ce.isPM=function(h){return(h+"").toLowerCase().charAt(0)==="p"},ce.meridiem=function(h,y,x){return 11<h?x?"pm":"PM":x?"am":"AM"},qt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(h){var y=h%10;return h+(F(h%100/10)===1?"th":y==1?"st":y==2?"nd":y==3?"rd":"th")}}),i.lang=H("moment.lang is deprecated. Use moment.locale instead.",qt),i.langData=H("moment.langData is deprecated. Use moment.localeData instead.",oe);var $i=Math.abs;function Sd(h,y,x,E){return y=si(y,x),h._milliseconds+=E*y._milliseconds,h._days+=E*y._days,h._months+=E*y._months,h._bubble()}function Ad(h){return h<0?Math.floor(h):Math.ceil(h)}function Ld(h){return 4800*h/146097}function Yu(h){return 146097*h/4800}function Xi(h){return function(){return this.as(h)}}Mt=Xi("ms"),ht=Xi("s"),ee=Xi("m"),et=Xi("h"),Yt=Xi("d"),Pe=Xi("w"),pt=Xi("M"),Jn=Xi("Q"),Nn=Xi("y");function ts(h){return function(){return this.isValid()?this._data[h]:NaN}}var Bn=ts("milliseconds"),In=ts("seconds"),ll=ts("minutes"),ce=ts("hours"),P4=ts("days"),Y4=ts("months"),V4=ts("years"),Ki=Math.round,Os={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function U4(h,y,x,E){var It=si(h).abs(),ue=Ki(It.as("s")),R=Ki(It.as("m")),nt=Ki(It.as("h")),yt=Ki(It.as("d")),Ct=Ki(It.as("M")),Pt=Ki(It.as("w")),It=Ki(It.as("y")),ue=(ue<=x.ss?["s",ue]:ue<x.s&&["ss",ue])||R<=1&&["m"]||R<x.m&&["mm",R]||nt<=1&&["h"]||nt<x.h&&["hh",nt]||yt<=1&&["d"]||yt<x.d&&["dd",yt];return(ue=(ue=x.w!=null?ue||Pt<=1&&["w"]||Pt<x.w&&["ww",Pt]:ue)||Ct<=1&&["M"]||Ct<x.M&&["MM",Ct]||It<=1&&["y"]||["yy",It])[2]=y,ue[3]=0<+h,ue[4]=E,function(re,He,rr,ai,Uu){return Uu.relativeTime(He||1,!!rr,re,ai)}.apply(null,ue)}var Vu=Math.abs;function Rs(h){return(0<h)-(h<0)||+h}function cl(){if(!this.isValid())return this.localeData().invalidDate();var h,y,x,E,R,nt,yt,Ct=Vu(this._milliseconds)/1e3,Pt=Vu(this._days),It=Vu(this._months),ue=this.asSeconds();return ue?(h=X(Ct/60),y=X(h/60),Ct%=60,h%=60,x=X(It/12),It%=12,E=Ct?Ct.toFixed(3).replace(/\.?0+$/,""):"",R=Rs(this._months)!==Rs(ue)?"-":"",nt=Rs(this._days)!==Rs(ue)?"-":"",yt=Rs(this._milliseconds)!==Rs(ue)?"-":"",(ue<0?"-":"")+"P"+(x?R+x+"Y":"")+(It?R+It+"M":"")+(Pt?nt+Pt+"D":"")+(y||h||Ct?"T":"")+(y?yt+y+"H":"")+(h?yt+h+"M":"")+(Ct?yt+E+"S":"")):"P0D"}var Ce=ni.prototype;return Ce.isValid=function(){return this._isValid},Ce.abs=function(){var h=this._data;return this._milliseconds=$i(this._milliseconds),this._days=$i(this._days),this._months=$i(this._months),h.milliseconds=$i(h.milliseconds),h.seconds=$i(h.seconds),h.minutes=$i(h.minutes),h.hours=$i(h.hours),h.months=$i(h.months),h.years=$i(h.years),this},Ce.add=function(h,y){return Sd(this,h,y,1)},Ce.subtract=function(h,y){return Sd(this,h,y,-1)},Ce.as=function(h){if(!this.isValid())return NaN;var y,x,E=this._milliseconds;if((h=bt(h))==="month"||h==="quarter"||h==="year")switch(y=this._days+E/864e5,x=this._months+Ld(y),h){case"month":return x;case"quarter":return x/3;case"year":return x/12}else switch(y=this._days+Math.round(Yu(this._months)),h){case"week":return y/7+E/6048e5;case"day":return y+E/864e5;case"hour":return 24*y+E/36e5;case"minute":return 1440*y+E/6e4;case"second":return 86400*y+E/1e3;case"millisecond":return Math.floor(864e5*y)+E;default:throw new Error("Unknown unit "+h)}},Ce.asMilliseconds=Mt,Ce.asSeconds=ht,Ce.asMinutes=ee,Ce.asHours=et,Ce.asDays=Yt,Ce.asWeeks=Pe,Ce.asMonths=pt,Ce.asQuarters=Jn,Ce.asYears=Nn,Ce.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*F(this._months/12):NaN},Ce._bubble=function(){var h=this._milliseconds,y=this._days,x=this._months,E=this._data;return 0<=h&&0<=y&&0<=x||h<=0&&y<=0&&x<=0||(h+=864e5*Ad(Yu(x)+y),x=y=0),E.milliseconds=h%1e3,h=X(h/1e3),E.seconds=h%60,h=X(h/60),E.minutes=h%60,h=X(h/60),E.hours=h%24,y+=X(h/24),x+=h=X(Ld(y)),y-=Ad(Yu(h)),h=X(x/12),x%=12,E.days=y,E.months=x,E.years=h,this},Ce.clone=function(){return si(this)},Ce.get=function(h){return h=bt(h),this.isValid()?this[h+"s"]():NaN},Ce.milliseconds=Bn,Ce.seconds=In,Ce.minutes=ll,Ce.hours=ce,Ce.days=P4,Ce.weeks=function(){return X(this.days()/7)},Ce.months=Y4,Ce.years=V4,Ce.humanize=function(h,y){if(!this.isValid())return this.localeData().invalidDate();var x=!1,E=Os;return typeof h=="object"&&(y=h,h=!1),typeof h=="boolean"&&(x=h),typeof y=="object"&&(E=Object.assign({},Os,y),y.s!=null&&y.ss==null&&(E.ss=y.s-1)),h=this.localeData(),y=U4(this,!x,E,h),x&&(y=h.pastFuture(+this,y)),h.postformat(y)},Ce.toISOString=cl,Ce.toString=cl,Ce.toJSON=cl,Ce.locale=_d,Ce.localeData=xd,Ce.toIsoString=H("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",cl),Ce.lang=Ge,j("X",0,0,"unix"),j("x",0,0,"valueOf"),st("x",gt),st("X",/[+-]?\d+(\.\d{1,3})?/),Gt("X",function(h,y,x){x._d=new Date(1e3*parseFloat(h))}),Gt("x",function(h,y,x){x._d=new Date(F(h))}),i.version="2.29.4",r=Se,i.fn=T,i.min=function(){return Cr("isBefore",[].slice.call(arguments,0))},i.max=function(){return Cr("isAfter",[].slice.call(arguments,0))},i.now=function(){return Date.now?Date.now():+new Date},i.utc=g,i.unix=function(h){return Se(1e3*h)},i.months=function(h,y){return Cd(h,y,"months")},i.isDate=d,i.locale=qt,i.invalid=w,i.duration=si,i.isMoment=q,i.weekdays=function(h,y,x){return Pu(h,y,x,"weekdays")},i.parseZone=function(){return Se.apply(null,arguments).parseZone()},i.localeData=oe,i.isDuration=ji,i.monthsShort=function(h,y){return Cd(h,y,"monthsShort")},i.weekdaysMin=function(h,y,x){return Pu(h,y,x,"weekdaysMin")},i.defineLocale=te,i.updateLocale=function(h,y){var x,E;return y!=null?(E=We,xe[h]!=null&&xe[h].parentLocale!=null?xe[h].set(v(xe[h]._config,y)):(y=v(E=(x=Ir(h))!=null?x._config:E,y),x==null&&(y.abbr=h),(E=new D(y)).parentLocale=xe[h],xe[h]=E),qt(h)):xe[h]!=null&&(xe[h].parentLocale!=null?(xe[h]=xe[h].parentLocale,h===qt()&&qt(h)):xe[h]!=null&&delete xe[h]),xe[h]},i.locales=function(){return m(xe)},i.weekdaysShort=function(h,y,x){return Pu(h,y,x,"weekdaysShort")},i.normalizeUnits=bt,i.relativeTimeRounding=function(h){return h===void 0?Ki:typeof h=="function"&&(Ki=h,!0)},i.relativeTimeThreshold=function(h,y){return Os[h]!==void 0&&(y===void 0?Os[h]:(Os[h]=y,h==="s"&&(Os.ss=y-1),!0))},i.calendarFormat=function(h,y){return(h=h.diff(y,"days",!0))<-6?"sameElse":h<-1?"lastWeek":h<0?"lastDay":h<1?"sameDay":h<2?"nextDay":h<7?"nextWeek":"sameElse"},i.prototype=T,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i})})(pp);var ib=pp.exports;const mi=W4(ib);var H1={};Object.defineProperty(H1,"__esModule",{value:!0});var kn=H1.sanitizeUrl=void 0,nb=/^([^\w]*)(javascript|data|vbscript)/im,sb=/&#(\w+)(^\w|;)?/g,ab=/&(newline|tab);/gi,ob=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,lb=/^.+(:|:)/gim,cb=[".","/"];function ub(t){return cb.indexOf(t[0])>-1}function hb(t){return t.replace(sb,function(e,r){return String.fromCharCode(r)})}function db(t){var e=hb(t||"").replace(ab,"").replace(ob,"").trim();if(!e)return"about:blank";if(ub(e))return e;var r=e.match(lb);if(!r)return e;var i=r[0];return nb.test(i)?"about:blank":e}kn=H1.sanitizeUrl=db;function Sl(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function fb(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function G1(t){let e,r,i;t.length!==2?(e=Sl,r=(o,l)=>Sl(t(o),l),i=(o,l)=>t(o)-l):(e=t===Sl||t===fb?t:pb,r=t,i=t);function n(o,l,u=0,d=o.length){if(u<d){if(e(l,l)!==0)return d;do{const f=u+d>>>1;r(o[f],l)<0?u=f+1:d=f}while(u<d)}return u}function s(o,l,u=0,d=o.length){if(u<d){if(e(l,l)!==0)return d;do{const f=u+d>>>1;r(o[f],l)<=0?u=f+1:d=f}while(u<d)}return u}function a(o,l,u=0,d=o.length){const f=n(o,l,u,d-1);return f>u&&i(o[f-1],l)>-i(o[f],l)?f-1:f}return{left:n,center:a,right:s}}function pb(){return 0}function gb(t){return t===null?NaN:+t}const yb=G1(Sl),mb=yb.right;G1(gb).center;const bb=mb;class Dd extends Map{constructor(e,r=vb){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(Md(this,e))}has(e){return super.has(Md(this,e))}set(e,r){return super.set(_b(this,e),r)}delete(e){return super.delete(xb(this,e))}}function Md({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):r}function _b({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):(t.set(i,r),r)}function xb({_intern:t,_key:e},r){const i=e(r);return t.has(i)&&(r=t.get(i),t.delete(i)),r}function vb(t){return t!==null&&typeof t=="object"?t.valueOf():t}var Dh=Math.sqrt(50),Mh=Math.sqrt(10),Nh=Math.sqrt(2);function kb(t,e,r){var i,n=-1,s,a,o;if(e=+e,t=+t,r=+r,t===e&&r>0)return[t];if((i=e<t)&&(s=t,t=e,e=s),(o=gp(t,e,r))===0||!isFinite(o))return[];if(o>0){let l=Math.round(t/o),u=Math.round(e/o);for(l*o<t&&++l,u*o>e&&--u,a=new Array(s=u-l+1);++n<s;)a[n]=(l+n)*o}else{o=-o;let l=Math.round(t*o),u=Math.round(e*o);for(l/o<t&&++l,u/o>e&&--u,a=new Array(s=u-l+1);++n<s;)a[n]=(l+n)/o}return i&&a.reverse(),a}function gp(t,e,r){var i=(e-t)/Math.max(0,r),n=Math.floor(Math.log(i)/Math.LN10),s=i/Math.pow(10,n);return n>=0?(s>=Dh?10:s>=Mh?5:s>=Nh?2:1)*Math.pow(10,n):-Math.pow(10,-n)/(s>=Dh?10:s>=Mh?5:s>=Nh?2:1)}function Bh(t,e,r){var i=Math.abs(e-t)/Math.max(0,r),n=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),s=i/n;return s>=Dh?n*=10:s>=Mh?n*=5:s>=Nh&&(n*=2),e<t?-n:n}function wb(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 Tb(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 Eb(t){return t}var Al=1,zu=2,Ih=3,ul=4,Nd=1e-6;function Cb(t){return"translate("+t+",0)"}function Sb(t){return"translate(0,"+t+")"}function Ab(t){return e=>+t(e)}function Lb(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function Db(){return!this.__axis}function yp(t,e){var r=[],i=null,n=null,s=6,a=6,o=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=t===Al||t===ul?-1:1,d=t===ul||t===zu?"x":"y",f=t===Al||t===Ih?Cb:Sb;function p(g){var _=i??(e.ticks?e.ticks.apply(e,r):e.domain()),k=n??(e.tickFormat?e.tickFormat.apply(e,r):Eb),w=Math.max(s,0)+o,S=e.range(),A=+S[0]+l,O=+S[S.length-1]+l,P=(e.bandwidth?Lb:Ab)(e.copy(),l),W=g.selection?g.selection():g,q=W.selectAll(".domain").data([null]),z=W.selectAll(".tick").data(_,e).order(),H=z.exit(),N=z.enter().append("g").attr("class","tick"),M=z.select("line"),C=z.select("text");q=q.merge(q.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),z=z.merge(N),M=M.merge(N.append("line").attr("stroke","currentColor").attr(d+"2",u*s)),C=C.merge(N.append("text").attr("fill","currentColor").attr(d,u*w).attr("dy",t===Al?"0em":t===Ih?"0.71em":"0.32em")),g!==W&&(q=q.transition(g),z=z.transition(g),M=M.transition(g),C=C.transition(g),H=H.transition(g).attr("opacity",Nd).attr("transform",function(v){return isFinite(v=P(v))?f(v+l):this.getAttribute("transform")}),N.attr("opacity",Nd).attr("transform",function(v){var D=this.parentNode.__axis;return f((D&&isFinite(D=D(v))?D:P(v))+l)})),H.remove(),q.attr("d",t===ul||t===zu?a?"M"+u*a+","+A+"H"+l+"V"+O+"H"+u*a:"M"+l+","+A+"V"+O:a?"M"+A+","+u*a+"V"+l+"H"+O+"V"+u*a:"M"+A+","+l+"H"+O),z.attr("opacity",1).attr("transform",function(v){return f(P(v)+l)}),M.attr(d+"2",u*s),C.attr(d,u*w).text(k),W.filter(Db).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===zu?"start":t===ul?"end":"middle"),W.each(function(){this.__axis=P})}return p.scale=function(g){return arguments.length?(e=g,p):e},p.ticks=function(){return r=Array.from(arguments),p},p.tickArguments=function(g){return arguments.length?(r=g==null?[]:Array.from(g),p):r.slice()},p.tickValues=function(g){return arguments.length?(i=g==null?null:Array.from(g),p):i&&i.slice()},p.tickFormat=function(g){return arguments.length?(n=g,p):n},p.tickSize=function(g){return arguments.length?(s=a=+g,p):s},p.tickSizeInner=function(g){return arguments.length?(s=+g,p):s},p.tickSizeOuter=function(g){return arguments.length?(a=+g,p):a},p.tickPadding=function(g){return arguments.length?(o=+g,p):o},p.offset=function(g){return arguments.length?(l=+g,p):l},p}function Mb(t){return yp(Al,t)}function Nb(t){return yp(Ih,t)}var Bb={value:()=>{}};function mp(){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 Ll(r)}function Ll(t){this._=t}function Ib(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}})}Ll.prototype=mp.prototype={constructor:Ll,on:function(t,e){var r=this._,i=Ib(t+"",r),n,s=-1,a=i.length;if(arguments.length<2){for(;++s<a;)if((n=(t=i[s]).type)&&(n=Ob(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]=Bd(r[n],t.name,e);else if(e==null)for(n in r)r[n]=Bd(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 Ll(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 Ob(t,e){for(var r=0,i=t.length,n;r<i;++r)if((n=t[r]).name===e)return n.value}function Bd(t,e,r){for(var i=0,n=t.length;i<n;++i)if(t[i].name===e){t[i]=Bb,t=t.slice(0,i).concat(t.slice(i+1));break}return r!=null&&t.push({name:e,value:r}),t}var Oh="http://www.w3.org/1999/xhtml";const Id={svg:"http://www.w3.org/2000/svg",xhtml:Oh,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function $c(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),Id.hasOwnProperty(e)?{space:Id[e],local:t}:t}function Rb(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===Oh&&e.documentElement.namespaceURI===Oh?e.createElement(t):e.createElementNS(r,t)}}function Fb(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function bp(t){var e=$c(t);return(e.local?Fb:Rb)(e)}function Pb(){}function q1(t){return t==null?Pb:function(){return this.querySelector(t)}}function Yb(t){typeof t!="function"&&(t=q1(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,u,d=0;d<a;++d)(l=s[d])&&(u=t.call(l,l.__data__,d,s))&&("__data__"in l&&(u.__data__=l.__data__),o[d]=u);return new Nr(i,this._parents)}function _p(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Vb(){return[]}function xp(t){return t==null?Vb:function(){return this.querySelectorAll(t)}}function Ub(t){return function(){return _p(t.apply(this,arguments))}}function zb(t){typeof t=="function"?t=Ub(t):t=xp(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,u=0;u<o;++u)(l=a[u])&&(i.push(t.call(l,l.__data__,u,a)),n.push(l));return new Nr(i,n)}function vp(t){return function(){return this.matches(t)}}function kp(t){return function(e){return e.matches(t)}}var Wb=Array.prototype.find;function Hb(t){return function(){return Wb.call(this.children,t)}}function Gb(){return this.firstElementChild}function qb(t){return this.select(t==null?Gb:Hb(typeof t=="function"?t:kp(t)))}var jb=Array.prototype.filter;function $b(){return Array.from(this.children)}function Xb(t){return function(){return jb.call(this.children,t)}}function Kb(t){return this.selectAll(t==null?$b:Xb(typeof t=="function"?t:kp(t)))}function Zb(t){typeof t!="function"&&(t=vp(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,u=0;u<a;++u)(l=s[u])&&t.call(l,l.__data__,u,s)&&o.push(l);return new Nr(i,this._parents)}function wp(t){return new Array(t.length)}function Qb(){return new Nr(this._enter||this._groups.map(wp),this._parents)}function Xl(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Xl.prototype={constructor:Xl,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 Jb(t){return function(){return t}}function t5(t,e,r,i,n,s){for(var a=0,o,l=e.length,u=s.length;a<u;++a)(o=e[a])?(o.__data__=s[a],i[a]=o):r[a]=new Xl(t,s[a]);for(;a<l;++a)(o=e[a])&&(n[a]=o)}function e5(t,e,r,i,n,s,a){var o,l,u=new Map,d=e.length,f=s.length,p=new Array(d),g;for(o=0;o<d;++o)(l=e[o])&&(p[o]=g=a.call(l,l.__data__,o,e)+"",u.has(g)?n[o]=l:u.set(g,l));for(o=0;o<f;++o)g=a.call(t,s[o],o,s)+"",(l=u.get(g))?(i[o]=l,l.__data__=s[o],u.delete(g)):r[o]=new Xl(t,s[o]);for(o=0;o<d;++o)(l=e[o])&&u.get(p[o])===l&&(n[o]=l)}function r5(t){return t.__data__}function i5(t,e){if(!arguments.length)return Array.from(this,r5);var r=e?e5:t5,i=this._parents,n=this._groups;typeof t!="function"&&(t=Jb(t));for(var s=n.length,a=new Array(s),o=new Array(s),l=new Array(s),u=0;u<s;++u){var d=i[u],f=n[u],p=f.length,g=n5(t.call(d,d&&d.__data__,u,i)),_=g.length,k=o[u]=new Array(_),w=a[u]=new Array(_),S=l[u]=new Array(p);r(d,f,k,w,S,g,e);for(var A=0,O=0,P,W;A<_;++A)if(P=k[A]){for(A>=O&&(O=A+1);!(W=w[O])&&++O<_;);P._next=W||null}}return a=new Nr(a,i),a._enter=o,a._exit=l,a}function n5(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function s5(){return new Nr(this._exit||this._groups.map(wp),this._parents)}function a5(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 o5(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 u=r[l],d=i[l],f=u.length,p=o[l]=new Array(f),g,_=0;_<f;++_)(g=u[_]||d[_])&&(p[_]=g);for(;l<n;++l)o[l]=r[l];return new Nr(o,this._parents)}function l5(){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 c5(t){t||(t=u5);function e(f,p){return f&&p?t(f.__data__,p.__data__):!f-!p}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),u,d=0;d<o;++d)(u=a[d])&&(l[d]=u);l.sort(e)}return new Nr(n,this._parents).order()}function u5(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function h5(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function d5(){return Array.from(this)}function f5(){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 p5(){let t=0;for(const e of this)++t;return t}function g5(){return!this.node()}function y5(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 m5(t){return function(){this.removeAttribute(t)}}function b5(t){return function(){this.removeAttributeNS(t.space,t.local)}}function _5(t,e){return function(){this.setAttribute(t,e)}}function x5(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function v5(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function k5(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 w5(t,e){var r=$c(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?b5:m5:typeof e=="function"?r.local?k5:v5:r.local?x5:_5)(r,e))}function Tp(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function T5(t){return function(){this.style.removeProperty(t)}}function E5(t,e,r){return function(){this.style.setProperty(t,e,r)}}function C5(t,e,r){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function S5(t,e,r){return arguments.length>1?this.each((e==null?T5:typeof e=="function"?C5:E5)(t,e,r??"")):ra(this.node(),t)}function ra(t,e){return t.style.getPropertyValue(e)||Tp(t).getComputedStyle(t,null).getPropertyValue(e)}function A5(t){return function(){delete this[t]}}function L5(t,e){return function(){this[t]=e}}function D5(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function M5(t,e){return arguments.length>1?this.each((e==null?A5:typeof e=="function"?D5:L5)(t,e)):this.node()[t]}function Ep(t){return t.trim().split(/^|\s+/)}function j1(t){return t.classList||new Cp(t)}function Cp(t){this._node=t,this._names=Ep(t.getAttribute("class")||"")}Cp.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 Sp(t,e){for(var r=j1(t),i=-1,n=e.length;++i<n;)r.add(e[i])}function Ap(t,e){for(var r=j1(t),i=-1,n=e.length;++i<n;)r.remove(e[i])}function N5(t){return function(){Sp(this,t)}}function B5(t){return function(){Ap(this,t)}}function I5(t,e){return function(){(e.apply(this,arguments)?Sp:Ap)(this,t)}}function O5(t,e){var r=Ep(t+"");if(arguments.length<2){for(var i=j1(this.node()),n=-1,s=r.length;++n<s;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof e=="function"?I5:e?N5:B5)(r,e))}function R5(){this.textContent=""}function F5(t){return function(){this.textContent=t}}function P5(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Y5(t){return arguments.length?this.each(t==null?R5:(typeof t=="function"?P5:F5)(t)):this.node().textContent}function V5(){this.innerHTML=""}function U5(t){return function(){this.innerHTML=t}}function z5(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function W5(t){return arguments.length?this.each(t==null?V5:(typeof t=="function"?z5:U5)(t)):this.node().innerHTML}function H5(){this.nextSibling&&this.parentNode.appendChild(this)}function G5(){return this.each(H5)}function q5(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function j5(){return this.each(q5)}function $5(t){var e=typeof t=="function"?t:bp(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function X5(){return null}function K5(t,e){var r=typeof t=="function"?t:bp(t),i=e==null?X5:typeof e=="function"?e:q1(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Z5(){var t=this.parentNode;t&&t.removeChild(this)}function Q5(){return this.each(Z5)}function J5(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function t_(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function e_(t){return this.select(t?t_:J5)}function r_(t){return arguments.length?this.property("__data__",t):this.node().__data__}function i_(t){return function(e){t.call(this,e,this.__data__)}}function n_(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 s_(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 a_(t,e,r){return function(){var i=this.__on,n,s=i_(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 o_(t,e,r){var i=n_(t+""),n,s=i.length,a;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,u=o.length,d;l<u;++l)for(n=0,d=o[l];n<s;++n)if((a=i[n]).type===d.type&&a.name===d.name)return d.value}return}for(o=e?a_:s_,n=0;n<s;++n)this.each(o(i[n],e,r));return this}function Lp(t,e,r){var i=Tp(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 l_(t,e){return function(){return Lp(this,t,e)}}function c_(t,e){return function(){return Lp(this,t,e.apply(this,arguments))}}function u_(t,e){return this.each((typeof e=="function"?c_:l_)(t,e))}function*h_(){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 $1=[null];function Nr(t,e){this._groups=t,this._parents=e}function Uo(){return new Nr([[document.documentElement]],$1)}function d_(){return this}Nr.prototype=Uo.prototype={constructor:Nr,select:Yb,selectAll:zb,selectChild:qb,selectChildren:Kb,filter:Zb,data:i5,enter:Qb,exit:s5,join:a5,merge:o5,selection:d_,order:l5,sort:c5,call:h5,nodes:d5,node:f5,size:p5,empty:g5,each:y5,attr:w5,style:S5,property:M5,classed:O5,text:Y5,html:W5,raise:G5,lower:j5,append:$5,insert:K5,remove:Q5,clone:e_,datum:r_,on:o_,dispatch:u_,[Symbol.iterator]:h_};function At(t){return typeof t=="string"?new Nr([[document.querySelector(t)]],[document.documentElement]):new Nr([[t]],$1)}function X1(t){return typeof t=="string"?new Nr([document.querySelectorAll(t)],[document.documentElement]):new Nr([_p(t)],$1)}function zo(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function Xc(t,e){var r=Object.create(t.prototype);for(var i in e)r[i]=e[i];return r}function Ts(){}var uo=.7,Kl=1/uo,Xs="\\s*([+-]?\\d+)\\s*",ho="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Fi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",f_=/^#([0-9a-f]{3,8})$/,p_=new RegExp(`^rgb\\(${Xs},${Xs},${Xs}\\)$`),g_=new RegExp(`^rgb\\(${Fi},${Fi},${Fi}\\)$`),y_=new RegExp(`^rgba\\(${Xs},${Xs},${Xs},${ho}\\)$`),m_=new RegExp(`^rgba\\(${Fi},${Fi},${Fi},${ho}\\)$`),b_=new RegExp(`^hsl\\(${ho},${Fi},${Fi}\\)$`),__=new RegExp(`^hsla\\(${ho},${Fi},${Fi},${ho}\\)$`),Od={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};zo(Ts,ds,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Rd,formatHex:Rd,formatHex8:x_,formatHsl:v_,formatRgb:Fd,toString:Fd});function Rd(){return this.rgb().formatHex()}function x_(){return this.rgb().formatHex8()}function v_(){return Mp(this).formatHsl()}function Fd(){return this.rgb().formatRgb()}function ds(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=f_.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?Pd(e):r===3?new wr(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?hl(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?hl(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=p_.exec(t))?new wr(e[1],e[2],e[3],1):(e=g_.exec(t))?new wr(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=y_.exec(t))?hl(e[1],e[2],e[3],e[4]):(e=m_.exec(t))?hl(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=b_.exec(t))?Ud(e[1],e[2]/100,e[3]/100,1):(e=__.exec(t))?Ud(e[1],e[2]/100,e[3]/100,e[4]):Od.hasOwnProperty(t)?Pd(Od[t]):t==="transparent"?new wr(NaN,NaN,NaN,0):null}function Pd(t){return new wr(t>>16&255,t>>8&255,t&255,1)}function hl(t,e,r,i){return i<=0&&(t=e=r=NaN),new wr(t,e,r,i)}function Dp(t){return t instanceof Ts||(t=ds(t)),t?(t=t.rgb(),new wr(t.r,t.g,t.b,t.opacity)):new wr}function Rh(t,e,r,i){return arguments.length===1?Dp(t):new wr(t,e,r,i??1)}function wr(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}zo(wr,Rh,Xc(Ts,{brighter(t){return t=t==null?Kl:Math.pow(Kl,t),new wr(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?uo:Math.pow(uo,t),new wr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new wr(us(this.r),us(this.g),us(this.b),Zl(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:Yd,formatHex:Yd,formatHex8:k_,formatRgb:Vd,toString:Vd}));function Yd(){return`#${cs(this.r)}${cs(this.g)}${cs(this.b)}`}function k_(){return`#${cs(this.r)}${cs(this.g)}${cs(this.b)}${cs((isNaN(this.opacity)?1:this.opacity)*255)}`}function Vd(){const t=Zl(this.opacity);return`${t===1?"rgb(":"rgba("}${us(this.r)}, ${us(this.g)}, ${us(this.b)}${t===1?")":`, ${t})`}`}function Zl(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function us(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function cs(t){return t=us(t),(t<16?"0":"")+t.toString(16)}function Ud(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new ui(t,e,r,i)}function Mp(t){if(t instanceof ui)return new ui(t.h,t.s,t.l,t.opacity);if(t instanceof Ts||(t=ds(t)),!t)return new ui;if(t instanceof ui)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 ui(a,o,l,t.opacity)}function w_(t,e,r,i){return arguments.length===1?Mp(t):new ui(t,e,r,i??1)}function ui(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}zo(ui,w_,Xc(Ts,{brighter(t){return t=t==null?Kl:Math.pow(Kl,t),new ui(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?uo:Math.pow(uo,t),new ui(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 wr(Wu(t>=240?t-240:t+120,n,i),Wu(t,n,i),Wu(t<120?t+240:t-120,n,i),this.opacity)},clamp(){return new ui(zd(this.h),dl(this.s),dl(this.l),Zl(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=Zl(this.opacity);return`${t===1?"hsl(":"hsla("}${zd(this.h)}, ${dl(this.s)*100}%, ${dl(this.l)*100}%${t===1?")":`, ${t})`}`}}));function zd(t){return t=(t||0)%360,t<0?t+360:t}function dl(t){return Math.max(0,Math.min(1,t||0))}function Wu(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 T_=Math.PI/180,E_=180/Math.PI,Ql=18,Np=.96422,Bp=1,Ip=.82521,Op=4/29,Ks=6/29,Rp=3*Ks*Ks,C_=Ks*Ks*Ks;function Fp(t){if(t instanceof Pi)return new Pi(t.l,t.a,t.b,t.opacity);if(t instanceof ln)return Pp(t);t instanceof wr||(t=Dp(t));var e=ju(t.r),r=ju(t.g),i=ju(t.b),n=Hu((.2225045*e+.7168786*r+.0606169*i)/Bp),s,a;return e===r&&r===i?s=a=n:(s=Hu((.4360747*e+.3850649*r+.1430804*i)/Np),a=Hu((.0139322*e+.0971045*r+.7141733*i)/Ip)),new Pi(116*n-16,500*(s-n),200*(n-a),t.opacity)}function S_(t,e,r,i){return arguments.length===1?Fp(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}zo(Pi,S_,Xc(Ts,{brighter(t){return new Pi(this.l+Ql*(t??1),this.a,this.b,this.opacity)},darker(t){return new Pi(this.l-Ql*(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=Np*Gu(e),t=Bp*Gu(t),r=Ip*Gu(r),new wr(qu(3.1338561*e-1.6168667*t-.4906146*r),qu(-.9787684*e+1.9161415*t+.033454*r),qu(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}}));function Hu(t){return t>C_?Math.pow(t,1/3):t/Rp+Op}function Gu(t){return t>Ks?t*t*t:Rp*(t-Op)}function qu(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ju(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function A_(t){if(t instanceof ln)return new ln(t.h,t.c,t.l,t.opacity);if(t instanceof Pi||(t=Fp(t)),t.a===0&&t.b===0)return new ln(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*E_;return new ln(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Fh(t,e,r,i){return arguments.length===1?A_(t):new ln(t,e,r,i??1)}function ln(t,e,r,i){this.h=+t,this.c=+e,this.l=+r,this.opacity=+i}function Pp(t){if(isNaN(t.h))return new Pi(t.l,0,0,t.opacity);var e=t.h*T_;return new Pi(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}zo(ln,Fh,Xc(Ts,{brighter(t){return new ln(this.h,this.c,this.l+Ql*(t??1),this.opacity)},darker(t){return new ln(this.h,this.c,this.l-Ql*(t??1),this.opacity)},rgb(){return Pp(this).rgb()}}));const Kc=t=>()=>t;function Yp(t,e){return function(r){return t+r*e}}function L_(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 D_(t,e){var r=e-t;return r?Yp(t,r>180||r<-180?r-360*Math.round(r/360):r):Kc(isNaN(t)?e:t)}function M_(t){return(t=+t)==1?Qa:function(e,r){return r-e?L_(e,r,t):Kc(isNaN(e)?r:e)}}function Qa(t,e){var r=e-t;return r?Yp(t,r):Kc(isNaN(t)?e:t)}const Jl=function t(e){var r=M_(e);function i(n,s){var a=r((n=Rh(n)).r,(s=Rh(s)).r),o=r(n.g,s.g),l=r(n.b,s.b),u=Qa(n.opacity,s.opacity);return function(d){return n.r=a(d),n.g=o(d),n.b=l(d),n.opacity=u(d),n+""}}return i.gamma=t,i}(1);function N_(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 B_(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function I_(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]=K1(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 O_(t,e){var r=new Date;return t=+t,e=+e,function(i){return r.setTime(t*(1-i)+e*i),r}}function ci(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function R_(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]=K1(t[n],e[n]):i[n]=e[n];return function(s){for(n in r)i[n]=r[n](s);return i}}var Ph=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,$u=new RegExp(Ph.source,"g");function F_(t){return function(){return t}}function P_(t){return function(e){return t(e)+""}}function Vp(t,e){var r=Ph.lastIndex=$u.lastIndex=0,i,n,s,a=-1,o=[],l=[];for(t=t+"",e=e+"";(i=Ph.exec(t))&&(n=$u.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:ci(i,n)})),r=$u.lastIndex;return r<e.length&&(s=e.slice(r),o[a]?o[a]+=s:o[++a]=s),o.length<2?l[0]?P_(l[0].x):F_(e):(e=l.length,function(u){for(var d=0,f;d<e;++d)o[(f=l[d]).i]=f.x(u);return o.join("")})}function K1(t,e){var r=typeof e,i;return e==null||r==="boolean"?Kc(e):(r==="number"?ci:r==="string"?(i=ds(e))?(e=i,Jl):Vp:e instanceof ds?Jl:e instanceof Date?O_:B_(e)?N_:Array.isArray(e)?I_:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?R_:ci)(t,e)}function Y_(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}var Wd=180/Math.PI,Yh={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Up(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)*Wd,skewX:Math.atan(l)*Wd,scaleX:a,scaleY:o}}var fl;function V_(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Yh:Up(e.a,e.b,e.c,e.d,e.e,e.f)}function U_(t){return t==null||(fl||(fl=document.createElementNS("http://www.w3.org/2000/svg","g")),fl.setAttribute("transform",t),!(t=fl.transform.baseVal.consolidate()))?Yh:(t=t.matrix,Up(t.a,t.b,t.c,t.d,t.e,t.f))}function zp(t,e,r,i){function n(u){return u.length?u.pop()+" ":""}function s(u,d,f,p,g,_){if(u!==f||d!==p){var k=g.push("translate(",null,e,null,r);_.push({i:k-4,x:ci(u,f)},{i:k-2,x:ci(d,p)})}else(f||p)&&g.push("translate("+f+e+p+r)}function a(u,d,f,p){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),p.push({i:f.push(n(f)+"rotate(",null,i)-2,x:ci(u,d)})):d&&f.push(n(f)+"rotate("+d+i)}function o(u,d,f,p){u!==d?p.push({i:f.push(n(f)+"skewX(",null,i)-2,x:ci(u,d)}):d&&f.push(n(f)+"skewX("+d+i)}function l(u,d,f,p,g,_){if(u!==f||d!==p){var k=g.push(n(g)+"scale(",null,",",null,")");_.push({i:k-4,x:ci(u,f)},{i:k-2,x:ci(d,p)})}else(f!==1||p!==1)&&g.push(n(g)+"scale("+f+","+p+")")}return function(u,d){var f=[],p=[];return u=t(u),d=t(d),s(u.translateX,u.translateY,d.translateX,d.translateY,f,p),a(u.rotate,d.rotate,f,p),o(u.skewX,d.skewX,f,p),l(u.scaleX,u.scaleY,d.scaleX,d.scaleY,f,p),u=d=null,function(g){for(var _=-1,k=p.length,w;++_<k;)f[(w=p[_]).i]=w.x(g);return f.join("")}}}var z_=zp(V_,"px, ","px)","deg)"),W_=zp(U_,", ",")",")");function H_(t){return function(e,r){var i=t((e=Fh(e)).h,(r=Fh(r)).h),n=Qa(e.c,r.c),s=Qa(e.l,r.l),a=Qa(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 G_=H_(D_);var ia=0,Ga=0,Ba=0,Wp=1e3,tc,qa,ec=0,fs=0,Zc=0,fo=typeof performance=="object"&&performance.now?performance:Date,Hp=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Z1(){return fs||(Hp(q_),fs=fo.now()+Zc)}function q_(){fs=0}function rc(){this._call=this._time=this._next=null}rc.prototype=Gp.prototype={constructor:rc,restart:function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?Z1():+r)+(e==null?0:+e),!this._next&&qa!==this&&(qa?qa._next=this:tc=this,qa=this),this._call=t,this._time=r,Vh()},stop:function(){this._call&&(this._call=null,this._time=1/0,Vh())}};function Gp(t,e,r){var i=new rc;return i.restart(t,e,r),i}function j_(){Z1(),++ia;for(var t=tc,e;t;)(e=fs-t._time)>=0&&t._call.call(void 0,e),t=t._next;--ia}function Hd(){fs=(ec=fo.now())+Zc,ia=Ga=0;try{j_()}finally{ia=0,X_(),fs=0}}function $_(){var t=fo.now(),e=t-ec;e>Wp&&(Zc-=e,ec=t)}function X_(){for(var t,e=tc,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:tc=r);qa=t,Vh(i)}function Vh(t){if(!ia){Ga&&(Ga=clearTimeout(Ga));var e=t-fs;e>24?(t<1/0&&(Ga=setTimeout(Hd,t-fo.now()-Zc)),Ba&&(Ba=clearInterval(Ba))):(Ba||(ec=fo.now(),Ba=setInterval($_,Wp)),ia=1,Hp(Hd))}}function Gd(t,e,r){var i=new rc;return e=e==null?0:+e,i.restart(n=>{i.stop(),t(n+e)},e,r),i}var K_=mp("start","end","cancel","interrupt"),Z_=[],qp=0,qd=1,Uh=2,Dl=3,jd=4,zh=5,Ml=6;function Qc(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:K_,tween:Z_,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:qp})}function Q1(t,e){var r=ki(t,e);if(r.state>qp)throw new Error("too late; already scheduled");return r}function Wi(t,e){var r=ki(t,e);if(r.state>Dl)throw new Error("too late; already running");return r}function ki(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=Gp(s,0,r.time);function s(u){r.state=qd,r.timer.restart(a,r.delay,r.time),r.delay<=u&&a(u-r.delay)}function a(u){var d,f,p,g;if(r.state!==qd)return l();for(d in i)if(g=i[d],g.name===r.name){if(g.state===Dl)return Gd(a);g.state===jd?(g.state=Ml,g.timer.stop(),g.on.call("interrupt",t,t.__data__,g.index,g.group),delete i[d]):+d<e&&(g.state=Ml,g.timer.stop(),g.on.call("cancel",t,t.__data__,g.index,g.group),delete i[d])}if(Gd(function(){r.state===Dl&&(r.state=jd,r.timer.restart(o,r.delay,r.time),o(u))}),r.state=Uh,r.on.call("start",t,t.__data__,r.index,r.group),r.state===Uh){for(r.state=Dl,n=new Array(p=r.tween.length),d=0,f=-1;d<p;++d)(g=r.tween[d].value.call(t,t.__data__,r.index,r.group))&&(n[++f]=g);n.length=f+1}}function o(u){for(var d=u<r.duration?r.ease.call(null,u/r.duration):(r.timer.restart(l),r.state=zh,1),f=-1,p=n.length;++f<p;)n[f].call(t,d);r.state===zh&&(r.on.call("end",t,t.__data__,r.index,r.group),l())}function l(){r.state=Ml,r.timer.stop(),delete i[e];for(var u in i)return;delete t.__transition}}function J_(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>Uh&&i.state<zh,i.state=Ml,i.timer.stop(),i.on.call(n?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete r[a]}s&&delete t.__transition}}function tx(t){return this.each(function(){J_(this,t)})}function ex(t,e){var r,i;return function(){var n=Wi(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 rx(t,e,r){var i,n;if(typeof r!="function")throw new Error;return function(){var s=Wi(this,t),a=s.tween;if(a!==i){n=(i=a).slice();for(var o={name:e,value:r},l=0,u=n.length;l<u;++l)if(n[l].name===e){n[l]=o;break}l===u&&n.push(o)}s.tween=n}}function ix(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i=ki(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?ex:rx)(r,t,e))}function J1(t,e,r){var i=t._id;return t.each(function(){var n=Wi(this,i);(n.value||(n.value={}))[e]=r.apply(this,arguments)}),function(n){return ki(n,i).value[e]}}function jp(t,e){var r;return(typeof e=="number"?ci:e instanceof ds?Jl:(r=ds(e))?(e=r,Jl):Vp)(t,e)}function nx(t){return function(){this.removeAttribute(t)}}function sx(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ax(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 ox(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 lx(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 cx(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 ux(t,e){var r=$c(t),i=r==="transform"?W_:jp;return this.attrTween(t,typeof e=="function"?(r.local?cx:lx)(r,i,J1(this,"attr."+t,e)):e==null?(r.local?sx:nx)(r):(r.local?ox:ax)(r,i,e))}function hx(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function dx(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function fx(t,e){var r,i;function n(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&dx(t,s)),r}return n._value=e,n}function px(t,e){var r,i;function n(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&hx(t,s)),r}return n._value=e,n}function gx(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=$c(t);return this.tween(r,(i.local?fx:px)(i,e))}function yx(t,e){return function(){Q1(this,t).delay=+e.apply(this,arguments)}}function mx(t,e){return e=+e,function(){Q1(this,t).delay=e}}function bx(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?yx:mx)(e,t)):ki(this.node(),e).delay}function _x(t,e){return function(){Wi(this,t).duration=+e.apply(this,arguments)}}function xx(t,e){return e=+e,function(){Wi(this,t).duration=e}}function vx(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?_x:xx)(e,t)):ki(this.node(),e).duration}function kx(t,e){if(typeof e!="function")throw new Error;return function(){Wi(this,t).ease=e}}function wx(t){var e=this._id;return arguments.length?this.each(kx(e,t)):ki(this.node(),e).ease}function Tx(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;Wi(this,t).ease=r}}function Ex(t){if(typeof t!="function")throw new Error;return this.each(Tx(this._id,t))}function Cx(t){typeof t!="function"&&(t=vp(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,u=0;u<a;++u)(l=s[u])&&t.call(l,l.__data__,u,s)&&o.push(l);return new mn(i,this._parents,this._name,this._id)}function Sx(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],u=r[o],d=l.length,f=a[o]=new Array(d),p,g=0;g<d;++g)(p=l[g]||u[g])&&(f[g]=p);for(;o<i;++o)a[o]=e[o];return new mn(a,this._parents,this._name,this._id)}function Ax(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 Lx(t,e,r){var i,n,s=Ax(e)?Q1:Wi;return function(){var a=s(this,t),o=a.on;o!==i&&(n=(i=o).copy()).on(e,r),a.on=n}}function Dx(t,e){var r=this._id;return arguments.length<2?ki(this.node(),r).on.on(t):this.each(Lx(r,t,e))}function Mx(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function Nx(){return this.on("end.remove",Mx(this._id))}function Bx(t){var e=this._name,r=this._id;typeof t!="function"&&(t=q1(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,u=s[a]=new Array(l),d,f,p=0;p<l;++p)(d=o[p])&&(f=t.call(d,d.__data__,p,o))&&("__data__"in d&&(f.__data__=d.__data__),u[p]=f,Qc(u[p],e,r,p,u,ki(d,r)));return new mn(s,this._parents,e,r)}function Ix(t){var e=this._name,r=this._id;typeof t!="function"&&(t=xp(t));for(var i=this._groups,n=i.length,s=[],a=[],o=0;o<n;++o)for(var l=i[o],u=l.length,d,f=0;f<u;++f)if(d=l[f]){for(var p=t.call(d,d.__data__,f,l),g,_=ki(d,r),k=0,w=p.length;k<w;++k)(g=p[k])&&Qc(g,e,r,k,p,_);s.push(p),a.push(d)}return new mn(s,a,e,r)}var Ox=Uo.prototype.constructor;function Rx(){return new Ox(this._groups,this._parents)}function Fx(t,e){var r,i,n;return function(){var s=ra(this,t),a=(this.style.removeProperty(t),ra(this,t));return s===a?null:s===r&&a===i?n:n=e(r=s,i=a)}}function $p(t){return function(){this.style.removeProperty(t)}}function Px(t,e,r){var i,n=r+"",s;return function(){var a=ra(this,t);return a===n?null:a===i?s:s=e(i=a,r)}}function Yx(t,e,r){var i,n,s;return function(){var a=ra(this,t),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(t),ra(this,t))),a===l?null:a===i&&l===n?s:(n=l,s=e(i=a,o))}}function Vx(t,e){var r,i,n,s="style."+e,a="end."+s,o;return function(){var l=Wi(this,t),u=l.on,d=l.value[s]==null?o||(o=$p(e)):void 0;(u!==r||n!==d)&&(i=(r=u).copy()).on(a,n=d),l.on=i}}function Ux(t,e,r){var i=(t+="")=="transform"?z_:jp;return e==null?this.styleTween(t,Fx(t,i)).on("end.style."+t,$p(t)):typeof e=="function"?this.styleTween(t,Yx(t,i,J1(this,"style."+t,e))).each(Vx(this._id,t)):this.styleTween(t,Px(t,i,e),r).on("end.style."+t,null)}function zx(t,e,r){return function(i){this.style.setProperty(t,e.call(this,i),r)}}function Wx(t,e,r){var i,n;function s(){var a=e.apply(this,arguments);return a!==n&&(i=(n=a)&&zx(t,a,r)),i}return s._value=e,s}function Hx(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,Wx(t,e,r??""))}function Gx(t){return function(){this.textContent=t}}function qx(t){return function(){var e=t(this);this.textContent=e??""}}function jx(t){return this.tween("text",typeof t=="function"?qx(J1(this,"text",t)):Gx(t==null?"":t+""))}function $x(t){return function(e){this.textContent=t.call(this,e)}}function Xx(t){var e,r;function i(){var n=t.apply(this,arguments);return n!==r&&(e=(r=n)&&$x(n)),e}return i._value=t,i}function Kx(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,Xx(t))}function Zx(){for(var t=this._name,e=this._id,r=Xp(),i=this._groups,n=i.length,s=0;s<n;++s)for(var a=i[s],o=a.length,l,u=0;u<o;++u)if(l=a[u]){var d=ki(l,e);Qc(l,t,r,u,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new mn(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 u=Wi(this,i),d=u.on;d!==t&&(e=(t=d).copy(),e._.cancel.push(o),e._.interrupt.push(o),e._.end.push(l)),u.on=e}),n===0&&s()})}var Jx=0;function mn(t,e,r,i){this._groups=t,this._parents=e,this._name=r,this._id=i}function Xp(){return++Jx}var Zi=Uo.prototype;mn.prototype={constructor:mn,select:Bx,selectAll:Ix,selectChild:Zi.selectChild,selectChildren:Zi.selectChildren,filter:Cx,merge:Sx,selection:Rx,transition:Zx,call:Zi.call,nodes:Zi.nodes,node:Zi.node,size:Zi.size,empty:Zi.empty,each:Zi.each,on:Dx,attr:ux,attrTween:gx,style:Ux,styleTween:Hx,text:jx,textTween:Kx,remove:Nx,tween:ix,delay:bx,duration:vx,ease:wx,easeVarying:Ex,end:Qx,[Symbol.iterator]:Zi[Symbol.iterator]};function tv(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var ev={time:null,delay:0,duration:250,ease:tv};function rv(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 iv(t){var e,r;t instanceof mn?(e=t._id,t=t._name):(e=Xp(),(r=ev).time=Z1(),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,u=0;u<o;++u)(l=a[u])&&Qc(l,t,e,u,a,r||rv(l,e));return new mn(i,this._parents,t,e)}Uo.prototype.interrupt=tx;Uo.prototype.transition=iv;const Wh=Math.PI,Hh=2*Wh,ss=1e-6,nv=Hh-ss;function Kp(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}function sv(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Kp;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 av{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?Kp:sv(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,u=n-r,d=a-e,f=o-r,p=d*d+f*f;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(p>ss)if(!(Math.abs(f*l-u*d)>ss)||!s)this._append`L${this._x1=e},${this._y1=r}`;else{let g=i-a,_=n-o,k=l*l+u*u,w=g*g+_*_,S=Math.sqrt(k),A=Math.sqrt(p),O=s*Math.tan((Wh-Math.acos((k+p-w)/(2*S*A)))/2),P=O/A,W=O/S;Math.abs(P-1)>ss&&this._append`L${e+P*d},${r+P*f}`,this._append`A${s},${s},0,0,${+(f*g>d*_)},${this._x1=e+W*l},${this._y1=r+W*u}`}}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),u=e+o,d=r+l,f=1^a,p=a?n-s:s-n;this._x1===null?this._append`M${u},${d}`:(Math.abs(this._x1-u)>ss||Math.abs(this._y1-d)>ss)&&this._append`L${u},${d}`,i&&(p<0&&(p=p%Hh+Hh),p>nv?this._append`A${i},${i},0,1,${f},${e-o},${r-l}A${i},${i},0,1,${f},${this._x1=u},${this._y1=d}`:p>ss&&this._append`A${i},${i},0,${+(p>=Wh)},${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 ov(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function lv(t,e){return fetch(t,e).then(ov)}function cv(t){return(e,r)=>lv(e,r).then(i=>new DOMParser().parseFromString(i,t))}var uv=cv("image/svg+xml");function hv(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function ic(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 na(t){return t=ic(Math.abs(t)),t?t[1]:NaN}function dv(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 fv(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var pv=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function nc(t){if(!(e=pv.exec(t)))throw new Error("invalid format: "+t);var e;return new t0({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]})}nc.prototype=t0.prototype;function t0(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+""}t0.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 gv(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 Zp;function yv(t,e){var r=ic(t,e);if(!r)return t+"";var i=r[0],n=r[1],s=n-(Zp=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")+ic(t,Math.max(0,e+s-1))[0]}function $d(t,e){var r=ic(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 Xd={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:hv,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)=>$d(t*100,e),r:$d,s:yv,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Kd(t){return t}var Zd=Array.prototype.map,Qd=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function mv(t){var e=t.grouping===void 0||t.thousands===void 0?Kd:dv(Zd.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?Kd:fv(Zd.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 u(f){f=nc(f);var p=f.fill,g=f.align,_=f.sign,k=f.symbol,w=f.zero,S=f.width,A=f.comma,O=f.precision,P=f.trim,W=f.type;W==="n"?(A=!0,W="g"):Xd[W]||(O===void 0&&(O=12),P=!0,W="g"),(w||p==="0"&&g==="=")&&(w=!0,p="0",g="=");var q=k==="$"?r:k==="#"&&/[boxX]/.test(W)?"0"+W.toLowerCase():"",z=k==="$"?i:/[%p]/.test(W)?a:"",H=Xd[W],N=/[defgprs%]/.test(W);O=O===void 0?6:/[gprs]/.test(W)?Math.max(1,Math.min(21,O)):Math.max(0,Math.min(20,O));function M(C){var v=q,D=z,m,Q,b;if(W==="c")D=H(C)+D,C="";else{C=+C;var ct=C<0||1/C<0;if(C=isNaN(C)?l:H(Math.abs(C),O),P&&(C=gv(C)),ct&&+C==0&&_!=="+"&&(ct=!1),v=(ct?_==="("?_:o:_==="-"||_==="("?"":_)+v,D=(W==="s"?Qd[8+Zp/3]:"")+D+(ct&&_==="("?")":""),N){for(m=-1,Q=C.length;++m<Q;)if(b=C.charCodeAt(m),48>b||b>57){D=(b===46?n+C.slice(m+1):C.slice(m))+D,C=C.slice(0,m);break}}}A&&!w&&(C=e(C,1/0));var Dt=v.length+C.length+D.length,vt=Dt<S?new Array(S-Dt+1).join(p):"";switch(A&&w&&(C=e(vt+C,vt.length?S-D.length:1/0),vt=""),g){case"<":C=v+C+D+vt;break;case"=":C=v+vt+C+D;break;case"^":C=vt.slice(0,Dt=vt.length>>1)+v+C+D+vt.slice(Dt);break;default:C=vt+v+C+D;break}return s(C)}return M.toString=function(){return f+""},M}function d(f,p){var g=u((f=nc(f),f.type="f",f)),_=Math.max(-8,Math.min(8,Math.floor(na(p)/3)))*3,k=Math.pow(10,-_),w=Qd[8+_/3];return function(S){return g(k*S)+w}}return{format:u,formatPrefix:d}}var pl,Qp,Jp;bv({thousands:",",grouping:[3],currency:["$",""]});function bv(t){return pl=mv(t),Qp=pl.format,Jp=pl.formatPrefix,pl}function _v(t){return Math.max(0,-na(Math.abs(t)))}function xv(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(na(e)/3)))*3-na(Math.abs(t)))}function vv(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,na(e)-na(t))+1}function e0(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const Jd=Symbol("implicit");function tg(){var t=new Dd,e=[],r=[],i=Jd;function n(s){let a=t.get(s);if(a===void 0){if(i!==Jd)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 Dd;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 tg(e,r).unknown(i)},e0.apply(n,arguments),n}function kv(t){return function(){return t}}function wv(t){return+t}var tf=[0,1];function Us(t){return t}function Gh(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:kv(isNaN(e)?NaN:.5)}function Tv(t,e){var r;return t>e&&(r=t,t=e,e=r),function(i){return Math.max(t,Math.min(e,i))}}function Ev(t,e,r){var i=t[0],n=t[1],s=e[0],a=e[1];return n<i?(i=Gh(n,i),s=r(a,s)):(i=Gh(i,n),s=r(s,a)),function(o){return s(i(o))}}function Cv(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]=Gh(t[a],t[a+1]),s[a]=r(e[a],e[a+1]);return function(o){var l=bb(t,o,1,i)-1;return s[l](n[l](o))}}function eg(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Sv(){var t=tf,e=tf,r=K1,i,n,s,a=Us,o,l,u;function d(){var p=Math.min(t.length,e.length);return a!==Us&&(a=Tv(t[0],t[p-1])),o=p>2?Cv:Ev,l=u=null,f}function f(p){return p==null||isNaN(p=+p)?s:(l||(l=o(t.map(i),e,r)))(i(a(p)))}return f.invert=function(p){return a(n((u||(u=o(e,t.map(i),ci)))(p)))},f.domain=function(p){return arguments.length?(t=Array.from(p,wv),d()):t.slice()},f.range=function(p){return arguments.length?(e=Array.from(p),d()):e.slice()},f.rangeRound=function(p){return e=Array.from(p),r=Y_,d()},f.clamp=function(p){return arguments.length?(a=p?!0:Us,d()):a!==Us},f.interpolate=function(p){return arguments.length?(r=p,d()):r},f.unknown=function(p){return arguments.length?(s=p,f):s},function(p,g){return i=p,n=g,d()}}function rg(){return Sv()(Us,Us)}function Av(t,e,r,i){var n=Bh(t,e,r),s;switch(i=nc(i??",f"),i.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return i.precision==null&&!isNaN(s=xv(n,a))&&(i.precision=s),Jp(i,a)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(s=vv(n,Math.max(Math.abs(t),Math.abs(e))))&&(i.precision=s-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(s=_v(n))&&(i.precision=s-(i.type==="%")*2);break}}return Qp(i)}function Lv(t){var e=t.domain;return t.ticks=function(r){var i=e();return kb(i[0],i[i.length-1],r??10)},t.tickFormat=function(r,i){var n=e();return Av(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,u,d=10;for(o<a&&(u=a,a=o,o=u,u=n,n=s,s=u);d-- >0;){if(u=gp(a,o,r),u===l)return i[n]=a,i[s]=o,e(i);if(u>0)a=Math.floor(a/u)*u,o=Math.ceil(o/u)*u;else if(u<0)a=Math.ceil(a*u)/u,o=Math.floor(o*u)/u;else break;l=u}return t},t}function ig(){var t=rg();return t.copy=function(){return eg(t,ig())},e0.apply(t,arguments),Lv(t)}function Dv(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 Xu=new Date,Ku=new Date;function hr(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 u;do l.push(u=new Date(+s)),e(s,o),t(s);while(u<s&&s<a);return l},n.filter=s=>hr(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)=>(Xu.setTime(+s),Ku.setTime(+a),t(Xu),t(Ku),Math.floor(r(Xu,Ku))),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 sc=hr(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);sc.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?hr(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):sc);sc.range;const cn=1e3,Jr=cn*60,un=Jr*60,bn=un*24,r0=bn*7,ef=bn*30,Zu=bn*365,zs=hr(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*cn)},(t,e)=>(e-t)/cn,t=>t.getUTCSeconds());zs.range;const po=hr(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*cn)},(t,e)=>{t.setTime(+t+e*Jr)},(t,e)=>(e-t)/Jr,t=>t.getMinutes());po.range;const Mv=hr(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*Jr)},(t,e)=>(e-t)/Jr,t=>t.getUTCMinutes());Mv.range;const go=hr(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*cn-t.getMinutes()*Jr)},(t,e)=>{t.setTime(+t+e*un)},(t,e)=>(e-t)/un,t=>t.getHours());go.range;const Nv=hr(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*un)},(t,e)=>(e-t)/un,t=>t.getUTCHours());Nv.range;const ps=hr(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Jr)/bn,t=>t.getDate()-1);ps.range;const i0=hr(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/bn,t=>t.getUTCDate()-1);i0.range;const Bv=hr(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/bn,t=>Math.floor(t/bn));Bv.range;function Es(t){return hr(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())*Jr)/r0)}const sa=Es(0),ac=Es(1),Iv=Es(2),Ov=Es(3),aa=Es(4),Rv=Es(5),Fv=Es(6);sa.range;ac.range;Iv.range;Ov.range;aa.range;Rv.range;Fv.range;function Cs(t){return hr(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)/r0)}const ng=Cs(0),oc=Cs(1),Pv=Cs(2),Yv=Cs(3),oa=Cs(4),Vv=Cs(5),Uv=Cs(6);ng.range;oc.range;Pv.range;Yv.range;oa.range;Vv.range;Uv.range;const yo=hr(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());yo.range;const zv=hr(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());zv.range;const _n=hr(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());_n.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:hr(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)});_n.range;const gs=hr(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());gs.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:hr(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)});gs.range;function Wv(t,e,r,i,n,s){const a=[[zs,1,cn],[zs,5,5*cn],[zs,15,15*cn],[zs,30,30*cn],[s,1,Jr],[s,5,5*Jr],[s,15,15*Jr],[s,30,30*Jr],[n,1,un],[n,3,3*un],[n,6,6*un],[n,12,12*un],[i,1,bn],[i,2,2*bn],[r,1,r0],[e,1,ef],[e,3,3*ef],[t,1,Zu]];function o(u,d,f){const p=d<u;p&&([u,d]=[d,u]);const g=f&&typeof f.range=="function"?f:l(u,d,f),_=g?g.range(u,+d+1):[];return p?_.reverse():_}function l(u,d,f){const p=Math.abs(d-u)/f,g=G1(([,,w])=>w).right(a,p);if(g===a.length)return t.every(Bh(u/Zu,d/Zu,f));if(g===0)return sc.every(Math.max(Bh(u,d,f),1));const[_,k]=a[p/a[g-1][2]<a[g][2]/p?g-1:g];return _.every(k)}return[o,l]}const[Hv,Gv]=Wv(_n,yo,sa,ps,go,po);function Qu(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 Ju(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 Ia(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function qv(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,u=Oa(n),d=Ra(n),f=Oa(s),p=Ra(s),g=Oa(a),_=Ra(a),k=Oa(o),w=Ra(o),S=Oa(l),A=Ra(l),O={a:ct,A:Dt,b:vt,B:j,c:null,d:lf,e:lf,f:g6,g:E6,G:S6,H:d6,I:f6,j:p6,L:sg,m:y6,M:m6,p:ot,q:rt,Q:hf,s:df,S:b6,u:_6,U:x6,V:v6,w:k6,W:w6,x:null,X:null,y:T6,Y:C6,Z:A6,"%":uf},P={a:it,A:ut,b:bt,B:K,c:null,d:cf,e:cf,f:N6,g:z6,G:H6,H:L6,I:D6,j:M6,L:og,m:B6,M:I6,p:Ot,q:Y,Q:hf,s:df,S:O6,u:R6,U:F6,V:P6,w:Y6,W:V6,x:null,X:null,y:U6,Y:W6,Z:G6,"%":uf},W={a:M,A:C,b:v,B:D,c:m,d:af,e:af,f:l6,g:sf,G:nf,H:of,I:of,j:n6,L:o6,m:i6,M:s6,p:N,q:r6,Q:u6,s:h6,S:a6,u:Zv,U:Qv,V:Jv,w:Kv,W:t6,x:Q,X:b,y:sf,Y:nf,Z:e6,"%":c6};O.x=q(r,O),O.X=q(i,O),O.c=q(e,O),P.x=q(r,P),P.X=q(i,P),P.c=q(e,P);function q(U,X){return function(F){var I=[],L=-1,J=0,T=U.length,ht,V,Yt;for(F instanceof Date||(F=new Date(+F));++L<T;)U.charCodeAt(L)===37&&(I.push(U.slice(J,L)),(V=rf[ht=U.charAt(++L)])!=null?ht=U.charAt(++L):V=ht==="e"?" ":"0",(Yt=X[ht])&&(ht=Yt(F,V)),I.push(ht),J=L+1);return I.push(U.slice(J,L)),I.join("")}}function z(U,X){return function(F){var I=Ia(1900,void 0,1),L=H(I,U,F+="",0),J,T;if(L!=F.length)return null;if("Q"in I)return new Date(I.Q);if("s"in I)return new Date(I.s*1e3+("L"in I?I.L:0));if(X&&!("Z"in I)&&(I.Z=0),"p"in I&&(I.H=I.H%12+I.p*12),I.m===void 0&&(I.m="q"in I?I.q:0),"V"in I){if(I.V<1||I.V>53)return null;"w"in I||(I.w=1),"Z"in I?(J=Ju(Ia(I.y,0,1)),T=J.getUTCDay(),J=T>4||T===0?oc.ceil(J):oc(J),J=i0.offset(J,(I.V-1)*7),I.y=J.getUTCFullYear(),I.m=J.getUTCMonth(),I.d=J.getUTCDate()+(I.w+6)%7):(J=Qu(Ia(I.y,0,1)),T=J.getDay(),J=T>4||T===0?ac.ceil(J):ac(J),J=ps.offset(J,(I.V-1)*7),I.y=J.getFullYear(),I.m=J.getMonth(),I.d=J.getDate()+(I.w+6)%7)}else("W"in I||"U"in I)&&("w"in I||(I.w="u"in I?I.u%7:"W"in I?1:0),T="Z"in I?Ju(Ia(I.y,0,1)).getUTCDay():Qu(Ia(I.y,0,1)).getDay(),I.m=0,I.d="W"in I?(I.w+6)%7+I.W*7-(T+5)%7:I.w+I.U*7-(T+6)%7);return"Z"in I?(I.H+=I.Z/100|0,I.M+=I.Z%100,Ju(I)):Qu(I)}}function H(U,X,F,I){for(var L=0,J=X.length,T=F.length,ht,V;L<J;){if(I>=T)return-1;if(ht=X.charCodeAt(L++),ht===37){if(ht=X.charAt(L++),V=W[ht in rf?X.charAt(L++):ht],!V||(I=V(U,F,I))<0)return-1}else if(ht!=F.charCodeAt(I++))return-1}return I}function N(U,X,F){var I=u.exec(X.slice(F));return I?(U.p=d.get(I[0].toLowerCase()),F+I[0].length):-1}function M(U,X,F){var I=g.exec(X.slice(F));return I?(U.w=_.get(I[0].toLowerCase()),F+I[0].length):-1}function C(U,X,F){var I=f.exec(X.slice(F));return I?(U.w=p.get(I[0].toLowerCase()),F+I[0].length):-1}function v(U,X,F){var I=S.exec(X.slice(F));return I?(U.m=A.get(I[0].toLowerCase()),F+I[0].length):-1}function D(U,X,F){var I=k.exec(X.slice(F));return I?(U.m=w.get(I[0].toLowerCase()),F+I[0].length):-1}function m(U,X,F){return H(U,e,X,F)}function Q(U,X,F){return H(U,r,X,F)}function b(U,X,F){return H(U,i,X,F)}function ct(U){return a[U.getDay()]}function Dt(U){return s[U.getDay()]}function vt(U){return l[U.getMonth()]}function j(U){return o[U.getMonth()]}function ot(U){return n[+(U.getHours()>=12)]}function rt(U){return 1+~~(U.getMonth()/3)}function it(U){return a[U.getUTCDay()]}function ut(U){return s[U.getUTCDay()]}function bt(U){return l[U.getUTCMonth()]}function K(U){return o[U.getUTCMonth()]}function Ot(U){return n[+(U.getUTCHours()>=12)]}function Y(U){return 1+~~(U.getUTCMonth()/3)}return{format:function(U){var X=q(U+="",O);return X.toString=function(){return U},X},parse:function(U){var X=z(U+="",!1);return X.toString=function(){return U},X},utcFormat:function(U){var X=q(U+="",P);return X.toString=function(){return U},X},utcParse:function(U){var X=z(U+="",!0);return X.toString=function(){return U},X}}}var rf={"-":"",_:" ",0:"0"},yr=/^\s*\d+/,jv=/^%/,$v=/[\\^$*+?|[\]().{}]/g;function Ae(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 Xv(t){return t.replace($v,"\\$&")}function Oa(t){return new RegExp("^(?:"+t.map(Xv).join("|")+")","i")}function Ra(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}function Kv(t,e,r){var i=yr.exec(e.slice(r,r+1));return i?(t.w=+i[0],r+i[0].length):-1}function Zv(t,e,r){var i=yr.exec(e.slice(r,r+1));return i?(t.u=+i[0],r+i[0].length):-1}function Qv(t,e,r){var i=yr.exec(e.slice(r,r+2));return i?(t.U=+i[0],r+i[0].length):-1}function Jv(t,e,r){var i=yr.exec(e.slice(r,r+2));return i?(t.V=+i[0],r+i[0].length):-1}function t6(t,e,r){var i=yr.exec(e.slice(r,r+2));return i?(t.W=+i[0],r+i[0].length):-1}function nf(t,e,r){var i=yr.exec(e.slice(r,r+4));return i?(t.y=+i[0],r+i[0].length):-1}function sf(t,e,r){var i=yr.exec(e.slice(r,r+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function e6(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 r6(t,e,r){var i=yr.exec(e.slice(r,r+1));return i?(t.q=i[0]*3-3,r+i[0].length):-1}function i6(t,e,r){var i=yr.exec(e.slice(r,r+2));return i?(t.m=i[0]-1,r+i[0].length):-1}function af(t,e,r){var i=yr.exec(e.slice(r,r+2));return i?(t.d=+i[0],r+i[0].length):-1}function n6(t,e,r){var i=yr.exec(e.slice(r,r+3));return i?(t.m=0,t.d=+i[0],r+i[0].length):-1}function of(t,e,r){var i=yr.exec(e.slice(r,r+2));return i?(t.H=+i[0],r+i[0].length):-1}function s6(t,e,r){var i=yr.exec(e.slice(r,r+2));return i?(t.M=+i[0],r+i[0].length):-1}function a6(t,e,r){var i=yr.exec(e.slice(r,r+2));return i?(t.S=+i[0],r+i[0].length):-1}function o6(t,e,r){var i=yr.exec(e.slice(r,r+3));return i?(t.L=+i[0],r+i[0].length):-1}function l6(t,e,r){var i=yr.exec(e.slice(r,r+6));return i?(t.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function c6(t,e,r){var i=jv.exec(e.slice(r,r+1));return i?r+i[0].length:-1}function u6(t,e,r){var i=yr.exec(e.slice(r));return i?(t.Q=+i[0],r+i[0].length):-1}function h6(t,e,r){var i=yr.exec(e.slice(r));return i?(t.s=+i[0],r+i[0].length):-1}function lf(t,e){return Ae(t.getDate(),e,2)}function d6(t,e){return Ae(t.getHours(),e,2)}function f6(t,e){return Ae(t.getHours()%12||12,e,2)}function p6(t,e){return Ae(1+ps.count(_n(t),t),e,3)}function sg(t,e){return Ae(t.getMilliseconds(),e,3)}function g6(t,e){return sg(t,e)+"000"}function y6(t,e){return Ae(t.getMonth()+1,e,2)}function m6(t,e){return Ae(t.getMinutes(),e,2)}function b6(t,e){return Ae(t.getSeconds(),e,2)}function _6(t){var e=t.getDay();return e===0?7:e}function x6(t,e){return Ae(sa.count(_n(t)-1,t),e,2)}function ag(t){var e=t.getDay();return e>=4||e===0?aa(t):aa.ceil(t)}function v6(t,e){return t=ag(t),Ae(aa.count(_n(t),t)+(_n(t).getDay()===4),e,2)}function k6(t){return t.getDay()}function w6(t,e){return Ae(ac.count(_n(t)-1,t),e,2)}function T6(t,e){return Ae(t.getFullYear()%100,e,2)}function E6(t,e){return t=ag(t),Ae(t.getFullYear()%100,e,2)}function C6(t,e){return Ae(t.getFullYear()%1e4,e,4)}function S6(t,e){var r=t.getDay();return t=r>=4||r===0?aa(t):aa.ceil(t),Ae(t.getFullYear()%1e4,e,4)}function A6(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Ae(e/60|0,"0",2)+Ae(e%60,"0",2)}function cf(t,e){return Ae(t.getUTCDate(),e,2)}function L6(t,e){return Ae(t.getUTCHours(),e,2)}function D6(t,e){return Ae(t.getUTCHours()%12||12,e,2)}function M6(t,e){return Ae(1+i0.count(gs(t),t),e,3)}function og(t,e){return Ae(t.getUTCMilliseconds(),e,3)}function N6(t,e){return og(t,e)+"000"}function B6(t,e){return Ae(t.getUTCMonth()+1,e,2)}function I6(t,e){return Ae(t.getUTCMinutes(),e,2)}function O6(t,e){return Ae(t.getUTCSeconds(),e,2)}function R6(t){var e=t.getUTCDay();return e===0?7:e}function F6(t,e){return Ae(ng.count(gs(t)-1,t),e,2)}function lg(t){var e=t.getUTCDay();return e>=4||e===0?oa(t):oa.ceil(t)}function P6(t,e){return t=lg(t),Ae(oa.count(gs(t),t)+(gs(t).getUTCDay()===4),e,2)}function Y6(t){return t.getUTCDay()}function V6(t,e){return Ae(oc.count(gs(t)-1,t),e,2)}function U6(t,e){return Ae(t.getUTCFullYear()%100,e,2)}function z6(t,e){return t=lg(t),Ae(t.getUTCFullYear()%100,e,2)}function W6(t,e){return Ae(t.getUTCFullYear()%1e4,e,4)}function H6(t,e){var r=t.getUTCDay();return t=r>=4||r===0?oa(t):oa.ceil(t),Ae(t.getUTCFullYear()%1e4,e,4)}function G6(){return"+0000"}function uf(){return"%"}function hf(t){return+t}function df(t){return Math.floor(+t/1e3)}var Fs,lc;q6({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 q6(t){return Fs=qv(t),lc=Fs.format,Fs.parse,Fs.utcFormat,Fs.utcParse,Fs}function j6(t){return new Date(t)}function $6(t){return t instanceof Date?+t:+new Date(+t)}function cg(t,e,r,i,n,s,a,o,l,u){var d=rg(),f=d.invert,p=d.domain,g=u(".%L"),_=u(":%S"),k=u("%I:%M"),w=u("%I %p"),S=u("%a %d"),A=u("%b %d"),O=u("%B"),P=u("%Y");function W(q){return(l(q)<q?g:o(q)<q?_:a(q)<q?k:s(q)<q?w:i(q)<q?n(q)<q?S:A:r(q)<q?O:P)(q)}return d.invert=function(q){return new Date(f(q))},d.domain=function(q){return arguments.length?p(Array.from(q,$6)):p().map(j6)},d.ticks=function(q){var z=p();return t(z[0],z[z.length-1],q??10)},d.tickFormat=function(q,z){return z==null?W:u(z)},d.nice=function(q){var z=p();return(!q||typeof q.range!="function")&&(q=e(z[0],z[z.length-1],q??10)),q?p(Dv(z,q)):d},d.copy=function(){return eg(d,cg(t,e,r,i,n,s,a,o,l,u))},d}function X6(){return e0.apply(cg(Hv,Gv,_n,yo,sa,ps,go,po,zs,lc).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Ke(t){return function(){return t}}const ff=Math.abs,xr=Math.atan2,es=Math.cos,K6=Math.max,th=Math.min,Mi=Math.sin,Ws=Math.sqrt,Or=1e-12,mo=Math.PI,cc=mo/2,Nl=2*mo;function Z6(t){return t>1?0:t<-1?mo:Math.acos(t)}function pf(t){return t>=1?cc:t<=-1?-cc:Math.asin(t)}function ug(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 av(e)}function Q6(t){return t.innerRadius}function J6(t){return t.outerRadius}function tk(t){return t.startAngle}function ek(t){return t.endAngle}function rk(t){return t&&t.padAngle}function ik(t,e,r,i,n,s,a,o){var l=r-t,u=i-e,d=a-n,f=o-s,p=f*l-d*u;if(!(p*p<Or))return p=(d*(e-s)-f*(t-n))/p,[t+p*l,e+p*u]}function gl(t,e,r,i,n,s,a){var o=t-r,l=e-i,u=(a?s:-s)/Ws(o*o+l*l),d=u*l,f=-u*o,p=t+d,g=e+f,_=r+d,k=i+f,w=(p+_)/2,S=(g+k)/2,A=_-p,O=k-g,P=A*A+O*O,W=n-s,q=p*k-_*g,z=(O<0?-1:1)*Ws(K6(0,W*W*P-q*q)),H=(q*O-A*z)/P,N=(-q*A-O*z)/P,M=(q*O+A*z)/P,C=(-q*A+O*z)/P,v=H-w,D=N-S,m=M-w,Q=C-S;return v*v+D*D>m*m+Q*Q&&(H=M,N=C),{cx:H,cy:N,x01:-d,y01:-f,x11:H*(n/W-1),y11:N*(n/W-1)}}function qh(){var t=Q6,e=J6,r=Ke(0),i=null,n=tk,s=ek,a=rk,o=null,l=ug(u);function u(){var d,f,p=+t.apply(this,arguments),g=+e.apply(this,arguments),_=n.apply(this,arguments)-cc,k=s.apply(this,arguments)-cc,w=ff(k-_),S=k>_;if(o||(o=d=l()),g<p&&(f=g,g=p,p=f),!(g>Or))o.moveTo(0,0);else if(w>Nl-Or)o.moveTo(g*es(_),g*Mi(_)),o.arc(0,0,g,_,k,!S),p>Or&&(o.moveTo(p*es(k),p*Mi(k)),o.arc(0,0,p,k,_,S));else{var A=_,O=k,P=_,W=k,q=w,z=w,H=a.apply(this,arguments)/2,N=H>Or&&(i?+i.apply(this,arguments):Ws(p*p+g*g)),M=th(ff(g-p)/2,+r.apply(this,arguments)),C=M,v=M,D,m;if(N>Or){var Q=pf(N/p*Mi(H)),b=pf(N/g*Mi(H));(q-=Q*2)>Or?(Q*=S?1:-1,P+=Q,W-=Q):(q=0,P=W=(_+k)/2),(z-=b*2)>Or?(b*=S?1:-1,A+=b,O-=b):(z=0,A=O=(_+k)/2)}var ct=g*es(A),Dt=g*Mi(A),vt=p*es(W),j=p*Mi(W);if(M>Or){var ot=g*es(O),rt=g*Mi(O),it=p*es(P),ut=p*Mi(P),bt;if(w<mo)if(bt=ik(ct,Dt,it,ut,ot,rt,vt,j)){var K=ct-bt[0],Ot=Dt-bt[1],Y=ot-bt[0],U=rt-bt[1],X=1/Mi(Z6((K*Y+Ot*U)/(Ws(K*K+Ot*Ot)*Ws(Y*Y+U*U)))/2),F=Ws(bt[0]*bt[0]+bt[1]*bt[1]);C=th(M,(p-F)/(X-1)),v=th(M,(g-F)/(X+1))}else C=v=0}z>Or?v>Or?(D=gl(it,ut,ct,Dt,g,v,S),m=gl(ot,rt,vt,j,g,v,S),o.moveTo(D.cx+D.x01,D.cy+D.y01),v<M?o.arc(D.cx,D.cy,v,xr(D.y01,D.x01),xr(m.y01,m.x01),!S):(o.arc(D.cx,D.cy,v,xr(D.y01,D.x01),xr(D.y11,D.x11),!S),o.arc(0,0,g,xr(D.cy+D.y11,D.cx+D.x11),xr(m.cy+m.y11,m.cx+m.x11),!S),o.arc(m.cx,m.cy,v,xr(m.y11,m.x11),xr(m.y01,m.x01),!S))):(o.moveTo(ct,Dt),o.arc(0,0,g,A,O,!S)):o.moveTo(ct,Dt),!(p>Or)||!(q>Or)?o.lineTo(vt,j):C>Or?(D=gl(vt,j,ot,rt,p,-C,S),m=gl(ct,Dt,it,ut,p,-C,S),o.lineTo(D.cx+D.x01,D.cy+D.y01),C<M?o.arc(D.cx,D.cy,C,xr(D.y01,D.x01),xr(m.y01,m.x01),!S):(o.arc(D.cx,D.cy,C,xr(D.y01,D.x01),xr(D.y11,D.x11),!S),o.arc(0,0,p,xr(D.cy+D.y11,D.cx+D.x11),xr(m.cy+m.y11,m.cx+m.x11),S),o.arc(m.cx,m.cy,C,xr(m.y11,m.x11),xr(m.y01,m.x01),!S))):o.arc(0,0,p,W,P,S)}if(o.closePath(),d)return o=null,d+""||null}return u.centroid=function(){var d=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,f=(+n.apply(this,arguments)+ +s.apply(this,arguments))/2-mo/2;return[es(f)*d,Mi(f)*d]},u.innerRadius=function(d){return arguments.length?(t=typeof d=="function"?d:Ke(+d),u):t},u.outerRadius=function(d){return arguments.length?(e=typeof d=="function"?d:Ke(+d),u):e},u.cornerRadius=function(d){return arguments.length?(r=typeof d=="function"?d:Ke(+d),u):r},u.padRadius=function(d){return arguments.length?(i=d==null?null:typeof d=="function"?d:Ke(+d),u):i},u.startAngle=function(d){return arguments.length?(n=typeof d=="function"?d:Ke(+d),u):n},u.endAngle=function(d){return arguments.length?(s=typeof d=="function"?d:Ke(+d),u):s},u.padAngle=function(d){return arguments.length?(a=typeof d=="function"?d:Ke(+d),u):a},u.context=function(d){return arguments.length?(o=d??null,u):o},u}function hg(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function dg(t){this._context=t}dg.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 jr(t){return new dg(t)}function nk(t){return t[0]}function sk(t){return t[1]}function Ta(t,e){var r=Ke(!0),i=null,n=jr,s=null,a=ug(o);t=typeof t=="function"?t:t===void 0?nk:Ke(t),e=typeof e=="function"?e:e===void 0?sk:Ke(e);function o(l){var u,d=(l=hg(l)).length,f,p=!1,g;for(i==null&&(s=n(g=a())),u=0;u<=d;++u)!(u<d&&r(f=l[u],u,l))===p&&((p=!p)?s.lineStart():s.lineEnd()),p&&s.point(+t(f,u,l),+e(f,u,l));if(g)return s=null,g+""||null}return o.x=function(l){return arguments.length?(t=typeof l=="function"?l:Ke(+l),o):t},o.y=function(l){return arguments.length?(e=typeof l=="function"?l:Ke(+l),o):e},o.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Ke(!!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 ak(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function ok(t){return t}function lk(){var t=ok,e=ak,r=null,i=Ke(0),n=Ke(Nl),s=Ke(0);function a(o){var l,u=(o=hg(o)).length,d,f,p=0,g=new Array(u),_=new Array(u),k=+i.apply(this,arguments),w=Math.min(Nl,Math.max(-Nl,n.apply(this,arguments)-k)),S,A=Math.min(Math.abs(w)/u,s.apply(this,arguments)),O=A*(w<0?-1:1),P;for(l=0;l<u;++l)(P=_[g[l]=l]=+t(o[l],l,o))>0&&(p+=P);for(e!=null?g.sort(function(W,q){return e(_[W],_[q])}):r!=null&&g.sort(function(W,q){return r(o[W],o[q])}),l=0,f=p?(w-u*O)/p:0;l<u;++l,k=S)d=g[l],P=_[d],S=k+(P>0?P*f:0)+O,_[d]={data:o[d],index:l,value:P,startAngle:k,endAngle:S,padAngle:A};return _}return a.value=function(o){return arguments.length?(t=typeof o=="function"?o:Ke(+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:Ke(+o),a):i},a.endAngle=function(o){return arguments.length?(n=typeof o=="function"?o:Ke(+o),a):n},a.padAngle=function(o){return arguments.length?(s=typeof o=="function"?o:Ke(+o),a):s},a}function uc(){}function hc(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 fg(t){this._context=t}fg.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:hc(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:hc(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function la(t){return new fg(t)}function pg(t){this._context=t}pg.prototype={areaStart:uc,areaEnd:uc,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:hc(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function ck(t){return new pg(t)}function gg(t){this._context=t}gg.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:hc(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function uk(t){return new gg(t)}function yg(t){this._context=t}yg.prototype={areaStart:uc,areaEnd:uc,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 hk(t){return new yg(t)}function gf(t){return t<0?-1:1}function yf(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(gf(s)+gf(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(o))||0}function mf(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function eh(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 dc(t){this._context=t}dc.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:eh(this,this._t0,mf(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,eh(this,mf(this,r=yf(this,t,e)),r);break;default:eh(this,this._t0,r=yf(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function mg(t){this._context=new bg(t)}(mg.prototype=Object.create(dc.prototype)).point=function(t,e){dc.prototype.point.call(this,e,t)};function bg(t){this._context=t}bg.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 dk(t){return new dc(t)}function fk(t){return new mg(t)}function _g(t){this._context=t}_g.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=bf(t),n=bf(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 bf(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 pk(t){return new _g(t)}function Jc(t,e){this._context=t,this._t=e}Jc.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 gk(t){return new Jc(t,.5)}function yk(t){return new Jc(t,0)}function mk(t){return new Jc(t,1)}function ja(t,e,r){this.k=t,this.x=e,this.y=r}ja.prototype={constructor:ja,scale:function(t){return t===1?this:new ja(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new ja(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+")"}};ja.prototype;/*! @license DOMPurify 2.4.1 | (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.1/LICENSE */function Rn(t){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 jh(t,e){return jh=Object.setPrototypeOf||function(i,n){return i.__proto__=n,i},jh(t,e)}function bk(){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 Bl(t,e,r){return bk()?Bl=Reflect.construct:Bl=function(n,s,a){var o=[null];o.push.apply(o,s);var l=Function.bind.apply(n,o),u=new l;return a&&jh(u,a.prototype),u},Bl.apply(null,arguments)}function li(t){return _k(t)||xk(t)||vk(t)||kk()}function _k(t){if(Array.isArray(t))return $h(t)}function xk(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function vk(t,e){if(t){if(typeof t=="string")return $h(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 $h(t,e)}}function $h(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 kk(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
5
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var wk=Object.hasOwnProperty,_f=Object.setPrototypeOf,Tk=Object.isFrozen,Ek=Object.getPrototypeOf,Ck=Object.getOwnPropertyDescriptor,Br=Object.freeze,bi=Object.seal,Sk=Object.create,xg=typeof Reflect<"u"&&Reflect,fc=xg.apply,Xh=xg.construct;fc||(fc=function(e,r,i){return e.apply(r,i)});Br||(Br=function(e){return e});bi||(bi=function(e){return e});Xh||(Xh=function(e,r){return Bl(e,li(r))});var Ak=ti(Array.prototype.forEach),xf=ti(Array.prototype.pop),Fa=ti(Array.prototype.push),Il=ti(String.prototype.toLowerCase),rh=ti(String.prototype.toString),Lk=ti(String.prototype.match),oi=ti(String.prototype.replace),Dk=ti(String.prototype.indexOf),Mk=ti(String.prototype.trim),Sr=ti(RegExp.prototype.test),ih=Nk(TypeError);function ti(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 fc(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 Xh(t,r)}}function we(t,e,r){r=r||Il,_f&&_f(t,null);for(var i=e.length;i--;){var n=e[i];if(typeof n=="string"){var s=r(n);s!==n&&(Tk(e)||(e[i]=s),n=s)}t[n]=!0}return t}function rs(t){var e=Sk(null),r;for(r in t)fc(wk,t,[r])&&(e[r]=t[r]);return e}function yl(t,e){for(;t!==null;){var r=Ck(t,e);if(r){if(r.get)return ti(r.get);if(typeof r.value=="function")return ti(r.value)}t=Ek(t)}function i(n){return console.warn("fallback value for",n),null}return i}var vf=Br(["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"]),nh=Br(["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"]),sh=Br(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Bk=Br(["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"]),ah=Br(["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"]),Ik=Br(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),kf=Br(["#text"]),wf=Br(["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"]),oh=Br(["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"]),Tf=Br(["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"]),ml=Br(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ok=bi(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Rk=bi(/<%[\w\W]*|[\w\W]*%>/gm),Fk=bi(/\${[\w\W]*}/gm),Pk=bi(/^data-[\-\w.\u00B7-\uFFFF]/),Yk=bi(/^aria-[\-\w]+$/),Vk=bi(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Uk=bi(/^(?:\w+script|data):/i),zk=bi(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Wk=bi(/^html$/i),Hk=function(){return typeof window>"u"?null:window},Gk=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 vg(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Hk(),e=function(Z){return vg(Z)};if(e.version="2.4.1",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,u=t.NamedNodeMap,d=u===void 0?t.NamedNodeMap||t.MozNamedAttrMap:u,f=t.HTMLFormElement,p=t.DOMParser,g=t.trustedTypes,_=o.prototype,k=yl(_,"cloneNode"),w=yl(_,"nextSibling"),S=yl(_,"childNodes"),A=yl(_,"parentNode");if(typeof s=="function"){var O=i.createElement("template");O.content&&O.content.ownerDocument&&(i=O.content.ownerDocument)}var P=Gk(g,r),W=P?P.createHTML(""):"",q=i,z=q.implementation,H=q.createNodeIterator,N=q.createDocumentFragment,M=q.getElementsByTagName,C=r.importNode,v={};try{v=rs(i).documentMode?i.documentMode:{}}catch{}var D={};e.isSupported=typeof A=="function"&&z&&typeof z.createHTMLDocument<"u"&&v!==9;var m=Ok,Q=Rk,b=Fk,ct=Pk,Dt=Yk,vt=Uk,j=zk,ot=Vk,rt=null,it=we({},[].concat(li(vf),li(nh),li(sh),li(ah),li(kf))),ut=null,bt=we({},[].concat(li(wf),li(oh),li(Tf),li(ml))),K=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}})),Ot=null,Y=null,U=!0,X=!0,F=!1,I=!1,L=!1,J=!1,T=!1,ht=!1,V=!1,Yt=!1,et=!0,Mt=!1,Tt="user-content-",gt=!0,Et=!1,wt={},pt=null,st=we({},["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"]),le=null,Xt=we({},["audio","video","img","source","image","track"]),jt=null,Kt=we({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Gt="http://www.w3.org/1998/Math/MathML",Ee="http://www.w3.org/2000/svg",Ht="http://www.w3.org/1999/xhtml",Vt=Ht,Ft=!1,xt=null,ft=we({},[Gt,Ee,Ht],rh),Lt,_t=["application/xhtml+xml","text/html"],Ut="text/html",at,ie=null,dt=i.createElement("form"),ee=function(Z){return Z instanceof RegExp||Z instanceof Function},de=function(Z){ie&&ie===Z||((!Z||Rn(Z)!=="object")&&(Z={}),Z=rs(Z),Lt=_t.indexOf(Z.PARSER_MEDIA_TYPE)===-1?Lt=Ut:Lt=Z.PARSER_MEDIA_TYPE,at=Lt==="application/xhtml+xml"?rh:Il,rt="ALLOWED_TAGS"in Z?we({},Z.ALLOWED_TAGS,at):it,ut="ALLOWED_ATTR"in Z?we({},Z.ALLOWED_ATTR,at):bt,xt="ALLOWED_NAMESPACES"in Z?we({},Z.ALLOWED_NAMESPACES,rh):ft,jt="ADD_URI_SAFE_ATTR"in Z?we(rs(Kt),Z.ADD_URI_SAFE_ATTR,at):Kt,le="ADD_DATA_URI_TAGS"in Z?we(rs(Xt),Z.ADD_DATA_URI_TAGS,at):Xt,pt="FORBID_CONTENTS"in Z?we({},Z.FORBID_CONTENTS,at):st,Ot="FORBID_TAGS"in Z?we({},Z.FORBID_TAGS,at):{},Y="FORBID_ATTR"in Z?we({},Z.FORBID_ATTR,at):{},wt="USE_PROFILES"in Z?Z.USE_PROFILES:!1,U=Z.ALLOW_ARIA_ATTR!==!1,X=Z.ALLOW_DATA_ATTR!==!1,F=Z.ALLOW_UNKNOWN_PROTOCOLS||!1,I=Z.SAFE_FOR_TEMPLATES||!1,L=Z.WHOLE_DOCUMENT||!1,ht=Z.RETURN_DOM||!1,V=Z.RETURN_DOM_FRAGMENT||!1,Yt=Z.RETURN_TRUSTED_TYPE||!1,T=Z.FORCE_BODY||!1,et=Z.SANITIZE_DOM!==!1,Mt=Z.SANITIZE_NAMED_PROPS||!1,gt=Z.KEEP_CONTENT!==!1,Et=Z.IN_PLACE||!1,ot=Z.ALLOWED_URI_REGEXP||ot,Vt=Z.NAMESPACE||Ht,Z.CUSTOM_ELEMENT_HANDLING&&ee(Z.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(K.tagNameCheck=Z.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Z.CUSTOM_ELEMENT_HANDLING&&ee(Z.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(K.attributeNameCheck=Z.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Z.CUSTOM_ELEMENT_HANDLING&&typeof Z.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(K.allowCustomizedBuiltInElements=Z.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),I&&(X=!1),V&&(ht=!0),wt&&(rt=we({},li(kf)),ut=[],wt.html===!0&&(we(rt,vf),we(ut,wf)),wt.svg===!0&&(we(rt,nh),we(ut,oh),we(ut,ml)),wt.svgFilters===!0&&(we(rt,sh),we(ut,oh),we(ut,ml)),wt.mathMl===!0&&(we(rt,ah),we(ut,Tf),we(ut,ml))),Z.ADD_TAGS&&(rt===it&&(rt=rs(rt)),we(rt,Z.ADD_TAGS,at)),Z.ADD_ATTR&&(ut===bt&&(ut=rs(ut)),we(ut,Z.ADD_ATTR,at)),Z.ADD_URI_SAFE_ATTR&&we(jt,Z.ADD_URI_SAFE_ATTR,at),Z.FORBID_CONTENTS&&(pt===st&&(pt=rs(pt)),we(pt,Z.FORBID_CONTENTS,at)),gt&&(rt["#text"]=!0),L&&we(rt,["html","head","body"]),rt.table&&(we(rt,["tbody"]),delete Ot.tbody),Br&&Br(Z),ie=Z)},me=we({},["mi","mo","mn","ms","mtext"]),be=we({},["foreignobject","desc","title","annotation-xml"]),ke=we({},["title","style","font","a","script"]),$t=we({},nh);we($t,sh),we($t,Bk);var ne=we({},ah);we(ne,Ik);var ge=function(Z){var St=A(Z);(!St||!St.tagName)&&(St={namespaceURI:Vt,tagName:"template"});var Nt=Il(Z.tagName),fe=Il(St.tagName);return xt[Z.namespaceURI]?Z.namespaceURI===Ee?St.namespaceURI===Ht?Nt==="svg":St.namespaceURI===Gt?Nt==="svg"&&(fe==="annotation-xml"||me[fe]):!!$t[Nt]:Z.namespaceURI===Gt?St.namespaceURI===Ht?Nt==="math":St.namespaceURI===Ee?Nt==="math"&&be[fe]:!!ne[Nt]:Z.namespaceURI===Ht?St.namespaceURI===Ee&&!be[fe]||St.namespaceURI===Gt&&!me[fe]?!1:!ne[Nt]&&(ke[Nt]||!$t[Nt]):!!(Lt==="application/xhtml+xml"&&xt[Z.namespaceURI]):!1},Qt=function(Z){Fa(e.removed,{element:Z});try{Z.parentNode.removeChild(Z)}catch{try{Z.outerHTML=W}catch{Z.remove()}}},ii=function(Z,St){try{Fa(e.removed,{attribute:St.getAttributeNode(Z),from:St})}catch{Fa(e.removed,{attribute:null,from:St})}if(St.removeAttribute(Z),Z==="is"&&!ut[Z])if(ht||V)try{Qt(St)}catch{}else try{St.setAttribute(Z,"")}catch{}},Ur=function(Z){var St,Nt;if(T)Z="<remove></remove>"+Z;else{var fe=Lk(Z,/^[\r\n\t ]+/);Nt=fe&&fe[0]}Lt==="application/xhtml+xml"&&Vt===Ht&&(Z='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Z+"</body></html>");var Me=P?P.createHTML(Z):Z;if(Vt===Ht)try{St=new p().parseFromString(Me,Lt)}catch{}if(!St||!St.documentElement){St=z.createDocument(Vt,"template",null);try{St.documentElement.innerHTML=Ft?"":Me}catch{}}var Le=St.body||St.documentElement;return Z&&Nt&&Le.insertBefore(i.createTextNode(Nt),Le.childNodes[0]||null),Vt===Ht?M.call(St,L?"html":"body")[0]:L?St.documentElement:Le},De=function(Z){return H.call(Z.ownerDocument||Z,Z,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},ae=function(Z){return Z instanceof f&&(typeof Z.nodeName!="string"||typeof Z.textContent!="string"||typeof Z.removeChild!="function"||!(Z.attributes instanceof d)||typeof Z.removeAttribute!="function"||typeof Z.setAttribute!="function"||typeof Z.namespaceURI!="string"||typeof Z.insertBefore!="function"||typeof Z.hasChildNodes!="function")},Be=function(Z){return Rn(a)==="object"?Z instanceof a:Z&&Rn(Z)==="object"&&typeof Z.nodeType=="number"&&typeof Z.nodeName=="string"},Oe=function(Z,St,Nt){D[Z]&&Ak(D[Z],function(fe){fe.call(e,St,Nt,ie)})},Fe=function(Z){var St;if(Oe("beforeSanitizeElements",Z,null),ae(Z)||Sr(/[\u0080-\uFFFF]/,Z.nodeName))return Qt(Z),!0;var Nt=at(Z.nodeName);if(Oe("uponSanitizeElement",Z,{tagName:Nt,allowedTags:rt}),Z.hasChildNodes()&&!Be(Z.firstElementChild)&&(!Be(Z.content)||!Be(Z.content.firstElementChild))&&Sr(/<[/\w]/g,Z.innerHTML)&&Sr(/<[/\w]/g,Z.textContent)||Nt==="select"&&Sr(/<template/i,Z.innerHTML))return Qt(Z),!0;if(!rt[Nt]||Ot[Nt]){if(!Ot[Nt]&&Ie(Nt)&&(K.tagNameCheck instanceof RegExp&&Sr(K.tagNameCheck,Nt)||K.tagNameCheck instanceof Function&&K.tagNameCheck(Nt)))return!1;if(gt&&!pt[Nt]){var fe=A(Z)||Z.parentNode,Me=S(Z)||Z.childNodes;if(Me&&fe)for(var Le=Me.length,We=Le-1;We>=0;--We)fe.insertBefore(k(Me[We],!0),w(Z))}return Qt(Z),!0}return Z instanceof o&&!ge(Z)||(Nt==="noscript"||Nt==="noembed")&&Sr(/<\/no(script|embed)/i,Z.innerHTML)?(Qt(Z),!0):(I&&Z.nodeType===3&&(St=Z.textContent,St=oi(St,m," "),St=oi(St,Q," "),St=oi(St,b," "),Z.textContent!==St&&(Fa(e.removed,{element:Z.cloneNode()}),Z.textContent=St)),Oe("afterSanitizeElements",Z,null),!1)},Pe=function(Z,St,Nt){if(et&&(St==="id"||St==="name")&&(Nt in i||Nt in dt))return!1;if(!(X&&!Y[St]&&Sr(ct,St))){if(!(U&&Sr(Dt,St))){if(!ut[St]||Y[St]){if(!(Ie(Z)&&(K.tagNameCheck instanceof RegExp&&Sr(K.tagNameCheck,Z)||K.tagNameCheck instanceof Function&&K.tagNameCheck(Z))&&(K.attributeNameCheck instanceof RegExp&&Sr(K.attributeNameCheck,St)||K.attributeNameCheck instanceof Function&&K.attributeNameCheck(St))||St==="is"&&K.allowCustomizedBuiltInElements&&(K.tagNameCheck instanceof RegExp&&Sr(K.tagNameCheck,Nt)||K.tagNameCheck instanceof Function&&K.tagNameCheck(Nt))))return!1}else if(!jt[St]){if(!Sr(ot,oi(Nt,j,""))){if(!((St==="src"||St==="xlink:href"||St==="href")&&Z!=="script"&&Dk(Nt,"data:")===0&&le[Z])){if(!(F&&!Sr(vt,oi(Nt,j,"")))){if(Nt)return!1}}}}}}return!0},Ie=function(Z){return Z.indexOf("-")>0},Ge=function(Z){var St,Nt,fe,Me;Oe("beforeSanitizeAttributes",Z,null);var Le=Z.attributes;if(Le){var We={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ut};for(Me=Le.length;Me--;){St=Le[Me];var xe=St,Ne=xe.name,Ln=xe.namespaceURI;if(Nt=Ne==="value"?St.value:Mk(St.value),fe=at(Ne),We.attrName=fe,We.attrValue=Nt,We.keepAttr=!0,We.forceKeepAttr=void 0,Oe("uponSanitizeAttribute",Z,We),Nt=We.attrValue,!We.forceKeepAttr&&(ii(Ne,Z),!!We.keepAttr)){if(Sr(/\/>/i,Nt)){ii(Ne,Z);continue}I&&(Nt=oi(Nt,m," "),Nt=oi(Nt,Q," "),Nt=oi(Nt,b," "));var Dn=at(Z.nodeName);if(Pe(Dn,fe,Nt)){if(Mt&&(fe==="id"||fe==="name")&&(ii(Ne,Z),Nt=Tt+Nt),P&&Rn(g)==="object"&&typeof g.getAttributeType=="function"&&!Ln)switch(g.getAttributeType(Dn,fe)){case"TrustedHTML":Nt=P.createHTML(Nt);break;case"TrustedScriptURL":Nt=P.createScriptURL(Nt);break}try{Ln?Z.setAttributeNS(Ln,Ne,Nt):Z.setAttribute(Ne,Nt),xf(e.removed)}catch{}}}}Oe("afterSanitizeAttributes",Z,null)}},tr=function zt(Z){var St,Nt=De(Z);for(Oe("beforeSanitizeShadowDOM",Z,null);St=Nt.nextNode();)Oe("uponSanitizeShadowNode",St,null),!Fe(St)&&(St.content instanceof n&&zt(St.content),Ge(St));Oe("afterSanitizeShadowDOM",Z,null)};return e.sanitize=function(zt){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},St,Nt,fe,Me,Le;if(Ft=!zt,Ft&&(zt="<!-->"),typeof zt!="string"&&!Be(zt)){if(typeof zt.toString!="function")throw ih("toString is not a function");if(zt=zt.toString(),typeof zt!="string")throw ih("dirty is not a string, aborting")}if(!e.isSupported){if(Rn(t.toStaticHTML)==="object"||typeof t.toStaticHTML=="function"){if(typeof zt=="string")return t.toStaticHTML(zt);if(Be(zt))return t.toStaticHTML(zt.outerHTML)}return zt}if(J||de(Z),e.removed=[],typeof zt=="string"&&(Et=!1),Et){if(zt.nodeName){var We=at(zt.nodeName);if(!rt[We]||Ot[We])throw ih("root node is forbidden and cannot be sanitized in-place")}}else if(zt instanceof a)St=Ur("<!---->"),Nt=St.ownerDocument.importNode(zt,!0),Nt.nodeType===1&&Nt.nodeName==="BODY"||Nt.nodeName==="HTML"?St=Nt:St.appendChild(Nt);else{if(!ht&&!I&&!L&&zt.indexOf("<")===-1)return P&&Yt?P.createHTML(zt):zt;if(St=Ur(zt),!St)return ht?null:Yt?W:""}St&&T&&Qt(St.firstChild);for(var xe=De(Et?zt:St);fe=xe.nextNode();)fe.nodeType===3&&fe===Me||Fe(fe)||(fe.content instanceof n&&tr(fe.content),Ge(fe),Me=fe);if(Me=null,Et)return zt;if(ht){if(V)for(Le=N.call(St.ownerDocument);St.firstChild;)Le.appendChild(St.firstChild);else Le=St;return ut.shadowroot&&(Le=C.call(r,Le,!0)),Le}var Ne=L?St.outerHTML:St.innerHTML;return L&&rt["!doctype"]&&St.ownerDocument&&St.ownerDocument.doctype&&St.ownerDocument.doctype.name&&Sr(Wk,St.ownerDocument.doctype.name)&&(Ne="<!DOCTYPE "+St.ownerDocument.doctype.name+`>
|
|
6
|
-
`+Ne),I&&(Ne=oi(Ne,m," "),Ne=oi(Ne,Q," "),Ne=oi(Ne,b," ")),P&&Yt?P.createHTML(Ne):Ne},e.setConfig=function(zt){de(zt),J=!0},e.clearConfig=function(){ie=null,J=!1},e.isValidAttribute=function(zt,Z,St){ie||de({});var Nt=at(zt),fe=at(Z);return Pe(Nt,fe,St)},e.addHook=function(zt,Z){typeof Z=="function"&&(D[zt]=D[zt]||[],Fa(D[zt],Z))},e.removeHook=function(zt){if(D[zt])return xf(D[zt])},e.removeHooks=function(zt){D[zt]&&(D[zt]=[])},e.removeAllHooks=function(){D={}},e}var bo=vg();const Ol={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 Ol.hue2rgb(s,n,t+1/3)*255;case"g":return Ol.hue2rgb(s,n,t)*255;case"b":return Ol.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}}},qk=Ol,jk={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},$k=jk,Xk={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},Kk=Xk,Zk={channel:qk,lang:$k,unit:Kk},ve=Zk,On={};for(let t=0;t<=255;t++)On[t]=ve.unit.dec2hex(t);const vr={ALL:0,RGB:1,HSL:2};class Qk{constructor(){this.type=vr.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=vr.ALL}is(e){return this.type===e}}const Jk=Qk;class t8{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new Jk}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=vr.ALL,this}_ensureHSL(){const e=this.data,{h:r,s:i,l:n}=e;r===void 0&&(e.h=ve.channel.rgb2hsl(e,"h")),i===void 0&&(e.s=ve.channel.rgb2hsl(e,"s")),n===void 0&&(e.l=ve.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r,g:i,b:n}=e;r===void 0&&(e.r=ve.channel.hsl2rgb(e,"r")),i===void 0&&(e.g=ve.channel.hsl2rgb(e,"g")),n===void 0&&(e.b=ve.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,r=e.r;return!this.type.is(vr.HSL)&&r!==void 0?r:(this._ensureHSL(),ve.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,r=e.g;return!this.type.is(vr.HSL)&&r!==void 0?r:(this._ensureHSL(),ve.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,r=e.b;return!this.type.is(vr.HSL)&&r!==void 0?r:(this._ensureHSL(),ve.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,r=e.h;return!this.type.is(vr.RGB)&&r!==void 0?r:(this._ensureRGB(),ve.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,r=e.s;return!this.type.is(vr.RGB)&&r!==void 0?r:(this._ensureRGB(),ve.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,r=e.l;return!this.type.is(vr.RGB)&&r!==void 0?r:(this._ensureRGB(),ve.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(vr.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(vr.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(vr.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(vr.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(vr.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(vr.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const e8=t8,r8=new e8({r:0,g:0,b:0,a:0},"transparent"),tu=r8,kg={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;const e=t.match(kg.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,u=s?0:-1,d=a?255:15;return tu.set({r:(i>>l*(u+3)&d)*o,g:(i>>l*(u+2)&d)*o,b:(i>>l*(u+1)&d)*o,a:s?(i&d)*o/255:1},t)},stringify:t=>{const{r:e,g:r,b:i,a:n}=t;return n<1?`#${On[Math.round(e)]}${On[Math.round(r)]}${On[Math.round(i)]}${On[Math.round(n*255)]}`:`#${On[Math.round(e)]}${On[Math.round(r)]}${On[Math.round(i)]}`}},Ja=kg,Rl={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(Rl.hueRe);if(e){const[,r,i]=e;switch(i){case"grad":return ve.channel.clamp.h(parseFloat(r)*.9);case"rad":return ve.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return ve.channel.clamp.h(parseFloat(r)*360)}}return ve.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(e!==104&&e!==72)return;const r=t.match(Rl.re);if(!r)return;const[,i,n,s,a,o]=r;return tu.set({h:Rl._hue2deg(i),s:ve.channel.clamp.s(parseFloat(n)),l:ve.channel.clamp.l(parseFloat(s)),a:a?ve.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(${ve.lang.round(e)}, ${ve.lang.round(r)}%, ${ve.lang.round(i)}%, ${n})`:`hsl(${ve.lang.round(e)}, ${ve.lang.round(r)}%, ${ve.lang.round(i)}%)`}},bl=Rl,Fl={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=Fl.colors[t];if(e)return Ja.parse(e)},stringify:t=>{const e=Ja.stringify(t);for(const r in Fl.colors)if(Fl.colors[r]===e)return r}},Ef=Fl,wg={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(wg.re);if(!r)return;const[,i,n,s,a,o,l,u,d]=r;return tu.set({r:ve.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:ve.channel.clamp.g(a?parseFloat(s)*2.55:parseFloat(s)),b:ve.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:u?ve.channel.clamp.a(d?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{const{r:e,g:r,b:i,a:n}=t;return n<1?`rgba(${ve.lang.round(e)}, ${ve.lang.round(r)}, ${ve.lang.round(i)}, ${ve.lang.round(n)})`:`rgb(${ve.lang.round(e)}, ${ve.lang.round(r)}, ${ve.lang.round(i)})`}},_l=wg,i8={format:{keyword:Ef,hex:Ja,rgb:_l,rgba:_l,hsl:bl,hsla:bl},parse:t=>{if(typeof t!="string")return t;const e=Ja.parse(t)||_l.parse(t)||bl.parse(t)||Ef.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(vr.HSL)||t.data.r===void 0?bl.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?_l.stringify(t):Ja.stringify(t)},xn=i8,n8=(t,e)=>{const r=xn.parse(t);for(const i in e)r[i]=ve.channel.clamp[i](e[i]);return xn.stringify(r)},Tg=n8,s8=(t,e,r=0,i=1)=>{if(typeof t!="number")return Tg(t,{a:e});const n=tu.set({r:ve.channel.clamp.r(t),g:ve.channel.clamp.g(e),b:ve.channel.clamp.b(r),a:ve.channel.clamp.a(i)});return xn.stringify(n)},to=s8,a8=(t,e,r)=>{const i=xn.parse(t),n=i[e],s=ve.channel.clamp[e](n+r);return n!==s&&(i[e]=s),xn.stringify(i)},Eg=a8,o8=(t,e)=>Eg(t,"l",e),se=o8,l8=(t,e)=>Eg(t,"l",-e),pe=l8,c8=(t,e)=>{const r=xn.parse(t),i={};for(const n in e)e[n]&&(i[n]=r[n]+e[n]);return Tg(t,i)},mt=c8,u8=(t,e,r=50)=>{const{r:i,g:n,b:s,a}=xn.parse(t),{r:o,g:l,b:u,a:d}=xn.parse(e),f=r/100,p=f*2-1,g=a-d,k=((p*g===-1?p:(p+g)/(1+p*g))+1)/2,w=1-k,S=i*k+o*w,A=n*k+l*w,O=s*k+u*w,P=a*f+d*(1-f);return to(S,A,O,P)},h8=u8,d8=(t,e=100)=>{const r=xn.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,h8(r,t,e)},Wt=d8;var f8=typeof global=="object"&&global&&global.Object===Object&&global;const Cg=f8;var p8=typeof self=="object"&&self&&self.Object===Object&&self,g8=Cg||p8||Function("return this")();const wi=g8;var y8=wi.Symbol;const ei=y8;var Sg=Object.prototype,m8=Sg.hasOwnProperty,b8=Sg.toString,Pa=ei?ei.toStringTag:void 0;function _8(t){var e=m8.call(t,Pa),r=t[Pa];try{t[Pa]=void 0;var i=!0}catch{}var n=b8.call(t);return i&&(e?t[Pa]=r:delete t[Pa]),n}var x8=Object.prototype,v8=x8.toString;function k8(t){return v8.call(t)}var w8="[object Null]",T8="[object Undefined]",Cf=ei?ei.toStringTag:void 0;function Ss(t){return t==null?t===void 0?T8:w8:Cf&&Cf in Object(t)?_8(t):k8(t)}function $r(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var E8="[object AsyncFunction]",C8="[object Function]",S8="[object GeneratorFunction]",A8="[object Proxy]";function ca(t){if(!$r(t))return!1;var e=Ss(t);return e==C8||e==S8||e==E8||e==A8}var L8=wi["__core-js_shared__"];const lh=L8;var Sf=function(){var t=/[^.]+$/.exec(lh&&lh.keys&&lh.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function D8(t){return!!Sf&&Sf in t}var M8=Function.prototype,N8=M8.toString;function As(t){if(t!=null){try{return N8.call(t)}catch{}try{return t+""}catch{}}return""}var B8=/[\\^$.*+?()[\]{}|]/g,I8=/^\[object .+?Constructor\]$/,O8=Function.prototype,R8=Object.prototype,F8=O8.toString,P8=R8.hasOwnProperty,Y8=RegExp("^"+F8.call(P8).replace(B8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function V8(t){if(!$r(t)||D8(t))return!1;var e=ca(t)?Y8:I8;return e.test(As(t))}function U8(t,e){return t==null?void 0:t[e]}function Ls(t,e){var r=U8(t,e);return V8(r)?r:void 0}var z8=Ls(Object,"create");const _o=z8;function W8(){this.__data__=_o?_o(null):{},this.size=0}function H8(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var G8="__lodash_hash_undefined__",q8=Object.prototype,j8=q8.hasOwnProperty;function $8(t){var e=this.__data__;if(_o){var r=e[t];return r===G8?void 0:r}return j8.call(e,t)?e[t]:void 0}var X8=Object.prototype,K8=X8.hasOwnProperty;function Z8(t){var e=this.__data__;return _o?e[t]!==void 0:K8.call(e,t)}var Q8="__lodash_hash_undefined__";function J8(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=_o&&e===void 0?Q8:e,this}function ys(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])}}ys.prototype.clear=W8;ys.prototype.delete=H8;ys.prototype.get=$8;ys.prototype.has=Z8;ys.prototype.set=J8;function tw(){this.__data__=[],this.size=0}function Ea(t,e){return t===e||t!==t&&e!==e}function eu(t,e){for(var r=t.length;r--;)if(Ea(t[r][0],e))return r;return-1}var ew=Array.prototype,rw=ew.splice;function iw(t){var e=this.__data__,r=eu(e,t);if(r<0)return!1;var i=e.length-1;return r==i?e.pop():rw.call(e,r,1),--this.size,!0}function nw(t){var e=this.__data__,r=eu(e,t);return r<0?void 0:e[r][1]}function sw(t){return eu(this.__data__,t)>-1}function aw(t,e){var r=this.__data__,i=eu(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}function wn(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])}}wn.prototype.clear=tw;wn.prototype.delete=iw;wn.prototype.get=nw;wn.prototype.has=sw;wn.prototype.set=aw;var ow=Ls(wi,"Map");const xo=ow;function lw(){this.size=0,this.__data__={hash:new ys,map:new(xo||wn),string:new ys}}function cw(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function ru(t,e){var r=t.__data__;return cw(e)?r[typeof e=="string"?"string":"hash"]:r.map}function uw(t){var e=ru(this,t).delete(t);return this.size-=e?1:0,e}function hw(t){return ru(this,t).get(t)}function dw(t){return ru(this,t).has(t)}function fw(t,e){var r=ru(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}function Tn(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])}}Tn.prototype.clear=lw;Tn.prototype.delete=uw;Tn.prototype.get=hw;Tn.prototype.has=dw;Tn.prototype.set=fw;var pw="Expected a function";function Ca(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(pw);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(Ca.Cache||Tn),r}Ca.Cache=Tn;function Ui(t){return t!=null&&typeof t=="object"}var gw="[object Symbol]";function ms(t){return typeof t=="symbol"||Ui(t)&&Ss(t)==gw}function Zs(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 yw=Array.isArray;const ar=yw;var mw=1/0,Af=ei?ei.prototype:void 0,Lf=Af?Af.toString:void 0;function Ag(t){if(typeof t=="string")return t;if(ar(t))return Zs(t,Ag)+"";if(ms(t))return Lf?Lf.call(t):"";var e=t+"";return e=="0"&&1/t==-mw?"-0":e}var bw=/\s/;function _w(t){for(var e=t.length;e--&&bw.test(t.charAt(e)););return e}var xw=/^\s+/;function vw(t){return t&&t.slice(0,_w(t)+1).replace(xw,"")}var Df=0/0,kw=/^[-+]0x[0-9a-f]+$/i,ww=/^0b[01]+$/i,Tw=/^0o[0-7]+$/i,Ew=parseInt;function Cw(t){if(typeof t=="number")return t;if(ms(t))return Df;if($r(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=$r(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=vw(t);var r=ww.test(t);return r||Tw.test(t)?Ew(t.slice(2),r?2:8):kw.test(t)?Df:+t}var Mf=1/0,Sw=17976931348623157e292;function Pl(t){if(!t)return t===0?t:0;if(t=Cw(t),t===Mf||t===-Mf){var e=t<0?-1:1;return e*Sw}return t===t?t:0}function Aw(t){var e=Pl(t),r=e%1;return e===e?r?e-r:e:0}function Ds(t){return t}var Lw=Ls(wi,"WeakMap");const Kh=Lw;var Nf=Object.create,Dw=function(){function t(){}return function(e){if(!$r(e))return{};if(Nf)return Nf(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();const Mw=Dw;function Nw(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 Bw(){}function Lg(t,e){var r=-1,i=t.length;for(e||(e=Array(i));++r<i;)e[r]=t[r];return e}var Iw=800,Ow=16,Rw=Date.now;function Fw(t){var e=0,r=0;return function(){var i=Rw(),n=Ow-(i-r);if(r=i,n>0){if(++e>=Iw)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Hs(t){return function(){return t}}var Pw=function(){try{var t=Ls(Object,"defineProperty");return t({},"",{}),t}catch{}}();const pc=Pw;var Yw=pc?function(t,e){return pc(t,"toString",{configurable:!0,enumerable:!1,value:Hs(e),writable:!0})}:Ds;const Vw=Yw;var Uw=Fw(Vw);const Dg=Uw;function Mg(t,e){for(var r=-1,i=t==null?0:t.length;++r<i&&e(t[r],r,t)!==!1;);return t}function Ng(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 zw(t){return t!==t}function Ww(t,e,r){for(var i=r-1,n=t.length;++i<n;)if(t[i]===e)return i;return-1}function Hw(t,e,r){return e===e?Ww(t,e,r):Ng(t,zw,r)}function Gw(t,e){var r=t==null?0:t.length;return!!r&&Hw(t,e,0)>-1}var qw=9007199254740991,jw=/^(?:0|[1-9]\d*)$/;function iu(t,e){var r=typeof t;return e=e??qw,!!e&&(r=="number"||r!="symbol"&&jw.test(t))&&t>-1&&t%1==0&&t<e}function nu(t,e,r){e=="__proto__"&&pc?pc(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var $w=Object.prototype,Xw=$w.hasOwnProperty;function su(t,e,r){var i=t[e];(!(Xw.call(t,e)&&Ea(i,r))||r===void 0&&!(e in t))&&nu(t,e,r)}function Wo(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?nu(r,o,l):su(r,o,l)}return r}var Bf=Math.max;function Bg(t,e,r){return e=Bf(e===void 0?t.length-1:e,0),function(){for(var i=arguments,n=-1,s=Bf(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),Nw(t,this,o)}}function au(t,e){return Dg(Bg(t,e,Ds),t+"")}var Kw=9007199254740991;function n0(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Kw}function qn(t){return t!=null&&n0(t.length)&&!ca(t)}function vo(t,e,r){if(!$r(r))return!1;var i=typeof e;return(i=="number"?qn(r)&&iu(e,r.length):i=="string"&&e in r)?Ea(r[e],t):!1}function Zw(t){return au(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&&vo(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 Qw=Object.prototype;function ou(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Qw;return t===r}function Jw(t,e){for(var r=-1,i=Array(t);++r<t;)i[r]=e(r);return i}var t7="[object Arguments]";function If(t){return Ui(t)&&Ss(t)==t7}var Ig=Object.prototype,e7=Ig.hasOwnProperty,r7=Ig.propertyIsEnumerable,i7=If(function(){return arguments}())?If:function(t){return Ui(t)&&e7.call(t,"callee")&&!r7.call(t,"callee")};const ua=i7;function n7(){return!1}var Og=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Of=Og&&typeof module=="object"&&module&&!module.nodeType&&module,s7=Of&&Of.exports===Og,Rf=s7?wi.Buffer:void 0,a7=Rf?Rf.isBuffer:void 0,o7=a7||n7;const ha=o7;var l7="[object Arguments]",c7="[object Array]",u7="[object Boolean]",h7="[object Date]",d7="[object Error]",f7="[object Function]",p7="[object Map]",g7="[object Number]",y7="[object Object]",m7="[object RegExp]",b7="[object Set]",_7="[object String]",x7="[object WeakMap]",v7="[object ArrayBuffer]",k7="[object DataView]",w7="[object Float32Array]",T7="[object Float64Array]",E7="[object Int8Array]",C7="[object Int16Array]",S7="[object Int32Array]",A7="[object Uint8Array]",L7="[object Uint8ClampedArray]",D7="[object Uint16Array]",M7="[object Uint32Array]",Ve={};Ve[w7]=Ve[T7]=Ve[E7]=Ve[C7]=Ve[S7]=Ve[A7]=Ve[L7]=Ve[D7]=Ve[M7]=!0;Ve[l7]=Ve[c7]=Ve[v7]=Ve[u7]=Ve[k7]=Ve[h7]=Ve[d7]=Ve[f7]=Ve[p7]=Ve[g7]=Ve[y7]=Ve[m7]=Ve[b7]=Ve[_7]=Ve[x7]=!1;function N7(t){return Ui(t)&&n0(t.length)&&!!Ve[Ss(t)]}function lu(t){return function(e){return t(e)}}var Rg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,eo=Rg&&typeof module=="object"&&module&&!module.nodeType&&module,B7=eo&&eo.exports===Rg,ch=B7&&Cg.process,I7=function(){try{var t=eo&&eo.require&&eo.require("util").types;return t||ch&&ch.binding&&ch.binding("util")}catch{}}();const da=I7;var Ff=da&&da.isTypedArray,O7=Ff?lu(Ff):N7;const cu=O7;var R7=Object.prototype,F7=R7.hasOwnProperty;function Fg(t,e){var r=ar(t),i=!r&&ua(t),n=!r&&!i&&ha(t),s=!r&&!i&&!n&&cu(t),a=r||i||n||s,o=a?Jw(t.length,String):[],l=o.length;for(var u in t)(e||F7.call(t,u))&&!(a&&(u=="length"||n&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||iu(u,l)))&&o.push(u);return o}function Pg(t,e){return function(r){return t(e(r))}}var P7=Pg(Object.keys,Object);const Y7=P7;var V7=Object.prototype,U7=V7.hasOwnProperty;function Yg(t){if(!ou(t))return Y7(t);var e=[];for(var r in Object(t))U7.call(t,r)&&r!="constructor"&&e.push(r);return e}function qr(t){return qn(t)?Fg(t):Yg(t)}function z7(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var W7=Object.prototype,H7=W7.hasOwnProperty;function G7(t){if(!$r(t))return z7(t);var e=ou(t),r=[];for(var i in t)i=="constructor"&&(e||!H7.call(t,i))||r.push(i);return r}function Ms(t){return qn(t)?Fg(t,!0):G7(t)}var q7=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,j7=/^\w*$/;function s0(t,e){if(ar(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||ms(t)?!0:j7.test(t)||!q7.test(t)||e!=null&&t in Object(e)}var $7=500;function X7(t){var e=Ca(t,function(i){return r.size===$7&&r.clear(),i}),r=e.cache;return e}var K7=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Z7=/\\(\\)?/g,Q7=X7(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(K7,function(r,i,n,s){e.push(n?s.replace(Z7,"$1"):i||r)}),e});const J7=Q7;function Vg(t){return t==null?"":Ag(t)}function uu(t,e){return ar(t)?t:s0(t,e)?[t]:J7(Vg(t))}var tT=1/0;function Ho(t){if(typeof t=="string"||ms(t))return t;var e=t+"";return e=="0"&&1/t==-tT?"-0":e}function hu(t,e){e=uu(e,t);for(var r=0,i=e.length;t!=null&&r<i;)t=t[Ho(e[r++])];return r&&r==i?t:void 0}function eT(t,e,r){var i=t==null?void 0:hu(t,e);return i===void 0?r:i}function a0(t,e){for(var r=-1,i=e.length,n=t.length;++r<i;)t[n+r]=e[r];return t}var Pf=ei?ei.isConcatSpreadable:void 0;function rT(t){return ar(t)||ua(t)||!!(Pf&&t&&t[Pf])}function du(t,e,r,i,n){var s=-1,a=t.length;for(r||(r=rT),n||(n=[]);++s<a;){var o=t[s];e>0&&r(o)?e>1?du(o,e-1,r,i,n):a0(n,o):i||(n[n.length]=o)}return n}function Sa(t){var e=t==null?0:t.length;return e?du(t,1):[]}function iT(t){return Dg(Bg(t,void 0,Sa),t+"")}var nT=Pg(Object.getPrototypeOf,Object);const o0=nT;var sT="[object Object]",aT=Function.prototype,oT=Object.prototype,Ug=aT.toString,lT=oT.hasOwnProperty,cT=Ug.call(Object);function zg(t){if(!Ui(t)||Ss(t)!=sT)return!1;var e=o0(t);if(e===null)return!0;var r=lT.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Ug.call(r)==cT}function uT(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 hT(){this.__data__=new wn,this.size=0}function dT(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function fT(t){return this.__data__.get(t)}function pT(t){return this.__data__.has(t)}var gT=200;function yT(t,e){var r=this.__data__;if(r instanceof wn){var i=r.__data__;if(!xo||i.length<gT-1)return i.push([t,e]),this.size=++r.size,this;r=this.__data__=new Tn(i)}return r.set(t,e),this.size=r.size,this}function pi(t){var e=this.__data__=new wn(t);this.size=e.size}pi.prototype.clear=hT;pi.prototype.delete=dT;pi.prototype.get=fT;pi.prototype.has=pT;pi.prototype.set=yT;function mT(t,e){return t&&Wo(e,qr(e),t)}function bT(t,e){return t&&Wo(e,Ms(e),t)}var Wg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Yf=Wg&&typeof module=="object"&&module&&!module.nodeType&&module,_T=Yf&&Yf.exports===Wg,Vf=_T?wi.Buffer:void 0,Uf=Vf?Vf.allocUnsafe:void 0;function Hg(t,e){if(e)return t.slice();var r=t.length,i=Uf?Uf(r):new t.constructor(r);return t.copy(i),i}function Gg(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 qg(){return[]}var xT=Object.prototype,vT=xT.propertyIsEnumerable,zf=Object.getOwnPropertySymbols,kT=zf?function(t){return t==null?[]:(t=Object(t),Gg(zf(t),function(e){return vT.call(t,e)}))}:qg;const l0=kT;function wT(t,e){return Wo(t,l0(t),e)}var TT=Object.getOwnPropertySymbols,ET=TT?function(t){for(var e=[];t;)a0(e,l0(t)),t=o0(t);return e}:qg;const jg=ET;function CT(t,e){return Wo(t,jg(t),e)}function $g(t,e,r){var i=e(t);return ar(t)?i:a0(i,r(t))}function Zh(t){return $g(t,qr,l0)}function ST(t){return $g(t,Ms,jg)}var AT=Ls(wi,"DataView");const Qh=AT;var LT=Ls(wi,"Promise");const Jh=LT;var DT=Ls(wi,"Set");const Qs=DT;var Wf="[object Map]",MT="[object Object]",Hf="[object Promise]",Gf="[object Set]",qf="[object WeakMap]",jf="[object DataView]",NT=As(Qh),BT=As(xo),IT=As(Jh),OT=As(Qs),RT=As(Kh),as=Ss;(Qh&&as(new Qh(new ArrayBuffer(1)))!=jf||xo&&as(new xo)!=Wf||Jh&&as(Jh.resolve())!=Hf||Qs&&as(new Qs)!=Gf||Kh&&as(new Kh)!=qf)&&(as=function(t){var e=Ss(t),r=e==MT?t.constructor:void 0,i=r?As(r):"";if(i)switch(i){case NT:return jf;case BT:return Wf;case IT:return Hf;case OT:return Gf;case RT:return qf}return e});const fa=as;var FT=Object.prototype,PT=FT.hasOwnProperty;function YT(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&PT.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var VT=wi.Uint8Array;const gc=VT;function c0(t){var e=new t.constructor(t.byteLength);return new gc(e).set(new gc(t)),e}function UT(t,e){var r=e?c0(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var zT=/\w*$/;function WT(t){var e=new t.constructor(t.source,zT.exec(t));return e.lastIndex=t.lastIndex,e}var $f=ei?ei.prototype:void 0,Xf=$f?$f.valueOf:void 0;function HT(t){return Xf?Object(Xf.call(t)):{}}function Xg(t,e){var r=e?c0(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var GT="[object Boolean]",qT="[object Date]",jT="[object Map]",$T="[object Number]",XT="[object RegExp]",KT="[object Set]",ZT="[object String]",QT="[object Symbol]",JT="[object ArrayBuffer]",tE="[object DataView]",eE="[object Float32Array]",rE="[object Float64Array]",iE="[object Int8Array]",nE="[object Int16Array]",sE="[object Int32Array]",aE="[object Uint8Array]",oE="[object Uint8ClampedArray]",lE="[object Uint16Array]",cE="[object Uint32Array]";function uE(t,e,r){var i=t.constructor;switch(e){case JT:return c0(t);case GT:case qT:return new i(+t);case tE:return UT(t,r);case eE:case rE:case iE:case nE:case sE:case aE:case oE:case lE:case cE:return Xg(t,r);case jT:return new i;case $T:case ZT:return new i(t);case XT:return WT(t);case KT:return new i;case QT:return HT(t)}}function Kg(t){return typeof t.constructor=="function"&&!ou(t)?Mw(o0(t)):{}}var hE="[object Map]";function dE(t){return Ui(t)&&fa(t)==hE}var Kf=da&&da.isMap,fE=Kf?lu(Kf):dE;const pE=fE;var gE="[object Set]";function yE(t){return Ui(t)&&fa(t)==gE}var Zf=da&&da.isSet,mE=Zf?lu(Zf):yE;const bE=mE;var _E=1,xE=2,vE=4,Zg="[object Arguments]",kE="[object Array]",wE="[object Boolean]",TE="[object Date]",EE="[object Error]",Qg="[object Function]",CE="[object GeneratorFunction]",SE="[object Map]",AE="[object Number]",Jg="[object Object]",LE="[object RegExp]",DE="[object Set]",ME="[object String]",NE="[object Symbol]",BE="[object WeakMap]",IE="[object ArrayBuffer]",OE="[object DataView]",RE="[object Float32Array]",FE="[object Float64Array]",PE="[object Int8Array]",YE="[object Int16Array]",VE="[object Int32Array]",UE="[object Uint8Array]",zE="[object Uint8ClampedArray]",WE="[object Uint16Array]",HE="[object Uint32Array]",Re={};Re[Zg]=Re[kE]=Re[IE]=Re[OE]=Re[wE]=Re[TE]=Re[RE]=Re[FE]=Re[PE]=Re[YE]=Re[VE]=Re[SE]=Re[AE]=Re[Jg]=Re[LE]=Re[DE]=Re[ME]=Re[NE]=Re[UE]=Re[zE]=Re[WE]=Re[HE]=!0;Re[EE]=Re[Qg]=Re[BE]=!1;function ro(t,e,r,i,n,s){var a,o=e&_E,l=e&xE,u=e&vE;if(r&&(a=n?r(t,i,n,s):r(t)),a!==void 0)return a;if(!$r(t))return t;var d=ar(t);if(d){if(a=YT(t),!o)return Lg(t,a)}else{var f=fa(t),p=f==Qg||f==CE;if(ha(t))return Hg(t,o);if(f==Jg||f==Zg||p&&!n){if(a=l||p?{}:Kg(t),!o)return l?CT(t,bT(a,t)):wT(t,mT(a,t))}else{if(!Re[f])return n?t:{};a=uE(t,f,o)}}s||(s=new pi);var g=s.get(t);if(g)return g;s.set(t,a),bE(t)?t.forEach(function(w){a.add(ro(w,e,r,w,t,s))}):pE(t)&&t.forEach(function(w,S){a.set(S,ro(w,e,r,S,t,s))});var _=u?l?ST:Zh:l?Ms:qr,k=d?void 0:_(t);return Mg(k||t,function(w,S){k&&(S=w,w=t[S]),su(a,S,ro(w,e,r,S,t,s))}),a}var GE=4;function qE(t){return ro(t,GE)}var jE=1,$E=4;function XE(t){return ro(t,jE|$E)}var KE="__lodash_hash_undefined__";function ZE(t){return this.__data__.set(t,KE),this}function QE(t){return this.__data__.has(t)}function ko(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new Tn;++e<r;)this.add(t[e])}ko.prototype.add=ko.prototype.push=ZE;ko.prototype.has=QE;function JE(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 ty(t,e){return t.has(e)}var tC=1,eC=2;function ey(t,e,r,i,n,s){var a=r&tC,o=t.length,l=e.length;if(o!=l&&!(a&&l>o))return!1;var u=s.get(t),d=s.get(e);if(u&&d)return u==e&&d==t;var f=-1,p=!0,g=r&eC?new ko:void 0;for(s.set(t,e),s.set(e,t);++f<o;){var _=t[f],k=e[f];if(i)var w=a?i(k,_,f,e,t,s):i(_,k,f,t,e,s);if(w!==void 0){if(w)continue;p=!1;break}if(g){if(!JE(e,function(S,A){if(!ty(g,A)&&(_===S||n(_,S,r,i,s)))return g.push(A)})){p=!1;break}}else if(!(_===k||n(_,k,r,i,s))){p=!1;break}}return s.delete(t),s.delete(e),p}function rC(t){var e=-1,r=Array(t.size);return t.forEach(function(i,n){r[++e]=[n,i]}),r}function u0(t){var e=-1,r=Array(t.size);return t.forEach(function(i){r[++e]=i}),r}var iC=1,nC=2,sC="[object Boolean]",aC="[object Date]",oC="[object Error]",lC="[object Map]",cC="[object Number]",uC="[object RegExp]",hC="[object Set]",dC="[object String]",fC="[object Symbol]",pC="[object ArrayBuffer]",gC="[object DataView]",Qf=ei?ei.prototype:void 0,uh=Qf?Qf.valueOf:void 0;function yC(t,e,r,i,n,s,a){switch(r){case gC:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case pC:return!(t.byteLength!=e.byteLength||!s(new gc(t),new gc(e)));case sC:case aC:case cC:return Ea(+t,+e);case oC:return t.name==e.name&&t.message==e.message;case uC:case dC:return t==e+"";case lC:var o=rC;case hC:var l=i&iC;if(o||(o=u0),t.size!=e.size&&!l)return!1;var u=a.get(t);if(u)return u==e;i|=nC,a.set(t,e);var d=ey(o(t),o(e),i,n,s,a);return a.delete(t),d;case fC:if(uh)return uh.call(t)==uh.call(e)}return!1}var mC=1,bC=Object.prototype,_C=bC.hasOwnProperty;function xC(t,e,r,i,n,s){var a=r&mC,o=Zh(t),l=o.length,u=Zh(e),d=u.length;if(l!=d&&!a)return!1;for(var f=l;f--;){var p=o[f];if(!(a?p in e:_C.call(e,p)))return!1}var g=s.get(t),_=s.get(e);if(g&&_)return g==e&&_==t;var k=!0;s.set(t,e),s.set(e,t);for(var w=a;++f<l;){p=o[f];var S=t[p],A=e[p];if(i)var O=a?i(A,S,p,e,t,s):i(S,A,p,t,e,s);if(!(O===void 0?S===A||n(S,A,r,i,s):O)){k=!1;break}w||(w=p=="constructor")}if(k&&!w){var P=t.constructor,W=e.constructor;P!=W&&"constructor"in t&&"constructor"in e&&!(typeof P=="function"&&P instanceof P&&typeof W=="function"&&W instanceof W)&&(k=!1)}return s.delete(t),s.delete(e),k}var vC=1,Jf="[object Arguments]",t2="[object Array]",xl="[object Object]",kC=Object.prototype,e2=kC.hasOwnProperty;function wC(t,e,r,i,n,s){var a=ar(t),o=ar(e),l=a?t2:fa(t),u=o?t2:fa(e);l=l==Jf?xl:l,u=u==Jf?xl:u;var d=l==xl,f=u==xl,p=l==u;if(p&&ha(t)){if(!ha(e))return!1;a=!0,d=!1}if(p&&!d)return s||(s=new pi),a||cu(t)?ey(t,e,r,i,n,s):yC(t,e,l,r,i,n,s);if(!(r&vC)){var g=d&&e2.call(t,"__wrapped__"),_=f&&e2.call(e,"__wrapped__");if(g||_){var k=g?t.value():t,w=_?e.value():e;return s||(s=new pi),n(k,w,r,i,s)}}return p?(s||(s=new pi),xC(t,e,r,i,n,s)):!1}function h0(t,e,r,i,n){return t===e?!0:t==null||e==null||!Ui(t)&&!Ui(e)?t!==t&&e!==e:wC(t,e,r,i,h0,n)}var TC=1,EC=2;function CC(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],u=t[l],d=o[1];if(a&&o[2]){if(u===void 0&&!(l in t))return!1}else{var f=new pi;if(i)var p=i(u,d,l,t,e,f);if(!(p===void 0?h0(d,u,TC|EC,i,f):p))return!1}}return!0}function ry(t){return t===t&&!$r(t)}function SC(t){for(var e=qr(t),r=e.length;r--;){var i=e[r],n=t[i];e[r]=[i,n,ry(n)]}return e}function iy(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}function AC(t){var e=SC(t);return e.length==1&&e[0][2]?iy(e[0][0],e[0][1]):function(r){return r===t||CC(r,t,e)}}function LC(t,e){return t!=null&&e in Object(t)}function ny(t,e,r){e=uu(e,t);for(var i=-1,n=e.length,s=!1;++i<n;){var a=Ho(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&&n0(n)&&iu(a,n)&&(ar(t)||ua(t)))}function sy(t,e){return t!=null&&ny(t,e,LC)}var DC=1,MC=2;function NC(t,e){return s0(t)&&ry(e)?iy(Ho(t),e):function(r){var i=eT(r,t);return i===void 0&&i===e?sy(r,t):h0(e,i,DC|MC)}}function BC(t){return function(e){return e==null?void 0:e[t]}}function IC(t){return function(e){return hu(e,t)}}function OC(t){return s0(t)?BC(Ho(t)):IC(t)}function jn(t){return typeof t=="function"?t:t==null?Ds:typeof t=="object"?ar(t)?NC(t[0],t[1]):AC(t):OC(t)}function RC(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 FC=RC();const d0=FC;function ay(t,e){return t&&d0(t,e,qr)}function PC(t,e){return function(r,i){if(r==null)return r;if(!qn(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 YC=PC(ay);const fu=YC;var VC=function(){return wi.Date.now()};const r2=VC;var oy=Object.prototype,UC=oy.hasOwnProperty,zC=au(function(t,e){t=Object(t);var r=-1,i=e.length,n=i>2?e[2]:void 0;for(n&&vo(e[0],e[1],n)&&(i=1);++r<i;)for(var s=e[r],a=Ms(s),o=-1,l=a.length;++o<l;){var u=a[o],d=t[u];(d===void 0||Ea(d,oy[u])&&!UC.call(t,u))&&(t[u]=s[u])}return t});const Ys=zC;function t1(t,e,r){(r!==void 0&&!Ea(t[e],r)||r===void 0&&!(e in t))&&nu(t,e,r)}function ly(t){return Ui(t)&&qn(t)}function e1(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function WC(t){return Wo(t,Ms(t))}function HC(t,e,r,i,n,s,a){var o=e1(t,r),l=e1(e,r),u=a.get(l);if(u){t1(t,r,u);return}var d=s?s(o,l,r+"",t,e,a):void 0,f=d===void 0;if(f){var p=ar(l),g=!p&&ha(l),_=!p&&!g&&cu(l);d=l,p||g||_?ar(o)?d=o:ly(o)?d=Lg(o):g?(f=!1,d=Hg(l,!0)):_?(f=!1,d=Xg(l,!0)):d=[]:zg(l)||ua(l)?(d=o,ua(o)?d=WC(o):(!$r(o)||ca(o))&&(d=Kg(l))):f=!1}f&&(a.set(l,d),n(d,l,i,s,a),a.delete(l)),t1(t,r,d)}function cy(t,e,r,i,n){t!==e&&d0(e,function(s,a){if(n||(n=new pi),$r(s))HC(t,e,a,r,cy,i,n);else{var o=i?i(e1(t,a),s,a+"",t,e,n):void 0;o===void 0&&(o=s),t1(t,a,o)}},Ms)}function GC(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 yc(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function uy(t){return typeof t=="function"?t:Ds}function kt(t,e){var r=ar(t)?Mg:fu;return r(t,uy(e))}function qC(t,e){var r=[];return fu(t,function(i,n,s){e(i,n,s)&&r.push(i)}),r}function hn(t,e){var r=ar(t)?Gg:qC;return r(t,jn(e))}function jC(t){return function(e,r,i){var n=Object(e);if(!qn(e)){var s=jn(r);e=qr(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 $C=Math.max;function XC(t,e,r){var i=t==null?0:t.length;if(!i)return-1;var n=r==null?0:Aw(r);return n<0&&(n=$C(i+n,0)),Ng(t,jn(e),n)}var KC=jC(XC);const f0=KC;function hy(t,e){var r=-1,i=qn(t)?Array(t.length):[];return fu(t,function(n,s,a){i[++r]=e(n,s,a)}),i}function sr(t,e){var r=ar(t)?Zs:hy;return r(t,jn(e))}function ZC(t,e){return t==null?t:d0(t,uy(e),Ms)}function QC(t,e){return t>e}var JC=Object.prototype,t9=JC.hasOwnProperty;function e9(t,e){return t!=null&&t9.call(t,e)}function _e(t,e){return t!=null&&ny(t,e,e9)}function r9(t,e){return Zs(e,function(r){return t[r]})}function gn(t){return t==null?[]:r9(t,qr(t))}var i9="[object Map]",n9="[object Set]",s9=Object.prototype,a9=s9.hasOwnProperty;function Js(t){if(t==null)return!0;if(qn(t)&&(ar(t)||typeof t=="string"||typeof t.splice=="function"||ha(t)||cu(t)||ua(t)))return!t.length;var e=fa(t);if(e==i9||e==n9)return!t.size;if(ou(t))return!Yg(t).length;for(var r in t)if(a9.call(t,r))return!1;return!0}function Ze(t){return t===void 0}function dy(t,e){return t<e}function pu(t,e){var r={};return e=jn(e),ay(t,function(i,n,s){nu(r,n,e(i,n,s))}),r}function p0(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&&!ms(a):r(a,o)))var o=a,l=s}return l}function bs(t){return t&&t.length?p0(t,Ds,QC):void 0}var o9=Zw(function(t,e,r){cy(t,e,r)});const r1=o9;function wo(t){return t&&t.length?p0(t,Ds,dy):void 0}function g0(t,e){return t&&t.length?p0(t,jn(e),dy):void 0}function l9(t,e,r,i){if(!$r(t))return t;e=uu(e,t);for(var n=-1,s=e.length,a=s-1,o=t;o!=null&&++n<s;){var l=Ho(e[n]),u=r;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(n!=a){var d=o[l];u=i?i(d,l,o):void 0,u===void 0&&(u=$r(d)?d:iu(e[n+1])?[]:{})}su(o,l,u),o=o[l]}return t}function c9(t,e,r){for(var i=-1,n=e.length,s={};++i<n;){var a=e[i],o=hu(t,a);r(o,a)&&l9(s,uu(a,t),o)}return s}function u9(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}function h9(t,e){if(t!==e){var r=t!==void 0,i=t===null,n=t===t,s=ms(t),a=e!==void 0,o=e===null,l=e===e,u=ms(e);if(!o&&!u&&!s&&t>e||s&&a&&l&&!o&&!u||i&&a&&l||!r&&l||!n)return 1;if(!i&&!s&&!u&&t<e||u&&r&&n&&!i&&!s||o&&r&&n||!a&&n||!l)return-1}return 0}function d9(t,e,r){for(var i=-1,n=t.criteria,s=e.criteria,a=n.length,o=r.length;++i<a;){var l=h9(n[i],s[i]);if(l){if(i>=o)return l;var u=r[i];return l*(u=="desc"?-1:1)}}return t.index-e.index}function f9(t,e,r){e.length?e=Zs(e,function(s){return ar(s)?function(a){return hu(a,s.length===1?s[0]:s)}:s}):e=[Ds];var i=-1;e=Zs(e,lu(jn));var n=hy(t,function(s,a,o){var l=Zs(e,function(u){return u(s)});return{criteria:l,index:++i,value:s}});return u9(n,function(s,a){return d9(s,a,r)})}function p9(t,e){return c9(t,e,function(r,i){return sy(t,i)})}var g9=iT(function(t,e){return t==null?{}:p9(t,e)});const To=g9;var y9=Math.ceil,m9=Math.max;function b9(t,e,r,i){for(var n=-1,s=m9(y9((e-t)/(r||1)),0),a=Array(s);s--;)a[i?s:++n]=t,t+=r;return a}function _9(t){return function(e,r,i){return i&&typeof i!="number"&&vo(e,r,i)&&(r=i=void 0),e=Pl(e),r===void 0?(r=e,e=0):r=Pl(r),i=i===void 0?e<r?1:-1:Pl(i),b9(e,r,i,t)}}var x9=_9();const _s=x9;function v9(t,e,r,i,n){return n(t,function(s,a,o){r=i?(i=!1,s):e(r,s,a,o)}),r}function Go(t,e,r){var i=ar(t)?uT:v9,n=arguments.length<3;return i(t,jn(e),r,n,fu)}var k9=au(function(t,e){if(t==null)return[];var r=e.length;return r>1&&vo(t,e[0],e[1])?e=[]:r>2&&vo(e[0],e[1],e[2])&&(e=[e[0]]),f9(t,du(e,1),[])});const qo=k9;var w9=1/0,T9=Qs&&1/u0(new Qs([,-0]))[1]==w9?function(t){return new Qs(t)}:Bw;const E9=T9;var C9=200;function S9(t,e,r){var i=-1,n=Gw,s=t.length,a=!0,o=[],l=o;if(r)a=!1,n=GC;else if(s>=C9){var u=e?null:E9(t);if(u)return u0(u);a=!1,n=ty,l=new ko}else l=e?[]:o;t:for(;++i<s;){var d=t[i],f=e?e(d):d;if(d=r||d!==0?d:0,a&&f===f){for(var p=l.length;p--;)if(l[p]===f)continue t;e&&l.push(f),o.push(d)}else n(l,f,r)||(l!==o&&l.push(f),o.push(d))}return o}var A9=au(function(t){return S9(du(t,1,ly,!0))});const L9=A9;var D9=0;function gu(t){var e=++D9;return Vg(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||[],su)}var B9="\0",is="\0",i2="";class or{constructor(e={}){this._isDirected=_e(e,"directed")?e.directed:!0,this._isMultigraph=_e(e,"multigraph")?e.multigraph:!1,this._isCompound=_e(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=Hs(void 0),this._defaultEdgeLabelFn=Hs(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[is]={}),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 ca(e)||(e=Hs(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return qr(this._nodes)}sources(){var e=this;return hn(this.nodes(),function(r){return Js(e._in[r])})}sinks(){var e=this;return hn(this.nodes(),function(r){return Js(e._out[r])})}setNodes(e,r){var i=arguments,n=this;return kt(e,function(s){i.length>1?n.setNode(s,r):n.setNode(s)}),this}setNode(e,r){return _e(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]=is,this._children[e]={},this._children[is][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 _e(this._nodes,e)}removeNode(e){var r=this;if(_e(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],kt(this.children(e),function(n){r.setParent(n)}),delete this._children[e]),kt(qr(this._in[e]),i),delete this._in[e],delete this._preds[e],kt(qr(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(Ze(r))r=is;else{r+="";for(var i=r;!Ze(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!==is)return r}}children(e){if(Ze(e)&&(e=is),this._isCompound){var r=this._children[e];if(r)return qr(r)}else{if(e===is)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var r=this._preds[e];if(r)return qr(r)}successors(e){var r=this._sucs[e];if(r)return qr(r)}neighbors(e){var r=this.predecessors(e);if(r)return L9(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;kt(this._nodes,function(a,o){e(o)&&r.setNode(o,a)}),kt(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&&kt(r.nodes(),function(a){r.setParent(a,s(a))}),r}setDefaultEdgeLabel(e){return ca(e)||(e=Hs(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return gn(this._edgeObjs)}setPath(e,r){var i=this,n=arguments;return Go(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,Ze(i)||(i=""+i);var o=$a(this._isDirected,e,r,i);if(_e(this._edgeLabels,o))return s&&(this._edgeLabels[o]=n),this;if(!Ze(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=I9(this._isDirected,e,r,i);return e=l.v,r=l.w,Object.freeze(l),this._edgeObjs[o]=l,n2(this._preds[r],e),n2(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?hh(this._isDirected,arguments[0]):$a(this._isDirected,e,r,i);return this._edgeLabels[n]}hasEdge(e,r,i){var n=arguments.length===1?hh(this._isDirected,arguments[0]):$a(this._isDirected,e,r,i);return _e(this._edgeLabels,n)}removeEdge(e,r,i){var n=arguments.length===1?hh(this._isDirected,arguments[0]):$a(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],s2(this._preds[r],e),s2(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=gn(i);return r?hn(n,function(s){return s.v===r}):n}}outEdges(e,r){var i=this._out[e];if(i){var n=gn(i);return r?hn(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))}}or.prototype._nodeCount=0;or.prototype._edgeCount=0;function n2(t,e){t[e]?t[e]++:t[e]=1}function s2(t,e){--t[e]||delete t[e]}function $a(t,e,r,i){var n=""+e,s=""+r;if(!t&&n>s){var a=n;n=s,s=a}return n+i2+s+i2+(Ze(i)?B9:i)}function I9(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 hh(t,e){return $a(t,e.v,e.w,e.name)}class O9{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,r=e._prev;if(r!==e)return a2(r),r}enqueue(e){var r=this._sentinel;e._prev&&e._next&&a2(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,R9)),i=i._prev;return"["+e.join(", ")+"]"}}function a2(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function R9(t,e){if(t!=="_next"&&t!=="_prev")return e}var F9=Hs(1);function P9(t,e){if(t.nodeCount()<=1)return[];var r=V9(t,e||F9),i=Y9(r.graph,r.buckets,r.zeroIdx);return Sa(sr(i,function(n){return t.outEdges(n.v,n.w)}))}function Y9(t,e,r){for(var i=[],n=e[e.length-1],s=e[0],a;t.nodeCount();){for(;a=s.dequeue();)dh(t,e,r,a);for(;a=n.dequeue();)dh(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(dh(t,e,r,a,!0));break}}}return i}function dh(t,e,r,i,n){var s=n?[]:void 0;return kt(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,i1(e,r,l)}),kt(t.outEdges(i.v),function(a){var o=t.edge(a),l=a.w,u=t.node(l);u.in-=o,i1(e,r,u)}),t.removeNode(i.v),s}function V9(t,e){var r=new or,i=0,n=0;kt(t.nodes(),function(o){r.setNode(o,{v:o,in:0,out:0})}),kt(t.edges(),function(o){var l=r.edge(o.v,o.w)||0,u=e(o),d=l+u;r.setEdge(o.v,o.w,d),n=Math.max(n,r.node(o.v).out+=u),i=Math.max(i,r.node(o.w).in+=u)});var s=_s(n+i+3).map(function(){return new O9}),a=i+1;return kt(r.nodes(),function(o){i1(s,a,r.node(o))}),{graph:r,buckets:s,zeroIdx:a}}function i1(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 U9(t){var e=t.graph().acyclicer==="greedy"?P9(t,r(t)):z9(t);kt(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,gu("rev"))});function r(i){return function(n){return i.edge(n).weight}}}function z9(t){var e=[],r={},i={};function n(s){_e(i,s)||(i[s]=!0,r[s]=!0,kt(t.outEdges(s),function(a){_e(r,a.w)?e.push(a):n(a.w)}),delete r[s])}return kt(t.nodes(),n),e}function W9(t){kt(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 Aa(t,e,r,i){var n;do n=gu(i);while(t.hasNode(n));return r.dummy=e,t.setNode(n,r),n}function H9(t){var e=new or().setGraph(t.graph());return kt(t.nodes(),function(r){e.setNode(r,t.node(r))}),kt(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 fy(t){var e=new or({multigraph:t.isMultigraph()}).setGraph(t.graph());return kt(t.nodes(),function(r){t.children(r).length||e.setNode(r,t.node(r))}),kt(t.edges(),function(r){e.setEdge(r,t.edge(r))}),e}function o2(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,u;return Math.abs(s)*a>Math.abs(n)*o?(s<0&&(o=-o),l=o*n/s,u=o):(n<0&&(a=-a),l=a,u=a*s/n),{x:r+l,y:i+u}}function yu(t){var e=sr(_s(py(t)+1),function(){return[]});return kt(t.nodes(),function(r){var i=t.node(r),n=i.rank;Ze(n)||(e[n][i.order]=r)}),e}function G9(t){var e=wo(sr(t.nodes(),function(r){return t.node(r).rank}));kt(t.nodes(),function(r){var i=t.node(r);_e(i,"rank")&&(i.rank-=e)})}function q9(t){var e=wo(sr(t.nodes(),function(s){return t.node(s).rank})),r=[];kt(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;kt(r,function(s,a){Ze(s)&&a%n!==0?--i:i&&kt(s,function(o){t.node(o).rank+=i})})}function l2(t,e,r,i){var n={width:0,height:0};return arguments.length>=4&&(n.rank=r,n.order=i),Aa(t,"border",n,e)}function py(t){return bs(sr(t.nodes(),function(e){var r=t.node(e).rank;if(!Ze(r))return r}))}function j9(t,e){var r={lhs:[],rhs:[]};return kt(t,function(i){e(i)?r.lhs.push(i):r.rhs.push(i)}),r}function $9(t,e){var r=r2();try{return e()}finally{console.log(t+" time: "+(r2()-r)+"ms")}}function X9(t,e){return e()}function K9(t){function e(r){var i=t.children(r),n=t.node(r);if(i.length&&kt(i,e),_e(n,"minRank")){n.borderLeft=[],n.borderRight=[];for(var s=n.minRank,a=n.maxRank+1;s<a;++s)c2(t,"borderLeft","_bl",r,n,s),c2(t,"borderRight","_br",r,n,s)}}kt(t.children(),e)}function c2(t,e,r,i,n,s){var a={width:0,height:0,rank:s,borderType:e},o=n[e][s-1],l=Aa(t,"border",a,r);n[e][s]=l,t.setParent(l,i),o&&t.setEdge(o,l,{weight:1})}function Z9(t){var e=t.graph().rankdir.toLowerCase();(e==="lr"||e==="rl")&&gy(t)}function Q9(t){var e=t.graph().rankdir.toLowerCase();(e==="bt"||e==="rl")&&J9(t),(e==="lr"||e==="rl")&&(tS(t),gy(t))}function gy(t){kt(t.nodes(),function(e){u2(t.node(e))}),kt(t.edges(),function(e){u2(t.edge(e))})}function u2(t){var e=t.width;t.width=t.height,t.height=e}function J9(t){kt(t.nodes(),function(e){fh(t.node(e))}),kt(t.edges(),function(e){var r=t.edge(e);kt(r.points,fh),_e(r,"y")&&fh(r)})}function fh(t){t.y=-t.y}function tS(t){kt(t.nodes(),function(e){ph(t.node(e))}),kt(t.edges(),function(e){var r=t.edge(e);kt(r.points,ph),_e(r,"x")&&ph(r)})}function ph(t){var e=t.x;t.x=t.y,t.y=e}function eS(t){var e=Aa(t,"root",{},"_root"),r=rS(t),i=bs(gn(r))-1,n=2*i+1;t.graph().nestingRoot=e,kt(t.edges(),function(a){t.edge(a).minlen*=n});var s=iS(t)+1;kt(t.children(),function(a){yy(t,e,n,s,i,r,a)}),t.graph().nodeRankFactor=n}function yy(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=l2(t,"_bt"),u=l2(t,"_bb"),d=t.node(a);t.setParent(l,a),d.borderTop=l,t.setParent(u,a),d.borderBottom=u,kt(o,function(f){yy(t,e,r,i,n,s,f);var p=t.node(f),g=p.borderTop?p.borderTop:f,_=p.borderBottom?p.borderBottom:f,k=p.borderTop?i:2*i,w=g!==_?1:n-s[a]+1;t.setEdge(l,g,{weight:k,minlen:w,nestingEdge:!0}),t.setEdge(_,u,{weight:k,minlen:w,nestingEdge:!0})}),t.parent(a)||t.setEdge(e,l,{weight:0,minlen:n+s[a]})}function rS(t){var e={};function r(i,n){var s=t.children(i);s&&s.length&&kt(s,function(a){r(a,n+1)}),e[i]=n}return kt(t.children(),function(i){r(i,1)}),e}function iS(t){return Go(t.edges(),function(e,r){return e+t.edge(r).weight},0)}function nS(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,kt(t.edges(),function(r){var i=t.edge(r);i.nestingEdge&&t.removeEdge(r)})}function sS(t,e,r){var i={},n;kt(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 aS(t,e,r){var i=oS(t),n=new or({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(s){return t.node(s)});return kt(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),kt(t[r](s),function(l){var u=l.v===s?l.w:l.v,d=n.edge(u,s),f=Ze(d)?0:d.weight;n.setEdge(u,s,{weight:t.edge(l).weight+f})}),_e(a,"minRank")&&n.setNode(s,{borderLeft:a.borderLeft[e],borderRight:a.borderRight[e]}))}),n}function oS(t){for(var e;t.hasNode(e=gu("_root")););return e}function lS(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,sr(r,function(u,d){return d})),n=Sa(sr(e,function(u){return qo(sr(t.outEdges(u),function(d){return{pos:i[d.w],weight:t.edge(d).weight}}),"pos")})),s=1;s<r.length;)s<<=1;var a=2*s-1;s-=1;var o=sr(new Array(a),function(){return 0}),l=0;return kt(n.forEach(function(u){var d=u.pos+s;o[d]+=u.weight;for(var f=0;d>0;)d%2&&(f+=o[d+1]),d=d-1>>1,o[d]+=u.weight;l+=u.weight*f})),l}function uS(t){var e={},r=hn(t.nodes(),function(o){return!t.children(o).length}),i=bs(sr(r,function(o){return t.node(o).rank})),n=sr(_s(i+1),function(){return[]});function s(o){if(!_e(e,o)){e[o]=!0;var l=t.node(o);n[l.rank].push(o),kt(t.successors(o),s)}}var a=qo(r,function(o){return t.node(o).rank});return kt(a,s),n}function hS(t,e){return sr(e,function(r){var i=t.inEdges(r);if(i.length){var n=Go(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 dS(t,e){var r={};kt(t,function(n,s){var a=r[n.v]={indegree:0,in:[],out:[],vs:[n.v],i:s};Ze(n.barycenter)||(a.barycenter=n.barycenter,a.weight=n.weight)}),kt(e.edges(),function(n){var s=r[n.v],a=r[n.w];!Ze(s)&&!Ze(a)&&(a.indegree++,s.out.push(r[n.w]))});var i=hn(r,function(n){return!n.indegree});return fS(i)}function fS(t){var e=[];function r(s){return function(a){a.merged||(Ze(a.barycenter)||Ze(s.barycenter)||a.barycenter>=s.barycenter)&&pS(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),kt(n.in.reverse(),r(n)),kt(n.out,i(n))}return sr(hn(e,function(s){return!s.merged}),function(s){return To(s,["vs","i","barycenter","weight"])})}function pS(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 gS(t,e){var r=j9(t,function(d){return _e(d,"barycenter")}),i=r.lhs,n=qo(r.rhs,function(d){return-d.i}),s=[],a=0,o=0,l=0;i.sort(yS(!!e)),l=h2(s,n,l),kt(i,function(d){l+=d.vs.length,s.push(d.vs),a+=d.barycenter*d.weight,o+=d.weight,l=h2(s,n,l)});var u={vs:Sa(s)};return o&&(u.barycenter=a/o,u.weight=o),u}function h2(t,e,r){for(var i;e.length&&(i=yc(e)).i<=r;)e.pop(),t.push(i.vs),r++;return r}function yS(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 my(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=hn(n,function(_){return _!==a&&_!==o}));var u=hS(t,n);kt(u,function(_){if(t.children(_.v).length){var k=my(t,_.v,r,i);l[_.v]=k,_e(k,"barycenter")&&bS(_,k)}});var d=dS(u,r);mS(d,l);var f=gS(d,i);if(a&&(f.vs=Sa([a,f.vs,o]),t.predecessors(a).length)){var p=t.node(t.predecessors(a)[0]),g=t.node(t.predecessors(o)[0]);_e(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+p.order+g.order)/(f.weight+2),f.weight+=2}return f}function mS(t,e){kt(t,function(r){r.vs=Sa(r.vs.map(function(i){return e[i]?e[i].vs:i}))})}function bS(t,e){Ze(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 _S(t){var e=py(t),r=d2(t,_s(1,e+1),"inEdges"),i=d2(t,_s(e-1,-1,-1),"outEdges"),n=uS(t);f2(t,n);for(var s=Number.POSITIVE_INFINITY,a,o=0,l=0;l<4;++o,++l){xS(o%2?r:i,o%4>=2),n=yu(t);var u=lS(t,n);u<s&&(l=0,a=XE(n),s=u)}f2(t,a)}function d2(t,e,r){return sr(e,function(i){return aS(t,i,r)})}function xS(t,e){var r=new or;kt(t,function(i){var n=i.graph().root,s=my(i,n,r,e);kt(s.vs,function(a,o){i.node(a).order=o}),sS(i,r,s.vs)})}function f2(t,e){kt(e,function(r){kt(r,function(i,n){t.node(i).order=n})})}function vS(t){var e=wS(t);kt(t.graph().dummyChains,function(r){for(var i=t.node(r),n=i.edgeObj,s=kS(t,e,n.v,n.w),a=s.path,o=s.lca,l=0,u=a[l],d=!0;r!==n.w;){if(i=t.node(r),d){for(;(u=a[l])!==o&&t.node(u).maxRank<i.rank;)l++;u===o&&(d=!1)}if(!d){for(;l<a.length-1&&t.node(u=a[l+1]).minRank<=i.rank;)l++;u=a[l]}t.setParent(r,u),r=t.successors(r)[0]}})}function kS(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,u;l=r;do l=t.parent(l),n.push(l);while(l&&(e[l].low>a||o>e[l].lim));for(u=l,l=i;(l=t.parent(l))!==u;)s.push(l);return{path:n.concat(s.reverse()),lca:u}}function wS(t){var e={},r=0;function i(n){var s=r;kt(t.children(n),i),e[n]={low:s,lim:r++}}return kt(t.children(),i),e}function TS(t,e){var r={};function i(n,s){var a=0,o=0,l=n.length,u=yc(s);return kt(s,function(d,f){var p=CS(t,d),g=p?t.node(p).order:l;(p||d===u)&&(kt(s.slice(o,f+1),function(_){kt(t.predecessors(_),function(k){var w=t.node(k),S=w.order;(S<a||g<S)&&!(w.dummy&&t.node(_).dummy)&&by(r,k,_)})}),o=f+1,a=g)}),s}return Go(e,i),r}function ES(t,e){var r={};function i(s,a,o,l,u){var d;kt(_s(a,o),function(f){d=s[f],t.node(d).dummy&&kt(t.predecessors(d),function(p){var g=t.node(p);g.dummy&&(g.order<l||g.order>u)&&by(r,p,d)})})}function n(s,a){var o=-1,l,u=0;return kt(a,function(d,f){if(t.node(d).dummy==="border"){var p=t.predecessors(d);p.length&&(l=t.node(p[0]).order,i(a,u,f,o,l),u=f,o=l)}i(a,u,a.length,l,s.length)}),a}return Go(e,n),r}function CS(t,e){if(t.node(e).dummy)return f0(t.predecessors(e),function(r){return t.node(r).dummy})}function by(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 SS(t,e,r){if(e>r){var i=e;e=r,r=i}return _e(t[e],r)}function AS(t,e,r,i){var n={},s={},a={};return kt(e,function(o){kt(o,function(l,u){n[l]=l,s[l]=l,a[l]=u})}),kt(e,function(o){var l=-1;kt(o,function(u){var d=i(u);if(d.length){d=qo(d,function(k){return a[k]});for(var f=(d.length-1)/2,p=Math.floor(f),g=Math.ceil(f);p<=g;++p){var _=d[p];s[u]===u&&l<a[_]&&!SS(r,u,_)&&(s[_]=u,s[u]=n[u]=n[_],l=a[_])}}})}),{root:n,align:s}}function LS(t,e,r,i,n){var s={},a=DS(t,e,r,n),o=n?"borderLeft":"borderRight";function l(f,p){for(var g=a.nodes(),_=g.pop(),k={};_;)k[_]?f(_):(k[_]=!0,g.push(_),g=g.concat(p(_))),_=g.pop()}function u(f){s[f]=a.inEdges(f).reduce(function(p,g){return Math.max(p,s[g.v]+a.edge(g))},0)}function d(f){var p=a.outEdges(f).reduce(function(_,k){return Math.min(_,s[k.w]-a.edge(k))},Number.POSITIVE_INFINITY),g=t.node(f);p!==Number.POSITIVE_INFINITY&&g.borderType!==o&&(s[f]=Math.max(s[f],p))}return l(u,a.predecessors.bind(a)),l(d,a.successors.bind(a)),kt(i,function(f){s[f]=s[r[f]]}),s}function DS(t,e,r,i){var n=new or,s=t.graph(),a=OS(s.nodesep,s.edgesep,i);return kt(e,function(o){var l;kt(o,function(u){var d=r[u];if(n.setNode(d),l){var f=r[l],p=n.edge(f,d);n.setEdge(f,d,Math.max(a(t,u,l),p||0))}l=u})}),n}function MS(t,e){return g0(gn(e),function(r){var i=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY;return ZC(r,function(s,a){var o=RS(t,a)/2;i=Math.max(s+o,i),n=Math.min(s-o,n)}),i-n})}function NS(t,e){var r=gn(e),i=wo(r),n=bs(r);kt(["u","d"],function(s){kt(["l","r"],function(a){var o=s+a,l=t[o],u;if(l!==e){var d=gn(l);u=a==="l"?i-wo(d):n-bs(d),u&&(t[o]=pu(l,function(f){return f+u}))}})})}function BS(t,e){return pu(t.ul,function(r,i){if(e)return t[e.toLowerCase()][i];var n=qo(sr(t,i));return(n[1]+n[2])/2})}function IS(t){var e=yu(t),r=r1(TS(t,e),ES(t,e)),i={},n;kt(["u","d"],function(a){n=a==="u"?e:gn(e).reverse(),kt(["l","r"],function(o){o==="r"&&(n=sr(n,function(f){return gn(f).reverse()}));var l=(a==="u"?t.predecessors:t.successors).bind(t),u=AS(t,n,r,l),d=LS(t,n,u.root,u.align,o==="r");o==="r"&&(d=pu(d,function(f){return-f})),i[a+o]=d})});var s=MS(t,i);return NS(i,s),BS(i,t.graph().align)}function OS(t,e,r){return function(i,n,s){var a=i.node(n),o=i.node(s),l=0,u;if(l+=a.width/2,_e(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":u=-a.width/2;break;case"r":u=a.width/2;break}if(u&&(l+=r?u:-u),u=0,l+=(a.dummy?e:t)/2,l+=(o.dummy?e:t)/2,l+=o.width/2,_e(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":u=o.width/2;break;case"r":u=-o.width/2;break}return u&&(l+=r?u:-u),u=0,l}}function RS(t,e){return t.node(e).width}function FS(t){t=fy(t),PS(t),kt(IS(t),function(e,r){t.node(r).x=e})}function PS(t){var e=yu(t),r=t.graph().ranksep,i=0;kt(e,function(n){var s=bs(sr(n,function(a){return t.node(a).height}));kt(n,function(a){t.node(a).y=i+s/2}),i+=s+r})}function La(t,e){var r=e&&e.debugTiming?$9:X9;r("layout",function(){var i=r(" buildLayoutGraph",function(){return XS(t)});r(" runLayout",function(){YS(i,r)}),r(" updateInputGraph",function(){VS(t,i)})})}function YS(t,e){e(" makeSpaceForEdgeLabels",function(){KS(t)}),e(" removeSelfEdges",function(){sA(t)}),e(" acyclic",function(){U9(t)}),e(" nestingGraph.run",function(){eS(t)}),e(" rank",function(){xA(fy(t))}),e(" injectEdgeLabelProxies",function(){ZS(t)}),e(" removeEmptyRanks",function(){q9(t)}),e(" nestingGraph.cleanup",function(){nS(t)}),e(" normalizeRanks",function(){G9(t)}),e(" assignRankMinMax",function(){QS(t)}),e(" removeEdgeLabelProxies",function(){JS(t)}),e(" normalize.run",function(){lA(t)}),e(" parentDummyChains",function(){vS(t)}),e(" addBorderSegments",function(){K9(t)}),e(" order",function(){_S(t)}),e(" insertSelfEdges",function(){aA(t)}),e(" adjustCoordinateSystem",function(){Z9(t)}),e(" position",function(){FS(t)}),e(" positionSelfEdges",function(){oA(t)}),e(" removeBorderNodes",function(){nA(t)}),e(" normalize.undo",function(){uA(t)}),e(" fixupEdgeLabelCoords",function(){rA(t)}),e(" undoCoordinateSystem",function(){Q9(t)}),e(" translateGraph",function(){tA(t)}),e(" assignNodeIntersects",function(){eA(t)}),e(" reversePoints",function(){iA(t)}),e(" acyclic.undo",function(){W9(t)})}function VS(t,e){kt(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))}),kt(t.edges(),function(r){var i=t.edge(r),n=e.edge(r);i.points=n.points,_e(n,"x")&&(i.x=n.x,i.y=n.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}var US=["nodesep","edgesep","ranksep","marginx","marginy"],zS={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},WS=["acyclicer","ranker","rankdir","align"],HS=["width","height"],GS={width:0,height:0},qS=["minlen","weight","width","height","labeloffset"],jS={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},$S=["labelpos"];function XS(t){var e=new or({multigraph:!0,compound:!0}),r=yh(t.graph());return e.setGraph(r1({},zS,gh(r,US),To(r,WS))),kt(t.nodes(),function(i){var n=yh(t.node(i));e.setNode(i,Ys(gh(n,HS),GS)),e.setParent(i,t.parent(i))}),kt(t.edges(),function(i){var n=yh(t.edge(i));e.setEdge(i,r1({},jS,gh(n,qS),To(n,$S)))}),e}function KS(t){var e=t.graph();e.ranksep/=2,kt(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 ZS(t){kt(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};Aa(t,"edge-proxy",s,"_ep")}})}function QS(t){var e=0;kt(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=bs(e,i.maxRank))}),t.graph().maxRank=e}function JS(t){kt(t.nodes(),function(e){var r=t.node(e);r.dummy==="edge-proxy"&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}function tA(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(u){var d=u.x,f=u.y,p=u.width,g=u.height;e=Math.min(e,d-p/2),r=Math.max(r,d+p/2),i=Math.min(i,f-g/2),n=Math.max(n,f+g/2)}kt(t.nodes(),function(u){l(t.node(u))}),kt(t.edges(),function(u){var d=t.edge(u);_e(d,"x")&&l(d)}),e-=a,i-=o,kt(t.nodes(),function(u){var d=t.node(u);d.x-=e,d.y-=i}),kt(t.edges(),function(u){var d=t.edge(u);kt(d.points,function(f){f.x-=e,f.y-=i}),_e(d,"x")&&(d.x-=e),_e(d,"y")&&(d.y-=i)}),s.width=r-e+a,s.height=n-i+o}function eA(t){kt(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(o2(i,s)),r.points.push(o2(n,a))})}function rA(t){kt(t.edges(),function(e){var r=t.edge(e);if(_e(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 iA(t){kt(t.edges(),function(e){var r=t.edge(e);r.reversed&&r.points.reverse()})}function nA(t){kt(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(yc(r.borderLeft)),a=t.node(yc(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}}),kt(t.nodes(),function(e){t.node(e).dummy==="border"&&t.removeNode(e)})}function sA(t){kt(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 aA(t){var e=yu(t);kt(e,function(r){var i=0;kt(r,function(n,s){var a=t.node(n);a.order=s+i,kt(a.selfEdges,function(o){Aa(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 oA(t){kt(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 gh(t,e){return pu(To(t,e),Number)}function yh(t){var e={};return kt(t,function(r,i){e[i.toLowerCase()]=r}),e}function lA(t){t.graph().dummyChains=[],kt(t.edges(),function(e){cA(t,e)})}function cA(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 u,d,f;for(f=0,++i;i<s;++f,++i)o.points=[],d={width:0,height:0,edgeLabel:o,edgeObj:e,rank:i},u=Aa(t,"edge",d,"_d"),i===l&&(d.width=o.width,d.height=o.height,d.dummy="edge-label",d.labelpos=o.labelpos),t.setEdge(r,u,{weight:o.weight},a),f===0&&t.graph().dummyChains.push(u),r=u;t.setEdge(r,n,{weight:o.weight},a)}}function uA(t){kt(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 y0(t){var e={};function r(i){var n=t.node(i);if(_e(e,i))return n.rank;e[i]=!0;var s=wo(sr(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}kt(t.sources(),r)}function Eo(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}function _y(t){var e=new or({directed:!1}),r=t.nodes()[0],i=t.nodeCount();e.setNode(r,{});for(var n,s;hA(e,t)<i;)n=dA(e,t),s=e.hasNode(n.v)?Eo(t,n):-Eo(t,n),fA(e,t,s);return e}function hA(t,e){function r(i){kt(e.nodeEdges(i),function(n){var s=n.v,a=i===s?n.w:s;!t.hasNode(a)&&!Eo(e,n)&&(t.setNode(a,{}),t.setEdge(i,a,{}),r(a))})}return kt(t.nodes(),r),t.nodeCount()}function dA(t,e){return g0(e.edges(),function(r){if(t.hasNode(r.v)!==t.hasNode(r.w))return Eo(e,r)})}function fA(t,e,r){kt(t.nodes(),function(i){e.node(i).rank+=r})}function pA(){}pA.prototype=new Error;function xy(t,e,r){ar(e)||(e=[e]);var i=(t.isDirected()?t.successors:t.neighbors).bind(t),n=[],s={};return kt(e,function(a){if(!t.hasNode(a))throw new Error("Graph does not have node: "+a);vy(t,a,r==="post",s,i,n)}),n}function vy(t,e,r,i,n,s){_e(i,e)||(i[e]=!0,r||s.push(e),kt(n(e),function(a){vy(t,a,r,i,n,s)}),r&&s.push(e))}function gA(t,e){return xy(t,e,"post")}function yA(t,e){return xy(t,e,"pre")}Ns.initLowLimValues=b0;Ns.initCutValues=m0;Ns.calcCutValue=ky;Ns.leaveEdge=Ty;Ns.enterEdge=Ey;Ns.exchangeEdges=Cy;function Ns(t){t=H9(t),y0(t);var e=_y(t);b0(e),m0(e,t);for(var r,i;r=Ty(e);)i=Ey(e,t,r),Cy(e,t,r,i)}function m0(t,e){var r=gA(t,t.nodes());r=r.slice(0,r.length-1),kt(r,function(i){mA(t,e,i)})}function mA(t,e,r){var i=t.node(r),n=i.parent;t.edge(r,n).cutvalue=ky(t,e,r)}function ky(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,kt(e.nodeEdges(r),function(l){var u=l.v===r,d=u?l.w:l.v;if(d!==n){var f=u===s,p=e.edge(l).weight;if(o+=f?p:-p,_A(t,r,d)){var g=t.edge(r,d).cutvalue;o+=f?-g:g}}}),o}function b0(t,e){arguments.length<2&&(e=t.nodes()[0]),wy(t,{},1,e)}function wy(t,e,r,i,n){var s=r,a=t.node(i);return e[i]=!0,kt(t.neighbors(i),function(o){_e(e,o)||(r=wy(t,e,r,o,i))}),a.low=s,a.lim=r++,n?a.parent=n:delete a.parent,r}function Ty(t){return f0(t.edges(),function(e){return t.edge(e).cutvalue<0})}function Ey(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 u=hn(e.edges(),function(d){return l===p2(t,t.node(d.v),o)&&l!==p2(t,t.node(d.w),o)});return g0(u,function(d){return Eo(e,d)})}function Cy(t,e,r,i){var n=r.v,s=r.w;t.removeEdge(n,s),t.setEdge(i.v,i.w,{}),b0(t),m0(t,e),bA(t,e)}function bA(t,e){var r=f0(t.nodes(),function(n){return!e.node(n).parent}),i=yA(t,r);i=i.slice(1),kt(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 _A(t,e,r){return t.hasEdge(e,r)}function p2(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}function xA(t){switch(t.graph().ranker){case"network-simplex":g2(t);break;case"tight-tree":kA(t);break;case"longest-path":vA(t);break;default:g2(t)}}var vA=y0;function kA(t){y0(t),_y(t)}function g2(t){Ns(t)}function dn(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:wA(t),edges:TA(t)};return Ze(t.graph())||(e.value=qE(t.graph())),e}function wA(t){return sr(t.nodes(),function(e){var r=t.node(e),i=t.parent(e),n={v:e};return Ze(r)||(n.value=r),Ze(i)||(n.parent=i),n})}function TA(t){return sr(t.edges(),function(e){var r=t.edge(e),i={v:e.v,w:e.w};return Ze(e.name)||(i.name=e.name),Ze(r)||(i.value=r),i})}function Sy(t,e){return!!t.children(e).length}function Ay(t){return mh(t.v)+":"+mh(t.w)+":"+mh(t.name)}var EA=/:/g;function mh(t){return t?String(t).replace(EA,"\\:"):""}function Hi(t,e){e&&t.attr("style",e)}function Ly(t,e,r){e&&t.attr("class",e).attr("class",r+" "+t.attr("class"))}function _i(t,e){var r=e.graph();if(zg(r)){var i=r.transition;if(ca(i))return i(t)}return t}var n1={normal:SA,vee:AA,undirected:LA};function CA(t){n1=t}function SA(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");Hi(s,r[i+"Style"]),r[i+"Class"]&&s.attr("class",r[i+"Class"])}function AA(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");Hi(s,r[i+"Style"]),r[i+"Class"]&&s.attr("class",r[i+"Class"])}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 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");Hi(s,r[i+"Style"]),r[i+"Class"]&&s.attr("class",r[i+"Class"])}function _0(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)}Hi(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 DA(t,e){var r=t;return r.node().appendChild(e.label),Hi(r,e.labelStyle),r}function MA(t,e){for(var r=t.append("text"),i=NA(e.label).split(`
|
|
7
|
-
`),n=0;n<i.length;n++)r.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(i[n]);return Hi(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+=`
|
|
8
|
-
`;break;default:e+=i}r=!1}else i==="\\"?r=!0:e+=i;return e}function x0(t,e,r){var i=e.label,n=t.append("g");e.labelType==="svg"?DA(n,e):typeof i!="string"||e.labelType==="html"?_0(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 s1=function(t,e){var r=e.nodes().filter(function(s){return Sy(e,s)}),i=t.selectAll("g.cluster").data(r,function(s){return s});_i(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=At(this);At(this).append("rect");var l=o.append("g").attr("class","label");x0(l,a,a.clusterLabelPos)});return i=i.merge(n),i=_i(i,e).style("opacity",1),i.selectAll("rect").each(function(s){var a=e.node(s),o=At(this);Hi(o,a.style)}),i};function BA(t){s1=t}let a1=function(t,e){var r=t.selectAll("g.edgeLabel").data(e.edges(),function(n){return Ay(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=At(this);s.select(".label").remove();var a=e.edge(n),o=x0(s,e.edge(n),0).classed("label",!0),l=o.node().getBBox();a.labelId&&o.attr("id",a.labelId),_e(a,"width")||(a.width=l.width),_e(a,"height")||(a.height=l.height)});var i;return r.exit?i=r.exit():i=r.selectAll(null),_i(i,e).style("opacity",0).remove(),r};function IA(t){a1=t}function y2(t,e){return t.intersect(e)}var o1=function(t,e,r){var i=t.selectAll("g.edgePath").data(e.edges(),function(a){return Ay(a)}).classed("update",!0),n=YA(i,e);VA(i,e);var s=i.merge!==void 0?i.merge(n):i;return _i(s,e).style("opacity",1),s.each(function(a){var o=At(this),l=e.edge(a);l.elem=this,l.id&&o.attr("id",l.id),Ly(o,l.class,(o.classed("update")?"update ":"")+"edgePath")}),s.selectAll("path.path").each(function(a){var o=e.edge(a);o.arrowheadId=gu("arrowhead");var l=At(this).attr("marker-end",function(){return"url("+RA(location.href,o.arrowheadId)+")"}).style("fill","none");_i(l,e).attr("d",function(u){return FA(e,u)}),Hi(l,o.style)}),s.selectAll("defs *").remove(),s.selectAll("defs").each(function(a){var o=e.edge(a),l=r[o.arrowhead];l(At(this),o.arrowheadId,o,"arrowhead")}),s};function OA(t){o1=t}function RA(t,e){var r=t.split("#")[0];return r+"#"+e}function FA(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(y2(i,s[0])),s.push(y2(n,s[s.length-1])),Dy(r,s)}function Dy(t,e){var r=(Ta||uv.line)().x(function(i){return i.x}).y(function(i){return i.y});return(r.curve||r.interpolate)(t.curve),r(e)}function PA(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 YA(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=_s(n.points.length).map(function(){return PA(s)});return Dy(n,a)}),r.append("defs"),r}function VA(t,e){var r=t.exit();_i(r,e).style("opacity",0).remove()}var l1=function(t,e,r){var i=e.nodes().filter(function(a){return!Sy(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=At(this);Ly(l,o.class,(l.classed("update")?"update ":"")+"node"),l.select("g.label").remove();var u=l.append("g").attr("class","label"),d=x0(u,o),f=r[o.shape],p=To(d.node().getBBox(),"width","height");o.elem=this,o.id&&l.attr("id",o.id),o.labelId&&u.attr("id",o.labelId),_e(o,"width")&&(p.width=o.width),_e(o,"height")&&(p.height=o.height),p.width+=o.paddingLeft+o.paddingRight,p.height+=o.paddingTop+o.paddingBottom,u.attr("transform","translate("+(o.paddingLeft-o.paddingRight)/2+","+(o.paddingTop-o.paddingBottom)/2+")");var g=At(this);g.select(".label-container").remove();var _=f(g,p,o).classed("label-container",!0);Hi(_,o.style);var k=_.node().getBBox();o.width=k.width,o.height=k.height});var s;return n.exit?s=n.exit():s=n.selectAll(null),_i(s,e).style("opacity",0).remove(),n};function UA(t){l1=t}function zA(t,e){var r=t.filter(function(){return!At(this).classed("update")});function i(n){var s=e.node(n);return"translate("+s.x+","+s.y+")"}r.attr("transform",i),_i(t,e).style("opacity",1).attr("transform",i),_i(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 WA(t,e){var r=t.filter(function(){return!At(this).classed("update")});function i(n){var s=e.edge(n);return _e(s,"x")?"translate("+s.x+","+s.y+")":""}r.attr("transform",i),_i(t,e).style("opacity",1).attr("transform",i)}function HA(t,e){var r=t.filter(function(){return!At(this).classed("update")});function i(n){var s=e.node(n);return"translate("+s.x+","+s.y+")"}r.attr("transform",i),_i(t,e).style("opacity",1).attr("transform",i)}function My(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),u=Math.abs(e*r*a/l);i.x<n&&(u=-u);var d=Math.abs(e*r*o/l);return i.y<s&&(d=-d),{x:n+u,y:s+d}}function GA(t,e,r){return My(t,e,e,r)}function qA(t,e,r,i){var n,s,a,o,l,u,d,f,p,g,_,k,w,S,A;if(n=e.y-t.y,a=t.x-e.x,l=e.x*t.y-t.x*e.y,p=n*r.x+a*r.y+l,g=n*i.x+a*i.y+l,!(p!==0&&g!==0&&m2(p,g))&&(s=i.y-r.y,o=r.x-i.x,u=i.x*r.y-r.x*i.y,d=s*t.x+o*t.y+u,f=s*e.x+o*e.y+u,!(d!==0&&f!==0&&m2(d,f))&&(_=n*o-s*a,_!==0)))return k=Math.abs(_/2),w=a*u-o*l,S=w<0?(w-k)/_:(w+k)/_,w=s*l-n*u,A=w<0?(w-k)/_:(w+k)/_,{x:S,y:A}}function m2(t,e){return t*e>0}function Gi(t,e,r){var i=t.x,n=t.y,s=[],a=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;e.forEach(function(_){a=Math.min(a,_.x),o=Math.min(o,_.y)});for(var l=i-t.width/2-a,u=n-t.height/2-o,d=0;d<e.length;d++){var f=e[d],p=e[d<e.length-1?d+1:0],g=qA(t,r,{x:l+f.x,y:u+f.y},{x:l+p.x,y:u+p.y});g&&s.push(g)}return s.length?(s.length>1&&s.sort(function(_,k){var w=_.x-r.x,S=_.y-r.y,A=Math.sqrt(w*w+S*S),O=k.x-r.x,P=k.y-r.y,W=Math.sqrt(O*O+P*P);return A<W?-1:A===W?0:1}),s[0]):(console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t)}function v0(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,u;return Math.abs(s)*a>Math.abs(n)*o?(s<0&&(o=-o),l=s===0?0:o*n/s,u=o):(n<0&&(a=-a),l=a,u=n===0?0:a*s/n),{x:r+l,y:i+u}}var c1={rect:$A,ellipse:XA,circle:KA,diamond:ZA};function jA(t){c1=t}function $A(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 v0(r,n)},i}function XA(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 My(r,i,n,a)},s}function KA(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 GA(r,i,s)},n}function ZA(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 Gi(r,s,o)},a}function QA(){var t=function(e,r){eL(r);var i=Ya(e,"output"),n=Ya(i,"clusters"),s=Ya(i,"edgePaths"),a=a1(Ya(i,"edgeLabels"),r),o=l1(Ya(i,"nodes"),r,c1);La(r),HA(o,r),WA(a,r),o1(s,r,n1);var l=s1(n,r);zA(l,r),rL(r)};return t.createNodes=function(e){return arguments.length?(UA(e),t):l1},t.createClusters=function(e){return arguments.length?(BA(e),t):s1},t.createEdgeLabels=function(e){return arguments.length?(IA(e),t):a1},t.createEdgePaths=function(e){return arguments.length?(OA(e),t):o1},t.shapes=function(e){return arguments.length?(jA(e),t):c1},t.arrows=function(e){return arguments.length?(CA(e),t):n1},t}var JA={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},tL={arrowhead:"normal",curve:jr};function eL(t){t.nodes().forEach(function(e){var r=t.node(e);!_e(r,"label")&&!t.children(e).length&&(r.label=e),_e(r,"paddingX")&&Ys(r,{paddingLeft:r.paddingX,paddingRight:r.paddingX}),_e(r,"paddingY")&&Ys(r,{paddingTop:r.paddingY,paddingBottom:r.paddingY}),_e(r,"padding")&&Ys(r,{paddingLeft:r.padding,paddingRight:r.padding,paddingTop:r.padding,paddingBottom:r.padding}),Ys(r,JA),kt(["paddingLeft","paddingRight","paddingTop","paddingBottom"],function(i){r[i]=Number(r[i])}),_e(r,"width")&&(r._prevWidth=r.width),_e(r,"height")&&(r._prevHeight=r.height)}),t.edges().forEach(function(e){var r=t.edge(e);_e(r,"label")||(r.label=""),Ys(r,tL)})}function rL(t){kt(t.nodes(),function(e){var r=t.node(e);_e(r,"_prevWidth")?r.width=r._prevWidth:delete r.width,_e(r,"_prevHeight")?r.height=r._prevHeight:delete r.height,delete r._prevWidth,delete r._prevHeight})}function Ya(t,e){var r=t.select("g."+e);return r.empty()&&(r=t.append("g").attr("class",e)),r}var iL=Object.defineProperty,nL=(t,e,r)=>e in t?iL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Va=(t,e,r)=>(nL(t,typeof e!="symbol"?e+"":e,r),r);const Qi={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},B={trace:(...t)=>{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},k0=function(t="fatal"){let e=Qi.fatal;typeof t=="string"?(t=t.toLowerCase(),t in Qi&&(e=Qi[t])):typeof t=="number"&&(e=t),B.trace=()=>{},B.debug=()=>{},B.info=()=>{},B.warn=()=>{},B.error=()=>{},B.fatal=()=>{},e<=Qi.fatal&&(B.fatal=console.error?console.error.bind(console,Kr("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Kr("FATAL"))),e<=Qi.error&&(B.error=console.error?console.error.bind(console,Kr("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Kr("ERROR"))),e<=Qi.warn&&(B.warn=console.warn?console.warn.bind(console,Kr("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Kr("WARN"))),e<=Qi.info&&(B.info=console.info?console.info.bind(console,Kr("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Kr("INFO"))),e<=Qi.debug&&(B.debug=console.debug?console.debug.bind(console,Kr("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Kr("DEBUG"))),e<=Qi.trace&&(B.trace=console.debug?console.debug.bind(console,Kr("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Kr("TRACE")))},Kr=t=>`%c${mi().format("ss.SSS")} : ${t} : `,sL=t=>t?By(t).replace(/\\n/g,"#br#").split("#br#"):[""],Ny=t=>bo.sanitize(t),b2=(t,e)=>{var r;if(((r=e.flowchart)==null?void 0:r.htmlLabels)!==!1){const i=e.securityLevel;i==="antiscript"||i==="strict"?t=Ny(t):i!=="loose"&&(t=By(t),t=t.replace(/</g,"<").replace(/>/g,">"),t=t.replace(/=/g,"="),t=cL(t))}return t},xi=(t,e)=>t&&(e.dompurifyConfig?t=bo.sanitize(b2(t,e),e.dompurifyConfig).toString():t=bo.sanitize(b2(t,e),{FORBID_TAGS:["style"]}).toString(),t),aL=(t,e)=>typeof t=="string"?xi(t,e):t.flat().map(r=>xi(r,e)),mu=/<br\s*\/?>/gi,oL=t=>mu.test(t),lL=t=>t.split(mu),cL=t=>t.replace(/#br#/g,"<br/>"),By=t=>t.replace(mu,"#br#"),uL=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},gr=t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),Yn=function(t){let e=t;return t.includes("~")?(e=e.replace(/~([^~].*)/,"<$1"),e=e.replace(/~([^~]*)$/,">$1"),Yn(e)):e},he={getRows:sL,sanitizeText:xi,sanitizeTextOrArray:aL,hasBreaks:oL,splitBreaks:lL,lineBreakRegex:mu,removeScript:Ny,getUrl:uL,evaluate:gr},Lr=(t,e)=>e?mt(t,{s:-40,l:10}):mt(t,{s:-40,l:-10}),bu="#ffffff",_u="#f2f2f2";class hL{constructor(){this.background="#f4f4f4",this.darkMode=!1,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||mt(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||mt(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Lr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Lr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Lr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Lr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Wt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Wt(this.tertiaryColor),this.lineColor=this.lineColor||Wt(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?pe(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||pe(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Wt(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||se(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||mt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||mt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||mt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||mt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||mt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||mt(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||mt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||mt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||mt(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=pe(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=pe(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||Wt(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||se(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||pe(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||mt(this.primaryColor,{h:64}),this.fillType3=this.fillType3||mt(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||mt(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||mt(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||mt(this.primaryColor,{h:128}),this.fillType7=this.fillType7||mt(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||mt(this.primaryColor,{l:-10}),this.pie5=this.pie5||mt(this.secondaryColor,{l:-10}),this.pie6=this.pie6||mt(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||mt(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||mt(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||mt(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||mt(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||mt(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||mt(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?pe(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||mt(this.primaryColor,{h:-30}),this.git4=this.git4||mt(this.primaryColor,{h:-60}),this.git5=this.git5||mt(this.primaryColor,{h:-90}),this.git6=this.git6||mt(this.primaryColor,{h:60}),this.git7=this.git7||mt(this.primaryColor,{h:120}),this.darkMode?(this.git0=se(this.git0,25),this.git1=se(this.git1,25),this.git2=se(this.git2,25),this.git3=se(this.git3,25),this.git4=se(this.git4,25),this.git5=se(this.git5,25),this.git6=se(this.git6,25),this.git7=se(this.git7,25)):(this.git0=pe(this.git0,25),this.git1=pe(this.git1,25),this.git2=pe(this.git2,25),this.git3=pe(this.git3,25),this.git4=pe(this.git4,25),this.git5=pe(this.git5,25),this.git6=pe(this.git6,25),this.git7=pe(this.git7,25)),this.gitInv0=this.gitInv0||Wt(this.git0),this.gitInv1=this.gitInv1||Wt(this.git1),this.gitInv2=this.gitInv2||Wt(this.git2),this.gitInv3=this.gitInv3||Wt(this.git3),this.gitInv4=this.gitInv4||Wt(this.git4),this.gitInv5=this.gitInv5||Wt(this.git5),this.gitInv6=this.gitInv6||Wt(this.git6),this.gitInv7=this.gitInv7||Wt(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||bu,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||_u}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 dL=t=>{const e=new hL;return e.calculate(t),e};class fL{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=se(this.primaryColor,16),this.tertiaryColor=mt(this.primaryColor,{h:-160}),this.primaryBorderColor=Wt(this.background),this.secondaryBorderColor=Lr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Lr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Wt(this.primaryColor),this.secondaryTextColor=Wt(this.secondaryColor),this.tertiaryTextColor=Wt(this.tertiaryColor),this.lineColor=Wt(this.background),this.textColor=Wt(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=se(Wt("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=to(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=pe("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.taskBorderColor=to(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=to(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=se(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=se(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=se(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=mt(this.primaryColor,{h:64}),this.fillType3=mt(this.secondaryColor,{h:64}),this.fillType4=mt(this.primaryColor,{h:-64}),this.fillType5=mt(this.secondaryColor,{h:-64}),this.fillType6=mt(this.primaryColor,{h:128}),this.fillType7=mt(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||mt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||mt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||mt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||mt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||mt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||mt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||mt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||mt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||mt(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||Wt(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||se(this["cScale"+e],10);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?pe(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=se(this.secondaryColor,20),this.git1=se(this.pie2||this.secondaryColor,20),this.git2=se(this.pie3||this.tertiaryColor,20),this.git3=se(this.pie4||mt(this.primaryColor,{h:-30}),20),this.git4=se(this.pie5||mt(this.primaryColor,{h:-60}),20),this.git5=se(this.pie6||mt(this.primaryColor,{h:-90}),10),this.git6=se(this.pie7||mt(this.primaryColor,{h:60}),10),this.git7=se(this.pie8||mt(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||Wt(this.git0),this.gitInv1=this.gitInv1||Wt(this.git1),this.gitInv2=this.gitInv2||Wt(this.git2),this.gitInv3=this.gitInv3||Wt(this.git3),this.gitInv4=this.gitInv4||Wt(this.git4),this.gitInv5=this.gitInv5||Wt(this.git5),this.gitInv6=this.gitInv6||Wt(this.git6),this.gitInv7=this.gitInv7||Wt(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||se(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||se(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 pL=t=>{const e=new fL;return e.calculate(t),e};class gL{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=mt(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=mt(this.primaryColor,{h:-160}),this.primaryBorderColor=Lr(this.primaryColor,this.darkMode),this.secondaryBorderColor=Lr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Lr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Wt(this.primaryColor),this.secondaryTextColor=Wt(this.secondaryColor),this.tertiaryTextColor=Wt(this.tertiaryColor),this.lineColor=Wt(this.background),this.textColor=Wt(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=to(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||mt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||mt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||mt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||mt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||mt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||mt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||mt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||mt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||mt(this.primaryColor,{h:330}),this["cScalePeer1"]=this["cScalePeer1"]||pe(this.secondaryColor,45),this["cScalePeer2"]=this["cScalePeer2"]||pe(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=pe(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||pe(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||mt(this["cScale"+e],{h:180});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||Wt(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||Wt(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=se(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=mt(this.primaryColor,{h:64}),this.fillType3=mt(this.secondaryColor,{h:64}),this.fillType4=mt(this.primaryColor,{h:-64}),this.fillType5=mt(this.secondaryColor,{h:-64}),this.fillType6=mt(this.primaryColor,{h:128}),this.fillType7=mt(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||mt(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||mt(this.primaryColor,{l:-10}),this.pie5=this.pie5||mt(this.secondaryColor,{l:-30}),this.pie6=this.pie6||mt(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||mt(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||mt(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||mt(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||mt(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||mt(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||mt(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||mt(this.primaryColor,{h:-30}),this.git4=this.git4||mt(this.primaryColor,{h:-60}),this.git5=this.git5||mt(this.primaryColor,{h:-90}),this.git6=this.git6||mt(this.primaryColor,{h:60}),this.git7=this.git7||mt(this.primaryColor,{h:120}),this.darkMode?(this.git0=se(this.git0,25),this.git1=se(this.git1,25),this.git2=se(this.git2,25),this.git3=se(this.git3,25),this.git4=se(this.git4,25),this.git5=se(this.git5,25),this.git6=se(this.git6,25),this.git7=se(this.git7,25)):(this.git0=pe(this.git0,25),this.git1=pe(this.git1,25),this.git2=pe(this.git2,25),this.git3=pe(this.git3,25),this.git4=pe(this.git4,25),this.git5=pe(this.git5,25),this.git6=pe(this.git6,25),this.git7=pe(this.git7,25)),this.gitInv0=this.gitInv0||pe(Wt(this.git0),25),this.gitInv1=this.gitInv1||Wt(this.git1),this.gitInv2=this.gitInv2||Wt(this.git2),this.gitInv3=this.gitInv3||Wt(this.git3),this.gitInv4=this.gitInv4||Wt(this.git4),this.gitInv5=this.gitInv5||Wt(this.git5),this.gitInv6=this.gitInv6||Wt(this.git6),this.gitInv7=this.gitInv7||Wt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Wt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Wt(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||bu,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||_u}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 yL=t=>{const e=new gL;return e.calculate(t),e};class mL{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=se("#cde498",10),this.primaryBorderColor=Lr(this.primaryColor,this.darkMode),this.secondaryBorderColor=Lr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Lr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Wt(this.primaryColor),this.secondaryTextColor=Wt(this.secondaryColor),this.tertiaryTextColor=Wt(this.primaryColor),this.lineColor=Wt(this.background),this.textColor=Wt(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||mt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||mt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||mt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||mt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||mt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||mt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||mt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||mt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||mt(this.primaryColor,{h:330}),this["cScalePeer1"]=this["cScalePeer1"]||pe(this.secondaryColor,45),this["cScalePeer2"]=this["cScalePeer2"]||pe(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=pe(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||pe(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||mt(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;this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.actorBorder=pe(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=mt(this.primaryColor,{h:64}),this.fillType3=mt(this.secondaryColor,{h:64}),this.fillType4=mt(this.primaryColor,{h:-64}),this.fillType5=mt(this.secondaryColor,{h:-64}),this.fillType6=mt(this.primaryColor,{h:128}),this.fillType7=mt(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||mt(this.primaryColor,{l:-30}),this.pie5=this.pie5||mt(this.secondaryColor,{l:-30}),this.pie6=this.pie6||mt(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||mt(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||mt(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||mt(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||mt(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||mt(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||mt(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||mt(this.primaryColor,{h:-30}),this.git4=this.git4||mt(this.primaryColor,{h:-60}),this.git5=this.git5||mt(this.primaryColor,{h:-90}),this.git6=this.git6||mt(this.primaryColor,{h:60}),this.git7=this.git7||mt(this.primaryColor,{h:120}),this.darkMode?(this.git0=se(this.git0,25),this.git1=se(this.git1,25),this.git2=se(this.git2,25),this.git3=se(this.git3,25),this.git4=se(this.git4,25),this.git5=se(this.git5,25),this.git6=se(this.git6,25),this.git7=se(this.git7,25)):(this.git0=pe(this.git0,25),this.git1=pe(this.git1,25),this.git2=pe(this.git2,25),this.git3=pe(this.git3,25),this.git4=pe(this.git4,25),this.git5=pe(this.git5,25),this.git6=pe(this.git6,25),this.git7=pe(this.git7,25)),this.gitInv0=this.gitInv0||Wt(this.git0),this.gitInv1=this.gitInv1||Wt(this.git1),this.gitInv2=this.gitInv2||Wt(this.git2),this.gitInv3=this.gitInv3||Wt(this.git3),this.gitInv4=this.gitInv4||Wt(this.git4),this.gitInv5=this.gitInv5||Wt(this.git5),this.gitInv6=this.gitInv6||Wt(this.git6),this.gitInv7=this.gitInv7||Wt(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||bu,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||_u}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};class _L{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=se(this.contrast,55),this.background="#ffffff",this.tertiaryColor=mt(this.primaryColor,{h:-160}),this.primaryBorderColor=Lr(this.primaryColor,this.darkMode),this.secondaryBorderColor=Lr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Lr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Wt(this.primaryColor),this.secondaryTextColor=Wt(this.secondaryColor),this.tertiaryTextColor=Wt(this.tertiaryColor),this.lineColor=Wt(this.background),this.textColor=Wt(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=se(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]||Wt(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||se(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||pe(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;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=se(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=se(this.contrast,30),this.sectionBkgColor2=se(this.contrast,30),this.taskBorderColor=pe(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=se(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=pe(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=mt(this.primaryColor,{h:64}),this.fillType3=mt(this.secondaryColor,{h:64}),this.fillType4=mt(this.primaryColor,{h:-64}),this.fillType5=mt(this.secondaryColor,{h:-64}),this.fillType6=mt(this.primaryColor,{h:128}),this.fillType7=mt(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=pe(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||mt(this.primaryColor,{h:-30}),this.git4=this.pie5||mt(this.primaryColor,{h:-60}),this.git5=this.pie6||mt(this.primaryColor,{h:-90}),this.git6=this.pie7||mt(this.primaryColor,{h:60}),this.git7=this.pie8||mt(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||Wt(this.git0),this.gitInv1=this.gitInv1||Wt(this.git1),this.gitInv2=this.gitInv2||Wt(this.git2),this.gitInv3=this.gitInv3||Wt(this.git3),this.gitInv4=this.gitInv4||Wt(this.git4),this.gitInv5=this.gitInv5||Wt(this.git5),this.gitInv6=this.gitInv6||Wt(this.git6),this.gitInv7=this.gitInv7||Wt(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||bu,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||_u}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},yn={base:{getThemeVariables:dL},dark:{getThemeVariables:pL},default:{getThemeVariables:yL},forest:{getThemeVariables:bL},neutral:{getThemeVariables:xL}},Vn={theme:"default",themeVariables:yn.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"]},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};Vn.class&&(Vn.class.arrowMarkerAbsolute=Vn.arrowMarkerAbsolute);Vn.gitGraph&&(Vn.gitGraph.arrowMarkerAbsolute=Vn.arrowMarkerAbsolute);const Iy=(t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:typeof t[i]=="object"&&t[i]!==null?[...r,e+i,...Iy(t[i],"")]:[...r,e+i],[]),vL=Iy(Vn,""),kL=Vn;/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function Oy(t){return typeof t>"u"||t===null}function wL(t){return typeof t=="object"&&t!==null}function TL(t){return Array.isArray(t)?t:Oy(t)?[]:[t]}function EL(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 CL(t,e){var r="",i;for(i=0;i<e;i+=1)r+=t;return r}function SL(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var AL=Oy,LL=wL,DL=TL,ML=CL,NL=SL,BL=EL,Ar={isNothing:AL,isObject:LL,toArray:DL,repeat:ML,isNegativeZero:NL,extend:BL};function Ry(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+=`
|
|
9
|
-
|
|
10
|
-
`+t.mark.snippet),i+" "+r):i}function Co(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=Ry(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Co.prototype=Object.create(Error.prototype);Co.prototype.constructor=Co;Co.prototype.toString=function(e){return this.name+": "+Ry(this,e)};var an=Co;function bh(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 _h(t,e){return Ar.repeat(" ",e-t.length)+t}function IL(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,u,d=Math.min(t.line+e.linesAfter,n.length).toString().length,f=e.maxLength-(e.indent+d+3);for(l=1;l<=e.linesBefore&&!(a-l<0);l++)u=bh(t.buffer,i[a-l],n[a-l],t.position-(i[a]-i[a-l]),f),o=Ar.repeat(" ",e.indent)+_h((t.line-l+1).toString(),d)+" | "+u.str+`
|
|
11
|
-
`+o;for(u=bh(t.buffer,i[a],n[a],t.position,f),o+=Ar.repeat(" ",e.indent)+_h((t.line+1).toString(),d)+" | "+u.str+`
|
|
12
|
-
`,o+=Ar.repeat("-",e.indent+d+3+u.pos)+`^
|
|
13
|
-
`,l=1;l<=e.linesAfter&&!(a+l>=n.length);l++)u=bh(t.buffer,i[a+l],n[a+l],t.position-(i[a]-i[a+l]),f),o+=Ar.repeat(" ",e.indent)+_h((t.line+l+1).toString(),d)+" | "+u.str+`
|
|
14
|
-
`;return o.replace(/\n$/,"")}var OL=IL,RL=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],FL=["scalar","sequence","mapping"];function PL(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(i){e[String(i)]=r})}),e}function YL(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(RL.indexOf(r)===-1)throw new an('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=PL(e.styleAliases||null),FL.indexOf(this.kind)===-1)throw new an('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var Tr=YL;function _2(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 VL(){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 u1(t){return this.extend(t)}u1.prototype.extend=function(e){var r=[],i=[];if(e instanceof Tr)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 an("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof Tr))throw new an("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new an("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 an("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 Tr))throw new an("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(u1.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=_2(n,"implicit"),n.compiledExplicit=_2(n,"explicit"),n.compiledTypeMap=VL(n.compiledImplicit,n.compiledExplicit),n};var UL=u1,zL=new Tr("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),WL=new Tr("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),HL=new Tr("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),Fy=new UL({explicit:[zL,WL,HL]});function GL(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 $L=new Tr("tag:yaml.org,2002:null",{kind:"scalar",resolve:GL,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 XL(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 KL(t){return t==="true"||t==="True"||t==="TRUE"}function ZL(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var QL=new Tr("tag:yaml.org,2002:bool",{kind:"scalar",resolve:XL,construct:KL,predicate:ZL,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 JL(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function tD(t){return 48<=t&&t<=55}function eD(t){return 48<=t&&t<=57}function rD(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(!JL(t.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(!tD(t.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<e;r++)if(n=t[r],n!=="_"){if(!eD(t.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}function iD(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 nD(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!Ar.isNegativeZero(t)}var sD=new Tr("tag:yaml.org,2002:int",{kind:"scalar",resolve:rD,construct:iD,predicate:nD,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"]}}),aD=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function oD(t){return!(t===null||!aD.test(t)||t[t.length-1]==="_")}function lD(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 cD=/^[-+]?[0-9]+e/;function uD(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(Ar.isNegativeZero(t))return"-0.0";return r=t.toString(10),cD.test(r)?r.replace("e",".e"):r}function hD(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||Ar.isNegativeZero(t))}var dD=new Tr("tag:yaml.org,2002:float",{kind:"scalar",resolve:oD,construct:lD,predicate:hD,represent:uD,defaultStyle:"lowercase"}),fD=Fy.extend({implicit:[$L,QL,sD,dD]}),pD=fD,Py=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Yy=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 gD(t){return t===null?!1:Py.exec(t)!==null||Yy.exec(t)!==null}function yD(t){var e,r,i,n,s,a,o,l=0,u=null,d,f,p;if(e=Py.exec(t),e===null&&(e=Yy.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]&&(d=+e[10],f=+(e[11]||0),u=(d*60+f)*6e4,e[9]==="-"&&(u=-u)),p=new Date(Date.UTC(r,i,n,s,a,o,l)),u&&p.setTime(p.getTime()-u),p}function mD(t){return t.toISOString()}var bD=new Tr("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:gD,construct:yD,instanceOf:Date,represent:mD});function _D(t){return t==="<<"||t===null}var xD=new Tr("tag:yaml.org,2002:merge",{kind:"scalar",resolve:_D}),w0=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
15
|
-
\r`;function vD(t){if(t===null)return!1;var e,r,i=0,n=t.length,s=w0;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 kD(t){var e,r,i=t.replace(/[\r\n=]/g,""),n=i.length,s=w0,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 wD(t){var e="",r=0,i,n,s=t.length,a=w0;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 TD(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var ED=new Tr("tag:yaml.org,2002:binary",{kind:"scalar",resolve:vD,construct:kD,predicate:TD,represent:wD}),CD=Object.prototype.hasOwnProperty,SD=Object.prototype.toString;function AD(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,SD.call(n)!=="[object Object]")return!1;for(s in n)if(CD.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 LD(t){return t!==null?t:[]}var DD=new Tr("tag:yaml.org,2002:omap",{kind:"sequence",resolve:AD,construct:LD}),MD=Object.prototype.toString;function ND(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],MD.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;s[e]=[n[0],i[n[0]]]}return!0}function BD(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 ID=new Tr("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:ND,construct:BD}),OD=Object.prototype.hasOwnProperty;function RD(t){if(t===null)return!0;var e,r=t;for(e in r)if(OD.call(r,e)&&r[e]!==null)return!1;return!0}function FD(t){return t!==null?t:{}}var PD=new Tr("tag:yaml.org,2002:set",{kind:"mapping",resolve:RD,construct:FD}),YD=pD.extend({implicit:[bD,xD],explicit:[ED,DD,ID,PD]}),Hn=Object.prototype.hasOwnProperty,mc=1,Vy=2,Uy=3,bc=4,xh=1,VD=2,x2=3,UD=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,zD=/[\x85\u2028\u2029]/,WD=/[,\[\]\{\}]/,zy=/^(?:!|!!|![a-z\-]+!)$/i,Wy=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function v2(t){return Object.prototype.toString.call(t)}function Yi(t){return t===10||t===13}function hs(t){return t===9||t===32}function Vr(t){return t===9||t===32||t===10||t===13}function Gs(t){return t===44||t===91||t===93||t===123||t===125}function HD(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function GD(t){return t===120?2:t===117?4:t===85?8:0}function qD(t){return 48<=t&&t<=57?t-48:-1}function k2(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
|
|
16
|
-
`: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 jD(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var Hy=new Array(256),Gy=new Array(256);for(var Ps=0;Ps<256;Ps++)Hy[Ps]=k2(Ps)?1:0,Gy[Ps]=k2(Ps);function $D(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||YD,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 qy(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=OL(r),new an(e,r)}function Jt(t,e){throw qy(t,e)}function _c(t,e){t.onWarning&&t.onWarning.call(null,qy(t,e))}var w2={YAML:function(e,r,i){var n,s,a;e.version!==null&&Jt(e,"duplication of %YAML directive"),i.length!==1&&Jt(e,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&Jt(e,"ill-formed argument of the YAML directive"),s=parseInt(n[1],10),a=parseInt(n[2],10),s!==1&&Jt(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&_c(e,"unsupported YAML version of the document")},TAG:function(e,r,i){var n,s;i.length!==2&&Jt(e,"TAG directive accepts exactly two arguments"),n=i[0],s=i[1],zy.test(n)||Jt(e,"ill-formed tag handle (first argument) of the TAG directive"),Hn.call(e.tagMap,n)&&Jt(e,'there is a previously declared suffix for "'+n+'" tag handle'),Wy.test(s)||Jt(e,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{Jt(e,"tag prefix is malformed: "+s)}e.tagMap[n]=s}};function Un(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||Jt(t,"expected valid JSON character");else UD.test(o)&&Jt(t,"the stream contains non-printable characters");t.result+=o}}function T2(t,e,r,i){var n,s,a,o;for(Ar.isObject(r)||Jt(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],Hn.call(e,s)||(e[s]=r[s],i[s]=!0)}function qs(t,e,r,i,n,s,a,o,l){var u,d;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),u=0,d=n.length;u<d;u+=1)Array.isArray(n[u])&&Jt(t,"nested arrays are not supported inside keys"),typeof n=="object"&&v2(n[u])==="[object Object]"&&(n[u]="[object Object]");if(typeof n=="object"&&v2(n)==="[object Object]"&&(n="[object Object]"),n=String(n),e===null&&(e={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(u=0,d=s.length;u<d;u+=1)T2(t,e,s[u],r);else T2(t,e,s,r);else!t.json&&!Hn.call(r,n)&&Hn.call(e,n)&&(t.line=a||t.line,t.lineStart=o||t.lineStart,t.position=l||t.position,Jt(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 T0(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++):Jt(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function nr(t,e,r){for(var i=0,n=t.input.charCodeAt(t.position);n!==0;){for(;hs(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(Yi(n))for(T0(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&&_c(t,"deficient indentation"),i}function xu(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 E0(t,e){e===1?t.result+=" ":e>1&&(t.result+=Ar.repeat(`
|
|
17
|
-
`,e-1))}function XD(t,e,r){var i,n,s,a,o,l,u,d,f=t.kind,p=t.result,g;if(g=t.input.charCodeAt(t.position),Vr(g)||Gs(g)||g===35||g===38||g===42||g===33||g===124||g===62||g===39||g===34||g===37||g===64||g===96||(g===63||g===45)&&(n=t.input.charCodeAt(t.position+1),Vr(n)||r&&Gs(n)))return!1;for(t.kind="scalar",t.result="",s=a=t.position,o=!1;g!==0;){if(g===58){if(n=t.input.charCodeAt(t.position+1),Vr(n)||r&&Gs(n))break}else if(g===35){if(i=t.input.charCodeAt(t.position-1),Vr(i))break}else{if(t.position===t.lineStart&&xu(t)||r&&Gs(g))break;if(Yi(g))if(l=t.line,u=t.lineStart,d=t.lineIndent,nr(t,!1,-1),t.lineIndent>=e){o=!0,g=t.input.charCodeAt(t.position);continue}else{t.position=a,t.line=l,t.lineStart=u,t.lineIndent=d;break}}o&&(Un(t,s,a,!1),E0(t,t.line-l),s=a=t.position,o=!1),hs(g)||(a=t.position+1),g=t.input.charCodeAt(++t.position)}return Un(t,s,a,!1),t.result?!0:(t.kind=f,t.result=p,!1)}function KD(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(Un(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 Yi(r)?(Un(t,i,n,!0),E0(t,nr(t,!1,e)),i=n=t.position):t.position===t.lineStart&&xu(t)?Jt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,n=t.position);Jt(t,"unexpected end of the stream within a single quoted scalar")}function ZD(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 Un(t,r,t.position,!0),t.position++,!0;if(o===92){if(Un(t,r,t.position,!0),o=t.input.charCodeAt(++t.position),Yi(o))nr(t,!1,e);else if(o<256&&Hy[o])t.result+=Gy[o],t.position++;else if((a=GD(o))>0){for(n=a,s=0;n>0;n--)o=t.input.charCodeAt(++t.position),(a=HD(o))>=0?s=(s<<4)+a:Jt(t,"expected hexadecimal character");t.result+=jD(s),t.position++}else Jt(t,"unknown escape sequence");r=i=t.position}else Yi(o)?(Un(t,r,i,!0),E0(t,nr(t,!1,e)),r=i=t.position):t.position===t.lineStart&&xu(t)?Jt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}Jt(t,"unexpected end of the stream within a double quoted scalar")}function QD(t,e){var r=!0,i,n,s,a=t.tag,o,l=t.anchor,u,d,f,p,g,_=Object.create(null),k,w,S,A;if(A=t.input.charCodeAt(t.position),A===91)d=93,g=!1,o=[];else if(A===123)d=125,g=!0,o={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),A=t.input.charCodeAt(++t.position);A!==0;){if(nr(t,!0,e),A=t.input.charCodeAt(t.position),A===d)return t.position++,t.tag=a,t.anchor=l,t.kind=g?"mapping":"sequence",t.result=o,!0;r?A===44&&Jt(t,"expected the node content, but found ','"):Jt(t,"missed comma between flow collection entries"),w=k=S=null,f=p=!1,A===63&&(u=t.input.charCodeAt(t.position+1),Vr(u)&&(f=p=!0,t.position++,nr(t,!0,e))),i=t.line,n=t.lineStart,s=t.position,pa(t,e,mc,!1,!0),w=t.tag,k=t.result,nr(t,!0,e),A=t.input.charCodeAt(t.position),(p||t.line===i)&&A===58&&(f=!0,A=t.input.charCodeAt(++t.position),nr(t,!0,e),pa(t,e,mc,!1,!0),S=t.result),g?qs(t,o,_,w,k,S,i,n,s):f?o.push(qs(t,null,_,w,k,S,i,n,s)):o.push(k),nr(t,!0,e),A=t.input.charCodeAt(t.position),A===44?(r=!0,A=t.input.charCodeAt(++t.position)):r=!1}Jt(t,"unexpected end of the stream within a flow collection")}function JD(t,e){var r,i,n=xh,s=!1,a=!1,o=e,l=0,u=!1,d,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)xh===n?n=f===43?x2:VD:Jt(t,"repeat of a chomping mode identifier");else if((d=qD(f))>=0)d===0?Jt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?Jt(t,"repeat of an indentation width identifier"):(o=e+d-1,a=!0);else break;if(hs(f)){do f=t.input.charCodeAt(++t.position);while(hs(f));if(f===35)do f=t.input.charCodeAt(++t.position);while(!Yi(f)&&f!==0)}for(;f!==0;){for(T0(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),Yi(f)){l++;continue}if(t.lineIndent<o){n===x2?t.result+=Ar.repeat(`
|
|
18
|
-
`,s?1+l:l):n===xh&&s&&(t.result+=`
|
|
19
|
-
`);break}for(i?hs(f)?(u=!0,t.result+=Ar.repeat(`
|
|
20
|
-
`,s?1+l:l)):u?(u=!1,t.result+=Ar.repeat(`
|
|
21
|
-
`,l+1)):l===0?s&&(t.result+=" "):t.result+=Ar.repeat(`
|
|
22
|
-
`,l):t.result+=Ar.repeat(`
|
|
23
|
-
`,s?1+l:l),s=!0,a=!0,l=0,r=t.position;!Yi(f)&&f!==0;)f=t.input.charCodeAt(++t.position);Un(t,r,t.position,!1)}return!0}function E2(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,Jt(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++,nr(t,!0,-1)&&t.lineIndent<=e){s.push(null),l=t.input.charCodeAt(t.position);continue}if(r=t.line,pa(t,e,Uy,!1,!0),s.push(t.result),nr(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&l!==0)Jt(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 tM(t,e,r){var i,n,s,a,o,l,u=t.tag,d=t.anchor,f={},p=Object.create(null),g=null,_=null,k=null,w=!1,S=!1,A;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=f),A=t.input.charCodeAt(t.position);A!==0;){if(!w&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Jt(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),s=t.line,(A===63||A===58)&&Vr(i))A===63?(w&&(qs(t,f,p,g,_,null,a,o,l),g=_=k=null),S=!0,w=!0,n=!0):w?(w=!1,n=!0):Jt(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,A=i;else{if(a=t.line,o=t.lineStart,l=t.position,!pa(t,r,Vy,!1,!0))break;if(t.line===s){for(A=t.input.charCodeAt(t.position);hs(A);)A=t.input.charCodeAt(++t.position);if(A===58)A=t.input.charCodeAt(++t.position),Vr(A)||Jt(t,"a whitespace character is expected after the key-value separator within a block mapping"),w&&(qs(t,f,p,g,_,null,a,o,l),g=_=k=null),S=!0,w=!1,n=!1,g=t.tag,_=t.result;else if(S)Jt(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=u,t.anchor=d,!0}else if(S)Jt(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=u,t.anchor=d,!0}if((t.line===s||t.lineIndent>e)&&(w&&(a=t.line,o=t.lineStart,l=t.position),pa(t,e,bc,!0,n)&&(w?_=t.result:k=t.result),w||(qs(t,f,p,g,_,k,a,o,l),g=_=k=null),nr(t,!0,-1),A=t.input.charCodeAt(t.position)),(t.line===s||t.lineIndent>e)&&A!==0)Jt(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return w&&qs(t,f,p,g,_,null,a,o,l),S&&(t.tag=u,t.anchor=d,t.kind="mapping",t.result=f),S}function eM(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&&Jt(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)):Jt(t,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!Vr(a);)a===33&&(i?Jt(t,"tag suffix cannot contain exclamation marks"):(n=t.input.slice(e-1,t.position+1),zy.test(n)||Jt(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),WD.test(s)&&Jt(t,"tag suffix cannot contain flow indicator characters")}s&&!Wy.test(s)&&Jt(t,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{Jt(t,"tag name is malformed: "+s)}return r?t.tag=s:Hn.call(t.tagMap,n)?t.tag=t.tagMap[n]+s:n==="!"?t.tag="!"+s:n==="!!"?t.tag="tag:yaml.org,2002:"+s:Jt(t,'undeclared tag handle "'+n+'"'),!0}function rM(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&Jt(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!Vr(r)&&!Gs(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Jt(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function iM(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)&&!Gs(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&Jt(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),Hn.call(t.anchorMap,r)||Jt(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],nr(t,!0,-1),!0}function pa(t,e,r,i,n){var s,a,o,l=1,u=!1,d=!1,f,p,g,_,k,w;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,s=a=o=bc===r||Uy===r,i&&nr(t,!0,-1)&&(u=!0,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)),l===1)for(;eM(t)||rM(t);)nr(t,!0,-1)?(u=!0,o=s,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)):o=!1;if(o&&(o=u||n),(l===1||bc===r)&&(mc===r||Vy===r?k=e:k=e+1,w=t.position-t.lineStart,l===1?o&&(E2(t,w)||tM(t,w,k))||QD(t,k)?d=!0:(a&&JD(t,k)||KD(t,k)||ZD(t,k)?d=!0:iM(t)?(d=!0,(t.tag!==null||t.anchor!==null)&&Jt(t,"alias node should not have any properties")):XD(t,k,mc===r)&&(d=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):l===0&&(d=o&&E2(t,w))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&Jt(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),f=0,p=t.implicitTypes.length;f<p;f+=1)if(_=t.implicitTypes[f],_.resolve(t.result)){t.result=_.construct(t.result),t.tag=_.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(Hn.call(t.typeMap[t.kind||"fallback"],t.tag))_=t.typeMap[t.kind||"fallback"][t.tag];else for(_=null,g=t.typeMap.multi[t.kind||"fallback"],f=0,p=g.length;f<p;f+=1)if(t.tag.slice(0,g[f].tag.length)===g[f].tag){_=g[f];break}_||Jt(t,"unknown tag !<"+t.tag+">"),t.result!==null&&_.kind!==t.kind&&Jt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+_.kind+'", not "'+t.kind+'"'),_.resolve(t.result,t.tag)?(t.result=_.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Jt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||d}function nM(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&&(nr(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&&Jt(t,"directive name must not be less than one character in length");a!==0;){for(;hs(a);)a=t.input.charCodeAt(++t.position);if(a===35){do a=t.input.charCodeAt(++t.position);while(a!==0&&!Yi(a));break}if(Yi(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&&T0(t),Hn.call(w2,i)?w2[i](t,i,n):_c(t,'unknown document directive "'+i+'"')}if(nr(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,nr(t,!0,-1)):s&&Jt(t,"directives end mark is expected"),pa(t,t.lineIndent-1,bc,!1,!0),nr(t,!0,-1),t.checkLineBreaks&&zD.test(t.input.slice(e,t.position))&&_c(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&xu(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,nr(t,!0,-1));return}if(t.position<t.length-1)Jt(t,"end of the stream or a document separator is expected");else return}function jy(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
|
|
24
|
-
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new $D(t,e),i=t.indexOf("\0");for(i!==-1&&(r.position=i,Jt(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;)nM(r);return r.documents}function sM(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var i=jy(t,r);if(typeof e!="function")return i;for(var n=0,s=i.length;n<s;n+=1)e(i[n])}function aM(t,e){var r=jy(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new an("expected a single document in the stream, but found more")}}var oM=sM,lM=aM,cM={loadAll:oM,load:lM},uM=Fy,hM=cM.load;const $y=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s;function dM(t,e){var r;const i=t.match($y);if(i){const n=hM(i[1],{schema:uM});return n!=null&&n.title&&((r=e.setDiagramTitle)==null||r.call(e,n.title)),t.slice(i[0].length)}else return t}const fM=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,pM=/\s*%%.*\n/gm,xc={},C0=function(t,e){t=t.replace($y,"").replace(fM,"").replace(pM,`
|
|
25
|
-
`);for(const[r,{detector:i}]of Object.entries(xc))if(i(t,e))return r;throw new Error(`No diagram type detected for text: ${t}`)},Xy=(t,e,r)=>{if(xc[t])throw new Error(`Detector with key ${t} already exists`);xc[t]={detector:e,loader:r},B.debug(`Detector with key ${t} added${r?" with loader":""}`)},gM=t=>xc[t].loader,h1=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=>h1(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]=h1(t[s],e[s],{depth:i-1,clobber:n})):(n||typeof t[s]!="object"&&typeof e[s]!="object")&&(t[s]=e[s])}),t)},pr=h1,yM={curveBasis:la,curveBasisClosed:ck,curveBasisOpen:uk,curveLinear:jr,curveLinearClosed:hk,curveMonotoneX:dk,curveMonotoneY:fk,curveNatural:pk,curveStep:gk,curveStepAfter:mk,curveStepBefore:yk},vh=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,mM=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,bM=function(t,e){const r=Ky(t,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const n=r.map(s=>s.args);xs(n),i=pr(i,[...n])}else i=r.args;if(i){let n=C0(t,e);["config"].forEach(s=>{i[s]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[s],delete i[s])})}return i},Ky=function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${mM.source})(?=[}][%]{2}).*
|
|
26
|
-
`,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),B.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let i;const n=[];for(;(i=vh.exec(t))!==null;)if(i.index===vh.lastIndex&&vh.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 B.error(`ERROR: ${r.message} - Unable to parse directive
|
|
27
|
-
${e!==null?" type:"+e:""} based on the text:${t}`),{type:null,args:null}}},_M=function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1};function gi(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return yM[r]||e}function xM(t,e){const r=t.trim();if(r)return e.securityLevel!=="loose"?kn(r):r}const vM=(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 vc(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function kM(t){let e,r=0;t.forEach(s=>{r+=vc(s,e),e=s});let i=r/2,n;return e=void 0,t.forEach(s=>{if(e&&!n){const a=vc(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 wM(t){return t.length===1?t[0]:kM(t)}const TM=(t,e,r)=>{let i;B.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());let s=25,a;i=void 0,e.forEach(d=>{if(i&&!a){const f=vc(d,i);if(f<s)s-=f;else{const p=s/f;p<=0&&(a=i),p>=1&&(a={x:d.x,y:d.y}),p>0&&p<1&&(a={x:(1-p)*i.x+p*d.x,y:(1-p)*i.y+p*d.y})}}i=d});const o=t?10:5,l=Math.atan2(e[0].y-a.y,e[0].x-a.x),u={x:0,y:0};return u.x=Math.sin(l)*o+(e[0].x+a.x)/2,u.y=-Math.cos(l)*o+(e[0].y+a.y)/2,u};function EM(t,e,r){let i=JSON.parse(JSON.stringify(r)),n;B.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 p=vc(f,n);if(p<a)a-=p;else{const g=a/p;g<=0&&(o=n),g>=1&&(o={x:f.x,y:f.y}),g>0&&g<1&&(o={x:(1-g)*n.x+g*f.x,y:(1-g)*n.y+g*f.y})}}n=f});const l=10+t*.5,u=Math.atan2(i[0].y-o.y,i[0].x-o.x),d={x:0,y:0};return d.x=Math.sin(u)*l+(i[0].x+o.x)/2,d.y=-Math.cos(u)*l+(i[0].y+o.y)/2,e==="start_left"&&(d.x=Math.sin(u+Math.PI)*l+(i[0].x+o.x)/2,d.y=-Math.cos(u+Math.PI)*l+(i[0].y+o.y)/2),e==="end_right"&&(d.x=Math.sin(u-Math.PI)*l+(i[0].x+o.x)/2-5,d.y=-Math.cos(u-Math.PI)*l+(i[0].y+o.y)/2-5),e==="end_left"&&(d.x=Math.sin(u)*l+(i[0].x+o.x)/2-5,d.y=-Math.cos(u)*l+(i[0].y+o.y)/2-5),d}function Gn(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 C2=0;const Zy=()=>(C2++,"id-"+Math.random().toString(36).substr(2,12)+"-"+C2);function CM(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 Qy=t=>CM(t.length),SM=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}},AM=function(t,e){const r=e.text.replace(he.lineBreakRegex," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.style("text-anchor",e.anchor),i.style("font-family",e.fontFamily),i.style("font-size",e.fontSize),i.style("font-weight",e.fontWeight),i.attr("fill",e.fill),e.class!==void 0&&i.attr("class",e.class);const n=i.append("tspan");return n.attr("x",e.x+e.textMargin*2),n.attr("fill",e.fill),n.text(r),i},Jy=Ca((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),he.lineBreakRegex.test(t)))return t;const i=t.split(" "),n=[];let s="";return i.forEach((a,o)=>{const l=Vi(`${a} `,r),u=Vi(s,r);if(l>e){const{hyphenatedStrings:p,remainingWord:g}=LM(a,e,"-",r);n.push(s,...p),s=g}else u+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}`),LM=Ca((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 u=`${a}${o}`;if(Vi(u,i)>=e){const f=l+1,p=n.length===f,g=`${u}${r}`;s.push(p?u:g),a=""}else a=u}),{hyphenatedStrings:s,remainingWord:a}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function d1(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),S0(t,e).height}function Vi(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),S0(t,e).width}const S0=Ca((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=["sans-serif",i],a=t.split(he.lineBreakRegex),o=[],l=At("body");if(!l.remove)return{width:0,height:0,lineHeight:0};const u=l.append("svg");for(const f of s){let p=0;const g={width:0,height:0,lineHeight:0};for(const _ of a){const k=SM();k.text=_;const w=AM(u,k).style("font-size",r).style("font-weight",n).style("font-family",f),S=(w._groups||w)[0][0].getBBox();g.width=Math.round(Math.max(g.width,S.width)),p=Math.round(S.height),g.height+=p,g.lineHeight=Math.round(Math.max(g.lineHeight,p))}o.push(g)}u.remove();const d=isNaN(o[1].height)||isNaN(o[1].width)||isNaN(o[1].lineHeight)||o[0].height>o[1].height&&o[0].width>o[1].width&&o[0].lineHeight>o[1].lineHeight?0:1;return o[d]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),DM=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 vl;const MM=function(t){return vl=vl||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),vl.innerHTML=t,unescape(vl.textContent)},xs=t=>{if(B.debug("directiveSanitizer called with",t),typeof t=="object"&&(t.length?t.forEach(e=>xs(e)):Object.keys(t).forEach(e=>{B.debug("Checking key",e),e.startsWith("__")&&(B.debug("sanitize deleting __ option",e),delete t[e]),e.includes("proto")&&(B.debug("sanitize deleting proto option",e),delete t[e]),e.includes("constr")&&(B.debug("sanitize deleting constr option",e),delete t[e]),e.includes("themeCSS")&&(B.debug("sanitizing themeCss option"),t[e]=Yl(t[e])),e.includes("fontFamily")&&(B.debug("sanitizing fontFamily option"),t[e]=Yl(t[e])),e.includes("altFontFamily")&&(B.debug("sanitizing altFontFamily option"),t[e]=Yl(t[e])),vL.includes(e)?typeof t[e]=="object"&&(B.debug("sanitize deleting object",e),xs(t[e])):(B.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]="")}}B.debug("After sanitization",t)},Yl=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 A0(t){return"str"in t}function NM(t){return t instanceof Error?t.message:String(t)}const BM=(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)},ye={assignWithDepth:pr,wrapLabel:Jy,calculateTextHeight:d1,calculateTextWidth:Vi,calculateTextDimensions:S0,detectInit:bM,detectDirective:Ky,isSubstringInArray:_M,interpolateToCurve:gi,calcLabelPosition:wM,calcCardinalityPosition:TM,calcTerminalLabelPosition:EM,formatUrl:xM,getStylesFromArray:Gn,generateId:Zy,random:Qy,runFunc:vM,entityDecode:MM,initIdGenerator:DM,directiveSanitizer:xs,sanitizeCss:Yl,insertTitle:BM},IM="mermaid",OM="9.3.0",RM="Markdown-ish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",FM="./dist/mermaid.min.js",PM="./dist/mermaid.core.mjs",YM="./dist/mermaid.d.ts",VM={".":{require:"./dist/mermaid.min.js",import:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts"},"./*":"./*"},UM=["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph"],zM={clean:"rimraf dist","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaidAPI.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:spellcheck && pnpm docs:code && ts-node-esm src/docs.mts","docs:verify":"pnpm docs:spellcheck && pnpm docs:code && ts-node-esm src/docs.mts --verify","docs:pre:vitepress":"rimraf src/vitepress && pnpm docs:code && ts-node-esm src/docs.mts --vitepress","docs:build:vitepress":"pnpm docs:pre:vitepress && vitepress build src/vitepress","docs:dev":'pnpm docs:pre:vitepress && concurrently "vitepress dev src/vitepress" "ts-node-esm src/docs.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell --config ../../cSpell.json "src/docs/**/*.md"',release:"pnpm build",prepublishOnly:"pnpm -w run build"},WM={type:"git",url:"https://github.com/mermaid-js/mermaid"},HM="Knut Sveidqvist",GM="MIT",qM={ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},jM={"@braintree/sanitize-url":"^6.0.0",d3:"^7.0.0","dagre-d3-es":"7.0.6",dompurify:"2.4.1",khroma:"^2.0.0","lodash-es":"^4.17.21","moment-mini":"^2.24.0","non-layered-tidy-tree-layout":"^2.0.2",stylis:"^4.1.2",uuid:"^9.0.0"},$M={"@types/d3":"^7.4.0","@types/dompurify":"^2.4.0","@types/jsdom":"^20.0.1","@types/lodash-es":"^4.17.6","@types/micromatch":"^4.0.2","@types/prettier":"^2.7.1","@types/stylis":"^4.0.2","@types/uuid":"^8.3.4","@typescript-eslint/eslint-plugin":"^5.42.1","@typescript-eslint/parser":"^5.42.1",chokidar:"^3.5.3",concurrently:"^7.5.0",coveralls:"^3.1.1",cspell:"^6.14.3",globby:"^13.1.2",jison:"^0.4.18","js-base64":"^3.7.2",jsdom:"^20.0.2",micromatch:"^4.0.5",moment:"^2.29.4","path-browserify":"^1.0.1",prettier:"^2.7.1",remark:"^14.0.2",rimraf:"^3.0.2","start-server-and-test":"^1.14.0",typedoc:"^0.23.18","typedoc-plugin-markdown":"^3.13.6",typescript:"^4.8.4","unist-util-flatmap":"^1.0.0",vitepress:"^1.0.0-alpha.28","vitepress-plugin-search":"^1.0.4-alpha.15"},XM=["dist","README.md"],KM=["**/*.css","**/*.scss"],kc={name:IM,version:OM,description:RM,main:FM,module:PM,types:YM,exports:VM,keywords:UM,scripts:zM,repository:WM,author:HM,license:GM,standard:qM,dependencies:jM,devDependencies:$M,files:XM,sideEffects:KM},ga=Object.freeze(kL);let Rr=pr({},ga),tm,ya=[],io=pr({},ga);const vu=(t,e)=>{let r=pr({},t),i={};for(const n of e)im(n),i=pr(i,n);if(r=pr(r,i),i.theme&&i.theme in yn){const n=pr({},tm),s=pr(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in yn&&(r.themeVariables=yn[r.theme].getThemeVariables(s))}return io=r,sm(io),io},ZM=t=>(Rr=pr({},ga),Rr=pr(Rr,t),t.theme&&yn[t.theme]&&(Rr.themeVariables=yn[t.theme].getThemeVariables(t.themeVariables)),vu(Rr,ya),Rr),QM=t=>{tm=pr({},t)},JM=t=>(Rr=pr(Rr,t),vu(Rr,ya),Rr),em=()=>pr({},Rr),rm=t=>(sm(t),pr(io,t),$()),$=()=>pr({},io),im=t=>{var e;["secure",...(e=Rr.secure)!=null?e:[]].forEach(r=>{t[r]!==void 0&&(B.debug(`Denied attempt to modify a secure key ${r}`,t[r]),delete t[r])}),Object.keys(t).forEach(r=>{r.indexOf("__")===0&&delete t[r]}),Object.keys(t).forEach(r=>{typeof t[r]=="string"&&(t[r].includes("<")||t[r].includes(">")||t[r].includes("url(data:"))&&delete t[r],typeof t[r]=="object"&&im(t[r])})},L0=t=>{t.fontFamily&&(t.themeVariables?t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily}):t.themeVariables={fontFamily:t.fontFamily}),ya.push(t),vu(Rr,ya)},So=(t=Rr)=>{ya=[],vu(t,ya)};var nm=(t=>(t.LAZY_LOAD_DEPRECATED="The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",t))(nm||{});const S2={},tN=t=>{S2[t]||(B.warn(nm[t]),S2[t]=!0)},sm=t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&tN("LAZY_LOAD_DEPRECATED")},eN=function(t,e){for(let r of e)t.attr(r[0],r[1])},rN=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},Ti=function(t,e,r,i){const n=rN(e,r,i);eN(t,n)},ku=function(t,e,r,i){const n=e.node().getBBox(),s=n.width,a=n.height;B.info(`SVG bounds: ${s}x${a}`,n);let o=0,l=0;B.info(`Graph bounds: ${o}x${l}`,t),o=s+r*2,l=a+r*2,B.info(`Calculated bounds: ${o}x${l}`),Ti(e,l,o,i);const u=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;e.attr("viewBox",u)},iN=t=>`g.classGroup text {
|
|
28
|
-
fill: ${t.nodeBorder};
|
|
29
|
-
fill: ${t.classText};
|
|
30
|
-
stroke: none;
|
|
31
|
-
font-family: ${t.fontFamily};
|
|
32
|
-
font-size: 10px;
|
|
33
|
-
|
|
34
|
-
.title {
|
|
35
|
-
font-weight: bolder;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.nodeLabel, .edgeLabel {
|
|
41
|
-
color: ${t.classText};
|
|
42
|
-
}
|
|
43
|
-
.edgeLabel .label rect {
|
|
44
|
-
fill: ${t.mainBkg};
|
|
45
|
-
}
|
|
46
|
-
.label text {
|
|
47
|
-
fill: ${t.classText};
|
|
48
|
-
}
|
|
49
|
-
.edgeLabel .label span {
|
|
50
|
-
background: ${t.mainBkg};
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.classTitle {
|
|
54
|
-
font-weight: bolder;
|
|
55
|
-
}
|
|
56
|
-
.node rect,
|
|
57
|
-
.node circle,
|
|
58
|
-
.node ellipse,
|
|
59
|
-
.node polygon,
|
|
60
|
-
.node path {
|
|
61
|
-
fill: ${t.mainBkg};
|
|
62
|
-
stroke: ${t.nodeBorder};
|
|
63
|
-
stroke-width: 1px;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
.divider {
|
|
68
|
-
stroke: ${t.nodeBorder};
|
|
69
|
-
stroke: 1;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
g.clickable {
|
|
73
|
-
cursor: pointer;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
g.classGroup rect {
|
|
77
|
-
fill: ${t.mainBkg};
|
|
78
|
-
stroke: ${t.nodeBorder};
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
g.classGroup line {
|
|
82
|
-
stroke: ${t.nodeBorder};
|
|
83
|
-
stroke-width: 1;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.classLabel .box {
|
|
87
|
-
stroke: none;
|
|
88
|
-
stroke-width: 0;
|
|
89
|
-
fill: ${t.mainBkg};
|
|
90
|
-
opacity: 0.5;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.classLabel .label {
|
|
94
|
-
fill: ${t.nodeBorder};
|
|
95
|
-
font-size: 10px;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.relation {
|
|
99
|
-
stroke: ${t.lineColor};
|
|
100
|
-
stroke-width: 1;
|
|
101
|
-
fill: none;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.dashed-line{
|
|
105
|
-
stroke-dasharray: 3;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.dotted-line{
|
|
109
|
-
stroke-dasharray: 1 2;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
#compositionStart, .composition {
|
|
113
|
-
fill: ${t.lineColor} !important;
|
|
114
|
-
stroke: ${t.lineColor} !important;
|
|
115
|
-
stroke-width: 1;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
#compositionEnd, .composition {
|
|
119
|
-
fill: ${t.lineColor} !important;
|
|
120
|
-
stroke: ${t.lineColor} !important;
|
|
121
|
-
stroke-width: 1;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
#dependencyStart, .dependency {
|
|
125
|
-
fill: ${t.lineColor} !important;
|
|
126
|
-
stroke: ${t.lineColor} !important;
|
|
127
|
-
stroke-width: 1;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
#dependencyStart, .dependency {
|
|
131
|
-
fill: ${t.lineColor} !important;
|
|
132
|
-
stroke: ${t.lineColor} !important;
|
|
133
|
-
stroke-width: 1;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
#extensionStart, .extension {
|
|
137
|
-
fill: ${t.mainBkg} !important;
|
|
138
|
-
stroke: ${t.lineColor} !important;
|
|
139
|
-
stroke-width: 1;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
#extensionEnd, .extension {
|
|
143
|
-
fill: ${t.mainBkg} !important;
|
|
144
|
-
stroke: ${t.lineColor} !important;
|
|
145
|
-
stroke-width: 1;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
#aggregationStart, .aggregation {
|
|
149
|
-
fill: ${t.mainBkg} !important;
|
|
150
|
-
stroke: ${t.lineColor} !important;
|
|
151
|
-
stroke-width: 1;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
#aggregationEnd, .aggregation {
|
|
155
|
-
fill: ${t.mainBkg} !important;
|
|
156
|
-
stroke: ${t.lineColor} !important;
|
|
157
|
-
stroke-width: 1;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
#lollipopStart, .lollipop {
|
|
161
|
-
fill: ${t.mainBkg} !important;
|
|
162
|
-
stroke: ${t.lineColor} !important;
|
|
163
|
-
stroke-width: 1;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
#lollipopEnd, .lollipop {
|
|
167
|
-
fill: ${t.mainBkg} !important;
|
|
168
|
-
stroke: ${t.lineColor} !important;
|
|
169
|
-
stroke-width: 1;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.edgeTerminals {
|
|
173
|
-
font-size: 11px;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.classTitleText {
|
|
177
|
-
text-anchor: middle;
|
|
178
|
-
font-size: 18px;
|
|
179
|
-
fill: ${t.textColor};
|
|
180
|
-
}
|
|
181
|
-
`,no=iN,nN=t=>`
|
|
182
|
-
.entityBox {
|
|
183
|
-
fill: ${t.mainBkg};
|
|
184
|
-
stroke: ${t.nodeBorder};
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.attributeBoxOdd {
|
|
188
|
-
fill: ${t.attributeBackgroundColorOdd};
|
|
189
|
-
stroke: ${t.nodeBorder};
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.attributeBoxEven {
|
|
193
|
-
fill: ${t.attributeBackgroundColorEven};
|
|
194
|
-
stroke: ${t.nodeBorder};
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.relationshipLabelBox {
|
|
198
|
-
fill: ${t.tertiaryColor};
|
|
199
|
-
opacity: 0.7;
|
|
200
|
-
background-color: ${t.tertiaryColor};
|
|
201
|
-
rect {
|
|
202
|
-
opacity: 0.5;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.relationshipLine {
|
|
207
|
-
stroke: ${t.lineColor};
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
.entityTitleText {
|
|
211
|
-
text-anchor: middle;
|
|
212
|
-
font-size: 18px;
|
|
213
|
-
fill: ${t.textColor};
|
|
214
|
-
}
|
|
215
|
-
`,am=nN,sN=()=>"",om=sN,aN=t=>`.label {
|
|
216
|
-
font-family: ${t.fontFamily};
|
|
217
|
-
color: ${t.nodeTextColor||t.textColor};
|
|
218
|
-
}
|
|
219
|
-
.cluster-label text {
|
|
220
|
-
fill: ${t.titleColor};
|
|
221
|
-
}
|
|
222
|
-
.cluster-label span {
|
|
223
|
-
color: ${t.titleColor};
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.label text,span {
|
|
227
|
-
fill: ${t.nodeTextColor||t.textColor};
|
|
228
|
-
color: ${t.nodeTextColor||t.textColor};
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.node rect,
|
|
232
|
-
.node circle,
|
|
233
|
-
.node ellipse,
|
|
234
|
-
.node polygon,
|
|
235
|
-
.node path {
|
|
236
|
-
fill: ${t.mainBkg};
|
|
237
|
-
stroke: ${t.nodeBorder};
|
|
238
|
-
stroke-width: 1px;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
.node .label {
|
|
242
|
-
text-align: center;
|
|
243
|
-
}
|
|
244
|
-
.node.clickable {
|
|
245
|
-
cursor: pointer;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.arrowheadPath {
|
|
249
|
-
fill: ${t.arrowheadColor};
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
.edgePath .path {
|
|
253
|
-
stroke: ${t.lineColor};
|
|
254
|
-
stroke-width: 2.0px;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
.flowchart-link {
|
|
258
|
-
stroke: ${t.lineColor};
|
|
259
|
-
fill: none;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
.edgeLabel {
|
|
263
|
-
background-color: ${t.edgeLabelBackground};
|
|
264
|
-
rect {
|
|
265
|
-
opacity: 0.5;
|
|
266
|
-
background-color: ${t.edgeLabelBackground};
|
|
267
|
-
fill: ${t.edgeLabelBackground};
|
|
268
|
-
}
|
|
269
|
-
text-align: center;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
.cluster rect {
|
|
273
|
-
fill: ${t.clusterBkg};
|
|
274
|
-
stroke: ${t.clusterBorder};
|
|
275
|
-
stroke-width: 1px;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
.cluster text {
|
|
279
|
-
fill: ${t.titleColor};
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
.cluster span {
|
|
283
|
-
color: ${t.titleColor};
|
|
284
|
-
}
|
|
285
|
-
/* .cluster div {
|
|
286
|
-
color: ${t.titleColor};
|
|
287
|
-
} */
|
|
288
|
-
|
|
289
|
-
div.mermaidTooltip {
|
|
290
|
-
position: absolute;
|
|
291
|
-
text-align: center;
|
|
292
|
-
max-width: 200px;
|
|
293
|
-
padding: 2px;
|
|
294
|
-
font-family: ${t.fontFamily};
|
|
295
|
-
font-size: 12px;
|
|
296
|
-
background: ${t.tertiaryColor};
|
|
297
|
-
border: 1px solid ${t.border2};
|
|
298
|
-
border-radius: 2px;
|
|
299
|
-
pointer-events: none;
|
|
300
|
-
z-index: 100;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
.flowchartTitleText {
|
|
304
|
-
text-anchor: middle;
|
|
305
|
-
font-size: 18px;
|
|
306
|
-
fill: ${t.textColor};
|
|
307
|
-
}
|
|
308
|
-
`,wc=aN,oN=t=>`
|
|
309
|
-
.mermaid-main-font {
|
|
310
|
-
font-family: "trebuchet ms", verdana, arial, sans-serif;
|
|
311
|
-
font-family: var(--mermaid-font-family);
|
|
312
|
-
}
|
|
313
|
-
.exclude-range {
|
|
314
|
-
fill: ${t.excludeBkgColor};
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
.section {
|
|
318
|
-
stroke: none;
|
|
319
|
-
opacity: 0.2;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
.section0 {
|
|
323
|
-
fill: ${t.sectionBkgColor};
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
.section2 {
|
|
327
|
-
fill: ${t.sectionBkgColor2};
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
.section1,
|
|
331
|
-
.section3 {
|
|
332
|
-
fill: ${t.altSectionBkgColor};
|
|
333
|
-
opacity: 0.2;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
.sectionTitle0 {
|
|
337
|
-
fill: ${t.titleColor};
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
.sectionTitle1 {
|
|
341
|
-
fill: ${t.titleColor};
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
.sectionTitle2 {
|
|
345
|
-
fill: ${t.titleColor};
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
.sectionTitle3 {
|
|
349
|
-
fill: ${t.titleColor};
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
.sectionTitle {
|
|
353
|
-
text-anchor: start;
|
|
354
|
-
// font-size: ${t.ganttFontSize};
|
|
355
|
-
// text-height: 14px;
|
|
356
|
-
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
357
|
-
font-family: var(--mermaid-font-family);
|
|
358
|
-
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
/* Grid and axis */
|
|
363
|
-
|
|
364
|
-
.grid .tick {
|
|
365
|
-
stroke: ${t.gridColor};
|
|
366
|
-
opacity: 0.8;
|
|
367
|
-
shape-rendering: crispEdges;
|
|
368
|
-
text {
|
|
369
|
-
font-family: ${t.fontFamily};
|
|
370
|
-
fill: ${t.textColor};
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
.grid path {
|
|
375
|
-
stroke-width: 0;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
/* Today line */
|
|
380
|
-
|
|
381
|
-
.today {
|
|
382
|
-
fill: none;
|
|
383
|
-
stroke: ${t.todayLineColor};
|
|
384
|
-
stroke-width: 2px;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
/* Task styling */
|
|
389
|
-
|
|
390
|
-
/* Default task */
|
|
391
|
-
|
|
392
|
-
.task {
|
|
393
|
-
stroke-width: 2;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
.taskText {
|
|
397
|
-
text-anchor: middle;
|
|
398
|
-
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
399
|
-
font-family: var(--mermaid-font-family);
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
// .taskText:not([font-size]) {
|
|
403
|
-
// font-size: ${t.ganttFontSize};
|
|
404
|
-
// }
|
|
405
|
-
|
|
406
|
-
.taskTextOutsideRight {
|
|
407
|
-
fill: ${t.taskTextDarkColor};
|
|
408
|
-
text-anchor: start;
|
|
409
|
-
// font-size: ${t.ganttFontSize};
|
|
410
|
-
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
411
|
-
font-family: var(--mermaid-font-family);
|
|
412
|
-
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
.taskTextOutsideLeft {
|
|
416
|
-
fill: ${t.taskTextDarkColor};
|
|
417
|
-
text-anchor: end;
|
|
418
|
-
// font-size: ${t.ganttFontSize};
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
/* Special case clickable */
|
|
422
|
-
.task.clickable {
|
|
423
|
-
cursor: pointer;
|
|
424
|
-
}
|
|
425
|
-
.taskText.clickable {
|
|
426
|
-
cursor: pointer;
|
|
427
|
-
fill: ${t.taskTextClickableColor} !important;
|
|
428
|
-
font-weight: bold;
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
.taskTextOutsideLeft.clickable {
|
|
432
|
-
cursor: pointer;
|
|
433
|
-
fill: ${t.taskTextClickableColor} !important;
|
|
434
|
-
font-weight: bold;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
.taskTextOutsideRight.clickable {
|
|
438
|
-
cursor: pointer;
|
|
439
|
-
fill: ${t.taskTextClickableColor} !important;
|
|
440
|
-
font-weight: bold;
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
/* Specific task settings for the sections*/
|
|
444
|
-
|
|
445
|
-
.taskText0,
|
|
446
|
-
.taskText1,
|
|
447
|
-
.taskText2,
|
|
448
|
-
.taskText3 {
|
|
449
|
-
fill: ${t.taskTextColor};
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
.task0,
|
|
453
|
-
.task1,
|
|
454
|
-
.task2,
|
|
455
|
-
.task3 {
|
|
456
|
-
fill: ${t.taskBkgColor};
|
|
457
|
-
stroke: ${t.taskBorderColor};
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
.taskTextOutside0,
|
|
461
|
-
.taskTextOutside2
|
|
462
|
-
{
|
|
463
|
-
fill: ${t.taskTextOutsideColor};
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
.taskTextOutside1,
|
|
467
|
-
.taskTextOutside3 {
|
|
468
|
-
fill: ${t.taskTextOutsideColor};
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
/* Active task */
|
|
473
|
-
|
|
474
|
-
.active0,
|
|
475
|
-
.active1,
|
|
476
|
-
.active2,
|
|
477
|
-
.active3 {
|
|
478
|
-
fill: ${t.activeTaskBkgColor};
|
|
479
|
-
stroke: ${t.activeTaskBorderColor};
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
.activeText0,
|
|
483
|
-
.activeText1,
|
|
484
|
-
.activeText2,
|
|
485
|
-
.activeText3 {
|
|
486
|
-
fill: ${t.taskTextDarkColor} !important;
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
/* Completed task */
|
|
491
|
-
|
|
492
|
-
.done0,
|
|
493
|
-
.done1,
|
|
494
|
-
.done2,
|
|
495
|
-
.done3 {
|
|
496
|
-
stroke: ${t.doneTaskBorderColor};
|
|
497
|
-
fill: ${t.doneTaskBkgColor};
|
|
498
|
-
stroke-width: 2;
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
.doneText0,
|
|
502
|
-
.doneText1,
|
|
503
|
-
.doneText2,
|
|
504
|
-
.doneText3 {
|
|
505
|
-
fill: ${t.taskTextDarkColor} !important;
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
/* Tasks on the critical line */
|
|
510
|
-
|
|
511
|
-
.crit0,
|
|
512
|
-
.crit1,
|
|
513
|
-
.crit2,
|
|
514
|
-
.crit3 {
|
|
515
|
-
stroke: ${t.critBorderColor};
|
|
516
|
-
fill: ${t.critBkgColor};
|
|
517
|
-
stroke-width: 2;
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
.activeCrit0,
|
|
521
|
-
.activeCrit1,
|
|
522
|
-
.activeCrit2,
|
|
523
|
-
.activeCrit3 {
|
|
524
|
-
stroke: ${t.critBorderColor};
|
|
525
|
-
fill: ${t.activeTaskBkgColor};
|
|
526
|
-
stroke-width: 2;
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
.doneCrit0,
|
|
530
|
-
.doneCrit1,
|
|
531
|
-
.doneCrit2,
|
|
532
|
-
.doneCrit3 {
|
|
533
|
-
stroke: ${t.critBorderColor};
|
|
534
|
-
fill: ${t.doneTaskBkgColor};
|
|
535
|
-
stroke-width: 2;
|
|
536
|
-
cursor: pointer;
|
|
537
|
-
shape-rendering: crispEdges;
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
.milestone {
|
|
541
|
-
transform: rotate(45deg) scale(0.8,0.8);
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
.milestoneText {
|
|
545
|
-
font-style: italic;
|
|
546
|
-
}
|
|
547
|
-
.doneCritText0,
|
|
548
|
-
.doneCritText1,
|
|
549
|
-
.doneCritText2,
|
|
550
|
-
.doneCritText3 {
|
|
551
|
-
fill: ${t.taskTextDarkColor} !important;
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
.activeCritText0,
|
|
555
|
-
.activeCritText1,
|
|
556
|
-
.activeCritText2,
|
|
557
|
-
.activeCritText3 {
|
|
558
|
-
fill: ${t.taskTextDarkColor} !important;
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
.titleText {
|
|
562
|
-
text-anchor: middle;
|
|
563
|
-
font-size: 18px;
|
|
564
|
-
fill: ${t.textColor} ;
|
|
565
|
-
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
566
|
-
font-family: var(--mermaid-font-family);
|
|
567
|
-
}
|
|
568
|
-
`,lm=oN,lN=()=>"",cm=lN,cN=t=>`
|
|
569
|
-
.pieCircle{
|
|
570
|
-
stroke: ${t.pieStrokeColor};
|
|
571
|
-
stroke-width : ${t.pieStrokeWidth};
|
|
572
|
-
opacity : ${t.pieOpacity};
|
|
573
|
-
}
|
|
574
|
-
.pieTitleText {
|
|
575
|
-
text-anchor: middle;
|
|
576
|
-
font-size: ${t.pieTitleTextSize};
|
|
577
|
-
fill: ${t.pieTitleTextColor};
|
|
578
|
-
font-family: ${t.fontFamily};
|
|
579
|
-
}
|
|
580
|
-
.slice {
|
|
581
|
-
font-family: ${t.fontFamily};
|
|
582
|
-
fill: ${t.pieSectionTextColor};
|
|
583
|
-
font-size:${t.pieSectionTextSize};
|
|
584
|
-
// fill: white;
|
|
585
|
-
}
|
|
586
|
-
.legend text {
|
|
587
|
-
fill: ${t.pieLegendTextColor};
|
|
588
|
-
font-family: ${t.fontFamily};
|
|
589
|
-
font-size: ${t.pieLegendTextSize};
|
|
590
|
-
}
|
|
591
|
-
`,um=cN,uN=t=>`
|
|
592
|
-
|
|
593
|
-
marker {
|
|
594
|
-
fill: ${t.relationColor};
|
|
595
|
-
stroke: ${t.relationColor};
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
marker.cross {
|
|
599
|
-
stroke: ${t.lineColor};
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
svg {
|
|
603
|
-
font-family: ${t.fontFamily};
|
|
604
|
-
font-size: ${t.fontSize};
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
.reqBox {
|
|
608
|
-
fill: ${t.requirementBackground};
|
|
609
|
-
fill-opacity: 100%;
|
|
610
|
-
stroke: ${t.requirementBorderColor};
|
|
611
|
-
stroke-width: ${t.requirementBorderSize};
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
.reqTitle, .reqLabel{
|
|
615
|
-
fill: ${t.requirementTextColor};
|
|
616
|
-
}
|
|
617
|
-
.reqLabelBox {
|
|
618
|
-
fill: ${t.relationLabelBackground};
|
|
619
|
-
fill-opacity: 100%;
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
.req-title-line {
|
|
623
|
-
stroke: ${t.requirementBorderColor};
|
|
624
|
-
stroke-width: ${t.requirementBorderSize};
|
|
625
|
-
}
|
|
626
|
-
.relationshipLine {
|
|
627
|
-
stroke: ${t.relationColor};
|
|
628
|
-
stroke-width: 1;
|
|
629
|
-
}
|
|
630
|
-
.relationshipLabel {
|
|
631
|
-
fill: ${t.relationLabelColor};
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
`,hm=uN,hN=t=>`.actor {
|
|
635
|
-
stroke: ${t.actorBorder};
|
|
636
|
-
fill: ${t.actorBkg};
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
text.actor > tspan {
|
|
640
|
-
fill: ${t.actorTextColor};
|
|
641
|
-
stroke: none;
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
.actor-line {
|
|
645
|
-
stroke: ${t.actorLineColor};
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
.messageLine0 {
|
|
649
|
-
stroke-width: 1.5;
|
|
650
|
-
stroke-dasharray: none;
|
|
651
|
-
stroke: ${t.signalColor};
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
.messageLine1 {
|
|
655
|
-
stroke-width: 1.5;
|
|
656
|
-
stroke-dasharray: 2, 2;
|
|
657
|
-
stroke: ${t.signalColor};
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
#arrowhead path {
|
|
661
|
-
fill: ${t.signalColor};
|
|
662
|
-
stroke: ${t.signalColor};
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
.sequenceNumber {
|
|
666
|
-
fill: ${t.sequenceNumberColor};
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
#sequencenumber {
|
|
670
|
-
fill: ${t.signalColor};
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
#crosshead path {
|
|
674
|
-
fill: ${t.signalColor};
|
|
675
|
-
stroke: ${t.signalColor};
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
.messageText {
|
|
679
|
-
fill: ${t.signalTextColor};
|
|
680
|
-
stroke: none;
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
.labelBox {
|
|
684
|
-
stroke: ${t.labelBoxBorderColor};
|
|
685
|
-
fill: ${t.labelBoxBkgColor};
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
.labelText, .labelText > tspan {
|
|
689
|
-
fill: ${t.labelTextColor};
|
|
690
|
-
stroke: none;
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
.loopText, .loopText > tspan {
|
|
694
|
-
fill: ${t.loopTextColor};
|
|
695
|
-
stroke: none;
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
.loopLine {
|
|
699
|
-
stroke-width: 2px;
|
|
700
|
-
stroke-dasharray: 2, 2;
|
|
701
|
-
stroke: ${t.labelBoxBorderColor};
|
|
702
|
-
fill: ${t.labelBoxBorderColor};
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
.note {
|
|
706
|
-
//stroke: #decc93;
|
|
707
|
-
stroke: ${t.noteBorderColor};
|
|
708
|
-
fill: ${t.noteBkgColor};
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
.noteText, .noteText > tspan {
|
|
712
|
-
fill: ${t.noteTextColor};
|
|
713
|
-
stroke: none;
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
.activation0 {
|
|
717
|
-
fill: ${t.activationBkgColor};
|
|
718
|
-
stroke: ${t.activationBorderColor};
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
.activation1 {
|
|
722
|
-
fill: ${t.activationBkgColor};
|
|
723
|
-
stroke: ${t.activationBorderColor};
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
.activation2 {
|
|
727
|
-
fill: ${t.activationBkgColor};
|
|
728
|
-
stroke: ${t.activationBorderColor};
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
.actorPopupMenu {
|
|
732
|
-
position: absolute;
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
.actorPopupMenuPanel {
|
|
736
|
-
position: absolute;
|
|
737
|
-
fill: ${t.actorBkg};
|
|
738
|
-
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
|
739
|
-
filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
|
|
740
|
-
}
|
|
741
|
-
.actor-man line {
|
|
742
|
-
stroke: ${t.actorBorder};
|
|
743
|
-
fill: ${t.actorBkg};
|
|
744
|
-
}
|
|
745
|
-
.actor-man circle, line {
|
|
746
|
-
stroke: ${t.actorBorder};
|
|
747
|
-
fill: ${t.actorBkg};
|
|
748
|
-
stroke-width: 2px;
|
|
749
|
-
}
|
|
750
|
-
`,dm=hN,dN=t=>`
|
|
751
|
-
defs #statediagram-barbEnd {
|
|
752
|
-
fill: ${t.transitionColor};
|
|
753
|
-
stroke: ${t.transitionColor};
|
|
754
|
-
}
|
|
755
|
-
g.stateGroup text {
|
|
756
|
-
fill: ${t.nodeBorder};
|
|
757
|
-
stroke: none;
|
|
758
|
-
font-size: 10px;
|
|
759
|
-
}
|
|
760
|
-
g.stateGroup text {
|
|
761
|
-
fill: ${t.textColor};
|
|
762
|
-
stroke: none;
|
|
763
|
-
font-size: 10px;
|
|
764
|
-
|
|
765
|
-
}
|
|
766
|
-
g.stateGroup .state-title {
|
|
767
|
-
font-weight: bolder;
|
|
768
|
-
fill: ${t.stateLabelColor};
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
g.stateGroup rect {
|
|
772
|
-
fill: ${t.mainBkg};
|
|
773
|
-
stroke: ${t.nodeBorder};
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
g.stateGroup line {
|
|
777
|
-
stroke: ${t.lineColor};
|
|
778
|
-
stroke-width: 1;
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
.transition {
|
|
782
|
-
stroke: ${t.transitionColor};
|
|
783
|
-
stroke-width: 1;
|
|
784
|
-
fill: none;
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
.stateGroup .composit {
|
|
788
|
-
fill: ${t.background};
|
|
789
|
-
border-bottom: 1px
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
.stateGroup .alt-composit {
|
|
793
|
-
fill: #e0e0e0;
|
|
794
|
-
border-bottom: 1px
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
.state-note {
|
|
798
|
-
stroke: ${t.noteBorderColor};
|
|
799
|
-
fill: ${t.noteBkgColor};
|
|
800
|
-
|
|
801
|
-
text {
|
|
802
|
-
fill: ${t.noteTextColor};
|
|
803
|
-
stroke: none;
|
|
804
|
-
font-size: 10px;
|
|
805
|
-
}
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
.stateLabel .box {
|
|
809
|
-
stroke: none;
|
|
810
|
-
stroke-width: 0;
|
|
811
|
-
fill: ${t.mainBkg};
|
|
812
|
-
opacity: 0.5;
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
.edgeLabel .label rect {
|
|
816
|
-
fill: ${t.labelBackgroundColor};
|
|
817
|
-
opacity: 0.5;
|
|
818
|
-
}
|
|
819
|
-
.edgeLabel .label text {
|
|
820
|
-
fill: ${t.transitionLabelColor||t.tertiaryTextColor};
|
|
821
|
-
}
|
|
822
|
-
.label div .edgeLabel {
|
|
823
|
-
color: ${t.transitionLabelColor||t.tertiaryTextColor};
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
.stateLabel text {
|
|
827
|
-
fill: ${t.stateLabelColor};
|
|
828
|
-
font-size: 10px;
|
|
829
|
-
font-weight: bold;
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
-
.node circle.state-start {
|
|
833
|
-
fill: ${t.specialStateColor};
|
|
834
|
-
stroke: ${t.specialStateColor};
|
|
835
|
-
}
|
|
836
|
-
|
|
837
|
-
.node .fork-join {
|
|
838
|
-
fill: ${t.specialStateColor};
|
|
839
|
-
stroke: ${t.specialStateColor};
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
.node circle.state-end {
|
|
843
|
-
fill: ${t.innerEndBackground};
|
|
844
|
-
stroke: ${t.background};
|
|
845
|
-
stroke-width: 1.5
|
|
846
|
-
}
|
|
847
|
-
.end-state-inner {
|
|
848
|
-
fill: ${t.compositeBackground||t.background};
|
|
849
|
-
// stroke: ${t.background};
|
|
850
|
-
stroke-width: 1.5
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
.node rect {
|
|
854
|
-
fill: ${t.stateBkg||t.mainBkg};
|
|
855
|
-
stroke: ${t.stateBorder||t.nodeBorder};
|
|
856
|
-
stroke-width: 1px;
|
|
857
|
-
}
|
|
858
|
-
.node polygon {
|
|
859
|
-
fill: ${t.mainBkg};
|
|
860
|
-
stroke: ${t.stateBorder||t.nodeBorder};;
|
|
861
|
-
stroke-width: 1px;
|
|
862
|
-
}
|
|
863
|
-
#statediagram-barbEnd {
|
|
864
|
-
fill: ${t.lineColor};
|
|
865
|
-
}
|
|
866
|
-
|
|
867
|
-
.statediagram-cluster rect {
|
|
868
|
-
fill: ${t.compositeTitleBackground};
|
|
869
|
-
stroke: ${t.stateBorder||t.nodeBorder};
|
|
870
|
-
stroke-width: 1px;
|
|
871
|
-
}
|
|
872
|
-
|
|
873
|
-
.cluster-label, .nodeLabel {
|
|
874
|
-
color: ${t.stateLabelColor};
|
|
875
|
-
}
|
|
876
|
-
|
|
877
|
-
.statediagram-cluster rect.outer {
|
|
878
|
-
rx: 5px;
|
|
879
|
-
ry: 5px;
|
|
880
|
-
}
|
|
881
|
-
.statediagram-state .divider {
|
|
882
|
-
stroke: ${t.stateBorder||t.nodeBorder};
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
.statediagram-state .title-state {
|
|
886
|
-
rx: 5px;
|
|
887
|
-
ry: 5px;
|
|
888
|
-
}
|
|
889
|
-
.statediagram-cluster.statediagram-cluster .inner {
|
|
890
|
-
fill: ${t.compositeBackground||t.background};
|
|
891
|
-
}
|
|
892
|
-
.statediagram-cluster.statediagram-cluster-alt .inner {
|
|
893
|
-
fill: ${t.altBackground?t.altBackground:"#efefef"};
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
.statediagram-cluster .inner {
|
|
897
|
-
rx:0;
|
|
898
|
-
ry:0;
|
|
899
|
-
}
|
|
900
|
-
|
|
901
|
-
.statediagram-state rect.basic {
|
|
902
|
-
rx: 5px;
|
|
903
|
-
ry: 5px;
|
|
904
|
-
}
|
|
905
|
-
.statediagram-state rect.divider {
|
|
906
|
-
stroke-dasharray: 10,10;
|
|
907
|
-
fill: ${t.altBackground?t.altBackground:"#efefef"};
|
|
908
|
-
}
|
|
909
|
-
|
|
910
|
-
.note-edge {
|
|
911
|
-
stroke-dasharray: 5;
|
|
912
|
-
}
|
|
913
|
-
|
|
914
|
-
.statediagram-note rect {
|
|
915
|
-
fill: ${t.noteBkgColor};
|
|
916
|
-
stroke: ${t.noteBorderColor};
|
|
917
|
-
stroke-width: 1px;
|
|
918
|
-
rx: 0;
|
|
919
|
-
ry: 0;
|
|
920
|
-
}
|
|
921
|
-
.statediagram-note rect {
|
|
922
|
-
fill: ${t.noteBkgColor};
|
|
923
|
-
stroke: ${t.noteBorderColor};
|
|
924
|
-
stroke-width: 1px;
|
|
925
|
-
rx: 0;
|
|
926
|
-
ry: 0;
|
|
927
|
-
}
|
|
928
|
-
|
|
929
|
-
.statediagram-note text {
|
|
930
|
-
fill: ${t.noteTextColor};
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
.statediagram-note .nodeLabel {
|
|
934
|
-
color: ${t.noteTextColor};
|
|
935
|
-
}
|
|
936
|
-
.statediagram .edgeLabel {
|
|
937
|
-
color: red; // ${t.noteTextColor};
|
|
938
|
-
}
|
|
939
|
-
|
|
940
|
-
#dependencyStart, #dependencyEnd {
|
|
941
|
-
fill: ${t.lineColor};
|
|
942
|
-
stroke: ${t.lineColor};
|
|
943
|
-
stroke-width: 1;
|
|
944
|
-
}
|
|
945
|
-
|
|
946
|
-
.statediagramTitleText {
|
|
947
|
-
text-anchor: middle;
|
|
948
|
-
font-size: 18px;
|
|
949
|
-
fill: ${t.textColor};
|
|
950
|
-
}
|
|
951
|
-
`,Tc=dN,fN=t=>`.label {
|
|
952
|
-
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
953
|
-
font-family: var(--mermaid-font-family);
|
|
954
|
-
color: ${t.textColor};
|
|
955
|
-
}
|
|
956
|
-
.mouth {
|
|
957
|
-
stroke: #666;
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
line {
|
|
961
|
-
stroke: ${t.textColor}
|
|
962
|
-
}
|
|
963
|
-
|
|
964
|
-
.legend {
|
|
965
|
-
fill: ${t.textColor};
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
.label text {
|
|
969
|
-
fill: #333;
|
|
970
|
-
}
|
|
971
|
-
.label {
|
|
972
|
-
color: ${t.textColor}
|
|
973
|
-
}
|
|
974
|
-
|
|
975
|
-
.face {
|
|
976
|
-
${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};
|
|
977
|
-
stroke: #999;
|
|
978
|
-
}
|
|
979
|
-
|
|
980
|
-
.node rect,
|
|
981
|
-
.node circle,
|
|
982
|
-
.node ellipse,
|
|
983
|
-
.node polygon,
|
|
984
|
-
.node path {
|
|
985
|
-
fill: ${t.mainBkg};
|
|
986
|
-
stroke: ${t.nodeBorder};
|
|
987
|
-
stroke-width: 1px;
|
|
988
|
-
}
|
|
989
|
-
|
|
990
|
-
.node .label {
|
|
991
|
-
text-align: center;
|
|
992
|
-
}
|
|
993
|
-
.node.clickable {
|
|
994
|
-
cursor: pointer;
|
|
995
|
-
}
|
|
996
|
-
|
|
997
|
-
.arrowheadPath {
|
|
998
|
-
fill: ${t.arrowheadColor};
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
.edgePath .path {
|
|
1002
|
-
stroke: ${t.lineColor};
|
|
1003
|
-
stroke-width: 1.5px;
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
.flowchart-link {
|
|
1007
|
-
stroke: ${t.lineColor};
|
|
1008
|
-
fill: none;
|
|
1009
|
-
}
|
|
1010
|
-
|
|
1011
|
-
.edgeLabel {
|
|
1012
|
-
background-color: ${t.edgeLabelBackground};
|
|
1013
|
-
rect {
|
|
1014
|
-
opacity: 0.5;
|
|
1015
|
-
}
|
|
1016
|
-
text-align: center;
|
|
1017
|
-
}
|
|
1018
|
-
|
|
1019
|
-
.cluster rect {
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
.cluster text {
|
|
1023
|
-
fill: ${t.titleColor};
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
div.mermaidTooltip {
|
|
1027
|
-
position: absolute;
|
|
1028
|
-
text-align: center;
|
|
1029
|
-
max-width: 200px;
|
|
1030
|
-
padding: 2px;
|
|
1031
|
-
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
1032
|
-
font-family: var(--mermaid-font-family);
|
|
1033
|
-
font-size: 12px;
|
|
1034
|
-
background: ${t.tertiaryColor};
|
|
1035
|
-
border: 1px solid ${t.border2};
|
|
1036
|
-
border-radius: 2px;
|
|
1037
|
-
pointer-events: none;
|
|
1038
|
-
z-index: 100;
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
.task-type-0, .section-type-0 {
|
|
1042
|
-
${t.fillType0?`fill: ${t.fillType0}`:""};
|
|
1043
|
-
}
|
|
1044
|
-
.task-type-1, .section-type-1 {
|
|
1045
|
-
${t.fillType0?`fill: ${t.fillType1}`:""};
|
|
1046
|
-
}
|
|
1047
|
-
.task-type-2, .section-type-2 {
|
|
1048
|
-
${t.fillType0?`fill: ${t.fillType2}`:""};
|
|
1049
|
-
}
|
|
1050
|
-
.task-type-3, .section-type-3 {
|
|
1051
|
-
${t.fillType0?`fill: ${t.fillType3}`:""};
|
|
1052
|
-
}
|
|
1053
|
-
.task-type-4, .section-type-4 {
|
|
1054
|
-
${t.fillType0?`fill: ${t.fillType4}`:""};
|
|
1055
|
-
}
|
|
1056
|
-
.task-type-5, .section-type-5 {
|
|
1057
|
-
${t.fillType0?`fill: ${t.fillType5}`:""};
|
|
1058
|
-
}
|
|
1059
|
-
.task-type-6, .section-type-6 {
|
|
1060
|
-
${t.fillType0?`fill: ${t.fillType6}`:""};
|
|
1061
|
-
}
|
|
1062
|
-
.task-type-7, .section-type-7 {
|
|
1063
|
-
${t.fillType0?`fill: ${t.fillType7}`:""};
|
|
1064
|
-
}
|
|
1065
|
-
|
|
1066
|
-
.actor-0 {
|
|
1067
|
-
${t.actor0?`fill: ${t.actor0}`:""};
|
|
1068
|
-
}
|
|
1069
|
-
.actor-1 {
|
|
1070
|
-
${t.actor1?`fill: ${t.actor1}`:""};
|
|
1071
|
-
}
|
|
1072
|
-
.actor-2 {
|
|
1073
|
-
${t.actor2?`fill: ${t.actor2}`:""};
|
|
1074
|
-
}
|
|
1075
|
-
.actor-3 {
|
|
1076
|
-
${t.actor3?`fill: ${t.actor3}`:""};
|
|
1077
|
-
}
|
|
1078
|
-
.actor-4 {
|
|
1079
|
-
${t.actor4?`fill: ${t.actor4}`:""};
|
|
1080
|
-
}
|
|
1081
|
-
.actor-5 {
|
|
1082
|
-
${t.actor5?`fill: ${t.actor5}`:""};
|
|
1083
|
-
}
|
|
1084
|
-
`,fm=fN,pN=t=>`.person {
|
|
1085
|
-
stroke: ${t.personBorder};
|
|
1086
|
-
fill: ${t.personBkg};
|
|
1087
|
-
}
|
|
1088
|
-
`,pm=pN,Vl={flowchart:wc,"flowchart-v2":wc,sequence:dm,gantt:lm,classDiagram:no,"classDiagram-v2":no,class:no,stateDiagram:Tc,state:Tc,info:cm,pie:um,er:am,error:om,journey:fm,requirement:hm,c4:pm},gN=(t,e,r)=>{let i="";return t in Vl&&Vl[t]?i=Vl[t](r):B.warn(`No theme found for ${t}`),` & {
|
|
1089
|
-
font-family: ${r.fontFamily};
|
|
1090
|
-
font-size: ${r.fontSize};
|
|
1091
|
-
fill: ${r.textColor}
|
|
1092
|
-
}
|
|
1093
|
-
|
|
1094
|
-
/* Classes common for multiple diagrams */
|
|
1095
|
-
|
|
1096
|
-
& .error-icon {
|
|
1097
|
-
fill: ${r.errorBkgColor};
|
|
1098
|
-
}
|
|
1099
|
-
& .error-text {
|
|
1100
|
-
fill: ${r.errorTextColor};
|
|
1101
|
-
stroke: ${r.errorTextColor};
|
|
1102
|
-
}
|
|
1103
|
-
|
|
1104
|
-
& .edge-thickness-normal {
|
|
1105
|
-
stroke-width: 2px;
|
|
1106
|
-
}
|
|
1107
|
-
& .edge-thickness-thick {
|
|
1108
|
-
stroke-width: 3.5px
|
|
1109
|
-
}
|
|
1110
|
-
& .edge-pattern-solid {
|
|
1111
|
-
stroke-dasharray: 0;
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
& .edge-pattern-dashed{
|
|
1115
|
-
stroke-dasharray: 3;
|
|
1116
|
-
}
|
|
1117
|
-
.edge-pattern-dotted {
|
|
1118
|
-
stroke-dasharray: 2;
|
|
1119
|
-
}
|
|
1120
|
-
|
|
1121
|
-
& .marker {
|
|
1122
|
-
fill: ${r.lineColor};
|
|
1123
|
-
stroke: ${r.lineColor};
|
|
1124
|
-
}
|
|
1125
|
-
& .marker.cross {
|
|
1126
|
-
stroke: ${r.lineColor};
|
|
1127
|
-
}
|
|
1128
|
-
|
|
1129
|
-
& svg {
|
|
1130
|
-
font-family: ${r.fontFamily};
|
|
1131
|
-
font-size: ${r.fontSize};
|
|
1132
|
-
}
|
|
1133
|
-
|
|
1134
|
-
${i}
|
|
1135
|
-
|
|
1136
|
-
${e}
|
|
1137
|
-
`},yN=(t,e)=>{Vl[t]=e},mN=gN,bN=B,_N=k0,jo=$,xN=t=>xi(t,jo()),gm=ku,Ec={},dr=(t,e,r)=>{if(Ec[t])throw new Error(`Diagram ${t} already registered.`);Ec[t]=e,r&&Xy(t,r),yN(t,e.styles),e.injectUtils&&e.injectUtils(bN,_N,jo,xN,gm)},ym=t=>{if(t in Ec)return Ec[t];throw new Error(`Diagram ${t} not found.`)};var f1=function(){var t=function(H,N,M,C){for(M=M||{},C=H.length;C--;M[H[C]]=N);return M},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],u=[8,14,20,22,24,25,27,29,32,37,40],d=[8,13,14,20,22,24,25,27,29,32,37,40],f=[1,26],p=[6,8,14,50,55],g=[8,14,55],_=[1,53],k=[1,52],w=[8,14,30,33,35,38,55],S=[1,67],A=[1,68],O=[1,69],P=[8,14,33,35,42,55],W={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(N,M,C,v,D,m,Q){var b=m.length-1;switch(D){case 3:return m[b];case 4:return m[b-1];case 5:return v.setDirection(m[b-3]),m[b-1];case 7:v.setOptions(m[b-1]),this.$=m[b];break;case 8:m[b-1]+=m[b],this.$=m[b-1];break;case 10:this.$=[];break;case 11:m[b-1].push(m[b]),this.$=m[b-1];break;case 12:this.$=m[b-1];break;case 17:this.$=m[b].trim(),v.setAccTitle(this.$);break;case 18:case 19:this.$=m[b].trim(),v.setAccDescription(this.$);break;case 20:v.addSection(m[b].substr(8)),this.$=m[b].substr(8);break;case 22:v.checkout(m[b]);break;case 23:v.branch(m[b]);break;case 24:v.branch(m[b-2],m[b]);break;case 25:v.cherryPick(m[b],"",void 0);break;case 26:v.cherryPick(m[b-2],"",m[b]);break;case 27:case 29:v.cherryPick(m[b-2],"","");break;case 28:v.cherryPick(m[b],"",m[b-2]);break;case 30:v.merge(m[b],"","","");break;case 31:v.merge(m[b-2],m[b],"","");break;case 32:v.merge(m[b-2],"",m[b],"");break;case 33:v.merge(m[b-2],"","",m[b]);break;case 34:v.merge(m[b-4],m[b],"",m[b-2]);break;case 35:v.merge(m[b-4],"",m[b],m[b-2]);break;case 36:v.merge(m[b-4],"",m[b-2],m[b]);break;case 37:v.merge(m[b-4],m[b-2],m[b],"");break;case 38:v.merge(m[b-4],m[b-2],"",m[b]);break;case 39:v.merge(m[b-4],m[b],m[b-2],"");break;case 40:v.merge(m[b-6],m[b-4],m[b-2],m[b]);break;case 41:v.merge(m[b-6],m[b],m[b-4],m[b-2]);break;case 42:v.merge(m[b-6],m[b-4],m[b],m[b-2]);break;case 43:v.merge(m[b-6],m[b-2],m[b-4],m[b]);break;case 44:v.merge(m[b-6],m[b],m[b-2],m[b-4]);break;case 45:v.merge(m[b-6],m[b-2],m[b],m[b-4]);break;case 46:v.commit(m[b]);break;case 47:v.commit("","",v.commitType.NORMAL,m[b]);break;case 48:v.commit("","",m[b],"");break;case 49:v.commit("","",m[b],m[b-2]);break;case 50:v.commit("","",m[b-2],m[b]);break;case 51:v.commit("",m[b],v.commitType.NORMAL,"");break;case 52:v.commit("",m[b-2],v.commitType.NORMAL,m[b]);break;case 53:v.commit("",m[b],v.commitType.NORMAL,m[b-2]);break;case 54:v.commit("",m[b-2],m[b],"");break;case 55:v.commit("",m[b],m[b-2],"");break;case 56:v.commit("",m[b-4],m[b-2],m[b]);break;case 57:v.commit("",m[b-4],m[b],m[b-2]);break;case 58:v.commit("",m[b-2],m[b-4],m[b]);break;case 59:v.commit("",m[b],m[b-4],m[b-2]);break;case 60:v.commit("",m[b],m[b-2],m[b-4]);break;case 61:v.commit("",m[b-2],m[b],m[b-4]);break;case 62:v.commit(m[b],"",v.commitType.NORMAL,"");break;case 63:v.commit(m[b],"",v.commitType.NORMAL,m[b-2]);break;case 64:v.commit(m[b-2],"",v.commitType.NORMAL,m[b]);break;case 65:v.commit(m[b-2],"",m[b],"");break;case 66:v.commit(m[b],"",m[b-2],"");break;case 67:v.commit(m[b],m[b-2],v.commitType.NORMAL,"");break;case 68:v.commit(m[b-2],m[b],v.commitType.NORMAL,"");break;case 69:v.commit(m[b-4],"",m[b-2],m[b]);break;case 70:v.commit(m[b-4],"",m[b],m[b-2]);break;case 71:v.commit(m[b-2],"",m[b-4],m[b]);break;case 72:v.commit(m[b],"",m[b-4],m[b-2]);break;case 73:v.commit(m[b],"",m[b-2],m[b-4]);break;case 74:v.commit(m[b-2],"",m[b],m[b-4]);break;case 75:v.commit(m[b-4],m[b],m[b-2],"");break;case 76:v.commit(m[b-4],m[b-2],m[b],"");break;case 77:v.commit(m[b-2],m[b],m[b-4],"");break;case 78:v.commit(m[b],m[b-2],m[b-4],"");break;case 79:v.commit(m[b],m[b-4],m[b-2],"");break;case 80:v.commit(m[b-2],m[b-4],m[b],"");break;case 81:v.commit(m[b-4],m[b],v.commitType.NORMAL,m[b-2]);break;case 82:v.commit(m[b-4],m[b-2],v.commitType.NORMAL,m[b]);break;case 83:v.commit(m[b-2],m[b],v.commitType.NORMAL,m[b-4]);break;case 84:v.commit(m[b],m[b-2],v.commitType.NORMAL,m[b-4]);break;case 85:v.commit(m[b],m[b-4],v.commitType.NORMAL,m[b-2]);break;case 86:v.commit(m[b-2],m[b-4],v.commitType.NORMAL,m[b]);break;case 87:v.commit(m[b-6],m[b-4],m[b-2],m[b]);break;case 88:v.commit(m[b-6],m[b-4],m[b],m[b-2]);break;case 89:v.commit(m[b-6],m[b-2],m[b-4],m[b]);break;case 90:v.commit(m[b-6],m[b],m[b-4],m[b-2]);break;case 91:v.commit(m[b-6],m[b-2],m[b],m[b-4]);break;case 92:v.commit(m[b-6],m[b],m[b-2],m[b-4]);break;case 93:v.commit(m[b-4],m[b-6],m[b-2],m[b]);break;case 94:v.commit(m[b-4],m[b-6],m[b],m[b-2]);break;case 95:v.commit(m[b-2],m[b-6],m[b-4],m[b]);break;case 96:v.commit(m[b],m[b-6],m[b-4],m[b-2]);break;case 97:v.commit(m[b-2],m[b-6],m[b],m[b-4]);break;case 98:v.commit(m[b],m[b-6],m[b-2],m[b-4]);break;case 99:v.commit(m[b],m[b-4],m[b-2],m[b-6]);break;case 100:v.commit(m[b-2],m[b-4],m[b],m[b-6]);break;case 101:v.commit(m[b],m[b-2],m[b-4],m[b-6]);break;case 102:v.commit(m[b-2],m[b],m[b-4],m[b-6]);break;case 103:v.commit(m[b-4],m[b-2],m[b],m[b-6]);break;case 104:v.commit(m[b-4],m[b],m[b-2],m[b-6]);break;case 105:v.commit(m[b-2],m[b-4],m[b-6],m[b]);break;case 106:v.commit(m[b],m[b-4],m[b-6],m[b-2]);break;case 107:v.commit(m[b-2],m[b],m[b-6],m[b-4]);break;case 108:v.commit(m[b],m[b-2],m[b-6],m[b-4]);break;case 109:v.commit(m[b-4],m[b-2],m[b-6],m[b]);break;case 110:v.commit(m[b-4],m[b],m[b-6],m[b-2]);break;case 111:this.$="";break;case 112:this.$=m[b];break;case 113:this.$=v.commitType.NORMAL;break;case 114:this.$=v.commitType.REVERSE;break;case 115:this.$=v.commitType.HIGHLIGHT;break;case 118:v.parseDirective("%%{","open_directive");break;case 119:v.parseDirective(m[b],"type_directive");break;case 120:m[b]=m[b].trim().replace(/'/g,'"'),v.parseDirective(m[b],"arg_directive");break;case 121:v.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(u,[2,10],{12:22,13:[1,23]}),t(d,[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(d,[2,8]),t(p,[2,116]),{49:45,52:[1,46]},t(p,[2,121]),{1:[2,4]},{8:[1,47]},t(u,[2,11]),{4:48,8:r,14:i,55:s},t(u,[2,13]),t(g,[2,14]),t(g,[2,15]),t(g,[2,16]),{21:[1,49]},{23:[1,50]},t(g,[2,19]),t(g,[2,20]),t(g,[2,21]),{28:51,34:_,54:k},t(g,[2,111],{41:54,33:[1,57],34:[1,59],35:[1,55],38:[1,56],42:[1,58]}),{28:60,34:_,54:k},{33:[1,61],35:[1,62]},{28:63,34:_,54:k},{48:64,53:f},{53:[2,120]},{1:[2,5]},t(u,[2,12]),t(g,[2,17]),t(g,[2,18]),t(g,[2,22]),t(w,[2,122]),t(w,[2,123]),t(g,[2,46]),{34:[1,65]},{39:66,43:S,44:A,45:O},{34:[1,70]},{34:[1,71]},t(g,[2,112]),t(g,[2,30],{33:[1,72],35:[1,74],38:[1,73]}),{34:[1,75]},{34:[1,76],36:[1,77]},t(g,[2,23],{30:[1,78]}),t(p,[2,117]),t(g,[2,47],{33:[1,80],38:[1,79],42:[1,81]}),t(g,[2,48],{33:[1,83],35:[1,82],42:[1,84]}),t(P,[2,113]),t(P,[2,114]),t(P,[2,115]),t(g,[2,51],{35:[1,85],38:[1,86],42:[1,87]}),t(g,[2,62],{33:[1,90],35:[1,88],38:[1,89]}),{34:[1,91]},{39:92,43:S,44:A,45:O},{34:[1,93]},t(g,[2,25],{35:[1,94]}),{33:[1,95]},{33:[1,96]},{31:[1,97]},{39:98,43:S,44:A,45:O},{34:[1,99]},{34:[1,100]},{34:[1,101]},{34:[1,102]},{34:[1,103]},{34:[1,104]},{39:105,43:S,44:A,45:O},{34:[1,106]},{34:[1,107]},{39:108,43:S,44:A,45:O},{34:[1,109]},t(g,[2,31],{35:[1,111],38:[1,110]}),t(g,[2,32],{33:[1,113],35:[1,112]}),t(g,[2,33],{33:[1,114],38:[1,115]}),{34:[1,116],36:[1,117]},{34:[1,118]},{34:[1,119]},t(g,[2,24]),t(g,[2,49],{33:[1,120],42:[1,121]}),t(g,[2,53],{38:[1,122],42:[1,123]}),t(g,[2,63],{33:[1,125],38:[1,124]}),t(g,[2,50],{33:[1,126],42:[1,127]}),t(g,[2,55],{35:[1,128],42:[1,129]}),t(g,[2,66],{33:[1,131],35:[1,130]}),t(g,[2,52],{38:[1,132],42:[1,133]}),t(g,[2,54],{35:[1,134],42:[1,135]}),t(g,[2,67],{35:[1,137],38:[1,136]}),t(g,[2,64],{33:[1,139],38:[1,138]}),t(g,[2,65],{33:[1,141],35:[1,140]}),t(g,[2,68],{35:[1,143],38:[1,142]}),{39:144,43:S,44:A,45:O},{34:[1,145]},{34:[1,146]},{34:[1,147]},{34:[1,148]},{39:149,43:S,44:A,45:O},t(g,[2,26]),t(g,[2,27]),t(g,[2,28]),t(g,[2,29]),{34:[1,150]},{34:[1,151]},{39:152,43:S,44:A,45:O},{34:[1,153]},{39:154,43:S,44:A,45:O},{34:[1,155]},{34:[1,156]},{34:[1,157]},{34:[1,158]},{34:[1,159]},{34:[1,160]},{34:[1,161]},{39:162,43:S,44:A,45:O},{34:[1,163]},{34:[1,164]},{34:[1,165]},{39:166,43:S,44:A,45:O},{34:[1,167]},{39:168,43:S,44:A,45:O},{34:[1,169]},{34:[1,170]},{34:[1,171]},{39:172,43:S,44:A,45:O},{34:[1,173]},t(g,[2,37],{35:[1,174]}),t(g,[2,38],{38:[1,175]}),t(g,[2,36],{33:[1,176]}),t(g,[2,39],{35:[1,177]}),t(g,[2,34],{38:[1,178]}),t(g,[2,35],{33:[1,179]}),t(g,[2,60],{42:[1,180]}),t(g,[2,73],{33:[1,181]}),t(g,[2,61],{42:[1,182]}),t(g,[2,84],{38:[1,183]}),t(g,[2,74],{33:[1,184]}),t(g,[2,83],{38:[1,185]}),t(g,[2,59],{42:[1,186]}),t(g,[2,72],{33:[1,187]}),t(g,[2,58],{42:[1,188]}),t(g,[2,78],{35:[1,189]}),t(g,[2,71],{33:[1,190]}),t(g,[2,77],{35:[1,191]}),t(g,[2,57],{42:[1,192]}),t(g,[2,85],{38:[1,193]}),t(g,[2,56],{42:[1,194]}),t(g,[2,79],{35:[1,195]}),t(g,[2,80],{35:[1,196]}),t(g,[2,86],{38:[1,197]}),t(g,[2,70],{33:[1,198]}),t(g,[2,81],{38:[1,199]}),t(g,[2,69],{33:[1,200]}),t(g,[2,75],{35:[1,201]}),t(g,[2,76],{35:[1,202]}),t(g,[2,82],{38:[1,203]}),{34:[1,204]},{39:205,43:S,44:A,45:O},{34:[1,206]},{34:[1,207]},{39:208,43:S,44:A,45:O},{34:[1,209]},{34:[1,210]},{34:[1,211]},{34:[1,212]},{39:213,43:S,44:A,45:O},{34:[1,214]},{39:215,43:S,44:A,45:O},{34:[1,216]},{34:[1,217]},{34:[1,218]},{34:[1,219]},{34:[1,220]},{34:[1,221]},{34:[1,222]},{39:223,43:S,44:A,45:O},{34:[1,224]},{34:[1,225]},{34:[1,226]},{39:227,43:S,44:A,45:O},{34:[1,228]},{39:229,43:S,44:A,45:O},{34:[1,230]},{34:[1,231]},{34:[1,232]},{39:233,43:S,44:A,45:O},t(g,[2,40]),t(g,[2,42]),t(g,[2,41]),t(g,[2,43]),t(g,[2,45]),t(g,[2,44]),t(g,[2,101]),t(g,[2,102]),t(g,[2,99]),t(g,[2,100]),t(g,[2,104]),t(g,[2,103]),t(g,[2,108]),t(g,[2,107]),t(g,[2,106]),t(g,[2,105]),t(g,[2,110]),t(g,[2,109]),t(g,[2,98]),t(g,[2,97]),t(g,[2,96]),t(g,[2,95]),t(g,[2,93]),t(g,[2,94]),t(g,[2,92]),t(g,[2,91]),t(g,[2,90]),t(g,[2,89]),t(g,[2,87]),t(g,[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(N,M){if(M.recoverable)this.trace(N);else{var C=new Error(N);throw C.hash=M,C}},parse:function(N){var M=this,C=[0],v=[],D=[null],m=[],Q=this.table,b="",ct=0,Dt=0,vt=2,j=1,ot=m.slice.call(arguments,1),rt=Object.create(this.lexer),it={yy:{}};for(var ut in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ut)&&(it.yy[ut]=this.yy[ut]);rt.setInput(N,it.yy),it.yy.lexer=rt,it.yy.parser=this,typeof rt.yylloc>"u"&&(rt.yylloc={});var bt=rt.yylloc;m.push(bt);var K=rt.options&&rt.options.ranges;typeof it.yy.parseError=="function"?this.parseError=it.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ot(){var Yt;return Yt=v.pop()||rt.lex()||j,typeof Yt!="number"&&(Yt instanceof Array&&(v=Yt,Yt=v.pop()),Yt=M.symbols_[Yt]||Yt),Yt}for(var Y,U,X,F,I={},L,J,T,ht;;){if(U=C[C.length-1],this.defaultActions[U]?X=this.defaultActions[U]:((Y===null||typeof Y>"u")&&(Y=Ot()),X=Q[U]&&Q[U][Y]),typeof X>"u"||!X.length||!X[0]){var V="";ht=[];for(L in Q[U])this.terminals_[L]&&L>vt&&ht.push("'"+this.terminals_[L]+"'");rt.showPosition?V="Parse error on line "+(ct+1)+`:
|
|
1138
|
-
`+rt.showPosition()+`
|
|
1139
|
-
Expecting `+ht.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":V="Parse error on line "+(ct+1)+": Unexpected "+(Y==j?"end of input":"'"+(this.terminals_[Y]||Y)+"'"),this.parseError(V,{text:rt.match,token:this.terminals_[Y]||Y,line:rt.yylineno,loc:bt,expected:ht})}if(X[0]instanceof Array&&X.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+Y);switch(X[0]){case 1:C.push(Y),D.push(rt.yytext),m.push(rt.yylloc),C.push(X[1]),Y=null,Dt=rt.yyleng,b=rt.yytext,ct=rt.yylineno,bt=rt.yylloc;break;case 2:if(J=this.productions_[X[1]][1],I.$=D[D.length-J],I._$={first_line:m[m.length-(J||1)].first_line,last_line:m[m.length-1].last_line,first_column:m[m.length-(J||1)].first_column,last_column:m[m.length-1].last_column},K&&(I._$.range=[m[m.length-(J||1)].range[0],m[m.length-1].range[1]]),F=this.performAction.apply(I,[b,Dt,ct,it.yy,X[1],D,m].concat(ot)),typeof F<"u")return F;J&&(C=C.slice(0,-1*J*2),D=D.slice(0,-1*J),m=m.slice(0,-1*J)),C.push(this.productions_[X[1]][0]),D.push(I.$),m.push(I._$),T=Q[C[C.length-2]][C[C.length-1]],C.push(T);break;case 3:return!0}}return!0}},q=function(){var H={EOF:1,parseError:function(M,C){if(this.yy.parser)this.yy.parser.parseError(M,C);else throw new Error(M)},setInput:function(N,M){return this.yy=M||this.yy||{},this._input=N,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 N=this._input[0];this.yytext+=N,this.yyleng++,this.offset++,this.match+=N,this.matched+=N;var M=N.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),N},unput:function(N){var M=N.length,C=N.split(/(?:\r\n?|\n)/g);this._input=N+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-M),this.offset-=M;var v=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 D=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===v.length?this.yylloc.first_column:0)+v[v.length-C.length].length-C[0].length:this.yylloc.first_column-M},this.options.ranges&&(this.yylloc.range=[D[0],D[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).
|
|
1140
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(N){this.unput(this.match.slice(N))},pastInput:function(){var N=this.matched.substr(0,this.matched.length-this.match.length);return(N.length>20?"...":"")+N.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var N=this.match;return N.length<20&&(N+=this._input.substr(0,20-N.length)),(N.substr(0,20)+(N.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var N=this.pastInput(),M=new Array(N.length+1).join("-");return N+this.upcomingInput()+`
|
|
1141
|
-
`+M+"^"},test_match:function(N,M){var C,v,D;if(this.options.backtrack_lexer&&(D={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&&(D.yylloc.range=this.yylloc.range.slice(0))),v=N[0].match(/(?:\r\n?|\n).*/g),v&&(this.yylineno+=v.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:v?v[v.length-1].length-v[v.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+N[0].length},this.yytext+=N[0],this.match+=N[0],this.matches=N,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(N[0].length),this.matched+=N[0],C=this.performAction.call(this,this.yy,this,M,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),C)return C;if(this._backtrack){for(var m in D)this[m]=D[m];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var N,M,C,v;this._more||(this.yytext="",this.match="");for(var D=this._currentRules(),m=0;m<D.length;m++)if(C=this._input.match(this.rules[D[m]]),C&&(!M||C[0].length>M[0].length)){if(M=C,v=m,this.options.backtrack_lexer){if(N=this.test_match(C,D[m]),N!==!1)return N;if(this._backtrack){M=!1;continue}else return!1}else if(!this.options.flex)break}return M?(N=this.test_match(M,D[v]),N!==!1?N:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1142
|
-
`+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:{"case-insensitive":!0},performAction:function(M,C,v,D){switch(v){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 H}();W.lexer=q;function z(){this.yy={}}return z.prototype=W,W.Parser=z,new z}();f1.parser=f1;const vN=f1,kN=t=>t.match(/^\s*gitGraph/)!==null;let D0="",wu="",M0="";const N0=t=>xi(t,$()),Ei=function(){D0="",M0="",wu=""},ri=function(t){D0=N0(t).replace(/^\s+/g,"")},Ci=function(){return D0||wu},Si=function(t){M0=N0(t).replace(/\n\s+/g,`
|
|
1143
|
-
`)},Ai=function(){return M0},En=function(t){wu=N0(t)},Cn=function(){return wu};let Cc=$().gitGraph.mainBranchName,wN=$().gitGraph.mainBranchOrder,ur={},Dr=null,Ao={};Ao[Cc]={name:Cc,order:wN};let ir={};ir[Cc]=Dr;let fr=Cc,mm="LR",vs=0;function B0(){return Qy({length:7})}const TN=function(t,e,r){ze.parseDirective(this,t,e,r)};function EN(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 CN=function(t){mm=t};let bm={};const SN=function(t){B.debug("options str",t),t=t&&t.trim(),t=t||"{}";try{bm=JSON.parse(t)}catch(e){B.error("error while parsing gitGraph options",e.message)}},AN=function(){return bm},LN=function(t,e,r,i){B.debug("Entering commit:",t,e,r,i),e=he.sanitizeText(e,$()),t=he.sanitizeText(t,$()),i=he.sanitizeText(i,$());const n={id:e||vs+"-"+B0(),message:t,seq:vs++,type:r||Lo.NORMAL,tag:i||"",parents:Dr==null?[]:[Dr.id],branch:fr};Dr=n,ur[n.id]=n,ir[fr]=n.id,B.debug("in pushCommit "+n.id)},DN=function(t,e){if(t=he.sanitizeText(t,$()),ir[t]===void 0)ir[t]=Dr!=null?Dr.id:null,Ao[t]={name:t,order:e?parseInt(e,10):null},_m(t),B.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}},MN=function(t,e,r,i){t=he.sanitizeText(t,$()),e=he.sanitizeText(e,$());const n=ur[ir[fr]],s=ur[ir[t]];if(fr===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 ('+fr+")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(ir[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&&ur[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||vs+"-"+B0(),message:"merged branch "+t+" into "+fr,seq:vs++,parents:[Dr==null?null:Dr.id,ir[t]],branch:fr,type:Lo.MERGE,customType:r,customId:!!e,tag:i||""};Dr=a,ur[a.id]=a,ir[fr]=a.id,B.debug(ir),B.debug("in mergeBranch")},NN=function(t,e,r){if(B.debug("Entering cherryPick:",t,e,r),t=he.sanitizeText(t,$()),e=he.sanitizeText(e,$()),r=he.sanitizeText(r,$()),!t||ur[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=ur[t],n=i.branch;if(i.type===Lo.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||ur[e]===void 0){if(n===fr){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=ur[ir[fr]];if(s===void 0||!s){let o=new Error('Incorrect usage of "cherry-pick". Current branch ('+fr+")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:vs+"-"+B0(),message:"cherry-picked "+i+" into "+fr,seq:vs++,parents:[Dr==null?null:Dr.id,i.id],branch:fr,type:Lo.CHERRY_PICK,tag:r??"cherry-pick:"+i.id};Dr=a,ur[a.id]=a,ir[fr]=a.id,B.debug(ir),B.debug("in cherryPick")}},_m=function(t){if(t=he.sanitizeText(t,$()),ir[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{fr=t;const e=ir[fr];Dr=ur[e]}};function A2(t,e,r){const i=t.indexOf(e);i===-1?t.push(r):t.splice(i,1,r)}function xm(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 ir)ir[n]===e.id&&i.push(n);if(B.debug(i.join(" ")),e.parents&&e.parents.length==2){const n=ur[e.parents[0]];A2(t,e,n),t.push(ur[e.parents[1]])}else{if(e.parents.length==0)return;{const n=ur[e.parents];A2(t,e,n)}}t=EN(t,n=>n.id),xm(t)}const BN=function(){B.debug(ur);const t=vm()[0];xm([t])},IN=function(){ur={},Dr=null;let t=$().gitGraph.mainBranchName,e=$().gitGraph.mainBranchOrder;ir={},ir[t]=null,Ao={},Ao[t]={name:t,order:e},fr=t,vs=0,Ei()},ON=function(){return Object.values(Ao).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}))},RN=function(){return ir},FN=function(){return ur},vm=function(){const t=Object.keys(ur).map(function(e){return ur[e]});return t.forEach(function(e){B.debug(e.id)}),t.sort((e,r)=>e.seq-r.seq),t},PN=function(){return fr},YN=function(){return mm},VN=function(){return Dr},Lo={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},UN={parseDirective:TN,getConfig:()=>$().gitGraph,setDirection:CN,setOptions:SN,getOptions:AN,commit:LN,branch:DN,merge:MN,cherryPick:NN,checkout:_m,prettyPrint:BN,clear:IN,getBranchesAsObjArray:ON,getBranches:RN,getCommits:FN,getCommitsArray:vm,getCurrentBranch:PN,getDirection:YN,getHead:VN,setAccTitle:ri,getAccTitle:Ci,getAccDescription:Ai,setAccDescription:Si,setDiagramTitle:En,getDiagramTitle:Cn,commitType:Lo};let Xa={};const Hr={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},os=8;let Fr={},Sc={},Ac=[],Lc=0;const zN=()=>{Fr={},Sc={},Xa={},Lc=0,Ac=[]},WN=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},L2=(t,e,r)=>{const i=jo().gitGraph,n=t.append("g").attr("class","commit-bullets"),s=t.append("g").attr("class","commit-labels");let a=0;Object.keys(e).sort((u,d)=>e[u].seq-e[d].seq).forEach(u=>{const d=e[u],f=Fr[d.branch].pos,p=a+10;if(r){let g,_=d.customType!==void 0&&d.customType!==""?d.customType:d.type;switch(_){case Hr.NORMAL:g="commit-normal";break;case Hr.REVERSE:g="commit-reverse";break;case Hr.HIGHLIGHT:g="commit-highlight";break;case Hr.MERGE:g="commit-merge";break;case Hr.CHERRY_PICK:g="commit-cherry-pick";break;default:g="commit-normal"}if(_===Hr.HIGHLIGHT){const k=n.append("rect");k.attr("x",p-10),k.attr("y",f-10),k.attr("height",20),k.attr("width",20),k.attr("class",`commit ${d.id} commit-highlight${Fr[d.branch].index%os} ${g}-outer`),n.append("rect").attr("x",p-6).attr("y",f-6).attr("height",12).attr("width",12).attr("class",`commit ${d.id} commit${Fr[d.branch].index%os} ${g}-inner`)}else if(_===Hr.CHERRY_PICK)n.append("circle").attr("cx",p).attr("cy",f).attr("r",10).attr("class",`commit ${d.id} ${g}`),n.append("circle").attr("cx",p-3).attr("cy",f+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${d.id} ${g}`),n.append("circle").attr("cx",p+3).attr("cy",f+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${d.id} ${g}`),n.append("line").attr("x1",p+3).attr("y1",f+1).attr("x2",p).attr("y2",f-5).attr("stroke","#fff").attr("class",`commit ${d.id} ${g}`),n.append("line").attr("x1",p-3).attr("y1",f+1).attr("x2",p).attr("y2",f-5).attr("stroke","#fff").attr("class",`commit ${d.id} ${g}`);else{const k=n.append("circle");if(k.attr("cx",p),k.attr("cy",f),k.attr("r",d.type===Hr.MERGE?9:10),k.attr("class",`commit ${d.id} commit${Fr[d.branch].index%os}`),_===Hr.MERGE){const w=n.append("circle");w.attr("cx",p),w.attr("cy",f),w.attr("r",6),w.attr("class",`commit ${g} ${d.id} commit${Fr[d.branch].index%os}`)}_===Hr.REVERSE&&n.append("path").attr("d",`M ${p-5},${f-5}L${p+5},${f+5}M${p-5},${f+5}L${p+5},${f-5}`).attr("class",`commit ${g} ${d.id} commit${Fr[d.branch].index%os}`)}}if(Sc[d.id]={x:a+10,y:f},r){if(d.type!==Hr.CHERRY_PICK&&(d.customId&&d.type===Hr.MERGE||d.type!==Hr.MERGE)&&i.showCommitLabel){const k=s.append("g"),w=k.insert("rect").attr("class","commit-label-bkg"),S=k.append("text").attr("x",a).attr("y",f+25).attr("class","commit-label").text(d.id);let A=S.node().getBBox();if(w.attr("x",a+10-A.width/2-2).attr("y",f+13.5).attr("width",A.width+2*2).attr("height",A.height+2*2),S.attr("x",a+10-A.width/2),i.rotateCommitLabel){let O=-7.5-(A.width+10)/25*9.5,P=10+A.width/25*8.5;k.attr("transform","translate("+O+", "+P+") rotate(-45, "+a+", "+f+")")}}if(d.tag){const k=s.insert("polygon"),w=s.append("circle"),S=s.append("text").attr("y",f-16).attr("class","tag-label").text(d.tag);let A=S.node().getBBox();S.attr("x",a+10-A.width/2);const O=A.height/2,P=f-19.2;k.attr("class","tag-label-bkg").attr("points",`
|
|
1144
|
-
${a-A.width/2-4/2},${P+2}
|
|
1145
|
-
${a-A.width/2-4/2},${P-2}
|
|
1146
|
-
${a+10-A.width/2-4},${P-O-2}
|
|
1147
|
-
${a+10+A.width/2+4},${P-O-2}
|
|
1148
|
-
${a+10+A.width/2+4},${P+O+2}
|
|
1149
|
-
${a+10-A.width/2-4},${P+O+2}`),w.attr("cx",a-A.width/2+4/2).attr("cy",P).attr("r",1.5).attr("class","tag-hole")}}a+=50,a>Lc&&(Lc=a)})},HN=(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,p1=(t,e,r=0)=>{const i=t+Math.abs(t-e)/2;if(r>5)return i;if(Ac.every(a=>Math.abs(a-i)>=10))return Ac.push(i),i;const s=Math.abs(t-e);return p1(t,e-s/5,r+1)},GN=(t,e,r,i)=>{const n=Sc[e.id],s=Sc[r.id],a=HN(e,r,i);let o="",l="",u=0,d=0,f=Fr[r.branch].index,p;if(a){o="A 10 10, 0, 0, 0,",l="A 10 10, 0, 0, 1,",u=10,d=10,f=Fr[r.branch].index;const g=n.y<s.y?p1(n.y,s.y):p1(s.y,n.y);n.y<s.y?p=`M ${n.x} ${n.y} L ${n.x} ${g-u} ${o} ${n.x+d} ${g} L ${s.x-u} ${g} ${l} ${s.x} ${g+d} L ${s.x} ${s.y}`:p=`M ${n.x} ${n.y} L ${n.x} ${g+u} ${l} ${n.x+d} ${g} L ${s.x-u} ${g} ${o} ${s.x} ${g-d} L ${s.x} ${s.y}`}else n.y<s.y&&(o="A 20 20, 0, 0, 0,",u=20,d=20,f=Fr[r.branch].index,p=`M ${n.x} ${n.y} L ${n.x} ${s.y-u} ${o} ${n.x+d} ${s.y} L ${s.x} ${s.y}`),n.y>s.y&&(o="A 20 20, 0, 0, 0,",u=20,d=20,f=Fr[e.branch].index,p=`M ${n.x} ${n.y} L ${s.x-u} ${n.y} ${o} ${s.x} ${n.y-d} L ${s.x} ${s.y}`),n.y===s.y&&(f=Fr[e.branch].index,p=`M ${n.x} ${n.y} L ${n.x} ${s.y-u} ${o} ${n.x+d} ${s.y} L ${s.x} ${s.y}`);t.append("path").attr("d",p).attr("class","arrow arrow"+f%os)},qN=(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=>{GN(r,e[s],n,e)})})},jN=(t,e)=>{const r=jo().gitGraph,i=t.append("g");e.forEach((n,s)=>{const a=s%os,o=Fr[n.name].pos,l=i.append("line");l.attr("x1",0),l.attr("y1",o),l.attr("x2",Lc),l.attr("y2",o),l.attr("class","branch branch"+a),Ac.push(o);let u=n.name;const d=WN(u),f=i.insert("rect"),g=i.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+a);g.node().appendChild(d);let _=d.getBBox();f.attr("class","branchLabelBkg label"+a).attr("rx",4).attr("ry",4).attr("x",-_.width-4-(r.rotateCommitLabel===!0?30:0)).attr("y",-_.height/2+8).attr("width",_.width+18).attr("height",_.height+4),g.attr("transform","translate("+(-_.width-14-(r.rotateCommitLabel===!0?30:0))+", "+(o-_.height/2-1)+")"),f.attr("transform","translate(-19, "+(o-_.height/2)+")")})},$N=function(t,e,r,i){var n;zN();const s=jo(),a=s.gitGraph;B.debug("in gitgraph renderer",t+`
|
|
1150
|
-
`,"id:",e,r),Xa=i.db.getCommits();const o=i.db.getBranchesAsObjArray();let l=0;o.forEach((d,f)=>{Fr[d.name]={pos:l,index:f},l+=50+(a.rotateCommitLabel?40:0)});const u=At(`[id="${e}"]`);L2(u,Xa,!1),a.showBranches&&jN(u,o),qN(u,Xa),L2(u,Xa,!0),ye.insertTitle(u,"gitTitleText",a.titleTopMargin,i.db.getDiagramTitle()),gm(void 0,u,a.diagramPadding,(n=a.useMaxWidth)!=null?n:s.useMaxWidth)},XN={draw:$N},KN=t=>`
|
|
1151
|
-
.commit-id,
|
|
1152
|
-
.commit-msg,
|
|
1153
|
-
.branch-label {
|
|
1154
|
-
fill: lightgrey;
|
|
1155
|
-
color: lightgrey;
|
|
1156
|
-
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
1157
|
-
font-family: var(--mermaid-font-family);
|
|
1158
|
-
}
|
|
1159
|
-
${[0,1,2,3,4,5,6,7].map(e=>`
|
|
1160
|
-
.branch-label${e} { fill: ${t["gitBranchLabel"+e]}; }
|
|
1161
|
-
.commit${e} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; }
|
|
1162
|
-
.commit-highlight${e} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; }
|
|
1163
|
-
.label${e} { fill: ${t["git"+e]}; }
|
|
1164
|
-
.arrow${e} { stroke: ${t["git"+e]}; }
|
|
1165
|
-
`).join(`
|
|
1166
|
-
`)}
|
|
1167
|
-
|
|
1168
|
-
.branch {
|
|
1169
|
-
stroke-width: 1;
|
|
1170
|
-
stroke: ${t.lineColor};
|
|
1171
|
-
stroke-dasharray: 2;
|
|
1172
|
-
}
|
|
1173
|
-
.commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}
|
|
1174
|
-
.commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }
|
|
1175
|
-
.tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}
|
|
1176
|
-
.tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }
|
|
1177
|
-
.tag-hole { fill: ${t.textColor}; }
|
|
1178
|
-
|
|
1179
|
-
.commit-merge {
|
|
1180
|
-
stroke: ${t.primaryColor};
|
|
1181
|
-
fill: ${t.primaryColor};
|
|
1182
|
-
}
|
|
1183
|
-
.commit-reverse {
|
|
1184
|
-
stroke: ${t.primaryColor};
|
|
1185
|
-
fill: ${t.primaryColor};
|
|
1186
|
-
stroke-width: 3;
|
|
1187
|
-
}
|
|
1188
|
-
.commit-highlight-outer {
|
|
1189
|
-
}
|
|
1190
|
-
.commit-highlight-inner {
|
|
1191
|
-
stroke: ${t.primaryColor};
|
|
1192
|
-
fill: ${t.primaryColor};
|
|
1193
|
-
}
|
|
1194
|
-
|
|
1195
|
-
.arrow { stroke-width: 8; stroke-linecap: round; fill: none}
|
|
1196
|
-
.gitTitleText {
|
|
1197
|
-
text-anchor: middle;
|
|
1198
|
-
font-size: 18px;
|
|
1199
|
-
fill: ${t.textColor};
|
|
1200
|
-
}
|
|
1201
|
-
}
|
|
1202
|
-
`,ZN=KN;var Dc=function(){var t=function(Ft,xt,ft,Lt){for(ft=ft||{},Lt=Ft.length;Lt--;ft[Ft[Lt]]=xt);return ft},e=[1,6],r=[1,7],i=[1,8],n=[1,9],s=[1,16],a=[1,11],o=[1,12],l=[1,13],u=[1,14],d=[1,15],f=[1,27],p=[1,33],g=[1,34],_=[1,35],k=[1,36],w=[1,37],S=[1,72],A=[1,73],O=[1,74],P=[1,75],W=[1,76],q=[1,77],z=[1,78],H=[1,38],N=[1,39],M=[1,40],C=[1,41],v=[1,42],D=[1,43],m=[1,44],Q=[1,45],b=[1,46],ct=[1,47],Dt=[1,48],vt=[1,49],j=[1,50],ot=[1,51],rt=[1,52],it=[1,53],ut=[1,54],bt=[1,55],K=[1,56],Ot=[1,57],Y=[1,59],U=[1,60],X=[1,61],F=[1,62],I=[1,63],L=[1,64],J=[1,65],T=[1,66],ht=[1,67],V=[1,68],Yt=[1,69],et=[24,52],Mt=[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],Tt=[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],gt=[1,94],Et=[1,95],wt=[1,96],pt=[1,97],st=[15,24,52],le=[7,8,9,10,18,22,25,26,27,28],Xt=[15,24,43,52],jt=[15,24,43,52,86,87,89,90],Kt=[15,43],Gt=[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],Ee={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(xt,ft,Lt,_t,Ut,at,ie){var dt=at.length-1;switch(Ut){case 4:_t.setDirection("TB");break;case 5:_t.setDirection("BT");break;case 6:_t.setDirection("RL");break;case 7:_t.setDirection("LR");break;case 11:_t.parseDirective("%%{","open_directive");break;case 12:break;case 13:at[dt]=at[dt].trim().replace(/'/g,'"'),_t.parseDirective(at[dt],"arg_directive");break;case 14:_t.parseDirective("}%%","close_directive","c4Context");break;case 15:case 16:case 17:case 18:case 19:_t.setC4Type(at[dt-3]);break;case 26:_t.setTitle(at[dt].substring(6)),this.$=at[dt].substring(6);break;case 27:_t.setAccDescription(at[dt].substring(15)),this.$=at[dt].substring(15);break;case 28:this.$=at[dt].trim(),_t.setTitle(this.$);break;case 29:case 30:this.$=at[dt].trim(),_t.setAccDescription(this.$);break;case 35:case 36:at[dt].splice(2,0,"ENTERPRISE"),_t.addPersonOrSystemBoundary(...at[dt]),this.$=at[dt];break;case 37:_t.addPersonOrSystemBoundary(...at[dt]),this.$=at[dt];break;case 38:at[dt].splice(2,0,"CONTAINER"),_t.addContainerBoundary(...at[dt]),this.$=at[dt];break;case 39:_t.addDeploymentNode("node",...at[dt]),this.$=at[dt];break;case 40:_t.addDeploymentNode("nodeL",...at[dt]),this.$=at[dt];break;case 41:_t.addDeploymentNode("nodeR",...at[dt]),this.$=at[dt];break;case 42:_t.popBoundaryParseStack();break;case 46:_t.addPersonOrSystem("person",...at[dt]),this.$=at[dt];break;case 47:_t.addPersonOrSystem("external_person",...at[dt]),this.$=at[dt];break;case 48:_t.addPersonOrSystem("system",...at[dt]),this.$=at[dt];break;case 49:_t.addPersonOrSystem("system_db",...at[dt]),this.$=at[dt];break;case 50:_t.addPersonOrSystem("system_queue",...at[dt]),this.$=at[dt];break;case 51:_t.addPersonOrSystem("external_system",...at[dt]),this.$=at[dt];break;case 52:_t.addPersonOrSystem("external_system_db",...at[dt]),this.$=at[dt];break;case 53:_t.addPersonOrSystem("external_system_queue",...at[dt]),this.$=at[dt];break;case 54:_t.addContainer("container",...at[dt]),this.$=at[dt];break;case 55:_t.addContainer("container_db",...at[dt]),this.$=at[dt];break;case 56:_t.addContainer("container_queue",...at[dt]),this.$=at[dt];break;case 57:_t.addContainer("external_container",...at[dt]),this.$=at[dt];break;case 58:_t.addContainer("external_container_db",...at[dt]),this.$=at[dt];break;case 59:_t.addContainer("external_container_queue",...at[dt]),this.$=at[dt];break;case 60:_t.addComponent("component",...at[dt]),this.$=at[dt];break;case 61:_t.addComponent("component_db",...at[dt]),this.$=at[dt];break;case 62:_t.addComponent("component_queue",...at[dt]),this.$=at[dt];break;case 63:_t.addComponent("external_component",...at[dt]),this.$=at[dt];break;case 64:_t.addComponent("external_component_db",...at[dt]),this.$=at[dt];break;case 65:_t.addComponent("external_component_queue",...at[dt]),this.$=at[dt];break;case 67:_t.addRel("rel",...at[dt]),this.$=at[dt];break;case 68:_t.addRel("birel",...at[dt]),this.$=at[dt];break;case 69:_t.addRel("rel_u",...at[dt]),this.$=at[dt];break;case 70:_t.addRel("rel_d",...at[dt]),this.$=at[dt];break;case 71:_t.addRel("rel_l",...at[dt]),this.$=at[dt];break;case 72:_t.addRel("rel_r",...at[dt]),this.$=at[dt];break;case 73:_t.addRel("rel_b",...at[dt]),this.$=at[dt];break;case 74:at[dt].splice(0,1),_t.addRel("rel",...at[dt]),this.$=at[dt];break;case 75:_t.updateElStyle("update_el_style",...at[dt]),this.$=at[dt];break;case 76:_t.updateRelStyle("update_rel_style",...at[dt]),this.$=at[dt];break;case 77:_t.updateLayoutConfig("update_layout_config",...at[dt]),this.$=at[dt];break;case 78:this.$=[at[dt]];break;case 79:at[dt].unshift(at[dt-1]),this.$=at[dt];break;case 80:case 82:this.$=at[dt].trim();break;case 81:let ee={};ee[at[dt-1].trim()]=at[dt].trim(),this.$=ee;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:u,28:d},{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:u,28:d},{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:p,33:g,34:_,36:k,38:w,39:58,40:70,42:71,44:S,46:A,47:O,48:P,49:W,50:q,51:z,53:32,54:H,55:N,56:M,57:C,58:v,59:D,60:m,61:Q,62:b,63:ct,64:Dt,65:vt,66:j,67:ot,68:rt,69:it,70:ut,71:bt,72:K,73:Ot,74:Y,75:U,76:X,77:F,78:I,79:L,80:J,81:T,82:ht,83:V,84:Yt},{23:79,29:29,30:30,31:31,32:p,33:g,34:_,36:k,38:w,39:58,40:70,42:71,44:S,46:A,47:O,48:P,49:W,50:q,51:z,53:32,54:H,55:N,56:M,57:C,58:v,59:D,60:m,61:Q,62:b,63:ct,64:Dt,65:vt,66:j,67:ot,68:rt,69:it,70:ut,71:bt,72:K,73:Ot,74:Y,75:U,76:X,77:F,78:I,79:L,80:J,81:T,82:ht,83:V,84:Yt},{23:80,29:29,30:30,31:31,32:p,33:g,34:_,36:k,38:w,39:58,40:70,42:71,44:S,46:A,47:O,48:P,49:W,50:q,51:z,53:32,54:H,55:N,56:M,57:C,58:v,59:D,60:m,61:Q,62:b,63:ct,64:Dt,65:vt,66:j,67:ot,68:rt,69:it,70:ut,71:bt,72:K,73:Ot,74:Y,75:U,76:X,77:F,78:I,79:L,80:J,81:T,82:ht,83:V,84:Yt},{23:81,29:29,30:30,31:31,32:p,33:g,34:_,36:k,38:w,39:58,40:70,42:71,44:S,46:A,47:O,48:P,49:W,50:q,51:z,53:32,54:H,55:N,56:M,57:C,58:v,59:D,60:m,61:Q,62:b,63:ct,64:Dt,65:vt,66:j,67:ot,68:rt,69:it,70:ut,71:bt,72:K,73:Ot,74:Y,75:U,76:X,77:F,78:I,79:L,80:J,81:T,82:ht,83:V,84:Yt},{23:82,29:29,30:30,31:31,32:p,33:g,34:_,36:k,38:w,39:58,40:70,42:71,44:S,46:A,47:O,48:P,49:W,50:q,51:z,53:32,54:H,55:N,56:M,57:C,58:v,59:D,60:m,61:Q,62:b,63:ct,64:Dt,65:vt,66:j,67:ot,68:rt,69:it,70:ut,71:bt,72:K,73:Ot,74:Y,75:U,76:X,77:F,78:I,79:L,80:J,81:T,82:ht,83:V,84:Yt},{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:S,46:A,47:O,48:P,49:W,50:q,51:z,54:H,55:N,56:M,57:C,58:v,59:D,60:m,61:Q,62:b,63:ct,64:Dt,65:vt,66:j,67:ot,68:rt,69:it,70:ut,71:bt,72:K,73:Ot,74:Y,75:U,76:X,77:F,78:I,79:L,80:J,81:T,82:ht,83:V,84:Yt}),t(et,[2,21]),t(Mt,[2,23],{15:[1,88]}),t(et,[2,43],{15:[1,89]}),t(Tt,[2,26]),t(Tt,[2,27]),{35:[1,90]},{37:[1,91]},t(Tt,[2,30]),{45:92,85:93,86:gt,87:Et,89:wt,90:pt},{45:98,85:93,86:gt,87:Et,89:wt,90:pt},{45:99,85:93,86:gt,87:Et,89:wt,90:pt},{45:100,85:93,86:gt,87:Et,89:wt,90:pt},{45:101,85:93,86:gt,87:Et,89:wt,90:pt},{45:102,85:93,86:gt,87:Et,89:wt,90:pt},{45:103,85:93,86:gt,87:Et,89:wt,90:pt},{45:104,85:93,86:gt,87:Et,89:wt,90:pt},{45:105,85:93,86:gt,87:Et,89:wt,90:pt},{45:106,85:93,86:gt,87:Et,89:wt,90:pt},{45:107,85:93,86:gt,87:Et,89:wt,90:pt},{45:108,85:93,86:gt,87:Et,89:wt,90:pt},{45:109,85:93,86:gt,87:Et,89:wt,90:pt},{45:110,85:93,86:gt,87:Et,89:wt,90:pt},{45:111,85:93,86:gt,87:Et,89:wt,90:pt},{45:112,85:93,86:gt,87:Et,89:wt,90:pt},{45:113,85:93,86:gt,87:Et,89:wt,90:pt},{45:114,85:93,86:gt,87:Et,89:wt,90:pt},{45:115,85:93,86:gt,87:Et,89:wt,90:pt},{45:116,85:93,86:gt,87:Et,89:wt,90:pt},t(st,[2,66]),{45:117,85:93,86:gt,87:Et,89:wt,90:pt},{45:118,85:93,86:gt,87:Et,89:wt,90:pt},{45:119,85:93,86:gt,87:Et,89:wt,90:pt},{45:120,85:93,86:gt,87:Et,89:wt,90:pt},{45:121,85:93,86:gt,87:Et,89:wt,90:pt},{45:122,85:93,86:gt,87:Et,89:wt,90:pt},{45:123,85:93,86:gt,87:Et,89:wt,90:pt},{45:124,85:93,86:gt,87:Et,89:wt,90:pt},{45:125,85:93,86:gt,87:Et,89:wt,90:pt},{45:126,85:93,86:gt,87:Et,89:wt,90:pt},{45:127,85:93,86:gt,87:Et,89:wt,90:pt},{30:128,39:58,40:70,42:71,44:S,46:A,47:O,48:P,49:W,50:q,51:z,53:32,54:H,55:N,56:M,57:C,58:v,59:D,60:m,61:Q,62:b,63:ct,64:Dt,65:vt,66:j,67:ot,68:rt,69:it,70:ut,71:bt,72:K,73:Ot,74:Y,75:U,76:X,77:F,78:I,79:L,80:J,81:T,82:ht,83:V,84:Yt},{15:[1,130],43:[1,129]},{45:131,85:93,86:gt,87:Et,89:wt,90:pt},{45:132,85:93,86:gt,87:Et,89:wt,90:pt},{45:133,85:93,86:gt,87:Et,89:wt,90:pt},{45:134,85:93,86:gt,87:Et,89:wt,90:pt},{45:135,85:93,86:gt,87:Et,89:wt,90:pt},{45:136,85:93,86:gt,87:Et,89:wt,90:pt},{45:137,85:93,86:gt,87:Et,89:wt,90:pt},{24:[1,138]},{24:[1,139]},{24:[1,140]},{24:[1,141]},t(le,[2,9]),{14:142,21:f},{21:[2,13]},{1:[2,15]},t(et,[2,22]),t(Mt,[2,24],{31:31,29:143,32:p,33:g,34:_,36:k,38:w}),t(et,[2,44],{29:29,30:30,31:31,53:32,39:58,40:70,42:71,23:144,32:p,33:g,34:_,36:k,38:w,44:S,46:A,47:O,48:P,49:W,50:q,51:z,54:H,55:N,56:M,57:C,58:v,59:D,60:m,61:Q,62:b,63:ct,64:Dt,65:vt,66:j,67:ot,68:rt,69:it,70:ut,71:bt,72:K,73:Ot,74:Y,75:U,76:X,77:F,78:I,79:L,80:J,81:T,82:ht,83:V,84:Yt}),t(Tt,[2,28]),t(Tt,[2,29]),t(st,[2,46]),t(Xt,[2,78],{85:93,45:145,86:gt,87:Et,89:wt,90:pt}),t(jt,[2,80]),{88:[1,146]},t(jt,[2,82]),t(jt,[2,83]),t(st,[2,47]),t(st,[2,48]),t(st,[2,49]),t(st,[2,50]),t(st,[2,51]),t(st,[2,52]),t(st,[2,53]),t(st,[2,54]),t(st,[2,55]),t(st,[2,56]),t(st,[2,57]),t(st,[2,58]),t(st,[2,59]),t(st,[2,60]),t(st,[2,61]),t(st,[2,62]),t(st,[2,63]),t(st,[2,64]),t(st,[2,65]),t(st,[2,67]),t(st,[2,68]),t(st,[2,69]),t(st,[2,70]),t(st,[2,71]),t(st,[2,72]),t(st,[2,73]),t(st,[2,74]),t(st,[2,75]),t(st,[2,76]),t(st,[2,77]),{41:147,52:[1,148]},{15:[1,149]},{43:[1,150]},t(Kt,[2,35]),t(Kt,[2,36]),t(Kt,[2,37]),t(Kt,[2,38]),t(Kt,[2,39]),t(Kt,[2,40]),t(Kt,[2,41]),{1:[2,16]},{1:[2,17]},{1:[2,18]},{1:[2,19]},{15:[1,151]},t(Mt,[2,25]),t(et,[2,45]),t(Xt,[2,79]),t(jt,[2,81]),t(st,[2,31]),t(st,[2,42]),t(Gt,[2,32]),t(Gt,[2,33],{15:[1,152]}),t(le,[2,10]),t(Gt,[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(xt,ft){if(ft.recoverable)this.trace(xt);else{var Lt=new Error(xt);throw Lt.hash=ft,Lt}},parse:function(xt){var ft=this,Lt=[0],_t=[],Ut=[null],at=[],ie=this.table,dt="",ee=0,de=0,me=2,be=1,ke=at.slice.call(arguments,1),$t=Object.create(this.lexer),ne={yy:{}};for(var ge in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ge)&&(ne.yy[ge]=this.yy[ge]);$t.setInput(xt,ne.yy),ne.yy.lexer=$t,ne.yy.parser=this,typeof $t.yylloc>"u"&&($t.yylloc={});var Qt=$t.yylloc;at.push(Qt);var ii=$t.options&&$t.options.ranges;typeof ne.yy.parseError=="function"?this.parseError=ne.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ur(){var Z;return Z=_t.pop()||$t.lex()||be,typeof Z!="number"&&(Z instanceof Array&&(_t=Z,Z=_t.pop()),Z=ft.symbols_[Z]||Z),Z}for(var De,ae,Be,Oe,Fe={},Pe,Ie,Ge,tr;;){if(ae=Lt[Lt.length-1],this.defaultActions[ae]?Be=this.defaultActions[ae]:((De===null||typeof De>"u")&&(De=Ur()),Be=ie[ae]&&ie[ae][De]),typeof Be>"u"||!Be.length||!Be[0]){var zt="";tr=[];for(Pe in ie[ae])this.terminals_[Pe]&&Pe>me&&tr.push("'"+this.terminals_[Pe]+"'");$t.showPosition?zt="Parse error on line "+(ee+1)+`:
|
|
1203
|
-
`+$t.showPosition()+`
|
|
1204
|
-
Expecting `+tr.join(", ")+", got '"+(this.terminals_[De]||De)+"'":zt="Parse error on line "+(ee+1)+": Unexpected "+(De==be?"end of input":"'"+(this.terminals_[De]||De)+"'"),this.parseError(zt,{text:$t.match,token:this.terminals_[De]||De,line:$t.yylineno,loc:Qt,expected:tr})}if(Be[0]instanceof Array&&Be.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ae+", token: "+De);switch(Be[0]){case 1:Lt.push(De),Ut.push($t.yytext),at.push($t.yylloc),Lt.push(Be[1]),De=null,de=$t.yyleng,dt=$t.yytext,ee=$t.yylineno,Qt=$t.yylloc;break;case 2:if(Ie=this.productions_[Be[1]][1],Fe.$=Ut[Ut.length-Ie],Fe._$={first_line:at[at.length-(Ie||1)].first_line,last_line:at[at.length-1].last_line,first_column:at[at.length-(Ie||1)].first_column,last_column:at[at.length-1].last_column},ii&&(Fe._$.range=[at[at.length-(Ie||1)].range[0],at[at.length-1].range[1]]),Oe=this.performAction.apply(Fe,[dt,de,ee,ne.yy,Be[1],Ut,at].concat(ke)),typeof Oe<"u")return Oe;Ie&&(Lt=Lt.slice(0,-1*Ie*2),Ut=Ut.slice(0,-1*Ie),at=at.slice(0,-1*Ie)),Lt.push(this.productions_[Be[1]][0]),Ut.push(Fe.$),at.push(Fe._$),Ge=ie[Lt[Lt.length-2]][Lt[Lt.length-1]],Lt.push(Ge);break;case 3:return!0}}return!0}},Ht=function(){var Ft={EOF:1,parseError:function(ft,Lt){if(this.yy.parser)this.yy.parser.parseError(ft,Lt);else throw new Error(ft)},setInput:function(xt,ft){return this.yy=ft||this.yy||{},this._input=xt,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 xt=this._input[0];this.yytext+=xt,this.yyleng++,this.offset++,this.match+=xt,this.matched+=xt;var ft=xt.match(/(?:\r\n?|\n).*/g);return ft?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),xt},unput:function(xt){var ft=xt.length,Lt=xt.split(/(?:\r\n?|\n)/g);this._input=xt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-ft),this.offset-=ft;var _t=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),Lt.length-1&&(this.yylineno-=Lt.length-1);var Ut=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:Lt?(Lt.length===_t.length?this.yylloc.first_column:0)+_t[_t.length-Lt.length].length-Lt[0].length:this.yylloc.first_column-ft},this.options.ranges&&(this.yylloc.range=[Ut[0],Ut[0]+this.yyleng-ft]),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).
|
|
1205
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(xt){this.unput(this.match.slice(xt))},pastInput:function(){var xt=this.matched.substr(0,this.matched.length-this.match.length);return(xt.length>20?"...":"")+xt.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var xt=this.match;return xt.length<20&&(xt+=this._input.substr(0,20-xt.length)),(xt.substr(0,20)+(xt.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var xt=this.pastInput(),ft=new Array(xt.length+1).join("-");return xt+this.upcomingInput()+`
|
|
1206
|
-
`+ft+"^"},test_match:function(xt,ft){var Lt,_t,Ut;if(this.options.backtrack_lexer&&(Ut={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&&(Ut.yylloc.range=this.yylloc.range.slice(0))),_t=xt[0].match(/(?:\r\n?|\n).*/g),_t&&(this.yylineno+=_t.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:_t?_t[_t.length-1].length-_t[_t.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+xt[0].length},this.yytext+=xt[0],this.match+=xt[0],this.matches=xt,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(xt[0].length),this.matched+=xt[0],Lt=this.performAction.call(this,this.yy,this,ft,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Lt)return Lt;if(this._backtrack){for(var at in Ut)this[at]=Ut[at];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var xt,ft,Lt,_t;this._more||(this.yytext="",this.match="");for(var Ut=this._currentRules(),at=0;at<Ut.length;at++)if(Lt=this._input.match(this.rules[Ut[at]]),Lt&&(!ft||Lt[0].length>ft[0].length)){if(ft=Lt,_t=at,this.options.backtrack_lexer){if(xt=this.test_match(Lt,Ut[at]),xt!==!1)return xt;if(this._backtrack){ft=!1;continue}else return!1}else if(!this.options.flex)break}return ft?(xt=this.test_match(ft,Ut[_t]),xt!==!1?xt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1207
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var ft=this.next();return ft||this.lex()},begin:function(ft){this.conditionStack.push(ft)},popState:function(){var ft=this.conditionStack.length-1;return ft>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(ft){return ft=this.conditionStack.length-1-Math.abs(ft||0),ft>=0?this.conditionStack[ft]:"INITIAL"},pushState:function(ft){this.begin(ft)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(ft,Lt,_t,Ut){switch(_t){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 Ft}();Ee.lexer=Ht;function Vt(){this.yy={}}return Vt.prototype=Ee,Ee.Parser=Vt,new Vt}();Dc.parser=Dc;const QN=Dc,JN=t=>t.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/)!==null;let vi=[],zn=[""],Mr="global",yi="",zi=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Do=[],I0="",O0=!1,Mc=4,Nc=2;var km;const tB=function(){return km},eB=function(t){km=xi(t,$())},rB=function(t,e,r){ze.parseDirective(this,t,e,r)},iB=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 u={};const d=Do.find(f=>f.from===e&&f.to===r);if(d?u=d:Do.push(u),u.type=t,u.from=e,u.to=r,u.label={text:i},n==null)u.techn={text:""};else if(typeof n=="object"){let[f,p]=Object.entries(n)[0];u[f]={text:p}}else u.techn={text:n};if(s==null)u.descr={text:""};else if(typeof s=="object"){let[f,p]=Object.entries(s)[0];u[f]={text:p}}else u.descr={text:s};if(typeof a=="object"){let[f,p]=Object.entries(a)[0];u[f]=p}else u.sprite=a;if(typeof o=="object"){let[f,p]=Object.entries(o)[0];u[f]=p}else u.tags=o;if(typeof l=="object"){let[f,p]=Object.entries(l)[0];u[f]=p}else u.link=l;u.wrap=$n()},nB=function(t,e,r,i,n,s,a){if(e===null||r===null)return;let o={};const l=vi.find(u=>u.alias===e);if(l&&e===l.alias?o=l:(o.alias=e,vi.push(o)),r==null?o.label={text:""}:o.label={text:r},i==null)o.descr={text:""};else if(typeof i=="object"){let[u,d]=Object.entries(i)[0];o[u]={text:d}}else o.descr={text:i};if(typeof n=="object"){let[u,d]=Object.entries(n)[0];o[u]=d}else o.sprite=n;if(typeof s=="object"){let[u,d]=Object.entries(s)[0];o[u]=d}else o.tags=s;if(typeof a=="object"){let[u,d]=Object.entries(a)[0];o[u]=d}else o.link=a;o.typeC4Shape={text:t},o.parentBoundary=Mr,o.wrap=$n()},sB=function(t,e,r,i,n,s,a,o){if(e===null||r===null)return;let l={};const u=vi.find(d=>d.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,vi.push(l)),r==null?l.label={text:""}:l.label={text:r},i==null)l.techn={text:""};else if(typeof i=="object"){let[d,f]=Object.entries(i)[0];l[d]={text:f}}else l.techn={text:i};if(n==null)l.descr={text:""};else if(typeof n=="object"){let[d,f]=Object.entries(n)[0];l[d]={text:f}}else l.descr={text:n};if(typeof s=="object"){let[d,f]=Object.entries(s)[0];l[d]=f}else l.sprite=s;if(typeof a=="object"){let[d,f]=Object.entries(a)[0];l[d]=f}else l.tags=a;if(typeof o=="object"){let[d,f]=Object.entries(o)[0];l[d]=f}else l.link=o;l.wrap=$n(),l.typeC4Shape={text:t},l.parentBoundary=Mr},aB=function(t,e,r,i,n,s,a,o){if(e===null||r===null)return;let l={};const u=vi.find(d=>d.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,vi.push(l)),r==null?l.label={text:""}:l.label={text:r},i==null)l.techn={text:""};else if(typeof i=="object"){let[d,f]=Object.entries(i)[0];l[d]={text:f}}else l.techn={text:i};if(n==null)l.descr={text:""};else if(typeof n=="object"){let[d,f]=Object.entries(n)[0];l[d]={text:f}}else l.descr={text:n};if(typeof s=="object"){let[d,f]=Object.entries(s)[0];l[d]=f}else l.sprite=s;if(typeof a=="object"){let[d,f]=Object.entries(a)[0];l[d]=f}else l.tags=a;if(typeof o=="object"){let[d,f]=Object.entries(o)[0];l[d]=f}else l.link=o;l.wrap=$n(),l.typeC4Shape={text:t},l.parentBoundary=Mr},oB=function(t,e,r,i,n){if(t===null||e===null)return;let s={};const a=zi.find(o=>o.alias===t);if(a&&t===a.alias?s=a:(s.alias=t,zi.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=Mr,s.wrap=$n(),yi=Mr,Mr=t,zn.push(yi)},lB=function(t,e,r,i,n){if(t===null||e===null)return;let s={};const a=zi.find(o=>o.alias===t);if(a&&t===a.alias?s=a:(s.alias=t,zi.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=Mr,s.wrap=$n(),yi=Mr,Mr=t,zn.push(yi)},cB=function(t,e,r,i,n,s,a,o){if(e===null||r===null)return;let l={};const u=zi.find(d=>d.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,zi.push(l)),r==null?l.label={text:""}:l.label={text:r},i==null)l.type={text:"node"};else if(typeof i=="object"){let[d,f]=Object.entries(i)[0];l[d]={text:f}}else l.type={text:i};if(n==null)l.descr={text:""};else if(typeof n=="object"){let[d,f]=Object.entries(n)[0];l[d]={text:f}}else l.descr={text:n};if(typeof a=="object"){let[d,f]=Object.entries(a)[0];l[d]=f}else l.tags=a;if(typeof o=="object"){let[d,f]=Object.entries(o)[0];l[d]=f}else l.link=o;l.nodeType=t,l.parentBoundary=Mr,l.wrap=$n(),yi=Mr,Mr=e,zn.push(yi)},uB=function(){Mr=yi,zn.pop(),yi=zn.pop(),zn.push(yi)},hB=function(t,e,r,i,n,s,a,o,l,u,d){let f=vi.find(p=>p.alias===e);if(!(f===void 0&&(f=zi.find(p=>p.alias===e),f===void 0))){if(r!=null)if(typeof r=="object"){let[p,g]=Object.entries(r)[0];f[p]=g}else f.bgColor=r;if(i!=null)if(typeof i=="object"){let[p,g]=Object.entries(i)[0];f[p]=g}else f.fontColor=i;if(n!=null)if(typeof n=="object"){let[p,g]=Object.entries(n)[0];f[p]=g}else f.borderColor=n;if(s!=null)if(typeof s=="object"){let[p,g]=Object.entries(s)[0];f[p]=g}else f.shadowing=s;if(a!=null)if(typeof a=="object"){let[p,g]=Object.entries(a)[0];f[p]=g}else f.shape=a;if(o!=null)if(typeof o=="object"){let[p,g]=Object.entries(o)[0];f[p]=g}else f.sprite=o;if(l!=null)if(typeof l=="object"){let[p,g]=Object.entries(l)[0];f[p]=g}else f.techn=l;if(u!=null)if(typeof u=="object"){let[p,g]=Object.entries(u)[0];f[p]=g}else f.legendText=u;if(d!=null)if(typeof d=="object"){let[p,g]=Object.entries(d)[0];f[p]=g}else f.legendSprite=d}},dB=function(t,e,r,i,n,s,a){const o=Do.find(l=>l.from===e&&l.to===r);if(o!==void 0){if(i!=null)if(typeof i=="object"){let[l,u]=Object.entries(i)[0];o[l]=u}else o.textColor=i;if(n!=null)if(typeof n=="object"){let[l,u]=Object.entries(n)[0];o[l]=u}else o.lineColor=n;if(s!=null)if(typeof s=="object"){let[l,u]=Object.entries(s)[0];o[l]=parseInt(u)}else o.offsetX=parseInt(s);if(a!=null)if(typeof a=="object"){let[l,u]=Object.entries(a)[0];o[l]=parseInt(u)}else o.offsetY=parseInt(a)}},fB=function(t,e,r){let i=Mc,n=Nc;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&&(Mc=i),n>=1&&(Nc=n)},pB=function(){return Mc},gB=function(){return Nc},yB=function(){return Mr},mB=function(){return yi},wm=function(t){return t==null?vi:vi.filter(e=>e.parentBoundary===t)},bB=function(t){return vi.find(e=>e.alias===t)},_B=function(t){return Object.keys(wm(t))},xB=function(t){return t==null?zi:zi.filter(e=>e.parentBoundary===t)},vB=function(){return Do},kB=function(){return I0},wB=function(t){O0=t},$n=function(){return O0},TB=function(){vi=[],zi=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],yi="",Mr="global",zn=[""],Do=[],zn=[""],I0="",O0=!1,Mc=4,Nc=2},EB={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},CB={FILLED:0,OPEN:1},SB={LEFTOF:0,RIGHTOF:1,OVER:2},AB=function(t){I0=xi(t,$())},Tm={addPersonOrSystem:nB,addPersonOrSystemBoundary:oB,addContainer:sB,addContainerBoundary:lB,addComponent:aB,addDeploymentNode:cB,popBoundaryParseStack:uB,addRel:iB,updateElStyle:hB,updateRelStyle:dB,updateLayoutConfig:fB,autoWrap:$n,setWrap:wB,getC4ShapeArray:wm,getC4Shape:bB,getC4ShapeKeys:_B,getBoundarys:xB,getCurrentBoundaryParse:yB,getParentBoundaryParse:mB,getRels:vB,getTitle:kB,getC4Type:tB,getC4ShapeInRow:pB,getC4BoundaryInRow:gB,setAccTitle:ri,getAccTitle:Ci,getAccDescription:Ai,setAccDescription:Si,parseDirective:rB,getConfig:()=>$().c4,clear:TB,LINETYPE:EB,ARROWTYPE:CB,PLACEMENT:SB,setTitle:AB,setC4Type:eB},R0=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},Em=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:kn(s);a.attr("xlink:href",o)},LB=(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,u=s.offsetY?parseInt(s.offsetY):0,d="";if(n===0){let p=i.append("line");p.attr("x1",s.startPoint.x),p.attr("y1",s.startPoint.y),p.attr("x2",s.endPoint.x),p.attr("y2",s.endPoint.y),p.attr("stroke-width","1"),p.attr("stroke",o),p.style("fill","none"),s.type!=="rel_b"&&p.attr("marker-end","url("+d+"#arrowhead)"),(s.type==="birel"||s.type==="rel_b")&&p.attr("marker-start","url("+d+"#arrowend)"),n=-1}else{let p=i.append("path");p.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"&&p.attr("marker-end","url("+d+"#arrowhead)"),(s.type==="birel"||s.type==="rel_b")&&p.attr("marker-start","url("+d+"#arrowend)")}let f=r.messageFont();fn(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+u,s.label.width,s.label.height,{fill:a},f),s.techn&&s.techn.text!==""&&(f=r.messageFont(),fn(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+u,Math.max(s.label.width,s.techn.width),s.techn.height,{fill:a,"font-style":"italic"},f))}},DB=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};R0(i,l);let u=r.boundaryFont();u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=a,fn(r)(e.label.text,i,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},u),e.type&&e.type.text!==""&&(u=r.boundaryFont(),u.fontColor=a,fn(r)(e.type.text,i,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},u)),e.descr&&e.descr.text!==""&&(u=r.boundaryFont(),u.fontSize=u.fontSize-2,u.fontColor=a,fn(r)(e.descr.text,i,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},u))},MB=function(t,e,r){let i=e.bgColor?e.bgColor:r[e.typeC4Shape.text+"_bg_color"],n=e.borderColor?e.borderColor:r[e.typeC4Shape.text+"_border_color"],s=e.fontColor?e.fontColor:"#FFFFFF",a="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":a="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":a="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 o=t.append("g");o.attr("class","person-man");const l=Cm();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":l.x=e.x,l.y=e.y,l.fill=i,l.width=e.width,l.height=e.height,l.style="stroke:"+n+";stroke-width:0.5;",l.rx=2.5,l.ry=2.5,R0(o,l);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":o.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",n).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)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",n).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":o.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",n).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)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",n).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=VB(r,e.typeC4Shape.text);switch(o.append("text").attr("fill",s).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":Em(o,48,48,e.x+e.width/2-24,e.y+e.image.Y,a);break}let d=r[e.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=s,fn(r)(e.label.text,o,e.x,e.y+e.label.Y,e.width,e.height,{fill:s},d),d=r[e.typeC4Shape.text+"Font"](),d.fontColor=s,e.thchn&&e.thchn.text!==""?fn(r)(e.thchn.text,o,e.x,e.y+e.thchn.Y,e.width,e.height,{fill:s,"font-style":"italic"},d):e.type&&e.type.text!==""&&fn(r)(e.type.text,o,e.x,e.y+e.type.Y,e.width,e.height,{fill:s,"font-style":"italic"},d),e.descr&&e.descr.text!==""&&(d=r.personFont(),d.fontColor=s,fn(r)(e.descr.text,o,e.x,e.y+e.descr.Y,e.width,e.height,{fill:s},d)),e.height},NB=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")},BB=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")},IB=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")},OB=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")},RB=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")},FB=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")},PB=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)},YB=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")},Cm=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},VB=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),fn=function(){function t(n,s,a,o,l,u,d){const f=s.append("text").attr("x",a+l/2).attr("y",o+u/2+5).style("text-anchor","middle").text(n);i(f,d)}function e(n,s,a,o,l,u,d,f){const{fontSize:p,fontFamily:g,fontWeight:_}=f,k=n.split(he.lineBreakRegex);for(let w=0;w<k.length;w++){const S=w*p-p*(k.length-1)/2,A=s.append("text").attr("x",a+l/2).attr("y",o).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",p).style("font-weight",_).style("font-family",g);A.append("tspan").attr("dy",S).text(k[w]).attr("alignment-baseline","mathematical"),i(A,d)}}function r(n,s,a,o,l,u,d,f){const p=s.append("switch"),_=p.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",u).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");_.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,p,a,o,l,u,d,f),i(_,d)}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}}(),Ii={drawRect:R0,drawBoundary:DB,drawC4Shape:MB,drawRels:LB,drawImage:Em,insertArrowHead:OB,insertArrowEnd:RB,insertArrowFilledHead:FB,insertDynamicNumber:PB,insertArrowCrossHead:YB,insertDatabaseIcon:NB,insertComputerIcon:BB,insertClockIcon:IB,getNoteRect:Cm,sanitizeUrl:kn};let Bc=0,Ic=0,Sm=4,g1=2;Dc.yy=Tm;let Zt={};class Am{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,y1(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>Sm)&&(r=this.nextData.startx+e.margin+Zt.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},y1(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}}const y1=function(t){pr(Zt,t),t.fontFamily&&(Zt.personFontFamily=Zt.systemFontFamily=Zt.messageFontFamily=t.fontFamily),t.fontSize&&(Zt.personFontSize=Zt.systemFontSize=Zt.messageFontSize=t.fontSize),t.fontWeight&&(Zt.personFontWeight=Zt.systemFontWeight=Zt.messageFontWeight=t.fontWeight)},Ua=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),Ul=t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),UB=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight});function di(t,e,r,i,n){if(!e[t].width)if(r)e[t].text=Jy(e[t].text,n,i),e[t].textLines=e[t].text.split(he.lineBreakRegex).length,e[t].width=n,e[t].height=d1(e[t].text,i);else{let s=e[t].text.split(he.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(Vi(o,i),e[t].width),a=d1(o,i),e[t].height=e[t].height+a}}const Lm=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=Zt.c4ShapeMargin-35;let i=e.wrap&&Zt.wrap,n=Ul(Zt);n.fontSize=n.fontSize+2,n.fontWeight="bold";let s=Vi(e.label.text,n);di("label",e,i,n,s),Ii.drawBoundary(t,e,Zt)},Dm=function(t,e,r,i){let n=0;for(const s of i){n=0;const a=r[s];let o=Ua(Zt,a.typeC4Shape.text);switch(o.fontSize=o.fontSize-2,a.typeC4Shape.width=Vi("<<"+a.typeC4Shape.text+">>",o),a.typeC4Shape.height=o.fontSize+2,a.typeC4Shape.Y=Zt.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&&Zt.wrap,u=Zt.width-Zt.c4ShapePadding*2,d=Ua(Zt,a.typeC4Shape.text);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",di("label",a,l,d,u),a.label.Y=n+8,n=a.label.Y+a.label.height,a.type&&a.type.text!==""){a.type.text="["+a.type.text+"]";let g=Ua(Zt,a.typeC4Shape.text);di("type",a,l,g,u),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 g=Ua(Zt,a.techn.text);di("techn",a,l,g,u),a.techn.Y=n+5,n=a.techn.Y+a.techn.height}let f=n,p=a.label.width;if(a.descr&&a.descr.text!==""){let g=Ua(Zt,a.typeC4Shape.text);di("descr",a,l,g,u),a.descr.Y=n+20,n=a.descr.Y+a.descr.height,p=Math.max(a.label.width,a.descr.width),f=n-a.descr.textLines*5}p=p+Zt.c4ShapePadding,a.width=Math.max(a.width||Zt.width,p,Zt.width),a.height=Math.max(a.height||Zt.height,f,Zt.height),a.margin=a.margin||Zt.c4ShapeMargin,t.insert(a),Ii.drawC4Shape(e,a,Zt)}t.bumpLastMargin(Zt.c4ShapeMargin)};class Zr{constructor(e,r){this.x=e,this.y=r}}let D2=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),u=Math.abs(i-s),d=u/l,f=t.height/t.width,p=null;return i==s&&r<n?p=new Zr(r+t.width,o):i==s&&r>n?p=new Zr(r,o):r==n&&i<s?p=new Zr(a,i+t.height):r==n&&i>s&&(p=new Zr(a,i)),r>n&&i<s?f>=d?p=new Zr(r,o+d*t.width/2):p=new Zr(a-l/u*t.height/2,i+t.height):r<n&&i<s?f>=d?p=new Zr(r+t.width,o+d*t.width/2):p=new Zr(a+l/u*t.height/2,i+t.height):r<n&&i>s?f>=d?p=new Zr(r+t.width,o-d*t.width/2):p=new Zr(a+t.height/2*l/u,i):r>n&&i>s&&(f>=d?p=new Zr(r,o-t.width/2*d):p=new Zr(a-t.height/2*l/u,i)),p},zB=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=D2(t,r);r.x=t.x+t.width/2,r.y=t.y+t.height/2;let n=D2(e,r);return{startPoint:i,endPoint:n}};const WB=function(t,e,r,i){let n=0;for(let s of e){n=n+1;let a=s.wrap&&Zt.wrap,o=UB(Zt);i.db.getC4Type()==="C4Dynamic"&&(s.label.text=n+": "+s.label.text);let u=Vi(s.label.text,o);di("label",s,a,o,u),s.techn&&s.techn.text!==""&&(u=Vi(s.techn.text,o),di("techn",s,a,o,u)),s.descr&&s.descr.text!==""&&(u=Vi(s.descr.text,o),di("descr",s,a,o,u));let d=r(s.from),f=r(s.to),p=zB(d,f);s.startPoint=p.startPoint,s.endPoint=p.endPoint}Ii.drawRels(t,e,Zt)};function Mm(t,e,r,i,n){let s=new Am(n);s.data.widthLimit=r.data.widthLimit/Math.min(g1,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 u=o.wrap&&Zt.wrap,d=Ul(Zt);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",di("label",o,u,d,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 _=Ul(Zt);di("type",o,u,_,s.data.widthLimit),o.type.Y=l+5,l=o.type.Y+o.type.height}if(o.descr&&o.descr.text!==""){let _=Ul(Zt);_.fontSize=_.fontSize-2,di("descr",o,u,_,s.data.widthLimit),o.descr.Y=l+20,l=o.descr.Y+o.descr.height}if(a==0||a%g1===0){let _=r.data.startx+Zt.diagramMarginX,k=r.data.stopy+Zt.diagramMarginY+l;s.setData(_,_,k,k)}else{let _=s.data.stopx!==s.data.startx?s.data.stopx+Zt.diagramMarginX:s.data.startx,k=s.data.starty;s.setData(_,_,k,k)}s.name=o.alias;let f=n.db.getC4ShapeArray(o.alias),p=n.db.getC4ShapeKeys(o.alias);p.length>0&&Dm(s,t,f,p),e=o.alias;let g=n.db.getBoundarys(e);g.length>0&&Mm(t,e,s,g,n),o.alias!=="global"&&Lm(t,o,s),r.data.stopy=Math.max(s.data.stopy+Zt.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(s.data.stopx+Zt.c4ShapeMargin,r.data.stopx),Bc=Math.max(Bc,r.data.stopx),Ic=Math.max(Ic,r.data.stopy)}}const HB=function(t,e,r,i){Zt=$().c4;const n=$().securityLevel;let s;n==="sandbox"&&(s=At("#i"+e));const a=At(n==="sandbox"?s.nodes()[0].contentDocument.body:"body");let o=i.db;i.db.setWrap(Zt.wrap),Sm=o.getC4ShapeInRow(),g1=o.getC4BoundaryInRow(),B.debug(`C:${JSON.stringify(Zt,null,2)}`);const l=n==="sandbox"?a.select(`[id="${e}"]`):At(`[id="${e}"]`);Ii.insertComputerIcon(l),Ii.insertDatabaseIcon(l),Ii.insertClockIcon(l);let u=new Am(i);u.setData(Zt.diagramMarginX,Zt.diagramMarginX,Zt.diagramMarginY,Zt.diagramMarginY),u.data.widthLimit=screen.availWidth,Bc=Zt.diagramMarginX,Ic=Zt.diagramMarginY;const d=i.db.getTitle();let f=i.db.getBoundarys("");Mm(l,"",u,f,i),Ii.insertArrowHead(l),Ii.insertArrowEnd(l),Ii.insertArrowCrossHead(l),Ii.insertArrowFilledHead(l),WB(l,i.db.getRels(),i.db.getC4Shape,i),u.data.stopx=Bc,u.data.stopy=Ic;const p=u.data;let _=p.stopy-p.starty+2*Zt.diagramMarginY;const w=p.stopx-p.startx+2*Zt.diagramMarginX;d&&l.append("text").text(d).attr("x",(p.stopx-p.startx)/2-4*Zt.diagramMarginX).attr("y",p.starty+Zt.diagramMarginY),Ti(l,_,w,Zt.useMaxWidth);const S=d?60:0;l.attr("viewBox",p.startx-Zt.diagramMarginX+" -"+(Zt.diagramMarginY+S)+" "+w+" "+(_+S)),B.debug("models:",p)},M2={drawPersonOrSystemArray:Dm,drawBoundary:Lm,setConf:y1,draw:HB};var m1=function(){var t=function(F,I,L,J){for(L=L||{},J=F.length;J--;L[F[J]]=I);return L},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],u=[1,20],d=[1,32],f=[1,33],p=[1,34],g=[1,36],_=[1,39],k=[1,37],w=[1,38],S=[1,44],A=[1,45],O=[1,40],P=[1,41],W=[1,42],q=[1,43],z=[1,48],H=[1,49],N=[1,50],M=[1,51],C=[16,25],v=[1,65],D=[1,66],m=[1,67],Q=[1,68],b=[1,69],ct=[1,70],Dt=[1,71],vt=[1,80],j=[16,25,32,45,46,54,60,61,62,63,64,65,66,71,73],ot=[16,25,30,32,45,46,50,54,60,61,62,63,64,65,66,71,73,88,89,90,91],rt=[5,8,9,10,11,16,19,23,25],it=[54,88,89,90,91],ut=[54,65,66,88,89,90,91],bt=[54,60,61,62,63,64,88,89,90,91],K=[16,25,32],Ot=[1,107],Y={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(I,L,J,T,ht,V,Yt){var et=V.length-1;switch(ht){case 5:T.setDirection("TB");break;case 6:T.setDirection("BT");break;case 7:T.setDirection("RL");break;case 8:T.setDirection("LR");break;case 12:T.parseDirective("%%{","open_directive");break;case 13:T.parseDirective(V[et],"type_directive");break;case 14:V[et]=V[et].trim().replace(/'/g,'"'),T.parseDirective(V[et],"arg_directive");break;case 15:T.parseDirective("}%%","close_directive","class");break;case 20:case 21:this.$=V[et];break;case 22:this.$=V[et-1]+V[et];break;case 23:case 24:this.$=V[et-1]+"~"+V[et];break;case 25:T.addRelation(V[et]);break;case 26:V[et-1].title=T.cleanupLabel(V[et]),T.addRelation(V[et-1]);break;case 35:this.$=V[et].trim(),T.setAccTitle(this.$);break;case 36:case 37:this.$=V[et].trim(),T.setAccDescription(this.$);break;case 38:T.addClass(V[et]);break;case 39:T.addClass(V[et-2]),T.setCssClass(V[et-2],V[et]);break;case 40:T.addClass(V[et-3]),T.addMembers(V[et-3],V[et-1]);break;case 41:T.addClass(V[et-5]),T.setCssClass(V[et-5],V[et-3]),T.addMembers(V[et-5],V[et-1]);break;case 42:T.addAnnotation(V[et],V[et-2]);break;case 43:this.$=[V[et]];break;case 44:V[et].push(V[et-1]),this.$=V[et];break;case 45:break;case 46:T.addMember(V[et-1],T.cleanupLabel(V[et]));break;case 47:break;case 48:break;case 49:this.$={id1:V[et-2],id2:V[et],relation:V[et-1],relationTitle1:"none",relationTitle2:"none"};break;case 50:this.$={id1:V[et-3],id2:V[et],relation:V[et-1],relationTitle1:V[et-2],relationTitle2:"none"};break;case 51:this.$={id1:V[et-3],id2:V[et],relation:V[et-2],relationTitle1:"none",relationTitle2:V[et-1]};break;case 52:this.$={id1:V[et-4],id2:V[et],relation:V[et-2],relationTitle1:V[et-3],relationTitle2:V[et-1]};break;case 53:T.addNote(V[et],V[et-1]);break;case 54:T.addNote(V[et]);break;case 55:this.$={type1:V[et-2],type2:V[et],lineType:V[et-1]};break;case 56:this.$={type1:"none",type2:V[et],lineType:V[et-1]};break;case 57:this.$={type1:V[et-1],type2:"none",lineType:V[et]};break;case 58:this.$={type1:"none",type2:"none",lineType:V[et]};break;case 59:this.$=T.relationType.AGGREGATION;break;case 60:this.$=T.relationType.EXTENSION;break;case 61:this.$=T.relationType.COMPOSITION;break;case 62:this.$=T.relationType.DEPENDENCY;break;case 63:this.$=T.relationType.LOLLIPOP;break;case 64:this.$=T.lineType.LINE;break;case 65:this.$=T.lineType.DOTTED_LINE;break;case 66:case 72:this.$=V[et-2],T.setClickEvent(V[et-1],V[et]);break;case 67:case 73:this.$=V[et-3],T.setClickEvent(V[et-2],V[et-1]),T.setTooltip(V[et-2],V[et]);break;case 68:case 76:this.$=V[et-2],T.setLink(V[et-1],V[et]);break;case 69:this.$=V[et-3],T.setLink(V[et-2],V[et-1],V[et]);break;case 70:case 78:this.$=V[et-3],T.setLink(V[et-2],V[et-1]),T.setTooltip(V[et-2],V[et]);break;case 71:case 79:this.$=V[et-4],T.setLink(V[et-3],V[et-2],V[et]),T.setTooltip(V[et-3],V[et-1]);break;case 74:this.$=V[et-3],T.setClickEvent(V[et-2],V[et-1],V[et]);break;case 75:this.$=V[et-4],T.setClickEvent(V[et-3],V[et-2],V[et-1]),T.setTooltip(V[et-3],V[et]);break;case 77:this.$=V[et-3],T.setLink(V[et-2],V[et-1],V[et]);break;case 80:T.setCssClass(V[et-1],V[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:u},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:d,41:f,43:p,44:g,49:_,51:k,52:w,55:S,57:A,67:O,68:P,70:W,74:q,88:z,89:H,90:N,91:M},{16:[1,52]},{18:53,21:[1,54]},{16:[2,15]},{25:[1,55]},{16:[1,56],25:[2,17]},t(C,[2,25],{32:[1,57]}),t(C,[2,27]),t(C,[2,28]),t(C,[2,29]),t(C,[2,30]),t(C,[2,31]),t(C,[2,32]),t(C,[2,33]),t(C,[2,34]),{40:[1,58]},{42:[1,59]},t(C,[2,37]),t(C,[2,45],{53:60,58:63,59:64,32:[1,62],54:[1,61],60:v,61:D,62:m,63:Q,64:b,65:ct,66:Dt}),{27:72,28:46,29:47,88:z,89:H,90:N,91:M},t(C,[2,47]),t(C,[2,48]),{28:73,88:z,89:H,90:N},{27:74,28:46,29:47,88:z,89:H,90:N,91:M},{27:75,28:46,29:47,88:z,89:H,90:N,91:M},{27:76,28:46,29:47,88:z,89:H,90:N,91:M},{54:[1,77]},{27:78,28:46,29:47,88:z,89:H,90:N,91:M},{54:vt,56:79},t(j,[2,20],{28:46,29:47,27:81,30:[1,82],88:z,89:H,90:N,91:M}),t(j,[2,21],{30:[1,83]}),t(ot,[2,94]),t(ot,[2,95]),t(ot,[2,96]),t([16,25,30,32,45,46,54,60,61,62,63,64,65,66,71,73],[2,97]),t(rt,[2,10]),{15:84,22:u},{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:d,41:f,43:p,44:g,49:_,51:k,52:w,55:S,57:A,67:O,68:P,70:W,74:q,88:z,89:H,90:N,91:M},t(C,[2,26]),t(C,[2,35]),t(C,[2,36]),{27:86,28:46,29:47,54:[1,87],88:z,89:H,90:N,91:M},{53:88,58:63,59:64,60:v,61:D,62:m,63:Q,64:b,65:ct,66:Dt},t(C,[2,46]),{59:89,65:ct,66:Dt},t(it,[2,58],{58:90,60:v,61:D,62:m,63:Q,64:b}),t(ut,[2,59]),t(ut,[2,60]),t(ut,[2,61]),t(ut,[2,62]),t(ut,[2,63]),t(bt,[2,64]),t(bt,[2,65]),t(C,[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:z,89:H,90:N},{54:vt,56:99},t(C,[2,54]),t(C,[2,98]),t(j,[2,22]),t(j,[2,23]),t(j,[2,24]),{16:[1,100]},{25:[2,19]},t(K,[2,49]),{27:101,28:46,29:47,88:z,89:H,90:N,91:M},{27:102,28:46,29:47,54:[1,103],88:z,89:H,90:N,91:M},t(it,[2,57],{58:104,60:v,61:D,62:m,63:Q,64:b}),t(it,[2,56]),{28:105,88:z,89:H,90:N},{47:106,51:Ot},{27:108,28:46,29:47,88:z,89:H,90:N,91:M},t(C,[2,66],{54:[1,109]}),t(C,[2,68],{54:[1,111],69:[1,110]}),t(C,[2,72],{54:[1,112],72:[1,113]}),t(C,[2,76],{54:[1,115],69:[1,114]}),t(C,[2,80]),t(C,[2,53]),t(rt,[2,11]),t(K,[2,51]),t(K,[2,50]),{27:116,28:46,29:47,88:z,89:H,90:N,91:M},t(it,[2,55]),t(C,[2,39],{46:[1,117]}),{48:[1,118]},{47:119,48:[2,43],51:Ot},t(C,[2,42]),t(C,[2,67]),t(C,[2,69]),t(C,[2,70],{69:[1,120]}),t(C,[2,73]),t(C,[2,74],{54:[1,121]}),t(C,[2,77]),t(C,[2,78],{69:[1,122]}),t(K,[2,52]),{47:123,51:Ot},t(C,[2,40]),{48:[2,44]},t(C,[2,71]),t(C,[2,75]),t(C,[2,79]),{48:[1,124]},t(C,[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(I,L){if(L.recoverable)this.trace(I);else{var J=new Error(I);throw J.hash=L,J}},parse:function(I){var L=this,J=[0],T=[],ht=[null],V=[],Yt=this.table,et="",Mt=0,Tt=0,gt=2,Et=1,wt=V.slice.call(arguments,1),pt=Object.create(this.lexer),st={yy:{}};for(var le in this.yy)Object.prototype.hasOwnProperty.call(this.yy,le)&&(st.yy[le]=this.yy[le]);pt.setInput(I,st.yy),st.yy.lexer=pt,st.yy.parser=this,typeof pt.yylloc>"u"&&(pt.yylloc={});var Xt=pt.yylloc;V.push(Xt);var jt=pt.options&&pt.options.ranges;typeof st.yy.parseError=="function"?this.parseError=st.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Kt(){var at;return at=T.pop()||pt.lex()||Et,typeof at!="number"&&(at instanceof Array&&(T=at,at=T.pop()),at=L.symbols_[at]||at),at}for(var Gt,Ee,Ht,Vt,Ft={},xt,ft,Lt,_t;;){if(Ee=J[J.length-1],this.defaultActions[Ee]?Ht=this.defaultActions[Ee]:((Gt===null||typeof Gt>"u")&&(Gt=Kt()),Ht=Yt[Ee]&&Yt[Ee][Gt]),typeof Ht>"u"||!Ht.length||!Ht[0]){var Ut="";_t=[];for(xt in Yt[Ee])this.terminals_[xt]&&xt>gt&&_t.push("'"+this.terminals_[xt]+"'");pt.showPosition?Ut="Parse error on line "+(Mt+1)+`:
|
|
1208
|
-
`+pt.showPosition()+`
|
|
1209
|
-
Expecting `+_t.join(", ")+", got '"+(this.terminals_[Gt]||Gt)+"'":Ut="Parse error on line "+(Mt+1)+": Unexpected "+(Gt==Et?"end of input":"'"+(this.terminals_[Gt]||Gt)+"'"),this.parseError(Ut,{text:pt.match,token:this.terminals_[Gt]||Gt,line:pt.yylineno,loc:Xt,expected:_t})}if(Ht[0]instanceof Array&&Ht.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ee+", token: "+Gt);switch(Ht[0]){case 1:J.push(Gt),ht.push(pt.yytext),V.push(pt.yylloc),J.push(Ht[1]),Gt=null,Tt=pt.yyleng,et=pt.yytext,Mt=pt.yylineno,Xt=pt.yylloc;break;case 2:if(ft=this.productions_[Ht[1]][1],Ft.$=ht[ht.length-ft],Ft._$={first_line:V[V.length-(ft||1)].first_line,last_line:V[V.length-1].last_line,first_column:V[V.length-(ft||1)].first_column,last_column:V[V.length-1].last_column},jt&&(Ft._$.range=[V[V.length-(ft||1)].range[0],V[V.length-1].range[1]]),Vt=this.performAction.apply(Ft,[et,Tt,Mt,st.yy,Ht[1],ht,V].concat(wt)),typeof Vt<"u")return Vt;ft&&(J=J.slice(0,-1*ft*2),ht=ht.slice(0,-1*ft),V=V.slice(0,-1*ft)),J.push(this.productions_[Ht[1]][0]),ht.push(Ft.$),V.push(Ft._$),Lt=Yt[J[J.length-2]][J[J.length-1]],J.push(Lt);break;case 3:return!0}}return!0}},U=function(){var F={EOF:1,parseError:function(L,J){if(this.yy.parser)this.yy.parser.parseError(L,J);else throw new Error(L)},setInput:function(I,L){return this.yy=L||this.yy||{},this._input=I,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 I=this._input[0];this.yytext+=I,this.yyleng++,this.offset++,this.match+=I,this.matched+=I;var L=I.match(/(?:\r\n?|\n).*/g);return L?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),I},unput:function(I){var L=I.length,J=I.split(/(?:\r\n?|\n)/g);this._input=I+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-L),this.offset-=L;var T=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),J.length-1&&(this.yylineno-=J.length-1);var ht=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:J?(J.length===T.length?this.yylloc.first_column:0)+T[T.length-J.length].length-J[0].length:this.yylloc.first_column-L},this.options.ranges&&(this.yylloc.range=[ht[0],ht[0]+this.yyleng-L]),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).
|
|
1210
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(I){this.unput(this.match.slice(I))},pastInput:function(){var I=this.matched.substr(0,this.matched.length-this.match.length);return(I.length>20?"...":"")+I.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var I=this.match;return I.length<20&&(I+=this._input.substr(0,20-I.length)),(I.substr(0,20)+(I.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var I=this.pastInput(),L=new Array(I.length+1).join("-");return I+this.upcomingInput()+`
|
|
1211
|
-
`+L+"^"},test_match:function(I,L){var J,T,ht;if(this.options.backtrack_lexer&&(ht={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&&(ht.yylloc.range=this.yylloc.range.slice(0))),T=I[0].match(/(?:\r\n?|\n).*/g),T&&(this.yylineno+=T.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:T?T[T.length-1].length-T[T.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+I[0].length},this.yytext+=I[0],this.match+=I[0],this.matches=I,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(I[0].length),this.matched+=I[0],J=this.performAction.call(this,this.yy,this,L,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),J)return J;if(this._backtrack){for(var V in ht)this[V]=ht[V];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var I,L,J,T;this._more||(this.yytext="",this.match="");for(var ht=this._currentRules(),V=0;V<ht.length;V++)if(J=this._input.match(this.rules[ht[V]]),J&&(!L||J[0].length>L[0].length)){if(L=J,T=V,this.options.backtrack_lexer){if(I=this.test_match(J,ht[V]),I!==!1)return I;if(this._backtrack){L=!1;continue}else return!1}else if(!this.options.flex)break}return L?(I=this.test_match(L,ht[T]),I!==!1?I:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1212
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var L=this.next();return L||this.lex()},begin:function(L){this.conditionStack.push(L)},popState:function(){var L=this.conditionStack.length-1;return L>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(L){return L=this.conditionStack.length-1-Math.abs(L||0),L>=0?this.conditionStack[L]:"INITIAL"},pushState:function(L){this.begin(L)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(L,J,T,ht){switch(T){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 F}();Y.lexer=U;function X(){this.yy={}}return X.prototype=Y,Y.Parser=X,new X}();m1.parser=m1;const N2=m1,GB=(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},qB=(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},F0="classid-";let P0=[],Qe={},Oc=[],B2=0,Mo=[];const so=t=>he.sanitizeText(t,$()),jB=function(t,e,r){ze.parseDirective(this,t,e,r)},No=function(t){let e="",r=t;if(t.indexOf("~")>0){let i=t.split("~");r=i[0],e=he.sanitizeText(i[1],$())}return{className:r,type:e}},b1=function(t){let e=No(t);Qe[e.className]===void 0&&(Qe[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:F0+e.className+"-"+B2},B2++)},Nm=function(t){const e=Object.keys(Qe);for(const r of e)if(Qe[r].id===t)return Qe[r].domId},$B=function(){P0=[],Qe={},Oc=[],Mo=[],Mo.push(Im),Ei()},XB=function(t){return Qe[t]},KB=function(){return Qe},ZB=function(){return P0},QB=function(){return Oc},JB=function(t){B.debug("Adding relation: "+JSON.stringify(t)),b1(t.id1),b1(t.id2),t.id1=No(t.id1).className,t.id2=No(t.id2).className,t.relationTitle1=he.sanitizeText(t.relationTitle1.trim(),$()),t.relationTitle2=he.sanitizeText(t.relationTitle2.trim(),$()),P0.push(t)},tI=function(t,e){const r=No(t).className;Qe[r].annotations.push(e)},Bm=function(t,e){const r=No(t).className,i=Qe[r];if(typeof e=="string"){const n=e.trim();n.startsWith("<<")&&n.endsWith(">>")?i.annotations.push(so(n.substring(2,n.length-2))):n.indexOf(")")>0?i.methods.push(so(n)):n&&i.members.push(so(n))}},eI=function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach(r=>Bm(t,r)))},rI=function(t,e){const r={id:`note${Oc.length}`,class:e,text:t};Oc.push(r)},iI=function(t){return t.substring(0,1)===":"?he.sanitizeText(t.substr(1).trim(),$()):so(t.trim())},Y0=function(t,e){t.split(",").forEach(function(r){let i=r;r[0].match(/\d/)&&(i=F0+i),Qe[i]!==void 0&&Qe[i].cssClasses.push(e)})},nI=function(t,e){const r=$();t.split(",").forEach(function(i){e!==void 0&&(Qe[i].tooltip=he.sanitizeText(e,r))})},sI=function(t){return Qe[t].tooltip},aI=function(t,e,r){const i=$();t.split(",").forEach(function(n){let s=n;n[0].match(/\d/)&&(s=F0+s),Qe[s]!==void 0&&(Qe[s].link=ye.formatUrl(e,i),i.securityLevel==="sandbox"?Qe[s].linkTarget="_top":typeof r=="string"?Qe[s].linkTarget=so(r):Qe[s].linkTarget="_blank")}),Y0(t,"clickable")},oI=function(t,e,r){t.split(",").forEach(function(i){lI(i,e,r),Qe[i].haveCallback=!0}),Y0(t,"clickable")},lI=function(t,e,r){const i=$();let n=t,s=Nm(n);if(i.securityLevel==="loose"&&e!==void 0&&Qe[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),Mo.push(function(){const o=document.querySelector(`[id="${s}"]`);o!==null&&o.addEventListener("click",function(){ye.runFunc(e,...a)},!1)})}},cI=function(t){Mo.forEach(function(e){e(t)})},uI={LINE:0,DOTTED_LINE:1},hI={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},Im=function(t){let e=At(".mermaidTooltip");(e._groups||e)[0][0]===null&&(e=At("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),At(t).select("svg").selectAll("g.node").on("mouseover",function(){const n=At(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(/<br\/>/g,"<br/>")),n.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),At(this).classed("hover",!1)})};Mo.push(Im);let Om="TB";const dI=()=>Om,fI=t=>{Om=t},js={parseDirective:jB,setAccTitle:ri,getAccTitle:Ci,getAccDescription:Ai,setAccDescription:Si,getConfig:()=>$().class,addClass:b1,bindFunctions:cI,clear:$B,getClass:XB,getClasses:KB,getNotes:QB,addAnnotation:tI,addNote:rI,getRelations:ZB,addRelation:JB,getDirection:dI,setDirection:fI,addMember:Bm,addMembers:eI,cleanupLabel:iI,lineType:uI,relationType:hI,setClickEvent:oI,setCssClass:Y0,setLink:aI,getTooltip:sI,setTooltip:nI,lookUpDomId:Nm,setDiagramTitle:En,getDiagramTitle:Cn};let I2=0;const pI=function(t,e,r,i,n){const s=function(A){switch(A){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(A=>!Number.isNaN(A.y));const a=e.points,o=Ta().x(function(A){return A.x}).y(function(A){return A.y}).curve(la),l=t.append("path").attr("d",o(a)).attr("id","edge"+I2).attr("class","relation");let u="";i.arrowMarkerAbsolute&&(u=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,u=u.replace(/\(/g,"\\("),u=u.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("+u+"#"+s(r.relation.type1)+"Start)"),r.relation.type2!=="none"&&l.attr("marker-end","url("+u+"#"+s(r.relation.type2)+"End)");let d,f;const p=e.points.length;let g=ye.calcLabelPosition(e.points);d=g.x,f=g.y;let _,k,w,S;if(p%2!==0&&p>1){let A=ye.calcCardinalityPosition(r.relation.type1!=="none",e.points,e.points[0]),O=ye.calcCardinalityPosition(r.relation.type2!=="none",e.points,e.points[p-1]);B.debug("cardinality_1_point "+JSON.stringify(A)),B.debug("cardinality_2_point "+JSON.stringify(O)),_=A.x,k=A.y,w=O.x,S=O.y}if(r.title!==void 0){const A=t.append("g").attr("class","classLabel"),O=A.append("text").attr("class","label").attr("x",d).attr("y",f).attr("fill","red").attr("text-anchor","middle").text(r.title);window.label=O;const P=O.node().getBBox();A.insert("rect",":first-child").attr("class","box").attr("x",P.x-i.padding/2).attr("y",P.y-i.padding/2).attr("width",P.width+i.padding).attr("height",P.height+i.padding)}B.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",_).attr("y",k).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",w).attr("y",S).attr("fill","black").attr("font-size","6").text(r.relationTitle2),I2++},gI=function(t,e,r,i){B.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(W){const q=o.append("tspan").text("«"+W+"»");l||q.attr("dy",r.textHeight),l=!1});let u=e.id;e.type!==void 0&&e.type!==""&&(u+="<"+e.type+">");const d=o.append("tspan").text(u).attr("class","title");l||d.attr("dy",r.textHeight);const f=o.node().getBBox().height,p=a.append("line").attr("x1",0).attr("y1",r.padding+f+r.dividerMargin/2).attr("y2",r.padding+f+r.dividerMargin/2),g=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(W){O2(g,W,l,r),l=!1});const _=g.node().getBBox(),k=a.append("line").attr("x1",0).attr("y1",r.padding+f+r.dividerMargin+_.height).attr("y2",r.padding+f+r.dividerMargin+_.height),w=a.append("text").attr("x",r.padding).attr("y",f+2*r.dividerMargin+_.height+r.textHeight).attr("fill","white").attr("class","classText");l=!0,e.methods.forEach(function(W){O2(w,W,l,r),l=!1});const S=a.node().getBBox();var A=" ";e.cssClasses.length>0&&(A=A+e.cssClasses.join(" "));const P=a.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",S.width+2*r.padding).attr("height",S.height+r.padding+.5*r.dividerMargin).attr("class",A).node().getBBox().width;return o.node().childNodes.forEach(function(W){W.setAttribute("x",(P-W.getBBox().width)/2)}),e.tooltip&&o.insert("title").text(e.tooltip),p.attr("x2",P),k.attr("x2",P),s.width=P,s.height=S.height+r.padding+.5*r.dividerMargin,s},yI=function(t,e,r,i){B.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(`
|
|
1213
|
-
`);l.forEach(function(p){B.debug(`Adding line: ${p}`),o.append("tspan").text(p).attr("class","title").attr("dy",r.textHeight)});const u=a.node().getBBox(),f=a.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",u.width+2*r.padding).attr("height",u.height+l.length*r.textHeight+r.padding+.5*r.dividerMargin).node().getBBox().width;return o.node().childNodes.forEach(function(p){p.setAttribute("x",(f-p.getBBox().width)/2)}),s.width=f,s.height=u.height+l.length*r.textHeight+r.padding+.5*r.dividerMargin,s},Rc=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?mI(i):n?bI(n):_I(t)},mI=function(t){let e="",r="";try{let i=t[1]?t[1].trim():"",n=t[2]?t[2].trim():"",s=t[3]?Yn(t[3].trim()):"",a=t[4]?t[4].trim():"",o=t[5]?t[5].trim():"";r=i+n+s+" "+a,e=V0(o)}catch{r=t}return{displayText:r,cssStyle:e}},bI=function(t){let e="",r="";try{let i=t[1]?t[1].trim():"",n=t[2]?t[2].trim():"",s=t[3]?Yn(t[3].trim()):"",a=t[4]?t[4].trim():"",o=t[5]?" : "+Yn(t[5]).trim():"";r=i+n+"("+s+")"+o,e=V0(a)}catch{r=t}return{displayText:r,cssStyle:e}},_I=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 u=t.substring(n+1,s);t.substring(s+1,1),r=V0(t.substring(s+1,s+2)),e=a+o+"("+Yn(u.trim())+")",s<t.length&&(i=t.substring(s+2).trim(),i!==""&&(i=" : "+Yn(i),e+=i))}else e=Yn(t);return{displayText:e,cssStyle:r}},O2=function(t,e,r,i){let n=Rc(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)},V0=function(t){switch(t){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}},kh={drawClass:gI,drawEdge:pI,drawNote:yI,parseMember:Rc};let zl={};const kl=20,za=function(t){const e=Object.entries(zl).find(r=>r[1].label===t);if(e)return e[0]},xI=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")},vI=function(t,e,r,i){const n=$().class;zl={},B.info("Rendering diagram "+t);const s=$().securityLevel;let a;s==="sandbox"&&(a=At("#i"+e));const o=At(s==="sandbox"?a.nodes()[0].contentDocument.body:"body"),l=o.select(`[id='${e}']`);xI(l);const u=new or({multigraph:!0});u.setGraph({isMultiGraph:!0}),u.setDefaultEdgeLabel(function(){return{}});const d=i.db.getClasses(),f=Object.keys(d);for(const A of f){const O=d[A],P=kh.drawClass(l,O,n,i);zl[P.id]=P,u.setNode(P.id,P),B.info("Org height: "+P.height)}i.db.getRelations().forEach(function(A){B.info("tjoho"+za(A.id1)+za(A.id2)+JSON.stringify(A)),u.setEdge(za(A.id1),za(A.id2),{relation:A},A.title||"DEFAULT")}),i.db.getNotes().forEach(function(A){B.debug(`Adding note: ${JSON.stringify(A)}`);const O=kh.drawNote(l,A,n,i);zl[O.id]=O,u.setNode(O.id,O),A.class&&A.class in d&&u.setEdge(A.id,za(A.class),{relation:{id1:A.id,id2:A.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),La(u),u.nodes().forEach(function(A){A!==void 0&&u.node(A)!==void 0&&(B.debug("Node "+A+": "+JSON.stringify(u.node(A))),o.select("#"+(i.db.lookUpDomId(A)||A)).attr("transform","translate("+(u.node(A).x-u.node(A).width/2)+","+(u.node(A).y-u.node(A).height/2)+" )"))}),u.edges().forEach(function(A){A!==void 0&&u.edge(A)!==void 0&&(B.debug("Edge "+A.v+" -> "+A.w+": "+JSON.stringify(u.edge(A))),kh.drawEdge(l,u.edge(A),u.edge(A).relation,n,i))});const _=l.node().getBBox(),k=_.width+kl*2,w=_.height+kl*2;Ti(l,w,k,n.useMaxWidth);const S=`${_.x-kl} ${_.y-kl} ${k} ${w}`;B.debug(`viewBox ${S}`),l.attr("viewBox",S)},kI={draw:vI},wI=(t,e,r,i)=>{e.forEach(n=>{BI[n](t,r,i)})},TI=(t,e,r)=>{B.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")},EI=(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")},CI=(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")},SI=(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")},AI=(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)},LI=(t,e)=>{t.append("marker").attr("id",e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").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")},DI=(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")},MI=(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")},NI=(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")},BI={extension:TI,composition:EI,aggregation:CI,dependency:SI,lollipop:AI,point:LI,circle:DI,cross:MI,barb:NI},II=wI;function OI(t,e){e&&t.attr("style",e)}function RI(t){const e=At(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>"),OI(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 FI=(t,e,r,i)=>{let n=t||"";if(typeof n=="object"&&(n=n[0]),gr($().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"<br />"),B.info("vertexText"+n);const s={isNode:i,label:fd(n).replace(/fa[blrs]?:fa-[\w-]+/g,o=>`<i class='${o.replace(":"," ")}'></i>`),labelStyle:e.replace("fill:","color:")};return RI(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}},Pr=FI,Er=(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(Pr(xi(fd(o),$()),e.labelStyle,!1,i));let u=l.getBBox();if(gr($().flowchart.htmlLabels)){const f=l.children[0],p=At(l);u=f.getBoundingClientRect(),p.attr("width",u.width),p.attr("height",u.height)}const d=e.padding/2;return a.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),{shapeSvg:s,bbox:u,halfPadding:d,label:a}},Je=(t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height};function Sn(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 Te={},fi={},Rm={};const PI=()=>{fi={},Rm={},Te={}},Fc=(t,e)=>(B.trace("In isDecendant",e," ",t," = ",fi[e].includes(t)),!!fi[e].includes(t)),YI=(t,e)=>(B.info("Decendants of ",e," is ",fi[e]),B.info("Edge is ",t),t.v===e||t.w===e?!1:fi[e]?fi[e].includes(t.v)||Fc(t.v,e)||Fc(t.w,e)||fi[e].includes(t.w):(B.debug("Tilt, ",e,",not in decendants"),!1)),Fm=(t,e,r,i)=>{B.warn("Copying children of ",t,"root",i,"data",e.node(t),i);const n=e.children(t)||[];t!==i&&n.push(t),B.warn("Copying (nodes) clusterId",t,"nodes",n),n.forEach(s=>{if(e.children(s).length>0)Fm(s,e,r,i);else{const a=e.node(s);B.info("cp ",s," to ",i," with parent ",t),r.setNode(s,a),i!==e.parent(s)&&(B.warn("Setting parent",s,e.parent(s)),r.setParent(s,e.parent(s))),t!==i&&s!==t?(B.debug("Setting parent",s,t),r.setParent(s,t)):(B.info("In copy ",t,"root",i,"data",e.node(t),i),B.debug("Not Setting parent for node=",s,"cluster!==rootId",t!==i,"node!==clusterId",s!==t));const o=e.edges(s);B.debug("Copying Edges",o),o.forEach(l=>{B.info("Edge",l);const u=e.edge(l.v,l.w,l.name);B.info("Edge data",u,i);try{YI(l,i)?(B.info("Copying as ",l.v,l.w,u,l.name),r.setEdge(l.v,l.w,u,l.name),B.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):B.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",i," clusterId:",t)}catch(d){B.error(d)}})}B.debug("Removing node",s),e.removeNode(s)})},Pm=(t,e)=>{const r=e.children(t);let i=[...r];for(const n of r)Rm[n]=t,i=[...i,...Pm(n,e)];return i},Bo=(t,e)=>{B.trace("Searching",t);const r=e.children(t);if(B.trace("Searching children of id ",t,r),r.length<1)return B.trace("This is a valid node",t),t;for(const i of r){const n=Bo(i,e);if(n)return B.trace("Found replacement for",t," => ",n),n}},wl=t=>!Te[t]||!Te[t].externalConnections?t:Te[t]?Te[t].id:t,VI=(t,e)=>{if(!t||e>10){B.debug("Opting out, no graph ");return}else B.debug("Opting in, graph ");t.nodes().forEach(function(r){t.children(r).length>0&&(B.warn("Cluster identified",r," Replacement id in edges: ",Bo(r,t)),fi[r]=Pm(r,t),Te[r]={id:Bo(r,t),clusterData:t.node(r)})}),t.nodes().forEach(function(r){const i=t.children(r),n=t.edges();i.length>0?(B.debug("Cluster identified",r,fi),n.forEach(s=>{if(s.v!==r&&s.w!==r){const a=Fc(s.v,r),o=Fc(s.w,r);a^o&&(B.warn("Edge: ",s," leaves cluster ",r),B.warn("Decendants of XXX ",r,": ",fi[r]),Te[r].externalConnections=!0)}})):B.debug("Not a cluster ",r,fi)}),t.edges().forEach(function(r){const i=t.edge(r);B.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),B.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(t.edge(r)));let n=r.v,s=r.w;if(B.warn("Fix XXX",Te,"ids:",r.v,r.w,"Translating: ",Te[r.v]," --- ",Te[r.w]),Te[r.v]&&Te[r.w]&&Te[r.v]===Te[r.w]){B.warn("Fixing and trixing link to self - removing XXX",r.v,r.w,r.name),B.warn("Fixing and trixing - removing XXX",r.v,r.w,r.name),n=wl(r.v),s=wl(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(Te[r.v]||Te[r.w])&&(B.warn("Fixing and trixing - removing XXX",r.v,r.w,r.name),n=wl(r.v),s=wl(r.w),t.removeEdge(r.v,r.w,r.name),n!==r.v&&(i.fromCluster=r.v),s!==r.w&&(i.toCluster=r.w),B.warn("Fix Replacing with XXX",n,s,r.name),t.setEdge(n,s,i,r.name))}),B.warn("Adjusted Graph",dn(t)),Ym(t,0),B.trace(Te)},Ym=(t,e)=>{if(B.warn("extractor - ",e,dn(t),t.children("D")),e>10){B.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){B.debug("Done, no node has children",t.nodes());return}B.debug("Nodes = ",r,e);for(const n of r)if(B.debug("Extracting node",n,Te,Te[n]&&!Te[n].externalConnections,!t.parent(n),t.node(n),t.children("D")," Depth ",e),!Te[n])B.debug("Not a cluster",n,e);else if(!Te[n].externalConnections&&t.children(n)&&t.children(n).length>0){B.warn("Cluster without external connections, without a parent and with children",n,e);let a=t.graph().rankdir==="TB"?"LR":"TB";Te[n]&&Te[n].clusterData&&Te[n].clusterData.dir&&(a=Te[n].clusterData.dir,B.warn("Fixing dir",Te[n].clusterData.dir,a));const o=new or({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});B.warn("Old graph before copy",dn(t)),Fm(n,t,o,n),t.setNode(n,{clusterNode:!0,id:n,clusterData:Te[n].clusterData,labelText:Te[n].labelText,graph:o}),B.warn("New graph after copy node: (",n,")",dn(o)),B.debug("Old graph after copy",dn(t))}else B.warn("Cluster ** ",n," **not meeting the criteria !externalConnections:",!Te[n].externalConnections," no parent: ",!t.parent(n)," children ",t.children(n)&&t.children(n).length>0,t.children("D"),e),B.debug(Te);r=t.nodes(),B.warn("New list of nodes",r);for(const n of r){const s=t.node(n);B.warn(" Now next level",n,s),s.clusterNode&&Ym(s.graph,e+1)}},Vm=(t,e)=>{if(e.length===0)return[];let r=Object.assign(e);return e.forEach(i=>{const n=t.children(i),s=Vm(t,n);r=[...r,...s]}),r},UI=t=>Vm(t,t.children());function zI(t,e){return t.intersect(e)}function Um(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),u=Math.abs(e*r*a/l);i.x<n&&(u=-u);var d=Math.abs(e*r*o/l);return i.y<s&&(d=-d),{x:n+u,y:s+d}}function WI(t,e,r){return Um(t,e,e,r)}function HI(t,e,r,i){var n,s,a,o,l,u,d,f,p,g,_,k,w,S,A;if(n=e.y-t.y,a=t.x-e.x,l=e.x*t.y-t.x*e.y,p=n*r.x+a*r.y+l,g=n*i.x+a*i.y+l,!(p!==0&&g!==0&&R2(p,g))&&(s=i.y-r.y,o=r.x-i.x,u=i.x*r.y-r.x*i.y,d=s*t.x+o*t.y+u,f=s*e.x+o*e.y+u,!(d!==0&&f!==0&&R2(d,f))&&(_=n*o-s*a,_!==0)))return k=Math.abs(_/2),w=a*u-o*l,S=w<0?(w-k)/_:(w+k)/_,w=s*l-n*u,A=w<0?(w-k)/_:(w+k)/_,{x:S,y:A}}function R2(t,e){return t*e>0}function GI(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(_){a=Math.min(a,_.x),o=Math.min(o,_.y)}):(a=Math.min(a,e.x),o=Math.min(o,e.y));for(var l=i-t.width/2-a,u=n-t.height/2-o,d=0;d<e.length;d++){var f=e[d],p=e[d<e.length-1?d+1:0],g=HI(t,r,{x:l+f.x,y:u+f.y},{x:l+p.x,y:u+p.y});g&&s.push(g)}return s.length?(s.length>1&&s.sort(function(_,k){var w=_.x-r.x,S=_.y-r.y,A=Math.sqrt(w*w+S*S),O=k.x-r.x,P=k.y-r.y,W=Math.sqrt(O*O+P*P);return A<W?-1:A===W?0:1}),s[0]):t}const qI=(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,u;return Math.abs(s)*a>Math.abs(n)*o?(s<0&&(o=-o),l=s===0?0:o*n/s,u=o):(n<0&&(a=-a),l=a,u=n===0?0:a*s/n),{x:r+l,y:i+u}},$o=qI,$e={node:zI,circle:WI,ellipse:Um,polygon:GI,rect:$o},jI=(t,e)=>{const{shapeSvg:r,bbox:i,halfPadding:n}=Er(t,e,"node "+e.classes,!0);B.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),Je(e,s),e.intersect=function(a){return $e.rect(e,a)},r},$I=jI,XI=(t,e)=>{const{shapeSvg:r,bbox:i}=Er(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}];B.info("Question main (Circle)");const l=Sn(r,a,a,o);return l.attr("style",e.style),Je(e,l),e.intersect=function(u){return B.warn("Intersect called"),$e.polygon(e,o,u)},r},KI=(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 $e.circle(e,14,a)},r},ZI=(t,e)=>{const{shapeSvg:r,bbox:i}=Er(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}],u=Sn(r,o,s,l);return u.attr("style",e.style),Je(e,u),e.intersect=function(d){return $e.polygon(e,l,d)},r},QI=(t,e)=>{const{shapeSvg:r,bbox:i}=Er(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 Sn(r,n,s,a).attr("style",e.style),e.width=n+s,e.height=s,e.intersect=function(l){return $e.polygon(e,a,l)},r},JI=(t,e)=>{const{shapeSvg:r,bbox:i}=Er(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=Sn(r,n,s,a);return o.attr("style",e.style),Je(e,o),e.intersect=function(l){return $e.polygon(e,a,l)},r},tO=(t,e)=>{const{shapeSvg:r,bbox:i}=Er(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=Sn(r,n,s,a);return o.attr("style",e.style),Je(e,o),e.intersect=function(l){return $e.polygon(e,a,l)},r},eO=(t,e)=>{const{shapeSvg:r,bbox:i}=Er(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=Sn(r,n,s,a);return o.attr("style",e.style),Je(e,o),e.intersect=function(l){return $e.polygon(e,a,l)},r},rO=(t,e)=>{const{shapeSvg:r,bbox:i}=Er(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=Sn(r,n,s,a);return o.attr("style",e.style),Je(e,o),e.intersect=function(l){return $e.polygon(e,a,l)},r},iO=(t,e)=>{const{shapeSvg:r,bbox:i}=Er(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=Sn(r,n,s,a);return o.attr("style",e.style),Je(e,o),e.intersect=function(l){return $e.polygon(e,a,l)},r},nO=(t,e)=>{const{shapeSvg:r,bbox:i}=Er(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,u=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 Je(e,u),e.intersect=function(d){const f=$e.rect(e,d),p=f.x-e.x;if(s!=0&&(Math.abs(p)<e.width/2||Math.abs(p)==e.width/2&&Math.abs(f.y-e.y)>e.height/2-a)){let g=a*a*(1-p*p/(s*s));g!=0&&(g=Math.sqrt(g)),g=a-g,d.y-e.y>0&&(g=-g),f.y+=g}return f},r},sO=(t,e)=>{const{shapeSvg:r,bbox:i,halfPadding:n}=Er(t,e,"node "+e.classes,!0);B.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&&(zm(s,e.props.borders,a,o),l.delete("borders")),l.forEach(u=>{B.warn(`Unknown node property ${u}`)})}return Je(e,s),e.intersect=function(l){return $e.rect(e,l)},r},aO=(t,e)=>{const{shapeSvg:r}=Er(t,e,"label",!0);B.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&&(zm(i,e.props.borders,n,s),a.delete("borders")),a.forEach(o=>{B.warn(`Unknown node property ${o}`)})}return Je(e,i),e.intersect=function(a){return $e.rect(e,a)},r};function zm(t,e,r,i){const n=[],s=o=>{n.push(o,0)},a=o=>{n.push(0,o)};e.includes("t")?(B.debug("add top border"),s(r)):a(r),e.includes("r")?(B.debug("add right border"),s(i)):a(i),e.includes("b")?(B.debug("add bottom border"),s(r)):a(r),e.includes("l")?(B.debug("add left border"),s(i)):a(i),t.attr("stroke-dasharray",n.join(" "))}const oO=(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,B.info("Label text abc79",l,o,typeof o=="object");const u=a.node().appendChild(Pr(l,e.labelStyle,!0,!0));let d={width:0,height:0};if(gr($().flowchart.htmlLabels)){const k=u.children[0],w=At(u);d=k.getBoundingClientRect(),w.attr("width",d.width),w.attr("height",d.height)}B.info("Text 2",o);const f=o.slice(1,o.length);let p=u.getBBox();const g=a.node().appendChild(Pr(f.join?f.join("<br/>"):f,e.labelStyle,!0,!0));if(gr($().flowchart.htmlLabels)){const k=g.children[0],w=At(g);d=k.getBoundingClientRect(),w.attr("width",d.width),w.attr("height",d.height)}const _=e.padding/2;return At(g).attr("transform","translate( "+(d.width>p.width?0:(p.width-d.width)/2)+", "+(p.height+_+5)+")"),At(u).attr("transform","translate( "+(d.width<p.width?0:-(p.width-d.width)/2)+", 0)"),d=a.node().getBBox(),a.attr("transform","translate("+-d.width/2+", "+(-d.height/2-_+3)+")"),n.attr("class","outer title-state").attr("x",-d.width/2-_).attr("y",-d.height/2-_).attr("width",d.width+e.padding).attr("height",d.height+e.padding),s.attr("class","divider").attr("x1",-d.width/2-_).attr("x2",d.width/2+_).attr("y1",-d.height/2-_+p.height+_).attr("y2",-d.height/2-_+p.height+_),Je(e,n),e.intersect=function(k){return $e.rect(e,k)},i},lO=(t,e)=>{const{shapeSvg:r,bbox:i}=Er(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 Je(e,a),e.intersect=function(o){return $e.rect(e,o)},r},cO=(t,e)=>{const{shapeSvg:r,bbox:i,halfPadding:n}=Er(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),B.info("Circle main"),Je(e,s),e.intersect=function(a){return B.info("Circle intersect",e,i.width/2+n,a),$e.circle(e,i.width/2+n,a)},r},uO=(t,e)=>{const{shapeSvg:r,bbox:i,halfPadding:n}=Er(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),B.info("DoubleCircle main"),Je(e,o),e.intersect=function(u){return B.info("DoubleCircle intersect",e,i.width/2+n+s,u),$e.circle(e,i.width/2+n+s,u)},r},hO=(t,e)=>{const{shapeSvg:r,bbox:i}=Er(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=Sn(r,n,s,a);return o.attr("style",e.style),Je(e,o),e.intersect=function(l){return $e.polygon(e,a,l)},r},dO=(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),Je(e,i),e.intersect=function(n){return $e.circle(e,7,n)},r},F2=(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 Je(e,a),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(o){return $e.rect(e,o)},i},fO=(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),Je(e,n),e.intersect=function(s){return $e.circle(e,7,s)},r},pO=(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"),u=a.insert("line");let d=0,f=i;const p=a.insert("g").attr("class","label");let g=0;const _=e.classData.annotations&&e.classData.annotations[0],k=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",w=p.node().appendChild(Pr(k,e.labelStyle,!0,!0));let S=w.getBBox();if(gr($().flowchart.htmlLabels)){const H=w.children[0],N=At(w);S=H.getBoundingClientRect(),N.attr("width",S.width),N.attr("height",S.height)}e.classData.annotations[0]&&(f+=S.height+i,d+=S.width);let A=e.classData.id;e.classData.type!==void 0&&e.classData.type!==""&&($().flowchart.htmlLabels?A+="<"+e.classData.type+">":A+="<"+e.classData.type+">");const O=p.node().appendChild(Pr(A,e.labelStyle,!0,!0));At(O).attr("class","classTitle");let P=O.getBBox();if(gr($().flowchart.htmlLabels)){const H=O.children[0],N=At(O);P=H.getBoundingClientRect(),N.attr("width",P.width),N.attr("height",P.height)}f+=P.height+i,P.width>d&&(d=P.width);const W=[];e.classData.members.forEach(H=>{const N=Rc(H);let M=N.displayText;$().flowchart.htmlLabels&&(M=M.replace(/</g,"<").replace(/>/g,">"));const C=p.node().appendChild(Pr(M,N.cssStyle?N.cssStyle:e.labelStyle,!0,!0));let v=C.getBBox();if(gr($().flowchart.htmlLabels)){const D=C.children[0],m=At(C);v=D.getBoundingClientRect(),m.attr("width",v.width),m.attr("height",v.height)}v.width>d&&(d=v.width),f+=v.height+i,W.push(C)}),f+=n;const q=[];if(e.classData.methods.forEach(H=>{const N=Rc(H);let M=N.displayText;$().flowchart.htmlLabels&&(M=M.replace(/</g,"<").replace(/>/g,">"));const C=p.node().appendChild(Pr(M,N.cssStyle?N.cssStyle:e.labelStyle,!0,!0));let v=C.getBBox();if(gr($().flowchart.htmlLabels)){const D=C.children[0],m=At(C);v=D.getBoundingClientRect(),m.attr("width",v.width),m.attr("height",v.height)}v.width>d&&(d=v.width),f+=v.height+i,q.push(C)}),f+=n,_){let H=(d-S.width)/2;At(w).attr("transform","translate( "+(-1*d/2+H)+", "+-1*f/2+")"),g=S.height+i}let z=(d-P.width)/2;return At(O).attr("transform","translate( "+(-1*d/2+z)+", "+(-1*f/2+g)+")"),g+=P.height+i,l.attr("class","divider").attr("x1",-d/2-r).attr("x2",d/2+r).attr("y1",-f/2-r+n+g).attr("y2",-f/2-r+n+g),g+=n,W.forEach(H=>{At(H).attr("transform","translate( "+-d/2+", "+(-1*f/2+g+n/2)+")"),g+=P.height+i}),g+=n,u.attr("class","divider").attr("x1",-d/2-r).attr("x2",d/2+r).attr("y1",-f/2-r+n+g).attr("y2",-f/2-r+n+g),g+=n,q.forEach(H=>{At(H).attr("transform","translate( "+-d/2+", "+(-1*f/2+g)+")"),g+=P.height+i}),o.attr("class","outer title-state").attr("x",-d/2-r).attr("y",-(f/2)-r).attr("width",d+e.padding).attr("height",f+e.padding),Je(e,o),e.intersect=function(H){return $e.rect(e,H)},a},P2={question:XI,rect:sO,labelRect:aO,rectWithTitle:oO,choice:KI,circle:cO,doublecircle:uO,stadium:lO,hexagon:ZI,rect_left_inv_arrow:QI,lean_right:JI,lean_left:tO,trapezoid:eO,inv_trapezoid:rO,rect_right_inv_arrow:iO,cylinder:nO,start:dO,end:fO,note:$I,subroutine:hO,fork:F2,join:F2,class_box:pO};let ta={};const gO=(t,e,r)=>{let i,n;if(e.link){let s;$().securityLevel==="sandbox"?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s),n=P2[e.shape](i,e,r)}else n=P2[e.shape](t,e,r),i=n;e.tooltip&&n.attr("title",e.tooltip),e.class&&n.attr("class","node default "+e.class),ta[e.id]=i,e.haveCallback&&ta[e.id].attr("class",ta[e.id].attr("class")+" clickable")},yO=(t,e)=>{ta[e.id]=t},mO=()=>{ta={}},Y2=t=>{const e=ta[t.id];B.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},bO=(t,e)=>{B.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(Pr(e.labelText,e.labelStyle,void 0,!0));let a=s.getBBox();if(gr($().flowchart.htmlLabels)){const f=s.children[0],p=At(s);a=f.getBoundingClientRect(),p.attr("width",a.width),p.attr("height",a.height)}const o=0*e.padding,l=o/2,u=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,B.trace("Data ",e,JSON.stringify(e)),i.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-u/2).attr("y",e.y-e.height/2-l).attr("width",u).attr("height",e.height+o),n.attr("transform","translate("+(e.x-a.width/2)+", "+(e.y-e.height/2)+")");const d=i.node().getBBox();return e.width=d.width,e.height=d.height,e.intersect=function(f){return $o(e,f)},r},_O=(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 $o(e,o)},r},xO=(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(Pr(e.labelText,e.labelStyle,void 0,!0));let o=a.getBBox();if(gr($().flowchart.htmlLabels)){const p=a.children[0],g=At(a);o=p.getBoundingClientRect(),g.attr("width",o.width),g.attr("height",o.height)}o=a.getBBox();const l=0*e.padding,u=l/2,d=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-d/2-u).attr("y",e.y-e.height/2-u).attr("width",d+l).attr("height",e.height+l),s.attr("class","inner").attr("x",e.x-d/2-u).attr("y",e.y-e.height/2-u+o.height-1).attr("width",d+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+(gr($().flowchart.htmlLabels)?5:3))+")");const f=i.node().getBBox();return e.height=f.height,e.intersect=function(p){return $o(e,p)},r},vO=(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 $o(e,o)},r},kO={rect:bO,roundedWithTitle:xO,noteGroup:_O,divider:vO};let Wm={};const wO=(t,e)=>{B.trace("Inserting cluster");const r=e.shape||"rect";Wm[e.id]=kO[r](t,e)},TO=()=>{Wm={}};let Pc={},br={};const EO=()=>{Pc={},br={}},CO=(t,e)=>{const r=Pr(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(gr($().flowchart.htmlLabels)){const o=r.children[0],l=At(r);s=o.getBoundingClientRect(),l.attr("width",s.width),l.attr("height",s.height)}n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),Pc[e.id]=i,e.width=s.width,e.height=s.height;let a;if(e.startLabelLeft){const o=Pr(e.startLabelLeft,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),u=l.insert("g").attr("class","inner");a=u.node().appendChild(o);const d=o.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),br[e.id]||(br[e.id]={}),br[e.id].startLeft=l,Tl(a,e.startLabelLeft)}if(e.startLabelRight){const o=Pr(e.startLabelRight,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),u=l.insert("g").attr("class","inner");a=l.node().appendChild(o),u.node().appendChild(o);const d=o.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),br[e.id]||(br[e.id]={}),br[e.id].startRight=l,Tl(a,e.startLabelRight)}if(e.endLabelLeft){const o=Pr(e.endLabelLeft,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),u=l.insert("g").attr("class","inner");a=u.node().appendChild(o);const d=o.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.node().appendChild(o),br[e.id]||(br[e.id]={}),br[e.id].endLeft=l,Tl(a,e.endLabelLeft)}if(e.endLabelRight){const o=Pr(e.endLabelRight,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),u=l.insert("g").attr("class","inner");a=u.node().appendChild(o);const d=o.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.node().appendChild(o),br[e.id]||(br[e.id]={}),br[e.id].endRight=l,Tl(a,e.endLabelRight)}};function Tl(t,e){$().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}const SO=(t,e)=>{B.info("Moving label abc78 ",t.id,t.label,Pc[t.id]);let r=e.updatedPath?e.updatedPath:e.originalPath;if(t.label){const i=Pc[t.id];let n=t.x,s=t.y;if(r){const a=ye.calcLabelPosition(r);B.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=br[t.id].startLeft;let n=t.x,s=t.y;if(r){const a=ye.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=br[t.id].startRight;let n=t.x,s=t.y;if(r){const a=ye.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=br[t.id].endLeft;let n=t.x,s=t.y;if(r){const a=ye.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=br[t.id].endRight;let n=t.x,s=t.y;if(r){const a=ye.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);n=a.x,s=a.y}i.attr("transform","translate("+n+", "+s+")")}},AO=(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},LO=(t,e,r)=>{B.warn(`intersection calc abc89:
|
|
1214
|
-
outsidePoint: ${JSON.stringify(e)}
|
|
1215
|
-
insidePoint : ${JSON.stringify(r)}
|
|
1216
|
-
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,u=Math.abs(e.y-r.y),d=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=d*f/u;const p={x:r.x<e.x?r.x+o:r.x-d+o,y:r.y<e.y?r.y+u-f:r.y-u+f};return o===0&&(p.x=e.x,p.y=e.y),d===0&&(p.x=e.x),u===0&&(p.y=e.y),B.warn(`abc89 topp/bott calc, Q ${u}, q ${f}, R ${d}, r ${o}`,p),p}else{r.x<e.x?o=e.x-a-i:o=i-a-e.x;let f=u*o/d,p=r.x<e.x?r.x+d-o:r.x-d+o,g=r.y<e.y?r.y+f:r.y-f;return B.warn(`sides calc abc89, Q ${u}, q ${f}, R ${d}, r ${o}`,{_x:p,_y:g}),o===0&&(p=e.x,g=e.y),d===0&&(p=e.x),u===0&&(g=e.y),{x:p,y:g}}},V2=(t,e)=>{B.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],n=!1;return t.forEach(s=>{if(B.info("abc88 checking point",s,e),!AO(e,s)&&!n){const a=LO(e,i,s);B.warn("abc88 inside",s,i,a),B.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)?B.warn("abc88 no intersect",a,r):r.push(a),n=!0}else B.warn("abc88 outside",s,i),i=s,n||r.push(s)}),B.warn("abc88 returning points",r),r},DO=function(t,e,r,i,n,s){let a=r.points,o=!1;const l=s.node(e.v);var u=s.node(e.w);B.info("abc88 InsertEdge: ",r),u.intersect&&l.intersect&&(a=a.slice(1,r.points.length-1),a.unshift(l.intersect(a[0])),B.info("Last point",a[a.length-1],u,u.intersect(a[a.length-1])),a.push(u.intersect(a[a.length-1]))),r.toCluster&&(B.info("to cluster abc88",i[r.toCluster]),a=V2(r.points,i[r.toCluster].node),o=!0),r.fromCluster&&(B.info("from cluster abc88",i[r.fromCluster]),a=V2(a.reverse(),i[r.fromCluster].node).reverse(),o=!0);const d=a.filter(S=>!Number.isNaN(S.y));let f;n==="graph"||n==="flowchart"?f=r.curve||la:f=la;const p=Ta().x(function(S){return S.x}).y(function(S){return S.y}).curve(f);let g;switch(r.thickness){case"normal":g="edge-thickness-normal";break;case"thick":g="edge-thickness-thick";break;default:g=""}switch(r.pattern){case"solid":g+=" edge-pattern-solid";break;case"dotted":g+=" edge-pattern-dotted";break;case"dashed":g+=" edge-pattern-dashed";break}const _=t.append("path").attr("d",p(d)).attr("id",r.id).attr("class"," "+g+(r.classes?" "+r.classes:"")).attr("style",r.style);let k="";switch(($().flowchart.arrowMarkerAbsolute||$().state.arrowMarkerAbsolute)&&(k=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,k=k.replace(/\(/g,"\\("),k=k.replace(/\)/g,"\\)")),B.info("arrowTypeStart",r.arrowTypeStart),B.info("arrowTypeEnd",r.arrowTypeEnd),r.arrowTypeStart){case"arrow_cross":_.attr("marker-start","url("+k+"#"+n+"-crossStart)");break;case"arrow_point":_.attr("marker-start","url("+k+"#"+n+"-pointStart)");break;case"arrow_barb":_.attr("marker-start","url("+k+"#"+n+"-barbStart)");break;case"arrow_circle":_.attr("marker-start","url("+k+"#"+n+"-circleStart)");break;case"aggregation":_.attr("marker-start","url("+k+"#"+n+"-aggregationStart)");break;case"extension":_.attr("marker-start","url("+k+"#"+n+"-extensionStart)");break;case"composition":_.attr("marker-start","url("+k+"#"+n+"-compositionStart)");break;case"dependency":_.attr("marker-start","url("+k+"#"+n+"-dependencyStart)");break;case"lollipop":_.attr("marker-start","url("+k+"#"+n+"-lollipopStart)");break}switch(r.arrowTypeEnd){case"arrow_cross":_.attr("marker-end","url("+k+"#"+n+"-crossEnd)");break;case"arrow_point":_.attr("marker-end","url("+k+"#"+n+"-pointEnd)");break;case"arrow_barb":_.attr("marker-end","url("+k+"#"+n+"-barbEnd)");break;case"arrow_circle":_.attr("marker-end","url("+k+"#"+n+"-circleEnd)");break;case"aggregation":_.attr("marker-end","url("+k+"#"+n+"-aggregationEnd)");break;case"extension":_.attr("marker-end","url("+k+"#"+n+"-extensionEnd)");break;case"composition":_.attr("marker-end","url("+k+"#"+n+"-compositionEnd)");break;case"dependency":_.attr("marker-end","url("+k+"#"+n+"-dependencyEnd)");break;case"lollipop":_.attr("marker-end","url("+k+"#"+n+"-lollipopEnd)");break}let w={};return o&&(w.updatedPath=a),w.originalPath=r.points,w},Hm=(t,e,r,i)=>{B.info("Graph in recursive render: XXX",dn(e),i);const n=e.graph().rankdir;B.trace("Dir in recursive render - dir:",n);const s=t.insert("g").attr("class","root");e.nodes()?B.info("Recursive render XXX",e.nodes()):B.info("No nodes found for",e),e.edges().length>0&&B.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"),u=s.insert("g").attr("class","nodes");e.nodes().forEach(function(f){const p=e.node(f);if(i!==void 0){const g=JSON.parse(JSON.stringify(i.clusterData));B.info("Setting data for cluster XXX (",f,") ",g,i),e.setNode(i.id,g),e.parent(f)||(B.trace("Setting parent",f,i.id),e.setParent(f,i.id,g))}if(B.info("(Insert) Node XXX"+f+": "+JSON.stringify(e.node(f))),p&&p.clusterNode){B.info("Cluster identified",f,p.width,e.node(f));const g=Hm(u,p.graph,r,e.node(f)),_=g.elem;Je(p,_),p.diff=g.diff||0,B.info("Node bounds (abc123)",f,p,p.width,p.x,p.y),yO(_,p),B.warn("Recursive render complete ",_,p)}else e.children(f).length>0?(B.info("Cluster - the non recursive path XXX",f,p.id,p,e),B.info(Bo(p.id,e)),Te[p.id]={id:Bo(p.id,e),node:p}):(B.info("Node - the non recursive path",f,p.id,p),gO(u,e.node(f),n))}),e.edges().forEach(function(f){const p=e.edge(f.v,f.w,f.name);B.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(f)),B.info("Edge "+f.v+" -> "+f.w+": ",f," ",JSON.stringify(e.edge(f))),B.info("Fix",Te,"ids:",f.v,f.w,"Translateing: ",Te[f.v],Te[f.w]),CO(l,p)}),e.edges().forEach(function(f){B.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(f))}),B.info("#############################################"),B.info("### Layout ###"),B.info("#############################################"),B.info(e),La(e),B.info("Graph after layout:",dn(e));let d=0;return UI(e).forEach(function(f){const p=e.node(f);B.info("Position "+f+": "+JSON.stringify(e.node(f))),B.info("Position "+f+": ("+p.x,","+p.y,") width: ",p.width," height: ",p.height),p&&p.clusterNode?Y2(p):e.children(f).length>0?(wO(a,p),Te[p.id].node=p):Y2(p)}),e.edges().forEach(function(f){const p=e.edge(f);B.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(p),p);const g=DO(o,f,p,Te,r,e);SO(p,g)}),e.nodes().forEach(function(f){const p=e.node(f);B.info(f,p.type,p.diff),p.type==="group"&&(d=p.diff)}),{elem:s,diff:d}},U0=(t,e,r,i,n)=>{II(t,r,i,n),mO(),EO(),TO(),PI(),B.warn("Graph at first:",dn(e)),VI(e),B.warn("Graph after:",dn(e)),Hm(t,e,i)},Gm=t=>he.sanitizeText(t,$());let qm={dividerMargin:10,padding:5,textHeight:10};const MO=function(t,e,r,i){const n=Object.keys(t);B.info("keys:",n),B.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 u=a.text!==void 0?a.text:a.id,d=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:Gm(u),classData:a,rx:d,ry:d,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:$().flowchart.padding}),B.info("setNode",{labelStyle:l.labelStyle,shape:f,labelText:u,rx:d,ry:d,class:o,style:l.style,id:a.id,width:a.type==="group"?500:void 0,type:a.type,padding:$().flowchart.padding})})},NO=function(t,e,r,i){B.info(t),t.forEach(function(n,s){const a=n;let o="";const l={labelStyle:"",style:""};let u=a.text,d=0,f="note";if(e.setNode(a.id,{labelStyle:l.labelStyle,shape:f,labelText:Gm(u),noteData:a,rx:d,ry:d,class:o,style:l.style,id:a.id,domId:a.id,tooltip:"",type:"note",padding:$().flowchart.padding}),B.info("setNode",{labelStyle:l.labelStyle,shape:f,labelText:u,rx:d,ry:d,style:l.style,id:a.id,type:"note",padding:$().flowchart.padding}),!a.class||!(a.class in i))return;const p=r+s,g={};g.classes="relation",g.pattern="dotted",g.id=`edgeNote${p}`,g.arrowhead="none",B.info(`Note edge: ${JSON.stringify(g)}, ${JSON.stringify(a)}`),g.startLabelRight="",g.endLabelLeft="",g.arrowTypeStart="none",g.arrowTypeEnd="none";let _="fill:none",k="";g.style=_,g.labelStyle=k,g.curve=gi(qm.curve,jr),e.setEdge(a.id,a.class,g,p)})},BO=function(t,e){const r=$().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",B.info(s,n),s.startLabelRight=n.relationTitle1==="none"?"":n.relationTitle1,s.endLabelLeft=n.relationTitle2==="none"?"":n.relationTitle2,s.arrowTypeStart=U2(n.relation.type1),s.arrowTypeEnd=U2(n.relation.type2);let a="",o="";if(n.style!==void 0){const l=Gn(n.style);a=l.style,o=l.labelStyle}else a="fill:none";s.style=a,s.labelStyle=o,n.interpolate!==void 0?s.curve=gi(n.interpolate,jr):t.defaultInterpolate!==void 0?s.curve=gi(t.defaultInterpolate,jr):s.curve=gi(r.curve,jr),n.text=n.title,n.text===void 0?n.style!==void 0&&(s.arrowheadStyle="fill: #333"):(s.arrowheadStyle="fill: #333",s.labelpos="c",$().flowchart.htmlLabels?(s.labelType="html",s.label='<span class="edgeLabel">'+n.text+"</span>"):(s.labelType="text",s.label=n.text.replace(he.lineBreakRegex,`
|
|
1217
|
-
`),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)})},IO=function(t){Object.keys(t).forEach(function(r){qm[r]=t[r]})},OO=function(t,e,r,i){B.info("Drawing class - ",e);const n=$().flowchart,s=$().securityLevel;B.info("config:",n);const a=n.nodeSpacing||50,o=n.rankSpacing||50,l=new or({multigraph:!0,compound:!0}).setGraph({rankdir:i.db.getDirection(),nodesep:a,ranksep:o,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),u=i.db.getClasses(),d=i.db.getRelations(),f=i.db.getNotes();B.info(d),MO(u,l,e,i),BO(d,l),NO(f,l,d.length+1,u);let p;s==="sandbox"&&(p=At("#i"+e));const g=At(s==="sandbox"?p.nodes()[0].contentDocument.body:"body"),_=g.select(`[id="${e}"]`),k=g.select("#"+e+" g");if(U0(k,l,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",e),ye.insertTitle(_,"classTitleText",n.titleTopMargin,i.db.getDiagramTitle()),ku(l,_,n.diagramPadding,n.useMaxWidth),!n.htmlLabels){const w=s==="sandbox"?p.nodes()[0].contentDocument:document,S=w.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const A of S){const O=A.getBBox(),P=w.createElementNS("http://www.w3.org/2000/svg","rect");P.setAttribute("rx",0),P.setAttribute("ry",0),P.setAttribute("width",O.width),P.setAttribute("height",O.height),A.insertBefore(P,A.firstChild)}}};function U2(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 RO={setConf:IO,draw:OO};var _1=function(){var t=function(N,M,C,v){for(C=C||{},v=N.length;v--;C[N[v]]=M);return C},e=[1,2],r=[1,5],i=[6,9,11,23,25,27,29,30,31,49],n=[1,17],s=[1,18],a=[1,19],o=[1,20],l=[1,21],u=[1,22],d=[1,25],f=[1,30],p=[1,31],g=[1,32],_=[1,33],k=[6,9,11,15,20,23,25,27,29,30,31,42,43,44,45,49],w=[1,45],S=[30,31,46,47],A=[4,6,9,11,23,25,27,29,30,31,49],O=[42,43,44,45],P=[22,37],W=[1,64],q={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,attributeKeyType:35,attributeComment:36,ATTRIBUTE_WORD:37,ATTRIBUTE_KEY:38,COMMENT:39,cardinality:40,relType:41,ZERO_OR_ONE:42,ZERO_OR_MORE:43,ONE_OR_MORE:44,ONLY_ONE:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,open_directive:49,type_directive:50,arg_directive:51,close_directive:52,$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",38:"ATTRIBUTE_KEY",39:"COMMENT",42:"ZERO_OR_ONE",43:"ZERO_OR_MORE",44:"ONE_OR_MORE",45:"ONLY_ONE",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD",49:"open_directive",50:"type_directive",51:"arg_directive",52:"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],[36,1],[18,3],[40,1],[40,1],[40,1],[40,1],[41,1],[41,1],[19,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(M,C,v,D,m,Q,b){var ct=Q.length-1;switch(m){case 1:break;case 3:this.$=[];break;case 4:Q[ct-1].push(Q[ct]),this.$=Q[ct-1];break;case 5:case 6:this.$=Q[ct];break;case 7:case 8:this.$=[];break;case 12:D.addEntity(Q[ct-4]),D.addEntity(Q[ct-2]),D.addRelationship(Q[ct-4],Q[ct],Q[ct-2],Q[ct-3]);break;case 13:D.addEntity(Q[ct-3]),D.addAttributes(Q[ct-3],Q[ct-1]);break;case 14:D.addEntity(Q[ct-2]);break;case 15:D.addEntity(Q[ct]);break;case 16:case 17:this.$=Q[ct].trim(),D.setAccTitle(this.$);break;case 18:case 19:this.$=Q[ct].trim(),D.setAccDescription(this.$);break;case 20:case 41:this.$=Q[ct];break;case 21:case 39:case 40:this.$=Q[ct].replace(/"/g,"");break;case 22:this.$=[Q[ct]];break;case 23:Q[ct].push(Q[ct-1]),this.$=Q[ct];break;case 24:this.$={attributeType:Q[ct-1],attributeName:Q[ct]};break;case 25:this.$={attributeType:Q[ct-2],attributeName:Q[ct-1],attributeKeyType:Q[ct]};break;case 26:this.$={attributeType:Q[ct-2],attributeName:Q[ct-1],attributeComment:Q[ct]};break;case 27:this.$={attributeType:Q[ct-3],attributeName:Q[ct-2],attributeKeyType:Q[ct-1],attributeComment:Q[ct]};break;case 28:case 29:case 30:this.$=Q[ct];break;case 31:this.$=Q[ct].replace(/"/g,"");break;case 32:this.$={cardA:Q[ct],relType:Q[ct-1],cardB:Q[ct-2]};break;case 33:this.$=D.Cardinality.ZERO_OR_ONE;break;case 34:this.$=D.Cardinality.ZERO_OR_MORE;break;case 35:this.$=D.Cardinality.ONE_OR_MORE;break;case 36:this.$=D.Cardinality.ONLY_ONE;break;case 37:this.$=D.Identification.NON_IDENTIFYING;break;case 38:this.$=D.Identification.IDENTIFYING;break;case 42:D.parseDirective("%%{","open_directive");break;case 43:D.parseDirective(Q[ct],"type_directive");break;case 44:Q[ct]=Q[ct].trim().replace(/'/g,'"'),D.parseDirective(Q[ct],"arg_directive");break;case 45:D.parseDirective("}%%","close_directive","er");break}},table:[{3:1,4:e,7:3,12:4,49:r},{1:[3]},t(i,[2,3],{5:6}),{3:7,4:e,7:3,12:4,49:r},{13:8,50:[1,9]},{50:[2,42]},{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:u,49:r},{1:[2,2]},{14:23,15:[1,24],52:d},t([15,52],[2,43]),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:u,49:r},t(i,[2,6]),t(i,[2,7]),t(i,[2,11]),t(i,[2,15],{18:27,40:29,20:[1,28],42:f,43:p,44:g,45:_}),{24:[1,34]},{26:[1,35]},{28:[1,36]},t(i,[2,19]),t(k,[2,20]),t(k,[2,21]),{11:[1,37]},{16:38,51:[1,39]},{11:[2,45]},t(i,[2,5]),{17:40,30:l,31:u},{21:41,22:[1,42],32:43,33:44,37:w},{41:46,46:[1,47],47:[1,48]},t(S,[2,33]),t(S,[2,34]),t(S,[2,35]),t(S,[2,36]),t(i,[2,16]),t(i,[2,17]),t(i,[2,18]),t(A,[2,9]),{14:49,52:d},{52:[2,44]},{15:[1,50]},{22:[1,51]},t(i,[2,14]),{21:52,22:[2,22],32:43,33:44,37:w},{34:53,37:[1,54]},{37:[2,28]},{40:55,42:f,43:p,44:g,45:_},t(O,[2,37]),t(O,[2,38]),{11:[1,56]},{19:57,30:[1,60],31:[1,59],48:[1,58]},t(i,[2,13]),{22:[2,23]},t(P,[2,24],{35:61,36:62,38:[1,63],39:W}),t([22,37,38,39],[2,29]),t([30,31],[2,32]),t(A,[2,10]),t(i,[2,12]),t(i,[2,39]),t(i,[2,40]),t(i,[2,41]),t(P,[2,25],{36:65,39:W}),t(P,[2,26]),t([22,37,39],[2,30]),t(P,[2,31]),t(P,[2,27])],defaultActions:{5:[2,42],7:[2,2],25:[2,45],39:[2,44],45:[2,28],52:[2,23]},parseError:function(M,C){if(C.recoverable)this.trace(M);else{var v=new Error(M);throw v.hash=C,v}},parse:function(M){var C=this,v=[0],D=[],m=[null],Q=[],b=this.table,ct="",Dt=0,vt=0,j=2,ot=1,rt=Q.slice.call(arguments,1),it=Object.create(this.lexer),ut={yy:{}};for(var bt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,bt)&&(ut.yy[bt]=this.yy[bt]);it.setInput(M,ut.yy),ut.yy.lexer=it,ut.yy.parser=this,typeof it.yylloc>"u"&&(it.yylloc={});var K=it.yylloc;Q.push(K);var Ot=it.options&&it.options.ranges;typeof ut.yy.parseError=="function"?this.parseError=ut.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Y(){var et;return et=D.pop()||it.lex()||ot,typeof et!="number"&&(et instanceof Array&&(D=et,et=D.pop()),et=C.symbols_[et]||et),et}for(var U,X,F,I,L={},J,T,ht,V;;){if(X=v[v.length-1],this.defaultActions[X]?F=this.defaultActions[X]:((U===null||typeof U>"u")&&(U=Y()),F=b[X]&&b[X][U]),typeof F>"u"||!F.length||!F[0]){var Yt="";V=[];for(J in b[X])this.terminals_[J]&&J>j&&V.push("'"+this.terminals_[J]+"'");it.showPosition?Yt="Parse error on line "+(Dt+1)+`:
|
|
1218
|
-
`+it.showPosition()+`
|
|
1219
|
-
Expecting `+V.join(", ")+", got '"+(this.terminals_[U]||U)+"'":Yt="Parse error on line "+(Dt+1)+": Unexpected "+(U==ot?"end of input":"'"+(this.terminals_[U]||U)+"'"),this.parseError(Yt,{text:it.match,token:this.terminals_[U]||U,line:it.yylineno,loc:K,expected:V})}if(F[0]instanceof Array&&F.length>1)throw new Error("Parse Error: multiple actions possible at state: "+X+", token: "+U);switch(F[0]){case 1:v.push(U),m.push(it.yytext),Q.push(it.yylloc),v.push(F[1]),U=null,vt=it.yyleng,ct=it.yytext,Dt=it.yylineno,K=it.yylloc;break;case 2:if(T=this.productions_[F[1]][1],L.$=m[m.length-T],L._$={first_line:Q[Q.length-(T||1)].first_line,last_line:Q[Q.length-1].last_line,first_column:Q[Q.length-(T||1)].first_column,last_column:Q[Q.length-1].last_column},Ot&&(L._$.range=[Q[Q.length-(T||1)].range[0],Q[Q.length-1].range[1]]),I=this.performAction.apply(L,[ct,vt,Dt,ut.yy,F[1],m,Q].concat(rt)),typeof I<"u")return I;T&&(v=v.slice(0,-1*T*2),m=m.slice(0,-1*T),Q=Q.slice(0,-1*T)),v.push(this.productions_[F[1]][0]),m.push(L.$),Q.push(L._$),ht=b[v[v.length-2]][v[v.length-1]],v.push(ht);break;case 3:return!0}}return!0}},z=function(){var N={EOF:1,parseError:function(C,v){if(this.yy.parser)this.yy.parser.parseError(C,v);else throw new Error(C)},setInput:function(M,C){return this.yy=C||this.yy||{},this._input=M,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 M=this._input[0];this.yytext+=M,this.yyleng++,this.offset++,this.match+=M,this.matched+=M;var C=M.match(/(?:\r\n?|\n).*/g);return C?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),M},unput:function(M){var C=M.length,v=M.split(/(?:\r\n?|\n)/g);this._input=M+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-C),this.offset-=C;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),v.length-1&&(this.yylineno-=v.length-1);var m=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===D.length?this.yylloc.first_column:0)+D[D.length-v.length].length-v[0].length:this.yylloc.first_column-C},this.options.ranges&&(this.yylloc.range=[m[0],m[0]+this.yyleng-C]),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).
|
|
1220
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(M){this.unput(this.match.slice(M))},pastInput:function(){var M=this.matched.substr(0,this.matched.length-this.match.length);return(M.length>20?"...":"")+M.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var M=this.match;return M.length<20&&(M+=this._input.substr(0,20-M.length)),(M.substr(0,20)+(M.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var M=this.pastInput(),C=new Array(M.length+1).join("-");return M+this.upcomingInput()+`
|
|
1221
|
-
`+C+"^"},test_match:function(M,C){var v,D,m;if(this.options.backtrack_lexer&&(m={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&&(m.yylloc.range=this.yylloc.range.slice(0))),D=M[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+M[0].length},this.yytext+=M[0],this.match+=M[0],this.matches=M,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(M[0].length),this.matched+=M[0],v=this.performAction.call(this,this.yy,this,C,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),v)return v;if(this._backtrack){for(var Q in m)this[Q]=m[Q];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var M,C,v,D;this._more||(this.yytext="",this.match="");for(var m=this._currentRules(),Q=0;Q<m.length;Q++)if(v=this._input.match(this.rules[m[Q]]),v&&(!C||v[0].length>C[0].length)){if(C=v,D=Q,this.options.backtrack_lexer){if(M=this.test_match(v,m[Q]),M!==!1)return M;if(this._backtrack){C=!1;continue}else return!1}else if(!this.options.flex)break}return C?(M=this.test_match(C,m[D]),M!==!1?M:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1222
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var C=this.next();return C||this.lex()},begin:function(C){this.conditionStack.push(C)},popState:function(){var C=this.conditionStack.length-1;return C>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(C){return C=this.conditionStack.length-1-Math.abs(C||0),C>=0?this.conditionStack[C]:"INITIAL"},pushState:function(C){this.begin(C)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(C,v,D,m){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"),49;case 8:return this.begin("type_directive"),50;case 9:return this.popState(),this.begin("arg_directive"),15;case 10:return this.popState(),this.popState(),52;case 11:return 51;case 12:break;case 13:break;case 14:return 11;case 15:break;case 16:return 9;case 17:return 31;case 18:return 48;case 19:return 4;case 20:return this.begin("block"),20;case 21:break;case 22:return 38;case 23:return 37;case 24:return 37;case 25:return 39;case 26:break;case 27:return this.popState(),22;case 28:return v.yytext[0];case 29:return 42;case 30:return 44;case 31:return 44;case 32:return 44;case 33:return 42;case 34:return 42;case 35:return 43;case 36:return 43;case 37:return 43;case 38:return 43;case 39:return 43;case 40:return 44;case 41:return 43;case 42:return 44;case 43:return 45;case 44:return 45;case 45:return 45;case 46:return 45;case 47:return 42;case 48:return 43;case 49:return 44;case 50:return 46;case 51:return 47;case 52:return 47;case 53:return 46;case 54:return 46;case 55:return 46;case 56:return 30;case 57:return v.yytext[0];case 58: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,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK))\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],inclusive:!1},INITIAL:{rules:[0,2,4,7,12,13,14,15,16,17,18,19,20,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],inclusive:!0}}};return N}();q.lexer=z;function H(){this.yy={}}return H.prototype=q,q.Parser=H,new H}();_1.parser=_1;const FO=_1,PO=t=>t.match(/^\s*erDiagram/)!==null;let ao={},z0=[];const YO={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE"},VO={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},UO=function(t,e,r){ze.parseDirective(this,t,e,r)},jm=function(t){return ao[t]===void 0&&(ao[t]={attributes:[]},B.info("Added new entity :",t)),ao[t]},zO=()=>ao,WO=function(t,e){let r=jm(t),i;for(i=e.length-1;i>=0;i--)r.attributes.push(e[i]),B.debug("Added attribute ",e[i].attributeName)},HO=function(t,e,r,i){let n={entityA:t,roleA:e,entityB:r,relSpec:i};z0.push(n),B.debug("Added new relationship :",n)},GO=()=>z0,qO=function(){ao={},z0=[],Ei()},jO={Cardinality:YO,Identification:VO,parseDirective:UO,getConfig:()=>$().er,addEntity:jm,addAttributes:WO,getEntities:zO,addRelationship:HO,getRelationships:GO,clear:qO,setAccTitle:ri,getAccTitle:Ci,setAccDescription:Si,getAccDescription:Ai,setDiagramTitle:En,getDiagramTitle:Cn},rn={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"},$O=function(t,e){let r;t.append("defs").append("marker").attr("id",rn.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",rn.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",rn.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",rn.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",rn.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",rn.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",rn.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",rn.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")},nn={ERMarkers:rn,insertMarkers:$O},XO=/[^\dA-Za-z](\W)*/g;let cr={},Io=new Map;const KO=function(t){const e=Object.keys(t);for(const r of e)cr[r]=t[r]},ZO=(t,e,r)=>{const i=cr.entityPadding/3,n=cr.entityPadding/3,s=cr.fontSize*.85,a=e.node().getBBox(),o=[];let l=!1,u=!1,d=0,f=0,p=0,g=0,_=a.height+i*2,k=1;r.forEach(O=>{O.attributeKeyType!==void 0&&(l=!0),O.attributeComment!==void 0&&(u=!0)}),r.forEach(O=>{const P=`${e.node().id}-attr-${k}`;let W=0;const q=Yn(O.attributeType),z=t.append("text").classed("er entityLabel",!0).attr("id",`${P}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",$().fontFamily).style("font-size",s+"px").text(q),H=t.append("text").classed("er entityLabel",!0).attr("id",`${P}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",$().fontFamily).style("font-size",s+"px").text(O.attributeName),N={};N.tn=z,N.nn=H;const M=z.node().getBBox(),C=H.node().getBBox();if(d=Math.max(d,M.width),f=Math.max(f,C.width),W=Math.max(M.height,C.height),l){const v=t.append("text").classed("er entityLabel",!0).attr("id",`${P}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",$().fontFamily).style("font-size",s+"px").text(O.attributeKeyType||"");N.kn=v;const D=v.node().getBBox();p=Math.max(p,D.width),W=Math.max(W,D.height)}if(u){const v=t.append("text").classed("er entityLabel",!0).attr("id",`${P}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",$().fontFamily).style("font-size",s+"px").text(O.attributeComment||"");N.cn=v;const D=v.node().getBBox();g=Math.max(g,D.width),W=Math.max(W,D.height)}N.height=W,o.push(N),_+=W+i*2,k+=1});let w=4;l&&(w+=2),u&&(w+=2);const S=d+f+p+g,A={width:Math.max(cr.minEntityWidth,Math.max(a.width+cr.entityPadding*2,S+n*w)),height:r.length>0?_:Math.max(cr.minEntityHeight,a.height+cr.entityPadding*2)};if(r.length>0){const O=Math.max(0,(A.width-S-n*w)/(w/2));e.attr("transform","translate("+A.width/2+","+(i+a.height/2)+")");let P=a.height+i*2,W="attributeBoxOdd";o.forEach(q=>{const z=P+i+q.height/2;q.tn.attr("transform","translate("+n+","+z+")");const H=t.insert("rect","#"+q.tn.node().id).classed(`er ${W}`,!0).attr("x",0).attr("y",P).attr("width",d+n*2+O).attr("height",q.height+i*2),N=parseFloat(H.attr("x"))+parseFloat(H.attr("width"));q.nn.attr("transform","translate("+(N+n)+","+z+")");const M=t.insert("rect","#"+q.nn.node().id).classed(`er ${W}`,!0).attr("x",N).attr("y",P).attr("width",f+n*2+O).attr("height",q.height+i*2);let C=parseFloat(M.attr("x"))+parseFloat(M.attr("width"));if(l){q.kn.attr("transform","translate("+(C+n)+","+z+")");const v=t.insert("rect","#"+q.kn.node().id).classed(`er ${W}`,!0).attr("x",C).attr("y",P).attr("width",p+n*2+O).attr("height",q.height+i*2);C=parseFloat(v.attr("x"))+parseFloat(v.attr("width"))}u&&(q.cn.attr("transform","translate("+(C+n)+","+z+")"),t.insert("rect","#"+q.cn.node().id).classed(`er ${W}`,"true").attr("x",C).attr("y",P).attr("width",g+n*2+O).attr("height",q.height+i*2)),P+=q.height+i*2,W=W==="attributeBoxOdd"?"attributeBoxEven":"attributeBoxOdd"})}else A.height=Math.max(cr.minEntityHeight,_),e.attr("transform","translate("+A.width/2+","+A.height/2+")");return A},QO=function(t,e,r){const i=Object.keys(e);let n;return i.forEach(function(s){const a=iR(s,"entity");Io.set(s,a);const o=t.append("g").attr("id",a);n=n===void 0?a:n;const l="text-"+a,u=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",$().fontFamily).style("font-size",cr.fontSize+"px").text(s),{width:d,height:f}=ZO(o,u,e[s].attributes),g=o.insert("rect","#"+l).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",d).attr("height",f).node().getBBox();r.setNode(a,{width:g.width,height:g.height,shape:"rect",id:a})}),n},JO=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)+" )")})},$m=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},tR=function(t,e){return t.forEach(function(r){e.setEdge(Io.get(r.entityA),Io.get(r.entityB),{relationship:r},$m(r))}),t};let z2=0;const eR=function(t,e,r,i,n){z2++;const s=r.edge(Io.get(e.entityA),Io.get(e.entityB),$m(e)),a=Ta().x(function(_){return _.x}).y(function(_){return _.y}).curve(la),o=t.insert("path","#"+i).classed("er relationshipLine",!0).attr("d",a(s.points)).style("stroke",cr.stroke).style("fill","none");e.relSpec.relType===n.db.Identification.NON_IDENTIFYING&&o.attr("stroke-dasharray","8,8");let l="";switch(cr.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+"#"+nn.ERMarkers.ZERO_OR_ONE_END+")");break;case n.db.Cardinality.ZERO_OR_MORE:o.attr("marker-end","url("+l+"#"+nn.ERMarkers.ZERO_OR_MORE_END+")");break;case n.db.Cardinality.ONE_OR_MORE:o.attr("marker-end","url("+l+"#"+nn.ERMarkers.ONE_OR_MORE_END+")");break;case n.db.Cardinality.ONLY_ONE:o.attr("marker-end","url("+l+"#"+nn.ERMarkers.ONLY_ONE_END+")");break}switch(e.relSpec.cardB){case n.db.Cardinality.ZERO_OR_ONE:o.attr("marker-start","url("+l+"#"+nn.ERMarkers.ZERO_OR_ONE_START+")");break;case n.db.Cardinality.ZERO_OR_MORE:o.attr("marker-start","url("+l+"#"+nn.ERMarkers.ZERO_OR_MORE_START+")");break;case n.db.Cardinality.ONE_OR_MORE:o.attr("marker-start","url("+l+"#"+nn.ERMarkers.ONE_OR_MORE_START+")");break;case n.db.Cardinality.ONLY_ONE:o.attr("marker-start","url("+l+"#"+nn.ERMarkers.ONLY_ONE_START+")");break}const u=o.node().getTotalLength(),d=o.node().getPointAtLength(u*.5),f="rel"+z2,g=t.append("text").classed("er relationshipLabel",!0).attr("id",f).attr("x",d.x).attr("y",d.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",$().fontFamily).style("font-size",cr.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+f).classed("er relationshipLabelBox",!0).attr("x",d.x-g.width/2).attr("y",d.y-g.height/2).attr("width",g.width).attr("height",g.height)},rR=function(t,e,r,i){cr=$().er,B.info("Drawing ER diagram");const n=$().securityLevel;let s;n==="sandbox"&&(s=At("#i"+e));const o=At(n==="sandbox"?s.nodes()[0].contentDocument.body:"body").select(`[id='${e}']`);nn.insertMarkers(o,cr);let l;l=new or({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:cr.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});const u=QO(o,i.db.getEntities(),l),d=tR(i.db.getRelationships(),l);La(l),JO(o,l),d.forEach(function(k){eR(o,k,l,u,i)});const f=cr.diagramPadding;ye.insertTitle(o,"entityTitleText",cr.titleTopMargin,i.db.getDiagramTitle());const p=o.node().getBBox(),g=p.width+f*2,_=p.height+f*2;Ti(o,_,g,cr.useMaxWidth),o.attr("viewBox",`${p.x-f} ${p.y-f} ${g} ${_}`)};function iR(t="",e=""){const r=t.replace(XO,"");return`${W2(e)}${W2(r)}${tb()}`}function W2(t=""){return t.length>0?`${t}-`:""}const nR={setConf:KO,draw:rR};var x1=function(){var t=function(Ir,qt,te,oe){for(te=te||{},oe=Ir.length;oe--;te[Ir[oe]]=qt);return te},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],u=[1,22],d=[1,23],f=[1,30],p=[1,32],g=[1,33],_=[1,34],k=[1,62],w=[1,48],S=[1,52],A=[1,36],O=[1,37],P=[1,38],W=[1,39],q=[1,40],z=[1,56],H=[1,63],N=[1,51],M=[1,53],C=[1,55],v=[1,59],D=[1,60],m=[1,41],Q=[1,42],b=[1,43],ct=[1,44],Dt=[1,61],vt=[1,50],j=[1,54],ot=[1,57],rt=[1,58],it=[1,49],ut=[1,66],bt=[1,71],K=[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],Ot=[1,75],Y=[1,74],U=[1,76],X=[20,21,23,81,82],F=[1,99],I=[1,104],L=[1,107],J=[1,108],T=[1,101],ht=[1,106],V=[1,109],Yt=[1,102],et=[1,114],Mt=[1,113],Tt=[1,103],gt=[1,105],Et=[1,110],wt=[1,111],pt=[1,112],st=[1,115],le=[20,21,22,23,81,82],Xt=[20,21,22,23,53,81,82],jt=[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],Kt=[20,21,23],Gt=[20,21,23,52,66,67,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],Ee=[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],Ht=[52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],Vt=[1,149],Ft=[1,157],xt=[1,158],ft=[1,159],Lt=[1,160],_t=[1,144],Ut=[1,145],at=[1,141],ie=[1,152],dt=[1,153],ee=[1,154],de=[1,155],me=[1,156],be=[1,161],ke=[1,162],$t=[1,147],ne=[1,150],ge=[1,146],Qt=[1,143],ii=[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],Ur=[1,165],De=[20,21,22,23,26,52,66,67,91,105,106,109,111,112,122,123,124,125,126,127],ae=[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],Be=[12,21,22,24],Oe=[22,106],Fe=[1,250],Pe=[1,245],Ie=[1,246],Ge=[1,254],tr=[1,251],zt=[1,248],Z=[1,247],St=[1,249],Nt=[1,252],fe=[1,253],Me=[1,255],Le=[1,273],We=[20,21,23,106],xe=[20,21,22,23,66,67,86,102,105,106,109,110,111,112,113],Ne={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(qt,te,oe,Rt,Ye,G,Xn){var tt=G.length-1;switch(Ye){case 5:Rt.parseDirective("%%{","open_directive");break;case 6:Rt.parseDirective(G[tt],"type_directive");break;case 7:G[tt]=G[tt].trim().replace(/'/g,'"'),Rt.parseDirective(G[tt],"arg_directive");break;case 8:Rt.parseDirective("}%%","close_directive","flowchart");break;case 10:this.$=[];break;case 11:(!Array.isArray(G[tt])||G[tt].length>0)&&G[tt-1].push(G[tt]),this.$=G[tt-1];break;case 12:case 82:case 84:case 96:case 152:case 154:case 155:this.$=G[tt];break;case 19:Rt.setDirection("TB"),this.$="TB";break;case 20:Rt.setDirection(G[tt-1]),this.$=G[tt-1];break;case 35:this.$=G[tt-1].nodes;break;case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 41:this.$=Rt.addSubGraph(G[tt-6],G[tt-1],G[tt-4]);break;case 42:this.$=Rt.addSubGraph(G[tt-3],G[tt-1],G[tt-3]);break;case 43:this.$=Rt.addSubGraph(void 0,G[tt-1],void 0);break;case 45:this.$=G[tt].trim(),Rt.setAccTitle(this.$);break;case 46:case 47:this.$=G[tt].trim(),Rt.setAccDescription(this.$);break;case 51:Rt.addLink(G[tt-2].stmt,G[tt],G[tt-1]),this.$={stmt:G[tt],nodes:G[tt].concat(G[tt-2].nodes)};break;case 52:Rt.addLink(G[tt-3].stmt,G[tt-1],G[tt-2]),this.$={stmt:G[tt-1],nodes:G[tt-1].concat(G[tt-3].nodes)};break;case 53:this.$={stmt:G[tt-1],nodes:G[tt-1]};break;case 54:this.$={stmt:G[tt],nodes:G[tt]};break;case 55:this.$=[G[tt]];break;case 56:this.$=G[tt-4].concat(G[tt]);break;case 57:this.$=[G[tt-2]],Rt.setClass(G[tt-2],G[tt]);break;case 58:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"square");break;case 59:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"doublecircle");break;case 60:this.$=G[tt-5],Rt.addVertex(G[tt-5],G[tt-2],"circle");break;case 61:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"ellipse");break;case 62:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"stadium");break;case 63:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"subroutine");break;case 64:this.$=G[tt-7],Rt.addVertex(G[tt-7],G[tt-1],"rect",void 0,void 0,void 0,Object.fromEntries([[G[tt-5],G[tt-3]]]));break;case 65:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"cylinder");break;case 66:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"round");break;case 67:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"diamond");break;case 68:this.$=G[tt-5],Rt.addVertex(G[tt-5],G[tt-2],"hexagon");break;case 69:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"odd");break;case 70:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"trapezoid");break;case 71:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"inv_trapezoid");break;case 72:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"lean_right");break;case 73:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"lean_left");break;case 74:this.$=G[tt],Rt.addVertex(G[tt]);break;case 75:G[tt-1].text=G[tt],this.$=G[tt-1];break;case 76:case 77:G[tt-2].text=G[tt-1],this.$=G[tt-2];break;case 78:this.$=G[tt];break;case 79:var _r=Rt.destructLink(G[tt],G[tt-2]);this.$={type:_r.type,stroke:_r.stroke,length:_r.length,text:G[tt-1]};break;case 80:var _r=Rt.destructLink(G[tt]);this.$={type:_r.type,stroke:_r.stroke,length:_r.length};break;case 81:this.$=G[tt-1];break;case 83:case 97:case 153:this.$=G[tt-1]+""+G[tt];break;case 98:case 99:this.$=G[tt-4],Rt.addClass(G[tt-2],G[tt]);break;case 100:this.$=G[tt-4],Rt.setClass(G[tt-2],G[tt]);break;case 101:case 109:this.$=G[tt-1],Rt.setClickEvent(G[tt-1],G[tt]);break;case 102:case 110:this.$=G[tt-3],Rt.setClickEvent(G[tt-3],G[tt-2]),Rt.setTooltip(G[tt-3],G[tt]);break;case 103:this.$=G[tt-2],Rt.setClickEvent(G[tt-2],G[tt-1],G[tt]);break;case 104:this.$=G[tt-4],Rt.setClickEvent(G[tt-4],G[tt-3],G[tt-2]),Rt.setTooltip(G[tt-4],G[tt]);break;case 105:case 111:this.$=G[tt-1],Rt.setLink(G[tt-1],G[tt]);break;case 106:case 112:this.$=G[tt-3],Rt.setLink(G[tt-3],G[tt-2]),Rt.setTooltip(G[tt-3],G[tt]);break;case 107:case 113:this.$=G[tt-3],Rt.setLink(G[tt-3],G[tt-2],G[tt]);break;case 108:case 114:this.$=G[tt-5],Rt.setLink(G[tt-5],G[tt-4],G[tt]),Rt.setTooltip(G[tt-5],G[tt-2]);break;case 115:this.$=G[tt-4],Rt.addVertex(G[tt-2],void 0,void 0,G[tt]);break;case 116:case 118:this.$=G[tt-4],Rt.updateLink(G[tt-2],G[tt]);break;case 117:this.$=G[tt-4],Rt.updateLink([G[tt-2]],G[tt]);break;case 119:this.$=G[tt-8],Rt.updateLinkInterpolate([G[tt-6]],G[tt-2]),Rt.updateLink([G[tt-6]],G[tt]);break;case 120:this.$=G[tt-8],Rt.updateLinkInterpolate(G[tt-6],G[tt-2]),Rt.updateLink(G[tt-6],G[tt]);break;case 121:this.$=G[tt-6],Rt.updateLinkInterpolate([G[tt-4]],G[tt]);break;case 122:this.$=G[tt-6],Rt.updateLinkInterpolate(G[tt-4],G[tt]);break;case 123:case 125:this.$=[G[tt]];break;case 124:case 126:G[tt-2].push(G[tt]),this.$=G[tt-2];break;case 128:this.$=G[tt-1]+G[tt];break;case 150:this.$=G[tt];break;case 151:this.$=G[tt-1]+""+G[tt];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:u,23:d,32:24,33:25,34:26,35:27,36:28,37:29,38:f,43:31,44:p,46:g,48:_,50:35,51:45,52:k,54:46,66:w,67:S,86:A,87:O,88:P,89:W,90:q,91:z,95:H,105:N,106:M,109:C,111:v,112:D,116:47,118:m,119:Q,120:b,121:ct,122:Dt,123:vt,124:j,125:ot,126:rt,127:it},{8:64,10:[1,65],15:ut},t([10,15],[2,6]),t(s,[2,17]),t(s,[2,18]),t(s,[2,19]),{20:[1,68],21:[1,69],22:bt,27:67,30:70},t(K,[2,11]),t(K,[2,12]),t(K,[2,13]),t(K,[2,14]),t(K,[2,15]),t(K,[2,16]),{9:72,20:Ot,21:Y,23:U,49:73,78:77,81:[1,78],82:[1,79]},{9:80,20:Ot,21:Y,23:U},{9:81,20:Ot,21:Y,23:U},{9:82,20:Ot,21:Y,23:U},{9:83,20:Ot,21:Y,23:U},{9:84,20:Ot,21:Y,23:U},{9:86,20:Ot,21:Y,22:[1,85],23:U},t(K,[2,44]),{45:[1,87]},{47:[1,88]},t(K,[2,47]),t(X,[2,54],{30:89,22:bt}),{22:[1,90]},{22:[1,91]},{22:[1,92]},{22:[1,93]},{26:F,52:I,66:L,67:J,84:[1,97],91:T,97:96,98:[1,94],100:[1,95],105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:98,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(K,[2,158]),t(K,[2,159]),t(K,[2,160]),t(K,[2,161]),t(le,[2,55],{53:[1,116]}),t(Xt,[2,74],{116:129,40:[1,117],52:k,55:[1,118],57:[1,119],59:[1,120],61:[1,121],63:[1,122],65:[1,123],66:w,67:S,69:[1,124],71:[1,125],73:[1,126],74:[1,127],76:[1,128],91:z,95:H,105:N,106:M,109:C,111:v,112:D,122:Dt,123:vt,124:j,125:ot,126:rt,127:it}),t(jt,[2,150]),t(jt,[2,175]),t(jt,[2,176]),t(jt,[2,177]),t(jt,[2,178]),t(jt,[2,179]),t(jt,[2,180]),t(jt,[2,181]),t(jt,[2,182]),t(jt,[2,183]),t(jt,[2,184]),t(jt,[2,185]),t(jt,[2,186]),t(jt,[2,187]),t(jt,[2,188]),t(jt,[2,189]),t(jt,[2,190]),{9:130,20:Ot,21:Y,23:U},{11:131,14:[1,132]},t(Kt,[2,8]),t(s,[2,20]),t(s,[2,26]),t(s,[2,27]),{21:[1,133]},t(Gt,[2,34],{30:134,22:bt}),t(K,[2,35]),{50:135,51:45,52:k,54:46,66:w,67:S,91:z,95:H,105:N,106:M,109:C,111:v,112:D,116:47,122:Dt,123:vt,124:j,125:ot,126:rt,127:it},t(Ee,[2,48]),t(Ee,[2,49]),t(Ee,[2,50]),t(Ht,[2,78],{79:136,68:[1,138],80:[1,137]}),{22:Vt,24:Ft,26:xt,38:ft,39:139,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t([52,66,67,68,80,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,80]),t(K,[2,36]),t(K,[2,37]),t(K,[2,38]),t(K,[2,39]),t(K,[2,40]),{22:Vt,24:Ft,26:xt,38:ft,39:163,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(ii,a,{17:164}),t(K,[2,45]),t(K,[2,46]),t(X,[2,53],{52:Ur}),{26:F,52:I,66:L,67:J,91:T,97:166,102:[1,167],105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:98,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{95:[1,168],103:169,105:[1,170]},{26:F,52:I,66:L,67:J,91:T,95:[1,171],97:172,105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:98,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{26:F,52:I,66:L,67:J,91:T,97:173,105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:98,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Kt,[2,101],{22:[1,174],99:[1,175]}),t(Kt,[2,105],{22:[1,176]}),t(Kt,[2,109],{115:100,117:178,22:[1,177],26:F,52:I,66:L,67:J,91:T,105:ht,106:V,109:Yt,111:et,112:Mt,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st}),t(Kt,[2,111],{22:[1,179]}),t(De,[2,152]),t(De,[2,154]),t(De,[2,155]),t(De,[2,156]),t(De,[2,157]),t(ae,[2,162]),t(ae,[2,163]),t(ae,[2,164]),t(ae,[2,165]),t(ae,[2,166]),t(ae,[2,167]),t(ae,[2,168]),t(ae,[2,169]),t(ae,[2,170]),t(ae,[2,171]),t(ae,[2,172]),t(ae,[2,173]),t(ae,[2,174]),{52:k,54:180,66:w,67:S,91:z,95:H,105:N,106:M,109:C,111:v,112:D,116:47,122:Dt,123:vt,124:j,125:ot,126:rt,127:it},{22:Vt,24:Ft,26:xt,38:ft,39:181,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:182,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:184,42:Lt,52:I,57:[1,183],66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:185,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:186,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:187,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{66:[1,188]},{22:Vt,24:Ft,26:xt,38:ft,39:189,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:190,42:Lt,52:I,66:L,67:J,71:[1,191],73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:192,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:193,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:194,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(jt,[2,151]),t(Be,[2,3]),{8:195,15:ut},{15:[2,7]},t(s,[2,28]),t(Gt,[2,33]),t(X,[2,51],{30:196,22:bt}),t(Ht,[2,75],{22:[1,197]}),{22:[1,198]},{22:Vt,24:Ft,26:xt,38:ft,39:199,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,82:[1,200],83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(ae,[2,82]),t(ae,[2,84]),t(ae,[2,140]),t(ae,[2,141]),t(ae,[2,142]),t(ae,[2,143]),t(ae,[2,144]),t(ae,[2,145]),t(ae,[2,146]),t(ae,[2,147]),t(ae,[2,148]),t(ae,[2,149]),t(ae,[2,85]),t(ae,[2,86]),t(ae,[2,87]),t(ae,[2,88]),t(ae,[2,89]),t(ae,[2,90]),t(ae,[2,91]),t(ae,[2,92]),t(ae,[2,93]),t(ae,[2,94]),t(ae,[2,95]),{9:203,20:Ot,21:Y,22:Vt,23:U,24:Ft,26:xt,38:ft,40:[1,202],42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{18:18,19:19,20:o,21:l,22:u,23:d,32:24,33:25,34:26,35:27,36:28,37:29,38:f,42:[1,204],43:31,44:p,46:g,48:_,50:35,51:45,52:k,54:46,66:w,67:S,86:A,87:O,88:P,89:W,90:q,91:z,95:H,105:N,106:M,109:C,111:v,112:D,116:47,118:m,119:Q,120:b,121:ct,122:Dt,123:vt,124:j,125:ot,126:rt,127:it},{22:bt,30:205},{22:[1,206],26:F,52:I,66:L,67:J,91:T,105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:178,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:[1,207]},{22:[1,208]},{22:[1,209],106:[1,210]},t(Oe,[2,123]),{22:[1,211]},{22:[1,212],26:F,52:I,66:L,67:J,91:T,105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:178,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:[1,213],26:F,52:I,66:L,67:J,91:T,105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:178,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{84:[1,214]},t(Kt,[2,103],{22:[1,215]}),{84:[1,216],101:[1,217]},{84:[1,218]},t(De,[2,153]),{84:[1,219],101:[1,220]},t(le,[2,57],{116:129,52:k,66:w,67:S,91:z,95:H,105:N,106:M,109:C,111:v,112:D,122:Dt,123:vt,124:j,125:ot,126:rt,127:it}),{22:Vt,24:Ft,26:xt,38:ft,41:[1,221],42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,56:[1,222],66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:223,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,58:[1,224],66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,60:[1,225],66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,62:[1,226],66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,64:[1,227],66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{67:[1,228]},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,66:L,67:J,70:[1,229],73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,66:L,67:J,72:[1,230],73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:231,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,41:[1,232],42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,66:L,67:J,73:_t,75:[1,233],77:[1,234],81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,66:L,67:J,73:_t,75:[1,236],77:[1,235],81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{9:237,20:Ot,21:Y,23:U},t(X,[2,52],{52:Ur}),t(Ht,[2,77]),t(Ht,[2,76]),{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,66:L,67:J,68:[1,238],73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Ht,[2,79]),t(ae,[2,83]),{22:Vt,24:Ft,26:xt,38:ft,39:239,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(ii,a,{17:240}),t(K,[2,43]),{51:241,52:k,54:46,66:w,67:S,91:z,95:H,105:N,106:M,109:C,111:v,112:D,116:47,122:Dt,123:vt,124:j,125:ot,126:rt,127:it},{22:Fe,66:Pe,67:Ie,86:Ge,96:242,102:tr,105:zt,107:243,108:244,109:Z,110:St,111:Nt,112:fe,113:Me},{22:Fe,66:Pe,67:Ie,86:Ge,96:256,102:tr,105:zt,107:243,108:244,109:Z,110:St,111:Nt,112:fe,113:Me},{22:Fe,66:Pe,67:Ie,86:Ge,96:257,102:tr,104:[1,258],105:zt,107:243,108:244,109:Z,110:St,111:Nt,112:fe,113:Me},{22:Fe,66:Pe,67:Ie,86:Ge,96:259,102:tr,104:[1,260],105:zt,107:243,108:244,109:Z,110:St,111:Nt,112:fe,113:Me},{105:[1,261]},{22:Fe,66:Pe,67:Ie,86:Ge,96:262,102:tr,105:zt,107:243,108:244,109:Z,110:St,111:Nt,112:fe,113:Me},{22:Fe,66:Pe,67:Ie,86:Ge,96:263,102:tr,105:zt,107:243,108:244,109:Z,110:St,111:Nt,112:fe,113:Me},{26:F,52:I,66:L,67:J,91:T,97:264,105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:98,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Kt,[2,102]),{84:[1,265]},t(Kt,[2,106],{22:[1,266]}),t(Kt,[2,107]),t(Kt,[2,110]),t(Kt,[2,112],{22:[1,267]}),t(Kt,[2,113]),t(Xt,[2,58]),t(Xt,[2,59]),{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,58:[1,268],66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Xt,[2,66]),t(Xt,[2,61]),t(Xt,[2,62]),t(Xt,[2,63]),{66:[1,269]},t(Xt,[2,65]),t(Xt,[2,67]),{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,66:L,67:J,72:[1,270],73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Xt,[2,69]),t(Xt,[2,70]),t(Xt,[2,72]),t(Xt,[2,71]),t(Xt,[2,73]),t(Be,[2,4]),t([22,52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,81]),{22:Vt,24:Ft,26:xt,38:ft,41:[1,271],42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{18:18,19:19,20:o,21:l,22:u,23:d,32:24,33:25,34:26,35:27,36:28,37:29,38:f,42:[1,272],43:31,44:p,46:g,48:_,50:35,51:45,52:k,54:46,66:w,67:S,86:A,87:O,88:P,89:W,90:q,91:z,95:H,105:N,106:M,109:C,111:v,112:D,116:47,118:m,119:Q,120:b,121:ct,122:Dt,123:vt,124:j,125:ot,126:rt,127:it},t(le,[2,56]),t(Kt,[2,115],{106:Le}),t(We,[2,125],{108:274,22:Fe,66:Pe,67:Ie,86:Ge,102:tr,105:zt,109:Z,110:St,111:Nt,112:fe,113:Me}),t(xe,[2,127]),t(xe,[2,129]),t(xe,[2,130]),t(xe,[2,131]),t(xe,[2,132]),t(xe,[2,133]),t(xe,[2,134]),t(xe,[2,135]),t(xe,[2,136]),t(xe,[2,137]),t(xe,[2,138]),t(xe,[2,139]),t(Kt,[2,116],{106:Le}),t(Kt,[2,117],{106:Le}),{22:[1,275]},t(Kt,[2,118],{106:Le}),{22:[1,276]},t(Oe,[2,124]),t(Kt,[2,98],{106:Le}),t(Kt,[2,99],{106:Le}),t(Kt,[2,100],{115:100,117:178,26:F,52:I,66:L,67:J,91:T,105:ht,106:V,109:Yt,111:et,112:Mt,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st}),t(Kt,[2,104]),{101:[1,277]},{101:[1,278]},{58:[1,279]},{68:[1,280]},{72:[1,281]},{9:282,20:Ot,21:Y,23:U},t(K,[2,42]),{22:Fe,66:Pe,67:Ie,86:Ge,102:tr,105:zt,107:283,108:244,109:Z,110:St,111:Nt,112:fe,113:Me},t(xe,[2,128]),{26:F,52:I,66:L,67:J,91:T,97:284,105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:98,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{26:F,52:I,66:L,67:J,91:T,97:285,105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:98,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Kt,[2,108]),t(Kt,[2,114]),t(Xt,[2,60]),{22:Vt,24:Ft,26:xt,38:ft,39:286,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Xt,[2,68]),t(ii,a,{17:287}),t(We,[2,126],{108:274,22:Fe,66:Pe,67:Ie,86:Ge,102:tr,105:zt,109:Z,110:St,111:Nt,112:fe,113:Me}),t(Kt,[2,121],{115:100,117:178,22:[1,288],26:F,52:I,66:L,67:J,91:T,105:ht,106:V,109:Yt,111:et,112:Mt,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st}),t(Kt,[2,122],{115:100,117:178,22:[1,289],26:F,52:I,66:L,67:J,91:T,105:ht,106:V,109:Yt,111:et,112:Mt,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st}),{22:Vt,24:Ft,26:xt,38:ft,41:[1,290],42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{18:18,19:19,20:o,21:l,22:u,23:d,32:24,33:25,34:26,35:27,36:28,37:29,38:f,42:[1,291],43:31,44:p,46:g,48:_,50:35,51:45,52:k,54:46,66:w,67:S,86:A,87:O,88:P,89:W,90:q,91:z,95:H,105:N,106:M,109:C,111:v,112:D,116:47,118:m,119:Q,120:b,121:ct,122:Dt,123:vt,124:j,125:ot,126:rt,127:it},{22:Fe,66:Pe,67:Ie,86:Ge,96:292,102:tr,105:zt,107:243,108:244,109:Z,110:St,111:Nt,112:fe,113:Me},{22:Fe,66:Pe,67:Ie,86:Ge,96:293,102:tr,105:zt,107:243,108:244,109:Z,110:St,111:Nt,112:fe,113:Me},t(Xt,[2,64]),t(K,[2,41]),t(Kt,[2,119],{106:Le}),t(Kt,[2,120],{106:Le})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],132:[2,7]},parseError:function(qt,te){if(te.recoverable)this.trace(qt);else{var oe=new Error(qt);throw oe.hash=te,oe}},parse:function(qt){var te=this,oe=[0],Rt=[],Ye=[null],G=[],Xn=this.table,tt="",_r=0,el=0,Iu=2,rl=1,il=G.slice.call(arguments,1),er=Object.create(this.lexer),Li={yy:{}};for(var Di in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Di)&&(Li.yy[Di]=this.yy[Di]);er.setInput(qt,Li.yy),Li.yy.lexer=er,Li.yy.parser=this,typeof er.yylloc>"u"&&(er.yylloc={});var Kn=er.yylloc;G.push(Kn);var Ma=er.options&&er.options.ranges;typeof Li.yy.parseError=="function"?this.parseError=Li.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function nl(){var Wr;return Wr=Rt.pop()||er.lex()||rl,typeof Wr!="number"&&(Wr instanceof Array&&(Rt=Wr,Wr=Rt.pop()),Wr=te.symbols_[Wr]||Wr),Wr}for(var mr,Se,Cr,qi,ni={},ji,zr,Na,Bs;;){if(Se=oe[oe.length-1],this.defaultActions[Se]?Cr=this.defaultActions[Se]:((mr===null||typeof mr>"u")&&(mr=nl()),Cr=Xn[Se]&&Xn[Se][mr]),typeof Cr>"u"||!Cr.length||!Cr[0]){var Zn="";Bs=[];for(ji in Xn[Se])this.terminals_[ji]&&ji>Iu&&Bs.push("'"+this.terminals_[ji]+"'");er.showPosition?Zn="Parse error on line "+(_r+1)+`:
|
|
1223
|
-
`+er.showPosition()+`
|
|
1224
|
-
Expecting `+Bs.join(", ")+", got '"+(this.terminals_[mr]||mr)+"'":Zn="Parse error on line "+(_r+1)+": Unexpected "+(mr==rl?"end of input":"'"+(this.terminals_[mr]||mr)+"'"),this.parseError(Zn,{text:er.match,token:this.terminals_[mr]||mr,line:er.yylineno,loc:Kn,expected:Bs})}if(Cr[0]instanceof Array&&Cr.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Se+", token: "+mr);switch(Cr[0]){case 1:oe.push(mr),Ye.push(er.yytext),G.push(er.yylloc),oe.push(Cr[1]),mr=null,el=er.yyleng,tt=er.yytext,_r=er.yylineno,Kn=er.yylloc;break;case 2:if(zr=this.productions_[Cr[1]][1],ni.$=Ye[Ye.length-zr],ni._$={first_line:G[G.length-(zr||1)].first_line,last_line:G[G.length-1].last_line,first_column:G[G.length-(zr||1)].first_column,last_column:G[G.length-1].last_column},Ma&&(ni._$.range=[G[G.length-(zr||1)].range[0],G[G.length-1].range[1]]),qi=this.performAction.apply(ni,[tt,el,_r,Li.yy,Cr[1],Ye,G].concat(il)),typeof qi<"u")return qi;zr&&(oe=oe.slice(0,-1*zr*2),Ye=Ye.slice(0,-1*zr),G=G.slice(0,-1*zr)),oe.push(this.productions_[Cr[1]][0]),Ye.push(ni.$),G.push(ni._$),Na=Xn[oe[oe.length-2]][oe[oe.length-1]],oe.push(Na);break;case 3:return!0}}return!0}},Ln=function(){var Ir={EOF:1,parseError:function(te,oe){if(this.yy.parser)this.yy.parser.parseError(te,oe);else throw new Error(te)},setInput:function(qt,te){return this.yy=te||this.yy||{},this._input=qt,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 qt=this._input[0];this.yytext+=qt,this.yyleng++,this.offset++,this.match+=qt,this.matched+=qt;var te=qt.match(/(?:\r\n?|\n).*/g);return te?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),qt},unput:function(qt){var te=qt.length,oe=qt.split(/(?:\r\n?|\n)/g);this._input=qt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-te),this.offset-=te;var Rt=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 Ye=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===Rt.length?this.yylloc.first_column:0)+Rt[Rt.length-oe.length].length-oe[0].length:this.yylloc.first_column-te},this.options.ranges&&(this.yylloc.range=[Ye[0],Ye[0]+this.yyleng-te]),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).
|
|
1225
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(qt){this.unput(this.match.slice(qt))},pastInput:function(){var qt=this.matched.substr(0,this.matched.length-this.match.length);return(qt.length>20?"...":"")+qt.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var qt=this.match;return qt.length<20&&(qt+=this._input.substr(0,20-qt.length)),(qt.substr(0,20)+(qt.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var qt=this.pastInput(),te=new Array(qt.length+1).join("-");return qt+this.upcomingInput()+`
|
|
1226
|
-
`+te+"^"},test_match:function(qt,te){var oe,Rt,Ye;if(this.options.backtrack_lexer&&(Ye={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&&(Ye.yylloc.range=this.yylloc.range.slice(0))),Rt=qt[0].match(/(?:\r\n?|\n).*/g),Rt&&(this.yylineno+=Rt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Rt?Rt[Rt.length-1].length-Rt[Rt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+qt[0].length},this.yytext+=qt[0],this.match+=qt[0],this.matches=qt,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(qt[0].length),this.matched+=qt[0],oe=this.performAction.call(this,this.yy,this,te,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),oe)return oe;if(this._backtrack){for(var G in Ye)this[G]=Ye[G];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var qt,te,oe,Rt;this._more||(this.yytext="",this.match="");for(var Ye=this._currentRules(),G=0;G<Ye.length;G++)if(oe=this._input.match(this.rules[Ye[G]]),oe&&(!te||oe[0].length>te[0].length)){if(te=oe,Rt=G,this.options.backtrack_lexer){if(qt=this.test_match(oe,Ye[G]),qt!==!1)return qt;if(this._backtrack){te=!1;continue}else return!1}else if(!this.options.flex)break}return te?(qt=this.test_match(te,Ye[Rt]),qt!==!1?qt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1227
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var te=this.next();return te||this.lex()},begin:function(te){this.conditionStack.push(te)},popState:function(){var te=this.conditionStack.length-1;return te>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(te){return te=this.conditionStack.length-1-Math.abs(te||0),te>=0?this.conditionStack[te]:"INITIAL"},pushState:function(te){this.begin(te)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(te,oe,Rt,Ye){switch(Rt){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 te.lex.firstGraph()&&this.begin("dir"),24;case 36:return te.lex.firstGraph()&&this.begin("dir"),24;case 37:return 38;case 38:return 42;case 39:return 101;case 40:return 101;case 41:return 101;case 42:return 101;case 43:return this.popState(),25;case 44:return this.popState(),26;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 118;case 55:return 119;case 56:return 120;case 57:return 121;case 58:return 105;case 59:return 111;case 60:return 53;case 61:return 67;case 62:return 52;case 63:return 20;case 64:return 106;case 65:return 126;case 66:return 82;case 67:return 82;case 68:return 82;case 69:return 81;case 70:return 81;case 71:return 81;case 72:return 59;case 73:return 60;case 74:return 61;case 75:return 62;case 76:return 63;case 77:return 64;case 78:return 65;case 79:return 69;case 80:return 70;case 81:return 55;case 82:return 56;case 83:return 109;case 84:return 112;case 85:return 127;case 86:return 124;case 87:return 113;case 88:return 125;case 89:return 125;case 90:return 114;case 91:return 73;case 92:return 92;case 93:return"SEP";case 94:return 91;case 95:return 66;case 96:return 75;case 97:return 74;case 98:return 77;case 99:return 76;case 100:return 122;case 101:return 123;case 102:return 68;case 103:return 57;case 104:return 58;case 105:return 40;case 106:return 41;case 107:return 71;case 108:return 72;case 109:return 133;case 110:return 21;case 111:return 22;case 112: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]*)/,/^(?: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:[43,44,45,46,47,48,49,50,51,52,53],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,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,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],inclusive:!0}}};return Ir}();Ne.lexer=Ln;function Dn(){this.yy={}}return Dn.prototype=Ne,Ne.Parser=Dn,new Dn}();x1.parser=x1;const H2=x1,sR=(t,e)=>{var r;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:t.match(/^\s*graph/)!==null},aR=(t,e)=>{var r;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"&&t.match(/^\s*graph/)!==null?!0:t.match(/^\s*flowchart/)!==null},oR="flowchart-";let G2=0,W0=$(),Ue={},ks=[],$s={},vn=[],Yc={},H0={},Wl=0,v1=!0,Bi,Tu,Eu=[];const Cu=t=>he.sanitizeText(t,W0),lR=function(t,e,r){ze.parseDirective(this,t,e,r)},Su=function(t){const e=Object.keys(Ue);for(const r of e)if(Ue[r].id===t)return Ue[r].domId;return t},cR=function(t,e,r,i,n,s,a={}){let o,l=t;l!==void 0&&l.trim().length!==0&&(Ue[l]===void 0&&(Ue[l]={id:l,domId:oR+l+"-"+G2,styles:[],classes:[]}),G2++,e!==void 0?(W0=$(),o=Cu(e.trim()),o[0]==='"'&&o[o.length-1]==='"'&&(o=o.substring(1,o.length-1)),Ue[l].text=o):Ue[l].text===void 0&&(Ue[l].text=t),r!==void 0&&(Ue[l].type=r),i!=null&&i.forEach(function(u){Ue[l].styles.push(u)}),n!=null&&n.forEach(function(u){Ue[l].classes.push(u)}),s!==void 0&&(Ue[l].dir=s),Ue[l].props===void 0?Ue[l].props=a:a!==void 0&&Object.assign(Ue[l].props,a))},uR=function(t,e,r,i){const a={start:t,end:e,type:void 0,text:""};i=r.text,i!==void 0&&(a.text=Cu(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),ks.push(a)},hR=function(t,e,r,i){let n,s;for(n=0;n<t.length;n++)for(s=0;s<e.length;s++)uR(t[n],e[s],r,i)},dR=function(t,e){t.forEach(function(r){r==="default"?ks.defaultInterpolate=e:ks[r].interpolate=e})},fR=function(t,e){t.forEach(function(r){r==="default"?ks.defaultStyle=e:(ye.isSubstringInArray("fill",e)===-1&&e.push("fill:none"),ks[r].style=e)})},pR=function(t,e){$s[t]===void 0&&($s[t]={id:t,styles:[],textStyles:[]}),e!=null&&e.forEach(function(r){if(r.match("color")){const n=r.replace("fill","bgFill").replace("color","fill");$s[t].textStyles.push(n)}$s[t].styles.push(r)})},gR=function(t){Bi=t,Bi.match(/.*</)&&(Bi="RL"),Bi.match(/.*\^/)&&(Bi="BT"),Bi.match(/.*>/)&&(Bi="LR"),Bi.match(/.*v/)&&(Bi="TB")},G0=function(t,e){t.split(",").forEach(function(r){let i=r;Ue[i]!==void 0&&Ue[i].classes.push(e),Yc[i]!==void 0&&Yc[i].classes.push(e)})},yR=function(t,e){t.split(",").forEach(function(r){e!==void 0&&(H0[Tu==="gen-1"?Su(r):r]=Cu(e))})},mR=function(t,e,r){let i=Su(t);if($().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),Ue[t]!==void 0&&(Ue[t].haveCallback=!0,Eu.push(function(){const s=document.querySelector(`[id="${i}"]`);s!==null&&s.addEventListener("click",function(){ye.runFunc(e,...n)},!1)}))},bR=function(t,e,r){t.split(",").forEach(function(i){Ue[i]!==void 0&&(Ue[i].link=ye.formatUrl(e,W0),Ue[i].linkTarget=r)}),G0(t,"clickable")},_R=function(t){return H0[t]},xR=function(t,e,r){t.split(",").forEach(function(i){mR(i,e,r)}),G0(t,"clickable")},vR=function(t){Eu.forEach(function(e){e(t)})},kR=function(){return Bi.trim()},wR=function(){return Ue},TR=function(){return ks},ER=function(){return $s},Xm=function(t){let e=At(".mermaidTooltip");(e._groups||e)[0][0]===null&&(e=At("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),At(t).select("svg").selectAll("g.node").on("mouseover",function(){const n=At(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(/<br\/>/g,"<br/>")),n.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),At(this).classed("hover",!1)})};Eu.push(Xm);const CR=function(t="gen-1"){Ue={},$s={},ks=[],Eu=[Xm],vn=[],Yc={},Wl=0,H0=[],v1=!0,Tu=t,Ei()},SR=t=>{Tu=t||"gen-1"},AR=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},LR=function(t,e,r){let i=t.trim(),n=r;t===r&&r.match(/\s/)&&(i=void 0);function s(d){const f={boolean:{},number:{},string:{}},p=[];let g;return{nodeList:d.filter(function(k){const w=typeof k;return k.stmt&&k.stmt==="dir"?(g=k.value,!1):k.trim()===""?!1:w in f?f[w].hasOwnProperty(k)?!1:f[w][k]=!0:p.includes(k)?!1:p.push(k)}),dir:g}}let a=[];const{nodeList:o,dir:l}=s(a.concat.apply(a,e));if(a=o,Tu==="gen-1")for(let d=0;d<a.length;d++)a[d]=Su(a[d]);i=i||"subGraph"+Wl,n=n||"",n=Cu(n),Wl=Wl+1;const u={id:i,nodes:a,title:n.trim(),classes:[],dir:l};return B.info("Adding",u.id,u.nodes,u.dir),u.nodes=Jm(u,vn).nodes,vn.push(u),Yc[i]=u,i},DR=function(t){for(const[e,r]of vn.entries())if(r.id===t)return e;return-1};let Ka=-1;const Km=[],Zm=function(t,e){const r=vn[e].nodes;if(Ka=Ka+1,Ka>2e3)return;if(Km[Ka]=e,vn[e].id===t)return{result:!0,count:0};let i=0,n=1;for(;i<r.length;){const s=DR(r[i]);if(s>=0){const a=Zm(t,s);if(a.result)return{result:!0,count:n+a.count};n=n+a.count}i=i+1}return{result:!1,count:n}},MR=function(t){return Km[t]},NR=function(){Ka=-1,vn.length>0&&Zm("none",vn.length-1)},BR=function(){return vn},IR=()=>v1?(v1=!1,!0):!1,OR=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}},RR=(t,e)=>{const r=e.length;let i=0;for(let n=0;n<r;++n)e[n]===t&&++i;return i},FR=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=RR(".",r);return a&&(n="dotted",s=a),{type:i,stroke:n,length:s}},PR=(t,e)=>{const r=FR(t);let i;if(e){if(i=OR(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},Qm=(t,e)=>{let r=!1;return t.forEach(i=>{i.nodes.indexOf(e)>=0&&(r=!0)}),r},Jm=(t,e)=>{const r=[];return t.nodes.forEach((i,n)=>{Qm(e,i)||r.push(t.nodes[n])}),{nodes:r}},sn={parseDirective:lR,defaultConfig:()=>ga.flowchart,setAccTitle:ri,getAccTitle:Ci,getAccDescription:Ai,setAccDescription:Si,addVertex:cR,lookUpDomId:Su,addLink:hR,updateLinkInterpolate:dR,updateLink:fR,addClass:pR,setDirection:gR,setClass:G0,setTooltip:yR,getTooltip:_R,setClickEvent:xR,setLink:bR,bindFunctions:vR,getDirection:kR,getVertices:wR,getEdges:TR,getClasses:ER,clear:CR,setGen:SR,defaultStyle:AR,addSubGraph:LR,getDepthFirstPos:MR,indexNodes:NR,getSubGraphs:BR,destructLink:PR,lex:{firstGraph:IR},exists:Qm,makeUniq:Jm,setDiagramTitle:En,getDiagramTitle:Cn};function t3(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=An(t,s,s,a);return r.intersect=function(l){return Gi(r,a,l)},o}function e3(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=An(t,a,n,o);return r.intersect=function(u){return Gi(r,o,u)},l}function r3(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=An(t,i,n,s);return r.intersect=function(o){return Gi(r,s,o)},a}function i3(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=An(t,i,n,s);return r.intersect=function(o){return Gi(r,s,o)},a}function n3(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=An(t,i,n,s);return r.intersect=function(o){return Gi(r,s,o)},a}function s3(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=An(t,i,n,s);return r.intersect=function(o){return Gi(r,s,o)},a}function a3(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=An(t,i,n,s);return r.intersect=function(o){return Gi(r,s,o)},a}function o3(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=An(t,i,n,s);return r.intersect=function(o){return Gi(r,s,o)},a}function l3(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 v0(r,a)},s}function c3(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=An(t,i,n,s);return r.intersect=function(o){return Gi(r,s,o)},a}function u3(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(u){const d=v0(r,u),f=d.x-r.x;if(n!=0&&(Math.abs(f)<r.width/2||Math.abs(f)==r.width/2&&Math.abs(d.y-r.y)>r.height/2-s)){let p=s*s*(1-f*f/(n*n));p!=0&&(p=Math.sqrt(p)),p=s-p,u.y-r.y>0&&(p=-p),d.y+=p}return d},l}function YR(t){t.shapes().question=t3,t.shapes().hexagon=e3,t.shapes().stadium=l3,t.shapes().subroutine=c3,t.shapes().cylinder=u3,t.shapes().rect_left_inv_arrow=r3,t.shapes().lean_right=i3,t.shapes().lean_left=n3,t.shapes().trapezoid=s3,t.shapes().inv_trapezoid=a3,t.shapes().rect_right_inv_arrow=o3}function VR(t){t({question:t3}),t({hexagon:e3}),t({stadium:l3}),t({subroutine:c3}),t({cylinder:u3}),t({rect_left_inv_arrow:r3}),t({lean_right:i3}),t({lean_left:n3}),t({trapezoid:s3}),t({inv_trapezoid:a3}),t({rect_right_inv_arrow:o3})}function An(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 UR={addToRender:YR,addToRenderV2:VR},h3={},zR=function(t){const e=Object.keys(t);for(const r of e)h3[r]=t[r]},d3=function(t,e,r,i,n,s){const a=i?i.select(`[id="${r}"]`):At(`[id="${r}"]`),o=n||document;Object.keys(t).forEach(function(u){const d=t[u];let f="default";d.classes.length>0&&(f=d.classes.join(" "));const p=Gn(d.styles);let g=d.text!==void 0?d.text:d.id,_;if(gr($().flowchart.htmlLabels)){const S={label:g.replace(/fa[blrs]?:fa-[\w-]+/g,A=>`<i class='${A.replace(":"," ")}'></i>`)};_=_0(a,S).node(),_.parentNode.removeChild(_)}else{const S=o.createElementNS("http://www.w3.org/2000/svg","text");S.setAttribute("style",p.labelStyle.replace("color:","fill:"));const A=g.split(he.lineBreakRegex);for(const O of A){const P=o.createElementNS("http://www.w3.org/2000/svg","tspan");P.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),P.setAttribute("dy","1em"),P.setAttribute("x","1"),P.textContent=O,S.appendChild(P)}_=S}let k=0,w="";switch(d.type){case"round":k=5,w="rect";break;case"square":w="rect";break;case"diamond":w="question";break;case"hexagon":w="hexagon";break;case"odd":w="rect_left_inv_arrow";break;case"lean_right":w="lean_right";break;case"lean_left":w="lean_left";break;case"trapezoid":w="trapezoid";break;case"inv_trapezoid":w="inv_trapezoid";break;case"odd_right":w="rect_left_inv_arrow";break;case"circle":w="circle";break;case"ellipse":w="ellipse";break;case"stadium":w="stadium";break;case"subroutine":w="subroutine";break;case"cylinder":w="cylinder";break;case"group":w="rect";break;default:w="rect"}B.warn("Adding node",d.id,d.domId),e.setNode(s.db.lookUpDomId(d.id),{labelType:"svg",labelStyle:p.labelStyle,shape:w,label:_,rx:k,ry:k,class:f,style:p.style,id:s.db.lookUpDomId(d.id)})})},f3=function(t,e,r){let i=0,n,s;if(t.defaultStyle!==void 0){const a=Gn(t.defaultStyle);n=a.style,s=a.labelStyle}t.forEach(function(a){i++;var o="L-"+a.start+"-"+a.end,l="LS-"+a.start,u="LE-"+a.end;const d={};a.type==="arrow_open"?d.arrowhead="none":d.arrowhead="normal";let f="",p="";if(a.style!==void 0){const g=Gn(a.style);f=g.style,p=g.labelStyle}else switch(a.stroke){case"normal":f="fill:none",n!==void 0&&(f=n),s!==void 0&&(p=s);break;case"dotted":f="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":f=" stroke-width: 3.5px;fill:none";break}d.style=f,d.labelStyle=p,a.interpolate!==void 0?d.curve=gi(a.interpolate,jr):t.defaultInterpolate!==void 0?d.curve=gi(t.defaultInterpolate,jr):d.curve=gi(h3.curve,jr),a.text===void 0?a.style!==void 0&&(d.arrowheadStyle="fill: #333"):(d.arrowheadStyle="fill: #333",d.labelpos="c",gr($().flowchart.htmlLabels)?(d.labelType="html",d.label=`<span id="L-${o}" class="edgeLabel L-${l}' L-${u}" style="${d.labelStyle}">${a.text.replace(/fa[blrs]?:fa-[\w-]+/g,g=>`<i class='${g.replace(":"," ")}'></i>`)}</span>`):(d.labelType="text",d.label=a.text.replace(he.lineBreakRegex,`
|
|
1228
|
-
`),a.style===void 0&&(d.style=d.style||"stroke: #333; stroke-width: 1.5px;fill:none"),d.labelStyle=d.labelStyle.replace("color:","fill:"))),d.id=o,d.class=l+" "+u,d.minlen=a.length||1,e.setEdge(r.db.lookUpDomId(a.start),r.db.lookUpDomId(a.end),d,i)})},WR=function(t,e){B.info("Extracting classes"),e.db.clear();try{return e.parse(t),e.db.getClasses()}catch(r){return B.error(r),{}}},HR=function(t,e,r,i){B.info("Drawing flowchart"),i.db.clear();const{securityLevel:n,flowchart:s}=$();let a;n==="sandbox"&&(a=At("#i"+e));const o=At(n==="sandbox"?a.nodes()[0].contentDocument.body:"body"),l=n==="sandbox"?a.nodes()[0].contentDocument:document;try{i.parser.parse(t)}catch{B.debug("Parsing failed")}let u=i.db.getDirection();u===void 0&&(u="TD");const d=s.nodeSpacing||50,f=s.rankSpacing||50,p=new or({multigraph:!0,compound:!0}).setGraph({rankdir:u,nodesep:d,ranksep:f,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});let g;const _=i.db.getSubGraphs();for(let q=_.length-1;q>=0;q--)g=_[q],i.db.addVertex(g.id,g.title,"group",void 0,g.classes);const k=i.db.getVertices();B.warn("Get vertices",k);const w=i.db.getEdges();let S=0;for(S=_.length-1;S>=0;S--){g=_[S],X1("cluster").append("text");for(let q=0;q<g.nodes.length;q++)B.warn("Setting subgraph",g.nodes[q],i.db.lookUpDomId(g.nodes[q]),i.db.lookUpDomId(g.id)),p.setParent(i.db.lookUpDomId(g.nodes[q]),i.db.lookUpDomId(g.id))}d3(k,p,e,o,l,i),f3(w,p,i);const A=new QA;UR.addToRender(A),A.arrows().none=function(z,H,N,M){const v=z.append("marker").attr("id",H).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");Hi(v,N[M+"Style"])},A.arrows().normal=function(z,H){z.append("marker").attr("id",H).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 O=o.select(`[id="${e}"]`),P=o.select("#"+e+" g");for(A(P,p),P.selectAll("g.node").attr("title",function(){return i.db.getTooltip(this.id)}),i.db.indexNodes("subGraph"+S),S=0;S<_.length;S++)if(g=_[S],g.title!=="undefined"){const q=l.querySelectorAll("#"+e+' [id="'+i.db.lookUpDomId(g.id)+'"] rect'),z=l.querySelectorAll("#"+e+' [id="'+i.db.lookUpDomId(g.id)+'"]'),H=q[0].x.baseVal.value,N=q[0].y.baseVal.value,M=q[0].width.baseVal.value,v=At(z[0]).select(".label");v.attr("transform",`translate(${H+M/2}, ${N+14})`),v.attr("id",e+"Text");for(let D=0;D<g.classes.length;D++)z[0].classList.add(g.classes[D])}if(!s.htmlLabels){const q=l.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const z of q){const H=z.getBBox(),N=l.createElementNS("http://www.w3.org/2000/svg","rect");N.setAttribute("rx",0),N.setAttribute("ry",0),N.setAttribute("width",H.width),N.setAttribute("height",H.height),z.insertBefore(N,z.firstChild)}}ku(p,O,s.diagramPadding,s.useMaxWidth),Object.keys(k).forEach(function(q){const z=k[q];if(z.link){const H=o.select("#"+e+' [id="'+i.db.lookUpDomId(q)+'"]');if(H){const N=l.createElementNS("http://www.w3.org/2000/svg","a");N.setAttributeNS("http://www.w3.org/2000/svg","class",z.classes.join(" ")),N.setAttributeNS("http://www.w3.org/2000/svg","href",z.link),N.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),n==="sandbox"?N.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):z.linkTarget&&N.setAttributeNS("http://www.w3.org/2000/svg","target",z.linkTarget);const M=H.insert(function(){return N},":first-child"),C=H.select(".label-container");C&&M.append(function(){return C.node()});const v=H.select(".label");v&&M.append(function(){return v.node()})}}})},GR={setConf:zR,addVertices:d3,addEdges:f3,getClasses:WR,draw:HR},p3={},qR=function(t){const e=Object.keys(t);for(const r of e)p3[r]=t[r]},g3=function(t,e,r,i,n,s){const a=i.select(`[id="${r}"]`);Object.keys(t).forEach(function(l){const u=t[l];let d="default";u.classes.length>0&&(d=u.classes.join(" "));const f=Gn(u.styles);let p=u.text!==void 0?u.text:u.id,g;if(gr($().flowchart.htmlLabels)){const w={label:p.replace(/fa[blrs]?:fa-[\w-]+/g,S=>`<i class='${S.replace(":"," ")}'></i>`)};g=_0(a,w).node(),g.parentNode.removeChild(g)}else{const w=n.createElementNS("http://www.w3.org/2000/svg","text");w.setAttribute("style",f.labelStyle.replace("color:","fill:"));const S=p.split(he.lineBreakRegex);for(const A of S){const O=n.createElementNS("http://www.w3.org/2000/svg","tspan");O.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),O.setAttribute("dy","1em"),O.setAttribute("x","1"),O.textContent=A,w.appendChild(O)}g=w}let _=0,k="";switch(u.type){case"round":_=5,k="rect";break;case"square":k="rect";break;case"diamond":k="question";break;case"hexagon":k="hexagon";break;case"odd":k="rect_left_inv_arrow";break;case"lean_right":k="lean_right";break;case"lean_left":k="lean_left";break;case"trapezoid":k="trapezoid";break;case"inv_trapezoid":k="inv_trapezoid";break;case"odd_right":k="rect_left_inv_arrow";break;case"circle":k="circle";break;case"ellipse":k="ellipse";break;case"stadium":k="stadium";break;case"subroutine":k="subroutine";break;case"cylinder":k="cylinder";break;case"group":k="rect";break;case"doublecircle":k="doublecircle";break;default:k="rect"}e.setNode(u.id,{labelStyle:f.labelStyle,shape:k,labelText:p,rx:_,ry:_,class:d,style:f.style,id:u.id,link:u.link,linkTarget:u.linkTarget,tooltip:s.db.getTooltip(u.id)||"",domId:s.db.lookUpDomId(u.id),haveCallback:u.haveCallback,width:u.type==="group"?500:void 0,dir:u.dir,type:u.type,props:u.props,padding:$().flowchart.padding}),B.info("setNode",{labelStyle:f.labelStyle,shape:k,labelText:p,rx:_,ry:_,class:d,style:f.style,id:u.id,domId:s.db.lookUpDomId(u.id),width:u.type==="group"?500:void 0,type:u.type,dir:u.dir,props:u.props,padding:$().flowchart.padding})})},y3=function(t,e,r){B.info("abc78 edges = ",t);let i=0,n={},s,a;if(t.defaultStyle!==void 0){const o=Gn(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,B.info("abc78 new entry",l,n[l])):(n[l]++,B.info("abc78 new entry",l,n[l]));let u=l+"-"+n[l];B.info("abc78 new link id to be used is",l,u,n[l]);var d="LS-"+o.start,f="LE-"+o.end;const p={style:"",labelStyle:""};switch(p.minlen=o.length||1,o.type==="arrow_open"?p.arrowhead="none":p.arrowhead="normal",p.arrowTypeStart="arrow_open",p.arrowTypeEnd="arrow_open",o.type){case"double_arrow_cross":p.arrowTypeStart="arrow_cross";case"arrow_cross":p.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":p.arrowTypeStart="arrow_point";case"arrow_point":p.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":p.arrowTypeStart="arrow_circle";case"arrow_circle":p.arrowTypeEnd="arrow_circle";break}let g="",_="";switch(o.stroke){case"normal":g="fill:none;",s!==void 0&&(g=s),a!==void 0&&(_=a),p.thickness="normal",p.pattern="solid";break;case"dotted":p.thickness="normal",p.pattern="dotted",p.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":p.thickness="thick",p.pattern="solid",p.style="stroke-width: 3.5px;fill:none;";break}if(o.style!==void 0){const k=Gn(o.style);g=k.style,_=k.labelStyle}p.style=p.style+=g,p.labelStyle=p.labelStyle+=_,o.interpolate!==void 0?p.curve=gi(o.interpolate,jr):t.defaultInterpolate!==void 0?p.curve=gi(t.defaultInterpolate,jr):p.curve=gi(p3.curve,jr),o.text===void 0?o.style!==void 0&&(p.arrowheadStyle="fill: #333"):(p.arrowheadStyle="fill: #333",p.labelpos="c"),p.labelType="text",p.label=o.text.replace(he.lineBreakRegex,`
|
|
1229
|
-
`),o.style===void 0&&(p.style=p.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),p.labelStyle=p.labelStyle.replace("color:","fill:"),p.id=u,p.classes="flowchart-link "+d+" "+f,e.setEdge(o.start,o.end,p,i)})},jR=function(t,e){B.info("Extracting classes"),e.db.clear();try{return e.parse(t),e.db.getClasses()}catch{return}},$R=function(t,e,r,i){B.info("Drawing flowchart"),i.db.clear(),sn.setGen("gen-2"),i.parser.parse(t);let n=i.db.getDirection();n===void 0&&(n="TD");const{securityLevel:s,flowchart:a}=$(),o=a.nodeSpacing||50,l=a.rankSpacing||50;let u;s==="sandbox"&&(u=At("#i"+e));const d=At(s==="sandbox"?u.nodes()[0].contentDocument.body:"body"),f=s==="sandbox"?u.nodes()[0].contentDocument:document,p=new or({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:o,ranksep:l,marginx:0,marginy:0}).setDefaultEdgeLabel(function(){return{}});let g;const _=i.db.getSubGraphs();B.info("Subgraphs - ",_);for(let W=_.length-1;W>=0;W--)g=_[W],B.info("Subgraph - ",g),i.db.addVertex(g.id,g.title,"group",void 0,g.classes,g.dir);const k=i.db.getVertices(),w=i.db.getEdges();B.info(w);let S=0;for(S=_.length-1;S>=0;S--){g=_[S],X1("cluster").append("text");for(let W=0;W<g.nodes.length;W++)B.info("Setting up subgraphs",g.nodes[W],g.id),p.setParent(g.nodes[W],g.id)}g3(k,p,e,d,f,i),y3(w,p);const A=d.select(`[id="${e}"]`),O=d.select("#"+e+" g");if(U0(O,p,["point","circle","cross"],"flowchart",e),ye.insertTitle(A,"flowchartTitleText",a.titleTopMargin,i.db.getDiagramTitle()),ku(p,A,a.diagramPadding,a.useMaxWidth),i.db.indexNodes("subGraph"+S),!a.htmlLabels){const W=f.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const q of W){const z=q.getBBox(),H=f.createElementNS("http://www.w3.org/2000/svg","rect");H.setAttribute("rx",0),H.setAttribute("ry",0),H.setAttribute("width",z.width),H.setAttribute("height",z.height),q.insertBefore(H,q.firstChild)}}Object.keys(k).forEach(function(W){const q=k[W];if(q.link){const z=At("#"+e+' [id="'+W+'"]');if(z){const H=f.createElementNS("http://www.w3.org/2000/svg","a");H.setAttributeNS("http://www.w3.org/2000/svg","class",q.classes.join(" ")),H.setAttributeNS("http://www.w3.org/2000/svg","href",q.link),H.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),s==="sandbox"?H.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):q.linkTarget&&H.setAttributeNS("http://www.w3.org/2000/svg","target",q.linkTarget);const N=z.insert(function(){return H},":first-child"),M=z.select(".label-container");M&&N.append(function(){return M.node()});const C=z.select(".label");C&&N.append(function(){return C.node()})}}})},wh={setConf:qR,addVertices:g3,addEdges:y3,getClasses:jR,draw:$R};var k1=function(){var t=function(H,N,M,C){for(M=M||{},C=H.length;C--;M[H[C]]=N);return M},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],u=[1,20],d=[1,21],f=[1,22],p=[1,23],g=[1,24],_=[1,25],k=[1,26],w=[1,27],S=[1,29],A=[1,31],O=[1,34],P=[5,7,9,11,12,13,14,15,16,17,18,19,20,21,23,25,26,28,35,40],W={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(N,M,C,v,D,m,Q){var b=m.length-1;switch(D){case 2:return m[b-1];case 3:this.$=[];break;case 4:m[b-1].push(m[b]),this.$=m[b-1];break;case 5:case 6:this.$=m[b];break;case 7:case 8:this.$=[];break;case 9:v.setDateFormat(m[b].substr(11)),this.$=m[b].substr(11);break;case 10:v.enableInclusiveEndDates(),this.$=m[b].substr(18);break;case 11:v.TopAxis(),this.$=m[b].substr(8);break;case 12:v.setAxisFormat(m[b].substr(11)),this.$=m[b].substr(11);break;case 13:v.setTickInterval(m[b].substr(13)),this.$=m[b].substr(13);break;case 14:v.setExcludes(m[b].substr(9)),this.$=m[b].substr(9);break;case 15:v.setIncludes(m[b].substr(9)),this.$=m[b].substr(9);break;case 16:v.setTodayMarker(m[b].substr(12)),this.$=m[b].substr(12);break;case 17:v.setDiagramTitle(m[b].substr(6)),this.$=m[b].substr(6);break;case 18:this.$=m[b].trim(),v.setAccTitle(this.$);break;case 19:case 20:this.$=m[b].trim(),v.setAccDescription(this.$);break;case 21:v.addSection(m[b].substr(8)),this.$=m[b].substr(8);break;case 23:v.addTask(m[b-1],m[b]),this.$="task";break;case 27:this.$=m[b-1],v.setClickEvent(m[b-1],m[b],null);break;case 28:this.$=m[b-2],v.setClickEvent(m[b-2],m[b-1],m[b]);break;case 29:this.$=m[b-2],v.setClickEvent(m[b-2],m[b-1],null),v.setLink(m[b-2],m[b]);break;case 30:this.$=m[b-3],v.setClickEvent(m[b-3],m[b-2],m[b-1]),v.setLink(m[b-3],m[b]);break;case 31:this.$=m[b-2],v.setClickEvent(m[b-2],m[b],null),v.setLink(m[b-2],m[b-1]);break;case 32:this.$=m[b-3],v.setClickEvent(m[b-3],m[b-1],m[b]),v.setLink(m[b-3],m[b-2]);break;case 33:this.$=m[b-1],v.setLink(m[b-1],m[b]);break;case 34:case 40:this.$=m[b-1]+" "+m[b];break;case 35:case 36:case 38:this.$=m[b-2]+" "+m[b-1]+" "+m[b];break;case 37:case 39:this.$=m[b-3]+" "+m[b-2]+" "+m[b-1]+" "+m[b];break;case 41:v.parseDirective("%%{","open_directive");break;case 42:v.parseDirective(m[b],"type_directive");break;case 43:m[b]=m[b].trim().replace(/'/g,'"'),v.parseDirective(m[b],"arg_directive");break;case 44:v.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:u,18:d,19:f,20:p,21:g,23:_,25:k,26:w,27:28,28:S,30:4,35:A,40:r},{32:32,33:[1,33],43:O},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:u,18:d,19:f,20:p,21:g,23:_,25:k,26:w,27:28,28:S,30:4,35:A,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(P,[2,25]),{32:47,43:O},{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(P,[2,26])],defaultActions:{5:[2,41],6:[2,1],34:[2,44],43:[2,43]},parseError:function(N,M){if(M.recoverable)this.trace(N);else{var C=new Error(N);throw C.hash=M,C}},parse:function(N){var M=this,C=[0],v=[],D=[null],m=[],Q=this.table,b="",ct=0,Dt=0,vt=2,j=1,ot=m.slice.call(arguments,1),rt=Object.create(this.lexer),it={yy:{}};for(var ut in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ut)&&(it.yy[ut]=this.yy[ut]);rt.setInput(N,it.yy),it.yy.lexer=rt,it.yy.parser=this,typeof rt.yylloc>"u"&&(rt.yylloc={});var bt=rt.yylloc;m.push(bt);var K=rt.options&&rt.options.ranges;typeof it.yy.parseError=="function"?this.parseError=it.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ot(){var Yt;return Yt=v.pop()||rt.lex()||j,typeof Yt!="number"&&(Yt instanceof Array&&(v=Yt,Yt=v.pop()),Yt=M.symbols_[Yt]||Yt),Yt}for(var Y,U,X,F,I={},L,J,T,ht;;){if(U=C[C.length-1],this.defaultActions[U]?X=this.defaultActions[U]:((Y===null||typeof Y>"u")&&(Y=Ot()),X=Q[U]&&Q[U][Y]),typeof X>"u"||!X.length||!X[0]){var V="";ht=[];for(L in Q[U])this.terminals_[L]&&L>vt&&ht.push("'"+this.terminals_[L]+"'");rt.showPosition?V="Parse error on line "+(ct+1)+`:
|
|
1230
|
-
`+rt.showPosition()+`
|
|
1231
|
-
Expecting `+ht.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":V="Parse error on line "+(ct+1)+": Unexpected "+(Y==j?"end of input":"'"+(this.terminals_[Y]||Y)+"'"),this.parseError(V,{text:rt.match,token:this.terminals_[Y]||Y,line:rt.yylineno,loc:bt,expected:ht})}if(X[0]instanceof Array&&X.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+Y);switch(X[0]){case 1:C.push(Y),D.push(rt.yytext),m.push(rt.yylloc),C.push(X[1]),Y=null,Dt=rt.yyleng,b=rt.yytext,ct=rt.yylineno,bt=rt.yylloc;break;case 2:if(J=this.productions_[X[1]][1],I.$=D[D.length-J],I._$={first_line:m[m.length-(J||1)].first_line,last_line:m[m.length-1].last_line,first_column:m[m.length-(J||1)].first_column,last_column:m[m.length-1].last_column},K&&(I._$.range=[m[m.length-(J||1)].range[0],m[m.length-1].range[1]]),F=this.performAction.apply(I,[b,Dt,ct,it.yy,X[1],D,m].concat(ot)),typeof F<"u")return F;J&&(C=C.slice(0,-1*J*2),D=D.slice(0,-1*J),m=m.slice(0,-1*J)),C.push(this.productions_[X[1]][0]),D.push(I.$),m.push(I._$),T=Q[C[C.length-2]][C[C.length-1]],C.push(T);break;case 3:return!0}}return!0}},q=function(){var H={EOF:1,parseError:function(M,C){if(this.yy.parser)this.yy.parser.parseError(M,C);else throw new Error(M)},setInput:function(N,M){return this.yy=M||this.yy||{},this._input=N,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 N=this._input[0];this.yytext+=N,this.yyleng++,this.offset++,this.match+=N,this.matched+=N;var M=N.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),N},unput:function(N){var M=N.length,C=N.split(/(?:\r\n?|\n)/g);this._input=N+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-M),this.offset-=M;var v=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 D=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===v.length?this.yylloc.first_column:0)+v[v.length-C.length].length-C[0].length:this.yylloc.first_column-M},this.options.ranges&&(this.yylloc.range=[D[0],D[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).
|
|
1232
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(N){this.unput(this.match.slice(N))},pastInput:function(){var N=this.matched.substr(0,this.matched.length-this.match.length);return(N.length>20?"...":"")+N.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var N=this.match;return N.length<20&&(N+=this._input.substr(0,20-N.length)),(N.substr(0,20)+(N.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var N=this.pastInput(),M=new Array(N.length+1).join("-");return N+this.upcomingInput()+`
|
|
1233
|
-
`+M+"^"},test_match:function(N,M){var C,v,D;if(this.options.backtrack_lexer&&(D={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&&(D.yylloc.range=this.yylloc.range.slice(0))),v=N[0].match(/(?:\r\n?|\n).*/g),v&&(this.yylineno+=v.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:v?v[v.length-1].length-v[v.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+N[0].length},this.yytext+=N[0],this.match+=N[0],this.matches=N,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(N[0].length),this.matched+=N[0],C=this.performAction.call(this,this.yy,this,M,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),C)return C;if(this._backtrack){for(var m in D)this[m]=D[m];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var N,M,C,v;this._more||(this.yytext="",this.match="");for(var D=this._currentRules(),m=0;m<D.length;m++)if(C=this._input.match(this.rules[D[m]]),C&&(!M||C[0].length>M[0].length)){if(M=C,v=m,this.options.backtrack_lexer){if(N=this.test_match(C,D[m]),N!==!1)return N;if(this._backtrack){M=!1;continue}else return!1}else if(!this.options.flex)break}return M?(N=this.test_match(M,D[v]),N!==!1?N:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1234
|
-
`+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:{"case-insensitive":!0},performAction:function(M,C,v,D){switch(v){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 H}();W.lexer=q;function z(){this.yy={}}return z.prototype=W,W.Parser=z,new z}();k1.parser=k1;const XR=k1,KR=t=>t.match(/^\s*gantt/)!==null;let Ri="",q0="",j0,$0="",Xo=[],Ko=[],X0={},K0=[],Vc=[],ma="";const m3=["active","done","crit","milestone"];let Z0=[],Zo=!1,Q0=!1,w1=0;const ZR=function(t,e,r){ze.parseDirective(this,t,e,r)},QR=function(){K0=[],Vc=[],ma="",Z0=[],Hl=0,E1=void 0,Gl=void 0,lr=[],Ri="",q0="",j0=void 0,$0="",Xo=[],Ko=[],Zo=!1,Q0=!1,w1=0,X0={},Ei()},JR=function(t){q0=t},tF=function(){return q0},eF=function(t){j0=t},rF=function(){return j0},iF=function(t){$0=t},nF=function(){return $0},sF=function(t){Ri=t},aF=function(){Zo=!0},oF=function(){return Zo},lF=function(){Q0=!0},cF=function(){return Q0},uF=function(){return Ri},hF=function(t){Xo=t.toLowerCase().split(/[\s,]+/)},dF=function(){return Xo},fF=function(t){Ko=t.toLowerCase().split(/[\s,]+/)},pF=function(){return Ko},gF=function(){return X0},yF=function(t){ma=t,K0.push(t)},mF=function(){return K0},bF=function(){let t=q2();const e=10;let r=0;for(;!t&&r<e;)t=q2(),r++;return Vc=lr,Vc},b3=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()))},_3=function(t,e,r,i){if(!r.length||t.manualEndTime)return;let n=mi(t.startTime,e,!0);n.add(1,"d");let s=mi(t.endTime,e,!0),a=_F(n,s,e,r,i);t.endTime=s.toDate(),t.renderEndTime=a},_F=function(t,e,r,i,n){let s=!1,a=null;for(;t<=e;)s||(a=e.toDate()),s=b3(t,r,i,n),s&&e.add(1,"d"),t.add(1,"d");return a},T1=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=Da(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=mi(r,e.trim(),!0);if(s.isValid())return s.toDate();{B.debug("Invalid date:"+r),B.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}},x3=function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?mi.duration(Number.parseFloat(e[1]),e[2]):mi.duration.invalid()},v3=function(t,e,r,i=!1){r=r.trim();let n=mi(r,e.trim(),!0);if(n.isValid())return i&&n.add(1,"d"),n.toDate();const s=mi(t),a=x3(r);return a.isValid()&&s.add(a),s.toDate()};let Hl=0;const ea=function(t){return t===void 0?(Hl=Hl+1,"task"+Hl):t},xF=function(t,e){let r;e.substr(0,1)===":"?r=e.substr(1,e.length):r=e;const i=r.split(","),n={};E3(i,n,m3);for(let a=0;a<i.length;a++)i[a]=i[a].trim();let s="";switch(i.length){case 1:n.id=ea(),n.startTime=t.endTime,s=i[0];break;case 2:n.id=ea(),n.startTime=T1(void 0,Ri,i[0]),s=i[1];break;case 3:n.id=ea(i[0]),n.startTime=T1(void 0,Ri,i[1]),s=i[2];break}return s&&(n.endTime=v3(n.startTime,Ri,s,Zo),n.manualEndTime=mi(s,"YYYY-MM-DD",!0).isValid(),_3(n,Ri,Ko,Xo)),n},vF=function(t,e){let r;e.substr(0,1)===":"?r=e.substr(1,e.length):r=e;const i=r.split(","),n={};E3(i,n,m3);for(let s=0;s<i.length;s++)i[s]=i[s].trim();switch(i.length){case 1:n.id=ea(),n.startTime={type:"prevTaskEnd",id:t},n.endTime={data:i[0]};break;case 2:n.id=ea(),n.startTime={type:"getStartDate",startData:i[0]},n.endTime={data:i[1]};break;case 3:n.id=ea(i[0]),n.startTime={type:"getStartDate",startData:i[1]},n.endTime={data:i[2]};break}return n};let E1,Gl,lr=[];const k3={},kF=function(t,e){const r={section:ma,type:ma,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},i=vF(Gl,e);r.raw.startTime=i.startTime,r.raw.endTime=i.endTime,r.id=i.id,r.prevTaskId=Gl,r.active=i.active,r.done=i.done,r.crit=i.crit,r.milestone=i.milestone,r.order=w1,w1++;const n=lr.push(r);Gl=r.id,k3[r.id]=n-1},Da=function(t){const e=k3[t];return lr[e]},wF=function(t,e){const r={section:ma,type:ma,description:t,task:t,classes:[]},i=xF(E1,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,E1=r,Vc.push(r)},q2=function(){const t=function(r){const i=lr[r];let n="";switch(lr[r].raw.startTime.type){case"prevTaskEnd":{const s=Da(i.prevTaskId);i.startTime=s.endTime;break}case"getStartDate":n=T1(void 0,Ri,lr[r].raw.startTime.startData),n&&(lr[r].startTime=n);break}return lr[r].startTime&&(lr[r].endTime=v3(lr[r].startTime,Ri,lr[r].raw.endTime.data,Zo),lr[r].endTime&&(lr[r].processed=!0,lr[r].manualEndTime=mi(lr[r].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),_3(lr[r],Ri,Ko,Xo))),lr[r].processed};let e=!0;for(const[r,i]of lr.entries())t(r),e=e&&i.processed;return e},TF=function(t,e){let r=e;$().securityLevel!=="loose"&&(r=kn(e)),t.split(",").forEach(function(i){Da(i)!==void 0&&(T3(i,()=>{window.open(r,"_self")}),X0[i]=r)}),w3(t,"clickable")},w3=function(t,e){t.split(",").forEach(function(r){let i=Da(r);i!==void 0&&i.classes.push(e)})},EF=function(t,e,r){if($().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),Da(t)!==void 0&&T3(t,()=>{ye.runFunc(e,...i)})},T3=function(t,e){Z0.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()})})},CF=function(t,e,r){t.split(",").forEach(function(i){EF(i,e,r)}),w3(t,"clickable")},SF=function(t){Z0.forEach(function(e){e(t)})},J0={parseDirective:ZR,getConfig:()=>$().gantt,clear:QR,setDateFormat:sF,getDateFormat:uF,enableInclusiveEndDates:aF,endDatesAreInclusive:oF,enableTopAxis:lF,topAxisEnabled:cF,setAxisFormat:JR,getAxisFormat:tF,setTickInterval:eF,getTickInterval:rF,setTodayMarker:iF,getTodayMarker:nF,setAccTitle:ri,getAccTitle:Ci,setDiagramTitle:En,getDiagramTitle:Cn,setAccDescription:Si,getAccDescription:Ai,addSection:yF,getSections:mF,getTasks:bF,addTask:kF,findTaskById:Da,addTaskOrg:wF,setIncludes:hF,getIncludes:dF,setExcludes:fF,getExcludes:pF,setClickEvent:CF,setLink:TF,getLinks:gF,bindFunctions:SF,parseDuration:x3,isInvalidDate:b3};function E3(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 AF=function(){B.debug("Something is calling, setConf, remove the call")};let Ji;const LF=function(t,e,r,i){const n=$().gantt,s=$().securityLevel;let a;s==="sandbox"&&(a=At("#i"+e));const o=At(s==="sandbox"?a.nodes()[0].contentDocument.body:"body"),l=s==="sandbox"?a.nodes()[0].contentDocument:document,u=l.getElementById(e);Ji=u.parentElement.offsetWidth,Ji===void 0&&(Ji=1200),n.useWidth!==void 0&&(Ji=n.useWidth);const d=i.db.getTasks(),f=d.length*(n.barHeight+n.barGap)+2*n.topPadding;u.setAttribute("viewBox","0 0 "+Ji+" "+f);const p=o.select(`[id="${e}"]`),g=X6().domain([Tb(d,function(M){return M.startTime}),wb(d,function(M){return M.endTime})]).rangeRound([0,Ji-n.leftPadding-n.rightPadding]);let _=[];for(const M of d)_.push(M.type);const k=_;_=z(_);function w(M,C){const v=M.startTime,D=C.startTime;let m=0;return v>D?m=1:v<D&&(m=-1),m}d.sort(w),S(d,Ji,f),Ti(p,f,Ji,n.useMaxWidth),p.append("text").text(i.db.getDiagramTitle()).attr("x",Ji/2).attr("y",n.titleTopMargin).attr("class","titleText");function S(M,C,v){const D=n.barHeight,m=D+n.barGap,Q=n.topPadding,b=n.leftPadding,ct=ig().domain([0,_.length]).range(["#00B9FA","#F95002"]).interpolate(G_);O(m,Q,b,C,v,M,i.db.getExcludes(),i.db.getIncludes()),P(b,Q,C,v),A(M,m,Q,b,D,ct,C),W(m,Q),q(b,Q,C,v)}function A(M,C,v,D,m,Q,b){p.append("g").selectAll("rect").data(M).enter().append("rect").attr("x",0).attr("y",function(j,ot){return ot=j.order,ot*C+v-2}).attr("width",function(){return b-n.rightPadding/2}).attr("height",C).attr("class",function(j){for(const[ot,rt]of _.entries())if(j.type===rt)return"section section"+ot%n.numberSectionStyles;return"section section0"});const ct=p.append("g").selectAll("rect").data(M).enter(),Dt=i.db.getLinks();if(ct.append("rect").attr("id",function(j){return j.id}).attr("rx",3).attr("ry",3).attr("x",function(j){return j.milestone?g(j.startTime)+D+.5*(g(j.endTime)-g(j.startTime))-.5*m:g(j.startTime)+D}).attr("y",function(j,ot){return ot=j.order,ot*C+v}).attr("width",function(j){return j.milestone?m:g(j.renderEndTime||j.endTime)-g(j.startTime)}).attr("height",m).attr("transform-origin",function(j,ot){return ot=j.order,(g(j.startTime)+D+.5*(g(j.endTime)-g(j.startTime))).toString()+"px "+(ot*C+v+.5*m).toString()+"px"}).attr("class",function(j){const ot="task";let rt="";j.classes.length>0&&(rt=j.classes.join(" "));let it=0;for(const[bt,K]of _.entries())j.type===K&&(it=bt%n.numberSectionStyles);let ut="";return j.active?j.crit?ut+=" activeCrit":ut=" active":j.done?j.crit?ut=" doneCrit":ut=" done":j.crit&&(ut+=" crit"),ut.length===0&&(ut=" task"),j.milestone&&(ut=" milestone "+ut),ut+=it,ut+=" "+rt,ot+ut}),ct.append("text").attr("id",function(j){return j.id+"-text"}).text(function(j){return j.task}).attr("font-size",n.fontSize).attr("x",function(j){let ot=g(j.startTime),rt=g(j.renderEndTime||j.endTime);j.milestone&&(ot+=.5*(g(j.endTime)-g(j.startTime))-.5*m),j.milestone&&(rt=ot+m);const it=this.getBBox().width;return it>rt-ot?rt+it+1.5*n.leftPadding>b?ot+D-5:rt+D+5:(rt-ot)/2+ot+D}).attr("y",function(j,ot){return ot=j.order,ot*C+n.barHeight/2+(n.fontSize/2-2)+v}).attr("text-height",m).attr("class",function(j){const ot=g(j.startTime);let rt=g(j.endTime);j.milestone&&(rt=ot+m);const it=this.getBBox().width;let ut="";j.classes.length>0&&(ut=j.classes.join(" "));let bt=0;for(const[Ot,Y]of _.entries())j.type===Y&&(bt=Ot%n.numberSectionStyles);let K="";return j.active&&(j.crit?K="activeCritText"+bt:K="activeText"+bt),j.done?j.crit?K=K+" doneCritText"+bt:K=K+" doneText"+bt:j.crit&&(K=K+" critText"+bt),j.milestone&&(K+=" milestoneText"),it>rt-ot?rt+it+1.5*n.leftPadding>b?ut+" taskTextOutsideLeft taskTextOutside"+bt+" "+K:ut+" taskTextOutsideRight taskTextOutside"+bt+" "+K+" width-"+it:ut+" taskText taskText"+bt+" "+K+" width-"+it}),$().securityLevel==="sandbox"){let j;j=At("#i"+e);const ot=j.nodes()[0].contentDocument;ct.filter(function(rt){return Dt[rt.id]!==void 0}).each(function(rt){var it=ot.querySelector("#"+rt.id),ut=ot.querySelector("#"+rt.id+"-text");const bt=it.parentNode;var K=ot.createElement("a");K.setAttribute("xlink:href",Dt[rt.id]),K.setAttribute("target","_top"),bt.appendChild(K),K.appendChild(it),K.appendChild(ut)})}}function O(M,C,v,D,m,Q,b,ct){const Dt=Q.reduce((bt,{startTime:K})=>bt?Math.min(bt,K):K,0),vt=Q.reduce((bt,{endTime:K})=>bt?Math.max(bt,K):K,0),j=i.db.getDateFormat();if(!Dt||!vt)return;const ot=[];let rt=null,it=mi(Dt);for(;it.valueOf()<=vt;)i.db.isInvalidDate(it,j,b,ct)?rt?rt.end=it.clone():rt={start:it.clone(),end:it.clone()}:rt&&(ot.push(rt),rt=null),it.add(1,"d");p.append("g").selectAll("rect").data(ot).enter().append("rect").attr("id",function(bt){return"exclude-"+bt.start.format("YYYY-MM-DD")}).attr("x",function(bt){return g(bt.start)+v}).attr("y",n.gridLineStartPadding).attr("width",function(bt){const K=bt.end.clone().add(1,"day");return g(K)-g(bt.start)}).attr("height",m-C-n.gridLineStartPadding).attr("transform-origin",function(bt,K){return(g(bt.start)+v+.5*(g(bt.end)-g(bt.start))).toString()+"px "+(K*M+.5*m).toString()+"px"}).attr("class","exclude-range")}function P(M,C,v,D){let m=Nb(g).tickSize(-D+C+n.gridLineStartPadding).tickFormat(lc(i.db.getAxisFormat()||n.axisFormat||"%Y-%m-%d"));const b=/^([1-9]\d*)(minute|hour|day|week|month)$/.exec(i.db.getTickInterval()||n.tickInterval);if(b!==null){const ct=b[1];switch(b[2]){case"minute":m.ticks(po.every(ct));break;case"hour":m.ticks(go.every(ct));break;case"day":m.ticks(ps.every(ct));break;case"week":m.ticks(sa.every(ct));break;case"month":m.ticks(yo.every(ct));break}}if(p.append("g").attr("class","grid").attr("transform","translate("+M+", "+(D-50)+")").call(m).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 ct=Mb(g).tickSize(-D+C+n.gridLineStartPadding).tickFormat(lc(i.db.getAxisFormat()||n.axisFormat||"%Y-%m-%d"));if(b!==null){const Dt=b[1];switch(b[2]){case"minute":ct.ticks(po.every(Dt));break;case"hour":ct.ticks(go.every(Dt));break;case"day":ct.ticks(ps.every(Dt));break;case"week":ct.ticks(sa.every(Dt));break;case"month":ct.ticks(yo.every(Dt));break}}p.append("g").attr("class","grid").attr("transform","translate("+M+", "+C+")").call(ct).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function W(M,C){const v=[];let D=0;for(const[m,Q]of _.entries())v[m]=[Q,N(Q,k)];p.append("g").selectAll("text").data(v).enter().append(function(m){const Q=m[0].split(he.lineBreakRegex),b=-(Q.length-1)/2,ct=l.createElementNS("http://www.w3.org/2000/svg","text");ct.setAttribute("dy",b+"em");for(const[Dt,vt]of Q.entries()){const j=l.createElementNS("http://www.w3.org/2000/svg","tspan");j.setAttribute("alignment-baseline","central"),j.setAttribute("x","10"),Dt>0&&j.setAttribute("dy","1em"),j.textContent=vt,ct.appendChild(j)}return ct}).attr("x",10).attr("y",function(m,Q){if(Q>0)for(let b=0;b<Q;b++)return D+=v[Q-1][1],m[1]*M/2+D*M+C;else return m[1]*M/2+C}).attr("font-size",n.sectionFontSize).attr("font-size",n.sectionFontSize).attr("class",function(m){for(const[Q,b]of _.entries())if(m[0]===b)return"sectionTitle sectionTitle"+Q%n.numberSectionStyles;return"sectionTitle"})}function q(M,C,v,D){const m=i.db.getTodayMarker();if(m==="off")return;const Q=p.append("g").attr("class","today"),b=new Date,ct=Q.append("line");ct.attr("x1",g(b)+M).attr("x2",g(b)+M).attr("y1",n.titleTopMargin).attr("y2",D-n.titleTopMargin).attr("class","today"),m!==""&&ct.attr("style",m.replace(/,/g,";"))}function z(M){const C={},v=[];for(let D=0,m=M.length;D<m;++D)Object.prototype.hasOwnProperty.call(C,M[D])||(C[M[D]]=!0,v.push(M[D]));return v}function H(M){let C=M.length;const v={};for(;C;)v[M[--C]]=(v[M[C]]||0)+1;return v}function N(M,C){return H(C)[M]||0}},DF={setConf:AF,draw:LF};var C1=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,u,d,f,p){switch(f.length-1,d){case 1:return u;case 4:break;case 6:u.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],u=[],d=[null],f=[],p=this.table,g="",_=0,k=0,w=2,S=1,A=f.slice.call(arguments,1),O=Object.create(this.lexer),P={yy:{}};for(var W in this.yy)Object.prototype.hasOwnProperty.call(this.yy,W)&&(P.yy[W]=this.yy[W]);O.setInput(a,P.yy),P.yy.lexer=O,P.yy.parser=this,typeof O.yylloc>"u"&&(O.yylloc={});var q=O.yylloc;f.push(q);var z=O.options&&O.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function H(){var vt;return vt=u.pop()||O.lex()||S,typeof vt!="number"&&(vt instanceof Array&&(u=vt,vt=u.pop()),vt=o.symbols_[vt]||vt),vt}for(var N,M,C,v,D={},m,Q,b,ct;;){if(M=l[l.length-1],this.defaultActions[M]?C=this.defaultActions[M]:((N===null||typeof N>"u")&&(N=H()),C=p[M]&&p[M][N]),typeof C>"u"||!C.length||!C[0]){var Dt="";ct=[];for(m in p[M])this.terminals_[m]&&m>w&&ct.push("'"+this.terminals_[m]+"'");O.showPosition?Dt="Parse error on line "+(_+1)+`:
|
|
1235
|
-
`+O.showPosition()+`
|
|
1236
|
-
Expecting `+ct.join(", ")+", got '"+(this.terminals_[N]||N)+"'":Dt="Parse error on line "+(_+1)+": Unexpected "+(N==S?"end of input":"'"+(this.terminals_[N]||N)+"'"),this.parseError(Dt,{text:O.match,token:this.terminals_[N]||N,line:O.yylineno,loc:q,expected:ct})}if(C[0]instanceof Array&&C.length>1)throw new Error("Parse Error: multiple actions possible at state: "+M+", token: "+N);switch(C[0]){case 1:l.push(N),d.push(O.yytext),f.push(O.yylloc),l.push(C[1]),N=null,k=O.yyleng,g=O.yytext,_=O.yylineno,q=O.yylloc;break;case 2:if(Q=this.productions_[C[1]][1],D.$=d[d.length-Q],D._$={first_line:f[f.length-(Q||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(Q||1)].first_column,last_column:f[f.length-1].last_column},z&&(D._$.range=[f[f.length-(Q||1)].range[0],f[f.length-1].range[1]]),v=this.performAction.apply(D,[g,k,_,P.yy,C[1],d,f].concat(A)),typeof v<"u")return v;Q&&(l=l.slice(0,-1*Q*2),d=d.slice(0,-1*Q),f=f.slice(0,-1*Q)),l.push(this.productions_[C[1]][0]),d.push(D.$),f.push(D._$),b=p[l[l.length-2]][l[l.length-1]],l.push(b);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 u=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 d=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===u.length?this.yylloc.first_column:0)+u[u.length-l.length].length-l[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[d[0],d[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).
|
|
1237
|
-
`+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()+`
|
|
1238
|
-
`+o+"^"},test_match:function(a,o){var l,u,d;if(this.options.backtrack_lexer&&(d={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&&(d.yylloc.range=this.yylloc.range.slice(0))),u=a[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.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 d)this[f]=d[f];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,o,l,u;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),f=0;f<d.length;f++)if(l=this._input.match(this.rules[d[f]]),l&&(!o||l[0].length>o[0].length)){if(o=l,u=f,this.options.backtrack_lexer){if(a=this.test_match(l,d[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,d[u]),a!==!1?a:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1239
|
-
`+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,u,d){switch(u){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}();C1.parser=C1;const MF=C1;var C3="",S3=!1;const NF=t=>{B.debug("Setting message to: "+t),C3=t},BF=()=>C3,IF=t=>{S3=t},OF=()=>S3,RF={setMessage:NF,getMessage:BF,setInfo:IF,getInfo:OF,clear:Ei},FF=(t,e,r)=>{try{B.debug(`Rendering info diagram
|
|
1240
|
-
`+t);const i=$().securityLevel;let n;i==="sandbox"&&(n=At("#i"+e));const a=At(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){B.error("Error while rendering info diagram"),B.error(i.message)}},PF={draw:FF},YF=t=>t.match(/^\s*info/)!==null;var S1=function(){var t=function(q,z,H,N){for(H=H||{},N=q.length;N--;H[q[N]]=z);return H},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],u=[26,27,28],d=[2,8],f=[1,18],p=[1,19],g=[1,20],_=[1,21],k=[1,22],w=[1,23],S=[1,28],A=[6,26,27,28,29],O={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(z,H,N,M,C,v,D){var m=v.length-1;switch(C){case 4:M.setShowData(!0);break;case 7:this.$=v[m-1];break;case 9:M.addSection(v[m-1],M.cleanupValue(v[m]));break;case 10:this.$=v[m].trim(),M.setDiagramTitle(this.$);break;case 11:this.$=v[m].trim(),M.setAccTitle(this.$);break;case 12:case 13:this.$=v[m].trim(),M.setAccDescription(this.$);break;case 14:M.addSection(v[m].substr(8)),this.$=v[m].substr(8);break;case 21:M.parseDirective("%%{","open_directive");break;case 22:M.parseDirective(v[m],"type_directive");break;case 23:v[m]=v[m].trim().replace(/'/g,'"'),M.parseDirective(v[m],"arg_directive");break;case 24:M.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(u,d,{21:8,9:16,10:17,5:24,1:[2,3],11:f,13:p,15:g,17:_,19:k,20:w,29:s}),t(a,o,{7:25}),{23:26,24:[1,27],32:S},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(u,[2,13]),t(u,[2,14]),t(u,[2,15]),t(u,d,{21:8,9:16,10:17,5:24,1:[2,4],11:f,13:p,15:g,17:_,19:k,20:w,29:s}),t(A,[2,16]),{25:34,31:[1,35]},t(A,[2,24]),t(a,[2,7]),t(u,[2,9]),t(u,[2,10]),t(u,[2,11]),t(u,[2,12]),{23:36,32:S},{32:[2,23]},t(A,[2,17])],defaultActions:{9:[2,21],10:[2,1],11:[2,2],35:[2,23]},parseError:function(z,H){if(H.recoverable)this.trace(z);else{var N=new Error(z);throw N.hash=H,N}},parse:function(z){var H=this,N=[0],M=[],C=[null],v=[],D=this.table,m="",Q=0,b=0,ct=2,Dt=1,vt=v.slice.call(arguments,1),j=Object.create(this.lexer),ot={yy:{}};for(var rt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,rt)&&(ot.yy[rt]=this.yy[rt]);j.setInput(z,ot.yy),ot.yy.lexer=j,ot.yy.parser=this,typeof j.yylloc>"u"&&(j.yylloc={});var it=j.yylloc;v.push(it);var ut=j.options&&j.options.ranges;typeof ot.yy.parseError=="function"?this.parseError=ot.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function bt(){var ht;return ht=M.pop()||j.lex()||Dt,typeof ht!="number"&&(ht instanceof Array&&(M=ht,ht=M.pop()),ht=H.symbols_[ht]||ht),ht}for(var K,Ot,Y,U,X={},F,I,L,J;;){if(Ot=N[N.length-1],this.defaultActions[Ot]?Y=this.defaultActions[Ot]:((K===null||typeof K>"u")&&(K=bt()),Y=D[Ot]&&D[Ot][K]),typeof Y>"u"||!Y.length||!Y[0]){var T="";J=[];for(F in D[Ot])this.terminals_[F]&&F>ct&&J.push("'"+this.terminals_[F]+"'");j.showPosition?T="Parse error on line "+(Q+1)+`:
|
|
1241
|
-
`+j.showPosition()+`
|
|
1242
|
-
Expecting `+J.join(", ")+", got '"+(this.terminals_[K]||K)+"'":T="Parse error on line "+(Q+1)+": Unexpected "+(K==Dt?"end of input":"'"+(this.terminals_[K]||K)+"'"),this.parseError(T,{text:j.match,token:this.terminals_[K]||K,line:j.yylineno,loc:it,expected:J})}if(Y[0]instanceof Array&&Y.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ot+", token: "+K);switch(Y[0]){case 1:N.push(K),C.push(j.yytext),v.push(j.yylloc),N.push(Y[1]),K=null,b=j.yyleng,m=j.yytext,Q=j.yylineno,it=j.yylloc;break;case 2:if(I=this.productions_[Y[1]][1],X.$=C[C.length-I],X._$={first_line:v[v.length-(I||1)].first_line,last_line:v[v.length-1].last_line,first_column:v[v.length-(I||1)].first_column,last_column:v[v.length-1].last_column},ut&&(X._$.range=[v[v.length-(I||1)].range[0],v[v.length-1].range[1]]),U=this.performAction.apply(X,[m,b,Q,ot.yy,Y[1],C,v].concat(vt)),typeof U<"u")return U;I&&(N=N.slice(0,-1*I*2),C=C.slice(0,-1*I),v=v.slice(0,-1*I)),N.push(this.productions_[Y[1]][0]),C.push(X.$),v.push(X._$),L=D[N[N.length-2]][N[N.length-1]],N.push(L);break;case 3:return!0}}return!0}},P=function(){var q={EOF:1,parseError:function(H,N){if(this.yy.parser)this.yy.parser.parseError(H,N);else throw new Error(H)},setInput:function(z,H){return this.yy=H||this.yy||{},this._input=z,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 z=this._input[0];this.yytext+=z,this.yyleng++,this.offset++,this.match+=z,this.matched+=z;var H=z.match(/(?:\r\n?|\n).*/g);return H?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),z},unput:function(z){var H=z.length,N=z.split(/(?:\r\n?|\n)/g);this._input=z+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-H),this.offset-=H;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),N.length-1&&(this.yylineno-=N.length-1);var C=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:N?(N.length===M.length?this.yylloc.first_column:0)+M[M.length-N.length].length-N[0].length:this.yylloc.first_column-H},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-H]),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).
|
|
1243
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(z){this.unput(this.match.slice(z))},pastInput:function(){var z=this.matched.substr(0,this.matched.length-this.match.length);return(z.length>20?"...":"")+z.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var z=this.match;return z.length<20&&(z+=this._input.substr(0,20-z.length)),(z.substr(0,20)+(z.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var z=this.pastInput(),H=new Array(z.length+1).join("-");return z+this.upcomingInput()+`
|
|
1244
|
-
`+H+"^"},test_match:function(z,H){var N,M,C;if(this.options.backtrack_lexer&&(C={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&&(C.yylloc.range=this.yylloc.range.slice(0))),M=z[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+z[0].length},this.yytext+=z[0],this.match+=z[0],this.matches=z,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(z[0].length),this.matched+=z[0],N=this.performAction.call(this,this.yy,this,H,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),N)return N;if(this._backtrack){for(var v in C)this[v]=C[v];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var z,H,N,M;this._more||(this.yytext="",this.match="");for(var C=this._currentRules(),v=0;v<C.length;v++)if(N=this._input.match(this.rules[C[v]]),N&&(!H||N[0].length>H[0].length)){if(H=N,M=v,this.options.backtrack_lexer){if(z=this.test_match(N,C[v]),z!==!1)return z;if(this._backtrack){H=!1;continue}else return!1}else if(!this.options.flex)break}return H?(z=this.test_match(H,C[M]),z!==!1?z:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1245
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var H=this.next();return H||this.lex()},begin:function(H){this.conditionStack.push(H)},popState:function(){var H=this.conditionStack.length-1;return H>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(H){return H=this.conditionStack.length-1-Math.abs(H||0),H>=0?this.conditionStack[H]:"INITIAL"},pushState:function(H){this.begin(H)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(H,N,M,C){switch(M){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 q}();O.lexer=P;function W(){this.yy={}}return W.prototype=O,O.Parser=W,new W}();S1.parser=S1;const VF=S1,UF=t=>t.match(/^\s*pie/)!==null||t.match(/^\s*bar/)!==null;let Uc={},td=!1;const zF=function(t,e,r){ze.parseDirective(this,t,e,r)},WF=function(t,e){t=he.sanitizeText(t,$()),Uc[t]===void 0&&(Uc[t]=e,B.debug("Added new section :",t))},HF=()=>Uc,GF=function(t){td=t},qF=function(){return td},jF=function(t){return t.substring(0,1)===":"&&(t=t.substring(1).trim()),Number(t.trim())},$F=function(){Uc={},td=!1,Ei()},XF={parseDirective:zF,getConfig:()=>$().pie,addSection:WF,getSections:HF,cleanupValue:jF,clear:$F,setAccTitle:ri,getAccTitle:Ci,setDiagramTitle:En,getDiagramTitle:Cn,setShowData:GF,getShowData:qF,getAccDescription:Ai,setAccDescription:Si};let tn=$(),en;const Wa=450,KF=(t,e,r,i)=>{try{tn=$(),B.debug(`Rendering info diagram
|
|
1246
|
-
`+t);const A=$().securityLevel;let O;A==="sandbox"&&(O=At("#i"+e));const P=At(A==="sandbox"?O.nodes()[0].contentDocument.body:"body"),W=A==="sandbox"?O.nodes()[0].contentDocument:document;i.db.clear(),i.parser.parse(t),B.debug("Parsed info diagram");const q=W.getElementById(e);en=q.parentElement.offsetWidth,en===void 0&&(en=1200),tn.useWidth!==void 0&&(en=tn.useWidth),tn.pie.useWidth!==void 0&&(en=tn.pie.useWidth);const z=P.select("#"+e);Ti(z,Wa,en,tn.pie.useMaxWidth),q.setAttribute("viewBox","0 0 "+en+" "+Wa);var n=40,s=18,a=4,o=Math.min(en,Wa)/2-n,l=z.append("g").attr("transform","translate("+en/2+","+Wa/2+")"),u=i.db.getSections(),d=0;Object.keys(u).forEach(function(N){d+=u[N]});const H=tn.themeVariables;var f=[H.pie1,H.pie2,H.pie3,H.pie4,H.pie5,H.pie6,H.pie7,H.pie8,H.pie9,H.pie10,H.pie11,H.pie12],p=tg().range(f),g=Object.entries(u).map(function(N,M){return{order:M,name:N[0],value:N[1]}}),_=lk().value(function(N){return N.value}).sort(function(N,M){return N.order-M.order}),k=_(g),w=qh().innerRadius(0).outerRadius(o);l.selectAll("mySlices").data(k).enter().append("path").attr("d",w).attr("fill",function(N){return p(N.data.name)}).attr("class","pieCircle"),l.selectAll("mySlices").data(k).enter().append("text").text(function(N){return(N.data.value/d*100).toFixed(0)+"%"}).attr("transform",function(N){return"translate("+w.centroid(N)+")"}).style("text-anchor","middle").attr("class","slice"),l.append("text").text(i.db.getDiagramTitle()).attr("x",0).attr("y",-(Wa-50)/2).attr("class","pieTitleText");var S=l.selectAll(".legend").data(p.domain()).enter().append("g").attr("class","legend").attr("transform",function(N,M){const C=s+a,v=C*p.domain().length/2,D=12*s,m=M*C-v;return"translate("+D+","+m+")"});S.append("rect").attr("width",s).attr("height",s).style("fill",p).style("stroke",p),S.data(k).append("text").attr("x",s+a).attr("y",s-a).text(function(N){return i.db.getShowData()||tn.showData||tn.pie.showData?N.data.name+" ["+N.data.value+"]":N.data.name})}catch(A){B.error("Error while rendering info diagram"),B.error(A)}},ZF={draw:KF};var A1=function(){var t=function(Ot,Y,U,X){for(U=U||{},X=Ot.length;X--;U[Ot[X]]=Y);return U},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],u=[1,26],d=[1,27],f=[1,28],p=[1,29],g=[1,30],_=[1,31],k=[1,24],w=[1,32],S=[1,33],A=[1,36],O=[71,72],P=[5,8,14,16,18,19,40,41,42,43,44,45,53,60,62,71,72],W=[1,56],q=[1,57],z=[1,58],H=[1,59],N=[1,60],M=[1,61],C=[1,62],v=[62,63],D=[1,74],m=[1,70],Q=[1,71],b=[1,72],ct=[1,73],Dt=[1,75],vt=[1,79],j=[1,80],ot=[1,77],rt=[1,78],it=[5,8,14,16,18,19,40,41,42,43,44,45,53,71,72],ut={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(Y,U,X,F,I,L,J){var T=L.length-1;switch(I){case 6:this.$=L[T].trim(),F.setAccTitle(this.$);break;case 7:case 8:this.$=L[T].trim(),F.setAccDescription(this.$);break;case 9:F.parseDirective("%%{","open_directive");break;case 10:F.parseDirective(L[T],"type_directive");break;case 11:L[T]=L[T].trim().replace(/'/g,'"'),F.parseDirective(L[T],"arg_directive");break;case 12:F.parseDirective("}%%","close_directive","pie");break;case 13:this.$=[];break;case 19:F.addRequirement(L[T-3],L[T-4]);break;case 20:F.setNewReqId(L[T-2]);break;case 21:F.setNewReqText(L[T-2]);break;case 22:F.setNewReqRisk(L[T-2]);break;case 23:F.setNewReqVerifyMethod(L[T-2]);break;case 26:this.$=F.RequirementType.REQUIREMENT;break;case 27:this.$=F.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 28:this.$=F.RequirementType.INTERFACE_REQUIREMENT;break;case 29:this.$=F.RequirementType.PERFORMANCE_REQUIREMENT;break;case 30:this.$=F.RequirementType.PHYSICAL_REQUIREMENT;break;case 31:this.$=F.RequirementType.DESIGN_CONSTRAINT;break;case 32:this.$=F.RiskLevel.LOW_RISK;break;case 33:this.$=F.RiskLevel.MED_RISK;break;case 34:this.$=F.RiskLevel.HIGH_RISK;break;case 35:this.$=F.VerifyType.VERIFY_ANALYSIS;break;case 36:this.$=F.VerifyType.VERIFY_DEMONSTRATION;break;case 37:this.$=F.VerifyType.VERIFY_INSPECTION;break;case 38:this.$=F.VerifyType.VERIFY_TEST;break;case 39:F.addElement(L[T-3]);break;case 40:F.setNewElementType(L[T-2]);break;case 41:F.setNewElementDocRef(L[T-2]);break;case 44:F.addRelationship(L[T-2],L[T],L[T-4]);break;case 45:F.addRelationship(L[T-2],L[T-4],L[T]);break;case 46:this.$=F.Relationships.CONTAINS;break;case 47:this.$=F.Relationships.COPIES;break;case 48:this.$=F.Relationships.DERIVES;break;case 49:this.$=F.Relationships.SATISFIES;break;case 50:this.$=F.Relationships.VERIFIES;break;case 51:this.$=F.Relationships.REFINES;break;case 52:this.$=F.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:u,41:d,42:f,43:p,44:g,45:_,53:k,71:w,72:S},{11:34,12:[1,35],22:A},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:u,41:d,42:f,43:p,44:g,45:_,53:k,71:w,72:S},{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:u,41:d,42:f,43:p,44:g,45:_,53:k,71:w,72:S},{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:u,41:d,42:f,43:p,44:g,45:_,53:k,71:w,72:S},{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:u,41:d,42:f,43:p,44:g,45:_,53:k,71:w,72:S},{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:u,41:d,42:f,43:p,44:g,45:_,53:k,71:w,72:S},{27:43,71:[1,44],72:[1,45]},{54:46,71:[1,47],72:[1,48]},{60:[1,49],62:[1,50]},t(O,[2,26]),t(O,[2,27]),t(O,[2,28]),t(O,[2,29]),t(O,[2,30]),t(O,[2,31]),t(P,[2,55]),t(P,[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:W,65:q,66:z,67:H,68:N,69:M,70:C},{61:63,64:W,65:q,66:z,67:H,68:N,69:M,70:C},{11:64,22:A},{22:[2,11]},{5:[1,65]},{5:[1,66]},{62:[1,67]},t(v,[2,46]),t(v,[2,47]),t(v,[2,48]),t(v,[2,49]),t(v,[2,50]),t(v,[2,51]),t(v,[2,52]),{63:[1,68]},t(a,[2,5]),{5:D,29:69,30:m,33:Q,35:b,37:ct,39:Dt},{5:vt,39:j,55:76,56:ot,58:rt},{32:81,71:w,72:S},{32:82,71:w,72:S},t(it,[2,19]),{31:[1,83]},{31:[1,84]},{31:[1,85]},{31:[1,86]},{5:D,29:87,30:m,33:Q,35:b,37:ct,39:Dt},t(it,[2,25]),t(it,[2,39]),{31:[1,88]},{31:[1,89]},{5:vt,39:j,55:90,56:ot,58:rt},t(it,[2,43]),t(it,[2,44]),t(it,[2,45]),{32:91,71:w,72:S},{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(it,[2,24]),{57:104,71:[1,105],72:[1,106]},{59:107,71:[1,108],72:[1,109]},t(it,[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:D,29:116,30:m,33:Q,35:b,37:ct,39:Dt},{5:D,29:117,30:m,33:Q,35:b,37:ct,39:Dt},{5:D,29:118,30:m,33:Q,35:b,37:ct,39:Dt},{5:D,29:119,30:m,33:Q,35:b,37:ct,39:Dt},{5:vt,39:j,55:120,56:ot,58:rt},{5:vt,39:j,55:121,56:ot,58:rt},t(it,[2,20]),t(it,[2,21]),t(it,[2,22]),t(it,[2,23]),t(it,[2,40]),t(it,[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(Y,U){if(U.recoverable)this.trace(Y);else{var X=new Error(Y);throw X.hash=U,X}},parse:function(Y){var U=this,X=[0],F=[],I=[null],L=[],J=this.table,T="",ht=0,V=0,Yt=2,et=1,Mt=L.slice.call(arguments,1),Tt=Object.create(this.lexer),gt={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(gt.yy[Et]=this.yy[Et]);Tt.setInput(Y,gt.yy),gt.yy.lexer=Tt,gt.yy.parser=this,typeof Tt.yylloc>"u"&&(Tt.yylloc={});var wt=Tt.yylloc;L.push(wt);var pt=Tt.options&&Tt.options.ranges;typeof gt.yy.parseError=="function"?this.parseError=gt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function st(){var ft;return ft=F.pop()||Tt.lex()||et,typeof ft!="number"&&(ft instanceof Array&&(F=ft,ft=F.pop()),ft=U.symbols_[ft]||ft),ft}for(var le,Xt,jt,Kt,Gt={},Ee,Ht,Vt,Ft;;){if(Xt=X[X.length-1],this.defaultActions[Xt]?jt=this.defaultActions[Xt]:((le===null||typeof le>"u")&&(le=st()),jt=J[Xt]&&J[Xt][le]),typeof jt>"u"||!jt.length||!jt[0]){var xt="";Ft=[];for(Ee in J[Xt])this.terminals_[Ee]&&Ee>Yt&&Ft.push("'"+this.terminals_[Ee]+"'");Tt.showPosition?xt="Parse error on line "+(ht+1)+`:
|
|
1247
|
-
`+Tt.showPosition()+`
|
|
1248
|
-
Expecting `+Ft.join(", ")+", got '"+(this.terminals_[le]||le)+"'":xt="Parse error on line "+(ht+1)+": Unexpected "+(le==et?"end of input":"'"+(this.terminals_[le]||le)+"'"),this.parseError(xt,{text:Tt.match,token:this.terminals_[le]||le,line:Tt.yylineno,loc:wt,expected:Ft})}if(jt[0]instanceof Array&&jt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Xt+", token: "+le);switch(jt[0]){case 1:X.push(le),I.push(Tt.yytext),L.push(Tt.yylloc),X.push(jt[1]),le=null,V=Tt.yyleng,T=Tt.yytext,ht=Tt.yylineno,wt=Tt.yylloc;break;case 2:if(Ht=this.productions_[jt[1]][1],Gt.$=I[I.length-Ht],Gt._$={first_line:L[L.length-(Ht||1)].first_line,last_line:L[L.length-1].last_line,first_column:L[L.length-(Ht||1)].first_column,last_column:L[L.length-1].last_column},pt&&(Gt._$.range=[L[L.length-(Ht||1)].range[0],L[L.length-1].range[1]]),Kt=this.performAction.apply(Gt,[T,V,ht,gt.yy,jt[1],I,L].concat(Mt)),typeof Kt<"u")return Kt;Ht&&(X=X.slice(0,-1*Ht*2),I=I.slice(0,-1*Ht),L=L.slice(0,-1*Ht)),X.push(this.productions_[jt[1]][0]),I.push(Gt.$),L.push(Gt._$),Vt=J[X[X.length-2]][X[X.length-1]],X.push(Vt);break;case 3:return!0}}return!0}},bt=function(){var Ot={EOF:1,parseError:function(U,X){if(this.yy.parser)this.yy.parser.parseError(U,X);else throw new Error(U)},setInput:function(Y,U){return this.yy=U||this.yy||{},this._input=Y,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 Y=this._input[0];this.yytext+=Y,this.yyleng++,this.offset++,this.match+=Y,this.matched+=Y;var U=Y.match(/(?:\r\n?|\n).*/g);return U?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Y},unput:function(Y){var U=Y.length,X=Y.split(/(?:\r\n?|\n)/g);this._input=Y+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-U),this.offset-=U;var F=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),X.length-1&&(this.yylineno-=X.length-1);var I=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:X?(X.length===F.length?this.yylloc.first_column:0)+F[F.length-X.length].length-X[0].length:this.yylloc.first_column-U},this.options.ranges&&(this.yylloc.range=[I[0],I[0]+this.yyleng-U]),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).
|
|
1249
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(Y){this.unput(this.match.slice(Y))},pastInput:function(){var Y=this.matched.substr(0,this.matched.length-this.match.length);return(Y.length>20?"...":"")+Y.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var Y=this.match;return Y.length<20&&(Y+=this._input.substr(0,20-Y.length)),(Y.substr(0,20)+(Y.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var Y=this.pastInput(),U=new Array(Y.length+1).join("-");return Y+this.upcomingInput()+`
|
|
1250
|
-
`+U+"^"},test_match:function(Y,U){var X,F,I;if(this.options.backtrack_lexer&&(I={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&&(I.yylloc.range=this.yylloc.range.slice(0))),F=Y[0].match(/(?:\r\n?|\n).*/g),F&&(this.yylineno+=F.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:F?F[F.length-1].length-F[F.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Y[0].length},this.yytext+=Y[0],this.match+=Y[0],this.matches=Y,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(Y[0].length),this.matched+=Y[0],X=this.performAction.call(this,this.yy,this,U,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),X)return X;if(this._backtrack){for(var L in I)this[L]=I[L];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Y,U,X,F;this._more||(this.yytext="",this.match="");for(var I=this._currentRules(),L=0;L<I.length;L++)if(X=this._input.match(this.rules[I[L]]),X&&(!U||X[0].length>U[0].length)){if(U=X,F=L,this.options.backtrack_lexer){if(Y=this.test_match(X,I[L]),Y!==!1)return Y;if(this._backtrack){U=!1;continue}else return!1}else if(!this.options.flex)break}return U?(Y=this.test_match(U,I[F]),Y!==!1?Y:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1251
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var U=this.next();return U||this.lex()},begin:function(U){this.conditionStack.push(U)},popState:function(){var U=this.conditionStack.length-1;return U>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(U){return U=this.conditionStack.length-1-Math.abs(U||0),U>=0?this.conditionStack[U]:"INITIAL"},pushState:function(U){this.begin(U)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(U,X,F,I){switch(F){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 X.yytext=X.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 Ot}();ut.lexer=bt;function K(){this.yy={}}return K.prototype=ut,ut.Parser=K,new K}();A1.parser=A1;const QF=A1,JF=t=>t.match(/^\s*requirement(Diagram)?/)!==null;let ed=[],Yr={},oo={},Wn={},lo={};const tP={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},eP={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},rP={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},iP={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},nP=function(t,e,r){ze.parseDirective(this,t,e,r)},sP=(t,e)=>(oo[t]===void 0&&(oo[t]={name:t,type:e,id:Yr.id,text:Yr.text,risk:Yr.risk,verifyMethod:Yr.verifyMethod}),Yr={},oo[t]),aP=()=>oo,oP=t=>{Yr!==void 0&&(Yr.id=t)},lP=t=>{Yr!==void 0&&(Yr.text=t)},cP=t=>{Yr!==void 0&&(Yr.risk=t)},uP=t=>{Yr!==void 0&&(Yr.verifyMethod=t)},hP=t=>(lo[t]===void 0&&(lo[t]={name:t,type:Wn.type,docRef:Wn.docRef},B.info("Added new requirement: ",t)),Wn={},lo[t]),dP=()=>lo,fP=t=>{Wn!==void 0&&(Wn.type=t)},pP=t=>{Wn!==void 0&&(Wn.docRef=t)},gP=(t,e,r)=>{ed.push({type:t,src:e,dst:r})},yP=()=>ed,mP=()=>{ed=[],Yr={},oo={},Wn={},lo={},Ei()},bP={RequirementType:tP,RiskLevel:eP,VerifyType:rP,Relationships:iP,parseDirective:nP,getConfig:()=>$().req,addRequirement:sP,getRequirements:aP,setNewReqId:oP,setNewReqText:lP,setNewReqRisk:cP,setNewReqVerifyMethod:uP,setAccTitle:ri,getAccTitle:Ci,setAccDescription:Si,getAccDescription:Ai,addElement:hP,getElements:dP,setNewElementType:fP,setNewElementDocRef:pP,addRelationship:gP,getRelationships:yP,clear:mP},L1={CONTAINS:"contains",ARROW:"arrow"},_P=(t,e)=>{let r=t.append("defs").append("marker").attr("id",L1.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",L1.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
|
|
1252
|
-
L${e.line_height},${e.line_height/2}
|
|
1253
|
-
M${e.line_height},${e.line_height/2}
|
|
1254
|
-
L0,${e.line_height}`).attr("stroke-width",1)},A3={ReqMarkers:L1,insertLineEndings:_P};let je={},j2=0;const L3=(t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",je.rect_min_width+"px").attr("height",je.rect_min_height+"px"),D3=(t,e,r)=>{let i=je.rect_min_width/2,n=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",i).attr("y",je.rect_padding).attr("dominant-baseline","hanging"),s=0;r.forEach(u=>{s==0?n.append("tspan").attr("text-anchor","middle").attr("x",je.rect_min_width/2).attr("dy",0).text(u):n.append("tspan").attr("text-anchor","middle").attr("x",je.rect_min_width/2).attr("dy",je.line_height*.75).text(u),s++});let a=1.5*je.rect_padding,o=s*je.line_height*.75,l=a+o;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",je.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",je.rect_padding).attr("y",i).attr("dominant-baseline","hanging"),s=0;const a=30;let o=[];return r.forEach(l=>{let u=l.length;for(;u>a&&s<3;){let d=l.substring(0,a);l=l.substring(a,l.length),u=l.length,o[o.length]=d,s++}if(s==3){let d=o[o.length-1];o[o.length-1]=d.substring(0,d.length-4)+"..."}else o[o.length]=l;s=0}),o.forEach(l=>{n.append("tspan").attr("x",je.rect_padding).attr("dy",je.line_height).text(l)}),n},xP=(t,e,r,i)=>{const n=e.node().getTotalLength(),s=e.node().getPointAtLength(n*.5),a="rel"+j2;j2++;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%")},vP=function(t,e,r,i,n){const s=r.edge(ba(e.src),ba(e.dst)),a=Ta().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("+he.getUrl(je.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(o.attr("stroke-dasharray","10,7"),o.attr("marker-end","url("+he.getUrl(je.arrowMarkerAbsolute)+"#"+A3.ReqMarkers.ARROW+"_line_ending)")),xP(t,o,je,`<<${e.type}>>`)},kP=(t,e,r)=>{Object.keys(t).forEach(i=>{let n=t[i];i=ba(i),B.info("Added new requirement: ",i);const s=r.append("g").attr("id",i),a="req-"+i,o=L3(s,a);let l=D3(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 u=o.node().getBBox();e.setNode(i,{width:u.width,height:u.height,shape:"rect",id:i})})},wP=(t,e,r)=>{Object.keys(t).forEach(i=>{let n=t[i];const s=ba(i),a=r.append("g").attr("id",s),o="element-"+s,l=L3(a,o);let u=D3(a,o+"_title",["<<Element>>",`${i}`]);M3(a,o+"_body",[`Type: ${n.type||"Not Specified"}`,`Doc Ref: ${n.docRef||"None"}`],u.y);const d=l.node().getBBox();e.setNode(s,{width:d.width,height:d.height,shape:"rect",id:s})})},TP=(t,e)=>(t.forEach(function(r){let i=ba(r.src),n=ba(r.dst);e.setEdge(i,n,{relationship:r})}),t),EP=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)+" )"))})},ba=t=>t.replace(/\s/g,"").replace(/\./g,"_"),CP=(t,e,r,i)=>{je=$().requirement,i.db.clear(),i.parser.parse(t);const n=je.securityLevel;let s;n==="sandbox"&&(s=At("#i"+e));const o=At(n==="sandbox"?s.nodes()[0].contentDocument.body:"body").select(`[id='${e}']`);A3.insertLineEndings(o,je);const l=new or({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:je.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});let u=i.db.getRequirements(),d=i.db.getElements(),f=i.db.getRelationships();kP(u,l,o),wP(d,l,o),TP(f,l),La(l),EP(o,l),f.forEach(function(w){vP(o,w,l,e,i)});const p=je.rect_padding,g=o.node().getBBox(),_=g.width+p*2,k=g.height+p*2;Ti(o,k,_,je.useMaxWidth),o.attr("viewBox",`${g.x-p} ${g.y-p} ${_} ${k}`)},SP={draw:CP};var D1=function(){var t=function(Ot,Y,U,X){for(U=U||{},X=Ot.length;X--;U[Ot[X]]=Y);return U},e=[1,2],r=[1,3],i=[1,5],n=[1,7],s=[2,5],a=[1,15],o=[1,17],l=[1,18],u=[1,19],d=[1,21],f=[1,22],p=[1,23],g=[1,29],_=[1,30],k=[1,31],w=[1,32],S=[1,33],A=[1,34],O=[1,35],P=[1,36],W=[1,37],q=[1,38],z=[1,39],H=[1,40],N=[1,43],M=[1,44],C=[1,45],v=[1,46],D=[1,47],m=[1,48],Q=[1,51],b=[1,4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,51,52,53,58,59,60,61,69,79],ct=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,53,58,59,60,61,69,79],Dt=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,52,53,58,59,60,61,69,79],vt=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,51,53,58,59,60,61,69,79],j=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,53,58,59,60,61,69,79],ot=[67,68,69],rt=[1,121],it=[1,4,5,7,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,51,52,53,58,59,60,61,69,79],ut={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,openDirective:11,typeDirective:12,closeDirective:13,":":14,argDirective:15,participant:16,actor:17,AS:18,restOfLine:19,participant_actor:20,signal:21,autonumber:22,NUM:23,off:24,activate:25,deactivate:26,note_statement:27,links_statement:28,link_statement:29,properties_statement:30,details_statement:31,title:32,legacy_title:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,loop:39,end:40,rect:41,opt:42,alt:43,else_sections:44,par:45,par_sections:46,critical:47,option_sections:48,break:49,option:50,and:51,else:52,note:53,placement:54,text2:55,over:56,actor_pair:57,links:58,link:59,properties:60,details:61,spaceList:62,",":63,left_of:64,right_of:65,signaltype:66,"+":67,"-":68,ACTOR:69,SOLID_OPEN_ARROW:70,DOTTED_OPEN_ARROW:71,SOLID_ARROW:72,DOTTED_ARROW:73,SOLID_CROSS:74,DOTTED_CROSS:75,SOLID_POINT:76,DOTTED_POINT:77,TXT:78,open_directive:79,type_directive:80,arg_directive:81,close_directive:82,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",14:":",16:"participant",18:"AS",19:"restOfLine",20:"participant_actor",22:"autonumber",23:"NUM",24:"off",25:"activate",26:"deactivate",32:"title",33:"legacy_title",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",39:"loop",40:"end",41:"rect",42:"opt",43:"alt",45:"par",47:"critical",49:"break",50:"option",51:"and",52:"else",53:"note",56:"over",58:"links",59:"link",60:"properties",61:"details",63:",",64:"left_of",65:"right_of",67:"+",68:"-",69:"ACTOR",70:"SOLID_OPEN_ARROW",71:"DOTTED_OPEN_ARROW",72:"SOLID_ARROW",73:"DOTTED_ARROW",74:"SOLID_CROSS",75:"DOTTED_CROSS",76:"SOLID_POINT",77:"DOTTED_POINT",78:"TXT",79:"open_directive",80:"type_directive",81:"arg_directive",82:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[6,4],[6,6],[10,5],[10,3],[10,5],[10,3],[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],[48,1],[48,4],[46,1],[46,4],[44,1],[44,4],[27,4],[27,4],[28,3],[29,3],[30,3],[31,3],[62,2],[62,1],[57,3],[57,1],[54,1],[54,1],[21,5],[21,5],[21,4],[17,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[55,1],[11,1],[12,1],[15,1],[13,1]],performAction:function(Y,U,X,F,I,L,J){var T=L.length-1;switch(I){case 4:return F.apply(L[T]),L[T];case 5:this.$=[];break;case 6:L[T-1].push(L[T]),this.$=L[T-1];break;case 7:case 8:this.$=L[T];break;case 9:this.$=[];break;case 12:L[T-3].type="addParticipant",L[T-3].description=F.parseMessage(L[T-1]),this.$=L[T-3];break;case 13:L[T-1].type="addParticipant",this.$=L[T-1];break;case 14:L[T-3].type="addActor",L[T-3].description=F.parseMessage(L[T-1]),this.$=L[T-3];break;case 15:L[T-1].type="addActor",this.$=L[T-1];break;case 17:this.$={type:"sequenceIndex",sequenceIndex:Number(L[T-2]),sequenceIndexStep:Number(L[T-1]),sequenceVisible:!0,signalType:F.LINETYPE.AUTONUMBER};break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(L[T-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:F.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:F.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:F.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"activeStart",signalType:F.LINETYPE.ACTIVE_START,actor:L[T-1]};break;case 22:this.$={type:"activeEnd",signalType:F.LINETYPE.ACTIVE_END,actor:L[T-1]};break;case 28:F.setDiagramTitle(L[T].substring(6)),this.$=L[T].substring(6);break;case 29:F.setDiagramTitle(L[T].substring(7)),this.$=L[T].substring(7);break;case 30:this.$=L[T].trim(),F.setAccTitle(this.$);break;case 31:case 32:this.$=L[T].trim(),F.setAccDescription(this.$);break;case 33:L[T-1].unshift({type:"loopStart",loopText:F.parseMessage(L[T-2]),signalType:F.LINETYPE.LOOP_START}),L[T-1].push({type:"loopEnd",loopText:L[T-2],signalType:F.LINETYPE.LOOP_END}),this.$=L[T-1];break;case 34:L[T-1].unshift({type:"rectStart",color:F.parseMessage(L[T-2]),signalType:F.LINETYPE.RECT_START}),L[T-1].push({type:"rectEnd",color:F.parseMessage(L[T-2]),signalType:F.LINETYPE.RECT_END}),this.$=L[T-1];break;case 35:L[T-1].unshift({type:"optStart",optText:F.parseMessage(L[T-2]),signalType:F.LINETYPE.OPT_START}),L[T-1].push({type:"optEnd",optText:F.parseMessage(L[T-2]),signalType:F.LINETYPE.OPT_END}),this.$=L[T-1];break;case 36:L[T-1].unshift({type:"altStart",altText:F.parseMessage(L[T-2]),signalType:F.LINETYPE.ALT_START}),L[T-1].push({type:"altEnd",signalType:F.LINETYPE.ALT_END}),this.$=L[T-1];break;case 37:L[T-1].unshift({type:"parStart",parText:F.parseMessage(L[T-2]),signalType:F.LINETYPE.PAR_START}),L[T-1].push({type:"parEnd",signalType:F.LINETYPE.PAR_END}),this.$=L[T-1];break;case 38:L[T-1].unshift({type:"criticalStart",criticalText:F.parseMessage(L[T-2]),signalType:F.LINETYPE.CRITICAL_START}),L[T-1].push({type:"criticalEnd",signalType:F.LINETYPE.CRITICAL_END}),this.$=L[T-1];break;case 39:L[T-1].unshift({type:"breakStart",breakText:F.parseMessage(L[T-2]),signalType:F.LINETYPE.BREAK_START}),L[T-1].push({type:"breakEnd",optText:F.parseMessage(L[T-2]),signalType:F.LINETYPE.BREAK_END}),this.$=L[T-1];break;case 42:this.$=L[T-3].concat([{type:"option",optionText:F.parseMessage(L[T-1]),signalType:F.LINETYPE.CRITICAL_OPTION},L[T]]);break;case 44:this.$=L[T-3].concat([{type:"and",parText:F.parseMessage(L[T-1]),signalType:F.LINETYPE.PAR_AND},L[T]]);break;case 46:this.$=L[T-3].concat([{type:"else",altText:F.parseMessage(L[T-1]),signalType:F.LINETYPE.ALT_ELSE},L[T]]);break;case 47:this.$=[L[T-1],{type:"addNote",placement:L[T-2],actor:L[T-1].actor,text:L[T]}];break;case 48: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:F.PLACEMENT.OVER,actor:L[T-2].slice(0,2),text:L[T]}];break;case 49:this.$=[L[T-1],{type:"addLinks",actor:L[T-1].actor,text:L[T]}];break;case 50:this.$=[L[T-1],{type:"addALink",actor:L[T-1].actor,text:L[T]}];break;case 51:this.$=[L[T-1],{type:"addProperties",actor:L[T-1].actor,text:L[T]}];break;case 52:this.$=[L[T-1],{type:"addDetails",actor:L[T-1].actor,text:L[T]}];break;case 55:this.$=[L[T-2],L[T]];break;case 56:this.$=L[T];break;case 57:this.$=F.PLACEMENT.LEFTOF;break;case 58:this.$=F.PLACEMENT.RIGHTOF;break;case 59: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:F.LINETYPE.ACTIVE_START,actor:L[T-1]}];break;case 60: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:F.LINETYPE.ACTIVE_END,actor:L[T-4]}];break;case 61: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 62:this.$={type:"addParticipant",actor:L[T]};break;case 63:this.$=F.LINETYPE.SOLID_OPEN;break;case 64:this.$=F.LINETYPE.DOTTED_OPEN;break;case 65:this.$=F.LINETYPE.SOLID;break;case 66:this.$=F.LINETYPE.DOTTED;break;case 67:this.$=F.LINETYPE.SOLID_CROSS;break;case 68:this.$=F.LINETYPE.DOTTED_CROSS;break;case 69:this.$=F.LINETYPE.SOLID_POINT;break;case 70:this.$=F.LINETYPE.DOTTED_POINT;break;case 71:this.$=F.parseMessage(L[T].trim().substring(1));break;case 72:F.parseDirective("%%{","open_directive");break;case 73:F.parseDirective(L[T],"type_directive");break;case 74:L[T]=L[T].trim().replace(/'/g,'"'),F.parseDirective(L[T],"arg_directive");break;case 75:F.parseDirective("}%%","close_directive","sequence");break}},table:[{3:1,4:e,5:r,6:4,7:i,11:6,79:n},{1:[3]},{3:8,4:e,5:r,6:4,7:i,11:6,79:n},{3:9,4:e,5:r,6:4,7:i,11:6,79:n},{3:10,4:e,5:r,6:4,7:i,11:6,79:n},t([1,4,5,16,20,22,25,26,32,33,34,36,38,39,41,42,43,45,47,49,53,58,59,60,61,69,79],s,{8:11}),{12:12,80:[1,13]},{80:[2,72]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:_,34:k,36:w,38:S,39:A,41:O,42:P,43:W,45:q,47:z,49:H,53:N,58:M,59:C,60:v,61:D,69:m,79:n},{13:49,14:[1,50],82:Q},t([14,82],[2,73]),t(b,[2,6]),{6:41,10:52,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:_,34:k,36:w,38:S,39:A,41:O,42:P,43:W,45:q,47:z,49:H,53:N,58:M,59:C,60:v,61:D,69:m,79:n},t(b,[2,8]),t(b,[2,9]),{17:53,69:m},{17:54,69:m},{5:[1,55]},{5:[1,58],23:[1,56],24:[1,57]},{17:59,69:m},{17:60,69:m},{5:[1,61]},{5:[1,62]},{5:[1,63]},{5:[1,64]},{5:[1,65]},t(b,[2,28]),t(b,[2,29]),{35:[1,66]},{37:[1,67]},t(b,[2,32]),{19:[1,68]},{19:[1,69]},{19:[1,70]},{19:[1,71]},{19:[1,72]},{19:[1,73]},{19:[1,74]},t(b,[2,40]),{66:75,70:[1,76],71:[1,77],72:[1,78],73:[1,79],74:[1,80],75:[1,81],76:[1,82],77:[1,83]},{54:84,56:[1,85],64:[1,86],65:[1,87]},{17:88,69:m},{17:89,69:m},{17:90,69:m},{17:91,69:m},t([5,18,63,70,71,72,73,74,75,76,77,78],[2,62]),{5:[1,92]},{15:93,81:[1,94]},{5:[2,75]},t(b,[2,7]),{5:[1,96],18:[1,95]},{5:[1,98],18:[1,97]},t(b,[2,16]),{5:[1,100],23:[1,99]},{5:[1,101]},t(b,[2,20]),{5:[1,102]},{5:[1,103]},t(b,[2,23]),t(b,[2,24]),t(b,[2,25]),t(b,[2,26]),t(b,[2,27]),t(b,[2,30]),t(b,[2,31]),t(ct,s,{8:104}),t(ct,s,{8:105}),t(ct,s,{8:106}),t(Dt,s,{44:107,8:108}),t(vt,s,{46:109,8:110}),t(j,s,{48:111,8:112}),t(ct,s,{8:113}),{17:116,67:[1,114],68:[1,115],69:m},t(ot,[2,63]),t(ot,[2,64]),t(ot,[2,65]),t(ot,[2,66]),t(ot,[2,67]),t(ot,[2,68]),t(ot,[2,69]),t(ot,[2,70]),{17:117,69:m},{17:119,57:118,69:m},{69:[2,57]},{69:[2,58]},{55:120,78:rt},{55:122,78:rt},{55:123,78:rt},{55:124,78:rt},t(it,[2,10]),{13:125,82:Q},{82:[2,74]},{19:[1,126]},t(b,[2,13]),{19:[1,127]},t(b,[2,15]),{5:[1,128]},t(b,[2,18]),t(b,[2,19]),t(b,[2,21]),t(b,[2,22]),{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:_,34:k,36:w,38:S,39:A,40:[1,129],41:O,42:P,43:W,45:q,47:z,49:H,53:N,58:M,59:C,60:v,61:D,69:m,79:n},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:_,34:k,36:w,38:S,39:A,40:[1,130],41:O,42:P,43:W,45:q,47:z,49:H,53:N,58:M,59:C,60:v,61:D,69:m,79:n},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:_,34:k,36:w,38:S,39:A,40:[1,131],41:O,42:P,43:W,45:q,47:z,49:H,53:N,58:M,59:C,60:v,61:D,69:m,79:n},{40:[1,132]},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:_,34:k,36:w,38:S,39:A,40:[2,45],41:O,42:P,43:W,45:q,47:z,49:H,52:[1,133],53:N,58:M,59:C,60:v,61:D,69:m,79:n},{40:[1,134]},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:_,34:k,36:w,38:S,39:A,40:[2,43],41:O,42:P,43:W,45:q,47:z,49:H,51:[1,135],53:N,58:M,59:C,60:v,61:D,69:m,79:n},{40:[1,136]},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:_,34:k,36:w,38:S,39:A,40:[2,41],41:O,42:P,43:W,45:q,47:z,49:H,50:[1,137],53:N,58:M,59:C,60:v,61:D,69:m,79:n},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:_,34:k,36:w,38:S,39:A,40:[1,138],41:O,42:P,43:W,45:q,47:z,49:H,53:N,58:M,59:C,60:v,61:D,69:m,79:n},{17:139,69:m},{17:140,69:m},{55:141,78:rt},{55:142,78:rt},{55:143,78:rt},{63:[1,144],78:[2,56]},{5:[2,49]},{5:[2,71]},{5:[2,50]},{5:[2,51]},{5:[2,52]},{5:[1,145]},{5:[1,146]},{5:[1,147]},t(b,[2,17]),t(b,[2,33]),t(b,[2,34]),t(b,[2,35]),t(b,[2,36]),{19:[1,148]},t(b,[2,37]),{19:[1,149]},t(b,[2,38]),{19:[1,150]},t(b,[2,39]),{55:151,78:rt},{55:152,78:rt},{5:[2,61]},{5:[2,47]},{5:[2,48]},{17:153,69:m},t(it,[2,11]),t(b,[2,12]),t(b,[2,14]),t(Dt,s,{8:108,44:154}),t(vt,s,{8:110,46:155}),t(j,s,{8:112,48:156}),{5:[2,59]},{5:[2,60]},{78:[2,55]},{40:[2,46]},{40:[2,44]},{40:[2,42]}],defaultActions:{7:[2,72],8:[2,1],9:[2,2],10:[2,3],51:[2,75],86:[2,57],87:[2,58],94:[2,74],120:[2,49],121:[2,71],122:[2,50],123:[2,51],124:[2,52],141:[2,61],142:[2,47],143:[2,48],151:[2,59],152:[2,60],153:[2,55],154:[2,46],155:[2,44],156:[2,42]},parseError:function(Y,U){if(U.recoverable)this.trace(Y);else{var X=new Error(Y);throw X.hash=U,X}},parse:function(Y){var U=this,X=[0],F=[],I=[null],L=[],J=this.table,T="",ht=0,V=0,Yt=2,et=1,Mt=L.slice.call(arguments,1),Tt=Object.create(this.lexer),gt={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(gt.yy[Et]=this.yy[Et]);Tt.setInput(Y,gt.yy),gt.yy.lexer=Tt,gt.yy.parser=this,typeof Tt.yylloc>"u"&&(Tt.yylloc={});var wt=Tt.yylloc;L.push(wt);var pt=Tt.options&&Tt.options.ranges;typeof gt.yy.parseError=="function"?this.parseError=gt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function st(){var ft;return ft=F.pop()||Tt.lex()||et,typeof ft!="number"&&(ft instanceof Array&&(F=ft,ft=F.pop()),ft=U.symbols_[ft]||ft),ft}for(var le,Xt,jt,Kt,Gt={},Ee,Ht,Vt,Ft;;){if(Xt=X[X.length-1],this.defaultActions[Xt]?jt=this.defaultActions[Xt]:((le===null||typeof le>"u")&&(le=st()),jt=J[Xt]&&J[Xt][le]),typeof jt>"u"||!jt.length||!jt[0]){var xt="";Ft=[];for(Ee in J[Xt])this.terminals_[Ee]&&Ee>Yt&&Ft.push("'"+this.terminals_[Ee]+"'");Tt.showPosition?xt="Parse error on line "+(ht+1)+`:
|
|
1255
|
-
`+Tt.showPosition()+`
|
|
1256
|
-
Expecting `+Ft.join(", ")+", got '"+(this.terminals_[le]||le)+"'":xt="Parse error on line "+(ht+1)+": Unexpected "+(le==et?"end of input":"'"+(this.terminals_[le]||le)+"'"),this.parseError(xt,{text:Tt.match,token:this.terminals_[le]||le,line:Tt.yylineno,loc:wt,expected:Ft})}if(jt[0]instanceof Array&&jt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Xt+", token: "+le);switch(jt[0]){case 1:X.push(le),I.push(Tt.yytext),L.push(Tt.yylloc),X.push(jt[1]),le=null,V=Tt.yyleng,T=Tt.yytext,ht=Tt.yylineno,wt=Tt.yylloc;break;case 2:if(Ht=this.productions_[jt[1]][1],Gt.$=I[I.length-Ht],Gt._$={first_line:L[L.length-(Ht||1)].first_line,last_line:L[L.length-1].last_line,first_column:L[L.length-(Ht||1)].first_column,last_column:L[L.length-1].last_column},pt&&(Gt._$.range=[L[L.length-(Ht||1)].range[0],L[L.length-1].range[1]]),Kt=this.performAction.apply(Gt,[T,V,ht,gt.yy,jt[1],I,L].concat(Mt)),typeof Kt<"u")return Kt;Ht&&(X=X.slice(0,-1*Ht*2),I=I.slice(0,-1*Ht),L=L.slice(0,-1*Ht)),X.push(this.productions_[jt[1]][0]),I.push(Gt.$),L.push(Gt._$),Vt=J[X[X.length-2]][X[X.length-1]],X.push(Vt);break;case 3:return!0}}return!0}},bt=function(){var Ot={EOF:1,parseError:function(U,X){if(this.yy.parser)this.yy.parser.parseError(U,X);else throw new Error(U)},setInput:function(Y,U){return this.yy=U||this.yy||{},this._input=Y,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 Y=this._input[0];this.yytext+=Y,this.yyleng++,this.offset++,this.match+=Y,this.matched+=Y;var U=Y.match(/(?:\r\n?|\n).*/g);return U?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Y},unput:function(Y){var U=Y.length,X=Y.split(/(?:\r\n?|\n)/g);this._input=Y+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-U),this.offset-=U;var F=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),X.length-1&&(this.yylineno-=X.length-1);var I=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:X?(X.length===F.length?this.yylloc.first_column:0)+F[F.length-X.length].length-X[0].length:this.yylloc.first_column-U},this.options.ranges&&(this.yylloc.range=[I[0],I[0]+this.yyleng-U]),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).
|
|
1257
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(Y){this.unput(this.match.slice(Y))},pastInput:function(){var Y=this.matched.substr(0,this.matched.length-this.match.length);return(Y.length>20?"...":"")+Y.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var Y=this.match;return Y.length<20&&(Y+=this._input.substr(0,20-Y.length)),(Y.substr(0,20)+(Y.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var Y=this.pastInput(),U=new Array(Y.length+1).join("-");return Y+this.upcomingInput()+`
|
|
1258
|
-
`+U+"^"},test_match:function(Y,U){var X,F,I;if(this.options.backtrack_lexer&&(I={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&&(I.yylloc.range=this.yylloc.range.slice(0))),F=Y[0].match(/(?:\r\n?|\n).*/g),F&&(this.yylineno+=F.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:F?F[F.length-1].length-F[F.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Y[0].length},this.yytext+=Y[0],this.match+=Y[0],this.matches=Y,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(Y[0].length),this.matched+=Y[0],X=this.performAction.call(this,this.yy,this,U,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),X)return X;if(this._backtrack){for(var L in I)this[L]=I[L];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Y,U,X,F;this._more||(this.yytext="",this.match="");for(var I=this._currentRules(),L=0;L<I.length;L++)if(X=this._input.match(this.rules[I[L]]),X&&(!U||X[0].length>U[0].length)){if(U=X,F=L,this.options.backtrack_lexer){if(Y=this.test_match(X,I[L]),Y!==!1)return Y;if(this._backtrack){U=!1;continue}else return!1}else if(!this.options.flex)break}return U?(Y=this.test_match(U,I[F]),Y!==!1?Y:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1259
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var U=this.next();return U||this.lex()},begin:function(U){this.conditionStack.push(U)},popState:function(){var U=this.conditionStack.length-1;return U>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(U){return U=this.conditionStack.length-1-Math.abs(U||0),U>=0?this.conditionStack[U]:"INITIAL"},pushState:function(U){this.begin(U)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(U,X,F,I){switch(F){case 0:return this.begin("open_directive"),79;case 1:return this.begin("type_directive"),80;case 2:return this.popState(),this.begin("arg_directive"),14;case 3:return this.popState(),this.popState(),82;case 4:return 81;case 5:return 5;case 6:break;case 7:break;case 8:break;case 9:break;case 10:break;case 11:return 23;case 12:return this.begin("ID"),16;case 13:return this.begin("ID"),20;case 14:return X.yytext=X.yytext.trim(),this.begin("ALIAS"),69;case 15:return this.popState(),this.popState(),this.begin("LINE"),18;case 16:return this.popState(),this.popState(),5;case 17:return this.begin("LINE"),39;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"),52;case 22:return this.begin("LINE"),45;case 23:return this.begin("LINE"),51;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),50;case 26:return this.begin("LINE"),49;case 27:return this.popState(),19;case 28:return 40;case 29:return 64;case 30:return 65;case 31:return 58;case 32:return 59;case 33:return 60;case 34:return 61;case 35:return 56;case 36:return 53;case 37:return this.begin("ID"),25;case 38:return this.begin("ID"),26;case 39:return 32;case 40:return 33;case 41:return this.begin("acc_title"),34;case 42:return this.popState(),"acc_title_value";case 43:return this.begin("acc_descr"),36;case 44:return this.popState(),"acc_descr_value";case 45:this.begin("acc_descr_multiline");break;case 46:this.popState();break;case 47:return"acc_descr_multiline_value";case 48:return 7;case 49:return 22;case 50:return 24;case 51:return 63;case 52:return 5;case 53:return X.yytext=X.yytext.trim(),69;case 54:return 72;case 55:return 73;case 56:return 70;case 57:return 71;case 58:return 74;case 59:return 75;case 60:return 76;case 61:return 77;case 62:return 78;case 63:return 67;case 64:return 68;case 65:return 5;case 66: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,/^(?: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:[46,47],inclusive:!1},acc_descr:{rules:[44],inclusive:!1},acc_title:{rules:[42],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,14],inclusive:!1},ALIAS:{rules:[7,8,15,16],inclusive:!1},LINE:{rules:[7,8,27],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,12,13,17,18,19,20,21,22,23,24,25,26,28,29,30,31,32,33,34,35,36,37,38,39,40,41,43,45,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66],inclusive:!0}}};return Ot}();ut.lexer=bt;function K(){this.yy={}}return K.prototype=ut,ut.Parser=K,new K}();D1.parser=D1;const AP=D1,LP=t=>t.match(/^\s*sequenceDiagram/)!==null;let Ha,Pn={},hi=[],Au=!1,M1;const DP=function(t,e,r){ze.parseDirective(this,t,e,r)},N1=function(t,e,r,i){const n=Pn[t];n&&e===n.name&&r==null||((r==null||r.text==null)&&(r={text:e,wrap:null,type:i}),(i==null||r.text==null)&&(r={text:e,wrap:null,type:i}),Pn[t]={name:e,description:r.text,wrap:r.wrap===void 0&&_a()||!!r.wrap,prevActor:Ha,links:{},properties:{},actorCnt:null,rectData:null,type:i||"participant"},Ha&&Pn[Ha]&&(Pn[Ha].nextActor=t),Ha=t)},MP=t=>{let e,r=0;for(e=0;e<hi.length;e++)hi[e].type===Oo.ACTIVE_START&&hi[e].from.actor===t&&r++,hi[e].type===Oo.ACTIVE_END&&hi[e].from.actor===t&&r--;return r},NP=function(t,e,r,i){hi.push({from:t,to:e,message:r.text,wrap:r.wrap===void 0&&_a()||!!r.wrap,answer:i})},Xe=function(t,e,r={text:void 0,wrap:void 0},i){if(i===Oo.ACTIVE_END&&MP(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 hi.push({from:t,to:e,message:r.text,wrap:r.wrap===void 0&&_a()||!!r.wrap,type:i}),!0},BP=function(){return hi},IP=function(){return Pn},Qo=function(t){return Pn[t]},OP=function(){return Object.keys(Pn)},RP=function(){Au=!0},FP=function(){Au=!1},PP=()=>Au,YP=function(t){M1=t},_a=()=>M1!==void 0?M1:$().sequence.wrap,VP=function(){Pn={},hi=[],Au=!1,Ei()},UP=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 B.debug("parseMessage:",r),r},Oo={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},zP={FILLED:0,OPEN:1},WP={LEFTOF:0,RIGHTOF:1,OVER:2},N3=function(t,e,r){r.text,r.wrap===void 0&&_a()||r.wrap;const i=[].concat(t,t);hi.push({from:i[0],to:i[1],message:r.text,wrap:r.wrap===void 0&&_a()||!!r.wrap,type:Oo.NOTE,placement:e})},B3=function(t,e){const r=Qo(t);try{let i=xi(e.text,$());i=i.replace(/&/g,"&"),i=i.replace(/=/g,"=");const n=JSON.parse(i);rd(r,n)}catch(i){B.error("error while parsing actor link text",i)}},HP=function(t,e){const r=Qo(t);try{const a={};let o=xi(e.text,$());var i=o.indexOf("@");o=o.replace(/&/g,"&"),o=o.replace(/=/g,"=");var n=o.slice(0,i-1).trim(),s=o.slice(i+1).trim();a[n]=s,rd(r,a)}catch(a){B.error("error while parsing actor link text",a)}};function rd(t,e){if(t.links==null)t.links=e;else for(let r in e)t.links[r]=e[r]}const I3=function(t,e){const r=Qo(t);try{let i=xi(e.text,$());const n=JSON.parse(i);O3(r,n)}catch(i){B.error("error while parsing actor properties text",i)}};function O3(t,e){if(t.properties==null)t.properties=e;else for(let r in e)t.properties[r]=e[r]}const R3=function(t,e){const r=Qo(t),i=document.getElementById(e.text);try{const n=i.innerHTML,s=JSON.parse(n);s.properties&&O3(r,s.properties),s.links&&rd(r,s.links)}catch(n){B.error("error while parsing actor details text",n)}},GP=function(t,e){if(t!==void 0&&t.properties!==void 0)return t.properties[e]},F3=function(t){if(Array.isArray(t))t.forEach(function(e){F3(e)});else switch(t.type){case"sequenceIndex":hi.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":N1(t.actor,t.actor,t.description,"participant");break;case"addActor":N1(t.actor,t.actor,t.description,"actor");break;case"activeStart":Xe(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":Xe(t.actor,void 0,void 0,t.signalType);break;case"addNote":N3(t.actor,t.placement,t.text);break;case"addLinks":B3(t.actor,t.text);break;case"addALink":HP(t.actor,t.text);break;case"addProperties":I3(t.actor,t.text);break;case"addDetails":R3(t.actor,t.text);break;case"addMessage":Xe(t.from,t.to,t.msg,t.signalType);break;case"loopStart":Xe(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":Xe(void 0,void 0,void 0,t.signalType);break;case"rectStart":Xe(void 0,void 0,t.color,t.signalType);break;case"rectEnd":Xe(void 0,void 0,void 0,t.signalType);break;case"optStart":Xe(void 0,void 0,t.optText,t.signalType);break;case"optEnd":Xe(void 0,void 0,void 0,t.signalType);break;case"altStart":Xe(void 0,void 0,t.altText,t.signalType);break;case"else":Xe(void 0,void 0,t.altText,t.signalType);break;case"altEnd":Xe(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":ri(t.text);break;case"parStart":Xe(void 0,void 0,t.parText,t.signalType);break;case"and":Xe(void 0,void 0,t.parText,t.signalType);break;case"parEnd":Xe(void 0,void 0,void 0,t.signalType);break;case"criticalStart":Xe(void 0,void 0,t.criticalText,t.signalType);break;case"option":Xe(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":Xe(void 0,void 0,void 0,t.signalType);break;case"breakStart":Xe(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":Xe(void 0,void 0,void 0,t.signalType);break}},$2={addActor:N1,addMessage:NP,addSignal:Xe,addLinks:B3,addDetails:R3,addProperties:I3,autoWrap:_a,setWrap:YP,enableSequenceNumbers:RP,disableSequenceNumbers:FP,showSequenceNumbers:PP,getMessages:BP,getActors:IP,getActor:Qo,getActorKeys:OP,getActorProperty:GP,getAccTitle:Ci,getDiagramTitle:Cn,setDiagramTitle:En,parseDirective:DP,getConfig:()=>$().sequence,clear:VP,parseMessage:UP,LINETYPE:Oo,ARROWTYPE:zP,PLACEMENT:WP,addNote:N3,setAccTitle:ri,apply:F3,setAccDescription:Si,getAccDescription:Ai};let B1=[];const qP=t=>{B1.push(t)},P3=()=>{B1.forEach(t=>{t()}),B1=[]},Lu=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},Y3=(t,e)=>{qP(()=>{const r=document.querySelectorAll(t);r.length!==0&&(r[0].addEventListener("mouseover",function(){KP("actor"+e+"_popup")}),r[0].addEventListener("mouseout",function(){ZP("actor"+e+"_popup")}))})},jP=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 u=t.append("g");u.attr("id","actor"+a+"_popup"),u.attr("class","actorPopupMenu"),u.attr("display",l),Y3("#actor"+a+"_popup",a);var d="";o.class!==void 0&&(d=" "+o.class);let f=o.width>r?o.width:r;const p=u.append("rect");if(p.attr("class","actorPopupMenuPanel"+d),p.attr("x",o.x),p.attr("y",o.height),p.attr("fill",o.fill),p.attr("stroke",o.stroke),p.attr("width",f),p.attr("height",o.height),p.attr("rx",o.rx),p.attr("ry",o.ry),s!=null){var g=20;for(let w in s){var _=u.append("a"),k=kn(s[w]);_.attr("xlink:href",k),_.attr("target","_blank"),dY(i)(w,_,o.x+10,o.height+g,f,20,{class:"actor"},i),g+=30}}return p.attr("height",g),{height:o.height+g,width:f}},V3=function(t,e,r,i){const n=t.append("image");n.attr("x",e),n.attr("y",r);var s=kn(i);n.attr("xlink:href",s)},U3=function(t,e,r,i){const n=t.append("use");n.attr("x",e),n.attr("y",r);var s=kn(i);n.attr("xlink:href","#"+s)},$P=function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = 'block'; }"},XP=function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = 'none'; }"},KP=function(t){var e=document.getElementById(t);e!=null&&(e.style.display="block")},ZP=function(t){var e=document.getElementById(t);e!=null&&(e.style.display="none")},xa=function(t,e){let r=0,i=0;const n=e.text.split(he.lineBreakRegex);let s=[],a=0,o=()=>e.y;if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)switch(e.valign){case"top":case"start":o=()=>Math.round(e.y+e.textMargin);break;case"middle":case"center":o=()=>Math.round(e.y+(r+i+e.textMargin)/2);break;case"bottom":case"end":o=()=>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[l,u]of n.entries()){e.textMargin!==void 0&&e.textMargin===0&&e.fontSize!==void 0&&(a=l*e.fontSize);const d=t.append("text");if(d.attr("x",e.x),d.attr("y",o()),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),e.fontSize!==void 0&&d.style("font-size",e.fontSize),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):a!==0&&d.attr("dy",a),e.tspan){const f=d.append("tspan");f.attr("x",e.x),e.fill!==void 0&&f.attr("fill",e.fill),f.text(u)}else d.text(u);e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0&&(i+=(d._groups||d)[0][0].getBBox().height,r=i),s.push(d)}return s},z3=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,xa(t,e),i};let Oi=-1;const W3=(t,e)=>{t.selectAll&&t.selectAll(".actor-line").attr("class","200").attr("y2",e-55)},QP=function(t,e,r){const i=e.x+e.width/2,n=t.append("g");var s=n;e.y===0&&(Oi++,s.append("line").attr("id","actor"+Oi).attr("x1",i).attr("y1",5).attr("x2",i).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"),s=n.append("g"),e.actorCnt=Oi,e.links!=null&&(s.attr("id","root-"+Oi),Y3("#root-"+Oi,Oi)));const a=Du();var o="actor";e.properties!=null&&e.properties.class?o=e.properties.class:a.fill="#eaeaea",a.x=e.x,a.y=e.y,a.width=e.width,a.height=e.height,a.class=o,a.rx=3,a.ry=3;const l=Lu(s,a);if(e.rectData=a,e.properties!=null&&e.properties.icon){const d=e.properties.icon.trim();d.charAt(0)==="@"?U3(s,a.x+a.width-20,a.y+10,d.substr(1)):V3(s,a.x+a.width-20,a.y+10,d)}H3(r)(e.description,s,a.x,a.y,a.width,a.height,{class:"actor"},r);let u=e.height;if(l.node){const d=l.node().getBBox();e.height=d.height,u=d.height}return u},JP=function(t,e,r){const i=e.x+e.width/2;e.y===0&&(Oi++,t.append("line").attr("id","actor"+Oi).attr("x1",i).attr("y1",80).attr("x2",i).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));const n=t.append("g");n.attr("class","actor-man");const s=Du();s.x=e.x,s.y=e.y,s.fill="#eaeaea",s.width=e.width,s.height=e.height,s.class="actor",s.rx=3,s.ry=3,n.append("line").attr("id","actor-man-torso"+Oi).attr("x1",i).attr("y1",e.y+25).attr("x2",i).attr("y2",e.y+45),n.append("line").attr("id","actor-man-arms"+Oi).attr("x1",i-18).attr("y1",e.y+33).attr("x2",i+18).attr("y2",e.y+33),n.append("line").attr("x1",i-18).attr("y1",e.y+60).attr("x2",i).attr("y2",e.y+45),n.append("line").attr("x1",i).attr("y1",e.y+45).attr("x2",i+16).attr("y2",e.y+60);const a=n.append("circle");a.attr("cx",e.x+e.width/2),a.attr("cy",e.y+10),a.attr("r",15),a.attr("width",e.width),a.attr("height",e.height);const o=n.node().getBBox();return e.height=o.height,H3(r)(e.description,n,s.x,s.y+35,s.width,s.height,{class:"actor"},r),e.height},tY=function(t,e,r){switch(e.type){case"actor":return JP(t,e,r);case"participant":return QP(t,e,r)}},eY=function(t){return t.append("g")},rY=function(t,e,r,i,n){const s=Du(),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,Lu(a,s)},iY=function(t,e,r,i){const{boxMargin:n,boxTextMargin:s,labelBoxHeight:a,labelBoxWidth:o,messageFontFamily:l,messageFontSize:u,messageFontWeight:d}=i,f=t.append("g"),p=function(k,w,S,A){return f.append("line").attr("x1",k).attr("y1",w).attr("x2",S).attr("y2",A).attr("class","loopLine")};p(e.startx,e.starty,e.stopx,e.starty),p(e.stopx,e.starty,e.stopx,e.stopy),p(e.startx,e.stopy,e.stopx,e.stopy),p(e.startx,e.starty,e.startx,e.stopy),e.sections!==void 0&&e.sections.forEach(function(k){p(e.startx,k.y,e.stopx,k.y).style("stroke-dasharray","3, 3")});let g=I1();g.text=r,g.x=e.startx,g.y=e.starty,g.fontFamily=l,g.fontSize=u,g.fontWeight=d,g.anchor="middle",g.valign="middle",g.tspan=!1,g.width=o||50,g.height=a||20,g.textMargin=s,g.class="labelText",z3(f,g),g=I1(),g.text=e.title,g.x=e.startx+o/2+(e.stopx-e.startx)/2,g.y=e.starty+n+s,g.anchor="middle",g.valign="middle",g.textMargin=s,g.class="loopText",g.fontFamily=l,g.fontSize=u,g.fontWeight=d,g.wrap=!0;let _=xa(f,g);return e.sectionTitles!==void 0&&e.sectionTitles.forEach(function(k,w){if(k.message){g.text=k.message,g.x=e.startx+(e.stopx-e.startx)/2,g.y=e.sections[w].y+n+s,g.class="loopText",g.anchor="middle",g.valign="middle",g.tspan=!1,g.fontFamily=l,g.fontSize=u,g.fontWeight=d,g.wrap=e.wrap,_=xa(f,g);let S=Math.round(_.map(A=>(A._groups||A)[0][0].getBBox().height).reduce((A,O)=>A+O));e.sections[w].height+=S-(n+s)}}),e.height=Math.round(e.stopy-e.starty),f},nY=function(t,e){Lu(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},sY=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")},aY=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")},oY=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")},lY=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")},cY=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")},uY=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)},hY=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")},I1=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}},Du=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},H3=function(){function t(n,s,a,o,l,u,d){const f=s.append("text").attr("x",a+l/2).attr("y",o+u/2+5).style("text-anchor","middle").text(n);i(f,d)}function e(n,s,a,o,l,u,d,f){const{actorFontSize:p,actorFontFamily:g,actorFontWeight:_}=f;let k=p&&p.replace?p.replace("px",""):p;const w=n.split(he.lineBreakRegex);for(let S=0;S<w.length;S++){const A=S*k-k*(w.length-1)/2,O=s.append("text").attr("x",a+l/2).attr("y",o).style("text-anchor","middle").style("font-size",p).style("font-weight",_).style("font-family",g);O.append("tspan").attr("x",a+l/2).attr("dy",A).text(w[S]),O.attr("y",o+u/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(O,d)}}function r(n,s,a,o,l,u,d,f){const p=s.append("switch"),_=p.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",u).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");_.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,p,a,o,l,u,d,f),i(_,d)}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}}(),dY=function(){function t(n,s,a,o,l,u,d){const f=s.append("text").attr("x",a).attr("y",o).style("text-anchor","start").text(n);i(f,d)}function e(n,s,a,o,l,u,d,f){const{actorFontSize:p,actorFontFamily:g,actorFontWeight:_}=f,k=n.split(he.lineBreakRegex);for(let w=0;w<k.length;w++){const S=w*p-p*(k.length-1)/2,A=s.append("text").attr("x",a).attr("y",o).style("text-anchor","start").style("font-size",p).style("font-weight",_).style("font-family",g);A.append("tspan").attr("x",a).attr("dy",S).text(k[w]),A.attr("y",o+u/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(A,d)}}function r(n,s,a,o,l,u,d,f){const p=s.append("switch"),_=p.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",u).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");_.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,p,a,o,l,u,d,f),i(_,d)}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}}(),qe={drawRect:Lu,drawText:xa,drawLabel:z3,drawActor:tY,drawPopup:jP,drawImage:V3,drawEmbeddedImage:U3,anchorElement:eY,drawActivation:rY,drawLoop:iY,drawBackgroundRect:nY,insertArrowHead:lY,insertArrowFilledHead:cY,insertSequenceNumber:uY,insertArrowCrossHead:hY,insertDatabaseIcon:sY,insertComputerIcon:aY,insertClockIcon:oY,getTextObj:I1,getNoteRect:Du,popupMenu:$P,popdownMenu:XP,fixLifeLineHeights:W3,sanitizeUrl:kn};let lt={};const Bt={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.loops=[],this.messages=[],this.notes=[]},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:[],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,q3($())},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(u){s++;const d=n.sequenceItems.length-s+1;n.updateVal(u,"starty",e-d*lt.boxMargin,Math.min),n.updateVal(u,"stopy",i+d*lt.boxMargin,Math.max),n.updateVal(Bt.data,"startx",t-d*lt.boxMargin,Math.min),n.updateVal(Bt.data,"stopx",r+d*lt.boxMargin,Math.max),o!=="activation"&&(n.updateVal(u,"startx",t-d*lt.boxMargin,Math.min),n.updateVal(u,"stopx",r+d*lt.boxMargin,Math.max),n.updateVal(Bt.data,"starty",e-d*lt.boxMargin,Math.min),n.updateVal(Bt.data,"stopy",i+d*lt.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(Bt.data,"startx",n,Math.min),this.updateVal(Bt.data,"starty",a,Math.min),this.updateVal(Bt.data,"stopx",s,Math.max),this.updateVal(Bt.data,"stopy",o,Math.max),this.updateBounds(n,a,s,o)},newActivation:function(t,e,r){const i=r[t.from.actor],n=Mu(t.from.actor).length||0,s=i.x+i.width/2+(n-1)*lt.activationWidth/2;this.activations.push({startx:s,starty:this.verticalPos+2,stopx:s+lt.activationWidth,stopy:void 0,actor:t.from.actor,anchored:qe.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:Bt.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}}},fY=function(t,e){Bt.bumpVerticalPos(lt.boxMargin),e.height=lt.boxMargin,e.starty=Bt.getVerticalPos();const r=qe.getNoteRect();r.x=e.startx,r.y=e.starty,r.width=e.width||lt.width,r.class="note";const i=t.append("g"),n=qe.drawRect(i,r),s=qe.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=lt.noteFontFamily,s.fontSize=lt.noteFontSize,s.fontWeight=lt.noteFontWeight,s.anchor=lt.noteAlign,s.textMargin=lt.noteMargin,s.valign="center";const a=xa(i,s),o=Math.round(a.map(l=>(l._groups||l)[0][0].getBBox().height).reduce((l,u)=>l+u));n.attr("height",o+2*lt.noteMargin),e.height+=o+2*lt.noteMargin,Bt.bumpVerticalPos(o+2*lt.noteMargin),e.stopy=e.starty+o+2*lt.noteMargin,e.stopx=e.startx+r.width,Bt.insert(e.startx,e.starty,e.stopx,e.stopy),Bt.models.addNote(e)},va=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),Vs=t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),O1=t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight});function pY(t,e){Bt.bumpVerticalPos(10);const{startx:r,stopx:i,message:n}=e,s=he.splitBreaks(n).length,a=ye.calculateTextDimensions(n,va(lt)),o=a.height/s;e.height+=o,Bt.bumpVerticalPos(o);let l,u=a.height-10;const d=a.width;if(r===i){l=Bt.getVerticalPos()+u,lt.rightAngles||(u+=lt.boxMargin,l=Bt.getVerticalPos()+u),u+=30;const f=Math.max(d/2,lt.width/2);Bt.insert(r-f,Bt.getVerticalPos()-10+u,i+f,Bt.getVerticalPos()+30+u)}else u+=lt.boxMargin,l=Bt.getVerticalPos()+u,Bt.insert(r,l-10,i,l);return Bt.bumpVerticalPos(u),e.height+=u,e.stopy=e.starty+e.height,Bt.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),l}const gY=function(t,e,r,i){const{startx:n,stopx:s,starty:a,message:o,type:l,sequenceIndex:u,sequenceVisible:d}=e,f=ye.calculateTextDimensions(o,va(lt)),p=qe.getTextObj();p.x=n,p.y=a+10,p.width=s-n,p.class="messageText",p.dy="1em",p.text=o,p.fontFamily=lt.messageFontFamily,p.fontSize=lt.messageFontSize,p.fontWeight=lt.messageFontWeight,p.anchor=lt.messageAlign,p.valign="center",p.textMargin=lt.wrapPadding,p.tspan=!1,xa(t,p);const g=f.width;let _;n===s?lt.rightAngles?_=t.append("path").attr("d",`M ${n},${r} H ${n+Math.max(lt.width/2,g/2)} V ${r+25} H ${n}`):_=t.append("path").attr("d","M "+n+","+r+" C "+(n+60)+","+(r-10)+" "+(n+60)+","+(r+30)+" "+n+","+(r+20)):(_=t.append("line"),_.attr("x1",n),_.attr("y1",r),_.attr("x2",s),_.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?(_.style("stroke-dasharray","3, 3"),_.attr("class","messageLine1")):_.attr("class","messageLine0");let k="";lt.arrowMarkerAbsolute&&(k=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,k=k.replace(/\(/g,"\\("),k=k.replace(/\)/g,"\\)")),_.attr("stroke-width",2),_.attr("stroke","none"),_.style("fill","none"),(l===i.db.LINETYPE.SOLID||l===i.db.LINETYPE.DOTTED)&&_.attr("marker-end","url("+k+"#arrowhead)"),(l===i.db.LINETYPE.SOLID_POINT||l===i.db.LINETYPE.DOTTED_POINT)&&_.attr("marker-end","url("+k+"#filled-head)"),(l===i.db.LINETYPE.SOLID_CROSS||l===i.db.LINETYPE.DOTTED_CROSS)&&_.attr("marker-end","url("+k+"#crosshead)"),(d||lt.showSequenceNumbers)&&(_.attr("marker-start","url("+k+"#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(u))},R1=function(t,e,r,i,n,s){if(n.hideUnusedParticipants===!0){const u=new Set;s.forEach(d=>{u.add(d.from),u.add(d.to)}),r=r.filter(d=>u.has(d))}let a=0,o=0,l=0;for(const u of r){const d=e[u];d.width=d.width||lt.width,d.height=Math.max(d.height||lt.height,lt.height),d.margin=d.margin||lt.actorMargin,d.x=a+o,d.y=i;const f=qe.drawActor(t,d,lt);l=Math.max(l,f),Bt.insert(d.x,i,d.x+d.width,d.height),a+=d.width,o+=d.margin,Bt.models.addActor(d)}Bt.bumpVerticalPos(l)},G3=function(t,e,r,i){let n=0,s=0;for(const a of r){const o=e[a],l=bY(o),u=qe.drawPopup(t,o,l,lt,lt.forceMenus,i);u.height>n&&(n=u.height),u.width+o.x>s&&(s=u.width+o.x)}return{maxHeight:n,maxWidth:s}},q3=function(t){pr(lt,t),t.fontFamily&&(lt.actorFontFamily=lt.noteFontFamily=lt.messageFontFamily=t.fontFamily),t.fontSize&&(lt.actorFontSize=lt.noteFontSize=lt.messageFontSize=t.fontSize),t.fontWeight&&(lt.actorFontWeight=lt.noteFontWeight=lt.messageFontWeight=t.fontWeight)},Mu=function(t){return Bt.activations.filter(function(e){return e.actor===t})},X2=function(t,e){const r=e[t],i=Mu(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 Ni(t,e,r,i,n){Bt.bumpVerticalPos(r);let s=i;if(e.id&&e.message&&t[e.id]){const a=t[e.id].width,o=va(lt);e.message=ye.wrapLabel(`[${e.message}]`,a-2*lt.wrapPadding,o),e.width=a,e.wrap=!0;const l=ye.calculateTextDimensions(e.message,o),u=Math.max(l.height,lt.labelBoxHeight);s=i+u,B.debug(`${u} - ${e.message}`)}n(e),Bt.bumpVerticalPos(s)}const yY=function(t,e,r,i){const{securityLevel:n,sequence:s}=$();lt=s;let a;n==="sandbox"&&(a=At("#i"+e));const o=At(n==="sandbox"?a.nodes()[0].contentDocument.body:"body"),l=n==="sandbox"?a.nodes()[0].contentDocument:document;Bt.init(),B.debug(i.db);const u=n==="sandbox"?o.select(`[id="${e}"]`):At(`[id="${e}"]`),d=i.db.getActors(),f=i.db.getActorKeys(),p=i.db.getMessages(),g=i.db.getDiagramTitle(),_=mY(d,p,i);lt.height=_Y(d,_),qe.insertComputerIcon(u),qe.insertDatabaseIcon(u),qe.insertClockIcon(u),R1(u,d,f,0,lt,p);const k=kY(p,d,_,i);qe.insertArrowHead(u),qe.insertArrowCrossHead(u),qe.insertArrowFilledHead(u),qe.insertSequenceNumber(u);function w(v,D){const m=Bt.endActivation(v);m.starty+18>D&&(m.starty=D-6,D+=12),qe.drawActivation(u,m,D,lt,Mu(v.from.actor).length),Bt.insert(m.startx,D-10,m.stopx,D)}let S=1,A=1;const O=[];p.forEach(function(v){let D,m,Q;switch(v.type){case i.db.LINETYPE.NOTE:m=v.noteModel,fY(u,m);break;case i.db.LINETYPE.ACTIVE_START:Bt.newActivation(v,u,d);break;case i.db.LINETYPE.ACTIVE_END:w(v,Bt.getVerticalPos());break;case i.db.LINETYPE.LOOP_START:Ni(k,v,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,b=>Bt.newLoop(b));break;case i.db.LINETYPE.LOOP_END:D=Bt.endLoop(),qe.drawLoop(u,D,"loop",lt),Bt.bumpVerticalPos(D.stopy-Bt.getVerticalPos()),Bt.models.addLoop(D);break;case i.db.LINETYPE.RECT_START:Ni(k,v,lt.boxMargin,lt.boxMargin,b=>Bt.newLoop(void 0,b.message));break;case i.db.LINETYPE.RECT_END:D=Bt.endLoop(),qe.drawBackgroundRect(u,D),Bt.models.addLoop(D),Bt.bumpVerticalPos(D.stopy-Bt.getVerticalPos());break;case i.db.LINETYPE.OPT_START:Ni(k,v,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,b=>Bt.newLoop(b));break;case i.db.LINETYPE.OPT_END:D=Bt.endLoop(),qe.drawLoop(u,D,"opt",lt),Bt.bumpVerticalPos(D.stopy-Bt.getVerticalPos()),Bt.models.addLoop(D);break;case i.db.LINETYPE.ALT_START:Ni(k,v,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,b=>Bt.newLoop(b));break;case i.db.LINETYPE.ALT_ELSE:Ni(k,v,lt.boxMargin+lt.boxTextMargin,lt.boxMargin,b=>Bt.addSectionToLoop(b));break;case i.db.LINETYPE.ALT_END:D=Bt.endLoop(),qe.drawLoop(u,D,"alt",lt),Bt.bumpVerticalPos(D.stopy-Bt.getVerticalPos()),Bt.models.addLoop(D);break;case i.db.LINETYPE.PAR_START:Ni(k,v,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,b=>Bt.newLoop(b));break;case i.db.LINETYPE.PAR_AND:Ni(k,v,lt.boxMargin+lt.boxTextMargin,lt.boxMargin,b=>Bt.addSectionToLoop(b));break;case i.db.LINETYPE.PAR_END:D=Bt.endLoop(),qe.drawLoop(u,D,"par",lt),Bt.bumpVerticalPos(D.stopy-Bt.getVerticalPos()),Bt.models.addLoop(D);break;case i.db.LINETYPE.AUTONUMBER:S=v.message.start||S,A=v.message.step||A,v.message.visible?i.db.enableSequenceNumbers():i.db.disableSequenceNumbers();break;case i.db.LINETYPE.CRITICAL_START:Ni(k,v,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,b=>Bt.newLoop(b));break;case i.db.LINETYPE.CRITICAL_OPTION:Ni(k,v,lt.boxMargin+lt.boxTextMargin,lt.boxMargin,b=>Bt.addSectionToLoop(b));break;case i.db.LINETYPE.CRITICAL_END:D=Bt.endLoop(),qe.drawLoop(u,D,"critical",lt),Bt.bumpVerticalPos(D.stopy-Bt.getVerticalPos()),Bt.models.addLoop(D);break;case i.db.LINETYPE.BREAK_START:Ni(k,v,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,b=>Bt.newLoop(b));break;case i.db.LINETYPE.BREAK_END:D=Bt.endLoop(),qe.drawLoop(u,D,"break",lt),Bt.bumpVerticalPos(D.stopy-Bt.getVerticalPos()),Bt.models.addLoop(D);break;default:try{Q=v.msgModel,Q.starty=Bt.getVerticalPos(),Q.sequenceIndex=S,Q.sequenceVisible=i.db.showSequenceNumbers();const b=pY(u,Q);O.push({messageModel:Q,lineStartY:b}),Bt.models.addMessage(Q)}catch(b){B.error("error while drawing message",b)}}[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(v.type)&&(S=S+A)}),O.forEach(v=>gY(u,v.messageModel,v.lineStartY,i)),lt.mirrorActors&&(Bt.bumpVerticalPos(lt.boxMargin*2),R1(u,d,f,Bt.getVerticalPos(),lt,p),Bt.bumpVerticalPos(lt.boxMargin),W3(u,Bt.getVerticalPos()));const P=G3(u,d,f,l),{bounds:W}=Bt.getBounds();B.debug("For line height fix Querying: #"+e+" .actor-line"),X1("#"+e+" .actor-line").attr("y2",W.stopy);let z=W.stopy-W.starty;z<P.maxHeight&&(z=P.maxHeight);let H=z+2*lt.diagramMarginY;lt.mirrorActors&&(H=H-lt.boxMargin+lt.bottomMarginAdj);let N=W.stopx-W.startx;N<P.maxWidth&&(N=P.maxWidth);const M=N+2*lt.diagramMarginX;g&&u.append("text").text(g).attr("x",(W.stopx-W.startx)/2-2*lt.diagramMarginX).attr("y",-25),Ti(u,H,M,lt.useMaxWidth);const C=g?40:0;u.attr("viewBox",W.startx-lt.diagramMarginX+" -"+(lt.diagramMarginY+C)+" "+M+" "+(H+C)),B.debug("models:",Bt.models)};function mY(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?Vs(lt):va(lt),u=n.wrap?ye.wrapLabel(n.message,lt.width-2*lt.wrapPadding,l):n.message,f=ye.calculateTextDimensions(u,l).width+2*lt.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)))}}),B.debug("maxMessageWidthPerActor:",i),i}const bY=function(t){let e=0;const r=O1(lt);for(const i in t.links){const s=ye.calculateTextDimensions(i,r).width+2*lt.wrapPadding+2*lt.boxMargin;e<s&&(e=s)}return e};function _Y(t,e){let r=0;Object.keys(t).forEach(i=>{const n=t[i];n.wrap&&(n.description=ye.wrapLabel(n.description,lt.width-2*lt.wrapPadding,O1(lt)));const s=ye.calculateTextDimensions(n.description,O1(lt));n.width=n.wrap?lt.width:Math.max(lt.width,s.width+2*lt.wrapPadding),n.height=n.wrap?Math.max(s.height,lt.height):lt.height,r=Math.max(r,n.height)});for(const i in e){const n=t[i];if(!n)continue;const s=t[n.nextActor];if(!s)continue;const o=e[i]+lt.actorMargin-n.width/2-s.width/2;n.margin=Math.max(o,lt.actorMargin)}return Math.max(r,lt.height)}const xY=function(t,e,r){const i=e[t.from].x,n=e[t.to].x,s=t.wrap&&t.message;let a=ye.calculateTextDimensions(s?ye.wrapLabel(t.message,lt.width,Vs(lt)):t.message,Vs(lt));const o={width:s?lt.width:Math.max(lt.width,a.width+2*lt.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(lt.width,a.width):Math.max(e[t.from].width/2+e[t.to].width/2,a.width+2*lt.noteMargin),o.startx=i+(e[t.from].width+lt.actorMargin)/2):t.placement===r.db.PLACEMENT.LEFTOF?(o.width=Math.max(s?lt.width:e[t.from].width/2+e[t.to].width/2,a.width+2*lt.noteMargin),o.startx=i-o.width+(e[t.from].width-lt.actorMargin)/2):t.to===t.from?(a=ye.calculateTextDimensions(s?ye.wrapLabel(t.message,Math.max(lt.width,e[t.from].width),Vs(lt)):t.message,Vs(lt)),o.width=s?Math.max(lt.width,e[t.from].width):Math.max(e[t.from].width,lt.width,a.width+2*lt.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))+lt.actorMargin,o.startx=i<n?i+e[t.from].width/2-lt.actorMargin/2:n+e[t.to].width/2-lt.actorMargin/2),s&&(o.message=ye.wrapLabel(t.message,o.width-2*lt.wrapPadding,Vs(lt))),B.debug(`NM:[${o.startx},${o.stopx},${o.starty},${o.stopy}:${o.width},${o.height}=${t.message}]`),o},vY=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=X2(t.from,e),s=X2(t.to,e),a=n[0]<=s[0]?1:0,o=n[0]<s[0]?0:1,l=[...n,...s],u=Math.abs(s[o]-n[a]);t.wrap&&t.message&&(t.message=ye.wrapLabel(t.message,Math.max(u+2*lt.wrapPadding,lt.width),va(lt)));const d=ye.calculateTextDimensions(t.message,va(lt));return{width:Math.max(t.wrap?0:d.width+2*lt.wrapPadding,u+2*lt.wrapPadding,lt.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)}},kY=function(t,e,r,i){const n={},s=[];let a,o,l;return t.forEach(function(u){switch(u.id=ye.random({length:10}),u.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:u.id,msg:u.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:u.message&&(a=s.pop(),n[a.id]=a,n[u.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[u.from?u.from.actor:u.to.actor],p=Mu(u.from?u.from.actor:u.to.actor).length,g=f.x+f.width/2+(p-1)*lt.activationWidth/2,_={startx:g,stopx:g+lt.activationWidth,actor:u.from.actor,enabled:!0};Bt.activations.push(_)}break;case i.db.LINETYPE.ACTIVE_END:{const f=Bt.activations.map(p=>p.actor).lastIndexOf(u.from.actor);delete Bt.activations.splice(f,1)[0]}break}u.placement!==void 0?(o=xY(u,e,i),u.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))-lt.labelBoxWidth})):(l=vY(u,e,i),u.msgModel=l,l.startx&&l.stopx&&s.length>0&&s.forEach(f=>{if(a=f,l.startx===l.stopx){const p=e[u.from],g=e[u.to];a.from=Math.min(p.x-l.width/2,p.x-p.width/2,a.from),a.to=Math.max(g.x+l.width/2,g.x+p.width/2,a.to),a.width=Math.max(a.width,Math.abs(a.to-a.from))-lt.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)-lt.labelBoxWidth}))}),Bt.activations=[],B.debug("Loop type widths:",n),n},K2={bounds:Bt,drawActors:R1,drawActorsPopup:G3,setConf:q3,draw:yY};var F1=function(){var t=function(j,ot,rt,it){for(rt=rt||{},it=j.length;it--;rt[j[it]]=ot);return rt},e=[1,2],r=[1,3],i=[1,5],n=[1,7],s=[2,5],a=[1,15],o=[1,17],l=[1,21],u=[1,22],d=[1,23],f=[1,24],p=[1,37],g=[1,25],_=[1,26],k=[1,27],w=[1,28],S=[1,29],A=[1,32],O=[1,33],P=[1,34],W=[1,35],q=[1,36],z=[1,39],H=[1,40],N=[1,41],M=[1,42],C=[1,38],v=[1,45],D=[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],m=[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],Q=[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],b=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],ct={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(ot,rt,it,ut,bt,K,Ot){var Y=K.length-1;switch(bt){case 4:return ut.setRootDoc(K[Y]),K[Y];case 5:this.$=[];break;case 6:K[Y]!="nl"&&(K[Y-1].push(K[Y]),this.$=K[Y-1]);break;case 7:case 8:this.$=K[Y];break;case 9:this.$="nl";break;case 12:this.$=K[Y];break;case 13:const I=K[Y-1];I.description=ut.trimColon(K[Y]),this.$=I;break;case 14:this.$={stmt:"relation",state1:K[Y-2],state2:K[Y]};break;case 15:const L=ut.trimColon(K[Y]);this.$={stmt:"relation",state1:K[Y-3],state2:K[Y-1],description:L};break;case 19:this.$={stmt:"state",id:K[Y-3],type:"default",description:"",doc:K[Y-1]};break;case 20:var U=K[Y],X=K[Y-2].trim();if(K[Y].match(":")){var F=K[Y].split(":");U=F[0],X=[X,F[1]]}this.$={stmt:"state",id:U,type:"default",description:X};break;case 21:this.$={stmt:"state",id:K[Y-3],type:"default",description:K[Y-5],doc:K[Y-1]};break;case 22:this.$={stmt:"state",id:K[Y],type:"fork"};break;case 23:this.$={stmt:"state",id:K[Y],type:"join"};break;case 24:this.$={stmt:"state",id:K[Y],type:"choice"};break;case 25:this.$={stmt:"state",id:ut.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:K[Y-1].trim(),note:{position:K[Y-2].trim(),text:K[Y].trim()}};break;case 30:this.$=K[Y].trim(),ut.setAccTitle(this.$);break;case 31:case 32:this.$=K[Y].trim(),ut.setAccDescription(this.$);break;case 33:case 34:this.$={stmt:"classDef",id:K[Y-1].trim(),classes:K[Y].trim()};break;case 35:this.$={stmt:"applyClass",id:K[Y-1].trim(),styleClass:K[Y].trim()};break;case 38:ut.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:ut.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:ut.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:ut.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:K[Y].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:K[Y-2].trim(),classes:[K[Y].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:K[Y-2].trim(),classes:[K[Y].trim()],type:"default",description:""};break;case 50:ut.parseDirective("%%{","open_directive");break;case 51:ut.parseDirective(K[Y],"type_directive");break;case 52:K[Y]=K[Y].trim().replace(/'/g,'"'),ut.parseDirective(K[Y],"arg_directive");break;case 53:ut.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:u,19:d,22:f,24:p,25:g,26:_,27:k,28:w,29:S,32:31,33:A,35:O,37:P,38:W,42:q,45:6,50:z,51:H,52:N,53:M,56:C,60:n},{47:43,48:[1,44],63:v},t([48,63],[2,51]),t(D,[2,6]),{6:30,10:46,11:18,12:19,13:20,16:l,17:u,19:d,22:f,24:p,25:g,26:_,27:k,28:w,29:S,32:31,33:A,35:O,37:P,38:W,42:q,45:6,50:z,51:H,52:N,53:M,56:C,60:n},t(D,[2,8]),t(D,[2,9]),t(D,[2,10]),t(D,[2,11]),t(D,[2,12],{14:[1,47],15:[1,48]}),t(D,[2,16]),{18:[1,49]},t(D,[2,18],{20:[1,50]}),{23:[1,51]},t(D,[2,22]),t(D,[2,23]),t(D,[2,24]),t(D,[2,25]),{30:52,31:[1,53],58:[1,54],59:[1,55]},t(D,[2,28]),t(D,[2,29]),{34:[1,56]},{36:[1,57]},t(D,[2,32]),{39:[1,58],41:[1,59]},{43:[1,60]},t(m,[2,44],{57:[1,61]}),t(m,[2,45],{57:[1,62]}),t(D,[2,38]),t(D,[2,39]),t(D,[2,40]),t(D,[2,41]),t(Q,[2,36]),{49:63,62:[1,64]},t(Q,[2,53]),t(D,[2,7]),t(D,[2,13]),{13:65,24:p,56:C},t(D,[2,17]),t(b,s,{8:66}),{24:[1,67]},{24:[1,68]},{23:[1,69]},{24:[2,48]},{24:[2,49]},t(D,[2,30]),t(D,[2,31]),{40:[1,70]},{40:[1,71]},{44:[1,72]},{24:[1,73]},{24:[1,74]},{47:75,63:v},{63:[2,52]},t(D,[2,14],{14:[1,76]}),{4:a,5:o,6:30,9:14,10:16,11:18,12:19,13:20,16:l,17:u,19:d,21:[1,77],22:f,24:p,25:g,26:_,27:k,28:w,29:S,32:31,33:A,35:O,37:P,38:W,42:q,45:6,50:z,51:H,52:N,53:M,56:C,60:n},t(D,[2,20],{20:[1,78]}),{31:[1,79]},{24:[1,80]},t(D,[2,33]),t(D,[2,34]),t(D,[2,35]),t(m,[2,46]),t(m,[2,47]),t(Q,[2,37]),t(D,[2,15]),t(D,[2,19]),t(b,s,{8:81}),t(D,[2,26]),t(D,[2,27]),{4:a,5:o,6:30,9:14,10:16,11:18,12:19,13:20,16:l,17:u,19:d,21:[1,82],22:f,24:p,25:g,26:_,27:k,28:w,29:S,32:31,33:A,35:O,37:P,38:W,42:q,45:6,50:z,51:H,52:N,53:M,56:C,60:n},t(D,[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(ot,rt){if(rt.recoverable)this.trace(ot);else{var it=new Error(ot);throw it.hash=rt,it}},parse:function(ot){var rt=this,it=[0],ut=[],bt=[null],K=[],Ot=this.table,Y="",U=0,X=0,F=2,I=1,L=K.slice.call(arguments,1),J=Object.create(this.lexer),T={yy:{}};for(var ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ht)&&(T.yy[ht]=this.yy[ht]);J.setInput(ot,T.yy),T.yy.lexer=J,T.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var V=J.yylloc;K.push(V);var Yt=J.options&&J.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function et(){var Kt;return Kt=ut.pop()||J.lex()||I,typeof Kt!="number"&&(Kt instanceof Array&&(ut=Kt,Kt=ut.pop()),Kt=rt.symbols_[Kt]||Kt),Kt}for(var Mt,Tt,gt,Et,wt={},pt,st,le,Xt;;){if(Tt=it[it.length-1],this.defaultActions[Tt]?gt=this.defaultActions[Tt]:((Mt===null||typeof Mt>"u")&&(Mt=et()),gt=Ot[Tt]&&Ot[Tt][Mt]),typeof gt>"u"||!gt.length||!gt[0]){var jt="";Xt=[];for(pt in Ot[Tt])this.terminals_[pt]&&pt>F&&Xt.push("'"+this.terminals_[pt]+"'");J.showPosition?jt="Parse error on line "+(U+1)+`:
|
|
1260
|
-
`+J.showPosition()+`
|
|
1261
|
-
Expecting `+Xt.join(", ")+", got '"+(this.terminals_[Mt]||Mt)+"'":jt="Parse error on line "+(U+1)+": Unexpected "+(Mt==I?"end of input":"'"+(this.terminals_[Mt]||Mt)+"'"),this.parseError(jt,{text:J.match,token:this.terminals_[Mt]||Mt,line:J.yylineno,loc:V,expected:Xt})}if(gt[0]instanceof Array&>.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Tt+", token: "+Mt);switch(gt[0]){case 1:it.push(Mt),bt.push(J.yytext),K.push(J.yylloc),it.push(gt[1]),Mt=null,X=J.yyleng,Y=J.yytext,U=J.yylineno,V=J.yylloc;break;case 2:if(st=this.productions_[gt[1]][1],wt.$=bt[bt.length-st],wt._$={first_line:K[K.length-(st||1)].first_line,last_line:K[K.length-1].last_line,first_column:K[K.length-(st||1)].first_column,last_column:K[K.length-1].last_column},Yt&&(wt._$.range=[K[K.length-(st||1)].range[0],K[K.length-1].range[1]]),Et=this.performAction.apply(wt,[Y,X,U,T.yy,gt[1],bt,K].concat(L)),typeof Et<"u")return Et;st&&(it=it.slice(0,-1*st*2),bt=bt.slice(0,-1*st),K=K.slice(0,-1*st)),it.push(this.productions_[gt[1]][0]),bt.push(wt.$),K.push(wt._$),le=Ot[it[it.length-2]][it[it.length-1]],it.push(le);break;case 3:return!0}}return!0}},Dt=function(){var j={EOF:1,parseError:function(rt,it){if(this.yy.parser)this.yy.parser.parseError(rt,it);else throw new Error(rt)},setInput:function(ot,rt){return this.yy=rt||this.yy||{},this._input=ot,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 ot=this._input[0];this.yytext+=ot,this.yyleng++,this.offset++,this.match+=ot,this.matched+=ot;var rt=ot.match(/(?:\r\n?|\n).*/g);return rt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ot},unput:function(ot){var rt=ot.length,it=ot.split(/(?:\r\n?|\n)/g);this._input=ot+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-rt),this.offset-=rt;var ut=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),it.length-1&&(this.yylineno-=it.length-1);var bt=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:it?(it.length===ut.length?this.yylloc.first_column:0)+ut[ut.length-it.length].length-it[0].length:this.yylloc.first_column-rt},this.options.ranges&&(this.yylloc.range=[bt[0],bt[0]+this.yyleng-rt]),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).
|
|
1262
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(ot){this.unput(this.match.slice(ot))},pastInput:function(){var ot=this.matched.substr(0,this.matched.length-this.match.length);return(ot.length>20?"...":"")+ot.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var ot=this.match;return ot.length<20&&(ot+=this._input.substr(0,20-ot.length)),(ot.substr(0,20)+(ot.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var ot=this.pastInput(),rt=new Array(ot.length+1).join("-");return ot+this.upcomingInput()+`
|
|
1263
|
-
`+rt+"^"},test_match:function(ot,rt){var it,ut,bt;if(this.options.backtrack_lexer&&(bt={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&&(bt.yylloc.range=this.yylloc.range.slice(0))),ut=ot[0].match(/(?:\r\n?|\n).*/g),ut&&(this.yylineno+=ut.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ut?ut[ut.length-1].length-ut[ut.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+ot[0].length},this.yytext+=ot[0],this.match+=ot[0],this.matches=ot,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(ot[0].length),this.matched+=ot[0],it=this.performAction.call(this,this.yy,this,rt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),it)return it;if(this._backtrack){for(var K in bt)this[K]=bt[K];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var ot,rt,it,ut;this._more||(this.yytext="",this.match="");for(var bt=this._currentRules(),K=0;K<bt.length;K++)if(it=this._input.match(this.rules[bt[K]]),it&&(!rt||it[0].length>rt[0].length)){if(rt=it,ut=K,this.options.backtrack_lexer){if(ot=this.test_match(it,bt[K]),ot!==!1)return ot;if(this._backtrack){rt=!1;continue}else return!1}else if(!this.options.flex)break}return rt?(ot=this.test_match(rt,bt[ut]),ot!==!1?ot:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1264
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var rt=this.next();return rt||this.lex()},begin:function(rt){this.conditionStack.push(rt)},popState:function(){var rt=this.conditionStack.length-1;return rt>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(rt){return rt=this.conditionStack.length-1-Math.abs(rt||0),rt>=0?this.conditionStack[rt]:"INITIAL"},pushState:function(rt){this.begin(rt)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(rt,it,ut,bt){switch(ut){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(),it.yytext=it.yytext.slice(0,-8).trim(),25;case 39:return this.popState(),it.yytext=it.yytext.slice(0,-8).trim(),26;case 40:return this.popState(),it.yytext=it.yytext.slice(0,-10).trim(),27;case 41:return this.popState(),it.yytext=it.yytext.slice(0,-8).trim(),25;case 42:return this.popState(),it.yytext=it.yytext.slice(0,-8).trim(),26;case 43:return this.popState(),it.yytext=it.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.begin("STATE_STRING");break;case 49:return this.popState(),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(),it.yytext=it.yytext.substr(2).trim(),31;case 69:return this.popState(),it.yytext=it.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 it.yytext=it.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 j}();ct.lexer=Dt;function vt(){this.yy={}}return vt.prototype=ct,ct.Parser=vt,new vt}();F1.parser=F1;const Z2=F1,wY=(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},TY=(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")},EY="LR",CY="TB",zc="state",id="relation",SY="classDef",AY="applyClass",Jo="default",j3="divider",nd="[*]",$3="start",X3=nd,K3="end",Q2="color",J2="fill",LY="bgFill",DY=",";function Z3(){return{}}let Q3=EY,Wc=[],co=Z3();const J3=()=>({relations:[],states:{},documents:{}});let Hc={root:J3()},kr=Hc.root,Ro=0,tp=0;const MY={LINE:0,DOTTED_LINE:1},NY={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},El=t=>JSON.parse(JSON.stringify(t)),BY=function(t,e,r){ze.parseDirective(this,t,e,r)},IY=t=>{B.info("Setting root doc",t),Wc=t},OY=()=>Wc,ql=(t,e,r)=>{if(e.stmt===id)ql(t,e.state1,!0),ql(t,e.state2,!1);else if(e.stmt===zc&&e.id==="[*]"&&(e.id=r?t.id+"_start":t.id+"_end",e.start=r),e.doc){const i=[];let n=[],s;for(s=0;s<e.doc.length;s++)if(e.doc[s].type===j3){const a=El(e.doc[s]);a.doc=El(n),i.push(a),n=[]}else n.push(e.doc[s]);if(i.length>0&&n.length>0){const a={stmt:zc,id:Zy(),type:"divider",doc:El(n)};i.push(El(a)),e.doc=i}e.doc.forEach(a=>ql(e,a,!0))}},RY=()=>(ql({id:"root"},{id:"root",doc:Wc},!0),{id:"root",doc:Wc}),FY=t=>{let e;t.doc?e=t.doc:e=t,B.info(e),t4(!0),B.info("Extract",e),e.forEach(r=>{switch(r.stmt){case zc:ws(r.id,r.type,r.doc,r.description,r.note,r.classes,r.styles,r.textStyles);break;case id:e4(r.state1,r.state2,r.description);break;case SY:r4(r.id,r.classes);break;case AY:sd(r.id,r.styleClass);break}})},ws=function(t,e=Jo,r=null,i=null,n=null,s=null,a=null,o=null){kr.states[t]===void 0?(B.info("Adding state ",t,i),kr.states[t]={id:t,descriptions:[],type:e,doc:r,note:n,classes:[],styles:[],textStyles:[]}):(kr.states[t].doc||(kr.states[t].doc=r),kr.states[t].type||(kr.states[t].type=e)),i&&(B.info("Setting state description",t,i),typeof i=="string"&&V1(t,i.trim()),typeof i=="object"&&i.forEach(l=>V1(t,l.trim()))),n&&(kr.states[t].note=n,kr.states[t].note.text=he.sanitizeText(kr.states[t].note.text,$())),s&&(B.info("Setting state classes",t,s),(typeof s=="string"?[s]:s).forEach(u=>sd(t,u.trim()))),a&&(B.info("Setting state styles",t,a),(typeof a=="string"?[a]:a).forEach(u=>jY(t,u.trim()))),o&&(B.info("Setting state styles",t,a),(typeof o=="string"?[o]:o).forEach(u=>$Y(t,u.trim())))},t4=function(t){Hc={root:J3()},kr=Hc.root,Ro=0,co=Z3(),t||Ei()},Fo=function(t){return kr.states[t]},PY=function(){return kr.states},YY=function(){B.info("Documents = ",Hc)},VY=function(){return kr.relations};function P1(t=""){let e=t;return t===nd&&(Ro++,e=`${$3}${Ro}`),e}function Y1(t="",e=Jo){return t===nd?$3:e}function UY(t=""){let e=t;return t===X3&&(Ro++,e=`${K3}${Ro}`),e}function zY(t="",e=Jo){return t===X3?K3:e}function WY(t,e,r){let i=P1(t.id),n=Y1(t.id,t.type),s=P1(e.id),a=Y1(e.id,e.type);ws(i,n,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),ws(s,a,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),kr.relations.push({id1:i,id2:s,relationTitle:he.sanitizeText(r,$())})}const e4=function(t,e,r){if(typeof t=="object")WY(t,e,r);else{const i=P1(t),n=Y1(t),s=UY(e),a=zY(e);ws(i,n),ws(s,a),kr.relations.push({id1:i,id2:s,title:he.sanitizeText(r,$())})}},V1=function(t,e){const r=kr.states[t],i=e.startsWith(":")?e.replace(":","").trim():e;r.descriptions.push(he.sanitizeText(i,$()))},HY=function(t){return t.substring(0,1)===":"?t.substr(2).trim():t.trim()},GY=()=>(tp++,"divider-id-"+tp),r4=function(t,e=""){co[t]===void 0&&(co[t]={id:t,styles:[],textStyles:[]});const r=co[t];e!=null&&e.split(DY).forEach(i=>{const n=i.replace(/([^;]*);/,"$1").trim();if(i.match(Q2)){const a=n.replace(J2,LY).replace(Q2,J2);r.textStyles.push(a)}r.styles.push(n)})},qY=function(){return co},sd=function(t,e){t.split(",").forEach(function(r){let i=Fo(r);if(i===void 0){const n=r.trim();ws(n),i=Fo(n)}i.classes.push(e)})},jY=function(t,e){const r=Fo(t);r!==void 0&&r.textStyles.push(e)},$Y=function(t,e){const r=Fo(t);r!==void 0&&r.textStyles.push(e)},XY=()=>Q3,KY=t=>{Q3=t},ZY=t=>t&&t[0]===":"?t.substr(1).trim():t.trim(),on={parseDirective:BY,getConfig:()=>$().state,addState:ws,clear:t4,getState:Fo,getStates:PY,getRelations:VY,getClasses:qY,getDirection:XY,addRelation:e4,getDividerId:GY,setDirection:KY,cleanupLabel:HY,lineType:MY,relationType:NY,logDocuments:YY,getRootDoc:OY,setRootDoc:IY,getRootDocV2:RY,extract:FY,trimColon:ZY,getAccTitle:Ci,setAccTitle:ri,getAccDescription:Ai,setAccDescription:Si,addStyleClass:r4,setCssClass:sd,addDescription:V1,setDiagramTitle:En,getDiagramTitle:Cn},QY=t=>t.append("circle").attr("class","start-state").attr("r",$().state.sizeUnit).attr("cx",$().state.padding+$().state.sizeUnit).attr("cy",$().state.padding+$().state.sizeUnit),JY=t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",$().state.textHeight).attr("class","divider").attr("x2",$().state.textHeight*2).attr("y1",0).attr("y2",0),tV=(t,e)=>{const r=t.append("text").attr("x",2*$().state.padding).attr("y",$().state.textHeight+2*$().state.padding).attr("font-size",$().state.fontSize).attr("class","state-title").text(e.id),i=r.node().getBBox();return t.insert("rect",":first-child").attr("x",$().state.padding).attr("y",$().state.padding).attr("width",i.width+2*$().state.padding).attr("height",i.height+2*$().state.padding).attr("rx",$().state.radius),r},eV=(t,e)=>{const r=function(p,g,_){const k=p.append("tspan").attr("x",2*$().state.padding).text(g);_||k.attr("dy",$().state.textHeight)},n=t.append("text").attr("x",2*$().state.padding).attr("y",$().state.textHeight+1.3*$().state.padding).attr("font-size",$().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),s=n.height,a=t.append("text").attr("x",$().state.padding).attr("y",s+$().state.padding*.4+$().state.dividerMargin+$().state.textHeight).attr("class","state-description");let o=!0,l=!0;e.descriptions.forEach(function(p){o||(r(a,p,l),l=!1),o=!1});const u=t.append("line").attr("x1",$().state.padding).attr("y1",$().state.padding+s+$().state.dividerMargin/2).attr("y2",$().state.padding+s+$().state.dividerMargin/2).attr("class","descr-divider"),d=a.node().getBBox(),f=Math.max(d.width,n.width);return u.attr("x2",f+3*$().state.padding),t.insert("rect",":first-child").attr("x",$().state.padding).attr("y",$().state.padding).attr("width",f+2*$().state.padding).attr("height",d.height+s+2*$().state.padding).attr("rx",$().state.radius),t},rV=(t,e,r)=>{const i=$().state.padding,n=2*$().state.padding,s=t.node().getBBox(),a=s.width,o=s.x,l=t.append("text").attr("x",0).attr("y",$().state.titleShift).attr("font-size",$().state.fontSize).attr("class","state-title").text(e.id),d=l.node().getBBox().width+n;let f=Math.max(d,a);f===a&&(f=f+n);let p;const g=t.node().getBBox();e.doc,p=o-i,d>a&&(p=(a-f)/2+i),Math.abs(o-g.x)<i&&d>a&&(p=o-(d-a)/2);const _=1-$().state.textHeight;return t.insert("rect",":first-child").attr("x",p).attr("y",_).attr("class",r?"alt-composit":"composit").attr("width",f).attr("height",g.height+$().state.textHeight+$().state.titleShift+1).attr("rx","0"),l.attr("x",p+i),d<=a&&l.attr("x",o+(f-n)/2-d/2+i),t.insert("rect",":first-child").attr("x",p).attr("y",$().state.titleShift-$().state.textHeight-$().state.padding).attr("width",f).attr("height",$().state.textHeight*3).attr("rx",$().state.radius),t.insert("rect",":first-child").attr("x",p).attr("y",$().state.titleShift-$().state.textHeight-$().state.padding).attr("width",f).attr("height",g.height+3+2*$().state.textHeight).attr("rx",$().state.radius),t},iV=t=>(t.append("circle").attr("class","end-state-outer").attr("r",$().state.sizeUnit+$().state.miniPadding).attr("cx",$().state.padding+$().state.sizeUnit+$().state.miniPadding).attr("cy",$().state.padding+$().state.sizeUnit+$().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",$().state.sizeUnit).attr("cx",$().state.padding+$().state.sizeUnit+2).attr("cy",$().state.padding+$().state.sizeUnit+2)),nV=(t,e)=>{let r=$().state.forkWidth,i=$().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",$().state.padding).attr("y",$().state.padding)},sV=(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(he.lineBreakRegex);let l=1.25*$().state.noteMargin;for(const u of o){const d=u.trim();if(d.length>0){const f=s.append("tspan");if(f.text(d),l===0){const p=f.node().getBBox();l+=p.height}n+=l,f.attr("x",e+$().state.noteMargin),f.attr("y",r+n+1.25*$().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:n}},aV=(t,e)=>{e.attr("class","state-note");const r=e.append("rect").attr("x",0).attr("y",$().state.padding),i=e.append("g"),{textWidth:n,textHeight:s}=sV(t,0,0,i);return r.attr("height",s+2*$().state.noteMargin),r.attr("width",n+$().state.noteMargin*2),r},ep=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"&&QY(n),e.type==="end"&&iV(n),(e.type==="fork"||e.type==="join")&&nV(n,e),e.type==="note"&&aV(e.note.text,n),e.type==="divider"&&JY(n),e.type==="default"&&e.descriptions.length===0&&tV(n,e),e.type==="default"&&e.descriptions.length>0&&eV(n,e);const s=n.node().getBBox();return i.width=s.width+2*$().state.padding,i.height=s.height+2*$().state.padding,i};let rp=0;const oV=function(t,e,r){const i=function(l){switch(l){case on.relationType.AGGREGATION:return"aggregation";case on.relationType.EXTENSION:return"extension";case on.relationType.COMPOSITION:return"composition";case on.relationType.DEPENDENCY:return"dependency"}};e.points=e.points.filter(l=>!Number.isNaN(l.y));const n=e.points,s=Ta().x(function(l){return l.x}).y(function(l){return l.y}).curve(la),a=t.append("path").attr("d",s(n)).attr("id","edge"+rp).attr("class","transition");let o="";if($().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(on.relationType.DEPENDENCY)+"End)"),r.title!==void 0){const l=t.append("g").attr("class","stateLabel"),{x:u,y:d}=ye.calcLabelPosition(e.points),f=he.getRows(r.title);let p=0;const g=[];let _=0,k=0;for(let A=0;A<=f.length;A++){const O=l.append("text").attr("text-anchor","middle").text(f[A]).attr("x",u).attr("y",d+p),P=O.node().getBBox();_=Math.max(_,P.width),k=Math.min(k,P.x),B.info(P.x,u,d+p),p===0&&(p=O.node().getBBox().height,B.info("Title height",p,d)),g.push(O)}let w=p*f.length;if(f.length>1){const A=(f.length-1)*p*.5;g.forEach((O,P)=>O.attr("y",d+P*p-A)),w=p*f.length}const S=l.node().getBBox();l.insert("rect",":first-child").attr("class","box").attr("x",u-_/2-$().state.padding/2).attr("y",d-w/2-$().state.padding/2-3.5).attr("width",_+$().state.padding).attr("height",w+$().state.padding),B.info(S)}rp++};let Gr;const Th={},lV=function(){},cV=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")},uV=function(t,e,r,i){Gr=$().state;const n=$().securityLevel;let s;n==="sandbox"&&(s=At("#i"+e));const a=At(n==="sandbox"?s.nodes()[0].contentDocument.body:"body"),o=n==="sandbox"?s.nodes()[0].contentDocument:document;B.debug("Rendering diagram "+t);const l=a.select(`[id='${e}']`);cV(l),new or({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel(function(){return{}});const d=i.db.getRootDoc();i4(d,l,void 0,!1,a,o,i);const f=Gr.padding,p=l.node().getBBox(),g=p.width+f*2,_=p.height+f*2,k=g*1.75;Ti(l,_,k,Gr.useMaxWidth),l.attr("viewBox",`${p.x-Gr.padding} ${p.y-Gr.padding} `+g+" "+_)},hV=t=>t?t.length*Gr.fontSizeFactor:1,i4=(t,e,r,i,n,s,a)=>{const o=new or({compound:!0,multigraph:!0});let l,u=!0;for(l=0;l<t.length;l++)if(t[l].stmt==="relation"){u=!1;break}r?o.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:u?1:Gr.edgeLengthFactor,nodeSep:u?1:50,isMultiGraph:!0}):o.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:u?1:Gr.edgeLengthFactor,nodeSep:u?1:50,ranker:"tight-tree",isMultiGraph:!0}),o.setDefaultEdgeLabel(function(){return{}}),a.db.extract(t);const d=a.db.getStates(),f=a.db.getRelations(),p=Object.keys(d);for(const S of p){const A=d[S];r&&(A.parentId=r);let O;if(A.doc){let P=e.append("g").attr("id",A.id).attr("class","stateGroup");O=i4(A.doc,P,A.id,!i,n,s,a);{P=rV(P,A,i);let W=P.node().getBBox();O.width=W.width,O.height=W.height+Gr.padding/2,Th[A.id]={y:Gr.compositTitleSize}}}else O=ep(e,A);if(A.note){const P={descriptions:[],id:A.id+"-note",note:A.note,type:"note"},W=ep(e,P);A.note.position==="left of"?(o.setNode(O.id+"-note",W),o.setNode(O.id,O)):(o.setNode(O.id,O),o.setNode(O.id+"-note",W)),o.setParent(O.id,O.id+"-group"),o.setParent(O.id+"-note",O.id+"-group")}else o.setNode(O.id,O)}B.debug("Count=",o.nodeCount(),o);let g=0;f.forEach(function(S){g++,B.debug("Setting edge",S),o.setEdge(S.id1,S.id2,{relation:S,width:hV(S.title),height:Gr.labelHeight*he.getRows(S.title).length,labelpos:"c"},"id"+g)}),La(o),B.debug("Graph after layout",o.nodes());const _=e.node();o.nodes().forEach(function(S){S!==void 0&&o.node(S)!==void 0?(B.warn("Node "+S+": "+JSON.stringify(o.node(S))),n.select("#"+_.id+" #"+S).attr("transform","translate("+(o.node(S).x-o.node(S).width/2)+","+(o.node(S).y+(Th[S]?Th[S].y:0)-o.node(S).height/2)+" )"),n.select("#"+_.id+" #"+S).attr("data-x-shift",o.node(S).x-o.node(S).width/2),s.querySelectorAll("#"+_.id+" #"+S+" .divider").forEach(O=>{const P=O.parentElement;let W=0,q=0;P&&(P.parentElement&&(W=P.parentElement.getBBox().width),q=parseInt(P.getAttribute("data-x-shift"),10),Number.isNaN(q)&&(q=0)),O.setAttribute("x1",0-q+8),O.setAttribute("x2",W-q-8)})):B.debug("No Node "+S+": "+JSON.stringify(o.node(S)))});let k=_.getBBox();o.edges().forEach(function(S){S!==void 0&&o.edge(S)!==void 0&&(B.debug("Edge "+S.v+" -> "+S.w+": "+JSON.stringify(o.edge(S))),oV(e,o.edge(S),o.edge(S).relation))}),k=_.getBBox();const w={id:r||"root",label:r||"root",width:0,height:0};return w.width=k.width+2*Gr.padding,w.height=k.height+2*Gr.padding,B.debug("Doc rendered",w,o),w},dV={setConf:lV,draw:uV},jl="rect",Eh="rectWithTitle",fV="start",pV="end",gV="divider",yV="roundedWithTitle",mV="note",bV="noteGroup",ka="statediagram",_V="state",xV=`${ka}-${_V}`,n4="transition",vV="note",kV="note-edge",wV=`${n4} ${kV}`,TV=`${ka}-${vV}`,EV="cluster",CV=`${ka}-${EV}`,SV="cluster-alt",AV=`${ka}-${SV}`,s4="parent",a4="note",LV="state",ad="----",DV=`${ad}${a4}`,ip=`${ad}${s4}`,o4="fill:none",l4="fill: #333",c4="c",u4="text",h4="normal";let $l={},Fn=0;const MV=function(t){const e=Object.keys(t);for(const r of e)t[r]},NV=function(t,e){B.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 BV(t){return t==null?"":t.classes?t.classes.join(" "):""}function Ch(t="",e=0,r="",i=ad){const n=r!==null&&r.length>0?`${i}${r}`:"";return`${LV}-${t}${n}-${e}`}const Za=(t,e,r,i,n,s)=>{const a=r.id,o=BV(i[a]);if(a!=="root"){let l=jl;r.start===!0&&(l=fV),r.start===!1&&(l=pV),r.type!==Jo&&(l=r.type),$l[a]||($l[a]={id:a,shape:l,description:he.sanitizeText(a,$()),classes:`${o} ${xV}`});const u=$l[a];r.description&&(Array.isArray(u.description)?(u.shape=Eh,u.description.push(r.description)):u.description.length>0?(u.shape=Eh,u.description===a?u.description=[r.description]:u.description=[u.description,r.description]):(u.shape=jl,u.description=r.description),u.description=he.sanitizeTextOrArray(u.description,$())),u.description.length===1&&u.shape===Eh&&(u.shape=jl),!u.type&&r.doc&&(B.info("Setting cluster for ",a,U1(r)),u.type="group",u.dir=U1(r),u.shape=r.type===j3?gV:yV,u.classes=u.classes+" "+CV+" "+(s?AV:""));const d={labelStyle:"",shape:u.shape,labelText:u.description,classes:u.classes,style:"",id:a,dir:u.dir,domId:Ch(a,Fn),type:u.type,padding:15};if(r.note){const f={labelStyle:"",shape:mV,labelText:r.note.text,classes:TV,style:"",id:a+DV+"-"+Fn,domId:Ch(a,Fn,a4),type:u.type,padding:15},p={labelStyle:"",shape:bV,labelText:r.note.text,classes:u.classes,style:"",id:a+ip,domId:Ch(a,Fn,s4),type:"group",padding:0};Fn++;const g=a+ip;t.setNode(g,p),t.setNode(f.id,f),t.setNode(a,d),t.setParent(a,g),t.setParent(f.id,g);let _=a,k=f.id;r.note.position==="left of"&&(_=f.id,k=a),t.setEdge(_,k,{arrowhead:"none",arrowType:"",style:o4,labelStyle:"",classes:wV,arrowheadStyle:l4,labelpos:c4,labelType:u4,thickness:h4})}else t.setNode(a,d)}e&&e.id!=="root"&&(B.trace("Setting node ",a," to be child of its parent ",e.id),t.setParent(a,e.id)),r.doc&&(B.trace("Adding nodes children "),IV(t,r,r.doc,i,n,!s))},IV=(t,e,r,i,n,s)=>{B.trace("items",r),r.forEach(a=>{switch(a.stmt){case zc:Za(t,e,a,i,n,s);break;case Jo:Za(t,e,a,i,n,s);break;case id:{Za(t,e,a.state1,i,n,s),Za(t,e,a.state2,i,n,s);const o={id:"edge"+Fn,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:o4,labelStyle:"",label:he.sanitizeText(a.description,$()),arrowheadStyle:l4,labelpos:c4,labelType:u4,thickness:h4,classes:n4};t.setEdge(a.state1.id,a.state2.id,o,Fn),Fn++}break}})},U1=(t,e=CY)=>{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},OV=function(t,e,r,i){B.info("Drawing state diagram (v2)",e),$l={},i.db.getDirection();const{securityLevel:n,state:s}=$(),a=s.nodeSpacing||50,o=s.rankSpacing||50;B.info(i.db.getRootDocV2()),i.db.extract(i.db.getRootDocV2()),B.info(i.db.getRootDocV2());const l=i.db.getStates(),u=new or({multigraph:!0,compound:!0}).setGraph({rankdir:U1(i.db.getRootDocV2()),nodesep:a,ranksep:o,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});Za(u,void 0,i.db.getRootDocV2(),l,i.db,!0);let d;n==="sandbox"&&(d=At("#i"+e));const f=At(n==="sandbox"?d.nodes()[0].contentDocument.body:"body"),p=f.select(`[id="${e}"]`),g=f.select("#"+e+" g");U0(g,u,["barb"],ka,e);const _=8;ye.insertTitle(p,"statediagramTitleText",s.titleTopMargin,i.db.getDiagramTitle());const k=p.node().getBBox(),w=k.width+_*2,S=k.height+_*2;p.attr("class",ka);const A=p.node().getBBox();Ti(p,S,w,s.useMaxWidth);const O=`${A.x-_} ${A.y-_} ${w} ${S}`;B.debug(`viewBox ${O}`),p.attr("viewBox",O);const P=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const W of P){const q=W.getBBox(),z=document.createElementNS("http://www.w3.org/2000/svg",jl);z.setAttribute("rx",0),z.setAttribute("ry",0),z.setAttribute("width",q.width),z.setAttribute("height",q.height),W.insertBefore(z,W.firstChild)}},RV={setConf:MV,getClasses:NV,draw:OV};var z1=function(){var t=function(k,w,S,A){for(S=S||{},A=k.length;A--;S[k[A]]=w);return S},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],u=[1,20],d=[1,24],f=[4,6,9,11,17,18,20,22,23,24,26],p={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(w,S,A,O,P,W,q){var z=W.length-1;switch(P){case 1:return W[z-1];case 3:this.$=[];break;case 4:W[z-1].push(W[z]),this.$=W[z-1];break;case 5:case 6:this.$=W[z];break;case 7:case 8:this.$=[];break;case 11:O.setDiagramTitle(W[z].substr(6)),this.$=W[z].substr(6);break;case 12:this.$=W[z].trim(),O.setAccTitle(this.$);break;case 13:case 14:this.$=W[z].trim(),O.setAccDescription(this.$);break;case 15:O.addSection(W[z].substr(8)),this.$=W[z].substr(8);break;case 16:O.addTask(W[z-1],W[z]),this.$="task";break;case 18:O.parseDirective("%%{","open_directive");break;case 19:O.parseDirective(W[z],"type_directive");break;case 20:W[z]=W[z].trim().replace(/'/g,'"'),O.parseDirective(W[z],"arg_directive");break;case 21:O.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:u,26:r},{1:[2,2]},{14:22,15:[1,23],29:d},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:u,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:d},{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(w,S){if(S.recoverable)this.trace(w);else{var A=new Error(w);throw A.hash=S,A}},parse:function(w){var S=this,A=[0],O=[],P=[null],W=[],q=this.table,z="",H=0,N=0,M=2,C=1,v=W.slice.call(arguments,1),D=Object.create(this.lexer),m={yy:{}};for(var Q in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Q)&&(m.yy[Q]=this.yy[Q]);D.setInput(w,m.yy),m.yy.lexer=D,m.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var b=D.yylloc;W.push(b);var ct=D.options&&D.options.ranges;typeof m.yy.parseError=="function"?this.parseError=m.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Dt(){var U;return U=O.pop()||D.lex()||C,typeof U!="number"&&(U instanceof Array&&(O=U,U=O.pop()),U=S.symbols_[U]||U),U}for(var vt,j,ot,rt,it={},ut,bt,K,Ot;;){if(j=A[A.length-1],this.defaultActions[j]?ot=this.defaultActions[j]:((vt===null||typeof vt>"u")&&(vt=Dt()),ot=q[j]&&q[j][vt]),typeof ot>"u"||!ot.length||!ot[0]){var Y="";Ot=[];for(ut in q[j])this.terminals_[ut]&&ut>M&&Ot.push("'"+this.terminals_[ut]+"'");D.showPosition?Y="Parse error on line "+(H+1)+`:
|
|
1265
|
-
`+D.showPosition()+`
|
|
1266
|
-
Expecting `+Ot.join(", ")+", got '"+(this.terminals_[vt]||vt)+"'":Y="Parse error on line "+(H+1)+": Unexpected "+(vt==C?"end of input":"'"+(this.terminals_[vt]||vt)+"'"),this.parseError(Y,{text:D.match,token:this.terminals_[vt]||vt,line:D.yylineno,loc:b,expected:Ot})}if(ot[0]instanceof Array&&ot.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+vt);switch(ot[0]){case 1:A.push(vt),P.push(D.yytext),W.push(D.yylloc),A.push(ot[1]),vt=null,N=D.yyleng,z=D.yytext,H=D.yylineno,b=D.yylloc;break;case 2:if(bt=this.productions_[ot[1]][1],it.$=P[P.length-bt],it._$={first_line:W[W.length-(bt||1)].first_line,last_line:W[W.length-1].last_line,first_column:W[W.length-(bt||1)].first_column,last_column:W[W.length-1].last_column},ct&&(it._$.range=[W[W.length-(bt||1)].range[0],W[W.length-1].range[1]]),rt=this.performAction.apply(it,[z,N,H,m.yy,ot[1],P,W].concat(v)),typeof rt<"u")return rt;bt&&(A=A.slice(0,-1*bt*2),P=P.slice(0,-1*bt),W=W.slice(0,-1*bt)),A.push(this.productions_[ot[1]][0]),P.push(it.$),W.push(it._$),K=q[A[A.length-2]][A[A.length-1]],A.push(K);break;case 3:return!0}}return!0}},g=function(){var k={EOF:1,parseError:function(S,A){if(this.yy.parser)this.yy.parser.parseError(S,A);else throw new Error(S)},setInput:function(w,S){return this.yy=S||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 S=w.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),w},unput:function(w){var S=w.length,A=w.split(/(?:\r\n?|\n)/g);this._input=w+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-S),this.offset-=S;var O=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 P=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===O.length?this.yylloc.first_column:0)+O[O.length-A.length].length-A[0].length:this.yylloc.first_column-S},this.options.ranges&&(this.yylloc.range=[P[0],P[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).
|
|
1267
|
-
`+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(),S=new Array(w.length+1).join("-");return w+this.upcomingInput()+`
|
|
1268
|
-
`+S+"^"},test_match:function(w,S){var A,O,P;if(this.options.backtrack_lexer&&(P={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&&(P.yylloc.range=this.yylloc.range.slice(0))),O=w[0].match(/(?:\r\n?|\n).*/g),O&&(this.yylineno+=O.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:O?O[O.length-1].length-O[O.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,S,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),A)return A;if(this._backtrack){for(var W in P)this[W]=P[W];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var w,S,A,O;this._more||(this.yytext="",this.match="");for(var P=this._currentRules(),W=0;W<P.length;W++)if(A=this._input.match(this.rules[P[W]]),A&&(!S||A[0].length>S[0].length)){if(S=A,O=W,this.options.backtrack_lexer){if(w=this.test_match(A,P[W]),w!==!1)return w;if(this._backtrack){S=!1;continue}else return!1}else if(!this.options.flex)break}return S?(w=this.test_match(S,P[O]),w!==!1?w:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1269
|
-
`+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,A,O,P){switch(O){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 k}();p.lexer=g;function _(){this.yy={}}return _.prototype=p,p.Parser=_,new _}();z1.parser=z1;const FV=z1,PV=t=>t.match(/^\s*journey/)!==null;let wa="";const od=[],Po=[],Yo=[],YV=function(t,e,r){ze.parseDirective(this,t,e,r)},VV=function(){od.length=0,Po.length=0,wa="",Yo.length=0,Ei()},UV=function(t){wa=t,od.push(t)},zV=function(){return od},WV=function(){let t=np();const e=100;let r=0;for(;!t&&r<e;)t=np(),r++;return Po.push(...Yo),Po},HV=function(){const t=[];return Po.forEach(r=>{r.people&&t.push(...r.people)}),[...new Set(t)].sort()},GV=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:wa,type:wa,people:s,task:t,score:i};Yo.push(a)},qV=function(t){const e={section:wa,type:wa,description:t,task:t,classes:[]};Po.push(e)},np=function(){const t=function(r){return Yo[r].processed};let e=!0;for(const[r,i]of Yo.entries())t(r),e=e&&i.processed;return e},jV=function(){return HV()},sp={parseDirective:YV,getConfig:()=>$().journey,clear:VV,setDiagramTitle:En,getDiagramTitle:Cn,setAccTitle:ri,getAccTitle:Ci,setAccDescription:Si,getAccDescription:Ai,addSection:UV,getSections:zV,getTasks:WV,addTask:GV,addTaskOrg:qV,getActors:jV},Nu=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},$V=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 u=qh().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function a(l){const u=qh().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).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},d4=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},f4=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},XV=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,f4(t,e)},KV=function(t,e,r){const i=t.append("g"),n=ld();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,Nu(i,n),p4(r)(e.text,i,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},r,e.colour)};let ap=-1;const ZV=function(t,e,r){const i=e.x+r.width/2,n=t.append("g");ap++;const s=300+5*30;n.append("line").attr("id","task"+ap).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"),$V(n,{cx:i,cy:300+(5-e.score)*30,score:e.score});const a=ld();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,Nu(n,a);let o=e.x+14;e.people.forEach(l=>{const u=e.actors[l].color,d={cx:o,cy:e.y,r:7,fill:u,stroke:"#000",title:l,pos:e.actors[l].position};d4(n,d),o+=10}),p4(r)(e.task,n,a.x,a.y,a.width,a.height,{class:"task"},r,e.colour)},QV=function(t,e){Nu(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},JV=function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},ld=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},p4=function(){function t(n,s,a,o,l,u,d,f){const p=s.append("text").attr("x",a+l/2).attr("y",o+u/2+5).style("font-color",f).style("text-anchor","middle").text(n);i(p,d)}function e(n,s,a,o,l,u,d,f,p){const{taskFontSize:g,taskFontFamily:_}=f,k=n.split(/<br\s*\/?>/gi);for(let w=0;w<k.length;w++){const S=w*g-g*(k.length-1)/2,A=s.append("text").attr("x",a+l/2).attr("y",o).attr("fill",p).style("text-anchor","middle").style("font-size",g).style("font-family",_);A.append("tspan").attr("x",a+l/2).attr("dy",S).text(k[w]),A.attr("y",o+u/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(A,d)}}function r(n,s,a,o,l,u,d,f){const p=s.append("switch"),_=p.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",u).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");_.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,p,a,o,l,u,d,f),i(_,d)}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}}(),tU=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")},Vo={drawRect:Nu,drawCircle:d4,drawSection:KV,drawText:f4,drawLabel:XV,drawTask:ZV,drawBackgroundRect:QV,getTextObj:JV,getNoteRect:ld,initGraphics:tU},eU=function(t){Object.keys(t).forEach(function(r){Bu[r]=t[r]})},pn={};function rU(t){const e=$().journey;let r=60;Object.keys(pn).forEach(i=>{const n=pn[i].color,s={cx:20,cy:r,r:7,fill:n,stroke:"#000",pos:pn[i].position};Vo.drawCircle(t,s);const a={x:40,y:r+7,fill:"#666",text:i,textMargin:e.boxTextMargin|5};Vo.drawText(t,a),r+=20})}const Bu=$().journey,ls=Bu.leftMargin,iU=function(t,e,r,i){const n=$().journey;i.db.clear(),i.parser.parse(t+`
|
|
1270
|
-
`);const s=$().securityLevel;let a;s==="sandbox"&&(a=At("#i"+e));const o=At(s==="sandbox"?a.nodes()[0].contentDocument.body:"body");Qr.init();const l=o.select("#"+e);Vo.initGraphics(l);const u=i.db.getTasks(),d=i.db.getDiagramTitle(),f=i.db.getActors();for(const S in pn)delete pn[S];let p=0;f.forEach(S=>{pn[S]={color:n.actorColours[p%n.actorColours.length],position:p},p++}),rU(l),Qr.insert(0,0,ls,Object.keys(pn).length*50),nU(l,u,0);const g=Qr.getBounds();d&&l.append("text").text(d).attr("x",ls).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const _=g.stopy-g.starty+2*n.diagramMarginY,k=ls+g.stopx+2*n.diagramMarginX;Ti(l,_,k,n.useMaxWidth),l.append("line").attr("x1",ls).attr("y1",n.height*4).attr("x2",k-ls-4).attr("y2",n.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const w=d?70:0;l.attr("viewBox",`${g.startx} -25 ${k} ${_+w}`),l.attr("preserveAspectRatio","xMinYMin meet"),l.attr("height",_+w+25)},Qr={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=$().journey,s=this;let a=0;function o(l){return function(d){a++;const f=s.sequenceItems.length-a+1;s.updateVal(d,"starty",e-f*n.boxMargin,Math.min),s.updateVal(d,"stopy",i+f*n.boxMargin,Math.max),s.updateVal(Qr.data,"startx",t-f*n.boxMargin,Math.min),s.updateVal(Qr.data,"stopx",r+f*n.boxMargin,Math.max),l!=="activation"&&(s.updateVal(d,"startx",t-f*n.boxMargin,Math.min),s.updateVal(d,"stopx",r+f*n.boxMargin,Math.max),s.updateVal(Qr.data,"starty",e-f*n.boxMargin,Math.min),s.updateVal(Qr.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(Qr.data,"startx",n,Math.min),this.updateVal(Qr.data,"starty",a,Math.min),this.updateVal(Qr.data,"stopx",s,Math.max),this.updateVal(Qr.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}},Sh=Bu.sectionFills,op=Bu.sectionColours,nU=function(t,e,r){const i=$().journey;let n="";const s=i.height*2+i.diagramMarginY,a=r+s;let o=0,l="#CCC",u="black",d=0;for(const[f,p]of e.entries()){if(n!==p.section){l=Sh[o%Sh.length],d=o%Sh.length,u=op[o%op.length];const _={x:f*i.taskMargin+f*i.width+ls,y:50,text:p.section,fill:l,num:d,colour:u};Vo.drawSection(t,_,i),n=p.section,o++}const g=p.people.reduce((_,k)=>(pn[k]&&(_[k]=pn[k]),_),{});p.x=f*i.taskMargin+f*i.width+ls,p.y=a,p.width=i.diagramMarginX,p.height=i.diagramMarginY,p.colour=u,p.fill=l,p.num=d,p.actors=g,Vo.drawTask(t,p,i),Qr.insert(p.x,p.y,p.x+p.width+i.taskMargin,300+5*30)}},lp={setConf:eU,draw:iU};let cp={};const sU=function(t){cp={...cp,...t}},aU=(t,e,r)=>{try{B.debug(`Renering svg for syntax error
|
|
1271
|
-
`);const i=At("#"+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){B.error("Error while rendering info diagram"),B.error(NM(i))}},cd={setConf:sU,draw:aU};let up=!1;const tl=()=>{up||(up=!0,dr("error",{db:{clear:()=>{}},styles:om,renderer:cd,parser:{parser:{yy:{}},parse:()=>{}},init:()=>{}},t=>t.toLowerCase().trim()==="error"),dr("c4",{parser:QN,db:Tm,renderer:M2,styles:pm,init:t=>{M2.setConf(t.c4)}},JN),dr("class",{parser:N2,db:js,renderer:kI,styles:no,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,js.clear()}},GB),dr("classDiagram",{parser:N2,db:js,renderer:RO,styles:no,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,js.clear()}},qB),dr("er",{parser:FO,db:jO,renderer:nR,styles:am},PO),dr("gantt",{parser:XR,db:J0,renderer:DF,styles:lm},KR),dr("info",{parser:MF,db:RF,renderer:PF,styles:cm},YF),dr("pie",{parser:VF,db:XF,renderer:ZF,styles:um},UF),dr("requirement",{parser:QF,db:bP,renderer:SP,styles:hm},JF),dr("sequence",{parser:AP,db:$2,renderer:K2,styles:dm,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.");$2.setWrap(t.wrap),K2.setConf(t.sequence)}},LP),dr("state",{parser:Z2,db:on,renderer:dV,styles:Tc,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,on.clear()}},wY),dr("stateDiagram",{parser:Z2,db:on,renderer:RV,styles:Tc,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,on.clear()}},TY),dr("journey",{parser:FV,db:sp,renderer:lp,styles:fm,init:t=>{lp.setConf(t.journey),sp.clear()}},PV),dr("flowchart",{parser:H2,db:sn,renderer:wh,styles:wc,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,GR.setConf(t.flowchart),sn.clear(),sn.setGen("gen-1")}},sR),dr("flowchart-v2",{parser:H2,db:sn,renderer:wh,styles:wc,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,rm({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),wh.setConf(t.flowchart),sn.clear(),sn.setGen("gen-2")}},aR),dr("gitGraph",{parser:vN,db:UN,renderer:XN,styles:ZN},kN))};class W1{constructor(e,r){Va(this,"type","graph"),Va(this,"parser"),Va(this,"renderer"),Va(this,"db"),Va(this,"detectTypeFailed",!1);var i,n;this.txt=e;const s=$();this.txt=e;try{this.type=C0(e,s)}catch(l){this.handleError(l,r),this.type="error",this.detectTypeFailed=!0}const a=ym(this.type);B.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(dM(l,this.db)),this.parser.parser.yy=this.db,a.init&&(a.init(s),B.debug("Initialized diagram "+this.type,s)),this.txt+=`
|
|
1272
|
-
`,this.parse(this.txt,r)}parse(e,r){var i,n;if(this.detectTypeFailed)return!1;try{return e=e+`
|
|
1273
|
-
`,(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(A0(e)){r(e.str,e.hash);return}r(e)}getParser(){return this.parser}getType(){return this.type}}const ud=(t,e)=>{const r=C0(t,$());try{ym(r)}catch{const n=gM(r);if(!n)throw new Error(`Diagram ${r} not found.`);return n().then(({diagram:s})=>(dr(r,s,void 0),new W1(t,e)))}return new W1(t,e)},hd=W1;function oU(t,e){Js(e)||t.attr("aria-roledescription",e)}function lU(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 dd=["graph","flowchart","flowchart-v2","stateDiagram","stateDiagram-v2"],g4="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",y4="sandbox",m4="loose",cU="http://www.w3.org/2000/svg",b4="http://www.w3.org/1999/xlink",_4="http://www.w3.org/1999/xhtml",uU="100%",hU="100%",dU="border:0;margin:0;",fU="margin:0",pU="allow-top-navigation-by-user-activation allow-popups",gU='The "iframe" tag is not supported by your browser.',x4=["foreignobject"],v4=["dominant-baseline"];function yU(t,e){return tl(),new hd(t,e).parse(t,e)}async function mU(t,e){return tl(),(await ud(t,e)).parse(t,e)}const k4=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},fd=function(t){let e=t;return e=e.replace(/fl°°/g,"&#"),e=e.replace(/fl°/g,"&"),e=e.replace(/¶ß/g,";"),e},hp=(t,e,r=[])=>`
|
|
1274
|
-
.${t} ${e} { ${r.join(" !important; ")} !important; }`,bU=(t,e,r={})=>{var i;let n="";if(t.themeCSS!==void 0&&(n+=`
|
|
1275
|
-
${t.themeCSS}`),t.fontFamily!==void 0&&(n+=`
|
|
1276
|
-
:root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(n+=`
|
|
1277
|
-
:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),!Js(r)&&dd.includes(e)){const l=t.htmlLabels||((i=t.flowchart)==null?void 0:i.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(const u in r){const d=r[u];Js(d.styles)||l.forEach(f=>{n+=hp(d.id,f,d.styles)}),Js(d.textStyles)||(n+=hp(d.id,"tspan",d.textStyles))}}return n},w4=(t,e,r,i)=>{const n=bU(t,e,r),s=mN(e,n,t.themeVariables);return H4(q4(`${i}{${s}}`),G4)},T4=(t="",e,r)=>{let i=t;return!r&&!e&&(i=i.replace(/marker-end="url\(.*?#/g,'marker-end="url(#')),i=fd(i),i=i.replace(/<br>/g,"<br/>"),i},E4=(t="",e)=>{const r=e?e.viewBox.baseVal.height+"px":hU,i=btoa('<body style="'+fU+'">'+t+"</body>");return`<iframe style="width:${uU};height:${r};${dU}" src="data:text/html;base64,${i}" sandbox="${pU}">
|
|
1278
|
-
${gU}
|
|
1279
|
-
</iframe>`},Gc=(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",cU);return n&&a.attr("xmlns:xlink",n),a.append("g"),t};function qc(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const C4=(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()},_U=function(t,e,r,i){var n,s,a,o,l;tl(),So();const u=ye.detectInit(e);u&&(xs(u),L0(u));const d=$();B.debug(d),e.length>((n=d==null?void 0:d.maxTextSize)!=null?n:5e4)&&(e=g4),e=e.replace(/\r\n?/g,`
|
|
1280
|
-
`);const f="#"+t,p="i"+t,g="#"+p,_="d"+t,k="#"+_;let w=At("body");const S=d.securityLevel===y4,A=d.securityLevel===m4,O=d.fontFamily;if(i!==void 0){if(i&&(i.innerHTML=""),S){const vt=qc(At(i),p);w=At(vt.nodes()[0].contentDocument.body),w.node().style.margin=0}else w=At(i);Gc(w,t,_,`font-family: ${O}`,b4)}else{if(C4(document,t,_,p),S){const vt=qc(At("body"),p);w=At(vt.nodes()[0].contentDocument.body),w.node().style.margin=0}else w=At("body");Gc(w,t,_)}e=k4(e);let P,W;try{if(P=ud(e),"then"in P)throw new Error("Diagram is a promise. Use renderAsync.")}catch(vt){P=new hd("error"),W=vt}const q=w.select(k).node(),z=P.type,H=q.firstChild,N=H.firstChild,M=dd.includes(z)?P.renderer.getClasses(e,P):{},C=w4(d,z,M,f),v=document.createElement("style");v.innerHTML=C,H.insertBefore(v,N);try{P.renderer.draw(e,t,kc.version,P)}catch(vt){throw cd.draw(e,t,kc.version),vt}const D=w.select(`${k} svg`),m=(a=(s=P.db).getAccTitle)==null?void 0:a.call(s),Q=(l=(o=P.db).getAccDescription)==null?void 0:l.call(o);S4(z,D,m,Q),w.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",_4);let b=w.select(k).node().innerHTML;if(B.debug("config.arrowMarkerAbsolute",d.arrowMarkerAbsolute),b=T4(b,S,gr(d.arrowMarkerAbsolute)),S){const vt=w.select(k+" svg").node();b=E4(b,vt)}else A||(b=bo.sanitize(b,{ADD_TAGS:x4,ADD_ATTR:v4}));if(r!==void 0)switch(z){case"flowchart":case"flowchart-v2":r(b,sn.bindFunctions);break;case"gantt":r(b,J0.bindFunctions);break;case"class":case"classDiagram":r(b,js.bindFunctions);break;default:r(b)}else B.debug("CB = undefined!");P3();const Dt=At(S?g:k).node();if(Dt&&"remove"in Dt&&Dt.remove(),W)throw W;return b},xU=async function(t,e,r,i){var n,s,a,o,l;tl(),So();const u=ye.detectInit(e);u&&(xs(u),L0(u));const d=$();B.debug(d),e.length>((n=d==null?void 0:d.maxTextSize)!=null?n:5e4)&&(e=g4),e=e.replace(/\r\n?/g,`
|
|
1281
|
-
`);const f="#"+t,p="i"+t,g="#"+p,_="d"+t,k="#"+_;let w=At("body");const S=d.securityLevel===y4,A=d.securityLevel===m4,O=d.fontFamily;if(i!==void 0){if(i&&(i.innerHTML=""),S){const vt=qc(At(i),p);w=At(vt.nodes()[0].contentDocument.body),w.node().style.margin=0}else w=At(i);Gc(w,t,_,`font-family: ${O}`,b4)}else{if(C4(document,t,_,p),S){const vt=qc(At("body"),p);w=At(vt.nodes()[0].contentDocument.body),w.node().style.margin=0}else w=At("body");Gc(w,t,_)}e=k4(e);let P,W;try{P=await ud(e)}catch(vt){P=new hd("error"),W=vt}const q=w.select(k).node(),z=P.type,H=q.firstChild,N=H.firstChild,M=dd.includes(z)?P.renderer.getClasses(e,P):{},C=w4(d,z,M,f),v=document.createElement("style");v.innerHTML=C,H.insertBefore(v,N);try{await P.renderer.draw(e,t,kc.version,P)}catch(vt){throw cd.draw(e,t,kc.version),vt}const D=w.select(`${k} svg`),m=(a=(s=P.db).getAccTitle)==null?void 0:a.call(s),Q=(l=(o=P.db).getAccDescription)==null?void 0:l.call(o);S4(z,D,m,Q),w.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",_4);let b=w.select(k).node().innerHTML;if(B.debug("config.arrowMarkerAbsolute",d.arrowMarkerAbsolute),b=T4(b,S,gr(d.arrowMarkerAbsolute)),S){const vt=w.select(k+" svg").node();b=E4(b,vt)}else A||(b=bo.sanitize(b,{ADD_TAGS:x4,ADD_ATTR:v4}));if(r!==void 0)switch(z){case"flowchart":case"flowchart-v2":r(b,sn.bindFunctions);break;case"gantt":r(b,J0.bindFunctions);break;case"class":case"classDiagram":r(b,js.bindFunctions);break;default:r(b)}else B.debug("CB = undefined!");P3();const Dt=At(S?g:k).node();if(Dt&&"remove"in Dt&&Dt.remove(),W)throw W;return b};let ns={};const vU=function(t,e,r,i){try{if(e!==void 0)switch(e=e.trim(),r){case"open_directive":ns={};break;case"type_directive":if(!ns)throw new Error("currentDirective is undefined");ns.type=e.toLowerCase();break;case"arg_directive":if(!ns)throw new Error("currentDirective is undefined");ns.args=JSON.parse(e);break;case"close_directive":kU(t,ns,i),ns=void 0;break}}catch(n){B.error(`Error while rendering sequenceDiagram directive: ${e} jison context: ${r}`),B.error(n.message)}},kU=function(t,e,r){switch(B.debug(`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])}),B.debug("sanitize in handleDirective",e.args),xs(e.args),B.debug("sanitize in handleDirective (done)",e.args),L0(e.args);break}case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap(e.type==="wrap");break;case"themeCss":B.warn("themeCss encountered");break;default:B.warn(`Unhandled directive: source: '%%{${e.type}: ${JSON.stringify(e.args?e.args:{})}}%%`,e);break}};function wU(t={}){var e;t!=null&&t.fontFamily&&!((e=t.themeVariables)!=null&&e.fontFamily)&&(t.themeVariables={fontFamily:t.fontFamily}),QM(t),t!=null&&t.theme&&t.theme in yn?t.themeVariables=yn[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=yn.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?ZM(t):em();k0(r.logLevel),tl()}function S4(t,e,r,i){oU(e,t),lU(e,r,i,e.attr("id"))}const ze=Object.freeze({render:_U,renderAsync:xU,parse:yU,parseAsync:mU,parseDirective:vU,initialize:wU,getConfig:$,setConfig:rm,getSiteConfig:em,updateSiteConfig:JM,reset:()=>{So()},globalReset:()=>{So(ga)},defaultConfig:ga});k0($().logLevel);So($());let A4=!1;const TU=async function(t,e,r){try{A4?await M4(t,e,r):D4(t,e,r)}catch(i){B.warn("Syntax Error rendering"),A0(i)&&B.warn(i.str),Xr.parseError&&Xr.parseError(i)}},L4=(t,e,r)=>{B.warn(t),A0(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}))},D4=function(t,e,r){const i=ze.getConfig();t&&(Xr.sequenceConfig=t),B.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");B.debug(`Found ${n.length} diagrams`),(t==null?void 0:t.startOnLoad)!==void 0&&(B.debug("Start On Load: "+(t==null?void 0:t.startOnLoad)),ze.updateSiteConfig({startOnLoad:t==null?void 0:t.startOnLoad}));const s=new ye.initIdGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const o=[];for(const l of Array.from(n)){B.info("Rendering diagram: "+l.id);/*! Check if previously processed */if(l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const u=`mermaid-${s.next()}`;a=l.innerHTML,a=ye.entityDecode(a).trim().replace(/<br\s*\/?>/gi,"<br/>");const d=ye.detectInit(a);d&&B.debug("Detected early reinit: ",d);try{ze.render(u,a,(f,p)=>{l.innerHTML=f,r!==void 0&&r(u),p&&p(l)},l)}catch(f){L4(f,o,Xr.parseError)}}if(o.length>0)throw o[0]},EU=t=>{for(const{id:e,detector:r,loader:i}of t)Xy(e,r,i)},CU=async t=>{B.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();dr(i,a,n)}))).filter(i=>i.status==="rejected");if(r.length>0){B.error(`Failed to load ${r.length} external diagrams`);for(const i of r)B.error(i);throw new Error(`Failed to load ${r.length} external diagrams`)}},M4=async function(t,e,r){const i=ze.getConfig();t&&(Xr.sequenceConfig=t),B.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");B.debug(`Found ${n.length} diagrams`),(t==null?void 0:t.startOnLoad)!==void 0&&(B.debug("Start On Load: "+(t==null?void 0:t.startOnLoad)),ze.updateSiteConfig({startOnLoad:t==null?void 0:t.startOnLoad}));const s=new ye.initIdGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const o=[];for(const l of Array.from(n)){B.info("Rendering diagram: "+l.id);/*! Check if previously processed */if(l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const u=`mermaid-${s.next()}`;a=l.innerHTML,a=ye.entityDecode(a).trim().replace(/<br\s*\/?>/gi,"<br/>");const d=ye.detectInit(a);d&&B.debug("Detected early reinit: ",d);try{await ze.renderAsync(u,a,(f,p)=>{l.innerHTML=f,r!==void 0&&r(u),p&&p(l)},l)}catch(f){L4(f,o,Xr.parseError)}}if(o.length>0)throw o[0]},SU=function(t){ze.initialize(t)},AU=async(t,{lazyLoad:e=!0}={})=>{e?EU(t):await CU(t),A4=!0},N4=function(){if(Xr.startOnLoad){const{startOnLoad:t}=ze.getConfig();t&&Xr.init()}};if(typeof document<"u"){/*!
|
|
1282
|
-
* Wait for document loaded before starting the execution
|
|
1283
|
-
*/window.addEventListener("load",N4,!1)}const LU=function(t){Xr.parseError=t},DU=t=>ze.parse(t,Xr.parseError),jc=[];let Ah=!1;const B4=async()=>{if(!Ah){for(Ah=!0;jc.length>0;){const t=jc.shift();if(t)try{await t()}catch(e){B.error("Error executing queue",e)}}Ah=!1}},MU=t=>new Promise((e,r)=>{const i=()=>new Promise((n,s)=>{ze.parseAsync(t,Xr.parseError).then(a=>{n(a),e(a)},a=>{B.error("Error parsing",a),s(a),r(a)})});jc.push(i),B4()}),NU=(t,e,r,i)=>new Promise((n,s)=>{const a=()=>new Promise((o,l)=>{ze.renderAsync(t,e,r,i).then(u=>{o(u),n(u)},u=>{B.error("Error parsing",u),l(u),s(u)})});jc.push(a),B4()}),Xr={startOnLoad:!0,diagrams:{},mermaidAPI:ze,parse:DU,parseAsync:MU,render:ze.render,renderAsync:NU,init:TU,initThrowsErrors:D4,initThrowsErrorsAsync:M4,registerExternalDiagrams:AU,initialize:SU,parseError:void 0,contentLoaded:N4,setParseErrorHandler:LU},BU=dp("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}}));Xr.initialize({startOnLoad:!1,theme:"default",themeCSS:`
|
|
1284
|
-
.clusters #_ rect {
|
|
1285
|
-
fill: transparent;
|
|
1286
|
-
stroke: transparent;
|
|
1287
|
-
}
|
|
1288
|
-
`});const IU=({children:t,...e})=>{const r=Lh.useRef(null);return Lh.useEffect(()=>{Xr.render("mermaid",t,i=>{r.current&&(r.current.innerHTML=i)})},[t]),Cl(BU,{ref:r,...e})},OU=dp(IU)(({theme:t})=>({"#mermaid .node rect":{fill:t.palette.secondary.light,stroke:t.palette.secondary.border},"#mermaid .unleash-logo":{padding:t.spacing(1)}})),RU=t=>t[0]*1e3>new Date().getTime()-6e5,FU=t=>{var n,s;const r=(t.values||[]).filter(a=>RU(a)),i=r.length?parseFloat(r[r.length-1][1]):0;return{label:t.label,reqs:i,type:fp((s=(n=t.metric)==null?void 0:n.endpoint)==null?void 0:s.split("/")[2])}},PU=(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},YU=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:fp((a=s.metric)==null?void 0:a.appName)}}).filter(s=>s.label!=="unknown"))||[]).map(FU).reduce(PU,{});return Object.values(r).map(s=>({...s,reqs:s.reqs.toFixed(2)})).filter(s=>s.reqs!=="0.00")??[]},HU=()=>{j4("Network - Overview");const{themeMode:t}=$4(),{metrics:e}=eb(),r=Lh.useMemo(()=>YU(e),[e]),i=`
|
|
1289
|
-
graph TD
|
|
1290
|
-
subgraph _[ ]
|
|
1291
|
-
direction BT
|
|
1292
|
-
Unleash(<img src='${X4(t==="dark"?Q4:J4)}' width='72' height='72' class='unleash-logo'/><br/>Unleash)
|
|
1293
|
-
${r.map(({label:n,reqs:s,type:a},o)=>`app-${o}("${n.replaceAll('"',""")}") -- ${s} req/s<br>${a} --> Unleash`).join(`
|
|
1294
|
-
`)}
|
|
1295
|
-
end
|
|
1296
|
-
`;return Cl(K4,{condition:r.length===0,show:Cl(Z4,{severity:"warning",children:"No data available."}),elseShow:Cl(OU,{children:i})})};export{HU as NetworkOverview,HU as default};
|