likec4 1.26.2 → 1.27.1
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/README.md +65 -54
- package/__app__/index.html +6 -1
- package/__app__/src/fonts.css +1 -0
- package/__app__/src/main.js +42714 -34537
- package/__app__/src/style.css +1 -1
- package/__app__/src/webcomponent.tsx +103 -0
- package/dist/cli/index.mjs +737 -610
- package/dist/index.d.mts +2 -1
- package/dist/index.mjs +1 -1
- package/dist/shared/likec4.C0T-ybr5.d.mts +10239 -0
- package/dist/shared/likec4.CcbefjP5.mjs +2206 -0
- package/dist/shared/likec4.D_ELXBwW.mjs +227 -0
- package/dist/vite-plugin/index.d.mts +2 -1
- package/dist/vite-plugin/index.mjs +1 -1
- package/icons/aws/activate.js +1 -21
- package/icons/aws/alexa-for-business.js +1 -21
- package/icons/aws/amplify.js +1 -21
- package/icons/aws/apache-mxnet-on-aws.js +1 -21
- package/icons/aws/api-gateway.js +1 -21
- package/icons/aws/app-config.js +1 -21
- package/icons/aws/app-flow.js +1 -21
- package/icons/aws/app-mesh.js +1 -21
- package/icons/aws/app-runner.js +1 -21
- package/icons/aws/app-stream.js +1 -21
- package/icons/aws/app-sync.js +1 -21
- package/icons/aws/application-auto-scaling.js +1 -21
- package/icons/aws/application-composer.js +1 -21
- package/icons/aws/application-cost-profiler.js +1 -21
- package/icons/aws/application-discovery-service.js +1 -21
- package/icons/aws/application-migration-service.js +1 -21
- package/icons/aws/artifact.js +1 -21
- package/icons/aws/athena.js +1 -21
- package/icons/aws/audit-manager.js +1 -21
- package/icons/aws/augmented-ai-a2i.js +1 -21
- package/icons/aws/aurora.js +1 -21
- package/icons/aws/auto-scaling.js +1 -21
- package/icons/aws/backint-agent.js +1 -21
- package/icons/aws/backup.js +1 -21
- package/icons/aws/batch.js +1 -21
- package/icons/aws/billing-conductor.js +1 -21
- package/icons/aws/bottlerocket.js +1 -21
- package/icons/aws/braket.js +1 -21
- package/icons/aws/budgets.js +1 -21
- package/icons/aws/certificate-manager.js +1 -21
- package/icons/aws/chatbot.js +1 -21
- package/icons/aws/chime-sdk.js +1 -21
- package/icons/aws/chime-voice-connector.js +1 -21
- package/icons/aws/chime.js +1 -21
- package/icons/aws/clean-rooms.js +1 -21
- package/icons/aws/client-vpn.js +1 -21
- package/icons/aws/cloud-control-api.js +1 -21
- package/icons/aws/cloud-development-kit.js +1 -21
- package/icons/aws/cloud-directory.js +1 -21
- package/icons/aws/cloud-formation.js +1 -21
- package/icons/aws/cloud-front.js +1 -21
- package/icons/aws/cloud-hsm.js +1 -21
- package/icons/aws/cloud-map.js +1 -21
- package/icons/aws/cloud-search.js +1 -21
- package/icons/aws/cloud-shell.js +1 -21
- package/icons/aws/cloud-trail.js +1 -21
- package/icons/aws/cloud-wan.js +1 -21
- package/icons/aws/cloud-watch.js +1 -21
- package/icons/aws/cloud9.js +1 -21
- package/icons/aws/code-artifact.js +1 -21
- package/icons/aws/code-build.js +1 -21
- package/icons/aws/code-catalyst.js +1 -21
- package/icons/aws/code-commit.js +1 -21
- package/icons/aws/code-deploy.js +1 -21
- package/icons/aws/code-guru.js +1 -21
- package/icons/aws/code-pipeline.js +1 -21
- package/icons/aws/code-star.js +1 -21
- package/icons/aws/code-whisperer.js +1 -21
- package/icons/aws/cognito.js +1 -21
- package/icons/aws/command-line-interface.js +1 -21
- package/icons/aws/comprehend-medical.js +1 -21
- package/icons/aws/comprehend.js +1 -21
- package/icons/aws/compute-optimizer.js +1 -21
- package/icons/aws/config.js +1 -21
- package/icons/aws/connect.js +1 -21
- package/icons/aws/console-mobile-application.js +1 -21
- package/icons/aws/control-tower.js +1 -21
- package/icons/aws/corretto.js +1 -21
- package/icons/aws/cost-and-usage-report.js +1 -21
- package/icons/aws/cost-explorer.js +1 -21
- package/icons/aws/data-exchange.js +1 -21
- package/icons/aws/data-pipeline.js +1 -21
- package/icons/aws/data-sync.js +1 -21
- package/icons/aws/data-zone.js +1 -21
- package/icons/aws/database-migration-service.js +1 -21
- package/icons/aws/deep-composer.js +1 -21
- package/icons/aws/deep-learning-amis.js +1 -21
- package/icons/aws/deep-learning-containers.js +1 -21
- package/icons/aws/deep-lens.js +1 -21
- package/icons/aws/deep-racer.js +1 -21
- package/icons/aws/detective.js +1 -21
- package/icons/aws/dev-ops-guru.js +1 -21
- package/icons/aws/device-farm.js +1 -21
- package/icons/aws/direct-connect.js +1 -21
- package/icons/aws/directory-service.js +1 -21
- package/icons/aws/distro-for-open-telemetry.js +1 -21
- package/icons/aws/document-db.js +1 -21
- package/icons/aws/dynamo-db.js +1 -21
- package/icons/aws/ec2-auto-scaling.js +1 -21
- package/icons/aws/ec2-image-builder.js +1 -21
- package/icons/aws/ec2.js +1 -21
- package/icons/aws/ecs-anywhere.js +1 -21
- package/icons/aws/efs.js +1 -21
- package/icons/aws/eks-anywhere.js +1 -21
- package/icons/aws/eks-cloud.js +1 -21
- package/icons/aws/eks-distro.js +1 -21
- package/icons/aws/elasti-cache.js +1 -21
- package/icons/aws/elastic-beanstalk.js +1 -21
- package/icons/aws/elastic-block-store.js +1 -21
- package/icons/aws/elastic-container-registry.js +1 -21
- package/icons/aws/elastic-container-service.js +1 -21
- package/icons/aws/elastic-disaster-recovery.js +1 -21
- package/icons/aws/elastic-fabric-adapter.js +1 -21
- package/icons/aws/elastic-inference.js +1 -21
- package/icons/aws/elastic-kubernetes-service.js +1 -21
- package/icons/aws/elastic-load-balancing.js +1 -21
- package/icons/aws/elastic-transcoder.js +1 -21
- package/icons/aws/elemental-appliances-software.js +1 -21
- package/icons/aws/elemental-conductor.js +1 -21
- package/icons/aws/elemental-delta.js +1 -21
- package/icons/aws/elemental-link.js +1 -21
- package/icons/aws/elemental-live.js +1 -21
- package/icons/aws/elemental-media-connect.js +1 -21
- package/icons/aws/elemental-media-convert.js +1 -21
- package/icons/aws/elemental-media-live.js +1 -21
- package/icons/aws/elemental-media-package.js +1 -21
- package/icons/aws/elemental-media-store.js +1 -21
- package/icons/aws/elemental-media-tailor.js +1 -21
- package/icons/aws/elemental-server.js +1 -21
- package/icons/aws/emr.js +1 -21
- package/icons/aws/event-bridge.js +1 -21
- package/icons/aws/express-workflows.js +1 -21
- package/icons/aws/fargate.js +1 -21
- package/icons/aws/fault-injection-simulator.js +1 -21
- package/icons/aws/file-cache.js +1 -21
- package/icons/aws/fin-space.js +1 -21
- package/icons/aws/firewall-manager.js +1 -21
- package/icons/aws/forecast.js +1 -21
- package/icons/aws/fraud-detector.js +1 -21
- package/icons/aws/free-rtos.js +1 -21
- package/icons/aws/fsx-for-lustre.js +1 -21
- package/icons/aws/fsx-for-net-app-ontap.js +1 -21
- package/icons/aws/fsx-for-open-zfs.js +1 -21
- package/icons/aws/fsx-for-wfs.js +1 -21
- package/icons/aws/fsx.js +1 -21
- package/icons/aws/game-kit.js +1 -21
- package/icons/aws/game-lift.js +1 -21
- package/icons/aws/game-sparks.js +1 -21
- package/icons/aws/genomics-cli.js +1 -21
- package/icons/aws/global-accelerator.js +1 -21
- package/icons/aws/glue-data-brew.js +1 -21
- package/icons/aws/glue-elastic-views.js +1 -21
- package/icons/aws/glue.js +1 -21
- package/icons/aws/ground-station.js +1 -21
- package/icons/aws/guard-duty.js +1 -21
- package/icons/aws/health-lake.js +1 -21
- package/icons/aws/honeycode.js +1 -21
- package/icons/aws/iam-identity-center.js +1 -21
- package/icons/aws/identity-and-access-management.js +1 -21
- package/icons/aws/inspector.js +1 -21
- package/icons/aws/interactive-video-service.js +1 -21
- package/icons/aws/io-t-1-click.js +1 -21
- package/icons/aws/io-t-analytics.js +1 -21
- package/icons/aws/io-t-button.js +1 -21
- package/icons/aws/io-t-core.js +1 -21
- package/icons/aws/io-t-device-defender.js +1 -21
- package/icons/aws/io-t-device-management.js +1 -21
- package/icons/aws/io-t-edu-kit.js +1 -21
- package/icons/aws/io-t-events.js +1 -21
- package/icons/aws/io-t-express-link.js +1 -21
- package/icons/aws/io-t-fleet-wise.js +1 -21
- package/icons/aws/io-t-greengrass.js +1 -21
- package/icons/aws/io-t-robo-runner.js +1 -21
- package/icons/aws/io-t-site-wise.js +1 -21
- package/icons/aws/io-t-things-graph.js +1 -21
- package/icons/aws/io-t-twin-maker.js +1 -37
- package/icons/aws/iq.js +1 -21
- package/icons/aws/kendra.js +1 -21
- package/icons/aws/key-management-service.js +1 -21
- package/icons/aws/keyspaces.js +1 -21
- package/icons/aws/kinesis-data-analytics.js +1 -21
- package/icons/aws/kinesis-data-streams.js +1 -21
- package/icons/aws/kinesis-firehose.js +1 -21
- package/icons/aws/kinesis-video-streams.js +1 -21
- package/icons/aws/kinesis.js +1 -21
- package/icons/aws/lake-formation.js +1 -21
- package/icons/aws/lambda.js +1 -21
- package/icons/aws/launch-wizard.js +1 -21
- package/icons/aws/lex.js +1 -21
- package/icons/aws/license-manager.js +1 -21
- package/icons/aws/lightsail.js +1 -21
- package/icons/aws/local-zones.js +1 -21
- package/icons/aws/location-service.js +1 -21
- package/icons/aws/lookout-for-equipment.js +1 -21
- package/icons/aws/lookout-for-metrics.js +1 -21
- package/icons/aws/lookout-for-vision.js +1 -21
- package/icons/aws/lumberyard.js +1 -21
- package/icons/aws/macie.js +1 -21
- package/icons/aws/mainframe-modernization.js +1 -21
- package/icons/aws/managed-blockchain.js +1 -21
- package/icons/aws/managed-grafana.js +1 -21
- package/icons/aws/managed-service-for-prometheus.js +1 -21
- package/icons/aws/managed-services.js +1 -21
- package/icons/aws/managed-streaming-for-apache-kafka.js +1 -21
- package/icons/aws/managed-workflows-for-apache-airflow.js +1 -21
- package/icons/aws/management-console.js +1 -21
- package/icons/aws/marketplace-dark.js +1 -15
- package/icons/aws/marketplace-light.js +1 -15
- package/icons/aws/memory-db-for-redis.js +1 -21
- package/icons/aws/migration-evaluator.js +1 -21
- package/icons/aws/migration-hub.js +1 -21
- package/icons/aws/monitron.js +1 -21
- package/icons/aws/mq.js +1 -21
- package/icons/aws/neptune.js +1 -21
- package/icons/aws/network-firewall.js +1 -21
- package/icons/aws/neuron.js +1 -21
- package/icons/aws/nice-dcv.js +1 -21
- package/icons/aws/nice-engin-frame.js +1 -21
- package/icons/aws/nimble-studio.js +1 -21
- package/icons/aws/nitro-enclaves.js +1 -21
- package/icons/aws/omics.js +1 -21
- package/icons/aws/open-3d-engine.js +1 -21
- package/icons/aws/open-search-service.js +1 -21
- package/icons/aws/ops-works.js +1 -21
- package/icons/aws/organizations.js +1 -21
- package/icons/aws/outposts-family.js +1 -21
- package/icons/aws/outposts-rack.js +1 -21
- package/icons/aws/outposts-servers.js +1 -21
- package/icons/aws/panorama.js +1 -21
- package/icons/aws/parallel-cluster.js +1 -21
- package/icons/aws/personal-health-dashboard.js +1 -21
- package/icons/aws/personalize.js +1 -21
- package/icons/aws/pinpoint-apis.js +1 -21
- package/icons/aws/pinpoint.js +1 -21
- package/icons/aws/polly.js +1 -21
- package/icons/aws/private-5g.js +1 -21
- package/icons/aws/private-certificate-authority.js +1 -28
- package/icons/aws/private-link.js +1 -21
- package/icons/aws/professional-services.js +1 -21
- package/icons/aws/proton.js +1 -21
- package/icons/aws/quantum-ledger-database.js +1 -21
- package/icons/aws/quick-sight.js +1 -21
- package/icons/aws/rds-on-vmware.js +1 -21
- package/icons/aws/rds.js +1 -21
- package/icons/aws/re-post.js +1 -21
- package/icons/aws/red-hat-open-shift-service-on-aws.js +1 -21
- package/icons/aws/redshift.js +1 -21
- package/icons/aws/rekognition.js +1 -21
- package/icons/aws/reserved-instance-reporting.js +1 -21
- package/icons/aws/resilience-hub.js +1 -21
- package/icons/aws/resource-access-manager.js +1 -21
- package/icons/aws/resource-explorer.js +1 -21
- package/icons/aws/robo-maker.js +1 -21
- package/icons/aws/route-53.js +1 -21
- package/icons/aws/s3-on-outposts.js +1 -21
- package/icons/aws/sage-maker-ground-truth.js +1 -21
- package/icons/aws/sage-maker-studio-lab.js +1 -21
- package/icons/aws/sage-maker.js +1 -21
- package/icons/aws/savings-plans.js +1 -21
- package/icons/aws/secrets-manager.js +1 -21
- package/icons/aws/security-hub.js +1 -21
- package/icons/aws/security-lake.js +1 -21
- package/icons/aws/server-migration-service.js +1 -21
- package/icons/aws/serverless-application-repository.js +1 -21
- package/icons/aws/service-catalog.js +1 -21
- package/icons/aws/service-management-connector.js +1 -28
- package/icons/aws/shield.js +1 -21
- package/icons/aws/signer.js +1 -21
- package/icons/aws/sim-space-weaver.js +1 -21
- package/icons/aws/simple-email-service.js +1 -21
- package/icons/aws/simple-notification-service.js +1 -21
- package/icons/aws/simple-queue-service.js +1 -21
- package/icons/aws/simple-storage-service-glacier.js +1 -21
- package/icons/aws/simple-storage-service.js +1 -21
- package/icons/aws/site-to-site-vpn.js +1 -21
- package/icons/aws/snowball-edge.js +1 -21
- package/icons/aws/snowball.js +1 -21
- package/icons/aws/snowcone.js +1 -21
- package/icons/aws/snowmobile.js +1 -21
- package/icons/aws/step-functions.js +1 -21
- package/icons/aws/storage-gateway.js +1 -21
- package/icons/aws/sumerian.js +1 -21
- package/icons/aws/supply-chain.js +1 -21
- package/icons/aws/support.js +1 -21
- package/icons/aws/systems-manager.js +1 -21
- package/icons/aws/tensor-flow-on-aws.js +1 -21
- package/icons/aws/textract.js +1 -21
- package/icons/aws/thinkbox-deadline.js +1 -21
- package/icons/aws/thinkbox-frost.js +1 -21
- package/icons/aws/thinkbox-krakatoa.js +1 -21
- package/icons/aws/thinkbox-sequoia.js +1 -21
- package/icons/aws/thinkbox-stoke.js +1 -21
- package/icons/aws/thinkbox-xmesh.js +1 -21
- package/icons/aws/timestream.js +1 -21
- package/icons/aws/tools-and-sdks.js +1 -21
- package/icons/aws/torch-serve.js +1 -21
- package/icons/aws/training-certification.js +1 -21
- package/icons/aws/transcribe.js +1 -21
- package/icons/aws/transfer-family.js +1 -21
- package/icons/aws/transit-gateway.js +1 -21
- package/icons/aws/translate.js +1 -21
- package/icons/aws/trusted-advisor.js +1 -21
- package/icons/aws/verified-access.js +1 -21
- package/icons/aws/verified-permissions.js +1 -21
- package/icons/aws/virtual-private-cloud.js +1 -21
- package/icons/aws/vmware-cloud-on-aws.js +1 -21
- package/icons/aws/vpc-lattice.js +1 -21
- package/icons/aws/waf.js +1 -21
- package/icons/aws/wavelength.js +1 -21
- package/icons/aws/well-architected-tool.js +1 -21
- package/icons/aws/wickr.js +1 -21
- package/icons/aws/work-docs-sdk.js +1 -21
- package/icons/aws/work-docs.js +1 -21
- package/icons/aws/work-link.js +1 -21
- package/icons/aws/work-mail.js +1 -21
- package/icons/aws/work-spaces-family.js +1 -21
- package/icons/aws/x-ray.js +1 -21
- package/icons/azure/abs-member.js +1 -32
- package/icons/azure/active-directory-connect-health.js +1 -132
- package/icons/azure/activity-log.js +1 -33
- package/icons/azure/administrative-units.js +1 -102
- package/icons/azure/advisor.js +1 -44
- package/icons/azure/ai-studio.js +1 -105
- package/icons/azure/aks-automatic.js +1 -105
- package/icons/azure/aks-istio.js +1 -96
- package/icons/azure/alerts.js +1 -29
- package/icons/azure/all-resources.js +1 -21
- package/icons/azure/analysis-services.js +1 -67
- package/icons/azure/anomaly-detector.js +1 -44
- package/icons/azure/api-center.js +1 -42
- package/icons/azure/api-connections.js +1 -66
- package/icons/azure/api-management-services.js +1 -51
- package/icons/azure/api-proxy.js +1 -32
- package/icons/azure/app-compliance-automation.js +1 -82
- package/icons/azure/app-configuration.js +1 -56
- package/icons/azure/app-registrations.js +1 -39
- package/icons/azure/app-service-certificates.js +1 -42
- package/icons/azure/app-service-domains.js +1 -23
- package/icons/azure/app-service-environments.js +1 -36
- package/icons/azure/app-service-plans.js +1 -66
- package/icons/azure/app-services.js +1 -104
- package/icons/azure/app-space-component.js +1 -39
- package/icons/azure/app-space.js +1 -37
- package/icons/azure/applens.js +1 -45
- package/icons/azure/application-gateway-containers.js +1 -134
- package/icons/azure/application-gateways.js +1 -92
- package/icons/azure/application-group.js +1 -21
- package/icons/azure/application-insights.js +1 -57
- package/icons/azure/application-security-groups.js +1 -54
- package/icons/azure/aquila.js +1 -95
- package/icons/azure/arc-data-services.js +1 -60
- package/icons/azure/arc-kubernetes.js +1 -139
- package/icons/azure/arc-machines.js +1 -40
- package/icons/azure/arc-postgre-sql.js +1 -73
- package/icons/azure/arc-sql-managed-instance.js +1 -75
- package/icons/azure/arc-sql-server.js +1 -40
- package/icons/azure/atm-multistack.js +1 -59
- package/icons/azure/auto-scale.js +1 -43
- package/icons/azure/automanaged-vm.js +1 -65
- package/icons/azure/automation-accounts.js +1 -62
- package/icons/azure/availability-sets.js +1 -70
- package/icons/azure/avs-vm.js +1 -32
- package/icons/azure/azure-a.js +1 -46
- package/icons/azure/azure-ad-b2c.js +1 -129
- package/icons/azure/azure-api-for-fhir.js +1 -33
- package/icons/azure/azure-applied-ai-services.js +1 -81
- package/icons/azure/azure-arc.js +1 -75
- package/icons/azure/azure-attestation.js +1 -35
- package/icons/azure/azure-backup-center.js +1 -63
- package/icons/azure/azure-blockchain-service.js +1 -51
- package/icons/azure/azure-center-for-sap.js +1 -37
- package/icons/azure/azure-chaos-studio.js +1 -75
- package/icons/azure/azure-cloud-shell.js +1 -39
- package/icons/azure/azure-communication-services.js +1 -63
- package/icons/azure/azure-communications-gateway.js +1 -43
- package/icons/azure/azure-compute-galleries.js +1 -35
- package/icons/azure/azure-cosmos-db.js +1 -47
- package/icons/azure/azure-data-catalog.js +1 -91
- package/icons/azure/azure-data-explorer-clusters.js +1 -126
- package/icons/azure/azure-database-maria-db-server.js +1 -56
- package/icons/azure/azure-database-migration-services.js +1 -83
- package/icons/azure/azure-database-my-sql-server.js +1 -56
- package/icons/azure/azure-database-postgre-sql-server-group.js +1 -65
- package/icons/azure/azure-database-postgre-sql-server.js +1 -57
- package/icons/azure/azure-databox-gateway.js +1 -39
- package/icons/azure/azure-databricks.js +1 -12
- package/icons/azure/azure-deployment-environments.js +1 -65
- package/icons/azure/azure-dev-ops.js +1 -21
- package/icons/azure/azure-dev-tunnels.js +1 -48
- package/icons/azure/azure-edge-hardware-center.js +1 -69
- package/icons/azure/azure-experimentation-studio.js +1 -88
- package/icons/azure/azure-fileshares.js +1 -46
- package/icons/azure/azure-firewall-manager.js +1 -60
- package/icons/azure/azure-firewall-policy.js +1 -37
- package/icons/azure/azure-hcp-cache.js +1 -23
- package/icons/azure/azure-hpc-workbenches.js +1 -112
- package/icons/azure/azure-hybrid-center.js +1 -33
- package/icons/azure/azure-information-protection.js +1 -95
- package/icons/azure/azure-io-t-operations.js +1 -57
- package/icons/azure/azure-lighthouse.js +1 -35
- package/icons/azure/azure-load-testing.js +1 -78
- package/icons/azure/azure-managed-grafana.js +1 -19
- package/icons/azure/azure-maps-accounts.js +1 -16
- package/icons/azure/azure-media-service.js +1 -107
- package/icons/azure/azure-migrate.js +1 -57
- package/icons/azure/azure-monitor-dashboard.js +1 -58
- package/icons/azure/azure-monitor-pipeline.js +1 -101
- package/icons/azure/azure-monitors-for-sap-solutions.js +1 -71
- package/icons/azure/azure-net-app-files.js +1 -36
- package/icons/azure/azure-network-function-manager-functions.js +1 -94
- package/icons/azure/azure-network-function-manager.js +1 -98
- package/icons/azure/azure-object-understanding.js +1 -50
- package/icons/azure/azure-open-ai.js +1 -29
- package/icons/azure/azure-operator-5g-core.js +1 -86
- package/icons/azure/azure-operator-insights.js +1 -42
- package/icons/azure/azure-operator-nexus.js +1 -87
- package/icons/azure/azure-operator-service-manager.js +1 -41
- package/icons/azure/azure-orbital.js +1 -115
- package/icons/azure/azure-programmable-connectivity.js +1 -168
- package/icons/azure/azure-purview-accounts.js +1 -100
- package/icons/azure/azure-quotas.js +1 -54
- package/icons/azure/azure-red-hat-open-shift.js +1 -44
- package/icons/azure/azure-sentinel.js +1 -37
- package/icons/azure/azure-service-bus.js +1 -77
- package/icons/azure/azure-sphere.js +1 -68
- package/icons/azure/azure-spring-apps.js +1 -111
- package/icons/azure/azure-sql-edge.js +1 -157
- package/icons/azure/azure-sql-server-stretch-databases.js +1 -82
- package/icons/azure/azure-sql-vm.js +1 -37
- package/icons/azure/azure-sql.js +1 -27
- package/icons/azure/azure-stack-edge.js +1 -44
- package/icons/azure/azure-stack-hci-sizer.js +1 -90
- package/icons/azure/azure-stack.js +1 -54
- package/icons/azure/azure-storage-mover.js +1 -120
- package/icons/azure/azure-support-center-blue.js +1 -53
- package/icons/azure/azure-sustainability.js +1 -75
- package/icons/azure/azure-synapse-analytics.js +1 -60
- package/icons/azure/azure-token-service.js +1 -46
- package/icons/azure/azure-video-indexer.js +1 -82
- package/icons/azure/azure-virtual-desktop.js +1 -19
- package/icons/azure/azure-vmware-solution.js +1 -57
- package/icons/azure/azure-workbooks.js +1 -78
- package/icons/azure/azurite.js +1 -34
- package/icons/azure/backlog.js +1 -48
- package/icons/azure/backup-vault.js +1 -71
- package/icons/azure/bare-metal-infrastructure.js +1 -63
- package/icons/azure/bastions.js +1 -71
- package/icons/azure/batch-accounts.js +1 -52
- package/icons/azure/batch-ai.js +1 -56
- package/icons/azure/biz-talk.js +1 -39
- package/icons/azure/blob-block.js +1 -17
- package/icons/azure/blob-page.js +1 -43
- package/icons/azure/blockchain-applications.js +1 -43
- package/icons/azure/blueprints.js +1 -56
- package/icons/azure/bonsai.js +1 -63
- package/icons/azure/bot-services.js +1 -43
- package/icons/azure/branch.js +1 -43
- package/icons/azure/browser.js +1 -16
- package/icons/azure/bug.js +1 -26
- package/icons/azure/builds.js +1 -48
- package/icons/azure/business-process-tracking.js +1 -28
- package/icons/azure/cache-redis.js +1 -72
- package/icons/azure/cache.js +1 -113
- package/icons/azure/capacity-reservation-groups.js +1 -47
- package/icons/azure/capacity.js +1 -74
- package/icons/azure/cdn-profiles.js +1 -32
- package/icons/azure/central-service-instance-for-sap.js +1 -55
- package/icons/azure/ceres.js +1 -58
- package/icons/azure/change-analysis.js +1 -93
- package/icons/azure/client-apps.js +1 -21
- package/icons/azure/cloud-services-classic.js +1 -48
- package/icons/azure/cloud-services-extended-support.js +1 -78
- package/icons/azure/cloud-test.js +1 -58
- package/icons/azure/code-optimization.js +1 -146
- package/icons/azure/code.js +1 -94
- package/icons/azure/cognitive-search.js +1 -26
- package/icons/azure/cognitive-services-decisions.js +1 -139
- package/icons/azure/cognitive-services.js +1 -42
- package/icons/azure/collaborative-service.js +1 -91
- package/icons/azure/commit.js +1 -30
- package/icons/azure/community-images.js +1 -68
- package/icons/azure/compliance-center.js +1 -70
- package/icons/azure/compliance.js +1 -35
- package/icons/azure/compute-fleet.js +1 -102
- package/icons/azure/computer-vision.js +1 -35
- package/icons/azure/conditional-access.js +1 -45
- package/icons/azure/confidential-ledgers.js +1 -96
- package/icons/azure/connected-cache.js +1 -99
- package/icons/azure/connected-vehicle-platform.js +1 -111
- package/icons/azure/connections.js +1 -54
- package/icons/azure/consortium.js +1 -63
- package/icons/azure/container-apps-environments.js +1 -66
- package/icons/azure/container-instances.js +1 -37
- package/icons/azure/container-registries.js +1 -68
- package/icons/azure/container-services-deprecated.js +1 -142
- package/icons/azure/content-moderators.js +1 -63
- package/icons/azure/content-safety.js +1 -88
- package/icons/azure/controls-horizontal.js +1 -135
- package/icons/azure/controls.js +1 -33
- package/icons/azure/cost-alerts.js +1 -28
- package/icons/azure/cost-analysis.js +1 -35
- package/icons/azure/cost-budgets.js +1 -30
- package/icons/azure/cost-export.js +1 -36
- package/icons/azure/cost-management-and-billing.js +1 -41
- package/icons/azure/cost-management.js +1 -46
- package/icons/azure/counter.js +1 -33
- package/icons/azure/cubes.js +1 -16
- package/icons/azure/custom-ip-prefix.js +1 -51
- package/icons/azure/custom-vision.js +1 -59
- package/icons/azure/customer-lockbox-for-microsoft-azure.js +1 -64
- package/icons/azure/dashboard-hub.js +1 -94
- package/icons/azure/dashboard.js +1 -42
- package/icons/azure/data-box.js +1 -33
- package/icons/azure/data-collection-rules.js +1 -64
- package/icons/azure/data-factories.js +1 -42
- package/icons/azure/data-lake-analytics.js +1 -43
- package/icons/azure/data-lake-storage-gen1.js +1 -49
- package/icons/azure/data-lake-store-gen1.js +1 -49
- package/icons/azure/data-share-invitations.js +1 -34
- package/icons/azure/data-shares.js +1 -67
- package/icons/azure/database-instance-for-sap.js +1 -80
- package/icons/azure/ddo-s-protection-plans.js +1 -47
- package/icons/azure/dedicated-hsm.js +1 -49
- package/icons/azure/defender-cm-local-manager.js +1 -175
- package/icons/azure/defender-dcs-controller.js +1 -99
- package/icons/azure/defender-distributer-control-system.js +1 -67
- package/icons/azure/defender-engineering-station.js +1 -115
- package/icons/azure/defender-external-management.js +1 -132
- package/icons/azure/defender-freezer-monitor.js +1 -217
- package/icons/azure/defender-historian.js +1 -53
- package/icons/azure/defender-hmi.js +1 -54
- package/icons/azure/defender-industrial-packaging-system.js +1 -97
- package/icons/azure/defender-industrial-printer.js +1 -51
- package/icons/azure/defender-industrial-robot.js +1 -165
- package/icons/azure/defender-industrial-scale-system.js +1 -80
- package/icons/azure/defender-marquee.js +1 -68
- package/icons/azure/defender-meter.js +1 -156
- package/icons/azure/defender-plc.js +1 -66
- package/icons/azure/defender-pneumatic-device.js +1 -72
- package/icons/azure/defender-programable-board.js +1 -126
- package/icons/azure/defender-relay.js +1 -67
- package/icons/azure/defender-robot-controller.js +1 -123
- package/icons/azure/defender-rtu.js +1 -23
- package/icons/azure/defender-sensor.js +1 -55
- package/icons/azure/defender-slot.js +1 -31
- package/icons/azure/defender-web-guiding-system.js +1 -266
- package/icons/azure/detonation.js +1 -41
- package/icons/azure/dev-console.js +1 -30
- package/icons/azure/dev-ops-starter.js +1 -102
- package/icons/azure/dev-test-labs.js +1 -46
- package/icons/azure/device-compliance.js +1 -62
- package/icons/azure/device-configuration.js +1 -66
- package/icons/azure/device-enrollment.js +1 -69
- package/icons/azure/device-provisioning-services.js +1 -54
- package/icons/azure/device-security-apple.js +1 -54
- package/icons/azure/device-security-google.js +1 -54
- package/icons/azure/device-security-windows.js +1 -54
- package/icons/azure/device-update-io-t-hub.js +1 -46
- package/icons/azure/devices.js +1 -29
- package/icons/azure/diagnostics-settings.js +1 -51
- package/icons/azure/digital-twins.js +1 -73
- package/icons/azure/disk-encryption-sets.js +1 -63
- package/icons/azure/disk-pool.js +1 -92
- package/icons/azure/disks-classic.js +1 -74
- package/icons/azure/disks-snapshots.js +1 -71
- package/icons/azure/disks.js +1 -63
- package/icons/azure/dns-multistack.js +1 -49
- package/icons/azure/dns-private-resolver.js +1 -50
- package/icons/azure/dns-security-policy.js +1 -90
- package/icons/azure/dns-zones.js +1 -37
- package/icons/azure/download.js +1 -60
- package/icons/azure/e-books.js +1 -42
- package/icons/azure/edge-management.js +1 -64
- package/icons/azure/education.js +1 -42
- package/icons/azure/elastic-job-agents.js +1 -61
- package/icons/azure/elastic-san.js +1 -65
- package/icons/azure/endpoint-analytics.js +1 -83
- package/icons/azure/enterprise-applications.js +1 -66
- package/icons/azure/entra-connect-health.js +1 -132
- package/icons/azure/entra-connect-sync.js +1 -86
- package/icons/azure/entra-connect.js +1 -123
- package/icons/azure/entra-domain-services.js +1 -105
- package/icons/azure/entra-global-secure-access.js +1 -76
- package/icons/azure/entra-id-protection.js +1 -74
- package/icons/azure/entra-identity-custom-roles.js +1 -62
- package/icons/azure/entra-identity-licenses.js +1 -85
- package/icons/azure/entra-identity-risky-signins.js +1 -28
- package/icons/azure/entra-identity-risky-users.js +1 -28
- package/icons/azure/entra-identity-roles-and-administrators.js +1 -53
- package/icons/azure/entra-internet-access.js +1 -105
- package/icons/azure/entra-managed-identities.js +1 -120
- package/icons/azure/entra-private-access.js +1 -104
- package/icons/azure/entra-privleged-identity-management.js +1 -120
- package/icons/azure/entra-verified-id.js +1 -75
- package/icons/azure/error.js +1 -30
- package/icons/azure/event-grid-domains.js +1 -75
- package/icons/azure/event-grid-subscriptions.js +1 -75
- package/icons/azure/event-grid-topics.js +1 -90
- package/icons/azure/event-hub-clusters.js +1 -77
- package/icons/azure/event-hubs.js +1 -64
- package/icons/azure/exchange-access.js +1 -45
- package/icons/azure/exchange-on-premises-access.js +1 -39
- package/icons/azure/express-route-circuits.js +1 -60
- package/icons/azure/express-route-direct.js +1 -61
- package/icons/azure/express-route-traffic-collector.js +1 -97
- package/icons/azure/extended-security-updates.js +1 -44
- package/icons/azure/extensions.js +1 -28
- package/icons/azure/external-identities.js +1 -42
- package/icons/azure/face-apis.js +1 -19
- package/icons/azure/feature-previews.js +1 -21
- package/icons/azure/fhir-service.js +1 -60
- package/icons/azure/fiji.js +1 -42
- package/icons/azure/file.js +1 -29
- package/icons/azure/files.js +1 -45
- package/icons/azure/firewalls.js +1 -32
- package/icons/azure/folder-blank.js +1 -39
- package/icons/azure/folder-website.js +1 -123
- package/icons/azure/form-recognizers.js +1 -48
- package/icons/azure/free-services.js +1 -43
- package/icons/azure/front-door-and-cdn-profiles.js +1 -37
- package/icons/azure/ftp.js +1 -17
- package/icons/azure/function-apps.js +1 -61
- package/icons/azure/gear.js +1 -37
- package/icons/azure/genomics-accounts.js +1 -68
- package/icons/azure/genomics.js +1 -57
- package/icons/azure/globe-error.js +1 -42
- package/icons/azure/globe-success.js +1 -52
- package/icons/azure/globe-warning.js +1 -53
- package/icons/azure/groups.js +1 -42
- package/icons/azure/guide.js +1 -17
- package/icons/azure/hd-insight-clusters.js +1 -71
- package/icons/azure/hdi-aks-cluster.js +1 -60
- package/icons/azure/heart.js +1 -31
- package/icons/azure/help-and-support.js +1 -55
- package/icons/azure/host-groups.js +1 -48
- package/icons/azure/host-pools.js +1 -19
- package/icons/azure/hosts.js +1 -46
- package/icons/azure/ic-m-troubleshooting.js +1 -60
- package/icons/azure/identity-governance.js +1 -52
- package/icons/azure/identity-multi-factor-authentication.js +1 -117
- package/icons/azure/identity-secure-score.js +1 -55
- package/icons/azure/image-definitions.js +1 -38
- package/icons/azure/image-templates.js +1 -43
- package/icons/azure/image-versions.js +1 -38
- package/icons/azure/image.js +1 -31
- package/icons/azure/images.js +1 -37
- package/icons/azure/immersive-readers.js +1 -82
- package/icons/azure/import-export-jobs.js +1 -25
- package/icons/azure/industrial-io-t.js +1 -97
- package/icons/azure/information.js +1 -21
- package/icons/azure/infrastructure-backup.js +1 -89
- package/icons/azure/input-output.js +1 -97
- package/icons/azure/instance-pools.js +1 -87
- package/icons/azure/integration-accounts.js +1 -52
- package/icons/azure/integration-environments.js +1 -94
- package/icons/azure/integration-service-environments.js +1 -90
- package/icons/azure/internet-analyzer-profiles.js +1 -59
- package/icons/azure/intune-app-protection.js +1 -79
- package/icons/azure/intune-for-education.js +1 -79
- package/icons/azure/intune-trends.js +1 -40
- package/icons/azure/intune.js +1 -46
- package/icons/azure/io-t-central-applications.js +1 -20
- package/icons/azure/io-t-edge.js +1 -25
- package/icons/azure/io-t-hub.js +1 -36
- package/icons/azure/ip-address-manager.js +1 -63
- package/icons/azure/ip-groups.js +1 -45
- package/icons/azure/journey-hub.js +1 -30
- package/icons/azure/key-vaults.js +1 -61
- package/icons/azure/keys.js +1 -97
- package/icons/azure/kubernetes-fleet-manager.js +1 -73
- package/icons/azure/kubernetes-services.js +1 -142
- package/icons/azure/lab-accounts.js +1 -69
- package/icons/azure/lab-services.js +1 -46
- package/icons/azure/language-understanding.js +1 -25
- package/icons/azure/language.js +1 -71
- package/icons/azure/launch-portal.js +1 -36
- package/icons/azure/learn.js +1 -61
- package/icons/azure/load-balancer-hub.js +1 -101
- package/icons/azure/load-balancers.js +1 -28
- package/icons/azure/load-test.js +1 -61
- package/icons/azure/load-testing.js +1 -71
- package/icons/azure/local-network-gateways.js +1 -44
- package/icons/azure/location.js +1 -34
- package/icons/azure/log-analytics-query-pack.js +1 -68
- package/icons/azure/log-analytics-workspaces.js +1 -58
- package/icons/azure/log-streaming.js +1 -57
- package/icons/azure/logic-apps-custom-connector.js +1 -76
- package/icons/azure/logic-apps.js +1 -65
- package/icons/azure/machine-learning-studio-classic-web-services.js +1 -49
- package/icons/azure/machine-learning-studio-web-service-plans.js +1 -84
- package/icons/azure/machine-learning-studio-workspaces.js +1 -55
- package/icons/azure/machine-learning.js +1 -29
- package/icons/azure/machines-azure-arc.js +1 -27
- package/icons/azure/maintenance-configuration.js +1 -62
- package/icons/azure/managed-applications-center.js +1 -55
- package/icons/azure/managed-database.js +1 -79
- package/icons/azure/managed-desktop.js +1 -40
- package/icons/azure/managed-dev-ops-pools.js +1 -59
- package/icons/azure/managed-file-shares.js +1 -59
- package/icons/azure/managed-identities.js +1 -66
- package/icons/azure/managed-instance-apache-cassandra.js +1 -100
- package/icons/azure/managed-service-fabric.js +1 -109
- package/icons/azure/management-groups.js +1 -77
- package/icons/azure/management-portal.js +1 -23
- package/icons/azure/marketplace-management.js +1 -47
- package/icons/azure/marketplace.js +1 -38
- package/icons/azure/med-tech-service.js +1 -87
- package/icons/azure/media-file.js +1 -36
- package/icons/azure/media.js +1 -108
- package/icons/azure/mesh-applications.js +1 -47
- package/icons/azure/metrics-advisor.js +1 -58
- package/icons/azure/metrics.js +1 -34
- package/icons/azure/microsoft-defender-easm.js +1 -69
- package/icons/azure/microsoft-defender-for-cloud.js +1 -61
- package/icons/azure/microsoft-defender-for-io-t.js +1 -54
- package/icons/azure/microsoft-dev-box.js +1 -143
- package/icons/azure/mindaro.js +1 -47
- package/icons/azure/mission-landing-zone.js +1 -48
- package/icons/azure/mobile-engagement.js +1 -46
- package/icons/azure/mobile-networks.js +1 -86
- package/icons/azure/mobile.js +1 -28
- package/icons/azure/modular-data-center.js +1 -83
- package/icons/azure/module.js +1 -25
- package/icons/azure/monitor-health-models.js +1 -110
- package/icons/azure/monitor.js +1 -61
- package/icons/azure/multi-tenancy.js +1 -80
- package/icons/azure/multifactor-authentication.js +1 -84
- package/icons/azure/my-customers.js +1 -42
- package/icons/azure/nat.js +1 -56
- package/icons/azure/network-interfaces.js +1 -52
- package/icons/azure/network-managers.js +1 -55
- package/icons/azure/network-security-groups.js +1 -53
- package/icons/azure/network-security-perimeters.js +1 -113
- package/icons/azure/network-watcher.js +1 -55
- package/icons/azure/notification-hub-namespaces.js +1 -33
- package/icons/azure/notification-hubs.js +1 -22
- package/icons/azure/offers.js +1 -35
- package/icons/azure/on-premises-data-gateways.js +1 -44
- package/icons/azure/open-supply-chain-platform.js +1 -111
- package/icons/azure/operation-log-classic.js +1 -44
- package/icons/azure/oracle-database.js +1 -55
- package/icons/azure/os-images-classic.js +1 -60
- package/icons/azure/osconfig.js +1 -82
- package/icons/azure/outbound-connection.js +1 -24
- package/icons/azure/partner-namespace.js +1 -97
- package/icons/azure/partner-registration.js +1 -117
- package/icons/azure/partner-topic.js +1 -93
- package/icons/azure/peering-service.js +1 -27
- package/icons/azure/peerings.js +1 -44
- package/icons/azure/personalizers.js +1 -99
- package/icons/azure/plans.js +1 -40
- package/icons/azure/policy.js +1 -34
- package/icons/azure/power-bi-embedded.js +1 -69
- package/icons/azure/power-platform.js +1 -163
- package/icons/azure/power-up.js +1 -42
- package/icons/azure/power.js +1 -31
- package/icons/azure/powershell.js +1 -30
- package/icons/azure/preview-features.js +1 -72
- package/icons/azure/private-endpoints.js +1 -80
- package/icons/azure/private-link-service.js +1 -83
- package/icons/azure/private-link-services.js +1 -72
- package/icons/azure/private-link.js +1 -94
- package/icons/azure/process-explorer.js +1 -23
- package/icons/azure/production-ready-database.js +1 -70
- package/icons/azure/proximity-placement-groups.js +1 -71
- package/icons/azure/public-ip-addresses-classic.js +1 -36
- package/icons/azure/public-ip-addresses.js +1 -19
- package/icons/azure/public-ip-prefixes.js +1 -85
- package/icons/azure/qn-a-makers.js +1 -61
- package/icons/azure/quickstart-center.js +1 -76
- package/icons/azure/recent.js +1 -57
- package/icons/azure/recovery-services-vaults.js +1 -67
- package/icons/azure/region-management.js +1 -42
- package/icons/azure/relays.js +1 -45
- package/icons/azure/remote-rendering.js +1 -71
- package/icons/azure/reservations.js +1 -37
- package/icons/azure/reserved-capacity.js +1 -45
- package/icons/azure/reserved-ip-addresses-classic.js +1 -38
- package/icons/azure/resource-explorer.js +1 -33
- package/icons/azure/resource-graph-explorer.js +1 -58
- package/icons/azure/resource-group-list.js +1 -48
- package/icons/azure/resource-groups.js +1 -40
- package/icons/azure/resource-guard.js +1 -46
- package/icons/azure/resource-linked.js +1 -51
- package/icons/azure/resource-management-private-link.js +1 -61
- package/icons/azure/resource-mover.js +1 -20
- package/icons/azure/resources-provider.js +1 -27
- package/icons/azure/restore-points-collections.js +1 -73
- package/icons/azure/restore-points.js +1 -72
- package/icons/azure/route-filters.js +1 -39
- package/icons/azure/route-tables.js +1 -62
- package/icons/azure/rtos.js +1 -64
- package/icons/azure/savings-plans.js +1 -75
- package/icons/azure/scheduler-job-collections.js +1 -73
- package/icons/azure/scheduler.js +1 -75
- package/icons/azure/scvmm-management-servers.js +1 -79
- package/icons/azure/search-grid.js +1 -48
- package/icons/azure/search.js +1 -28
- package/icons/azure/security-baselines.js +1 -55
- package/icons/azure/security.js +1 -22
- package/icons/azure/send-grid-accounts.js +1 -42
- package/icons/azure/server-farm.js +1 -65
- package/icons/azure/serverless-search.js +1 -65
- package/icons/azure/service-catalog-mad.js +1 -65
- package/icons/azure/service-endpoint-policies.js +1 -75
- package/icons/azure/service-fabric-clusters.js +1 -97
- package/icons/azure/service-health.js +1 -45
- package/icons/azure/service-providers.js +1 -71
- package/icons/azure/shared-image-galleries.js +1 -32
- package/icons/azure/signal-r.js +1 -22
- package/icons/azure/software-as-a-service.js +1 -65
- package/icons/azure/software-updates.js +1 -22
- package/icons/azure/solutions.js +1 -58
- package/icons/azure/sonic-dash.js +1 -95
- package/icons/azure/spatial-anchor-accounts.js +1 -88
- package/icons/azure/speech-services.js +1 -43
- package/icons/azure/spot-vm.js +1 -40
- package/icons/azure/spot-vmss.js +1 -77
- package/icons/azure/sql-data-warehouses.js +1 -82
- package/icons/azure/sql-database.js +1 -63
- package/icons/azure/sql-elastic-pools.js +1 -89
- package/icons/azure/sql-managed-instance.js +1 -73
- package/icons/azure/sql-server-registries.js +1 -75
- package/icons/azure/sql-server.js +1 -46
- package/icons/azure/ssd.js +1 -36
- package/icons/azure/ssh-keys.js +1 -42
- package/icons/azure/ssis-lift-and-shift-ir.js +1 -72
- package/icons/azure/stack-hci-premium.js +1 -144
- package/icons/azure/static-apps.js +1 -29
- package/icons/azure/stor-simple-data-managers.js +1 -57
- package/icons/azure/stor-simple-device-managers.js +1 -38
- package/icons/azure/storage-accounts-classic.js +1 -53
- package/icons/azure/storage-accounts.js +1 -35
- package/icons/azure/storage-actions.js +1 -88
- package/icons/azure/storage-azure-files.js +1 -47
- package/icons/azure/storage-container.js +1 -35
- package/icons/azure/storage-explorer.js +1 -38
- package/icons/azure/storage-functions.js +1 -57
- package/icons/azure/storage-queue.js +1 -24
- package/icons/azure/storage-sync-services.js +1 -74
- package/icons/azure/stream-analytics-jobs.js +1 -53
- package/icons/azure/subnet.js +1 -43
- package/icons/azure/subscriptions.js +1 -41
- package/icons/azure/system-topic.js +1 -182
- package/icons/azure/table.js +1 -23
- package/icons/azure/tag.js +1 -28
- package/icons/azure/tags.js +1 -46
- package/icons/azure/targets-management.js +1 -54
- package/icons/azure/template-specs.js +1 -67
- package/icons/azure/templates.js +1 -33
- package/icons/azure/tenant-properties.js +1 -90
- package/icons/azure/tenant-status.js +1 -40
- package/icons/azure/test-base.js +1 -56
- package/icons/azure/tfs-vc-repository.js +1 -97
- package/icons/azure/time-series-data-sets.js +1 -63
- package/icons/azure/time-series-insights-access-policies.js +1 -42
- package/icons/azure/time-series-insights-environments.js +1 -39
- package/icons/azure/time-series-insights-event-sources.js +1 -57
- package/icons/azure/toolbox.js +1 -26
- package/icons/azure/traffic-manager-profiles.js +1 -47
- package/icons/azure/translator-text.js +1 -75
- package/icons/azure/troubleshoot.js +1 -38
- package/icons/azure/universal-print.js +1 -74
- package/icons/azure/update-management-center.js +1 -135
- package/icons/azure/updates.js +1 -47
- package/icons/azure/user-privacy.js +1 -55
- package/icons/azure/user-settings.js +1 -68
- package/icons/azure/user-subscriptions.js +1 -104
- package/icons/azure/users.js +1 -26
- package/icons/azure/verifiable-credentials.js +1 -99
- package/icons/azure/verification-as-a-service.js +1 -84
- package/icons/azure/versions.js +1 -24
- package/icons/azure/video-analyzers.js +1 -42
- package/icons/azure/virtual-clusters.js +1 -99
- package/icons/azure/virtual-enclaves.js +1 -40
- package/icons/azure/virtual-instance-for-sap.js +1 -81
- package/icons/azure/virtual-machine.js +1 -52
- package/icons/azure/virtual-machines-classic.js +1 -53
- package/icons/azure/virtual-network-gateways.js +1 -56
- package/icons/azure/virtual-networks-classic.js +1 -86
- package/icons/azure/virtual-networks.js +1 -86
- package/icons/azure/virtual-router.js +1 -29
- package/icons/azure/virtual-visits-builder.js +1 -81
- package/icons/azure/virtual-wan-hub.js +1 -72
- package/icons/azure/virtual-wans.js +1 -60
- package/icons/azure/vm-app-definitions.js +1 -66
- package/icons/azure/vm-app-versions.js +1 -91
- package/icons/azure/vm-image-version.js +1 -103
- package/icons/azure/vm-images-classic.js +1 -60
- package/icons/azure/vm-scale-sets.js +1 -60
- package/icons/azure/wac-installer.js +1 -121
- package/icons/azure/wac.js +1 -56
- package/icons/azure/web-app-database.js +1 -177
- package/icons/azure/web-application-firewall-policies-waf.js +1 -97
- package/icons/azure/web-jobs.js +1 -119
- package/icons/azure/web-slots.js +1 -30
- package/icons/azure/web-test.js +1 -122
- package/icons/azure/website-power.js +1 -90
- package/icons/azure/website-staging.js +1 -24
- package/icons/azure/windows-notification-services.js +1 -78
- package/icons/azure/windows10-core-services.js +1 -61
- package/icons/azure/workbooks.js +1 -38
- package/icons/azure/worker-container-app.js +1 -91
- package/icons/azure/workflow.js +1 -47
- package/icons/azure/workspace-gateway.js +1 -86
- package/icons/azure/workspaces.js +1 -23
- package/icons/gcp/access-context-manager.js +1 -17
- package/icons/gcp/administration.js +1 -46
- package/icons/gcp/advanced-agent-modeling.js +1 -31
- package/icons/gcp/advanced-solutions-lab.js +1 -84
- package/icons/gcp/agent-assist.js +1 -12
- package/icons/gcp/ai-hub.js +1 -23
- package/icons/gcp/ai-platform-unified.js +1 -40
- package/icons/gcp/ai-platform.js +1 -23
- package/icons/gcp/analytics-hub.js +1 -28
- package/icons/gcp/anthos-config-management.js +1 -28
- package/icons/gcp/anthos-service-mesh.js +1 -13
- package/icons/gcp/anthos.js +1 -11
- package/icons/gcp/api-analytics.js +1 -26
- package/icons/gcp/api-monetization.js +1 -23
- package/icons/gcp/api.js +1 -29
- package/icons/gcp/apigee-api-platform.js +1 -35
- package/icons/gcp/apigee-sense.js +1 -28
- package/icons/gcp/app-engine.js +1 -39
- package/icons/gcp/artifact-registry.js +1 -33
- package/icons/gcp/asset-inventory.js +1 -19
- package/icons/gcp/assured-workloads.js +1 -38
- package/icons/gcp/auto-ml-natural-language.js +1 -9
- package/icons/gcp/auto-ml-tables.js +1 -19
- package/icons/gcp/auto-ml-translation.js +1 -25
- package/icons/gcp/auto-ml-video-intelligence.js +1 -25
- package/icons/gcp/auto-ml-vision.js +1 -18
- package/icons/gcp/auto-ml.js +1 -14
- package/icons/gcp/bare-metal-solutions.js +1 -10
- package/icons/gcp/batch.js +1 -12
- package/icons/gcp/beyondcorp.js +1 -13
- package/icons/gcp/big-query.js +1 -28
- package/icons/gcp/bigtable.js +1 -116
- package/icons/gcp/billing.js +1 -34
- package/icons/gcp/binary-authorization.js +1 -22
- package/icons/gcp/catalog.js +1 -29
- package/icons/gcp/certificate-authority-service.js +1 -33
- package/icons/gcp/certificate-manager.js +1 -24
- package/icons/gcp/cloud-api-gateway.js +1 -13
- package/icons/gcp/cloud-apis.js +1 -18
- package/icons/gcp/cloud-armor.js +1 -27
- package/icons/gcp/cloud-asset-inventory.js +1 -10
- package/icons/gcp/cloud-audit-logs.js +1 -60
- package/icons/gcp/cloud-build.js +1 -19
- package/icons/gcp/cloud-cdn.js +1 -22
- package/icons/gcp/cloud-code.js +1 -16
- package/icons/gcp/cloud-composer.js +1 -19
- package/icons/gcp/cloud-data-fusion.js +1 -15
- package/icons/gcp/cloud-deploy.js +1 -10
- package/icons/gcp/cloud-deployment-manager.js +1 -24
- package/icons/gcp/cloud-dns.js +1 -21
- package/icons/gcp/cloud-domains.js +1 -26
- package/icons/gcp/cloud-ekm.js +1 -13
- package/icons/gcp/cloud-endpoints.js +1 -26
- package/icons/gcp/cloud-external-ip-addresses.js +1 -21
- package/icons/gcp/cloud-firewall-rules.js +1 -15
- package/icons/gcp/cloud-for-marketing.js +1 -13
- package/icons/gcp/cloud-functions.js +1 -45
- package/icons/gcp/cloud-generic.js +1 -13
- package/icons/gcp/cloud-gpu.js +1 -18
- package/icons/gcp/cloud-healthcare-api.js +1 -65
- package/icons/gcp/cloud-healthcare-marketplace.js +1 -10
- package/icons/gcp/cloud-hsm.js +1 -43
- package/icons/gcp/cloud-ids.js +1 -42
- package/icons/gcp/cloud-inference-api.js +1 -27
- package/icons/gcp/cloud-interconnect.js +1 -15
- package/icons/gcp/cloud-jobs-api.js +1 -37
- package/icons/gcp/cloud-load-balancing.js +1 -20
- package/icons/gcp/cloud-logging.js +1 -35
- package/icons/gcp/cloud-media-edge.js +1 -23
- package/icons/gcp/cloud-monitoring.js +1 -26
- package/icons/gcp/cloud-nat.js +1 -31
- package/icons/gcp/cloud-natural-language-api.js +1 -40
- package/icons/gcp/cloud-network.js +1 -23
- package/icons/gcp/cloud-ops.js +1 -32
- package/icons/gcp/cloud-optimization-ai-fleet-routing-api.js +1 -34
- package/icons/gcp/cloud-optimization-ai.js +1 -28
- package/icons/gcp/cloud-router.js +1 -13
- package/icons/gcp/cloud-routes.js +1 -18
- package/icons/gcp/cloud-run-for-anthos.js +1 -21
- package/icons/gcp/cloud-run.js +1 -13
- package/icons/gcp/cloud-scheduler.js +1 -49
- package/icons/gcp/cloud-security-scanner.js +1 -21
- package/icons/gcp/cloud-shell.js +1 -16
- package/icons/gcp/cloud-spanner.js +1 -42
- package/icons/gcp/cloud-sql.js +1 -16
- package/icons/gcp/cloud-storage.js +1 -22
- package/icons/gcp/cloud-tasks.js +1 -101
- package/icons/gcp/cloud-test-lab.js +1 -39
- package/icons/gcp/cloud-tpu.js +1 -141
- package/icons/gcp/cloud-translation-api.js +1 -16
- package/icons/gcp/cloud-vision-api.js +1 -40
- package/icons/gcp/cloud-vpn.js +1 -23
- package/icons/gcp/compute-engine.js +1 -23
- package/icons/gcp/configuration-management.js +1 -22
- package/icons/gcp/connectivity-test.js +1 -6
- package/icons/gcp/connectors.js +1 -13
- package/icons/gcp/contact-center-ai.js +1 -6
- package/icons/gcp/container-optimized-os.js +1 -13
- package/icons/gcp/container-registry.js +1 -118
- package/icons/gcp/data-catalog.js +1 -25
- package/icons/gcp/data-labeling.js +1 -31
- package/icons/gcp/data-layers.js +1 -11
- package/icons/gcp/data-loss-prevention-api.js +1 -60
- package/icons/gcp/data-qn-a.js +1 -24
- package/icons/gcp/data-studio.js +1 -28
- package/icons/gcp/data-transfer.js +1 -17
- package/icons/gcp/database-migration-service.js +1 -24
- package/icons/gcp/dataflow.js +1 -50
- package/icons/gcp/datalab.js +1 -13
- package/icons/gcp/dataplex.js +1 -15
- package/icons/gcp/datapol.js +1 -70
- package/icons/gcp/dataprep.js +1 -25
- package/icons/gcp/dataproc-metastore.js +1 -12
- package/icons/gcp/dataproc.js +1 -43
- package/icons/gcp/datashare.js +1 -37
- package/icons/gcp/datastore.js +1 -39
- package/icons/gcp/datastream.js +1 -35
- package/icons/gcp/debugger.js +1 -31
- package/icons/gcp/developer-portal.js +1 -24
- package/icons/gcp/dialogflow-cx.js +1 -28
- package/icons/gcp/dialogflow-insights.js +1 -33
- package/icons/gcp/dialogflow.js +1 -16
- package/icons/gcp/document-ai.js +1 -27
- package/icons/gcp/early-access-center.js +1 -12
- package/icons/gcp/error-reporting.js +1 -42
- package/icons/gcp/eventarc.js +1 -24
- package/icons/gcp/filestore.js +1 -22
- package/icons/gcp/financial-services-marketplace.js +1 -21
- package/icons/gcp/firestore.js +1 -30
- package/icons/gcp/fleet-engine.js +1 -10
- package/icons/gcp/free-trial.js +1 -36
- package/icons/gcp/game-servers.js +1 -32
- package/icons/gcp/gce-systems-management.js +1 -13
- package/icons/gcp/genomics.js +1 -23
- package/icons/gcp/gke-on-prem.js +1 -31
- package/icons/gcp/google-cloud-marketplace.js +1 -29
- package/icons/gcp/google-kubernetes-engine.js +1 -23
- package/icons/gcp/google-maps-platform.js +1 -47
- package/icons/gcp/healthcare-nlp-api.js +1 -13
- package/icons/gcp/home.js +1 -25
- package/icons/gcp/identity-and-access-management.js +1 -23
- package/icons/gcp/identity-aware-proxy.js +1 -32
- package/icons/gcp/identity-platform.js +1 -26
- package/icons/gcp/iot-core.js +1 -23
- package/icons/gcp/iot-edge.js +1 -86
- package/icons/gcp/key-access-justifications.js +1 -46
- package/icons/gcp/key-management-service.js +1 -23
- package/icons/gcp/kuberun.js +1 -26
- package/icons/gcp/launcher.js +1 -35
- package/icons/gcp/local-ssd.js +1 -13
- package/icons/gcp/looker.js +1 -46
- package/icons/gcp/managed-service-for-microsoft-active-directory.js +1 -59
- package/icons/gcp/media-translation-api.js +1 -28
- package/icons/gcp/memorystore.js +1 -26
- package/icons/gcp/migrate-for-anthos.js +1 -13
- package/icons/gcp/migrate-for-compute-engine.js +1 -13
- package/icons/gcp/my-cloud.js +1 -21
- package/icons/gcp/network-connectivity-center.js +1 -84
- package/icons/gcp/network-intelligence-center.js +1 -13
- package/icons/gcp/network-security.js +1 -38
- package/icons/gcp/network-tiers.js +1 -53
- package/icons/gcp/network-topology.js +1 -13
- package/icons/gcp/onboarding.js +1 -25
- package/icons/gcp/os-configuration-management.js +1 -13
- package/icons/gcp/os-inventory-management.js +1 -15
- package/icons/gcp/os-patch-management.js +1 -13
- package/icons/gcp/partner-interconnect.js +1 -21
- package/icons/gcp/partner-portal.js +1 -35
- package/icons/gcp/performance-dashboard.js +1 -13
- package/icons/gcp/permissions.js +1 -35
- package/icons/gcp/persistent-disk.js +1 -10
- package/icons/gcp/phishing-protection.js +1 -48
- package/icons/gcp/policy-analyzer.js +1 -13
- package/icons/gcp/premium-network-tier.js +1 -19
- package/icons/gcp/private-connectivity.js +1 -18
- package/icons/gcp/private-service-connect.js +1 -27
- package/icons/gcp/producer-portal.js +1 -21
- package/icons/gcp/profiler.js +1 -29
- package/icons/gcp/project.js +1 -28
- package/icons/gcp/pub-sub.js +1 -41
- package/icons/gcp/quantum-engine.js +1 -27
- package/icons/gcp/quotas.js +1 -42
- package/icons/gcp/real-world-insights.js +1 -19
- package/icons/gcp/recommendations-ai.js +1 -56
- package/icons/gcp/release-notes.js +1 -12
- package/icons/gcp/retail-api.js +1 -22
- package/icons/gcp/risk-manager.js +1 -12
- package/icons/gcp/runtime-config.js +1 -35
- package/icons/gcp/secret-manager.js +1 -13
- package/icons/gcp/security-command-center.js +1 -18
- package/icons/gcp/security-health-advisor.js +1 -61
- package/icons/gcp/security-key-enforcement.js +1 -21
- package/icons/gcp/security.js +1 -27
- package/icons/gcp/service-discovery.js +1 -36
- package/icons/gcp/speech-to-text.js +1 -93
- package/icons/gcp/stackdriver.js +1 -10
- package/icons/gcp/standard-network-tier.js +1 -13
- package/icons/gcp/stream-suite.js +1 -16
- package/icons/gcp/support.js +1 -29
- package/icons/gcp/tensorflow-enterprise.js +1 -13
- package/icons/gcp/text-to-speech.js +1 -24
- package/icons/gcp/tools-for-powershell.js +1 -29
- package/icons/gcp/trace.js +1 -17
- package/icons/gcp/traffic-director.js +1 -44
- package/icons/gcp/transfer-appliance.js +1 -32
- package/icons/gcp/transfer.js +1 -13
- package/icons/gcp/user-preferences.js +1 -35
- package/icons/gcp/vertex-ai.js +1 -48
- package/icons/gcp/video-intelligence-api.js +1 -15
- package/icons/gcp/virtual-private-cloud.js +1 -25
- package/icons/gcp/visual-inspection.js +1 -24
- package/icons/gcp/vmware-engine.js +1 -13
- package/icons/gcp/web-risk.js +1 -55
- package/icons/gcp/web-security-scanner.js +1 -27
- package/icons/gcp/workflows.js +1 -82
- package/icons/gcp/workload-identity-pool.js +1 -24
- package/icons/tech/aarch64.js +1 -48
- package/icons/tech/adobe-illustrator.js +1 -14
- package/icons/tech/adobe-photoshop.js +1 -14
- package/icons/tech/adobe-premiere-pro.js +1 -16
- package/icons/tech/adobe-xd.js +1 -12
- package/icons/tech/adonis-js.js +1 -14
- package/icons/tech/after-effects.js +1 -16
- package/icons/tech/airflow.js +1 -64
- package/icons/tech/akka.js +1 -21
- package/icons/tech/algolia.js +1 -12
- package/icons/tech/alpine-js.js +1 -17
- package/icons/tech/amazon-web-services.js +1 -21
- package/icons/tech/anaconda.js +1 -12
- package/icons/tech/android-studio.js +1 -44
- package/icons/tech/android.js +1 -35
- package/icons/tech/angular-js.js +1 -24
- package/icons/tech/angular.js +1 -37
- package/icons/tech/ansible.js +1 -15
- package/icons/tech/ant-design.js +1 -112
- package/icons/tech/apache.js +1 -222
- package/icons/tech/apl.js +1 -21
- package/icons/tech/appcelerator.js +1 -12
- package/icons/tech/apple-safari.js +1 -39
- package/icons/tech/apple.js +1 -6
- package/icons/tech/appwrite.js +1 -21
- package/icons/tech/arch-linux.js +1 -29
- package/icons/tech/arduino.js +1 -9
- package/icons/tech/argo-cd.js +1 -134
- package/icons/tech/astro.js +1 -62
- package/icons/tech/atom.js +1 -14
- package/icons/tech/autodesk-maya.js +1 -144
- package/icons/tech/autodesk-shot-grid.js +1 -15
- package/icons/tech/awk.js +1 -34
- package/icons/tech/azios.js +1 -12
- package/icons/tech/azure-devops.js +1 -33
- package/icons/tech/azure-sql-database.js +1 -95
- package/icons/tech/azure.js +1 -55
- package/icons/tech/babel.js +1 -15
- package/icons/tech/backbone-js.js +1 -16
- package/icons/tech/ballerina.js +1 -12
- package/icons/tech/bamboo.js +1 -62
- package/icons/tech/bash.js +1 -22
- package/icons/tech/behance.js +1 -19
- package/icons/tech/bitbucket.js +1 -37
- package/icons/tech/blender.js +1 -21
- package/icons/tech/bootstrap.js +1 -78
- package/icons/tech/bower.js +1 -123
- package/icons/tech/browserstack.js +1 -77
- package/icons/tech/bulma.js +1 -6
- package/icons/tech/bun.js +1 -68
- package/icons/tech/c.js +1 -28
- package/icons/tech/cairo-graphics.js +1 -21
- package/icons/tech/cake-php.js +1 -12
- package/icons/tech/canva.js +1 -9
- package/icons/tech/capacitor.js +1 -25
- package/icons/tech/cassandra.js +1 -101
- package/icons/tech/cent-os.js +1 -22
- package/icons/tech/chrome.js +1 -156
- package/icons/tech/circle-ci.js +1 -12
- package/icons/tech/clarity.js +1 -35
- package/icons/tech/clion.js +1 -98
- package/icons/tech/clojure-script.js +1 -39
- package/icons/tech/clojure.js +1 -42
- package/icons/tech/cloudflare-workers.js +1 -196
- package/icons/tech/cloudflare.js +1 -22
- package/icons/tech/cmake.js +1 -11
- package/icons/tech/code-igniter.js +1 -12
- package/icons/tech/code-pen.js +1 -12
- package/icons/tech/codeac.js +1 -12
- package/icons/tech/codecov.js +1 -12
- package/icons/tech/coffee-script.js +1 -12
- package/icons/tech/composer.js +1 -59
- package/icons/tech/confluence.js +1 -57
- package/icons/tech/consul.js +1 -12
- package/icons/tech/contao.js +1 -15
- package/icons/tech/corejs.js +1 -6
- package/icons/tech/cosmosdb.js +1 -52
- package/icons/tech/couchdb.js +1 -12
- package/icons/tech/cplusplus.js +1 -35
- package/icons/tech/crystal.js +1 -12
- package/icons/tech/csharp.js +1 -28
- package/icons/tech/css3.js +1 -25
- package/icons/tech/cucumber.js +1 -12
- package/icons/tech/cypress.js +1 -34
- package/icons/tech/d3js.js +1 -145
- package/icons/tech/dart.js +1 -24
- package/icons/tech/data-grip.js +1 -109
- package/icons/tech/data-spell.js +1 -102
- package/icons/tech/dbeaver.js +1 -56
- package/icons/tech/debian.js +1 -12
- package/icons/tech/deno.js +1 -6
- package/icons/tech/devicon.js +1 -25
- package/icons/tech/digital-ocean.js +1 -9
- package/icons/tech/discord-js.js +1 -56
- package/icons/tech/django-rest.js +1 -35
- package/icons/tech/django.js +1 -9
- package/icons/tech/docker.js +1 -133
- package/icons/tech/doctrine.js +1 -21
- package/icons/tech/dropwizard.js +1 -70
- package/icons/tech/drupal.js +1 -56
- package/icons/tech/eclipse-ceylon.js +1 -44
- package/icons/tech/eclipse-ide.js +1 -99
- package/icons/tech/eclipse-vert-x.js +1 -29
- package/icons/tech/elasticbeats.js +1 -22
- package/icons/tech/elasticsearch.js +1 -28
- package/icons/tech/electron.js +1 -11
- package/icons/tech/eleventy-11ty.js +1 -15
- package/icons/tech/elixir.js +1 -211
- package/icons/tech/elm.js +1 -19
- package/icons/tech/embedded-c.js +1 -42
- package/icons/tech/ember-js.js +1 -16
- package/icons/tech/envoy.js +1 -28
- package/icons/tech/erlang.js +1 -12
- package/icons/tech/eslint.js +1 -21
- package/icons/tech/express.js +1 -6
- package/icons/tech/facebook.js +1 -15
- package/icons/tech/fast-api.js +1 -12
- package/icons/tech/fastify.js +1 -15
- package/icons/tech/fauna.js +1 -12
- package/icons/tech/feathers.js +1 -6
- package/icons/tech/fedora.js +1 -53
- package/icons/tech/figma.js +1 -24
- package/icons/tech/file-zilla.js +1 -29
- package/icons/tech/firebase.js +1 -12
- package/icons/tech/firefox.js +1 -1405
- package/icons/tech/flask.js +1 -12
- package/icons/tech/flutter.js +1 -16
- package/icons/tech/fortran.js +1 -15
- package/icons/tech/foundation.js +1 -240
- package/icons/tech/fsharp.js +1 -10
- package/icons/tech/gatling.js +1 -12
- package/icons/tech/gatsby.js +1 -12
- package/icons/tech/gazebo.js +1 -23
- package/icons/tech/gcc.js +1 -44
- package/icons/tech/gentoo.js +1 -14
- package/icons/tech/ghost.js +1 -27
- package/icons/tech/gimp.js +1 -382
- package/icons/tech/git.js +1 -12
- package/icons/tech/gitbook.js +1 -13
- package/icons/tech/github-actions.js +1 -21
- package/icons/tech/github-codespaces.js +1 -85
- package/icons/tech/github.js +1 -16
- package/icons/tech/gitlab.js +1 -35
- package/icons/tech/gitpod.js +1 -32
- package/icons/tech/gitter.js +1 -6
- package/icons/tech/gnu-emacs.js +1 -15
- package/icons/tech/go-land.js +1 -88
- package/icons/tech/go.js +1 -294
- package/icons/tech/godot-engine.js +1 -56
- package/icons/tech/google-cloud.js +1 -29
- package/icons/tech/google.js +1 -42
- package/icons/tech/gradle.js +1 -12
- package/icons/tech/grafana.js +1 -30
- package/icons/tech/grails.js +1 -21
- package/icons/tech/graphql.js +1 -15
- package/icons/tech/groovy.js +1 -715
- package/icons/tech/grunt-js.js +1 -260
- package/icons/tech/gulp-js.js +1 -14
- package/icons/tech/hadoop.js +1 -36
- package/icons/tech/handlebars.js +1 -9
- package/icons/tech/hardhat.js +1 -98
- package/icons/tech/harvester.js +1 -10
- package/icons/tech/hashicorp-vault.js +1 -12
- package/icons/tech/haskell.js +1 -10
- package/icons/tech/haxe.js +1 -17
- package/icons/tech/helm.js +1 -12
- package/icons/tech/heroku.js +1 -12
- package/icons/tech/hibernate.js +1 -15
- package/icons/tech/homebrew.js +1 -36
- package/icons/tech/html5.js +1 -23
- package/icons/tech/hugo.js +1 -22
- package/icons/tech/ibm-spss-statistics.js +1 -21
- package/icons/tech/ie10.js +1 -12
- package/icons/tech/ifttt.js +1 -6
- package/icons/tech/influxdb.js +1 -14
- package/icons/tech/inkscape.js +1 -573
- package/icons/tech/insomnia.js +1 -44
- package/icons/tech/intellij-idea.js +1 -92
- package/icons/tech/ionic.js +1 -9
- package/icons/tech/jaeger.js +1 -102
- package/icons/tech/jamstack.js +1 -12
- package/icons/tech/jasmine.js +1 -10
- package/icons/tech/java.js +1 -42
- package/icons/tech/javascript.js +1 -15
- package/icons/tech/jeet.js +1 -163
- package/icons/tech/jekyll.js +1 -232
- package/icons/tech/jenkins.js +1 -126
- package/icons/tech/jest.js +1 -12
- package/icons/tech/jetbrains.js +1 -118
- package/icons/tech/jira-align.js +1 -57
- package/icons/tech/jira.js +1 -62
- package/icons/tech/jquery.js +1 -12
- package/icons/tech/json.js +1 -57
- package/icons/tech/jule.js +1 -12
- package/icons/tech/julia.js +1 -49
- package/icons/tech/junit.js +1 -30
- package/icons/tech/jupyter.js +1 -35
- package/icons/tech/k3os.js +1 -6
- package/icons/tech/k3s.js +1 -12
- package/icons/tech/kafka.js +1 -12
- package/icons/tech/kaggle.js +1 -12
- package/icons/tech/karate.js +1 -15
- package/icons/tech/karma.js +1 -21
- package/icons/tech/keras.js +1 -15
- package/icons/tech/kibana.js +1 -10
- package/icons/tech/knex-js.js +1 -12
- package/icons/tech/knockout.js +1 -13
- package/icons/tech/kotlin.js +1 -25
- package/icons/tech/krakenjs.js +1 -14
- package/icons/tech/ktor.js +1 -48
- package/icons/tech/kubernetes.js +1 -10
- package/icons/tech/labview.js +1 -69
- package/icons/tech/laravel.js +1 -15
- package/icons/tech/latex.js +1 -12
- package/icons/tech/less-js.js +1 -14
- package/icons/tech/linkedin.js +1 -21
- package/icons/tech/linux.js +1 -5267
- package/icons/tech/liquibase.js +1 -12
- package/icons/tech/livewire.js +1 -79
- package/icons/tech/llvm.js +1 -36
- package/icons/tech/logstash.js +1 -10
- package/icons/tech/lua.js +1 -28
- package/icons/tech/lumen.js +1 -12
- package/icons/tech/magento.js +1 -12
- package/icons/tech/markdown.js +1 -44
- package/icons/tech/material-ui.js +1 -11
- package/icons/tech/materialize.js +1 -21
- package/icons/tech/matlab.js +1 -73
- package/icons/tech/matplotlib.js +1 -182
- package/icons/tech/maven.js +1 -620
- package/icons/tech/meteor-js.js +1 -12
- package/icons/tech/microsoft-sql-server.js +1 -6
- package/icons/tech/minitab.js +1 -45
- package/icons/tech/mob-x.js +1 -57
- package/icons/tech/mocha.js +1 -21
- package/icons/tech/modx.js +1 -18
- package/icons/tech/moleculer.js +1 -12
- package/icons/tech/mongodb.js +1 -135
- package/icons/tech/mongoose-js.js +1 -29
- package/icons/tech/moodle.js +1 -145
- package/icons/tech/ms-dos.js +1 -78
- package/icons/tech/mysql.js +1 -12
- package/icons/tech/nano.js +1 -12
- package/icons/tech/nerog.js +1 -136
- package/icons/tech/nestjs.js +1 -12
- package/icons/tech/net-core.js +1 -9
- package/icons/tech/net.js +1 -551
- package/icons/tech/network-x.js +1 -58
- package/icons/tech/new4j.js +1 -21
- package/icons/tech/nextjs.js +1 -6
- package/icons/tech/nginx.js +1 -12
- package/icons/tech/nhibernate.js +1 -21
- package/icons/tech/nim.js +1 -29
- package/icons/tech/nimble.js +1 -84
- package/icons/tech/nix.js +1 -25
- package/icons/tech/nodejs.js +1 -12
- package/icons/tech/nodemon.js +1 -21
- package/icons/tech/nodewebkit.js +1 -42
- package/icons/tech/npm.js +1 -12
- package/icons/tech/nuget.js +1 -12
- package/icons/tech/num-py.js +1 -29
- package/icons/tech/nuxt-js.js +1 -28
- package/icons/tech/objective-c.js +1 -9
- package/icons/tech/ocaml.js +1 -96
- package/icons/tech/oh-my-zsh.js +1 -38
- package/icons/tech/okta.js +1 -21
- package/icons/tech/open-al.js +1 -22
- package/icons/tech/open-api.js +1 -139
- package/icons/tech/open-cl.js +1 -42
- package/icons/tech/open-cv.js +1 -28
- package/icons/tech/open-gl.js +1 -35
- package/icons/tech/open-stack.js +1 -12
- package/icons/tech/open-suse.js +1 -15
- package/icons/tech/open-telemetry.js +1 -21
- package/icons/tech/opera.js +1 -32
- package/icons/tech/oracle.js +1 -12
- package/icons/tech/p5js.js +1 -12
- package/icons/tech/packer.js +1 -15
- package/icons/tech/pandas.js +1 -62
- package/icons/tech/perl.js +1 -21
- package/icons/tech/pf-sense.js +1 -6
- package/icons/tech/phalcon.js +1 -32
- package/icons/tech/phoenix-framework.js +1 -12
- package/icons/tech/photon-engine.js +1 -41
- package/icons/tech/php-storm.js +1 -105
- package/icons/tech/php.js +1 -62
- package/icons/tech/playwrite.js +1 -56
- package/icons/tech/ploty.js +1 -28
- package/icons/tech/podman.js +1 -150
- package/icons/tech/polygon.js +1 -15
- package/icons/tech/portainer.js +1 -12
- package/icons/tech/postcss.js +1 -28
- package/icons/tech/postgresql.js +1 -23
- package/icons/tech/postman.js +1 -28
- package/icons/tech/powershell.js +1 -79
- package/icons/tech/processing.js +1 -201
- package/icons/tech/prometheus.js +1 -12
- package/icons/tech/protractor.js +1 -12
- package/icons/tech/purescript.js +1 -16
- package/icons/tech/putty.js +1 -56
- package/icons/tech/pycharm.js +1 -81
- package/icons/tech/pyscript.js +1 -15
- package/icons/tech/pytest.js +1 -21
- package/icons/tech/python-poetry.js +1 -155
- package/icons/tech/python.js +1 -78
- package/icons/tech/pytorch.js +1 -15
- package/icons/tech/qodana.js +1 -52
- package/icons/tech/qt.js +1 -12
- package/icons/tech/quarkus.js +1 -23
- package/icons/tech/quasar.js +1 -15
- package/icons/tech/qwik.js +1 -37
- package/icons/tech/r.js +1 -57
- package/icons/tech/rabbitmq.js +1 -12
- package/icons/tech/rancher.js +1 -6
- package/icons/tech/raspberrypi.js +1 -28
- package/icons/tech/reach.js +1 -27
- package/icons/tech/react-bootstrap.js +1 -12
- package/icons/tech/react.js +1 -9
- package/icons/tech/realm.js +1 -63
- package/icons/tech/red-cube-s-epic-compiler-thingy-programming-re-ct.js +1 -17
- package/icons/tech/redhat.js +1 -22
- package/icons/tech/redis.js +1 -59
- package/icons/tech/redux.js +1 -12
- package/icons/tech/ren-py.js +1 -547
- package/icons/tech/rider.js +1 -38
- package/icons/tech/robot-operating-system-ros.js +1 -15
- package/icons/tech/rocksdb.js +1 -9
- package/icons/tech/rollup-js.js +1 -155
- package/icons/tech/rspec.js +1 -35
- package/icons/tech/rstudio.js +1 -30
- package/icons/tech/ruby-mine.js +1 -52
- package/icons/tech/ruby-on-rails.js +1 -14
- package/icons/tech/ruby.js +1 -359
- package/icons/tech/rust.js +1 -6
- package/icons/tech/salesforce.js +1 -28
- package/icons/tech/sanity.js +1 -22
- package/icons/tech/sass.js +1 -14
- package/icons/tech/scala.js +1 -21
- package/icons/tech/scalingo.js +1 -29
- package/icons/tech/sdl.js +1 -42
- package/icons/tech/selenium.js +1 -15
- package/icons/tech/sema-software.js +1 -15
- package/icons/tech/sequelize.js +1 -34
- package/icons/tech/shopware.js +1 -9
- package/icons/tech/sketch.js +1 -14
- package/icons/tech/slack.js +1 -35
- package/icons/tech/socket-io.js +1 -45
- package/icons/tech/solid-js.js +1 -121
- package/icons/tech/solidity.js +1 -13
- package/icons/tech/sonarqube.js +1 -12
- package/icons/tech/sourcetree.js +1 -12
- package/icons/tech/spark.js +1 -12
- package/icons/tech/splunk.js +1 -12
- package/icons/tech/spring.js +1 -12
- package/icons/tech/sql-developer.js +1 -43
- package/icons/tech/sqlalchemy.js +1 -21
- package/icons/tech/sqlite.js +1 -45
- package/icons/tech/ssh.js +1 -12
- package/icons/tech/stackoverflow.js +1 -15
- package/icons/tech/stata.js +1 -12
- package/icons/tech/storybook.js +1 -12
- package/icons/tech/streamlit.js +1 -31
- package/icons/tech/stylus.js +1 -9
- package/icons/tech/subversion.js +1 -12
- package/icons/tech/svelte.js +1 -23
- package/icons/tech/swagger.js +1 -21
- package/icons/tech/swift.js +1 -21
- package/icons/tech/symfony.js +1 -12
- package/icons/tech/tailwind-css.js +1 -12
- package/icons/tech/tauri.js +1 -35
- package/icons/tech/tensorflow.js +1 -12
- package/icons/tech/terraform.js +1 -16
- package/icons/tech/tex.js +1 -6
- package/icons/tech/the-algorithms.js +1 -12
- package/icons/tech/three-js.js +1 -139
- package/icons/tech/titanium-sdk.js +1 -12
- package/icons/tech/tomcat.js +1 -26
- package/icons/tech/tortoise-git.js +1 -37
- package/icons/tech/tower.js +1 -369
- package/icons/tech/traefik-mesh.js +1 -12
- package/icons/tech/traefik-proxy.js +1 -12
- package/icons/tech/travis-ci.js +1 -12
- package/icons/tech/trello.js +1 -12
- package/icons/tech/twitter.js +1 -12
- package/icons/tech/typescript.js +1 -16
- package/icons/tech/typo3.js +1 -12
- package/icons/tech/ubuntu.js +1 -12
- package/icons/tech/uml.js +1 -29
- package/icons/tech/unity.js +1 -22
- package/icons/tech/unix.js +1 -12
- package/icons/tech/unreal-engine.js +1 -9
- package/icons/tech/uwsgi.js +1 -38
- package/icons/tech/v8.js +1 -109
- package/icons/tech/vagrant.js +1 -21
- package/icons/tech/vala.js +1 -57
- package/icons/tech/vercel.js +1 -6
- package/icons/tech/veutify.js +1 -11
- package/icons/tech/vim.js +1 -82
- package/icons/tech/visualstudio.js +1 -12
- package/icons/tech/vite.js +1 -6
- package/icons/tech/vitejs.js +1 -56
- package/icons/tech/vscode.js +1 -114
- package/icons/tech/vsphere.js +1 -25
- package/icons/tech/vue-storefront.js +1 -22
- package/icons/tech/vue.js +1 -16
- package/icons/tech/vyper.js +1 -17
- package/icons/tech/webassembly.js +1 -12
- package/icons/tech/webflow.js +1 -12
- package/icons/tech/weblate.js +1 -80
- package/icons/tech/webpack.js +1 -21
- package/icons/tech/webstorm.js +1 -80
- package/icons/tech/windows11.js +1 -12
- package/icons/tech/windows8.js +1 -12
- package/icons/tech/woo-commerce.js +1 -22
- package/icons/tech/wordpress.js +1 -70
- package/icons/tech/xamarin.js +1 -12
- package/icons/tech/xcode.js +1 -623
- package/icons/tech/xml.js +1 -51
- package/icons/tech/yaml.js +1 -16
- package/icons/tech/yarn.js +1 -9
- package/icons/tech/yii-framework.js +1 -35
- package/icons/tech/yuno-host.js +1 -15
- package/icons/tech/zend-framework.js +1 -14
- package/icons/tech/zig.js +1 -28
- package/package.json +54 -63
- package/react/index.d.mts +2659 -0
- package/react/index.mjs +166 -0
- package/vite-plugin-modules.d.ts +46 -2
- package/__app__/webcomponent/webcomponent.js +0 -74
- package/dist/cli/index.d.ts +0 -1
- package/dist/index.d.ts +0 -102
- package/dist/model/index.d.ts +0 -10
- package/dist/shared/likec4.CdjXfSGc.mjs +0 -3682
- package/dist/shared/likec4.DGrST4wG.d.mts +0 -2064
- package/dist/shared/likec4.DGrST4wG.d.ts +0 -2064
- package/dist/shared/likec4.DQwwl5M9.mjs +0 -354
- package/dist/vite-plugin/index.d.ts +0 -48
- package/react/index.d.ts +0 -853
- package/react/index.js +0 -41671
- package/react/likec4.css +0 -1
|
@@ -0,0 +1,2206 @@
|
|
|
1
|
+
import*as cb from"node:fs";import{existsSync as g_}from"node:fs";import Oi,{resolve as y_,basename as v_}from"node:path";import{fileURLToPath as w_,pathToFileURL as b_}from"node:url";import{isatty as E_}from"tty";import $_,{stripVTControlCharacters as D_}from"node:util";import R_ from"util";import Li from"path";import k_ from"os";import T_ from"crypto";import C_ from"net";import A_ from"url";import Ia from"fs";import S_ from"child_process";import{BiMap as __,nonNullable as Wt,invariant as Ie,defaultTheme as Yt,
|
|
2
|
+
DefaultRelationshipColor as Oa,nonexhaustive as je,hierarchyDistance as P_,DefaultThemeColor as So,nameFromFqn as um,isThemeColor as lb,compareFqnHierarchically as x_,DefaultArrowType as ys,ComputedNode as qd,extractStep as N_,ComputedView as La,delay as I_,DefaultLineStyle as O_,hasAtLeast as L_,LikeC4Model as vs,stringHash as F_,ThemeColors as M_,AsFqn as B_,ancestorsFqn as j_,compareNatural as db,DeploymentElement as fb,computeColorValues as q_,sortByFqnHierarchically as pb,parentFqn as hb,isScopedElementView as G_,
|
|
3
|
+
FqnRef as Fa,isSameHierarchy as mb,isAncestor as cm,FqnExpr as Ma,isNonEmptyArray as Gn,LinkedList as gb,isAutoLayoutDirection as U_,isOrOperator as yb,isAndOperator as vb}from"@likec4/core";import{ComputedNode as wb,DefaultShapeSize as W_,DefaultTextSize as z_,DefaultPaddingSize as H_,AsFqn as V_}from"@likec4/core/types";import{EventEmitter as K_}from"events";import{Buffer as lm}from"buffer";import{Graphviz as dm}from"@hpcc-js/wasm-graphviz";import{resolveRulesExtendedViews as X_}from"@likec4/core/compute-view";
|
|
4
|
+
import{MultiMap as er,DefaultWeakMap as bb,compareNatural as Eb,sortNaturalByFqn as Y_,ancestorsFqn as J_}from"@likec4/core/utils";import Fi,{hrtime as $b}from"node:process";import Q_ from"boxen";import{spawn as Z_}from"node:child_process";import{once as Db,on as eP}from"node:events";import{stat as tP}from"node:fs/promises";import{pipeline as nP}from"node:stream/promises";import rP from"node:os";import Rb from"fs/promises";import{LikeC4Model as iP}from"@likec4/core/model";const sP={},_o=oP(globalThis,
|
|
5
|
+
sP);function oP(t,e){return new Proxy(t,{get(n,r,i){return r in e?e[r]:t[r]},set(n,r,i){return r in e&&delete e[r],t[r]=i,!0},deleteProperty(n,r){let i=!1;return r in e&&(delete e[r],i=!0),r in t&&(delete t[r],i=!0),i},ownKeys(n){const r=Reflect.ownKeys(t),i=Reflect.ownKeys(e),s=new Set(i);return[...r.filter(o=>!s.has(o)),...i]},defineProperty(n,r,i){return r in e&&delete e[r],Reflect.defineProperty(t,r,i),!0},getOwnPropertyDescriptor(n,r){return r in e?Reflect.getOwnPropertyDescriptor(e,r):Reflect.
|
|
6
|
+
getOwnPropertyDescriptor(t,r)},has(n,r){return r in e||r in t}})}function kb(t){return typeof t=="function"?t:aP(t)}function aP(t){if(t==null)return()=>!1;if(t==="fatal")return e=>e.level==="fatal";if(t==="error")return e=>e.level==="fatal"||e.level==="error";if(t==="warning")return e=>e.level==="fatal"||e.level==="error"||e.level==="warning";if(t==="info")return e=>e.level==="fatal"||e.level==="error"||e.level==="warning"||e.level==="info";if(t==="debug")return()=>!0;throw new TypeError(`Invali\
|
|
7
|
+
d log level: ${t}.`)}const Tb=["debug","info","warning","error","fatal"];function Cb(t,e){const n=Tb.indexOf(t);if(n<0)throw new TypeError(`Invalid log level: ${JSON.stringify(t)}.`);const r=Tb.indexOf(e);if(r<0)throw new TypeError(`Invalid log level: ${JSON.stringify(e)}.`);return n-r}function uP(t=[]){return qn.getLogger(t)}const fm=Symbol.for("logtape.rootLogger");class qn{static getLogger(e=[]){let n=fm in _o?_o[fm]??null:null;return n==null&&(n=new qn(null,[]),_o[fm]=n),typeof e=="string"?n.
|
|
8
|
+
getChild(e):e.length===0?n:n.getChild(e)}constructor(e,n){Object.defineProperty(this,"parent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"children",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"category",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sinks",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"parentSinks",{enumerable:!0,configurable:!0,
|
|
9
|
+
writable:!0,value:"inherit"}),Object.defineProperty(this,"filters",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"lowestLevel",{enumerable:!0,configurable:!0,writable:!0,value:"debug"}),Object.defineProperty(this,"contextLocalStorage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.parent=e,this.children={},this.category=n,this.sinks=[],this.filters=[]}getChild(e){const n=typeof e=="string"?e:e[0],r=this.children[n];let i=r instanceof qn?r:r?.
|
|
10
|
+
deref();return i==null&&(i=new qn(this,[...this.category,n]),this.children[n]="WeakRef"in _o?new WeakRef(i):i),typeof e=="string"||e.length===1?i:i.getChild(e.slice(1))}reset(){for(;this.sinks.length>0;)this.sinks.shift();for(this.parentSinks="inherit";this.filters.length>0;)this.filters.shift();this.lowestLevel="debug"}resetDescendants(){for(const e of Object.values(this.children)){const n=e instanceof qn?e:e.deref();n?.resetDescendants()}this.reset()}with(e){return new rb(this,{...e})}filter(e){
|
|
11
|
+
for(const n of this.filters)if(!n(e))return!1;return this.filters.length<1?this.parent?.filter(e)??!0:!0}*getSinks(e){if(!(this.lowestLevel===null||Cb(e,this.lowestLevel)<0)){if(this.parent!=null&&this.parentSinks==="inherit")for(const n of this.parent.getSinks(e))yield n;for(const n of this.sinks)yield n}}emit(e,n){if(!(this.lowestLevel===null||Cb(e.level,this.lowestLevel)<0||!this.filter(e))){for(const r of this.getSinks(e.level))if(!n?.has(r))try{r(e)}catch(i){const s=new Set(n);s.add(r),cP.log(
|
|
12
|
+
"fatal","Failed to emit a log record to sink {sink}: {error}",{sink:r,error:i,record:e},s)}}}log(e,n,r,i){const s=qn.getLogger().contextLocalStorage?.getStore()??{};let o;const a=typeof r=="function"?{category:this.category,level:e,timestamp:Date.now(),get message(){return Ab(n,this.properties)},rawMessage:n,get properties(){return o==null&&(o={...s,...r()}),o}}:{category:this.category,level:e,timestamp:Date.now(),message:Ab(n,{...s,...r}),rawMessage:n,properties:{...s,...r}};this.emit(a,i)}logLazily(e,n,r={}){
|
|
13
|
+
const i=qn.getLogger().contextLocalStorage?.getStore()??{};let s,o;function a(){if((o==null||s==null)&&(o=n((u,...c)=>(s=u,Sb(u,c))),s==null))throw new TypeError("No log record was made.");return[o,s]}this.emit({category:this.category,level:e,get message(){return a()[0]},get rawMessage(){return a()[1]},timestamp:Date.now(),properties:{...i,...r}})}logTemplate(e,n,r,i={}){const s=qn.getLogger().contextLocalStorage?.getStore()??{};this.emit({category:this.category,level:e,message:Sb(n,r),rawMessage:n,
|
|
14
|
+
timestamp:Date.now(),properties:{...s,...i}})}debug(e,...n){typeof e=="string"?this.log("debug",e,n[0]??{}):typeof e=="function"?this.logLazily("debug",e):this.logTemplate("debug",e,n)}info(e,...n){typeof e=="string"?this.log("info",e,n[0]??{}):typeof e=="function"?this.logLazily("info",e):this.logTemplate("info",e,n)}warn(e,...n){typeof e=="string"?this.log("warning",e,n[0]??{}):typeof e=="function"?this.logLazily("warning",e):this.logTemplate("warning",e,n)}error(e,...n){typeof e=="string"?this.
|
|
15
|
+
log("error",e,n[0]??{}):typeof e=="function"?this.logLazily("error",e):this.logTemplate("error",e,n)}fatal(e,...n){typeof e=="string"?this.log("fatal",e,n[0]??{}):typeof e=="function"?this.logLazily("fatal",e):this.logTemplate("fatal",e,n)}}class rb{constructor(e,n){Object.defineProperty(this,"logger",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"properties",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.logger=e,this.properties=n}get category(){
|
|
16
|
+
return this.logger.category}get parent(){return this.logger.parent}getChild(e){return this.logger.getChild(e).with(this.properties)}with(e){return new rb(this.logger,{...this.properties,...e})}log(e,n,r,i){this.logger.log(e,n,typeof r=="function"?()=>({...this.properties,...r()}):{...this.properties,...r},i)}logLazily(e,n){this.logger.logLazily(e,n,this.properties)}logTemplate(e,n,r){this.logger.logTemplate(e,n,r,this.properties)}debug(e,...n){typeof e=="string"?this.log("debug",e,n[0]??{}):typeof e==
|
|
17
|
+
"function"?this.logLazily("debug",e):this.logTemplate("debug",e,n)}info(e,...n){typeof e=="string"?this.log("info",e,n[0]??{}):typeof e=="function"?this.logLazily("info",e):this.logTemplate("info",e,n)}warn(e,...n){typeof e=="string"?this.log("warning",e,n[0]??{}):typeof e=="function"?this.logLazily("warning",e):this.logTemplate("warning",e,n)}error(e,...n){typeof e=="string"?this.log("error",e,n[0]??{}):typeof e=="function"?this.logLazily("error",e):this.logTemplate("error",e,n)}fatal(e,...n){typeof e==
|
|
18
|
+
"string"?this.log("fatal",e,n[0]??{}):typeof e=="function"?this.logLazily("fatal",e):this.logTemplate("fatal",e,n)}}const cP=qn.getLogger(["logtape","meta"]);function Ab(t,e){const n=[];let r="";for(let i=0;i<t.length;i++){const s=t.charAt(i),o=t.charAt(i+1);if(s==="{"&&o==="{")r=r+s,i++;else if(s==="}"&&o==="}")r=r+s,i++;else if(s==="{")n.push(r),r="";else if(s==="}"){let a;r.match(/^\s|\s$/)?a=r in e?e[r]:e[r.trim()]:a=e[r],n.push(a),r=""}else r=r+s}return n.push(r),n}function Sb(t,e){const n=[];
|
|
19
|
+
for(let r=0;r<t.length;r++)n.push(t[r]),r<e.length&&n.push(e[r]);return n}function Mi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function lP(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.
|
|
20
|
+
getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}function _b(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 pm,Pb;function dP(){if(Pb)return pm;Pb=1;let t=null;if(typeof window>"u"&&("process"in globalThis&&"versions"in globalThis.process&&"node"in globalThis.process.
|
|
21
|
+
versions&&typeof globalThis.caches>"u"&&typeof globalThis.addEventListener!="function"||"Bun"in globalThis))try{t=[_b][0](`${["node","util"].join(":")}`)}catch{t=null}return pm=t,pm}var fP=dP();const Gd=Mi(fP),hm={debug:"DBG",info:"INF",warning:"WRN",error:"ERR",fatal:"FTL"},xb="Deno"in globalThis&&"inspect"in globalThis.Deno&&typeof globalThis.Deno.inspect=="function"?(t,e)=>globalThis.Deno.inspect(t,{strAbbreviateSize:1/0,iterableLimit:1/0,...e}):Gd!=null&&"inspect"in Gd&&typeof Gd.inspect=="f\
|
|
22
|
+
unction"?(t,e)=>Gd.inspect(t,{maxArrayLength:1/0,maxStringLength:1/0,...e}):t=>JSON.stringify(t);function Nb(t={}){const e=t.timestamp==null||t.timestamp==="date-time-timezone"?o=>new Date(o).toISOString().replace("T"," ").replace("Z"," +00:00"):t.timestamp==="date-time-tz"?o=>new Date(o).toISOString().replace("T"," ").replace("Z"," +00"):t.timestamp==="date-time"?o=>new Date(o).toISOString().replace("T"," ").replace("Z",""):t.timestamp==="time-timezone"?o=>new Date(o).toISOString().replace(/.*T/,
|
|
23
|
+
"").replace("Z"," +00:00"):t.timestamp==="time-tz"?o=>new Date(o).toISOString().replace(/.*T/,"").replace("Z"," +00"):t.timestamp==="time"?o=>new Date(o).toISOString().replace(/.*T/,"").replace("Z",""):t.timestamp==="date"?o=>new Date(o).toISOString().replace(/T.*/,""):t.timestamp==="rfc3339"?o=>new Date(o).toISOString():t.timestamp,n=t.category??"\xB7",r=t.value??xb,i=t.level==null||t.level==="ABBR"?o=>hm[o]:t.level==="abbr"?o=>hm[o].toLowerCase():t.level==="FULL"?o=>o.toUpperCase():t.level==="\
|
|
24
|
+
full"?o=>o:t.level==="L"?o=>o.charAt(0).toUpperCase():t.level==="l"?o=>o.charAt(0):t.level,s=t.format??(({timestamp:o,level:a,category:u,message:c})=>`${o} [${a}] ${u}: ${c}`);return o=>{let a="";for(let d=0;d<o.message.length;d++)d%2===0?a+=o.message[d]:a+=r(o.message[d]);const u=e(o.timestamp),c=i(o.level),l=typeof n=="function"?n(o.category):o.category.join(n);return`${s({timestamp:u,level:c,category:l,message:a,record:o})}
|
|
25
|
+
`}}Nb();const mm="\x1B[0m",gm={black:"\x1B[30m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m"},ym={bold:"\x1B[1m",dim:"\x1B[2m",italic:"\x1B[3m",underline:"\x1B[4m",strikethrough:"\x1B[9m"},pP={debug:"blue",info:"green",warning:"yellow",error:"red",fatal:"magenta"};function Ib(t={}){const e=t.format,n=typeof t.timestampStyle>"u"?"dim":t.timestampStyle,r=t.timestampColor??null,i=`${n==null?"":ym[n]}${r==null?"":gm[r]}`,s=n==null&&
|
|
26
|
+
r==null?"":mm,o=typeof t.levelStyle>"u"?"bold":t.levelStyle,a=t.levelColors??pP,u=typeof t.categoryStyle>"u"?"dim":t.categoryStyle,c=t.categoryColor??null,l=`${u==null?"":ym[u]}${c==null?"":gm[c]}`,f=u==null&&c==null?"":mm;return Nb({timestamp:"date-time-tz",value(d){return xb(d,{colors:!0})},...t,format({timestamp:d,level:p,category:h,message:v,record:b}){const y=a[b.level];return d=`${i}${d}${s}`,p=`${o==null?"":ym[o]}${y==null?"":gm[y]}${p}${o==null&&y==null?"":mm}`,e==null?`${d} ${p} ${l}${h}\
|
|
27
|
+
:${f} ${v}`:e({timestamp:d,level:p,category:`${l}${h}${f}`,message:v,record:b})}})}Ib();const hP={debug:"background-color: gray; color: white;",info:"background-color: white; color: black;",warning:"background-color: orange; color: black;",error:"background-color: red; color: white;",fatal:"background-color: maroon; color: white;"};function mP(t){let e="";const n=[];for(let s=0;s<t.message.length;s++)s%2===0?e+=t.message[s]:(e+="%o",n.push(t.message[s]));const r=new Date(t.timestamp);return[`%c${`${r.
|
|
28
|
+
getUTCHours().toString().padStart(2,"0")}:${r.getUTCMinutes().toString().padStart(2,"0")}:${r.getUTCSeconds().toString().padStart(2,"0")}.${r.getUTCMilliseconds().toString().padStart(3,"0")}`} %c${hm[t.level]}%c %c${t.category.join("\xB7")} %c${e}`,"color: gray;",hP[t.level],"background-color: default;","color: gray;","color: default;",...n]}function Ob(t={}){const e=t.formatter??mP,n={debug:"debug",info:"info",warning:"warn",error:"error",fatal:"error",...t.levelMap??{}},r=t.console??globalThis.
|
|
29
|
+
console;return i=>{const s=e(i),o=n[i.level];if(o===void 0)throw new TypeError(`Invalid log level: ${i.level}.`);if(typeof s=="string"){const a=s.replace(/\r?\n$/,"");r[o](a)}else r[o](...s)}}let vm=null;const Lb=new Set,Ud=new Set,gP=new Set;function yP(t){return t.category.length===0||t.category.length===1&&t.category[0]==="logtape"||t.category.length===2&&t.category[0]==="logtape"&&t.category[1]==="meta"}function vP(t){if(vm!=null&&!t.reset)throw new ws("Already configured; if you want to res\
|
|
30
|
+
et, turn on the reset flag.");if(gP.size>0)throw new ws("Previously configured async disposables are still active. Use configure() instead or explicitly dispose them using dispose().");Fb();try{wP(t,!1)}catch(e){throw e instanceof ws&&Fb(),e}}function wP(t,e){vm=t;let n=!1,r=!1;for(const s of t.loggers){yP(s)&&(n=!0);const o=qn.getLogger(s.category);for(const a of s.sinks??[]){const u=t.sinks[a];if(!u)throw new ws(`Sink not found: ${a}.`);o.sinks.push(u)}o.parentSinks=s.parentSinks??"inherit",s.
|
|
31
|
+
lowestLevel!==void 0&&(o.lowestLevel=s.lowestLevel),s.level!==void 0&&(r=!0,o.filters.push(kb(s.level)));for(const a of s.filters??[]){const u=t.filters?.[a];if(u===void 0)throw new ws(`Filter not found: ${a}.`);o.filters.push(kb(u))}Lb.add(o)}qn.getLogger().contextLocalStorage=t.contextLocalStorage;for(const s of Object.values(t.sinks)){if(Symbol.asyncDispose in s)throw new ws("Async disposables cannot be used with configureSync().");Symbol.dispose in s&&Ud.add(s)}for(const s of Object.values(t.
|
|
32
|
+
filters??{}))if(!(s==null||typeof s=="string")){if(Symbol.asyncDispose in s)throw new ws("Async disposables cannot be used with configureSync().");Symbol.dispose in s&&Ud.add(s)}"process"in _o&&!("Deno"in _o)?process.on("exit",wm):addEventListener("unload",wm);const i=qn.getLogger(["logtape","meta"]);n||i.sinks.push(Ob()),i.info("LogTape loggers are configured. Note that LogTape itself uses the meta logger, which has category {metaLoggerCategory}. The meta logger purposes to log internal error\
|
|
33
|
+
s such as sink exceptions. If you are seeing this message, the meta logger is automatically configured. It's recommended to configure the meta logger with a separate sink so that you can easily notice if logging itself fails or is misconfigured. To turn off this message, configure the meta logger with higher log levels than {dismissLevel}. See also <https://logtape.org/manual/categories#meta-logger>.",{metaLoggerCategory:["logtape","meta"],dismissLevel:"info"}),r&&i.warn("The level option is\
|
|
34
|
+
deprecated in favor of lowestLevel option. Please update your configuration. See also <https://logtape.org/manual/levels#configuring-severity-levels>.")}function Fb(){wm(),bP()}function bP(){const t=qn.getLogger([]);t.resetDescendants(),delete t.contextLocalStorage,Lb.clear(),vm=null}function wm(){for(const t of Ud)t[Symbol.dispose]();Ud.clear()}class ws extends Error{constructor(e){super(e),this.name="ConfigureError"}}const EP=t=>{bm.forEach(e=>{$P(t,e)})},bm=["name","message","stack","cause",
|
|
35
|
+
"errors"],$P=(t,e)=>{const n=Em(t,e);if(n!==void 0){if(DP(n)){Kr(t,e,t[e]);return}RP(n)&&Mb(t,e,n)}},Em=(t,e)=>{const n=Object.getOwnPropertyDescriptor(t,e);if(n!==void 0)return n;const r=Object.getPrototypeOf(t);return r===null?void 0:Em(r,e)},DP=({get:t,set:e})=>t!==void 0&&e===void 0,RP=({enumerable:t,writable:e})=>t||!e,Kr=(t,e,n)=>{Mb(t,e,{value:n})},Mb=(t,e,n)=>{Object.defineProperty(t,e,{...n,..."get"in n||"set"in n?{}:{writable:!0},enumerable:!1,configurable:!0})},kP=(t,e)=>{if(Array.isArray(
|
|
36
|
+
t.errors)){const n=t.errors.filter(TP).map(e).filter(Boolean);Kr(t,"errors",n)}else CP(t)?Kr(t,"errors",[]):t.errors!==void 0&&AP(t)},TP=t=>t!==void 0,CP=t=>"AggregateError"in globalThis&&(t.name==="AggregateError"||t instanceof AggregateError),AP=t=>{delete t.errors,t.errors!==void 0&&Kr(t,"errors",[])},SP=(t,e)=>{if(!("cause"in t))return;const n=t.cause===void 0?t.cause:e(t.cause);n===void 0?delete t.cause:Kr(t,"cause",n)},Bb=t=>_P(t)||PP(t),_P=t=>{try{return t instanceof Error}catch{return!1}},
|
|
37
|
+
PP=t=>{try{return xP.has(Object.prototype.toString.call(t))}catch{return!1}},xP=new Set(["[object Error]","[object DOMException]","[object DOMError]","[object Exception]"]);function Ba(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}const NP=t=>!Object.isExtensible(t)||bm.some(e=>IP(t,e)||OP(t,e)),IP=(t,e)=>{const n=Object.getOwnPropertyDescriptor(
|
|
38
|
+
t,e);return n!==void 0&&!n.configurable},OP=(t,e)=>{try{return t[e],!1}catch{return!0}},$m=t=>{const e=LP(t.message,t.name);Kr(t,"stack",e)},LP=(t="",e="Error")=>{const n=FP(e),{stack:r}=new n(t);return typeof r=="string"&&r!==""?r:`${e}: ${t}`},FP=t=>{const e={value:t,enumerable:!1,writable:!0,configurable:!0},n=Object.defineProperty(class extends Error{},"name",e);return Object.defineProperty(n.prototype,"name",e),n},MP=t=>{const e={};for(const n of BP(t))try{const r=t[n],{enumerable:i,configurable:s,
|
|
39
|
+
writable:o=!0}=Em(t,n);Object.defineProperty(e,n,{value:r,enumerable:i,configurable:s,writable:o})}catch{}return e},BP=t=>{const e=jP(t);for(const n of bm)qP(t,n)&&e.push(n);return e},jP=t=>{try{return Reflect.ownKeys(t)}catch{return[]}},qP=(t,e)=>{try{return e in t&&!Object.hasOwn(t,e)}catch{return!1}},jb=t=>{const{name:e,message:n,stack:r,cause:i,errors:s,...o}=MP(t),a=GP(n,o),u=HP(e,a);return n===a&&VP(u,o),Object.entries({name:e,stack:r,cause:i,errors:s}).forEach(([c,l])=>{KP(u,c,l)}),r===void 0&&
|
|
40
|
+
$m(u),u},GP=(t,e)=>typeof t=="string"&&t!==""?t:zP(UP(e)),UP=t=>{try{return JSON.stringify(t)}catch{return WP(t)}},WP=t=>{try{return String(t)}catch{return"Invalid error"}},zP=t=>t.length<qb?t:`${t.slice(0,qb)}...`,qb=1e3,HP=(t,e)=>t==="AggregateError"&&"AggregateError"in globalThis?new AggregateError([],e):t in Gb?new Gb[t](e):new Error(e),Gb={Error,ReferenceError,TypeError,SyntaxError,RangeError,URIError,EvalError},VP=(t,e)=>{for(const n in e)n in t||(t[n]=e[n])},KP=(t,e,n)=>{n!==void 0&&Kr(t,
|
|
41
|
+
e,n)},XP=t=>{try{const e=new Error(String(t));return $m(e),e}catch(e){return e}},{toString:YP}=Object.prototype,JP=t=>QP(t)?jb(t):Bb(t)?ZP(t)?jb(t):t:XP(t),QP=t=>{try{return Ba(t)}catch{return!1}},ZP=t=>ex(t)||NP(t)||tx(t),ex=t=>{try{return YP.call(t)==="[object Object]"}catch{return!0}},tx=t=>typeof t.constructor!="function"||typeof t.constructor.name!="string"||t.constructor.name===""||t.constructor.prototype!==Object.getPrototypeOf(t),nx=(t,{shallow:e=!1}={})=>Ub(t,[],e),Ub=(t,e,n)=>{if(e.includes(
|
|
42
|
+
t))return;const r=n?rx:s=>Ub(s,[...e,t],n),i=JP(t);return ix(i,r),i},rx=t=>t,ix=(t,e)=>{sx(t),ox(t),ax(t),SP(t,e),kP(t,e),EP(t)},sx=t=>{if(Wd(t.name))return;const e=Object.getPrototypeOf(t).name,n=Wd(e)?e:t.constructor.name;Kr(t,"name",n)},ox=t=>{Wd(t.message)||Kr(t,"message","")},ax=t=>{Wd(t.stack)||$m(t)},Wd=t=>typeof t=="string"&&t!=="",ux=t=>{Dm.forEach(e=>{cx(t,e)})},Dm=["name","message","stack","cause","errors"],cx=(t,e)=>{const n=Rm(t,e);if(n!==void 0){if(lx(n)){Xr(t,e,t[e]);return}dx(n)&&
|
|
43
|
+
Wb(t,e,n)}},Rm=(t,e)=>{const n=Object.getOwnPropertyDescriptor(t,e);if(n!==void 0)return n;const r=Object.getPrototypeOf(t);return r===null?void 0:Rm(r,e)},lx=({get:t,set:e})=>t!==void 0&&e===void 0,dx=({enumerable:t,writable:e})=>t||!e,Xr=(t,e,n)=>{Wb(t,e,{value:n})},Wb=(t,e,n)=>{Object.defineProperty(t,e,{...n,..."get"in n||"set"in n?{}:{writable:!0},enumerable:!1,configurable:!0})},fx=(t,e)=>{if(Array.isArray(t.errors)){const n=t.errors.filter(px).map(e).filter(Boolean);Xr(t,"errors",n)}else hx(
|
|
44
|
+
t)?Xr(t,"errors",[]):t.errors!==void 0&&mx(t)},px=t=>t!==void 0,hx=t=>"AggregateError"in globalThis&&(t.name==="AggregateError"||t instanceof AggregateError),mx=t=>{delete t.errors,t.errors!==void 0&&Xr(t,"errors",[])},gx=(t,e)=>{if(!("cause"in t))return;const n=t.cause===void 0?t.cause:e(t.cause);n===void 0?delete t.cause:Xr(t,"cause",n)},yx=t=>vx(t)||wx(t),vx=t=>{try{return t instanceof Error}catch{return!1}},wx=t=>{try{return bx.has(Object.prototype.toString.call(t))}catch{return!1}},bx=new Set(
|
|
45
|
+
["[object Error]","[object DOMException]","[object DOMError]","[object Exception]"]),Ex=t=>!Object.isExtensible(t)||Dm.some(e=>$x(t,e)||Dx(t,e)),$x=(t,e)=>{const n=Object.getOwnPropertyDescriptor(t,e);return n!==void 0&&!n.configurable},Dx=(t,e)=>{try{return t[e],!1}catch{return!0}},km=t=>{const e=Rx(t.message,t.name);Xr(t,"stack",e)},Rx=(t="",e="Error")=>{const n=kx(e),{stack:r}=new n(t);return typeof r=="string"&&r!==""?r:`${e}: ${t}`},kx=t=>{const e={value:t,enumerable:!1,writable:!0,configurable:!0},
|
|
46
|
+
n=Object.defineProperty(class extends Error{},"name",e);return Object.defineProperty(n.prototype,"name",e),n},Tx=t=>{const e={};for(const n of Cx(t))try{const r=t[n],{enumerable:i,configurable:s,writable:o=!0}=Rm(t,n);Object.defineProperty(e,n,{value:r,enumerable:i,configurable:s,writable:o})}catch{}return e},Cx=t=>{const e=Ax(t);for(const n of Dm)Sx(t,n)&&e.push(n);return e},Ax=t=>{try{return Reflect.ownKeys(t)}catch{return[]}},Sx=(t,e)=>{try{return e in t&&!Object.hasOwn(t,e)}catch{return!1}},
|
|
47
|
+
zb=t=>{const{name:e,message:n,stack:r,cause:i,errors:s,...o}=Tx(t),a=_x(n,o),u=Ix(e,a);return n===a&&Ox(u,o),Object.entries({name:e,stack:r,cause:i,errors:s}).forEach(([c,l])=>{Lx(u,c,l)}),r===void 0&&km(u),u},_x=(t,e)=>typeof t=="string"&&t!==""?t:Nx(Px(e)),Px=t=>{try{return JSON.stringify(t)}catch{return xx(t)}},xx=t=>{try{return String(t)}catch{return"Invalid error"}},Nx=t=>t.length<Hb?t:`${t.slice(0,Hb)}...`,Hb=1e3,Ix=(t,e)=>t==="AggregateError"&&"AggregateError"in globalThis?new AggregateError(
|
|
48
|
+
[],e):t in Vb?new Vb[t](e):new Error(e),Vb={Error,ReferenceError,TypeError,SyntaxError,RangeError,URIError,EvalError},Ox=(t,e)=>{for(const n in e)n in t||(t[n]=e[n])},Lx=(t,e,n)=>{n!==void 0&&Xr(t,e,n)},Fx=t=>{try{const e=new Error(String(t));return km(e),e}catch(e){return e}},{toString:Mx}=Object.prototype,Bx=t=>jx(t)?zb(t):yx(t)?qx(t)?zb(t):t:Fx(t),jx=t=>{try{return Ba(t)}catch{return!1}},qx=t=>Gx(t)||Ex(t)||Ux(t),Gx=t=>{try{return Mx.call(t)==="[object Object]"}catch{return!0}},Ux=t=>typeof t.
|
|
49
|
+
constructor!="function"||typeof t.constructor.name!="string"||t.constructor.name===""||t.constructor.prototype!==Object.getPrototypeOf(t),Tm=(t,{shallow:e=!1}={})=>Kb(t,[],e),Kb=(t,e,n)=>{if(e.includes(t))return;const r=n?Wx:s=>Kb(s,[...e,t],n),i=Bx(t);return zx(i,r),i},Wx=t=>t,zx=(t,e)=>{Hx(t),Vx(t),Kx(t),gx(t,e),fx(t,e),ux(t)},Hx=t=>{if(zd(t.name))return;const e=Object.getPrototypeOf(t).name,n=zd(e)?e:t.constructor.name;Xr(t,"name",n)},Vx=t=>{zd(t.message)||Xr(t,"message","")},Kx=t=>{zd(t.stack)||
|
|
50
|
+
km(t)},zd=t=>typeof t=="string"&&t!=="",Xx=(t,e,n=t.name)=>{if(Yx(e),typeof n!="string")throw new TypeError(`currentName must be a string: ${n}`);return n},Yx=t=>{if(!Jx(t))throw new TypeError(`ErrorClass must be a class: ${t}`);if(!Xb(t.prototype))throw new TypeError(`ErrorClass must inherit from Error: ${t}`);if(!Qx(t))throw new TypeError(`ErrorClass must be have a valid constructor: ${t}`)},Jx=t=>typeof t=="function"&&typeof t.prototype=="object"&&t.prototype!==null,Xb=t=>t!==null&&(t.name===
|
|
51
|
+
"Error"||Xb(Object.getPrototypeOf(t))),Qx=t=>typeof t.prototype.constructor=="function",Yb=(t,e,n)=>{Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})},Zx=(t,e)=>{Object.getPrototypeOf(t)!==e.prototype&&(e1(t,e),Zb(t,"constructor"),t1(t,e))},e1=(t,e)=>{Object.setPrototypeOf(t,e.prototype)},t1=(t,e)=>{Zb(t,"name");const n=Jb(e.prototype);t.name!==n&&Yb(t,"name",n)},Jb=t=>n1(t)??r1(t)??Jb(Object.getPrototypeOf(t)),n1=t=>Object.hasOwn(t,"name")&&Qb(t.name)?t.name:void 0,
|
|
52
|
+
r1=t=>typeof t.constructor=="function"&&Qb(t.constructor.name)?t.constructor.name:void 0,Qb=t=>typeof t=="string"&&t!=="",Zb=(t,e)=>{Object.hasOwn(t,e)&&delete t[e]},i1=(t,e)=>{if(!s1(t,e))return;const n=a1(t,e);Yb(t,"stack",n)},s1=(t,e)=>e!==t.name&&e!==""&&t.stack.includes(e)&&o1(),o1=()=>{class t extends Error{}const e={value:e0,enumerable:!1,writable:!0,configurable:!0};Object.defineProperty(t,"name",e),Object.defineProperty(t.prototype,"name",e);const{stack:n}=new t("");return typeof n=="st\
|
|
53
|
+
ring"&&n.includes(e0)},e0="SetErrorClassError",a1=({name:t,stack:e},n)=>{if(e.startsWith(`${n}: `))return e.replace(n,t);const r=u1(n,t),[i,s]=r.find(([o])=>e.includes(o));return e.replace(i,s)},u1=(t,e)=>[[`
|
|
54
|
+
${t}: `,`
|
|
55
|
+
${e}: `],[`${t}: `,`${e}: `],[`${t} `,`${e} `],[t,e]],c1=(t,e,n)=>{const r=Tm(t),i=Xx(r,e,n);return Zx(r,e),i1(r,i),r},l1=(t,e)=>e.configurable===!1?d1(t,e):h1(t,e),d1=(t,e)=>({...e,...f1(t,e),...p1(t,e)}),f1=(t,e)=>e.writable===!0&&t.writable===!1?{writable:!1}:{},p1=(t,e)=>t.hasValue&&"value"in e&&e.writable===!0?{value:t.value}:{},h1=(t,e)=>{const n=ja(t.enumerable,e.enumerable,!0),r=ja(t.writable,e.writable,!0),i=ja(t.configurable,e.configurable,!0);return{...m1(t,e,r),enumerable:n,configurable:i}},
|
|
56
|
+
m1=(t,e,n)=>t.hasValue?{value:t.value,writable:n}:!t0(t)&&!t0(e)?{value:e.value,writable:n}:{get:ja(t.get,e.get),set:ja(t.set,e.set)},t0=({get:t,set:e})=>t!==void 0||e!==void 0,ja=(t,e,n)=>t??e??n,g1=(t,e,n)=>{if(!y1(t))throw new TypeError(`Argument must be an object: ${t}`);if(!v1(e))throw new TypeError(`Property key must be a string, a symbol or an integer: ${e}`);return w1(n)},y1=t=>typeof t=="object"&&t!==null,v1=t=>{const e=typeof t;return e==="string"||e==="symbol"||e==="number"},w1=t=>{if(!Ba(
|
|
57
|
+
t))throw new TypeError(`Descriptor must be a plain object: ${t}`);const{enumerable:e,writable:n,configurable:r,value:i,get:s,set:o,...a}=t,u="value"in t;return b1({enumerable:e,writable:n,configurable:r,get:s,set:o,unknownProps:a,hasValue:u}),{enumerable:e,writable:n,configurable:r,value:i,get:s,set:o,hasValue:u}},b1=({enumerable:t,writable:e,configurable:n,get:r,set:i,unknownProps:s,hasValue:o})=>{n0(o,r,"get"),n0(o,i,"set"),Cm(t,"enumerable"),Cm(e,"writable"),Cm(n,"configurable"),$1(s)},n0=(t,e,n)=>{
|
|
58
|
+
if(E1(e,n),t&&e!==void 0)throw new TypeError(`Descriptor property "value" and "${n}" must not both be defined: ${e}`)},E1=(t,e)=>{if(t!==void 0&&typeof t!="function")throw new TypeError(`Descriptor property "${e}" must be a function: ${t}`)},Cm=(t,e)=>{if(t!==void 0&&typeof t!="boolean")throw new TypeError(`Descriptor property "${e}" must be a boolean: ${t}`)},$1=t=>{const[e]=Object.keys(t);if(e!==void 0)throw new TypeError(`Unknown descriptor property "${e}": ${t[e]}`)},D1=(t,e,n)=>{const r=g1(
|
|
59
|
+
t,e,n),i=r0(t,e),s=l1(r,i);return R1(t,e,s),t},r0=(t,e)=>{const n=Object.getOwnPropertyDescriptor(t,e);if(n!==void 0)return n;const r=Object.getPrototypeOf(t);return r===null?{}:r0(r,e)},R1=(t,e,n)=>{try{Object.defineProperty(t,e,n)}catch{}},k1=(t,e,n)=>{if(n!==void 0)return i0(t,e,n);try{delete t[e]}catch{}if(t[e]!==void 0)return i0(t,e)},i0=(t,e,n)=>{const r=T1(e);D1(t,e,{value:n,...r})},T1=t=>typeof t=="string"&&t.startsWith("_")?{enumerable:!1}:{},C1=(t,e,n={})=>{if(s0(t,"First argument"),s0(
|
|
60
|
+
e,"Second argument"),!Ba(n))throw new TypeError(`Options must be a plain object: ${n}`);const{soft:r=!1}=n;if(typeof r!="boolean")throw new TypeError(`Option "soft" must be a boolean: ${r}`);return{soft:r}},s0=(t,e)=>{if(t===void 0)throw new TypeError(`${e} is required.`);if(!A1(t))throw new TypeError(`${e} must be a plain object or an error: ${t}`)},A1=t=>Ba(t)||Bb(t),S1=({error:t,props:e,propName:n,soft:r})=>_1(n)||!N1.call(e,n)||r&&t[n]!==void 0,_1=t=>t in P1||x1.has(t),P1=new Error("check"),
|
|
61
|
+
x1=new Set(["prototype","errors","cause"]),{propertyIsEnumerable:N1}=Object.prototype,I1=(t,e,n)=>{const{soft:r}=C1(t,e,n);for(const i of Reflect.ownKeys(e))O1({error:t,props:e,propName:i,soft:r});return t},O1=({error:t,props:e,propName:n,soft:r})=>{S1({error:t,props:e,propName:n,soft:r})||k1(t,n,e[n])},Hd=(t,e,n)=>{Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!1,configurable:!0})},L1=(t,e)=>{if(t.errors===void 0)return;const n=t.errors.map(r=>e(r).error).filter(Boolean);Hd(t,"error\
|
|
62
|
+
s",n)},F1=({target:t,source:e,parent:n,child:r})=>{if(!o0(t)){M1(t,e);return}o0(e)&&Hd(t,"errors",[...r.errors,...n.errors])},M1=(t,e)=>{e.errors!==void 0&&Hd(t,"errors",e.errors)},o0=t=>t.errors!==void 0&&t.errors.length!==0,B1=(t,e,n=t.message)=>{if(typeof e!="string")throw new TypeError(`newMessage must be a string: ${e}`);if(typeof n!="string")throw new TypeError(`currentMessage must be a string: ${n}`);return n},j1=({name:t,stack:e},n,r)=>r!==""&&e.includes(r)?q1({name:t,stack:e,newMessage:n,
|
|
63
|
+
currentMessage:r}):U1(t,e,n),q1=({name:t,stack:e,newMessage:n,currentMessage:r})=>{const i=G1(t,n,r),[s,o]=i.find(([a])=>e.includes(a));return e.replace(s,o)},G1=(t,e,n)=>[[`${t}: ${n}`,`${t}: ${e}`],[`: ${n}`,`: ${e}`],[`
|
|
64
|
+
${n}`,`
|
|
65
|
+
${e}`],[` ${n}`,` ${e}`],[n,e]],U1=(t,e,n)=>{const r=`${t}: `,i=n.trimEnd();return e===t||e.startsWith(`${t}
|
|
66
|
+
`)?e.replace(t,`${r}${i}`):e.startsWith(r)?e.replace(r,`${r}${i}
|
|
67
|
+
`):`${r}${i}
|
|
68
|
+
${e}`},W1=(t,e,n)=>{const r=Tm(t),i=B1(r,e,n);return u0(r,"message",e),z1(r,e,i),r},z1=(t,e,n)=>{if(e===n||!H1())return;const r=j1(t,e,n);u0(t,"stack",r)},H1=()=>{const{stack:t}=new Error(a0);return typeof t=="string"&&t.includes(a0)},a0="set-error-message test message",u0=(t,e,n)=>{Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})},V1=(t,e,n)=>{if(typeof e!="string")throw new TypeError(`Second argument must be a message string: ${e}`);const r=Tm(t),i=K1(e,r.message);
|
|
69
|
+
return W1(r,i,n)},K1=(t,e)=>{const n=t.trim(),r=e.trim();return n===""?r:r===""?n:X1(n,r,t)},X1=(t,e,n)=>t.endsWith(Y1)?n.endsWith(J1)?`${t}
|
|
70
|
+
${e}`:`${t} ${e}`:`${e}
|
|
71
|
+
${t}`,Y1=":",J1=`
|
|
72
|
+
`,Q1=({parent:t,child:e,target:n,stackError:r})=>{const i=t.message,s=r.message;return n.message=e.message,V1(n,i,s)},Z1=(t,e)=>c0(t)===e,c0=t=>typeof t=="object"&&t!==null?t.stack:void 0,eN=({wrap:t,target:e,source:n,childHasStack:r})=>t===r?e:(Hd(e,"stack",n.stack),n),tN=t=>{const{wrap:e,name:n}=t;return typeof e!="boolean"?n==="Error":(Object.hasOwn(t,"wrap")&&delete t.wrap,e)},l0=t=>d0(t,[]).error,d0=(t,e)=>{if(e.includes(t))return{};const n=u=>d0(u,[...e,t]),r=c0(t),i=nx(t,{shallow:!0}),s=Z1(
|
|
73
|
+
i,r);L1(i,n);const{parent:o,childHasStack:a}=nN(i,n);return{error:o,errorHasStack:s||a}},nN=(t,e)=>{const n=tN(t);if(t.cause===void 0)return{parent:t,childHasStack:!1};const{error:r,errorHasStack:i}=e(t.cause);return delete t.cause,{parent:rN({parent:t,child:r,childHasStack:i,wrap:n}),childHasStack:i}},rN=({parent:t,child:e,childHasStack:n,wrap:r})=>{if(e===void 0)return t;const[i,s]=r?[e,t]:[t,e],o=eN({wrap:r,target:i,source:s,childHasStack:n}),a=c1(i,i.constructor,o.name),u=Q1({parent:t,child:e,
|
|
74
|
+
target:a,stackError:o});return F1({target:u,source:s,parent:t,child:e}),I1(u,s,{soft:!r})};function f0(t){return function(e,n){if(typeof n?.toJSON=="function"&&(n=n.toJSON()),!(n!==null&&typeof n=="object"))return n;if(t.has(n))return"[Circular]";t.add(n);const r=Array.isArray(n)?[]:{};for(const[i,s]of Object.entries(n))r[i]=f0(t)(i,s);return t.delete(n),r}}function iN(t,{indentation:e}={}){return JSON.stringify(t,f0(new WeakSet),e)}const p0=t=>t.split(`
|
|
75
|
+
`).map(e=>e.trim().replace("file://",""));function Am(t,e=2){return t=Array.isArray(t)?t:t.split(`
|
|
76
|
+
`),t.map(n=>`${" ".repeat(e)}${n}`).join(`
|
|
77
|
+
`)}function hr(t){if(typeof t=="string")return t;if(t instanceof Error){const e=l0(t);if(e.stack){const n=p0(e.stack);return e.message+`
|
|
78
|
+
`+Am(n.slice(1))}return e.message}return iN(t)}function sN(t){const e=Object.values(t.properties).filter(n=>n instanceof Error).map(n=>{const r=l0(n);return r.stack&&(r.stack=p0(r.stack).join(`
|
|
79
|
+
`)),r});return e.length===0?null:e.length===1?e[0]:new AggregateError(e)}function oN(t,e){const n=sN(t.record);if(n){let r=n.message;return n.stack&&(r=r+`
|
|
80
|
+
`+Am(n.stack.split(`
|
|
81
|
+
`).slice(1))),r=`${lN.red}${r}${cN}`,{...t,message:t.message+`
|
|
82
|
+
`+Am(r)}}return t}const aN={debug:"DEBUG",info:"INFO ",warning:"WARN ",error:"ERROR",fatal:"FATAL"},uN=t=>aN[t],cN="\x1B[0m",lN={red:"\x1B[31m"};function dN(t){const e=({timestamp:n,level:r,category:i,message:s})=>`${n} ${r} ${i} ${s}`;return Ib({timestamp:"time",level:uN,categoryStyle:"bold",categoryColor:"cyan",category:".",...t,format:n=>e(oN(n))})}function h0(t){return Ob({formatter:dN(),...t})}const vn=uP("likec4");function fN(t){return vn.getChild(t)}let pN=!1;function hN(t){try{pN=!0;const e=t?.
|
|
83
|
+
sinks??{};vP({...t,sinks:{...e,console:e.console??h0()},loggers:[{category:["logtape","meta"],sinks:["console"],lowestLevel:"warning"},...t?.loggers??[{category:"likec4",sinks:["console"],lowestLevel:"debug"}]]})}catch(e){console.error(e)}}function Sm(t){if(t===null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in t?!1:Symbol.toStringTag in t?Object.prototype.toString.call(t)==="[object Module\
|
|
84
|
+
]":!0}function _m(t,e,n=".",r){if(!Sm(e))return _m(t,{},n,r);const i=Object.assign({},e);for(const s in t){if(s==="__proto__"||s==="constructor")continue;const o=t[s];o!=null&&(r&&r(i,s,o,n)||(Array.isArray(o)&&Array.isArray(i[s])?i[s]=[...o,...i[s]]:Sm(o)&&Sm(i[s])?i[s]=_m(o,i[s],(n?`${n}.`:"")+s.toString(),r):i[s]=o))}return i}function mN(t){return(...e)=>e.reduce((n,r)=>_m(n,r,"",t),{})}const Pm=mN();function Rt(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function tr(t){return typeof t==
|
|
85
|
+
"object"&&t!==null&&typeof t.$refText=="string"}function gN(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function Vd(t){return typeof t=="object"&&t!==null&&Rt(t.container)&&tr(t.reference)&&typeof t.message=="string"}class m0{constructor(){this.subtypes={},this.allSubtypes={}}isInstance(e,n){return Rt(e)&&this.isSubtype(e.$type,n)}isSubtype(e,n){if(e===n)return!0;let r=this.subtypes[e];r||(r=this.subtypes[e]={});const i=r[n];if(i!==
|
|
86
|
+
void 0)return i;{const s=this.computeIsSubtype(e,n);return r[n]=s,s}}getAllSubTypes(e){const n=this.allSubtypes[e];if(n)return n;{const r=this.getAllTypes(),i=[];for(const s of r)this.isSubtype(s,e)&&i.push(s);return this.allSubtypes[e]=i,i}}}function Bi(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function bs(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function g0(t){return Bi(t)&&typeof t.fullText=="string"}class Zt{constructor(e,n){this.startFn=e,this.
|
|
87
|
+
nextFn=n}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){const e=this.iterator();let n=0,r=e.next();for(;!r.done;)n++,r=e.next();return n}toArray(){const e=[],n=this.iterator();let r;do r=n.next(),r.value!==void 0&&e.push(r.value);while(!r.done);return e}toSet(){return new Set(this)}toMap(e,n){const r=this.map(i=>[e?e(i):i,n?n(i):i]);return new Map(
|
|
88
|
+
r)}toString(){return this.join()}concat(e){return new Zt(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),n=>{let r;if(!n.firstDone){do if(r=this.nextFn(n.first),!r.done)return r;while(!r.done);n.firstDone=!0}do if(r=n.iterator.next(),!r.done)return r;while(!r.done);return Pn})}join(e=","){const n=this.iterator();let r="",i,s=!1;do i=n.next(),i.done||(s&&(r+=e),r+=yN(i.value)),s=!0;while(!i.done);return r}indexOf(e,n=0){const r=this.iterator();let i=0,s=r.next();for(;!s.done;){
|
|
89
|
+
if(i>=n&&s.value===e)return i;s=r.next(),i++}return-1}every(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(!e(r.value))return!1;r=n.next()}return!0}some(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(e(r.value))return!0;r=n.next()}return!1}forEach(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;)e(i.value,r),i=n.next(),r++}map(e){return new Zt(this.startFn,n=>{const{done:r,value:i}=this.nextFn(n);return r?Pn:{done:!1,value:e(i)}})}filter(e){return new Zt(this.
|
|
90
|
+
startFn,n=>{let r;do if(r=this.nextFn(n),!r.done&&e(r.value))return r;while(!r.done);return Pn})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,n){const r=this.iterator();let i=n,s=r.next();for(;!s.done;)i===void 0?i=s.value:i=e(i,s.value),s=r.next();return i}reduceRight(e,n){return this.recursiveReduce(this.iterator(),e,n)}recursiveReduce(e,n,r){const i=e.next();if(i.done)return r;const s=this.recursiveReduce(e,n,r);return s===void 0?i.value:n(s,i.value)}find(e){const n=this.iterator();let r=n.
|
|
91
|
+
next();for(;!r.done;){if(e(r.value))return r.value;r=n.next()}}findIndex(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;){if(e(i.value))return r;i=n.next(),r++}return-1}includes(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(r.value===e)return!0;r=n.next()}return!1}flatMap(e){return new Zt(()=>({this:this.startFn()}),n=>{do{if(n.iterator){const s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}const{done:r,value:i}=this.nextFn(n.this);if(!r){const s=e(i);if(Kd(
|
|
92
|
+
s))n.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}}while(n.iterator);return Pn})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const n=e>1?this.flat(e-1):this;return new Zt(()=>({this:n.startFn()}),r=>{do{if(r.iterator){const o=r.iterator.next();if(o.done)r.iterator=void 0;else return o}const{done:i,value:s}=n.nextFn(r.this);if(!i)if(Kd(s))r.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}while(r.iterator);return Pn})}head(){const n=this.iterator().next();if(!n.done)return n.
|
|
93
|
+
value}tail(e=1){return new Zt(()=>{const n=this.startFn();for(let r=0;r<e;r++)if(this.nextFn(n).done)return n;return n},this.nextFn)}limit(e){return new Zt(()=>({size:0,state:this.startFn()}),n=>(n.size++,n.size>e?Pn:this.nextFn(n.state)))}distinct(e){return new Zt(()=>({set:new Set,internalState:this.startFn()}),n=>{let r;do if(r=this.nextFn(n.internalState),!r.done){const i=e?e(r.value):r.value;if(!n.set.has(i))return n.set.add(i),r}while(!r.done);return Pn})}exclude(e,n){const r=new Set;for(const i of e){
|
|
94
|
+
const s=n?n(i):i;r.add(s)}return this.filter(i=>{const s=n?n(i):i;return!r.has(s)})}}function yN(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function Kd(t){return!!t&&typeof t[Symbol.iterator]=="function"}const Es=new Zt(()=>{},()=>Pn),Pn=Object.freeze({done:!0,value:void 0});function We(...t){if(t.length===1){const e=t[0];if(e instanceof Zt)return e;if(Kd(e))return new Zt(()=>e[Symbol.iterator](),n=>n.next());
|
|
95
|
+
if(typeof e.length=="number")return new Zt(()=>({index:0}),n=>n.index<e.length?{done:!1,value:e[n.index++]}:Pn)}return t.length>1?new Zt(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const n=e.iterator.next();if(!n.done)return n;e.iterator=void 0}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}if(e.collIndex<t.length){const n=t[e.collIndex++];Kd(n)?e.iterator=n[Symbol.iterator]():n&&typeof n.length=="number"&&(e.array=n)}}while(e.
|
|
96
|
+
iterator||e.array||e.collIndex<t.length);return Pn}):Es}class Po extends Zt{constructor(e,n,r){super(()=>({iterators:r?.includeRoot?[[e][Symbol.iterator]()]:[n(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){const o=i.iterators[i.iterators.length-1].next();if(o.done)i.iterators.pop();else return i.iterators.push(n(o.value)[Symbol.iterator]()),o}return Pn})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{
|
|
97
|
+
e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var xm;(function(t){function e(s){return s.reduce((o,a)=>o+a,0)}t.sum=e;function n(s){return s.reduce((o,a)=>o*a,0)}t.product=n;function r(s){return s.reduce((o,a)=>Math.min(o,a))}t.min=r;function i(s){return s.reduce((o,a)=>Math.max(o,a))}t.max=i})(xm||(xm={}));function Xd(t){return new Po(t,e=>Bi(e)?e.content:[],{includeRoot:!0})}function vN(t){return Xd(t).filter(bs)}function wN(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}
|
|
98
|
+
function Nm(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function Yd(t){if(!t)return;const{offset:e,end:n,range:r}=t;return{range:r,offset:e,end:n,length:n-e}}var Yr;(function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside"})(Yr||(Yr={}));function bN(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=
|
|
99
|
+
e.start.character)return Yr.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return Yr.After;const n=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,r=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return n&&r?Yr.Inside:n?Yr.OverlapBack:r?Yr.OverlapFront:Yr.Outside}function y0(t,e){return bN(t,e)>Yr.After}const v0=/^[\w\p{L}]$/u;function $s(t,e,n=v0){if(t){if(e>0){const r=e-
|
|
100
|
+
t.offset,i=t.text.charAt(r);n.test(i)||e--}return b0(t,e)}}function Im(t,e){if(t){const n=EN(t,!0);if(n&&w0(n,e))return n;if(g0(t)){const r=t.content.findIndex(i=>!i.hidden);for(let i=r-1;i>=0;i--){const s=t.content[i];if(w0(s,e))return s}}}}function w0(t,e){return bs(t)&&e.includes(t.tokenType.name)}function b0(t,e){if(bs(t))return t;if(Bi(t)){const n=E0(t,e,!1);if(n)return b0(n,e)}}function Om(t,e){if(bs(t))return t;if(Bi(t)){const n=E0(t,e,!0);if(n)return Om(n,e)}}function E0(t,e,n){let r=0,i=t.
|
|
101
|
+
content.length-1,s;for(;r<=i;){const o=Math.floor((r+i)/2),a=t.content[o];if(a.offset<=e&&a.end>e)return a;a.end<=e?(s=n?a:void 0,r=o+1):i=o-1}return s}function EN(t,e=!0){for(;t.container;){const n=t.container;let r=n.content.indexOf(t);for(;r>0;){r--;const i=n.content[r];if(e||!i.hidden)return i}t=n}}function $N(t,e=!0){for(;t.container;){const n=t.container;let r=n.content.indexOf(t);const i=n.content.length-1;for(;r<i;){r++;const s=n.content[r];if(e||!s.hidden)return s}t=n}}function DN(t,e){
|
|
102
|
+
const n=RN(t,e);return n?n.parent.content.slice(n.a+1,n.b):[]}function RN(t,e){const n=$0(t),r=$0(e);let i;for(let s=0;s<n.length&&s<r.length;s++){const o=n[s],a=r[s];if(o.parent===a.parent)i={parent:o.parent,a:o.index,b:a.index};else break}return i}function $0(t){const e=[];for(;t.container;){const n=t.container,r=n.content.indexOf(t);e.push({parent:n,index:r}),t=n}return e.reverse()}class D0 extends Error{constructor(e,n){super(e?`${n} at ${e.range.start.line}:${e.range.start.character}`:n)}}function qa(t){
|
|
103
|
+
throw new Error("Error! The input value was not handled.")}const Jd="AbstractRule",Qd="AbstractType",Lm="Condition",R0="TypeDefinition",Fm="ValueLiteral",Ga="AbstractElement";function Mm(t){return Je.isInstance(t,Ga)}const Zd="ArrayLiteral",Ua="ArrayType";function kN(t){return Je.isInstance(t,Ua)}const Wa="BooleanLiteral";function TN(t){return Je.isInstance(t,Wa)}const za="Conjunction";function CN(t){return Je.isInstance(t,za)}const Ha="Disjunction";function AN(t){return Je.isInstance(t,Ha)}const ef="\
|
|
104
|
+
Grammar",Bm="GrammarImport",Va="InferredType";function k0(t){return Je.isInstance(t,Va)}const Ka="Interface";function T0(t){return Je.isInstance(t,Ka)}const jm="NamedArgument",Xa="Negation";function SN(t){return Je.isInstance(t,Xa)}const tf="NumberLiteral",nf="Parameter",Ya="ParameterReference";function _N(t){return Je.isInstance(t,Ya)}const Ja="ParserRule";function ln(t){return Je.isInstance(t,Ja)}const Qa="ReferenceType";function PN(t){return Je.isInstance(t,Qa)}const rf="ReturnType";function xN(t){
|
|
105
|
+
return Je.isInstance(t,rf)}const Za="SimpleType";function C0(t){return Je.isInstance(t,Za)}const sf="StringLiteral",xo="TerminalRule";function Jr(t){return Je.isInstance(t,xo)}const eu="Type";function qm(t){return Je.isInstance(t,eu)}const Gm="TypeAttribute",tu="UnionType";function NN(t){return Je.isInstance(t,tu)}const nu="Action";function Ds(t){return Je.isInstance(t,nu)}const ru="Alternatives";function Um(t){return Je.isInstance(t,ru)}const iu="Assignment";function Nr(t){return Je.isInstance(
|
|
106
|
+
t,iu)}const su="CharacterRange";function IN(t){return Je.isInstance(t,su)}const ou="CrossReference";function au(t){return Je.isInstance(t,ou)}const uu="EndOfFile";function ON(t){return Je.isInstance(t,uu)}const cu="Group";function ji(t){return Je.isInstance(t,cu)}const lu="Keyword";function Ir(t){return Je.isInstance(t,lu)}const du="NegatedToken";function LN(t){return Je.isInstance(t,du)}const fu="RegexToken";function FN(t){return Je.isInstance(t,fu)}const pu="RuleCall";function Qr(t){return Je.
|
|
107
|
+
isInstance(t,pu)}const hu="TerminalAlternatives";function MN(t){return Je.isInstance(t,hu)}const mu="TerminalGroup";function BN(t){return Je.isInstance(t,mu)}const gu="TerminalRuleCall";function A0(t){return Je.isInstance(t,gu)}const yu="UnorderedGroup";function Wm(t){return Je.isInstance(t,yu)}const vu="UntilToken";function jN(t){return Je.isInstance(t,vu)}const wu="Wildcard";function qN(t){return Je.isInstance(t,wu)}class S0 extends m0{getAllTypes(){return[Ga,Jd,Qd,nu,ru,Zd,Ua,iu,Wa,su,Lm,za,ou,
|
|
108
|
+
Ha,uu,ef,Bm,cu,Va,Ka,lu,jm,du,Xa,tf,nf,Ya,Ja,Qa,fu,rf,pu,Za,sf,hu,mu,xo,gu,eu,Gm,R0,tu,yu,vu,Fm,wu]}computeIsSubtype(e,n){switch(e){case nu:case ru:case iu:case su:case ou:case uu:case cu:case lu:case du:case fu:case pu:case hu:case mu:case gu:case yu:case vu:case wu:return this.isSubtype(Ga,n);case Zd:case tf:case sf:return this.isSubtype(Fm,n);case Ua:case Qa:case Za:case tu:return this.isSubtype(R0,n);case Wa:return this.isSubtype(Lm,n)||this.isSubtype(Fm,n);case za:case Ha:case Xa:case Ya:return this.
|
|
109
|
+
isSubtype(Lm,n);case Va:case Ka:case eu:return this.isSubtype(Qd,n);case Ja:return this.isSubtype(Jd,n)||this.isSubtype(Qd,n);case xo:return this.isSubtype(Jd,n);default:return!1}}getReferenceType(e){const n=`${e.container.$type}:${e.property}`;switch(n){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":return Qd;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return Jd;case"Grammar:usedGrammar\
|
|
110
|
+
s":return ef;case"NamedArgument:parameter":case"ParameterReference:parameter":return nf;case"TerminalRuleCall:rule":return xo;default:throw new Error(`${n} is not a valid reference id.`)}}getTypeMetaData(e){switch(e){case Ga:return{name:Ga,properties:[{name:"cardinality"},{name:"lookahead"}]};case Zd:return{name:Zd,properties:[{name:"elements",defaultValue:[]}]};case Ua:return{name:Ua,properties:[{name:"elementType"}]};case Wa:return{name:Wa,properties:[{name:"true",defaultValue:!1}]};case za:return{
|
|
111
|
+
name:za,properties:[{name:"left"},{name:"right"}]};case Ha:return{name:Ha,properties:[{name:"left"},{name:"right"}]};case ef:return{name:ef,properties:[{name:"definesHiddenTokens",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"imports",defaultValue:[]},{name:"interfaces",defaultValue:[]},{name:"isDeclared",defaultValue:!1},{name:"name"},{name:"rules",defaultValue:[]},{name:"types",defaultValue:[]},{name:"usedGrammars",defaultValue:[]}]};case Bm:return{name:Bm,properties:[{name:"pa\
|
|
112
|
+
th"}]};case Va:return{name:Va,properties:[{name:"name"}]};case Ka:return{name:Ka,properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case jm:return{name:jm,properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case Xa:return{name:Xa,properties:[{name:"value"}]};case tf:return{name:tf,properties:[{name:"value"}]};case nf:return{name:nf,properties:[{name:"name"}]};case Ya:return{name:Ya,properties:[{name:"parameter"}]};case Ja:
|
|
113
|
+
return{name:Ja,properties:[{name:"dataType"},{name:"definesHiddenTokens",defaultValue:!1},{name:"definition"},{name:"entry",defaultValue:!1},{name:"fragment",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"inferredType"},{name:"name"},{name:"parameters",defaultValue:[]},{name:"returnType"},{name:"wildcard",defaultValue:!1}]};case Qa:return{name:Qa,properties:[{name:"referenceType"}]};case rf:return{name:rf,properties:[{name:"name"}]};case Za:return{name:Za,properties:[{name:"primit\
|
|
114
|
+
iveType"},{name:"stringType"},{name:"typeRef"}]};case sf:return{name:sf,properties:[{name:"value"}]};case xo:return{name:xo,properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case eu:return{name:eu,properties:[{name:"name"},{name:"type"}]};case Gm:return{name:Gm,properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case tu:return{name:tu,properties:[{name:"types",defaultValue:[]}]};case nu:
|
|
115
|
+
return{name:nu,properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case ru:return{name:ru,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case iu:return{name:iu,properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case su:return{name:su,properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case ou:return{
|
|
116
|
+
name:ou,properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case uu:return{name:uu,properties:[{name:"cardinality"},{name:"lookahead"}]};case cu:return{name:cu,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case lu:return{name:lu,properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case du:return{name:du,properties:[{name:"cardinality"},{name:"\
|
|
117
|
+
lookahead"},{name:"terminal"}]};case fu:return{name:fu,properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case pu:return{name:pu,properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case hu:return{name:hu,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case mu:return{name:mu,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case gu:return{name:gu,properties:[
|
|
118
|
+
{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case yu:return{name:yu,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case vu:return{name:vu,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case wu:return{name:wu,properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:e,properties:[]}}}}const Je=new S0;function zm(t){for(const[e,n]of Object.entries(t))e.startsWith("$")||(Array.isArray(n)?n.forEach((r,i)=>{Rt(
|
|
119
|
+
r)&&(r.$container=t,r.$containerProperty=e,r.$containerIndex=i)}):Rt(n)&&(n.$container=t,n.$containerProperty=e))}function wn(t,e){let n=t;for(;n;){if(e(n))return n;n=n.$container}}function qi(t,e){let n=t;for(;n;){if(e(n))return!0;n=n.$container}return!1}function lt(t){const n=of(t).$document;if(!n)throw new Error("AST node has no document.");return n}function of(t){for(;t.$container;)t=t.$container;return t}function bu(t,e){if(!t)throw new Error("Node must be an AstNode.");const n=e?.range;return new Zt(
|
|
120
|
+
()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),r=>{for(;r.keyIndex<r.keys.length;){const i=r.keys[r.keyIndex];if(!i.startsWith("$")){const s=t[i];if(Rt(s)){if(r.keyIndex++,Hm(s,n))return{done:!1,value:s}}else if(Array.isArray(s)){for(;r.arrayIndex<s.length;){const o=r.arrayIndex++,a=s[o];if(Rt(a)&&Hm(a,n))return{done:!1,value:a}}r.arrayIndex=0}}r.keyIndex++}return Pn})}function Or(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Po(t,n=>bu(n,e))}function Zr(t,e){if(t){
|
|
121
|
+
if(e?.range&&!Hm(t,e.range))return new Po(t,()=>[])}else throw new Error("Root node must be an AstNode.");return new Po(t,n=>bu(n,e),{includeRoot:!0})}function Hm(t,e){var n;if(!e)return!0;const r=(n=t.$cstNode)===null||n===void 0?void 0:n.range;return r?y0(r,e):!1}function af(t){return new Zt(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){const n=e.keys[e.keyIndex];if(!n.startsWith("$")){const r=t[n];if(tr(r))return e.keyIndex++,{done:!1,value:{reference:r,
|
|
122
|
+
container:t,property:n}};if(Array.isArray(r)){for(;e.arrayIndex<r.length;){const i=e.arrayIndex++,s=r[i];if(tr(s))return{done:!1,value:{reference:s,container:t,property:n,index:i}}}e.arrayIndex=0}}e.keyIndex++}return Pn})}function GN(t,e=lt(t).parseResult.value){const n=[];return Zr(e).forEach(r=>{af(r).forEach(i=>{i.reference.ref===t&&n.push(i.reference)})}),We(n)}function Vm(t,e){const n=t.getTypeMetaData(e.$type),r=e;for(const i of n.properties)i.defaultValue!==void 0&&r[i.name]===void 0&&(r[i.
|
|
123
|
+
name]=_0(i.defaultValue))}function _0(t){return Array.isArray(t)?[...t.map(_0)]:t}function Km(t,e){const n={$type:t.$type};for(const[r,i]of Object.entries(t))if(!r.startsWith("$"))if(Rt(i))n[r]=Km(i,e);else if(tr(i))n[r]=e(n,r,i.$refNode,i.$refText);else if(Array.isArray(i)){const s=[];for(const o of i)Rt(o)?s.push(Km(o,e)):tr(o)?s.push(e(n,r,o.$refNode,o.$refText)):s.push(o);n[r]=s}else n[r]=i;return zm(n),n}const Eu={__proto__:null,assignMandatoryProperties:Vm,copyAstNode:Km,findLocalReferences:GN,
|
|
124
|
+
findRootNode:of,getContainerOfType:wn,getDocument:lt,hasContainerOfType:qi,linkContentToContainer:zm,streamAllContents:Or,streamAst:Zr,streamContents:bu,streamReferences:af};function Ae(t){return t.charCodeAt(0)}function Xm(t,e){Array.isArray(t)?t.forEach(function(n){e.push(n)}):e.push(t)}function $u(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}function No(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function UN(){throw Error("Internal Error - Shoul\
|
|
125
|
+
d never get here!")}function P0(t){return t.type==="Character"}const uf=[];for(let t=Ae("0");t<=Ae("9");t++)uf.push(t);const cf=[Ae("_")].concat(uf);for(let t=Ae("a");t<=Ae("z");t++)cf.push(t);for(let t=Ae("A");t<=Ae("Z");t++)cf.push(t);const x0=[Ae(" "),Ae("\f"),Ae(`
|
|
126
|
+
`),Ae("\r"),Ae(" "),Ae("\v"),Ae(" "),Ae("\xA0"),Ae("\u1680"),Ae("\u2000"),Ae("\u2001"),Ae("\u2002"),Ae("\u2003"),Ae("\u2004"),Ae("\u2005"),Ae("\u2006"),Ae("\u2007"),Ae("\u2008"),Ae("\u2009"),Ae("\u200A"),Ae("\u2028"),Ae("\u2029"),Ae("\u202F"),Ae("\u205F"),Ae("\u3000"),Ae("\uFEFF")],WN=/[0-9a-fA-F]/,lf=/[0-9]/,zN=/[1-9]/;class N0{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=
|
|
127
|
+
e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");const n=this.disjunction();this.consumeChar("/");const r={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":$u(r,"global");break;case"i":$u(r,"ignoreCase");break;case"m":$u(r,"multiLine");break;case"u":$u(r,"unicode");break;case"y":$u(r,"sticky");break}if(this.idx!==this.input.length)
|
|
128
|
+
throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:n,loc:this.loc(0)}}disjunction(){const e=[],n=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(n)}}alternative(){const e=[],n=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(n)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){
|
|
129
|
+
const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let n;switch(this.popChar()){case"=":n="Lookahead";break;case"!":n="NegativeLookahead";break}No(n);const r=this.disjunction();return this.consumeChar("\
|
|
130
|
+
)"),{type:n,value:r,loc:this.loc(e)}}return UN()}quantifier(e=!1){let n;const r=this.idx;switch(this.popChar()){case"*":n={atLeast:0,atMost:1/0};break;case"+":n={atLeast:1,atMost:1/0};break;case"?":n={atLeast:0,atMost:1};break;case"{":const i=this.integerIncludingZero();switch(this.popChar()){case"}":n={atLeast:i,atMost:i};break;case",":let s;this.isDigit()?(s=this.integerIncludingZero(),n={atLeast:i,atMost:s}):n={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&n===void 0)return;No(
|
|
131
|
+
n);break}if(!(e===!0&&n===void 0)&&No(n))return this.peekChar(0)==="?"?(this.consumeChar("?"),n.greedy=!1):n.greedy=!0,n.type="Quantifier",n.loc=this.loc(r),n}atom(){let e;const n=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}if(e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),No(e))return e.loc=this.loc(n),this.isQuantifier()&&(e.quantifier=this.quantifier()),
|
|
132
|
+
e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[Ae(`
|
|
133
|
+
`),Ae("\r"),Ae("\u2028"),Ae("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.
|
|
134
|
+
regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,n=!1;switch(this.popChar()){case"d":e=uf;break;case"D":e=uf,n=!0;break;case"s":e=x0;break;case"S":e=x0,n=!0;break;case"w":e=cf;break;case"W":e=cf,n=!0;break}if(No(e))return{type:"Set",value:e,complement:n}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=Ae("\f");break;case"n":e=Ae(`
|
|
135
|
+
`);break;case"r":e=Ae("\r");break;case"t":e=Ae(" ");break;case"v":e=Ae("\v");break}if(No(e))return{type:"Character",value:e}}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:Ae("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){
|
|
136
|
+
return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){const e=this.popChar();return{type:"Character",value:Ae(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|
|
137
|
+
`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:const e=this.popChar();return{type:"Character",value:Ae(e)}}}characterClass(){const e=[];let n=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),n=!0);this.isClassAtom();){const r=this.classAtom();if(r.type,P0(r)&&this.isRangeDash()){this.consumeChar("-");const i=this.classAtom();if(i.type,P0(i)){if(i.value<r.value)throw Error("Range out of order in character class");e.push({from:r.value,to:i.
|
|
138
|
+
value})}else Xm(r.value,e),e.push(Ae("-")),Xm(i.value,e)}else Xm(r.value,e)}return this.consumeChar("]"),{type:"Set",complement:n,value:e}}classAtom(){switch(this.peekChar()){case"]":case`
|
|
139
|
+
`:case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:Ae("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"\
|
|
140
|
+
x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let e=!0;switch(this.consumeChar("("),this.peekChar(0)){case"?":this.consumeChar("?"),this.consumeChar(":"),e=!1;break;default:this.groupIdx++;break}const n=this.disjunction();this.consumeChar(")");const r={type:"Group",capturing:e,value:n};return e&&(r.idx=this.groupIdx),r}positiveInteger(){let e=this.popChar();if(zN.test(e)===!1)throw Error("Expecting a\
|
|
141
|
+
positive integer");for(;lf.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(lf.test(e)===!1)throw Error("Expecting an integer");for(;lf.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){const e=this.popChar();switch(e){case`
|
|
142
|
+
`:case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:Ae(e)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return this.peekChar()==="-"&&this.isClassAtom(1)}isDigit(){return lf.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case"]":case`
|
|
143
|
+
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return this.peekChar(1)==="?"&&(this.peekChar(2)==="="||this.peekChar(2)==="!");default:return!1}}isQuantifier(){
|
|
144
|
+
const e=this.saveState();try{return this.quantifier(!0)!==void 0}catch{return!1}finally{this.restoreState(e)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case`
|
|
145
|
+
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(e){let n="";for(let i=0;i<e;i++){const s=this.popChar();if(WN.test(s)===!1)throw Error("Expecting a HexDecimal digits");n+=s}return{type:"Character",value:parseInt(n,16)}}peekChar(e=0){return this.input[this.idx+e]}popChar(){const e=this.peekChar(0);return this.consumeChar(void 0),e}consumeChar(e){if(e!==void 0&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+
|
|
146
|
+
this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}}class df{visitChildren(e){for(const n in e){const r=e[n];e.hasOwnProperty(n)&&(r.type!==void 0?this.visit(r):Array.isArray(r)&&r.forEach(i=>{this.visit(i)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"Sta\
|
|
147
|
+
rtAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.
|
|
148
|
+
visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}const I0=/\r?\n/gm,HN=new N0;class VN extends df{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){
|
|
149
|
+
return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){const n=String.fromCharCode(e.value);if(!this.multiline&&n===`
|
|
150
|
+
`&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const r=ff(n);this.endRegexpStack.push(r),this.isStarting&&(this.startRegexp+=r)}}visitSet(e){if(!this.multiline){const n=this.regex.substring(e.loc.begin,e.loc.end),r=new RegExp(n);this.multiline=!!`
|
|
151
|
+
`.match(r)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const n=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(n),this.isStarting&&(this.startRegexp+=n)}}visitChildren(e){e.type==="Group"&&e.quantifier||super.visitChildren(e)}}const Ym=new VN;function KN(t){try{return typeof t=="string"&&(t=new RegExp(t)),t=t.toString(),Ym.reset(t),Ym.visit(HN.pattern(t)),Ym.multiline}catch{return!1}}const XN=`\f
|
|
152
|
+
\r \v \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`.split("");function Jm(t){const e=typeof t=="string"?new RegExp(t):t;return XN.some(n=>e.test(n))}function ff(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function YN(t){return Array.prototype.map.call(t,e=>/\w/.test(e)?`[${e.toLowerCase()}${e.toUpperCase()}]`:ff(e)).join("")}function JN(t,e){const n=QN(t),r=e.match(n);return!!r&&r[0].length>0}function QN(t){typeof t=="stri\
|
|
153
|
+
ng"&&(t=new RegExp(t));const e=t,n=t.source;let r=0;function i(){let s="",o;function a(c){s+=n.substr(r,c),r+=c}function u(c){s+="(?:"+n.substr(r,c)+"|$)",r+=c}for(;r<n.length;)switch(n[r]){case"\\":switch(n[r+1]){case"c":u(3);break;case"x":u(4);break;case"u":e.unicode?n[r+2]==="{"?u(n.indexOf("}",r)-r+1):u(6):u(2);break;case"p":case"P":e.unicode?u(n.indexOf("}",r)-r+1):u(2);break;case"k":u(n.indexOf(">",r)-r+1);break;default:u(2);break}break;case"[":o=/\[(?:\\.|.)*?\]/g,o.lastIndex=r,o=o.exec(n)||
|
|
154
|
+
[],u(o[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":a(1);break;case"{":o=/\{\d+,?\d*\}/g,o.lastIndex=r,o=o.exec(n),o?a(o[0].length):u(1);break;case"(":if(n[r+1]==="?")switch(n[r+2]){case":":s+="(?:",r+=3,s+=i()+"|$)";break;case"=":s+="(?=",r+=3,s+=i()+")";break;case"!":o=r,r+=3,i(),s+=n.substr(o,r-o);break;case"<":switch(n[r+3]){case"=":case"!":o=r,r+=4,i(),s+=n.substr(o,r-o);break;default:a(n.indexOf(">",r)-r+1),s+=i()+"|$)";break}break}else a(1),s+=i()+"|$)";break;case")":return++r,
|
|
155
|
+
s;default:u(1);break}return s}return new RegExp(i(),t.flags)}function pf(t){return t.rules.find(e=>ln(e)&&e.entry)}function O0(t){return t.rules.filter(e=>Jr(e)&&e.hidden)}function Qm(t,e){const n=new Set,r=pf(t);if(!r)return new Set(t.rules);const i=[r].concat(O0(t));for(const o of i)L0(o,n,e);const s=new Set;for(const o of t.rules)(n.has(o.name)||Jr(o)&&o.hidden)&&s.add(o);return s}function L0(t,e,n){e.add(t.name),Or(t).forEach(r=>{if(Qr(r)||n&&A0(r)){const i=r.rule.ref;i&&!e.has(i.name)&&L0(i,
|
|
156
|
+
e,n)}})}function Zm(t){if(t.terminal)return t.terminal;if(t.type.ref){const e=rg(t.type.ref);return e?.terminal}}function F0(t){return t.hidden&&!Jm(ku(t))}function Io(t,e){return!t||!e?[]:eg(t,e,t.astNode,!0)}function dn(t,e,n){if(!t||!e)return;const r=eg(t,e,t.astNode,!0);if(r.length!==0)return n!==void 0?n=Math.max(0,Math.min(n,r.length-1)):n=0,r[n]}function eg(t,e,n,r){if(!r){const i=wn(t.grammarSource,Nr);if(i&&i.feature===e)return[t]}return Bi(t)&&t.astNode===n?t.content.flatMap(i=>eg(i,e,
|
|
157
|
+
n,!1)):[]}function tg(t,e){return t?ng(t,e,t?.astNode):[]}function Du(t,e,n){if(!t)return;const r=ng(t,e,t?.astNode);if(r.length!==0)return n!==void 0?n=Math.max(0,Math.min(n,r.length-1)):n=0,r[n]}function ng(t,e,n){if(t.astNode!==n)return[];if(Ir(t.grammarSource)&&t.grammarSource.value===e)return[t];const r=Xd(t).iterator();let i;const s=[];do if(i=r.next(),!i.done){const o=i.value;o.astNode===n?Ir(o.grammarSource)&&o.grammarSource.value===e&&s.push(o):r.prune()}while(!i.done);return s}function M0(t){
|
|
158
|
+
var e;const n=t.astNode;for(;n===((e=t.container)===null||e===void 0?void 0:e.astNode);){const r=wn(t.grammarSource,Nr);if(r)return r;t=t.container}}function rg(t){let e=t;return k0(e)&&(Ds(e.$container)?e=e.$container.$container:ln(e.$container)?e=e.$container:qa(e.$container)),B0(t,e,new Map)}function B0(t,e,n){var r;function i(s,o){let a;return wn(s,Nr)||(a=B0(o,o,n)),n.set(t,a),a}if(n.has(t))return n.get(t);n.set(t,void 0);for(const s of Or(e)){if(Nr(s)&&s.feature.toLowerCase()==="name")return n.
|
|
159
|
+
set(t,s),s;if(Qr(s)&&ln(s.rule.ref))return i(s,s.rule.ref);if(C0(s)&&(!((r=s.typeRef)===null||r===void 0)&&r.ref))return i(s,s.typeRef.ref)}}function j0(t){const e=t.$container;if(ji(e)){const n=e.elements,r=n.indexOf(t);for(let i=r-1;i>=0;i--){const s=n[i];if(Ds(s))return s;{const o=Or(n[i]).find(Ds);if(o)return o}}}if(Mm(e))return j0(e)}function Oo(t,e){return t==="?"||t==="*"||ji(e)&&!!e.guardCondition}function q0(t){return t==="*"||t==="+"}function ZN(t){return t==="+="}function hf(t){return G0(
|
|
160
|
+
t,new Set)}function G0(t,e){if(e.has(t))return!0;e.add(t);for(const n of Or(t))if(Qr(n)){if(!n.rule.ref||ln(n.rule.ref)&&!G0(n.rule.ref,e))return!1}else{if(Nr(n))return!1;if(Ds(n))return!1}return!!t.definition}function eI(t){return ig(t.type,new Set)}function ig(t,e){if(e.has(t))return!0;if(e.add(t),kN(t))return!1;if(PN(t))return!1;if(NN(t))return t.types.every(n=>ig(n,e));if(C0(t)){if(t.primitiveType!==void 0)return!0;if(t.stringType!==void 0)return!0;if(t.typeRef!==void 0){const n=t.typeRef.ref;
|
|
161
|
+
return qm(n)?ig(n.type,e):!1}else return!1}else return!1}function Rs(t){if(t.inferredType)return t.inferredType.name;if(t.dataType)return t.dataType;if(t.returnType){const e=t.returnType.ref;if(e){if(ln(e))return e.name;if(T0(e)||qm(e))return e.name}}}function Ru(t){var e;if(ln(t))return hf(t)?t.name:(e=Rs(t))!==null&&e!==void 0?e:t.name;if(T0(t)||qm(t)||xN(t))return t.name;if(Ds(t)){const n=U0(t);if(n)return n}else if(k0(t))return t.name;throw new Error("Cannot get name of Unknown Type")}function U0(t){
|
|
162
|
+
var e;if(t.inferredType)return t.inferredType.name;if(!((e=t.type)===null||e===void 0)&&e.ref)return Ru(t.type.ref)}function tI(t){var e,n,r;return Jr(t)?(n=(e=t.type)===null||e===void 0?void 0:e.name)!==null&&n!==void 0?n:"string":hf(t)?t.name:(r=Rs(t))!==null&&r!==void 0?r:t.name}function W0(t){var e,n,r;return Jr(t)?(n=(e=t.type)===null||e===void 0?void 0:e.name)!==null&&n!==void 0?n:"string":(r=Rs(t))!==null&&r!==void 0?r:t.name}function ku(t){const e={s:!1,i:!1,u:!1},n=Lo(t.definition,e),r=Object.
|
|
163
|
+
entries(e).filter(([,i])=>i).map(([i])=>i).join("");return new RegExp(n,r)}const sg=/[\s\S]/.source;function Lo(t,e){if(MN(t))return nI(t);if(BN(t))return rI(t);if(IN(t))return oI(t);if(A0(t)){const n=t.rule.ref;if(!n)throw new Error("Missing rule reference.");return ei(Lo(n.definition),{cardinality:t.cardinality,lookahead:t.lookahead})}else{if(LN(t))return sI(t);if(jN(t))return iI(t);if(FN(t)){const n=t.regex.lastIndexOf("/"),r=t.regex.substring(1,n),i=t.regex.substring(n+1);return e&&(e.i=i.includes(
|
|
164
|
+
"i"),e.s=i.includes("s"),e.u=i.includes("u")),ei(r,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}else{if(qN(t))return ei(sg,{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error(`Invalid terminal element: ${t?.$type}`)}}}function nI(t){return ei(t.elements.map(e=>Lo(e)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead})}function rI(t){return ei(t.elements.map(e=>Lo(e)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead})}function iI(t){return ei(`${sg}*\
|
|
165
|
+
?${Lo(t.terminal)}`,{cardinality:t.cardinality,lookahead:t.lookahead})}function sI(t){return ei(`(?!${Lo(t.terminal)})${sg}*?`,{cardinality:t.cardinality,lookahead:t.lookahead})}function oI(t){return t.right?ei(`[${og(t.left)}-${og(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1}):ei(og(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}function og(t){return ff(t.value)}function ei(t,e){var n;return(e.wrap!==!1||e.lookahead)&&(t=`(${(n=e.lookahead)!==null&&n!==
|
|
166
|
+
void 0?n:""}${t})`),e.cardinality?`${t}${e.cardinality}`:t}const ag={__proto__:null,findAssignment:M0,findNameAssignment:rg,findNodeForKeyword:Du,findNodeForProperty:dn,findNodesForKeyword:tg,findNodesForKeywordInternal:ng,findNodesForProperty:Io,getActionAtElement:j0,getActionType:U0,getAllReachableRules:Qm,getCrossReferenceTerminal:Zm,getEntryRule:pf,getExplicitRuleType:Rs,getHiddenRules:O0,getRuleType:W0,getRuleTypeName:tI,getTypeName:Ru,isArrayCardinality:q0,isArrayOperator:ZN,isCommentTerminal:F0,
|
|
167
|
+
isDataType:eI,isDataTypeRule:hf,isOptionalCardinality:Oo,terminalRegex:ku};function aI(t){const e=[],n=t.Grammar;for(const r of n.rules)Jr(r)&&F0(r)&&KN(ku(r))&&e.push(r.name);return{multilineCommentRules:e,nameRegexp:v0}}var z0=typeof global=="object"&&global&&global.Object===Object&&global,uI=typeof self=="object"&&self&&self.Object===Object&&self,Lr=z0||uI||Function("return this")(),nr=Lr.Symbol,H0=Object.prototype,cI=H0.hasOwnProperty,lI=H0.toString,Tu=nr?nr.toStringTag:void 0;function dI(t){
|
|
168
|
+
var e=cI.call(t,Tu),n=t[Tu];try{t[Tu]=void 0;var r=!0}catch{}var i=lI.call(t);return r&&(e?t[Tu]=n:delete t[Tu]),i}var fI=Object.prototype,pI=fI.toString;function hI(t){return pI.call(t)}var mI="[object Null]",gI="[object Undefined]",V0=nr?nr.toStringTag:void 0;function Gi(t){return t==null?t===void 0?gI:mI:V0&&V0 in Object(t)?dI(t):hI(t)}function mr(t){return t!=null&&typeof t=="object"}var yI="[object Symbol]";function Cu(t){return typeof t=="symbol"||mr(t)&&Gi(t)==yI}function mf(t,e){for(var n=-1,
|
|
169
|
+
r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var Qe=Array.isArray,K0=nr?nr.prototype:void 0,X0=K0?K0.toString:void 0;function Y0(t){if(typeof t=="string")return t;if(Qe(t))return mf(t,Y0)+"";if(Cu(t))return X0?X0.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}var vI=/\s/;function wI(t){for(var e=t.length;e--&&vI.test(t.charAt(e)););return e}var bI=/^\s+/;function EI(t){return t&&t.slice(0,wI(t)+1).replace(bI,"")}function rr(t){var e=typeof t;return t!=null&&(e=="object"||
|
|
170
|
+
e=="function")}var J0=NaN,$I=/^[-+]0x[0-9a-f]+$/i,DI=/^0b[01]+$/i,RI=/^0o[0-7]+$/i,kI=parseInt;function TI(t){if(typeof t=="number")return t;if(Cu(t))return J0;if(rr(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=rr(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=EI(t);var n=DI.test(t);return n||RI.test(t)?kI(t.slice(2),n?2:8):$I.test(t)?J0:+t}var CI=1/0,AI=17976931348623157e292;function SI(t){if(!t)return t===0?t:0;if(t=TI(t),t===CI||t===-1/0){var e=t<0?-1:1;return e*AI}return t===t?
|
|
171
|
+
t:0}function gf(t){var e=SI(t),n=e%1;return e===e?n?e-n:e:0}function ks(t){return t}var _I="[object AsyncFunction]",PI="[object Function]",xI="[object GeneratorFunction]",NI="[object Proxy]";function ti(t){if(!rr(t))return!1;var e=Gi(t);return e==PI||e==xI||e==_I||e==NI}var ug=Lr["__core-js_shared__"],Q0=function(){var t=/[^.]+$/.exec(ug&&ug.keys&&ug.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function II(t){return!!Q0&&Q0 in t}var OI=Function.prototype,LI=OI.toString;function Ts(t){if(t!=
|
|
172
|
+
null){try{return LI.call(t)}catch{}try{return t+""}catch{}}return""}var FI=/[\\^$.*+?()[\]{}|]/g,MI=/^\[object .+?Constructor\]$/,BI=Function.prototype,jI=Object.prototype,qI=BI.toString,GI=jI.hasOwnProperty,UI=RegExp("^"+qI.call(GI).replace(FI,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function WI(t){if(!rr(t)||II(t))return!1;var e=ti(t)?UI:MI;return e.test(Ts(t))}function zI(t,e){return t?.[e]}function Cs(t,e){var n=zI(t,e);return WI(n)?n:void 0}var cg=Cs(
|
|
173
|
+
Lr,"WeakMap"),Z0=Object.create,HI=function(){function t(){}return function(e){if(!rr(e))return{};if(Z0)return Z0(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function VI(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function zt(){}function KI(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var XI=800,YI=16,JI=Date.now;function QI(t){var e=0,
|
|
174
|
+
n=0;return function(){var r=JI(),i=YI-(r-n);if(n=r,i>0){if(++e>=XI)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function ZI(t){return function(){return t}}var yf=function(){try{var t=Cs(Object,"defineProperty");return t({},"",{}),t}catch{}}(),eO=yf?function(t,e){return yf(t,"toString",{configurable:!0,enumerable:!1,value:ZI(e),writable:!0})}:ks,tO=QI(eO);function eE(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}function tE(t,e,n,r){for(var i=t.length,
|
|
175
|
+
s=n+-1;++s<i;)if(e(t[s],s,t))return s;return-1}function nO(t){return t!==t}function rO(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function lg(t,e,n){return e===e?rO(t,e,n):tE(t,nO,n)}function nE(t,e){var n=t==null?0:t.length;return!!n&&lg(t,e,0)>-1}var iO=9007199254740991,sO=/^(?:0|[1-9]\d*)$/;function vf(t,e){var n=typeof t;return e=e??iO,!!e&&(n=="number"||n!="symbol"&&sO.test(t))&&t>-1&&t%1==0&&t<e}function dg(t,e,n){e=="__proto__"&&yf?yf(t,e,{configurable:!0,enumerable:!0,
|
|
176
|
+
value:n,writable:!0}):t[e]=n}function Au(t,e){return t===e||t!==t&&e!==e}var oO=Object.prototype,aO=oO.hasOwnProperty;function wf(t,e,n){var r=t[e];(!(aO.call(t,e)&&Au(r,n))||n===void 0&&!(e in t))&&dg(t,e,n)}function Su(t,e,n,r){var i=!n;n||(n={});for(var s=-1,o=e.length;++s<o;){var a=e[s],u=void 0;u===void 0&&(u=t[a]),i?dg(n,a,u):wf(n,a,u)}return n}var rE=Math.max;function uO(t,e,n){return e=rE(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,s=rE(r.length-e,0),o=Array(s);++i<s;)
|
|
177
|
+
o[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=n(o),VI(t,this,a)}}function fg(t,e){return tO(uO(t,e,ks),t+"")}var cO=9007199254740991;function pg(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=cO}function Fr(t){return t!=null&&pg(t.length)&&!ti(t)}function iE(t,e,n){if(!rr(n))return!1;var r=typeof e;return(r=="number"?Fr(n)&&vf(e,n.length):r=="string"&&e in n)?Au(n[e],t):!1}function lO(t){return fg(function(e,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(s=
|
|
178
|
+
t.length>3&&typeof s=="function"?(i--,s):void 0,o&&iE(n[0],n[1],o)&&(s=i<3?void 0:s,i=1),e=Object(e);++r<i;){var a=n[r];a&&t(e,a,r,s)}return e})}var dO=Object.prototype;function _u(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||dO;return t===n}function fO(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var pO="[object Arguments]";function sE(t){return mr(t)&&Gi(t)==pO}var oE=Object.prototype,hO=oE.hasOwnProperty,mO=oE.propertyIsEnumerable,bf=sE(function(){return arguments}())?
|
|
179
|
+
sE:function(t){return mr(t)&&hO.call(t,"callee")&&!mO.call(t,"callee")};function gO(){return!1}var aE=typeof exports=="object"&&exports&&!exports.nodeType&&exports,uE=aE&&typeof module=="object"&&module&&!module.nodeType&&module,yO=uE&&uE.exports===aE,cE=yO?Lr.Buffer:void 0,vO=cE?cE.isBuffer:void 0,Pu=vO||gO,wO="[object Arguments]",bO="[object Array]",EO="[object Boolean]",$O="[object Date]",DO="[object Error]",RO="[object Function]",kO="[object Map]",TO="[object Number]",CO="[object Object]",AO="\
|
|
180
|
+
[object RegExp]",SO="[object Set]",_O="[object String]",PO="[object WeakMap]",xO="[object ArrayBuffer]",NO="[object DataView]",IO="[object Float32Array]",OO="[object Float64Array]",LO="[object Int8Array]",FO="[object Int16Array]",MO="[object Int32Array]",BO="[object Uint8Array]",jO="[object Uint8ClampedArray]",qO="[object Uint16Array]",GO="[object Uint32Array]",wt={};wt[IO]=wt[OO]=wt[LO]=wt[FO]=wt[MO]=wt[BO]=wt[jO]=wt[qO]=wt[GO]=!0,wt[wO]=wt[bO]=wt[xO]=wt[EO]=wt[NO]=wt[$O]=wt[DO]=wt[RO]=wt[kO]=wt[TO]=
|
|
181
|
+
wt[CO]=wt[AO]=wt[SO]=wt[_O]=wt[PO]=!1;function UO(t){return mr(t)&&pg(t.length)&&!!wt[Gi(t)]}function Ef(t){return function(e){return t(e)}}var lE=typeof exports=="object"&&exports&&!exports.nodeType&&exports,xu=lE&&typeof module=="object"&&module&&!module.nodeType&&module,WO=xu&&xu.exports===lE,hg=WO&&z0.process,Ui=function(){try{var t=xu&&xu.require&&xu.require("util").types;return t||hg&&hg.binding&&hg.binding("util")}catch{}}(),dE=Ui&&Ui.isTypedArray,mg=dE?Ef(dE):UO,zO=Object.prototype,HO=zO.
|
|
182
|
+
hasOwnProperty;function fE(t,e){var n=Qe(t),r=!n&&bf(t),i=!n&&!r&&Pu(t),s=!n&&!r&&!i&&mg(t),o=n||r||i||s,a=o?fO(t.length,String):[],u=a.length;for(var c in t)(e||HO.call(t,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||vf(c,u)))&&a.push(c);return a}function pE(t,e){return function(n){return t(e(n))}}var VO=pE(Object.keys,Object),KO=Object.prototype,XO=KO.hasOwnProperty;function hE(t){if(!_u(t))return VO(t);var e=[];for(var n in Object(t))
|
|
183
|
+
XO.call(t,n)&&n!="constructor"&&e.push(n);return e}function ir(t){return Fr(t)?fE(t):hE(t)}var YO=Object.prototype,JO=YO.hasOwnProperty,Un=lO(function(t,e){if(_u(e)||Fr(e)){Su(e,ir(e),t);return}for(var n in e)JO.call(e,n)&&wf(t,n,e[n])});function QO(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var ZO=Object.prototype,eL=ZO.hasOwnProperty;function tL(t){if(!rr(t))return QO(t);var e=_u(t),n=[];for(var r in t)r=="constructor"&&(e||!eL.call(t,r))||n.push(r);return n}function gg(t){
|
|
184
|
+
return Fr(t)?fE(t,!0):tL(t)}var nL=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rL=/^\w*$/;function yg(t,e){if(Qe(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||Cu(t)?!0:rL.test(t)||!nL.test(t)||e!=null&&t in Object(e)}var Nu=Cs(Object,"create");function iL(){this.__data__=Nu?Nu(null):{},this.size=0}function sL(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var oL="__lodash_hash_undefined__",aL=Object.prototype,uL=aL.hasOwnProperty;
|
|
185
|
+
function cL(t){var e=this.__data__;if(Nu){var n=e[t];return n===oL?void 0:n}return uL.call(e,t)?e[t]:void 0}var lL=Object.prototype,dL=lL.hasOwnProperty;function fL(t){var e=this.__data__;return Nu?e[t]!==void 0:dL.call(e,t)}var pL="__lodash_hash_undefined__";function hL(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Nu&&e===void 0?pL:e,this}function As(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}As.prototype.clear=iL,As.prototype.delete=
|
|
186
|
+
sL,As.prototype.get=cL,As.prototype.has=fL,As.prototype.set=hL;function mL(){this.__data__=[],this.size=0}function $f(t,e){for(var n=t.length;n--;)if(Au(t[n][0],e))return n;return-1}var gL=Array.prototype,yL=gL.splice;function vL(t){var e=this.__data__,n=$f(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():yL.call(e,n,1),--this.size,!0}function wL(t){var e=this.__data__,n=$f(e,t);return n<0?void 0:e[n][1]}function bL(t){return $f(this.__data__,t)>-1}function EL(t,e){var n=this.__data__,r=$f(
|
|
187
|
+
n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function ni(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}ni.prototype.clear=mL,ni.prototype.delete=vL,ni.prototype.get=wL,ni.prototype.has=bL,ni.prototype.set=EL;var Iu=Cs(Lr,"Map");function $L(){this.size=0,this.__data__={hash:new As,map:new(Iu||ni),string:new As}}function DL(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Df(t,e){
|
|
188
|
+
var n=t.__data__;return DL(e)?n[typeof e=="string"?"string":"hash"]:n.map}function RL(t){var e=Df(this,t).delete(t);return this.size-=e?1:0,e}function kL(t){return Df(this,t).get(t)}function TL(t){return Df(this,t).has(t)}function CL(t,e){var n=Df(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function ri(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}ri.prototype.clear=$L,ri.prototype.delete=RL,ri.prototype.get=kL,ri.prototype.has=TL,
|
|
189
|
+
ri.prototype.set=CL;var AL="Expected a function";function vg(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(AL);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=t.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(vg.Cache||ri),n}vg.Cache=ri;var SL=500;function _L(t){var e=vg(t,function(r){return n.size===SL&&n.clear(),r}),n=e.cache;return e}var PL=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,
|
|
190
|
+
xL=/\\(\\)?/g,NL=_L(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(PL,function(n,r,i,s){e.push(i?s.replace(xL,"$1"):r||n)}),e});function IL(t){return t==null?"":Y0(t)}function Rf(t,e){return Qe(t)?t:yg(t,e)?[t]:NL(IL(t))}function Ou(t){if(typeof t=="string"||Cu(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function wg(t,e){e=Rf(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[Ou(e[n++])];return n&&n==r?t:void 0}function OL(t,e,n){var r=t==null?void 0:wg(t,e);return r===
|
|
191
|
+
void 0?n:r}function bg(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var mE=nr?nr.isConcatSpreadable:void 0;function LL(t){return Qe(t)||bf(t)||!!(mE&&t&&t[mE])}function Eg(t,e,n,r,i){var s=-1,o=t.length;for(n||(n=LL),i||(i=[]);++s<o;){var a=t[s];n(a)?bg(i,a):r||(i[i.length]=a)}return i}function sr(t){var e=t==null?0:t.length;return e?Eg(t):[]}var gE=pE(Object.getPrototypeOf,Object);function yE(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>
|
|
192
|
+
0,e>>>=0;for(var s=Array(i);++r<i;)s[r]=t[r+e];return s}function FL(t,e,n,r){var i=-1,s=t==null?0:t.length;for(r&&s&&(n=t[++i]);++i<s;)n=e(n,t[i],i,t);return n}function ML(){this.__data__=new ni,this.size=0}function BL(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function jL(t){return this.__data__.get(t)}function qL(t){return this.__data__.has(t)}var GL=200;function UL(t,e){var n=this.__data__;if(n instanceof ni){var r=n.__data__;if(!Iu||r.length<GL-1)return r.push([t,e]),this.
|
|
193
|
+
size=++n.size,this;n=this.__data__=new ri(r)}return n.set(t,e),this.size=n.size,this}function Mr(t){var e=this.__data__=new ni(t);this.size=e.size}Mr.prototype.clear=ML,Mr.prototype.delete=BL,Mr.prototype.get=jL,Mr.prototype.has=qL,Mr.prototype.set=UL;function WL(t,e){return t&&Su(e,ir(e),t)}function zL(t,e){return t&&Su(e,gg(e),t)}var vE=typeof exports=="object"&&exports&&!exports.nodeType&&exports,wE=vE&&typeof module=="object"&&module&&!module.nodeType&&module,HL=wE&&wE.exports===vE,bE=HL?Lr.
|
|
194
|
+
Buffer:void 0,EE=bE?bE.allocUnsafe:void 0;function VL(t,e){var n=t.length,r=EE?EE(n):new t.constructor(n);return t.copy(r),r}function $g(t,e){for(var n=-1,r=t==null?0:t.length,i=0,s=[];++n<r;){var o=t[n];e(o,n,t)&&(s[i++]=o)}return s}function $E(){return[]}var KL=Object.prototype,XL=KL.propertyIsEnumerable,DE=Object.getOwnPropertySymbols,Dg=DE?function(t){return t==null?[]:(t=Object(t),$g(DE(t),function(e){return XL.call(t,e)}))}:$E;function YL(t,e){return Su(t,Dg(t),e)}var JL=Object.getOwnPropertySymbols,
|
|
195
|
+
RE=JL?function(t){for(var e=[];t;)bg(e,Dg(t)),t=gE(t);return e}:$E;function QL(t,e){return Su(t,RE(t),e)}function kE(t,e,n){var r=e(t);return Qe(t)?r:bg(r,n(t))}function Rg(t){return kE(t,ir,Dg)}function ZL(t){return kE(t,gg,RE)}var kg=Cs(Lr,"DataView"),Tg=Cs(Lr,"Promise"),Fo=Cs(Lr,"Set"),TE="[object Map]",eF="[object Object]",CE="[object Promise]",AE="[object Set]",SE="[object WeakMap]",_E="[object DataView]",tF=Ts(kg),nF=Ts(Iu),rF=Ts(Tg),iF=Ts(Fo),sF=Ts(cg),or=Gi;(kg&&or(new kg(new ArrayBuffer(
|
|
196
|
+
1)))!=_E||Iu&&or(new Iu)!=TE||Tg&&or(Tg.resolve())!=CE||Fo&&or(new Fo)!=AE||cg&&or(new cg)!=SE)&&(or=function(t){var e=Gi(t),n=e==eF?t.constructor:void 0,r=n?Ts(n):"";if(r)switch(r){case tF:return _E;case nF:return TE;case rF:return CE;case iF:return AE;case sF:return SE}return e});var oF=Object.prototype,aF=oF.hasOwnProperty;function uF(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&aF.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var kf=Lr.Uint8Array;function cF(t){
|
|
197
|
+
var e=new t.constructor(t.byteLength);return new kf(e).set(new kf(t)),e}function lF(t,e){var n=t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var dF=/\w*$/;function fF(t){var e=new t.constructor(t.source,dF.exec(t));return e.lastIndex=t.lastIndex,e}var PE=nr?nr.prototype:void 0,xE=PE?PE.valueOf:void 0;function pF(t){return xE?Object(xE.call(t)):{}}function hF(t,e){var n=t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var mF="[object Boolean]",gF="[object Date]",yF="[ob\
|
|
198
|
+
ject Map]",vF="[object Number]",wF="[object RegExp]",bF="[object Set]",EF="[object String]",$F="[object Symbol]",DF="[object ArrayBuffer]",RF="[object DataView]",kF="[object Float32Array]",TF="[object Float64Array]",CF="[object Int8Array]",AF="[object Int16Array]",SF="[object Int32Array]",_F="[object Uint8Array]",PF="[object Uint8ClampedArray]",xF="[object Uint16Array]",NF="[object Uint32Array]";function IF(t,e,n){var r=t.constructor;switch(e){case DF:return cF(t);case mF:case gF:return new r(+t);case RF:
|
|
199
|
+
return lF(t);case kF:case TF:case CF:case AF:case SF:case _F:case PF:case xF:case NF:return hF(t);case yF:return new r;case vF:case EF:return new r(t);case wF:return fF(t);case bF:return new r;case $F:return pF(t)}}function OF(t){return typeof t.constructor=="function"&&!_u(t)?HI(gE(t)):{}}var LF="[object Map]";function FF(t){return mr(t)&&or(t)==LF}var NE=Ui&&Ui.isMap,MF=NE?Ef(NE):FF,BF="[object Set]";function jF(t){return mr(t)&&or(t)==BF}var IE=Ui&&Ui.isSet,qF=IE?Ef(IE):jF,GF=2,OE="[object Ar\
|
|
200
|
+
guments]",UF="[object Array]",WF="[object Boolean]",zF="[object Date]",HF="[object Error]",LE="[object Function]",VF="[object GeneratorFunction]",KF="[object Map]",XF="[object Number]",FE="[object Object]",YF="[object RegExp]",JF="[object Set]",QF="[object String]",ZF="[object Symbol]",eM="[object WeakMap]",tM="[object ArrayBuffer]",nM="[object DataView]",rM="[object Float32Array]",iM="[object Float64Array]",sM="[object Int8Array]",oM="[object Int16Array]",aM="[object Int32Array]",uM="[object Ui\
|
|
201
|
+
nt8Array]",cM="[object Uint8ClampedArray]",lM="[object Uint16Array]",dM="[object Uint32Array]",gt={};gt[OE]=gt[UF]=gt[tM]=gt[nM]=gt[WF]=gt[zF]=gt[rM]=gt[iM]=gt[sM]=gt[oM]=gt[aM]=gt[KF]=gt[XF]=gt[FE]=gt[YF]=gt[JF]=gt[QF]=gt[ZF]=gt[uM]=gt[cM]=gt[lM]=gt[dM]=!0,gt[HF]=gt[LE]=gt[eM]=!1;function Tf(t,e,n,r,i,s){var o,a=e&GF;if(o!==void 0)return o;if(!rr(t))return t;var u=Qe(t);if(u)return o=uF(t),KI(t,o);var c=or(t),l=c==LE||c==VF;if(Pu(t))return VL(t);if(c==FE||c==OE||l&&!i)return o=l?{}:OF(t),a?QL(t,
|
|
202
|
+
zL(o,t)):YL(t,WL(o,t));if(!gt[c])return i?t:{};o=IF(t,c),s||(s=new Mr);var f=s.get(t);if(f)return f;s.set(t,o),qF(t)?t.forEach(function(h){o.add(Tf(h,e,n,h,t,s))}):MF(t)&&t.forEach(function(h,v){o.set(v,Tf(h,e,n,v,t,s))});var d=Rg,p=u?void 0:d(t);return eE(p||t,function(h,v){p&&(v=h,h=t[v]),wf(o,v,Tf(h,e,n,v,t,s))}),o}var fM=4;function nn(t){return Tf(t,fM)}function Lu(t){for(var e=-1,n=t==null?0:t.length,r=0,i=[];++e<n;){var s=t[e];s&&(i[r++]=s)}return i}var pM="__lodash_hash_undefined__";function hM(t){
|
|
203
|
+
return this.__data__.set(t,pM),this}function mM(t){return this.__data__.has(t)}function Mo(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new ri;++e<n;)this.add(t[e])}Mo.prototype.add=Mo.prototype.push=hM,Mo.prototype.has=mM;function ME(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function Cg(t,e){return t.has(e)}var gM=1,yM=2;function BE(t,e,n,r,i,s){var o=n&gM,a=t.length,u=e.length;if(a!=u&&!(o&&u>a))return!1;var c=s.get(t),l=s.get(e);if(c&&l)return c==e&&
|
|
204
|
+
l==t;var f=-1,d=!0,p=n&yM?new Mo:void 0;for(s.set(t,e),s.set(e,t);++f<a;){var h=t[f],v=e[f];if(r)var b=o?r(v,h,f,e,t,s):r(h,v,f,t,e,s);if(b!==void 0){if(b)continue;d=!1;break}if(p){if(!ME(e,function(y,E){if(!Cg(p,E)&&(h===y||i(h,y,n,r,s)))return p.push(E)})){d=!1;break}}else if(!(h===v||i(h,v,n,r,s))){d=!1;break}}return s.delete(t),s.delete(e),d}function vM(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function Ag(t){var e=-1,n=Array(t.size);return t.forEach(function(r){
|
|
205
|
+
n[++e]=r}),n}var wM=1,bM=2,EM="[object Boolean]",$M="[object Date]",DM="[object Error]",RM="[object Map]",kM="[object Number]",TM="[object RegExp]",CM="[object Set]",AM="[object String]",SM="[object Symbol]",_M="[object ArrayBuffer]",PM="[object DataView]",jE=nr?nr.prototype:void 0,Sg=jE?jE.valueOf:void 0;function xM(t,e,n,r,i,s,o){switch(n){case PM:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case _M:return!(t.byteLength!=e.byteLength||!s(new kf(t),new kf(
|
|
206
|
+
e)));case EM:case $M:case kM:return Au(+t,+e);case DM:return t.name==e.name&&t.message==e.message;case TM:case AM:return t==e+"";case RM:var a=vM;case CM:var u=r&wM;if(a||(a=Ag),t.size!=e.size&&!u)return!1;var c=o.get(t);if(c)return c==e;r|=bM,o.set(t,e);var l=BE(a(t),a(e),r,i,s,o);return o.delete(t),l;case SM:if(Sg)return Sg.call(t)==Sg.call(e)}return!1}var NM=1,IM=Object.prototype,OM=IM.hasOwnProperty;function LM(t,e,n,r,i,s){var o=n&NM,a=Rg(t),u=a.length,c=Rg(e),l=c.length;if(u!=l&&!o)return!1;
|
|
207
|
+
for(var f=u;f--;){var d=a[f];if(!(o?d in e:OM.call(e,d)))return!1}var p=s.get(t),h=s.get(e);if(p&&h)return p==e&&h==t;var v=!0;s.set(t,e),s.set(e,t);for(var b=o;++f<u;){d=a[f];var y=t[d],E=e[d];if(r)var R=o?r(E,y,d,e,t,s):r(y,E,d,t,e,s);if(!(R===void 0?y===E||i(y,E,n,r,s):R)){v=!1;break}b||(b=d=="constructor")}if(v&&!b){var A=t.constructor,N=e.constructor;A!=N&&"constructor"in t&&"constructor"in e&&!(typeof A=="function"&&A instanceof A&&typeof N=="function"&&N instanceof N)&&(v=!1)}return s.delete(
|
|
208
|
+
t),s.delete(e),v}var FM=1,qE="[object Arguments]",GE="[object Array]",Cf="[object Object]",MM=Object.prototype,UE=MM.hasOwnProperty;function BM(t,e,n,r,i,s){var o=Qe(t),a=Qe(e),u=o?GE:or(t),c=a?GE:or(e);u=u==qE?Cf:u,c=c==qE?Cf:c;var l=u==Cf,f=c==Cf,d=u==c;if(d&&Pu(t)){if(!Pu(e))return!1;o=!0,l=!1}if(d&&!l)return s||(s=new Mr),o||mg(t)?BE(t,e,n,r,i,s):xM(t,e,u,n,r,i,s);if(!(n&FM)){var p=l&&UE.call(t,"__wrapped__"),h=f&&UE.call(e,"__wrapped__");if(p||h){var v=p?t.value():t,b=h?e.value():e;return s||
|
|
209
|
+
(s=new Mr),i(v,b,n,r,s)}}return d?(s||(s=new Mr),LM(t,e,n,r,i,s)):!1}function _g(t,e,n,r,i){return t===e?!0:t==null||e==null||!mr(t)&&!mr(e)?t!==t&&e!==e:BM(t,e,n,r,_g,i)}var jM=1,qM=2;function GM(t,e,n,r){var i=n.length,s=i;if(t==null)return!s;for(t=Object(t);i--;){var o=n[i];if(o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i<s;){o=n[i];var a=o[0],u=t[a],c=o[1];if(o[2]){if(u===void 0&&!(a in t))return!1}else{var l=new Mr,f;if(!(f===void 0?_g(c,u,jM|qM,r,l):f))return!1}}return!0}function WE(t){
|
|
210
|
+
return t===t&&!rr(t)}function UM(t){for(var e=ir(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,WE(i)]}return e}function zE(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function WM(t){var e=UM(t);return e.length==1&&e[0][2]?zE(e[0][0],e[0][1]):function(n){return n===t||GM(n,t,e)}}function zM(t,e){return t!=null&&e in Object(t)}function HE(t,e,n){e=Rf(e,t);for(var r=-1,i=e.length,s=!1;++r<i;){var o=Ou(e[r]);if(!(s=t!=null&&n(t,o)))break;t=t[o]}return s||++r!=
|
|
211
|
+
i?s:(i=t==null?0:t.length,!!i&&pg(i)&&vf(o,i)&&(Qe(t)||bf(t)))}function HM(t,e){return t!=null&&HE(t,e,zM)}var VM=1,KM=2;function XM(t,e){return yg(t)&&WE(e)?zE(Ou(t),e):function(n){var r=OL(n,t);return r===void 0&&r===e?HM(n,t):_g(e,r,VM|KM)}}function YM(t){return function(e){return e?.[t]}}function JM(t){return function(e){return wg(e,t)}}function QM(t){return yg(t)?YM(Ou(t)):JM(t)}function gr(t){return typeof t=="function"?t:t==null?ks:typeof t=="object"?Qe(t)?XM(t[0],t[1]):WM(t):QM(t)}function ZM(t,e,n,r){
|
|
212
|
+
for(var i=-1,s=t==null?0:t.length;++i<s;){var o=t[i];e(r,o,n(o),t)}return r}function e2(t){return function(e,n,r){for(var i=-1,s=Object(e),o=r(e),a=o.length;a--;){var u=o[++i];if(n(s[u],u,s)===!1)break}return e}}var t2=e2();function n2(t,e){return t&&t2(t,e,ir)}function r2(t,e){return function(n,r){if(n==null)return n;if(!Fr(n))return t(n,r);for(var i=n.length,s=-1,o=Object(n);++s<i&&r(o[s],s,o)!==!1;);return n}}var Ss=r2(n2);function i2(t,e,n,r){return Ss(t,function(i,s,o){e(r,i,n(i),o)}),r}function s2(t,e){
|
|
213
|
+
return function(n,r){var i=Qe(n)?ZM:i2,s=e?e():{};return i(n,t,gr(r),s)}}var VE=Object.prototype,o2=VE.hasOwnProperty,Pg=fg(function(t,e){t=Object(t);var n=-1,r=e.length,i=r>2?e[2]:void 0;for(i&&iE(e[0],e[1],i)&&(r=1);++n<r;)for(var s=e[n],o=gg(s),a=-1,u=o.length;++a<u;){var c=o[a],l=t[c];(l===void 0||Au(l,VE[c])&&!o2.call(t,c))&&(t[c]=s[c])}return t});function KE(t){return mr(t)&&Fr(t)}var a2=200;function u2(t,e,n,r){var i=-1,s=nE,o=!0,a=t.length,u=[],c=e.length;if(!a)return u;e.length>=a2&&(s=
|
|
214
|
+
Cg,o=!1,e=new Mo(e));e:for(;++i<a;){var l=t[i],f=l;if(l=l!==0?l:0,o&&f===f){for(var d=c;d--;)if(e[d]===f)continue e;u.push(l)}else s(e,f,r)||u.push(l)}return u}var Af=fg(function(t,e){return KE(t)?u2(t,Eg(e,1,KE,!0)):[]});function Bo(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function rn(t,e,n){var r=t==null?0:t.length;return r?(e=e===void 0?1:gf(e),yE(t,e<0?0:e,r)):[]}function Fu(t,e,n){var r=t==null?0:t.length;return r?(e=e===void 0?1:gf(e),e=r-e,yE(t,0,e<0?0:e)):[]}function c2(t){return typeof t==
|
|
215
|
+
"function"?t:ks}function ke(t,e){var n=Qe(t)?eE:Ss;return n(t,c2(e))}function l2(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function d2(t,e){var n=!0;return Ss(t,function(r,i,s){return n=!!e(r,i,s),n}),n}function yr(t,e,n){var r=Qe(t)?l2:d2;return r(t,gr(e))}function XE(t,e){var n=[];return Ss(t,function(r,i,s){e(r,i,s)&&n.push(r)}),n}function Wn(t,e){var n=Qe(t)?$g:XE;return n(t,gr(e))}function f2(t){return function(e,n,r){var i=Object(e);if(!Fr(e)){var s=gr(
|
|
216
|
+
n);e=ir(e),n=function(a){return s(i[a],a,i)}}var o=t(e,n,r);return o>-1?i[s?e[o]:o]:void 0}}var p2=Math.max;function h2(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=n==null?0:gf(n);return i<0&&(i=p2(r+i,0)),tE(t,gr(e),i)}var jo=f2(h2);function vr(t){return t&&t.length?t[0]:void 0}function m2(t,e){var n=-1,r=Fr(t)?Array(t.length):[];return Ss(t,function(i,s,o){r[++n]=e(i,s,o)}),r}function ve(t,e){var n=Qe(t)?mf:m2;return n(t,gr(e))}function zn(t,e){return Eg(ve(t,e))}var g2=Object.prototype,
|
|
217
|
+
y2=g2.hasOwnProperty,v2=s2(function(t,e,n){y2.call(t,n)?t[n].push(e):dg(t,n,[e])}),w2=Object.prototype,b2=w2.hasOwnProperty;function E2(t,e){return t!=null&&b2.call(t,e)}function Te(t,e){return t!=null&&HE(t,e,E2)}var $2="[object String]";function xn(t){return typeof t=="string"||!Qe(t)&&mr(t)&&Gi(t)==$2}function D2(t,e){return mf(e,function(n){return t[n]})}function Ht(t){return t==null?[]:D2(t,ir(t))}var R2=Math.max;function bn(t,e,n,r){t=Fr(t)?t:Ht(t),n=n?gf(n):0;var i=t.length;return n<0&&(n=
|
|
218
|
+
R2(i+n,0)),xn(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&lg(t,e,n)>-1}function YE(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=0;return lg(t,e,i)}var k2="[object Map]",T2="[object Set]",C2=Object.prototype,A2=C2.hasOwnProperty;function dt(t){if(t==null)return!0;if(Fr(t)&&(Qe(t)||typeof t=="string"||typeof t.splice=="function"||Pu(t)||mg(t)||bf(t)))return!t.length;var e=or(t);if(e==k2||e==T2)return!t.size;if(_u(t))return!hE(t).length;for(var n in t)if(A2.call(t,n))return!1;return!0}var S2="[object R\
|
|
219
|
+
egExp]";function _2(t){return mr(t)&&Gi(t)==S2}var JE=Ui&&Ui.isRegExp,ii=JE?Ef(JE):_2;function si(t){return t===void 0}function P2(t,e){return t<e}function x2(t,e,n){for(var r=-1,i=t.length;++r<i;){var s=t[r],o=e(s);if(o!=null&&(a===void 0?o===o&&!Cu(o):n(o,a)))var a=o,u=s}return u}function N2(t){return t&&t.length?x2(t,ks,P2):void 0}var I2="Expected a function";function O2(t){if(typeof t!="function")throw new TypeError(I2);return function(){var e=arguments;switch(e.length){case 0:return!t.call(
|
|
220
|
+
this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function L2(t,e,n,r){if(!rr(t))return t;e=Rf(e,t);for(var i=-1,s=e.length,o=s-1,a=t;a!=null&&++i<s;){var u=Ou(e[i]),c=n;if(u==="__proto__"||u==="constructor"||u==="prototype")return t;if(i!=o){var l=a[u];c=void 0,c===void 0&&(c=rr(l)?l:vf(e[i+1])?[]:{})}wf(a,u,c),a=a[u]}return t}function F2(t,e,n){for(var r=-1,i=e.length,s={};++r<i;){var o=e[r],a=wg(t,o);n(
|
|
221
|
+
a,o)&&L2(s,Rf(o,t),a)}return s}function wr(t,e){if(t==null)return{};var n=mf(ZL(t),function(r){return[r]});return e=gr(e),F2(t,n,function(r,i){return e(r,i[0])})}function M2(t,e,n,r,i){return i(t,function(s,o,a){n=r?(r=!1,s):e(n,s,o,a)}),n}function En(t,e,n){var r=Qe(t)?FL:M2,i=arguments.length<3;return r(t,gr(e),n,i,Ss)}function Sf(t,e){var n=Qe(t)?$g:XE;return n(t,O2(gr(e)))}function B2(t,e){var n;return Ss(t,function(r,i,s){return n=e(r,i,s),!n}),!!n}function QE(t,e,n){var r=Qe(t)?ME:B2;return r(
|
|
222
|
+
t,gr(e))}var j2=1/0,q2=Fo&&1/Ag(new Fo([,-0]))[1]==j2?function(t){return new Fo(t)}:zt,G2=200;function ZE(t,e,n){var r=-1,i=nE,s=t.length,o=!0,a=[],u=a;if(s>=G2){var c=e?null:q2(t);if(c)return Ag(c);o=!1,i=Cg,u=new Mo}else u=e?[]:a;e:for(;++r<s;){var l=t[r],f=e?e(l):l;if(l=l!==0?l:0,o&&f===f){for(var d=u.length;d--;)if(u[d]===f)continue e;e&&u.push(f),a.push(l)}else i(u,f,n)||(u!==a&&u.push(f),a.push(l))}return a}function xg(t){return t&&t.length?ZE(t):[]}function U2(t,e){return t&&t.length?ZE(t,
|
|
223
|
+
gr(e)):[]}function Ng(t){console&&console.error&&console.error(`Error: ${t}`)}function e$(t){console&&console.warn&&console.warn(`Warning: ${t}`)}function t$(t){const e=new Date().getTime(),n=t();return{time:new Date().getTime()-e,value:n}}function n$(t){function e(){}e.prototype=t;const n=new e;function r(){return typeof n.bar}return r(),r(),t}function W2(t){return z2(t)?t.LABEL:t.name}function z2(t){return xn(t.LABEL)&&t.LABEL!==""}class Br{get definition(){return this._definition}set definition(e){
|
|
224
|
+
this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),ke(this.definition,n=>{n.accept(e)})}}class $n extends Br{constructor(e){super([]),this.idx=1,Un(this,wr(e,n=>n!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class qo extends Br{constructor(e){super(e.definition),this.orgText="",Un(this,wr(e,n=>n!==void 0))}}class Nn extends Br{constructor(e){super(e.definition),this.ignoreAmbiguities=
|
|
225
|
+
!1,Un(this,wr(e,n=>n!==void 0))}}class sn extends Br{constructor(e){super(e.definition),this.idx=1,Un(this,wr(e,n=>n!==void 0))}}class Hn extends Br{constructor(e){super(e.definition),this.idx=1,Un(this,wr(e,n=>n!==void 0))}}class Vn extends Br{constructor(e){super(e.definition),this.idx=1,Un(this,wr(e,n=>n!==void 0))}}class St extends Br{constructor(e){super(e.definition),this.idx=1,Un(this,wr(e,n=>n!==void 0))}}class In extends Br{constructor(e){super(e.definition),this.idx=1,Un(this,wr(e,n=>n!==
|
|
226
|
+
void 0))}}class On extends Br{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Un(this,wr(e,n=>n!==void 0))}}class bt{constructor(e){this.idx=1,Un(this,wr(e,n=>n!==void 0))}accept(e){e.visit(this)}}function H2(t){return ve(t,_f)}function _f(t){function e(n){return ve(n,_f)}if(t instanceof $n){const n={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return xn(t.label)&&(n.
|
|
227
|
+
label=t.label),n}else{if(t instanceof Nn)return{type:"Alternative",definition:e(t.definition)};if(t instanceof sn)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof Hn)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof Vn)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:_f(new bt({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof In)return{type:"RepetitionWithSeparator",idx:t.idx,separator:_f(new bt(
|
|
228
|
+
{terminalType:t.separator})),definition:e(t.definition)};if(t instanceof St)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof On)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof bt){const n={type:"Terminal",name:t.terminalType.name,label:W2(t.terminalType),idx:t.idx};xn(t.label)&&(n.terminalLabel=t.label);const r=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(n.pattern=ii(r)?r.source:r),n}else{if(t instanceof qo)return{type:"Rul\
|
|
229
|
+
e",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}}}class Go{visit(e){const n=e;switch(n.constructor){case $n:return this.visitNonTerminal(n);case Nn:return this.visitAlternative(n);case sn:return this.visitOption(n);case Hn:return this.visitRepetitionMandatory(n);case Vn:return this.visitRepetitionMandatoryWithSeparator(n);case In:return this.visitRepetitionWithSeparator(n);case St:return this.visitRepetition(n);case On:return this.visitAlternation(
|
|
230
|
+
n);case bt:return this.visitTerminal(n);case qo:return this.visitRule(n);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}function V2(t){return t instanceof Nn||t instanceof sn||t instanceof St||t instanceof Hn||t instanceof Vn||t instanceof In||t instanceof bt||t instanceof
|
|
231
|
+
qo}function Pf(t,e=[]){return t instanceof sn||t instanceof St||t instanceof In?!0:t instanceof On?QE(t.definition,r=>Pf(r,e)):t instanceof $n&&bn(e,t)?!1:t instanceof Br?(t instanceof $n&&e.push(t),yr(t.definition,r=>Pf(r,e))):!1}function K2(t){return t instanceof On}function jr(t){if(t instanceof $n)return"SUBRULE";if(t instanceof sn)return"OPTION";if(t instanceof On)return"OR";if(t instanceof Hn)return"AT_LEAST_ONE";if(t instanceof Vn)return"AT_LEAST_ONE_SEP";if(t instanceof In)return"MANY_SE\
|
|
232
|
+
P";if(t instanceof St)return"MANY";if(t instanceof bt)return"CONSUME";throw Error("non exhaustive match")}class xf{walk(e,n=[]){ke(e.definition,(r,i)=>{const s=rn(e.definition,i+1);if(r instanceof $n)this.walkProdRef(r,s,n);else if(r instanceof bt)this.walkTerminal(r,s,n);else if(r instanceof Nn)this.walkFlat(r,s,n);else if(r instanceof sn)this.walkOption(r,s,n);else if(r instanceof Hn)this.walkAtLeastOne(r,s,n);else if(r instanceof Vn)this.walkAtLeastOneSep(r,s,n);else if(r instanceof In)this.walkManySep(
|
|
233
|
+
r,s,n);else if(r instanceof St)this.walkMany(r,s,n);else if(r instanceof On)this.walkOr(r,s,n);else throw Error("non exhaustive match")})}walkTerminal(e,n,r){}walkProdRef(e,n,r){}walkFlat(e,n,r){const i=n.concat(r);this.walk(e,i)}walkOption(e,n,r){const i=n.concat(r);this.walk(e,i)}walkAtLeastOne(e,n,r){const i=[new sn({definition:e.definition})].concat(n,r);this.walk(e,i)}walkAtLeastOneSep(e,n,r){const i=r$(e,n,r);this.walk(e,i)}walkMany(e,n,r){const i=[new sn({definition:e.definition})].concat(
|
|
234
|
+
n,r);this.walk(e,i)}walkManySep(e,n,r){const i=r$(e,n,r);this.walk(e,i)}walkOr(e,n,r){const i=n.concat(r);ke(e.definition,s=>{const o=new Nn({definition:[s]});this.walk(o,i)})}}function r$(t,e,n){return[new sn({definition:[new bt({terminalType:t.separator})].concat(t.definition)})].concat(e,n)}function Mu(t){if(t instanceof $n)return Mu(t.referencedRule);if(t instanceof bt)return J2(t);if(V2(t))return X2(t);if(K2(t))return Y2(t);throw Error("non exhaustive match")}function X2(t){let e=[];const n=t.
|
|
235
|
+
definition;let r=0,i=n.length>r,s,o=!0;for(;i&&o;)s=n[r],o=Pf(s),e=e.concat(Mu(s)),r=r+1,i=n.length>r;return xg(e)}function Y2(t){const e=ve(t.definition,n=>Mu(n));return xg(sr(e))}function J2(t){return[t.terminalType]}const i$="_~IN~_";class Q2 extends xf{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,n,r){}walkProdRef(e,n,r){const i=eB(e.referencedRule,e.idx)+this.topProd.name,s=n.concat(r),o=new Nn({definition:s}),
|
|
236
|
+
a=Mu(o);this.follows[i]=a}}function Z2(t){const e={};return ke(t,n=>{const r=new Q2(n).startWalking();Un(e,r)}),e}function eB(t,e){return t.name+e+i$}let Nf={};const tB=new N0;function If(t){const e=t.toString();if(Nf.hasOwnProperty(e))return Nf[e];{const n=tB.pattern(e);return Nf[e]=n,n}}function nB(){Nf={}}const s$="Complement Sets are not supported for first char optimization",Of=`Unable to use "first char" lexer optimizations:
|
|
237
|
+
`;function rB(t,e=!1){try{const n=If(t);return Ig(n.value,{},n.flags.ignoreCase)}catch(n){if(n.message===s$)e&&e$(`${Of} Unable to optimize: < ${t.toString()} >
|
|
238
|
+
Complement Sets cannot be automatically optimized.
|
|
239
|
+
This will disable the lexer's first char optimizations.
|
|
240
|
+
See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let r="";e&&(r=`
|
|
241
|
+
This will disable the lexer's first char optimizations.
|
|
242
|
+
See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),Ng(`${Of}
|
|
243
|
+
Failed parsing: < ${t.toString()} >
|
|
244
|
+
Using the @chevrotain/regexp-to-ast library
|
|
245
|
+
Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+r)}}return[]}function Ig(t,e,n){switch(t.type){case"Disjunction":for(let i=0;i<t.value.length;i++)Ig(t.value[i],e,n);break;case"Alternative":const r=t.value;for(let i=0;i<r.length;i++){const s=r[i];switch(s.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}const o=s;switch(o.type){case"Character":Lf(o.value,e,n);break;case"\
|
|
246
|
+
Set":if(o.complement===!0)throw Error(s$);ke(o.value,u=>{if(typeof u=="number")Lf(u,e,n);else{const c=u;if(n===!0)for(let l=c.from;l<=c.to;l++)Lf(l,e,n);else{for(let l=c.from;l<=c.to&&l<ju;l++)Lf(l,e,n);if(c.to>=ju){const l=c.from>=ju?c.from:ju,f=c.to,d=Wi(l),p=Wi(f);for(let h=d;h<=p;h++)e[h]=h}}}});break;case"Group":Ig(o.value,e,n);break;default:throw Error("Non Exhaustive Match")}const a=o.quantifier!==void 0&&o.quantifier.atLeast===0;if(o.type==="Group"&&Og(o)===!1||o.type!=="Group"&&a===!1)break}
|
|
247
|
+
break;default:throw Error("non exhaustive match!")}return Ht(e)}function Lf(t,e,n){const r=Wi(t);e[r]=r,n===!0&&iB(t,e)}function iB(t,e){const n=String.fromCharCode(t),r=n.toUpperCase();if(r!==n){const i=Wi(r.charCodeAt(0));e[i]=i}else{const i=n.toLowerCase();if(i!==n){const s=Wi(i.charCodeAt(0));e[s]=s}}}function o$(t,e){return jo(t.value,n=>{if(typeof n=="number")return bn(e,n);{const r=n;return jo(e,i=>r.from<=i&&i<=r.to)!==void 0}})}function Og(t){const e=t.quantifier;return e&&e.atLeast===0?
|
|
248
|
+
!0:t.value?Qe(t.value)?yr(t.value,Og):Og(t.value):!1}class sB extends df{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return}super.visitChildren(e)}}visitCharacter(e){bn(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?o$(e,this.targetCharCodes)===void 0&&(this.found=!0):o$(e,this.targetCharCodes)!==void 0&&
|
|
249
|
+
(this.found=!0)}}function Lg(t,e){if(e instanceof RegExp){const n=If(e),r=new sB(t);return r.visit(n),r.found}else return jo(e,n=>bn(t,n.charCodeAt(0)))!==void 0}const _s="PATTERN",Bu="defaultMode",Ff="modes";let a$=typeof new RegExp("(?:)").sticky=="boolean";function oB(t,e){e=Pg(e,{useSticky:a$,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
|
|
250
|
+
`],tracer:(E,R)=>R()});const n=e.tracer;n("initCharCodeToOptimizedIndexMap",()=>{SB()});let r;n("Reject Lexer.NA",()=>{r=Sf(t,E=>E[_s]===Ln.NA)});let i=!1,s;n("Transform Patterns",()=>{i=!1,s=ve(r,E=>{const R=E[_s];if(ii(R)){const A=R.source;return A.length===1&&A!=="^"&&A!=="$"&&A!=="."&&!R.ignoreCase?A:A.length===2&&A[0]==="\\"&&!bn(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],A[1])?A[1]:e.useSticky?c$(R):u$(R)}else{if(ti(R))return i=!0,{exec:R};if(typeof R=="object")return i=
|
|
251
|
+
!0,R;if(typeof R=="string"){if(R.length===1)return R;{const A=R.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),N=new RegExp(A);return e.useSticky?c$(N):u$(N)}}else throw Error("non exhaustive match")}})});let o,a,u,c,l;n("misc mapping",()=>{o=ve(r,E=>E.tokenTypeIdx),a=ve(r,E=>{const R=E.GROUP;if(R!==Ln.SKIPPED){if(xn(R))return R;if(si(R))return!1;throw Error("non exhaustive match")}}),u=ve(r,E=>{const R=E.LONGER_ALT;if(R)return Qe(R)?ve(R,N=>YE(r,N)):[YE(r,R)]}),c=ve(r,E=>E.PUSH_MODE),l=ve(r,E=>Te(E,"POP\
|
|
252
|
+
_MODE"))});let f;n("Line Terminator Handling",()=>{const E=f$(e.lineTerminatorCharacters);f=ve(r,R=>!1),e.positionTracking!=="onlyOffset"&&(f=ve(r,R=>Te(R,"LINE_BREAKS")?!!R.LINE_BREAKS:d$(R,E)===!1&&Lg(E,R.PATTERN)))});let d,p,h,v;n("Misc Mapping #2",()=>{d=ve(r,l$),p=ve(s,TB),h=En(r,(E,R)=>{const A=R.GROUP;return xn(A)&&A!==Ln.SKIPPED&&(E[A]=[]),E},{}),v=ve(s,(E,R)=>({pattern:s[R],longerAlt:u[R],canLineTerminator:f[R],isCustom:d[R],short:p[R],group:a[R],push:c[R],pop:l[R],tokenTypeIdx:o[R],tokenType:r[R]}))});
|
|
253
|
+
let b=!0,y=[];return e.safeMode||n("First Char Optimization",()=>{y=En(r,(E,R,A)=>{if(typeof R.PATTERN=="string"){const N=R.PATTERN.charCodeAt(0),K=Wi(N);Fg(E,K,v[A])}else if(Qe(R.START_CHARS_HINT)){let N;ke(R.START_CHARS_HINT,K=>{const J=typeof K=="string"?K.charCodeAt(0):K,se=Wi(J);N!==se&&(N=se,Fg(E,se,v[A]))})}else if(ii(R.PATTERN))if(R.PATTERN.unicode)b=!1,e.ensureOptimizations&&Ng(`${Of} Unable to analyze < ${R.PATTERN.toString()} > pattern.
|
|
254
|
+
The regexp unicode flag is not currently supported by the regexp-to-ast library.
|
|
255
|
+
This will disable the lexer's first char optimizations.
|
|
256
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const N=rB(R.PATTERN,e.ensureOptimizations);dt(N)&&(b=!1),ke(N,K=>{Fg(E,K,v[A])})}else e.ensureOptimizations&&Ng(`${Of} TokenType: <${R.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
|
|
257
|
+
This will disable the lexer's first char optimizations.
|
|
258
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),b=!1;return E},[])}),{emptyGroups:h,patternIdxToConfig:v,charCodeToPatternIdxToConfig:y,hasCustom:i,canBeOptimized:b}}function aB(t,e){let n=[];const r=cB(t);n=n.concat(r.errors);const i=lB(r.valid),s=i.valid;return n=n.concat(i.errors),n=n.concat(uB(s)),n=n.concat(vB(s)),n=n.concat(wB(s,e)),n=n.concat(bB(s)),n}function uB(t){let e=[];const n=Wn(t,r=>ii(r[_s]));return e=e.concat(fB(n)),e=e.concat(mB(
|
|
259
|
+
n)),e=e.concat(gB(n)),e=e.concat(yB(n)),e=e.concat(pB(n)),e}function cB(t){const e=Wn(t,i=>!Te(i,_s)),n=ve(e,i=>({message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:_t.MISSING_PATTERN,tokenTypes:[i]})),r=Af(t,e);return{errors:n,valid:r}}function lB(t){const e=Wn(t,i=>{const s=i[_s];return!ii(s)&&!ti(s)&&!Te(s,"exec")&&!xn(s)}),n=ve(e,i=>({message:"Token Type: ->"+i.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or \
|
|
260
|
+
an Object matching the {ICustomPattern} interface.",type:_t.INVALID_PATTERN,tokenTypes:[i]})),r=Af(t,e);return{errors:n,valid:r}}const dB=/[^\\][$]/;function fB(t){class e extends df{constructor(){super(...arguments),this.found=!1}visitEndAnchor(s){this.found=!0}}const n=Wn(t,i=>{const s=i.PATTERN;try{const o=If(s),a=new e;return a.visit(o),a.found}catch{return dB.test(s.source)}});return ve(n,i=>({message:`Unexpected RegExp Anchor Error:
|
|
261
|
+
Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
|
|
262
|
+
See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:_t.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}function pB(t){const e=Wn(t,r=>r.PATTERN.test(""));return ve(e,r=>({message:"Token Type: ->"+r.name+"<- static 'PATTERN' must not match an empty string",type:_t.EMPTY_MATCH_PATTERN,tokenTypes:[r]}))}const hB=/[^\\[][\^]|^\^/;function mB(t){class e extends df{constructor(){super(...arguments),this.found=!1}visitStartAnchor(s){this.found=!0}}const n=Wn(t,i=>{const s=i.PATTERN;
|
|
263
|
+
try{const o=If(s),a=new e;return a.visit(o),a.found}catch{return hB.test(s.source)}});return ve(n,i=>({message:`Unexpected RegExp Anchor Error:
|
|
264
|
+
Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
|
|
265
|
+
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:_t.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}function gB(t){const e=Wn(t,r=>{const i=r[_s];return i instanceof RegExp&&(i.multiline||i.global)});return ve(e,r=>({message:"Token Type: ->"+r.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:_t.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[r]}))}function yB(t){const e=[];let n=ve(t,s=>En(t,(o,a)=>(s.PATTERN.source===a.PATTERN.source&&!bn(e,a)&&a.
|
|
266
|
+
PATTERN!==Ln.NA&&(e.push(a),o.push(a)),o),[]));n=Lu(n);const r=Wn(n,s=>s.length>1);return ve(r,s=>{const o=ve(s,u=>u.name);return{message:`The same RegExp pattern ->${vr(s).PATTERN}<-has been used in all of the following Token Types: ${o.join(", ")} <-`,type:_t.DUPLICATE_PATTERNS_FOUND,tokenTypes:s}})}function vB(t){const e=Wn(t,r=>{if(!Te(r,"GROUP"))return!1;const i=r.GROUP;return i!==Ln.SKIPPED&&i!==Ln.NA&&!xn(i)});return ve(e,r=>({message:"Token Type: ->"+r.name+"<- static 'GROUP' can only be\
|
|
267
|
+
Lexer.SKIPPED/Lexer.NA/A String",type:_t.INVALID_GROUP_TYPE_FOUND,tokenTypes:[r]}))}function wB(t,e){const n=Wn(t,i=>i.PUSH_MODE!==void 0&&!bn(e,i.PUSH_MODE));return ve(n,i=>({message:`Token Type: ->${i.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${i.PUSH_MODE}<-which does not exist`,type:_t.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}))}function bB(t){const e=[],n=En(t,(r,i,s)=>{const o=i.PATTERN;return o===Ln.NA||(xn(o)?r.push({str:o,idx:s,tokenType:i}):ii(o)&&$B(o)&&r.push({str:o.
|
|
268
|
+
source,idx:s,tokenType:i})),r},[]);return ke(t,(r,i)=>{ke(n,({str:s,idx:o,tokenType:a})=>{if(i<o&&EB(s,r.PATTERN)){const u=`Token: ->${a.name}<- can never be matched.
|
|
269
|
+
Because it appears AFTER the Token Type ->${r.name}<-in the lexer's definition.
|
|
270
|
+
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:u,type:_t.UNREACHABLE_PATTERN,tokenTypes:[r,a]})}})}),e}function EB(t,e){if(ii(e)){const n=e.exec(t);return n!==null&&n.index===0}else{if(ti(e))return e(t,0,[],{});if(Te(e,"exec"))return e.exec(t,0,[],{});if(typeof e=="string")return e===t;throw Error("non exhaustive match")}}function $B(t){return jo([".","\\","[","]","|","^","$","(",")","?","*","+","{"],n=>t.source.indexOf(n)!==-1)===void 0}function u$(t){
|
|
271
|
+
const e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}function c$(t){const e=t.ignoreCase?"iy":"y";return new RegExp(`${t.source}`,e)}function DB(t,e,n){const r=[];return Te(t,Bu)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+Bu+`> property in its definition
|
|
272
|
+
`,type:_t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Te(t,Ff)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+Ff+`> property in its definition
|
|
273
|
+
`,type:_t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Te(t,Ff)&&Te(t,Bu)&&!Te(t.modes,t.defaultMode)&&r.push({message:`A MultiMode Lexer cannot be initialized with a ${Bu}: <${t.defaultMode}>which does not exist
|
|
274
|
+
`,type:_t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Te(t,Ff)&&ke(t.modes,(i,s)=>{ke(i,(o,a)=>{if(si(o))r.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${s}> at index: <${a}>
|
|
275
|
+
`,type:_t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(Te(o,"LONGER_ALT")){const u=Qe(o.LONGER_ALT)?o.LONGER_ALT:[o.LONGER_ALT];ke(u,c=>{!si(c)&&!bn(i,c)&&r.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${c.name}> on token <${o.name}> outside of mode <${s}>
|
|
276
|
+
`,type:_t.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),r}function RB(t,e,n){const r=[];let i=!1;const s=Lu(sr(Ht(t.modes))),o=Sf(s,u=>u[_s]===Ln.NA),a=f$(n);return e&&ke(o,u=>{const c=d$(u,a);if(c!==!1){const f={message:AB(u,c),type:c.issue,tokenType:u};r.push(f)}else Te(u,"LINE_BREAKS")?u.LINE_BREAKS===!0&&(i=!0):Lg(a,u.PATTERN)&&(i=!0)}),e&&!i&&r.push({message:`Warning: No LINE_BREAKS Found.
|
|
277
|
+
This Lexer has been defined to track line and column information,
|
|
278
|
+
But none of the Token Types can be identified as matching a line terminator.
|
|
279
|
+
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS
|
|
280
|
+
for details.`,type:_t.NO_LINE_BREAKS_FLAGS}),r}function kB(t){const e={},n=ir(t);return ke(n,r=>{const i=t[r];if(Qe(i))e[r]=[];else throw Error("non exhaustive match")}),e}function l$(t){const e=t.PATTERN;if(ii(e))return!1;if(ti(e))return!0;if(Te(e,"exec"))return!0;if(xn(e))return!1;throw Error("non exhaustive match")}function TB(t){return xn(t)&&t.length===1?t.charCodeAt(0):!1}const CB={test:function(t){const e=t.length;for(let n=this.lastIndex;n<e;n++){const r=t.charCodeAt(n);if(r===10)return this.
|
|
281
|
+
lastIndex=n+1,!0;if(r===13)return t.charCodeAt(n+1)===10?this.lastIndex=n+2:this.lastIndex=n+1,!0}return!1},lastIndex:0};function d$(t,e){if(Te(t,"LINE_BREAKS"))return!1;if(ii(t.PATTERN)){try{Lg(e,t.PATTERN)}catch(n){return{issue:_t.IDENTIFY_TERMINATOR,errMsg:n.message}}return!1}else{if(xn(t.PATTERN))return!1;if(l$(t))return{issue:_t.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function AB(t,e){if(e.issue===_t.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usag\
|
|
282
|
+
e in pattern.
|
|
283
|
+
The problem is in the <${t.name}> Token Type
|
|
284
|
+
Root cause: ${e.errMsg}.
|
|
285
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===_t.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
|
|
286
|
+
The problem is in the <${t.name}> Token Type
|
|
287
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function f$(t){return ve(t,n=>xn(n)?n.charCodeAt(0):n)}function Fg(t,e,n){t[e]===void 0?t[e]=[n]:t[e].push(n)}const ju=256;let Mf=[];function Wi(t){return t<ju?t:Mf[t]}function SB(){if(dt(Mf)){Mf=new Array(65536);for(let t=0;t<65536;t++)Mf[t]=t>255?255+~~(t/255):t}}function qu(t,e){const n=t.tokenTypeIdx;return n===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[n]===
|
|
288
|
+
!0}function Bf(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}let p$=1;const h$={};function Gu(t){const e=_B(t);PB(e),NB(e),xB(e),ke(e,n=>{n.isParent=n.categoryMatches.length>0})}function _B(t){let e=nn(t),n=t,r=!0;for(;r;){n=Lu(sr(ve(n,s=>s.CATEGORIES)));const i=Af(n,e);e=e.concat(i),dt(i)?r=!1:n=i}return e}function PB(t){ke(t,e=>{g$(e)||(h$[p$]=e,e.tokenTypeIdx=p$++),y$(e)&&!Qe(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),y$(e)||(e.CATEGORIES=[]),IB(e)||(e.categoryMatches=[]),OB(e)||(e.categoryMatchesMap=
|
|
289
|
+
{})})}function xB(t){ke(t,e=>{e.categoryMatches=[],ke(e.categoryMatchesMap,(n,r)=>{e.categoryMatches.push(h$[r].tokenTypeIdx)})})}function NB(t){ke(t,e=>{m$([],e)})}function m$(t,e){ke(t,n=>{e.categoryMatchesMap[n.tokenTypeIdx]=!0}),ke(e.CATEGORIES,n=>{const r=t.concat(e);bn(r,n)||m$(r,n)})}function g$(t){return Te(t,"tokenTypeIdx")}function y$(t){return Te(t,"CATEGORIES")}function IB(t){return Te(t,"categoryMatches")}function OB(t){return Te(t,"categoryMatchesMap")}function LB(t){return Te(t,"t\
|
|
290
|
+
okenTypeIdx")}const Mg={buildUnableToPopLexerModeMessage(t){return`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(t,e,n,r,i){return`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${n} characters.`}};var _t;(function(t){t[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.
|
|
291
|
+
DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=
|
|
292
|
+
10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",t[t.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(_t||(_t={}));const Uu={deferDefinitionErrorsHandling:!1,
|
|
293
|
+
positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
|
|
294
|
+
`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Mg,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Uu);class Ln{constructor(e,n=Uu){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(i,s)=>{if(this.traceInitPerf===!0){this.
|
|
295
|
+
traceInitIndent++;const o=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${o}--> <${i}>`);const{time:a,value:u}=t$(s),c=a>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&c(`${o}<-- <${i}> time: ${a}ms`),this.traceInitIndent--,u}else return s()},typeof n=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
|
|
296
|
+
a boolean 2nd argument is no longer supported`);this.config=Un({},Uu,n);const r=this.config.traceInitPerf;r===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof r=="number"&&(this.traceInitMaxIdent=r,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let i,s=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===Uu.lineTerminatorsPattern)this.config.lineTerminatorsPattern=CB;else if(this.config.lineTerminatorCharacters===
|
|
297
|
+
Uu.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
|
|
298
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(n.safeMode&&n.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),Qe(e)?i={modes:{defaultMode:nn(e)},defaultMode:Bu}:(s=!1,i=nn(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",
|
|
299
|
+
()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(DB(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(RB(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},ke(i.modes,(a,u)=>{i.modes[u]=Sf(a,c=>si(c))});const o=ir(i.modes);if(ke(i.modes,(a,u)=>{this.TRACE_INIT(`Mode: <${u}> processing`,()=>{if(this.modes.push(u),
|
|
300
|
+
this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(aB(a,o))}),dt(this.lexerDefinitionErrors)){Gu(a);let c;this.TRACE_INIT("analyzeTokenTypes",()=>{c=oB(a,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:n.positionTracking,ensureOptimizations:n.ensureOptimizations,safeMode:n.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[u]=c.patternIdxToConfig,this.charCodeToPatternIdxToConfig[u]=
|
|
301
|
+
c.charCodeToPatternIdxToConfig,this.emptyGroups=Un({},this.emptyGroups,c.emptyGroups),this.hasCustom=c.hasCustom||this.hasCustom,this.canModeBeOptimized[u]=c.canBeOptimized}})}),this.defaultMode=i.defaultMode,!dt(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const u=ve(this.lexerDefinitionErrors,c=>c.message).join(`-----------------------
|
|
302
|
+
`);throw new Error(`Errors detected in definition of Lexer:
|
|
303
|
+
`+u)}ke(this.lexerDefinitionWarning,a=>{e$(a.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(a$?(this.chopInput=ks,this.match=this.matchWithTest):(this.updateLastIndex=zt,this.match=this.matchWithExec),s&&(this.handleModes=zt),this.trackStartLines===!1&&(this.computeNewColumn=ks),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=zt),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.
|
|
304
|
+
positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optim\
|
|
305
|
+
ization Warnings",()=>{const a=En(this.canModeBeOptimized,(u,c,l)=>(c===!1&&u.push(l),u),[]);if(n.ensureOptimizations&&!dt(a))throw Error(`Lexer Modes: < ${a.join(", ")} > cannot be optimized.
|
|
306
|
+
Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
|
|
307
|
+
Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{nB()}),this.TRACE_INIT("toFastProperties",()=>{n$(this)})})}tokenize(e,n=this.defaultMode){if(!dt(this.lexerDefinitionErrors)){const i=ve(this.lexerDefinitionErrors,s=>s.message).join(`-----------------------
|
|
308
|
+
`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer:
|
|
309
|
+
`+i)}return this.tokenizeInternal(e,n)}tokenizeInternal(e,n){let r,i,s,o,a,u,c,l,f,d,p,h,v,b,y;const E=e,R=E.length;let A=0,N=0;const K=this.hasCustom?0:Math.floor(e.length/10),J=new Array(K),se=[];let ie=this.trackStartLines?1:void 0,we=this.trackStartLines?1:void 0;const B=kB(this.emptyGroups),T=this.trackStartLines,D=this.config.lineTerminatorsPattern;let M=0,S=[],P=[];const O=[],Z=[];Object.freeze(Z);let H;function C(){return S}function ne(Se){const le=Wi(Se),$e=P[le];return $e===void 0?Z:$e}
|
|
310
|
+
const ye=Se=>{if(O.length===1&&Se.tokenType.PUSH_MODE===void 0){const le=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(Se);se.push({offset:Se.startOffset,line:Se.startLine,column:Se.startColumn,length:Se.image.length,message:le})}else{O.pop();const le=Bo(O);S=this.patternIdxToConfig[le],P=this.charCodeToPatternIdxToConfig[le],M=S.length;const $e=this.canModeBeOptimized[le]&&this.config.safeMode===!1;P&&$e?H=ne:H=C}};function Pe(Se){O.push(Se),P=this.charCodeToPatternIdxToConfig[Se],
|
|
311
|
+
S=this.patternIdxToConfig[Se],M=S.length,M=S.length;const le=this.canModeBeOptimized[Se]&&this.config.safeMode===!1;P&&le?H=ne:H=C}Pe.call(this,n);let F;const V=this.config.recoveryEnabled;for(;A<R;){u=null;const Se=E.charCodeAt(A),le=H(Se),$e=le.length;for(r=0;r<$e;r++){F=le[r];const xe=F.pattern;c=null;const de=F.short;if(de!==!1?Se===de&&(u=xe):F.isCustom===!0?(y=xe.exec(E,A,J,B),y!==null?(u=y[0],y.payload!==void 0&&(c=y.payload)):u=null):(this.updateLastIndex(xe,A),u=this.match(xe,e,A)),u!==
|
|
312
|
+
null){if(a=F.longerAlt,a!==void 0){const I=a.length;for(s=0;s<I;s++){const G=S[a[s]],pe=G.pattern;if(l=null,G.isCustom===!0?(y=pe.exec(E,A,J,B),y!==null?(o=y[0],y.payload!==void 0&&(l=y.payload)):o=null):(this.updateLastIndex(pe,A),o=this.match(pe,e,A)),o&&o.length>u.length){u=o,c=l,F=G;break}}}break}}if(u!==null){if(f=u.length,d=F.group,d!==void 0&&(p=F.tokenTypeIdx,h=this.createTokenInstance(u,A,p,F.tokenType,ie,we,f),this.handlePayload(h,c),d===!1?N=this.addToken(J,N,h):B[d].push(h)),e=this.chopInput(
|
|
313
|
+
e,f),A=A+f,we=this.computeNewColumn(we,f),T===!0&&F.canLineTerminator===!0){let xe=0,de,I;D.lastIndex=0;do de=D.test(u),de===!0&&(I=D.lastIndex-1,xe++);while(de===!0);xe!==0&&(ie=ie+xe,we=f-I,this.updateTokenEndLineColumnLocation(h,d,I,xe,ie,we,f))}this.handleModes(F,ye,Pe,h)}else{const xe=A,de=ie,I=we;let G=V===!1;for(;G===!1&&A<R;)for(e=this.chopInput(e,1),A++,i=0;i<M;i++){const pe=S[i],U=pe.pattern,fe=pe.short;if(fe!==!1?E.charCodeAt(A)===fe&&(G=!0):pe.isCustom===!0?G=U.exec(E,A,J,B)!==null:(this.
|
|
314
|
+
updateLastIndex(U,A),G=U.exec(e)!==null),G===!0)break}if(v=A-xe,we=this.computeNewColumn(we,v),b=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(E,xe,v,de,I),se.push({offset:xe,line:de,column:I,length:v,message:b}),V===!1)break}}return this.hasCustom||(J.length=N),{tokens:J,groups:B,errors:se}}handleModes(e,n,r,i){if(e.pop===!0){const s=e.push;n(i),s!==void 0&&r.call(this,s)}else e.push!==void 0&&r.call(this,e.push)}chopInput(e,n){return e.substring(n)}updateLastIndex(e,n){e.lastIndex=
|
|
315
|
+
n}updateTokenEndLineColumnLocation(e,n,r,i,s,o,a){let u,c;n!==void 0&&(u=r===a-1,c=u?-1:0,i===1&&u===!0||(e.endLine=s+c,e.endColumn=o-1+-c))}computeNewColumn(e,n){return e+n}createOffsetOnlyToken(e,n,r,i){return{image:e,startOffset:n,tokenTypeIdx:r,tokenType:i}}createStartOnlyToken(e,n,r,i,s,o){return{image:e,startOffset:n,startLine:s,startColumn:o,tokenTypeIdx:r,tokenType:i}}createFullToken(e,n,r,i,s,o,a){return{image:e,startOffset:n,endOffset:n+a-1,startLine:s,endLine:s,startColumn:o,endColumn:o+
|
|
316
|
+
a-1,tokenTypeIdx:r,tokenType:i}}addTokenUsingPush(e,n,r){return e.push(r),n}addTokenUsingMemberAccess(e,n,r){return e[n]=r,n++,n}handlePayloadNoCustom(e,n){}handlePayloadWithCustom(e,n){n!==null&&(e.payload=n)}matchWithTest(e,n,r){return e.test(n)===!0?n.substring(r,e.lastIndex):null}matchWithExec(e,n){const r=e.exec(n);return r!==null?r[0]:null}}Ln.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used \
|
|
317
|
+
to for example to completely ignore whitespace.",Ln.NA=/NOT_APPLICABLE/;function Uo(t){return v$(t)?t.LABEL:t.name}function v$(t){return xn(t.LABEL)&&t.LABEL!==""}const FB="parent",w$="categories",b$="label",E$="group",$$="push_mode",D$="pop_mode",R$="longer_alt",k$="line_breaks",T$="start_chars_hint";function C$(t){return MB(t)}function MB(t){const e=t.pattern,n={};if(n.name=t.name,si(e)||(n.PATTERN=e),Te(t,FB))throw`The parent property is no longer supported.
|
|
318
|
+
See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return Te(t,w$)&&(n.CATEGORIES=t[w$]),Gu([n]),Te(t,b$)&&(n.LABEL=t[b$]),Te(t,E$)&&(n.GROUP=t[E$]),Te(t,D$)&&(n.POP_MODE=t[D$]),Te(t,$$)&&(n.PUSH_MODE=t[$$]),Te(t,R$)&&(n.LONGER_ALT=t[R$]),Te(t,k$)&&(n.LINE_BREAKS=t[k$]),Te(t,T$)&&(n.START_CHARS_HINT=t[T$]),n}const zi=C$({name:"EOF",pattern:Ln.NA});Gu([zi]);function Bg(t,e,n,r,i,s,o,a){return{image:e,startOffset:n,endOffset:r,startLine:i,endLine:s,startColumn:o,
|
|
319
|
+
endColumn:a,tokenTypeIdx:t.tokenTypeIdx,tokenType:t}}function A$(t,e){return qu(t,e)}const Wo={buildMismatchTokenMessage({expected:t,actual:e,previous:n,ruleName:r}){return`Expecting ${v$(t)?`--> ${Uo(t)} <--`:`token of type --> ${t.name} <--`} but found --> '${e.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:t,ruleName:e}){return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,previous:n,customUserDescription:r,ruleName:i}){
|
|
320
|
+
const s="Expecting: ",a=`
|
|
321
|
+
but found: '`+vr(e).image+"'";if(r)return s+r+a;{const u=En(t,(d,p)=>d.concat(p),[]),c=ve(u,d=>`[${ve(d,p=>Uo(p)).join(", ")}]`),f=`one of these possible Token sequences:
|
|
322
|
+
${ve(c,(d,p)=>` ${p+1}. ${d}`).join(`
|
|
323
|
+
`)}`;return s+f+a}},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:n,ruleName:r}){const i="Expecting: ",o=`
|
|
324
|
+
but found: '`+vr(e).image+"'";if(n)return i+n+o;{const u=`expecting at least one iteration which starts with one of these possible Token sequences::
|
|
325
|
+
<${ve(t,c=>`[${ve(c,l=>Uo(l)).join(",")}]`).join(" ,")}>`;return i+u+o}}};Object.freeze(Wo);const BB={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<-
|
|
326
|
+
inside top level rule: ->`+t.name+"<-"}},Ps={buildDuplicateFoundError(t,e){function n(l){return l instanceof bt?l.terminalType.name:l instanceof $n?l.nonTerminalName:""}const r=t.name,i=vr(e),s=i.idx,o=jr(i),a=n(i),u=s>0;let c=`->${o}${u?s:""}<- ${a?`with argument: ->${a}<-`:""}
|
|
327
|
+
appears more than once (${e.length} times) in the top level rule: ->${r}<-.
|
|
328
|
+
For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES
|
|
329
|
+
`;return c=c.replace(/[ \t]+/g," "),c=c.replace(/\s\s+/g,`
|
|
330
|
+
`),c},buildNamespaceConflictError(t){return`Namespace conflict found in grammar.
|
|
331
|
+
The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${t.name}>.
|
|
332
|
+
To resolve this make sure each Terminal and Non-Terminal names are unique
|
|
333
|
+
This is easy to accomplish by using the convention that Terminal names start with an uppercase letter
|
|
334
|
+
and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(t){const e=ve(t.prefixPath,i=>Uo(i)).join(", "),n=t.alternation.idx===0?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix
|
|
335
|
+
in <OR${n}> inside <${t.topLevelRule.name}> Rule,
|
|
336
|
+
<${e}> may appears as a prefix path in all these alternatives.
|
|
337
|
+
See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX
|
|
338
|
+
For Further details.`},buildAlternationAmbiguityError(t){const e=ve(t.prefixPath,i=>Uo(i)).join(", "),n=t.alternation.idx===0?"":t.alternation.idx;let r=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in <OR${n}> inside <${t.topLevelRule.name}> Rule,
|
|
339
|
+
<${e}> may appears as a prefix path in all these alternatives.
|
|
340
|
+
`;return r=r+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
|
|
341
|
+
For Further details.`,r},buildEmptyRepetitionError(t){let e=jr(t.repetition);return t.repetition.idx!==0&&(e+=t.repetition.idx),`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens.
|
|
342
|
+
This could lead to an infinite loop.`},buildTokenNameError(t){return"deprecated"},buildEmptyAlternationError(t){return`Ambiguous empty alternative: <${t.emptyChoiceIdx+1}> in <OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.
|
|
343
|
+
Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(t){return`An Alternation cannot have more than 256 alternatives:
|
|
344
|
+
<OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.
|
|
345
|
+
has ${t.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(t){const e=t.topLevelRule.name,n=ve(t.leftRecursionPath,s=>s.name),r=`${e} --> ${n.concat([e]).join(" --> ")}`;return`Left Recursion found in grammar.
|
|
346
|
+
rule: <${e}> can be invoked from itself (directly or indirectly)
|
|
347
|
+
without consuming any Tokens. The grammar path that causes this is:
|
|
348
|
+
${r}
|
|
349
|
+
To fix this refactor your grammar to remove the left recursion.
|
|
350
|
+
see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(t){return"deprecated"},buildDuplicateRuleNameError(t){let e;return t.topLevelRule instanceof qo?e=t.topLevelRule.name:e=t.topLevelRule,`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${t.grammarName}<-`}};function jB(t,e){const n=new qB(t,e);return n.resolveRefs(),n.errors}class qB extends Go{constructor(e,n){super(),this.nameToTopRule=e,this.errMsgProvider=n,this.errors=[]}resolveRefs(){
|
|
351
|
+
ke(Ht(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){const n=this.nameToTopRule[e.nonTerminalName];if(n)e.referencedRule=n;else{const r=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:r,type:Dn.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}}class GB extends xf{constructor(e,n){super(),this.topProd=e,this.path=n,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=
|
|
352
|
+
0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=nn(this.path.ruleStack).reverse(),this.occurrenceStack=nn(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,n=[]){this.found||super.walk(e,n)}walkProdRef(e,n,r){if(e.referencedRule.name===
|
|
353
|
+
this.nextProductionName&&e.idx===this.nextProductionOccurrence){const i=n.concat(r);this.updateExpectedNext(),this.walk(e.referencedRule,i)}}updateExpectedNext(){dt(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}}class UB extends GB{constructor(e,n){super(e,n),this.path=n,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=
|
|
354
|
+
this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,n,r){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){const i=n.concat(r),s=new Nn({definition:i});this.possibleTokTypes=Mu(s),this.found=!0}}}class jf extends xf{constructor(e,n){super(),this.topRule=e,this.occurrence=n,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}}
|
|
355
|
+
class WB extends jf{walkMany(e,n,r){if(e.idx===this.occurrence){const i=vr(n.concat(r));this.result.isEndOfRule=i===void 0,i instanceof bt&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkMany(e,n,r)}}class S$ extends jf{walkManySep(e,n,r){if(e.idx===this.occurrence){const i=vr(n.concat(r));this.result.isEndOfRule=i===void 0,i instanceof bt&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkManySep(e,n,r)}}class zB extends jf{walkAtLeastOne(e,n,r){
|
|
356
|
+
if(e.idx===this.occurrence){const i=vr(n.concat(r));this.result.isEndOfRule=i===void 0,i instanceof bt&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOne(e,n,r)}}class _$ extends jf{walkAtLeastOneSep(e,n,r){if(e.idx===this.occurrence){const i=vr(n.concat(r));this.result.isEndOfRule=i===void 0,i instanceof bt&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOneSep(e,n,r)}}function jg(t,e,n=[]){n=nn(n);let r=[],i=0;function s(a){
|
|
357
|
+
return a.concat(rn(t,i+1))}function o(a){const u=jg(s(a),e,n);return r.concat(u)}for(;n.length<e&&i<t.length;){const a=t[i];if(a instanceof Nn)return o(a.definition);if(a instanceof $n)return o(a.definition);if(a instanceof sn)r=o(a.definition);else if(a instanceof Hn){const u=a.definition.concat([new St({definition:a.definition})]);return o(u)}else if(a instanceof Vn){const u=[new Nn({definition:a.definition}),new St({definition:[new bt({terminalType:a.separator})].concat(a.definition)})];return o(
|
|
358
|
+
u)}else if(a instanceof In){const u=a.definition.concat([new St({definition:[new bt({terminalType:a.separator})].concat(a.definition)})]);r=o(u)}else if(a instanceof St){const u=a.definition.concat([new St({definition:a.definition})]);r=o(u)}else{if(a instanceof On)return ke(a.definition,u=>{dt(u.definition)===!1&&(r=o(u.definition))}),r;if(a instanceof bt)n.push(a.terminalType);else throw Error("non exhaustive match")}i++}return r.push({partialPath:n,suffixDef:rn(t,i)}),r}function P$(t,e,n,r){const i="\
|
|
359
|
+
EXIT_NONE_TERMINAL",s=[i],o="EXIT_ALTERNATIVE";let a=!1;const u=e.length,c=u-r-1,l=[],f=[];for(f.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!dt(f);){const d=f.pop();if(d===o){a&&Bo(f).idx<=c&&f.pop();continue}const p=d.def,h=d.idx,v=d.ruleStack,b=d.occurrenceStack;if(dt(p))continue;const y=p[0];if(y===i){const E={idx:h,def:rn(p),ruleStack:Fu(v),occurrenceStack:Fu(b)};f.push(E)}else if(y instanceof bt)if(h<u-1){const E=h+1,R=e[E];if(n(R,y.terminalType)){const A={idx:E,def:rn(p),ruleStack:v,
|
|
360
|
+
occurrenceStack:b};f.push(A)}}else if(h===u-1)l.push({nextTokenType:y.terminalType,nextTokenOccurrence:y.idx,ruleStack:v,occurrenceStack:b}),a=!0;else throw Error("non exhaustive match");else if(y instanceof $n){const E=nn(v);E.push(y.nonTerminalName);const R=nn(b);R.push(y.idx);const A={idx:h,def:y.definition.concat(s,rn(p)),ruleStack:E,occurrenceStack:R};f.push(A)}else if(y instanceof sn){const E={idx:h,def:rn(p),ruleStack:v,occurrenceStack:b};f.push(E),f.push(o);const R={idx:h,def:y.definition.
|
|
361
|
+
concat(rn(p)),ruleStack:v,occurrenceStack:b};f.push(R)}else if(y instanceof Hn){const E=new St({definition:y.definition,idx:y.idx}),R=y.definition.concat([E],rn(p)),A={idx:h,def:R,ruleStack:v,occurrenceStack:b};f.push(A)}else if(y instanceof Vn){const E=new bt({terminalType:y.separator}),R=new St({definition:[E].concat(y.definition),idx:y.idx}),A=y.definition.concat([R],rn(p)),N={idx:h,def:A,ruleStack:v,occurrenceStack:b};f.push(N)}else if(y instanceof In){const E={idx:h,def:rn(p),ruleStack:v,occurrenceStack:b};
|
|
362
|
+
f.push(E),f.push(o);const R=new bt({terminalType:y.separator}),A=new St({definition:[R].concat(y.definition),idx:y.idx}),N=y.definition.concat([A],rn(p)),K={idx:h,def:N,ruleStack:v,occurrenceStack:b};f.push(K)}else if(y instanceof St){const E={idx:h,def:rn(p),ruleStack:v,occurrenceStack:b};f.push(E),f.push(o);const R=new St({definition:y.definition,idx:y.idx}),A=y.definition.concat([R],rn(p)),N={idx:h,def:A,ruleStack:v,occurrenceStack:b};f.push(N)}else if(y instanceof On)for(let E=y.definition.length-
|
|
363
|
+
1;E>=0;E--){const R=y.definition[E],A={idx:h,def:R.definition.concat(rn(p)),ruleStack:v,occurrenceStack:b};f.push(A),f.push(o)}else if(y instanceof Nn)f.push({idx:h,def:y.definition.concat(rn(p)),ruleStack:v,occurrenceStack:b});else if(y instanceof qo)f.push(HB(y,h,v,b));else throw Error("non exhaustive match")}return l}function HB(t,e,n,r){const i=nn(n);i.push(t.name);const s=nn(r);return s.push(1),{idx:e,def:t.definition,ruleStack:i,occurrenceStack:s}}var kt;(function(t){t[t.OPTION=0]="OPTION",
|
|
364
|
+
t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION"})(kt||(kt={}));function qg(t){if(t instanceof sn||t==="Option")return kt.OPTION;if(t instanceof St||t==="Repetition")return kt.REPETITION;if(t instanceof Hn||t==="RepetitionMandatory")return kt.REPETITION_MANDATORY;if(t instanceof Vn||t==="Rep\
|
|
365
|
+
etitionMandatoryWithSeparator")return kt.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof In||t==="RepetitionWithSeparator")return kt.REPETITION_WITH_SEPARATOR;if(t instanceof On||t==="Alternation")return kt.ALTERNATION;throw Error("non exhaustive match")}function x$(t){const{occurrence:e,rule:n,prodType:r,maxLookahead:i}=t,s=qg(r);return s===kt.ALTERNATION?qf(e,n,i):Gf(e,n,s,i)}function VB(t,e,n,r,i,s){const o=qf(t,e,n),a=L$(o)?Bf:qu;return s(o,r,a,i)}function KB(t,e,n,r,i,s){const o=Gf(t,e,
|
|
366
|
+
i,n),a=L$(o)?Bf:qu;return s(o[0],a,r)}function XB(t,e,n,r){const i=t.length,s=yr(t,o=>yr(o,a=>a.length===1));if(e)return function(o){const a=ve(o,u=>u.GATE);for(let u=0;u<i;u++){const c=t[u],l=c.length,f=a[u];if(!(f!==void 0&&f.call(this)===!1))e:for(let d=0;d<l;d++){const p=c[d],h=p.length;for(let v=0;v<h;v++){const b=this.LA(v+1);if(n(b,p[v])===!1)continue e}return u}}};if(s&&!r){const o=ve(t,u=>sr(u)),a=En(o,(u,c,l)=>(ke(c,f=>{Te(u,f.tokenTypeIdx)||(u[f.tokenTypeIdx]=l),ke(f.categoryMatches,d=>{
|
|
367
|
+
Te(u,d)||(u[d]=l)})}),u),{});return function(){const u=this.LA(1);return a[u.tokenTypeIdx]}}else return function(){for(let o=0;o<i;o++){const a=t[o],u=a.length;e:for(let c=0;c<u;c++){const l=a[c],f=l.length;for(let d=0;d<f;d++){const p=this.LA(d+1);if(n(p,l[d])===!1)continue e}return o}}}}function YB(t,e,n){const r=yr(t,s=>s.length===1),i=t.length;if(r&&!n){const s=sr(t);if(s.length===1&&dt(s[0].categoryMatches)){const a=s[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===a}}else{
|
|
368
|
+
const o=En(s,(a,u,c)=>(a[u.tokenTypeIdx]=!0,ke(u.categoryMatches,l=>{a[l]=!0}),a),[]);return function(){const a=this.LA(1);return o[a.tokenTypeIdx]===!0}}}else return function(){e:for(let s=0;s<i;s++){const o=t[s],a=o.length;for(let u=0;u<a;u++){const c=this.LA(u+1);if(e(c,o[u])===!1)continue e}return!0}return!1}}class JB extends xf{constructor(e,n,r){super(),this.topProd=e,this.targetOccurrence=n,this.targetProdType=r}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,n,r,i){
|
|
369
|
+
return e.idx===this.targetOccurrence&&this.targetProdType===n?(this.restDef=r.concat(i),!0):!1}walkOption(e,n,r){this.checkIsTarget(e,kt.OPTION,n,r)||super.walkOption(e,n,r)}walkAtLeastOne(e,n,r){this.checkIsTarget(e,kt.REPETITION_MANDATORY,n,r)||super.walkOption(e,n,r)}walkAtLeastOneSep(e,n,r){this.checkIsTarget(e,kt.REPETITION_MANDATORY_WITH_SEPARATOR,n,r)||super.walkOption(e,n,r)}walkMany(e,n,r){this.checkIsTarget(e,kt.REPETITION,n,r)||super.walkOption(e,n,r)}walkManySep(e,n,r){this.checkIsTarget(
|
|
370
|
+
e,kt.REPETITION_WITH_SEPARATOR,n,r)||super.walkOption(e,n,r)}}class N$ extends Go{constructor(e,n,r){super(),this.targetOccurrence=e,this.targetProdType=n,this.targetRef=r,this.result=[]}checkIsTarget(e,n){e.idx===this.targetOccurrence&&this.targetProdType===n&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,kt.OPTION)}visitRepetition(e){this.checkIsTarget(e,kt.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,kt.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){
|
|
371
|
+
this.checkIsTarget(e,kt.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,kt.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,kt.ALTERNATION)}}function I$(t){const e=new Array(t);for(let n=0;n<t;n++)e[n]=[];return e}function Gg(t){let e=[""];for(let n=0;n<t.length;n++){const r=t[n],i=[];for(let s=0;s<e.length;s++){const o=e[s];i.push(o+"_"+r.tokenTypeIdx);for(let a=0;a<r.categoryMatches.length;a++){const u="_"+r.categoryMatches[a];i.push(
|
|
372
|
+
o+u)}}e=i}return e}function QB(t,e,n){for(let r=0;r<t.length;r++){if(r===n)continue;const i=t[r];for(let s=0;s<e.length;s++){const o=e[s];if(i[o]===!0)return!1}}return!0}function O$(t,e){const n=ve(t,o=>jg([o],1)),r=I$(n.length),i=ve(n,o=>{const a={};return ke(o,u=>{const c=Gg(u.partialPath);ke(c,l=>{a[l]=!0})}),a});let s=n;for(let o=1;o<=e;o++){const a=s;s=I$(a.length);for(let u=0;u<a.length;u++){const c=a[u];for(let l=0;l<c.length;l++){const f=c[l].partialPath,d=c[l].suffixDef,p=Gg(f);if(QB(i,
|
|
373
|
+
p,u)||dt(d)||f.length===e){const v=r[u];if(Ug(v,f)===!1){v.push(f);for(let b=0;b<p.length;b++){const y=p[b];i[u][y]=!0}}}else{const v=jg(d,o+1,f);s[u]=s[u].concat(v),ke(v,b=>{const y=Gg(b.partialPath);ke(y,E=>{i[u][E]=!0})})}}}}return r}function qf(t,e,n,r){const i=new N$(t,kt.ALTERNATION,r);return e.accept(i),O$(i.result,n)}function Gf(t,e,n,r){const i=new N$(t,n);e.accept(i);const s=i.result,a=new JB(e,t,n).startWalking(),u=new Nn({definition:s}),c=new Nn({definition:a});return O$([u,c],r)}function Ug(t,e){
|
|
374
|
+
e:for(let n=0;n<t.length;n++){const r=t[n];if(r.length===e.length){for(let i=0;i<r.length;i++){const s=e[i],o=r[i];if((s===o||o.categoryMatchesMap[s.tokenTypeIdx]!==void 0)===!1)continue e}return!0}}return!1}function ZB(t,e){return t.length<e.length&&yr(t,(n,r)=>{const i=e[r];return n===i||i.categoryMatchesMap[n.tokenTypeIdx]})}function L$(t){return yr(t,e=>yr(e,n=>yr(n,r=>dt(r.categoryMatches))))}function ej(t){const e=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.
|
|
375
|
+
grammarName});return ve(e,n=>Object.assign({type:Dn.CUSTOM_LOOKAHEAD_VALIDATION},n))}function tj(t,e,n,r){const i=zn(t,u=>nj(u,n)),s=hj(t,e,n),o=zn(t,u=>lj(u,n)),a=zn(t,u=>sj(u,t,r,n));return i.concat(s,o,a)}function nj(t,e){const n=new ij;t.accept(n);const r=n.allProductions,i=v2(r,rj),s=wr(i,a=>a.length>1);return ve(Ht(s),a=>{const u=vr(a),c=e.buildDuplicateFoundError(t,a),l=jr(u),f={message:c,type:Dn.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:l,occurrence:u.idx},d=F$(u);return d&&(f.parameter=
|
|
376
|
+
d),f})}function rj(t){return`${jr(t)}_#_${t.idx}_#_${F$(t)}`}function F$(t){return t instanceof bt?t.terminalType.name:t instanceof $n?t.nonTerminalName:""}class ij extends Go{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.
|
|
377
|
+
push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}}function sj(t,e,n,r){const i=[];if(En(e,(o,a)=>a.name===t.name?o+1:o,0)>1){const o=r.buildDuplicateRuleNameError({topLevelRule:t,grammarName:n});i.push({message:o,type:Dn.DUPLICATE_RULE_NAME,ruleName:t.name})}return i}function oj(t,e,n){const r=[];let i;return bn(e,t)||(i=`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${n}\
|
|
378
|
+
<-as it is not defined in any of the super grammars `,r.push({message:i,type:Dn.INVALID_RULE_OVERRIDE,ruleName:t})),r}function M$(t,e,n,r=[]){const i=[],s=Uf(e.definition);if(dt(s))return[];{const o=t.name;bn(s,t)&&i.push({message:n.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:r}),type:Dn.LEFT_RECURSION,ruleName:o});const u=Af(s,r.concat([t])),c=zn(u,l=>{const f=nn(r);return f.push(l),M$(t,l,n,f)});return i.concat(c)}}function Uf(t){let e=[];if(dt(t))return e;const n=vr(t);if(n instanceof
|
|
379
|
+
$n)e.push(n.referencedRule);else if(n instanceof Nn||n instanceof sn||n instanceof Hn||n instanceof Vn||n instanceof In||n instanceof St)e=e.concat(Uf(n.definition));else if(n instanceof On)e=sr(ve(n.definition,s=>Uf(s.definition)));else if(!(n instanceof bt))throw Error("non exhaustive match");const r=Pf(n),i=t.length>1;if(r&&i){const s=rn(t);return e.concat(Uf(s))}else return e}class Wg extends Go{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(
|
|
380
|
+
e)}}function aj(t,e){const n=new Wg;t.accept(n);const r=n.alternations;return zn(r,s=>{const o=Fu(s.definition);return zn(o,(a,u)=>{const c=P$([a],[],qu,1);return dt(c)?[{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:s,emptyChoiceIdx:u}),type:Dn.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:s.idx,alternative:u+1}]:[]})})}function uj(t,e,n){const r=new Wg;t.accept(r);let i=r.alternations;return i=Sf(i,o=>o.ignoreAmbiguities===!0),zn(i,o=>{const a=o.idx,u=o.maxLookahead||e,c=qf(
|
|
381
|
+
a,t,u,o),l=fj(c,o,t,n),f=pj(c,o,t,n);return l.concat(f)})}class cj extends Go{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}}function lj(t,e){const n=new Wg;t.accept(n);const r=n.alternations;return zn(r,s=>s.definition.length>255?[{message:e.buildTooManyAlternativesError(
|
|
382
|
+
{topLevelRule:t,alternation:s}),type:Dn.TOO_MANY_ALTS,ruleName:t.name,occurrence:s.idx}]:[])}function dj(t,e,n){const r=[];return ke(t,i=>{const s=new cj;i.accept(s);const o=s.allProductions;ke(o,a=>{const u=qg(a),c=a.maxLookahead||e,l=a.idx,d=Gf(l,i,u,c)[0];if(dt(sr(d))){const p=n.buildEmptyRepetitionError({topLevelRule:i,repetition:a});r.push({message:p,type:Dn.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),r}function fj(t,e,n,r){const i=[],s=En(t,(a,u,c)=>(e.definition[c].ignoreAmbiguities===!0||
|
|
383
|
+
ke(u,l=>{const f=[c];ke(t,(d,p)=>{c!==p&&Ug(d,l)&&e.definition[p].ignoreAmbiguities!==!0&&f.push(p)}),f.length>1&&!Ug(i,l)&&(i.push(l),a.push({alts:f,path:l}))}),a),[]);return ve(s,a=>{const u=ve(a.alts,l=>l+1);return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:e,ambiguityIndices:u,prefixPath:a.path}),type:Dn.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:e.idx,alternatives:a.alts}})}function pj(t,e,n,r){const i=En(t,(o,a,u)=>{const c=ve(a,l=>({idx:u,path:l}));return o.concat(
|
|
384
|
+
c)},[]);return Lu(zn(i,o=>{if(e.definition[o.idx].ignoreAmbiguities===!0)return[];const u=o.idx,c=o.path,l=Wn(i,d=>e.definition[d.idx].ignoreAmbiguities!==!0&&d.idx<u&&ZB(d.path,c));return ve(l,d=>{const p=[d.idx+1,u+1],h=e.idx===0?"":e.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:e,ambiguityIndices:p,prefixPath:d.path}),type:Dn.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:h,alternatives:p}})}))}function hj(t,e,n){const r=[],i=ve(e,s=>s.name);return ke(
|
|
385
|
+
t,s=>{const o=s.name;if(bn(i,o)){const a=n.buildNamespaceConflictError(s);r.push({message:a,type:Dn.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:o})}}),r}function mj(t){const e=Pg(t,{errMsgProvider:BB}),n={};return ke(t.rules,r=>{n[r.name]=r}),jB(n,e.errMsgProvider)}function gj(t){return t=Pg(t,{errMsgProvider:Ps}),tj(t.rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}const B$="MismatchedTokenException",j$="NoViableAltException",q$="EarlyExitException",G$="NotAllInputParsedException",U$=[B$,j$,q$,
|
|
386
|
+
G$];Object.freeze(U$);function Wf(t){return bn(U$,t.name)}class zf extends Error{constructor(e,n){super(e),this.token=n,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}class W$ extends zf{constructor(e,n,r){super(e,n),this.previousToken=r,this.name=B$}}class yj extends zf{constructor(e,n,r){super(e,n),this.previousToken=r,this.name=j$}}class vj extends zf{constructor(e,n){super(e,n),this.name=G$}}class wj extends zf{constructor(e,n,r){
|
|
387
|
+
super(e,n),this.previousToken=r,this.name=q$}}const zg={},z$="InRuleRecoveryException";class bj extends Error{constructor(e){super(e),this.name=z$}}class Ej{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Te(e,"recoveryEnabled")?e.recoveryEnabled:oi.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=$j)}getTokenToInsert(e){const n=Bg(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return n.isInsertedInRecovery=!0,n}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){
|
|
388
|
+
return!0}tryInRepetitionRecovery(e,n,r,i){const s=this.findReSyncTokenType(),o=this.exportLexerState(),a=[];let u=!1;const c=this.LA(1);let l=this.LA(1);const f=()=>{const d=this.LA(0),p=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:c,previous:d,ruleName:this.getCurrRuleFullName()}),h=new W$(p,c,this.LA(0));h.resyncedTokens=Fu(a),this.SAVE_ERROR(h)};for(;!u;)if(this.tokenMatcher(l,i)){f();return}else if(r.call(this)){f(),e.apply(this,n);return}else this.tokenMatcher(l,s)?
|
|
389
|
+
u=!0:(l=this.SKIP_TOKEN(),this.addToResyncTokens(l,a));this.importLexerState(o)}shouldInRepetitionRecoveryBeTried(e,n,r){return!(r===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,n)))}getFollowsForInRuleRecovery(e,n){const r=this.getCurrentGrammarPath(e,n);return this.getNextPossibleTokenTypes(r)}tryInRuleRecovery(e,n){if(this.canRecoverWithSingleTokenInsertion(e,n))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(
|
|
390
|
+
e)){const r=this.SKIP_TOKEN();return this.consumeToken(),r}throw new bj("sad sad panda")}canPerformInRuleRecovery(e,n){return this.canRecoverWithSingleTokenInsertion(e,n)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,n){if(!this.canTokenTypeBeInsertedInRecovery(e)||dt(n))return!1;const r=this.LA(1);return jo(n,s=>this.tokenMatcher(r,s))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){
|
|
391
|
+
const n=this.getCurrFollowKey(),r=this.getFollowSetFromFollowKey(n);return bn(r,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let n=this.LA(1),r=2;for(;;){const i=jo(e,s=>A$(n,s));if(i!==void 0)return i;n=this.LA(r),r++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return zg;const e=this.getLastExplicitRuleShortName(),n=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:n,inRule:this.
|
|
392
|
+
shortRuleNameToFullName(r)}}buildFullFollowKeyStack(){const e=this.RULE_STACK,n=this.RULE_OCCURRENCE_STACK;return ve(e,(r,i)=>i===0?zg:{ruleName:this.shortRuleNameToFullName(r),idxInCallingRule:n[i],inRule:this.shortRuleNameToFullName(e[i-1])})}flattenFollowSet(){const e=ve(this.buildFullFollowKeyStack(),n=>this.getFollowSetFromFollowKey(n));return sr(e)}getFollowSetFromFollowKey(e){if(e===zg)return[zi];const n=e.ruleName+e.idxInCallingRule+i$+e.inRule;return this.resyncFollows[n]}addToResyncTokens(e,n){
|
|
393
|
+
return this.tokenMatcher(e,zi)||n.push(e),n}reSyncTo(e){const n=[];let r=this.LA(1);for(;this.tokenMatcher(r,e)===!1;)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,n);return Fu(n)}attemptInRepetitionRecovery(e,n,r,i,s,o,a){}getCurrentGrammarPath(e,n){const r=this.getHumanReadableRuleStack(),i=nn(this.RULE_OCCURRENCE_STACK);return{ruleStack:r,occurrenceStack:i,lastTok:e,lastTokOccurrence:n}}getHumanReadableRuleStack(){return ve(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}}function $j(t,e,n,r,i,s,o){
|
|
394
|
+
const a=this.getKeyForAutomaticLookahead(r,i);let u=this.firstAfterRepMap[a];if(u===void 0){const d=this.getCurrRuleFullName(),p=this.getGAstProductions()[d];u=new s(p,i).startWalking(),this.firstAfterRepMap[a]=u}let c=u.token,l=u.occurrence;const f=u.isEndOfRule;this.RULE_STACK.length===1&&f&&c===void 0&&(c=zi,l=1),!(c===void 0||l===void 0)&&this.shouldInRepetitionRecoveryBeTried(c,l,o)&&this.tryInRepetitionRecovery(t,e,n,c)}const Dj=4,Hi=8,H$=1<<Hi,V$=2<<Hi,Hg=3<<Hi,Vg=4<<Hi,Kg=5<<Hi,Hf=6<<Hi;
|
|
395
|
+
function Xg(t,e,n){return n|e|t}class Yg{constructor(e){var n;this.maxLookahead=(n=e?.maxLookahead)!==null&&n!==void 0?n:oi.maxLookahead}validate(e){const n=this.validateNoLeftRecursion(e.rules);if(dt(n)){const r=this.validateEmptyOrAlternatives(e.rules),i=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),s=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...n,...r,...i,...s]}return n}validateNoLeftRecursion(e){return zn(e,n=>M$(n,n,Ps))}validateEmptyOrAlternatives(e){
|
|
396
|
+
return zn(e,n=>aj(n,Ps))}validateAmbiguousAlternationAlternatives(e,n){return zn(e,r=>uj(r,n,Ps))}validateSomeNonEmptyLookaheadPath(e,n){return dj(e,n,Ps)}buildLookaheadForAlternation(e){return VB(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,XB)}buildLookaheadForOptional(e){return KB(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,qg(e.prodType),YB)}}class Rj{initLooksAhead(e){this.dynamicTokensEnabled=Te(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:
|
|
397
|
+
oi.dynamicTokensEnabled,this.maxLookahead=Te(e,"maxLookahead")?e.maxLookahead:oi.maxLookahead,this.lookaheadStrategy=Te(e,"lookaheadStrategy")?e.lookaheadStrategy:new Yg({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){ke(e,n=>{this.TRACE_INIT(`${n.name} Rule Lookahead`,()=>{const{alternation:r,repetition:i,option:s,repetitionMandatory:o,repetitionMandatoryWithSeparator:a,repetitionWithSeparator:u}=Tj(n);ke(r,c=>{const l=c.idx===0?"":c.idx;this.TRACE_INIT(
|
|
398
|
+
`${jr(c)}${l}`,()=>{const f=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:c.idx,rule:n,maxLookahead:c.maxLookahead||this.maxLookahead,hasPredicates:c.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),d=Xg(this.fullRuleNameToShort[n.name],H$,c.idx);this.setLaFuncCache(d,f)})}),ke(i,c=>{this.computeLookaheadFunc(n,c.idx,Hg,"Repetition",c.maxLookahead,jr(c))}),ke(s,c=>{this.computeLookaheadFunc(n,c.idx,V$,"Option",c.maxLookahead,jr(c))}),ke(o,c=>{this.computeLookaheadFunc(
|
|
399
|
+
n,c.idx,Vg,"RepetitionMandatory",c.maxLookahead,jr(c))}),ke(a,c=>{this.computeLookaheadFunc(n,c.idx,Hf,"RepetitionMandatoryWithSeparator",c.maxLookahead,jr(c))}),ke(u,c=>{this.computeLookaheadFunc(n,c.idx,Kg,"RepetitionWithSeparator",c.maxLookahead,jr(c))})})})}computeLookaheadFunc(e,n,r,i,s,o){this.TRACE_INIT(`${o}${n===0?"":n}`,()=>{const a=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:n,rule:e,maxLookahead:s||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,
|
|
400
|
+
prodType:i}),u=Xg(this.fullRuleNameToShort[e.name],r,n);this.setLaFuncCache(u,a)})}getKeyForAutomaticLookahead(e,n){const r=this.getLastExplicitRuleShortName();return Xg(r,e,n)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,n){this.lookAheadFuncsCache.set(e,n)}}class kj extends Go{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.
|
|
401
|
+
dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){
|
|
402
|
+
this.dslMethods.alternation.push(e)}}const Vf=new kj;function Tj(t){Vf.reset(),t.accept(Vf);const e=Vf.dslMethods;return Vf.reset(),e}function K$(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset)}function X$(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.startColumn=e.startColumn,t.startLine=e.startLine,t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine):t.endOffset<e.endOffset&&
|
|
403
|
+
(t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine)}function Cj(t,e,n){t.children[n]===void 0?t.children[n]=[e]:t.children[n].push(e)}function Aj(t,e,n){t.children[e]===void 0?t.children[e]=[n]:t.children[e].push(n)}const Sj="name";function Y$(t,e){Object.defineProperty(t,Sj,{enumerable:!1,configurable:!0,writable:!1,value:e})}function _j(t,e){const n=ir(t),r=n.length;for(let i=0;i<r;i++){const s=n[i],o=t[s],a=o.length;for(let u=0;u<a;u++){const c=o[u];c.tokenTypeIdx===void 0&&
|
|
404
|
+
this[c.name](c.children,e)}}}function Pj(t,e){const n=function(){};Y$(n,t+"BaseSemantics");const r={visit:function(i,s){if(Qe(i)&&(i=i[0]),!si(i))return this[i.name](i.children,s)},validateVisitor:function(){const i=Nj(this,e);if(!dt(i)){const s=ve(i,o=>o.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
|
|
405
|
+
${s.join(`
|
|
406
|
+
|
|
407
|
+
`).replace(/\n/g,`
|
|
408
|
+
`)}`)}}};return n.prototype=r,n.prototype.constructor=n,n._RULE_NAMES=e,n}function xj(t,e,n){const r=function(){};Y$(r,t+"BaseSemanticsWithDefaults");const i=Object.create(n.prototype);return ke(e,s=>{i[s]=_j}),r.prototype=i,r.prototype.constructor=r,r}var Jg;(function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"})(Jg||(Jg={}));function Nj(t,e){return Ij(t,e)}function Ij(t,e){const n=Wn(e,i=>ti(t[i])===!1),r=ve(n,i=>({msg:`Missing visitor method: <${i}> o\
|
|
409
|
+
n ${t.constructor.name} CST Visitor.`,type:Jg.MISSING_METHOD,methodName:i}));return Lu(r)}class Oj{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=Te(e,"nodeLocationTracking")?e.nodeLocationTracking:oi.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=zt,this.cstFinallyStateUpdate=zt,this.cstPostTerminal=zt,this.cstPostNonTerminal=zt,this.cstPostRule=zt;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=
|
|
410
|
+
X$,this.setNodeLocationFromNode=X$,this.cstPostRule=zt,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=zt,this.setNodeLocationFromNode=zt,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=K$,this.setNodeLocationFromNode=K$,this.cstPostRule=zt,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):
|
|
411
|
+
(this.setNodeLocationFromToken=zt,this.setNodeLocationFromNode=zt,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=zt,this.setNodeLocationFromNode=zt,this.cstPostRule=zt,this.setInitialNodeLocation=zt;else throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,
|
|
412
|
+
endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){const n=this.LA(1);e.location={startOffset:n.startOffset,startLine:n.startLine,startColumn:n.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){const n={name:e,children:Object.
|
|
413
|
+
create(null)};this.setInitialNodeLocation(n),this.CST_STACK.push(n)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){const n=this.LA(0),r=e.location;r.startOffset<=n.startOffset?(r.endOffset=n.endOffset,r.endLine=n.endLine,r.endColumn=n.endColumn):(r.startOffset=NaN,r.startLine=NaN,r.startColumn=NaN)}cstPostRuleOnlyOffset(e){const n=this.LA(0),r=e.location;r.startOffset<=n.startOffset?r.endOffset=n.endOffset:r.startOffset=NaN}cstPostTerminal(e,n){const r=this.CST_STACK[this.CST_STACK.
|
|
414
|
+
length-1];Cj(r,n,e),this.setNodeLocationFromToken(r.location,n)}cstPostNonTerminal(e,n){const r=this.CST_STACK[this.CST_STACK.length-1];Aj(r,n,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){if(si(this.baseCstVisitorConstructor)){const e=Pj(this.className,ir(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(si(this.baseCstVisitorWithDefaultsConstructor)){const e=xj(
|
|
415
|
+
this.className,ir(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){const e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}}class Lj{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=
|
|
416
|
+
0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Yf}LA(e){const n=this.currIdx+e;return n<0||this.tokVectorLength<=n?Yf:this.tokVector[n]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){
|
|
417
|
+
this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}}class Fj{ACTION(e){return e.call(this)}consume(e,n,r){return this.consumeInternal(n,e,r)}subrule(e,n,r){return this.subruleInternal(n,e,r)}option(e,n){return this.optionInternal(n,e)}or(e,n){return this.orInternal(n,e)}many(e,n){return this.manyInternal(e,n)}atLeastOne(e,n){return this.atLeastOneInternal(e,n)}CONSUME(e,n){return this.consumeInternal(
|
|
418
|
+
e,0,n)}CONSUME1(e,n){return this.consumeInternal(e,1,n)}CONSUME2(e,n){return this.consumeInternal(e,2,n)}CONSUME3(e,n){return this.consumeInternal(e,3,n)}CONSUME4(e,n){return this.consumeInternal(e,4,n)}CONSUME5(e,n){return this.consumeInternal(e,5,n)}CONSUME6(e,n){return this.consumeInternal(e,6,n)}CONSUME7(e,n){return this.consumeInternal(e,7,n)}CONSUME8(e,n){return this.consumeInternal(e,8,n)}CONSUME9(e,n){return this.consumeInternal(e,9,n)}SUBRULE(e,n){return this.subruleInternal(e,0,n)}SUBRULE1(e,n){
|
|
419
|
+
return this.subruleInternal(e,1,n)}SUBRULE2(e,n){return this.subruleInternal(e,2,n)}SUBRULE3(e,n){return this.subruleInternal(e,3,n)}SUBRULE4(e,n){return this.subruleInternal(e,4,n)}SUBRULE5(e,n){return this.subruleInternal(e,5,n)}SUBRULE6(e,n){return this.subruleInternal(e,6,n)}SUBRULE7(e,n){return this.subruleInternal(e,7,n)}SUBRULE8(e,n){return this.subruleInternal(e,8,n)}SUBRULE9(e,n){return this.subruleInternal(e,9,n)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(
|
|
420
|
+
e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.
|
|
421
|
+
orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(
|
|
422
|
+
9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){
|
|
423
|
+
return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(
|
|
424
|
+
1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,n,r=Jf){if(bn(this.definedRulesNames,
|
|
425
|
+
e)){const o={message:Ps.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:Dn.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(o)}this.definedRulesNames.push(e);const i=this.defineRule(e,n,r);return this[e]=i,i}OVERRIDE_RULE(e,n,r=Jf){const i=oj(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(i);const s=this.defineRule(e,n,r);return this[e]=s,s}BACKTRACK(e,n){return function(){this.isBackTrackingStack.push(1);const r=this.
|
|
426
|
+
saveRecogState();try{return e.apply(this,n),!0}catch(i){if(Wf(i))return!1;throw i}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return H2(Ht(this.gastProductionsCache))}}class Mj{initRecognizerEngine(e,n){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Bf,this.subruleIdx=0,this.definedRulesNames=[],this.
|
|
427
|
+
tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},Te(n,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
|
|
428
|
+
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
|
|
429
|
+
For Further details.`);if(Qe(e)){if(dt(e))throw Error(`A Token Vocabulary cannot be empty.
|
|
430
|
+
Note that the first argument for the parser constructor
|
|
431
|
+
is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument.
|
|
432
|
+
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
|
|
433
|
+
For Further details.`)}if(Qe(e))this.tokensMap=En(e,(s,o)=>(s[o.name]=o,s),{});else if(Te(e,"modes")&&yr(sr(Ht(e.modes)),LB)){const s=sr(Ht(e.modes)),o=xg(s);this.tokensMap=En(o,(a,u)=>(a[u.name]=u,a),{})}else if(rr(e))this.tokensMap=nn(e);else throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=zi;const r=Te(e,"modes")?sr(Ht(e.modes)):Ht(e),i=yr(r,s=>dt(s.categoryMatches));this.
|
|
434
|
+
tokenMatcher=i?Bf:qu,Gu(Ht(this.tokensMap))}defineRule(e,n,r){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'
|
|
435
|
+
Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const i=Te(r,"resyncEnabled")?r.resyncEnabled:Jf.resyncEnabled,s=Te(r,"recoveryValueFunc")?r.recoveryValueFunc:Jf.recoveryValueFunc,o=this.ruleShortNameIdx<<Dj+Hi;this.ruleShortNameIdx++,this.shortRuleNameToFull[o]=e,this.fullRuleNameToShort[e]=o;let a;return this.outputCst===!0?a=function(...l){try{this.ruleInvocationStateUpdate(o,e,this.subruleIdx),n.apply(this,l);const f=this.CST_STACK[this.CST_STACK.
|
|
436
|
+
length-1];return this.cstPostRule(f),f}catch(f){return this.invokeRuleCatch(f,i,s)}finally{this.ruleFinallyStateUpdate()}}:a=function(...l){try{return this.ruleInvocationStateUpdate(o,e,this.subruleIdx),n.apply(this,l)}catch(f){return this.invokeRuleCatch(f,i,s)}finally{this.ruleFinallyStateUpdate()}},Object.assign(a,{ruleName:e,originalGrammarAction:n})}invokeRuleCatch(e,n,r){const i=this.RULE_STACK.length===1,s=n&&!this.isBackTracking()&&this.recoveryEnabled;if(Wf(e)){const o=e;if(s){const a=this.
|
|
437
|
+
findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(a))if(o.resyncedTokens=this.reSyncTo(a),this.outputCst){const u=this.CST_STACK[this.CST_STACK.length-1];return u.recoveredNode=!0,u}else return r(e);else{if(this.outputCst){const u=this.CST_STACK[this.CST_STACK.length-1];u.recoveredNode=!0,o.partialCstResult=u}throw o}}else{if(i)return this.moveToTerminatedState(),r(e);throw o}}else throw e}optionInternal(e,n){const r=this.getKeyForAutomaticLookahead(V$,n);return this.optionInternalLogic(e,n,
|
|
438
|
+
r)}optionInternalLogic(e,n,r){let i=this.getLaFuncFromCache(r),s;if(typeof e!="function"){s=e.DEF;const o=e.GATE;if(o!==void 0){const a=i;i=()=>o.call(this)&&a.call(this)}}else s=e;if(i.call(this)===!0)return s.call(this)}atLeastOneInternal(e,n){const r=this.getKeyForAutomaticLookahead(Vg,e);return this.atLeastOneInternalLogic(e,n,r)}atLeastOneInternalLogic(e,n,r){let i=this.getLaFuncFromCache(r),s;if(typeof n!="function"){s=n.DEF;const o=n.GATE;if(o!==void 0){const a=i;i=()=>o.call(this)&&a.call(
|
|
439
|
+
this)}}else s=n;if(i.call(this)===!0){let o=this.doSingleRepetition(s);for(;i.call(this)===!0&&o===!0;)o=this.doSingleRepetition(s)}else throw this.raiseEarlyExitException(e,kt.REPETITION_MANDATORY,n.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,n],i,Vg,e,zB)}atLeastOneSepFirstInternal(e,n){const r=this.getKeyForAutomaticLookahead(Hf,e);this.atLeastOneSepFirstInternalLogic(e,n,r)}atLeastOneSepFirstInternalLogic(e,n,r){const i=n.DEF,s=n.SEP;if(this.getLaFuncFromCache(r).call(
|
|
440
|
+
this)===!0){i.call(this);const a=()=>this.tokenMatcher(this.LA(1),s);for(;this.tokenMatcher(this.LA(1),s)===!0;)this.CONSUME(s),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,s,a,i,_$],a,Hf,e,_$)}else throw this.raiseEarlyExitException(e,kt.REPETITION_MANDATORY_WITH_SEPARATOR,n.ERR_MSG)}manyInternal(e,n){const r=this.getKeyForAutomaticLookahead(Hg,e);return this.manyInternalLogic(e,n,r)}manyInternalLogic(e,n,r){let i=this.getLaFuncFromCache(r),s;if(typeof n!="f\
|
|
441
|
+
unction"){s=n.DEF;const a=n.GATE;if(a!==void 0){const u=i;i=()=>a.call(this)&&u.call(this)}}else s=n;let o=!0;for(;i.call(this)===!0&&o===!0;)o=this.doSingleRepetition(s);this.attemptInRepetitionRecovery(this.manyInternal,[e,n],i,Hg,e,WB,o)}manySepFirstInternal(e,n){const r=this.getKeyForAutomaticLookahead(Kg,e);this.manySepFirstInternalLogic(e,n,r)}manySepFirstInternalLogic(e,n,r){const i=n.DEF,s=n.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){i.call(this);const a=()=>this.tokenMatcher(this.
|
|
442
|
+
LA(1),s);for(;this.tokenMatcher(this.LA(1),s)===!0;)this.CONSUME(s),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,s,a,i,S$],a,Kg,e,S$)}}repetitionSepSecondInternal(e,n,r,i,s){for(;r();)this.CONSUME(n),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,n,r,i,s],r,Hf,e,s)}doSingleRepetition(e){const n=this.getLexerPosition();return e.call(this),this.getLexerPosition()>n}orInternal(e,n){const r=this.getKeyForAutomaticLookahead(H$,n),
|
|
443
|
+
i=Qe(e)?e:e.DEF,o=this.getLaFuncFromCache(r).call(this,i);if(o!==void 0)return i[o].ALT.call(this);this.raiseNoAltException(n,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){const e=this.LA(1),n=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new vj(n,e))}}subruleInternal(e,n,r){let i;try{
|
|
444
|
+
const s=r!==void 0?r.ARGS:void 0;return this.subruleIdx=n,i=e.apply(this,s),this.cstPostNonTerminal(i,r!==void 0&&r.LABEL!==void 0?r.LABEL:e.ruleName),i}catch(s){throw this.subruleInternalError(s,r,e.ruleName)}}subruleInternalError(e,n,r){throw Wf(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,n!==void 0&&n.LABEL!==void 0?n.LABEL:r),delete e.partialCstResult),e}consumeInternal(e,n,r){let i;try{const s=this.LA(1);this.tokenMatcher(s,e)===!0?(this.consumeToken(),i=s):
|
|
445
|
+
this.consumeInternalError(e,s,r)}catch(s){i=this.consumeInternalRecovery(e,n,s)}return this.cstPostTerminal(r!==void 0&&r.LABEL!==void 0?r.LABEL:e.name,i),i}consumeInternalError(e,n,r){let i;const s=this.LA(0);throw r!==void 0&&r.ERR_MSG?i=r.ERR_MSG:i=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:n,previous:s,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new W$(i,n,s))}consumeInternalRecovery(e,n,r){if(this.recoveryEnabled&&r.name==="MismatchedTokenException"&&!this.
|
|
446
|
+
isBackTracking()){const i=this.getFollowsForInRuleRecovery(e,n);try{return this.tryInRuleRecovery(e,i)}catch(s){throw s.name===z$?r:s}}else throw r}saveRecogState(){const e=this.errors,n=nn(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:n,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,n,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(e),this.
|
|
447
|
+
cstInvocationStateUpdate(n)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){const e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),zi)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}class Bj{initErrorHandler(e){this.
|
|
448
|
+
_errors=[],this.errorMessageProvider=Te(e,"errorMessageProvider")?e.errorMessageProvider:oi.errorMessageProvider}SAVE_ERROR(e){if(Wf(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:nn(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return nn(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,n,r){const i=this.getCurrRuleFullName(),s=this.getGAstProductions()[i],
|
|
449
|
+
a=Gf(e,s,n,this.maxLookahead)[0],u=[];for(let l=1;l<=this.maxLookahead;l++)u.push(this.LA(l));const c=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:u,previous:this.LA(0),customUserDescription:r,ruleName:i});throw this.SAVE_ERROR(new wj(c,this.LA(1),this.LA(0)))}raiseNoAltException(e,n){const r=this.getCurrRuleFullName(),i=this.getGAstProductions()[r],s=qf(e,i,this.maxLookahead),o=[];for(let c=1;c<=this.maxLookahead;c++)o.push(this.LA(c));const a=this.LA(0),u=this.
|
|
450
|
+
errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:s,actual:o,previous:a,customUserDescription:n,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new yj(u,this.LA(1),a))}}class jj{initContentAssist(){}computeContentAssist(e,n){const r=this.gastProductionsCache[e];if(si(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return P$([r],n,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const n=vr(e.ruleStack),i=this.getGAstProductions()[n];return new UB(
|
|
451
|
+
i,e).startWalking()}}const Kf={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Kf);const J$=!0,Q$=Math.pow(2,Hi)-1,Z$=C$({name:"RECORDING_PHASE_TOKEN",pattern:Ln.NA});Gu([Z$]);const eD=Bg(Z$,`This IToken indicates the Parser is in Recording Phase
|
|
452
|
+
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(eD);const qj={name:`This CSTNode indicates the Parser is in Recording Phase
|
|
453
|
+
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}};class Gj{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){const n=e>0?e:"";this[`CONSUME${n}`]=function(r,i){return this.consumeInternalRecord(r,e,i)},this[`SUBRULE${n}`]=function(r,i){return this.subruleInternalRecord(r,e,i)},this[`OPTION${n}`]=function(r){return this.optionInternalRecord(
|
|
454
|
+
r,e)},this[`OR${n}`]=function(r){return this.orInternalRecord(r,e)},this[`MANY${n}`]=function(r){this.manyInternalRecord(e,r)},this[`MANY_SEP${n}`]=function(r){this.manySepFirstInternalRecord(e,r)},this[`AT_LEAST_ONE${n}`]=function(r){this.atLeastOneInternalRecord(e,r)},this[`AT_LEAST_ONE_SEP${n}`]=function(r){this.atLeastOneSepFirstInternalRecord(e,r)}}this.consume=function(e,n,r){return this.consumeInternalRecord(n,e,r)},this.subrule=function(e,n,r){return this.subruleInternalRecord(n,e,r)},this.
|
|
455
|
+
option=function(e,n){return this.optionInternalRecord(n,e)},this.or=function(e,n){return this.orInternalRecord(n,e)},this.many=function(e,n){this.manyInternalRecord(e,n)},this.atLeastOne=function(e,n){this.atLeastOneInternalRecord(e,n)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{const e=this;for(let n=0;n<10;n++){const r=n>0?n:"";delete e[`CONSUME${r}`],delete e[`\
|
|
456
|
+
SUBRULE${r}`],delete e[`OPTION${r}`],delete e[`OR${r}`],delete e[`MANY${r}`],delete e[`MANY_SEP${r}`],delete e[`AT_LEAST_ONE${r}`],delete e[`AT_LEAST_ONE_SEP${r}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,n){return()=>!0}LA_RECORD(e){return Yf}topLevelRuleRecord(e,n){try{const r=new qo({definition:[],name:e});return r.name=e,this.recordingProdStack.push(r),
|
|
457
|
+
n.call(this),this.recordingProdStack.pop(),r}catch(r){if(r.KNOWN_RECORDER_ERROR!==!0)try{r.message=r.message+`
|
|
458
|
+
This error was thrown during the "grammar recording phase" For more info see:
|
|
459
|
+
https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw r}throw r}}optionInternalRecord(e,n){return Wu.call(this,sn,e,n)}atLeastOneInternalRecord(e,n){Wu.call(this,Hn,n,e)}atLeastOneSepFirstInternalRecord(e,n){Wu.call(this,Vn,n,e,J$)}manyInternalRecord(e,n){Wu.call(this,St,n,e)}manySepFirstInternalRecord(e,n){Wu.call(this,In,n,e,J$)}orInternalRecord(e,n){return Uj.call(this,e,n)}subruleInternalRecord(e,n,r){if(Xf(n),!e||Te(e,"ruleName")===!1){const a=new Error(`<SUBRULE${tD(
|
|
460
|
+
n)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>
|
|
461
|
+
inside top level rule: <${this.recordingProdStack[0].name}>`);throw a.KNOWN_RECORDER_ERROR=!0,a}const i=Bo(this.recordingProdStack),s=e.ruleName,o=new $n({idx:n,nonTerminalName:s,label:r?.LABEL,referencedRule:void 0});return i.definition.push(o),this.outputCst?qj:Kf}consumeInternalRecord(e,n,r){if(Xf(n),!g$(e)){const o=new Error(`<CONSUME${tD(n)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>
|
|
462
|
+
inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}const i=Bo(this.recordingProdStack),s=new bt({idx:n,terminalType:e,label:r?.LABEL});return i.definition.push(s),eD}}function Wu(t,e,n,r=!1){Xf(n);const i=Bo(this.recordingProdStack),s=ti(e)?e:e.DEF,o=new t({definition:[],idx:n});return r&&(o.separator=e.SEP),Te(e,"MAX_LOOKAHEAD")&&(o.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(o),s.call(this),i.definition.push(o),this.recordingProdStack.
|
|
463
|
+
pop(),Kf}function Uj(t,e){Xf(e);const n=Bo(this.recordingProdStack),r=Qe(t)===!1,i=r===!1?t:t.DEF,s=new On({definition:[],idx:e,ignoreAmbiguities:r&&t.IGNORE_AMBIGUITIES===!0});Te(t,"MAX_LOOKAHEAD")&&(s.maxLookahead=t.MAX_LOOKAHEAD);const o=QE(i,a=>ti(a.GATE));return s.hasPredicates=o,n.definition.push(s),ke(i,a=>{const u=new Nn({definition:[]});s.definition.push(u),Te(a,"IGNORE_AMBIGUITIES")?u.ignoreAmbiguities=a.IGNORE_AMBIGUITIES:Te(a,"GATE")&&(u.ignoreAmbiguities=!0),this.recordingProdStack.
|
|
464
|
+
push(u),a.ALT.call(this),this.recordingProdStack.pop()}),Kf}function tD(t){return t===0?"":`${t}`}function Xf(t){if(t<0||t>Q$){const e=new Error(`Invalid DSL Method idx value: <${t}>
|
|
465
|
+
Idx value must be a none negative value smaller than ${Q$+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}class Wj{initPerformanceTracer(e){if(Te(e,"traceInitPerf")){const n=e.traceInitPerf,r=typeof n=="number";this.traceInitMaxIdent=r?n:1/0,this.traceInitPerf=r?n>0:n}else this.traceInitMaxIdent=0,this.traceInitPerf=oi.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,n){if(this.traceInitPerf===!0){this.traceInitIndent++;const r=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&
|
|
466
|
+
console.log(`${r}--> <${e}>`);const{time:i,value:s}=t$(n),o=i>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&o(`${r}<-- <${e}> time: ${i}ms`),this.traceInitIndent--,s}else return n()}}function zj(t,e){e.forEach(n=>{const r=n.prototype;Object.getOwnPropertyNames(r).forEach(i=>{if(i==="constructor")return;const s=Object.getOwnPropertyDescriptor(r,i);s&&(s.get||s.set)?Object.defineProperty(t.prototype,i,s):t.prototype[i]=n.prototype[i]})})}const Yf=Bg(zi,"",NaN,NaN,
|
|
467
|
+
NaN,NaN,NaN,NaN);Object.freeze(Yf);const oi=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Wo,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Jf=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});var Dn;(function(t){t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",
|
|
468
|
+
t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",t[t.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAH\
|
|
469
|
+
EAD_VALIDATION"})(Dn||(Dn={}));function nD(t=void 0){return function(){return t}}class Bd{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let e;this.selfAnalysisDone=!0;const n=this.className;this.TRACE_INIT("toFastProps",()=>{n$(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),ke(this.definedRulesNames,
|
|
470
|
+
i=>{const o=this[i].originalGrammarAction;let a;this.TRACE_INIT(`${i} Rule`,()=>{a=this.topLevelRuleRecord(i,o)}),this.gastProductionsCache[i]=a})}finally{this.disableRecording()}});let r=[];if(this.TRACE_INIT("Grammar Resolving",()=>{r=mj({rules:Ht(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(r)}),this.TRACE_INIT("Grammar Validations",()=>{if(dt(r)&&this.skipValidations===!1){const i=gj({rules:Ht(this.gastProductionsCache),tokenTypes:Ht(this.tokensMap),errMsgProvider:Ps,
|
|
471
|
+
grammarName:n}),s=ej({lookaheadStrategy:this.lookaheadStrategy,rules:Ht(this.gastProductionsCache),tokenTypes:Ht(this.tokensMap),grammarName:n});this.definitionErrors=this.definitionErrors.concat(i,s)}}),dt(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{const i=Z2(Ht(this.gastProductionsCache));this.resyncFollows=i}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var i,s;(s=(i=this.lookaheadStrategy).initialize)===null||s===void 0||s.call(i,{rules:Ht(
|
|
472
|
+
this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Ht(this.gastProductionsCache))})),!Bd.DEFER_DEFINITION_ERRORS_HANDLING&&!dt(this.definitionErrors))throw e=ve(this.definitionErrors,i=>i.message),new Error(`Parser Definition Errors detected:
|
|
473
|
+
${e.join(`
|
|
474
|
+
-------------------------------
|
|
475
|
+
`)}`)})}constructor(e,n){this.definitionErrors=[],this.selfAnalysisDone=!1;const r=this;if(r.initErrorHandler(n),r.initLexerAdapter(),r.initLooksAhead(n),r.initRecognizerEngine(e,n),r.initRecoverable(n),r.initTreeBuilder(n),r.initContentAssist(),r.initGastRecorder(n),r.initPerformanceTracer(n),Te(n,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated.
|
|
476
|
+
Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
|
|
477
|
+
See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
|
|
478
|
+
For further details.`);this.skipValidations=Te(n,"skipValidations")?n.skipValidations:oi.skipValidations}}Bd.DEFER_DEFINITION_ERRORS_HANDLING=!1,zj(Bd,[Ej,Rj,Oj,Lj,Mj,Fj,Bj,jj,Gj,Wj]);class Hj extends Bd{constructor(e,n=oi){const r=nn(n);r.outputCst=!1,super(e,r)}}function zo(t,e,n){return`${t.name}_${e}_${n}`}const Vi=1,Vj=2,rD=4,iD=5,zu=7,Kj=8,Xj=9,Yj=10,Jj=11,sD=12;class Qg{constructor(e){this.target=e}isEpsilon(){return!1}}class Zg extends Qg{constructor(e,n){super(e),this.tokenType=n}}class oD extends Qg{constructor(e){
|
|
479
|
+
super(e)}isEpsilon(){return!0}}class ey extends Qg{constructor(e,n,r){super(e),this.rule=n,this.followState=r}isEpsilon(){return!0}}function Qj(t){const e={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};Zj(e,t);const n=t.length;for(let r=0;r<n;r++){const i=t[r],s=xs(e,i,i);s!==void 0&&lq(e,i,s)}return e}function Zj(t,e){const n=e.length;for(let r=0;r<n;r++){const i=e[r],s=Jt(t,i,void 0,{type:Vj}),o=Jt(t,i,void 0,{type:zu});s.stop=o,t.ruleToStartState.
|
|
480
|
+
set(i,s),t.ruleToStopState.set(i,o)}}function aD(t,e,n){return n instanceof bt?ty(t,e,n.terminalType,n):n instanceof $n?cq(t,e,n):n instanceof On?iq(t,e,n):n instanceof sn?sq(t,e,n):n instanceof St?eq(t,e,n):n instanceof In?tq(t,e,n):n instanceof Hn?nq(t,e,n):n instanceof Vn?rq(t,e,n):xs(t,e,n)}function eq(t,e,n){const r=Jt(t,e,n,{type:iD});Ki(t,r);const i=Ho(t,e,r,n,xs(t,e,n));return cD(t,e,n,i)}function tq(t,e,n){const r=Jt(t,e,n,{type:iD});Ki(t,r);const i=Ho(t,e,r,n,xs(t,e,n)),s=ty(t,e,n.separator,
|
|
481
|
+
n);return cD(t,e,n,i,s)}function nq(t,e,n){const r=Jt(t,e,n,{type:rD});Ki(t,r);const i=Ho(t,e,r,n,xs(t,e,n));return uD(t,e,n,i)}function rq(t,e,n){const r=Jt(t,e,n,{type:rD});Ki(t,r);const i=Ho(t,e,r,n,xs(t,e,n)),s=ty(t,e,n.separator,n);return uD(t,e,n,i,s)}function iq(t,e,n){const r=Jt(t,e,n,{type:Vi});Ki(t,r);const i=ve(n.definition,o=>aD(t,e,o));return Ho(t,e,r,n,...i)}function sq(t,e,n){const r=Jt(t,e,n,{type:Vi});Ki(t,r);const i=Ho(t,e,r,n,xs(t,e,n));return oq(t,e,n,i)}function xs(t,e,n){const r=Wn(
|
|
482
|
+
ve(n.definition,i=>aD(t,e,i)),i=>i!==void 0);return r.length===1?r[0]:r.length===0?void 0:uq(t,r)}function uD(t,e,n,r,i){const s=r.left,o=r.right,a=Jt(t,e,n,{type:Jj});Ki(t,a);const u=Jt(t,e,n,{type:sD});return s.loopback=a,u.loopback=a,t.decisionMap[zo(e,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",n.idx)]=a,Bt(o,a),i===void 0?(Bt(a,s),Bt(a,u)):(Bt(a,u),Bt(a,i.left),Bt(i.right,s)),{left:s,right:u}}function cD(t,e,n,r,i){const s=r.left,o=r.right,a=Jt(t,e,n,{type:Yj});Ki(t,a);const u=Jt(
|
|
483
|
+
t,e,n,{type:sD}),c=Jt(t,e,n,{type:Xj});return a.loopback=c,u.loopback=c,Bt(a,s),Bt(a,u),Bt(o,c),i!==void 0?(Bt(c,u),Bt(c,i.left),Bt(i.right,s)):Bt(c,a),t.decisionMap[zo(e,i?"RepetitionWithSeparator":"Repetition",n.idx)]=a,{left:a,right:u}}function oq(t,e,n,r){const i=r.left,s=r.right;return Bt(i,s),t.decisionMap[zo(e,"Option",n.idx)]=i,r}function Ki(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}function Ho(t,e,n,r,...i){const s=Jt(t,e,r,{type:Kj,start:n});n.
|
|
484
|
+
end=s;for(const a of i)a!==void 0?(Bt(n,a.left),Bt(a.right,s)):Bt(n,s);const o={left:n,right:s};return t.decisionMap[zo(e,aq(r),r.idx)]=n,o}function aq(t){if(t instanceof On)return"Alternation";if(t instanceof sn)return"Option";if(t instanceof St)return"Repetition";if(t instanceof In)return"RepetitionWithSeparator";if(t instanceof Hn)return"RepetitionMandatory";if(t instanceof Vn)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function uq(t,e){const n=e.
|
|
485
|
+
length;for(let s=0;s<n-1;s++){const o=e[s];let a;o.left.transitions.length===1&&(a=o.left.transitions[0]);const u=a instanceof ey,c=a,l=e[s+1].left;o.left.type===Vi&&o.right.type===Vi&&a!==void 0&&(u&&c.followState===o.right||a.target===o.right)?(u?c.followState=l:a.target=l,dq(t,o.right)):Bt(o.right,l)}const r=e[0],i=e[n-1];return{left:r.left,right:i.right}}function ty(t,e,n,r){const i=Jt(t,e,r,{type:Vi}),s=Jt(t,e,r,{type:Vi});return ny(i,new Zg(s,n)),{left:i,right:s}}function cq(t,e,n){const r=n.
|
|
486
|
+
referencedRule,i=t.ruleToStartState.get(r),s=Jt(t,e,n,{type:Vi}),o=Jt(t,e,n,{type:Vi}),a=new ey(i,r,o);return ny(s,a),{left:s,right:o}}function lq(t,e,n){const r=t.ruleToStartState.get(e);Bt(r,n.left);const i=t.ruleToStopState.get(e);return Bt(n.right,i),{left:r,right:i}}function Bt(t,e){const n=new oD(e);ny(t,n)}function Jt(t,e,n,r){const i=Object.assign({atn:t,production:n,epsilonOnlyTransitions:!1,rule:e,transitions:[],nextTokenWithinRule:[],stateNumber:t.states.length},r);return t.states.push(
|
|
487
|
+
i),i}function ny(t,e){t.transitions.length===0&&(t.epsilonOnlyTransitions=e.isEpsilon()),t.transitions.push(e)}function dq(t,e){t.states.splice(t.states.indexOf(e),1)}const Qf={};class ry{constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){const n=lD(e);n in this.map||(this.map[n]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return ve(this.configs,e=>e.alt)}get key(){let e="";for(const n in this.
|
|
488
|
+
map)e+=n+":";return e}}function lD(t,e=!0){return`${e?`a${t.alt}`:""}s${t.state.stateNumber}:${t.stack.map(n=>n.stateNumber.toString()).join("_")}`}function fq(t,e){const n={};return r=>{const i=r.toString();let s=n[i];return s!==void 0||(s={atnStartState:t,decision:e,states:{}},n[i]=s),s}}class dD{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,n){this.predicates[e]=n}toString(){let e="";const n=this.predicates.length;for(let r=0;r<n;r++)e+=this.
|
|
489
|
+
predicates[r]===!0?"1":"0";return e}}const fD=new dD;class pq extends Yg{constructor(e){var n;super(),this.logging=(n=e?.logging)!==null&&n!==void 0?n:r=>console.log(r)}initialize(e){this.atn=Qj(e.rules),this.dfas=hq(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){const{prodOccurrence:n,rule:r,hasPredicates:i,dynamicTokensEnabled:s}=e,o=this.dfas,a=this.logging,u=zo(r,"Alternation",n),l=this.atn.decisionMap[u].decision,
|
|
490
|
+
f=ve(x$({maxLookahead:1,occurrence:n,prodType:"Alternation",rule:r}),d=>ve(d,p=>p[0]));if(pD(f,!1)&&!s){const d=En(f,(p,h,v)=>(ke(h,b=>{b&&(p[b.tokenTypeIdx]=v,ke(b.categoryMatches,y=>{p[y]=v}))}),p),{});return i?function(p){var h;const v=this.LA(1),b=d[v.tokenTypeIdx];if(p!==void 0&&b!==void 0){const y=(h=p[b])===null||h===void 0?void 0:h.GATE;if(y!==void 0&&y.call(this)===!1)return}return b}:function(){const p=this.LA(1);return d[p.tokenTypeIdx]}}else return i?function(d){const p=new dD,h=d===
|
|
491
|
+
void 0?0:d.length;for(let b=0;b<h;b++){const y=d?.[b].GATE;p.set(b,y===void 0||y.call(this))}const v=iy.call(this,o,l,p,a);return typeof v=="number"?v:void 0}:function(){const d=iy.call(this,o,l,fD,a);return typeof d=="number"?d:void 0}}buildLookaheadForOptional(e){const{prodOccurrence:n,rule:r,prodType:i,dynamicTokensEnabled:s}=e,o=this.dfas,a=this.logging,u=zo(r,i,n),l=this.atn.decisionMap[u].decision,f=ve(x$({maxLookahead:1,occurrence:n,prodType:i,rule:r}),d=>ve(d,p=>p[0]));if(pD(f)&&f[0][0]&&
|
|
492
|
+
!s){const d=f[0],p=sr(d);if(p.length===1&&dt(p[0].categoryMatches)){const v=p[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===v}}else{const h=En(p,(v,b)=>(b!==void 0&&(v[b.tokenTypeIdx]=!0,ke(b.categoryMatches,y=>{v[y]=!0})),v),{});return function(){const v=this.LA(1);return h[v.tokenTypeIdx]===!0}}}return function(){const d=iy.call(this,o,l,fD,a);return typeof d=="object"?!1:d===0}}}function pD(t,e=!0){const n=new Set;for(const r of t){const i=new Set;for(const s of r){if(s===
|
|
493
|
+
void 0){if(e)break;return!1}const o=[s.tokenTypeIdx].concat(s.categoryMatches);for(const a of o)if(n.has(a)){if(!i.has(a))return!1}else n.add(a),i.add(a)}}return!0}function hq(t){const e=t.decisionStates.length,n=Array(e);for(let r=0;r<e;r++)n[r]=fq(t.decisionStates[r],r);return n}function iy(t,e,n,r){const i=t[e](n);let s=i.start;if(s===void 0){const a=kq(i.atnStartState);s=gD(i,hD(a)),i.start=s}return mq.apply(this,[i,s,n,r])}function mq(t,e,n,r){let i=e,s=1;const o=[];let a=this.LA(s++);for(;;){
|
|
494
|
+
let u=Eq(i,a);if(u===void 0&&(u=gq.apply(this,[t,i,a,s,n,r])),u===Qf)return bq(o,i,a);if(u.isAcceptState===!0)return u.prediction;i=u,o.push(a),a=this.LA(s++)}}function gq(t,e,n,r,i,s){const o=$q(e.configs,n,i);if(o.size===0)return mD(t,e,n,Qf),Qf;let a=hD(o);const u=Rq(o,i);if(u!==void 0)a.isAcceptState=!0,a.prediction=u,a.configs.uniqueAlt=u;else if(Sq(o)){const c=N2(o.alts);a.isAcceptState=!0,a.prediction=c,a.configs.uniqueAlt=c,yq.apply(this,[t,r,o.alts,s])}return a=mD(t,e,n,a),a}function yq(t,e,n,r){
|
|
495
|
+
const i=[];for(let c=1;c<=e;c++)i.push(this.LA(c).tokenType);const s=t.atnStartState,o=s.rule,a=s.production,u=vq({topLevelRule:o,ambiguityIndices:n,production:a,prefixPath:i});r(u)}function vq(t){const e=ve(t.prefixPath,i=>Uo(i)).join(", "),n=t.production.idx===0?"":t.production.idx;let r=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${wq(t.production)}${n}> inside <${t.topLevelRule.name}> Rule,
|
|
496
|
+
<${e}> may appears as a prefix path in all these alternatives.
|
|
497
|
+
`;return r=r+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
|
|
498
|
+
For Further details.`,r}function wq(t){if(t instanceof $n)return"SUBRULE";if(t instanceof sn)return"OPTION";if(t instanceof On)return"OR";if(t instanceof Hn)return"AT_LEAST_ONE";if(t instanceof Vn)return"AT_LEAST_ONE_SEP";if(t instanceof In)return"MANY_SEP";if(t instanceof St)return"MANY";if(t instanceof bt)return"CONSUME";throw Error("non exhaustive match")}function bq(t,e,n){const r=zn(e.configs.elements,s=>s.state.transitions),i=U2(r.filter(s=>s instanceof Zg).map(s=>s.tokenType),s=>s.tokenTypeIdx);
|
|
499
|
+
return{actualToken:n,possibleTokenTypes:i,tokenPath:t}}function Eq(t,e){return t.edges[e.tokenTypeIdx]}function $q(t,e,n){const r=new ry,i=[];for(const o of t.elements){if(n.is(o.alt)===!1)continue;if(o.state.type===zu){i.push(o);continue}const a=o.state.transitions.length;for(let u=0;u<a;u++){const c=o.state.transitions[u],l=Dq(c,e);l!==void 0&&r.add({state:l,alt:o.alt,stack:o.stack})}}let s;if(i.length===0&&r.size===1&&(s=r),s===void 0){s=new ry;for(const o of r.elements)Zf(o,s)}if(i.length>0&&
|
|
500
|
+
!Cq(s))for(const o of i)s.add(o);return s}function Dq(t,e){if(t instanceof Zg&&A$(e,t.tokenType))return t.target}function Rq(t,e){let n;for(const r of t.elements)if(e.is(r.alt)===!0){if(n===void 0)n=r.alt;else if(n!==r.alt)return}return n}function hD(t){return{configs:t,edges:{},isAcceptState:!1,prediction:-1}}function mD(t,e,n,r){return r=gD(t,r),e.edges[n.tokenTypeIdx]=r,r}function gD(t,e){if(e===Qf)return e;const n=e.configs.key,r=t.states[n];return r!==void 0?r:(e.configs.finalize(),t.states[n]=
|
|
501
|
+
e,e)}function kq(t){const e=new ry,n=t.transitions.length;for(let r=0;r<n;r++){const s={state:t.transitions[r].target,alt:r,stack:[]};Zf(s,e)}return e}function Zf(t,e){const n=t.state;if(n.type===zu){if(t.stack.length>0){const i=[...t.stack],o={state:i.pop(),alt:t.alt,stack:i};Zf(o,e)}else e.add(t);return}n.epsilonOnlyTransitions||e.add(t);const r=n.transitions.length;for(let i=0;i<r;i++){const s=n.transitions[i],o=Tq(t,s);o!==void 0&&Zf(o,e)}}function Tq(t,e){if(e instanceof oD)return{state:e.target,
|
|
502
|
+
alt:t.alt,stack:t.stack};if(e instanceof ey){const n=[...t.stack,e.followState];return{state:e.target,alt:t.alt,stack:n}}}function Cq(t){for(const e of t.elements)if(e.state.type===zu)return!0;return!1}function Aq(t){for(const e of t.elements)if(e.state.type!==zu)return!1;return!0}function Sq(t){if(Aq(t))return!0;const e=_q(t.elements);return Pq(e)&&!xq(e)}function _q(t){const e=new Map;for(const n of t){const r=lD(n,!1);let i=e.get(r);i===void 0&&(i={},e.set(r,i)),i[n.alt]=!0}return e}function Pq(t){
|
|
503
|
+
for(const e of Array.from(t.values()))if(Object.keys(e).length>1)return!0;return!1}function xq(t){for(const e of Array.from(t.values()))if(Object.keys(e).length===1)return!0;return!1}var yD;(function(t){function e(n){return typeof n=="string"}t.is=e})(yD||(yD={}));var sy;(function(t){function e(n){return typeof n=="string"}t.is=e})(sy||(sy={}));var vD;(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function e(n){return typeof n=="number"&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=e})(vD||(vD=
|
|
504
|
+
{}));var ep;(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function e(n){return typeof n=="number"&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=e})(ep||(ep={}));var st;(function(t){function e(r,i){return r===Number.MAX_VALUE&&(r=ep.MAX_VALUE),i===Number.MAX_VALUE&&(i=ep.MAX_VALUE),{line:r,character:i}}t.create=e;function n(r){let i=r;return q.objectLiteral(i)&&q.uinteger(i.line)&&q.uinteger(i.character)}t.is=n})(st||(st={}));var Ye;(function(t){function e(r,i,s,o){if(q.uinteger(r)&&q.uinteger(i)&&q.uinteger(
|
|
505
|
+
s)&&q.uinteger(o))return{start:st.create(r,i),end:st.create(s,o)};if(st.is(r)&&st.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${s}, ${o}]`)}t.create=e;function n(r){let i=r;return q.objectLiteral(i)&&st.is(i.start)&&st.is(i.end)}t.is=n})(Ye||(Ye={}));var tp;(function(t){function e(r,i){return{uri:r,range:i}}t.create=e;function n(r){let i=r;return q.objectLiteral(i)&&Ye.is(i.range)&&(q.string(i.uri)||q.undefined(i.uri))}t.is=n})(tp||(tp={}));
|
|
506
|
+
var wD;(function(t){function e(r,i,s,o){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:o}}t.create=e;function n(r){let i=r;return q.objectLiteral(i)&&Ye.is(i.targetRange)&&q.string(i.targetUri)&&Ye.is(i.targetSelectionRange)&&(Ye.is(i.originSelectionRange)||q.undefined(i.originSelectionRange))}t.is=n})(wD||(wD={}));var oy;(function(t){function e(r,i,s,o){return{red:r,green:i,blue:s,alpha:o}}t.create=e;function n(r){const i=r;return q.objectLiteral(i)&&q.numberRange(
|
|
507
|
+
i.red,0,1)&&q.numberRange(i.green,0,1)&&q.numberRange(i.blue,0,1)&&q.numberRange(i.alpha,0,1)}t.is=n})(oy||(oy={}));var bD;(function(t){function e(r,i){return{range:r,color:i}}t.create=e;function n(r){const i=r;return q.objectLiteral(i)&&Ye.is(i.range)&&oy.is(i.color)}t.is=n})(bD||(bD={}));var ED;(function(t){function e(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}t.create=e;function n(r){const i=r;return q.objectLiteral(i)&&q.string(i.label)&&(q.undefined(i.textEdit)||Fn.is(i))&&(q.undefined(
|
|
508
|
+
i.additionalTextEdits)||q.typedArray(i.additionalTextEdits,Fn.is))}t.is=n})(ED||(ED={}));var $D;(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})($D||($D={}));var DD;(function(t){function e(r,i,s,o,a,u){const c={startLine:r,endLine:i};return q.defined(s)&&(c.startCharacter=s),q.defined(o)&&(c.endCharacter=o),q.defined(a)&&(c.kind=a),q.defined(u)&&(c.collapsedText=u),c}t.create=e;function n(r){const i=r;return q.objectLiteral(i)&&q.uinteger(i.startLine)&&q.uinteger(i.startLine)&&
|
|
509
|
+
(q.undefined(i.startCharacter)||q.uinteger(i.startCharacter))&&(q.undefined(i.endCharacter)||q.uinteger(i.endCharacter))&&(q.undefined(i.kind)||q.string(i.kind))}t.is=n})(DD||(DD={}));var ay;(function(t){function e(r,i){return{location:r,message:i}}t.create=e;function n(r){let i=r;return q.defined(i)&&tp.is(i.location)&&q.string(i.message)}t.is=n})(ay||(ay={}));var Ns;(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(Ns||(Ns={}));var RD;(function(t){t.Unnecessary=1,t.Deprecated=2})(RD||
|
|
510
|
+
(RD={}));var kD;(function(t){function e(n){const r=n;return q.objectLiteral(r)&&q.string(r.href)}t.is=e})(kD||(kD={}));var np;(function(t){function e(r,i,s,o,a,u){let c={range:r,message:i};return q.defined(s)&&(c.severity=s),q.defined(o)&&(c.code=o),q.defined(a)&&(c.source=a),q.defined(u)&&(c.relatedInformation=u),c}t.create=e;function n(r){var i;let s=r;return q.defined(s)&&Ye.is(s.range)&&q.string(s.message)&&(q.number(s.severity)||q.undefined(s.severity))&&(q.integer(s.code)||q.string(s.code)||
|
|
511
|
+
q.undefined(s.code))&&(q.undefined(s.codeDescription)||q.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(q.string(s.source)||q.undefined(s.source))&&(q.undefined(s.relatedInformation)||q.typedArray(s.relatedInformation,ay.is))}t.is=n})(np||(np={}));var Vo;(function(t){function e(r,i,...s){let o={title:r,command:i};return q.defined(s)&&s.length>0&&(o.arguments=s),o}t.create=e;function n(r){let i=r;return q.defined(i)&&q.string(i.title)&&q.string(i.command)}t.is=n})(Vo||(Vo={}));
|
|
512
|
+
var Fn;(function(t){function e(s,o){return{range:s,newText:o}}t.replace=e;function n(s,o){return{range:{start:s,end:s},newText:o}}t.insert=n;function r(s){return{range:s,newText:""}}t.del=r;function i(s){const o=s;return q.objectLiteral(o)&&q.string(o.newText)&&Ye.is(o.range)}t.is=i})(Fn||(Fn={}));var uy;(function(t){function e(r,i,s){const o={label:r};return i!==void 0&&(o.needsConfirmation=i),s!==void 0&&(o.description=s),o}t.create=e;function n(r){const i=r;return q.objectLiteral(i)&&q.string(
|
|
513
|
+
i.label)&&(q.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(q.string(i.description)||i.description===void 0)}t.is=n})(uy||(uy={}));var Ko;(function(t){function e(n){const r=n;return q.string(r)}t.is=e})(Ko||(Ko={}));var TD;(function(t){function e(s,o,a){return{range:s,newText:o,annotationId:a}}t.replace=e;function n(s,o,a){return{range:{start:s,end:s},newText:o,annotationId:a}}t.insert=n;function r(s,o){return{range:s,newText:"",annotationId:o}}t.del=r;function i(s){const o=s;return Fn.
|
|
514
|
+
is(o)&&(uy.is(o.annotationId)||Ko.is(o.annotationId))}t.is=i})(TD||(TD={}));var cy;(function(t){function e(r,i){return{textDocument:r,edits:i}}t.create=e;function n(r){let i=r;return q.defined(i)&&hy.is(i.textDocument)&&Array.isArray(i.edits)}t.is=n})(cy||(cy={}));var ly;(function(t){function e(r,i,s){let o={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}t.create=e;function n(r){let i=r;return i&&i.kind===
|
|
515
|
+
"create"&&q.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||q.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||q.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Ko.is(i.annotationId))}t.is=n})(ly||(ly={}));var dy;(function(t){function e(r,i,s,o){let a={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(a.options=s),o!==void 0&&(a.annotationId=o),a}t.create=e;function n(r){let i=r;return i&&i.
|
|
516
|
+
kind==="rename"&&q.string(i.oldUri)&&q.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||q.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||q.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Ko.is(i.annotationId))}t.is=n})(dy||(dy={}));var fy;(function(t){function e(r,i,s){let o={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}t.create=e;function n(r){let i=r;
|
|
517
|
+
return i&&i.kind==="delete"&&q.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||q.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||q.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Ko.is(i.annotationId))}t.is=n})(fy||(fy={}));var py;(function(t){function e(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>q.string(i.kind)?ly.is(i)||dy.is(i)||fy.is(i):cy.is(i)))}t.
|
|
518
|
+
is=e})(py||(py={}));var CD;(function(t){function e(r){return{uri:r}}t.create=e;function n(r){let i=r;return q.defined(i)&&q.string(i.uri)}t.is=n})(CD||(CD={}));var AD;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return q.defined(i)&&q.string(i.uri)&&q.integer(i.version)}t.is=n})(AD||(AD={}));var hy;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return q.defined(i)&&q.string(i.uri)&&(i.version===null||q.integer(i.version))}
|
|
519
|
+
t.is=n})(hy||(hy={}));var SD;(function(t){function e(r,i,s,o){return{uri:r,languageId:i,version:s,text:o}}t.create=e;function n(r){let i=r;return q.defined(i)&&q.string(i.uri)&&q.string(i.languageId)&&q.integer(i.version)&&q.string(i.text)}t.is=n})(SD||(SD={}));var my;(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(n){const r=n;return r===t.PlainText||r===t.Markdown}t.is=e})(my||(my={}));var Hu;(function(t){function e(n){const r=n;return q.objectLiteral(n)&&my.is(r.kind)&&q.
|
|
520
|
+
string(r.value)}t.is=e})(Hu||(Hu={}));var Pt;(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(Pt||(Pt={}));var Mn;(function(t){t.PlainText=1,t.Snippet=2})(Mn||(Mn={}));var _D;(function(t){t.Deprecated=1})(_D||(_D={}));var PD;
|
|
521
|
+
(function(t){function e(r,i,s){return{newText:r,insert:i,replace:s}}t.create=e;function n(r){const i=r;return i&&q.string(i.newText)&&Ye.is(i.insert)&&Ye.is(i.replace)}t.is=n})(PD||(PD={}));var xD;(function(t){t.asIs=1,t.adjustIndentation=2})(xD||(xD={}));var ND;(function(t){function e(n){const r=n;return r&&(q.string(r.detail)||r.detail===void 0)&&(q.string(r.description)||r.description===void 0)}t.is=e})(ND||(ND={}));var ID;(function(t){function e(n){return{label:n}}t.create=e})(ID||(ID={}));var OD;
|
|
522
|
+
(function(t){function e(n,r){return{items:n||[],isIncomplete:!!r}}t.create=e})(OD||(OD={}));var rp;(function(t){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=e;function n(r){const i=r;return q.string(i)||q.objectLiteral(i)&&q.string(i.language)&&q.string(i.value)}t.is=n})(rp||(rp={}));var LD;(function(t){function e(n){let r=n;return!!r&&q.objectLiteral(r)&&(Hu.is(r.contents)||rp.is(r.contents)||q.typedArray(r.contents,rp.is))&&(n.range===void 0||Ye.is(n.range))}t.
|
|
523
|
+
is=e})(LD||(LD={}));var FD;(function(t){function e(n,r){return r?{label:n,documentation:r}:{label:n}}t.create=e})(FD||(FD={}));var MD;(function(t){function e(n,r,...i){let s={label:n};return q.defined(r)&&(s.documentation=r),q.defined(i)?s.parameters=i:s.parameters=[],s}t.create=e})(MD||(MD={}));var BD;(function(t){t.Text=1,t.Read=2,t.Write=3})(BD||(BD={}));var jD;(function(t){function e(n,r){let i={range:n};return q.number(r)&&(i.kind=r),i}t.create=e})(jD||(jD={}));var br;(function(t){t.File=1,
|
|
524
|
+
t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(br||(br={}));var qD;(function(t){t.Deprecated=1})(qD||(qD={}));var GD;(function(t){function e(n,r,i,s,o){let a={name:n,kind:r,location:{uri:s,range:i}};return o&&(a.containerName=o),a}
|
|
525
|
+
t.create=e})(GD||(GD={}));var UD;(function(t){function e(n,r,i,s){return s!==void 0?{name:n,kind:r,location:{uri:i,range:s}}:{name:n,kind:r,location:{uri:i}}}t.create=e})(UD||(UD={}));var WD;(function(t){function e(r,i,s,o,a,u){let c={name:r,detail:i,kind:s,range:o,selectionRange:a};return u!==void 0&&(c.children=u),c}t.create=e;function n(r){let i=r;return i&&q.string(i.name)&&q.number(i.kind)&&Ye.is(i.range)&&Ye.is(i.selectionRange)&&(i.detail===void 0||q.string(i.detail))&&(i.deprecated===void 0||
|
|
526
|
+
q.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}t.is=n})(WD||(WD={}));var zD;(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(zD||(zD={}));var ip;(function(t){t.Invoked=1,t.Automatic=2})(ip||(ip={}));var HD;
|
|
527
|
+
(function(t){function e(r,i,s){let o={diagnostics:r};return i!=null&&(o.only=i),s!=null&&(o.triggerKind=s),o}t.create=e;function n(r){let i=r;return q.defined(i)&&q.typedArray(i.diagnostics,np.is)&&(i.only===void 0||q.typedArray(i.only,q.string))&&(i.triggerKind===void 0||i.triggerKind===ip.Invoked||i.triggerKind===ip.Automatic)}t.is=n})(HD||(HD={}));var VD;(function(t){function e(r,i,s){let o={title:r},a=!0;return typeof i=="string"?(a=!1,o.kind=i):Vo.is(i)?o.command=i:o.edit=i,a&&s!==void 0&&(o.
|
|
528
|
+
kind=s),o}t.create=e;function n(r){let i=r;return i&&q.string(i.title)&&(i.diagnostics===void 0||q.typedArray(i.diagnostics,np.is))&&(i.kind===void 0||q.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Vo.is(i.command))&&(i.isPreferred===void 0||q.boolean(i.isPreferred))&&(i.edit===void 0||py.is(i.edit))}t.is=n})(VD||(VD={}));var KD;(function(t){function e(r,i){let s={range:r};return q.defined(i)&&(s.data=i),s}t.create=e;function n(r){let i=r;return q.defined(i)&&Ye.is(
|
|
529
|
+
i.range)&&(q.undefined(i.command)||Vo.is(i.command))}t.is=n})(KD||(KD={}));var XD;(function(t){function e(r,i){return{tabSize:r,insertSpaces:i}}t.create=e;function n(r){let i=r;return q.defined(i)&&q.uinteger(i.tabSize)&&q.boolean(i.insertSpaces)}t.is=n})(XD||(XD={}));var YD;(function(t){function e(r,i,s){return{range:r,target:i,data:s}}t.create=e;function n(r){let i=r;return q.defined(i)&&Ye.is(i.range)&&(q.undefined(i.target)||q.string(i.target))}t.is=n})(YD||(YD={}));var JD;(function(t){function e(r,i){
|
|
530
|
+
return{range:r,parent:i}}t.create=e;function n(r){let i=r;return q.objectLiteral(i)&&Ye.is(i.range)&&(i.parent===void 0||t.is(i.parent))}t.is=n})(JD||(JD={}));var Ne;(function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="ke\
|
|
531
|
+
yword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator"})(Ne||(Ne={}));var ze;(function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary"})(ze||(ze={}));var QD;(function(t){function e(n){const r=n;return q.
|
|
532
|
+
objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}t.is=e})(QD||(QD={}));var ZD;(function(t){function e(r,i){return{range:r,text:i}}t.create=e;function n(r){const i=r;return i!=null&&Ye.is(i.range)&&q.string(i.text)}t.is=n})(ZD||(ZD={}));var eR;(function(t){function e(r,i,s){return{range:r,variableName:i,caseSensitiveLookup:s}}t.create=e;function n(r){const i=r;return i!=null&&Ye.is(i.range)&&q.boolean(i.caseSensitiveLookup)&&
|
|
533
|
+
(q.string(i.variableName)||i.variableName===void 0)}t.is=n})(eR||(eR={}));var tR;(function(t){function e(r,i){return{range:r,expression:i}}t.create=e;function n(r){const i=r;return i!=null&&Ye.is(i.range)&&(q.string(i.expression)||i.expression===void 0)}t.is=n})(tR||(tR={}));var nR;(function(t){function e(r,i){return{frameId:r,stoppedLocation:i}}t.create=e;function n(r){const i=r;return q.defined(i)&&Ye.is(r.stoppedLocation)}t.is=n})(nR||(nR={}));var gy;(function(t){t.Type=1,t.Parameter=2;function e(n){
|
|
534
|
+
return n===1||n===2}t.is=e})(gy||(gy={}));var yy;(function(t){function e(r){return{value:r}}t.create=e;function n(r){const i=r;return q.objectLiteral(i)&&(i.tooltip===void 0||q.string(i.tooltip)||Hu.is(i.tooltip))&&(i.location===void 0||tp.is(i.location))&&(i.command===void 0||Vo.is(i.command))}t.is=n})(yy||(yy={}));var rR;(function(t){function e(r,i,s){const o={position:r,label:i};return s!==void 0&&(o.kind=s),o}t.create=e;function n(r){const i=r;return q.objectLiteral(i)&&st.is(i.position)&&(q.
|
|
535
|
+
string(i.label)||q.typedArray(i.label,yy.is))&&(i.kind===void 0||gy.is(i.kind))&&i.textEdits===void 0||q.typedArray(i.textEdits,Fn.is)&&(i.tooltip===void 0||q.string(i.tooltip)||Hu.is(i.tooltip))&&(i.paddingLeft===void 0||q.boolean(i.paddingLeft))&&(i.paddingRight===void 0||q.boolean(i.paddingRight))}t.is=n})(rR||(rR={}));var iR;(function(t){function e(n){return{kind:"snippet",value:n}}t.createSnippet=e})(iR||(iR={}));var sR;(function(t){function e(n,r,i,s){return{insertText:n,filterText:r,range:i,
|
|
536
|
+
command:s}}t.create=e})(sR||(sR={}));var oR;(function(t){function e(n){return{items:n}}t.create=e})(oR||(oR={}));var aR;(function(t){t.Invoked=0,t.Automatic=1})(aR||(aR={}));var uR;(function(t){function e(n,r){return{range:n,text:r}}t.create=e})(uR||(uR={}));var cR;(function(t){function e(n,r){return{triggerKind:n,selectedCompletionInfo:r}}t.create=e})(cR||(cR={}));var lR;(function(t){function e(n){const r=n;return q.objectLiteral(r)&&sy.is(r.uri)&&q.string(r.name)}t.is=e})(lR||(lR={}));var dR;(function(t){
|
|
537
|
+
function e(s,o,a,u){return new Nq(s,o,a,u)}t.create=e;function n(s){let o=s;return!!(q.defined(o)&&q.string(o.uri)&&(q.undefined(o.languageId)||q.string(o.languageId))&&q.uinteger(o.lineCount)&&q.func(o.getText)&&q.func(o.positionAt)&&q.func(o.offsetAt))}t.is=n;function r(s,o){let a=s.getText(),u=i(o,(l,f)=>{let d=l.range.start.line-f.range.start.line;return d===0?l.range.start.character-f.range.start.character:d}),c=a.length;for(let l=u.length-1;l>=0;l--){let f=u[l],d=s.offsetAt(f.range.start),
|
|
538
|
+
p=s.offsetAt(f.range.end);if(p<=c)a=a.substring(0,d)+f.newText+a.substring(p,a.length);else throw new Error("Overlapping edit");c=d}return a}t.applyEdits=r;function i(s,o){if(s.length<=1)return s;const a=s.length/2|0,u=s.slice(0,a),c=s.slice(a);i(u,o),i(c,o);let l=0,f=0,d=0;for(;l<u.length&&f<c.length;)o(u[l],c[f])<=0?s[d++]=u[l++]:s[d++]=c[f++];for(;l<u.length;)s[d++]=u[l++];for(;f<c.length;)s[d++]=c[f++];return s}})(dR||(dR={}));let Nq=class{constructor(e,n,r,i){this._uri=e,this._languageId=n,
|
|
539
|
+
this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let n=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(n,r)}return this._content}update(e,n){this._content=e.text,this._version=n,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],n=this._content,r=!0;for(let i=0;i<n.length;i++){r&&(e.push(i),r=!1);let s=n.charAt(
|
|
540
|
+
i);r=s==="\r"||s===`
|
|
541
|
+
`,s==="\r"&&i+1<n.length&&n.charAt(i+1)===`
|
|
542
|
+
`&&i++}r&&n.length>0&&e.push(n.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return st.create(0,e);for(;r<i;){let o=Math.floor((r+i)/2);n[o]>e?i=o:r=o+1}let s=r-1;return st.create(s,e-n[s])}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line],i=e.line+1<n.length?n[e.line+1]:this._content.length;return Math.
|
|
543
|
+
max(Math.min(r+e.character,i),r)}get lineCount(){return this.getLineOffsets().length}};var q;(function(t){const e=Object.prototype.toString;function n(p){return typeof p<"u"}t.defined=n;function r(p){return typeof p>"u"}t.undefined=r;function i(p){return p===!0||p===!1}t.boolean=i;function s(p){return e.call(p)==="[object String]"}t.string=s;function o(p){return e.call(p)==="[object Number]"}t.number=o;function a(p,h,v){return e.call(p)==="[object Number]"&&h<=p&&p<=v}t.numberRange=a;function u(p){
|
|
544
|
+
return e.call(p)==="[object Number]"&&-2147483648<=p&&p<=2147483647}t.integer=u;function c(p){return e.call(p)==="[object Number]"&&0<=p&&p<=2147483647}t.uinteger=c;function l(p){return e.call(p)==="[object Function]"}t.func=l;function f(p){return p!==null&&typeof p=="object"}t.objectLiteral=f;function d(p,h){return Array.isArray(p)&&p.every(h)}t.typedArray=d})(q||(q={}));class Iq{constructor(){this.nodeStack=[]}get current(){var e;return(e=this.nodeStack[this.nodeStack.length-1])!==null&&e!==void 0?
|
|
545
|
+
e:this.rootNode}buildRootNode(e){return this.rootNode=new pR(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){const n=new wy;return n.grammarSource=e,n.root=this.rootNode,this.current.content.push(n),this.nodeStack.push(n),n}buildLeafNode(e,n){const r=new vy(e.startOffset,e.image.length,Nm(e),e.tokenType,!n);return r.grammarSource=n,r.root=this.rootNode,this.current.content.push(r),r}removeNode(e){const n=e.container;if(n){const r=n.content.indexOf(
|
|
546
|
+
e);r>=0&&n.content.splice(r,1)}}addHiddenNodes(e){const n=[];for(const s of e){const o=new vy(s.startOffset,s.image.length,Nm(s),s.tokenType,!0);o.root=this.rootNode,n.push(o)}let r=this.current,i=!1;if(r.content.length>0){r.content.push(...n);return}for(;r.container;){const s=r.container.content.indexOf(r);if(s>0){r.container.content.splice(s,0,...n),i=!0;break}r=r.container}i||this.rootNode.content.unshift(...n)}construct(e){const n=this.current;typeof e.$type=="string"&&(this.current.astNode=
|
|
547
|
+
e),e.$cstNode=n;const r=this.nodeStack.pop();r?.content.length===0&&this.removeNode(r)}}class fR{get parent(){return this.container}get feature(){return this.grammarSource}get hidden(){return!1}get astNode(){var e,n;const r=typeof((e=this._astNode)===null||e===void 0?void 0:e.$type)=="string"?this._astNode:(n=this.container)===null||n===void 0?void 0:n.astNode;if(!r)throw new Error("This node has no associated AST element");return r}set astNode(e){this._astNode=e}get element(){return this.astNode}get text(){
|
|
548
|
+
return this.root.fullText.substring(this.offset,this.end)}}class vy extends fR{get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,n,r,i,s=!1){super(),this._hidden=s,this._offset=e,this._tokenType=i,this._length=n,this._range=r}}class wy extends fR{constructor(){super(...arguments),this.content=new ib(this)}get children(){return this.
|
|
549
|
+
content}get offset(){var e,n;return(n=(e=this.firstNonHiddenNode)===null||e===void 0?void 0:e.offset)!==null&&n!==void 0?n:0}get length(){return this.end-this.offset}get end(){var e,n;return(n=(e=this.lastNonHiddenNode)===null||e===void 0?void 0:e.end)!==null&&n!==void 0?n:0}get range(){const e=this.firstNonHiddenNode,n=this.lastNonHiddenNode;if(e&&n){if(this._rangeCache===void 0){const{range:r}=e,{range:i}=n;this._rangeCache={start:r.start,end:i.end.line<r.start.line?r.start:i.end}}return this.
|
|
550
|
+
_rangeCache}else return{start:st.create(0,0),end:st.create(0,0)}}get firstNonHiddenNode(){for(const e of this.content)if(!e.hidden)return e;return this.content[0]}get lastNonHiddenNode(){for(let e=this.content.length-1;e>=0;e--){const n=this.content[e];if(!n.hidden)return n}return this.content[this.content.length-1]}}class ib extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,ib.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.
|
|
551
|
+
addParents(e),super.unshift(...e)}splice(e,n,...r){return this.addParents(r),super.splice(e,n,...r)}addParents(e){for(const n of e)n.container=this.parent}}class pR extends wy{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}}const by=Symbol("Datatype");function Ey(t){return t.$type===by}const hR="\u200B",mR=t=>t.endsWith(hR)?t:t+hR;class gR{constructor(e){this._unorderedGroups=new Map,this.allRules=
|
|
552
|
+
new Map,this.lexer=e.parser.Lexer;const n=this.lexer.definition,r=e.LanguageMetaData.mode==="production";this.wrapper=new Bq(n,Object.assign(Object.assign({},e.parser.ParserConfig),{skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider}))}alternatives(e,n){this.wrapper.wrapOr(e,n)}optional(e,n){this.wrapper.wrapOption(e,n)}many(e,n){this.wrapper.wrapMany(e,n)}atLeastOne(e,n){this.wrapper.wrapAtLeastOne(e,n)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.
|
|
553
|
+
IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}}class Oq extends gR{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new Iq,this.stack=[],this.assignmentMap=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,n){const r=this.computeRuleType(e),i=this.wrapper.DEFINE_RULE(mR(
|
|
554
|
+
e.name),this.startImplementation(r,n).bind(this));return this.allRules.set(e.name,i),e.entry&&(this.mainRule=i),i}computeRuleType(e){if(!e.fragment){if(hf(e))return by;{const n=Rs(e);return n??e.name}}}parse(e,n={}){this.nodeBuilder.buildRootNode(e);const r=this.lexerResult=this.lexer.tokenize(e);this.wrapper.input=r.tokens;const i=n.rule?this.allRules.get(n.rule):this.mainRule;if(!i)throw new Error(n.rule?`No rule found with name '${n.rule}'`:"No main rule available.");const s=i.call(this.wrapper,
|
|
555
|
+
{});return this.nodeBuilder.addHiddenNodes(r.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,{value:s,lexerErrors:r.errors,lexerReport:r.report,parserErrors:this.wrapper.errors}}startImplementation(e,n){return r=>{const i=!this.isRecording()&&e!==void 0;if(i){const o={$type:e};this.stack.push(o),e===by&&(o.value="")}let s;try{s=n(r)}catch{s=void 0}return s===void 0&&i&&(s=this.construct()),s}}extractHiddenTokens(e){const n=this.lexerResult.hidden;if(!n.length)return[];const r=e.startOffset;
|
|
556
|
+
for(let i=0;i<n.length;i++)if(n[i].startOffset>r)return n.splice(0,i);return n.splice(0,n.length)}consume(e,n,r){const i=this.wrapper.wrapConsume(e,n);if(!this.isRecording()&&this.isValidToken(i)){const s=this.extractHiddenTokens(i);this.nodeBuilder.addHiddenNodes(s);const o=this.nodeBuilder.buildLeafNode(i,r),{assignment:a,isCrossRef:u}=this.getAssignment(r),c=this.current;if(a){const l=Ir(r)?i.image:this.converter.convert(i.image,o);this.assign(a.operator,a.feature,l,o,u)}else if(Ey(c)){let l=i.
|
|
557
|
+
image;Ir(r)||(l=this.converter.convert(l,o).toString()),c.value+=l}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset=="number"&&!isNaN(e.endOffset)}subrule(e,n,r,i,s){let o;!this.isRecording()&&!r&&(o=this.nodeBuilder.buildCompositeNode(i));const a=this.wrapper.wrapSubrule(e,n,s);!this.isRecording()&&o&&o.length>0&&this.performSubruleAssignment(a,i,o)}performSubruleAssignment(e,n,r){const{assignment:i,isCrossRef:s}=this.getAssignment(n);if(i)this.assign(i.
|
|
558
|
+
operator,i.feature,e,r,s);else if(!i){const o=this.current;if(Ey(o))o.value+=e.toString();else if(typeof e=="object"&&e){const u=this.assignWithoutOverride(e,o);this.stack.pop(),this.stack.push(u)}}}action(e,n){if(!this.isRecording()){let r=this.current;if(n.feature&&n.operator){r=this.construct(),this.nodeBuilder.removeNode(r.$cstNode),this.nodeBuilder.buildCompositeNode(n).content.push(r.$cstNode);const s={$type:e};this.stack.push(s),this.assign(n.operator,n.feature,r,r.$cstNode,!1)}else r.$type=
|
|
559
|
+
e}}construct(){if(this.isRecording())return;const e=this.current;return zm(e),this.nodeBuilder.construct(e),this.stack.pop(),Ey(e)?this.converter.convert(e.value,e.$cstNode):(Vm(this.astReflection,e),e)}getAssignment(e){if(!this.assignmentMap.has(e)){const n=wn(e,Nr);this.assignmentMap.set(e,{assignment:n,isCrossRef:n?au(n.terminal):!1})}return this.assignmentMap.get(e)}assign(e,n,r,i,s){const o=this.current;let a;switch(s&&typeof r=="string"?a=this.linker.buildReference(o,n,i,r):a=r,e){case"=":{
|
|
560
|
+
o[n]=a;break}case"?=":{o[n]=!0;break}case"+=":Array.isArray(o[n])||(o[n]=[]),o[n].push(a)}}assignWithoutOverride(e,n){for(const[i,s]of Object.entries(n)){const o=e[i];o===void 0?e[i]=s:Array.isArray(o)&&Array.isArray(s)&&(s.push(...o),e[i]=s)}const r=e.$cstNode;return r&&(r.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}}class Lq{buildMismatchTokenMessage(e){return Wo.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return Wo.buildNotAllInputParsedMessage(
|
|
561
|
+
e)}buildNoViableAltMessage(e){return Wo.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return Wo.buildEarlyExitMessage(e)}}class yR extends Lq{buildMismatchTokenMessage({expected:e,actual:n}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${n.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}}class Fq extends gR{constructor(){
|
|
562
|
+
super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();const n=this.lexer.tokenize(e,{mode:"partial"});return this.tokens=n.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,n){const r=this.wrapper.DEFINE_RULE(mR(e.name),this.startImplementation(
|
|
563
|
+
n).bind(this));return this.allRules.set(e.name,r),e.entry&&(this.mainRule=r),r}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return n=>{const r=this.keepStackSize();try{e(n)}finally{this.resetStackSize(r)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,n,r){
|
|
564
|
+
this.wrapper.wrapConsume(e,n),this.isRecording()||(this.lastElementStack=[...this.elementStack,r],this.nextTokenIndex=this.currIdx+1)}subrule(e,n,r,i,s){this.before(i),this.wrapper.wrapSubrule(e,n,s),this.after(i)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){const n=this.elementStack.lastIndexOf(e);n>=0&&this.elementStack.splice(n)}}get currIdx(){return this.wrapper.currIdx}}const Mq={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new yR};
|
|
565
|
+
class Bq extends Hj{constructor(e,n){const r=n&&"maxLookahead"in n;super(e,Object.assign(Object.assign(Object.assign({},Mq),{lookaheadStrategy:r?new Yg({maxLookahead:n.maxLookahead}):new pq({logging:n.skipValidations?()=>{}:void 0})}),n))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,n){return this.RULE(e,n)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,n){return this.consume(e,n)}wrapSubrule(e,n,r){return this.subrule(e,n,{ARGS:[r]})}wrapOr(e,n){this.or(e,n)}wrapOption(e,n){
|
|
566
|
+
this.option(e,n)}wrapMany(e,n){this.many(e,n)}wrapAtLeastOne(e,n){this.atLeastOne(e,n)}}function vR(t,e,n){return jq({parser:e,tokens:n,ruleNames:new Map},t),e}function jq(t,e){const n=Qm(e,!1),r=We(e.rules).filter(ln).filter(i=>n.has(i));for(const i of r){const s=Object.assign(Object.assign({},t),{consume:1,optional:1,subrule:1,many:1,or:1});t.parser.rule(i,Is(s,i.definition))}}function Is(t,e,n=!1){let r;if(Ir(e))r=Vq(t,e);else if(Ds(e))r=qq(t,e);else if(Nr(e))r=Is(t,e.terminal);else if(au(e))
|
|
567
|
+
r=wR(t,e);else if(Qr(e))r=Gq(t,e);else if(Um(e))r=Wq(t,e);else if(Wm(e))r=zq(t,e);else if(ji(e))r=Hq(t,e);else if(ON(e)){const i=t.consume++;r=()=>t.parser.consume(i,zi,e)}else throw new D0(e.$cstNode,`Unexpected element type: ${e.$type}`);return bR(t,n?void 0:sp(e),r,e.cardinality)}function qq(t,e){const n=Ru(e);return()=>t.parser.action(n,e)}function Gq(t,e){const n=e.rule.ref;if(ln(n)){const r=t.subrule++,i=n.fragment,s=e.arguments.length>0?Uq(n,e.arguments):()=>({});return o=>t.parser.subrule(
|
|
568
|
+
r,ER(t,n),i,e,s(o))}else if(Jr(n)){const r=t.consume++,i=$y(t,n.name);return()=>t.parser.consume(r,i,e)}else if(n)qa();else throw new D0(e.$cstNode,`Undefined rule: ${e.rule.$refText}`)}function Uq(t,e){const n=e.map(r=>ai(r.value));return r=>{const i={};for(let s=0;s<n.length;s++){const o=t.parameters[s],a=n[s];i[o.name]=a(r)}return i}}function ai(t){if(AN(t)){const e=ai(t.left),n=ai(t.right);return r=>e(r)||n(r)}else if(CN(t)){const e=ai(t.left),n=ai(t.right);return r=>e(r)&&n(r)}else if(SN(t)){
|
|
569
|
+
const e=ai(t.value);return n=>!e(n)}else if(_N(t)){const e=t.parameter.ref.name;return n=>n!==void 0&&n[e]===!0}else if(TN(t)){const e=!!t.true;return()=>e}qa()}function Wq(t,e){if(e.elements.length===1)return Is(t,e.elements[0]);{const n=[];for(const i of e.elements){const s={ALT:Is(t,i,!0)},o=sp(i);o&&(s.GATE=ai(o)),n.push(s)}const r=t.or++;return i=>t.parser.alternatives(r,n.map(s=>{const o={ALT:()=>s.ALT(i)},a=s.GATE;return a&&(o.GATE=()=>a(i)),o}))}}function zq(t,e){if(e.elements.length===1)
|
|
570
|
+
return Is(t,e.elements[0]);const n=[];for(const a of e.elements){const u={ALT:Is(t,a,!0)},c=sp(a);c&&(u.GATE=ai(c)),n.push(u)}const r=t.or++,i=(a,u)=>{const c=u.getRuleStack().join("-");return`uGroup_${a}_${c}`},s=a=>t.parser.alternatives(r,n.map((u,c)=>{const l={ALT:()=>!0},f=t.parser;l.ALT=()=>{if(u.ALT(a),!f.isRecording()){const p=i(r,f);f.unorderedGroups.get(p)||f.unorderedGroups.set(p,[]);const h=f.unorderedGroups.get(p);typeof h?.[c]>"u"&&(h[c]=!0)}};const d=u.GATE;return d?l.GATE=()=>d(a):
|
|
571
|
+
l.GATE=()=>{const p=f.unorderedGroups.get(i(r,f));return!p?.[c]},l})),o=bR(t,sp(e),s,"*");return a=>{o(a),t.parser.isRecording()||t.parser.unorderedGroups.delete(i(r,t.parser))}}function Hq(t,e){const n=e.elements.map(r=>Is(t,r));return r=>n.forEach(i=>i(r))}function sp(t){if(ji(t))return t.guardCondition}function wR(t,e,n=e.terminal){if(n)if(Qr(n)&&ln(n.rule.ref)){const r=n.rule.ref,i=t.subrule++;return s=>t.parser.subrule(i,ER(t,r),!1,e,s)}else if(Qr(n)&&Jr(n.rule.ref)){const r=t.consume++,i=$y(
|
|
572
|
+
t,n.rule.ref.name);return()=>t.parser.consume(r,i,e)}else if(Ir(n)){const r=t.consume++,i=$y(t,n.value);return()=>t.parser.consume(r,i,e)}else throw new Error("Could not build cross reference parser");else{if(!e.type.ref)throw new Error("Could not resolve reference to type: "+e.type.$refText);const r=rg(e.type.ref),i=r?.terminal;if(!i)throw new Error("Could not find name assignment for type: "+Ru(e.type.ref));return wR(t,e,i)}}function Vq(t,e){const n=t.consume++,r=t.tokens[e.value];if(!r)throw new Error(
|
|
573
|
+
"Could not find token for keyword: "+e.value);return()=>t.parser.consume(n,r,e)}function bR(t,e,n,r){const i=e&&ai(e);if(!r)if(i){const s=t.or++;return o=>t.parser.alternatives(s,[{ALT:()=>n(o),GATE:()=>i(o)},{ALT:nD(),GATE:()=>!i(o)}])}else return n;if(r==="*"){const s=t.many++;return o=>t.parser.many(s,{DEF:()=>n(o),GATE:i?()=>i(o):void 0})}else if(r==="+"){const s=t.many++;if(i){const o=t.or++;return a=>t.parser.alternatives(o,[{ALT:()=>t.parser.atLeastOne(s,{DEF:()=>n(a)}),GATE:()=>i(a)},{ALT:nD(),
|
|
574
|
+
GATE:()=>!i(a)}])}else return o=>t.parser.atLeastOne(s,{DEF:()=>n(o)})}else if(r==="?"){const s=t.optional++;return o=>t.parser.optional(s,{DEF:()=>n(o),GATE:i?()=>i(o):void 0})}else qa()}function ER(t,e){const n=Kq(t,e),r=t.parser.getRule(n);if(!r)throw new Error(`Rule "${n}" not found."`);return r}function Kq(t,e){if(ln(e))return e.name;if(t.ruleNames.has(e))return t.ruleNames.get(e);{let n=e,r=n.$container,i=e.$type;for(;!ln(r);)(ji(r)||Um(r)||Wm(r))&&(i=r.elements.indexOf(n).toString()+":"+i),
|
|
575
|
+
n=r,r=r.$container;return i=r.name+":"+i,t.ruleNames.set(e,i),i}}function $y(t,e){const n=t.tokens[e];if(!n)throw new Error(`Token "${e}" not found."`);return n}function Xq(t){const e=t.Grammar,n=t.parser.Lexer,r=new Fq(t);return vR(e,r,n.definition),r.finalize(),r}function Yq(t){const e=Jq(t);return e.finalize(),e}function Jq(t){const e=t.Grammar,n=t.parser.Lexer,r=new Oq(t);return vR(e,r,n.definition)}class Qq{constructor(){this.diagnostics=[]}buildTokens(e,n){const r=We(Qm(e,!1)),i=this.buildTerminalTokens(
|
|
576
|
+
r),s=this.buildKeywordTokens(r,i,n);return i.forEach(o=>{const a=o.PATTERN;typeof a=="object"&&a&&"test"in a&&Jm(a)?s.unshift(o):s.push(o)}),s}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){const e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(Jr).filter(n=>!n.fragment).map(n=>this.buildTerminalToken(n)).toArray()}buildTerminalToken(e){const n=ku(e),r=this.requiresCustomPattern(n)?this.regexPatternFunction(n):n,i={name:e.
|
|
577
|
+
name,PATTERN:r};return typeof r=="function"&&(i.LINE_BREAKS=!0),e.hidden&&(i.GROUP=Jm(n)?Ln.SKIPPED:"hidden"),i}requiresCustomPattern(e){return e.flags.includes("u")||e.flags.includes("s")?!0:!!(e.source.includes("?<=")||e.source.includes("?<!"))}regexPatternFunction(e){const n=new RegExp(e,e.flags+"y");return(r,i)=>(n.lastIndex=i,n.exec(r))}buildKeywordTokens(e,n,r){return e.filter(ln).flatMap(i=>Or(i).filter(Ir)).distinct(i=>i.value).toArray().sort((i,s)=>s.value.length-i.value.length).map(i=>this.
|
|
578
|
+
buildKeywordToken(i,n,!!r?.caseInsensitive))}buildKeywordToken(e,n,r){const i=this.buildKeywordPattern(e,r),s={name:e.value,PATTERN:i,LONGER_ALT:this.findLongerAlt(e,n)};return typeof i=="function"&&(s.LINE_BREAKS=!0),s}buildKeywordPattern(e,n){return n?new RegExp(YN(e.value)):e.value}findLongerAlt(e,n){return n.reduce((r,i)=>{const s=i?.PATTERN;return s?.source&&JN("^"+s.source+"$",e.value)&&r.push(i),r},[])}}class Zq{convert(e,n){let r=n.grammarSource;if(au(r)&&(r=Zm(r)),Qr(r)){const i=r.rule.
|
|
579
|
+
ref;if(!i)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(i,e,n)}return e}runConverter(e,n,r){var i;switch(e.name.toUpperCase()){case"INT":return ui.convertInt(n);case"STRING":return ui.convertString(n);case"ID":return ui.convertID(n)}switch((i=W0(e))===null||i===void 0?void 0:i.toLowerCase()){case"number":return ui.convertNumber(n);case"boolean":return ui.convertBoolean(n);case"bigint":return ui.convertBigint(n);case"date":return ui.convertDate(n);default:return n}}}
|
|
580
|
+
var ui;(function(t){function e(c){let l="";for(let f=1;f<c.length-1;f++){const d=c.charAt(f);if(d==="\\"){const p=c.charAt(++f);l+=n(p)}else l+=d}return l}t.convertString=e;function n(c){switch(c){case"b":return"\b";case"f":return"\f";case"n":return`
|
|
581
|
+
`;case"r":return"\r";case"t":return" ";case"v":return"\v";case"0":return"\0";default:return c}}function r(c){return c.charAt(0)==="^"?c.substring(1):c}t.convertID=r;function i(c){return parseInt(c)}t.convertInt=i;function s(c){return BigInt(c)}t.convertBigint=s;function o(c){return new Date(c)}t.convertDate=o;function a(c){return Number(c)}t.convertNumber=a;function u(c){return c.toLowerCase()==="true"}t.convertBoolean=u})(ui||(ui={}));var Os={},op={},$R;function Ls(){if($R)return op;$R=1,Object.
|
|
582
|
+
defineProperty(op,"__esModule",{value:!0});let t;function e(){if(t===void 0)throw new Error("No runtime abstraction layer installed");return t}return function(n){function r(i){if(i===void 0)throw new Error("No runtime abstraction layer provided");t=i}n.install=r}(e||(e={})),op.default=e,op}var on={},DR;function Vu(){if(DR)return on;DR=1,Object.defineProperty(on,"__esModule",{value:!0}),on.stringArray=on.array=on.func=on.error=on.number=on.string=on.boolean=void 0;function t(a){return a===!0||a===
|
|
583
|
+
!1}on.boolean=t;function e(a){return typeof a=="string"||a instanceof String}on.string=e;function n(a){return typeof a=="number"||a instanceof Number}on.number=n;function r(a){return a instanceof Error}on.error=r;function i(a){return typeof a=="function"}on.func=i;function s(a){return Array.isArray(a)}on.array=s;function o(a){return s(a)&&a.every(u=>e(u))}return on.stringArray=o,on}var Fs={},RR;function Xo(){if(RR)return Fs;RR=1,Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.Emitter=Fs.Event=
|
|
584
|
+
void 0;const t=Ls();var e;(function(i){const s={dispose(){}};i.None=function(){return s}})(e||(Fs.Event=e={}));class n{add(s,o=null,a){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(s),this._contexts.push(o),Array.isArray(a)&&a.push({dispose:()=>this.remove(s,o)})}remove(s,o=null){if(!this._callbacks)return;let a=!1;for(let u=0,c=this._callbacks.length;u<c;u++)if(this._callbacks[u]===s)if(this._contexts[u]===o){this._callbacks.splice(u,1),this._contexts.splice(u,1);
|
|
585
|
+
return}else a=!0;if(a)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...s){if(!this._callbacks)return[];const o=[],a=this._callbacks.slice(0),u=this._contexts.slice(0);for(let c=0,l=a.length;c<l;c++)try{o.push(a[c].apply(u[c],s))}catch(f){(0,t.default)().console.error(f)}return o}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}}class r{constructor(s){this._options=s}get event(){
|
|
586
|
+
return this._event||(this._event=(s,o,a)=>{this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(s,o);const u={dispose:()=>{this._callbacks&&(this._callbacks.remove(s,o),u.dispose=r._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(a)&&a.push(u),u}),this._event}fire(s){this._callbacks&&
|
|
587
|
+
this._callbacks.invoke.call(this._callbacks,s)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}return Fs.Emitter=r,r._noop=function(){},Fs}var kR;function ap(){if(kR)return Os;kR=1,Object.defineProperty(Os,"__esModule",{value:!0}),Os.CancellationTokenSource=Os.CancellationToken=void 0;const t=Ls(),e=Vu(),n=Xo();var r;(function(a){a.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.Event.None}),a.Cancelled=Object.freeze({isCancellationRequested:!0,
|
|
588
|
+
onCancellationRequested:n.Event.None});function u(c){const l=c;return l&&(l===a.None||l===a.Cancelled||e.boolean(l.isCancellationRequested)&&!!l.onCancellationRequested)}a.is=u})(r||(Os.CancellationToken=r={}));const i=Object.freeze(function(a,u){const c=(0,t.default)().timer.setTimeout(a.bind(u),0);return{dispose(){c.dispose()}}});class s{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){
|
|
589
|
+
return this._isCancelled}get onCancellationRequested(){return this._isCancelled?i:(this._emitter||(this._emitter=new n.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}class o{get token(){return this._token||(this._token=new s),this._token}cancel(){this._token?this._token.cancel():this._token=r.Cancelled}dispose(){this._token?this._token instanceof s&&this._token.dispose():this._token=r.None}}return Os.CancellationTokenSource=o,Os}var ft=ap();
|
|
590
|
+
function eG(){return new Promise(t=>{typeof setImmediate>"u"?setTimeout(t,0):setImmediate(t)})}let up=0,tG=10;function nG(){return up=performance.now(),new ft.CancellationTokenSource}const cp=Symbol("OperationCancelled");function lp(t){return t===cp}async function jt(t){if(t===ft.CancellationToken.None)return;const e=performance.now();if(e-up>=tG&&(up=e,await eG(),up=performance.now()),t.isCancellationRequested)throw cp}class Dy{constructor(){this.promise=new Promise((e,n)=>{this.resolve=r=>(e(r),
|
|
591
|
+
this),this.reject=r=>(n(r),this)})}}class jd{constructor(e,n,r,i){this._uri=e,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const n=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(n,r)}return this._content}update(e,n){for(const r of e)if(jd.isIncremental(r)){const i=AR(r.range),s=this.offsetAt(i.start),o=this.offsetAt(i.
|
|
592
|
+
end);this._content=this._content.substring(0,s)+r.text+this._content.substring(o,this._content.length);const a=Math.max(i.start.line,0),u=Math.max(i.end.line,0);let c=this._lineOffsets;const l=TR(r.text,!1,s);if(u-a===l.length)for(let d=0,p=l.length;d<p;d++)c[d+a+1]=l[d];else l.length<1e4?c.splice(a+1,u-a,...l):this._lineOffsets=c=c.slice(0,a+1).concat(l,c.slice(u+1));const f=r.text.length-(o-s);if(f!==0)for(let d=a+1+l.length,p=c.length;d<p;d++)c[d]=c[d]+f}else if(jd.isFull(r))this._content=r.text,
|
|
593
|
+
this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=TR(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);const n=this.getLineOffsets();let r=0,i=n.length;if(i===0)return{line:0,character:e};for(;r<i;){const o=Math.floor((r+i)/2);n[o]>e?i=o:r=o+1}const s=r-1;return e=this.ensureBeforeEOL(e,n[s]),{line:s,character:e-n[s]}}offsetAt(e){const n=this.
|
|
594
|
+
getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;const r=n[e.line];if(e.character<=0)return r;const i=e.line+1<n.length?n[e.line+1]:this._content.length,s=Math.min(r+e.character,i);return this.ensureBeforeEOL(s,r)}ensureBeforeEOL(e,n){for(;e>n&&CR(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const n=e;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||
|
|
595
|
+
typeof n.rangeLength=="number")}static isFull(e){const n=e;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}}var dp;(function(t){function e(i,s,o,a){return new jd(i,s,o,a)}t.create=e;function n(i,s,o){if(i instanceof jd)return i.update(s,o),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=n;function r(i,s){const o=i.getText(),a=Ry(s.map(rG),(l,f)=>{const d=l.range.start.line-f.range.start.line;return d===0?l.range.
|
|
596
|
+
start.character-f.range.start.character:d});let u=0;const c=[];for(const l of a){const f=i.offsetAt(l.range.start);if(f<u)throw new Error("Overlapping edit");f>u&&c.push(o.substring(u,f)),l.newText.length&&c.push(l.newText),u=i.offsetAt(l.range.end)}return c.push(o.substr(u)),c.join("")}t.applyEdits=r})(dp||(dp={}));function Ry(t,e){if(t.length<=1)return t;const n=t.length/2|0,r=t.slice(0,n),i=t.slice(n);Ry(r,e),Ry(i,e);let s=0,o=0,a=0;for(;s<r.length&&o<i.length;)e(r[s],i[o])<=0?t[a++]=r[s++]:t[a++]=
|
|
597
|
+
i[o++];for(;s<r.length;)t[a++]=r[s++];for(;o<i.length;)t[a++]=i[o++];return t}function TR(t,e,n=0){const r=e?[n]:[];for(let i=0;i<t.length;i++){const s=t.charCodeAt(i);CR(s)&&(s===13&&i+1<t.length&&t.charCodeAt(i+1)===10&&i++,r.push(n+i+1))}return r}function CR(t){return t===13||t===10}function AR(t){const e=t.start,n=t.end;return e.line>n.line||e.line===n.line&&e.character>n.character?{start:n,end:e}:t}function rG(t){const e=AR(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var SR;(()=>{
|
|
598
|
+
var t={975:B=>{function T(S){if(typeof S!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(S))}function D(S,P){for(var O,Z="",H=0,C=-1,ne=0,ye=0;ye<=S.length;++ye){if(ye<S.length)O=S.charCodeAt(ye);else{if(O===47)break;O=47}if(O===47){if(!(C===ye-1||ne===1))if(C!==ye-1&&ne===2){if(Z.length<2||H!==2||Z.charCodeAt(Z.length-1)!==46||Z.charCodeAt(Z.length-2)!==46){if(Z.length>2){var Pe=Z.lastIndexOf("/");if(Pe!==Z.length-1){Pe===-1?(Z="",H=0):H=(Z=Z.slice(0,Pe)).length-
|
|
599
|
+
1-Z.lastIndexOf("/"),C=ye,ne=0;continue}}else if(Z.length===2||Z.length===1){Z="",H=0,C=ye,ne=0;continue}}P&&(Z.length>0?Z+="/..":Z="..",H=2)}else Z.length>0?Z+="/"+S.slice(C+1,ye):Z=S.slice(C+1,ye),H=ye-C-1;C=ye,ne=0}else O===46&&ne!==-1?++ne:ne=-1}return Z}var M={resolve:function(){for(var S,P="",O=!1,Z=arguments.length-1;Z>=-1&&!O;Z--){var H;Z>=0?H=arguments[Z]:(S===void 0&&(S=process.cwd()),H=S),T(H),H.length!==0&&(P=H+"/"+P,O=H.charCodeAt(0)===47)}return P=D(P,!O),O?P.length>0?"/"+P:"/":P.length>
|
|
600
|
+
0?P:"."},normalize:function(S){if(T(S),S.length===0)return".";var P=S.charCodeAt(0)===47,O=S.charCodeAt(S.length-1)===47;return(S=D(S,!P)).length!==0||P||(S="."),S.length>0&&O&&(S+="/"),P?"/"+S:S},isAbsolute:function(S){return T(S),S.length>0&&S.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var S,P=0;P<arguments.length;++P){var O=arguments[P];T(O),O.length>0&&(S===void 0?S=O:S+="/"+O)}return S===void 0?".":M.normalize(S)},relative:function(S,P){if(T(S),T(P),S===P||(S=
|
|
601
|
+
M.resolve(S))===(P=M.resolve(P)))return"";for(var O=1;O<S.length&&S.charCodeAt(O)===47;++O);for(var Z=S.length,H=Z-O,C=1;C<P.length&&P.charCodeAt(C)===47;++C);for(var ne=P.length-C,ye=H<ne?H:ne,Pe=-1,F=0;F<=ye;++F){if(F===ye){if(ne>ye){if(P.charCodeAt(C+F)===47)return P.slice(C+F+1);if(F===0)return P.slice(C+F)}else H>ye&&(S.charCodeAt(O+F)===47?Pe=F:F===0&&(Pe=0));break}var V=S.charCodeAt(O+F);if(V!==P.charCodeAt(C+F))break;V===47&&(Pe=F)}var Se="";for(F=O+Pe+1;F<=Z;++F)F!==Z&&S.charCodeAt(F)!==
|
|
602
|
+
47||(Se.length===0?Se+="..":Se+="/..");return Se.length>0?Se+P.slice(C+Pe):(C+=Pe,P.charCodeAt(C)===47&&++C,P.slice(C))},_makeLong:function(S){return S},dirname:function(S){if(T(S),S.length===0)return".";for(var P=S.charCodeAt(0),O=P===47,Z=-1,H=!0,C=S.length-1;C>=1;--C)if((P=S.charCodeAt(C))===47){if(!H){Z=C;break}}else H=!1;return Z===-1?O?"/":".":O&&Z===1?"//":S.slice(0,Z)},basename:function(S,P){if(P!==void 0&&typeof P!="string")throw new TypeError('"ext" argument must be a string');T(S);var O,
|
|
603
|
+
Z=0,H=-1,C=!0;if(P!==void 0&&P.length>0&&P.length<=S.length){if(P.length===S.length&&P===S)return"";var ne=P.length-1,ye=-1;for(O=S.length-1;O>=0;--O){var Pe=S.charCodeAt(O);if(Pe===47){if(!C){Z=O+1;break}}else ye===-1&&(C=!1,ye=O+1),ne>=0&&(Pe===P.charCodeAt(ne)?--ne==-1&&(H=O):(ne=-1,H=ye))}return Z===H?H=ye:H===-1&&(H=S.length),S.slice(Z,H)}for(O=S.length-1;O>=0;--O)if(S.charCodeAt(O)===47){if(!C){Z=O+1;break}}else H===-1&&(C=!1,H=O+1);return H===-1?"":S.slice(Z,H)},extname:function(S){T(S);for(var P=-1,
|
|
604
|
+
O=0,Z=-1,H=!0,C=0,ne=S.length-1;ne>=0;--ne){var ye=S.charCodeAt(ne);if(ye!==47)Z===-1&&(H=!1,Z=ne+1),ye===46?P===-1?P=ne:C!==1&&(C=1):P!==-1&&(C=-1);else if(!H){O=ne+1;break}}return P===-1||Z===-1||C===0||C===1&&P===Z-1&&P===O+1?"":S.slice(P,Z)},format:function(S){if(S===null||typeof S!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof S);return function(P,O){var Z=O.dir||O.root,H=O.base||(O.name||"")+(O.ext||"");return Z?Z===O.root?Z+H:Z+"/"+
|
|
605
|
+
H:H}(0,S)},parse:function(S){T(S);var P={root:"",dir:"",base:"",ext:"",name:""};if(S.length===0)return P;var O,Z=S.charCodeAt(0),H=Z===47;H?(P.root="/",O=1):O=0;for(var C=-1,ne=0,ye=-1,Pe=!0,F=S.length-1,V=0;F>=O;--F)if((Z=S.charCodeAt(F))!==47)ye===-1&&(Pe=!1,ye=F+1),Z===46?C===-1?C=F:V!==1&&(V=1):C!==-1&&(V=-1);else if(!Pe){ne=F+1;break}return C===-1||ye===-1||V===0||V===1&&C===ye-1&&C===ne+1?ye!==-1&&(P.base=P.name=ne===0&&H?S.slice(1,ye):S.slice(ne,ye)):(ne===0&&H?(P.name=S.slice(1,C),P.base=
|
|
606
|
+
S.slice(1,ye)):(P.name=S.slice(ne,C),P.base=S.slice(ne,ye)),P.ext=S.slice(C,ye)),ne>0?P.dir=S.slice(0,ne-1):H&&(P.dir="/"),P},sep:"/",delimiter:":",win32:null,posix:null};M.posix=M,B.exports=M}},e={};function n(B){var T=e[B];if(T!==void 0)return T.exports;var D=e[B]={exports:{}};return t[B](D,D.exports,n),D.exports}n.d=(B,T)=>{for(var D in T)n.o(T,D)&&!n.o(B,D)&&Object.defineProperty(B,D,{enumerable:!0,get:T[D]})},n.o=(B,T)=>Object.prototype.hasOwnProperty.call(B,T),n.r=B=>{typeof Symbol<"u"&&Symbol.
|
|
607
|
+
toStringTag&&Object.defineProperty(B,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(B,"__esModule",{value:!0})};var r={};let i;n.r(r),n.d(r,{URI:()=>d,Utils:()=>we}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);const s=/^\w[\w\d+.-]*$/,o=/^\//,a=/^\/\//;function u(B,T){if(!B.scheme&&T)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${B.authority}", path: "${B.path}", query: "${B.
|
|
608
|
+
query}", fragment: "${B.fragment}"}`);if(B.scheme&&!s.test(B.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(B.path){if(B.authority){if(!o.test(B.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(B.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}
|
|
609
|
+
const c="",l="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static isUri(T){return T instanceof d||!!T&&typeof T.authority=="string"&&typeof T.fragment=="string"&&typeof T.path=="string"&&typeof T.query=="string"&&typeof T.scheme=="string"&&typeof T.fsPath=="string"&&typeof T.with=="function"&&typeof T.toString=="function"}scheme;authority;path;query;fragment;constructor(T,D,M,S,P,O=!1){typeof T=="object"?(this.scheme=T.scheme||c,this.authority=T.authority||c,this.path=
|
|
610
|
+
T.path||c,this.query=T.query||c,this.fragment=T.fragment||c):(this.scheme=function(Z,H){return Z||H?Z:"file"}(T,O),this.authority=D||c,this.path=function(Z,H){switch(Z){case"https":case"http":case"file":H?H[0]!==l&&(H=l+H):H=l}return H}(this.scheme,M||c),this.query=S||c,this.fragment=P||c,u(this,O))}get fsPath(){return E(this)}with(T){if(!T)return this;let{scheme:D,authority:M,path:S,query:P,fragment:O}=T;return D===void 0?D=this.scheme:D===null&&(D=c),M===void 0?M=this.authority:M===null&&(M=c),
|
|
611
|
+
S===void 0?S=this.path:S===null&&(S=c),P===void 0?P=this.query:P===null&&(P=c),O===void 0?O=this.fragment:O===null&&(O=c),D===this.scheme&&M===this.authority&&S===this.path&&P===this.query&&O===this.fragment?this:new h(D,M,S,P,O)}static parse(T,D=!1){const M=f.exec(T);return M?new h(M[2]||c,K(M[4]||c),K(M[5]||c),K(M[7]||c),K(M[9]||c),D):new h(c,c,c,c,c)}static file(T){let D=c;if(i&&(T=T.replace(/\\/g,l)),T[0]===l&&T[1]===l){const M=T.indexOf(l,2);M===-1?(D=T.substring(2),T=l):(D=T.substring(2,M),
|
|
612
|
+
T=T.substring(M)||l)}return new h("file",D,T,c,c)}static from(T){const D=new h(T.scheme,T.authority,T.path,T.query,T.fragment);return u(D,!0),D}toString(T=!1){return R(this,T)}toJSON(){return this}static revive(T){if(T){if(T instanceof d)return T;{const D=new h(T);return D._formatted=T.external,D._fsPath=T._sep===p?T.fsPath:null,D}}return T}}const p=i?1:void 0;class h extends d{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=E(this)),this._fsPath}toString(T=!1){return T?
|
|
613
|
+
R(this,!0):(this._formatted||(this._formatted=R(this,!1)),this._formatted)}toJSON(){const T={$mid:1};return this._fsPath&&(T.fsPath=this._fsPath,T._sep=p),this._formatted&&(T.external=this._formatted),this.path&&(T.path=this.path),this.scheme&&(T.scheme=this.scheme),this.authority&&(T.authority=this.authority),this.query&&(T.query=this.query),this.fragment&&(T.fragment=this.fragment),T}}const v={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"\
|
|
614
|
+
%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function b(B,T,D){let M,S=-1;for(let P=0;P<B.length;P++){const O=B.charCodeAt(P);if(O>=97&&O<=122||O>=65&&O<=90||O>=48&&O<=57||O===45||O===46||O===95||O===126||T&&O===47||D&&O===91||D&&O===93||D&&O===58)S!==-1&&(M+=encodeURIComponent(B.substring(S,P)),S=-1),M!==void 0&&(M+=B.charAt(P));else{M===void 0&&(M=B.substr(0,P));const Z=v[O];Z!==void 0?(S!==-1&&(M+=encodeURIComponent(B.substring(S,P)),S=-1),M+=Z):S===-1&&(S=P)}}return S!==
|
|
615
|
+
-1&&(M+=encodeURIComponent(B.substring(S))),M!==void 0?M:B}function y(B){let T;for(let D=0;D<B.length;D++){const M=B.charCodeAt(D);M===35||M===63?(T===void 0&&(T=B.substr(0,D)),T+=v[M]):T!==void 0&&(T+=B[D])}return T!==void 0?T:B}function E(B,T){let D;return D=B.authority&&B.path.length>1&&B.scheme==="file"?`//${B.authority}${B.path}`:B.path.charCodeAt(0)===47&&(B.path.charCodeAt(1)>=65&&B.path.charCodeAt(1)<=90||B.path.charCodeAt(1)>=97&&B.path.charCodeAt(1)<=122)&&B.path.charCodeAt(2)===58?B.path[1].
|
|
616
|
+
toLowerCase()+B.path.substr(2):B.path,i&&(D=D.replace(/\//g,"\\")),D}function R(B,T){const D=T?y:b;let M="",{scheme:S,authority:P,path:O,query:Z,fragment:H}=B;if(S&&(M+=S,M+=":"),(P||S==="file")&&(M+=l,M+=l),P){let C=P.indexOf("@");if(C!==-1){const ne=P.substr(0,C);P=P.substr(C+1),C=ne.lastIndexOf(":"),C===-1?M+=D(ne,!1,!1):(M+=D(ne.substr(0,C),!1,!1),M+=":",M+=D(ne.substr(C+1),!1,!0)),M+="@"}P=P.toLowerCase(),C=P.lastIndexOf(":"),C===-1?M+=D(P,!1,!0):(M+=D(P.substr(0,C),!1,!0),M+=P.substr(C))}if(O){
|
|
617
|
+
if(O.length>=3&&O.charCodeAt(0)===47&&O.charCodeAt(2)===58){const C=O.charCodeAt(1);C>=65&&C<=90&&(O=`/${String.fromCharCode(C+32)}:${O.substr(3)}`)}else if(O.length>=2&&O.charCodeAt(1)===58){const C=O.charCodeAt(0);C>=65&&C<=90&&(O=`${String.fromCharCode(C+32)}:${O.substr(2)}`)}M+=D(O,!0,!1)}return Z&&(M+="?",M+=D(Z,!1,!1)),H&&(M+="#",M+=T?H:b(H,!1,!1)),M}function A(B){try{return decodeURIComponent(B)}catch{return B.length>3?B.substr(0,3)+A(B.substr(3)):B}}const N=/(%[0-9A-Za-z][0-9A-Za-z])+/g;
|
|
618
|
+
function K(B){return B.match(N)?B.replace(N,T=>A(T)):B}var J=n(975);const se=J.posix||J,ie="/";var we;(function(B){B.joinPath=function(T,...D){return T.with({path:se.join(T.path,...D)})},B.resolvePath=function(T,...D){let M=T.path,S=!1;M[0]!==ie&&(M=ie+M,S=!0);let P=se.resolve(M,...D);return S&&P[0]===ie&&!T.authority&&(P=P.substring(1)),T.with({path:P})},B.dirname=function(T){if(T.path.length===0||T.path===ie)return T;let D=se.dirname(T.path);return D.length===1&&D.charCodeAt(0)===46&&(D=""),T.
|
|
619
|
+
with({path:D})},B.basename=function(T){return se.basename(T.path)},B.extname=function(T){return se.extname(T.path)}})(we||(we={})),SR=r})();const{URI:Et,Utils:Ku}=SR;var pt;(function(t){t.basename=Ku.basename,t.dirname=Ku.dirname,t.extname=Ku.extname,t.joinPath=Ku.joinPath,t.resolvePath=Ku.resolvePath;const e=typeof process=="object"&&(process==null?void 0:process.platform)==="win32";function n(s,o){return s?.toString()===o?.toString()}t.equals=n;function r(s,o){const a=typeof s=="string"?Et.parse(
|
|
620
|
+
s).path:s.path,u=typeof o=="string"?Et.parse(o).path:o.path,c=a.split("/").filter(h=>h.length>0),l=u.split("/").filter(h=>h.length>0);if(e){const h=/^[A-Z]:$/;if(c[0]&&h.test(c[0])&&(c[0]=c[0].toLowerCase()),l[0]&&h.test(l[0])&&(l[0]=l[0].toLowerCase()),c[0]!==l[0])return u.substring(1)}let f=0;for(;f<c.length&&c[f]===l[f];f++);const d="../".repeat(c.length-f),p=l.slice(f).join("/");return d+p}t.relative=r;function i(s){return Et.parse(s.toString()).toString()}t.normalize=i})(pt||(pt={}));var qe;
|
|
621
|
+
(function(t){t[t.Changed=0]="Changed",t[t.Parsed=1]="Parsed",t[t.IndexedContent=2]="IndexedContent",t[t.ComputedScopes=3]="ComputedScopes",t[t.Linked=4]="Linked",t[t.IndexedReferences=5]="IndexedReferences",t[t.Validated=6]="Validated"})(qe||(qe={}));class iG{constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,n=ft.CancellationToken.None){const r=await this.fileSystemProvider.readFile(
|
|
622
|
+
e);return this.createAsync(e,r,n)}fromTextDocument(e,n,r){return n=n??Et.parse(e.uri),ft.CancellationToken.is(r)?this.createAsync(n,e,r):this.create(n,e,r)}fromString(e,n,r){return ft.CancellationToken.is(r)?this.createAsync(n,e,r):this.create(n,e,r)}fromModel(e,n){return this.create(n,{$model:e})}create(e,n,r){if(typeof n=="string"){const i=this.parse(e,n,r);return this.createLangiumDocument(i,e,void 0,n)}else if("$model"in n){const i={value:n.$model,parserErrors:[],lexerErrors:[]};return this.
|
|
623
|
+
createLangiumDocument(i,e)}else{const i=this.parse(e,n.getText(),r);return this.createLangiumDocument(i,e,n)}}async createAsync(e,n,r){if(typeof n=="string"){const i=await this.parseAsync(e,n,r);return this.createLangiumDocument(i,e,void 0,n)}else{const i=await this.parseAsync(e,n.getText(),r);return this.createLangiumDocument(i,e,n)}}createLangiumDocument(e,n,r,i){let s;if(r)s={parseResult:e,uri:n,state:qe.Parsed,references:[],textDocument:r};else{const o=this.createTextDocumentGetter(n,i);s={parseResult:e,
|
|
624
|
+
uri:n,state:qe.Parsed,references:[],get textDocument(){return o()}}}return e.value.$document=s,s}async update(e,n){var r,i;const s=(r=e.parseResult.value.$cstNode)===null||r===void 0?void 0:r.root.fullText,o=(i=this.textDocuments)===null||i===void 0?void 0:i.get(e.uri.toString()),a=o?o.getText():await this.fileSystemProvider.readFile(e.uri);if(o)Object.defineProperty(e,"textDocument",{value:o});else{const u=this.createTextDocumentGetter(e.uri,a);Object.defineProperty(e,"textDocument",{get:u})}return s!==
|
|
625
|
+
a&&(e.parseResult=await this.parseAsync(e.uri,a,n),e.parseResult.value.$document=e),e.state=qe.Parsed,e}parse(e,n,r){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(n,r)}parseAsync(e,n,r){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(n,r)}createTextDocumentGetter(e,n){const r=this.serviceRegistry;let i;return()=>i??(i=dp.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,n??""))}}class _R{constructor(e){this.documentMap=new Map,this.langiumDocumentFactory=
|
|
626
|
+
e.workspace.LangiumDocumentFactory,this.serviceRegistry=e.ServiceRegistry}get all(){return We(this.documentMap.values())}addDocument(e){const n=e.uri.toString();if(this.documentMap.has(n))throw new Error(`A document with the URI '${n}' is already present.`);this.documentMap.set(n,e)}getDocument(e){const n=e.toString();return this.documentMap.get(n)}async getOrCreateDocument(e,n){let r=this.getDocument(e);return r||(r=await this.langiumDocumentFactory.fromUri(e,n),this.addDocument(r),r)}createDocument(e,n,r){
|
|
627
|
+
if(r)return this.langiumDocumentFactory.fromString(n,e,r).then(i=>(this.addDocument(i),i));{const i=this.langiumDocumentFactory.fromString(n,e);return this.addDocument(i),i}}hasDocument(e){return this.documentMap.has(e.toString())}invalidateDocument(e){const n=e.toString(),r=this.documentMap.get(n);return r&&(this.serviceRegistry.getServices(e).references.Linker.unlink(r),r.state=qe.Changed,r.precomputedScopes=void 0,r.diagnostics=void 0),r}deleteDocument(e){const n=e.toString(),r=this.documentMap.
|
|
628
|
+
get(n);return r&&(r.state=qe.Changed,this.documentMap.delete(n)),r}}const ky=Symbol("ref_resolving");class sG{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator}async link(e,n=ft.CancellationToken.None){for(const r of Zr(e.parseResult.value))await jt(n),af(r).forEach(i=>this.doLink(i,e))}doLink(e,n){var r;const i=e.reference;if(i._ref===void 0){
|
|
629
|
+
i._ref=ky;try{const s=this.getCandidate(e);if(Vd(s))i._ref=s;else if(i._nodeDescription=s,this.langiumDocuments().hasDocument(s.documentUri)){const o=this.loadAstNode(s);i._ref=o??this.createLinkingError(e,s)}else i._ref=void 0}catch(s){console.error(`An error occurred while resolving reference to '${i.$refText}':`,s);const o=(r=s.message)!==null&&r!==void 0?r:String(s);i._ref=Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to '${i.$refText}': ${o}`})}n.references.
|
|
630
|
+
push(i)}}unlink(e){for(const n of e.references)delete n._ref,delete n._nodeDescription;e.references=[]}getCandidate(e){const r=this.scopeProvider.getScope(e).getElement(e.reference.$refText);return r??this.createLinkingError(e)}buildReference(e,n,r,i){const s=this,o={$refNode:r,$refText:i,get ref(){var a;if(Rt(this._ref))return this._ref;if(gN(this._nodeDescription)){const u=s.loadAstNode(this._nodeDescription);this._ref=u??s.createLinkingError({reference:o,container:e,property:n},this._nodeDescription)}else if(this.
|
|
631
|
+
_ref===void 0){this._ref=ky;const u=of(e).$document,c=s.getLinkedNode({reference:o,container:e,property:n});if(c.error&&u&&u.state<qe.ComputedScopes)return this._ref=void 0;this._ref=(a=c.node)!==null&&a!==void 0?a:c.error,this._nodeDescription=c.descr,u?.references.push(this)}else if(this._ref===ky)throw new Error(`Cyclic reference resolution detected: ${s.astNodeLocator.getAstNodePath(e)}/${n} (symbol '${i}')`);return Rt(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},
|
|
632
|
+
get error(){return Vd(this._ref)?this._ref:void 0}};return o}getLinkedNode(e){var n;try{const r=this.getCandidate(e);if(Vd(r))return{error:r};const i=this.loadAstNode(r);return i?{node:i,descr:r}:{descr:r,error:this.createLinkingError(e,r)}}catch(r){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,r);const i=(n=r.message)!==null&&n!==void 0?n:String(r);return{error:Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to \
|
|
633
|
+
'${e.reference.$refText}': ${i}`})}}}loadAstNode(e){if(e.node)return e.node;const n=this.langiumDocuments().getDocument(e.documentUri);if(n)return this.astNodeLocator.getAstNode(n.parseResult.value,e.path)}createLinkingError(e,n){const r=of(e.container).$document;r&&r.state<qe.ComputedScopes&&console.warn(`Attempted reference resolution before document reached ComputedScopes state (${r.uri}).`);const i=this.reflection.getReferenceType(e);return Object.assign(Object.assign({},e),{message:`Could n\
|
|
634
|
+
ot resolve reference to ${i} named '${e.reference.$refText}'.`,targetDescription:n})}}function fp(t){return typeof t.name=="string"}class PR{getName(e){if(fp(e))return e.name}getNameNode(e){return dn(e.$cstNode,"name")}}class oG{constructor(e){this.nameProvider=e.references.NameProvider,this.index=e.shared.workspace.IndexManager,this.nodeLocator=e.workspace.AstNodeLocator}findDeclaration(e){if(e){const n=M0(e),r=e.astNode;if(n&&r){const i=r[n.feature];if(tr(i))return i.ref;if(Array.isArray(i)){for(const s of i)
|
|
635
|
+
if(tr(s)&&s.$refNode&&s.$refNode.offset<=e.offset&&s.$refNode.end>=e.end)return s.ref}}if(r){const i=this.nameProvider.getNameNode(r);if(i&&(i===e||wN(e,i)))return r}}}findDeclarationNode(e){const n=this.findDeclaration(e);if(n?.$cstNode){const r=this.nameProvider.getNameNode(n);return r??n.$cstNode}}findReferences(e,n){const r=[];if(n.includeDeclaration){const s=this.getReferenceToSelf(e);s&&r.push(s)}let i=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return n.documentUri&&
|
|
636
|
+
(i=i.filter(s=>pt.equals(s.sourceUri,n.documentUri))),r.push(...i),We(r)}getReferenceToSelf(e){const n=this.nameProvider.getNameNode(e);if(n){const r=lt(e),i=this.nodeLocator.getAstNodePath(e);return{sourceUri:r.uri,sourcePath:i,targetUri:r.uri,targetPath:i,segment:Yd(n),local:!0}}}}class Ms{constructor(e){if(this.map=new Map,e)for(const[n,r]of e)this.add(n,r)}get size(){return xm.sum(We(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,n){if(n===void 0)return this.map.delete(
|
|
637
|
+
e);{const r=this.map.get(e);if(r){const i=r.indexOf(n);if(i>=0)return r.length===1?this.map.delete(e):r.splice(i,1),!0}return!1}}get(e){var n;return(n=this.map.get(e))!==null&&n!==void 0?n:[]}has(e,n){if(n===void 0)return this.map.has(e);{const r=this.map.get(e);return r?r.indexOf(n)>=0:!1}}add(e,n){return this.map.has(e)?this.map.get(e).push(n):this.map.set(e,[n]),this}addAll(e,n){return this.map.has(e)?this.map.get(e).push(...n):this.map.set(e,Array.from(n)),this}forEach(e){this.map.forEach((n,r)=>n.
|
|
638
|
+
forEach(i=>e(i,r,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return We(this.map.entries()).flatMap(([e,n])=>n.map(r=>[e,r]))}keys(){return We(this.map.keys())}values(){return We(this.map.values()).flat()}entriesGroupedByKey(){return We(this.map.entries())}}class xR{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(const[n,r]of e)this.set(n,r)}clear(){this.map.clear(),this.inverse.clear()}set(e,n){return this.map.set(e,n),this.
|
|
639
|
+
inverse.set(n,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){const n=this.map.get(e);return n!==void 0?(this.map.delete(e),this.inverse.delete(n),!0):!1}}class NR{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async computeExports(e,n=ft.CancellationToken.None){return this.computeExportsForNode(e.parseResult.value,e,void 0,n)}async computeExportsForNode(e,n,r=bu,i=ft.CancellationToken.None){
|
|
640
|
+
const s=[];this.exportNode(e,s,n);for(const o of r(e))await jt(i),this.exportNode(o,s,n);return s}exportNode(e,n,r){const i=this.nameProvider.getName(e);i&&n.push(this.descriptions.createDescription(e,i,r))}async computeLocalScopes(e,n=ft.CancellationToken.None){const r=e.parseResult.value,i=new Ms;for(const s of Or(r))await jt(n),this.processNode(s,e,i);return i}processNode(e,n,r){const i=e.$container;if(i){const s=this.nameProvider.getName(e);s&&r.add(i,this.descriptions.createDescription(e,s,
|
|
641
|
+
n))}}}class Bs{constructor(e,n,r){var i;this.elements=e,this.outerScope=n,this.caseInsensitive=(i=r?.caseInsensitive)!==null&&i!==void 0?i:!1}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){const n=this.caseInsensitive?this.elements.find(r=>r.name.toLowerCase()===e.toLowerCase()):this.elements.find(r=>r.name===e);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}}class Ty{constructor(e,n,r){var i;this.
|
|
642
|
+
elements=new Map,this.caseInsensitive=(i=r?.caseInsensitive)!==null&&i!==void 0?i:!1;for(const s of e){const o=this.caseInsensitive?s.name.toLowerCase():s.name;this.elements.set(o,s)}this.outerScope=n}getElement(e){const n=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(n);if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}getAllElements(){let e=We(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}}const IR={getElement(){},
|
|
643
|
+
getAllElements(){return Es}};class OR{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}}class aG extends OR{constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,n){this.throwIfDisposed(),this.cache.set(e,
|
|
644
|
+
n)}get(e,n){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(n){const r=n();return this.cache.set(e,r),r}else return}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}}class uG extends OR{constructor(e){super(),this.cache=new Map,this.converter=e??(n=>n)}has(e,n){return this.throwIfDisposed(),this.cacheForContext(e).has(n)}set(e,n,r){this.throwIfDisposed(),this.cacheForContext(e).set(n,r)}get(e,n,r){this.throwIfDisposed();
|
|
645
|
+
const i=this.cacheForContext(e);if(i.has(n))return i.get(n);if(r){const s=r();return i.set(n,s),s}else return}delete(e,n){return this.throwIfDisposed(),this.cacheForContext(e).delete(n)}clear(e){if(this.throwIfDisposed(),e){const n=this.converter(e);this.cache.delete(n)}else this.cache.clear()}cacheForContext(e){const n=this.converter(e);let r=this.cache.get(n);return r||(r=new Map,this.cache.set(n,r)),r}}class pp extends aG{constructor(e,n){super(),n?(this.toDispose.push(e.workspace.DocumentBuilder.
|
|
646
|
+
onBuildPhase(n,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((r,i)=>{i.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}class LR{constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new pp(e.shared)}getScope(e){const n=[],r=this.reflection.
|
|
647
|
+
getReferenceType(e),i=lt(e.container).precomputedScopes;if(i){let o=e.container;do{const a=i.get(o);a.length>0&&n.push(We(a).filter(u=>this.reflection.isSubtype(u.type,r))),o=o.$container}while(o)}let s=this.getGlobalScope(r,e);for(let o=n.length-1;o>=0;o--)s=this.createScope(n[o],s);return s}createScope(e,n,r){return new Bs(We(e),n,r)}createScopeForNodes(e,n,r){const i=We(e).map(s=>{const o=this.nameProvider.getName(s);if(o)return this.descriptions.createDescription(s,o)}).nonNullable();return new Bs(
|
|
648
|
+
i,n,r)}getGlobalScope(e,n){return this.globalScopeCache.get(e,()=>new Ty(this.indexManager.allElements(e)))}}function cG(t){return typeof t.$comment=="string"}function FR(t){return typeof t=="object"&&!!t&&("$ref"in t||"$error"in t)}class lG{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.
|
|
649
|
+
NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,n){const r=n??{},i=n?.replacer,s=(a,u)=>this.replacer(a,u,r),o=i?(a,u)=>i(a,u,s):s;try{return this.currentDocument=lt(e),JSON.stringify(e,o,n?.space)}finally{this.currentDocument=void 0}}deserialize(e,n){const r=n??{},i=JSON.parse(e);return this.linkNode(i,i,r),i}replacer(e,n,{refText:r,sourceText:i,textRegions:s,comments:o,uriConverter:a}){var u,c,l,f;if(!this.ignoreProperties.has(e))if(tr(n)){const d=n.ref,p=r?n.$refText:
|
|
650
|
+
void 0;if(d){const h=lt(d);let v="";this.currentDocument&&this.currentDocument!==h&&(a?v=a(h.uri,n):v=h.uri.toString());const b=this.astNodeLocator.getAstNodePath(d);return{$ref:`${v}#${b}`,$refText:p}}else return{$error:(c=(u=n.error)===null||u===void 0?void 0:u.message)!==null&&c!==void 0?c:"Could not resolve reference",$refText:p}}else if(Rt(n)){let d;if(s&&(d=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},n)),(!e||n.$document)&&d?.$textRegion&&(d.$textRegion.documentURI=(l=this.currentDocument)===
|
|
651
|
+
null||l===void 0?void 0:l.uri.toString())),i&&!e&&(d??(d=Object.assign({},n)),d.$sourceText=(f=n.$cstNode)===null||f===void 0?void 0:f.text),o){d??(d=Object.assign({},n));const p=this.commentProvider.getComment(n);p&&(d.$comment=p.replace(/\r/g,""))}return d??n}else return n}addAstNodeRegionWithAssignmentsTo(e){const n=r=>({offset:r.offset,end:r.end,length:r.length,range:r.range});if(e.$cstNode){const r=e.$textRegion=n(e.$cstNode),i=r.assignments={};return Object.keys(e).filter(s=>!s.startsWith(
|
|
652
|
+
"$")).forEach(s=>{const o=Io(e.$cstNode,s).map(n);o.length!==0&&(i[s]=o)}),e}}linkNode(e,n,r,i,s,o){for(const[u,c]of Object.entries(e))if(Array.isArray(c))for(let l=0;l<c.length;l++){const f=c[l];FR(f)?c[l]=this.reviveReference(e,u,n,f,r):Rt(f)&&this.linkNode(f,n,r,e,u,l)}else FR(c)?e[u]=this.reviveReference(e,u,n,c,r):Rt(c)&&this.linkNode(c,n,r,e,u);const a=e;a.$container=i,a.$containerProperty=s,a.$containerIndex=o}reviveReference(e,n,r,i,s){let o=i.$refText,a=i.$error;if(i.$ref){const u=this.
|
|
653
|
+
getRefNode(r,i.$ref,s.uriConverter);if(Rt(u))return o||(o=this.nameProvider.getName(u)),{$refText:o??"",ref:u};a=u}if(a){const u={$refText:o??""};return u.error={container:e,property:n,message:a,reference:u},u}else return}getRefNode(e,n,r){try{const i=n.indexOf("#");if(i===0){const u=this.astNodeLocator.getAstNode(e,n.substring(1));return u||"Could not resolve path: "+n}if(i<0){const u=r?r(n):Et.parse(n),c=this.langiumDocuments.getDocument(u);return c?c.parseResult.value:"Could not find document\
|
|
654
|
+
for URI: "+n}const s=r?r(n.substring(0,i)):Et.parse(n.substring(0,i)),o=this.langiumDocuments.getDocument(s);if(!o)return"Could not find document for URI: "+n;if(i===n.length-1)return o.parseResult.value;const a=this.astNodeLocator.getAstNode(o.parseResult.value,n.substring(i+1));return a||"Could not resolve URI: "+n}catch(i){return String(i)}}}class dG{get map(){return this.fileExtensionMap}constructor(e){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.textDocuments=e?.workspace.
|
|
655
|
+
TextDocuments}register(e){const n=e.LanguageMetaData;for(const r of n.fileExtensions)this.fileExtensionMap.has(r)&&console.warn(`The file extension ${r} is used by multiple languages. It is now assigned to '${n.languageId}'.`),this.fileExtensionMap.set(r,e);this.languageIdMap.set(n.languageId,e),this.languageIdMap.size===1?this.singleton=e:this.singleton=void 0}getServices(e){var n,r;if(this.singleton!==void 0)return this.singleton;if(this.languageIdMap.size===0)throw new Error("The service regi\
|
|
656
|
+
stry is empty. Use `register` to register the services of a language.");const i=(r=(n=this.textDocuments)===null||n===void 0?void 0:n.get(e))===null||r===void 0?void 0:r.languageId;if(i!==void 0){const a=this.languageIdMap.get(i);if(a)return a}const s=pt.extname(e),o=this.fileExtensionMap.get(s);if(!o)throw i?new Error(`The service registry contains no services for the extension '${s}' for language '${i}'.`):new Error(`The service registry contains no services for the extension '${s}'.`);return o}hasServices(e){
|
|
657
|
+
try{return this.getServices(e),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}}function Xu(t){return{code:t}}var hp;(function(t){t.all=["fast","slow","built-in"]})(hp||(hp={}));class fG{constructor(e){this.entries=new Ms,this.entriesBefore=[],this.entriesAfter=[],this.reflection=e.shared.AstReflection}register(e,n=this,r="fast"){if(r==="built-in")throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");for(const[i,s]of Object.entries(
|
|
658
|
+
e)){const o=s;if(Array.isArray(o))for(const a of o){const u={check:this.wrapValidationException(a,n),category:r};this.addEntry(i,u)}else if(typeof o=="function"){const a={check:this.wrapValidationException(o,n),category:r};this.addEntry(i,a)}else qa()}}wrapValidationException(e,n){return async(r,i,s)=>{await this.handleException(()=>e.call(n,r,i,s),"An error occurred during validation",i,r)}}async handleException(e,n,r,i){try{await e()}catch(s){if(lp(s))throw s;console.error(`${n}:`,s),s instanceof
|
|
659
|
+
Error&&s.stack&&console.error(s.stack);const o=s instanceof Error?s.message:String(s);r("error",`${n}: ${o}`,{node:i})}}addEntry(e,n){if(e==="AstNode"){this.entries.add("AstNode",n);return}for(const r of this.reflection.getAllSubTypes(e))this.entries.add(r,n)}getChecks(e,n){let r=We(this.entries.get(e)).concat(this.entries.get("AstNode"));return n&&(r=r.filter(i=>n.includes(i.category))),r.map(i=>i.check)}registerBeforeDocument(e,n=this){this.entriesBefore.push(this.wrapPreparationException(e,"A\
|
|
660
|
+
n error occurred during set-up of the validation",n))}registerAfterDocument(e,n=this){this.entriesAfter.push(this.wrapPreparationException(e,"An error occurred during tear-down of the validation",n))}wrapPreparationException(e,n,r){return async(i,s,o,a)=>{await this.handleException(()=>e.call(r,i,s,o,a),n,s,i)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}}class pG{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData}async validateDocument(e,n={},r=ft.
|
|
661
|
+
CancellationToken.None){const i=e.parseResult,s=[];if(await jt(r),(!n.categories||n.categories.includes("built-in"))&&(this.processLexingErrors(i,s,n),n.stopAfterLexingErrors&&s.some(o=>{var a;return((a=o.data)===null||a===void 0?void 0:a.code)===Er.LexingError})||(this.processParsingErrors(i,s,n),n.stopAfterParsingErrors&&s.some(o=>{var a;return((a=o.data)===null||a===void 0?void 0:a.code)===Er.ParsingError}))||(this.processLinkingErrors(e,s,n),n.stopAfterLinkingErrors&&s.some(o=>{var a;return((a=
|
|
662
|
+
o.data)===null||a===void 0?void 0:a.code)===Er.LinkingError}))))return s;try{s.push(...await this.validateAst(i.value,n,r))}catch(o){if(lp(o))throw o;console.error("An error occurred during validation:",o)}return await jt(r),s}processLexingErrors(e,n,r){var i,s,o;const a=[...e.lexerErrors,...(s=(i=e.lexerReport)===null||i===void 0?void 0:i.diagnostics)!==null&&s!==void 0?s:[]];for(const u of a){const c=(o=u.severity)!==null&&o!==void 0?o:"error",l={severity:Cy(c),range:{start:{line:u.line-1,character:u.
|
|
663
|
+
column-1},end:{line:u.line-1,character:u.column+u.length-1}},message:u.message,data:mG(c),source:this.getSource()};n.push(l)}}processParsingErrors(e,n,r){for(const i of e.parserErrors){let s;if(isNaN(i.token.startOffset)){if("previousToken"in i){const o=i.previousToken;if(isNaN(o.startOffset)){const a={line:0,character:0};s={start:a,end:a}}else{const a={line:o.endLine-1,character:o.endColumn};s={start:a,end:a}}}}else s=Nm(i.token);if(s){const o={severity:Cy("error"),range:s,message:i.message,data:Xu(
|
|
664
|
+
Er.ParsingError),source:this.getSource()};n.push(o)}}}processLinkingErrors(e,n,r){for(const i of e.references){const s=i.error;if(s){const o={node:s.container,property:s.property,index:s.index,data:{code:Er.LinkingError,containerType:s.container.$type,property:s.property,refText:s.reference.$refText}};n.push(this.toDiagnostic("error",s.message,o))}}}async validateAst(e,n,r=ft.CancellationToken.None){const i=[],s=(o,a,u)=>{i.push(this.toDiagnostic(o,a,u))};return await this.validateAstBefore(e,n,
|
|
665
|
+
s,r),await this.validateAstNodes(e,n,s,r),await this.validateAstAfter(e,n,s,r),i}async validateAstBefore(e,n,r,i=ft.CancellationToken.None){var s;const o=this.validationRegistry.checksBefore;for(const a of o)await jt(i),await a(e,r,(s=n.categories)!==null&&s!==void 0?s:[],i)}async validateAstNodes(e,n,r,i=ft.CancellationToken.None){await Promise.all(Zr(e).map(async s=>{await jt(i);const o=this.validationRegistry.getChecks(s.$type,n.categories);for(const a of o)await a(s,r,i)}))}async validateAstAfter(e,n,r,i=ft.
|
|
666
|
+
CancellationToken.None){var s;const o=this.validationRegistry.checksAfter;for(const a of o)await jt(i),await a(e,r,(s=n.categories)!==null&&s!==void 0?s:[],i)}toDiagnostic(e,n,r){return{message:n,range:hG(r),severity:Cy(e),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}}function hG(t){if(t.range)return t.range;let e;return typeof t.property=="string"?e=dn(t.node.$cstNode,
|
|
667
|
+
t.property,t.index):typeof t.keyword=="string"&&(e=Du(t.node.$cstNode,t.keyword,t.index)),e??(e=t.node.$cstNode),e?e.range:{start:{line:0,character:0},end:{line:0,character:0}}}function Cy(t){switch(t){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+t)}}function mG(t){switch(t){case"error":return Xu(Er.LexingError);case"warning":return Xu(Er.LexingWarning);case"info":return Xu(Er.LexingInfo);case"hint":return Xu(
|
|
668
|
+
Er.LexingHint);default:throw new Error("Invalid diagnostic severity: "+t)}}var Er;(function(t){t.LexingError="lexing-error",t.LexingWarning="lexing-warning",t.LexingInfo="lexing-info",t.LexingHint="lexing-hint",t.ParsingError="parsing-error",t.LinkingError="linking-error"})(Er||(Er={}));class MR{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,n,r){const i=r??lt(e);n??(n=this.nameProvider.getName(e));const s=this.astNodeLocator.
|
|
669
|
+
getAstNodePath(e);if(!n)throw new Error(`Node at path ${s} has no name.`);let o;const a=()=>{var u;return o??(o=Yd((u=this.nameProvider.getNameNode(e))!==null&&u!==void 0?u:e.$cstNode))};return{node:e,name:n,get nameSegment(){return a()},selectionSegment:Yd(e.$cstNode),type:e.$type,documentUri:i.uri,path:s}}}class gG{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,n=ft.CancellationToken.None){const r=[],i=e.parseResult.value;for(const s of Zr(i))await jt(n),
|
|
670
|
+
af(s).filter(o=>!Vd(o)).forEach(o=>{const a=this.createDescription(o);a&&r.push(a)});return r}createDescription(e){const n=e.reference.$nodeDescription,r=e.reference.$refNode;if(!n||!r)return;const i=lt(e.container).uri;return{sourceUri:i,sourcePath:this.nodeLocator.getAstNodePath(e.container),targetUri:n.documentUri,targetPath:n.path,segment:Yd(r),local:pt.equals(n.documentUri,i)}}}class yG{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){const n=this.
|
|
671
|
+
getAstNodePath(e.$container),r=this.getPathSegment(e);return n+this.segmentSeparator+r}return""}getPathSegment({$containerProperty:e,$containerIndex:n}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return n!==void 0?e+this.indexSeparator+n:e}getAstNode(e,n){return n.split(this.segmentSeparator).reduce((i,s)=>{if(!i||s.length===0)return i;const o=s.indexOf(this.indexSeparator);if(o>0){const a=s.substring(0,o),u=parseInt(s.substring(o+1)),c=i[a];return c?.[u]}return i[s]},e)}}
|
|
672
|
+
var vG=Xo();class wG{constructor(e){this._ready=new Dy,this.settings={},this.workspaceConfig=!1,this.onConfigurationSectionUpdateEmitter=new vG.Emitter,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){var n,r;this.workspaceConfig=(r=(n=e.capabilities.workspace)===null||n===void 0?void 0:n.configuration)!==null&&r!==void 0?r:!1}async initialized(e){if(this.workspaceConfig){if(e.register){const n=this.serviceRegistry.all;e.register({section:n.map(r=>this.
|
|
673
|
+
toSectionName(r.LanguageMetaData.languageId))})}if(e.fetchConfiguration){const n=this.serviceRegistry.all.map(i=>({section:this.toSectionName(i.LanguageMetaData.languageId)})),r=await e.fetchConfiguration(n);n.forEach((i,s)=>{this.updateSectionConfiguration(i.section,r[s])})}}this._ready.resolve()}updateConfiguration(e){e.settings&&Object.keys(e.settings).forEach(n=>{const r=e.settings[n];this.updateSectionConfiguration(n,r),this.onConfigurationSectionUpdateEmitter.fire({section:n,configuration:r})})}updateSectionConfiguration(e,n){
|
|
674
|
+
this.settings[e]=n}async getConfiguration(e,n){await this.ready;const r=this.toSectionName(e);if(this.settings[r])return this.settings[r][n]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}}var js;(function(t){function e(n){return{dispose:async()=>await n()}}t.create=e})(js||(js={}));class bG{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new Ms,
|
|
675
|
+
this.documentPhaseListeners=new Ms,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=qe.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.serviceRegistry=e.ServiceRegistry}async build(e,n={},r=ft.CancellationToken.None){var i,s;for(const o of e){const a=o.uri.toString();if(o.state===qe.Validated){if(typeof n.
|
|
676
|
+
validation=="boolean"&&n.validation)o.state=qe.IndexedReferences,o.diagnostics=void 0,this.buildState.delete(a);else if(typeof n.validation=="object"){const u=this.buildState.get(a),c=(i=u?.result)===null||i===void 0?void 0:i.validationChecks;if(c){const f=((s=n.validation.categories)!==null&&s!==void 0?s:hp.all).filter(d=>!c.includes(d));f.length>0&&(this.buildState.set(a,{completed:!1,options:{validation:Object.assign(Object.assign({},n.validation),{categories:f})},result:u.result}),o.state=qe.
|
|
677
|
+
IndexedReferences)}}}else this.buildState.delete(a)}this.currentState=qe.Changed,await this.emitUpdate(e.map(o=>o.uri),[]),await this.buildDocuments(e,n,r)}async update(e,n,r=ft.CancellationToken.None){this.currentState=qe.Changed;for(const o of n)this.langiumDocuments.deleteDocument(o),this.buildState.delete(o.toString()),this.indexManager.remove(o);for(const o of e){if(!this.langiumDocuments.invalidateDocument(o)){const u=this.langiumDocumentFactory.fromModel({$type:"INVALID"},o);u.state=qe.Changed,
|
|
678
|
+
this.langiumDocuments.addDocument(u)}this.buildState.delete(o.toString())}const i=We(e).concat(n).map(o=>o.toString()).toSet();this.langiumDocuments.all.filter(o=>!i.has(o.uri.toString())&&this.shouldRelink(o,i)).forEach(o=>{this.serviceRegistry.getServices(o.uri).references.Linker.unlink(o),o.state=Math.min(o.state,qe.ComputedScopes),o.diagnostics=void 0}),await this.emitUpdate(e,n),await jt(r);const s=this.sortDocuments(this.langiumDocuments.all.filter(o=>{var a;return o.state<qe.Linked||!(!((a=
|
|
679
|
+
this.buildState.get(o.uri.toString()))===null||a===void 0)&&a.completed)}).toArray());await this.buildDocuments(s,this.updateBuildOptions,r)}async emitUpdate(e,n){await Promise.all(this.updateListeners.map(r=>r(e,n)))}sortDocuments(e){let n=0,r=e.length-1;for(;n<r;){for(;n<e.length&&this.hasTextDocument(e[n]);)n++;for(;r>=0&&!this.hasTextDocument(e[r]);)r--;n<r&&([e[n],e[r]]=[e[r],e[n]])}return e}hasTextDocument(e){var n;return!!(!((n=this.textDocuments)===null||n===void 0)&&n.get(e.uri))}shouldRelink(e,n){
|
|
680
|
+
return e.references.some(r=>r.error!==void 0)?!0:this.indexManager.isAffected(e,n)}onUpdate(e){return this.updateListeners.push(e),js.create(()=>{const n=this.updateListeners.indexOf(e);n>=0&&this.updateListeners.splice(n,1)})}async buildDocuments(e,n,r){this.prepareBuild(e,n),await this.runCancelable(e,qe.Parsed,r,s=>this.langiumDocumentFactory.update(s,r)),await this.runCancelable(e,qe.IndexedContent,r,s=>this.indexManager.updateContent(s,r)),await this.runCancelable(e,qe.ComputedScopes,r,async s=>{
|
|
681
|
+
const o=this.serviceRegistry.getServices(s.uri).references.ScopeComputation;s.precomputedScopes=await o.computeLocalScopes(s,r)}),await this.runCancelable(e,qe.Linked,r,s=>this.serviceRegistry.getServices(s.uri).references.Linker.link(s,r)),await this.runCancelable(e,qe.IndexedReferences,r,s=>this.indexManager.updateReferences(s,r));const i=e.filter(s=>this.shouldValidate(s));await this.runCancelable(i,qe.Validated,r,s=>this.validate(s,r));for(const s of e){const o=this.buildState.get(s.uri.toString());
|
|
682
|
+
o&&(o.completed=!0)}}prepareBuild(e,n){for(const r of e){const i=r.uri.toString(),s=this.buildState.get(i);(!s||s.completed)&&this.buildState.set(i,{completed:!1,options:n,result:s?.result})}}async runCancelable(e,n,r,i){const s=e.filter(a=>a.state<n);for(const a of s)await jt(r),await i(a),a.state=n,await this.notifyDocumentPhase(a,n,r);const o=e.filter(a=>a.state===n);await this.notifyBuildPhase(o,n,r),this.currentState=n}onBuildPhase(e,n){return this.buildPhaseListeners.add(e,n),js.create(()=>{
|
|
683
|
+
this.buildPhaseListeners.delete(e,n)})}onDocumentPhase(e,n){return this.documentPhaseListeners.add(e,n),js.create(()=>{this.documentPhaseListeners.delete(e,n)})}waitUntil(e,n,r){let i;if(n&&"path"in n?i=n:r=n,r??(r=ft.CancellationToken.None),i){const s=this.langiumDocuments.getDocument(i);if(s&&s.state>e)return Promise.resolve(i)}return this.currentState>=e?Promise.resolve(void 0):r.isCancellationRequested?Promise.reject(cp):new Promise((s,o)=>{const a=this.onBuildPhase(e,()=>{if(a.dispose(),u.dispose(),
|
|
684
|
+
i){const c=this.langiumDocuments.getDocument(i);s(c?.uri)}else s(void 0)}),u=r.onCancellationRequested(()=>{a.dispose(),u.dispose(),o(cp)})})}async notifyDocumentPhase(e,n,r){const s=this.documentPhaseListeners.get(n).slice();for(const o of s)try{await o(e,r)}catch(a){if(!lp(a))throw a}}async notifyBuildPhase(e,n,r){if(e.length===0)return;const s=this.buildPhaseListeners.get(n).slice();for(const o of s)await jt(r),await o(e,r)}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,n){
|
|
685
|
+
var r,i;const s=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,o=this.getBuildOptions(e).validation,a=typeof o=="object"?o:void 0,u=await s.validateDocument(e,a,n);e.diagnostics?e.diagnostics.push(...u):e.diagnostics=u;const c=this.buildState.get(e.uri.toString());if(c){(r=c.result)!==null&&r!==void 0||(c.result={});const l=(i=a?.categories)!==null&&i!==void 0?i:hp.all;c.result.validationChecks?c.result.validationChecks.push(...l):c.result.validationChecks=[...l]}}getBuildOptions(e){
|
|
686
|
+
var n,r;return(r=(n=this.buildState.get(e.uri.toString()))===null||n===void 0?void 0:n.options)!==null&&r!==void 0?r:{}}}class BR{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new uG,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,n){const r=lt(e).uri,i=[];return this.referenceIndex.forEach(s=>{s.forEach(o=>{pt.equals(o.targetUri,r)&&o.targetPath===n&&i.push(o)})}),
|
|
687
|
+
We(i)}allElements(e,n){let r=We(this.symbolIndex.keys());return n&&(r=r.filter(i=>!n||n.has(i))),r.map(i=>this.getFileDescriptions(i,e)).flat()}getFileDescriptions(e,n){var r;return n?this.symbolByTypeIndex.get(e,n,()=>{var s;return((s=this.symbolIndex.get(e))!==null&&s!==void 0?s:[]).filter(a=>this.astReflection.isSubtype(a.type,n))}):(r=this.symbolIndex.get(e))!==null&&r!==void 0?r:[]}remove(e){const n=e.toString();this.symbolIndex.delete(n),this.symbolByTypeIndex.clear(n),this.referenceIndex.
|
|
688
|
+
delete(n)}async updateContent(e,n=ft.CancellationToken.None){const i=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.computeExports(e,n),s=e.uri.toString();this.symbolIndex.set(s,i),this.symbolByTypeIndex.clear(s)}async updateReferences(e,n=ft.CancellationToken.None){const i=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,n);this.referenceIndex.set(e.uri.toString(),i)}isAffected(e,n){const r=this.referenceIndex.get(
|
|
689
|
+
e.uri.toString());return r?r.some(i=>!i.local&&n.has(i.targetUri.toString())):!1}}class jR{constructor(e){this.initialBuildOptions={},this._ready=new Dy,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(e){var n;this.folders=(n=
|
|
690
|
+
e.workspaceFolders)!==null&&n!==void 0?n:void 0}initialized(e){return this.mutex.write(n=>{var r;return this.initializeWorkspace((r=this.folders)!==null&&r!==void 0?r:[],n)})}async initializeWorkspace(e,n=ft.CancellationToken.None){const r=await this.performStartup(e);await jt(n),await this.documentBuilder.build(r,this.initialBuildOptions,n)}async performStartup(e){const n=this.serviceRegistry.all.flatMap(s=>s.LanguageMetaData.fileExtensions),r=[],i=s=>{r.push(s),this.langiumDocuments.hasDocument(
|
|
691
|
+
s.uri)||this.langiumDocuments.addDocument(s)};return await this.loadAdditionalDocuments(e,i),await Promise.all(e.map(s=>[s,this.getRootFolder(s)]).map(async s=>this.traverseFolder(...s,n,i))),this._ready.resolve(),r}loadAdditionalDocuments(e,n){return Promise.resolve()}getRootFolder(e){return Et.parse(e.uri)}async traverseFolder(e,n,r,i){const s=await this.fileSystemProvider.readDirectory(n);await Promise.all(s.map(async o=>{if(this.includeEntry(e,o,r)){if(o.isDirectory)await this.traverseFolder(
|
|
692
|
+
e,o.uri,r,i);else if(o.isFile){const a=await this.langiumDocuments.getOrCreateDocument(o.uri);i(a)}}}))}includeEntry(e,n,r){const i=pt.basename(n.uri);if(i.startsWith("."))return!1;if(n.isDirectory)return i!=="node_modules"&&i!=="out";if(n.isFile){const s=pt.extname(n.uri);return r.includes(s)}return!1}}class EG{buildUnexpectedCharactersMessage(e,n,r,i,s){return Mg.buildUnexpectedCharactersMessage(e,n,r,i,s)}buildUnableToPopLexerModeMessage(e){return Mg.buildUnableToPopLexerModeMessage(e)}}const $G={
|
|
693
|
+
mode:"full"};class DG{constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;const n=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(n);const r=GR(n)?Object.values(n):n,i=e.LanguageMetaData.mode==="production";this.chevrotainLexer=new Ln(r,{positionTracking:"full",skipValidations:i,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.
|
|
694
|
+
tokenTypes}tokenize(e,n=$G){var r,i,s;const o=this.chevrotainLexer.tokenize(e);return{tokens:o.tokens,errors:o.errors,hidden:(r=o.groups.hidden)!==null&&r!==void 0?r:[],report:(s=(i=this.tokenBuilder).flushLexingReport)===null||s===void 0?void 0:s.call(i,e)}}toTokenTypeDictionary(e){if(GR(e))return e;const n=qR(e)?Object.values(e.modes).flat():e,r={};return n.forEach(i=>r[i.name]=i),r}}function RG(t){return Array.isArray(t)&&(t.length===0||"name"in t[0])}function qR(t){return t&&"modes"in t&&"de\
|
|
695
|
+
faultMode"in t}function GR(t){return!RG(t)&&!qR(t)}function kG(t,e,n){let r,i;typeof t=="string"?(i=e,r=n):(i=t.range.start,r=e),i||(i=st.create(0,0));const s=UR(t),o=Sy(r),a=AG({lines:s,position:i,options:o});return NG({index:0,tokens:a,position:i})}function TG(t,e){const n=Sy(e),r=UR(t);if(r.length===0)return!1;const i=r[0],s=r[r.length-1],o=n.start,a=n.end;return!!o?.exec(i)&&!!a?.exec(s)}function UR(t){let e="";return typeof t=="string"?e=t:e=t.text,e.split(I0)}const WR=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,
|
|
696
|
+
CG=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function AG(t){var e,n,r;const i=[];let s=t.position.line,o=t.position.character;for(let a=0;a<t.lines.length;a++){const u=a===0,c=a===t.lines.length-1;let l=t.lines[a],f=0;if(u&&t.options.start){const p=(e=t.options.start)===null||e===void 0?void 0:e.exec(l);p&&(f=p.index+p[0].length)}else{const p=(n=t.options.line)===null||n===void 0?void 0:n.exec(l);p&&(f=p.index+p[0].length)}if(c){const p=(r=t.options.end)===null||r===void 0?void 0:r.exec(l);
|
|
697
|
+
p&&(l=l.substring(0,p.index))}if(l=l.substring(0,xG(l)),Ay(l,f)>=l.length){if(i.length>0){const p=st.create(s,o);i.push({type:"break",content:"",range:Ye.create(p,p)})}}else{WR.lastIndex=f;const p=WR.exec(l);if(p){const h=p[0],v=p[1],b=st.create(s,o+f),y=st.create(s,o+f+h.length);i.push({type:"tag",content:v,range:Ye.create(b,y)}),f+=h.length,f=Ay(l,f)}if(f<l.length){const h=l.substring(f),v=Array.from(h.matchAll(CG));i.push(...SG(v,h,s,o+f))}}s++,o=0}return i.length>0&&i[i.length-1].type==="bre\
|
|
698
|
+
ak"?i.slice(0,-1):i}function SG(t,e,n,r){const i=[];if(t.length===0){const s=st.create(n,r),o=st.create(n,r+e.length);i.push({type:"text",content:e,range:Ye.create(s,o)})}else{let s=0;for(const a of t){const u=a.index,c=e.substring(s,u);c.length>0&&i.push({type:"text",content:e.substring(s,u),range:Ye.create(st.create(n,s+r),st.create(n,u+r))});let l=c.length+1;const f=a[1];if(i.push({type:"inline-tag",content:f,range:Ye.create(st.create(n,s+l+r),st.create(n,s+l+f.length+r))}),l+=f.length,a.length===
|
|
699
|
+
4){l+=a[2].length;const d=a[3];i.push({type:"text",content:d,range:Ye.create(st.create(n,s+l+r),st.create(n,s+l+d.length+r))})}else i.push({type:"text",content:"",range:Ye.create(st.create(n,s+l+r),st.create(n,s+l+r))});s=u+a[0].length}const o=e.substring(s);o.length>0&&i.push({type:"text",content:o,range:Ye.create(st.create(n,s+r),st.create(n,s+r+o.length))})}return i}const _G=/\S/,PG=/\s*$/;function Ay(t,e){const n=t.substring(e).match(_G);return n?e+n.index:t.length}function xG(t){const e=t.match(
|
|
700
|
+
PG);if(e&&typeof e.index=="number")return e.index}function NG(t){var e,n,r,i;const s=st.create(t.position.line,t.position.character);if(t.tokens.length===0)return new KR([],Ye.create(s,s));const o=[];for(;t.index<t.tokens.length;){const c=IG(t,o[o.length-1]);c&&o.push(c)}const a=(n=(e=o[0])===null||e===void 0?void 0:e.range.start)!==null&&n!==void 0?n:s,u=(i=(r=o[o.length-1])===null||r===void 0?void 0:r.range.end)!==null&&i!==void 0?i:s;return new KR(o,Ye.create(a,u))}function IG(t,e){const n=t.
|
|
701
|
+
tokens[t.index];if(n.type==="tag")return HR(t,!1);if(n.type==="text"||n.type==="inline-tag")return zR(t);OG(n,e),t.index++}function OG(t,e){if(e){const n=new XR("",t.range);"inlines"in e?e.inlines.push(n):e.content.inlines.push(n)}}function zR(t){let e=t.tokens[t.index];const n=e;let r=e;const i=[];for(;e&&e.type!=="break"&&e.type!=="tag";)i.push(LG(t)),r=e,e=t.tokens[t.index];return new xy(i,Ye.create(n.range.start,r.range.end))}function LG(t){return t.tokens[t.index].type==="inline-tag"?HR(t,!0):
|
|
702
|
+
VR(t)}function HR(t,e){const n=t.tokens[t.index++],r=n.content.substring(1),i=t.tokens[t.index];if(i?.type==="text")if(e){const s=VR(t);return new Py(r,new xy([s],s.range),e,Ye.create(n.range.start,s.range.end))}else{const s=zR(t);return new Py(r,s,e,Ye.create(n.range.start,s.range.end))}else{const s=n.range;return new Py(r,new xy([],s),e,s)}}function VR(t){const e=t.tokens[t.index++];return new XR(e.content,e.range)}function Sy(t){if(!t)return Sy({start:"/**",end:"*/",line:"*"});const{start:e,end:n,
|
|
703
|
+
line:r}=t;return{start:_y(e,!0),end:_y(n,!1),line:_y(r,!0)}}function _y(t,e){if(typeof t=="string"||typeof t=="object"){const n=typeof t=="string"?ff(t):t.source;return e?new RegExp(`^\\s*${n}`):new RegExp(`\\s*${n}\\s*$`)}else return t}class KR{constructor(e,n){this.elements=e,this.range=n}getTag(e){return this.getAllTags().find(n=>n.name===e)}getTags(e){return this.getAllTags().filter(n=>n.name===e)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(const n of this.
|
|
704
|
+
elements)if(e.length===0)e=n.toString();else{const r=n.toString();e+=YR(e)+r}return e.trim()}toMarkdown(e){let n="";for(const r of this.elements)if(n.length===0)n=r.toMarkdown(e);else{const i=r.toMarkdown(e);n+=YR(n)+i}return n.trim()}}class Py{constructor(e,n,r,i){this.name=e,this.content=n,this.inline=r,this.range=i}toString(){let e=`@${this.name}`;const n=this.content.toString();return this.content.inlines.length===1?e=`${e} ${n}`:this.content.inlines.length>1&&(e=`${e}
|
|
705
|
+
${n}`),this.inline?`{${e}}`:e}toMarkdown(e){var n,r;return(r=(n=e?.renderTag)===null||n===void 0?void 0:n.call(e,this))!==null&&r!==void 0?r:this.toMarkdownDefault(e)}toMarkdownDefault(e){const n=this.content.toMarkdown(e);if(this.inline){const s=FG(this.name,n,e??{});if(typeof s=="string")return s}let r="";e?.tag==="italic"||e?.tag===void 0?r="*":e?.tag==="bold"?r="**":e?.tag==="bold-italic"&&(r="***");let i=`${r}@${this.name}${r}`;return this.content.inlines.length===1?i=`${i} \u2014 ${n}`:this.
|
|
706
|
+
content.inlines.length>1&&(i=`${i}
|
|
707
|
+
${n}`),this.inline?`{${i}}`:i}}function FG(t,e,n){var r,i;if(t==="linkplain"||t==="linkcode"||t==="link"){const s=e.indexOf(" ");let o=e;if(s>0){const u=Ay(e,s);o=e.substring(u),e=e.substring(0,s)}return(t==="linkcode"||t==="link"&&n.link==="code")&&(o=`\`${o}\``),(i=(r=n.renderLink)===null||r===void 0?void 0:r.call(n,e,o))!==null&&i!==void 0?i:MG(e,o)}}function MG(t,e){try{return Et.parse(t,!0),`[${e}](${t})`}catch{return t}}class xy{constructor(e,n){this.inlines=e,this.range=n}toString(){let e="";
|
|
708
|
+
for(let n=0;n<this.inlines.length;n++){const r=this.inlines[n],i=this.inlines[n+1];e+=r.toString(),i&&i.range.start.line>r.range.start.line&&(e+=`
|
|
709
|
+
`)}return e}toMarkdown(e){let n="";for(let r=0;r<this.inlines.length;r++){const i=this.inlines[r],s=this.inlines[r+1];n+=i.toMarkdown(e),s&&s.range.start.line>i.range.start.line&&(n+=`
|
|
710
|
+
`)}return n}}class XR{constructor(e,n){this.text=e,this.range=n}toString(){return this.text}toMarkdown(){return this.text}}function YR(t){return t.endsWith(`
|
|
711
|
+
`)?`
|
|
712
|
+
`:`
|
|
713
|
+
|
|
714
|
+
`}class BG{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const n=this.commentProvider.getComment(e);if(n&&TG(n))return kG(n).toMarkdown({renderLink:(i,s)=>this.documentationLinkRenderer(e,i,s),renderTag:i=>this.documentationTagRenderer(e,i)})}documentationLinkRenderer(e,n,r){var i;const s=(i=this.findNameInPrecomputedScopes(e,n))!==null&&i!==void 0?i:this.findNameInGlobalScope(e,n);if(s&&s.nameSegment){const o=s.
|
|
715
|
+
nameSegment.range.start.line+1,a=s.nameSegment.range.start.character+1,u=s.documentUri.with({fragment:`L${o},${a}`});return`[${r}](${u.toString()})`}else return}documentationTagRenderer(e,n){}findNameInPrecomputedScopes(e,n){const i=lt(e).precomputedScopes;if(!i)return;let s=e;do{const a=i.get(s).find(u=>u.name===n);if(a)return a;s=s.$container}while(s)}findNameInGlobalScope(e,n){return this.indexManager.allElements().find(i=>i.name===n)}}class jG{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){
|
|
716
|
+
var n;return cG(e)?e.$comment:(n=Im(e.$cstNode,this.grammarConfig().multilineCommentRules))===null||n===void 0?void 0:n.text}}class qG{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,n){return Promise.resolve(this.syncParser.parse(e))}}class GG{constructor(){this.previousTokenSource=new ft.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();const n=nG();return this.previousTokenSource=n,this.enqueue(this.writeQueue,e,n.token)}read(e){
|
|
717
|
+
return this.enqueue(this.readQueue,e)}enqueue(e,n,r=ft.CancellationToken.None){const i=new Dy,s={action:n,deferred:i,cancellationToken:r};return e.push(s),this.performNextOperation(),i.promise}async performNextOperation(){if(!this.done)return;const e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else if(this.readQueue.length>0)e.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,await Promise.all(e.map(async({action:n,deferred:r,cancellationToken:i})=>{
|
|
718
|
+
try{const s=await Promise.resolve().then(()=>n(i));r.resolve(s)}catch(s){lp(s)?r.resolve(void 0):r.reject(s)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}class UG{constructor(e){this.grammarElementIdMap=new xR,this.tokenTypeIdMap=new xR,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):void 0,parserErrors:e.
|
|
719
|
+
parserErrors.map(n=>Object.assign(Object.assign({},n),{message:n.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){const n=new Map,r=new Map;for(const i of Zr(e))n.set(i,{});if(e.$cstNode)for(const i of Xd(e.$cstNode))r.set(i,{});return{astNodes:n,cstNodes:r}}dehydrateAstNode(e,n){const r=n.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.
|
|
720
|
+
$cstNode!==void 0&&(r.$cstNode=this.dehydrateCstNode(e.$cstNode,n));for(const[i,s]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(s)){const o=[];r[i]=o;for(const a of s)Rt(a)?o.push(this.dehydrateAstNode(a,n)):tr(a)?o.push(this.dehydrateReference(a,n)):o.push(a)}else Rt(s)?r[i]=this.dehydrateAstNode(s,n):tr(s)?r[i]=this.dehydrateReference(s,n):s!==void 0&&(r[i]=s);return r}dehydrateReference(e,n){const r={};return r.$refText=e.$refText,e.$refNode&&(r.$refNode=n.cstNodes.get(e.$refNode)),
|
|
721
|
+
r}dehydrateCstNode(e,n){const r=n.cstNodes.get(e);return g0(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=n.astNodes.get(e.astNode),Bi(e)?r.content=e.content.map(i=>this.dehydrateCstNode(i,n)):bs(e)&&(r.tokenType=e.tokenType.name,r.offset=e.offset,r.length=e.length,r.startLine=e.range.start.line,r.startColumn=e.range.start.character,r.endLine=e.range.end.line,r.endColumn=e.range.end.character),r}hydrate(e){const n=e.value,r=this.createHydrationContext(
|
|
722
|
+
n);return"$cstNode"in n&&this.hydrateCstNode(n.$cstNode,r),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(n,r)}}createHydrationContext(e){const n=new Map,r=new Map;for(const s of Zr(e))n.set(s,{});let i;if(e.$cstNode)for(const s of Xd(e.$cstNode)){let o;"fullText"in s?(o=new pR(s.fullText),i=o):"content"in s?o=new wy:"tokenType"in s&&(o=this.hydrateCstLeafNode(s)),o&&(r.set(s,o),o.root=i)}return{astNodes:n,cstNodes:r}}hydrateAstNode(e,n){
|
|
723
|
+
const r=n.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.$cstNode&&(r.$cstNode=n.cstNodes.get(e.$cstNode));for(const[i,s]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(s)){const o=[];r[i]=o;for(const a of s)Rt(a)?o.push(this.setParent(this.hydrateAstNode(a,n),r)):tr(a)?o.push(this.hydrateReference(a,r,i,n)):o.push(a)}else Rt(s)?r[i]=this.setParent(this.hydrateAstNode(s,n),r):tr(s)?r[i]=this.hydrateReference(s,r,i,n):s!==
|
|
724
|
+
void 0&&(r[i]=s);return r}setParent(e,n){return e.$container=n,e}hydrateReference(e,n,r,i){return this.linker.buildReference(n,r,i.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,n,r=0){const i=n.cstNodes.get(e);if(typeof e.grammarSource=="number"&&(i.grammarSource=this.getGrammarElement(e.grammarSource)),i.astNode=n.astNodes.get(e.astNode),Bi(i))for(const s of e.content){const o=this.hydrateCstNode(s,n,r++);i.content.push(o)}return i}hydrateCstLeafNode(e){const n=this.getTokenType(e.tokenType),
|
|
725
|
+
r=e.offset,i=e.length,s=e.startLine,o=e.startColumn,a=e.endLine,u=e.endColumn,c=e.hidden;return new vy(r,i,{start:{line:s,character:o},end:{line:a,character:u}},n,c)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){
|
|
726
|
+
let e=0;for(const n of Zr(this.grammar))Mm(n)&&this.grammarElementIdMap.set(n,e++)}}function JR(t){return{documentation:{CommentProvider:e=>new jG(e),DocumentationProvider:e=>new BG(e)},parser:{AsyncParser:e=>new qG(e),GrammarConfig:e=>aI(e),LangiumParser:e=>Yq(e),CompletionParser:e=>Xq(e),ValueConverter:()=>new Zq,TokenBuilder:()=>new Qq,Lexer:e=>new DG(e),ParserErrorMessageProvider:()=>new yR,LexerErrorMessageProvider:()=>new EG},workspace:{AstNodeLocator:()=>new yG,AstNodeDescriptionProvider:e=>new MR(
|
|
727
|
+
e),ReferenceDescriptionProvider:e=>new gG(e)},references:{Linker:e=>new sG(e),NameProvider:()=>new PR,ScopeProvider:e=>new LR(e),ScopeComputation:e=>new NR(e),References:e=>new oG(e)},serializer:{Hydrator:e=>new UG(e),JsonSerializer:e=>new lG(e)},validation:{DocumentValidator:e=>new pG(e),ValidationRegistry:e=>new fG(e)},shared:()=>t.shared}}function QR(t){return{ServiceRegistry:e=>new dG(e),workspace:{LangiumDocuments:e=>new _R(e),LangiumDocumentFactory:e=>new iG(e),DocumentBuilder:e=>new bG(e),
|
|
728
|
+
IndexManager:e=>new BR(e),WorkspaceManager:e=>new jR(e),FileSystemProvider:e=>t.fileSystemProvider(e),WorkspaceLock:()=>new GG,ConfigurationProvider:e=>new wG(e)}}}var mp;(function(t){t.merge=(e,n)=>yp(yp({},e),n)})(mp||(mp={}));function gp(t,e,n,r,i,s,o,a,u){const c=[t,e,n,r,i,s,o,a,u].reduce(yp,{});return ek(c)}const ZR=Symbol("isProxy");function Ny(t){if(t&&t[ZR])for(const e of Object.values(t))Ny(e);return t}function ek(t,e){const n=new Proxy({},{deleteProperty:()=>!1,set:()=>{throw new Error(
|
|
729
|
+
"Cannot set property on injected service container")},get:(r,i)=>i===ZR?!0:nk(r,i,t,e||n),getOwnPropertyDescriptor:(r,i)=>(nk(r,i,t,e||n),Object.getOwnPropertyDescriptor(r,i)),has:(r,i)=>i in t,ownKeys:()=>[...Object.getOwnPropertyNames(t)]});return n}const tk=Symbol();function nk(t,e,n,r){if(e in t){if(t[e]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable.",{cause:t[e]});if(t[e]===tk)throw new Error('Cycle detected. Please make "'+
|
|
730
|
+
String(e)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return t[e]}else if(e in n){const i=n[e];t[e]=tk;try{t[e]=typeof i=="function"?i(r):ek(i,r)}catch(s){throw t[e]=s instanceof Error?s:void 0,s}return t[e]}else return}function yp(t,e){if(e){for(const[n,r]of Object.entries(e))if(r!==void 0){const i=t[n];i!==null&&r!==null&&typeof i=="object"&&typeof r=="object"?t[n]=yp(i,r):t[n]=r}}return t}class WG{readFile(){throw new Error("No fil\
|
|
731
|
+
e system is available.")}async readDirectory(){return[]}}const rk={fileSystemProvider:()=>new WG},zG={Grammar:()=>{},LanguageMetaData:()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"})},HG={AstReflection:()=>new S0};function VG(){const t=gp(QR(rk),HG),e=gp(JR({shared:t}),zG);return t.ServiceRegistry.register(e),e}function KG(t){var e;const n=VG(),r=n.serializer.JsonSerializer.deserialize(t);return n.shared.workspace.LangiumDocumentFactory.fromModel(r,Et.parse(`memory://${(e=
|
|
732
|
+
r.name)!==null&&e!==void 0?e:"grammar"}.langium`)),r}var XG={done:!0,hasNext:!1},Yu={done:!1,hasNext:!1},YG=()=>XG,JG=t=>({hasNext:!0,next:t,done:!1});function Xe(t,...e){let n=t,r=e.map(s=>"lazy"in s?QG(s):void 0),i=0;for(;i<e.length;){if(r[i]===void 0||!ZG(n)){let u=e[i];n=u(n),i+=1;continue}let s=[];for(let u=i;u<e.length;u++){let c=r[u];if(c===void 0||(s.push(c),c.isSingle))break}let o=[];for(let u of n)if(ik(u,o,s))break;let{isSingle:a}=s.at(-1);n=a?o[0]:o,i+=s.length}return n}function ik(t,e,n){
|
|
733
|
+
if(n.length===0)return e.push(t),!1;let r=t,i=Yu,s=!1;for(let[o,a]of n.entries()){let{index:u,items:c}=a;if(c.push(r),i=a(r,u,c),a.index+=1,i.hasNext){if(i.hasMany??!1){for(let l of i.next)if(ik(l,e,n.slice(o+1)))return!0;return s}r=i.next}if(!i.hasNext)break;i.done&&(s=!0)}return i.hasNext&&e.push(r),s}function QG(t){let{lazy:e,lazyArgs:n}=t,r=e(...n);return Object.assign(r,{isSingle:e.single??!1,index:0,items:[]})}function ZG(t){return typeof t=="string"||typeof t=="object"&&t!==null&&Symbol.iterator in
|
|
734
|
+
t}function sk(t,e){let n=e.length-t.length;if(n===1){let[r,...i]=e;return Xe(r,{lazy:t,lazyArgs:i})}if(n===0){let r={lazy:t,lazyArgs:e};return Object.assign(i=>Xe(i,r),r)}throw new Error("Wrong number of arguments")}function e3(t,e,n){let r=i=>t(i,...e);return n===void 0?r:Object.assign(r,{lazy:n,lazyArgs:e})}function ut(t,e,n){let r=t.length-e.length;if(r===0)return t(...e);if(r===1)return e3(t,e,n);throw new Error("Wrong number of arguments")}function vp(...t){return ut(Object.values,t)}function Yo(...t){
|
|
735
|
+
return sk(t3,t)}function t3(){let t=new Set;return e=>t.has(e)?Yu:(t.add(e),{done:!1,hasNext:!0,next:e})}function n3(...t){return ut(r3,t,i3)}var r3=(t,e)=>e<0?[]:t.slice(0,e);function i3(t){if(t<=0)return YG;let e=t;return n=>(e-=1,{done:e<=0,hasNext:!0,next:n})}function qr(...t){return ut(s3,t)}var s3=(t,e)=>t.length>=e,ok={asc:(t,e)=>t>e,desc:(t,e)=>t<e};function o3(t,e){let[n,...r]=e;if(!a3(n)){let s=Iy(...r);return t(n,s)}let i=Iy(n,...r);return s=>t(s,i)}function Iy(t,e,...n){let r=typeof t==
|
|
736
|
+
"function"?t:t[0],i=typeof t=="function"?"asc":t[1],{[i]:s}=ok,o=e===void 0?void 0:Iy(e,...n);return(a,u)=>{let c=r(a),l=r(u);return s(c,l)?1:s(l,c)?-1:o?.(a,u)??0}}function a3(t){if(ak(t))return!0;if(typeof t!="object"||!Array.isArray(t))return!1;let[e,n,...r]=t;return ak(e)&&typeof n=="string"&&n in ok&&r.length===0}var ak=t=>typeof t=="function"&&t.length===1;function u3(...t){return ut(c3,t)}function c3(t,e){return e(t),t}function uk(...t){return ut(l3,t)}function l3(t,e){let n=[...t];return n.
|
|
737
|
+
sort(e),n}function d3(...t){return o3(f3,t)}var f3=(t,e)=>[...t].sort(e);function Oy(...t){return ut(p3,t)}var p3=(t,e,n)=>t.reduce(e,n);function h3(...t){return ut(m3,t)}function m3(t){return[...t].reverse()}function ci(...t){return ut(g3,t)}var g3=(t,e)=>t[e];function Jo(...t){return ut(y3,t)}function y3(t,e){let n={};for(let[r,i]of Object.entries(t)){let s=e(i,r,t);n[r]=s}return n}function ce(t){return!!t}function Ju(...t){return ut(Object.keys,t)}function Qu(...t){return ut(v3,t)}var v3=t=>t.
|
|
738
|
+
at(-1);function xt(...t){return ut(w3,t,b3)}var w3=(t,e)=>t.map(e),b3=t=>(e,n,r)=>({done:!1,hasNext:!0,next:t(e,n,r)});function Gr(...t){return ut(E3,t)}function E3(t,e){let n={};for(let[r,i]of t.entries()){let[s,o]=e(i,r,t);n[s]=o}return n}function wp(t){return typeof t=="number"&&!Number.isNaN(t)}function $3(t){return t instanceof Promise}function Ly(t){return typeof t=="string"}function qt(t){return t===void 0?!0:typeof t=="string"||Array.isArray(t)?t.length===0:Object.keys(t).length===0}function fn(t){
|
|
739
|
+
return t!=null}function D3(t){return e=>!t(e)}function Tt(t){return t==null}function R3(t){return Array.isArray(t)}function Fy(t){return typeof t=="boolean"}function an(t){return t!==void 0}function k3(t,{triggerAt:e="end",minQuietPeriodMs:n,maxBurstDurationMs:r,minGapMs:i,reducer:s=T3}){let o,a,u,c,l=()=>{let p=u;p!==void 0&&(u=void 0,t(p),a=setTimeout(f,i))},f=()=>{clearTimeout(a),a=void 0,o===void 0&&l()},d=()=>{clearTimeout(o),o=void 0,c=void 0,a===void 0&&l()};return{call:(...p)=>{let h=o===
|
|
740
|
+
void 0&&a===void 0;if((e!=="start"||h)&&(u=s(u,...p)),!(o===void 0&&!h)){{clearTimeout(o);let v=Date.now();c??=v;let b=Math.min(n,r-(v-c));o=setTimeout(d,b)}e!=="end"&&h&&l()}},cancel:()=>{clearTimeout(o),o=void 0,c=void 0,clearTimeout(a),a=void 0,u=void 0},flush:()=>{d(),f()},get isIdle(){return o===void 0&&a===void 0}}}var T3=()=>"";function Qo(...t){return ut(C3,t)}var C3=(t,e)=>{let n=new Map;for(let[r,i]of t.entries()){let s=e(i,r,t);if(s!==void 0){let o=n.get(s);o===void 0&&(o=[],n.set(s,o)),
|
|
741
|
+
o.push(i)}}return Object.fromEntries(n)};function A3(){return S3}var S3=t=>t;function Zu(...t){return ut(_3,t)}function _3(t,e){let n={};for(let[r,i]of t.entries()){let s=e(i,r,t);n[s]=i}return n}function li(...t){return ut(P3,t,x3)}var P3=(t,e)=>t.flatMap(e),x3=t=>(e,n,r)=>{let i=t(e,n,r);return Array.isArray(i)?{done:!1,hasNext:!0,hasMany:!0,next:i}:{done:!1,hasNext:!0,next:i}};function N3(...t){return ut(I3,t,O3)}function I3(t,e){return t.forEach(e),t}var O3=t=>(e,n,r)=>(t(e,n,r),{done:!1,hasNext:!0,
|
|
742
|
+
next:e});function ck(...t){return ut(L3,t)}function L3(t,e){for(let[n,r]of Object.entries(t))e(r,n,t);return t}function F3(...t){return ut(Object.fromEntries,t)}function ec(...t){return ut(Object.entries,t)}function He(...t){return ut(M3,t,B3)}var M3=(t,e)=>t.filter(e),B3=t=>(e,n,r)=>t(e,n,r)?{done:!1,hasNext:!0,next:e}:Yu,lk=t=>Object.assign(t,{single:!0});function dk(...t){return ut(j3,t,lk(q3))}var j3=(t,e)=>t.find(e),q3=t=>(e,n,r)=>t(e,n,r)?{done:!0,hasNext:!0,next:e}:Yu;function fk(...t){return ut(
|
|
743
|
+
G3,t)}var G3=(t,e)=>{for(let n=t.length-1;n>=0;n--){let r=t[n];if(e(r,n,t))return r}};function Zo(...t){return ut(U3,t,lk(W3))}var U3=([t])=>t,W3=()=>z3,z3=t=>({hasNext:!0,next:t,done:!0});function pk(...t){return ut(H3,t)}var H3=(t,e)=>[...t,...e];function V3(...t){return sk(K3,t)}function K3(t){if(t.length===0)return JG;let e=new Map;for(let n of t)e.set(n,(e.get(n)??0)+1);return n=>{let r=e.get(n);return r===void 0||r===0?{done:!1,hasNext:!0,next:n}:(e.set(n,r-1),Yu)}}function X3(...t){return ut(
|
|
744
|
+
Y3,t)}var Y3=(t,e)=>e.some(n=>n(t));function J3(...t){return ut(Q3,t)}function Q3(t,e){if(e<1)throw new RangeError(`chunk: A chunk size of '${e.toString()}' would result in an infinite array`);if(t.length===0)return[];if(e>=t.length)return[[...t]];let n=Math.ceil(t.length/e),r=new Array(n);if(e===1)for(let[i,s]of t.entries())r[i]=[s];else for(let i=0;i<n;i+=1){let s=i*e;r[i]=t.slice(s,s+e)}return r}function hk(...t){return ut(Z3,t)}var Z3=(t,{min:e,max:n})=>e!==void 0&&t<e?e:n!==void 0&&t>n?n:t,
|
|
745
|
+
e4={reset:[0,0],bold:[1,22,"\x1B[22m\x1B[1m"],dim:[2,22,"\x1B[22m\x1B[2m"],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,
|
|
746
|
+
39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]},t4=Object.entries(e4);function My(t){return String(t)}My.open="",My.close="";function n4(t=!1){let e=typeof process<"u"?process:void 0,n=e?.env||{},r=e?.argv||[];return!("NO_COLOR"in n||r.includes("--no-color"))&&("FORCE_COLOR"in n||r.includes("--colo\
|
|
747
|
+
r")||e?.platform==="win32"||t&&n.TERM!=="dumb"||"CI"in n)||typeof window<"u"&&!!window.chrome}function r4(t=!1){let e=n4(t),n=(o,a,u,c)=>{let l="",f=0;do l+=o.substring(f,c)+u,f=c+a.length,c=o.indexOf(a,f);while(~c);return l+o.substring(f)},r=(o,a,u=o)=>{let c=l=>{let f=String(l),d=f.indexOf(a,o.length);return~d?o+n(f,a,u,d)+a:o+f+a};return c.open=o,c.close=a,c},i={isColorSupported:e},s=o=>`\x1B[${o}m`;for(let[o,a]of t4)i[o]=e?r(s(a[0]),s(a[1]),a[2]):My;return i}var i4=process.env.FORCE_TTY!==void 0||
|
|
748
|
+
E_(1),Gt=r4(i4),qs={},It={},mk;function By(){if(mk)return It;mk=1,Object.defineProperty(It,"__esModule",{value:!0}),It.thenable=It.typedArray=It.stringArray=It.array=It.func=It.error=It.number=It.string=It.boolean=void 0;function t(c){return c===!0||c===!1}It.boolean=t;function e(c){return typeof c=="string"||c instanceof String}It.string=e;function n(c){return typeof c=="number"||c instanceof Number}It.number=n;function r(c){return c instanceof Error}It.error=r;function i(c){return typeof c=="f\
|
|
749
|
+
unction"}It.func=i;function s(c){return Array.isArray(c)}It.array=s;function o(c){return s(c)&&c.every(l=>e(l))}It.stringArray=o;function a(c,l){return Array.isArray(c)&&c.every(l)}It.typedArray=a;function u(c){return c&&i(c.then)}return It.thenable=u,It}var Ze={},Gs={},Us={},bp={},jy={},Ee={},gk;function yk(){if(gk)return Ee;gk=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Message=Ee.NotificationType9=Ee.NotificationType8=Ee.NotificationType7=Ee.NotificationType6=Ee.NotificationType5=Ee.
|
|
750
|
+
NotificationType4=Ee.NotificationType3=Ee.NotificationType2=Ee.NotificationType1=Ee.NotificationType0=Ee.NotificationType=Ee.RequestType9=Ee.RequestType8=Ee.RequestType7=Ee.RequestType6=Ee.RequestType5=Ee.RequestType4=Ee.RequestType3=Ee.RequestType2=Ee.RequestType1=Ee.RequestType=Ee.RequestType0=Ee.AbstractMessageSignature=Ee.ParameterStructures=Ee.ResponseError=Ee.ErrorCodes=void 0;const t=Vu();var e;(function(T){T.ParseError=-32700,T.InvalidRequest=-32600,T.MethodNotFound=-32601,T.InvalidParams=
|
|
751
|
+
-32602,T.InternalError=-32603,T.jsonrpcReservedErrorRangeStart=-32099,T.serverErrorStart=-32099,T.MessageWriteError=-32099,T.MessageReadError=-32098,T.PendingResponseRejected=-32097,T.ConnectionInactive=-32096,T.ServerNotInitialized=-32002,T.UnknownErrorCode=-32001,T.jsonrpcReservedErrorRangeEnd=-32e3,T.serverErrorEnd=-32e3})(e||(Ee.ErrorCodes=e={}));class n extends Error{constructor(D,M,S){super(M),this.code=t.number(D)?D:e.UnknownErrorCode,this.data=S,Object.setPrototypeOf(this,n.prototype)}toJson(){
|
|
752
|
+
const D={code:this.code,message:this.message};return this.data!==void 0&&(D.data=this.data),D}}Ee.ResponseError=n;class r{constructor(D){this.kind=D}static is(D){return D===r.auto||D===r.byName||D===r.byPosition}toString(){return this.kind}}Ee.ParameterStructures=r,r.auto=new r("auto"),r.byPosition=new r("byPosition"),r.byName=new r("byName");class i{constructor(D,M){this.method=D,this.numberOfParams=M}get parameterStructures(){return r.auto}}Ee.AbstractMessageSignature=i;class s extends i{constructor(D){
|
|
753
|
+
super(D,0)}}Ee.RequestType0=s;class o extends i{constructor(D,M=r.auto){super(D,1),this._parameterStructures=M}get parameterStructures(){return this._parameterStructures}}Ee.RequestType=o;class a extends i{constructor(D,M=r.auto){super(D,1),this._parameterStructures=M}get parameterStructures(){return this._parameterStructures}}Ee.RequestType1=a;class u extends i{constructor(D){super(D,2)}}Ee.RequestType2=u;class c extends i{constructor(D){super(D,3)}}Ee.RequestType3=c;class l extends i{constructor(D){
|
|
754
|
+
super(D,4)}}Ee.RequestType4=l;class f extends i{constructor(D){super(D,5)}}Ee.RequestType5=f;class d extends i{constructor(D){super(D,6)}}Ee.RequestType6=d;class p extends i{constructor(D){super(D,7)}}Ee.RequestType7=p;class h extends i{constructor(D){super(D,8)}}Ee.RequestType8=h;class v extends i{constructor(D){super(D,9)}}Ee.RequestType9=v;class b extends i{constructor(D,M=r.auto){super(D,1),this._parameterStructures=M}get parameterStructures(){return this._parameterStructures}}Ee.NotificationType=
|
|
755
|
+
b;class y extends i{constructor(D){super(D,0)}}Ee.NotificationType0=y;class E extends i{constructor(D,M=r.auto){super(D,1),this._parameterStructures=M}get parameterStructures(){return this._parameterStructures}}Ee.NotificationType1=E;class R extends i{constructor(D){super(D,2)}}Ee.NotificationType2=R;class A extends i{constructor(D){super(D,3)}}Ee.NotificationType3=A;class N extends i{constructor(D){super(D,4)}}Ee.NotificationType4=N;class K extends i{constructor(D){super(D,5)}}Ee.NotificationType5=
|
|
756
|
+
K;class J extends i{constructor(D){super(D,6)}}Ee.NotificationType6=J;class se extends i{constructor(D){super(D,7)}}Ee.NotificationType7=se;class ie extends i{constructor(D){super(D,8)}}Ee.NotificationType8=ie;class we extends i{constructor(D){super(D,9)}}Ee.NotificationType9=we;var B;return function(T){function D(P){const O=P;return O&&t.string(O.method)&&(t.string(O.id)||t.number(O.id))}T.isRequest=D;function M(P){const O=P;return O&&t.string(O.method)&&P.id===void 0}T.isNotification=M;function S(P){
|
|
757
|
+
const O=P;return O&&(O.result!==void 0||!!O.error)&&(t.string(O.id)||t.number(O.id)||O.id===null)}T.isResponse=S}(B||(Ee.Message=B={})),Ee}var di={},vk;function wk(){if(vk)return di;vk=1;var t;Object.defineProperty(di,"__esModule",{value:!0}),di.LRUCache=di.LinkedMap=di.Touch=void 0;var e;(function(i){i.None=0,i.First=1,i.AsOld=i.First,i.Last=2,i.AsNew=i.Last})(e||(di.Touch=e={}));class n{constructor(){this[t]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=
|
|
758
|
+
0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(s){return this._map.has(s)}get(s,o=e.None){const a=this._map.get(s);if(a)return o!==e.None&&this.touch(a,o),a.value}set(s,o,a=e.None){let u=this._map.get(s);if(u)u.value=o,a!==e.None&&this.touch(u,a);else{switch(u={key:s,value:o,next:void 0,previous:void 0},a){case e.
|
|
759
|
+
None:this.addItemLast(u);break;case e.First:this.addItemFirst(u);break;case e.Last:this.addItemLast(u);break;default:this.addItemLast(u);break}this._map.set(s,u),this._size++}return this}delete(s){return!!this.remove(s)}remove(s){const o=this._map.get(s);if(o)return this._map.delete(s),this.removeItem(o),this._size--,o.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const s=this._head;return this._map.delete(s.key),this.removeItem(s),this.
|
|
760
|
+
_size--,s.value}forEach(s,o){const a=this._state;let u=this._head;for(;u;){if(o?s.bind(o)(u.value,u.key,this):s(u.value,u.key,this),this._state!==a)throw new Error("LinkedMap got modified during iteration.");u=u.next}}keys(){const s=this._state;let o=this._head;const a={[Symbol.iterator]:()=>a,next:()=>{if(this._state!==s)throw new Error("LinkedMap got modified during iteration.");if(o){const u={value:o.key,done:!1};return o=o.next,u}else return{value:void 0,done:!0}}};return a}values(){const s=this.
|
|
761
|
+
_state;let o=this._head;const a={[Symbol.iterator]:()=>a,next:()=>{if(this._state!==s)throw new Error("LinkedMap got modified during iteration.");if(o){const u={value:o.value,done:!1};return o=o.next,u}else return{value:void 0,done:!0}}};return a}entries(){const s=this._state;let o=this._head;const a={[Symbol.iterator]:()=>a,next:()=>{if(this._state!==s)throw new Error("LinkedMap got modified during iteration.");if(o){const u={value:[o.key,o.value],done:!1};return o=o.next,u}else return{value:void 0,
|
|
762
|
+
done:!0}}};return a}[(t=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(s){if(s>=this.size)return;if(s===0){this.clear();return}let o=this._head,a=this.size;for(;o&&a>s;)this._map.delete(o.key),o=o.next,a--;this._head=o,this._size=a,o&&(o.previous=void 0),this._state++}addItemFirst(s){if(!this._head&&!this._tail)this._tail=s;else if(this._head)s.next=this._head,this._head.previous=s;else throw new Error("Invalid list");this._head=s,this._state++}addItemLast(s){if(!this._head&&
|
|
763
|
+
!this._tail)this._head=s;else if(this._tail)s.previous=this._tail,this._tail.next=s;else throw new Error("Invalid list");this._tail=s,this._state++}removeItem(s){if(s===this._head&&s===this._tail)this._head=void 0,this._tail=void 0;else if(s===this._head){if(!s.next)throw new Error("Invalid list");s.next.previous=void 0,this._head=s.next}else if(s===this._tail){if(!s.previous)throw new Error("Invalid list");s.previous.next=void 0,this._tail=s.previous}else{const o=s.next,a=s.previous;if(!o||!a)throw new Error(
|
|
764
|
+
"Invalid list");o.previous=a,a.next=o}s.next=void 0,s.previous=void 0,this._state++}touch(s,o){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(o!==e.First&&o!==e.Last)){if(o===e.First){if(s===this._head)return;const a=s.next,u=s.previous;s===this._tail?(u.next=void 0,this._tail=u):(a.previous=u,u.next=a),s.previous=void 0,s.next=this._head,this._head.previous=s,this._head=s,this._state++}else if(o===e.Last){if(s===this._tail)return;const a=s.next,u=s.previous;s===this._head?(a.previous=
|
|
765
|
+
void 0,this._head=a):(a.previous=u,u.next=a),s.next=void 0,s.previous=this._tail,this._tail.next=s,this._tail=s,this._state++}}}toJSON(){const s=[];return this.forEach((o,a)=>{s.push([a,o])}),s}fromJSON(s){this.clear();for(const[o,a]of s)this.set(o,a)}}di.LinkedMap=n;class r extends n{constructor(s,o=1){super(),this._limit=s,this._ratio=Math.min(Math.max(0,o),1)}get limit(){return this._limit}set limit(s){this._limit=s,this.checkTrim()}get ratio(){return this._ratio}set ratio(s){this._ratio=Math.
|
|
766
|
+
min(Math.max(0,s),1),this.checkTrim()}get(s,o=e.AsNew){return super.get(s,o)}peek(s){return super.get(s,e.None)}set(s,o){return super.set(s,o,e.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}return di.LRUCache=r,di}var tc={},bk;function s4(){if(bk)return tc;bk=1,Object.defineProperty(tc,"__esModule",{value:!0}),tc.Disposable=void 0;var t;return function(e){function n(r){return{dispose:r}}e.create=n}(t||(tc.Disposable=t={})),tc}var Ws={},
|
|
767
|
+
Ek;function o4(){if(Ek)return Ws;Ek=1,Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.SharedArrayReceiverStrategy=Ws.SharedArraySenderStrategy=void 0;const t=ap();var e;(function(o){o.Continue=0,o.Cancelled=1})(e||(e={}));class n{constructor(){this.buffers=new Map}enableCancellation(a){if(a.id===null)return;const u=new SharedArrayBuffer(4),c=new Int32Array(u,0,1);c[0]=e.Continue,this.buffers.set(a.id,u),a.$cancellationData=u}async sendCancellation(a,u){const c=this.buffers.get(u);if(c===void 0)
|
|
768
|
+
return;const l=new Int32Array(c,0,1);Atomics.store(l,0,e.Cancelled)}cleanup(a){this.buffers.delete(a)}dispose(){this.buffers.clear()}}Ws.SharedArraySenderStrategy=n;class r{constructor(a){this.data=new Int32Array(a,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===e.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}class i{constructor(a){this.token=new r(a)}cancel(){}dispose(){}}class s{constructor(){
|
|
769
|
+
this.kind="request"}createCancellationTokenSource(a){const u=a.$cancellationData;return u===void 0?new t.CancellationTokenSource:new i(u)}}return Ws.SharedArrayReceiverStrategy=s,Ws}var fi={},nc={},$k;function Dk(){if($k)return nc;$k=1,Object.defineProperty(nc,"__esModule",{value:!0}),nc.Semaphore=void 0;const t=Ls();class e{constructor(r=1){if(r<=0)throw new Error("Capacity must be greater than 0");this._capacity=r,this._active=0,this._waiting=[]}lock(r){return new Promise((i,s)=>{this._waiting.
|
|
770
|
+
push({thunk:r,resolve:i,reject:s}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,t.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;const r=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const i=r.thunk();i instanceof Promise?i.then(s=>{this._active--,r.resolve(s),this.runNext()},
|
|
771
|
+
s=>{this._active--,r.reject(s),this.runNext()}):(this._active--,r.resolve(i),this.runNext())}catch(i){this._active--,r.reject(i),this.runNext()}}}return nc.Semaphore=e,nc}var Rk;function a4(){if(Rk)return fi;Rk=1,Object.defineProperty(fi,"__esModule",{value:!0}),fi.ReadableStreamMessageReader=fi.AbstractMessageReader=fi.MessageReader=void 0;const t=Ls(),e=Vu(),n=Xo(),r=Dk();var i;(function(u){function c(l){let f=l;return f&&e.func(f.listen)&&e.func(f.dispose)&&e.func(f.onError)&&e.func(f.onClose)&&
|
|
772
|
+
e.func(f.onPartialMessage)}u.is=c})(i||(fi.MessageReader=i={}));class s{constructor(){this.errorEmitter=new n.Emitter,this.closeEmitter=new n.Emitter,this.partialMessageEmitter=new n.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(c){this.errorEmitter.fire(this.asError(c))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.
|
|
773
|
+
event}firePartialMessage(c){this.partialMessageEmitter.fire(c)}asError(c){return c instanceof Error?c:new Error(`Reader received error. Reason: ${e.string(c.message)?c.message:"unknown"}`)}}fi.AbstractMessageReader=s;var o;(function(u){function c(l){let f,d;const p=new Map;let h;const v=new Map;if(l===void 0||typeof l=="string")f=l??"utf-8";else{if(f=l.charset??"utf-8",l.contentDecoder!==void 0&&(d=l.contentDecoder,p.set(d.name,d)),l.contentDecoders!==void 0)for(const b of l.contentDecoders)p.set(
|
|
774
|
+
b.name,b);if(l.contentTypeDecoder!==void 0&&(h=l.contentTypeDecoder,v.set(h.name,h)),l.contentTypeDecoders!==void 0)for(const b of l.contentTypeDecoders)v.set(b.name,b)}return h===void 0&&(h=(0,t.default)().applicationJson.decoder,v.set(h.name,h)),{charset:f,contentDecoder:d,contentDecoders:p,contentTypeDecoder:h,contentTypeDecoders:v}}u.fromOptions=c})(o||(o={}));class a extends s{constructor(c,l){super(),this.readable=c,this.options=o.fromOptions(l),this.buffer=(0,t.default)().messageBuffer.create(
|
|
775
|
+
this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new r.Semaphore(1)}set partialMessageTimeout(c){this._partialMessageTimeout=c}get partialMessageTimeout(){return this._partialMessageTimeout}listen(c){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=c;const l=this.readable.onData(f=>{this.onData(f)});return this.readable.onError(f=>this.fireError(f)),this.readable.onClose(()=>this.fireClose()),
|
|
776
|
+
l}onData(c){try{for(this.buffer.append(c);;){if(this.nextMessageLength===-1){const f=this.buffer.tryReadHeaders(!0);if(!f)return;const d=f.get("content-length");if(!d){this.fireError(new Error(`Header must provide a Content-Length property.
|
|
777
|
+
${JSON.stringify(Object.fromEntries(f))}`));return}const p=parseInt(d);if(isNaN(p)){this.fireError(new Error(`Content-Length value must be a number. Got ${d}`));return}this.nextMessageLength=p}const l=this.buffer.tryReadBody(this.nextMessageLength);if(l===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{const f=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(l):l,d=await this.options.
|
|
778
|
+
contentTypeDecoder.decode(f,this.options);this.callback(d)}).catch(f=>{this.fireError(f)})}}catch(l){this.fireError(l)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,t.default)().timer.setTimeout((c,l)=>{this.partialMessageTimer=void 0,c===this.messageToken&&(this.firePartialMessage({messageToken:c,waitingTime:l}),
|
|
779
|
+
this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}return fi.ReadableStreamMessageReader=a,fi}var pi={},kk;function u4(){if(kk)return pi;kk=1,Object.defineProperty(pi,"__esModule",{value:!0}),pi.WriteableStreamMessageWriter=pi.AbstractMessageWriter=pi.MessageWriter=void 0;const t=Ls(),e=Vu(),n=Dk(),r=Xo(),i="Content-Length: ",s=`\r
|
|
780
|
+
`;var o;(function(l){function f(d){let p=d;return p&&e.func(p.dispose)&&e.func(p.onClose)&&e.func(p.onError)&&e.func(p.write)}l.is=f})(o||(pi.MessageWriter=o={}));class a{constructor(){this.errorEmitter=new r.Emitter,this.closeEmitter=new r.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(f,d,p){this.errorEmitter.fire([this.asError(f),d,p])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(
|
|
781
|
+
void 0)}asError(f){return f instanceof Error?f:new Error(`Writer received error. Reason: ${e.string(f.message)?f.message:"unknown"}`)}}pi.AbstractMessageWriter=a;var u;(function(l){function f(d){return d===void 0||typeof d=="string"?{charset:d??"utf-8",contentTypeEncoder:(0,t.default)().applicationJson.encoder}:{charset:d.charset??"utf-8",contentEncoder:d.contentEncoder,contentTypeEncoder:d.contentTypeEncoder??(0,t.default)().applicationJson.encoder}}l.fromOptions=f})(u||(u={}));class c extends a{constructor(f,d){
|
|
782
|
+
super(),this.writable=f,this.options=u.fromOptions(d),this.errorCount=0,this.writeSemaphore=new n.Semaphore(1),this.writable.onError(p=>this.fireError(p)),this.writable.onClose(()=>this.fireClose())}async write(f){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(f,this.options).then(p=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(p):p).then(p=>{const h=[];return h.push(i,p.byteLength.toString(),s),h.push(s),this.doWrite(f,h,p)},p=>{throw this.
|
|
783
|
+
fireError(p),p}))}async doWrite(f,d,p){try{return await this.writable.write(d.join(""),"ascii"),this.writable.write(p)}catch(h){return this.handleError(h,f),Promise.reject(h)}}handleError(f,d){this.errorCount++,this.fireError(f,d,this.errorCount)}end(){this.writable.end()}}return pi.WriteableStreamMessageWriter=c,pi}var rc={},Tk;function c4(){if(Tk)return rc;Tk=1,Object.defineProperty(rc,"__esModule",{value:!0}),rc.AbstractMessageBuffer=void 0;const t=13,e=10,n=`\r
|
|
784
|
+
`;class r{constructor(s="utf-8"){this._encoding=s,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(s){const o=typeof s=="string"?this.fromString(s,this._encoding):s;this._chunks.push(o),this._totalLength+=o.byteLength}tryReadHeaders(s=!1){if(this._chunks.length===0)return;let o=0,a=0,u=0,c=0;e:for(;a<this._chunks.length;){const p=this._chunks[a];for(u=0;u<p.length;){switch(p[u]){case t:switch(o){case 0:o=1;break;case 2:o=3;break;default:o=0}break;case e:switch(o){case 1:
|
|
785
|
+
o=2;break;case 3:o=4,u++;break e;default:o=0}break;default:o=0}u++}c+=p.byteLength,a++}if(o!==4)return;const l=this._read(c+u),f=new Map,d=this.toString(l,"ascii").split(n);if(d.length<2)return f;for(let p=0;p<d.length-2;p++){const h=d[p],v=h.indexOf(":");if(v===-1)throw new Error(`Message header must separate key and value using ':'
|
|
786
|
+
${h}`);const b=h.substr(0,v),y=h.substr(v+1).trim();f.set(s?b.toLowerCase():b,y)}return f}tryReadBody(s){if(!(this._totalLength<s))return this._read(s)}get numberOfBytes(){return this._totalLength}_read(s){if(s===0)return this.emptyBuffer();if(s>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===s){const c=this._chunks[0];return this._chunks.shift(),this._totalLength-=s,this.asNative(c)}if(this._chunks[0].byteLength>s){const c=this._chunks[0],l=this.asNative(
|
|
787
|
+
c,s);return this._chunks[0]=c.slice(s),this._totalLength-=s,l}const o=this.allocNative(s);let a=0,u=0;for(;s>0;){const c=this._chunks[u];if(c.byteLength>s){const l=c.slice(0,s);o.set(l,a),a+=s,this._chunks[u]=c.slice(s),this._totalLength-=s,s-=s}else o.set(c,a),a+=c.byteLength,this._chunks.shift(),this._totalLength-=c.byteLength,s-=c.byteLength}return o}}return rc.AbstractMessageBuffer=r,rc}var qy={},Ck;function l4(){return Ck||(Ck=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.
|
|
788
|
+
createMessageConnection=t.ConnectionOptions=t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0;const e=Ls(),n=Vu(),r=yk(),i=wk(),s=Xo(),o=ap();var a;(function(D){D.type=new r.NotificationType(
|
|
789
|
+
"$/cancelRequest")})(a||(a={}));var u;(function(D){function M(S){return typeof S=="string"||typeof S=="number"}D.is=M})(u||(t.ProgressToken=u={}));var c;(function(D){D.type=new r.NotificationType("$/progress")})(c||(c={}));class l{constructor(){}}t.ProgressType=l;var f;(function(D){function M(S){return n.func(S)}D.is=M})(f||(f={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var d;(function(D){D[D.Off=0]="Off",D[D.Messages=1]="Messages",D[D.Compact=2]="Compact",
|
|
790
|
+
D[D.Verbose=3]="Verbose"})(d||(t.Trace=d={}));var p;(function(D){D.Off="off",D.Messages="messages",D.Compact="compact",D.Verbose="verbose"})(p||(t.TraceValues=p={})),function(D){function M(P){if(!n.string(P))return D.Off;switch(P=P.toLowerCase(),P){case"off":return D.Off;case"messages":return D.Messages;case"compact":return D.Compact;case"verbose":return D.Verbose;default:return D.Off}}D.fromString=M;function S(P){switch(P){case D.Off:return"off";case D.Messages:return"messages";case D.Compact:return"\
|
|
791
|
+
compact";case D.Verbose:return"verbose";default:return"off"}}D.toString=S}(d||(t.Trace=d={}));var h;(function(D){D.Text="text",D.JSON="json"})(h||(t.TraceFormat=h={})),function(D){function M(S){return n.string(S)?(S=S.toLowerCase(),S==="json"?D.JSON:D.Text):D.Text}D.fromString=M}(h||(t.TraceFormat=h={}));var v;(function(D){D.type=new r.NotificationType("$/setTrace")})(v||(t.SetTraceNotification=v={}));var b;(function(D){D.type=new r.NotificationType("$/logTrace")})(b||(t.LogTraceNotification=b={}));
|
|
792
|
+
var y;(function(D){D[D.Closed=1]="Closed",D[D.Disposed=2]="Disposed",D[D.AlreadyListening=3]="AlreadyListening"})(y||(t.ConnectionErrors=y={}));class E extends Error{constructor(M,S){super(S),this.code=M,Object.setPrototypeOf(this,E.prototype)}}t.ConnectionError=E;var R;(function(D){function M(S){const P=S;return P&&n.func(P.cancelUndispatched)}D.is=M})(R||(t.ConnectionStrategy=R={}));var A;(function(D){function M(S){const P=S;return P&&(P.kind===void 0||P.kind==="id")&&n.func(P.createCancellationTokenSource)&&
|
|
793
|
+
(P.dispose===void 0||n.func(P.dispose))}D.is=M})(A||(t.IdCancellationReceiverStrategy=A={}));var N;(function(D){function M(S){const P=S;return P&&P.kind==="request"&&n.func(P.createCancellationTokenSource)&&(P.dispose===void 0||n.func(P.dispose))}D.is=M})(N||(t.RequestCancellationReceiverStrategy=N={}));var K;(function(D){D.Message=Object.freeze({createCancellationTokenSource(S){return new o.CancellationTokenSource}});function M(S){return A.is(S)||N.is(S)}D.is=M})(K||(t.CancellationReceiverStrategy=
|
|
794
|
+
K={}));var J;(function(D){D.Message=Object.freeze({sendCancellation(S,P){return S.sendNotification(a.type,{id:P})},cleanup(S){}});function M(S){const P=S;return P&&n.func(P.sendCancellation)&&n.func(P.cleanup)}D.is=M})(J||(t.CancellationSenderStrategy=J={}));var se;(function(D){D.Message=Object.freeze({receiver:K.Message,sender:J.Message});function M(S){const P=S;return P&&K.is(P.receiver)&&J.is(P.sender)}D.is=M})(se||(t.CancellationStrategy=se={}));var ie;(function(D){function M(S){const P=S;return P&&
|
|
795
|
+
n.func(P.handleMessage)}D.is=M})(ie||(t.MessageStrategy=ie={}));var we;(function(D){function M(S){const P=S;return P&&(se.is(P.cancellationStrategy)||R.is(P.connectionStrategy)||ie.is(P.messageStrategy))}D.is=M})(we||(t.ConnectionOptions=we={}));var B;(function(D){D[D.New=1]="New",D[D.Listening=2]="Listening",D[D.Closed=3]="Closed",D[D.Disposed=4]="Disposed"})(B||(B={}));function T(D,M,S,P){const O=S!==void 0?S:t.NullLogger;let Z=0,H=0,C=0;const ne="2.0";let ye;const Pe=new Map;let F;const V=new Map,
|
|
796
|
+
Se=new Map;let le,$e=new i.LinkedMap,xe=new Map,de=new Set,I=new Map,G=d.Off,pe=h.Text,U,fe=B.New;const Ke=new s.Emitter,it=new s.Emitter,ue=new s.Emitter,Oe=new s.Emitter,re=new s.Emitter,De=P&&P.cancellationStrategy?P.cancellationStrategy:se.Message;function Ge($){if($===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+$.toString()}function vt($){return $===null?"res-unknown-"+(++C).toString():"res-"+$.toString()}function et(){return"\
|
|
797
|
+
not-"+(++H).toString()}function Kt($,W){r.Message.isRequest(W)?$.set(Ge(W.id),W):r.Message.isResponse(W)?$.set(vt(W.id),W):$.set(et(),W)}function en($){}function gn(){return fe===B.Listening}function X(){return fe===B.Closed}function Y(){return fe===B.Disposed}function he(){(fe===B.New||fe===B.Listening)&&(fe=B.Closed,it.fire(void 0))}function tn($){Ke.fire([$,void 0,void 0])}function Xt($){Ke.fire($)}D.onClose(he),D.onError(tn),M.onClose(he),M.onError(Xt);function _r(){le||$e.size===0||(le=(0,e.
|
|
798
|
+
default)().timer.setImmediate(()=>{le=void 0,cs()}))}function xi($){r.Message.isRequest($)?ds($):r.Message.isNotification($)?Ni($):r.Message.isResponse($)?fs($):Ii($)}function cs(){if($e.size===0)return;const $=$e.shift();try{const W=P?.messageStrategy;ie.is(W)?W.handleMessage($,xi):xi($)}finally{_r()}}const ls=$=>{try{if(r.Message.isNotification($)&&$.method===a.type.method){const W=$.params.id,te=Ge(W),oe=$e.get(te);if(r.Message.isRequest(oe)){const Be=P?.connectionStrategy,tt=Be&&Be.cancelUndispatched?
|
|
799
|
+
Be.cancelUndispatched(oe,en):void 0;if(tt&&(tt.error!==void 0||tt.result!==void 0)){$e.delete(te),I.delete(W),tt.id=oe.id,Pr(tt,$.method,Date.now()),M.write(tt).catch(()=>O.error("Sending response for canceled message failed."));return}}const Ue=I.get(W);if(Ue!==void 0){Ue.cancel(),Vr($);return}else de.add(W)}Kt($e,$)}finally{_r()}};function ds($){if(Y())return;function W(Le,at,nt){const Ut={jsonrpc:ne,id:$.id};Le instanceof r.ResponseError?Ut.error=Le.toJson():Ut.result=Le===void 0?null:Le,Pr(Ut,
|
|
800
|
+
at,nt),M.write(Ut).catch(()=>O.error("Sending response failed."))}function te(Le,at,nt){const Ut={jsonrpc:ne,id:$.id,error:Le.toJson()};Pr(Ut,at,nt),M.write(Ut).catch(()=>O.error("Sending response failed."))}function oe(Le,at,nt){Le===void 0&&(Le=null);const Ut={jsonrpc:ne,id:$.id,result:Le};Pr(Ut,at,nt),M.write(Ut).catch(()=>O.error("Sending response failed."))}ms($);const Ue=Pe.get($.method);let Be,tt;Ue&&(Be=Ue.type,tt=Ue.handler);const be=Date.now();if(tt||ye){const Le=$.id??String(Date.now()),
|
|
801
|
+
at=A.is(De.receiver)?De.receiver.createCancellationTokenSource(Le):De.receiver.createCancellationTokenSource($);$.id!==null&&de.has($.id)&&at.cancel(),$.id!==null&&I.set(Le,at);try{let nt;if(tt)if($.params===void 0){if(Be!==void 0&&Be.numberOfParams!==0){te(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${$.method} defines ${Be.numberOfParams} params but received none.`),$.method,be);return}nt=tt(at.token)}else if(Array.isArray($.params)){if(Be!==void 0&&Be.parameterStructures===r.ParameterStructures.
|
|
802
|
+
byName){te(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${$.method} defines parameters by name but received parameters by position`),$.method,be);return}nt=tt(...$.params,at.token)}else{if(Be!==void 0&&Be.parameterStructures===r.ParameterStructures.byPosition){te(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${$.method} defines parameters by position but received parameters by name`),$.method,be);return}nt=tt($.params,at.token)}else ye&&(nt=ye($.method,$.params,at.token));const Ut=nt;
|
|
803
|
+
nt?Ut.then?Ut.then(yn=>{I.delete(Le),W(yn,$.method,be)},yn=>{I.delete(Le),yn instanceof r.ResponseError?te(yn,$.method,be):yn&&n.string(yn.message)?te(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${$.method} failed with message: ${yn.message}`),$.method,be):te(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${$.method} failed unexpectedly without providing any details.`),$.method,be)}):(I.delete(Le),W(nt,$.method,be)):(I.delete(Le),oe(nt,$.method,be))}catch(nt){I.delete(Le),nt instanceof
|
|
804
|
+
r.ResponseError?W(nt,$.method,be):nt&&n.string(nt.message)?te(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${$.method} failed with message: ${nt.message}`),$.method,be):te(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${$.method} failed unexpectedly without providing any details.`),$.method,be)}}else te(new r.ResponseError(r.ErrorCodes.MethodNotFound,`Unhandled method ${$.method}`),$.method,be)}function fs($){if(!Y())if($.id===null)$.error?O.error(`Received response message \
|
|
805
|
+
without id: Error is:
|
|
806
|
+
${JSON.stringify($.error,void 0,4)}`):O.error("Received response message without id. No further error information provided.");else{const W=$.id,te=xe.get(W);if(gs($,te),te!==void 0){xe.delete(W);try{if($.error){const oe=$.error;te.reject(new r.ResponseError(oe.code,oe.message,oe.data))}else if($.result!==void 0)te.resolve($.result);else throw new Error("Should never happen.")}catch(oe){oe.message?O.error(`Response handler '${te.method}' failed with message: ${oe.message}`):O.error(`Response hand\
|
|
807
|
+
ler '${te.method}' failed unexpectedly.`)}}}}function Ni($){if(Y())return;let W,te;if($.method===a.type.method){const oe=$.params.id;de.delete(oe),Vr($);return}else{const oe=V.get($.method);oe&&(te=oe.handler,W=oe.type)}if(te||F)try{if(Vr($),te)if($.params===void 0)W!==void 0&&W.numberOfParams!==0&&W.parameterStructures!==r.ParameterStructures.byName&&O.error(`Notification ${$.method} defines ${W.numberOfParams} params but received none.`),te();else if(Array.isArray($.params)){const oe=$.params;
|
|
808
|
+
$.method===c.type.method&&oe.length===2&&u.is(oe[0])?te({token:oe[0],value:oe[1]}):(W!==void 0&&(W.parameterStructures===r.ParameterStructures.byName&&O.error(`Notification ${$.method} defines parameters by name but received parameters by position`),W.numberOfParams!==$.params.length&&O.error(`Notification ${$.method} defines ${W.numberOfParams} params but received ${oe.length} arguments`)),te(...oe))}else W!==void 0&&W.parameterStructures===r.ParameterStructures.byPosition&&O.error(`Notificatio\
|
|
809
|
+
n ${$.method} defines parameters by position but received parameters by name`),te($.params);else F&&F($.method,$.params)}catch(oe){oe.message?O.error(`Notification handler '${$.method}' failed with message: ${oe.message}`):O.error(`Notification handler '${$.method}' failed unexpectedly.`)}else ue.fire($)}function Ii($){if(!$){O.error("Received empty message.");return}O.error(`Received message which is neither a response nor a notification message:
|
|
810
|
+
${JSON.stringify($,null,4)}`);const W=$;if(n.string(W.id)||n.number(W.id)){const te=W.id,oe=xe.get(te);oe&&oe.reject(new Error("The received response has neither a result nor an error property."))}}function _n($){if($!=null)switch(G){case d.Verbose:return JSON.stringify($,null,4);case d.Compact:return JSON.stringify($);default:return}}function ps($){if(!(G===d.Off||!U))if(pe===h.Text){let W;(G===d.Verbose||G===d.Compact)&&$.params&&(W=`Params: ${_n($.params)}
|
|
811
|
+
|
|
812
|
+
`),U.log(`Sending request '${$.method} - (${$.id})'.`,W)}else Zn("send-request",$)}function hs($){if(!(G===d.Off||!U))if(pe===h.Text){let W;(G===d.Verbose||G===d.Compact)&&($.params?W=`Params: ${_n($.params)}
|
|
813
|
+
|
|
814
|
+
`:W=`No parameters provided.
|
|
815
|
+
|
|
816
|
+
`),U.log(`Sending notification '${$.method}'.`,W)}else Zn("send-notification",$)}function Pr($,W,te){if(!(G===d.Off||!U))if(pe===h.Text){let oe;(G===d.Verbose||G===d.Compact)&&($.error&&$.error.data?oe=`Error data: ${_n($.error.data)}
|
|
817
|
+
|
|
818
|
+
`:$.result?oe=`Result: ${_n($.result)}
|
|
819
|
+
|
|
820
|
+
`:$.error===void 0&&(oe=`No result returned.
|
|
821
|
+
|
|
822
|
+
`)),U.log(`Sending response '${W} - (${$.id})'. Processing request took ${Date.now()-te}ms`,oe)}else Zn("send-response",$)}function ms($){if(!(G===d.Off||!U))if(pe===h.Text){let W;(G===d.Verbose||G===d.Compact)&&$.params&&(W=`Params: ${_n($.params)}
|
|
823
|
+
|
|
824
|
+
`),U.log(`Received request '${$.method} - (${$.id})'.`,W)}else Zn("receive-request",$)}function Vr($){if(!(G===d.Off||!U||$.method===b.type.method))if(pe===h.Text){let W;(G===d.Verbose||G===d.Compact)&&($.params?W=`Params: ${_n($.params)}
|
|
825
|
+
|
|
826
|
+
`:W=`No parameters provided.
|
|
827
|
+
|
|
828
|
+
`),U.log(`Received notification '${$.method}'.`,W)}else Zn("receive-notification",$)}function gs($,W){if(!(G===d.Off||!U))if(pe===h.Text){let te;if((G===d.Verbose||G===d.Compact)&&($.error&&$.error.data?te=`Error data: ${_n($.error.data)}
|
|
829
|
+
|
|
830
|
+
`:$.result?te=`Result: ${_n($.result)}
|
|
831
|
+
|
|
832
|
+
`:$.error===void 0&&(te=`No result returned.
|
|
833
|
+
|
|
834
|
+
`)),W){const oe=$.error?` Request failed: ${$.error.message} (${$.error.code}).`:"";U.log(`Received response '${W.method} - (${$.id})' in ${Date.now()-W.timerStart}ms.${oe}`,te)}else U.log(`Received response ${$.id} without active response promise.`,te)}else Zn("receive-response",$)}function Zn($,W){if(!U||G===d.Off)return;const te={isLSPMessage:!0,type:$,message:W,timestamp:Date.now()};U.log(te)}function pr(){if(X())throw new E(y.Closed,"Connection is closed.");if(Y())throw new E(y.Disposed,"Co\
|
|
835
|
+
nnection is disposed.")}function Ao(){if(gn())throw new E(y.AlreadyListening,"Connection is already listening")}function j(){if(!gn())throw new Error("Call listen() first.")}function w($){return $===void 0?null:$}function _($){if($!==null)return $}function m($){return $!=null&&!Array.isArray($)&&typeof $=="object"}function k($,W){switch($){case r.ParameterStructures.auto:return m(W)?_(W):[w(W)];case r.ParameterStructures.byName:if(!m(W))throw new Error("Received parameters by name but param is n\
|
|
836
|
+
ot an object literal.");return _(W);case r.ParameterStructures.byPosition:return[w(W)];default:throw new Error(`Unknown parameter structure ${$.toString()}`)}}function g($,W){let te;const oe=$.numberOfParams;switch(oe){case 0:te=void 0;break;case 1:te=k($.parameterStructures,W[0]);break;default:te=[];for(let Ue=0;Ue<W.length&&Ue<oe;Ue++)te.push(w(W[Ue]));if(W.length<oe)for(let Ue=W.length;Ue<oe;Ue++)te.push(null);break}return te}const x={sendNotification:($,...W)=>{pr();let te,oe;if(n.string($)){
|
|
837
|
+
te=$;const Be=W[0];let tt=0,be=r.ParameterStructures.auto;r.ParameterStructures.is(Be)&&(tt=1,be=Be);let Le=W.length;const at=Le-tt;switch(at){case 0:oe=void 0;break;case 1:oe=k(be,W[tt]);break;default:if(be===r.ParameterStructures.byName)throw new Error(`Received ${at} parameters for 'by Name' notification parameter structure.`);oe=W.slice(tt,Le).map(nt=>w(nt));break}}else{const Be=W;te=$.method,oe=g($,Be)}const Ue={jsonrpc:ne,method:te,params:oe};return hs(Ue),M.write(Ue).catch(Be=>{throw O.error(
|
|
838
|
+
"Sending notification failed."),Be})},onNotification:($,W)=>{pr();let te;return n.func($)?F=$:W&&(n.string($)?(te=$,V.set($,{type:void 0,handler:W})):(te=$.method,V.set($.method,{type:$,handler:W}))),{dispose:()=>{te!==void 0?V.delete(te):F=void 0}}},onProgress:($,W,te)=>{if(Se.has(W))throw new Error(`Progress handler for token ${W} already registered`);return Se.set(W,te),{dispose:()=>{Se.delete(W)}}},sendProgress:($,W,te)=>x.sendNotification(c.type,{token:W,value:te}),onUnhandledProgress:Oe.event,
|
|
839
|
+
sendRequest:($,...W)=>{pr(),j();let te,oe,Ue;if(n.string($)){te=$;const Le=W[0],at=W[W.length-1];let nt=0,Ut=r.ParameterStructures.auto;r.ParameterStructures.is(Le)&&(nt=1,Ut=Le);let yn=W.length;o.CancellationToken.is(at)&&(yn=yn-1,Ue=at);const xr=yn-nt;switch(xr){case 0:oe=void 0;break;case 1:oe=k(Ut,W[nt]);break;default:if(Ut===r.ParameterStructures.byName)throw new Error(`Received ${xr} parameters for 'by Name' request parameter structure.`);oe=W.slice(nt,yn).map(m_=>w(m_));break}}else{const Le=W;
|
|
840
|
+
te=$.method,oe=g($,Le);const at=$.numberOfParams;Ue=o.CancellationToken.is(Le[at])?Le[at]:void 0}const Be=Z++;let tt;Ue&&(tt=Ue.onCancellationRequested(()=>{const Le=De.sender.sendCancellation(x,Be);return Le===void 0?(O.log(`Received no promise from cancellation strategy when cancelling id ${Be}`),Promise.resolve()):Le.catch(()=>{O.log(`Sending cancellation messages for id ${Be} failed`)})}));const be={jsonrpc:ne,id:Be,method:te,params:oe};return ps(be),typeof De.sender.enableCancellation=="fun\
|
|
841
|
+
ction"&&De.sender.enableCancellation(be),new Promise(async(Le,at)=>{const nt=xr=>{Le(xr),De.sender.cleanup(Be),tt?.dispose()},Ut=xr=>{at(xr),De.sender.cleanup(Be),tt?.dispose()},yn={method:te,timerStart:Date.now(),resolve:nt,reject:Ut};try{await M.write(be),xe.set(Be,yn)}catch(xr){throw O.error("Sending request failed."),yn.reject(new r.ResponseError(r.ErrorCodes.MessageWriteError,xr.message?xr.message:"Unknown reason")),xr}})},onRequest:($,W)=>{pr();let te=null;return f.is($)?(te=void 0,ye=$):n.
|
|
842
|
+
string($)?(te=null,W!==void 0&&(te=$,Pe.set($,{handler:W,type:void 0}))):W!==void 0&&(te=$.method,Pe.set($.method,{type:$,handler:W})),{dispose:()=>{te!==null&&(te!==void 0?Pe.delete(te):ye=void 0)}}},hasPendingResponse:()=>xe.size>0,trace:async($,W,te)=>{let oe=!1,Ue=h.Text;te!==void 0&&(n.boolean(te)?oe=te:(oe=te.sendNotification||!1,Ue=te.traceFormat||h.Text)),G=$,pe=Ue,G===d.Off?U=void 0:U=W,oe&&!X()&&!Y()&&await x.sendNotification(v.type,{value:d.toString($)})},onError:Ke.event,onClose:it.event,
|
|
843
|
+
onUnhandledNotification:ue.event,onDispose:re.event,end:()=>{M.end()},dispose:()=>{if(Y())return;fe=B.Disposed,re.fire(void 0);const $=new r.ResponseError(r.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const W of xe.values())W.reject($);xe=new Map,I=new Map,de=new Set,$e=new i.LinkedMap,n.func(M.dispose)&&M.dispose(),n.func(D.dispose)&&D.dispose()},listen:()=>{pr(),Ao(),fe=B.Listening,D.listen(ls)},inspect:()=>{(0,e.default)().console.log("ins\
|
|
844
|
+
pect")}};return x.onNotification(b.type,$=>{if(G===d.Off||!U)return;const W=G===d.Verbose||G===d.Compact;U.log($.message,W?$.verbose:void 0)}),x.onNotification(c.type,$=>{const W=Se.get($.token);W?W($.value):Oe.fire($)}),x}t.createMessageConnection=T}(qy)),qy}var Ak;function Gy(){return Ak||(Ak=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.AbstractMessageBuffer=t.WriteableStreamMessageWriter=
|
|
845
|
+
t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.LRUCache=t.Touch=t.LinkedMap=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.
|
|
846
|
+
NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.Message=t.RAL=void 0,t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=void 0;const e=yk();Object.defineProperty(t,"Me\
|
|
847
|
+
ssage",{enumerable:!0,get:function(){return e.Message}}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return e.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return e.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return e.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return e.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){
|
|
848
|
+
return e.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return e.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return e.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return e.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return e.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return e.RequestType8}}),Object.
|
|
849
|
+
defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return e.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return e.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return e.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return e.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return e.NotificationType0}}),Object.defineProperty(
|
|
850
|
+
t,"NotificationType1",{enumerable:!0,get:function(){return e.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return e.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return e.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return e.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return e.NotificationType5}}),Object.
|
|
851
|
+
defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return e.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return e.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return e.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return e.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return e.ParameterStructures}});
|
|
852
|
+
const n=wk();Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:function(){return n.LinkedMap}}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:function(){return n.LRUCache}}),Object.defineProperty(t,"Touch",{enumerable:!0,get:function(){return n.Touch}});const r=s4();Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return r.Disposable}});const i=Xo();Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return i.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,
|
|
853
|
+
get:function(){return i.Emitter}});const s=ap();Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return s.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return s.CancellationToken}});const o=o4();Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return o.SharedArraySenderStrategy}}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return o.SharedArrayReceiverStrategy}});
|
|
854
|
+
const a=a4();Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return a.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return a.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return a.ReadableStreamMessageReader}});const u=u4();Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return u.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",
|
|
855
|
+
{enumerable:!0,get:function(){return u.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return u.WriteableStreamMessageWriter}});const c=c4();Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return c.AbstractMessageBuffer}});const l=l4();Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return l.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){
|
|
856
|
+
return l.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return l.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return l.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return l.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return l.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return l.Trace}}),
|
|
857
|
+
Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return l.TraceValues}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return l.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return l.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return l.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return l.ConnectionErrors}}),
|
|
858
|
+
Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return l.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return l.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return l.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return l.CancellationStrategy}}),Object.defineProperty(t,"MessageStrategy",
|
|
859
|
+
{enumerable:!0,get:function(){return l.MessageStrategy}});const f=Ls();t.RAL=f.default}(jy)),jy}var Sk;function d4(){if(Sk)return bp;Sk=1,Object.defineProperty(bp,"__esModule",{value:!0});const t=R_,e=Gy();class n extends e.AbstractMessageBuffer{constructor(u="utf-8"){super(u)}emptyBuffer(){return n.emptyBuffer}fromString(u,c){return Buffer.from(u,c)}toString(u,c){return u instanceof Buffer?u.toString(c):new t.TextDecoder(c).decode(u)}asNative(u,c){return c===void 0?u instanceof Buffer?u:Buffer.
|
|
860
|
+
from(u):u instanceof Buffer?u.slice(0,c):Buffer.from(u,0,c)}allocNative(u){return Buffer.allocUnsafe(u)}}n.emptyBuffer=Buffer.allocUnsafe(0);class r{constructor(u){this.stream=u}onClose(u){return this.stream.on("close",u),e.Disposable.create(()=>this.stream.off("close",u))}onError(u){return this.stream.on("error",u),e.Disposable.create(()=>this.stream.off("error",u))}onEnd(u){return this.stream.on("end",u),e.Disposable.create(()=>this.stream.off("end",u))}onData(u){return this.stream.on("data",u),
|
|
861
|
+
e.Disposable.create(()=>this.stream.off("data",u))}}class i{constructor(u){this.stream=u}onClose(u){return this.stream.on("close",u),e.Disposable.create(()=>this.stream.off("close",u))}onError(u){return this.stream.on("error",u),e.Disposable.create(()=>this.stream.off("error",u))}onEnd(u){return this.stream.on("end",u),e.Disposable.create(()=>this.stream.off("end",u))}write(u,c){return new Promise((l,f)=>{const d=p=>{p==null?l():f(p)};typeof u=="string"?this.stream.write(u,c,d):this.stream.write(
|
|
862
|
+
u,d)})}end(){this.stream.end()}}const s=Object.freeze({messageBuffer:Object.freeze({create:a=>new n(a)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(a,u)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(a,void 0,0),u.charset))}catch(c){return Promise.reject(c)}}}),decoder:Object.freeze({name:"application/json",decode:(a,u)=>{try{return a instanceof Buffer?Promise.resolve(JSON.parse(a.toString(u.charset))):Promise.resolve(JSON.parse(new t.TextDecoder(
|
|
863
|
+
u.charset).decode(a)))}catch(c){return Promise.reject(c)}}})}),stream:Object.freeze({asReadableStream:a=>new r(a),asWritableStream:a=>new i(a)}),console,timer:Object.freeze({setTimeout(a,u,...c){const l=setTimeout(a,u,...c);return{dispose:()=>clearTimeout(l)}},setImmediate(a,...u){const c=setImmediate(a,...u);return{dispose:()=>clearImmediate(c)}},setInterval(a,u,...c){const l=setInterval(a,u,...c);return{dispose:()=>clearInterval(l)}}})});function o(){return s}return function(a){function u(){e.
|
|
864
|
+
RAL.install(s)}a.install=u}(o||(o={})),bp.default=o,bp}var _k;function zs(){return _k||(_k=1,function(t){var e=Us&&Us.__createBinding||(Object.create?function(B,T,D,M){M===void 0&&(M=D);var S=Object.getOwnPropertyDescriptor(T,D);(!S||("get"in S?!T.__esModule:S.writable||S.configurable))&&(S={enumerable:!0,get:function(){return T[D]}}),Object.defineProperty(B,M,S)}:function(B,T,D,M){M===void 0&&(M=D),B[M]=T[D]}),n=Us&&Us.__exportStar||function(B,T){for(var D in B)D!=="default"&&!Object.prototype.
|
|
865
|
+
hasOwnProperty.call(T,D)&&e(T,B,D)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.createServerSocketTransport=t.createClientSocketTransport=t.createServerPipeTransport=t.createClientPipeTransport=t.generateRandomPipeName=t.StreamMessageWriter=t.StreamMessageReader=t.SocketMessageWriter=t.SocketMessageReader=t.PortMessageWriter=t.PortMessageReader=t.IPCMessageWriter=t.IPCMessageReader=void 0;const r=d4();r.default.install();const i=Li,s=k_,o=T_,a=C_,u=Gy();n(Gy(),t);
|
|
866
|
+
class c extends u.AbstractMessageReader{constructor(T){super(),this.process=T;let D=this.process;D.on("error",M=>this.fireError(M)),D.on("close",()=>this.fireClose())}listen(T){return this.process.on("message",T),u.Disposable.create(()=>this.process.off("message",T))}}t.IPCMessageReader=c;class l extends u.AbstractMessageWriter{constructor(T){super(),this.process=T,this.errorCount=0;const D=this.process;D.on("error",M=>this.fireError(M)),D.on("close",()=>this.fireClose)}write(T){try{return typeof this.
|
|
867
|
+
process.send=="function"&&this.process.send(T,void 0,void 0,D=>{D?(this.errorCount++,this.handleError(D,T)):this.errorCount=0}),Promise.resolve()}catch(D){return this.handleError(D,T),Promise.reject(D)}}handleError(T,D){this.errorCount++,this.fireError(T,D,this.errorCount)}end(){}}t.IPCMessageWriter=l;class f extends u.AbstractMessageReader{constructor(T){super(),this.onData=new u.Emitter,T.on("close",()=>this.fireClose),T.on("error",D=>this.fireError(D)),T.on("message",D=>{this.onData.fire(D)})}listen(T){
|
|
868
|
+
return this.onData.event(T)}}t.PortMessageReader=f;class d extends u.AbstractMessageWriter{constructor(T){super(),this.port=T,this.errorCount=0,T.on("close",()=>this.fireClose()),T.on("error",D=>this.fireError(D))}write(T){try{return this.port.postMessage(T),Promise.resolve()}catch(D){return this.handleError(D,T),Promise.reject(D)}}handleError(T,D){this.errorCount++,this.fireError(T,D,this.errorCount)}end(){}}t.PortMessageWriter=d;class p extends u.ReadableStreamMessageReader{constructor(T,D="ut\
|
|
869
|
+
f-8"){super((0,r.default)().stream.asReadableStream(T),D)}}t.SocketMessageReader=p;class h extends u.WriteableStreamMessageWriter{constructor(T,D){super((0,r.default)().stream.asWritableStream(T),D),this.socket=T}dispose(){super.dispose(),this.socket.destroy()}}t.SocketMessageWriter=h;class v extends u.ReadableStreamMessageReader{constructor(T,D){super((0,r.default)().stream.asReadableStream(T),D)}}t.StreamMessageReader=v;class b extends u.WriteableStreamMessageWriter{constructor(T,D){super((0,r.
|
|
870
|
+
default)().stream.asWritableStream(T),D)}}t.StreamMessageWriter=b;const y=process.env.XDG_RUNTIME_DIR,E=new Map([["linux",107],["darwin",103]]);function R(){const B=(0,o.randomBytes)(21).toString("hex");if(process.platform==="win32")return`\\\\.\\pipe\\vscode-jsonrpc-${B}-sock`;let T;y?T=i.join(y,`vscode-ipc-${B}.sock`):T=i.join(s.tmpdir(),`vscode-${B}.sock`);const D=E.get(process.platform);return D!==void 0&&T.length>D&&(0,r.default)().console.warn(`WARNING: IPC handle "${T}" is longer than ${D}\
|
|
871
|
+
characters.`),T}t.generateRandomPipeName=R;function A(B,T="utf-8"){let D;const M=new Promise((S,P)=>{D=S});return new Promise((S,P)=>{let O=(0,a.createServer)(Z=>{O.close(),D([new p(Z,T),new h(Z,T)])});O.on("error",P),O.listen(B,()=>{O.removeListener("error",P),S({onConnected:()=>M})})})}t.createClientPipeTransport=A;function N(B,T="utf-8"){const D=(0,a.createConnection)(B);return[new p(D,T),new h(D,T)]}t.createServerPipeTransport=N;function K(B,T="utf-8"){let D;const M=new Promise((S,P)=>{D=S});
|
|
872
|
+
return new Promise((S,P)=>{const O=(0,a.createServer)(Z=>{O.close(),D([new p(Z,T),new h(Z,T)])});O.on("error",P),O.listen(B,"127.0.0.1",()=>{O.removeListener("error",P),S({onConnected:()=>M})})})}t.createClientSocketTransport=K;function J(B,T="utf-8"){const D=(0,a.createConnection)(B,"127.0.0.1");return[new p(D,T),new h(D,T)]}t.createServerSocketTransport=J;function se(B){const T=B;return T.read!==void 0&&T.addListener!==void 0}function ie(B){const T=B;return T.write!==void 0&&T.addListener!==void 0}
|
|
873
|
+
function we(B,T,D,M){D||(D=u.NullLogger);const S=se(B)?new v(B):B,P=ie(T)?new b(T):T;return u.ConnectionStrategy.is(M)&&(M={connectionStrategy:M}),(0,u.createMessageConnection)(S,P,D,M)}t.createMessageConnection=we}(Us)),Us}var Uy,Pk;function xk(){return Pk||(Pk=1,Uy=zs()),Uy}var Hs={},Ep={exports:{}},Nk;function Wy(){return Nk||(Nk=1,function(t,e){(function(n){{var r=n(_b,e);r!==void 0&&(t.exports=r)}})(function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.TextDocument=r.EOL=r.WorkspaceFolder=
|
|
874
|
+
r.InlineCompletionContext=r.SelectedCompletionInfo=r.InlineCompletionTriggerKind=r.InlineCompletionList=r.InlineCompletionItem=r.StringValue=r.InlayHint=r.InlayHintLabelPart=r.InlayHintKind=r.InlineValueContext=r.InlineValueEvaluatableExpression=r.InlineValueVariableLookup=r.InlineValueText=r.SemanticTokens=r.SemanticTokenModifiers=r.SemanticTokenTypes=r.SelectionRange=r.DocumentLink=r.FormattingOptions=r.CodeLens=r.CodeAction=r.CodeActionContext=r.CodeActionTriggerKind=r.CodeActionKind=r.DocumentSymbol=
|
|
875
|
+
r.WorkspaceSymbol=r.SymbolInformation=r.SymbolTag=r.SymbolKind=r.DocumentHighlight=r.DocumentHighlightKind=r.SignatureInformation=r.ParameterInformation=r.Hover=r.MarkedString=r.CompletionList=r.CompletionItem=r.CompletionItemLabelDetails=r.InsertTextMode=r.InsertReplaceEdit=r.CompletionItemTag=r.InsertTextFormat=r.CompletionItemKind=r.MarkupContent=r.MarkupKind=r.TextDocumentItem=r.OptionalVersionedTextDocumentIdentifier=r.VersionedTextDocumentIdentifier=r.TextDocumentIdentifier=r.WorkspaceChange=
|
|
876
|
+
r.WorkspaceEdit=r.DeleteFile=r.RenameFile=r.CreateFile=r.TextDocumentEdit=r.AnnotatedTextEdit=r.ChangeAnnotationIdentifier=r.ChangeAnnotation=r.TextEdit=r.Command=r.Diagnostic=r.CodeDescription=r.DiagnosticTag=r.DiagnosticSeverity=r.DiagnosticRelatedInformation=r.FoldingRange=r.FoldingRangeKind=r.ColorPresentation=r.ColorInformation=r.Color=r.LocationLink=r.Location=r.Range=r.Position=r.uinteger=r.integer=r.URI=r.DocumentUri=void 0;var i;(function(w){function _(m){return typeof m=="string"}w.is=
|
|
877
|
+
_})(i||(r.DocumentUri=i={}));var s;(function(w){function _(m){return typeof m=="string"}w.is=_})(s||(r.URI=s={}));var o;(function(w){w.MIN_VALUE=-2147483648,w.MAX_VALUE=2147483647;function _(m){return typeof m=="number"&&w.MIN_VALUE<=m&&m<=w.MAX_VALUE}w.is=_})(o||(r.integer=o={}));var a;(function(w){w.MIN_VALUE=0,w.MAX_VALUE=2147483647;function _(m){return typeof m=="number"&&w.MIN_VALUE<=m&&m<=w.MAX_VALUE}w.is=_})(a||(r.uinteger=a={}));var u;(function(w){function _(k,g){return k===Number.MAX_VALUE&&
|
|
878
|
+
(k=a.MAX_VALUE),g===Number.MAX_VALUE&&(g=a.MAX_VALUE),{line:k,character:g}}w.create=_;function m(k){var g=k;return j.objectLiteral(g)&&j.uinteger(g.line)&&j.uinteger(g.character)}w.is=m})(u||(r.Position=u={}));var c;(function(w){function _(k,g,x,$){if(j.uinteger(k)&&j.uinteger(g)&&j.uinteger(x)&&j.uinteger($))return{start:u.create(k,g),end:u.create(x,$)};if(u.is(k)&&u.is(g))return{start:k,end:g};throw new Error("Range#create called with invalid arguments[".concat(k,", ").concat(g,", ").concat(x,
|
|
879
|
+
", ").concat($,"]"))}w.create=_;function m(k){var g=k;return j.objectLiteral(g)&&u.is(g.start)&&u.is(g.end)}w.is=m})(c||(r.Range=c={}));var l;(function(w){function _(k,g){return{uri:k,range:g}}w.create=_;function m(k){var g=k;return j.objectLiteral(g)&&c.is(g.range)&&(j.string(g.uri)||j.undefined(g.uri))}w.is=m})(l||(r.Location=l={}));var f;(function(w){function _(k,g,x,$){return{targetUri:k,targetRange:g,targetSelectionRange:x,originSelectionRange:$}}w.create=_;function m(k){var g=k;return j.objectLiteral(
|
|
880
|
+
g)&&c.is(g.targetRange)&&j.string(g.targetUri)&&c.is(g.targetSelectionRange)&&(c.is(g.originSelectionRange)||j.undefined(g.originSelectionRange))}w.is=m})(f||(r.LocationLink=f={}));var d;(function(w){function _(k,g,x,$){return{red:k,green:g,blue:x,alpha:$}}w.create=_;function m(k){var g=k;return j.objectLiteral(g)&&j.numberRange(g.red,0,1)&&j.numberRange(g.green,0,1)&&j.numberRange(g.blue,0,1)&&j.numberRange(g.alpha,0,1)}w.is=m})(d||(r.Color=d={}));var p;(function(w){function _(k,g){return{range:k,
|
|
881
|
+
color:g}}w.create=_;function m(k){var g=k;return j.objectLiteral(g)&&c.is(g.range)&&d.is(g.color)}w.is=m})(p||(r.ColorInformation=p={}));var h;(function(w){function _(k,g,x){return{label:k,textEdit:g,additionalTextEdits:x}}w.create=_;function m(k){var g=k;return j.objectLiteral(g)&&j.string(g.label)&&(j.undefined(g.textEdit)||J.is(g))&&(j.undefined(g.additionalTextEdits)||j.typedArray(g.additionalTextEdits,J.is))}w.is=m})(h||(r.ColorPresentation=h={}));var v;(function(w){w.Comment="comment",w.Imports=
|
|
882
|
+
"imports",w.Region="region"})(v||(r.FoldingRangeKind=v={}));var b;(function(w){function _(k,g,x,$,W,te){var oe={startLine:k,endLine:g};return j.defined(x)&&(oe.startCharacter=x),j.defined($)&&(oe.endCharacter=$),j.defined(W)&&(oe.kind=W),j.defined(te)&&(oe.collapsedText=te),oe}w.create=_;function m(k){var g=k;return j.objectLiteral(g)&&j.uinteger(g.startLine)&&j.uinteger(g.startLine)&&(j.undefined(g.startCharacter)||j.uinteger(g.startCharacter))&&(j.undefined(g.endCharacter)||j.uinteger(g.endCharacter))&&
|
|
883
|
+
(j.undefined(g.kind)||j.string(g.kind))}w.is=m})(b||(r.FoldingRange=b={}));var y;(function(w){function _(k,g){return{location:k,message:g}}w.create=_;function m(k){var g=k;return j.defined(g)&&l.is(g.location)&&j.string(g.message)}w.is=m})(y||(r.DiagnosticRelatedInformation=y={}));var E;(function(w){w.Error=1,w.Warning=2,w.Information=3,w.Hint=4})(E||(r.DiagnosticSeverity=E={}));var R;(function(w){w.Unnecessary=1,w.Deprecated=2})(R||(r.DiagnosticTag=R={}));var A;(function(w){function _(m){var k=m;
|
|
884
|
+
return j.objectLiteral(k)&&j.string(k.href)}w.is=_})(A||(r.CodeDescription=A={}));var N;(function(w){function _(k,g,x,$,W,te){var oe={range:k,message:g};return j.defined(x)&&(oe.severity=x),j.defined($)&&(oe.code=$),j.defined(W)&&(oe.source=W),j.defined(te)&&(oe.relatedInformation=te),oe}w.create=_;function m(k){var g,x=k;return j.defined(x)&&c.is(x.range)&&j.string(x.message)&&(j.number(x.severity)||j.undefined(x.severity))&&(j.integer(x.code)||j.string(x.code)||j.undefined(x.code))&&(j.undefined(
|
|
885
|
+
x.codeDescription)||j.string((g=x.codeDescription)===null||g===void 0?void 0:g.href))&&(j.string(x.source)||j.undefined(x.source))&&(j.undefined(x.relatedInformation)||j.typedArray(x.relatedInformation,y.is))}w.is=m})(N||(r.Diagnostic=N={}));var K;(function(w){function _(k,g){for(var x=[],$=2;$<arguments.length;$++)x[$-2]=arguments[$];var W={title:k,command:g};return j.defined(x)&&x.length>0&&(W.arguments=x),W}w.create=_;function m(k){var g=k;return j.defined(g)&&j.string(g.title)&&j.string(g.command)}
|
|
886
|
+
w.is=m})(K||(r.Command=K={}));var J;(function(w){function _(x,$){return{range:x,newText:$}}w.replace=_;function m(x,$){return{range:{start:x,end:x},newText:$}}w.insert=m;function k(x){return{range:x,newText:""}}w.del=k;function g(x){var $=x;return j.objectLiteral($)&&j.string($.newText)&&c.is($.range)}w.is=g})(J||(r.TextEdit=J={}));var se;(function(w){function _(k,g,x){var $={label:k};return g!==void 0&&($.needsConfirmation=g),x!==void 0&&($.description=x),$}w.create=_;function m(k){var g=k;return j.
|
|
887
|
+
objectLiteral(g)&&j.string(g.label)&&(j.boolean(g.needsConfirmation)||g.needsConfirmation===void 0)&&(j.string(g.description)||g.description===void 0)}w.is=m})(se||(r.ChangeAnnotation=se={}));var ie;(function(w){function _(m){var k=m;return j.string(k)}w.is=_})(ie||(r.ChangeAnnotationIdentifier=ie={}));var we;(function(w){function _(x,$,W){return{range:x,newText:$,annotationId:W}}w.replace=_;function m(x,$,W){return{range:{start:x,end:x},newText:$,annotationId:W}}w.insert=m;function k(x,$){return{
|
|
888
|
+
range:x,newText:"",annotationId:$}}w.del=k;function g(x){var $=x;return J.is($)&&(se.is($.annotationId)||ie.is($.annotationId))}w.is=g})(we||(r.AnnotatedTextEdit=we={}));var B;(function(w){function _(k,g){return{textDocument:k,edits:g}}w.create=_;function m(k){var g=k;return j.defined(g)&&ne.is(g.textDocument)&&Array.isArray(g.edits)}w.is=m})(B||(r.TextDocumentEdit=B={}));var T;(function(w){function _(k,g,x){var $={kind:"create",uri:k};return g!==void 0&&(g.overwrite!==void 0||g.ignoreIfExists!==
|
|
889
|
+
void 0)&&($.options=g),x!==void 0&&($.annotationId=x),$}w.create=_;function m(k){var g=k;return g&&g.kind==="create"&&j.string(g.uri)&&(g.options===void 0||(g.options.overwrite===void 0||j.boolean(g.options.overwrite))&&(g.options.ignoreIfExists===void 0||j.boolean(g.options.ignoreIfExists)))&&(g.annotationId===void 0||ie.is(g.annotationId))}w.is=m})(T||(r.CreateFile=T={}));var D;(function(w){function _(k,g,x,$){var W={kind:"rename",oldUri:k,newUri:g};return x!==void 0&&(x.overwrite!==void 0||x.
|
|
890
|
+
ignoreIfExists!==void 0)&&(W.options=x),$!==void 0&&(W.annotationId=$),W}w.create=_;function m(k){var g=k;return g&&g.kind==="rename"&&j.string(g.oldUri)&&j.string(g.newUri)&&(g.options===void 0||(g.options.overwrite===void 0||j.boolean(g.options.overwrite))&&(g.options.ignoreIfExists===void 0||j.boolean(g.options.ignoreIfExists)))&&(g.annotationId===void 0||ie.is(g.annotationId))}w.is=m})(D||(r.RenameFile=D={}));var M;(function(w){function _(k,g,x){var $={kind:"delete",uri:k};return g!==void 0&&
|
|
891
|
+
(g.recursive!==void 0||g.ignoreIfNotExists!==void 0)&&($.options=g),x!==void 0&&($.annotationId=x),$}w.create=_;function m(k){var g=k;return g&&g.kind==="delete"&&j.string(g.uri)&&(g.options===void 0||(g.options.recursive===void 0||j.boolean(g.options.recursive))&&(g.options.ignoreIfNotExists===void 0||j.boolean(g.options.ignoreIfNotExists)))&&(g.annotationId===void 0||ie.is(g.annotationId))}w.is=m})(M||(r.DeleteFile=M={}));var S;(function(w){function _(m){var k=m;return k&&(k.changes!==void 0||
|
|
892
|
+
k.documentChanges!==void 0)&&(k.documentChanges===void 0||k.documentChanges.every(function(g){return j.string(g.kind)?T.is(g)||D.is(g)||M.is(g):B.is(g)}))}w.is=_})(S||(r.WorkspaceEdit=S={}));var P=function(){function w(_,m){this.edits=_,this.changeAnnotations=m}return w.prototype.insert=function(_,m,k){var g,x;if(k===void 0?g=J.insert(_,m):ie.is(k)?(x=k,g=we.insert(_,m,k)):(this.assertChangeAnnotations(this.changeAnnotations),x=this.changeAnnotations.manage(k),g=we.insert(_,m,x)),this.edits.push(
|
|
893
|
+
g),x!==void 0)return x},w.prototype.replace=function(_,m,k){var g,x;if(k===void 0?g=J.replace(_,m):ie.is(k)?(x=k,g=we.replace(_,m,k)):(this.assertChangeAnnotations(this.changeAnnotations),x=this.changeAnnotations.manage(k),g=we.replace(_,m,x)),this.edits.push(g),x!==void 0)return x},w.prototype.delete=function(_,m){var k,g;if(m===void 0?k=J.del(_):ie.is(m)?(g=m,k=we.del(_,m)):(this.assertChangeAnnotations(this.changeAnnotations),g=this.changeAnnotations.manage(m),k=we.del(_,g)),this.edits.push(k),
|
|
894
|
+
g!==void 0)return g},w.prototype.add=function(_){this.edits.push(_)},w.prototype.all=function(){return this.edits},w.prototype.clear=function(){this.edits.splice(0,this.edits.length)},w.prototype.assertChangeAnnotations=function(_){if(_===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},w}(),O=function(){function w(_){this._annotations=_===void 0?Object.create(null):_,this._counter=0,this._size=0}return w.prototype.all=function(){return this._annotations},
|
|
895
|
+
Object.defineProperty(w.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),w.prototype.manage=function(_,m){var k;if(ie.is(_)?k=_:(k=this.nextId(),m=_),this._annotations[k]!==void 0)throw new Error("Id ".concat(k," is already in use."));if(m===void 0)throw new Error("No annotation provided for id ".concat(k));return this._annotations[k]=m,this._size++,k},w.prototype.nextId=function(){return this._counter++,this._counter.toString()},w}(),Z=function(){function w(_){
|
|
896
|
+
var m=this;this._textEditChanges=Object.create(null),_!==void 0?(this._workspaceEdit=_,_.documentChanges?(this._changeAnnotations=new O(_.changeAnnotations),_.changeAnnotations=this._changeAnnotations.all(),_.documentChanges.forEach(function(k){if(B.is(k)){var g=new P(k.edits,m._changeAnnotations);m._textEditChanges[k.textDocument.uri]=g}})):_.changes&&Object.keys(_.changes).forEach(function(k){var g=new P(_.changes[k]);m._textEditChanges[k]=g})):this._workspaceEdit={}}return Object.defineProperty(
|
|
897
|
+
w.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),w.prototype.getTextEditChange=function(_){if(ne.is(_)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document cha\
|
|
898
|
+
nges.");var m={uri:_.uri,version:_.version},k=this._textEditChanges[m.uri];if(!k){var g=[],x={textDocument:m,edits:g};this._workspaceEdit.documentChanges.push(x),k=new P(g,this._changeAnnotations),this._textEditChanges[m.uri]=k}return k}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var k=this._textEditChanges[_];if(!k){var g=[];this._workspaceEdit.changes[_]=g,k=new P(g),this._textEditChanges[_]=k}
|
|
899
|
+
return k}},w.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new O,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},w.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},w.prototype.createFile=function(_,m,k){if(this.initDocumentChanges(),
|
|
900
|
+
this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var g;se.is(m)||ie.is(m)?g=m:k=m;var x,$;if(g===void 0?x=T.create(_,k):($=ie.is(g)?g:this._changeAnnotations.manage(g),x=T.create(_,k,$)),this._workspaceEdit.documentChanges.push(x),$!==void 0)return $},w.prototype.renameFile=function(_,m,k,g){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document\
|
|
901
|
+
changes.");var x;se.is(k)||ie.is(k)?x=k:g=k;var $,W;if(x===void 0?$=D.create(_,m,g):(W=ie.is(x)?x:this._changeAnnotations.manage(x),$=D.create(_,m,g,W)),this._workspaceEdit.documentChanges.push($),W!==void 0)return W},w.prototype.deleteFile=function(_,m,k){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var g;se.is(m)||ie.is(m)?g=m:k=m;var x,$;if(g===void 0?x=M.create(_,k):($=ie.is(g)?g:this._changeAnnotations.
|
|
902
|
+
manage(g),x=M.create(_,k,$)),this._workspaceEdit.documentChanges.push(x),$!==void 0)return $},w}();r.WorkspaceChange=Z;var H;(function(w){function _(k){return{uri:k}}w.create=_;function m(k){var g=k;return j.defined(g)&&j.string(g.uri)}w.is=m})(H||(r.TextDocumentIdentifier=H={}));var C;(function(w){function _(k,g){return{uri:k,version:g}}w.create=_;function m(k){var g=k;return j.defined(g)&&j.string(g.uri)&&j.integer(g.version)}w.is=m})(C||(r.VersionedTextDocumentIdentifier=C={}));var ne;(function(w){
|
|
903
|
+
function _(k,g){return{uri:k,version:g}}w.create=_;function m(k){var g=k;return j.defined(g)&&j.string(g.uri)&&(g.version===null||j.integer(g.version))}w.is=m})(ne||(r.OptionalVersionedTextDocumentIdentifier=ne={}));var ye;(function(w){function _(k,g,x,$){return{uri:k,languageId:g,version:x,text:$}}w.create=_;function m(k){var g=k;return j.defined(g)&&j.string(g.uri)&&j.string(g.languageId)&&j.integer(g.version)&&j.string(g.text)}w.is=m})(ye||(r.TextDocumentItem=ye={}));var Pe;(function(w){w.PlainText=
|
|
904
|
+
"plaintext",w.Markdown="markdown";function _(m){var k=m;return k===w.PlainText||k===w.Markdown}w.is=_})(Pe||(r.MarkupKind=Pe={}));var F;(function(w){function _(m){var k=m;return j.objectLiteral(m)&&Pe.is(k.kind)&&j.string(k.value)}w.is=_})(F||(r.MarkupContent=F={}));var V;(function(w){w.Text=1,w.Method=2,w.Function=3,w.Constructor=4,w.Field=5,w.Variable=6,w.Class=7,w.Interface=8,w.Module=9,w.Property=10,w.Unit=11,w.Value=12,w.Enum=13,w.Keyword=14,w.Snippet=15,w.Color=16,w.File=17,w.Reference=18,
|
|
905
|
+
w.Folder=19,w.EnumMember=20,w.Constant=21,w.Struct=22,w.Event=23,w.Operator=24,w.TypeParameter=25})(V||(r.CompletionItemKind=V={}));var Se;(function(w){w.PlainText=1,w.Snippet=2})(Se||(r.InsertTextFormat=Se={}));var le;(function(w){w.Deprecated=1})(le||(r.CompletionItemTag=le={}));var $e;(function(w){function _(k,g,x){return{newText:k,insert:g,replace:x}}w.create=_;function m(k){var g=k;return g&&j.string(g.newText)&&c.is(g.insert)&&c.is(g.replace)}w.is=m})($e||(r.InsertReplaceEdit=$e={}));var xe;
|
|
906
|
+
(function(w){w.asIs=1,w.adjustIndentation=2})(xe||(r.InsertTextMode=xe={}));var de;(function(w){function _(m){var k=m;return k&&(j.string(k.detail)||k.detail===void 0)&&(j.string(k.description)||k.description===void 0)}w.is=_})(de||(r.CompletionItemLabelDetails=de={}));var I;(function(w){function _(m){return{label:m}}w.create=_})(I||(r.CompletionItem=I={}));var G;(function(w){function _(m,k){return{items:m||[],isIncomplete:!!k}}w.create=_})(G||(r.CompletionList=G={}));var pe;(function(w){function _(k){
|
|
907
|
+
return k.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}w.fromPlainText=_;function m(k){var g=k;return j.string(g)||j.objectLiteral(g)&&j.string(g.language)&&j.string(g.value)}w.is=m})(pe||(r.MarkedString=pe={}));var U;(function(w){function _(m){var k=m;return!!k&&j.objectLiteral(k)&&(F.is(k.contents)||pe.is(k.contents)||j.typedArray(k.contents,pe.is))&&(m.range===void 0||c.is(m.range))}w.is=_})(U||(r.Hover=U={}));var fe;(function(w){function _(m,k){return k?{label:m,documentation:k}:{label:m}}w.create=
|
|
908
|
+
_})(fe||(r.ParameterInformation=fe={}));var Ke;(function(w){function _(m,k){for(var g=[],x=2;x<arguments.length;x++)g[x-2]=arguments[x];var $={label:m};return j.defined(k)&&($.documentation=k),j.defined(g)?$.parameters=g:$.parameters=[],$}w.create=_})(Ke||(r.SignatureInformation=Ke={}));var it;(function(w){w.Text=1,w.Read=2,w.Write=3})(it||(r.DocumentHighlightKind=it={}));var ue;(function(w){function _(m,k){var g={range:m};return j.number(k)&&(g.kind=k),g}w.create=_})(ue||(r.DocumentHighlight=ue=
|
|
909
|
+
{}));var Oe;(function(w){w.File=1,w.Module=2,w.Namespace=3,w.Package=4,w.Class=5,w.Method=6,w.Property=7,w.Field=8,w.Constructor=9,w.Enum=10,w.Interface=11,w.Function=12,w.Variable=13,w.Constant=14,w.String=15,w.Number=16,w.Boolean=17,w.Array=18,w.Object=19,w.Key=20,w.Null=21,w.EnumMember=22,w.Struct=23,w.Event=24,w.Operator=25,w.TypeParameter=26})(Oe||(r.SymbolKind=Oe={}));var re;(function(w){w.Deprecated=1})(re||(r.SymbolTag=re={}));var De;(function(w){function _(m,k,g,x,$){var W={name:m,kind:k,
|
|
910
|
+
location:{uri:x,range:g}};return $&&(W.containerName=$),W}w.create=_})(De||(r.SymbolInformation=De={}));var Ge;(function(w){function _(m,k,g,x){return x!==void 0?{name:m,kind:k,location:{uri:g,range:x}}:{name:m,kind:k,location:{uri:g}}}w.create=_})(Ge||(r.WorkspaceSymbol=Ge={}));var vt;(function(w){function _(k,g,x,$,W,te){var oe={name:k,detail:g,kind:x,range:$,selectionRange:W};return te!==void 0&&(oe.children=te),oe}w.create=_;function m(k){var g=k;return g&&j.string(g.name)&&j.number(g.kind)&&
|
|
911
|
+
c.is(g.range)&&c.is(g.selectionRange)&&(g.detail===void 0||j.string(g.detail))&&(g.deprecated===void 0||j.boolean(g.deprecated))&&(g.children===void 0||Array.isArray(g.children))&&(g.tags===void 0||Array.isArray(g.tags))}w.is=m})(vt||(r.DocumentSymbol=vt={}));var et;(function(w){w.Empty="",w.QuickFix="quickfix",w.Refactor="refactor",w.RefactorExtract="refactor.extract",w.RefactorInline="refactor.inline",w.RefactorRewrite="refactor.rewrite",w.Source="source",w.SourceOrganizeImports="source.organi\
|
|
912
|
+
zeImports",w.SourceFixAll="source.fixAll"})(et||(r.CodeActionKind=et={}));var Kt;(function(w){w.Invoked=1,w.Automatic=2})(Kt||(r.CodeActionTriggerKind=Kt={}));var en;(function(w){function _(k,g,x){var $={diagnostics:k};return g!=null&&($.only=g),x!=null&&($.triggerKind=x),$}w.create=_;function m(k){var g=k;return j.defined(g)&&j.typedArray(g.diagnostics,N.is)&&(g.only===void 0||j.typedArray(g.only,j.string))&&(g.triggerKind===void 0||g.triggerKind===Kt.Invoked||g.triggerKind===Kt.Automatic)}w.is=
|
|
913
|
+
m})(en||(r.CodeActionContext=en={}));var gn;(function(w){function _(k,g,x){var $={title:k},W=!0;return typeof g=="string"?(W=!1,$.kind=g):K.is(g)?$.command=g:$.edit=g,W&&x!==void 0&&($.kind=x),$}w.create=_;function m(k){var g=k;return g&&j.string(g.title)&&(g.diagnostics===void 0||j.typedArray(g.diagnostics,N.is))&&(g.kind===void 0||j.string(g.kind))&&(g.edit!==void 0||g.command!==void 0)&&(g.command===void 0||K.is(g.command))&&(g.isPreferred===void 0||j.boolean(g.isPreferred))&&(g.edit===void 0||
|
|
914
|
+
S.is(g.edit))}w.is=m})(gn||(r.CodeAction=gn={}));var X;(function(w){function _(k,g){var x={range:k};return j.defined(g)&&(x.data=g),x}w.create=_;function m(k){var g=k;return j.defined(g)&&c.is(g.range)&&(j.undefined(g.command)||K.is(g.command))}w.is=m})(X||(r.CodeLens=X={}));var Y;(function(w){function _(k,g){return{tabSize:k,insertSpaces:g}}w.create=_;function m(k){var g=k;return j.defined(g)&&j.uinteger(g.tabSize)&&j.boolean(g.insertSpaces)}w.is=m})(Y||(r.FormattingOptions=Y={}));var he;(function(w){
|
|
915
|
+
function _(k,g,x){return{range:k,target:g,data:x}}w.create=_;function m(k){var g=k;return j.defined(g)&&c.is(g.range)&&(j.undefined(g.target)||j.string(g.target))}w.is=m})(he||(r.DocumentLink=he={}));var tn;(function(w){function _(k,g){return{range:k,parent:g}}w.create=_;function m(k){var g=k;return j.objectLiteral(g)&&c.is(g.range)&&(g.parent===void 0||w.is(g.parent))}w.is=m})(tn||(r.SelectionRange=tn={}));var Xt;(function(w){w.namespace="namespace",w.type="type",w.class="class",w.enum="enum",w.
|
|
916
|
+
interface="interface",w.struct="struct",w.typeParameter="typeParameter",w.parameter="parameter",w.variable="variable",w.property="property",w.enumMember="enumMember",w.event="event",w.function="function",w.method="method",w.macro="macro",w.keyword="keyword",w.modifier="modifier",w.comment="comment",w.string="string",w.number="number",w.regexp="regexp",w.operator="operator",w.decorator="decorator"})(Xt||(r.SemanticTokenTypes=Xt={}));var _r;(function(w){w.declaration="declaration",w.definition="de\
|
|
917
|
+
finition",w.readonly="readonly",w.static="static",w.deprecated="deprecated",w.abstract="abstract",w.async="async",w.modification="modification",w.documentation="documentation",w.defaultLibrary="defaultLibrary"})(_r||(r.SemanticTokenModifiers=_r={}));var xi;(function(w){function _(m){var k=m;return j.objectLiteral(k)&&(k.resultId===void 0||typeof k.resultId=="string")&&Array.isArray(k.data)&&(k.data.length===0||typeof k.data[0]=="number")}w.is=_})(xi||(r.SemanticTokens=xi={}));var cs;(function(w){
|
|
918
|
+
function _(k,g){return{range:k,text:g}}w.create=_;function m(k){var g=k;return g!=null&&c.is(g.range)&&j.string(g.text)}w.is=m})(cs||(r.InlineValueText=cs={}));var ls;(function(w){function _(k,g,x){return{range:k,variableName:g,caseSensitiveLookup:x}}w.create=_;function m(k){var g=k;return g!=null&&c.is(g.range)&&j.boolean(g.caseSensitiveLookup)&&(j.string(g.variableName)||g.variableName===void 0)}w.is=m})(ls||(r.InlineValueVariableLookup=ls={}));var ds;(function(w){function _(k,g){return{range:k,
|
|
919
|
+
expression:g}}w.create=_;function m(k){var g=k;return g!=null&&c.is(g.range)&&(j.string(g.expression)||g.expression===void 0)}w.is=m})(ds||(r.InlineValueEvaluatableExpression=ds={}));var fs;(function(w){function _(k,g){return{frameId:k,stoppedLocation:g}}w.create=_;function m(k){var g=k;return j.defined(g)&&c.is(k.stoppedLocation)}w.is=m})(fs||(r.InlineValueContext=fs={}));var Ni;(function(w){w.Type=1,w.Parameter=2;function _(m){return m===1||m===2}w.is=_})(Ni||(r.InlayHintKind=Ni={}));var Ii;(function(w){
|
|
920
|
+
function _(k){return{value:k}}w.create=_;function m(k){var g=k;return j.objectLiteral(g)&&(g.tooltip===void 0||j.string(g.tooltip)||F.is(g.tooltip))&&(g.location===void 0||l.is(g.location))&&(g.command===void 0||K.is(g.command))}w.is=m})(Ii||(r.InlayHintLabelPart=Ii={}));var _n;(function(w){function _(k,g,x){var $={position:k,label:g};return x!==void 0&&($.kind=x),$}w.create=_;function m(k){var g=k;return j.objectLiteral(g)&&u.is(g.position)&&(j.string(g.label)||j.typedArray(g.label,Ii.is))&&(g.
|
|
921
|
+
kind===void 0||Ni.is(g.kind))&&g.textEdits===void 0||j.typedArray(g.textEdits,J.is)&&(g.tooltip===void 0||j.string(g.tooltip)||F.is(g.tooltip))&&(g.paddingLeft===void 0||j.boolean(g.paddingLeft))&&(g.paddingRight===void 0||j.boolean(g.paddingRight))}w.is=m})(_n||(r.InlayHint=_n={}));var ps;(function(w){function _(m){return{kind:"snippet",value:m}}w.createSnippet=_})(ps||(r.StringValue=ps={}));var hs;(function(w){function _(m,k,g,x){return{insertText:m,filterText:k,range:g,command:x}}w.create=_})(
|
|
922
|
+
hs||(r.InlineCompletionItem=hs={}));var Pr;(function(w){function _(m){return{items:m}}w.create=_})(Pr||(r.InlineCompletionList=Pr={}));var ms;(function(w){w.Invoked=0,w.Automatic=1})(ms||(r.InlineCompletionTriggerKind=ms={}));var Vr;(function(w){function _(m,k){return{range:m,text:k}}w.create=_})(Vr||(r.SelectedCompletionInfo=Vr={}));var gs;(function(w){function _(m,k){return{triggerKind:m,selectedCompletionInfo:k}}w.create=_})(gs||(r.InlineCompletionContext=gs={}));var Zn;(function(w){function _(m){
|
|
923
|
+
var k=m;return j.objectLiteral(k)&&s.is(k.uri)&&j.string(k.name)}w.is=_})(Zn||(r.WorkspaceFolder=Zn={})),r.EOL=[`
|
|
924
|
+
`,`\r
|
|
925
|
+
`,"\r"];var pr;(function(w){function _(x,$,W,te){return new Ao(x,$,W,te)}w.create=_;function m(x){var $=x;return!!(j.defined($)&&j.string($.uri)&&(j.undefined($.languageId)||j.string($.languageId))&&j.uinteger($.lineCount)&&j.func($.getText)&&j.func($.positionAt)&&j.func($.offsetAt))}w.is=m;function k(x,$){for(var W=x.getText(),te=g($,function(Le,at){var nt=Le.range.start.line-at.range.start.line;return nt===0?Le.range.start.character-at.range.start.character:nt}),oe=W.length,Ue=te.length-1;Ue>=
|
|
926
|
+
0;Ue--){var Be=te[Ue],tt=x.offsetAt(Be.range.start),be=x.offsetAt(Be.range.end);if(be<=oe)W=W.substring(0,tt)+Be.newText+W.substring(be,W.length);else throw new Error("Overlapping edit");oe=tt}return W}w.applyEdits=k;function g(x,$){if(x.length<=1)return x;var W=x.length/2|0,te=x.slice(0,W),oe=x.slice(W);g(te,$),g(oe,$);for(var Ue=0,Be=0,tt=0;Ue<te.length&&Be<oe.length;){var be=$(te[Ue],oe[Be]);be<=0?x[tt++]=te[Ue++]:x[tt++]=oe[Be++]}for(;Ue<te.length;)x[tt++]=te[Ue++];for(;Be<oe.length;)x[tt++]=
|
|
927
|
+
oe[Be++];return x}})(pr||(r.TextDocument=pr={}));var Ao=function(){function w(_,m,k,g){this._uri=_,this._languageId=m,this._version=k,this._content=g,this._lineOffsets=void 0}return Object.defineProperty(w.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"version",{get:function(){return this._version},enumerable:!1,
|
|
928
|
+
configurable:!0}),w.prototype.getText=function(_){if(_){var m=this.offsetAt(_.start),k=this.offsetAt(_.end);return this._content.substring(m,k)}return this._content},w.prototype.update=function(_,m){this._content=_.text,this._version=m,this._lineOffsets=void 0},w.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var _=[],m=this._content,k=!0,g=0;g<m.length;g++){k&&(_.push(g),k=!1);var x=m.charAt(g);k=x==="\r"||x===`
|
|
929
|
+
`,x==="\r"&&g+1<m.length&&m.charAt(g+1)===`
|
|
930
|
+
`&&g++}k&&m.length>0&&_.push(m.length),this._lineOffsets=_}return this._lineOffsets},w.prototype.positionAt=function(_){_=Math.max(Math.min(_,this._content.length),0);var m=this.getLineOffsets(),k=0,g=m.length;if(g===0)return u.create(0,_);for(;k<g;){var x=Math.floor((k+g)/2);m[x]>_?g=x:k=x+1}var $=k-1;return u.create($,_-m[$])},w.prototype.offsetAt=function(_){var m=this.getLineOffsets();if(_.line>=m.length)return this._content.length;if(_.line<0)return 0;var k=m[_.line],g=_.line+1<m.length?m[_.
|
|
931
|
+
line+1]:this._content.length;return Math.max(Math.min(k+_.character,g),k)},Object.defineProperty(w.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),w}(),j;(function(w){var _=Object.prototype.toString;function m(be){return typeof be<"u"}w.defined=m;function k(be){return typeof be>"u"}w.undefined=k;function g(be){return be===!0||be===!1}w.boolean=g;function x(be){return _.call(be)==="[object String]"}w.string=x;function $(be){return _.call(
|
|
932
|
+
be)==="[object Number]"}w.number=$;function W(be,Le,at){return _.call(be)==="[object Number]"&&Le<=be&&be<=at}w.numberRange=W;function te(be){return _.call(be)==="[object Number]"&&-2147483648<=be&&be<=2147483647}w.integer=te;function oe(be){return _.call(be)==="[object Number]"&&0<=be&&be<=2147483647}w.uinteger=oe;function Ue(be){return _.call(be)==="[object Function]"}w.func=Ue;function Be(be){return be!==null&&typeof be=="object"}w.objectLiteral=Be;function tt(be,Le){return Array.isArray(be)&&
|
|
933
|
+
be.every(Le)}w.typedArray=tt})(j||(j={}))})}(Ep,Ep.exports)),Ep.exports}var Rn={},Ik;function Ct(){if(Ik)return Rn;Ik=1,Object.defineProperty(Rn,"__esModule",{value:!0}),Rn.ProtocolNotificationType=Rn.ProtocolNotificationType0=Rn.ProtocolRequestType=Rn.ProtocolRequestType0=Rn.RegistrationType=Rn.MessageDirection=void 0;const t=zs();var e;(function(a){a.clientToServer="clientToServer",a.serverToClient="serverToClient",a.both="both"})(e||(Rn.MessageDirection=e={}));class n{constructor(u){this.method=
|
|
934
|
+
u}}Rn.RegistrationType=n;class r extends t.RequestType0{constructor(u){super(u)}}Rn.ProtocolRequestType0=r;class i extends t.RequestType{constructor(u){super(u,t.ParameterStructures.byName)}}Rn.ProtocolRequestType=i;class s extends t.NotificationType0{constructor(u){super(u)}}Rn.ProtocolNotificationType0=s;class o extends t.NotificationType{constructor(u){super(u,t.ParameterStructures.byName)}}return Rn.ProtocolNotificationType=o,Rn}var zy={},Ot={},Ok;function Hy(){if(Ok)return Ot;Ok=1,Object.defineProperty(
|
|
935
|
+
Ot,"__esModule",{value:!0}),Ot.objectLiteral=Ot.typedArray=Ot.stringArray=Ot.array=Ot.func=Ot.error=Ot.number=Ot.string=Ot.boolean=void 0;function t(c){return c===!0||c===!1}Ot.boolean=t;function e(c){return typeof c=="string"||c instanceof String}Ot.string=e;function n(c){return typeof c=="number"||c instanceof Number}Ot.number=n;function r(c){return c instanceof Error}Ot.error=r;function i(c){return typeof c=="function"}Ot.func=i;function s(c){return Array.isArray(c)}Ot.array=s;function o(c){return s(
|
|
936
|
+
c)&&c.every(l=>e(l))}Ot.stringArray=o;function a(c,l){return Array.isArray(c)&&c.every(l)}Ot.typedArray=a;function u(c){return c!==null&&typeof c=="object"}return Ot.objectLiteral=u,Ot}var ic={},Lk;function f4(){if(Lk)return ic;Lk=1,Object.defineProperty(ic,"__esModule",{value:!0}),ic.ImplementationRequest=void 0;const t=Ct();var e;return function(n){n.method="textDocument/implementation",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)}(e||(ic.ImplementationRequest=
|
|
937
|
+
e={})),ic}var sc={},Fk;function p4(){if(Fk)return sc;Fk=1,Object.defineProperty(sc,"__esModule",{value:!0}),sc.TypeDefinitionRequest=void 0;const t=Ct();var e;return function(n){n.method="textDocument/typeDefinition",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)}(e||(sc.TypeDefinitionRequest=e={})),sc}var Vs={},Mk;function h4(){if(Mk)return Vs;Mk=1,Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.DidChangeWorkspaceFoldersNotification=Vs.WorkspaceFoldersRequest=
|
|
938
|
+
void 0;const t=Ct();var e;(function(r){r.method="workspace/workspaceFolders",r.messageDirection=t.MessageDirection.serverToClient,r.type=new t.ProtocolRequestType0(r.method)})(e||(Vs.WorkspaceFoldersRequest=e={}));var n;return function(r){r.method="workspace/didChangeWorkspaceFolders",r.messageDirection=t.MessageDirection.clientToServer,r.type=new t.ProtocolNotificationType(r.method)}(n||(Vs.DidChangeWorkspaceFoldersNotification=n={})),Vs}var oc={},Bk;function m4(){if(Bk)return oc;Bk=1,Object.defineProperty(
|
|
939
|
+
oc,"__esModule",{value:!0}),oc.ConfigurationRequest=void 0;const t=Ct();var e;return function(n){n.method="workspace/configuration",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType(n.method)}(e||(oc.ConfigurationRequest=e={})),oc}var Ks={},jk;function g4(){if(jk)return Ks;jk=1,Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.ColorPresentationRequest=Ks.DocumentColorRequest=void 0;const t=Ct();var e;(function(r){r.method="textDocument/documentColor",r.messageDirection=
|
|
940
|
+
t.MessageDirection.clientToServer,r.type=new t.ProtocolRequestType(r.method)})(e||(Ks.DocumentColorRequest=e={}));var n;return function(r){r.method="textDocument/colorPresentation",r.messageDirection=t.MessageDirection.clientToServer,r.type=new t.ProtocolRequestType(r.method)}(n||(Ks.ColorPresentationRequest=n={})),Ks}var Xs={},qk;function y4(){if(qk)return Xs;qk=1,Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.FoldingRangeRefreshRequest=Xs.FoldingRangeRequest=void 0;const t=Ct();var e;(function(r){
|
|
941
|
+
r.method="textDocument/foldingRange",r.messageDirection=t.MessageDirection.clientToServer,r.type=new t.ProtocolRequestType(r.method)})(e||(Xs.FoldingRangeRequest=e={}));var n;return function(r){r.method="workspace/foldingRange/refresh",r.messageDirection=t.MessageDirection.serverToClient,r.type=new t.ProtocolRequestType0(r.method)}(n||(Xs.FoldingRangeRefreshRequest=n={})),Xs}var ac={},Gk;function v4(){if(Gk)return ac;Gk=1,Object.defineProperty(ac,"__esModule",{value:!0}),ac.DeclarationRequest=void 0;
|
|
942
|
+
const t=Ct();var e;return function(n){n.method="textDocument/declaration",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)}(e||(ac.DeclarationRequest=e={})),ac}var uc={},Uk;function w4(){if(Uk)return uc;Uk=1,Object.defineProperty(uc,"__esModule",{value:!0}),uc.SelectionRangeRequest=void 0;const t=Ct();var e;return function(n){n.method="textDocument/selectionRange",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(
|
|
943
|
+
n.method)}(e||(uc.SelectionRangeRequest=e={})),uc}var hi={},Wk;function b4(){if(Wk)return hi;Wk=1,Object.defineProperty(hi,"__esModule",{value:!0}),hi.WorkDoneProgressCancelNotification=hi.WorkDoneProgressCreateRequest=hi.WorkDoneProgress=void 0;const t=zs(),e=Ct();var n;(function(s){s.type=new t.ProgressType;function o(a){return a===s.type}s.is=o})(n||(hi.WorkDoneProgress=n={}));var r;(function(s){s.method="window/workDoneProgress/create",s.messageDirection=e.MessageDirection.serverToClient,s.type=
|
|
944
|
+
new e.ProtocolRequestType(s.method)})(r||(hi.WorkDoneProgressCreateRequest=r={}));var i;return function(s){s.method="window/workDoneProgress/cancel",s.messageDirection=e.MessageDirection.clientToServer,s.type=new e.ProtocolNotificationType(s.method)}(i||(hi.WorkDoneProgressCancelNotification=i={})),hi}var mi={},zk;function E4(){if(zk)return mi;zk=1,Object.defineProperty(mi,"__esModule",{value:!0}),mi.CallHierarchyOutgoingCallsRequest=mi.CallHierarchyIncomingCallsRequest=mi.CallHierarchyPrepareRequest=
|
|
945
|
+
void 0;const t=Ct();var e;(function(i){i.method="textDocument/prepareCallHierarchy",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(e||(mi.CallHierarchyPrepareRequest=e={}));var n;(function(i){i.method="callHierarchy/incomingCalls",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(n||(mi.CallHierarchyIncomingCallsRequest=n={}));var r;return function(i){i.method="callHierarchy/outgoingCalls",i.messageDirection=
|
|
946
|
+
t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)}(r||(mi.CallHierarchyOutgoingCallsRequest=r={})),mi}var kn={},Hk;function $4(){if(Hk)return kn;Hk=1,Object.defineProperty(kn,"__esModule",{value:!0}),kn.SemanticTokensRefreshRequest=kn.SemanticTokensRangeRequest=kn.SemanticTokensDeltaRequest=kn.SemanticTokensRequest=kn.SemanticTokensRegistrationType=kn.TokenFormat=void 0;const t=Ct();var e;(function(a){a.Relative="relative"})(e||(kn.TokenFormat=e={}));var n;(function(a){
|
|
947
|
+
a.method="textDocument/semanticTokens",a.type=new t.RegistrationType(a.method)})(n||(kn.SemanticTokensRegistrationType=n={}));var r;(function(a){a.method="textDocument/semanticTokens/full",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method),a.registrationMethod=n.method})(r||(kn.SemanticTokensRequest=r={}));var i;(function(a){a.method="textDocument/semanticTokens/full/delta",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(
|
|
948
|
+
a.method),a.registrationMethod=n.method})(i||(kn.SemanticTokensDeltaRequest=i={}));var s;(function(a){a.method="textDocument/semanticTokens/range",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method),a.registrationMethod=n.method})(s||(kn.SemanticTokensRangeRequest=s={}));var o;return function(a){a.method="workspace/semanticTokens/refresh",a.messageDirection=t.MessageDirection.serverToClient,a.type=new t.ProtocolRequestType0(a.method)}(o||(kn.SemanticTokensRefreshRequest=
|
|
949
|
+
o={})),kn}var cc={},Vk;function D4(){if(Vk)return cc;Vk=1,Object.defineProperty(cc,"__esModule",{value:!0}),cc.ShowDocumentRequest=void 0;const t=Ct();var e;return function(n){n.method="window/showDocument",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType(n.method)}(e||(cc.ShowDocumentRequest=e={})),cc}var lc={},Kk;function R4(){if(Kk)return lc;Kk=1,Object.defineProperty(lc,"__esModule",{value:!0}),lc.LinkedEditingRangeRequest=void 0;const t=Ct();var e;return function(n){
|
|
950
|
+
n.method="textDocument/linkedEditingRange",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)}(e||(lc.LinkedEditingRangeRequest=e={})),lc}var un={},Xk;function k4(){if(Xk)return un;Xk=1,Object.defineProperty(un,"__esModule",{value:!0}),un.WillDeleteFilesRequest=un.DidDeleteFilesNotification=un.DidRenameFilesNotification=un.WillRenameFilesRequest=un.DidCreateFilesNotification=un.WillCreateFilesRequest=un.FileOperationPatternKind=void 0;const t=Ct();var e;
|
|
951
|
+
(function(u){u.file="file",u.folder="folder"})(e||(un.FileOperationPatternKind=e={}));var n;(function(u){u.method="workspace/willCreateFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolRequestType(u.method)})(n||(un.WillCreateFilesRequest=n={}));var r;(function(u){u.method="workspace/didCreateFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolNotificationType(u.method)})(r||(un.DidCreateFilesNotification=r={}));var i;(function(u){u.method=
|
|
952
|
+
"workspace/willRenameFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolRequestType(u.method)})(i||(un.WillRenameFilesRequest=i={}));var s;(function(u){u.method="workspace/didRenameFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolNotificationType(u.method)})(s||(un.DidRenameFilesNotification=s={}));var o;(function(u){u.method="workspace/didDeleteFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolNotificationType(
|
|
953
|
+
u.method)})(o||(un.DidDeleteFilesNotification=o={}));var a;return function(u){u.method="workspace/willDeleteFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolRequestType(u.method)}(a||(un.WillDeleteFilesRequest=a={})),un}var gi={},Yk;function T4(){if(Yk)return gi;Yk=1,Object.defineProperty(gi,"__esModule",{value:!0}),gi.MonikerRequest=gi.MonikerKind=gi.UniquenessLevel=void 0;const t=Ct();var e;(function(i){i.document="document",i.project="project",i.group="group",i.
|
|
954
|
+
scheme="scheme",i.global="global"})(e||(gi.UniquenessLevel=e={}));var n;(function(i){i.$import="import",i.$export="export",i.local="local"})(n||(gi.MonikerKind=n={}));var r;return function(i){i.method="textDocument/moniker",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)}(r||(gi.MonikerRequest=r={})),gi}var yi={},Jk;function C4(){if(Jk)return yi;Jk=1,Object.defineProperty(yi,"__esModule",{value:!0}),yi.TypeHierarchySubtypesRequest=yi.TypeHierarchySupertypesRequest=
|
|
955
|
+
yi.TypeHierarchyPrepareRequest=void 0;const t=Ct();var e;(function(i){i.method="textDocument/prepareTypeHierarchy",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(e||(yi.TypeHierarchyPrepareRequest=e={}));var n;(function(i){i.method="typeHierarchy/supertypes",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(n||(yi.TypeHierarchySupertypesRequest=n={}));var r;return function(i){i.method="typeHierarch\
|
|
956
|
+
y/subtypes",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)}(r||(yi.TypeHierarchySubtypesRequest=r={})),yi}var Ys={},Qk;function A4(){if(Qk)return Ys;Qk=1,Object.defineProperty(Ys,"__esModule",{value:!0}),Ys.InlineValueRefreshRequest=Ys.InlineValueRequest=void 0;const t=Ct();var e;(function(r){r.method="textDocument/inlineValue",r.messageDirection=t.MessageDirection.clientToServer,r.type=new t.ProtocolRequestType(r.method)})(e||(Ys.InlineValueRequest=
|
|
957
|
+
e={}));var n;return function(r){r.method="workspace/inlineValue/refresh",r.messageDirection=t.MessageDirection.serverToClient,r.type=new t.ProtocolRequestType0(r.method)}(n||(Ys.InlineValueRefreshRequest=n={})),Ys}var vi={},Zk;function S4(){if(Zk)return vi;Zk=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi.InlayHintRefreshRequest=vi.InlayHintResolveRequest=vi.InlayHintRequest=void 0;const t=Ct();var e;(function(i){i.method="textDocument/inlayHint",i.messageDirection=t.MessageDirection.clientToServer,
|
|
958
|
+
i.type=new t.ProtocolRequestType(i.method)})(e||(vi.InlayHintRequest=e={}));var n;(function(i){i.method="inlayHint/resolve",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(n||(vi.InlayHintResolveRequest=n={}));var r;return function(i){i.method="workspace/inlayHint/refresh",i.messageDirection=t.MessageDirection.serverToClient,i.type=new t.ProtocolRequestType0(i.method)}(r||(vi.InlayHintRefreshRequest=r={})),vi}var Kn={},eT;function _4(){if(eT)return Kn;
|
|
959
|
+
eT=1,Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.DiagnosticRefreshRequest=Kn.WorkspaceDiagnosticRequest=Kn.DocumentDiagnosticRequest=Kn.DocumentDiagnosticReportKind=Kn.DiagnosticServerCancellationData=void 0;const t=zs(),e=Hy(),n=Ct();var r;(function(u){function c(l){const f=l;return f&&e.boolean(f.retriggerRequest)}u.is=c})(r||(Kn.DiagnosticServerCancellationData=r={}));var i;(function(u){u.Full="full",u.Unchanged="unchanged"})(i||(Kn.DocumentDiagnosticReportKind=i={}));var s;(function(u){
|
|
960
|
+
u.method="textDocument/diagnostic",u.messageDirection=n.MessageDirection.clientToServer,u.type=new n.ProtocolRequestType(u.method),u.partialResult=new t.ProgressType})(s||(Kn.DocumentDiagnosticRequest=s={}));var o;(function(u){u.method="workspace/diagnostic",u.messageDirection=n.MessageDirection.clientToServer,u.type=new n.ProtocolRequestType(u.method),u.partialResult=new t.ProgressType})(o||(Kn.WorkspaceDiagnosticRequest=o={}));var a;return function(u){u.method="workspace/diagnostic/refresh",u.
|
|
961
|
+
messageDirection=n.MessageDirection.serverToClient,u.type=new n.ProtocolRequestType0(u.method)}(a||(Kn.DiagnosticRefreshRequest=a={})),Kn}var At={},tT;function P4(){if(tT)return At;tT=1,Object.defineProperty(At,"__esModule",{value:!0}),At.DidCloseNotebookDocumentNotification=At.DidSaveNotebookDocumentNotification=At.DidChangeNotebookDocumentNotification=At.NotebookCellArrayChange=At.DidOpenNotebookDocumentNotification=At.NotebookDocumentSyncRegistrationType=At.NotebookDocument=At.NotebookCell=At.
|
|
962
|
+
ExecutionSummary=At.NotebookCellKind=void 0;const t=Wy(),e=Hy(),n=Ct();var r;(function(p){p.Markup=1,p.Code=2;function h(v){return v===1||v===2}p.is=h})(r||(At.NotebookCellKind=r={}));var i;(function(p){function h(y,E){const R={executionOrder:y};return(E===!0||E===!1)&&(R.success=E),R}p.create=h;function v(y){const E=y;return e.objectLiteral(E)&&t.uinteger.is(E.executionOrder)&&(E.success===void 0||e.boolean(E.success))}p.is=v;function b(y,E){return y===E?!0:y==null||E===null||E===void 0?!1:y.executionOrder===
|
|
963
|
+
E.executionOrder&&y.success===E.success}p.equals=b})(i||(At.ExecutionSummary=i={}));var s;(function(p){function h(E,R){return{kind:E,document:R}}p.create=h;function v(E){const R=E;return e.objectLiteral(R)&&r.is(R.kind)&&t.DocumentUri.is(R.document)&&(R.metadata===void 0||e.objectLiteral(R.metadata))}p.is=v;function b(E,R){const A=new Set;return E.document!==R.document&&A.add("document"),E.kind!==R.kind&&A.add("kind"),E.executionSummary!==R.executionSummary&&A.add("executionSummary"),(E.metadata!==
|
|
964
|
+
void 0||R.metadata!==void 0)&&!y(E.metadata,R.metadata)&&A.add("metadata"),(E.executionSummary!==void 0||R.executionSummary!==void 0)&&!i.equals(E.executionSummary,R.executionSummary)&&A.add("executionSummary"),A}p.diff=b;function y(E,R){if(E===R)return!0;if(E==null||R===null||R===void 0||typeof E!=typeof R||typeof E!="object")return!1;const A=Array.isArray(E),N=Array.isArray(R);if(A!==N)return!1;if(A&&N){if(E.length!==R.length)return!1;for(let K=0;K<E.length;K++)if(!y(E[K],R[K]))return!1}if(e.objectLiteral(
|
|
965
|
+
E)&&e.objectLiteral(R)){const K=Object.keys(E),J=Object.keys(R);if(K.length!==J.length||(K.sort(),J.sort(),!y(K,J)))return!1;for(let se=0;se<K.length;se++){const ie=K[se];if(!y(E[ie],R[ie]))return!1}}return!0}})(s||(At.NotebookCell=s={}));var o;(function(p){function h(b,y,E,R){return{uri:b,notebookType:y,version:E,cells:R}}p.create=h;function v(b){const y=b;return e.objectLiteral(y)&&e.string(y.uri)&&t.integer.is(y.version)&&e.typedArray(y.cells,s.is)}p.is=v})(o||(At.NotebookDocument=o={}));var a;
|
|
966
|
+
(function(p){p.method="notebookDocument/sync",p.messageDirection=n.MessageDirection.clientToServer,p.type=new n.RegistrationType(p.method)})(a||(At.NotebookDocumentSyncRegistrationType=a={}));var u;(function(p){p.method="notebookDocument/didOpen",p.messageDirection=n.MessageDirection.clientToServer,p.type=new n.ProtocolNotificationType(p.method),p.registrationMethod=a.method})(u||(At.DidOpenNotebookDocumentNotification=u={}));var c;(function(p){function h(b){const y=b;return e.objectLiteral(y)&&
|
|
967
|
+
t.uinteger.is(y.start)&&t.uinteger.is(y.deleteCount)&&(y.cells===void 0||e.typedArray(y.cells,s.is))}p.is=h;function v(b,y,E){const R={start:b,deleteCount:y};return E!==void 0&&(R.cells=E),R}p.create=v})(c||(At.NotebookCellArrayChange=c={}));var l;(function(p){p.method="notebookDocument/didChange",p.messageDirection=n.MessageDirection.clientToServer,p.type=new n.ProtocolNotificationType(p.method),p.registrationMethod=a.method})(l||(At.DidChangeNotebookDocumentNotification=l={}));var f;(function(p){
|
|
968
|
+
p.method="notebookDocument/didSave",p.messageDirection=n.MessageDirection.clientToServer,p.type=new n.ProtocolNotificationType(p.method),p.registrationMethod=a.method})(f||(At.DidSaveNotebookDocumentNotification=f={}));var d;return function(p){p.method="notebookDocument/didClose",p.messageDirection=n.MessageDirection.clientToServer,p.type=new n.ProtocolNotificationType(p.method),p.registrationMethod=a.method}(d||(At.DidCloseNotebookDocumentNotification=d={})),At}var dc={},nT;function x4(){if(nT)
|
|
969
|
+
return dc;nT=1,Object.defineProperty(dc,"__esModule",{value:!0}),dc.InlineCompletionRequest=void 0;const t=Ct();var e;return function(n){n.method="textDocument/inlineCompletion",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)}(e||(dc.InlineCompletionRequest=e={})),dc}var rT;function N4(){return rT||(rT=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSymbolRequest=t.CodeActionResolveRequest=t.CodeActionRequest=t.DocumentSymbolRequest=
|
|
970
|
+
t.DocumentHighlightRequest=t.ReferencesRequest=t.DefinitionRequest=t.SignatureHelpRequest=t.SignatureHelpTriggerKind=t.HoverRequest=t.CompletionResolveRequest=t.CompletionRequest=t.CompletionTriggerKind=t.PublishDiagnosticsNotification=t.WatchKind=t.RelativePattern=t.FileChangeType=t.DidChangeWatchedFilesNotification=t.WillSaveTextDocumentWaitUntilRequest=t.WillSaveTextDocumentNotification=t.TextDocumentSaveReason=t.DidSaveTextDocumentNotification=t.DidCloseTextDocumentNotification=t.DidChangeTextDocumentNotification=
|
|
971
|
+
t.TextDocumentContentChangeEvent=t.DidOpenTextDocumentNotification=t.TextDocumentSyncKind=t.TelemetryEventNotification=t.LogMessageNotification=t.ShowMessageRequest=t.ShowMessageNotification=t.MessageType=t.DidChangeConfigurationNotification=t.ExitNotification=t.ShutdownRequest=t.InitializedNotification=t.InitializeErrorCodes=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.PositionEncodingKind=t.FailureHandlingKind=t.ResourceOperationKind=
|
|
972
|
+
t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.NotebookCellTextDocumentFilter=t.NotebookDocumentFilter=t.TextDocumentFilter=void 0,t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.WillRenameFilesRequest=t.DidRenameFilesNotification=t.WillCreateFilesRequest=t.DidCreateFilesNotification=t.FileOperationPatternKind=t.LinkedEditingRangeRequest=t.ShowDocumentRequest=t.SemanticTokensRegistrationType=t.SemanticTokensRefreshRequest=
|
|
973
|
+
t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.TokenFormat=t.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=t.ColorPresentationRequest=t.DocumentColorRequest=t.ConfigurationRequest=t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=
|
|
974
|
+
t.TypeDefinitionRequest=t.ImplementationRequest=t.ApplyWorkspaceEditRequest=t.ExecuteCommandRequest=t.PrepareRenameRequest=t.RenameRequest=t.PrepareSupportDefaultBehavior=t.DocumentOnTypeFormattingRequest=t.DocumentRangesFormattingRequest=t.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolResolveRequest=void 0,t.InlineCompletionRequest=t.DidCloseNotebookDocumentNotification=
|
|
975
|
+
t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=t.InlineValueRefreshRequest=
|
|
976
|
+
t.InlineValueRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchySubtypesRequest=t.TypeHierarchyPrepareRequest=void 0;const e=Ct(),n=Wy(),r=Hy(),i=f4();Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return i.ImplementationRequest}});const s=p4();Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return s.TypeDefinitionRequest}});const o=h4();Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return o.WorkspaceFoldersRequest}}),
|
|
977
|
+
Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return o.DidChangeWorkspaceFoldersNotification}});const a=m4();Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return a.ConfigurationRequest}});const u=g4();Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return u.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return u.ColorPresentationRequest}});
|
|
978
|
+
const c=y4();Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return c.FoldingRangeRequest}}),Object.defineProperty(t,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return c.FoldingRangeRefreshRequest}});const l=v4();Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return l.DeclarationRequest}});const f=w4();Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return f.SelectionRangeRequest}});const d=b4();
|
|
979
|
+
Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return d.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return d.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return d.WorkDoneProgressCancelNotification}});const p=E4();Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return p.CallHierarchyIncomingCallsRequest}}),
|
|
980
|
+
Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return p.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return p.CallHierarchyPrepareRequest}});const h=$4();Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return h.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return h.SemanticTokensRequest}}),Object.defineProperty(t,
|
|
981
|
+
"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return h.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return h.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return h.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return h.SemanticTokensRegistrationType}});const v=D4();Object.defineProperty(
|
|
982
|
+
t,"ShowDocumentRequest",{enumerable:!0,get:function(){return v.ShowDocumentRequest}});const b=R4();Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return b.LinkedEditingRangeRequest}});const y=k4();Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return y.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return y.DidCreateFilesNotification}}),Object.defineProperty(t,"Wil\
|
|
983
|
+
lCreateFilesRequest",{enumerable:!0,get:function(){return y.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return y.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return y.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return y.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,
|
|
984
|
+
get:function(){return y.WillDeleteFilesRequest}});const E=T4();Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return E.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return E.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return E.MonikerRequest}});const R=C4();Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return R.TypeHierarchyPrepareRequest}}),Object.defineProperty(
|
|
985
|
+
t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return R.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return R.TypeHierarchySupertypesRequest}});const A=A4();Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return A.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return A.InlineValueRefreshRequest}});const N=S4();Object.defineProperty(
|
|
986
|
+
t,"InlayHintRequest",{enumerable:!0,get:function(){return N.InlayHintRequest}}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:function(){return N.InlayHintResolveRequest}}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return N.InlayHintRefreshRequest}});const K=_4();Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return K.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnost\
|
|
987
|
+
icReportKind",{enumerable:!0,get:function(){return K.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return K.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return K.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return K.DiagnosticRefreshRequest}});const J=P4();Object.defineProperty(t,"NotebookCellKind",
|
|
988
|
+
{enumerable:!0,get:function(){return J.NotebookCellKind}}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:function(){return J.ExecutionSummary}}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:function(){return J.NotebookCell}}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:function(){return J.NotebookDocument}}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return J.NotebookDocumentSyncRegistrationType}}),Object.
|
|
989
|
+
defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return J.DidOpenNotebookDocumentNotification}}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:function(){return J.NotebookCellArrayChange}}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return J.DidChangeNotebookDocumentNotification}}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return J.DidSaveNotebookDocumentNotification}}),
|
|
990
|
+
Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return J.DidCloseNotebookDocumentNotification}});const se=x4();Object.defineProperty(t,"InlineCompletionRequest",{enumerable:!0,get:function(){return se.InlineCompletionRequest}});var ie;(function(m){function k(g){const x=g;return r.string(x)||r.string(x.language)||r.string(x.scheme)||r.string(x.pattern)}m.is=k})(ie||(t.TextDocumentFilter=ie={}));var we;(function(m){function k(g){const x=g;return r.objectLiteral(
|
|
991
|
+
x)&&(r.string(x.notebookType)||r.string(x.scheme)||r.string(x.pattern))}m.is=k})(we||(t.NotebookDocumentFilter=we={}));var B;(function(m){function k(g){const x=g;return r.objectLiteral(x)&&(r.string(x.notebook)||we.is(x.notebook))&&(x.language===void 0||r.string(x.language))}m.is=k})(B||(t.NotebookCellTextDocumentFilter=B={}));var T;(function(m){function k(g){if(!Array.isArray(g))return!1;for(let x of g)if(!r.string(x)&&!ie.is(x)&&!B.is(x))return!1;return!0}m.is=k})(T||(t.DocumentSelector=T={}));
|
|
992
|
+
var D;(function(m){m.method="client/registerCapability",m.messageDirection=e.MessageDirection.serverToClient,m.type=new e.ProtocolRequestType(m.method)})(D||(t.RegistrationRequest=D={}));var M;(function(m){m.method="client/unregisterCapability",m.messageDirection=e.MessageDirection.serverToClient,m.type=new e.ProtocolRequestType(m.method)})(M||(t.UnregistrationRequest=M={}));var S;(function(m){m.Create="create",m.Rename="rename",m.Delete="delete"})(S||(t.ResourceOperationKind=S={}));var P;(function(m){
|
|
993
|
+
m.Abort="abort",m.Transactional="transactional",m.TextOnlyTransactional="textOnlyTransactional",m.Undo="undo"})(P||(t.FailureHandlingKind=P={}));var O;(function(m){m.UTF8="utf-8",m.UTF16="utf-16",m.UTF32="utf-32"})(O||(t.PositionEncodingKind=O={}));var Z;(function(m){function k(g){const x=g;return x&&r.string(x.id)&&x.id.length>0}m.hasId=k})(Z||(t.StaticRegistrationOptions=Z={}));var H;(function(m){function k(g){const x=g;return x&&(x.documentSelector===null||T.is(x.documentSelector))}m.is=k})(H||
|
|
994
|
+
(t.TextDocumentRegistrationOptions=H={}));var C;(function(m){function k(x){const $=x;return r.objectLiteral($)&&($.workDoneProgress===void 0||r.boolean($.workDoneProgress))}m.is=k;function g(x){const $=x;return $&&r.boolean($.workDoneProgress)}m.hasWorkDoneProgress=g})(C||(t.WorkDoneProgressOptions=C={}));var ne;(function(m){m.method="initialize",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(ne||(t.InitializeRequest=ne={}));var ye;(function(m){
|
|
995
|
+
m.unknownProtocolVersion=1})(ye||(t.InitializeErrorCodes=ye={}));var Pe;(function(m){m.method="initialized",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolNotificationType(m.method)})(Pe||(t.InitializedNotification=Pe={}));var F;(function(m){m.method="shutdown",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType0(m.method)})(F||(t.ShutdownRequest=F={}));var V;(function(m){m.method="exit",m.messageDirection=e.MessageDirection.clientToServer,
|
|
996
|
+
m.type=new e.ProtocolNotificationType0(m.method)})(V||(t.ExitNotification=V={}));var Se;(function(m){m.method="workspace/didChangeConfiguration",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolNotificationType(m.method)})(Se||(t.DidChangeConfigurationNotification=Se={}));var le;(function(m){m.Error=1,m.Warning=2,m.Info=3,m.Log=4,m.Debug=5})(le||(t.MessageType=le={}));var $e;(function(m){m.method="window/showMessage",m.messageDirection=e.MessageDirection.serverToClient,m.
|
|
997
|
+
type=new e.ProtocolNotificationType(m.method)})($e||(t.ShowMessageNotification=$e={}));var xe;(function(m){m.method="window/showMessageRequest",m.messageDirection=e.MessageDirection.serverToClient,m.type=new e.ProtocolRequestType(m.method)})(xe||(t.ShowMessageRequest=xe={}));var de;(function(m){m.method="window/logMessage",m.messageDirection=e.MessageDirection.serverToClient,m.type=new e.ProtocolNotificationType(m.method)})(de||(t.LogMessageNotification=de={}));var I;(function(m){m.method="telem\
|
|
998
|
+
etry/event",m.messageDirection=e.MessageDirection.serverToClient,m.type=new e.ProtocolNotificationType(m.method)})(I||(t.TelemetryEventNotification=I={}));var G;(function(m){m.None=0,m.Full=1,m.Incremental=2})(G||(t.TextDocumentSyncKind=G={}));var pe;(function(m){m.method="textDocument/didOpen",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolNotificationType(m.method)})(pe||(t.DidOpenTextDocumentNotification=pe={}));var U;(function(m){function k(x){let $=x;return $!=null&&
|
|
999
|
+
typeof $.text=="string"&&$.range!==void 0&&($.rangeLength===void 0||typeof $.rangeLength=="number")}m.isIncremental=k;function g(x){let $=x;return $!=null&&typeof $.text=="string"&&$.range===void 0&&$.rangeLength===void 0}m.isFull=g})(U||(t.TextDocumentContentChangeEvent=U={}));var fe;(function(m){m.method="textDocument/didChange",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolNotificationType(m.method)})(fe||(t.DidChangeTextDocumentNotification=fe={}));var Ke;(function(m){
|
|
1000
|
+
m.method="textDocument/didClose",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolNotificationType(m.method)})(Ke||(t.DidCloseTextDocumentNotification=Ke={}));var it;(function(m){m.method="textDocument/didSave",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolNotificationType(m.method)})(it||(t.DidSaveTextDocumentNotification=it={}));var ue;(function(m){m.Manual=1,m.AfterDelay=2,m.FocusOut=3})(ue||(t.TextDocumentSaveReason=ue={}));var Oe;(function(m){
|
|
1001
|
+
m.method="textDocument/willSave",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolNotificationType(m.method)})(Oe||(t.WillSaveTextDocumentNotification=Oe={}));var re;(function(m){m.method="textDocument/willSaveWaitUntil",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(re||(t.WillSaveTextDocumentWaitUntilRequest=re={}));var De;(function(m){m.method="workspace/didChangeWatchedFiles",m.messageDirection=e.MessageDirection.clientToServer,
|
|
1002
|
+
m.type=new e.ProtocolNotificationType(m.method)})(De||(t.DidChangeWatchedFilesNotification=De={}));var Ge;(function(m){m.Created=1,m.Changed=2,m.Deleted=3})(Ge||(t.FileChangeType=Ge={}));var vt;(function(m){function k(g){const x=g;return r.objectLiteral(x)&&(n.URI.is(x.baseUri)||n.WorkspaceFolder.is(x.baseUri))&&r.string(x.pattern)}m.is=k})(vt||(t.RelativePattern=vt={}));var et;(function(m){m.Create=1,m.Change=2,m.Delete=4})(et||(t.WatchKind=et={}));var Kt;(function(m){m.method="textDocument/pub\
|
|
1003
|
+
lishDiagnostics",m.messageDirection=e.MessageDirection.serverToClient,m.type=new e.ProtocolNotificationType(m.method)})(Kt||(t.PublishDiagnosticsNotification=Kt={}));var en;(function(m){m.Invoked=1,m.TriggerCharacter=2,m.TriggerForIncompleteCompletions=3})(en||(t.CompletionTriggerKind=en={}));var gn;(function(m){m.method="textDocument/completion",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(gn||(t.CompletionRequest=gn={}));var X;(function(m){m.
|
|
1004
|
+
method="completionItem/resolve",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(X||(t.CompletionResolveRequest=X={}));var Y;(function(m){m.method="textDocument/hover",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(Y||(t.HoverRequest=Y={}));var he;(function(m){m.Invoked=1,m.TriggerCharacter=2,m.ContentChange=3})(he||(t.SignatureHelpTriggerKind=he={}));var tn;(function(m){m.method="textDocument/sig\
|
|
1005
|
+
natureHelp",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(tn||(t.SignatureHelpRequest=tn={}));var Xt;(function(m){m.method="textDocument/definition",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(Xt||(t.DefinitionRequest=Xt={}));var _r;(function(m){m.method="textDocument/references",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(_r||(t.ReferencesRequest=
|
|
1006
|
+
_r={}));var xi;(function(m){m.method="textDocument/documentHighlight",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(xi||(t.DocumentHighlightRequest=xi={}));var cs;(function(m){m.method="textDocument/documentSymbol",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(cs||(t.DocumentSymbolRequest=cs={}));var ls;(function(m){m.method="textDocument/codeAction",m.messageDirection=e.MessageDirection.clientToServer,
|
|
1007
|
+
m.type=new e.ProtocolRequestType(m.method)})(ls||(t.CodeActionRequest=ls={}));var ds;(function(m){m.method="codeAction/resolve",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(ds||(t.CodeActionResolveRequest=ds={}));var fs;(function(m){m.method="workspace/symbol",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(fs||(t.WorkspaceSymbolRequest=fs={}));var Ni;(function(m){m.method="workspaceSymbol/reso\
|
|
1008
|
+
lve",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(Ni||(t.WorkspaceSymbolResolveRequest=Ni={}));var Ii;(function(m){m.method="textDocument/codeLens",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(Ii||(t.CodeLensRequest=Ii={}));var _n;(function(m){m.method="codeLens/resolve",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(_n||(t.CodeLensResolveRequest=
|
|
1009
|
+
_n={}));var ps;(function(m){m.method="workspace/codeLens/refresh",m.messageDirection=e.MessageDirection.serverToClient,m.type=new e.ProtocolRequestType0(m.method)})(ps||(t.CodeLensRefreshRequest=ps={}));var hs;(function(m){m.method="textDocument/documentLink",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(hs||(t.DocumentLinkRequest=hs={}));var Pr;(function(m){m.method="documentLink/resolve",m.messageDirection=e.MessageDirection.clientToServer,m.
|
|
1010
|
+
type=new e.ProtocolRequestType(m.method)})(Pr||(t.DocumentLinkResolveRequest=Pr={}));var ms;(function(m){m.method="textDocument/formatting",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(ms||(t.DocumentFormattingRequest=ms={}));var Vr;(function(m){m.method="textDocument/rangeFormatting",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(Vr||(t.DocumentRangeFormattingRequest=Vr={}));var gs;(function(m){
|
|
1011
|
+
m.method="textDocument/rangesFormatting",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(gs||(t.DocumentRangesFormattingRequest=gs={}));var Zn;(function(m){m.method="textDocument/onTypeFormatting",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(Zn||(t.DocumentOnTypeFormattingRequest=Zn={}));var pr;(function(m){m.Identifier=1})(pr||(t.PrepareSupportDefaultBehavior=pr={}));var Ao;(function(m){m.method=
|
|
1012
|
+
"textDocument/rename",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(Ao||(t.RenameRequest=Ao={}));var j;(function(m){m.method="textDocument/prepareRename",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(j||(t.PrepareRenameRequest=j={}));var w;(function(m){m.method="workspace/executeCommand",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(w||(t.ExecuteCommandRequest=
|
|
1013
|
+
w={}));var _;(function(m){m.method="workspace/applyEdit",m.messageDirection=e.MessageDirection.serverToClient,m.type=new e.ProtocolRequestType("workspace/applyEdit")})(_||(t.ApplyWorkspaceEditRequest=_={}))}(zy)),zy}var fc={},iT;function I4(){if(iT)return fc;iT=1,Object.defineProperty(fc,"__esModule",{value:!0}),fc.createProtocolConnection=void 0;const t=zs();function e(n,r,i,s){return t.ConnectionStrategy.is(s)&&(s={connectionStrategy:s}),(0,t.createMessageConnection)(n,r,i,s)}return fc.createProtocolConnection=
|
|
1014
|
+
e,fc}var sT;function O4(){return sT||(sT=1,function(t){var e=Hs&&Hs.__createBinding||(Object.create?function(s,o,a,u){u===void 0&&(u=a);var c=Object.getOwnPropertyDescriptor(o,a);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[a]}}),Object.defineProperty(s,u,c)}:function(s,o,a,u){u===void 0&&(u=a),s[u]=o[a]}),n=Hs&&Hs.__exportStar||function(s,o){for(var a in s)a!=="default"&&!Object.prototype.hasOwnProperty.call(o,a)&&e(o,s,a)};Object.defineProperty(
|
|
1015
|
+
t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,n(zs(),t),n(Wy(),t),n(Ct(),t),n(N4(),t);var r=I4();Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return r.createProtocolConnection}});var i;(function(s){s.lspReservedErrorRangeStart=-32899,s.RequestFailed=-32803,s.ServerCancelled=-32802,s.ContentModified=-32801,s.RequestCancelled=-32800,s.lspReservedErrorRangeEnd=-32800})(i||(t.LSPErrorCodes=i={}))}(Hs)),Hs}var oT;function Lt(){return oT||
|
|
1016
|
+
(oT=1,function(t){var e=Gs&&Gs.__createBinding||(Object.create?function(s,o,a,u){u===void 0&&(u=a);var c=Object.getOwnPropertyDescriptor(o,a);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[a]}}),Object.defineProperty(s,u,c)}:function(s,o,a,u){u===void 0&&(u=a),s[u]=o[a]}),n=Gs&&Gs.__exportStar||function(s,o){for(var a in s)a!=="default"&&!Object.prototype.hasOwnProperty.call(o,a)&&e(o,s,a)};Object.defineProperty(t,"__esModule",{value:!0}),t.
|
|
1017
|
+
createProtocolConnection=void 0;const r=xk();n(xk(),t),n(O4(),t);function i(s,o,a,u){return(0,r.createMessageConnection)(s,o,a,u)}t.createProtocolConnection=i}(Gs)),Gs}var Xn={},aT;function uT(){if(aT)return Xn;aT=1,Object.defineProperty(Xn,"__esModule",{value:!0}),Xn.generateUuid=Xn.parse=Xn.isUUID=Xn.v4=Xn.empty=void 0;class t{constructor(u){this._value=u}asHex(){return this._value}equals(u){return this.asHex()===u.asHex()}}class e extends t{static _oneOf(u){return u[Math.floor(u.length*Math.random())]}static _randomHex(){
|
|
1018
|
+
return e._oneOf(e._chars)}constructor(){super([e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-","4",e._randomHex(),e._randomHex(),e._randomHex(),"-",e._oneOf(e._timeHighBits),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e.
|
|
1019
|
+
_randomHex(),e._randomHex(),e._randomHex()].join(""))}}e._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],e._timeHighBits=["8","9","a","b"],Xn.empty=new t("00000000-0000-0000-0000-000000000000");function n(){return new e}Xn.v4=n;const r=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function i(a){return r.test(a)}Xn.isUUID=i;function s(a){if(!i(a))throw new Error("invalid uuid");return new t(a)}Xn.parse=s;function o(){return n().asHex()}return Xn.generateUuid=
|
|
1020
|
+
o,Xn}var wi={},cT;function L4(){if(cT)return wi;cT=1,Object.defineProperty(wi,"__esModule",{value:!0}),wi.attachPartialResult=wi.ProgressFeature=wi.attachWorkDone=void 0;const t=Lt(),e=uT();class n{constructor(d,p){this._connection=d,this._token=p,n.Instances.set(this._token,this)}begin(d,p,h,v){let b={kind:"begin",title:d,percentage:p,message:h,cancellable:v};this._connection.sendProgress(t.WorkDoneProgress.type,this._token,b)}report(d,p){let h={kind:"report"};typeof d=="number"?(h.percentage=d,
|
|
1021
|
+
p!==void 0&&(h.message=p)):h.message=d,this._connection.sendProgress(t.WorkDoneProgress.type,this._token,h)}done(){n.Instances.delete(this._token),this._connection.sendProgress(t.WorkDoneProgress.type,this._token,{kind:"end"})}}n.Instances=new Map;class r extends n{constructor(d,p){super(d,p),this._source=new t.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}}class i{constructor(){}begin(){}report(){}done(){}}
|
|
1022
|
+
class s extends i{constructor(){super(),this._source=new t.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}}function o(f,d){if(d===void 0||d.workDoneToken===void 0)return new i;const p=d.workDoneToken;return delete d.workDoneToken,new n(f,p)}wi.attachWorkDone=o;const a=f=>class extends f{constructor(){super(),this._progressSupported=!1}initialize(d){super.initialize(d),d?.window?.workDoneProgress===!0&&(this._progressSupported=
|
|
1023
|
+
!0,this.connection.onNotification(t.WorkDoneProgressCancelNotification.type,p=>{let h=n.Instances.get(p.token);(h instanceof r||h instanceof s)&&h.cancel()}))}attachWorkDoneProgress(d){return d===void 0?new i:new n(this.connection,d)}createWorkDoneProgress(){if(this._progressSupported){const d=(0,e.generateUuid)();return this.connection.sendRequest(t.WorkDoneProgressCreateRequest.type,{token:d}).then(()=>new r(this.connection,d))}else return Promise.resolve(new s)}};wi.ProgressFeature=a;var u;(function(f){
|
|
1024
|
+
f.type=new t.ProgressType})(u||(u={}));class c{constructor(d,p){this._connection=d,this._token=p}report(d){this._connection.sendProgress(u.type,this._token,d)}}function l(f,d){if(d===void 0||d.partialResultToken===void 0)return;const p=d.partialResultToken;return delete d.partialResultToken,new c(f,p)}return wi.attachPartialResult=l,wi}var pc={},lT;function F4(){if(lT)return pc;lT=1,Object.defineProperty(pc,"__esModule",{value:!0}),pc.ConfigurationFeature=void 0;const t=Lt(),e=By(),n=r=>class extends r{getConfiguration(i){
|
|
1025
|
+
return i?e.string(i)?this._getConfiguration({section:i}):this._getConfiguration(i):this._getConfiguration({})}_getConfiguration(i){let s={items:Array.isArray(i)?i:[i]};return this.connection.sendRequest(t.ConfigurationRequest.type,s).then(o=>Array.isArray(o)?Array.isArray(i)?o:o[0]:Array.isArray(i)?[]:null)}};return pc.ConfigurationFeature=n,pc}var hc={},dT;function M4(){if(dT)return hc;dT=1,Object.defineProperty(hc,"__esModule",{value:!0}),hc.WorkspaceFoldersFeature=void 0;const t=Lt(),e=n=>class extends n{constructor(){
|
|
1026
|
+
super(),this._notificationIsAutoRegistered=!1}initialize(r){super.initialize(r);let i=r.workspace;i&&i.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new t.Emitter,this.connection.onNotification(t.DidChangeWorkspaceFoldersNotification.type,s=>{this._onDidChangeWorkspaceFolders.fire(s.event)}))}fillServerCapabilities(r){super.fillServerCapabilities(r);const i=r.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=i===!0||typeof i=="string"}getWorkspaceFolders(){
|
|
1027
|
+
return this.connection.sendRequest(t.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(t.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};return hc.WorkspaceFoldersFeature=e,hc}var mc={},fT;function B4(){if(fT)
|
|
1028
|
+
return mc;fT=1,Object.defineProperty(mc,"__esModule",{value:!0}),mc.CallHierarchyFeature=void 0;const t=Lt(),e=n=>class extends n{get callHierarchy(){return{onPrepare:r=>this.connection.onRequest(t.CallHierarchyPrepareRequest.type,(i,s)=>r(i,s,this.attachWorkDoneProgress(i),void 0)),onIncomingCalls:r=>{const i=t.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(i,(s,o)=>r(s,o,this.attachWorkDoneProgress(s),this.attachPartialResultProgress(i,s)))},onOutgoingCalls:r=>{const i=t.
|
|
1029
|
+
CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(i,(s,o)=>r(s,o,this.attachWorkDoneProgress(s),this.attachPartialResultProgress(i,s)))}}}};return mc.CallHierarchyFeature=e,mc}var bi={},pT;function hT(){if(pT)return bi;pT=1,Object.defineProperty(bi,"__esModule",{value:!0}),bi.SemanticTokensBuilder=bi.SemanticTokensDiff=bi.SemanticTokensFeature=void 0;const t=Lt(),e=i=>class extends i{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(t.SemanticTokensRefreshRequest.
|
|
1030
|
+
type),on:s=>{const o=t.SemanticTokensRequest.type;return this.connection.onRequest(o,(a,u)=>s(a,u,this.attachWorkDoneProgress(a),this.attachPartialResultProgress(o,a)))},onDelta:s=>{const o=t.SemanticTokensDeltaRequest.type;return this.connection.onRequest(o,(a,u)=>s(a,u,this.attachWorkDoneProgress(a),this.attachPartialResultProgress(o,a)))},onRange:s=>{const o=t.SemanticTokensRangeRequest.type;return this.connection.onRequest(o,(a,u)=>s(a,u,this.attachWorkDoneProgress(a),this.attachPartialResultProgress(
|
|
1031
|
+
o,a)))}}}};bi.SemanticTokensFeature=e;class n{constructor(s,o){this.originalSequence=s,this.modifiedSequence=o}computeDiff(){const s=this.originalSequence.length,o=this.modifiedSequence.length;let a=0;for(;a<o&&a<s&&this.originalSequence[a]===this.modifiedSequence[a];)a++;if(a<o&&a<s){let u=s-1,c=o-1;for(;u>=a&&c>=a&&this.originalSequence[u]===this.modifiedSequence[c];)u--,c--;(u<a||c<a)&&(u++,c++);const l=u-a+1,f=this.modifiedSequence.slice(a,c+1);return f.length===1&&f[0]===this.originalSequence[u]?
|
|
1032
|
+
[{start:a,deleteCount:l-1}]:[{start:a,deleteCount:l,data:f}]}else return a<o?[{start:a,deleteCount:0,data:this.modifiedSequence.slice(a)}]:a<s?[{start:a,deleteCount:s-a}]:[]}}bi.SemanticTokensDiff=n;class r{constructor(){this._prevData=void 0,this.initialize()}initialize(){this._id=Date.now(),this._prevLine=0,this._prevChar=0,this._data=[],this._dataLen=0}push(s,o,a,u,c){let l=s,f=o;this._dataLen>0&&(l-=this._prevLine,l===0&&(f-=this._prevChar)),this._data[this._dataLen++]=l,this._data[this._dataLen++]=
|
|
1033
|
+
f,this._data[this._dataLen++]=a,this._data[this._dataLen++]=u,this._data[this._dataLen++]=c,this._prevLine=s,this._prevChar=o}get id(){return this._id.toString()}previousResult(s){this.id===s&&(this._prevData=this._data),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this._data}}canBuildEdits(){return this._prevData!==void 0}buildEdits(){return this._prevData!==void 0?{resultId:this.id,edits:new n(this._prevData,this._data).computeDiff()}:this.build()}}return bi.SemanticTokensBuilder=
|
|
1034
|
+
r,bi}var gc={},mT;function j4(){if(mT)return gc;mT=1,Object.defineProperty(gc,"__esModule",{value:!0}),gc.ShowDocumentFeature=void 0;const t=Lt(),e=n=>class extends n{showDocument(r){return this.connection.sendRequest(t.ShowDocumentRequest.type,r)}};return gc.ShowDocumentFeature=e,gc}var yc={},gT;function q4(){if(gT)return yc;gT=1,Object.defineProperty(yc,"__esModule",{value:!0}),yc.FileOperationsFeature=void 0;const t=Lt(),e=n=>class extends n{onDidCreateFiles(r){return this.connection.onNotification(
|
|
1035
|
+
t.DidCreateFilesNotification.type,i=>{r(i)})}onDidRenameFiles(r){return this.connection.onNotification(t.DidRenameFilesNotification.type,i=>{r(i)})}onDidDeleteFiles(r){return this.connection.onNotification(t.DidDeleteFilesNotification.type,i=>{r(i)})}onWillCreateFiles(r){return this.connection.onRequest(t.WillCreateFilesRequest.type,(i,s)=>r(i,s))}onWillRenameFiles(r){return this.connection.onRequest(t.WillRenameFilesRequest.type,(i,s)=>r(i,s))}onWillDeleteFiles(r){return this.connection.onRequest(
|
|
1036
|
+
t.WillDeleteFilesRequest.type,(i,s)=>r(i,s))}};return yc.FileOperationsFeature=e,yc}var vc={},yT;function G4(){if(yT)return vc;yT=1,Object.defineProperty(vc,"__esModule",{value:!0}),vc.LinkedEditingRangeFeature=void 0;const t=Lt(),e=n=>class extends n{onLinkedEditingRange(r){return this.connection.onRequest(t.LinkedEditingRangeRequest.type,(i,s)=>r(i,s,this.attachWorkDoneProgress(i),void 0))}};return vc.LinkedEditingRangeFeature=e,vc}var wc={},vT;function U4(){if(vT)return wc;vT=1,Object.defineProperty(
|
|
1037
|
+
wc,"__esModule",{value:!0}),wc.TypeHierarchyFeature=void 0;const t=Lt(),e=n=>class extends n{get typeHierarchy(){return{onPrepare:r=>this.connection.onRequest(t.TypeHierarchyPrepareRequest.type,(i,s)=>r(i,s,this.attachWorkDoneProgress(i),void 0)),onSupertypes:r=>{const i=t.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(i,(s,o)=>r(s,o,this.attachWorkDoneProgress(s),this.attachPartialResultProgress(i,s)))},onSubtypes:r=>{const i=t.TypeHierarchySubtypesRequest.type;return this.
|
|
1038
|
+
connection.onRequest(i,(s,o)=>r(s,o,this.attachWorkDoneProgress(s),this.attachPartialResultProgress(i,s)))}}}};return wc.TypeHierarchyFeature=e,wc}var bc={},wT;function W4(){if(wT)return bc;wT=1,Object.defineProperty(bc,"__esModule",{value:!0}),bc.InlineValueFeature=void 0;const t=Lt(),e=n=>class extends n{get inlineValue(){return{refresh:()=>this.connection.sendRequest(t.InlineValueRefreshRequest.type),on:r=>this.connection.onRequest(t.InlineValueRequest.type,(i,s)=>r(i,s,this.attachWorkDoneProgress(
|
|
1039
|
+
i)))}}};return bc.InlineValueFeature=e,bc}var Ec={},bT;function z4(){if(bT)return Ec;bT=1,Object.defineProperty(Ec,"__esModule",{value:!0}),Ec.FoldingRangeFeature=void 0;const t=Lt(),e=n=>class extends n{get foldingRange(){return{refresh:()=>this.connection.sendRequest(t.FoldingRangeRefreshRequest.type),on:r=>{const i=t.FoldingRangeRequest.type;return this.connection.onRequest(i,(s,o)=>r(s,o,this.attachWorkDoneProgress(s),this.attachPartialResultProgress(i,s)))}}}};return Ec.FoldingRangeFeature=
|
|
1040
|
+
e,Ec}var $c={},ET;function H4(){if(ET)return $c;ET=1,Object.defineProperty($c,"__esModule",{value:!0}),$c.InlayHintFeature=void 0;const t=Lt(),e=n=>class extends n{get inlayHint(){return{refresh:()=>this.connection.sendRequest(t.InlayHintRefreshRequest.type),on:r=>this.connection.onRequest(t.InlayHintRequest.type,(i,s)=>r(i,s,this.attachWorkDoneProgress(i))),resolve:r=>this.connection.onRequest(t.InlayHintResolveRequest.type,(i,s)=>r(i,s))}}};return $c.InlayHintFeature=e,$c}var Dc={},$T;function V4(){
|
|
1041
|
+
if($T)return Dc;$T=1,Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.DiagnosticFeature=void 0;const t=Lt(),e=n=>class extends n{get diagnostics(){return{refresh:()=>this.connection.sendRequest(t.DiagnosticRefreshRequest.type),on:r=>this.connection.onRequest(t.DocumentDiagnosticRequest.type,(i,s)=>r(i,s,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(t.DocumentDiagnosticRequest.partialResult,i))),onWorkspace:r=>this.connection.onRequest(t.WorkspaceDiagnosticRequest.type,(i,s)=>r(
|
|
1042
|
+
i,s,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(t.WorkspaceDiagnosticRequest.partialResult,i)))}}};return Dc.DiagnosticFeature=e,Dc}var Js={},Rc={},DT;function RT(){if(DT)return Rc;DT=1,Object.defineProperty(Rc,"__esModule",{value:!0}),Rc.TextDocuments=void 0;const t=Lt();class e{constructor(r){this._configuration=r,this._syncedDocuments=new Map,this._onDidChangeContent=new t.Emitter,this._onDidOpen=new t.Emitter,this._onDidClose=new t.Emitter,this._onDidSave=new t.Emitter,this.
|
|
1043
|
+
_onWillSave=new t.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(r){this._willSaveWaitUntil=r}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(r){return this._syncedDocuments.get(r)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(r){r.__textDocumentSync=
|
|
1044
|
+
t.TextDocumentSyncKind.Incremental;const i=[];return i.push(r.onDidOpenTextDocument(s=>{const o=s.textDocument,a=this._configuration.create(o.uri,o.languageId,o.version,o.text);this._syncedDocuments.set(o.uri,a);const u=Object.freeze({document:a});this._onDidOpen.fire(u),this._onDidChangeContent.fire(u)})),i.push(r.onDidChangeTextDocument(s=>{const o=s.textDocument,a=s.contentChanges;if(a.length===0)return;const{version:u}=o;if(u==null)throw new Error(`Received document change event for ${o.uri}\
|
|
1045
|
+
without valid version identifier`);let c=this._syncedDocuments.get(o.uri);c!==void 0&&(c=this._configuration.update(c,a,u),this._syncedDocuments.set(o.uri,c),this._onDidChangeContent.fire(Object.freeze({document:c})))})),i.push(r.onDidCloseTextDocument(s=>{let o=this._syncedDocuments.get(s.textDocument.uri);o!==void 0&&(this._syncedDocuments.delete(s.textDocument.uri),this._onDidClose.fire(Object.freeze({document:o})))})),i.push(r.onWillSaveTextDocument(s=>{let o=this._syncedDocuments.get(s.textDocument.
|
|
1046
|
+
uri);o!==void 0&&this._onWillSave.fire(Object.freeze({document:o,reason:s.reason}))})),i.push(r.onWillSaveTextDocumentWaitUntil((s,o)=>{let a=this._syncedDocuments.get(s.textDocument.uri);return a!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:a,reason:s.reason}),o):[]})),i.push(r.onDidSaveTextDocument(s=>{let o=this._syncedDocuments.get(s.textDocument.uri);o!==void 0&&this._onDidSave.fire(Object.freeze({document:o}))})),t.Disposable.create(()=>{i.forEach(s=>s.
|
|
1047
|
+
dispose())})}}return Rc.TextDocuments=e,Rc}var kT;function TT(){if(kT)return Js;kT=1,Object.defineProperty(Js,"__esModule",{value:!0}),Js.NotebookDocuments=Js.NotebookSyncFeature=void 0;const t=Lt(),e=RT(),n=s=>class extends s{get synchronization(){return{onDidOpenNotebookDocument:o=>this.connection.onNotification(t.DidOpenNotebookDocumentNotification.type,a=>{o(a)}),onDidChangeNotebookDocument:o=>this.connection.onNotification(t.DidChangeNotebookDocumentNotification.type,a=>{o(a)}),onDidSaveNotebookDocument:o=>this.
|
|
1048
|
+
connection.onNotification(t.DidSaveNotebookDocumentNotification.type,a=>{o(a)}),onDidCloseNotebookDocument:o=>this.connection.onNotification(t.DidCloseNotebookDocumentNotification.type,a=>{o(a)})}}};Js.NotebookSyncFeature=n;class r{onDidOpenTextDocument(o){return this.openHandler=o,t.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(o){this.openHandler&&this.openHandler(o)}onDidChangeTextDocument(o){return this.changeHandler=o,t.Disposable.create(()=>{this.changeHandler=o})}changeTextDocument(o){
|
|
1049
|
+
this.changeHandler&&this.changeHandler(o)}onDidCloseTextDocument(o){return this.closeHandler=o,t.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(o){this.closeHandler&&this.closeHandler(o)}onWillSaveTextDocument(){return r.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return r.NULL_DISPOSE}onDidSaveTextDocument(){return r.NULL_DISPOSE}}r.NULL_DISPOSE=Object.freeze({dispose:()=>{}});class i{constructor(o){o instanceof e.TextDocuments?this._cellTextDocuments=o:this._cellTextDocuments=
|
|
1050
|
+
new e.TextDocuments(o),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new t.Emitter,this._onDidChange=new t.Emitter,this._onDidSave=new t.Emitter,this._onDidClose=new t.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(o){return this._cellTextDocuments.get(o.document)}getNotebookDocument(o){return this.notebookDocuments.get(o)}getNotebookCell(o){const a=this.notebookCellMap.get(o);return a&&a[0]}findNotebookDocumentForCell(o){const a=typeof o==
|
|
1051
|
+
"string"?o:o.document,u=this.notebookCellMap.get(a);return u&&u[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(o){const a=new r,u=[];return u.push(this.cellTextDocuments.listen(a)),u.push(o.notebooks.synchronization.onDidOpenNotebookDocument(c=>{this.notebookDocuments.set(c.notebookDocument.uri,c.notebookDocument);for(const l of c.cellTextDocuments)
|
|
1052
|
+
a.openTextDocument({textDocument:l});this.updateCellMap(c.notebookDocument),this._onDidOpen.fire(c.notebookDocument)})),u.push(o.notebooks.synchronization.onDidChangeNotebookDocument(c=>{const l=this.notebookDocuments.get(c.notebookDocument.uri);if(l===void 0)return;l.version=c.notebookDocument.version;const f=l.metadata;let d=!1;const p=c.change;p.metadata!==void 0&&(d=!0,l.metadata=p.metadata);const h=[],v=[],b=[],y=[];if(p.cells!==void 0){const K=p.cells;if(K.structure!==void 0){const J=K.structure.
|
|
1053
|
+
array;if(l.cells.splice(J.start,J.deleteCount,...J.cells!==void 0?J.cells:[]),K.structure.didOpen!==void 0)for(const se of K.structure.didOpen)a.openTextDocument({textDocument:se}),h.push(se.uri);if(K.structure.didClose)for(const se of K.structure.didClose)a.closeTextDocument({textDocument:se}),v.push(se.uri)}if(K.data!==void 0){const J=new Map(K.data.map(se=>[se.document,se]));for(let se=0;se<=l.cells.length;se++){const ie=J.get(l.cells[se].document);if(ie!==void 0){const we=l.cells.splice(se,1,
|
|
1054
|
+
ie);if(b.push({old:we[0],new:ie}),J.delete(ie.document),J.size===0)break}}}if(K.textContent!==void 0)for(const J of K.textContent)a.changeTextDocument({textDocument:J.document,contentChanges:J.changes}),y.push(J.document.uri)}this.updateCellMap(l);const E={notebookDocument:l};d&&(E.metadata={old:f,new:l.metadata});const R=[];for(const K of h)R.push(this.getNotebookCell(K));const A=[];for(const K of v)A.push(this.getNotebookCell(K));const N=[];for(const K of y)N.push(this.getNotebookCell(K));(R.length>
|
|
1055
|
+
0||A.length>0||b.length>0||N.length>0)&&(E.cells={added:R,removed:A,changed:{data:b,textContent:N}}),(E.metadata!==void 0||E.cells!==void 0)&&this._onDidChange.fire(E)})),u.push(o.notebooks.synchronization.onDidSaveNotebookDocument(c=>{const l=this.notebookDocuments.get(c.notebookDocument.uri);l!==void 0&&this._onDidSave.fire(l)})),u.push(o.notebooks.synchronization.onDidCloseNotebookDocument(c=>{const l=this.notebookDocuments.get(c.notebookDocument.uri);if(l!==void 0){this._onDidClose.fire(l);for(const f of c.
|
|
1056
|
+
cellTextDocuments)a.closeTextDocument({textDocument:f});this.notebookDocuments.delete(c.notebookDocument.uri);for(const f of l.cells)this.notebookCellMap.delete(f.document)}})),t.Disposable.create(()=>{u.forEach(c=>c.dispose())})}updateCellMap(o){for(const a of o.cells)this.notebookCellMap.set(a.document,[a,o])}}return Js.NotebookDocuments=i,Js}var kc={},CT;function K4(){if(CT)return kc;CT=1,Object.defineProperty(kc,"__esModule",{value:!0}),kc.MonikerFeature=void 0;const t=Lt(),e=n=>class extends n{get moniker(){
|
|
1057
|
+
return{on:r=>{const i=t.MonikerRequest.type;return this.connection.onRequest(i,(s,o)=>r(s,o,this.attachWorkDoneProgress(s),this.attachPartialResultProgress(i,s)))}}}};return kc.MonikerFeature=e,kc}var AT;function ST(){if(AT)return Ze;AT=1,Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.createConnection=Ze.combineFeatures=Ze.combineNotebooksFeatures=Ze.combineLanguagesFeatures=Ze.combineWorkspaceFeatures=Ze.combineWindowFeatures=Ze.combineClientFeatures=Ze.combineTracerFeatures=Ze.combineTelemetryFeatures=
|
|
1058
|
+
Ze.combineConsoleFeatures=Ze._NotebooksImpl=Ze._LanguagesImpl=Ze.BulkUnregistration=Ze.BulkRegistration=Ze.ErrorMessageTracker=void 0;const t=Lt(),e=By(),n=uT(),r=L4(),i=F4(),s=M4(),o=B4(),a=hT(),u=j4(),c=q4(),l=G4(),f=U4(),d=W4(),p=z4(),h=H4(),v=V4(),b=TT(),y=K4();function E(de){if(de!==null)return de}class R{constructor(){this._messages=Object.create(null)}add(I){let G=this._messages[I];G||(G=0),G++,this._messages[I]=G}sendErrors(I){Object.keys(this._messages).forEach(G=>{I.window.showErrorMessage(
|
|
1059
|
+
G)})}}Ze.ErrorMessageTracker=R;class A{constructor(){}rawAttach(I){this._rawConnection=I}attach(I){this._connection=I}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(I){}initialize(I){}error(I){this.send(t.MessageType.Error,I)}warn(I){this.send(t.MessageType.Warning,I)}info(I){this.send(t.MessageType.Info,I)}log(I){this.send(t.MessageType.Log,I)}debug(I){this.send(t.MessageType.Debug,I)}send(I,G){
|
|
1060
|
+
this._rawConnection&&this._rawConnection.sendNotification(t.LogMessageNotification.type,{type:I,message:G}).catch(()=>{(0,t.RAL)().console.error("Sending log message failed")})}}class N{constructor(){}attach(I){this._connection=I}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(I){}fillServerCapabilities(I){}showErrorMessage(I,...G){let pe={type:t.MessageType.Error,message:I,actions:G};return this.connection.sendRequest(
|
|
1061
|
+
t.ShowMessageRequest.type,pe).then(E)}showWarningMessage(I,...G){let pe={type:t.MessageType.Warning,message:I,actions:G};return this.connection.sendRequest(t.ShowMessageRequest.type,pe).then(E)}showInformationMessage(I,...G){let pe={type:t.MessageType.Info,message:I,actions:G};return this.connection.sendRequest(t.ShowMessageRequest.type,pe).then(E)}}const K=(0,u.ShowDocumentFeature)((0,r.ProgressFeature)(N));var J;(function(de){function I(){return new se}de.create=I})(J||(Ze.BulkRegistration=J={}));
|
|
1062
|
+
class se{constructor(){this._registrations=[],this._registered=new Set}add(I,G){const pe=e.string(I)?I:I.method;if(this._registered.has(pe))throw new Error(`${pe} is already added to this registration`);const U=n.generateUuid();this._registrations.push({id:U,method:pe,registerOptions:G||{}}),this._registered.add(pe)}asRegistrationParams(){return{registrations:this._registrations}}}var ie;(function(de){function I(){return new we(void 0,[])}de.create=I})(ie||(Ze.BulkUnregistration=ie={}));class we{constructor(I,G){
|
|
1063
|
+
this._connection=I,this._unregistrations=new Map,G.forEach(pe=>{this._unregistrations.set(pe.method,pe)})}get isAttached(){return!!this._connection}attach(I){this._connection=I}add(I){this._unregistrations.set(I.method,I)}dispose(){let I=[];for(let pe of this._unregistrations.values())I.push(pe);let G={unregisterations:I};this._connection.sendRequest(t.UnregistrationRequest.type,G).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(I){const G=e.string(I)?I:I.
|
|
1064
|
+
method,pe=this._unregistrations.get(G);if(!pe)return!1;let U={unregisterations:[pe]};return this._connection.sendRequest(t.UnregistrationRequest.type,U).then(()=>{this._unregistrations.delete(G)},fe=>{this._connection.console.info(`Un-registering request handler for ${pe.id} failed.`)}),!0}}class B{attach(I){this._connection=I}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(I){}fillServerCapabilities(I){}register(I,G,pe){
|
|
1065
|
+
return I instanceof se?this.registerMany(I):I instanceof we?this.registerSingle1(I,G,pe):this.registerSingle2(I,G)}registerSingle1(I,G,pe){const U=e.string(G)?G:G.method,fe=n.generateUuid();let Ke={registrations:[{id:fe,method:U,registerOptions:pe||{}}]};return I.isAttached||I.attach(this.connection),this.connection.sendRequest(t.RegistrationRequest.type,Ke).then(it=>(I.add({id:fe,method:U}),I),it=>(this.connection.console.info(`Registering request handler for ${U} failed.`),Promise.reject(it)))}registerSingle2(I,G){
|
|
1066
|
+
const pe=e.string(I)?I:I.method,U=n.generateUuid();let fe={registrations:[{id:U,method:pe,registerOptions:G||{}}]};return this.connection.sendRequest(t.RegistrationRequest.type,fe).then(Ke=>t.Disposable.create(()=>{this.unregisterSingle(U,pe).catch(()=>{this.connection.console.info(`Un-registering capability with id ${U} failed.`)})}),Ke=>(this.connection.console.info(`Registering request handler for ${pe} failed.`),Promise.reject(Ke)))}unregisterSingle(I,G){let pe={unregisterations:[{id:I,method:G}]};
|
|
1067
|
+
return this.connection.sendRequest(t.UnregistrationRequest.type,pe).catch(()=>{this.connection.console.info(`Un-registering request handler for ${I} failed.`)})}registerMany(I){let G=I.asRegistrationParams();return this.connection.sendRequest(t.RegistrationRequest.type,G).then(()=>new we(this._connection,G.registrations.map(pe=>({id:pe.id,method:pe.method}))),pe=>(this.connection.console.info("Bulk registration failed."),Promise.reject(pe)))}}class T{constructor(){}attach(I){this._connection=I}get connection(){
|
|
1068
|
+
if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(I){}fillServerCapabilities(I){}applyEdit(I){function G(U){return U&&!!U.edit}let pe=G(I)?I:{edit:I};return this.connection.sendRequest(t.ApplyWorkspaceEditRequest.type,pe)}}const D=(0,c.FileOperationsFeature)((0,s.WorkspaceFoldersFeature)((0,i.ConfigurationFeature)(T)));class M{constructor(){this._trace=t.Trace.Off}attach(I){this._connection=I}get connection(){if(!this._connection)
|
|
1069
|
+
throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(I){}fillServerCapabilities(I){}set trace(I){this._trace=I}log(I,G){this._trace!==t.Trace.Off&&this.connection.sendNotification(t.LogTraceNotification.type,{message:I,verbose:this._trace===t.Trace.Verbose?G:void 0}).catch(()=>{})}}class S{constructor(){}attach(I){this._connection=I}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(I){}fillServerCapabilities(I){}logEvent(I){
|
|
1070
|
+
this.connection.sendNotification(t.TelemetryEventNotification.type,I).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}}class P{constructor(){}attach(I){this._connection=I}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(I){}fillServerCapabilities(I){}attachWorkDoneProgress(I){return(0,r.attachWorkDone)(this.connection,I)}attachPartialResultProgress(I,G){return(0,r.attachPartialResult)(
|
|
1071
|
+
this.connection,G)}}Ze._LanguagesImpl=P;const O=(0,p.FoldingRangeFeature)((0,y.MonikerFeature)((0,v.DiagnosticFeature)((0,h.InlayHintFeature)((0,d.InlineValueFeature)((0,f.TypeHierarchyFeature)((0,l.LinkedEditingRangeFeature)((0,a.SemanticTokensFeature)((0,o.CallHierarchyFeature)(P)))))))));class Z{constructor(){}attach(I){this._connection=I}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(I){}fillServerCapabilities(I){}attachWorkDoneProgress(I){
|
|
1072
|
+
return(0,r.attachWorkDone)(this.connection,I)}attachPartialResultProgress(I,G){return(0,r.attachPartialResult)(this.connection,G)}}Ze._NotebooksImpl=Z;const H=(0,b.NotebookSyncFeature)(Z);function C(de,I){return function(G){return I(de(G))}}Ze.combineConsoleFeatures=C;function ne(de,I){return function(G){return I(de(G))}}Ze.combineTelemetryFeatures=ne;function ye(de,I){return function(G){return I(de(G))}}Ze.combineTracerFeatures=ye;function Pe(de,I){return function(G){return I(de(G))}}Ze.combineClientFeatures=
|
|
1073
|
+
Pe;function F(de,I){return function(G){return I(de(G))}}Ze.combineWindowFeatures=F;function V(de,I){return function(G){return I(de(G))}}Ze.combineWorkspaceFeatures=V;function Se(de,I){return function(G){return I(de(G))}}Ze.combineLanguagesFeatures=Se;function le(de,I){return function(G){return I(de(G))}}Ze.combineNotebooksFeatures=le;function $e(de,I){function G(U,fe,Ke){return U&&fe?Ke(U,fe):U||fe}return{__brand:"features",console:G(de.console,I.console,C),tracer:G(de.tracer,I.tracer,ye),telemetry:G(
|
|
1074
|
+
de.telemetry,I.telemetry,ne),client:G(de.client,I.client,Pe),window:G(de.window,I.window,F),workspace:G(de.workspace,I.workspace,V),languages:G(de.languages,I.languages,Se),notebooks:G(de.notebooks,I.notebooks,le)}}Ze.combineFeatures=$e;function xe(de,I,G){const pe=G&&G.console?new(G.console(A)):new A,U=de(pe);pe.rawAttach(U);const fe=G&&G.tracer?new(G.tracer(M)):new M,Ke=G&&G.telemetry?new(G.telemetry(S)):new S,it=G&&G.client?new(G.client(B)):new B,ue=G&&G.window?new(G.window(K)):new K,Oe=G&&G.
|
|
1075
|
+
workspace?new(G.workspace(D)):new D,re=G&&G.languages?new(G.languages(O)):new O,De=G&&G.notebooks?new(G.notebooks(H)):new H,Ge=[pe,fe,Ke,it,ue,Oe,re,De];function vt(X){return X instanceof Promise?X:e.thenable(X)?new Promise((Y,he)=>{X.then(tn=>Y(tn),tn=>he(tn))}):Promise.resolve(X)}let et,Kt,en,gn={listen:()=>U.listen(),sendRequest:(X,...Y)=>U.sendRequest(e.string(X)?X:X.method,...Y),onRequest:(X,Y)=>U.onRequest(X,Y),sendNotification:(X,Y)=>{const he=e.string(X)?X:X.method;return U.sendNotification(
|
|
1076
|
+
he,Y)},onNotification:(X,Y)=>U.onNotification(X,Y),onProgress:U.onProgress,sendProgress:U.sendProgress,onInitialize:X=>(Kt=X,{dispose:()=>{Kt=void 0}}),onInitialized:X=>U.onNotification(t.InitializedNotification.type,X),onShutdown:X=>(et=X,{dispose:()=>{et=void 0}}),onExit:X=>(en=X,{dispose:()=>{en=void 0}}),get console(){return pe},get telemetry(){return Ke},get tracer(){return fe},get client(){return it},get window(){return ue},get workspace(){return Oe},get languages(){return re},get notebooks(){
|
|
1077
|
+
return De},onDidChangeConfiguration:X=>U.onNotification(t.DidChangeConfigurationNotification.type,X),onDidChangeWatchedFiles:X=>U.onNotification(t.DidChangeWatchedFilesNotification.type,X),__textDocumentSync:void 0,onDidOpenTextDocument:X=>U.onNotification(t.DidOpenTextDocumentNotification.type,X),onDidChangeTextDocument:X=>U.onNotification(t.DidChangeTextDocumentNotification.type,X),onDidCloseTextDocument:X=>U.onNotification(t.DidCloseTextDocumentNotification.type,X),onWillSaveTextDocument:X=>U.
|
|
1078
|
+
onNotification(t.WillSaveTextDocumentNotification.type,X),onWillSaveTextDocumentWaitUntil:X=>U.onRequest(t.WillSaveTextDocumentWaitUntilRequest.type,X),onDidSaveTextDocument:X=>U.onNotification(t.DidSaveTextDocumentNotification.type,X),sendDiagnostics:X=>U.sendNotification(t.PublishDiagnosticsNotification.type,X),onHover:X=>U.onRequest(t.HoverRequest.type,(Y,he)=>X(Y,he,(0,r.attachWorkDone)(U,Y),void 0)),onCompletion:X=>U.onRequest(t.CompletionRequest.type,(Y,he)=>X(Y,he,(0,r.attachWorkDone)(U,Y),
|
|
1079
|
+
(0,r.attachPartialResult)(U,Y))),onCompletionResolve:X=>U.onRequest(t.CompletionResolveRequest.type,X),onSignatureHelp:X=>U.onRequest(t.SignatureHelpRequest.type,(Y,he)=>X(Y,he,(0,r.attachWorkDone)(U,Y),void 0)),onDeclaration:X=>U.onRequest(t.DeclarationRequest.type,(Y,he)=>X(Y,he,(0,r.attachWorkDone)(U,Y),(0,r.attachPartialResult)(U,Y))),onDefinition:X=>U.onRequest(t.DefinitionRequest.type,(Y,he)=>X(Y,he,(0,r.attachWorkDone)(U,Y),(0,r.attachPartialResult)(U,Y))),onTypeDefinition:X=>U.onRequest(
|
|
1080
|
+
t.TypeDefinitionRequest.type,(Y,he)=>X(Y,he,(0,r.attachWorkDone)(U,Y),(0,r.attachPartialResult)(U,Y))),onImplementation:X=>U.onRequest(t.ImplementationRequest.type,(Y,he)=>X(Y,he,(0,r.attachWorkDone)(U,Y),(0,r.attachPartialResult)(U,Y))),onReferences:X=>U.onRequest(t.ReferencesRequest.type,(Y,he)=>X(Y,he,(0,r.attachWorkDone)(U,Y),(0,r.attachPartialResult)(U,Y))),onDocumentHighlight:X=>U.onRequest(t.DocumentHighlightRequest.type,(Y,he)=>X(Y,he,(0,r.attachWorkDone)(U,Y),(0,r.attachPartialResult)(U,
|
|
1081
|
+
Y))),onDocumentSymbol:X=>U.onRequest(t.DocumentSymbolRequest.type,(Y,he)=>X(Y,he,(0,r.attachWorkDone)(U,Y),(0,r.attachPartialResult)(U,Y))),onWorkspaceSymbol:X=>U.onRequest(t.WorkspaceSymbolRequest.type,(Y,he)=>X(Y,he,(0,r.attachWorkDone)(U,Y),(0,r.attachPartialResult)(U,Y))),onWorkspaceSymbolResolve:X=>U.onRequest(t.WorkspaceSymbolResolveRequest.type,X),onCodeAction:X=>U.onRequest(t.CodeActionRequest.type,(Y,he)=>X(Y,he,(0,r.attachWorkDone)(U,Y),(0,r.attachPartialResult)(U,Y))),onCodeActionResolve:X=>U.
|
|
1082
|
+
onRequest(t.CodeActionResolveRequest.type,(Y,he)=>X(Y,he)),onCodeLens:X=>U.onRequest(t.CodeLensRequest.type,(Y,he)=>X(Y,he,(0,r.attachWorkDone)(U,Y),(0,r.attachPartialResult)(U,Y))),onCodeLensResolve:X=>U.onRequest(t.CodeLensResolveRequest.type,(Y,he)=>X(Y,he)),onDocumentFormatting:X=>U.onRequest(t.DocumentFormattingRequest.type,(Y,he)=>X(Y,he,(0,r.attachWorkDone)(U,Y),void 0)),onDocumentRangeFormatting:X=>U.onRequest(t.DocumentRangeFormattingRequest.type,(Y,he)=>X(Y,he,(0,r.attachWorkDone)(U,Y),
|
|
1083
|
+
void 0)),onDocumentOnTypeFormatting:X=>U.onRequest(t.DocumentOnTypeFormattingRequest.type,(Y,he)=>X(Y,he)),onRenameRequest:X=>U.onRequest(t.RenameRequest.type,(Y,he)=>X(Y,he,(0,r.attachWorkDone)(U,Y),void 0)),onPrepareRename:X=>U.onRequest(t.PrepareRenameRequest.type,(Y,he)=>X(Y,he)),onDocumentLinks:X=>U.onRequest(t.DocumentLinkRequest.type,(Y,he)=>X(Y,he,(0,r.attachWorkDone)(U,Y),(0,r.attachPartialResult)(U,Y))),onDocumentLinkResolve:X=>U.onRequest(t.DocumentLinkResolveRequest.type,(Y,he)=>X(Y,
|
|
1084
|
+
he)),onDocumentColor:X=>U.onRequest(t.DocumentColorRequest.type,(Y,he)=>X(Y,he,(0,r.attachWorkDone)(U,Y),(0,r.attachPartialResult)(U,Y))),onColorPresentation:X=>U.onRequest(t.ColorPresentationRequest.type,(Y,he)=>X(Y,he,(0,r.attachWorkDone)(U,Y),(0,r.attachPartialResult)(U,Y))),onFoldingRanges:X=>U.onRequest(t.FoldingRangeRequest.type,(Y,he)=>X(Y,he,(0,r.attachWorkDone)(U,Y),(0,r.attachPartialResult)(U,Y))),onSelectionRanges:X=>U.onRequest(t.SelectionRangeRequest.type,(Y,he)=>X(Y,he,(0,r.attachWorkDone)(
|
|
1085
|
+
U,Y),(0,r.attachPartialResult)(U,Y))),onExecuteCommand:X=>U.onRequest(t.ExecuteCommandRequest.type,(Y,he)=>X(Y,he,(0,r.attachWorkDone)(U,Y),void 0)),dispose:()=>U.dispose()};for(let X of Ge)X.attach(gn);return U.onRequest(t.InitializeRequest.type,X=>{I.initialize(X),e.string(X.trace)&&(fe.trace=t.Trace.fromString(X.trace));for(let Y of Ge)Y.initialize(X.capabilities);if(Kt){let Y=Kt(X,new t.CancellationTokenSource().token,(0,r.attachWorkDone)(U,X),void 0);return vt(Y).then(he=>{if(he instanceof t.
|
|
1086
|
+
ResponseError)return he;let tn=he;tn||(tn={capabilities:{}});let Xt=tn.capabilities;Xt||(Xt={},tn.capabilities=Xt),Xt.textDocumentSync===void 0||Xt.textDocumentSync===null?Xt.textDocumentSync=e.number(gn.__textDocumentSync)?gn.__textDocumentSync:t.TextDocumentSyncKind.None:!e.number(Xt.textDocumentSync)&&!e.number(Xt.textDocumentSync.change)&&(Xt.textDocumentSync.change=e.number(gn.__textDocumentSync)?gn.__textDocumentSync:t.TextDocumentSyncKind.None);for(let _r of Ge)_r.fillServerCapabilities(Xt);
|
|
1087
|
+
return tn})}else{let Y={capabilities:{textDocumentSync:t.TextDocumentSyncKind.None}};for(let he of Ge)he.fillServerCapabilities(Y.capabilities);return Y}}),U.onRequest(t.ShutdownRequest.type,()=>{if(I.shutdownReceived=!0,et)return et(new t.CancellationTokenSource().token)}),U.onNotification(t.ExitNotification.type,()=>{try{en&&en()}finally{I.shutdownReceived?I.exit(0):I.exit(1)}}),U.onNotification(t.SetTraceNotification.type,X=>{fe.trace=t.Trace.fromString(X.value)}),gn}return Ze.createConnection=
|
|
1088
|
+
xe,Ze}var Tn={},_T;function X4(){if(_T)return Tn;_T=1,Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.resolveModulePath=Tn.FileSystem=Tn.resolveGlobalYarnPath=Tn.resolveGlobalNodePath=Tn.resolve=Tn.uriToFilePath=void 0;const t=A_,e=Li,n=Ia,r=S_;function i(f){let d=t.parse(f);if(d.protocol!=="file:"||!d.path)return;let p=d.path.split("/");for(var h=0,v=p.length;h<v;h++)p[h]=decodeURIComponent(p[h]);if(process.platform==="win32"&&p.length>1){let b=p[0],y=p[1];b.length===0&&y.length>1&&y[1]===
|
|
1089
|
+
":"&&p.shift()}return e.normalize(p.join("/"))}Tn.uriToFilePath=i;function s(){return process.platform==="win32"}function o(f,d,p,h){const v="NODE_PATH",b=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((y,E)=>{let R=process.env,A=Object.create(null);Object.keys(R).forEach(N=>A[N]=R[N]),
|
|
1090
|
+
d&&n.existsSync(d)&&(A[v]?A[v]=d+e.delimiter+A[v]:A[v]=d,h&&h(`NODE_PATH value is: ${A[v]}`)),A.ELECTRON_RUN_AS_NODE="1";try{let N=(0,r.fork)("",[],{cwd:p,env:A,execArgv:["-e",b]});if(N.pid===void 0){E(new Error(`Starting process to resolve node module ${f} failed`));return}N.on("error",J=>{E(J)}),N.on("message",J=>{J.c==="r"&&(N.send({c:"e"}),J.s?y(J.r):E(new Error(`Failed to resolve module: ${f}`)))});let K={c:"rs",a:f};N.send(K)}catch(N){E(N)}})}Tn.resolve=o;function a(f){let d="npm";const p=Object.
|
|
1091
|
+
create(null);Object.keys(process.env).forEach(b=>p[b]=process.env[b]),p.NO_UPDATE_NOTIFIER="true";const h={encoding:"utf8",env:p};s()&&(d="npm.cmd",h.shell=!0);let v=()=>{};try{process.on("SIGPIPE",v);let b=(0,r.spawnSync)(d,["config","get","prefix"],h).stdout;if(!b){f&&f("'npm config get prefix' didn't return a value.");return}let y=b.trim();return f&&f(`'npm config get prefix' value is: ${y}`),y.length>0?s()?e.join(y,"node_modules"):e.join(y,"lib","node_modules"):void 0}catch{return}finally{process.
|
|
1092
|
+
removeListener("SIGPIPE",v)}}Tn.resolveGlobalNodePath=a;function u(f){let d="yarn",p={encoding:"utf8"};s()&&(d="yarn.cmd",p.shell=!0);let h=()=>{};try{process.on("SIGPIPE",h);let v=(0,r.spawnSync)(d,["global","dir","--json"],p),b=v.stdout;if(!b){f&&(f("'yarn global dir' didn't return a value."),v.stderr&&f(v.stderr));return}let y=b.trim().split(/\r?\n/);for(let E of y)try{let R=JSON.parse(E);if(R.type==="log")return e.join(R.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener(
|
|
1093
|
+
"SIGPIPE",h)}}Tn.resolveGlobalYarnPath=u;var c;(function(f){let d;function p(){return d!==void 0||(process.platform==="win32"?d=!1:d=!n.existsSync(__filename.toUpperCase())||!n.existsSync(__filename.toLowerCase())),d}f.isCaseSensitive=p;function h(v,b){return p()?e.normalize(b).indexOf(e.normalize(v))===0:e.normalize(b).toLowerCase().indexOf(e.normalize(v).toLowerCase())===0}f.isParent=h})(c||(Tn.FileSystem=c={}));function l(f,d,p,h){return p?(e.isAbsolute(p)||(p=e.join(f,p)),o(d,p,p,h).then(v=>c.
|
|
1094
|
+
isParent(p,v)?v:Promise.reject(new Error(`Failed to load ${d} from node path location.`))).then(void 0,v=>o(d,a(h),f,h))):o(d,a(h),f,h)}return Tn.resolveModulePath=l,Tn}var Vy,PT;function xT(){return PT||(PT=1,Vy=Lt()),Vy}var Qs={},Tc={},NT;function Y4(){if(NT)return Tc;NT=1,Object.defineProperty(Tc,"__esModule",{value:!0}),Tc.InlineCompletionFeature=void 0;const t=Lt(),e=n=>class extends n{get inlineCompletion(){return{on:r=>this.connection.onRequest(t.InlineCompletionRequest.type,(i,s)=>r(i,s,
|
|
1095
|
+
this.attachWorkDoneProgress(i)))}}};return Tc.InlineCompletionFeature=e,Tc}var IT;function J4(){return IT||(IT=1,function(t){var e=Qs&&Qs.__createBinding||(Object.create?function(u,c,l,f){f===void 0&&(f=l);var d=Object.getOwnPropertyDescriptor(c,l);(!d||("get"in d?!c.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return c[l]}}),Object.defineProperty(u,f,d)}:function(u,c,l,f){f===void 0&&(f=l),u[f]=c[l]}),n=Qs&&Qs.__exportStar||function(u,c){for(var l in u)l!=="default"&&
|
|
1096
|
+
!Object.prototype.hasOwnProperty.call(c,l)&&e(c,u,l)};Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.NotebookDocuments=t.TextDocuments=t.SemanticTokensBuilder=void 0;const r=hT();Object.defineProperty(t,"SemanticTokensBuilder",{enumerable:!0,get:function(){return r.SemanticTokensBuilder}});const i=Y4();n(Lt(),t);const s=RT();Object.defineProperty(t,"TextDocuments",{enumerable:!0,get:function(){return s.TextDocuments}});const o=TT();Object.defineProperty(t,"NotebookDocument\
|
|
1097
|
+
s",{enumerable:!0,get:function(){return o.NotebookDocuments}}),n(ST(),t);var a;(function(u){u.all={__brand:"features",languages:i.InlineCompletionFeature}})(a||(t.ProposedFeatures=a={}))}(Qs)),Qs}var OT;function LT(){return OT||(OT=1,function(t){var e=qs&&qs.__createBinding||(Object.create?function(y,E,R,A){A===void 0&&(A=R);var N=Object.getOwnPropertyDescriptor(E,R);(!N||("get"in N?!E.__esModule:N.writable||N.configurable))&&(N={enumerable:!0,get:function(){return E[R]}}),Object.defineProperty(
|
|
1098
|
+
y,A,N)}:function(y,E,R,A){A===void 0&&(A=R),y[A]=E[R]}),n=qs&&qs.__exportStar||function(y,E){for(var R in y)R!=="default"&&!Object.prototype.hasOwnProperty.call(E,R)&&e(E,y,R)};Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=t.Files=void 0;const r=$_,i=By(),s=ST(),o=X4(),a=xT();n(xT(),t),n(J4(),t);var u;(function(y){y.uriToFilePath=o.uriToFilePath,y.resolveGlobalNodePath=o.resolveGlobalNodePath,y.resolveGlobalYarnPath=o.resolveGlobalYarnPath,y.resolve=o.resolve,y.resolveModulePath=
|
|
1099
|
+
o.resolveModulePath})(u||(t.Files=u={}));function c(){}let l=!1,f;function d(){const y="--clientProcessId";function E(R){try{let A=parseInt(R);isNaN(A)||(f=setInterval(()=>{try{process.kill(A,0)}catch{process.exit(l?0:1)}},3e3))}catch{}}for(let R=2;R<process.argv.length;R++){let A=process.argv[R];if(A===y&&R+1<process.argv.length){E(process.argv[R+1]);return}else{let N=A.split("=");N[0]===y&&E(N[1])}}}d();const p={initialize:y=>{const E=y.processId;i.number(E)&&f===void 0&&setInterval(()=>{try{process.
|
|
1100
|
+
kill(E,0)}catch{process.exit(l?0:1)}},3e3)},get shutdownReceived(){return l},set shutdownReceived(y){l=y},exit:y=>{process.exit(y)}};function h(y,E,R,A){let N,K,J,se;return y!==void 0&&y.__brand==="features"&&(N=y,y=E,E=R,R=A),a.ConnectionStrategy.is(y)||a.ConnectionOptions.is(y)?se=y:(K=y,J=E,se=R),v(K,J,se,N)}t.createConnection=h;function v(y,E,R,A){let N=!1;if(!y&&!E&&process.argv.length>2){let ie,we,B=process.argv.slice(2);for(let T=0;T<B.length;T++){let D=B[T];if(D==="--node-ipc"){y=new a.IPCMessageReader(
|
|
1101
|
+
process),E=new a.IPCMessageWriter(process);break}else if(D==="--stdio"){N=!0,y=process.stdin,E=process.stdout;break}else if(D==="--socket"){ie=parseInt(B[T+1]);break}else if(D==="--pipe"){we=B[T+1];break}else{var K=D.split("=");if(K[0]==="--socket"){ie=parseInt(K[1]);break}else if(K[0]==="--pipe"){we=K[1];break}}}if(ie){let T=(0,a.createServerSocketTransport)(ie);y=T[0],E=T[1]}else if(we){let T=(0,a.createServerPipeTransport)(we);y=T[0],E=T[1]}}var J="Use arguments of createConnection or set com\
|
|
1102
|
+
mand line parameters: '--node-ipc', '--stdio' or '--socket={number}'";if(!y)throw new Error("Connection input stream is not set. "+J);if(!E)throw new Error("Connection output stream is not set. "+J);if(i.func(y.read)&&i.func(y.on)){let ie=y;ie.on("end",()=>{process.exit(l?0:1)}),ie.on("close",()=>{process.exit(l?0:1)})}const se=ie=>{const we=(0,a.createProtocolConnection)(y,E,ie,R);return N&&b(ie),we};return(0,s.createConnection)(se,p,A)}function b(y){function E(A){return A.map(N=>typeof N=="str\
|
|
1103
|
+
ing"?N:(0,r.inspect)(N)).join(" ")}const R=new Map;console.assert=function(N,...K){if(!N)if(K.length===0)y.error("Assertion failed");else{const[J,...se]=K;y.error(`Assertion failed: ${J} ${E(se)}`)}},console.count=function(N="default"){const K=String(N);let J=R.get(K)??0;J+=1,R.set(K,J),y.log(`${K}: ${K}`)},console.countReset=function(N){N===void 0?R.clear():R.delete(String(N))},console.debug=function(...N){y.log(E(N))},console.dir=function(N,K){y.log((0,r.inspect)(N,K))},console.log=function(...N){
|
|
1104
|
+
y.log(E(N))},console.error=function(...N){y.error(E(N))},console.trace=function(...N){const K=new Error().stack.replace(/(.+\n){2}/,"");let J="Trace";N.length!==0&&(J+=`: ${E(N)}`),y.log(`${J}
|
|
1105
|
+
${K}`)},console.warn=function(...N){y.warn(E(N))}}}(qs)),qs}var ge=LT();function FT(t,e){const n={stacks:t,tokens:e};return Q4(n),n.stacks.flat().forEach(i=>{i.property=void 0}),BT(n.stacks).map(i=>i[i.length-1])}function Ky(t){const{next:e,cardinalities:n,visited:r,plus:i}=t,s=[],o=e.feature;if(r.has(o))return[];ji(o)||r.add(o);let a,u=o;for(;u.$container;)if(ji(u.$container)){a=u.$container;break}else if(Mm(u.$container))u=u.$container;else break;if(q0(u.cardinality)){const c=ea({next:{feature:u,
|
|
1106
|
+
type:e.type},cardinalities:n,visited:r,plus:i});for(const l of c)i.add(l.feature);s.push(...c)}if(a){const c=a.elements.indexOf(u);c!==void 0&&c<a.elements.length-1&&s.push(...MT({feature:a,type:e.type},c+1,n,r,i)),s.every(l=>Oo(l.feature.cardinality,l.feature)||Oo(n.get(l.feature))||i.has(l.feature))&&s.push(...Ky({next:{feature:a,type:e.type},cardinalities:n,visited:r,plus:i}))}return s}function Xy(t){return Rt(t)&&(t={feature:t}),ea({next:t,cardinalities:new Map,visited:new Set,plus:new Set})}
|
|
1107
|
+
function ea(t){var e,n,r;const{next:i,cardinalities:s,visited:o,plus:a}=t;if(i===void 0)return[];const{feature:u,type:c}=i;if(ji(u))return o.has(u)?[]:(o.add(u),MT(i,0,s,o,a).map(l=>$p(l,u.cardinality,s)));if(Um(u)||Wm(u))return u.elements.flatMap(l=>ea({next:{feature:l,type:c,property:i.property},cardinalities:s,visited:o,plus:a})).map(l=>$p(l,u.cardinality,s));if(Nr(u)){const l={feature:u.terminal,type:c,property:(e=i.property)!==null&&e!==void 0?e:u.feature};return ea({next:l,cardinalities:s,
|
|
1108
|
+
visited:o,plus:a}).map(f=>$p(f,u.cardinality,s))}else{if(Ds(u))return Ky({next:{feature:u,type:Ru(u),property:(n=i.property)!==null&&n!==void 0?n:u.feature},cardinalities:s,visited:o,plus:a});if(Qr(u)&&ln(u.rule.ref)){const l=u.rule.ref,f={feature:l.definition,type:l.fragment||l.dataType?void 0:(r=Rs(l))!==null&&r!==void 0?r:l.name,property:i.property};return ea({next:f,cardinalities:s,visited:o,plus:a}).map(d=>$p(d,u.cardinality,s))}else return[i]}}function $p(t,e,n){return n.set(t.feature,e),t}
|
|
1109
|
+
function MT(t,e,n,r,i){var s;const o=[];let a;for(;e<t.feature.elements.length&&(a={feature:t.feature.elements[e++],type:t.type},o.push(...ea({next:a,cardinalities:n,visited:r,plus:i})),!!Oo((s=a.feature.cardinality)!==null&&s!==void 0?s:n.get(a.feature),a.feature)););return o}function Q4(t){for(const e of t.tokens){const n=BT(t.stacks,e);t.stacks=n}}function BT(t,e){const n=[];for(const r of t)n.push(...Z4(r,e));return n}function Z4(t,e){const n=new Map,r=new Set(t.map(s=>s.feature).filter(e8)),
|
|
1110
|
+
i=[];for(;t.length>0;){const s=t.pop(),o=Ky({next:s,cardinalities:n,plus:r,visited:new Set}).filter(a=>e?Yy(a.feature,e):!0);for(const a of o)i.push([...t,a]);if(!o.every(a=>Oo(a.feature.cardinality,a.feature)||Oo(n.get(a.feature))))break}return i}function e8(t){if(t.cardinality==="+")return!0;const e=wn(t,Nr);return!!(e&&e.cardinality==="+")}function Yy(t,e){if(Ir(t))return t.value===e.image;if(Qr(t))return t8(t.rule.ref,e);if(au(t)){const n=Zm(t);if(n)return Yy(n,e)}return!1}function t8(t,e){return ln(
|
|
1111
|
+
t)?Xy(t.definition).some(r=>Yy(r.feature,e)):Jr(t)?ku(t).test(e.image):!1}function n8(t){const e=Array.from(new Set(t.flatMap(r=>{var i;return(i=r?.triggerCharacters)!==null&&i!==void 0?i:[]}))),n=Array.from(new Set(t.flatMap(r=>{var i;return(i=r?.allCommitCharacters)!==null&&i!==void 0?i:[]})));return{triggerCharacters:e.length>0?e:void 0,allCommitCharacters:n.length>0?n:void 0}}class jT{constructor(e){this.scopeProvider=e.references.ScopeProvider,this.grammar=e.Grammar,this.completionParser=e.
|
|
1112
|
+
parser.CompletionParser,this.nameProvider=e.references.NameProvider,this.lexer=e.parser.Lexer,this.nodeKindProvider=e.shared.lsp.NodeKindProvider,this.fuzzyMatcher=e.shared.lsp.FuzzyMatcher,this.grammarConfig=e.parser.GrammarConfig,this.astReflection=e.shared.AstReflection,this.documentationProvider=e.documentation.DocumentationProvider}async getCompletion(e,n,r){const i=[],s=this.buildContexts(e,n.position),o=(c,l)=>{const f=this.fillCompletionItem(c,l);f&&i.push(f)},a=c=>Ir(c.feature)?c.feature.
|
|
1113
|
+
value:c.feature,u=[];for(const c of s)if(await Promise.all(We(c.features).distinct(a).exclude(u).map(l=>this.completionFor(c,l,o))),u.push(...c.features),!this.continueCompletion(i))break;return ge.CompletionList.create(this.deduplicateItems(i),!0)}deduplicateItems(e){return We(e).distinct(n=>`${n.kind}_${n.label}_${n.detail}`).toArray()}findFeaturesAt(e,n){const r=e.getText({start:ge.Position.create(0,0),end:e.positionAt(n)}),i=this.completionParser.parse(r),s=i.tokens;if(i.tokenIndex===0){const u=pf(
|
|
1114
|
+
this.grammar),c=Xy({feature:u.definition,type:Rs(u)});return s.length>0?(s.shift(),FT(c.map(l=>[l]),s)):c}const o=[...s].splice(i.tokenIndex);return FT([i.elementStack.map(u=>({feature:u}))],o)}*buildContexts(e,n){var r,i;const s=e.parseResult.value.$cstNode;if(!s)return;const o=e.textDocument,a=o.getText(),u=o.offsetAt(n),c={document:e,textDocument:o,offset:u,position:n},l=this.findDataTypeRuleStart(s,u);if(l){const[E,R]=l,A=(r=Om(s,E))===null||r===void 0?void 0:r.astNode;yield Object.assign(Object.
|
|
1115
|
+
assign({},c),{node:A,tokenOffset:E,tokenEndOffset:R,features:this.findFeaturesAt(o,E)})}const{nextTokenStart:f,nextTokenEnd:d,previousTokenStart:p,previousTokenEnd:h}=this.backtrackToAnyToken(a,u);let v=f;u<=f&&p!==void 0&&(v=p);const b=(i=Om(s,v))===null||i===void 0?void 0:i.astNode;let y=!0;if(p!==void 0&&h!==void 0&&h===u&&(yield Object.assign(Object.assign({},c),{node:b,tokenOffset:p,tokenEndOffset:h,features:this.findFeaturesAt(o,p)}),y=this.performNextTokenCompletion(e,a.substring(p,h),p,h),
|
|
1116
|
+
y&&(yield Object.assign(Object.assign({},c),{node:b,tokenOffset:h,tokenEndOffset:h,features:this.findFeaturesAt(o,h)}))),b)y&&(yield Object.assign(Object.assign({},c),{node:b,tokenOffset:f,tokenEndOffset:d,features:this.findFeaturesAt(o,f)}));else{const E=pf(this.grammar);if(!E)throw new Error("Missing entry parser rule");yield Object.assign(Object.assign({},c),{tokenOffset:f,tokenEndOffset:d,features:Xy(E.definition)})}}performNextTokenCompletion(e,n,r,i){return new RegExp("\\P{L}$","u").test(n)}findDataTypeRuleStart(e,n){
|
|
1117
|
+
var r,i;let s=$s(e,n,this.grammarConfig.nameRegexp),o=!!(!((r=wn(s?.grammarSource,ln))===null||r===void 0)&&r.dataType);if(o){for(;o;)s=s?.container,o=!!(!((i=wn(s?.grammarSource,ln))===null||i===void 0)&&i.dataType);if(s)return[s.offset,s.end]}}continueCompletion(e){return e.length===0}backtrackToAnyToken(e,n){const r=this.lexer.tokenize(e).tokens;if(r.length===0)return{nextTokenStart:n,nextTokenEnd:n};let i;for(const s of r){if(s.startOffset>=n)return{nextTokenStart:n,nextTokenEnd:n,previousTokenStart:i?
|
|
1118
|
+
i.startOffset:void 0,previousTokenEnd:i?i.endOffset+1:void 0};if(s.endOffset>=n)return{nextTokenStart:s.startOffset,nextTokenEnd:s.endOffset+1,previousTokenStart:i?i.startOffset:void 0,previousTokenEnd:i?i.endOffset+1:void 0};i=s}return{nextTokenStart:n,nextTokenEnd:n,previousTokenStart:i?i.startOffset:void 0,previousTokenEnd:i?i.endOffset+1:void 0}}completionFor(e,n,r){if(Ir(n.feature))return this.completionForKeyword(e,n.feature,r);if(au(n.feature)&&e.node)return this.completionForCrossReference(
|
|
1119
|
+
e,n,r)}completionForCrossReference(e,n,r){const i=wn(n.feature,Nr);let s=e.node;if(i&&s){n.type&&(s={$type:n.type,$container:s,$containerProperty:n.property},Vm(this.astReflection,s));const o={reference:{$refText:""},container:s,property:i.feature};try{for(const a of this.getReferenceCandidates(o,e))r(e,this.createReferenceCompletionItem(a))}catch(a){console.error(a)}}}getReferenceCandidates(e,n){return this.scopeProvider.getScope(e).getAllElements()}createReferenceCompletionItem(e){const n=this.
|
|
1120
|
+
nodeKindProvider.getCompletionItemKind(e),r=this.getReferenceDocumentation(e);return{nodeDescription:e,kind:n,documentation:r,detail:e.type,sortText:"0"}}getReferenceDocumentation(e){if(!e.node)return;const n=this.documentationProvider.getDocumentation(e.node);if(n)return{kind:"markdown",value:n}}completionForKeyword(e,n,r){this.filterKeyword(e,n)&&r(e,{label:n.value,kind:this.getKeywordCompletionItemKind(n),detail:"Keyword",sortText:"1"})}getKeywordCompletionItemKind(e){return ge.CompletionItemKind.
|
|
1121
|
+
Keyword}filterKeyword(e,n){return new RegExp("\\p{L}","u").test(n.value)}fillCompletionItem(e,n){var r,i;let s;if(typeof n.label=="string")s=n.label;else if("node"in n){const c=this.nameProvider.getName(n.node);if(!c)return;s=c}else if("nodeDescription"in n)s=n.nodeDescription.name;else return;let o;typeof((r=n.textEdit)===null||r===void 0?void 0:r.newText)=="string"?o=n.textEdit.newText:typeof n.insertText=="string"?o=n.insertText:o=s;const a=(i=n.textEdit)!==null&&i!==void 0?i:this.buildCompletionTextEdit(
|
|
1122
|
+
e,s,o);return a?{additionalTextEdits:n.additionalTextEdits,command:n.command,commitCharacters:n.commitCharacters,data:n.data,detail:n.detail,documentation:n.documentation,filterText:n.filterText,insertText:n.insertText,insertTextFormat:n.insertTextFormat,insertTextMode:n.insertTextMode,kind:n.kind,labelDetails:n.labelDetails,preselect:n.preselect,sortText:n.sortText,tags:n.tags,textEditText:n.textEditText,textEdit:a,label:s}:void 0}buildCompletionTextEdit(e,n,r){const s=e.textDocument.getText().
|
|
1123
|
+
substring(e.tokenOffset,e.offset);if(this.fuzzyMatcher.match(s,n)){const o=e.textDocument.positionAt(e.tokenOffset),a=e.position;return{newText:r,range:{start:o,end:a}}}else return}}class r8{constructor(e){this.nameProvider=e.references.NameProvider,this.references=e.references.References,this.grammarConfig=e.parser.GrammarConfig}getDefinition(e,n,r){const i=e.parseResult.value;if(i.$cstNode){const s=i.$cstNode,o=$s(s,e.textDocument.offsetAt(n.position),this.grammarConfig.nameRegexp);if(o)return this.
|
|
1124
|
+
collectLocationLinks(o,n)}}collectLocationLinks(e,n){var r;const i=this.findLink(e);if(i)return[ge.LocationLink.create(i.targetDocument.textDocument.uri,((r=i.target.astNode.$cstNode)!==null&&r!==void 0?r:i.target).range,i.target.range,i.source.range)]}findLink(e){const n=this.references.findDeclarationNode(e);if(n?.astNode){const r=lt(n.astNode);if(n&&r)return{source:e,target:n,targetDocument:r}}}}class qT{constructor(e){this.references=e.references.References,this.nameProvider=e.references.NameProvider,
|
|
1125
|
+
this.grammarConfig=e.parser.GrammarConfig}getDocumentHighlight(e,n,r){const i=e.parseResult.value.$cstNode;if(!i)return;const s=$s(i,e.textDocument.offsetAt(n.position),this.grammarConfig.nameRegexp);if(!s)return;const o=this.references.findDeclaration(s);if(o){const a=pt.equals(lt(o).uri,e.uri),u={documentUri:e.uri,includeDeclaration:a};return this.references.findReferences(o,u).map(l=>this.createDocumentHighlight(l)).toArray()}}createDocumentHighlight(e){return ge.DocumentHighlight.create(e.segment.
|
|
1126
|
+
range)}}class i8{constructor(e){this.nameProvider=e.references.NameProvider,this.nodeKindProvider=e.shared.lsp.NodeKindProvider}getSymbols(e,n,r){return this.getSymbol(e,e.parseResult.value)}getSymbol(e,n){const r=n.$cstNode,i=this.nameProvider.getNameNode(n);if(i&&r){const s=this.nameProvider.getName(n);return[{kind:this.nodeKindProvider.getSymbolKind(n),name:s||i.text,range:r.range,selectionRange:i.range,children:this.getChildSymbols(e,n)}]}else return this.getChildSymbols(e,n)||[]}getChildSymbols(e,n){
|
|
1127
|
+
const r=[];for(const i of bu(n)){const s=this.getSymbol(e,i);r.push(...s)}if(r.length>0)return r}}class s8{constructor(e){this.workspaceManager=e.workspace.WorkspaceManager,this.documentBuilder=e.workspace.DocumentBuilder,this.workspaceLock=e.workspace.WorkspaceLock,this.serviceRegistry=e.ServiceRegistry;let n=!1;e.lsp.LanguageServer.onInitialize(r=>{var i,s;n=!!(!((s=(i=r.capabilities.workspace)===null||i===void 0?void 0:i.didChangeWatchedFiles)===null||s===void 0)&&s.dynamicRegistration)}),e.lsp.
|
|
1128
|
+
LanguageServer.onInitialized(r=>{n&&this.registerFileWatcher(e)})}registerFileWatcher(e){const n=We(e.ServiceRegistry.all).flatMap(r=>r.LanguageMetaData.fileExtensions).map(r=>r.startsWith(".")?r.substring(1):r).distinct().toArray();if(n.length>0){const r=e.lsp.Connection,i={watchers:[{globPattern:n.length===1?`**/*.${n[0]}`:`**/*.{${n.join(",")}}`}]};r?.client.register(ge.DidChangeWatchedFilesNotification.type,i)}}fireDocumentUpdate(e,n){e=e.filter(r=>this.serviceRegistry.hasServices(r)),this.workspaceManager.
|
|
1129
|
+
ready.then(()=>{this.workspaceLock.write(r=>this.documentBuilder.update(e,n,r))}).catch(r=>{console.error("Workspace initialization failed. Could not perform document update.",r)})}didChangeContent(e){this.fireDocumentUpdate([Et.parse(e.document.uri)],[])}didChangeWatchedFiles(e){const n=We(e.changes).filter(i=>i.type!==ge.FileChangeType.Deleted).distinct(i=>i.uri).map(i=>Et.parse(i.uri)).toArray(),r=We(e.changes).filter(i=>i.type===ge.FileChangeType.Deleted).distinct(i=>i.uri).map(i=>Et.parse(i.
|
|
1130
|
+
uri)).toArray();this.fireDocumentUpdate(n,r)}}class o8{constructor(e){this.commentNames=e.parser.GrammarConfig.multilineCommentRules}getFoldingRanges(e,n,r){const i=[],s=o=>i.push(o);return this.collectFolding(e,s),i}collectFolding(e,n){var r;const i=(r=e.parseResult)===null||r===void 0?void 0:r.value;if(i){if(this.shouldProcessContent(i)){const s=Or(i).iterator();let o;do if(o=s.next(),!o.done){const a=o.value;this.shouldProcess(a)&&this.collectObjectFolding(e,a,n),this.shouldProcessContent(a)||
|
|
1131
|
+
s.prune()}while(!o.done)}this.collectCommentFolding(e,i,n)}}shouldProcess(e){return!0}shouldProcessContent(e){return!0}collectObjectFolding(e,n,r){const i=n.$cstNode;if(i){const s=this.toFoldingRange(e,i);s&&r(s)}}collectCommentFolding(e,n,r){const i=n.$cstNode;if(i){for(const s of vN(i))if(this.commentNames.includes(s.tokenType.name)){const o=this.toFoldingRange(e,s,ge.FoldingRangeKind.Comment);o&&r(o)}}}toFoldingRange(e,n,r){const i=n.range,s=i.start;let o=i.end;if(!(o.line-s.line<2))return this.
|
|
1132
|
+
includeLastFoldingLine(n,r)||(o=e.textDocument.positionAt(e.textDocument.offsetAt({line:o.line,character:0})-1)),ge.FoldingRange.create(s.line,o.line,s.character,o.character,r)}includeLastFoldingLine(e,n){if(n===ge.FoldingRangeKind.Comment)return!1;const r=e.text,i=r.charAt(r.length-1);return!(i==="}"||i===")"||i==="]")}}class a8{match(e,n){if(e.length===0)return!0;let r=!1,i,s=0;const o=n.length;for(let a=0;a<o;a++){const u=n.charCodeAt(a),c=e.charCodeAt(s);if((u===c||this.toUpperCharCode(u)===
|
|
1133
|
+
this.toUpperCharCode(c))&&(r||(r=i===void 0||this.isWordTransition(i,u)),r&&s++,s===e.length))return!0;i=u}return!1}isWordTransition(e,n){return GT<=e&&e<=UT&&u8<=n&&n<=c8||e===WT&&n!==WT}toUpperCharCode(e){return GT<=e&&e<=UT?e-32:e}}const GT=97,UT=122,u8=65,c8=90,WT=95;class zT{constructor(e){this.references=e.references.References,this.grammarConfig=e.parser.GrammarConfig}getHoverContent(e,n){var r,i;const s=(i=(r=e.parseResult)===null||r===void 0?void 0:r.value)===null||i===void 0?void 0:i.$cstNode;
|
|
1134
|
+
if(s){const o=e.textDocument.offsetAt(n.position),a=$s(s,o,this.grammarConfig.nameRegexp);if(a&&a.offset+a.length>o){const u=this.references.findDeclaration(a);if(u)return this.getAstNodeHoverContent(u)}}}}class l8 extends zT{constructor(e){super(e),this.documentationProvider=e.documentation.DocumentationProvider}getAstNodeHoverContent(e){const n=this.documentationProvider.getDocumentation(e);if(n)return{contents:{kind:"markdown",value:n}}}}var Dp=Lt();const d8={[ge.SemanticTokenTypes.class]:0,[ge.
|
|
1135
|
+
SemanticTokenTypes.comment]:1,[ge.SemanticTokenTypes.enum]:2,[ge.SemanticTokenTypes.enumMember]:3,[ge.SemanticTokenTypes.event]:4,[ge.SemanticTokenTypes.function]:5,[ge.SemanticTokenTypes.interface]:6,[ge.SemanticTokenTypes.keyword]:7,[ge.SemanticTokenTypes.macro]:8,[ge.SemanticTokenTypes.method]:9,[ge.SemanticTokenTypes.modifier]:10,[ge.SemanticTokenTypes.namespace]:11,[ge.SemanticTokenTypes.number]:12,[ge.SemanticTokenTypes.operator]:13,[ge.SemanticTokenTypes.parameter]:14,[ge.SemanticTokenTypes.
|
|
1136
|
+
property]:15,[ge.SemanticTokenTypes.regexp]:16,[ge.SemanticTokenTypes.string]:17,[ge.SemanticTokenTypes.struct]:18,[ge.SemanticTokenTypes.type]:19,[ge.SemanticTokenTypes.typeParameter]:20,[ge.SemanticTokenTypes.variable]:21,[ge.SemanticTokenTypes.decorator]:22},f8={[ge.SemanticTokenModifiers.abstract]:1,[ge.SemanticTokenModifiers.async]:2,[ge.SemanticTokenModifiers.declaration]:4,[ge.SemanticTokenModifiers.defaultLibrary]:8,[ge.SemanticTokenModifiers.definition]:16,[ge.SemanticTokenModifiers.deprecated]:32,
|
|
1137
|
+
[ge.SemanticTokenModifiers.documentation]:64,[ge.SemanticTokenModifiers.modification]:128,[ge.SemanticTokenModifiers.readonly]:256,[ge.SemanticTokenModifiers.static]:512};function p8(t){const e=[],n=[];let r=!0,i=!0,s=!0;for(const o of t)o&&(o.legend.tokenTypes.forEach((a,u)=>{const c=e[u];if(c&&c!==a)throw new Error(`Cannot merge '${c}' and '${a}' token types. They use the same index ${u}.`);e[u]=a}),o.legend.tokenModifiers.forEach((a,u)=>{const c=n[u];if(c&&c!==a)throw new Error(`Cannot merge \
|
|
1138
|
+
'${c}' and '${a}' token modifier. They use the same index ${u}.`);n[u]=a}),o.full?typeof o.full=="object"&&!o.full.delta&&(i=!1):r=!1,o.range||(s=!1));return{legend:{tokenTypes:e,tokenModifiers:n},full:r&&{delta:i},range:s}}class h8 extends ge.SemanticTokensBuilder{constructor(){super(...arguments),this._tokens=[]}push(e,n,r,i,s){this._tokens.push({line:e,char:n,length:r,tokenType:i,tokenModifiers:s})}build(){return this.applyTokens(),super.build()}buildEdits(){return this.applyTokens(),super.buildEdits()}flush(){
|
|
1139
|
+
this.previousResult(this.id)}applyTokens(){for(const e of this._tokens.sort(this.compareTokens))super.push(e.line,e.char,e.length,e.tokenType,e.tokenModifiers);this._tokens=[]}compareTokens(e,n){return e.line===n.line?e.char-n.char:e.line-n.line}}class m8{constructor(e){this.tokensBuilders=new Map,e.shared.workspace.TextDocuments.onDidClose(n=>{this.tokensBuilders.delete(n.document.uri)}),e.shared.lsp.LanguageServer.onInitialize(n=>{var r;this.initialize((r=n.capabilities.textDocument)===null||r===
|
|
1140
|
+
void 0?void 0:r.semanticTokens)})}initialize(e){this.clientCapabilities=e}get tokenTypes(){return d8}get tokenModifiers(){return f8}get semanticTokensOptions(){return{legend:{tokenTypes:Object.keys(this.tokenTypes),tokenModifiers:Object.keys(this.tokenModifiers)},full:{delta:!0},range:!0}}async semanticHighlight(e,n,r=ft.CancellationToken.None){return this.currentRange=void 0,this.currentDocument=e,this.currentTokensBuilder=this.getDocumentTokensBuilder(e),this.currentTokensBuilder.flush(),await this.
|
|
1141
|
+
computeHighlighting(e,this.createAcceptor(),r),this.currentTokensBuilder.build()}async semanticHighlightRange(e,n,r=ft.CancellationToken.None){return this.currentRange=n.range,this.currentDocument=e,this.currentTokensBuilder=this.getDocumentTokensBuilder(e),this.currentTokensBuilder.flush(),await this.computeHighlighting(e,this.createAcceptor(),r),this.currentTokensBuilder.build()}async semanticHighlightDelta(e,n,r=ft.CancellationToken.None){return this.currentRange=void 0,this.currentDocument=e,
|
|
1142
|
+
this.currentTokensBuilder=this.getDocumentTokensBuilder(e),this.currentTokensBuilder.previousResult(n.previousResultId),await this.computeHighlighting(e,this.createAcceptor(),r),this.currentTokensBuilder.buildEdits()}createAcceptor(){return n=>{"line"in n?this.highlightToken({range:{start:{line:n.line,character:n.char},end:{line:n.line,character:n.char+n.length}},type:n.type,modifier:n.modifier}):"range"in n?this.highlightToken(n):"keyword"in n?this.highlightKeyword(n):"property"in n?this.highlightProperty(
|
|
1143
|
+
n):this.highlightNode({node:n.cst,type:n.type,modifier:n.modifier})}}getDocumentTokensBuilder(e){const n=this.tokensBuilders.get(e.uri.toString());if(n)return n;const r=new h8;return this.tokensBuilders.set(e.uri.toString(),r),r}async computeHighlighting(e,n,r){const i=e.parseResult.value,s=Zr(i,{range:this.currentRange}).iterator();let o;do if(o=s.next(),!o.done){await jt(r);const a=o.value;this.highlightElement(a,n)==="prune"&&s.prune()}while(!o.done)}highlightToken(e){var n;const{range:r,type:i}=e;
|
|
1144
|
+
let s=e.modifier;if(this.currentRange&&!y0(r,this.currentRange)||!this.currentDocument||!this.currentTokensBuilder)return;const o=this.tokenTypes[i];let a=0;if(s!==void 0){typeof s=="string"&&(s=[s]);for(const l of s){const f=this.tokenModifiers[l];a|=f}}const u=r.start.line,c=r.end.line;if(u===c){const l=r.start.character,f=r.end.character-l;this.currentTokensBuilder.push(u,l,f,o,a)}else if(!((n=this.clientCapabilities)===null||n===void 0)&&n.multilineTokenSupport){const l=r.start.character,f=this.
|
|
1145
|
+
currentDocument.textDocument.offsetAt(r.start),d=this.currentDocument.textDocument.offsetAt(r.end);this.currentTokensBuilder.push(u,l,d-f,o,a)}else{const l=r.start;let f=this.currentDocument.textDocument.offsetAt({line:u+1,character:0});this.currentTokensBuilder.push(l.line,l.character,f-l.character-1,o,a);for(let d=u+1;d<c;d++){const p=f;f=this.currentDocument.textDocument.offsetAt({line:d+1,character:0}),this.currentTokensBuilder.push(d,0,f-p-1,o,a)}this.currentTokensBuilder.push(c,0,r.end.character,
|
|
1146
|
+
o,a)}}highlightProperty(e){const n=[];if(typeof e.index=="number"){const s=dn(e.node.$cstNode,e.property,e.index);s&&n.push(s)}else n.push(...Io(e.node.$cstNode,e.property));const{type:r,modifier:i}=e;for(const s of n)this.highlightNode({node:s,type:r,modifier:i})}highlightKeyword(e){const{node:n,keyword:r,type:i,index:s,modifier:o}=e,a=[];if(typeof s=="number"){const u=Du(n.$cstNode,r,s);u&&a.push(u)}else a.push(...tg(n.$cstNode,r));for(const u of a)this.highlightNode({node:u,type:i,modifier:o})}highlightNode(e){
|
|
1147
|
+
const{node:n,type:r,modifier:i}=e,s=n.range;this.highlightToken({range:s,type:r,modifier:i})}}var HT;(function(t){function e(r,i,s){const o=new Map;Object.entries(i).forEach(([c,l])=>o.set(l,c));let a=0,u=0;return n(r.data,5).map(c=>{a+=c[0],c[0]!==0&&(u=0),u+=c[1];const l=c[2];return{offset:s.textDocument.offsetAt({line:a,character:u}),tokenType:o.get(c[3]),tokenModifiers:c[4],text:s.textDocument.getText({start:{line:a,character:u},end:{line:a,character:u+l}})}})}t.decode=e;function n(r,i){const s=[];
|
|
1148
|
+
for(let o=0;o<r.length;o+=i){const a=r.slice(o,o+i);s.push(a)}return s}})(HT||(HT={}));function g8(t){const e=[],n=[];t.forEach(i=>{i?.triggerCharacters&&e.push(...i.triggerCharacters),i?.retriggerCharacters&&n.push(...i.retriggerCharacters)});const r={triggerCharacters:e.length>0?Array.from(new Set(e)).sort():void 0,retriggerCharacters:n.length>0?Array.from(new Set(n)).sort():void 0};return r.triggerCharacters?r:void 0}class y8{constructor(e){this.onInitializeEmitter=new Dp.Emitter,this.onInitializedEmitter=
|
|
1149
|
+
new Dp.Emitter,this.services=e}get onInitialize(){return this.onInitializeEmitter.event}get onInitialized(){return this.onInitializedEmitter.event}async initialize(e){return this.eagerLoadServices(),this.fireInitializeOnDefaultServices(e),this.onInitializeEmitter.fire(e),this.onInitializeEmitter.dispose(),this.buildInitializeResult(e)}eagerLoadServices(){Ny(this.services),this.services.ServiceRegistry.all.forEach(e=>Ny(e))}hasService(e){return this.services.ServiceRegistry.all.some(r=>e(r)!==void 0)}buildInitializeResult(e){
|
|
1150
|
+
var n,r,i,s;const o=this.services.lsp.DocumentUpdateHandler,a=(n=this.services.lsp.FileOperationHandler)===null||n===void 0?void 0:n.fileOperationOptions,u=this.services.ServiceRegistry.all,c=this.hasService(H=>{var C;return(C=H.lsp)===null||C===void 0?void 0:C.Formatter}),l=u.map(H=>{var C,ne;return(ne=(C=H.lsp)===null||C===void 0?void 0:C.Formatter)===null||ne===void 0?void 0:ne.formatOnTypeOptions}).find(H=>!!H),f=this.hasService(H=>{var C;return(C=H.lsp)===null||C===void 0?void 0:C.CodeActionProvider}),
|
|
1151
|
+
d=this.hasService(H=>{var C;return(C=H.lsp)===null||C===void 0?void 0:C.SemanticTokenProvider}),p=p8(u.map(H=>{var C,ne;return(ne=(C=H.lsp)===null||C===void 0?void 0:C.SemanticTokenProvider)===null||ne===void 0?void 0:ne.semanticTokensOptions})),h=(i=(r=this.services.lsp)===null||r===void 0?void 0:r.ExecuteCommandHandler)===null||i===void 0?void 0:i.commands,v=this.hasService(H=>{var C;return(C=H.lsp)===null||C===void 0?void 0:C.DocumentLinkProvider}),b=g8(u.map(H=>{var C,ne;return(ne=(C=H.lsp)===
|
|
1152
|
+
null||C===void 0?void 0:C.SignatureHelp)===null||ne===void 0?void 0:ne.signatureHelpOptions})),y=this.hasService(H=>{var C;return(C=H.lsp)===null||C===void 0?void 0:C.TypeProvider}),E=this.hasService(H=>{var C;return(C=H.lsp)===null||C===void 0?void 0:C.ImplementationProvider}),R=this.hasService(H=>{var C;return(C=H.lsp)===null||C===void 0?void 0:C.CompletionProvider}),A=n8(u.map(H=>{var C,ne;return(ne=(C=H.lsp)===null||C===void 0?void 0:C.CompletionProvider)===null||ne===void 0?void 0:ne.completionOptions})),
|
|
1153
|
+
N=this.hasService(H=>{var C;return(C=H.lsp)===null||C===void 0?void 0:C.ReferencesProvider}),K=this.hasService(H=>{var C;return(C=H.lsp)===null||C===void 0?void 0:C.DocumentSymbolProvider}),J=this.hasService(H=>{var C;return(C=H.lsp)===null||C===void 0?void 0:C.DefinitionProvider}),se=this.hasService(H=>{var C;return(C=H.lsp)===null||C===void 0?void 0:C.DocumentHighlightProvider}),ie=this.hasService(H=>{var C;return(C=H.lsp)===null||C===void 0?void 0:C.FoldingRangeProvider}),we=this.hasService(H=>{
|
|
1154
|
+
var C;return(C=H.lsp)===null||C===void 0?void 0:C.HoverProvider}),B=this.hasService(H=>{var C;return(C=H.lsp)===null||C===void 0?void 0:C.RenameProvider}),T=this.hasService(H=>{var C;return(C=H.lsp)===null||C===void 0?void 0:C.CallHierarchyProvider}),D=this.hasService(H=>{var C;return(C=H.lsp)===null||C===void 0?void 0:C.TypeHierarchyProvider}),M=this.hasService(H=>{var C;return(C=H.lsp)===null||C===void 0?void 0:C.CodeLensProvider}),S=this.hasService(H=>{var C;return(C=H.lsp)===null||C===void 0?
|
|
1155
|
+
void 0:C.DeclarationProvider}),P=this.hasService(H=>{var C;return(C=H.lsp)===null||C===void 0?void 0:C.InlayHintProvider}),O=(s=this.services.lsp)===null||s===void 0?void 0:s.WorkspaceSymbolProvider;return{capabilities:{workspace:{workspaceFolders:{supported:!0},fileOperations:a},executeCommandProvider:h&&{commands:h},textDocumentSync:{change:Dp.TextDocumentSyncKind.Incremental,openClose:!0,save:!!o.didSaveDocument,willSave:!!o.willSaveDocument,willSaveWaitUntil:!!o.willSaveDocumentWaitUntil},completionProvider:R?
|
|
1156
|
+
A:void 0,referencesProvider:N,documentSymbolProvider:K,definitionProvider:J,typeDefinitionProvider:y,documentHighlightProvider:se,codeActionProvider:f,documentFormattingProvider:c,documentRangeFormattingProvider:c,documentOnTypeFormattingProvider:l,foldingRangeProvider:ie,hoverProvider:we,renameProvider:B?{prepareProvider:!0}:void 0,semanticTokensProvider:d?p:void 0,signatureHelpProvider:b,implementationProvider:E,callHierarchyProvider:T?{}:void 0,typeHierarchyProvider:D?{}:void 0,documentLinkProvider:v?
|
|
1157
|
+
{resolveProvider:!1}:void 0,codeLensProvider:M?{resolveProvider:!1}:void 0,declarationProvider:S,inlayHintProvider:P?{resolveProvider:!1}:void 0,workspaceSymbolProvider:O?{resolveProvider:!!O.resolveSymbol}:void 0}}}initialized(e){this.fireInitializedOnDefaultServices(e),this.onInitializedEmitter.fire(e),this.onInitializedEmitter.dispose()}fireInitializeOnDefaultServices(e){this.services.workspace.ConfigurationProvider.initialize(e),this.services.workspace.WorkspaceManager.initialize(e)}fireInitializedOnDefaultServices(e){
|
|
1158
|
+
const n=this.services.lsp.Connection,r=n?Object.assign(Object.assign({},e),{register:i=>n.client.register(Dp.DidChangeConfigurationNotification.type,i),fetchConfiguration:i=>n.workspace.getConfiguration(i)}):e;this.services.workspace.ConfigurationProvider.initialized(r).catch(i=>console.error("Error in ConfigurationProvider initialization:",i)),this.services.workspace.WorkspaceManager.initialized(e).catch(i=>console.error("Error in WorkspaceManager initialization:",i))}}class v8{getSymbolKind(e){
|
|
1159
|
+
return ge.SymbolKind.Field}getCompletionItemKind(e){return ge.CompletionItemKind.Reference}}class w8{constructor(e){this.nameProvider=e.references.NameProvider,this.references=e.references.References,this.grammarConfig=e.parser.GrammarConfig}findReferences(e,n,r){const i=e.parseResult.value.$cstNode;if(!i)return[];const s=$s(i,e.textDocument.offsetAt(n.position),this.grammarConfig.nameRegexp);return s?this.getReferences(s,n,e):[]}getReferences(e,n,r){const i=[],s=this.references.findDeclaration(
|
|
1160
|
+
e);if(s){const o={includeDeclaration:n.context.includeDeclaration};this.references.findReferences(s,o).forEach(a=>{i.push(ge.Location.create(a.sourceUri.toString(),a.segment.range))})}return i}}class b8{constructor(e){this.references=e.references.References,this.nameProvider=e.references.NameProvider,this.grammarConfig=e.parser.GrammarConfig}async rename(e,n,r){const i={},s=e.parseResult.value.$cstNode;if(!s)return;const o=e.textDocument.offsetAt(n.position),a=$s(s,o,this.grammarConfig.nameRegexp);
|
|
1161
|
+
if(!a)return;const u=this.references.findDeclaration(a);if(!u)return;const c={onlyLocal:!1,includeDeclaration:!0};return this.references.findReferences(u,c).forEach(f=>{const d=Fn.replace(f.segment.range,n.newName),p=f.sourceUri.toString();i[p]?i[p].push(d):i[p]=[d]}),{changes:i}}prepareRename(e,n,r){return this.renameNodeRange(e,n.position)}renameNodeRange(e,n){const r=e.parseResult.value.$cstNode,i=e.textDocument.offsetAt(n);if(r&&i){const s=$s(r,i,this.grammarConfig.nameRegexp);if(!s)return;if(this.
|
|
1162
|
+
references.findDeclaration(s)||this.isNameNode(s))return s.range}}isNameNode(e){return e?.astNode&&fp(e.astNode)&&e===this.nameProvider.getNameNode(e.astNode)}}class VT{constructor(e){this.indexManager=e.workspace.IndexManager,this.nodeKindProvider=e.lsp.NodeKindProvider,this.fuzzyMatcher=e.lsp.FuzzyMatcher}async getSymbols(e,n=ft.CancellationToken.None){const r=[],i=e.query.toLowerCase();for(const s of this.indexManager.allElements())if(await jt(n),this.fuzzyMatcher.match(i,s.name)){const o=this.
|
|
1163
|
+
getWorkspaceSymbol(s);o&&r.push(o)}return r}getWorkspaceSymbol(e){const n=e.nameSegment;if(n)return{kind:this.nodeKindProvider.getSymbolKind(e),name:e.name,location:{range:n.range,uri:e.documentUri.toString()}}}}class KT{constructor(e){this._configuration=e,this._syncedDocuments=new Map,this._onDidChangeContent=new ge.Emitter,this._onDidOpen=new ge.Emitter,this._onDidClose=new ge.Emitter,this._onDidSave=new ge.Emitter,this._onWillSave=new ge.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){
|
|
1164
|
+
return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(e){this._willSaveWaitUntil=e}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(e){return this._syncedDocuments.get(pt.normalize(e))}set(e){const n=pt.normalize(e.uri);let r=!0;this._syncedDocuments.has(n)&&(r=!1),this._syncedDocuments.set(n,e);const i=Object.freeze({document:e});return this._onDidOpen.fire(i),this._onDidChangeContent.fire(i),r}delete(e){
|
|
1165
|
+
const n=pt.normalize(typeof e=="object"&&"uri"in e?e.uri:e),r=this._syncedDocuments.get(n);r!==void 0&&(this._syncedDocuments.delete(n),this._onDidClose.fire(Object.freeze({document:r})))}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(e){e.__textDocumentSync=ge.TextDocumentSyncKind.Incremental;const n=[];return n.push(e.onDidOpenTextDocument(r=>{const i=r.textDocument,s=pt.normalize(i.uri),o=this._configuration.create(s,i.languageId,
|
|
1166
|
+
i.version,i.text);this._syncedDocuments.set(s,o);const a=Object.freeze({document:o});this._onDidOpen.fire(a),this._onDidChangeContent.fire(a)})),n.push(e.onDidChangeTextDocument(r=>{const i=r.textDocument,s=r.contentChanges;if(s.length===0)return;const{version:o}=i;if(o==null)throw new Error(`Received document change event for ${i.uri} without valid version identifier`);const a=pt.normalize(i.uri);let u=this._syncedDocuments.get(a);u!==void 0&&(u=this._configuration.update(u,s,o),this._syncedDocuments.
|
|
1167
|
+
set(a,u),this._onDidChangeContent.fire(Object.freeze({document:u})))})),n.push(e.onDidCloseTextDocument(r=>{const i=pt.normalize(r.textDocument.uri),s=this._syncedDocuments.get(i);s!==void 0&&(this._syncedDocuments.delete(i),this._onDidClose.fire(Object.freeze({document:s})))})),n.push(e.onWillSaveTextDocument(r=>{const i=this._syncedDocuments.get(pt.normalize(r.textDocument.uri));i!==void 0&&this._onWillSave.fire(Object.freeze({document:i,reason:r.reason}))})),n.push(e.onWillSaveTextDocumentWaitUntil(
|
|
1168
|
+
(r,i)=>{const s=this._syncedDocuments.get(pt.normalize(r.textDocument.uri));return s!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:s,reason:r.reason}),i):[]})),n.push(e.onDidSaveTextDocument(r=>{const i=this._syncedDocuments.get(pt.normalize(r.textDocument.uri));i!==void 0&&this._onDidSave.fire(Object.freeze({document:i}))})),ge.Disposable.create(()=>{n.forEach(r=>r.dispose())})}}class E8{constructor(e){this.notebookDocuments=new Map,this.notebookCellMap=new Map,
|
|
1169
|
+
this._onDidOpen=new ge.Emitter,this._onDidSave=new ge.Emitter,this._onDidChange=new ge.Emitter,this._onDidClose=new ge.Emitter,"listen"in e?this._cellTextDocuments=e:this._cellTextDocuments=new KT(e)}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(e){return this._cellTextDocuments.get(e.document)}getNotebookDocument(e){return this.notebookDocuments.get(pt.normalize(e))}getNotebookCell(e){const n=this.notebookCellMap.get(pt.normalize(e));return n&&n[0]}findNotebookDocumentForCell(e){
|
|
1170
|
+
const n=typeof e=="string"||"scheme"in e?e:e.document,r=this.notebookCellMap.get(pt.normalize(n));return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(e){const n=new xa,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(e.notebooks.synchronization.onDidOpenNotebookDocument(i=>{const s=pt.normalize(i.notebookDocument.uri);this.notebookDocuments.
|
|
1171
|
+
set(s,i.notebookDocument);for(const o of i.cellTextDocuments)n.openTextDocument({textDocument:o});this.updateCellMap(i.notebookDocument),this._onDidOpen.fire(i.notebookDocument)})),r.push(e.notebooks.synchronization.onDidChangeNotebookDocument(i=>{const s=pt.normalize(i.notebookDocument.uri),o=this.notebookDocuments.get(s);if(o===void 0)return;o.version=i.notebookDocument.version;const a=o.metadata;let u=!1;const c=i.change;c.metadata!==void 0&&(u=!0,o.metadata=c.metadata);const l=[],f=[],d=[],p=[];
|
|
1172
|
+
if(c.cells!==void 0){const E=c.cells;if(E.structure!==void 0){const R=E.structure.array;if(o.cells.splice(R.start,R.deleteCount,...R.cells!==void 0?R.cells:[]),E.structure.didOpen!==void 0)for(const A of E.structure.didOpen)n.openTextDocument({textDocument:A}),l.push(A.uri);if(E.structure.didClose)for(const A of E.structure.didClose)n.closeTextDocument({textDocument:A}),f.push(A.uri)}if(E.data!==void 0){const R=new Map(E.data.map(A=>[A.document,A]));for(let A=0;A<=o.cells.length;A++){const N=R.get(
|
|
1173
|
+
o.cells[A].document);if(N!==void 0){const K=o.cells.splice(A,1,N);if(d.push({old:K[0],new:N}),R.delete(N.document),R.size===0)break}}}if(E.textContent!==void 0)for(const R of E.textContent)n.changeTextDocument({textDocument:R.document,contentChanges:R.changes}),p.push(R.document.uri)}this.updateCellMap(o);const h={notebookDocument:o};u&&(h.metadata={old:a,new:o.metadata});const v=[];for(const E of l)v.push(this.getNotebookCell(E));const b=[];for(const E of f)b.push(this.getNotebookCell(E));const y=[];
|
|
1174
|
+
for(const E of p)y.push(this.getNotebookCell(E));(v.length>0||b.length>0||d.length>0||y.length>0)&&(h.cells={added:v,removed:b,changed:{data:d,textContent:y}}),(h.metadata!==void 0||h.cells!==void 0)&&this._onDidChange.fire(h)})),r.push(e.notebooks.synchronization.onDidSaveNotebookDocument(i=>{const s=this.getNotebookDocument(i.notebookDocument.uri);s!==void 0&&this._onDidSave.fire(s)})),r.push(e.notebooks.synchronization.onDidCloseNotebookDocument(i=>{const s=pt.normalize(i.notebookDocument.uri),
|
|
1175
|
+
o=this.notebookDocuments.get(s);if(o!==void 0){this._onDidClose.fire(o);for(const a of i.cellTextDocuments)n.closeTextDocument({textDocument:a});this.notebookDocuments.delete(s);for(const a of o.cells)this.notebookCellMap.delete(a.document)}})),ge.Disposable.create(()=>{r.forEach(i=>i.dispose())})}updateCellMap(e){for(const n of e.cells)this.notebookCellMap.set(n.document,[n,e])}}class xa{onDidOpenTextDocument(e){return this.openHandler=e,ge.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(e){
|
|
1176
|
+
this.openHandler&&this.openHandler(e)}onDidChangeTextDocument(e){return this.changeHandler=e,ge.Disposable.create(()=>{this.changeHandler=e})}changeTextDocument(e){this.changeHandler&&this.changeHandler(e)}onDidCloseTextDocument(e){return this.closeHandler=e,ge.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(e){this.closeHandler&&this.closeHandler(e)}onWillSaveTextDocument(){return xa.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return xa.NULL_DISPOSE}onDidSaveTextDocument(){
|
|
1177
|
+
return xa.NULL_DISPOSE}}xa.NULL_DISPOSE=Object.freeze({dispose:()=>{}});function $8(t){return mp.merge(JR(t),D8(t))}function D8(t){return{lsp:{CompletionProvider:e=>new jT(e),DocumentSymbolProvider:e=>new i8(e),HoverProvider:e=>new l8(e),FoldingRangeProvider:e=>new o8(e),ReferencesProvider:e=>new w8(e),DefinitionProvider:e=>new r8(e),DocumentHighlightProvider:e=>new qT(e),RenameProvider:e=>new b8(e)},shared:()=>t.shared}}function R8(t){return mp.merge(QR(t),k8(t))}function k8(t){return{lsp:{Connection:()=>t.
|
|
1178
|
+
connection,LanguageServer:e=>new y8(e),DocumentUpdateHandler:e=>new s8(e),WorkspaceSymbolProvider:e=>new VT(e),NodeKindProvider:()=>new v8,FuzzyMatcher:()=>new a8},workspace:{TextDocuments:()=>new KT(dp),NotebookDocuments:e=>new E8(e.workspace.TextDocuments)}}}class T8{constructor(){this.collector=()=>{}}getNodeFormatter(e){return new C8(e,this.collector)}formatDocument(e,n){const r=e.parseResult;return r.lexerErrors.length===0&&r.parserErrors.length===0?this.doDocumentFormat(e,n.options):[]}isFormatRangeErrorFree(e,n){
|
|
1179
|
+
const r=e.parseResult;return r.lexerErrors.length||r.parserErrors.length?Math.min(...r.lexerErrors.map(s=>{var o;return(o=s.line)!==null&&o!==void 0?o:Number.MAX_VALUE}),...r.parserErrors.map(s=>{var o;return(o=s.token.startLine)!==null&&o!==void 0?o:Number.MAX_VALUE}))>n.end.line:!0}formatDocumentRange(e,n){return this.isFormatRangeErrorFree(e,n.range)?this.doDocumentFormat(e,n.options,n.range):[]}formatDocumentOnType(e,n){const r={start:{character:0,line:n.position.line},end:n.position};return this.
|
|
1180
|
+
isFormatRangeErrorFree(e,r)?this.doDocumentFormat(e,n.options,r):[]}get formatOnTypeOptions(){}doDocumentFormat(e,n,r){const i=new Map,s=(a,u,c)=>{var l,f;const d=this.nodeModeToKey(a,u),p=i.get(d),h=(l=c.options.priority)!==null&&l!==void 0?l:0,v=(f=p?.options.priority)!==null&&f!==void 0?f:0;(!p||v<=h)&&i.set(d,c)};this.collector=s,this.iterateAstFormatting(e,r);const o=this.iterateCstFormatting(e,i,n,r);return this.avoidOverlappingEdits(e.textDocument,o)}avoidOverlappingEdits(e,n){const r=[];
|
|
1181
|
+
for(const i of n){let s=r[r.length-1];for(;s;){const o=e.offsetAt(i.range.start),a=e.offsetAt(s.range.end);if(o<a)r.pop(),s=r[r.length-1];else break}r.push(i)}return r.filter(i=>this.isNecessary(i,e))}iterateAstFormatting(e,n){const r=e.parseResult.value;this.format(r);const i=Or(r).iterator();let s;do if(s=i.next(),!s.done){const o=s.value;this.insideRange(o.$cstNode.range,n)?this.format(o):i.prune()}while(!s.done)}nodeModeToKey(e,n){return`${e.offset}:${e.end}:${n}`}insideRange(e,n){return!n||
|
|
1182
|
+
e.start.line<=n.start.line&&e.end.line>=n.end.line||e.start.line>=n.start.line&&e.end.line<=n.end.line||e.start.line<=n.end.line&&e.end.line>=n.end.line}isNecessary(e,n){return e.newText!==n.getText(e.range).replace(/\r/g,"")}iterateCstFormatting(e,n,r,i){const s={indentation:0,options:r,document:e.textDocument},o=[],u=this.iterateCstTree(e,s).iterator();let c,l;do if(l=u.next(),!l.done){const f=l.value,d=bs(f),p=this.nodeModeToKey(f,"prepend"),h=n.get(p);if(n.delete(p),h){const y=this.createTextEdit(
|
|
1183
|
+
c,f,h,s);for(const E of y)E&&this.insideRange(E.range,i)&&o.push(E)}const v=this.nodeModeToKey(f,"append"),b=n.get(v);if(n.delete(v),b){const y=$N(f);if(y){const E=this.createTextEdit(f,y,b,s);for(const R of E)R&&this.insideRange(R.range,i)&&o.push(R)}}if(!h&&f.hidden){const y=this.createHiddenTextEdits(c,f,void 0,s);for(const E of y)E&&this.insideRange(E.range,i)&&o.push(E)}d&&(c=f)}while(!l.done);return o}createHiddenTextEdits(e,n,r,i){var s;const o=n.range.start.line;if(e&&e.range.end.line===
|
|
1184
|
+
o)return[];const a=[],u={start:{character:0,line:o},end:n.range.start},c=i.document.getText(u),l=this.findFittingMove(u,(s=r?.moves)!==null&&s!==void 0?s:[],i),f=this.getExistingIndentationCharacterCount(c,i),p=this.getIndentationCharacterCount(i,l)-f;if(p===0)return[];let h="";p>0&&(h=(i.options.insertSpaces?" ":" ").repeat(p));const v=n.text.split(`
|
|
1185
|
+
`);v[0]=c+v[0];for(let b=0;b<v.length;b++){const y=o+b,E={character:0,line:y};if(p>0)a.push({newText:h,range:{start:E,end:E}});else{const R=v[b];let A=0;for(;A<R.length;A++){const N=R.charAt(A);if(N!==" "&&N!==" ")break}a.push({newText:"",range:{start:E,end:{line:y,character:Math.min(A,Math.abs(p))}}})}}return a}getExistingIndentationCharacterCount(e,n){const r=" ".repeat(n.options.tabSize);return(n.options.insertSpaces?e.replaceAll(" ",r):e.replaceAll(r," ")).length}getIndentationCharacterCount(e,n){
|
|
1186
|
+
let r=e.indentation;return n&&n.tabs&&(r+=n.tabs),(e.options.insertSpaces?e.options.tabSize:1)*r}createTextEdit(e,n,r,i){var s;if(n.hidden)return this.createHiddenTextEdits(e,n,r,i);if(e&&(e.range.end.line>n.range.start.line||e.range.end.line===n.range.start.line&&e.range.end.character>n.range.start.character))return[];const o={start:(s=e?.range.end)!==null&&s!==void 0?s:{character:0,line:0},end:n.range.start},a=this.findFittingMove(o,r.moves,i);if(!a)return[];const u=a.characters,c=a.lines,l=a.
|
|
1187
|
+
tabs,f=i.indentation;i.indentation+=l??0;const d=[];return u!==void 0?e?.hidden||d.push(this.createSpaceTextEdit(o,u,r.options)):c!==void 0?d.push(this.createLineTextEdit(o,c,i,r.options)):l!==void 0&&d.push(this.createTabTextEdit(o,!!e,i)),bs(n)&&(i.indentation=f),d}createSpaceTextEdit(e,n,r){if(e.start.line===e.end.line){const s=e.end.character-e.start.character;n=this.fitIntoOptions(n,s,r)}return{newText:" ".repeat(n),range:e}}createLineTextEdit(e,n,r,i){const s=e.end.line-e.start.line;n=this.
|
|
1188
|
+
fitIntoOptions(n,s,i);const a=(r.options.insertSpaces?" ".repeat(r.options.tabSize):" ").repeat(r.indentation);return{newText:`${`
|
|
1189
|
+
`.repeat(n)}${a}`,range:e}}createTabTextEdit(e,n,r){const s=(r.options.insertSpaces?" ".repeat(r.options.tabSize):" ").repeat(r.indentation),o=n?1:0,a=Math.max(e.end.line-e.start.line,o);return{newText:`${`
|
|
1190
|
+
`.repeat(a)}${s}`,range:e}}fitIntoOptions(e,n,r){return r.allowMore?e=Math.max(n,e):r.allowLess&&(e=Math.min(n,e)),e}findFittingMove(e,n,r){if(n.length===0)return;if(n.length===1)return n[0];const i=e.end.line-e.start.line;for(const s of n){if(s.lines!==void 0&&i<=s.lines)return s;if(s.lines===void 0&&i===0)return s}return n[n.length-1]}iterateCstTree(e,n){const i=e.parseResult.value.$cstNode;return i?new Po(i,s=>this.iterateCst(s,n)):Es}iterateCst(e,n){if(!Bi(e))return Es;const r=n.indentation;
|
|
1191
|
+
return new Zt(()=>({index:0}),i=>i.index<e.content.length?{done:!1,value:e.content[i.index++]}:(n.indentation=r,Pn))}}class C8{constructor(e,n){this.astNode=e,this.collector=n}node(e){return new Sr(e.$cstNode?[e.$cstNode]:[],this.collector)}nodes(...e){const n=[];for(const r of e)r.$cstNode&&n.push(r.$cstNode);return new Sr(n,this.collector)}property(e,n){const r=dn(this.astNode.$cstNode,e,n);return new Sr(r?[r]:[],this.collector)}properties(...e){const n=[];for(const r of e){const i=Io(this.astNode.
|
|
1192
|
+
$cstNode,r);n.push(...i)}return new Sr(n,this.collector)}keyword(e,n){const r=Du(this.astNode.$cstNode,e,n);return new Sr(r?[r]:[],this.collector)}keywords(...e){const n=[];for(const r of e){const i=tg(this.astNode.$cstNode,r);n.push(...i)}return new Sr(n,this.collector)}cst(e){return new Sr([...e],this.collector)}interior(e,n){const r=e.nodes,i=n.nodes;if(r.length!==1||i.length!==1)return new Sr([],this.collector);let s=r[0],o=i[0];if(s.offset>o.offset){const a=s;s=o,o=a}return new Sr(DN(s,o),this.
|
|
1193
|
+
collector)}}class Sr{constructor(e,n){this.nodes=e,this.collector=n}prepend(e){for(const n of this.nodes)this.collector(n,"prepend",e);return this}append(e){for(const n of this.nodes)this.collector(n,"append",e);return this}surround(e){for(const n of this.nodes)this.collector(n,"prepend",e),this.collector(n,"append",e);return this}slice(e,n){return new Sr(this.nodes.slice(e,n),this.collector)}}var Xi;(function(t){function e(...l){return{options:{},moves:l.flatMap(f=>f.moves).sort(c)}}t.fit=e;function n(l){
|
|
1194
|
+
return i(0,l)}t.noSpace=n;function r(l){return i(1,l)}t.oneSpace=r;function i(l,f){return{options:f??{},moves:[{characters:l}]}}t.spaces=i;function s(l){return o(1,l)}t.newLine=s;function o(l,f){return{options:f??{},moves:[{lines:l}]}}t.newLines=o;function a(l){return{options:l??{},moves:[{tabs:1,lines:1}]}}t.indent=a;function u(l){return{options:l??{},moves:[{tabs:0}]}}t.noIndent=u;function c(l,f){var d,p,h,v,b,y;const E=(d=l.lines)!==null&&d!==void 0?d:0,R=(p=f.lines)!==null&&p!==void 0?p:0,A=(h=
|
|
1195
|
+
l.tabs)!==null&&h!==void 0?h:0,N=(v=f.tabs)!==null&&v!==void 0?v:0,K=(b=l.characters)!==null&&b!==void 0?b:0,J=(y=f.characters)!==null&&y!==void 0?y:0;return E<R?-1:E>R?1:A<N?-1:A>N?1:K<J?-1:K>J?1:0}})(Xi||(Xi={}));var Jy,XT;function A8(){return XT||(XT=1,Jy=LT()),Jy}A8();var Zs={},Cc={},Ac={},eo={},$r={},Ei={},YT;function JT(){if(YT)return Ei;YT=1,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.normalizePath=Ei.convertSlashes=Ei.cleanPath=void 0;const t=Li;function e(s){let o=(0,t.normalize)(
|
|
1196
|
+
s);return o.length>1&&o[o.length-1]===t.sep&&(o=o.substring(0,o.length-1)),o}Ei.cleanPath=e;const n=/[\\/]/g;function r(s,o){return s.replace(n,o)}Ei.convertSlashes=r;function i(s,o){const{resolvePaths:a,normalizePath:u,pathSeparator:c}=o,l=process.platform==="win32"&&s.includes("/")||s.startsWith(".");if(a&&(s=(0,t.resolve)(s)),(u||l)&&(s=e(s)),s===".")return"";const f=s[s.length-1]!==c;return r(f?s+c:s,c)}return Ei.normalizePath=i,Ei}var $i={},QT;function S8(){if(QT)return $i;QT=1,Object.defineProperty(
|
|
1197
|
+
$i,"__esModule",{value:!0}),$i.build=$i.joinDirectoryPath=$i.joinPathWithBasePath=void 0;const t=Li,e=JT();function n(a,u){return u+a}$i.joinPathWithBasePath=n;function r(a,u){return function(c,l){return l.startsWith(a)?l.replace(a,"")+c:(0,e.convertSlashes)((0,t.relative)(a,l),u.pathSeparator)+u.pathSeparator+c}}function i(a){return a}function s(a,u,c){return u+a+c}$i.joinDirectoryPath=s;function o(a,u){const{relativePaths:c,includeBasePath:l}=u;return c&&a?r(a,u):l?n:i}return $i.build=o,$i}var Sc={},
|
|
1198
|
+
ZT;function _8(){if(ZT)return Sc;ZT=1,Object.defineProperty(Sc,"__esModule",{value:!0}),Sc.build=void 0;function t(o){return function(a,u){u.push(a.substring(o.length)||".")}}function e(o){return function(a,u,c){const l=a.substring(o.length)||".";c.every(f=>f(l,!0))&&u.push(l)}}const n=(o,a)=>{a.push(o||".")},r=(o,a,u)=>{const c=o||".";u.every(l=>l(c,!0))&&a.push(c)},i=()=>{};function s(o,a){const{includeDirs:u,filters:c,relativePaths:l}=a;return u?l?c&&c.length?e(o):t(o):c&&c.length?r:n:i}return Sc.
|
|
1199
|
+
build=s,Sc}var _c={},eC;function P8(){if(eC)return _c;eC=1,Object.defineProperty(_c,"__esModule",{value:!0}),_c.build=void 0;const t=(o,a,u,c)=>{c.every(l=>l(o,!1))&&u.files++},e=(o,a,u,c)=>{c.every(l=>l(o,!1))&&a.push(o)},n=(o,a,u,c)=>{u.files++},r=(o,a)=>{a.push(o)},i=()=>{};function s(o){const{excludeFiles:a,filters:u,onlyCounts:c}=o;return a?i:u&&u.length?c?t:e:c?n:r}return _c.build=s,_c}var Pc={},tC;function x8(){if(tC)return Pc;tC=1,Object.defineProperty(Pc,"__esModule",{value:!0}),Pc.build=
|
|
1200
|
+
void 0;const t=r=>r,e=()=>[""].slice(0,0);function n(r){return r.group?e:t}return Pc.build=n,Pc}var xc={},nC;function N8(){if(nC)return xc;nC=1,Object.defineProperty(xc,"__esModule",{value:!0}),xc.build=void 0;const t=(r,i,s)=>{r.push({directory:i,files:s,dir:i})},e=()=>{};function n(r){return r.group?t:e}return xc.build=n,xc}var to={},rC;function I8(){if(rC)return to;rC=1;var t=to&&to.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(to,"__esModule",{value:!0}),
|
|
1201
|
+
to.build=void 0;const e=t(Ia),n=Li,r=function(u,c,l){const{queue:f,options:{suppressErrors:d}}=c;f.enqueue(),e.default.realpath(u,(p,h)=>{if(p)return f.dequeue(d?null:p,c);e.default.stat(h,(v,b)=>{if(v)return f.dequeue(d?null:v,c);if(b.isDirectory()&&o(u,h,c))return f.dequeue(null,c);l(b,h),f.dequeue(null,c)})})},i=function(u,c,l){const{queue:f,options:{suppressErrors:d}}=c;f.enqueue();try{const p=e.default.realpathSync(u),h=e.default.statSync(p);if(h.isDirectory()&&o(u,p,c))return;l(h,p)}catch(p){
|
|
1202
|
+
if(!d)throw p}};function s(u,c){return!u.resolveSymlinks||u.excludeSymlinks?null:c?i:r}to.build=s;function o(u,c,l){if(l.options.useRealPaths)return a(c,l);let f=(0,n.dirname)(u),d=1;for(;f!==l.root&&d<2;){const p=l.symlinks.get(f);!!p&&(p===c||p.startsWith(c)||c.startsWith(p))?d++:f=(0,n.dirname)(f)}return l.symlinks.set(u,c),d>1}function a(u,c){return c.visited.includes(u+c.options.pathSeparator)}return to}var Nc={},iC;function O8(){if(iC)return Nc;iC=1,Object.defineProperty(Nc,"__esModule",{value:!0}),
|
|
1203
|
+
Nc.build=void 0;const t=l=>l.counts,e=l=>l.groups,n=l=>l.paths,r=l=>l.paths.slice(0,l.options.maxFiles),i=(l,f,d)=>(u(f,d,l.counts,l.options.suppressErrors),null),s=(l,f,d)=>(u(f,d,l.paths,l.options.suppressErrors),null),o=(l,f,d)=>(u(f,d,l.paths.slice(0,l.options.maxFiles),l.options.suppressErrors),null),a=(l,f,d)=>(u(f,d,l.groups,l.options.suppressErrors),null);function u(l,f,d,p){f(l&&!p?l:null,d)}function c(l,f){const{onlyCounts:d,group:p,maxFiles:h}=l;return d?f?t:i:p?f?e:a:h?f?r:o:f?n:s}return Nc.
|
|
1204
|
+
build=c,Nc}var no={},sC;function L8(){if(sC)return no;sC=1;var t=no&&no.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(no,"__esModule",{value:!0}),no.build=void 0;const e=t(Ia),n={withFileTypes:!0},r=(o,a,u,c,l)=>{if(c<0)return o.queue.dequeue(null,o);o.visited.push(a),o.counts.directories++,o.queue.enqueue(),e.default.readdir(a||".",n,(f,d=[])=>{l(d,u,c),o.queue.dequeue(o.options.suppressErrors?null:f,o)})},i=(o,a,u,c,l)=>{if(c<0)return;o.visited.push(a),
|
|
1205
|
+
o.counts.directories++;let f=[];try{f=e.default.readdirSync(a||".",n)}catch(d){if(!o.options.suppressErrors)throw d}l(f,u,c)};function s(o){return o?i:r}return no.build=s,no}var Ic={},oC;function F8(){if(oC)return Ic;oC=1,Object.defineProperty(Ic,"__esModule",{value:!0}),Ic.Queue=void 0;class t{onQueueEmpty;count=0;constructor(n){this.onQueueEmpty=n}enqueue(){this.count++}dequeue(n,r){(--this.count<=0||n)&&this.onQueueEmpty(n,r)}}return Ic.Queue=t,Ic}var Oc={},aC;function M8(){if(aC)return Oc;aC=
|
|
1206
|
+
1,Object.defineProperty(Oc,"__esModule",{value:!0}),Oc.Counter=void 0;class t{_files=0;_directories=0;set files(n){this._files=n}get files(){return this._files}set directories(n){this._directories=n}get directories(){return this._directories}get dirs(){return this._directories}}return Oc.Counter=t,Oc}var uC;function cC(){if(uC)return $r;uC=1;var t=$r&&$r.__createBinding||(Object.create?function(b,y,E,R){R===void 0&&(R=E);var A=Object.getOwnPropertyDescriptor(y,E);(!A||("get"in A?!y.__esModule:A.
|
|
1207
|
+
writable||A.configurable))&&(A={enumerable:!0,get:function(){return y[E]}}),Object.defineProperty(b,R,A)}:function(b,y,E,R){R===void 0&&(R=E),b[R]=y[E]}),e=$r&&$r.__setModuleDefault||(Object.create?function(b,y){Object.defineProperty(b,"default",{enumerable:!0,value:y})}:function(b,y){b.default=y}),n=$r&&$r.__importStar||function(b){if(b&&b.__esModule)return b;var y={};if(b!=null)for(var E in b)E!=="default"&&Object.prototype.hasOwnProperty.call(b,E)&&t(y,b,E);return e(y,b),y};Object.defineProperty(
|
|
1208
|
+
$r,"__esModule",{value:!0}),$r.Walker=void 0;const r=Li,i=JT(),s=n(S8()),o=n(_8()),a=n(P8()),u=n(x8()),c=n(N8()),l=n(I8()),f=n(O8()),d=n(L8()),p=F8(),h=M8();class v{root;isSynchronous;state;joinPath;pushDirectory;pushFile;getArray;groupFiles;resolveSymlink;walkDirectory;callbackInvoker;constructor(y,E,R){this.isSynchronous=!R,this.callbackInvoker=f.build(E,this.isSynchronous),this.root=(0,i.normalizePath)(y,E),this.state={root:this.root.slice(0,-1),paths:[""].slice(0,0),groups:[],counts:new h.Counter,
|
|
1209
|
+
options:E,queue:new p.Queue((A,N)=>this.callbackInvoker(N,A,R)),symlinks:new Map,visited:[""].slice(0,0)},this.joinPath=s.build(this.root,E),this.pushDirectory=o.build(this.root,E),this.pushFile=a.build(E),this.getArray=u.build(E),this.groupFiles=c.build(E),this.resolveSymlink=l.build(E,this.isSynchronous),this.walkDirectory=d.build(this.isSynchronous)}start(){return this.walkDirectory(this.state,this.root,this.root,this.state.options.maxDepth,this.walk),this.isSynchronous?this.callbackInvoker(this.
|
|
1210
|
+
state,null):null}walk=(y,E,R)=>{const{paths:A,options:{filters:N,resolveSymlinks:K,excludeSymlinks:J,exclude:se,maxFiles:ie,signal:we,useRealPaths:B,pathSeparator:T}}=this.state;if(we&&we.aborted||ie&&A.length>ie)return;this.pushDirectory(E,A,N);const D=this.getArray(this.state.paths);for(let M=0;M<y.length;++M){const S=y[M];if(S.isFile()||S.isSymbolicLink()&&!K&&!J){const P=this.joinPath(S.name,E);this.pushFile(P,D,this.state.counts,N)}else if(S.isDirectory()){let P=s.joinDirectoryPath(S.name,E,
|
|
1211
|
+
this.state.options.pathSeparator);if(se&&se(S.name,P))continue;this.walkDirectory(this.state,P,P,R-1,this.walk)}else if(S.isSymbolicLink()&&this.resolveSymlink){let P=s.joinPathWithBasePath(S.name,E);this.resolveSymlink(P,this.state,(O,Z)=>{if(O.isDirectory()){if(Z=(0,i.normalizePath)(Z,this.state.options),se&&se(S.name,B?Z:P+T))return;this.walkDirectory(this.state,Z,B?Z:P+T,R-1,this.walk)}else{Z=B?Z:P;const H=(0,r.basename)(Z),C=(0,i.normalizePath)((0,r.dirname)(Z),this.state.options);Z=this.joinPath(
|
|
1212
|
+
H,C),this.pushFile(Z,D,this.state.counts,N)}})}}this.groupFiles(this.state.groups,E,D)}}return $r.Walker=v,$r}var lC;function B8(){if(lC)return eo;lC=1,Object.defineProperty(eo,"__esModule",{value:!0}),eo.callback=eo.promise=void 0;const t=cC();function e(r,i){return new Promise((s,o)=>{n(r,i,(a,u)=>{if(a)return o(a);s(u)})})}eo.promise=e;function n(r,i,s){new t.Walker(r,i,s).start()}return eo.callback=n,eo}var Lc={},dC;function j8(){if(dC)return Lc;dC=1,Object.defineProperty(Lc,"__esModule",{value:!0}),
|
|
1213
|
+
Lc.sync=void 0;const t=cC();function e(n,r){return new t.Walker(n,r).start()}return Lc.sync=e,Lc}var fC;function q8(){if(fC)return Ac;fC=1,Object.defineProperty(Ac,"__esModule",{value:!0}),Ac.APIBuilder=void 0;const t=B8(),e=j8();class n{root;options;constructor(i,s){this.root=i,this.options=s}withPromise(){return(0,t.promise)(this.root,this.options)}withCallback(i){(0,t.callback)(this.root,this.options,i)}sync(){return(0,e.sync)(this.root,this.options)}}return Ac.APIBuilder=n,Ac}var Qy={},Zy,pC;
|
|
1214
|
+
function Rp(){if(pC)return Zy;pC=1;const t="\\\\/",e=`[^${t}]`,n="\\.",r="\\+",i="\\?",s="\\/",o="(?=.)",a="[^/]",u=`(?:${s}|$)`,c=`(?:^|${s})`,l=`${n}{1,2}${u}`,f=`(?!${n})`,d=`(?!${c}${l})`,p=`(?!${n}{0,1}${u})`,h=`(?!${l})`,v=`[^.${s}]`,b=`${a}*?`,E={DOT_LITERAL:n,PLUS_LITERAL:r,QMARK_LITERAL:i,SLASH_LITERAL:s,ONE_CHAR:o,QMARK:a,END_ANCHOR:u,DOTS_SLASH:l,NO_DOT:f,NO_DOTS:d,NO_DOT_SLASH:p,NO_DOTS_SLASH:h,QMARK_NO_DOT:v,STAR:b,START_ANCHOR:c,SEP:"/"},R={...E,SLASH_LITERAL:`[${t}]`,QMARK:e,STAR:`${e}\
|
|
1215
|
+
*?`,DOTS_SLASH:`${n}{1,2}(?:[${t}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${t}])${n}{1,2}(?:[${t}]|$))`,NO_DOT_SLASH:`(?!${n}{0,1}(?:[${t}]|$))`,NO_DOTS_SLASH:`(?!${n}{1,2}(?:[${t}]|$))`,QMARK_NO_DOT:`[^.${t}]`,START_ANCHOR:`(?:^|[${t}])`,END_ANCHOR:`(?:[${t}]|$)`,SEP:"\\"},A={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",
|
|
1216
|
+
upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return Zy={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:A,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,
|
|
1217
|
+
CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,
|
|
1218
|
+
CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(N){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${N.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"\
|
|
1219
|
+
(?:",close:")"}}},globChars(N){return N===!0?R:E}},Zy}var hC;function kp(){return hC||(hC=1,function(t){const{REGEX_BACKSLASH:e,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=Rp();t.isObject=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),t.hasRegexChars=s=>r.test(s),t.isRegexChar=s=>s.length===1&&t.hasRegexChars(s),t.escapeRegex=s=>s.replace(i,"\\$1"),t.toPosixSlashes=s=>s.replace(e,"/"),t.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){const s=navigator.
|
|
1220
|
+
platform.toLowerCase();return s==="win32"||s==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1},t.removeBackslashes=s=>s.replace(n,o=>o==="\\"?"":o),t.escapeLast=(s,o,a)=>{const u=s.lastIndexOf(o,a);return u===-1?s:s[u-1]==="\\"?t.escapeLast(s,o,u-1):`${s.slice(0,u)}\\${s.slice(u)}`},t.removePrefix=(s,o={})=>{let a=s;return a.startsWith("./")&&(a=a.slice(2),o.prefix="./"),a},t.wrapOutput=(s,o={},a={})=>{const u=a.contains?"":"^",c=a.contains?"":"$";let l=`${u}\
|
|
1221
|
+
(?:${s})${c}`;return o.negated===!0&&(l=`(?:^(?!${l}).*$)`),l},t.basename=(s,{windows:o}={})=>{const a=s.split(o?/[\\/]/:"/"),u=a[a.length-1];return u===""?a[a.length-2]:u}}(Qy)),Qy}var ev,mC;function G8(){if(mC)return ev;mC=1;const t=kp(),{CHAR_ASTERISK:e,CHAR_AT:n,CHAR_BACKWARD_SLASH:r,CHAR_COMMA:i,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:u,CHAR_LEFT_PARENTHESES:c,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_PLUS:f,CHAR_QUESTION_MARK:d,CHAR_RIGHT_CURLY_BRACE:p,CHAR_RIGHT_PARENTHESES:h,
|
|
1222
|
+
CHAR_RIGHT_SQUARE_BRACKET:v}=Rp(),b=R=>R===a||R===r,y=R=>{R.isPrefix!==!0&&(R.depth=R.isGlobstar?1/0:1)};return ev=(R,A)=>{const N=A||{},K=R.length-1,J=N.parts===!0||N.scanToEnd===!0,se=[],ie=[],we=[];let B=R,T=-1,D=0,M=0,S=!1,P=!1,O=!1,Z=!1,H=!1,C=!1,ne=!1,ye=!1,Pe=!1,F=!1,V=0,Se,le,$e={value:"",depth:0,isGlob:!1};const xe=()=>T>=K,de=()=>B.charCodeAt(T+1),I=()=>(Se=le,B.charCodeAt(++T));for(;T<K;){le=I();let Ke;if(le===r){ne=$e.backslashes=!0,le=I(),le===u&&(C=!0);continue}if(C===!0||le===u){for(V++;xe()!==
|
|
1223
|
+
!0&&(le=I());){if(le===r){ne=$e.backslashes=!0,I();continue}if(le===u){V++;continue}if(C!==!0&&le===s&&(le=I())===s){if(S=$e.isBrace=!0,O=$e.isGlob=!0,F=!0,J===!0)continue;break}if(C!==!0&&le===i){if(S=$e.isBrace=!0,O=$e.isGlob=!0,F=!0,J===!0)continue;break}if(le===p&&(V--,V===0)){C=!1,S=$e.isBrace=!0,F=!0;break}}if(J===!0)continue;break}if(le===a){if(se.push(T),ie.push($e),$e={value:"",depth:0,isGlob:!1},F===!0)continue;if(Se===s&&T===D+1){D+=2;continue}M=T+1;continue}if(N.noext!==!0&&(le===f||
|
|
1224
|
+
le===n||le===e||le===d||le===o)===!0&&de()===c){if(O=$e.isGlob=!0,Z=$e.isExtglob=!0,F=!0,le===o&&T===D&&(Pe=!0),J===!0){for(;xe()!==!0&&(le=I());){if(le===r){ne=$e.backslashes=!0,le=I();continue}if(le===h){O=$e.isGlob=!0,F=!0;break}}continue}break}if(le===e){if(Se===e&&(H=$e.isGlobstar=!0),O=$e.isGlob=!0,F=!0,J===!0)continue;break}if(le===d){if(O=$e.isGlob=!0,F=!0,J===!0)continue;break}if(le===l){for(;xe()!==!0&&(Ke=I());){if(Ke===r){ne=$e.backslashes=!0,I();continue}if(Ke===v){P=$e.isBracket=!0,
|
|
1225
|
+
O=$e.isGlob=!0,F=!0;break}}if(J===!0)continue;break}if(N.nonegate!==!0&&le===o&&T===D){ye=$e.negated=!0,D++;continue}if(N.noparen!==!0&&le===c){if(O=$e.isGlob=!0,J===!0){for(;xe()!==!0&&(le=I());){if(le===c){ne=$e.backslashes=!0,le=I();continue}if(le===h){F=!0;break}}continue}break}if(O===!0){if(F=!0,J===!0)continue;break}}N.noext===!0&&(Z=!1,O=!1);let G=B,pe="",U="";D>0&&(pe=B.slice(0,D),B=B.slice(D),M-=D),G&&O===!0&&M>0?(G=B.slice(0,M),U=B.slice(M)):O===!0?(G="",U=B):G=B,G&&G!==""&&G!=="/"&&G!==
|
|
1226
|
+
B&&b(G.charCodeAt(G.length-1))&&(G=G.slice(0,-1)),N.unescape===!0&&(U&&(U=t.removeBackslashes(U)),G&&ne===!0&&(G=t.removeBackslashes(G)));const fe={prefix:pe,input:R,start:D,base:G,glob:U,isBrace:S,isBracket:P,isGlob:O,isExtglob:Z,isGlobstar:H,negated:ye,negatedExtglob:Pe};if(N.tokens===!0&&(fe.maxDepth=0,b(le)||ie.push($e),fe.tokens=ie),N.parts===!0||N.tokens===!0){let Ke;for(let it=0;it<se.length;it++){const ue=Ke?Ke+1:D,Oe=se[it],re=R.slice(ue,Oe);N.tokens&&(it===0&&D!==0?(ie[it].isPrefix=!0,
|
|
1227
|
+
ie[it].value=pe):ie[it].value=re,y(ie[it]),fe.maxDepth+=ie[it].depth),(it!==0||re!=="")&&we.push(re),Ke=Oe}if(Ke&&Ke+1<R.length){const it=R.slice(Ke+1);we.push(it),N.tokens&&(ie[ie.length-1].value=it,y(ie[ie.length-1]),fe.maxDepth+=ie[ie.length-1].depth)}fe.slashes=se,fe.parts=we}return fe},ev}var tv,gC;function U8(){if(gC)return tv;gC=1;const t=Rp(),e=kp(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:r,REGEX_NON_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:o}=t,a=(l,f)=>{if(typeof f.expandRange==
|
|
1228
|
+
"function")return f.expandRange(...l,f);l.sort();const d=`[${l.join("-")}]`;try{new RegExp(d)}catch{return l.map(h=>e.escapeRegex(h)).join("..")}return d},u=(l,f)=>`Missing ${l}: "${f}" - use "\\\\${f}" to match literal characters`,c=(l,f)=>{if(typeof l!="string")throw new TypeError("Expected a string");l=o[l]||l;const d={...f},p=typeof d.maxLength=="number"?Math.min(n,d.maxLength):n;let h=l.length;if(h>p)throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${p}`);const v={
|
|
1229
|
+
type:"bos",value:"",output:d.prepend||""},b=[v],y=d.capture?"":"?:",E=t.globChars(d.windows),R=t.extglobChars(E),{DOT_LITERAL:A,PLUS_LITERAL:N,SLASH_LITERAL:K,ONE_CHAR:J,DOTS_SLASH:se,NO_DOT:ie,NO_DOT_SLASH:we,NO_DOTS_SLASH:B,QMARK:T,QMARK_NO_DOT:D,STAR:M,START_ANCHOR:S}=E,P=ue=>`(${y}(?:(?!${S}${ue.dot?se:A}).)*?)`,O=d.dot?"":ie,Z=d.dot?T:D;let H=d.bash===!0?P(d):M;d.capture&&(H=`(${H})`),typeof d.noext=="boolean"&&(d.noextglob=d.noext);const C={input:l,index:-1,start:0,dot:d.dot===!0,consumed:"",
|
|
1230
|
+
output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:b};l=e.removePrefix(l,C),h=l.length;const ne=[],ye=[],Pe=[];let F=v,V;const Se=()=>C.index===h-1,le=C.peek=(ue=1)=>l[C.index+ue],$e=C.advance=()=>l[++C.index]||"",xe=()=>l.slice(C.index+1),de=(ue="",Oe=0)=>{C.consumed+=ue,C.index+=Oe},I=ue=>{C.output+=ue.output!=null?ue.output:ue.value,de(ue.value)},G=()=>{let ue=1;for(;le()==="!"&&(le(2)!=="("||le(3)==="?");)$e(),C.start++,ue++;return ue%2===0?!1:
|
|
1231
|
+
(C.negated=!0,C.start++,!0)},pe=ue=>{C[ue]++,Pe.push(ue)},U=ue=>{C[ue]--,Pe.pop()},fe=ue=>{if(F.type==="globstar"){const Oe=C.braces>0&&(ue.type==="comma"||ue.type==="brace"),re=ue.extglob===!0||ne.length&&(ue.type==="pipe"||ue.type==="paren");ue.type!=="slash"&&ue.type!=="paren"&&!Oe&&!re&&(C.output=C.output.slice(0,-F.output.length),F.type="star",F.value="*",F.output=H,C.output+=F.output)}if(ne.length&&ue.type!=="paren"&&(ne[ne.length-1].inner+=ue.value),(ue.value||ue.output)&&I(ue),F&&F.type===
|
|
1232
|
+
"text"&&ue.type==="text"){F.output=(F.output||F.value)+ue.value,F.value+=ue.value;return}ue.prev=F,b.push(ue),F=ue},Ke=(ue,Oe)=>{const re={...R[Oe],conditions:1,inner:""};re.prev=F,re.parens=C.parens,re.output=C.output;const De=(d.capture?"(":"")+re.open;pe("parens"),fe({type:ue,value:Oe,output:C.output?"":J}),fe({type:"paren",extglob:!0,value:$e(),output:De}),ne.push(re)},it=ue=>{let Oe=ue.close+(d.capture?")":""),re;if(ue.type==="negate"){let De=H;if(ue.inner&&ue.inner.length>1&&ue.inner.includes(
|
|
1233
|
+
"/")&&(De=P(d)),(De!==H||Se()||/^\)+$/.test(xe()))&&(Oe=ue.close=`)$))${De}`),ue.inner.includes("*")&&(re=xe())&&/^\.[^\\/.]+$/.test(re)){const Ge=c(re,{...f,fastpaths:!1}).output;Oe=ue.close=`)${Ge})${De})`}ue.prev.type==="bos"&&(C.negatedExtglob=!0)}fe({type:"paren",extglob:!0,value:V,output:Oe}),U("parens")};if(d.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(l)){let ue=!1,Oe=l.replace(s,(re,De,Ge,vt,et,Kt)=>vt==="\\"?(ue=!0,re):vt==="?"?De?De+vt+(et?T.repeat(et.length):""):Kt===0?Z+(et?T.repeat(
|
|
1234
|
+
et.length):""):T.repeat(Ge.length):vt==="."?A.repeat(Ge.length):vt==="*"?De?De+vt+(et?H:""):H:De?re:`\\${re}`);return ue===!0&&(d.unescape===!0?Oe=Oe.replace(/\\/g,""):Oe=Oe.replace(/\\+/g,re=>re.length%2===0?"\\\\":re?"\\":"")),Oe===l&&d.contains===!0?(C.output=l,C):(C.output=e.wrapOutput(Oe,C,f),C)}for(;!Se();){if(V=$e(),V==="\0")continue;if(V==="\\"){const re=le();if(re==="/"&&d.bash!==!0||re==="."||re===";")continue;if(!re){V+="\\",fe({type:"text",value:V});continue}const De=/^\\+/.exec(xe());
|
|
1235
|
+
let Ge=0;if(De&&De[0].length>2&&(Ge=De[0].length,C.index+=Ge,Ge%2!==0&&(V+="\\")),d.unescape===!0?V=$e():V+=$e(),C.brackets===0){fe({type:"text",value:V});continue}}if(C.brackets>0&&(V!=="]"||F.value==="["||F.value==="[^")){if(d.posix!==!1&&V===":"){const re=F.value.slice(1);if(re.includes("[")&&(F.posix=!0,re.includes(":"))){const De=F.value.lastIndexOf("["),Ge=F.value.slice(0,De),vt=F.value.slice(De+2),et=r[vt];if(et){F.value=Ge+et,C.backtrack=!0,$e(),!v.output&&b.indexOf(F)===1&&(v.output=J);
|
|
1236
|
+
continue}}}(V==="["&&le()!==":"||V==="-"&&le()==="]")&&(V=`\\${V}`),V==="]"&&(F.value==="["||F.value==="[^")&&(V=`\\${V}`),d.posix===!0&&V==="!"&&F.value==="["&&(V="^"),F.value+=V,I({value:V});continue}if(C.quotes===1&&V!=='"'){V=e.escapeRegex(V),F.value+=V,I({value:V});continue}if(V==='"'){C.quotes=C.quotes===1?0:1,d.keepQuotes===!0&&fe({type:"text",value:V});continue}if(V==="("){pe("parens"),fe({type:"paren",value:V});continue}if(V===")"){if(C.parens===0&&d.strictBrackets===!0)throw new SyntaxError(
|
|
1237
|
+
u("opening","("));const re=ne[ne.length-1];if(re&&C.parens===re.parens+1){it(ne.pop());continue}fe({type:"paren",value:V,output:C.parens?")":"\\)"}),U("parens");continue}if(V==="["){if(d.nobracket===!0||!xe().includes("]")){if(d.nobracket!==!0&&d.strictBrackets===!0)throw new SyntaxError(u("closing","]"));V=`\\${V}`}else pe("brackets");fe({type:"bracket",value:V});continue}if(V==="]"){if(d.nobracket===!0||F&&F.type==="bracket"&&F.value.length===1){fe({type:"text",value:V,output:`\\${V}`});continue}
|
|
1238
|
+
if(C.brackets===0){if(d.strictBrackets===!0)throw new SyntaxError(u("opening","["));fe({type:"text",value:V,output:`\\${V}`});continue}U("brackets");const re=F.value.slice(1);if(F.posix!==!0&&re[0]==="^"&&!re.includes("/")&&(V=`/${V}`),F.value+=V,I({value:V}),d.literalBrackets===!1||e.hasRegexChars(re))continue;const De=e.escapeRegex(F.value);if(C.output=C.output.slice(0,-F.value.length),d.literalBrackets===!0){C.output+=De,F.value=De;continue}F.value=`(${y}${De}|${F.value})`,C.output+=F.value;continue}
|
|
1239
|
+
if(V==="{"&&d.nobrace!==!0){pe("braces");const re={type:"brace",value:V,output:"(",outputIndex:C.output.length,tokensIndex:C.tokens.length};ye.push(re),fe(re);continue}if(V==="}"){const re=ye[ye.length-1];if(d.nobrace===!0||!re){fe({type:"text",value:V,output:V});continue}let De=")";if(re.dots===!0){const Ge=b.slice(),vt=[];for(let et=Ge.length-1;et>=0&&(b.pop(),Ge[et].type!=="brace");et--)Ge[et].type!=="dots"&&vt.unshift(Ge[et].value);De=a(vt,d),C.backtrack=!0}if(re.comma!==!0&&re.dots!==!0){const Ge=C.
|
|
1240
|
+
output.slice(0,re.outputIndex),vt=C.tokens.slice(re.tokensIndex);re.value=re.output="\\{",V=De="\\}",C.output=Ge;for(const et of vt)C.output+=et.output||et.value}fe({type:"brace",value:V,output:De}),U("braces"),ye.pop();continue}if(V==="|"){ne.length>0&&ne[ne.length-1].conditions++,fe({type:"text",value:V});continue}if(V===","){let re=V;const De=ye[ye.length-1];De&&Pe[Pe.length-1]==="braces"&&(De.comma=!0,re="|"),fe({type:"comma",value:V,output:re});continue}if(V==="/"){if(F.type==="dot"&&C.index===
|
|
1241
|
+
C.start+1){C.start=C.index+1,C.consumed="",C.output="",b.pop(),F=v;continue}fe({type:"slash",value:V,output:K});continue}if(V==="."){if(C.braces>0&&F.type==="dot"){F.value==="."&&(F.output=A);const re=ye[ye.length-1];F.type="dots",F.output+=V,F.value+=V,re.dots=!0;continue}if(C.braces+C.parens===0&&F.type!=="bos"&&F.type!=="slash"){fe({type:"text",value:V,output:A});continue}fe({type:"dot",value:V,output:A});continue}if(V==="?"){if(!(F&&F.value==="(")&&d.noextglob!==!0&&le()==="("&&le(2)!=="?"){
|
|
1242
|
+
Ke("qmark",V);continue}if(F&&F.type==="paren"){const De=le();let Ge=V;(F.value==="("&&!/[!=<:]/.test(De)||De==="<"&&!/<([!=]|\w+>)/.test(xe()))&&(Ge=`\\${V}`),fe({type:"text",value:V,output:Ge});continue}if(d.dot!==!0&&(F.type==="slash"||F.type==="bos")){fe({type:"qmark",value:V,output:D});continue}fe({type:"qmark",value:V,output:T});continue}if(V==="!"){if(d.noextglob!==!0&&le()==="("&&(le(2)!=="?"||!/[!=<:]/.test(le(3)))){Ke("negate",V);continue}if(d.nonegate!==!0&&C.index===0){G();continue}}if(V===
|
|
1243
|
+
"+"){if(d.noextglob!==!0&&le()==="("&&le(2)!=="?"){Ke("plus",V);continue}if(F&&F.value==="("||d.regex===!1){fe({type:"plus",value:V,output:N});continue}if(F&&(F.type==="bracket"||F.type==="paren"||F.type==="brace")||C.parens>0){fe({type:"plus",value:V});continue}fe({type:"plus",value:N});continue}if(V==="@"){if(d.noextglob!==!0&&le()==="("&&le(2)!=="?"){fe({type:"at",extglob:!0,value:V,output:""});continue}fe({type:"text",value:V});continue}if(V!=="*"){(V==="$"||V==="^")&&(V=`\\${V}`);const re=i.
|
|
1244
|
+
exec(xe());re&&(V+=re[0],C.index+=re[0].length),fe({type:"text",value:V});continue}if(F&&(F.type==="globstar"||F.star===!0)){F.type="star",F.star=!0,F.value+=V,F.output=H,C.backtrack=!0,C.globstar=!0,de(V);continue}let ue=xe();if(d.noextglob!==!0&&/^\([^?]/.test(ue)){Ke("star",V);continue}if(F.type==="star"){if(d.noglobstar===!0){de(V);continue}const re=F.prev,De=re.prev,Ge=re.type==="slash"||re.type==="bos",vt=De&&(De.type==="star"||De.type==="globstar");if(d.bash===!0&&(!Ge||ue[0]&&ue[0]!=="/")){
|
|
1245
|
+
fe({type:"star",value:V,output:""});continue}const et=C.braces>0&&(re.type==="comma"||re.type==="brace"),Kt=ne.length&&(re.type==="pipe"||re.type==="paren");if(!Ge&&re.type!=="paren"&&!et&&!Kt){fe({type:"star",value:V,output:""});continue}for(;ue.slice(0,3)==="/**";){const en=l[C.index+4];if(en&&en!=="/")break;ue=ue.slice(3),de("/**",3)}if(re.type==="bos"&&Se()){F.type="globstar",F.value+=V,F.output=P(d),C.output=F.output,C.globstar=!0,de(V);continue}if(re.type==="slash"&&re.prev.type!=="bos"&&!vt&&
|
|
1246
|
+
Se()){C.output=C.output.slice(0,-(re.output+F.output).length),re.output=`(?:${re.output}`,F.type="globstar",F.output=P(d)+(d.strictSlashes?")":"|$)"),F.value+=V,C.globstar=!0,C.output+=re.output+F.output,de(V);continue}if(re.type==="slash"&&re.prev.type!=="bos"&&ue[0]==="/"){const en=ue[1]!==void 0?"|$":"";C.output=C.output.slice(0,-(re.output+F.output).length),re.output=`(?:${re.output}`,F.type="globstar",F.output=`${P(d)}${K}|${K}${en})`,F.value+=V,C.output+=re.output+F.output,C.globstar=!0,de(
|
|
1247
|
+
V+$e()),fe({type:"slash",value:"/",output:""});continue}if(re.type==="bos"&&ue[0]==="/"){F.type="globstar",F.value+=V,F.output=`(?:^|${K}|${P(d)}${K})`,C.output=F.output,C.globstar=!0,de(V+$e()),fe({type:"slash",value:"/",output:""});continue}C.output=C.output.slice(0,-F.output.length),F.type="globstar",F.output=P(d),F.value+=V,C.output+=F.output,C.globstar=!0,de(V);continue}const Oe={type:"star",value:V,output:H};if(d.bash===!0){Oe.output=".*?",(F.type==="bos"||F.type==="slash")&&(Oe.output=O+Oe.
|
|
1248
|
+
output),fe(Oe);continue}if(F&&(F.type==="bracket"||F.type==="paren")&&d.regex===!0){Oe.output=V,fe(Oe);continue}(C.index===C.start||F.type==="slash"||F.type==="dot")&&(F.type==="dot"?(C.output+=we,F.output+=we):d.dot===!0?(C.output+=B,F.output+=B):(C.output+=O,F.output+=O),le()!=="*"&&(C.output+=J,F.output+=J)),fe(Oe)}for(;C.brackets>0;){if(d.strictBrackets===!0)throw new SyntaxError(u("closing","]"));C.output=e.escapeLast(C.output,"["),U("brackets")}for(;C.parens>0;){if(d.strictBrackets===!0)throw new SyntaxError(
|
|
1249
|
+
u("closing",")"));C.output=e.escapeLast(C.output,"("),U("parens")}for(;C.braces>0;){if(d.strictBrackets===!0)throw new SyntaxError(u("closing","}"));C.output=e.escapeLast(C.output,"{"),U("braces")}if(d.strictSlashes!==!0&&(F.type==="star"||F.type==="bracket")&&fe({type:"maybe_slash",value:"",output:`${K}?`}),C.backtrack===!0){C.output="";for(const ue of C.tokens)C.output+=ue.output!=null?ue.output:ue.value,ue.suffix&&(C.output+=ue.suffix)}return C};return c.fastpaths=(l,f)=>{const d={...f},p=typeof d.
|
|
1250
|
+
maxLength=="number"?Math.min(n,d.maxLength):n,h=l.length;if(h>p)throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${p}`);l=o[l]||l;const{DOT_LITERAL:v,SLASH_LITERAL:b,ONE_CHAR:y,DOTS_SLASH:E,NO_DOT:R,NO_DOTS:A,NO_DOTS_SLASH:N,STAR:K,START_ANCHOR:J}=t.globChars(d.windows),se=d.dot?A:R,ie=d.dot?N:R,we=d.capture?"":"?:",B={negated:!1,prefix:""};let T=d.bash===!0?".*?":K;d.capture&&(T=`(${T})`);const D=O=>O.noglobstar===!0?T:`(${we}(?:(?!${J}${O.dot?E:v}).)*?)`,M=O=>{switch(O){case"\
|
|
1251
|
+
*":return`${se}${y}${T}`;case".*":return`${v}${y}${T}`;case"*.*":return`${se}${T}${v}${y}${T}`;case"*/*":return`${se}${T}${b}${y}${ie}${T}`;case"**":return se+D(d);case"**/*":return`(?:${se}${D(d)}${b})?${ie}${y}${T}`;case"**/*.*":return`(?:${se}${D(d)}${b})?${ie}${T}${v}${y}${T}`;case"**/.*":return`(?:${se}${D(d)}${b})?${v}${y}${T}`;default:{const Z=/^(.*?)\.(\w+)$/.exec(O);if(!Z)return;const H=M(Z[1]);return H?H+v+Z[2]:void 0}}},S=e.removePrefix(l,B);let P=M(S);return P&&d.strictSlashes!==!0&&
|
|
1252
|
+
(P+=`${b}?`),P},tv=c,tv}var nv,yC;function W8(){if(yC)return nv;yC=1;const t=G8(),e=U8(),n=kp(),r=Rp(),i=o=>o&&typeof o=="object"&&!Array.isArray(o),s=(o,a,u=!1)=>{if(Array.isArray(o)){const b=o.map(E=>s(E,a,u));return E=>{for(const R of b){const A=R(E);if(A)return A}return!1}}const c=i(o)&&o.tokens&&o.input;if(o===""||typeof o!="string"&&!c)throw new TypeError("Expected pattern to be a non-empty string");const l=a||{},f=l.windows,d=c?s.compileRe(o,a):s.makeRe(o,a,!1,!0),p=d.state;delete d.state;
|
|
1253
|
+
let h=()=>!1;if(l.ignore){const b={...a,ignore:null,onMatch:null,onResult:null};h=s(l.ignore,b,u)}const v=(b,y=!1)=>{const{isMatch:E,match:R,output:A}=s.test(b,d,a,{glob:o,posix:f}),N={glob:o,state:p,regex:d,posix:f,input:b,output:A,match:R,isMatch:E};return typeof l.onResult=="function"&&l.onResult(N),E===!1?(N.isMatch=!1,y?N:!1):h(b)?(typeof l.onIgnore=="function"&&l.onIgnore(N),N.isMatch=!1,y?N:!1):(typeof l.onMatch=="function"&&l.onMatch(N),y?N:!0)};return u&&(v.state=p),v};return s.test=(o,a,u,{
|
|
1254
|
+
glob:c,posix:l}={})=>{if(typeof o!="string")throw new TypeError("Expected input to be a string");if(o==="")return{isMatch:!1,output:""};const f=u||{},d=f.format||(l?n.toPosixSlashes:null);let p=o===c,h=p&&d?d(o):o;return p===!1&&(h=d?d(o):o,p=h===c),(p===!1||f.capture===!0)&&(f.matchBase===!0||f.basename===!0?p=s.matchBase(o,a,u,l):p=a.exec(h)),{isMatch:!!p,match:p,output:h}},s.matchBase=(o,a,u)=>(a instanceof RegExp?a:s.makeRe(a,u)).test(n.basename(o)),s.isMatch=(o,a,u)=>s(a,u)(o),s.parse=(o,a)=>Array.
|
|
1255
|
+
isArray(o)?o.map(u=>s.parse(u,a)):e(o,{...a,fastpaths:!1}),s.scan=(o,a)=>t(o,a),s.compileRe=(o,a,u=!1,c=!1)=>{if(u===!0)return o.output;const l=a||{},f=l.contains?"":"^",d=l.contains?"":"$";let p=`${f}(?:${o.output})${d}`;o&&o.negated===!0&&(p=`^(?!${p}).*$`);const h=s.toRegex(p,a);return c===!0&&(h.state=o),h},s.makeRe=(o,a={},u=!1,c=!1)=>{if(!o||typeof o!="string")throw new TypeError("Expected a non-empty string");let l={negated:!1,fastpaths:!0};return a.fastpaths!==!1&&(o[0]==="."||o[0]==="*")&&
|
|
1256
|
+
(l.output=e.fastpaths(o,a)),l.output||(l=e(o,a)),s.compileRe(l,a,u,c)},s.toRegex=(o,a)=>{try{const u=a||{};return new RegExp(o,u.flags||(u.nocase?"i":""))}catch(u){if(a&&a.debug===!0)throw u;return/$^/}},s.constants=r,nv=s,nv}var rv,vC;function z8(){if(vC)return rv;vC=1;const t=W8(),e=kp();function n(r,i,s=!1){return i&&(i.windows===null||i.windows===void 0)&&(i={...i,windows:e.isWindows()}),t(r,i,s)}return Object.assign(n,t),rv=n,rv}var wC;function H8(){if(wC)return Cc;wC=1,Object.defineProperty(
|
|
1257
|
+
Cc,"__esModule",{value:!0}),Cc.Builder=void 0;const t=Li,e=q8();var n=null;try{require.resolve("picomatch"),n=z8()}catch{}class r{globCache={};options={maxDepth:1/0,suppressErrors:!0,pathSeparator:t.sep,filters:[]};globFunction;constructor(s){this.options={...this.options,...s},this.globFunction=this.options.globFunction}group(){return this.options.group=!0,this}withPathSeparator(s){return this.options.pathSeparator=s,this}withBasePath(){return this.options.includeBasePath=!0,this}withRelativePaths(){
|
|
1258
|
+
return this.options.relativePaths=!0,this}withDirs(){return this.options.includeDirs=!0,this}withMaxDepth(s){return this.options.maxDepth=s,this}withMaxFiles(s){return this.options.maxFiles=s,this}withFullPaths(){return this.options.resolvePaths=!0,this.options.includeBasePath=!0,this}withErrors(){return this.options.suppressErrors=!1,this}withSymlinks({resolvePaths:s=!0}={}){return this.options.resolveSymlinks=!0,this.options.useRealPaths=s,this.withFullPaths()}withAbortSignal(s){return this.options.
|
|
1259
|
+
signal=s,this}normalize(){return this.options.normalizePath=!0,this}filter(s){return this.options.filters.push(s),this}onlyDirs(){return this.options.excludeFiles=!0,this.options.includeDirs=!0,this}exclude(s){return this.options.exclude=s,this}onlyCounts(){return this.options.onlyCounts=!0,this}crawl(s){return new e.APIBuilder(s||".",this.options)}withGlobFunction(s){return this.globFunction=s,this}crawlWithOptions(s,o){return this.options={...this.options,...o},new e.APIBuilder(s||".",this.options)}glob(...s){
|
|
1260
|
+
return this.globFunction?this.globWithOptions(s):this.globWithOptions(s,{dot:!0})}globWithOptions(s,...o){const a=this.globFunction||n;if(!a)throw new Error("Please specify a glob function to use glob matching.");var u=this.globCache[s.join("\0")];return u||(u=a(s,...o),this.globCache[s.join("\0")]=u),this.options.filters.push(c=>u(c)),this}}return Cc.Builder=r,Cc}var iv={},bC;function V8(){return bC||(bC=1,Object.defineProperty(iv,"__esModule",{value:!0})),iv}var EC;function K8(){return EC||(EC=
|
|
1261
|
+
1,function(t){var e=Zs&&Zs.__createBinding||(Object.create?function(i,s,o,a){a===void 0&&(a=o);var u=Object.getOwnPropertyDescriptor(s,o);(!u||("get"in u?!s.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return s[o]}}),Object.defineProperty(i,a,u)}:function(i,s,o,a){a===void 0&&(a=o),i[a]=s[o]}),n=Zs&&Zs.__exportStar||function(i,s){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&e(s,i,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.fdir=
|
|
1262
|
+
void 0;const r=H8();Object.defineProperty(t,"fdir",{enumerable:!0,get:function(){return r.Builder}}),n(V8(),t)}(Zs)),Zs}var X8=K8();class Y8{constructor(){this.encoding="utf-8"}readFile(e){return cb.promises.readFile(e.fsPath,this.encoding)}async readDirectory(e){return(await cb.promises.readdir(e.fsPath,{withFileTypes:!0})).map(r=>({dirent:r,isFile:r.isFile(),isDirectory:r.isDirectory(),uri:pt.joinPath(e,r.name)}))}}const Tp="DeploymentElement";function sv(t){return z.isInstance(t,Tp)}const ov="\
|
|
1263
|
+
DeploymentNodeOrElementKind",Cp="DeploymentViewRule";function J8(t){return z.isInstance(t,Cp)}const Fc="DynamicViewRule";function Ap(t){return z.isInstance(t,Fc)}const Mc="ElementExpression";function av(t){return z.isInstance(t,Mc)}const Sp="ElementPredicate";function Q8(t){return z.isInstance(t,Sp)}const _p="ElementPredicateOrWhere";function Z8(t){return z.isInstance(t,_p)}const Pp="ElementPredicateOrWhereV2";function eU(t){return z.isInstance(t,Pp)}const ro="ElementProperty";function tU(t){return z.
|
|
1264
|
+
isInstance(t,ro)}const uv="ExpressionV2";function nU(t){return z.isInstance(t,uv)}const cv="ExtendElementProperty",Bc="FqnExpr";function rU(t){return z.isInstance(t,Bc)}const lv="FqnReferenceable",io="LikeC4View";function dv(t){return z.isInstance(t,io)}const xp="MetadataProperty";function Yi(t){return z.isInstance(t,xp)}const fv="Predicate";function iU(t){return z.isInstance(t,fv)}const jc="Referenceable",Np="RelationExpr";function $C(t){return z.isInstance(t,Np)}const Ip="RelationExpression";function pv(t){
|
|
1265
|
+
return z.isInstance(t,Ip)}const Op="RelationPredicate";function sU(t){return z.isInstance(t,Op)}const Lp="RelationPredicateOrWhere";function oU(t){return z.isInstance(t,Lp)}const Fp="RelationPredicateOrWhereV2";function aU(t){return z.isInstance(t,Fp)}const qc="RelationProperty",Mp="RelationshipStyleProperty";function DC(t){return z.isInstance(t,Mp)}const hv="SizeProperty";function uU(t){return z.isInstance(t,hv)}const ta="StringProperty";function RC(t){return z.isInstance(t,ta)}const na="StyleP\
|
|
1266
|
+
roperty";function mv(t){return z.isInstance(t,na)}const Bp="ViewProperty";function cU(t){return z.isInstance(t,Bp)}const Gc="ViewRule";function lU(t){return z.isInstance(t,Gc)}const jp="ViewRulePredicate";function qp(t){return z.isInstance(t,jp)}const Gp="ViewRuleStyleOrGlobalRef";function gv(t){return z.isInstance(t,Gp)}const Uc="WhereElement";function kC(t){return z.isInstance(t,Uc)}const Wc="WhereElementExpression";function dU(t){return z.isInstance(t,Wc)}const TC="WhereExpression",Up="WhereK\
|
|
1267
|
+
indEqual";function fU(t){return z.isInstance(t,Up)}const zc="WhereRelation";function CC(t){return z.isInstance(t,zc)}const Hc="WhereRelationExpression";function pU(t){return z.isInstance(t,Hc)}const Wp="WhereTagEqual";function hU(t){return z.isInstance(t,Wp)}const Vc="ArrowProperty";function Kc(t){return z.isInstance(t,Vc)}const Xc="BorderProperty";function zp(t){return z.isInstance(t,Xc)}const Yc="ColorProperty";function so(t){return z.isInstance(t,Yc)}const oo="CustomColor",Hp="CustomElementPr\
|
|
1268
|
+
operties";function mU(t){return z.isInstance(t,Hp)}const Vp="CustomRelationProperties";function gU(t){return z.isInstance(t,Vp)}const Ji="DeployedInstance";function Bn(t){return z.isInstance(t,Ji)}const Kp="DeployedInstanceBody";function yU(t){return z.isInstance(t,Kp)}const Ur="DeploymentNode";function jn(t){return z.isInstance(t,Ur)}const Xp="DeploymentNodeBody";function vU(t){return z.isInstance(t,Xp)}const Di="DeploymentNodeKind";function wU(t){return z.isInstance(t,Di)}const Yp="DeploymentR\
|
|
1269
|
+
elation";function Qi(t){return z.isInstance(t,Yp)}const Jp="DeploymentRelationBody";function bU(t){return z.isInstance(t,Jp)}const Jc="DeploymentView";function yv(t){return z.isInstance(t,Jc)}const Qp="DeploymentViewBody";function EU(t){return z.isInstance(t,Qp)}const Qc="DeploymentViewRulePredicate";function ra(t){return z.isInstance(t,Qc)}const Zp="DeploymentViewRulePredicateExpression";function $U(t){return z.isInstance(t,Zp)}const Zc="DeploymentViewRuleStyle";function AC(t){return z.isInstance(
|
|
1270
|
+
t,Zc)}const el="DirectedRelationExpr";function vv(t){return z.isInstance(t,el)}const tl="DirectedRelationExpression";function wv(t){return z.isInstance(t,tl)}const ia="DynamicView";function SC(t){return z.isInstance(t,ia)}const eh="DynamicViewBody";function DU(t){return z.isInstance(t,eh)}const nl="DynamicViewGlobalPredicateRef";function _C(t){return z.isInstance(t,nl)}const rl="DynamicViewIncludePredicate";function RU(t){return z.isInstance(t,rl)}const th="DynamicViewParallelSteps";function bv(t){
|
|
1271
|
+
return z.isInstance(t,th)}const nh="DynamicViewPredicateIterator";function PC(t){return z.isInstance(t,nh)}const Ev="DynamicViewRef",rh="DynamicViewStep";function $v(t){return z.isInstance(t,rh)}const Dr="Element";function pn(t){return z.isInstance(t,Dr)}const ih="ElementBody";function il(t){return z.isInstance(t,ih)}const sl="ElementDescedantsExpression";function Dv(t){return z.isInstance(t,sl)}const sh="ElementExpressionsIterator";function kU(t){return z.isInstance(t,sh)}const Ri="ElementKind";
|
|
1272
|
+
function xC(t){return z.isInstance(t,Ri)}const ol="ElementKindExpression";function oh(t){return z.isInstance(t,ol)}const al="ElementPredicateWhere";function Rv(t){return z.isInstance(t,al)}const ul="ElementPredicateWhereV2";function TU(t){return z.isInstance(t,ul)}const cl="ElementPredicateWith";function ah(t){return z.isInstance(t,cl)}const ll="ElementRef";function dl(t){return z.isInstance(t,ll)}const fl="ElementStringProperty";function pl(t){return z.isInstance(t,fl)}const hl="ElementStylePro\
|
|
1273
|
+
perty";function Zi(t){return z.isInstance(t,hl)}const ml="ElementTagExpression";function uh(t){return z.isInstance(t,ml)}const sa="ElementView";function ch(t){return z.isInstance(t,sa)}const lh="ElementViewBody";function NC(t){return z.isInstance(t,lh)}const kv="ElementViewRef",gl="ExcludePredicate";function yl(t){return z.isInstance(t,gl)}const vl="ExpandElementExpression";function IC(t){return z.isInstance(t,vl)}const wl="ExtendDeployment";function ao(t){return z.isInstance(t,wl)}const dh="Ext\
|
|
1274
|
+
endDeploymentBody";function CU(t){return z.isInstance(t,dh)}const uo="ExtendElement";function oa(t){return z.isInstance(t,uo)}const fh="ExtendElementBody";function OC(t){return z.isInstance(t,fh)}const ph="FqnExpressions";function AU(t){return z.isInstance(t,ph)}const hh="FqnRef";function LC(t){return z.isInstance(t,hh)}const bl="FqnRefExpr";function Tv(t){return z.isInstance(t,bl)}const aa="GlobalDynamicPredicateGroup";function El(t){return z.isInstance(t,aa)}const ua="GlobalPredicateGroup";function $l(t){
|
|
1275
|
+
return z.isInstance(t,ua)}const ca="Globals";function Cv(t){return z.isInstance(t,ca)}const mh="GlobalStyle";function la(t){return z.isInstance(t,mh)}const gh="GlobalStyleGroup";function co(t){return z.isInstance(t,gh)}const Dl="GlobalStyleId",Rl="IconProperty";function Wr(t){return z.isInstance(t,Rl)}const kl="IncludePredicate";function yh(t){return z.isInstance(t,kl)}const Tl="IncomingRelationExpr";function Av(t){return z.isInstance(t,Tl)}const Cl="IncomingRelationExpression";function FC(t){return z.
|
|
1276
|
+
isInstance(t,Cl)}const Al="InOutRelationExpr";function MC(t){return z.isInstance(t,Al)}const Sl="InOutRelationExpression";function Sv(t){return z.isInstance(t,Sl)}const ki="LibIcon";function SU(t){return z.isInstance(t,ki)}const vh="LikeC4Grammar";function _U(t){return z.isInstance(t,vh)}const wh="LikeC4Lib";function BC(t){return z.isInstance(t,wh)}const _l="LineProperty";function Pl(t){return z.isInstance(t,_l)}const xl="LinkProperty";function bh(t){return z.isInstance(t,xl)}const Nl="MetadataA\
|
|
1277
|
+
ttribute";function PU(t){return z.isInstance(t,Nl)}const Il="MetadataBody";function xU(t){return z.isInstance(t,Il)}const da="Model";function jC(t){return z.isInstance(t,da)}const fa="ModelDeployments";function qC(t){return z.isInstance(t,fa)}const pa="ModelViews";function Ol(t){return z.isInstance(t,pa)}const Ll="MultipleProperty";function _v(t){return z.isInstance(t,Ll)}const Eh="NavigateToProperty";function $h(t){return z.isInstance(t,Eh)}const Fl="NotationProperty";function ha(t){return z.isInstance(
|
|
1278
|
+
t,Fl)}const Ml="NotesProperty";function GC(t){return z.isInstance(t,Ml)}const Bl="OpacityProperty";function Dh(t){return z.isInstance(t,Bl)}const jl="OutgoingRelationExpr";function Pv(t){return z.isInstance(t,jl)}const ql="OutgoingRelationExpression";function xv(t){return z.isInstance(t,ql)}const Gl="PaddingSizeProperty";function Nv(t){return z.isInstance(t,Gl)}const Rh="Predicates";function UC(t){return z.isInstance(t,Rh)}const kh="Relation";function Ti(t){return z.isInstance(t,kh)}const Th="Re\
|
|
1279
|
+
lationBody";function NU(t){return z.isInstance(t,Th)}const Ul="RelationNavigateToProperty";function Wl(t){return z.isInstance(t,Ul)}const zl="RelationPredicateWhere";function Iv(t){return z.isInstance(t,zl)}const Hl="RelationPredicateWhereV2";function IU(t){return z.isInstance(t,Hl)}const Vl="RelationPredicateWith";function Ov(t){return z.isInstance(t,Vl)}const es="RelationshipKind";function OU(t){return z.isInstance(t,es)}const Kl="RelationStringProperty";function Xl(t){return z.isInstance(t,Kl)}
|
|
1280
|
+
const Yl="RelationStyleProperty";function Ch(t){return z.isInstance(t,Yl)}const Jl="ShapeProperty";function Ah(t){return z.isInstance(t,Jl)}const Ql="ShapeSizeProperty";function Lv(t){return z.isInstance(t,Ql)}const Sh="SpecificationColor";function _h(t){return z.isInstance(t,Sh)}const ma="SpecificationDeploymentNodeKind";function ga(t){return z.isInstance(t,ma)}const ya="SpecificationElementKind";function va(t){return z.isInstance(t,ya)}const Zl="SpecificationElementStringProperty";function Fv(t){
|
|
1281
|
+
return z.isInstance(t,Zl)}const wa="SpecificationRelationshipKind";function ba(t){return z.isInstance(t,wa)}const ed="SpecificationRelationshipStringProperty";function WC(t){return z.isInstance(t,ed)}const Ea="SpecificationRule";function Mv(t){return z.isInstance(t,Ea)}const $a="SpecificationTag";function Ph(t){return z.isInstance(t,$a)}const xh="StrictFqnElementRef";function zC(t){return z.isInstance(t,xh)}const Nh="StrictFqnRef";function HC(t){return z.isInstance(t,Nh)}const ts="Tag";function VC(t){
|
|
1282
|
+
return z.isInstance(t,ts)}const Ih="Tags";function Bv(t){return z.isInstance(t,Ih)}const td="TextSizeProperty";function jv(t){return z.isInstance(t,td)}const qv="ViewRef",nd="ViewRuleAutoLayout";function rd(t){return z.isInstance(t,nd)}const id="ViewRuleGlobalPredicateRef";function Gv(t){return z.isInstance(t,id)}const sd="ViewRuleGlobalStyle";function Uv(t){return z.isInstance(t,sd)}const od="ViewRuleGroup";function Oh(t){return z.isInstance(t,od)}const ad="ViewRuleStyle";function ud(t){return z.
|
|
1283
|
+
isInstance(t,ad)}const cd="ViewStringProperty";function LU(t){return z.isInstance(t,cd)}const ld="WhereBinaryExpression";function FU(t){return z.isInstance(t,ld)}const dd="WhereElementKind";function MU(t){return z.isInstance(t,dd)}const fd="WhereElementNegation";function KC(t){return z.isInstance(t,fd)}const pd="WhereElementTag";function BU(t){return z.isInstance(t,pd)}const hd="WhereRelationKind";function XC(t){return z.isInstance(t,hd)}const md="WhereRelationNegation";function YC(t){return z.isInstance(
|
|
1284
|
+
t,md)}const gd="WhereRelationParticipantKind";function JC(t){return z.isInstance(t,gd)}const yd="WhereRelationParticipantTag";function QC(t){return z.isInstance(t,yd)}const vd="WhereRelationTag";function jU(t){return z.isInstance(t,vd)}const wd="WildcardExpression";function lo(t){return z.isInstance(t,wd)}class ZC extends m0{getAllTypes(){return[Vc,Xc,Yc,oo,Hp,Vp,Ji,Kp,Tp,Ur,Xp,Di,ov,Yp,Jp,Jc,Qp,Cp,Qc,Zp,Zc,el,tl,ia,eh,nl,rl,th,nh,Ev,Fc,rh,Dr,ih,sl,Mc,sh,Ri,ol,Sp,_p,Pp,al,ul,cl,ro,ll,fl,hl,ml,sa,
|
|
1285
|
+
lh,kv,gl,vl,uv,wl,dh,uo,fh,cv,Bc,ph,hh,bl,lv,aa,ua,mh,gh,Dl,ca,Rl,Al,Sl,kl,Tl,Cl,ki,vh,wh,io,_l,xl,Nl,Il,xp,da,fa,pa,Ll,Eh,Fl,Ml,Bl,jl,ql,Gl,fv,Rh,jc,kh,Th,Np,Ip,Ul,Op,Lp,Fp,zl,Hl,Vl,qc,Kl,Yl,es,Mp,Jl,Ql,hv,Sh,ma,ya,Zl,wa,ed,Ea,$a,xh,Nh,ta,na,ts,Ih,td,Bp,qv,Gc,nd,id,sd,od,jp,ad,Gp,cd,ld,Uc,Wc,dd,fd,pd,TC,Up,zc,Hc,hd,md,gd,yd,vd,Wp,wd]}computeIsSubtype(e,n){switch(e){case Vc:case _l:return this.isSubtype(Mp,n);case Xc:case Ll:case Bl:case Jl:return this.isSubtype(na,n);case Yc:return this.isSubtype(
|
|
1286
|
+
Mp,n)||this.isSubtype(na,n);case Ji:case Ur:return this.isSubtype(Tp,n)||this.isSubtype(jc,n);case Di:case Ri:return this.isSubtype(ov,n);case Jc:case ia:case sa:return this.isSubtype(io,n);case Qc:case Zc:return this.isSubtype(Cp,n);case el:case Tl:case Al:case jl:return this.isSubtype(Np,n);case tl:case Cl:case Sl:case ql:return this.isSubtype(Ip,n);case nl:case rl:return this.isSubtype(Fc,n);case Dr:return this.isSubtype(lv,n)||this.isSubtype(jc,n);case sl:case ol:case ll:case ml:case vl:return this.
|
|
1287
|
+
isSubtype(Mc,n);case Mc:case al:return this.isSubtype(_p,n);case Sp:case Op:return this.isSubtype(fv,n);case _p:case cl:return this.isSubtype(Sp,n);case Pp:case Fp:return this.isSubtype(uv,n);case ul:case Bc:return this.isSubtype(Pp,n);case fl:return this.isSubtype(ro,n)||this.isSubtype(ta,n);case hl:return this.isSubtype(ro,n);case gl:case kl:return this.isSubtype(jp,n);case wl:case uo:case jc:return this.isSubtype(lv,n);case bl:return this.isSubtype(Bc,n);case Rl:return this.isSubtype(ro,n)||this.
|
|
1288
|
+
isSubtype(na,n);case xl:return this.isSubtype(ro,n)||this.isSubtype(cv,n)||this.isSubtype(qc,n)||this.isSubtype(Bp,n);case Nl:case Fl:case Ml:case Zl:case ed:return this.isSubtype(ta,n);case Il:return this.isSubtype(xp,n);case xp:return this.isSubtype(ro,n)||this.isSubtype(cv,n)||this.isSubtype(qc,n);case Gl:case Ql:case td:return this.isSubtype(hv,n)||this.isSubtype(na,n);case Np:case Hl:return this.isSubtype(Fp,n);case Ip:case zl:return this.isSubtype(Lp,n);case Ul:case Yl:return this.isSubtype(
|
|
1289
|
+
qc,n);case Lp:case Vl:return this.isSubtype(Op,n);case Kl:return this.isSubtype(qc,n)||this.isSubtype(ta,n);case nd:return this.isSubtype(Cp,n)||this.isSubtype(Fc,n)||this.isSubtype(Gc,n);case id:case od:case jp:return this.isSubtype(Gc,n);case sd:case ad:return this.isSubtype(Gp,n);case Gp:return this.isSubtype(Fc,n)||this.isSubtype(Gc,n);case cd:return this.isSubtype(ta,n)||this.isSubtype(Bp,n);case ld:return this.isSubtype(Wc,n)||this.isSubtype(Hc,n);case Uc:case fd:return this.isSubtype(Wc,n);case Wc:case Hc:
|
|
1290
|
+
return this.isSubtype(TC,n);case dd:return this.isSubtype(Uc,n)||this.isSubtype(Up,n);case pd:return this.isSubtype(Uc,n)||this.isSubtype(Wp,n);case zc:case md:return this.isSubtype(Hc,n);case hd:case gd:return this.isSubtype(Up,n)||this.isSubtype(zc,n);case yd:case vd:return this.isSubtype(zc,n)||this.isSubtype(Wp,n);case wd:return this.isSubtype(Mc,n)||this.isSubtype(Bc,n);default:return!1}}getReferenceType(e){const n=`${e.container.$type}:${e.property}`;switch(n){case"ColorProperty:customColo\
|
|
1291
|
+
r":return oo;case"DeploymentNode:kind":return Di;case"DeploymentRelation:kind":case"DynamicViewStep:kind":case"OutgoingRelationExpr:kind":case"OutgoingRelationExpression:kind":case"Relation:kind":case"WhereRelationKind:value":return es;case"DynamicViewGlobalPredicateRef:predicate":return aa;case"DynamicViewRef:view":return ia;case"Element:kind":case"ElementKindExpression:kind":return Ri;case"ElementRef:el":case"StrictFqnElementRef:el":return Dr;case"ElementTagExpression:tag":case"Tags:values":case"\
|
|
1292
|
+
WhereElementTag:value":case"WhereRelationParticipantTag:value":case"WhereRelationTag:value":return ts;case"ElementViewRef:view":return sa;case"FqnRef:value":case"StrictFqnRef:value":return jc;case"IconProperty:libicon":return ki;case"ViewRef:view":return io;case"ViewRuleGlobalPredicateRef:predicate":return ua;case"ViewRuleGlobalStyle:style":return Dl;case"WhereElementKind:value":case"WhereRelationParticipantKind:value":return ov;default:throw new Error(`${n} is not a valid reference id.`)}}getTypeMetaData(e){
|
|
1293
|
+
switch(e){case Vc:return{name:Vc,properties:[{name:"key"},{name:"value"}]};case Xc:return{name:Xc,properties:[{name:"key"},{name:"value"}]};case Yc:return{name:Yc,properties:[{name:"customColor"},{name:"key"},{name:"themeColor"}]};case oo:return{name:oo,properties:[{name:"name"}]};case Hp:return{name:Hp,properties:[{name:"props",defaultValue:[]}]};case Vp:return{name:Vp,properties:[{name:"props",defaultValue:[]}]};case Ji:return{name:Ji,properties:[{name:"body"},{name:"element"},{name:"name"},{name:"\
|
|
1294
|
+
title"}]};case Kp:return{name:Kp,properties:[{name:"props",defaultValue:[]},{name:"tags"}]};case Ur:return{name:Ur,properties:[{name:"body"},{name:"kind"},{name:"name"},{name:"title"}]};case Xp:return{name:Xp,properties:[{name:"elements",defaultValue:[]},{name:"props",defaultValue:[]},{name:"tags"}]};case Di:return{name:Di,properties:[{name:"name"}]};case Yp:return{name:Yp,properties:[{name:"body"},{name:"kind"},{name:"source"},{name:"tags"},{name:"target"},{name:"technology"},{name:"title"}]};case Jp:
|
|
1295
|
+
return{name:Jp,properties:[{name:"props",defaultValue:[]},{name:"tags"}]};case Jc:return{name:Jc,properties:[{name:"body"},{name:"name"}]};case Qp:return{name:Qp,properties:[{name:"props",defaultValue:[]},{name:"rules",defaultValue:[]},{name:"tags"}]};case Qc:return{name:Qc,properties:[{name:"expr"},{name:"isInclude",defaultValue:!1}]};case Zp:return{name:Zp,properties:[{name:"prev"},{name:"value"}]};case Zc:return{name:Zc,properties:[{name:"props",defaultValue:[]},{name:"targets"}]};case el:return{
|
|
1296
|
+
name:el,properties:[{name:"source"},{name:"target"}]};case tl:return{name:tl,properties:[{name:"source"},{name:"target"}]};case ia:return{name:ia,properties:[{name:"body"},{name:"name"}]};case eh:return{name:eh,properties:[{name:"props",defaultValue:[]},{name:"rules",defaultValue:[]},{name:"steps",defaultValue:[]},{name:"tags"}]};case nl:return{name:nl,properties:[{name:"predicate"}]};case rl:return{name:rl,properties:[{name:"predicates"}]};case th:return{name:th,properties:[{name:"steps",defaultValue:[]}]};case nh:
|
|
1297
|
+
return{name:nh,properties:[{name:"prev"},{name:"value"}]};case Ev:return{name:Ev,properties:[{name:"view"}]};case rh:return{name:rh,properties:[{name:"custom"},{name:"isBackward",defaultValue:!1},{name:"kind"},{name:"source"},{name:"target"},{name:"title"}]};case Dr:return{name:Dr,properties:[{name:"body"},{name:"kind"},{name:"name"},{name:"props",defaultValue:[]}]};case ih:return{name:ih,properties:[{name:"elements",defaultValue:[]},{name:"props",defaultValue:[]},{name:"tags"}]};case sl:return{
|
|
1298
|
+
name:sl,properties:[{name:"parent"},{name:"suffix"}]};case sh:return{name:sh,properties:[{name:"prev"},{name:"value"}]};case Ri:return{name:Ri,properties:[{name:"name"}]};case ol:return{name:ol,properties:[{name:"isEqual",defaultValue:!1},{name:"kind"}]};case al:return{name:al,properties:[{name:"subject"},{name:"where"}]};case ul:return{name:ul,properties:[{name:"subject"},{name:"where"}]};case cl:return{name:cl,properties:[{name:"custom"},{name:"subject"}]};case ll:return{name:ll,properties:[{name:"\
|
|
1299
|
+
el"},{name:"parent"}]};case fl:return{name:fl,properties:[{name:"key"},{name:"value"}]};case hl:return{name:hl,properties:[{name:"key"},{name:"props",defaultValue:[]}]};case ml:return{name:ml,properties:[{name:"isEqual",defaultValue:!1},{name:"tag"}]};case sa:return{name:sa,properties:[{name:"body"},{name:"extends"},{name:"name"},{name:"viewOf"}]};case lh:return{name:lh,properties:[{name:"props",defaultValue:[]},{name:"rules",defaultValue:[]},{name:"tags"}]};case kv:return{name:kv,properties:[{name:"\
|
|
1300
|
+
view"}]};case gl:return{name:gl,properties:[{name:"predicates"}]};case vl:return{name:vl,properties:[{name:"expand"}]};case wl:return{name:wl,properties:[{name:"body"},{name:"deploymentNode"}]};case dh:return{name:dh,properties:[{name:"elements",defaultValue:[]},{name:"props",defaultValue:[]},{name:"tags"}]};case uo:return{name:uo,properties:[{name:"body"},{name:"element"}]};case fh:return{name:fh,properties:[{name:"elements",defaultValue:[]},{name:"props",defaultValue:[]},{name:"tags"}]};case ph:
|
|
1301
|
+
return{name:ph,properties:[{name:"prev"},{name:"value"}]};case hh:return{name:hh,properties:[{name:"parent"},{name:"value"}]};case bl:return{name:bl,properties:[{name:"ref"},{name:"selector"}]};case aa:return{name:aa,properties:[{name:"name"},{name:"predicates",defaultValue:[]}]};case ua:return{name:ua,properties:[{name:"name"},{name:"predicates",defaultValue:[]}]};case ca:return{name:ca,properties:[{name:"name"},{name:"predicates",defaultValue:[]},{name:"styles",defaultValue:[]}]};case mh:return{
|
|
1302
|
+
name:mh,properties:[{name:"id"},{name:"props",defaultValue:[]},{name:"target"}]};case gh:return{name:gh,properties:[{name:"id"},{name:"styles",defaultValue:[]}]};case Dl:return{name:Dl,properties:[{name:"name"}]};case Rl:return{name:Rl,properties:[{name:"key"},{name:"libicon"},{name:"value"}]};case kl:return{name:kl,properties:[{name:"predicates"}]};case Tl:return{name:Tl,properties:[{name:"to"}]};case Cl:return{name:Cl,properties:[{name:"to"}]};case Al:return{name:Al,properties:[{name:"inout"}]};case Sl:
|
|
1303
|
+
return{name:Sl,properties:[{name:"inout"}]};case ki:return{name:ki,properties:[{name:"name"}]};case vh:return{name:vh,properties:[{name:"deployments",defaultValue:[]},{name:"globals",defaultValue:[]},{name:"likec4lib",defaultValue:[]},{name:"models",defaultValue:[]},{name:"specifications",defaultValue:[]},{name:"views",defaultValue:[]}]};case wh:return{name:wh,properties:[{name:"icons",defaultValue:[]}]};case _l:return{name:_l,properties:[{name:"key"},{name:"value"}]};case xl:return{name:xl,properties:[
|
|
1304
|
+
{name:"key"},{name:"title"},{name:"value"}]};case Nl:return{name:Nl,properties:[{name:"key"},{name:"value"}]};case Il:return{name:Il,properties:[{name:"props",defaultValue:[]}]};case da:return{name:da,properties:[{name:"elements",defaultValue:[]},{name:"name"}]};case fa:return{name:fa,properties:[{name:"elements",defaultValue:[]},{name:"name"}]};case pa:return{name:pa,properties:[{name:"name"},{name:"styles",defaultValue:[]},{name:"views",defaultValue:[]}]};case Ll:return{name:Ll,properties:[{name:"\
|
|
1305
|
+
key"},{name:"value"}]};case Eh:return{name:Eh,properties:[{name:"key"},{name:"value"}]};case Fl:return{name:Fl,properties:[{name:"key"},{name:"value"}]};case Ml:return{name:Ml,properties:[{name:"key"},{name:"value"}]};case Bl:return{name:Bl,properties:[{name:"key"},{name:"value"}]};case jl:return{name:jl,properties:[{name:"from"},{name:"isBidirectional",defaultValue:!1},{name:"kind"}]};case ql:return{name:ql,properties:[{name:"from"},{name:"isBidirectional",defaultValue:!1},{name:"kind"}]};case Gl:
|
|
1306
|
+
return{name:Gl,properties:[{name:"key"},{name:"value"}]};case Rh:return{name:Rh,properties:[{name:"prev"},{name:"value"}]};case kh:return{name:kh,properties:[{name:"body"},{name:"kind"},{name:"source"},{name:"tags"},{name:"target"},{name:"technology"},{name:"title"}]};case Th:return{name:Th,properties:[{name:"props",defaultValue:[]},{name:"tags"}]};case Ul:return{name:Ul,properties:[{name:"key"},{name:"value"}]};case zl:return{name:zl,properties:[{name:"subject"},{name:"where"}]};case Hl:return{
|
|
1307
|
+
name:Hl,properties:[{name:"subject"},{name:"where"}]};case Vl:return{name:Vl,properties:[{name:"custom"},{name:"subject"}]};case es:return{name:es,properties:[{name:"name"}]};case Kl:return{name:Kl,properties:[{name:"key"},{name:"value"}]};case Yl:return{name:Yl,properties:[{name:"key"},{name:"props",defaultValue:[]}]};case Jl:return{name:Jl,properties:[{name:"key"},{name:"value"}]};case Ql:return{name:Ql,properties:[{name:"key"},{name:"value"}]};case Sh:return{name:Sh,properties:[{name:"color"},
|
|
1308
|
+
{name:"name"}]};case ma:return{name:ma,properties:[{name:"kind"},{name:"props",defaultValue:[]}]};case ya:return{name:ya,properties:[{name:"kind"},{name:"props",defaultValue:[]}]};case Zl:return{name:Zl,properties:[{name:"key"},{name:"value"}]};case wa:return{name:wa,properties:[{name:"kind"},{name:"props",defaultValue:[]}]};case ed:return{name:ed,properties:[{name:"key"},{name:"value"}]};case Ea:return{name:Ea,properties:[{name:"colors",defaultValue:[]},{name:"deploymentNodes",defaultValue:[]},
|
|
1309
|
+
{name:"elements",defaultValue:[]},{name:"name"},{name:"relationships",defaultValue:[]},{name:"tags",defaultValue:[]}]};case $a:return{name:$a,properties:[{name:"tag"}]};case xh:return{name:xh,properties:[{name:"el"},{name:"parent"}]};case Nh:return{name:Nh,properties:[{name:"parent"},{name:"value"}]};case ts:return{name:ts,properties:[{name:"name"}]};case Ih:return{name:Ih,properties:[{name:"prev"},{name:"values",defaultValue:[]}]};case td:return{name:td,properties:[{name:"key"},{name:"value"}]};case qv:
|
|
1310
|
+
return{name:qv,properties:[{name:"view"}]};case nd:return{name:nd,properties:[{name:"direction"},{name:"nodeSep"},{name:"rankSep"}]};case id:return{name:id,properties:[{name:"predicate"}]};case sd:return{name:sd,properties:[{name:"style"}]};case od:return{name:od,properties:[{name:"groupRules",defaultValue:[]},{name:"props",defaultValue:[]},{name:"title"}]};case ad:return{name:ad,properties:[{name:"props",defaultValue:[]},{name:"target"}]};case cd:return{name:cd,properties:[{name:"key"},{name:"v\
|
|
1311
|
+
alue"}]};case ld:return{name:ld,properties:[{name:"left"},{name:"operator"},{name:"right"}]};case dd:return{name:dd,properties:[{name:"not",defaultValue:!1},{name:"operator"},{name:"value"}]};case fd:return{name:fd,properties:[{name:"value"}]};case pd:return{name:pd,properties:[{name:"not",defaultValue:!1},{name:"operator"},{name:"value"}]};case hd:return{name:hd,properties:[{name:"not",defaultValue:!1},{name:"operator"},{name:"value"}]};case md:return{name:md,properties:[{name:"value"}]};case gd:
|
|
1312
|
+
return{name:gd,properties:[{name:"not",defaultValue:!1},{name:"operator"},{name:"participant"},{name:"value"}]};case yd:return{name:yd,properties:[{name:"not",defaultValue:!1},{name:"operator"},{name:"participant"},{name:"value"}]};case vd:return{name:vd,properties:[{name:"not",defaultValue:!1},{name:"operator"},{name:"value"}]};case wd:return{name:wd,properties:[{name:"isWildcard",defaultValue:!1}]};default:return{name:e,properties:[]}}}}const z=new ZC;let eA;const qU=()=>eA??(eA=KG(`{"$type":"\
|
|
1313
|
+
Grammar","isDeclared":true,"name":"LikeC4","rules":[{"$type":"ParserRule","entry":true,"name":"LikeC4Grammar","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"specifications","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"models","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"views","operator":"+=","terminal"\
|
|
1314
|
+
:{"$type":"RuleCall","rule":{"$ref":"#/rules@35"},"arguments":[]}},{"$type":"Assignment","feature":"globals","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@124"},"arguments":[]}},{"$type":"Assignment","feature":"deployments","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@96"},"arguments":[]}},{"$type":"Assignment","feature":"likec4lib","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"},"d\
|
|
1315
|
+
efinesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"LikeC4Lib","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"likec4lib"},{"$type":"Keyword","value":"{"},{"$type":"Keyword","value":"icons"},{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"icons","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},"cardinality":"+"},{"$type":"Keyword","value":"}"},\
|
|
1316
|
+
{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"LibIcon","definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@154"},"arguments":[]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ElementKind","definition":{"$t\
|
|
1317
|
+
ype":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Tag","definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"par\
|
|
1318
|
+
ameters":[],"wildcard":false},{"$type":"ParserRule","name":"RelationshipKind","definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CustomColor","definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1\
|
|
1319
|
+
58"},"arguments":[]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DeploymentNodeKind","definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"SpecificationRule","definition"\
|
|
1320
|
+
:{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"specification"}},{"$type":"Keyword","value":"{"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","fe\
|
|
1321
|
+
ature":"relationships","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Assignment","feature":"colors","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"deploymentNodes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}],"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":\
|
|
1322
|
+
false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"SpecificationElementKind","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"element"},{"$type":"Assignment","feature":"kind","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"Alternatives","elements":[{"$type":"Ru\
|
|
1323
|
+
leCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@143"},"arguments":[]}]},"cardinality":"*"},{"$type":"Keyword","value":"}"}],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"SpecificationElementStringProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Alternatives"\
|
|
1324
|
+
,"elements":[{"$type":"Keyword","value":"technology"},{"$type":"Keyword","value":"notation"}]}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@177"},"arguments":[]}},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"SpecificationDeploymentNodeK\
|
|
1325
|
+
ind","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"deploymentNode"},{"$type":"Assignment","feature":"kind","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@143"}\
|
|
1326
|
+
,"arguments":[]}]},"cardinality":"*"},{"$type":"Keyword","value":"}"}],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"SpecificationTag","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"tag"},{"$type":"Assignment","feature":"tag","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,\
|
|
1327
|
+
"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"SpecificationColor","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"color"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"color","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@153"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":fa\
|
|
1328
|
+
lse,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"SpecificationRelationshipKind","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"relationship"},{"$type":"Assignment","feature":"kind","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"Alternatives"\
|
|
1329
|
+
,"elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@146"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}]},"cardinality":"*"},{"$type":"Keyword","value":"}"}],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"SpecificationRelationshipStringProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","ter\
|
|
1330
|
+
minal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"technology"},{"$type":"Keyword","value":"notation"}]}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@177"},"arguments":[]}},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name"\
|
|
1331
|
+
:"Model","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"model"}},{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[{"$type":"NamedArgument","value":{"$type":"BooleanLiteral","true":true},"calledByN\
|
|
1332
|
+
ame":false}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Element","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"kind","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/\
|
|
1333
|
+
rules@3"},"deprecatedSyntax":false}},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@175"},"arguments":[]},{"$type":"Assignment","feature":"kind","operator":"=","terminal":{"$type":"CrossReference","type":{"$r\
|
|
1334
|
+
ef":"#/rules@3"},"deprecatedSyntax":false}}]}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@177"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@177"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$\
|
|
1335
|
+
ref":"#/rules@177"},"arguments":[]}},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@177"},"arguments":[]},"cardinality":"?"}],"cardinality":"?"}],"cardinality":"?"}],"cardinality":"?"},{"$type":"Assignment","feature":"body","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildca\
|
|
1336
|
+
rd":false},{"$type":"ParserRule","name":"ElementBody","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"tags","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"cardinality":"*"},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"\
|
|
1337
|
+
$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[{"$type":"NamedArgument","value":{"$type":"BooleanLiteral","true":false},"calledByName":false}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ElementProperty","definition":{"$type":"Altern\
|
|
1338
|
+
atives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@143"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@130"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@134"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@32"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ElementSt\
|
|
1339
|
+
ringProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"title"},{"$type":"Keyword","value":"technology"},{"$type":"Keyword","value":"description"}]}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@177"},"arguments":[]}},{"$type":"Keyword","value":";","cardina\
|
|
1340
|
+
lity":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ExtendElement","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"extend"},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]}},{"$type":"Assignment","feature":"body","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arg\
|
|
1341
|
+
uments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ExtendElementBody","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"tags","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":\
|
|
1342
|
+
"#/rules@23"},"arguments":[]},"cardinality":"*"},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[{"$type":"NamedArgument","value":{"$type":"BooleanLiteral","true":true},"calledByName":false}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenT\
|
|
1343
|
+
okens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ExtendElementProperty","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@130"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@32"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"StrictFqnElementRef","definition":{"$type":"Group","elements":[{"$type":"Assignm\
|
|
1344
|
+
ent","feature":"el","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@17"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"StrictFqnElementRef"},"feature":"parent","operator":"="},{"$type":"RuleCall","rule":{"$ref":"#/rules@172"},"arguments":[]},{"$type":"Assignment","feature":"el","operator":"=","terminal":{"$type":"Cross\
|
|
1345
|
+
Reference","type":{"$ref":"#/rules@17"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]},"deprecatedSyntax":false}}],"cardinality":"*"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ElementRef","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"el","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@17"},"terminal":{"$type":"\
|
|
1346
|
+
RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"ElementRef"},"feature":"parent","operator":"="},{"$type":"RuleCall","rule":{"$ref":"#/rules@172"},"arguments":[]},{"$type":"Assignment","feature":"el","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@17"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]},"deprecatedSyn\
|
|
1347
|
+
tax":false}}],"cardinality":"*"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Tags","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"values","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@4"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@156"},"arguments":[]},"deprecatedSyntax":false},"cardinality":"+"},{"$type":"Group","elements":[{"$\
|
|
1348
|
+
type":"Action","inferredType":{"$type":"InferredType","name":"Tags"},"feature":"prev","operator":"="},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"values","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@4"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@156"},"arguments":[]},"deprecatedSyntax":false},"cardinality":"*"}],"cardinality":"*"},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragmen\
|
|
1349
|
+
t":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Relation","parameters":[{"$type":"Parameter","name":"isExplicit"}],"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","guardCondition":{"$type":"ParameterReference","parameter":{"$ref":"#/rules@27/parameters@0"}},"elements":[{"$type":"Assignment","feature":"source","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]}}]},{"$ty\
|
|
1350
|
+
pe":"Group","guardCondition":{"$type":"Negation","value":{"$type":"ParameterReference","parameter":{"$ref":"#/rules@27/parameters@0"}}},"elements":[{"$type":"Assignment","feature":"source","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},"cardinality":"?"}]}]},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"kind","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@5"},"terminal":{"$type":"RuleCall","rule":{"$r\
|
|
1351
|
+
ef":"#/rules@157"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-["},{"$type":"Assignment","feature":"kind","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@5"},"deprecatedSyntax":false}},{"$type":"Keyword","value":"]->"}]},{"$type":"Keyword","value":"->"}]},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]}},{"$type":"Group","elements\
|
|
1352
|
+
":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@177"},"arguments":[]}},{"$type":"Assignment","feature":"technology","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@177"},"arguments":[]},"cardinality":"?"}],"cardinality":"?"},{"$type":"Assignment","feature":"tags","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"body",\
|
|
1353
|
+
"operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"wildcard":false},{"$type":"ParserRule","name":"RelationBody","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"tags","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","fea\
|
|
1354
|
+
ture":"props","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"RelationProperty","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@95"},"arguments":[]},{"$\
|
|
1355
|
+
type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@130"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@32"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"RelationStringProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Alternatives","elements"\
|
|
1356
|
+
:[{"$type":"Keyword","value":"title"},{"$type":"Keyword","value":"technology"},{"$type":"Keyword","value":"description"}]}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@177"},"arguments":[]}},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"\
|
|
1357
|
+
RelationStyleProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Keyword","value":"style"}},{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@146"},"arguments":[]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$ty\
|
|
1358
|
+
pe":"ParserRule","name":"MetadataProperty","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"metadata"},{"$type":"RuleCall","rule":{"$ref":"#/rules@33"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"MetadataBody","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"Rul\
|
|
1359
|
+
eCall","rule":{"$ref":"#/rules@34"},"arguments":[]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"MetadataAttribute","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@178"},"arguments":[]}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"As\
|
|
1360
|
+
signment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@177"},"arguments":[]}},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ModelViews","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"views"}},{"$type":"Keyword","value":"{"\
|
|
1361
|
+
},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"views","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@36"},"arguments":[]}},{"$type":"Assignment","feature":"styles","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@88"},"arguments":[]}}],"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"\
|
|
1362
|
+
LikeC4ViewRule","returnType":{"$ref":"#/types@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@37"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@38"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@107"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ElementView","definition":{"$type":"Group","elements":[{"$type\
|
|
1363
|
+
":"Keyword","value":"view"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"extends"},{"$type":"Assignment","feature":"extends","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@40"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"of"},{"$type":"Assignment"\
|
|
1364
|
+
,"feature":"viewOf","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]}}]}],"cardinality":"?"},{"$type":"Assignment","feature":"body","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@42"},"arguments":[]},"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DynamicView","definition":{"$type":"Group","elements":[{"$type":"Keyword",\
|
|
1365
|
+
"value":"dynamic"},{"$type":"Keyword","value":"view"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]}},{"$type":"Assignment","feature":"body","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@43"},"arguments":[]},"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ViewRef","definition":\
|
|
1366
|
+
{"$type":"Assignment","feature":"view","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/types@0"},"deprecatedSyntax":false}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ElementViewRef","definition":{"$type":"Assignment","feature":"view","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@37"},"deprecatedSyntax":false}},"definesHiddenTokens":false,"entry":f\
|
|
1367
|
+
alse,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DynamicViewRef","definition":{"$type":"Assignment","feature":"view","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@38"},"deprecatedSyntax":false}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ElementViewBody","definition":{"$type":"Group","elements":[{"$type":"Keyword","\
|
|
1368
|
+
value":"{"},{"$type":"Assignment","feature":"tags","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@44"},"arguments":[]},"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@47"},"arguments":[]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"de\
|
|
1369
|
+
finesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DynamicViewBody","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"tags","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@44"},"argum\
|
|
1370
|
+
ents":[]},"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"steps","operator":"+=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]}]}},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@49"},"arguments":[]}}],"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHidd\
|
|
1371
|
+
enTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ViewProperty","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@45"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@130"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ViewStringProperty","definition":{\
|
|
1372
|
+
"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"title"},{"$type":"Keyword","value":"description"}]}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@177"},"arguments":[]}},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":fal\
|
|
1373
|
+
se,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ViewLayoutDirection","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"TopBottom"},{"$type":"Keyword","value":"LeftRight"},{"$type":"Keyword","value":"BottomTop"},{"$type":"Keyword","value":"RightLeft"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ViewRule","definition"\
|
|
1374
|
+
:{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@55"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@88"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@89"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","na\
|
|
1375
|
+
me":"ViewRuleGroup","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@177"},"arguments":[]},"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@131"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@137"},\
|
|
1376
|
+
"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@132"},"arguments":[]}]},"cardinality":"*"},{"$type":"Assignment","feature":"groupRules","operator":"+=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":\
|
|
1377
|
+
false},{"$type":"ParserRule","name":"DynamicViewRule","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@83"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@84"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@88"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@89"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","n\
|
|
1378
|
+
ame":"DynamicViewParallelSteps","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"parallel"},{"$type":"Keyword","value":"par"}]},{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"steps","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wild\
|
|
1379
|
+
card":false},{"$type":"ParserRule","name":"DynamicViewStep","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"source","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"isBackward","operator":"?=","terminal":{"$type":"Keyword","value":"<-"}},{"$type":"Keyword","value":"->"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-["},{"$type":"Assignment","featu\
|
|
1380
|
+
re":"kind","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@5"},"deprecatedSyntax":false}},{"$type":"Keyword","value":"]->"}]},{"$type":"Assignment","feature":"kind","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@5"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@157"},"arguments":[]},"deprecatedSyntax":false}}]},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"argu\
|
|
1381
|
+
ments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@177"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"custom","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@93"},"arguments":[]},"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ViewRulePredicate","definition":{"$type":"A\
|
|
1382
|
+
lternatives","elements":[{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"IncludePredicate"}},{"$type":"Keyword","value":"include"},{"$type":"Assignment","feature":"predicates","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@53"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"ExcludePredicate"}},{"$type":"Keyword","value":"exclude"},{"$type":"Assignment","feature":\
|
|
1383
|
+
"predicates","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@53"},"arguments":[]}}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Predicates","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@54"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"\
|
|
1384
|
+
$type":"InferredType","name":"Predicates"},"feature":"prev","operator":"="},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@54"},"arguments":[]},"cardinality":"?"}],"cardinality":"*"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Predicate","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall"\
|
|
1385
|
+
,"rule":{"$ref":"#/rules@68"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@56"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ViewRuleGlobalPredicateRef","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"global"},{"$type":"Keyword","value":"predicate"},{"$type":"Assignment","feature":"predicate","operator":"=","terminal":{"$type":"CrossReference","ty\
|
|
1386
|
+
pe":{"$ref":"#/rules@125"},"deprecatedSyntax":false}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ElementPredicate","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@57"},"arguments":[]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ElementPredicates","inferredType":{"$type":"InferredType","name":"\
|
|
1387
|
+
ElementPredicate"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@58"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"ElementPredicateWith"},"feature":"subject","operator":"="},{"$type":"Keyword","value":"with"},{"$type":"Assignment","feature":"custom","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@92"},"arguments":[]},"cardinality":"?"}],"cardinality":"?"}]},"definesHidde\
|
|
1388
|
+
nTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ElementPredicateOrWhere","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@65"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"ElementPredicateWhere"},"feature":"subject","operator":"="},{"$type":"Keyword","value":"where"},{"$type":"Assignment","feature":"where","operator"\
|
|
1389
|
+
:"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@59"},"arguments":[]},"cardinality":"?"}],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"WhereElementExpression","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@60"},"arguments":[]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","n\
|
|
1390
|
+
ame":"WhereElementOr","inferredType":{"$type":"InferredType","name":"WhereElementExpression"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@61"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"WhereBinaryExpression"},"feature":"left","operator":"="},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"or"}},{"$type":"Assignment","feature":"right","oper\
|
|
1391
|
+
ator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@61"},"arguments":[]}}],"cardinality":"*"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"WhereElementAnd","inferredType":{"$type":"InferredType","name":"WhereElementExpression"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@62"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Action","inferr\
|
|
1392
|
+
edType":{"$type":"InferredType","name":"WhereBinaryExpression"},"feature":"left","operator":"="},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"and"}},{"$type":"Assignment","feature":"right","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@62"},"arguments":[]}}],"cardinality":"*"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Wher\
|
|
1393
|
+
eElementPrimary","inferredType":{"$type":"InferredType","name":"WhereElementExpression"},"definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"RuleCall","rule":{"$ref":"#/rules@59"},"arguments":[]},{"$type":"Keyword","value":")"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@63"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@64"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenToke\
|
|
1394
|
+
ns":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"WhereElementNegation","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"not"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@59"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"WhereElement","definition":{"$type":"Alternatives","elem\
|
|
1395
|
+
ents":[{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"WhereElementTag"}},{"$type":"Keyword","value":"tag"},{"$type":"RuleCall","rule":{"$ref":"#/rules@160"},"arguments":[]},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@4"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@156"},"arguments":[]},"deprecatedSyntax":false},"cardinality":"?"}]},{"$type":"Group","elements":[{"$type\
|
|
1396
|
+
":"Action","inferredType":{"$type":"InferredType","name":"WhereElementKind"}},{"$type":"Keyword","value":"kind"},{"$type":"RuleCall","rule":{"$ref":"#/rules@160"},"arguments":[]},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/types@2"},"deprecatedSyntax":false},"cardinality":"?"}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ElementExpr\
|
|
1397
|
+
ession","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@66"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@67"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ElementSelectorExpression","inferredType":{"$type":"InferredType","name":"ElementExpression"},"definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements"\
|
|
1398
|
+
:[{"$type":"Action","inferredType":{"$type":"InferredType","name":"WildcardExpression"}},{"$type":"Assignment","feature":"isWildcard","operator":"?=","terminal":{"$type":"Keyword","value":"*"}}]},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"ElementTagExpression"}},{"$type":"Keyword","value":"element.tag"},{"$type":"RuleCall","rule":{"$ref":"#/rules@161"},"arguments":[]},{"$type":"Assignment","feature":"tag","operator":"=","terminal":{"$type":"Cros\
|
|
1399
|
+
sReference","type":{"$ref":"#/rules@4"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@156"},"arguments":[]},"deprecatedSyntax":false},"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"ElementKindExpression"}},{"$type":"Keyword","value":"element.kind"},{"$type":"RuleCall","rule":{"$ref":"#/rules@161"},"arguments":[]},{"$type":"Assignment","feature":"kind","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#\
|
|
1400
|
+
/rules@3"},"deprecatedSyntax":false},"cardinality":"?"}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ElementDescedantsExpression","inferredType":{"$type":"InferredType","name":"ElementExpression"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Action","inferredType\
|
|
1401
|
+
":{"$type":"InferredType","name":"ExpandElementExpression"},"feature":"expand","operator":"="},{"$type":"RuleCall","rule":{"$ref":"#/rules@169"},"arguments":[]}]},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"ElementDescedantsExpression"},"feature":"parent","operator":"="},{"$type":"Assignment","feature":"suffix","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@170"},"arguments":[]}}]}],"cardinality":"?"}]},"definesHiddenTokens\
|
|
1402
|
+
":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"RelationPredicate","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@69"},"arguments":[]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"RelationPredicates","inferredType":{"$type":"InferredType","name":"RelationPredicate"},"definition":{"$type":"Group","elements":[{"$type":"Ru\
|
|
1403
|
+
leCall","rule":{"$ref":"#/rules@70"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"RelationPredicateWith"},"feature":"subject","operator":"="},{"$type":"Keyword","value":"with"},{"$type":"Assignment","feature":"custom","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@93"},"arguments":[]},"cardinality":"?"}],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"paramet\
|
|
1404
|
+
ers":[],"wildcard":false},{"$type":"ParserRule","name":"RelationPredicateOrWhere","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@77"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"RelationPredicateWhere"},"feature":"subject","operator":"="},{"$type":"Keyword","value":"where"},{"$type":"Assignment","feature":"where","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@71"},"argu\
|
|
1405
|
+
ments":[]},"cardinality":"?"}],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"WhereRelationExpression","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@72"},"arguments":[]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"WhereRelationOr","inferredType":{"$type":"InferredType","name":\
|
|
1406
|
+
"WhereRelationExpression"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@73"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"WhereBinaryExpression"},"feature":"left","operator":"="},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"or"}},{"$type":"Assignment","feature":"right","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@73\
|
|
1407
|
+
"},"arguments":[]}}],"cardinality":"*"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"WhereRelationAnd","inferredType":{"$type":"InferredType","name":"WhereRelationExpression"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@74"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"WhereBinaryExpression"},"\
|
|
1408
|
+
feature":"left","operator":"="},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"and"}},{"$type":"Assignment","feature":"right","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@74"},"arguments":[]}}],"cardinality":"*"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"WhereRelationPrimary","inferredType":{"$type":"InferredType","name":"\
|
|
1409
|
+
WhereRelationExpression"},"definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"RuleCall","rule":{"$ref":"#/rules@71"},"arguments":[]},{"$type":"Keyword","value":")"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@75"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@76"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule",\
|
|
1410
|
+
"name":"WhereRelationNegation","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"not"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@71"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"WhereRelation","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Action","inferr\
|
|
1411
|
+
edType":{"$type":"InferredType","name":"WhereRelationTag"}},{"$type":"Keyword","value":"tag"},{"$type":"RuleCall","rule":{"$ref":"#/rules@160"},"arguments":[]},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@4"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@156"},"arguments":[]},"deprecatedSyntax":false},"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"Wh\
|
|
1412
|
+
ereRelationKind"}},{"$type":"Keyword","value":"kind"},{"$type":"RuleCall","rule":{"$ref":"#/rules@160"},"arguments":[]},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@5"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]},"deprecatedSyntax":false},"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"WhereRelationParticipantTag"}},{"$type":"A\
|
|
1413
|
+
ssignment","feature":"participant","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@152"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@172"},"arguments":[]},{"$type":"Keyword","value":"tag"},{"$type":"RuleCall","rule":{"$ref":"#/rules@160"},"arguments":[]},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@4"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@156"},"arguments":[]},"deprecat\
|
|
1414
|
+
edSyntax":false},"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"WhereRelationParticipantKind"}},{"$type":"Assignment","feature":"participant","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@152"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@172"},"arguments":[]},{"$type":"Keyword","value":"kind"},{"$type":"RuleCall","rule":{"$ref":"#/rules@160"},"arguments":[]},{"$type":"Assignment","feature\
|
|
1415
|
+
":"value","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/types@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]},"deprecatedSyntax":false},"cardinality":"?"}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"RelationExpression","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@78"},"arguments":[]},{"$type":\
|
|
1416
|
+
"RuleCall","rule":{"$ref":"#/rules@80"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"InOutRelationExpressions","inferredType":{"$type":"InferredType","name":"RelationExpression"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@79"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"InOutR\
|
|
1417
|
+
elationExpression"},"feature":"inout","operator":"="},{"$type":"Keyword","value":"->"}],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"IncomingRelationExpression","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"->"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@65"},"arguments":[]}}]},"definesHiddenTo\
|
|
1418
|
+
kens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DirectedRelationExpressions","inferredType":{"$type":"InferredType","name":"RelationExpression"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@81"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"DirectedRelationExpression"},"feature":"source","operator":"="},{"$type":"Ass\
|
|
1419
|
+
ignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@65"},"arguments":[]}}],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"OutgoingRelationExpression","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@65"},"arguments":[]}},{"$type":"Altern\
|
|
1420
|
+
atives","elements":[{"$type":"Assignment","feature":"isBidirectional","operator":"?=","terminal":{"$type":"Keyword","value":"<->"}},{"$type":"Keyword","value":"->"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-["},{"$type":"Assignment","feature":"kind","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@5"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Keyword","value":"]->"}]},{"$type":"Assi\
|
|
1421
|
+
gnment","feature":"kind","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@5"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@157"},"arguments":[]},"deprecatedSyntax":false}}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ElementExpressionsIterator","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"\
|
|
1422
|
+
RuleCall","rule":{"$ref":"#/rules@65"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"ElementExpressionsIterator"},"feature":"prev","operator":"="},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@65"},"arguments":[]},"cardinality":"?"}],"cardinality":"*"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parame\
|
|
1423
|
+
ters":[],"wildcard":false},{"$type":"ParserRule","name":"DynamicViewIncludePredicate","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"include"},{"$type":"Assignment","feature":"predicates","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@85"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DynamicViewGlobalPredicateRef","definition":{"$type":"\
|
|
1424
|
+
Group","elements":[{"$type":"Keyword","value":"global"},{"$type":"Keyword","value":"predicate"},{"$type":"Assignment","feature":"predicate","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@126"},"deprecatedSyntax":false}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DynamicViewPredicateIterator","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"val\
|
|
1425
|
+
ue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@56"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"DynamicViewPredicateIterator"},"feature":"prev","operator":"="},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@56"},"arguments":[]},"cardinality":"?"}],"cardinality":"*"}]},"definesHiddenTokens":false,"entry":false,\
|
|
1426
|
+
"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ViewRuleStyle","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"style"},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@82"},"arguments":[]}},{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/ru\
|
|
1427
|
+
les@142"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@90"},"arguments":[]}]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ViewRuleGlobalStyle","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"global"},{"$type":"Keyword","value":"style"},{"$type":"Assignment","feature":"style","operator":"=","terminal":{"$type":"C\
|
|
1428
|
+
rossReference","type":{"$ref":"#/rules@127"},"deprecatedSyntax":false}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ViewRuleStyleOrGlobalRef","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@86"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@87"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"\
|
|
1429
|
+
parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ViewRuleAutoLayout","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"autoLayout"},{"$type":"Assignment","feature":"direction","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@46"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Assignment","feature":"rankSep","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@179"},"arguments":[]}},{"$type":"Assignment","feature":"n\
|
|
1430
|
+
odeSep","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@179"},"arguments":[]},"cardinality":"?"}],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"NotationProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Keyword","value":"notation"}},{"$type":"Keyword","value":":","cardinality":"?"},{"$t\
|
|
1431
|
+
ype":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@177"},"arguments":[]}},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"NotesProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Keyword","value":"notes"}},{"$type":"Keyword","\
|
|
1432
|
+
value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@177"},"arguments":[]}},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CustomElementProperties","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"props","oper\
|
|
1433
|
+
ator":"+=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@94"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@90"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@142"},"arguments":[]}]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"Parse\
|
|
1434
|
+
rRule","name":"CustomRelationProperties","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@95"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@90"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@91"},"arguments":[]},{"$type":"RuleCall","r\
|
|
1435
|
+
ule":{"$ref":"#/rules@146"},"arguments":[]}]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"NavigateToProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Keyword","value":"navigateTo"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule"\
|
|
1436
|
+
:{"$ref":"#/rules@39"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"RelationNavigateToProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Keyword","value":"navigateTo"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}}]},"define\
|
|
1437
|
+
sHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ModelDeployments","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"deployment"}},{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@97"},"arguments":\
|
|
1438
|
+
[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@105"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@101"},"arguments":[]}]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DeploymentNode","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"kind","opera\
|
|
1439
|
+
tor":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@7"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]}},{"$type":"RuleCall","rule":\
|
|
1440
|
+
{"$ref":"#/rules@175"},"arguments":[]},{"$type":"Assignment","feature":"kind","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@7"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]},"deprecatedSyntax":false}}]}]},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@177"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"body","operator":"=","terminal":{"$type":"RuleCall\
|
|
1441
|
+
","rule":{"$ref":"#/rules@98"},"arguments":[]},"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DeploymentNodeBody","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"tags","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"props","operato\
|
|
1442
|
+
r":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"cardinality":"*"},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@99"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@105"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@97"},"arguments":[]}]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":fals\
|
|
1443
|
+
e,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DeployedInstance","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@175"},"arguments":[]}],"cardinality":"?"},{"$type":"Keyword","value":"instanceOf"},{"$type":"Assignment","feature":"element","operator\
|
|
1444
|
+
":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@177"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"body","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@100"},"arguments":[]},"cardinality":"?"},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hidd\
|
|
1445
|
+
enTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DeployedInstanceBody","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"tags","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"cardinality":"*"},{"$type":"Keyword","value":\
|
|
1446
|
+
"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ExtendDeployment","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"extend"},{"$type":"Assignment","feature":"deploymentNode","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@104"},"arguments":[]}},{"$type":"Assignment","feature":"body","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@102"\
|
|
1447
|
+
},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ExtendDeploymentBody","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"tags","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"RuleCall","rule"\
|
|
1448
|
+
:{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"*"},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@99"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@105"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@97"},"arguments":[]}]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"paramet\
|
|
1449
|
+
ers":[],"wildcard":false},{"$type":"ParserRule","name":"FqnRef","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/types@7"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"FqnRef"},"feature":"parent","operator":"="},{"$type":"RuleCall","rule":{"$re\
|
|
1450
|
+
f":"#/rules@172"},"arguments":[]},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/types@7"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]},"deprecatedSyntax":false}}],"cardinality":"*"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"StrictFqnRef","definition":{"$type":"Group","elements":[{"$type":"Assignment","\
|
|
1451
|
+
feature":"value","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/types@7"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"StrictFqnRef"},"feature":"parent","operator":"="},{"$type":"RuleCall","rule":{"$ref":"#/rules@172"},"arguments":[]},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"CrossReferenc\
|
|
1452
|
+
e","type":{"$ref":"#/types@7"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]},"deprecatedSyntax":false}}],"cardinality":"*"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DeploymentRelation","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"source","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@103"},"arguments":[]}},{"$typ\
|
|
1453
|
+
e":"Alternatives","elements":[{"$type":"Keyword","value":"->"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-["},{"$type":"Assignment","feature":"kind","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@5"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Keyword","value":"]->"}]},{"$type":"Assignment","feature":"kind","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@5\
|
|
1454
|
+
"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@157"},"arguments":[]},"deprecatedSyntax":false}}]},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@103"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@177"},"arguments":[]}},{"$type":"Assignment","feature":"technology","operator":"=","terminal":{"$type":"RuleCall","rul\
|
|
1455
|
+
e":{"$ref":"#/rules@177"},"arguments":[]},"cardinality":"?"}],"cardinality":"?"},{"$type":"Assignment","feature":"tags","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"body","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@106"},"arguments":[]},"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type\
|
|
1456
|
+
":"ParserRule","name":"DeploymentRelationBody","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"tags","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fr\
|
|
1457
|
+
agment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DeploymentView","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"deployment"},{"$type":"Keyword","value":"view"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]}},{"$type":"Assignment","feature":"body","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@108"},"arguments":[]},"cardin\
|
|
1458
|
+
ality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DeploymentViewBody","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"tags","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":\
|
|
1459
|
+
"#/rules@44"},"arguments":[]},"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@109"},"arguments":[]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DeploymentViewRule","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@111"},"argu\
|
|
1460
|
+
ments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@110"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@89"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DeploymentViewRuleStyle","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"style"},{"$type":"Assignment","feature":"targets","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@\
|
|
1461
|
+
123"},"arguments":[]}},{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@142"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@90"},"arguments":[]}]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DeploymentViewR\
|
|
1462
|
+
ulePredicate","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"isInclude","operator":"?=","terminal":{"$type":"Keyword","value":"include"}},{"$type":"Keyword","value":"exclude"}]},{"$type":"Assignment","feature":"expr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@112"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"Par\
|
|
1463
|
+
serRule","name":"DeploymentViewRulePredicateExpression","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@113"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"DeploymentViewRulePredicateExpression"},"feature":"prev","operator":"="},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$t\
|
|
1464
|
+
ype":"RuleCall","rule":{"$ref":"#/rules@113"},"arguments":[]},"cardinality":"?"}],"cardinality":"*"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ExpressionV2","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@115"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@114"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,\
|
|
1465
|
+
"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ElementPredicateOrWhereV2","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@116"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"ElementPredicateWhereV2"},"feature":"subject","operator":"="},{"$type":"Keyword","value":"where"},{"$type":"Assignment","feature":"where","operator":"=","terminal":{"$type":"RuleCall","rule\
|
|
1466
|
+
":{"$ref":"#/rules@59"},"arguments":[]},"cardinality":"?"}],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"RelationPredicateOrWhereV2","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@118"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"RelationPredicateWhereV2"},"feature":"subject","\
|
|
1467
|
+
operator":"="},{"$type":"Keyword","value":"where"},{"$type":"Assignment","feature":"where","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@71"},"arguments":[]},"cardinality":"?"}],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"FqnExpr","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"Inferr\
|
|
1468
|
+
edType","name":"WildcardExpression"}},{"$type":"Assignment","feature":"isWildcard","operator":"?=","terminal":{"$type":"Keyword","value":"*"}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@117"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"FqnRefExpr","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"ref","operator":"=","terminal":{"$type":"RuleCall","rule":{\
|
|
1469
|
+
"$ref":"#/rules@103"},"arguments":[]}},{"$type":"Assignment","feature":"selector","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@169"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@170"},"arguments":[]}]},"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"RelationExpr","definition":{"$type":"Alternatives","elements\
|
|
1470
|
+
":[{"$type":"RuleCall","rule":{"$ref":"#/rules@119"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@121"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"InOutRelationExpr","inferredType":{"$type":"InferredType","name":"RelationExpr"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@120"},"arguments":[]},{"$type":"Group","elements":[{"$t\
|
|
1471
|
+
ype":"Action","inferredType":{"$type":"InferredType","name":"InOutRelationExpr"},"feature":"inout","operator":"="},{"$type":"Keyword","value":"->"}],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"IncomingRelationExpr","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"->"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"RuleCall","rule":{"\
|
|
1472
|
+
$ref":"#/rules@116"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DirectedRelationExpr","inferredType":{"$type":"InferredType","name":"RelationExpr"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@122"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"DirectedRelationExpr"},"feature":\
|
|
1473
|
+
"source","operator":"="},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@116"},"arguments":[]}}],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"OutgoingRelationExpr","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@116"}\
|
|
1474
|
+
,"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"isBidirectional","operator":"?=","terminal":{"$type":"Keyword","value":"<->"}},{"$type":"Keyword","value":"->"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-["},{"$type":"Assignment","feature":"kind","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@5"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Keywor\
|
|
1475
|
+
d","value":"]->"}]},{"$type":"Assignment","feature":"kind","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@5"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@157"},"arguments":[]},"deprecatedSyntax":false}}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"FqnExpressions","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"value","operator":"="\
|
|
1476
|
+
,"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@116"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"FqnExpressions"},"feature":"prev","operator":"="},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@116"},"arguments":[]},"cardinality":"?"}],"cardinality":"*"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens\
|
|
1477
|
+
":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Globals","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"global"}},{"$type":"Keyword","value":"{"},{"$type":"Group","elements":[{"$type":"Assignment","feature":"predicates","operator":"+=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@125"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rule\
|
|
1478
|
+
s@126"},"arguments":[]}]},"cardinality":"*"},{"$type":"Assignment","feature":"styles","operator":"+=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@128"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@129"},"arguments":[]}]},"cardinality":"*"}],"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Glo\
|
|
1479
|
+
balPredicateGroup","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"predicateGroup"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@178"},"arguments":[]}},{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"predicates","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":fals\
|
|
1480
|
+
e,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"GlobalDynamicPredicateGroup","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"dynamicPredicateGroup"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@178"},"arguments":[]}},{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"predicates","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/ru\
|
|
1481
|
+
les@83"},"arguments":[]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"GlobalStyleId","definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@178"},"arguments":[]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"\
|
|
1482
|
+
ParserRule","name":"GlobalStyle","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"style"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@127"},"arguments":[]}},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@82"},"arguments":[]}},{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"Alternatives","el\
|
|
1483
|
+
ements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@142"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@90"},"arguments":[]}]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"GlobalStyleGroup","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"styleGroup"},{"$type":"Assignment","feature":"id","operator":"=","terminal":\
|
|
1484
|
+
{"$type":"RuleCall","rule":{"$ref":"#/rules@127"},"arguments":[]}},{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"styles","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@86"},"arguments":[]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"LinkProperty","definition":{"$type":"Group","elements":[{"$type":"Assignme\
|
|
1485
|
+
nt","feature":"key","operator":"=","terminal":{"$type":"Keyword","value":"link"}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@155"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@177"},"arguments":[]},"cardinality":"?"},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"ent\
|
|
1486
|
+
ry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ColorProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Keyword","value":"color"}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"themeColor","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@150"},"arguments":[]}},{"$type":\
|
|
1487
|
+
"Assignment","feature":"customColor","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@6"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@158"},"arguments":[]},"deprecatedSyntax":false}}]},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"OpacityProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","fe\
|
|
1488
|
+
ature":"key","operator":"=","terminal":{"$type":"Keyword","value":"opacity"}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@176"},"arguments":[]}},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"MultipleProperty","definition":{"$type":"Group\
|
|
1489
|
+
","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Keyword","value":"multiple"}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@147"},"arguments":[]}},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"IconPr\
|
|
1490
|
+
operty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Keyword","value":"icon"}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"libicon","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@154"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Assignment","feature":"value\
|
|
1491
|
+
","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"none"},{"$type":"RuleCall","rule":{"$ref":"#/rules@155"},"arguments":[]}]}}]},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ShapeProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Keywor\
|
|
1492
|
+
d","value":"shape"}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@151"},"arguments":[]}},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"BorderStyleValue","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCa\
|
|
1493
|
+
ll","rule":{"$ref":"#/rules@148"},"arguments":[]},{"$type":"Keyword","value":"none"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"BorderProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Keyword","value":"border"}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","termin\
|
|
1494
|
+
al":{"$type":"RuleCall","rule":{"$ref":"#/rules@136"},"arguments":[]}},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"SizeValue","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"xs"},{"$type":"Keyword","value":"sm"},{"$type":"Keyword","value":"md"},{"$type":"Keyword","value":"lg"},{"$type":"Keyword","valu\
|
|
1495
|
+
e":"xl"},{"$type":"Keyword","value":"xsmall"},{"$type":"Keyword","value":"small"},{"$type":"Keyword","value":"medium"},{"$type":"Keyword","value":"large"},{"$type":"Keyword","value":"xlarge"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ShapeSizeProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Keyword","value":"size"}},{"$t\
|
|
1496
|
+
ype":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@138"},"arguments":[]}},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PaddingSizeProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{\
|
|
1497
|
+
"$type":"Keyword","value":"padding"}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@138"},"arguments":[]}},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"TextSizeProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","fea\
|
|
1498
|
+
ture":"key","operator":"=","terminal":{"$type":"Keyword","value":"textSize"}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@138"},"arguments":[]}},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"StyleProperty","definition":{"$type":"Alternat\
|
|
1499
|
+
ives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@131"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@135"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@137"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@132"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@134"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@133"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@139"},"arguments":[]},{"$type":"RuleCall",\
|
|
1500
|
+
"rule":{"$ref":"#/rules@140"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@141"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ElementStyleProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Keyword","value":"style"}},{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"props","operato\
|
|
1501
|
+
r":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@142"},"arguments":[]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"LineProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Keyword","value":"line"}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assig\
|
|
1502
|
+
nment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@148"},"arguments":[]}},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ArrowProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"head\
|
|
1503
|
+
"},{"$type":"Keyword","value":"tail"}]}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@149"},"arguments":[]}},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"RelationshipStyleProperty","definition":{"$type":"Alternatives","elements":[{"$type\
|
|
1504
|
+
":"RuleCall","rule":{"$ref":"#/rules@131"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@144"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@145"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Boolean","dataType":"boolean","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"true"},{"$type":"Keyword","value":"false"}]},"definesHidden\
|
|
1505
|
+
Tokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"LineOptions","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"solid"},{"$type":"Keyword","value":"dashed"},{"$type":"Keyword","value":"dotted"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ArrowType","dataType":"string","defini\
|
|
1506
|
+
tion":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"none"},{"$type":"Keyword","value":"normal"},{"$type":"Keyword","value":"onormal"},{"$type":"Keyword","value":"dot"},{"$type":"Keyword","value":"odot"},{"$type":"Keyword","value":"diamond"},{"$type":"Keyword","value":"odiamond"},{"$type":"Keyword","value":"crow"},{"$type":"Keyword","value":"open"},{"$type":"Keyword","value":"vee"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wi\
|
|
1507
|
+
ldcard":false},{"$type":"ParserRule","name":"ThemeColor","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"primary"},{"$type":"Keyword","value":"secondary"},{"$type":"Keyword","value":"muted"},{"$type":"Keyword","value":"slate"},{"$type":"Keyword","value":"blue"},{"$type":"Keyword","value":"indigo"},{"$type":"Keyword","value":"sky"},{"$type":"Keyword","value":"red"},{"$type":"Keyword","value":"gray"},{"$type":"Keyword","value":"green"},{"$type":"Key\
|
|
1508
|
+
word","value":"amber"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ElementShape","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rectangle"},{"$type":"Keyword","value":"person"},{"$type":"Keyword","value":"browser"},{"$type":"Keyword","value":"mobile"},{"$type":"Keyword","value":"cylinder"},{"$type":"Keyword","value":"storage"},{"$type":"Keyword","va\
|
|
1509
|
+
lue":"queue"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Participant","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"source"},{"$type":"Keyword","value":"target"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CustomColorValue","dataType":"string","defin\
|
|
1510
|
+
ition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@171"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@180"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@179"},"arguments":[]}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"IconId","dataType":\
|
|
1511
|
+
"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@166"},"arguments":[]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Uri","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@167"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@168"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hid\
|
|
1512
|
+
denTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"TagId","dataType":"string","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@171"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DotId","dataType":"string","definition":{"$type":"Group","elements":[{"$type":\
|
|
1513
|
+
"RuleCall","rule":{"$ref":"#/rules@173"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CustomColorId","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@178"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@151"},"arguments":[]},{"$type":"RuleCall\
|
|
1514
|
+
","rule":{"$ref":"#/rules@149"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@148"},"arguments":[]},{"$type":"Keyword","value":"element"},{"$type":"Keyword","value":"model"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Id","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@178"},"arguments":[]},{"$type":"RuleCall","rule":{"$\
|
|
1515
|
+
ref":"#/rules@151"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@150"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@149"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@148"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@152"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@138"},"arguments":[]},{"$type":"Keyword","value":"element"},{"$type":"Keyword","value":"model"},{"$type":"Keyword","value":"group"},{"$type":"Keyword","valu\
|
|
1516
|
+
e":"node"},{"$type":"Keyword","value":"deployment"},{"$type":"Keyword","value":"instance"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EqOperator","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@175"},"arguments":[]},{"$type":"RuleCall\
|
|
1517
|
+
","rule":{"$ref":"#/rules@174"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"is"}},{"$type":"Assignment","feature":"not","operator":"?=","terminal":{"$type":"Keyword","value":"not"},"cardinality":"?"}]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"IsEqual","definition":{"$type":"Alternatives","elements\
|
|
1518
|
+
":[{"$type":"Assignment","feature":"isEqual","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@175"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@174"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","hidden":true,"name":"BLOCK_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"LIN\
|
|
1519
|
+
E_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\/[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/[\\\\r\\\\n]+/"},"fragment":false},{"$type":"TerminalRule","name":"LIB_ICON","definition":{"$type":"RegexToken","regex":"/(aws|azure|gcp|tech):[-\\\\w]*/"},"fragment":false,"hidden":false},{"$t\
|
|
1520
|
+
ype":"TerminalRule","name":"URI_WITH_SCHEMA","definition":{"$type":"RegexToken","regex":"/\\\\w+:\\\\/\\\\/\\\\S+/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"URI_RELATIVE","definition":{"$type":"RegexToken","regex":"/\\\\.{0,2}\\\\/[^\\\\/]\\\\S+/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"DotUnderscore","definition":{"$type":"RegexToken","regex":"/\\\\b\\\\._(?![_a-zA-Z])/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"DotWildcard","definition":{"\
|
|
1521
|
+
$type":"RegexToken","regex":"/\\\\b\\\\.\\\\*{1,2}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"Hash","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"#"}},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"StickyDot","definition":{"$type":"RegexToken","regex":"/\\\\b\\\\./"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"Dot","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"."}},"fragment":false,"hidd\
|
|
1522
|
+
en":false},{"$type":"TerminalRule","name":"NotEqual","definition":{"$type":"RegexToken","regex":"/\\\\!\\\\={1,2}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"Eq","definition":{"$type":"RegexToken","regex":"/\\\\={1,2}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"Percent","definition":{"$type":"RegexToken","regex":"/\\\\b\\\\d+%/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"String","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'\
|
|
1523
|
+
[^']*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"IdTerminal","definition":{"$type":"RegexToken","regex":"/[_]*[a-zA-Z][-\\\\w]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"Number","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/\\\\b\\\\d+\\\\b/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"Hex","definition":{"$type":"RegexToken","regex":"/\\\\b[a-zA-Z0-9]+\\\\b/"},"fragment":false,"hidden":fals\
|
|
1524
|
+
e}],"types":[{"$type":"Type","name":"LikeC4View","type":{"$type":"UnionType","types":[{"$type":"SimpleType","typeRef":{"$ref":"#/rules@37"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@38"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@107"}}]}},{"$type":"Type","name":"StringProperty","type":{"$type":"UnionType","types":[{"$type":"SimpleType","typeRef":{"$ref":"#/rules@20"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@45"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@30"}},{"$\
|
|
1525
|
+
type":"SimpleType","typeRef":{"$ref":"#/rules@34"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@10"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@15"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@90"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@91"}}]}},{"$type":"Type","name":"DeploymentNodeOrElementKind","type":{"$type":"UnionType","types":[{"$type":"SimpleType","typeRef":{"$ref":"#/rules@3"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@7"}}]}},{"$type":"Type","name":"\
|
|
1526
|
+
WhereTagEqual","type":{"$type":"UnionType","types":[{"$type":"SimpleType","typeRef":{"$ref":"#/rules@64/definition/elements@0/elements@0/inferredType"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@76/definition/elements@0/elements@0/inferredType"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@76/definition/elements@2/elements@0/inferredType"}}]}},{"$type":"Type","name":"WhereKindEqual","type":{"$type":"UnionType","types":[{"$type":"SimpleType","typeRef":{"$ref":"#/rules@64/definition/el\
|
|
1527
|
+
ements@1/elements@0/inferredType"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@76/definition/elements@1/elements@0/inferredType"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@76/definition/elements@3/elements@0/inferredType"}}]}},{"$type":"Type","name":"WhereExpression","type":{"$type":"UnionType","types":[{"$type":"SimpleType","typeRef":{"$ref":"#/rules@59"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@71"}}]}},{"$type":"Type","name":"DeploymentElement","type":{"$type":"UnionTyp\
|
|
1528
|
+
e","types":[{"$type":"SimpleType","typeRef":{"$ref":"#/rules@97"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@99"}}]}},{"$type":"Type","name":"Referenceable","type":{"$type":"UnionType","types":[{"$type":"SimpleType","typeRef":{"$ref":"#/rules@97"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@99"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@17"}}]}},{"$type":"Type","name":"FqnReferenceable","type":{"$type":"UnionType","types":[{"$type":"SimpleType","typeRef":{"$ref":"#/types@7"}\
|
|
1529
|
+
},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@17"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@21"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@101"}}]}},{"$type":"Type","name":"SizeProperty","type":{"$type":"UnionType","types":[{"$type":"SimpleType","typeRef":{"$ref":"#/rules@139"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@140"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@141"}}]}}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"interfaces":[],"usedGr\
|
|
1530
|
+
ammars":[]}`)),Wv={languageId:"likec4",fileExtensions:[".c4",".likec4",".like-c4"],caseInsensitive:!1,mode:"production"},GU={skipValidations:!0,recoveryEnabled:!0,nodeLocationTracking:"full"},UU={AstReflection:()=>new ZC},WU={Grammar:()=>qU(),LanguageMetaData:()=>Wv,parser:{ParserConfig:()=>GU}},zU=[...Object.entries({aws:["activate","alexa-for-business","amplify","apache-mxnet-on-aws","api-gateway","app-config","app-flow","app-mesh","app-runner","app-stream","app-sync","application-auto-scaling",
|
|
1531
|
+
"application-composer","application-cost-profiler","application-discovery-service","application-migration-service","artifact","athena","audit-manager","augmented-ai-a2i","aurora","auto-scaling","backint-agent","backup","batch","billing-conductor","bottlerocket","braket","budgets","certificate-manager","chatbot","chime","chime-sdk","chime-voice-connector","clean-rooms","client-vpn","cloud-control-api","cloud-development-kit","cloud-directory","cloud-formation","cloud-front","cloud-hsm","cloud-map",
|
|
1532
|
+
"cloud-search","cloud-shell","cloud-trail","cloud-wan","cloud-watch","cloud9","code-artifact","code-build","code-catalyst","code-commit","code-deploy","code-guru","code-pipeline","code-star","code-whisperer","cognito","command-line-interface","comprehend","comprehend-medical","compute-optimizer","config","connect","console-mobile-application","control-tower","corretto","cost-and-usage-report","cost-explorer","data-exchange","data-pipeline","data-sync","data-zone","database-migration-service","de\
|
|
1533
|
+
ep-composer","deep-learning-amis","deep-learning-containers","deep-lens","deep-racer","detective","dev-ops-guru","device-farm","direct-connect","directory-service","distro-for-open-telemetry","document-db","dynamo-db","ec2","ec2-auto-scaling","ec2-image-builder","ecs-anywhere","efs","eks-anywhere","eks-cloud","eks-distro","elasti-cache","elastic-beanstalk","elastic-block-store","elastic-container-registry","elastic-container-service","elastic-disaster-recovery","elastic-fabric-adapter","elastic-\
|
|
1534
|
+
inference","elastic-kubernetes-service","elastic-load-balancing","elastic-transcoder","elemental-appliances-software","elemental-conductor","elemental-delta","elemental-link","elemental-live","elemental-media-connect","elemental-media-convert","elemental-media-live","elemental-media-package","elemental-media-store","elemental-media-tailor","elemental-server","emr","event-bridge","express-workflows","fargate","fault-injection-simulator","file-cache","fin-space","firewall-manager","forecast","frau\
|
|
1535
|
+
d-detector","free-rtos","fsx","fsx-for-lustre","fsx-for-net-app-ontap","fsx-for-open-zfs","fsx-for-wfs","game-kit","game-lift","game-sparks","genomics-cli","global-accelerator","glue","glue-data-brew","glue-elastic-views","ground-station","guard-duty","health-lake","honeycode","iam-identity-center","identity-and-access-management","inspector","interactive-video-service","io-t-1-click","io-t-analytics","io-t-button","io-t-core","io-t-device-defender","io-t-device-management","io-t-edu-kit","io-t-\
|
|
1536
|
+
events","io-t-express-link","io-t-fleet-wise","io-t-greengrass","io-t-robo-runner","io-t-site-wise","io-t-things-graph","io-t-twin-maker","iq","kendra","key-management-service","keyspaces","kinesis","kinesis-data-analytics","kinesis-data-streams","kinesis-firehose","kinesis-video-streams","lake-formation","lambda","launch-wizard","lex","license-manager","lightsail","local-zones","location-service","lookout-for-equipment","lookout-for-metrics","lookout-for-vision","lumberyard","macie","mainframe-\
|
|
1537
|
+
modernization","managed-blockchain","managed-grafana","managed-service-for-prometheus","managed-services","managed-streaming-for-apache-kafka","managed-workflows-for-apache-airflow","management-console","marketplace-dark","marketplace-light","memory-db-for-redis","migration-evaluator","migration-hub","monitron","mq","neptune","network-firewall","neuron","nice-dcv","nice-engin-frame","nimble-studio","nitro-enclaves","omics","open-3d-engine","open-search-service","ops-works","organizations","outpo\
|
|
1538
|
+
sts-family","outposts-rack","outposts-servers","panorama","parallel-cluster","personal-health-dashboard","personalize","pinpoint","pinpoint-apis","polly","private-5g","private-certificate-authority","private-link","professional-services","proton","quantum-ledger-database","quick-sight","rds","rds-on-vmware","re-post","red-hat-open-shift-service-on-aws","redshift","rekognition","reserved-instance-reporting","resilience-hub","resource-access-manager","resource-explorer","robo-maker","route-53","s3\
|
|
1539
|
+
-on-outposts","sage-maker","sage-maker-ground-truth","sage-maker-studio-lab","savings-plans","secrets-manager","security-hub","security-lake","server-migration-service","serverless-application-repository","service-catalog","service-management-connector","shield","signer","sim-space-weaver","simple-email-service","simple-notification-service","simple-queue-service","simple-storage-service","simple-storage-service-glacier","site-to-site-vpn","snowball","snowball-edge","snowcone","snowmobile","step\
|
|
1540
|
+
-functions","storage-gateway","sumerian","supply-chain","support","systems-manager","tensor-flow-on-aws","textract","thinkbox-deadline","thinkbox-frost","thinkbox-krakatoa","thinkbox-sequoia","thinkbox-stoke","thinkbox-xmesh","timestream","tools-and-sdks","torch-serve","training-certification","transcribe","transfer-family","transit-gateway","translate","trusted-advisor","verified-access","verified-permissions","virtual-private-cloud","vmware-cloud-on-aws","vpc-lattice","waf","wavelength","well-\
|
|
1541
|
+
architected-tool","wickr","work-docs","work-docs-sdk","work-link","work-mail","work-spaces-family","x-ray"],azure:["abs-member","active-directory-connect-health","activity-log","administrative-units","advisor","ai-studio","aks-automatic","aks-istio","alerts","all-resources","analysis-services","anomaly-detector","api-center","api-connections","api-management-services","api-proxy","app-compliance-automation","app-configuration","app-registrations","app-service-certificates","app-service-domains",
|
|
1542
|
+
"app-service-environments","app-service-plans","app-services","app-space","app-space-component","applens","application-gateway-containers","application-gateways","application-group","application-insights","application-security-groups","aquila","arc-data-services","arc-kubernetes","arc-machines","arc-postgre-sql","arc-sql-managed-instance","arc-sql-server","atm-multistack","auto-scale","automanaged-vm","automation-accounts","availability-sets","avs-vm","azure-a","azure-ad-b2c","azure-api-for-fhir",
|
|
1543
|
+
"azure-applied-ai-services","azure-arc","azure-attestation","azure-backup-center","azure-blockchain-service","azure-center-for-sap","azure-chaos-studio","azure-cloud-shell","azure-communication-services","azure-communications-gateway","azure-compute-galleries","azure-cosmos-db","azure-data-catalog","azure-data-explorer-clusters","azure-database-maria-db-server","azure-database-migration-services","azure-database-my-sql-server","azure-database-postgre-sql-server","azure-database-postgre-sql-serve\
|
|
1544
|
+
r-group","azure-databox-gateway","azure-databricks","azure-deployment-environments","azure-dev-ops","azure-dev-tunnels","azure-edge-hardware-center","azure-experimentation-studio","azure-fileshares","azure-firewall-manager","azure-firewall-policy","azure-hcp-cache","azure-hpc-workbenches","azure-hybrid-center","azure-information-protection","azure-io-t-operations","azure-lighthouse","azure-load-testing","azure-managed-grafana","azure-maps-accounts","azure-media-service","azure-migrate","azure-mo\
|
|
1545
|
+
nitor-dashboard","azure-monitor-pipeline","azure-monitors-for-sap-solutions","azure-net-app-files","azure-network-function-manager","azure-network-function-manager-functions","azure-object-understanding","azure-open-ai","azure-operator-5g-core","azure-operator-insights","azure-operator-nexus","azure-operator-service-manager","azure-orbital","azure-programmable-connectivity","azure-purview-accounts","azure-quotas","azure-red-hat-open-shift","azure-sentinel","azure-service-bus","azure-sphere","azu\
|
|
1546
|
+
re-spring-apps","azure-sql","azure-sql-edge","azure-sql-server-stretch-databases","azure-sql-vm","azure-stack","azure-stack-edge","azure-stack-hci-sizer","azure-storage-mover","azure-support-center-blue","azure-sustainability","azure-synapse-analytics","azure-token-service","azure-video-indexer","azure-virtual-desktop","azure-vmware-solution","azure-workbooks","azurite","backlog","backup-vault","bare-metal-infrastructure","bastions","batch-accounts","batch-ai","biz-talk","blob-block","blob-page",
|
|
1547
|
+
"blockchain-applications","blueprints","bonsai","bot-services","branch","browser","bug","builds","business-process-tracking","cache","cache-redis","capacity","capacity-reservation-groups","cdn-profiles","central-service-instance-for-sap","ceres","change-analysis","client-apps","cloud-services-classic","cloud-services-extended-support","cloud-test","code","code-optimization","cognitive-search","cognitive-services","cognitive-services-decisions","collaborative-service","commit","community-images",
|
|
1548
|
+
"compliance","compliance-center","compute-fleet","computer-vision","conditional-access","confidential-ledgers","connected-cache","connected-vehicle-platform","connections","consortium","container-apps-environments","container-instances","container-registries","container-services-deprecated","content-moderators","content-safety","controls","controls-horizontal","cost-alerts","cost-analysis","cost-budgets","cost-export","cost-management","cost-management-and-billing","counter","cubes","custom-ip-p\
|
|
1549
|
+
refix","custom-vision","customer-lockbox-for-microsoft-azure","dashboard","dashboard-hub","data-box","data-collection-rules","data-factories","data-lake-analytics","data-lake-storage-gen1","data-lake-store-gen1","data-share-invitations","data-shares","database-instance-for-sap","ddo-s-protection-plans","dedicated-hsm","defender-cm-local-manager","defender-dcs-controller","defender-distributer-control-system","defender-engineering-station","defender-external-management","defender-freezer-monitor",
|
|
1550
|
+
"defender-historian","defender-hmi","defender-industrial-packaging-system","defender-industrial-printer","defender-industrial-robot","defender-industrial-scale-system","defender-marquee","defender-meter","defender-plc","defender-pneumatic-device","defender-programable-board","defender-relay","defender-robot-controller","defender-rtu","defender-sensor","defender-slot","defender-web-guiding-system","detonation","dev-console","dev-ops-starter","dev-test-labs","device-compliance","device-configurati\
|
|
1551
|
+
on","device-enrollment","device-provisioning-services","device-security-apple","device-security-google","device-security-windows","device-update-io-t-hub","devices","diagnostics-settings","digital-twins","disk-encryption-sets","disk-pool","disks","disks-classic","disks-snapshots","dns-multistack","dns-private-resolver","dns-security-policy","dns-zones","download","e-books","edge-management","education","elastic-job-agents","elastic-san","endpoint-analytics","enterprise-applications","entra-conne\
|
|
1552
|
+
ct","entra-connect-health","entra-connect-sync","entra-domain-services","entra-global-secure-access","entra-id-protection","entra-identity-custom-roles","entra-identity-licenses","entra-identity-risky-signins","entra-identity-risky-users","entra-identity-roles-and-administrators","entra-internet-access","entra-managed-identities","entra-private-access","entra-privleged-identity-management","entra-verified-id","error","event-grid-domains","event-grid-subscriptions","event-grid-topics","event-hub-\
|
|
1553
|
+
clusters","event-hubs","exchange-access","exchange-on-premises-access","express-route-circuits","express-route-direct","express-route-traffic-collector","extended-security-updates","extensions","external-identities","face-apis","feature-previews","fhir-service","fiji","file","files","firewalls","folder-blank","folder-website","form-recognizers","free-services","front-door-and-cdn-profiles","ftp","function-apps","gear","genomics","genomics-accounts","globe-error","globe-success","globe-warning","\
|
|
1554
|
+
groups","guide","hd-insight-clusters","hdi-aks-cluster","heart","help-and-support","host-groups","host-pools","hosts","ic-m-troubleshooting","identity-governance","identity-multi-factor-authentication","identity-secure-score","image","image-definitions","image-templates","image-versions","images","immersive-readers","import-export-jobs","industrial-io-t","information","infrastructure-backup","input-output","instance-pools","integration-accounts","integration-environments","integration-service-en\
|
|
1555
|
+
vironments","internet-analyzer-profiles","intune","intune-app-protection","intune-for-education","intune-trends","io-t-central-applications","io-t-edge","io-t-hub","ip-address-manager","ip-groups","journey-hub","key-vaults","keys","kubernetes-fleet-manager","kubernetes-services","lab-accounts","lab-services","language","language-understanding","launch-portal","learn","load-balancer-hub","load-balancers","load-test","load-testing","local-network-gateways","location","log-analytics-query-pack","lo\
|
|
1556
|
+
g-analytics-workspaces","log-streaming","logic-apps","logic-apps-custom-connector","machine-learning","machine-learning-studio-classic-web-services","machine-learning-studio-web-service-plans","machine-learning-studio-workspaces","machines-azure-arc","maintenance-configuration","managed-applications-center","managed-database","managed-desktop","managed-dev-ops-pools","managed-file-shares","managed-identities","managed-instance-apache-cassandra","managed-service-fabric","management-groups","manag\
|
|
1557
|
+
ement-portal","marketplace","marketplace-management","med-tech-service","media","media-file","mesh-applications","metrics","metrics-advisor","microsoft-defender-easm","microsoft-defender-for-cloud","microsoft-defender-for-io-t","microsoft-dev-box","mindaro","mission-landing-zone","mobile","mobile-engagement","mobile-networks","modular-data-center","module","monitor","monitor-health-models","multi-tenancy","multifactor-authentication","my-customers","nat","network-interfaces","network-managers","\
|
|
1558
|
+
network-security-groups","network-security-perimeters","network-watcher","notification-hub-namespaces","notification-hubs","offers","on-premises-data-gateways","open-supply-chain-platform","operation-log-classic","oracle-database","os-images-classic","osconfig","outbound-connection","partner-namespace","partner-registration","partner-topic","peering-service","peerings","personalizers","plans","policy","power","power-bi-embedded","power-platform","power-up","powershell","preview-features","privat\
|
|
1559
|
+
e-endpoints","private-link","private-link-service","private-link-services","process-explorer","production-ready-database","proximity-placement-groups","public-ip-addresses","public-ip-addresses-classic","public-ip-prefixes","qn-a-makers","quickstart-center","recent","recovery-services-vaults","region-management","relays","remote-rendering","reservations","reserved-capacity","reserved-ip-addresses-classic","resource-explorer","resource-graph-explorer","resource-group-list","resource-groups","reso\
|
|
1560
|
+
urce-guard","resource-linked","resource-management-private-link","resource-mover","resources-provider","restore-points","restore-points-collections","route-filters","route-tables","rtos","savings-plans","scheduler","scheduler-job-collections","scvmm-management-servers","search","search-grid","security","security-baselines","send-grid-accounts","server-farm","serverless-search","service-catalog-mad","service-endpoint-policies","service-fabric-clusters","service-health","service-providers","shared\
|
|
1561
|
+
-image-galleries","signal-r","software-as-a-service","software-updates","solutions","sonic-dash","spatial-anchor-accounts","speech-services","spot-vm","spot-vmss","sql-data-warehouses","sql-database","sql-elastic-pools","sql-managed-instance","sql-server","sql-server-registries","ssd","ssh-keys","ssis-lift-and-shift-ir","stack-hci-premium","static-apps","stor-simple-data-managers","stor-simple-device-managers","storage-accounts","storage-accounts-classic","storage-actions","storage-azure-files",
|
|
1562
|
+
"storage-container","storage-explorer","storage-functions","storage-queue","storage-sync-services","stream-analytics-jobs","subnet","subscriptions","system-topic","table","tag","tags","targets-management","template-specs","templates","tenant-properties","tenant-status","test-base","tfs-vc-repository","time-series-data-sets","time-series-insights-access-policies","time-series-insights-environments","time-series-insights-event-sources","toolbox","traffic-manager-profiles","translator-text","troubl\
|
|
1563
|
+
eshoot","universal-print","update-management-center","updates","user-privacy","user-settings","user-subscriptions","users","verifiable-credentials","verification-as-a-service","versions","video-analyzers","virtual-clusters","virtual-enclaves","virtual-instance-for-sap","virtual-machine","virtual-machines-classic","virtual-network-gateways","virtual-networks","virtual-networks-classic","virtual-router","virtual-visits-builder","virtual-wan-hub","virtual-wans","vm-app-definitions","vm-app-versions",
|
|
1564
|
+
"vm-image-version","vm-images-classic","vm-scale-sets","wac","wac-installer","web-app-database","web-application-firewall-policies-waf","web-jobs","web-slots","web-test","website-power","website-staging","windows-notification-services","windows10-core-services","workbooks","worker-container-app","workflow","workspace-gateway","workspaces"],gcp:["access-context-manager","administration","advanced-agent-modeling","advanced-solutions-lab","agent-assist","ai-hub","ai-platform","ai-platform-unified",
|
|
1565
|
+
"analytics-hub","anthos","anthos-config-management","anthos-service-mesh","api","api-analytics","api-monetization","apigee-api-platform","apigee-sense","app-engine","artifact-registry","asset-inventory","assured-workloads","auto-ml","auto-ml-natural-language","auto-ml-tables","auto-ml-translation","auto-ml-video-intelligence","auto-ml-vision","bare-metal-solutions","batch","beyondcorp","big-query","bigtable","billing","binary-authorization","catalog","certificate-authority-service","certificate-\
|
|
1566
|
+
manager","cloud-api-gateway","cloud-apis","cloud-armor","cloud-asset-inventory","cloud-audit-logs","cloud-build","cloud-cdn","cloud-code","cloud-composer","cloud-data-fusion","cloud-deploy","cloud-deployment-manager","cloud-dns","cloud-domains","cloud-ekm","cloud-endpoints","cloud-external-ip-addresses","cloud-firewall-rules","cloud-for-marketing","cloud-functions","cloud-generic","cloud-gpu","cloud-healthcare-api","cloud-healthcare-marketplace","cloud-hsm","cloud-ids","cloud-inference-api","clo\
|
|
1567
|
+
ud-interconnect","cloud-jobs-api","cloud-load-balancing","cloud-logging","cloud-media-edge","cloud-monitoring","cloud-nat","cloud-natural-language-api","cloud-network","cloud-ops","cloud-optimization-ai","cloud-optimization-ai-fleet-routing-api","cloud-router","cloud-routes","cloud-run","cloud-run-for-anthos","cloud-scheduler","cloud-security-scanner","cloud-shell","cloud-spanner","cloud-sql","cloud-storage","cloud-tasks","cloud-test-lab","cloud-tpu","cloud-translation-api","cloud-vision-api","c\
|
|
1568
|
+
loud-vpn","compute-engine","configuration-management","connectivity-test","connectors","contact-center-ai","container-optimized-os","container-registry","data-catalog","data-labeling","data-layers","data-loss-prevention-api","data-qn-a","data-studio","data-transfer","database-migration-service","dataflow","datalab","dataplex","datapol","dataprep","dataproc","dataproc-metastore","datashare","datastore","datastream","debugger","developer-portal","dialogflow","dialogflow-cx","dialogflow-insights","\
|
|
1569
|
+
document-ai","early-access-center","error-reporting","eventarc","filestore","financial-services-marketplace","firestore","fleet-engine","free-trial","game-servers","gce-systems-management","genomics","gke-on-prem","google-cloud-marketplace","google-kubernetes-engine","google-maps-platform","healthcare-nlp-api","home","identity-and-access-management","identity-aware-proxy","identity-platform","iot-core","iot-edge","key-access-justifications","key-management-service","kuberun","launcher","local-ss\
|
|
1570
|
+
d","looker","managed-service-for-microsoft-active-directory","media-translation-api","memorystore","migrate-for-anthos","migrate-for-compute-engine","my-cloud","network-connectivity-center","network-intelligence-center","network-security","network-tiers","network-topology","onboarding","os-configuration-management","os-inventory-management","os-patch-management","partner-interconnect","partner-portal","performance-dashboard","permissions","persistent-disk","phishing-protection","policy-analyzer",
|
|
1571
|
+
"premium-network-tier","private-connectivity","private-service-connect","producer-portal","profiler","project","pub-sub","quantum-engine","quotas","real-world-insights","recommendations-ai","release-notes","retail-api","risk-manager","runtime-config","secret-manager","security","security-command-center","security-health-advisor","security-key-enforcement","service-discovery","speech-to-text","stackdriver","standard-network-tier","stream-suite","support","tensorflow-enterprise","text-to-speech","\
|
|
1572
|
+
tools-for-powershell","trace","traffic-director","transfer","transfer-appliance","user-preferences","vertex-ai","video-intelligence-api","virtual-private-cloud","visual-inspection","vmware-engine","web-risk","web-security-scanner","workflows","workload-identity-pool"],tech:["aarch64","adobe-illustrator","adobe-photoshop","adobe-premiere-pro","adobe-xd","adonis-js","after-effects","airflow","akka","algolia","alpine-js","amazon-web-services","anaconda","android","android-studio","angular","angular\
|
|
1573
|
+
-js","ansible","ant-design","apache","apl","appcelerator","apple","apple-safari","appwrite","arch-linux","arduino","argo-cd","astro","atom","autodesk-maya","autodesk-shot-grid","awk","azios","azure","azure-devops","azure-sql-database","babel","backbone-js","ballerina","bamboo","bash","behance","bitbucket","blender","bootstrap","bower","browserstack","bulma","bun","c","cairo-graphics","cake-php","canva","capacitor","cassandra","cent-os","chrome","circle-ci","clarity","clion","clojure","clojure-sc\
|
|
1574
|
+
ript","cloudflare","cloudflare-workers","cmake","code-igniter","code-pen","codeac","codecov","coffee-script","composer","confluence","consul","contao","corejs","cosmosdb","couchdb","cplusplus","crystal","csharp","css3","cucumber","cypress","d3js","dart","data-grip","data-spell","dbeaver","debian","deno","devicon","digital-ocean","discord-js","django","django-rest","docker","doctrine","dropwizard","drupal","eclipse-ceylon","eclipse-ide","eclipse-vert-x","elasticbeats","elasticsearch","electron","\
|
|
1575
|
+
eleventy-11ty","elixir","elm","embedded-c","ember-js","envoy","erlang","eslint","express","facebook","fast-api","fastify","fauna","feathers","fedora","figma","file-zilla","firebase","firefox","flask","flutter","fortran","foundation","fsharp","gatling","gatsby","gazebo","gcc","gentoo","ghost","gimp","git","gitbook","github","github-actions","github-codespaces","gitlab","gitpod","gitter","gnu-emacs","go","go-land","godot-engine","google","google-cloud","gradle","grafana","grails","graphql","groovy",
|
|
1576
|
+
"grunt-js","gulp-js","hadoop","handlebars","hardhat","harvester","hashicorp-vault","haskell","haxe","helm","heroku","hibernate","homebrew","html5","hugo","ibm-spss-statistics","ie10","ifttt","influxdb","inkscape","insomnia","intellij-idea","ionic","jaeger","jamstack","jasmine","java","javascript","jeet","jekyll","jenkins","jest","jetbrains","jira","jira-align","jquery","json","jule","julia","junit","jupyter","k3os","k3s","kafka","kaggle","karate","karma","keras","kibana","knex-js","knockout","ko\
|
|
1577
|
+
tlin","krakenjs","ktor","kubernetes","labview","laravel","latex","less-js","linkedin","linux","liquibase","livewire","llvm","logstash","lua","lumen","magento","markdown","material-ui","materialize","matlab","matplotlib","maven","meteor-js","microsoft-sql-server","minitab","mob-x","mocha","modx","moleculer","mongodb","mongoose-js","moodle","ms-dos","mysql","nano","nerog","nestjs","net","net-core","network-x","new4j","nextjs","nginx","nhibernate","nim","nimble","nix","nodejs","nodemon","nodewebkit",
|
|
1578
|
+
"npm","nuget","num-py","nuxt-js","objective-c","ocaml","oh-my-zsh","okta","open-al","open-api","open-cl","open-cv","open-gl","open-stack","open-suse","open-telemetry","opera","oracle","p5js","packer","pandas","perl","pf-sense","phalcon","phoenix-framework","photon-engine","php","php-storm","playwrite","ploty","podman","polygon","portainer","postcss","postgresql","postman","powershell","processing","prometheus","protractor","purescript","putty","pycharm","pyscript","pytest","python","python-poetr\
|
|
1579
|
+
y","pytorch","qodana","qt","quarkus","quasar","qwik","r","rabbitmq","rancher","raspberrypi","reach","react","react-bootstrap","realm","red-cube-s-epic-compiler-thingy-programming-re-ct","redhat","redis","redux","ren-py","rider","robot-operating-system-ros","rocksdb","rollup-js","rspec","rstudio","ruby","ruby-mine","ruby-on-rails","rust","salesforce","sanity","sass","scala","scalingo","sdl","selenium","sema-software","sequelize","shopware","sketch","slack","socket-io","solid-js","solidity","sonar\
|
|
1580
|
+
qube","sourcetree","spark","splunk","spring","sql-developer","sqlalchemy","sqlite","ssh","stackoverflow","stata","storybook","streamlit","stylus","subversion","svelte","swagger","swift","symfony","tailwind-css","tauri","tensorflow","terraform","tex","the-algorithms","three-js","titanium-sdk","tomcat","tortoise-git","tower","traefik-mesh","traefik-proxy","travis-ci","trello","twitter","typescript","typo3","ubuntu","uml","unity","unix","unreal-engine","uwsgi","v8","vagrant","vala","vercel","veutif\
|
|
1581
|
+
y","vim","visualstudio","vite","vitejs","vscode","vsphere","vue","vue-storefront","vyper","webassembly","webflow","weblate","webpack","webstorm","windows8","windows11","woo-commerce","wordpress","xamarin","xcode","xml","yaml","yarn","yii-framework","yuno-host","zend-framework","zig"]})].flatMap(([t,e])=>e.map(n=>t+":"+n)),tA=["likec4lib {"," icons {",...zU.map(t=>" "+t)," }","}"].join(`
|
|
1582
|
+
`),nA="likec4builtin",HU=`${nA}:///likec4/lib/icons.c4`;function bd(t){return t.scheme===nA}const ot=vn.getChild("server");function zv(t){ot.error(hr(t))}function Re(t){ot.warn(hr(t))}const VU=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,rA=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,KU=/^([/\\]\s*){2,}[^/\\]/,XU=/^\.?\//;function iA(t){return["./","../"].some(e=>t.startsWith(e))}function fo(t,e={}){return typeof e=="boolean"&&(e={acceptRelative:e}),e.strict?VU.test(t):rA.test(t)||(e.acceptRelative?KU.test(t):!1)}function YU(t="",e){
|
|
1583
|
+
return t.endsWith("/")}function JU(t="",e){return(YU(t)?t.slice(0,-1):t)||"/"}function sA(t="",e){return t.endsWith("/")?t:t+"/"}function Lh(t=""){return t.startsWith("/")}function oA(t=""){return(Lh(t)?t.slice(1):t)||"/"}function QU(t=""){return Lh(t)?t:"/"+t}function ZU(t,e){if(eW(e))return t;const n=JU(e);if(!t.startsWith(n))return t;const r=t.slice(n.length);return r[0]==="/"?r:"/"+r}function eW(t){return!t||t==="/"}function tW(t){return t&&t!=="/"}function nW(t,...e){let n=t||"";for(const r of e.
|
|
1584
|
+
filter(i=>tW(i)))if(n){const i=r.replace(XU,"");n=sA(n)+i}else n=r;return n}function rW(...t){const e=/\/(?!\/)/,n=t.filter(Boolean),r=[];let i=0;for(const o of n)if(!(!o||o==="/")){for(const[a,u]of o.split(e).entries())if(!(!u||u===".")){if(u===".."){if(r.length===1&&fo(r[0]))continue;r.pop(),i--;continue}if(a===1&&r[r.length-1]?.endsWith(":/")){r[r.length-1]+="/"+u;continue}r.push(u),i++}}let s=r.join("/");return i>=0?n[0]?.startsWith("/")&&!s.startsWith("/")?s="/"+s:n[0]?.startsWith("./")&&!s.
|
|
1585
|
+
startsWith("./")&&(s="./"+s):s="../".repeat(-1*i)+s,n[n.length-1]?.endsWith("/")&&!s.endsWith("/")&&(s+="/"),s}function iW(t){return Hv(t,"")}function Hv(t,e){let n=t.match(rA);return n||(n=t.match(/^\/{2,}/)),n?e+t.slice(n[0].length):e+t}const sW=Symbol.for("ufo:protocolRelative");function oW(t="",e){const n=t.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(n){const[,f,d=""]=n;return{protocol:f.toLowerCase(),pathname:d,href:f+d,auth:"",host:"",search:"",hash:""}}if(!fo(t,{acceptRelative:!0}))
|
|
1586
|
+
return Da(t);const[,r="",i,s=""]=t.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[];let[,o="",a=""]=s.match(/([^#/?]*)(.*)?/)||[];r==="file:"&&(a=a.replace(/\/(?=[A-Za-z]:)/,""));const{pathname:u,search:c,hash:l}=Da(a);return{protocol:r.toLowerCase(),auth:i?i.slice(0,Math.max(0,i.length-1)):"",host:o,pathname:u,search:c,hash:l,[sW]:!r}}function Da(t=""){const[e="",n="",r=""]=(t.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:e,search:n,hash:r}}const aW=/\/([^/]+)$/;
|
|
1587
|
+
function uW(t="",{strict:e}){const{pathname:n}=oW(t),r=n.match(aW);return r?r[1]:void 0}var cW=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,lW=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\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\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\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\u0AF9\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-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\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-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\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\u2160-\u2188\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-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\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]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,
|
|
1588
|
+
dW=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\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\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,
|
|
1589
|
+
Vv={Space_Separator:cW,ID_Start:lW,ID_Continue:dW},Ft={isSpaceSeparator(t){return typeof t=="string"&&Vv.Space_Separator.test(t)},isIdStartChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t==="$"||t==="_"||Vv.ID_Start.test(t))},isIdContinueChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||t==="$"||t==="_"||t==="\u200C"||t==="\u200D"||Vv.ID_Continue.test(t))},isDigit(t){return typeof t=="string"&&/[0-9]/.test(t)},isHexDigit(t){return typeof t==
|
|
1590
|
+
"string"&&/[0-9A-Fa-f]/.test(t)}};let Kv,Cn,Ci,Fh,ns,Rr,Qt,Xv,Ed;var fW=function(e,n){Kv=String(e),Cn="start",Ci=[],Fh=0,ns=1,Rr=0,Qt=void 0,Xv=void 0,Ed=void 0;do Qt=pW(),gW[Cn]();while(Qt.type!=="eof");return typeof n=="function"?Yv({"":Ed},"",n):Ed};function Yv(t,e,n){const r=t[e];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let i=0;i<r.length;i++){const s=String(i),o=Yv(r,s,n);o===void 0?delete r[s]:Object.defineProperty(r,s,{value:o,writable:!0,enumerable:!0,configurable:!0})}else
|
|
1591
|
+
for(const i in r){const s=Yv(r,i,n);s===void 0?delete r[i]:Object.defineProperty(r,i,{value:s,writable:!0,enumerable:!0,configurable:!0})}return n.call(t,e,r)}let Fe,_e,$d,Ai,Ve;function pW(){for(Fe="default",_e="",$d=!1,Ai=1;;){Ve=Si();const t=aA[Fe]();if(t)return t}}function Si(){if(Kv[Fh])return String.fromCodePoint(Kv.codePointAt(Fh))}function ee(){const t=Si();return t===`
|
|
1592
|
+
`?(ns++,Rr=0):t?Rr+=t.length:Rr++,t&&(Fh+=t.length),t}const aA={default(){switch(Ve){case" ":case"\v":case"\f":case" ":case"\xA0":case"\uFEFF":case`
|
|
1593
|
+
`:case"\r":case"\u2028":case"\u2029":ee();return;case"/":ee(),Fe="comment";return;case void 0:return ee(),$t("eof")}if(Ft.isSpaceSeparator(Ve)){ee();return}return aA[Cn]()},comment(){switch(Ve){case"*":ee(),Fe="multiLineComment";return;case"/":ee(),Fe="singleLineComment";return}throw Dt(ee())},multiLineComment(){switch(Ve){case"*":ee(),Fe="multiLineCommentAsterisk";return;case void 0:throw Dt(ee())}ee()},multiLineCommentAsterisk(){switch(Ve){case"*":ee();return;case"/":ee(),Fe="default";return;case void 0:
|
|
1594
|
+
throw Dt(ee())}ee(),Fe="multiLineComment"},singleLineComment(){switch(Ve){case`
|
|
1595
|
+
`:case"\r":case"\u2028":case"\u2029":ee(),Fe="default";return;case void 0:return ee(),$t("eof")}ee()},value(){switch(Ve){case"{":case"[":return $t("punctuator",ee());case"n":return ee(),po("ull"),$t("null",null);case"t":return ee(),po("rue"),$t("boolean",!0);case"f":return ee(),po("alse"),$t("boolean",!1);case"-":case"+":ee()==="-"&&(Ai=-1),Fe="sign";return;case".":_e=ee(),Fe="decimalPointLeading";return;case"0":_e=ee(),Fe="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"\
|
|
1596
|
+
8":case"9":_e=ee(),Fe="decimalInteger";return;case"I":return ee(),po("nfinity"),$t("numeric",1/0);case"N":return ee(),po("aN"),$t("numeric",NaN);case'"':case"'":$d=ee()==='"',_e="",Fe="string";return}throw Dt(ee())},identifierNameStartEscape(){if(Ve!=="u")throw Dt(ee());ee();const t=Jv();switch(t){case"$":case"_":break;default:if(!Ft.isIdStartChar(t))throw uA();break}_e+=t,Fe="identifierName"},identifierName(){switch(Ve){case"$":case"_":case"\u200C":case"\u200D":_e+=ee();return;case"\\":ee(),Fe=
|
|
1597
|
+
"identifierNameEscape";return}if(Ft.isIdContinueChar(Ve)){_e+=ee();return}return $t("identifier",_e)},identifierNameEscape(){if(Ve!=="u")throw Dt(ee());ee();const t=Jv();switch(t){case"$":case"_":case"\u200C":case"\u200D":break;default:if(!Ft.isIdContinueChar(t))throw uA();break}_e+=t,Fe="identifierName"},sign(){switch(Ve){case".":_e=ee(),Fe="decimalPointLeading";return;case"0":_e=ee(),Fe="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":_e=ee(),Fe="decimalInt\
|
|
1598
|
+
eger";return;case"I":return ee(),po("nfinity"),$t("numeric",Ai*(1/0));case"N":return ee(),po("aN"),$t("numeric",NaN)}throw Dt(ee())},zero(){switch(Ve){case".":_e+=ee(),Fe="decimalPoint";return;case"e":case"E":_e+=ee(),Fe="decimalExponent";return;case"x":case"X":_e+=ee(),Fe="hexadecimal";return}return $t("numeric",Ai*0)},decimalInteger(){switch(Ve){case".":_e+=ee(),Fe="decimalPoint";return;case"e":case"E":_e+=ee(),Fe="decimalExponent";return}if(Ft.isDigit(Ve)){_e+=ee();return}return $t("numeric",
|
|
1599
|
+
Ai*Number(_e))},decimalPointLeading(){if(Ft.isDigit(Ve)){_e+=ee(),Fe="decimalFraction";return}throw Dt(ee())},decimalPoint(){switch(Ve){case"e":case"E":_e+=ee(),Fe="decimalExponent";return}if(Ft.isDigit(Ve)){_e+=ee(),Fe="decimalFraction";return}return $t("numeric",Ai*Number(_e))},decimalFraction(){switch(Ve){case"e":case"E":_e+=ee(),Fe="decimalExponent";return}if(Ft.isDigit(Ve)){_e+=ee();return}return $t("numeric",Ai*Number(_e))},decimalExponent(){switch(Ve){case"+":case"-":_e+=ee(),Fe="decimalE\
|
|
1600
|
+
xponentSign";return}if(Ft.isDigit(Ve)){_e+=ee(),Fe="decimalExponentInteger";return}throw Dt(ee())},decimalExponentSign(){if(Ft.isDigit(Ve)){_e+=ee(),Fe="decimalExponentInteger";return}throw Dt(ee())},decimalExponentInteger(){if(Ft.isDigit(Ve)){_e+=ee();return}return $t("numeric",Ai*Number(_e))},hexadecimal(){if(Ft.isHexDigit(Ve)){_e+=ee(),Fe="hexadecimalInteger";return}throw Dt(ee())},hexadecimalInteger(){if(Ft.isHexDigit(Ve)){_e+=ee();return}return $t("numeric",Ai*Number(_e))},string(){switch(Ve){case"\
|
|
1601
|
+
\\":ee(),_e+=hW();return;case'"':if($d)return ee(),$t("string",_e);_e+=ee();return;case"'":if(!$d)return ee(),$t("string",_e);_e+=ee();return;case`
|
|
1602
|
+
`:case"\r":throw Dt(ee());case"\u2028":case"\u2029":yW(Ve);break;case void 0:throw Dt(ee())}_e+=ee()},start(){switch(Ve){case"{":case"[":return $t("punctuator",ee())}Fe="value"},beforePropertyName(){switch(Ve){case"$":case"_":_e=ee(),Fe="identifierName";return;case"\\":ee(),Fe="identifierNameStartEscape";return;case"}":return $t("punctuator",ee());case'"':case"'":$d=ee()==='"',Fe="string";return}if(Ft.isIdStartChar(Ve)){_e+=ee(),Fe="identifierName";return}throw Dt(ee())},afterPropertyName(){if(Ve===
|
|
1603
|
+
":")return $t("punctuator",ee());throw Dt(ee())},beforePropertyValue(){Fe="value"},afterPropertyValue(){switch(Ve){case",":case"}":return $t("punctuator",ee())}throw Dt(ee())},beforeArrayValue(){if(Ve==="]")return $t("punctuator",ee());Fe="value"},afterArrayValue(){switch(Ve){case",":case"]":return $t("punctuator",ee())}throw Dt(ee())},end(){throw Dt(ee())}};function $t(t,e){return{type:t,value:e,line:ns,column:Rr}}function po(t){for(const e of t){if(Si()!==e)throw Dt(ee());ee()}}function hW(){switch(Si()){case"\
|
|
1604
|
+
b":return ee(),"\b";case"f":return ee(),"\f";case"n":return ee(),`
|
|
1605
|
+
`;case"r":return ee(),"\r";case"t":return ee()," ";case"v":return ee(),"\v";case"0":if(ee(),Ft.isDigit(Si()))throw Dt(ee());return"\0";case"x":return ee(),mW();case"u":return ee(),Jv();case`
|
|
1606
|
+
`:case"\u2028":case"\u2029":return ee(),"";case"\r":return ee(),Si()===`
|
|
1607
|
+
`&&ee(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw Dt(ee());case void 0:throw Dt(ee())}return ee()}function mW(){let t="",e=Si();if(!Ft.isHexDigit(e)||(t+=ee(),e=Si(),!Ft.isHexDigit(e)))throw Dt(ee());return t+=ee(),String.fromCodePoint(parseInt(t,16))}function Jv(){let t="",e=4;for(;e-- >0;){const n=Si();if(!Ft.isHexDigit(n))throw Dt(ee());t+=ee()}return String.fromCodePoint(parseInt(t,16))}const gW={start(){if(Qt.type==="eof")throw ho();Qv()},beforePropertyName(){
|
|
1608
|
+
switch(Qt.type){case"identifier":case"string":Xv=Qt.value,Cn="afterPropertyName";return;case"punctuator":Mh();return;case"eof":throw ho()}},afterPropertyName(){if(Qt.type==="eof")throw ho();Cn="beforePropertyValue"},beforePropertyValue(){if(Qt.type==="eof")throw ho();Qv()},beforeArrayValue(){if(Qt.type==="eof")throw ho();if(Qt.type==="punctuator"&&Qt.value==="]"){Mh();return}Qv()},afterPropertyValue(){if(Qt.type==="eof")throw ho();switch(Qt.value){case",":Cn="beforePropertyName";return;case"}":Mh()}},
|
|
1609
|
+
afterArrayValue(){if(Qt.type==="eof")throw ho();switch(Qt.value){case",":Cn="beforeArrayValue";return;case"]":Mh()}},end(){}};function Qv(){let t;switch(Qt.type){case"punctuator":switch(Qt.value){case"{":t={};break;case"[":t=[];break}break;case"null":case"boolean":case"numeric":case"string":t=Qt.value;break}if(Ed===void 0)Ed=t;else{const e=Ci[Ci.length-1];Array.isArray(e)?e.push(t):Object.defineProperty(e,Xv,{value:t,writable:!0,enumerable:!0,configurable:!0})}if(t!==null&&typeof t=="object")Ci.
|
|
1610
|
+
push(t),Array.isArray(t)?Cn="beforeArrayValue":Cn="beforePropertyName";else{const e=Ci[Ci.length-1];e==null?Cn="end":Array.isArray(e)?Cn="afterArrayValue":Cn="afterPropertyValue"}}function Mh(){Ci.pop();const t=Ci[Ci.length-1];t==null?Cn="end":Array.isArray(t)?Cn="afterArrayValue":Cn="afterPropertyValue"}function Dt(t){return Bh(t===void 0?`JSON5: invalid end of input at ${ns}:${Rr}`:`JSON5: invalid character '${cA(t)}' at ${ns}:${Rr}`)}function ho(){return Bh(`JSON5: invalid end of input at ${ns}\
|
|
1611
|
+
:${Rr}`)}function uA(){return Rr-=5,Bh(`JSON5: invalid identifier character at ${ns}:${Rr}`)}function yW(t){console.warn(`JSON5: '${cA(t)}' in strings is not valid ECMAScript; consider escaping`)}function cA(t){const e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[t])return e[t];if(t<" "){const n=t.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return t}function Bh(t){const e=new SyntaxError(
|
|
1612
|
+
t);return e.lineNumber=ns,e.columnNumber=Rr,e}var vW=function(e,n,r){const i=[];let s="",o,a,u="",c;if(n!=null&&typeof n=="object"&&!Array.isArray(n)&&(r=n.space,c=n.quote,n=n.replacer),typeof n=="function")a=n;else if(Array.isArray(n)){o=[];for(const v of n){let b;typeof v=="string"?b=v:(typeof v=="number"||v instanceof String||v instanceof Number)&&(b=String(v)),b!==void 0&&o.indexOf(b)<0&&o.push(b)}}return r instanceof Number?r=Number(r):r instanceof String&&(r=String(r)),typeof r=="number"?r>
|
|
1613
|
+
0&&(r=Math.min(10,Math.floor(r)),u=" ".substr(0,r)):typeof r=="string"&&(u=r.substr(0,10)),l("",{"":e});function l(v,b){let y=b[v];switch(y!=null&&(typeof y.toJSON5=="function"?y=y.toJSON5(v):typeof y.toJSON=="function"&&(y=y.toJSON(v))),a&&(y=a.call(b,v,y)),y instanceof Number?y=Number(y):y instanceof String?y=String(y):y instanceof Boolean&&(y=y.valueOf()),y){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof y=="string")return f(y);if(typeof y=="number")return String(
|
|
1614
|
+
y);if(typeof y=="object")return Array.isArray(y)?h(y):d(y)}function f(v){const b={"'":.1,'"':.2},y={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let E="";for(let A=0;A<v.length;A++){const N=v[A];switch(N){case"'":case'"':b[N]++,E+=N;continue;case"\0":if(Ft.isDigit(v[A+1])){E+="\\x00";continue}}if(y[N]){E+=y[N];continue}if(N<" "){let K=N.charCodeAt(0).toString(16);E+="\\x"+("00"+K).substring(K.length);
|
|
1615
|
+
continue}E+=N}const R=c||Object.keys(b).reduce((A,N)=>b[A]<b[N]?A:N);return E=E.replace(new RegExp(R,"g"),y[R]),R+E+R}function d(v){if(i.indexOf(v)>=0)throw TypeError("Converting circular structure to JSON5");i.push(v);let b=s;s=s+u;let y=o||Object.keys(v),E=[];for(const A of y){const N=l(A,v);if(N!==void 0){let K=p(A)+":";u!==""&&(K+=" "),K+=N,E.push(K)}}let R;if(E.length===0)R="{}";else{let A;if(u==="")A=E.join(","),R="{"+A+"}";else{let N=`,
|
|
1616
|
+
`+s;A=E.join(N),R=`{
|
|
1617
|
+
`+s+A+`,
|
|
1618
|
+
`+b+"}"}}return i.pop(),s=b,R}function p(v){if(v.length===0)return f(v);const b=String.fromCodePoint(v.codePointAt(0));if(!Ft.isIdStartChar(b))return f(v);for(let y=b.length;y<v.length;y++)if(!Ft.isIdContinueChar(String.fromCodePoint(v.codePointAt(y))))return f(v);return v}function h(v){if(i.indexOf(v)>=0)throw TypeError("Converting circular structure to JSON5");i.push(v);let b=s;s=s+u;let y=[];for(let R=0;R<v.length;R++){const A=l(String(R),v);y.push(A!==void 0?A:"null")}let E;if(y.length===0)E=
|
|
1619
|
+
"[]";else if(u==="")E="["+y.join(",")+"]";else{let R=`,
|
|
1620
|
+
`+s,A=y.join(R);E=`[
|
|
1621
|
+
`+s+A+`,
|
|
1622
|
+
`+b+"]"}return i.pop(),s=b,E}};const wW={parse:fW,stringify:vW};var lA=wW,Zv;function dA(t){return{lang:t?.lang??Zv?.lang,message:t?.message,abortEarly:t?.abortEarly??Zv?.abortEarly,abortPipeEarly:t?.abortPipeEarly??Zv?.abortPipeEarly}}var bW;function EW(t){return bW?.get(t)}var $W;function DW(t){return $W?.get(t)}var RW;function kW(t,e){return RW?.get(t)?.get(e)}function TW(t){const e=typeof t;return e==="string"?`"${t}"`:e==="number"||e==="bigint"||e==="boolean"?`${t}`:e==="object"||e==="funct\
|
|
1623
|
+
ion"?(t&&Object.getPrototypeOf(t)?.constructor?.name)??"null":e}function Dd(t,e,n,r,i){const s=i&&"input"in i?i.input:n.value,o=i?.expected??t.expects??null,a=i?.received??TW(s),u={kind:t.kind,type:t.type,input:s,expected:o,received:a,message:`Invalid ${e}: ${o?`Expected ${o} but r`:"R"}eceived ${a}`,requirement:t.requirement,path:i?.path,issues:i?.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},c=t.kind==="schema",l=i?.message??t.message??kW(t.reference,u.lang)??(c?DW(
|
|
1624
|
+
u.lang):null)??r.message??EW(u.lang);l!==void 0&&(u.message=typeof l=="function"?l(u):l),c&&(n.typed=!1),n.issues?n.issues.push(u):n.issues=[u]}function Rd(t){return{version:1,vendor:"valibot",validate(e){return t["~run"]({value:e},dA())}}}var CW=class extends Error{constructor(t){super(t[0].message),this.name="ValiError",this.issues=t}};function jh(t){return{kind:"metadata",type:"description",reference:jh,description:t}}function ew(t){return{kind:"validation",type:"non_empty",reference:ew,async:!1,
|
|
1625
|
+
expects:"!0",message:t,"~run"(e,n){return e.typed&&e.value.length===0&&Dd(this,"length",e,n,{received:"0"}),e}}}function AW(t,e,n){return typeof t.fallback=="function"?t.fallback(e,n):t.fallback}function fA(t,e,n){return typeof t.default=="function"?t.default(e,n):t.default}function pA(t,e){return{kind:"schema",type:"array",reference:pA,expects:"Array",async:!1,item:t,message:e,get"~standard"(){return Rd(this)},"~run"(n,r){const i=n.value;if(Array.isArray(i)){n.typed=!0,n.value=[];for(let s=0;s<
|
|
1626
|
+
i.length;s++){const o=i[s],a=this.item["~run"]({value:o},r);if(a.issues){const u={type:"array",origin:"value",input:i,key:s,value:o};for(const c of a.issues)c.path?c.path.unshift(u):c.path=[u],n.issues?.push(c);if(n.issues||(n.issues=a.issues),r.abortEarly){n.typed=!1;break}}a.typed||(n.typed=!1),n.value.push(a.value)}}else Dd(this,"type",n,r);return n}}}function hA(t,e){return{kind:"schema",type:"object",reference:hA,expects:"Object",async:!1,entries:t,message:e,get"~standard"(){return Rd(this)},
|
|
1627
|
+
"~run"(n,r){const i=n.value;if(i&&typeof i=="object"){n.typed=!0,n.value={};for(const s in this.entries){const o=this.entries[s];if(s in i||(o.type==="exact_optional"||o.type==="optional"||o.type==="nullish")&&o.default!==void 0){const a=s in i?i[s]:fA(o),u=o["~run"]({value:a},r);if(u.issues){const c={type:"object",origin:"value",input:i,key:s,value:a};for(const l of u.issues)l.path?l.path.unshift(c):l.path=[c],n.issues?.push(l);if(n.issues||(n.issues=u.issues),r.abortEarly){n.typed=!1;break}}u.
|
|
1628
|
+
typed||(n.typed=!1),n.value[s]=u.value}else if(o.fallback!==void 0)n.value[s]=AW(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(Dd(this,"key",n,r,{input:void 0,expected:`"${s}"`,path:[{type:"object",origin:"key",input:i,key:s,value:i[s]}]}),r.abortEarly))break}}else Dd(this,"type",n,r);return n}}}function tw(t,e){return{kind:"schema",type:"optional",reference:tw,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:e,get"~standard"(){return Rd(this)},"~\
|
|
1629
|
+
run"(n,r){return n.value===void 0&&(this.default!==void 0&&(n.value=fA(this,n,r)),n.value===void 0)?(n.typed=!0,n):this.wrapped["~run"](n,r)}}}function qh(t){return{kind:"schema",type:"string",reference:qh,expects:"string",async:!1,message:t,get"~standard"(){return Rd(this)},"~run"(e,n){return typeof e.value=="string"?e.typed=!0:Dd(this,"type",e,n),e}}}function SW(t,e,n){const r=t["~run"]({value:e},dA(n));if(r.issues)throw new CW(r.issues);return r.value}function nw(...t){return{...t[0],pipe:t,get"\
|
|
1630
|
+
~standard"(){return Rd(this)},"~run"(e,n){for(const r of t)if(r.kind!=="metadata"){if(e.issues&&(r.kind==="schema"||r.kind==="transformation")){e.typed=!1;break}(!e.issues||!n.abortEarly&&!n.abortPipeEarly)&&(e=r["~run"](e,n))}return e}}}const _W=hA({name:nw(qh(),ew(),jh("Project name, must be unique in the workspace")),contactPerson:tw(nw(qh(),ew(),jh("A person who has been involved in creating or maintaining this project"))),exclude:tw(nw(pA(qh()),jh('List of file patterns to exclude from the \
|
|
1631
|
+
project, default is ["node_modules"]')))});function PW(t){return xW(lA.parse(t))}function xW(t){return SW(_W,t)}const mA=ot.getChild("ProjectsManager");class Qn{constructor(e){this.services=e,mA.debug`created`}static DefaultProjectId="default";static ConfigFileNames=[".likec4rc",".likec4.config.json","likec4.config.json"];projectIdToFolder=new __;_mappingsToProject;_projects=[];get defaultProjectId(){if(!(this._projects.length>1))return this._projects[0]?.id??Qn.DefaultProjectId}get all(){return qr(
|
|
1632
|
+
this._projects,1)?[...xt(this._projects,ci("id")),Qn.DefaultProjectId]:[Qn.DefaultProjectId]}getProject(e){if(e===Qn.DefaultProjectId)return{folder:this.services.workspace.WorkspaceManager.workspaceUri,config:{name:Qn.DefaultProjectId}};const n=Wt(this._projects.find(({id:r})=>r===e),`Project "${e}" not found`);return{folder:Et.parse(n.folder),config:n.config}}ensureProjectId(e){return e===Qn.DefaultProjectId?e:e?(Ie(this.projectIdToFolder.has(e),`Project ID ${e} is not registered`),e):Wt(this.defaultProjectId,
|
|
1633
|
+
()=>`Specify exact project, known: [${[...this.projectIdToFolder.keys()].join(", ")}]`)}hasMultipleProjects(){return this._projects.length>1}async loadConfigFile(e){if(e.isDirectory)return!1;const n=uW(e.uri.fsPath,{strict:!1});return n&&Qn.ConfigFileNames.includes(n)?(await this.registerProject(e.uri),!0):!1}async registerProject(e){if(Et.isUri(e)){const o=e,a=await this.services.workspace.FileSystemProvider.readFile(o),u=PW(a),c=rW(o.path,".."),l=o.with({path:c});return this.registerProject({config:u,
|
|
1634
|
+
folderUri:l})}const{config:n,folderUri:r}=e,i=n.name;if(this._projects.some(({id:o})=>o===i))throw new Error(`Project ID ${i} already registered`);let s;Et.isUri(r)?s=r.toString():s=fo(r)?r:Hv(r,"file://"),this._projects=Xe([...this._projects,{folder:s,config:n,id:i}],d3([({folder:o})=>iW(o).split("/").length,"desc"])),this.projectIdToFolder.set(i,s),mA.debug`registered project ${i} folder: ${s})`}belongsTo(e){let n;return typeof e=="string"?n=fo(e)?e:Hv(e,"file://"):Et.isUri(e)?n=e.toString():n=
|
|
1635
|
+
e.uri.toString(),this.mappingsToProject.get(n,()=>this.getProjectId(n))}getProjectId(e){return this._projects.find(({folder:n})=>e.toString().startsWith(n))?.id??Qn.DefaultProjectId}get mappingsToProject(){return this._mappingsToProject??=new pp(this.services),this._mappingsToProject}}const NW={fileSystemProvider:()=>new LW},IW=[...Wv.fileExtensions,...Qn.ConfigFileNames],OW=t=>IW.some(e=>t.endsWith(e));let LW=class extends Y8{async readFile(e){return bd(e)?Promise.resolve(tA):await super.readFile(
|
|
1636
|
+
e)}async readDirectory(e){const n=[];try{const r=await new X8.fdir().withSymlinks({resolvePaths:!1}).withFullPaths().filter(OW).crawl(e.fsPath).withPromise();for(const i of r)n.push({isFile:!0,isDirectory:!1,uri:Et.file(i)})}catch(r){zv(r)}return n}};var FW=Object.getOwnPropertyNames,MW=Object.getOwnPropertySymbols,BW=Object.prototype.hasOwnProperty;function gA(t,e){return function(r,i,s){return t(r,i,s)&&e(r,i,s)}}function Gh(t){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="o\
|
|
1637
|
+
bject")return t(n,r,i);var s=i.cache,o=s.get(n),a=s.get(r);if(o&&a)return o===r&&a===n;s.set(n,r),s.set(r,n);var u=t(n,r,i);return s.delete(n),s.delete(r),u}}function yA(t){return FW(t).concat(MW(t))}var jW=Object.hasOwn||function(t,e){return BW.call(t,e)};function mo(t,e){return t===e||!t&&!e&&t!==t&&e!==e}var qW="__v",GW="__o",UW="_owner",vA=Object.getOwnPropertyDescriptor,wA=Object.keys;function WW(t,e,n){var r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;
|
|
1638
|
+
return!0}function zW(t,e){return mo(t.getTime(),e.getTime())}function HW(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function VW(t,e){return t===e}function bA(t,e,n){var r=t.size;if(r!==e.size)return!1;if(!r)return!0;for(var i=new Array(r),s=t.entries(),o,a,u=0;(o=s.next())&&!o.done;){for(var c=e.entries(),l=!1,f=0;(a=c.next())&&!a.done;){if(i[f]){f++;continue}var d=o.value,p=a.value;if(n.equals(d[0],p[0],u,f,t,e,n)&&n.equals(d[1],p[1],d[0],p[0],t,e,n)){
|
|
1639
|
+
l=i[f]=!0;break}f++}if(!l)return!1;u++}return!0}var KW=mo;function XW(t,e,n){var r=wA(t),i=r.length;if(wA(e).length!==i)return!1;for(;i-- >0;)if(!$A(t,e,n,r[i]))return!1;return!0}function kd(t,e,n){var r=yA(t),i=r.length;if(yA(e).length!==i)return!1;for(var s,o,a;i-- >0;)if(s=r[i],!$A(t,e,n,s)||(o=vA(t,s),a=vA(e,s),(o||a)&&(!o||!a||o.configurable!==a.configurable||o.enumerable!==a.enumerable||o.writable!==a.writable)))return!1;return!0}function YW(t,e){return mo(t.valueOf(),e.valueOf())}function JW(t,e){
|
|
1640
|
+
return t.source===e.source&&t.flags===e.flags}function EA(t,e,n){var r=t.size;if(r!==e.size)return!1;if(!r)return!0;for(var i=new Array(r),s=t.values(),o,a;(o=s.next())&&!o.done;){for(var u=e.values(),c=!1,l=0;(a=u.next())&&!a.done;){if(!i[l]&&n.equals(o.value,a.value,o.value,a.value,t,e,n)){c=i[l]=!0;break}l++}if(!c)return!1}return!0}function QW(t,e){var n=t.length;if(e.length!==n)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}function ZW(t,e){return t.hostname===e.hostname&&t.pathname===
|
|
1641
|
+
e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function $A(t,e,n,r){return(r===UW||r===GW||r===qW)&&(t.$$typeof||e.$$typeof)?!0:jW(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}var ez="[object Arguments]",tz="[object Boolean]",nz="[object Date]",rz="[object Error]",iz="[object Map]",sz="[object Number]",oz="[object Object]",az="[object RegExp]",uz="[object Set]",cz="[object String]",lz="[object URL]",dz=Array.isArray,DA=typeof ArrayBuffer==
|
|
1642
|
+
"function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,RA=Object.assign,fz=Object.prototype.toString.call.bind(Object.prototype.toString);function pz(t){var e=t.areArraysEqual,n=t.areDatesEqual,r=t.areErrorsEqual,i=t.areFunctionsEqual,s=t.areMapsEqual,o=t.areNumbersEqual,a=t.areObjectsEqual,u=t.arePrimitiveWrappersEqual,c=t.areRegExpsEqual,l=t.areSetsEqual,f=t.areTypedArraysEqual,d=t.areUrlsEqual;return function(h,v,b){if(h===v)return!0;if(h==null||v==null)return!1;var y=typeof h;if(y!==typeof v)
|
|
1643
|
+
return!1;if(y!=="object")return y==="number"?o(h,v,b):y==="function"?i(h,v,b):!1;var E=h.constructor;if(E!==v.constructor)return!1;if(E===Object)return a(h,v,b);if(dz(h))return e(h,v,b);if(DA!=null&&DA(h))return f(h,v,b);if(E===Date)return n(h,v,b);if(E===RegExp)return c(h,v,b);if(E===Map)return s(h,v,b);if(E===Set)return l(h,v,b);var R=fz(h);return R===nz?n(h,v,b):R===az?c(h,v,b):R===iz?s(h,v,b):R===uz?l(h,v,b):R===oz?typeof h.then!="function"&&typeof v.then!="function"&&a(h,v,b):R===lz?d(h,v,b):
|
|
1644
|
+
R===rz?r(h,v,b):R===ez?a(h,v,b):R===tz||R===sz||R===cz?u(h,v,b):!1}}function hz(t){var e=t.circular,n=t.createCustomConfig,r=t.strict,i={areArraysEqual:r?kd:WW,areDatesEqual:zW,areErrorsEqual:HW,areFunctionsEqual:VW,areMapsEqual:r?gA(bA,kd):bA,areNumbersEqual:KW,areObjectsEqual:r?kd:XW,arePrimitiveWrappersEqual:YW,areRegExpsEqual:JW,areSetsEqual:r?gA(EA,kd):EA,areTypedArraysEqual:r?kd:QW,areUrlsEqual:ZW};if(n&&(i=RA({},i,n(i))),e){var s=Gh(i.areArraysEqual),o=Gh(i.areMapsEqual),a=Gh(i.areObjectsEqual),
|
|
1645
|
+
u=Gh(i.areSetsEqual);i=RA({},i,{areArraysEqual:s,areMapsEqual:o,areObjectsEqual:a,areSetsEqual:u})}return i}function mz(t){return function(e,n,r,i,s,o,a){return t(e,n,a)}}function gz(t){var e=t.circular,n=t.comparator,r=t.createState,i=t.equals,s=t.strict;if(r)return function(u,c){var l=r(),f=l.cache,d=f===void 0?e?new WeakMap:void 0:f,p=l.meta;return n(u,c,{cache:d,equals:i,meta:p,strict:s})};if(e)return function(u,c){return n(u,c,{cache:new WeakMap,equals:i,meta:void 0,strict:s})};var o={cache:void 0,
|
|
1646
|
+
equals:i,meta:void 0,strict:s};return function(u,c){return n(u,c,o)}}var rw=rs();rs({strict:!0}),rs({circular:!0}),rs({circular:!0,strict:!0}),rs({createInternalComparator:function(){return mo}}),rs({strict:!0,createInternalComparator:function(){return mo}}),rs({circular:!0,createInternalComparator:function(){return mo}}),rs({circular:!0,createInternalComparator:function(){return mo},strict:!0});function rs(t){t===void 0&&(t={});var e=t.circular,n=e===void 0?!1:e,r=t.createInternalComparator,i=t.
|
|
1647
|
+
createState,s=t.strict,o=s===void 0?!1:s,a=hz(t),u=pz(a),c=r?r(u):mz(u);return gz({circular:n,comparator:u,createState:i,equals:c,strict:o})}function kA(t,e){const n=t.nodes.map(i=>{const s=e.nodes[i.id];if(!s)return i;const{x:o,y:a,width:u,height:c}=s;return{...i,width:u,height:c,position:[o,a]}}),r=t.edges.map(i=>{const s=e.edges[i.id];return s?{...i,...s}:i});return{...t,bounds:{x:e.x,y:e.y,width:e.width,height:e.height},nodes:n,edges:r}}const TA=(t,e)=>t.width>e.width+10||t.height>e.height+10;
|
|
1648
|
+
function yz(t,e){if(t.hash===e.hash)return{diagram:kA(t,e)};if(rw(t.autoLayout,e.autoLayout)&&t.nodes.every(r=>{const i=e.nodes[r.id];return!!i&&(r.children.length>0&&i.isCompound||r.children.length===0&&!i.isCompound)&&(i.isCompound||TA(r,i)===!1)})&&t.edges.every(r=>{const i=e.edges[r.id];return!!i&&(!r.labelBBox&&!i.labelBBox||!!r.labelBBox&&!!i.labelBBox&&r.labelBBox.width<=i.labelBBox.width&&r.labelBBox.height<=i.labelBBox.height)}))return{diagram:kA(t,e)};const n=t.nodes.reduce((r,i)=>{const s=e.
|
|
1649
|
+
nodes[i.id];if(i.children.length>0||!s)return r;const o={id:i.id,center:{x:Math.round(s.x+s.width/2),y:Math.round(s.y+s.height/2)}};return s.isCompound||TA(i,s)||(o.fixedsize={width:s.width,height:s.height}),r.push(o),r},[]);return{relayout:{x:e.x,y:e.y,height:e.height,nodes:n,edges:ec(e.edges).flatMap(([r,i])=>i.dotpos?{id:r,dotpos:i.dotpos}:[])}}}function CA(t){return typeof t=="object"&&t!==null&&typeof t.id=="string"}function iw(t){return typeof t=="object"&&t!==null&&t.$$type==="Node"&&typeof t.
|
|
1650
|
+
id=="string"}function AA(t){return iw(t)||CA(t)}function Td(t){return typeof t=="string"||AA(t)}function vz(t){return Array.isArray(t)&&t.every(Td)}function wz(t){return["n","ne","e","se","s","sw","w","nw","c"].includes(t)}function SA(t){if(AA(t))return t;const[e,n,r]=t.split(":");return wz(r)?{id:e,port:n,compass:r}:{id:e,port:n}}function bz(t){if(t.length<2&&(Td(t[0])&&Td(t[1]))===!1)throw Error("EdgeTargets must have at least 2 elements.");return t.map(e=>SA(e))}const Uh=Object.seal({Graph:null,
|
|
1651
|
+
Digraph:null,Subgraph:null,Node:null,Edge:null});function Ez(t){return Object.assign(Object.seal(Object.assign({},Uh)),t)}function $z(...t){const[e,...n]=t;return(...r)=>n.reduce((i,s)=>s(i),e(...r))}function ar(t,...e){return $z(t,...e)}const Dz=t=>(...e)=>n=>t(n,...e),Rz=t=>({[Symbol.iterator]:t}),kr=Dz((t,e)=>Array.from(Rz(function*(){for(const n of t)yield e(n)})));class _A{options;getLocation(){return this.options?.locationFunction?.()??null}constructor(e){this.options=e}createElement(e,n,r=[]){
|
|
1652
|
+
return{location:this.getLocation(),...n,type:e,children:r}}}const rt=_A.prototype.createElement.bind(new _A),kz=/\r?\n/;function Tr(t){return e=>e.join(t)}function Tz(t){return e=>t+e+t}function is(t,e){return n=>t+n+e}function Wh(t){return e=>t+e}const PA=t=>t.replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/"/g,'\\"'),zh=t=>t.split(kz),Cd=(t,e,n)=>ar(zh,kr(Wh(t==="space"?" ".repeat(e):`
|
|
1653
|
+
`)),Tr(n)),go=t=>{switch(t){case"crlf":return`\r
|
|
1654
|
+
`;case"lf":return`
|
|
1655
|
+
`}},Cz={match(t){return t.type==="AttributeList"},print(t,e){if(e.children.length===0)return`${e.kind.toLocaleLowerCase()} [];`;const n=go(t.endOfLine);return ar(kr(t.print),Tr(n),Cd(t.indentStyle,t.indentSize,n),is(`${e.kind.toLocaleLowerCase()} [${n}`,`${n}];`))(e.children)}},Az={match(t){return t.type==="Attribute"},print(t,e){return`${t.print(e.key)} = ${t.print(e.value)};`}},Sz={match(t){return t.type==="Comment"},print(t,e){const n=go(t.endOfLine);switch(e.kind){case"Block":return ar(zh,kr(
|
|
1656
|
+
Wh(" * ")),Tr(n),is(`/**${n}`,`${n} */`))(e.value);case"Macro":return ar(zh,kr(Wh("# ")),Tr(n))(e.value);case"Slash":default:return ar(zh,kr(Wh("// ")),Tr(n))(e.value)}}},_z={match(t){return t.type==="Dot"},print(t,e){return e.children.map(t.print).join(go(t.endOfLine))}},Pz={match(t){return t.type==="Edge"},print(t,e){const n=ar(kr(t.print),Tr(t.directed?" -> ":" -- "))(e.targets);if(e.children.length===0)return`${n};`;const r=go(t.endOfLine),i=ar(kr(t.print),Tr(r),Cd(t.indentStyle,t.indentSize,
|
|
1657
|
+
r),is(`[${r}`,`${r}];`))(e.children);return`${n} ${i}`}},xz={match(t){return t.type==="Graph"},print(t,e){t.directed=e.directed;const n=[];if(e.strict&&n.push("strict"),n.push(e.directed?"digraph":"graph"),e.id&&n.push(t.print(e.id)),e.children.length===0)return`${n.join(" ")} {}`;const r=go(t.endOfLine),i=ar(kr(t.print),Tr(r),Cd(t.indentStyle,t.indentSize,r),is(`{${r}`,`${r}}`))(e.children);return`${n.join(" ")} ${i}`}},Nz=ar(PA,Tz('"')),Iz=is("<",">"),Oz={match(t){return t.type==="Literal"},print(t,e){
|
|
1658
|
+
switch(e.quoted){case"html":return Iz(e.value);case!0:return Nz(e.value);case!1:default:return PA(e.value)}}},Lz={match(t){return t.type==="Node"},print(t,e){const n=t.print(e.id);if(e.children.length===0)return`${n};`;const r=go(t.endOfLine),i=ar(kr(t.print),Tr(r),Cd(t.indentStyle,t.indentSize,r),is(`[${r}`,`${r}];`))(e.children);return`${n} ${i}`}},Fz={match(t){return t.type==="NodeRefGroup"},print(t,e){return ar(kr(t.print),Tr(" "),is("{","}"))(e.children)}},Mz={match(t){return t.type==="Node\
|
|
1659
|
+
Ref"},print(t,e){const n=[t.print(e.id)];return e.port&&n.push(t.print(e.port)),e.compass&&n.push(t.print(e.compass)),n.join(":")}},Bz={match(t){return t.type==="Subgraph"},print(t,e){const n=["subgraph"];if(e.id&&n.push(t.print(e.id)),e.children.length===0)return`${n.join(" ")} {}`;const r=go(t.endOfLine),i=ar(kr(t.print),Tr(r),Cd(t.indentStyle,t.indentSize,r),is(`{${r}`,`${r}}`))(e.children);return`${n.join(" ")} ${i}`}},jz=[Cz,Az,Sz,_z,Pz,xz,Oz,Lz,Fz,Mz,Bz];class qz{options;#e=[...jz];constructor(e={}){
|
|
1660
|
+
this.options=e}print(e){const n=[...this.#e],{indentSize:r=2,indentStyle:i="space",endOfLine:s="lf"}=this.options,o={directed:!0,indentSize:r,indentStyle:i,endOfLine:s,print(a){for(const u of n)if(u.match(a))return u.print(o,a);throw Error()}};return o.print(e)}}function Gz(t,e){const n=new qz(e).print(t);if(!n)throw new Error;return n}function Hh(t,e){if(typeof e=="string"){const n=e.trim();return/^<.+>$/ms.test(n)?rt("Attribute",{key:rt("Literal",{value:t,quoted:!1},[]),value:rt("Literal",{value:n.
|
|
1661
|
+
slice(1,n.length-1),quoted:"html"},[])},[]):rt("Attribute",{key:rt("Literal",{value:t,quoted:!1},[]),value:rt("Literal",{value:e,quoted:!0},[])},[])}return rt("Attribute",{key:rt("Literal",{value:t,quoted:!1},[]),value:rt("Literal",{value:String(e),quoted:!1},[])},[])}function yo(t,e){return rt("Comment",{kind:e,value:t},[])}function xA(t,e){return Array.from(function*(){for(const[n,r]of e.values)yield Hh(n,r);for(const n of Object.values(e.attributes))n.size>0&&(n.comment&&(yield yo(n.comment,t.
|
|
1662
|
+
commentKind)),yield t.convert(n));for(const n of e.nodes)n.comment&&(yield yo(n.comment,t.commentKind)),yield t.convert(n);for(const n of e.subgraphs)n.comment&&(yield yo(n.comment,t.commentKind)),yield t.convert(n);for(const n of e.edges)n.comment&&(yield yo(n.comment,t.commentKind)),yield t.convert(n)}())}const Uz={match(t){return t.$$type==="AttributeList"},convert(t,e){return rt("AttributeList",{kind:e.$$kind},e.values.map(([n,r])=>Hh(n,r)))}},Wz={match(t){return t.$$type==="Edge"},convert(t,e){
|
|
1663
|
+
return rt("Edge",{targets:e.targets.map(n=>iw(n)?rt("NodeRef",{id:rt("Literal",{value:n.id,quoted:!0},[])},[]):CA(n)?rt("NodeRef",{id:rt("Literal",{value:n.id,quoted:!0},[]),port:n.port?rt("Literal",{value:n.port,quoted:!0},[]):void 0,compass:n.compass?rt("Literal",{value:n.compass,quoted:!0},[]):void 0},[]):rt("NodeRefGroup",{},n.map(r=>iw(r)?rt("NodeRef",{id:rt("Literal",{value:r.id,quoted:!0},[])},[]):rt("NodeRef",{id:rt("Literal",{value:r.id,quoted:!0},[]),port:r.port?rt("Literal",{value:r.port,
|
|
1664
|
+
quoted:!0},[]):void 0,compass:r.compass?rt("Literal",{value:r.compass,quoted:!0},[]):void 0},[]))))},[...e.attributes.comment?[yo(e.attributes.comment,t.commentKind)]:[],...e.attributes.values.map(([n,r])=>Hh(n,r))])}},zz={match(t){return t.$$type==="Graph"},convert(t,e){return rt("Dot",{},[...e.comment?[yo(e.comment,t.commentKind)]:[],rt("Graph",{directed:e.directed,strict:e.strict,id:e.id?rt("Literal",{value:e.id,quoted:!0},[]):void 0},xA(t,e))])}},Hz={match(t){return t.$$type==="Node"},convert(t,e){
|
|
1665
|
+
return rt("Node",{id:rt("Literal",{value:e.id,quoted:!0},[])},[...e.attributes.comment?[yo(e.attributes.comment,t.commentKind)]:[],...e.attributes.values.map(([n,r])=>Hh(n,r))])}},Vz={match(t){return t.$$type==="Subgraph"},convert(t,e){return rt("Subgraph",{id:e.id?rt("Literal",{value:e.id,quoted:!0},[]):void 0},xA(t,e))}},Kz=[Uz,Wz,Hz,zz,Vz];class Xz{options;#e=[...Kz];constructor(e={}){this.options=e}convert(e){const n=[...this.#e],{commentKind:r="Slash"}=this.options,i={commentKind:r,convert(s){
|
|
1666
|
+
for(const o of n)if(o.match(s))return o.convert(i,s);throw Error()}};return i.convert(e)}}function Yz(t,e){return new Xz(e).convert(t)}const L=new Proxy(Object.freeze({}),{get:(t,e)=>e});class sw{}class ow extends sw{#e=new Map;constructor(e){super(),e!==void 0&&this.apply(e)}get values(){return Array.from(this.#e.entries())}get size(){return this.#e.size}get(e){return this.#e.get(e)}set(e,n){n!=null&&this.#e.set(e,n)}delete(e){this.#e.delete(e)}apply(e){const n=Array.isArray(e)?e:Object.entries(
|
|
1667
|
+
e);for(const[r,i]of n)this.set(r,i)}clear(){this.#e.clear()}}class aw extends ow{$$kind;get $$type(){return"AttributeList"}comment;constructor(e,n){super(n),this.$$kind=e}}class NA extends ow{#e=Uh;id;comment;attributes=Object.freeze({graph:new aw("Graph"),edge:new aw("Edge"),node:new aw("Node")});get nodes(){return Array.from(this.#t.nodes.values())}get edges(){return Array.from(this.#t.edges.values())}get subgraphs(){return Array.from(this.#t.subgraphs.values())}#t={nodes:new Map,edges:new Set,
|
|
1668
|
+
subgraphs:new Set};with(e){this.#e=Ez(e)}addNode(e){this.#t.nodes.set(e.id,e)}addEdge(e){this.#t.edges.add(e)}addSubgraph(e){this.#t.subgraphs.add(e)}existNode(e){return this.#t.nodes.has(e)}existEdge(e){return this.#t.edges.has(e)}existSubgraph(e){return this.#t.subgraphs.has(e)}createSubgraph(...e){const n=new this.#e.Subgraph(...e);return n.with(this.#e),this.addSubgraph(n),n}removeNode(e){this.#t.nodes.delete(typeof e=="string"?e:e.id)}removeEdge(e){this.#t.edges.delete(e)}removeSubgraph(e){
|
|
1669
|
+
this.#t.subgraphs.delete(e)}createNode(e,n){const r=new this.#e.Node(e,n);return this.addNode(r),r}getSubgraph(e){return Array.from(this.#t.subgraphs.values()).find(n=>n.id===e)}getNode(e){return this.#t.nodes.get(e)}createEdge(e,n){const r=e.map(s=>vz(s)?bz(s):SA(s)),i=new this.#e.Edge(r,n);return this.addEdge(i),i}subgraph(...e){const n=e.find(o=>typeof o=="string"),r=e.find(o=>typeof o=="object"&&o!==null),i=e.find(o=>typeof o=="function"),s=n?this.getSubgraph(n)??this.createSubgraph(n):this.
|
|
1670
|
+
createSubgraph();return r!==void 0&&s.apply(r),i!==void 0&&i(s),s}node(e,...n){if(typeof e=="string"){const r=e,i=n.find(a=>typeof a=="object"&&a!==null),s=n.find(a=>typeof a=="function"),o=this.getNode(r)??this.createNode(r);return i!==void 0&&o.attributes.apply(i),s!==void 0&&s(o),o}typeof e=="object"&&e!==null&&this.attributes.node.apply(e)}edge(e,...n){if(Array.isArray(e)){const r=e,i=n.find(a=>typeof a=="object"),s=n.find(a=>typeof a=="function"),o=this.createEdge(r,i);return s!==void 0&&s(
|
|
1671
|
+
o),o}typeof e=="object"&&e!==null&&this.attributes.edge.apply(e)}graph(e){this.attributes.graph.apply(e)}}class IA extends NA{get $$type(){return"Graph"}id;strict;constructor(...e){super(),this.id=e.find(r=>typeof r=="string"),this.strict=e.find(r=>typeof r=="boolean")??!1;const n=e.find(r=>typeof r=="object"&&r!==null);n!==void 0&&this.apply(n)}}class Jz extends IA{get directed(){return!0}}let Qz=class extends IA{get directed(){return!1}};class Zz extends NA{get $$type(){return"Subgraph"}id;constructor(...e){
|
|
1672
|
+
super(),this.id=e.find(r=>typeof r=="string");const n=e.find(r=>typeof r=="object"&&r!==null);n!==void 0&&this.apply(n)}isSubgraphCluster(){return typeof this.id=="string"?this.id.startsWith("cluster"):!1}}class OA extends ow{comment}let e6=class extends sw{id;get $$type(){return"Node"}comment;attributes;constructor(e,n){super(),this.id=e,this.attributes=new OA(n)}port(e){return typeof e=="string"?{id:this.id,port:e}:{id:this.id,...e}}};class t6 extends sw{targets;get $$type(){return"Edge"}comment;attributes;constructor(e,n){
|
|
1673
|
+
if(super(),this.targets=e,e.length<2&&(Td(e[0])&&Td(e[1]))===!1)throw Error("The element of Edge target is missing or not satisfied as Edge target.");this.attributes=new OA(n)}}Object.assign(Uh,{Graph:Qz,Digraph:Jz,Subgraph:Zz,Node:e6,Edge:t6});function LA(t,e){return(...n)=>{const r=t?this.Digraph:this.Graph,i=n.find(u=>typeof u=="string"),s=n.find(u=>typeof u=="object"),o=n.find(u=>typeof u=="function"),a=new r(i,e,s);return a.with(this),typeof o=="function"&&o(a),a}}function FA(t,e=Uh){return Object.
|
|
1674
|
+
freeze({digraph:LA.call(e,!0,t),graph:LA.call(e,!1,t)})}const MA=FA(!1),n6=MA.digraph;MA.graph;const r6=FA(!0);function BA(t,e){const n=Yz(t,e?.convert);return Gz(n,e?.print)}var uw,jA;function i6(){if(jA)return uw;jA=1;function t(r){let i=r.length-1,s=r[i];for(;s===" "||s===" ";)s=r[--i];return r.substring(0,i+1)}function e(r){return r.split(`
|
|
1675
|
+
`).map(o=>t(o)).join(`
|
|
1676
|
+
`)}uw=function(r,i){if(i=i||{},r==null)return r;var s=i.width||50,o=typeof i.indent=="string"?i.indent:" ",a=i.newline||`
|
|
1677
|
+
`+o,u=typeof i.escape=="function"?i.escape:n,c=".{1,"+s+"}";i.cut!==!0&&(c+="([\\s\u200B]+|$)|[^\\s\u200B]+?([\\s\u200B]+|$)");var l=new RegExp(c,"g"),f=r.match(l)||[],d=o+f.map(function(p){return p.slice(-1)===`
|
|
1678
|
+
`&&(p=p.slice(0,p.length-1)),u(p)}).join(a);return i.trim===!0&&(d=e(d)),d};function n(r){return r}return uw}var s6=i6();const o6=Mi(s6),Vh={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,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<
|
|
1679
|
+
1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t),hsl2rgb:({h:t,s:e,l:n},r)=>{if(!e)return n*2.55;t/=360,e/=100,n/=100;const i=n<.5?n*(1+e):n+e-n*e,s=2*n-i;switch(r){case"r":return Vh.hue2rgb(s,i,t+1/3)*255;case"g":return Vh.hue2rgb(s,i,t)*255;case"b":return Vh.hue2rgb(s,i,t-1/3)*255}},rgb2hsl:({r:t,g:e,b:n},r)=>{t/=255,e/=255,n/=255;const i=Math.max(t,e,n),s=Math.min(t,e,n),o=(i+s)/2;if(r==="l")return o*100;if(i===s)return 0;const a=i-s,u=o>.5?a/(2-i-s):a/(i+s);if(r==="s")return u*100;switch(i){case t:
|
|
1680
|
+
return((e-n)/a+(e<n?6:0))*60;case e:return((n-t)/a+2)*60;case n:return((t-e)/a+4)*60;default:return-1}}},a6={clamp:(t,e,n)=>e>n?Math.min(e,Math.max(n,t)):Math.min(n,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},u6={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},Me={channel:Vh,lang:a6,unit:u6},ss={};for(let t=0;t<=255;t++)ss[t]=Me.unit.dec2hex(t);const hn={ALL:0,RGB:1,HSL:2};class c6{constructor(){this.type=hn.ALL}get(){return this.type}set(e){if(this.type&&this.type!==
|
|
1681
|
+
e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=hn.ALL}is(e){return this.type===e}}class l6{constructor(e,n){this.color=n,this.changed=!1,this.data=e,this.type=new c6}set(e,n){return this.color=n,this.changed=!1,this.data=e,this.type.type=hn.ALL,this}_ensureHSL(){const e=this.data,{h:n,s:r,l:i}=e;n===void 0&&(e.h=Me.channel.rgb2hsl(e,"h")),r===void 0&&(e.s=Me.channel.rgb2hsl(e,"s")),i===void 0&&(e.l=Me.channel.rgb2hsl(e,"l"))}_ensureRGB(){
|
|
1682
|
+
const e=this.data,{r:n,g:r,b:i}=e;n===void 0&&(e.r=Me.channel.hsl2rgb(e,"r")),r===void 0&&(e.g=Me.channel.hsl2rgb(e,"g")),i===void 0&&(e.b=Me.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,n=e.r;return!this.type.is(hn.HSL)&&n!==void 0?n:(this._ensureHSL(),Me.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,n=e.g;return!this.type.is(hn.HSL)&&n!==void 0?n:(this._ensureHSL(),Me.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,n=e.b;return!this.type.is(hn.HSL)&&n!==void 0?n:(this._ensureHSL(),Me.
|
|
1683
|
+
channel.hsl2rgb(e,"b"))}get h(){const e=this.data,n=e.h;return!this.type.is(hn.RGB)&&n!==void 0?n:(this._ensureRGB(),Me.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,n=e.s;return!this.type.is(hn.RGB)&&n!==void 0?n:(this._ensureRGB(),Me.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,n=e.l;return!this.type.is(hn.RGB)&&n!==void 0?n:(this._ensureRGB(),Me.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(hn.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(hn.RGB),
|
|
1684
|
+
this.changed=!0,this.data.g=e}set b(e){this.type.set(hn.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(hn.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(hn.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(hn.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const cw=new l6({r:0,g:0,b:0,a:0},"transparent"),Ra={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;const e=t.match(Ra.re);if(!e)return;const n=e[1],
|
|
1685
|
+
r=parseInt(n,16),i=n.length,s=i%4===0,o=i>4,a=o?1:17,u=o?8:4,c=s?0:-1,l=o?255:15;return cw.set({r:(r>>u*(c+3)&l)*a,g:(r>>u*(c+2)&l)*a,b:(r>>u*(c+1)&l)*a,a:s?(r&l)*a/255:1},t)},stringify:t=>{const{r:e,g:n,b:r,a:i}=t;return i<1?`#${ss[Math.round(e)]}${ss[Math.round(n)]}${ss[Math.round(r)]}${ss[Math.round(i*255)]}`:`#${ss[Math.round(e)]}${ss[Math.round(n)]}${ss[Math.round(r)]}`}},vo={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,
|
|
1686
|
+
hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(vo.hueRe);if(e){const[,n,r]=e;switch(r){case"grad":return Me.channel.clamp.h(parseFloat(n)*.9);case"rad":return Me.channel.clamp.h(parseFloat(n)*180/Math.PI);case"turn":return Me.channel.clamp.h(parseFloat(n)*360)}}return Me.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(e!==104&&e!==72)return;const n=t.match(vo.re);if(!n)return;const[,r,i,s,o,a]=n;return cw.set({h:vo._hue2deg(r),s:Me.channel.clamp.s(parseFloat(
|
|
1687
|
+
i)),l:Me.channel.clamp.l(parseFloat(s)),a:o?Me.channel.clamp.a(a?parseFloat(o)/100:parseFloat(o)):1},t)},stringify:t=>{const{h:e,s:n,l:r,a:i}=t;return i<1?`hsla(${Me.lang.round(e)}, ${Me.lang.round(n)}%, ${Me.lang.round(r)}%, ${i})`:`hsl(${Me.lang.round(e)}, ${Me.lang.round(n)}%, ${Me.lang.round(r)}%)`}},Ad={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",
|
|
1688
|
+
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:"#8f\
|
|
1689
|
+
bc8f",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:"#cd5c\
|
|
1690
|
+
5c",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:"\
|
|
1691
|
+
#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:"\
|
|
1692
|
+
#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:"\
|
|
1693
|
+
#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=Ad.colors[t];if(e)return Ra.parse(e)},stringify:t=>{const e=Ra.stringify(t);for(const n in Ad.colors)if(Ad.colors[n]===e)return n}},Sd={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,
|
|
1694
|
+
parse:t=>{const e=t.charCodeAt(0);if(e!==114&&e!==82)return;const n=t.match(Sd.re);if(!n)return;const[,r,i,s,o,a,u,c,l]=n;return cw.set({r:Me.channel.clamp.r(i?parseFloat(r)*2.55:parseFloat(r)),g:Me.channel.clamp.g(o?parseFloat(s)*2.55:parseFloat(s)),b:Me.channel.clamp.b(u?parseFloat(a)*2.55:parseFloat(a)),a:c?Me.channel.clamp.a(l?parseFloat(c)/100:parseFloat(c)):1},t)},stringify:t=>{const{r:e,g:n,b:r,a:i}=t;return i<1?`rgba(${Me.lang.round(e)}, ${Me.lang.round(n)}, ${Me.lang.round(r)}, ${Me.lang.
|
|
1695
|
+
round(i)})`:`rgb(${Me.lang.round(e)}, ${Me.lang.round(n)}, ${Me.lang.round(r)})`}},os={format:{keyword:Ad,hex:Ra,rgb:Sd,rgba:Sd,hsl:vo,hsla:vo},parse:t=>{if(typeof t!="string")return t;const e=Ra.parse(t)||Sd.parse(t)||vo.parse(t)||Ad.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(hn.HSL)||t.data.r===void 0?vo.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?Sd.stringify(t):Ra.
|
|
1696
|
+
stringify(t)},d6=(t,e)=>{const n=os.parse(t);for(const r in e)n[r]=Me.channel.clamp[r](e[r]);return os.stringify(n)},qA=t=>os.format.hex.stringify(os.parse(t)),f6=(t,e,n)=>{const r=os.parse(t),i=r[e],s=Me.channel.clamp[e](i+n);return i!==s&&(r[e]=s),os.stringify(r)},p6=(t,e)=>f6(t,"a",-.3),h6=(t,e)=>{const n=os.parse(t),r={};for(const i in e)e[i]&&(r[i]=n[i]+e[i]);return d6(t,r)},m6=(t,e)=>{const n=os.parse(t),r={},i=(s,o,a)=>o>0?(a-s)*o/100:s*o/100;for(const s in e)r[s]=i(n[s],e[s],Me.channel.max[s]);
|
|
1697
|
+
return h6(t,r)};function Yn(t){return t.children.length>0}function mn(t){switch(t){case"open":return"vee";default:return t}}function zr(t){return Array.isArray(t)?[zr(t[0]),zr(t[1])]:(Ie(isFinite(t),`Invalid not finite point value ${t}`),Math.round(t))}const GA=t=>(Ie(isFinite(t),`Invalid not finite inch value ${t}`),Math.floor(t*72)),yt=t=>Math.ceil(t/72*1e3)/1e3,ur=t=>Math.ceil(t);ur(40).toString();function UA(t,e){return qA(m6(t,{l:-35-5*e,s:-15-5*e}))}function g6(t){return qA(p6(t))}function y6(t){
|
|
1698
|
+
return t.trim().replaceAll("&","&").replaceAll("<","<").replaceAll(">",">")}function WA(t,{maxchars:e,maxLines:n,sanitize:r=A3()}){let i=o6(t,{width:e,indent:"",escape:r}).split(`
|
|
1699
|
+
`);return an(n)&&n>0&&i.length>n&&(i=i.slice(0,n-1)),i}function wo({text:t,maxchars:e,fontsize:n,maxLines:r,bold:i,color:s}){let o=WA(t,{maxchars:e,maxLines:r,sanitize:y6}).join("<BR/>");i&&(o=`<B>${o}</B>`);const a=s?` COLOR="${s}"`:"";return`<FONT POINT-SIZE="${ur(n)}"${a}>${o}</FONT>`}function lw(t){return Yt.textSizes[t]}function v6(t){switch(t){case"xs":case"sm":return 25;case"md":return 35;case"lg":case"xl":return 45;default:je(t)}}function w6(t,e,n){const r=["sm","xs"].includes(n.shape),i=ce(
|
|
1700
|
+
t.icon),s=[wo({text:t.title,fontsize:lw(n.text),maxchars:v6(n.shape),maxLines:r?1:3})];if(n.shape!=="xs"&&(ce(t.technology?.trim())&&s.push(wo({text:t.technology,fontsize:Math.ceil(lw(n.text)*.65),maxchars:i?35:45,maxLines:1,color:e.loContrast})),ce(t.description?.trim())&&s.push(wo({text:t.description,fontsize:Math.ceil(lw(n.text)*.75),maxchars:i?35:45,maxLines:r?3:5,color:e.loContrast}))),s.length===1&&!i)return`<${s[0]}>`;const o=i?(a,u,c)=>{let l=`<TD ALIGN="TEXT" BALIGN="LEFT">${a}</TD>`;if(u===
|
|
1701
|
+
0){const f=c.length>1?` ROWSPAN="${c.length}"`:"";let d=76;["xs","sm"].includes(n.shape)&&(d=16),(t.shape==="queue"||t.shape==="mobile")&&(d+=20),l=`<TD${f} WIDTH="${d}"> </TD>${l}`,l=`${l}<TD${f} WIDTH="16"> </TD>`}return`<TR>${l}</TR>`}:a=>`<TR><TD>${a}</TD></TR>`;return`<<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="4">${s.map(o).join("")}</TABLE>>`}function b6(t,e){const n=wo({text:t.title.toUpperCase(),maxchars:50,fontsize:11,maxLines:1,bold:!0,color:e});return n.includes("<BR/>")?`<<TABLE\
|
|
1702
|
+
BORDER="0" CELLPADDING="0" CELLSPACING="0"><TR><TD ALIGN="TEXT" BALIGN="LEFT">${n}</TD></TR></TABLE>>`:`<${n}>`}const Kh=40,zA=5,dw=`BGCOLOR="${Yt.relationships[Oa].labelBgColor}A0"`;function HA({label:t,technology:e}){const n=[];if(ce(t?.trim())&&n.push(wo({text:t,maxchars:Kh,fontsize:14,maxLines:zA,bold:t==="[...]"})),ce(e?.trim())&&n.push(wo({text:`[ ${e} ]`,fontsize:12,maxLines:1,maxchars:Kh})),n.length===0)return null;const r=n.map(i=>`<TR><TD ALIGN="TEXT" BALIGN="LEFT">${i}</TD></TR>`).join(
|
|
1703
|
+
"");return`<<TABLE BORDER="0" CELLPADDING="3" CELLSPACING="0" ${dw}>${r}</TABLE>>`}function E6(t,e){const n=`<TABLE BORDER="0" CELLPADDING="6" ${dw}><TR><TD WIDTH="20" HEIGHT="20"><FONT POINT-SIZE="${ur(14)}"><B>${t}</B></FONT></TD></TR></TABLE>`;return ce(e?.trim())?`<${['<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">',"<TR>",`<TD>${n}</TD>`,`<TD ${dw} CELLPADDING="3">`,wo({text:e,maxchars:Kh,fontsize:14,maxLines:5}),"</TD>","</TR>","</TABLE>"].join("")}>`:`<${n}>`}var fw,VA;function pw(){if(VA)
|
|
1704
|
+
return fw;VA=1;function t(e){if(typeof e!="function")throw new Error("obliterator/iterator: expecting a function!");this.next=e}return typeof Symbol<"u"&&(t.prototype[Symbol.iterator]=function(){return this}),t.of=function(){var e=arguments,n=e.length,r=0;return new t(function(){return r>=n?{done:!0}:{done:!1,value:e[r++]}})},t.empty=function(){var e=new t(function(){return{done:!0}});return e},t.fromSequence=function(e){var n=0,r=e.length;return new t(function(){return n>=r?{done:!0}:{done:!1,value:e[n++]}})},
|
|
1705
|
+
t.is=function(e){return e instanceof t?!0:typeof e=="object"&&e!==null&&typeof e.next=="function"},fw=t,fw}var $6=pw();const cr=Mi($6);var Xh={},KA;function D6(){return KA||(KA=1,Xh.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u",Xh.SYMBOL_SUPPORT=typeof Symbol<"u"),Xh}var hw,XA;function YA(){if(XA)return hw;XA=1;var t=pw(),e=D6(),n=e.ARRAY_BUFFER_SUPPORT,r=e.SYMBOL_SUPPORT;function i(s){return typeof s=="string"||Array.isArray(s)||n&&ArrayBuffer.isView(s)?t.fromSequence(s):typeof s!="object"||s===null?
|
|
1706
|
+
null:r&&typeof s[Symbol.iterator]=="function"?s[Symbol.iterator]():typeof s.next=="function"?s:null}return hw=function(o){var a=i(o);if(!a)throw new Error("obliterator: target is not iterable nor a valid iterator.");return a},hw}var mw,JA;function R6(){if(JA)return mw;JA=1;var t=YA();return mw=function(n,r){for(var i=arguments.length>1?r:1/0,s=i!==1/0?new Array(i):[],o,a=0,u=t(n);;){if(a===i)return s;if(o=u.next(),o.done)return a!==r&&(s.length=a),s;s[a++]=o.value}},mw}var k6=R6();const QA=Mi(k6);
|
|
1707
|
+
var gw,ZA;function T6(){if(ZA)return gw;ZA=1;var t=pw(),e=YA();return gw=function(){var r=arguments,i=null,s=-1;return new t(function(){var a=null;do{if(i===null){if(s++,s>=r.length)return{done:!0};i=e(r[s])}if(a=i.next(),a.done===!0){i=null;continue}break}while(!0);return a})},gw}var C6=T6();const _i=Mi(C6);function A6(){const t=arguments[0];for(let e=1,n=arguments.length;e<n;e++)if(arguments[e])for(const r in arguments[e])t[r]=arguments[e][r];return t}let Vt=A6;typeof Object.assign=="function"&&
|
|
1708
|
+
(Vt=Object.assign);function lr(t,e,n,r){const i=t._nodes.get(e);let s=null;return i&&(r==="mixed"?s=i.out&&i.out[n]||i.undirected&&i.undirected[n]:r==="directed"?s=i.out&&i.out[n]:s=i.undirected&&i.undirected[n]),s}function cn(t){return typeof t=="object"&&t!==null}function eS(t){let e;for(e in t)return!1;return!0}function dr(t,e,n){Object.defineProperty(t,e,{enumerable:!1,configurable:!1,writable:!0,value:n})}function Cr(t,e,n){const r={enumerable:!0,configurable:!0};typeof n=="function"?r.get=
|
|
1709
|
+
n:(r.value=n,r.writable=!1),Object.defineProperty(t,e,r)}function tS(t){return!(!cn(t)||t.attributes&&!Array.isArray(t.attributes))}function S6(){let t=Math.floor(Math.random()*256)&255;return()=>t++}class yw extends Error{constructor(e){super(),this.name="GraphError",this.message=e}}class me extends yw{constructor(e){super(e),this.name="InvalidArgumentsGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,me.prototype.constructor)}}class ae extends yw{constructor(e){
|
|
1710
|
+
super(e),this.name="NotFoundGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ae.prototype.constructor)}}class Ce extends yw{constructor(e){super(e),this.name="UsageGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Ce.prototype.constructor)}}function nS(t,e){this.key=t,this.attributes=e,this.clear()}nS.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=
|
|
1711
|
+
0,this.in={},this.out={},this.undirected={}};function rS(t,e){this.key=t,this.attributes=e,this.clear()}rS.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}};function iS(t,e){this.key=t,this.attributes=e,this.clear()}iS.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}};function ka(t,e,n,r,i){this.key=e,this.attributes=i,this.undirected=t,this.source=n,this.target=r}ka.prototype.attach=function(){let t="\
|
|
1712
|
+
out",e="in";this.undirected&&(t=e="undirected");const n=this.source.key,r=this.target.key;this.source[t][r]=this,!(this.undirected&&n===r)&&(this.target[e][n]=this)},ka.prototype.attachMulti=function(){let t="out",e="in";const n=this.source.key,r=this.target.key;this.undirected&&(t=e="undirected");const i=this.source[t],s=i[r];if(typeof s>"u"){i[r]=this,this.undirected&&n===r||(this.target[e][n]=this);return}s.previous=this,this.next=s,i[r]=this,this.target[e][n]=this},ka.prototype.detach=function(){
|
|
1713
|
+
const t=this.source.key,e=this.target.key;let n="out",r="in";this.undirected&&(n=r="undirected"),delete this.source[n][e],delete this.target[r][t]},ka.prototype.detachMulti=function(){const t=this.source.key,e=this.target.key;let n="out",r="in";this.undirected&&(n=r="undirected"),this.previous===void 0?this.next===void 0?(delete this.source[n][e],delete this.target[r][t]):(this.next.previous=void 0,this.source[n][e]=this.next,this.target[r][t]=this.next):(this.previous.next=this.next,this.next!==
|
|
1714
|
+
void 0&&(this.next.previous=this.previous))};const sS=0,oS=1,_6=2,aS=3;function Pi(t,e,n,r,i,s,o){let a,u,c,l;if(r=""+r,n===sS){if(a=t._nodes.get(r),!a)throw new ae(`Graph.${e}: could not find the "${r}" node in the graph.`);c=i,l=s}else if(n===aS){if(i=""+i,u=t._edges.get(i),!u)throw new ae(`Graph.${e}: could not find the "${i}" edge in the graph.`);const f=u.source.key,d=u.target.key;if(r===f)a=u.target;else if(r===d)a=u.source;else throw new ae(`Graph.${e}: the "${r}" node is not attached to \
|
|
1715
|
+
the "${i}" edge (${f}, ${d}).`);c=s,l=o}else{if(u=t._edges.get(r),!u)throw new ae(`Graph.${e}: could not find the "${r}" edge in the graph.`);n===oS?a=u.source:a=u.target,c=i,l=s}return[a,c,l]}function P6(t,e,n){t.prototype[e]=function(r,i,s){const[o,a]=Pi(this,e,n,r,i,s);return o.attributes[a]}}function x6(t,e,n){t.prototype[e]=function(r,i){const[s]=Pi(this,e,n,r,i);return s.attributes}}function N6(t,e,n){t.prototype[e]=function(r,i,s){const[o,a]=Pi(this,e,n,r,i,s);return o.attributes.hasOwnProperty(
|
|
1716
|
+
a)}}function I6(t,e,n){t.prototype[e]=function(r,i,s,o){const[a,u,c]=Pi(this,e,n,r,i,s,o);return a.attributes[u]=c,this.emit("nodeAttributesUpdated",{key:a.key,type:"set",attributes:a.attributes,name:u}),this}}function O6(t,e,n){t.prototype[e]=function(r,i,s,o){const[a,u,c]=Pi(this,e,n,r,i,s,o);if(typeof c!="function")throw new me(`Graph.${e}: updater should be a function.`);const l=a.attributes,f=c(l[u]);return l[u]=f,this.emit("nodeAttributesUpdated",{key:a.key,type:"set",attributes:a.attributes,
|
|
1717
|
+
name:u}),this}}function L6(t,e,n){t.prototype[e]=function(r,i,s){const[o,a]=Pi(this,e,n,r,i,s);return delete o.attributes[a],this.emit("nodeAttributesUpdated",{key:o.key,type:"remove",attributes:o.attributes,name:a}),this}}function F6(t,e,n){t.prototype[e]=function(r,i,s){const[o,a]=Pi(this,e,n,r,i,s);if(!cn(a))throw new me(`Graph.${e}: provided attributes are not a plain object.`);return o.attributes=a,this.emit("nodeAttributesUpdated",{key:o.key,type:"replace",attributes:o.attributes}),this}}function M6(t,e,n){
|
|
1718
|
+
t.prototype[e]=function(r,i,s){const[o,a]=Pi(this,e,n,r,i,s);if(!cn(a))throw new me(`Graph.${e}: provided attributes are not a plain object.`);return Vt(o.attributes,a),this.emit("nodeAttributesUpdated",{key:o.key,type:"merge",attributes:o.attributes,data:a}),this}}function B6(t,e,n){t.prototype[e]=function(r,i,s){const[o,a]=Pi(this,e,n,r,i,s);if(typeof a!="function")throw new me(`Graph.${e}: provided updater is not a function.`);return o.attributes=a(o.attributes),this.emit("nodeAttributesUpdat\
|
|
1719
|
+
ed",{key:o.key,type:"update",attributes:o.attributes}),this}}const j6=[{name:t=>`get${t}Attribute`,attacher:P6},{name:t=>`get${t}Attributes`,attacher:x6},{name:t=>`has${t}Attribute`,attacher:N6},{name:t=>`set${t}Attribute`,attacher:I6},{name:t=>`update${t}Attribute`,attacher:O6},{name:t=>`remove${t}Attribute`,attacher:L6},{name:t=>`replace${t}Attributes`,attacher:F6},{name:t=>`merge${t}Attributes`,attacher:M6},{name:t=>`update${t}Attributes`,attacher:B6}];function q6(t){j6.forEach(function({name:e,
|
|
1720
|
+
attacher:n}){n(t,e("Node"),sS),n(t,e("Source"),oS),n(t,e("Target"),_6),n(t,e("Opposite"),aS)})}function G6(t,e,n){t.prototype[e]=function(r,i){let s;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new Ce(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new Ce(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);
|
|
1721
|
+
const o=""+r,a=""+i;if(i=arguments[2],s=lr(this,o,a,n),!s)throw new ae(`Graph.${e}: could not find an edge for the given path ("${o}" - "${a}").`)}else{if(n!=="mixed")throw new Ce(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,s=this._edges.get(r),!s)throw new ae(`Graph.${e}: could not find the "${r}" edge in the graph.`)}return s.attributes[i]}}function U6(t,e,n){t.prototype[e]=function(r){
|
|
1722
|
+
let i;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new Ce(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>1){if(this.multi)throw new Ce(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+r,o=""+arguments[1];if(i=lr(this,s,o,n),!i)throw new ae(`Graph.${e}: could not find an edge for the given path ("${s}" - "${o}").`)}else{
|
|
1723
|
+
if(n!=="mixed")throw new Ce(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,i=this._edges.get(r),!i)throw new ae(`Graph.${e}: could not find the "${r}" edge in the graph.`)}return i.attributes}}function W6(t,e,n){t.prototype[e]=function(r,i){let s;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new Ce(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);
|
|
1724
|
+
if(arguments.length>2){if(this.multi)throw new Ce(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+r,a=""+i;if(i=arguments[2],s=lr(this,o,a,n),!s)throw new ae(`Graph.${e}: could not find an edge for the given path ("${o}" - "${a}").`)}else{if(n!=="mixed")throw new Ce(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edg\
|
|
1725
|
+
e with this key could have the other type.`);if(r=""+r,s=this._edges.get(r),!s)throw new ae(`Graph.${e}: could not find the "${r}" edge in the graph.`)}return s.attributes.hasOwnProperty(i)}}function z6(t,e,n){t.prototype[e]=function(r,i,s){let o;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new Ce(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new Ce(`Graph.${e}: cannot use a {source,target} combo when asking about\
|
|
1726
|
+
an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const a=""+r,u=""+i;if(i=arguments[2],s=arguments[3],o=lr(this,a,u,n),!o)throw new ae(`Graph.${e}: could not find an edge for the given path ("${a}" - "${u}").`)}else{if(n!=="mixed")throw new Ce(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,o=this._edges.get(r),!o)throw new ae(`Graph.${e}\
|
|
1727
|
+
: could not find the "${r}" edge in the graph.`)}return o.attributes[i]=s,this.emit("edgeAttributesUpdated",{key:o.key,type:"set",attributes:o.attributes,name:i}),this}}function H6(t,e,n){t.prototype[e]=function(r,i,s){let o;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new Ce(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new Ce(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes \
|
|
1728
|
+
in a MultiGraph since we cannot infer the one you want information about.`);const a=""+r,u=""+i;if(i=arguments[2],s=arguments[3],o=lr(this,a,u,n),!o)throw new ae(`Graph.${e}: could not find an edge for the given path ("${a}" - "${u}").`)}else{if(n!=="mixed")throw new Ce(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,o=this._edges.get(r),!o)throw new ae(`Graph.${e}: could not find th\
|
|
1729
|
+
e "${r}" edge in the graph.`)}if(typeof s!="function")throw new me(`Graph.${e}: updater should be a function.`);return o.attributes[i]=s(o.attributes[i]),this.emit("edgeAttributesUpdated",{key:o.key,type:"set",attributes:o.attributes,name:i}),this}}function V6(t,e,n){t.prototype[e]=function(r,i){let s;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new Ce(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new Ce(`Graph.${e}\
|
|
1730
|
+
: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+r,a=""+i;if(i=arguments[2],s=lr(this,o,a,n),!s)throw new ae(`Graph.${e}: could not find an edge for the given path ("${o}" - "${a}").`)}else{if(n!=="mixed")throw new Ce(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,s=this.
|
|
1731
|
+
_edges.get(r),!s)throw new ae(`Graph.${e}: could not find the "${r}" edge in the graph.`)}return delete s.attributes[i],this.emit("edgeAttributesUpdated",{key:s.key,type:"remove",attributes:s.attributes,name:i}),this}}function K6(t,e,n){t.prototype[e]=function(r,i){let s;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new Ce(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new Ce(`Graph.${e}: cannot use a {source,target\
|
|
1732
|
+
} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+r,a=""+i;if(i=arguments[2],s=lr(this,o,a,n),!s)throw new ae(`Graph.${e}: could not find an edge for the given path ("${o}" - "${a}").`)}else{if(n!=="mixed")throw new Ce(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,s=this._edges.get(r),!s)throw new ae(
|
|
1733
|
+
`Graph.${e}: could not find the "${r}" edge in the graph.`)}if(!cn(i))throw new me(`Graph.${e}: provided attributes are not a plain object.`);return s.attributes=i,this.emit("edgeAttributesUpdated",{key:s.key,type:"replace",attributes:s.attributes}),this}}function X6(t,e,n){t.prototype[e]=function(r,i){let s;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new Ce(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new Ce(`G\
|
|
1734
|
+
raph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+r,a=""+i;if(i=arguments[2],s=lr(this,o,a,n),!s)throw new ae(`Graph.${e}: could not find an edge for the given path ("${o}" - "${a}").`)}else{if(n!=="mixed")throw new Ce(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+
|
|
1735
|
+
r,s=this._edges.get(r),!s)throw new ae(`Graph.${e}: could not find the "${r}" edge in the graph.`)}if(!cn(i))throw new me(`Graph.${e}: provided attributes are not a plain object.`);return Vt(s.attributes,i),this.emit("edgeAttributesUpdated",{key:s.key,type:"merge",attributes:s.attributes,data:i}),this}}function Y6(t,e,n){t.prototype[e]=function(r,i){let s;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new Ce(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.
|
|
1736
|
+
length>2){if(this.multi)throw new Ce(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+r,a=""+i;if(i=arguments[2],s=lr(this,o,a,n),!s)throw new ae(`Graph.${e}: could not find an edge for the given path ("${o}" - "${a}").`)}else{if(n!=="mixed")throw new Ce(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this k\
|
|
1737
|
+
ey could have the other type.`);if(r=""+r,s=this._edges.get(r),!s)throw new ae(`Graph.${e}: could not find the "${r}" edge in the graph.`)}if(typeof i!="function")throw new me(`Graph.${e}: provided updater is not a function.`);return s.attributes=i(s.attributes),this.emit("edgeAttributesUpdated",{key:s.key,type:"update",attributes:s.attributes}),this}}const J6=[{name:t=>`get${t}Attribute`,attacher:G6},{name:t=>`get${t}Attributes`,attacher:U6},{name:t=>`has${t}Attribute`,attacher:W6},{name:t=>`se\
|
|
1738
|
+
t${t}Attribute`,attacher:z6},{name:t=>`update${t}Attribute`,attacher:H6},{name:t=>`remove${t}Attribute`,attacher:V6},{name:t=>`replace${t}Attributes`,attacher:K6},{name:t=>`merge${t}Attributes`,attacher:X6},{name:t=>`update${t}Attributes`,attacher:Y6}];function Q6(t){J6.forEach(function({name:e,attacher:n}){n(t,e("Edge"),"mixed"),n(t,e("DirectedEdge"),"directed"),n(t,e("UndirectedEdge"),"undirected")})}const Z6=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"o\
|
|
1739
|
+
utEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function eH(t,e,n,r){let i=!1;for(const s in e){if(s===r)continue;const o=e[s];if(i=n(o.key,o.attributes,o.source.key,o.target.key,o.source.attributes,o.target.attributes,o.undirected),t&&i)return o.key}}function tH(t,e,n,r){let i,s,o,a=!1;for(const u in e)if(u!==r){i=e[u];
|
|
1740
|
+
do{if(s=i.source,o=i.target,a=n(i.key,i.attributes,s.key,o.key,s.attributes,o.attributes,i.undirected),t&&a)return i.key;i=i.next}while(i!==void 0)}}function vw(t,e){const n=Object.keys(t),r=n.length;let i,s=0;return new cr(function(){do if(i)i=i.next;else{if(s>=r)return{done:!0};const a=n[s++];if(a===e){i=void 0;continue}i=t[a]}while(!i);return{done:!1,value:{edge:i.key,attributes:i.attributes,source:i.source.key,target:i.target.key,sourceAttributes:i.source.attributes,targetAttributes:i.target.
|
|
1741
|
+
attributes,undirected:i.undirected}}})}function nH(t,e,n,r){const i=e[n];if(!i)return;const s=i.source,o=i.target;if(r(i.key,i.attributes,s.key,o.key,s.attributes,o.attributes,i.undirected)&&t)return i.key}function rH(t,e,n,r){let i=e[n];if(!i)return;let s=!1;do{if(s=r(i.key,i.attributes,i.source.key,i.target.key,i.source.attributes,i.target.attributes,i.undirected),t&&s)return i.key;i=i.next}while(i!==void 0)}function ww(t,e){let n=t[e];return n.next!==void 0?new cr(function(){if(!n)return{done:!0};
|
|
1742
|
+
const r={edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected};return n=n.next,{done:!1,value:r}}):cr.of({edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected})}function iH(t,e){if(t.size===0)return[];if(e==="mixed"||e===t.type)return typeof Array.from=="funct\
|
|
1743
|
+
ion"?Array.from(t._edges.keys()):QA(t._edges.keys(),t._edges.size);const n=e==="undirected"?t.undirectedSize:t.directedSize,r=new Array(n),i=e==="undirected",s=t._edges.values();let o=0,a,u;for(;a=s.next(),a.done!==!0;)u=a.value,u.undirected===i&&(r[o++]=u.key);return r}function uS(t,e,n,r){if(e.size===0)return;const i=n!=="mixed"&&n!==e.type,s=n==="undirected";let o,a,u=!1;const c=e._edges.values();for(;o=c.next(),o.done!==!0;){if(a=o.value,i&&a.undirected!==s)continue;const{key:l,attributes:f,
|
|
1744
|
+
source:d,target:p}=a;if(u=r(l,f,d.key,p.key,d.attributes,p.attributes,a.undirected),t&&u)return l}}function sH(t,e){if(t.size===0)return cr.empty();const n=e!=="mixed"&&e!==t.type,r=e==="undirected",i=t._edges.values();return new cr(function(){let o,a;for(;;){if(o=i.next(),o.done)return o;if(a=o.value,!(n&&a.undirected!==r))break}return{value:{edge:a.key,attributes:a.attributes,source:a.source.key,target:a.target.key,sourceAttributes:a.source.attributes,targetAttributes:a.target.attributes,undirected:a.
|
|
1745
|
+
undirected},done:!1}})}function bw(t,e,n,r,i,s){const o=e?tH:eH;let a;if(n!=="undirected"&&(r!=="out"&&(a=o(t,i.in,s),t&&a)||r!=="in"&&(a=o(t,i.out,s,r?void 0:i.key),t&&a))||n!=="directed"&&(a=o(t,i.undirected,s),t&&a))return a}function oH(t,e,n,r){const i=[];return bw(!1,t,e,n,r,function(s){i.push(s)}),i}function aH(t,e,n){let r=cr.empty();return t!=="undirected"&&(e!=="out"&&typeof n.in<"u"&&(r=_i(r,vw(n.in))),e!=="in"&&typeof n.out<"u"&&(r=_i(r,vw(n.out,e?void 0:n.key)))),t!=="directed"&&typeof n.
|
|
1746
|
+
undirected<"u"&&(r=_i(r,vw(n.undirected))),r}function Ew(t,e,n,r,i,s,o){const a=n?rH:nH;let u;if(e!=="undirected"&&(typeof i.in<"u"&&r!=="out"&&(u=a(t,i.in,s,o),t&&u)||typeof i.out<"u"&&r!=="in"&&(r||i.key!==s)&&(u=a(t,i.out,s,o),t&&u))||e!=="directed"&&typeof i.undirected<"u"&&(u=a(t,i.undirected,s,o),t&&u))return u}function uH(t,e,n,r,i){const s=[];return Ew(!1,t,e,n,r,i,function(o){s.push(o)}),s}function cH(t,e,n,r){let i=cr.empty();return t!=="undirected"&&(typeof n.in<"u"&&e!=="out"&&r in n.
|
|
1747
|
+
in&&(i=_i(i,ww(n.in,r))),typeof n.out<"u"&&e!=="in"&&r in n.out&&(e||n.key!==r)&&(i=_i(i,ww(n.out,r)))),t!=="directed"&&typeof n.undirected<"u"&&r in n.undirected&&(i=_i(i,ww(n.undirected,r))),i}function lH(t,e){const{name:n,type:r,direction:i}=e;t.prototype[n]=function(s,o){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return[];if(!arguments.length)return iH(this,r);if(arguments.length===1){s=""+s;const a=this._nodes.get(s);if(typeof a>"u")throw new ae(`Graph.${n}: could not find the "${s}\
|
|
1748
|
+
" node in the graph.`);return oH(this.multi,r==="mixed"?this.type:r,i,a)}if(arguments.length===2){s=""+s,o=""+o;const a=this._nodes.get(s);if(!a)throw new ae(`Graph.${n}: could not find the "${s}" source node in the graph.`);if(!this._nodes.has(o))throw new ae(`Graph.${n}: could not find the "${o}" target node in the graph.`);return uH(r,this.multi,i,a,o)}throw new me(`Graph.${n}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function dH(t,e){const{name:n,type:r,direction:i}=e,
|
|
1749
|
+
s="forEach"+n[0].toUpperCase()+n.slice(1,-1);t.prototype[s]=function(c,l,f){if(!(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)){if(arguments.length===1)return f=c,uS(!1,this,r,f);if(arguments.length===2){c=""+c,f=l;const d=this._nodes.get(c);if(typeof d>"u")throw new ae(`Graph.${s}: could not find the "${c}" node in the graph.`);return bw(!1,this.multi,r==="mixed"?this.type:r,i,d,f)}if(arguments.length===3){c=""+c,l=""+l;const d=this._nodes.get(c);if(!d)throw new ae(`Graph.${s}: could not fi\
|
|
1750
|
+
nd the "${c}" source node in the graph.`);if(!this._nodes.has(l))throw new ae(`Graph.${s}: could not find the "${l}" target node in the graph.`);return Ew(!1,r,this.multi,i,d,l,f)}throw new me(`Graph.${s}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)}};const o="map"+n[0].toUpperCase()+n.slice(1);t.prototype[o]=function(){const c=Array.prototype.slice.call(arguments),l=c.pop();let f;if(c.length===0){let d=0;r!=="directed"&&(d+=this.undirectedSize),r!=="undirected"&&(d+=
|
|
1751
|
+
this.directedSize),f=new Array(d);let p=0;c.push((h,v,b,y,E,R,A)=>{f[p++]=l(h,v,b,y,E,R,A)})}else f=[],c.push((d,p,h,v,b,y,E)=>{f.push(l(d,p,h,v,b,y,E))});return this[s].apply(this,c),f};const a="filter"+n[0].toUpperCase()+n.slice(1);t.prototype[a]=function(){const c=Array.prototype.slice.call(arguments),l=c.pop(),f=[];return c.push((d,p,h,v,b,y,E)=>{l(d,p,h,v,b,y,E)&&f.push(d)}),this[s].apply(this,c),f};const u="reduce"+n[0].toUpperCase()+n.slice(1);t.prototype[u]=function(){let c=Array.prototype.
|
|
1752
|
+
slice.call(arguments);if(c.length<2||c.length>4)throw new me(`Graph.${u}: invalid number of arguments (expecting 2, 3 or 4 and got ${c.length}).`);if(typeof c[c.length-1]=="function"&&typeof c[c.length-2]!="function")throw new me(`Graph.${u}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let l,f;c.length===2?(l=c[0],f=c[1],c=[]):c.length===3?(l=c[1],f=
|
|
1753
|
+
c[2],c=[c[0]]):c.length===4&&(l=c[2],f=c[3],c=[c[0],c[1]]);let d=f;return c.push((p,h,v,b,y,E,R)=>{d=l(d,p,h,v,b,y,E,R)}),this[s].apply(this,c),d}}function fH(t,e){const{name:n,type:r,direction:i}=e,s="find"+n[0].toUpperCase()+n.slice(1,-1);t.prototype[s]=function(u,c,l){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return!1;if(arguments.length===1)return l=u,uS(!0,this,r,l);if(arguments.length===2){u=""+u,l=c;const f=this._nodes.get(u);if(typeof f>"u")throw new ae(`Graph.${s}: could not fi\
|
|
1754
|
+
nd the "${u}" node in the graph.`);return bw(!0,this.multi,r==="mixed"?this.type:r,i,f,l)}if(arguments.length===3){u=""+u,c=""+c;const f=this._nodes.get(u);if(!f)throw new ae(`Graph.${s}: could not find the "${u}" source node in the graph.`);if(!this._nodes.has(c))throw new ae(`Graph.${s}: could not find the "${c}" target node in the graph.`);return Ew(!0,r,this.multi,i,f,c,l)}throw new me(`Graph.${s}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)};const o="some"+n[0].
|
|
1755
|
+
toUpperCase()+n.slice(1,-1);t.prototype[o]=function(){const u=Array.prototype.slice.call(arguments),c=u.pop();return u.push((f,d,p,h,v,b,y)=>c(f,d,p,h,v,b,y)),!!this[s].apply(this,u)};const a="every"+n[0].toUpperCase()+n.slice(1,-1);t.prototype[a]=function(){const u=Array.prototype.slice.call(arguments),c=u.pop();return u.push((f,d,p,h,v,b,y)=>!c(f,d,p,h,v,b,y)),!this[s].apply(this,u)}}function pH(t,e){const{name:n,type:r,direction:i}=e,s=n.slice(0,-1)+"Entries";t.prototype[s]=function(o,a){if(r!==
|
|
1756
|
+
"mixed"&&this.type!=="mixed"&&r!==this.type)return cr.empty();if(!arguments.length)return sH(this,r);if(arguments.length===1){o=""+o;const u=this._nodes.get(o);if(!u)throw new ae(`Graph.${s}: could not find the "${o}" node in the graph.`);return aH(r,i,u)}if(arguments.length===2){o=""+o,a=""+a;const u=this._nodes.get(o);if(!u)throw new ae(`Graph.${s}: could not find the "${o}" source node in the graph.`);if(!this._nodes.has(a))throw new ae(`Graph.${s}: could not find the "${a}" target node in \
|
|
1757
|
+
the graph.`);return cH(r,i,u,a)}throw new me(`Graph.${s}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function hH(t){Z6.forEach(e=>{lH(t,e),dH(t,e),fH(t,e),pH(t,e)})}const mH=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"\
|
|
1758
|
+
undirectedNeighbors",type:"undirected"}];function Yh(){this.A=null,this.B=null}Yh.prototype.wrap=function(t){this.A===null?this.A=t:this.B===null&&(this.B=t)},Yh.prototype.has=function(t){return this.A!==null&&t in this.A||this.B!==null&&t in this.B};function _d(t,e,n,r,i){for(const s in r){const o=r[s],a=o.source,u=o.target,c=a===n?u:a;if(e&&e.has(c.key))continue;const l=i(c.key,c.attributes);if(t&&l)return c.key}}function $w(t,e,n,r,i){if(e!=="mixed"){if(e==="undirected")return _d(t,null,r,r.undirected,
|
|
1759
|
+
i);if(typeof n=="string")return _d(t,null,r,r[n],i)}const s=new Yh;let o;if(e!=="undirected"){if(n!=="out"){if(o=_d(t,null,r,r.in,i),t&&o)return o;s.wrap(r.in)}if(n!=="in"){if(o=_d(t,s,r,r.out,i),t&&o)return o;s.wrap(r.out)}}if(e!=="directed"&&(o=_d(t,s,r,r.undirected,i),t&&o))return o}function gH(t,e,n){if(t!=="mixed"){if(t==="undirected")return Object.keys(n.undirected);if(typeof e=="string")return Object.keys(n[e])}const r=[];return $w(!1,t,e,n,function(i){r.push(i)}),r}function Pd(t,e,n){const r=Object.
|
|
1760
|
+
keys(n),i=r.length;let s=0;return new cr(function(){let a=null;do{if(s>=i)return t&&t.wrap(n),{done:!0};const u=n[r[s++]],c=u.source,l=u.target;if(a=c===e?l:c,t&&t.has(a.key)){a=null;continue}}while(a===null);return{done:!1,value:{neighbor:a.key,attributes:a.attributes}}})}function yH(t,e,n){if(t!=="mixed"){if(t==="undirected")return Pd(null,n,n.undirected);if(typeof e=="string")return Pd(null,n,n[e])}let r=cr.empty();const i=new Yh;return t!=="undirected"&&(e!=="out"&&(r=_i(r,Pd(i,n,n.in))),e!==
|
|
1761
|
+
"in"&&(r=_i(r,Pd(i,n,n.out)))),t!=="directed"&&(r=_i(r,Pd(i,n,n.undirected))),r}function vH(t,e){const{name:n,type:r,direction:i}=e;t.prototype[n]=function(s){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return[];s=""+s;const o=this._nodes.get(s);if(typeof o>"u")throw new ae(`Graph.${n}: could not find the "${s}" node in the graph.`);return gH(r==="mixed"?this.type:r,i,o)}}function wH(t,e){const{name:n,type:r,direction:i}=e,s="forEach"+n[0].toUpperCase()+n.slice(1,-1);t.prototype[s]=function(c,l){
|
|
1762
|
+
if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return;c=""+c;const f=this._nodes.get(c);if(typeof f>"u")throw new ae(`Graph.${s}: could not find the "${c}" node in the graph.`);$w(!1,r==="mixed"?this.type:r,i,f,l)};const o="map"+n[0].toUpperCase()+n.slice(1);t.prototype[o]=function(c,l){const f=[];return this[s](c,(d,p)=>{f.push(l(d,p))}),f};const a="filter"+n[0].toUpperCase()+n.slice(1);t.prototype[a]=function(c,l){const f=[];return this[s](c,(d,p)=>{l(d,p)&&f.push(d)}),f};const u="reduce"+
|
|
1763
|
+
n[0].toUpperCase()+n.slice(1);t.prototype[u]=function(c,l,f){if(arguments.length<3)throw new me(`Graph.${u}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let d=f;return this[s](c,(p,h)=>{d=l(d,p,h)}),d}}function bH(t,e){const{name:n,type:r,direction:i}=e,s=n[0].toUpperCase()+n.slice(1,-1),o="find"+s;t.prototype[o]=function(c,l){if(r!=="mixed"&&this.type!==
|
|
1764
|
+
"mixed"&&r!==this.type)return;c=""+c;const f=this._nodes.get(c);if(typeof f>"u")throw new ae(`Graph.${o}: could not find the "${c}" node in the graph.`);return $w(!0,r==="mixed"?this.type:r,i,f,l)};const a="some"+s;t.prototype[a]=function(c,l){return!!this[o](c,l)};const u="every"+s;t.prototype[u]=function(c,l){return!this[o](c,(d,p)=>!l(d,p))}}function EH(t,e){const{name:n,type:r,direction:i}=e,s=n.slice(0,-1)+"Entries";t.prototype[s]=function(o){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)
|
|
1765
|
+
return cr.empty();o=""+o;const a=this._nodes.get(o);if(typeof a>"u")throw new ae(`Graph.${s}: could not find the "${o}" node in the graph.`);return yH(r==="mixed"?this.type:r,i,a)}}function $H(t){mH.forEach(e=>{vH(t,e),wH(t,e),bH(t,e),EH(t,e)})}function Jh(t,e,n,r,i){const s=r._nodes.values(),o=r.type;let a,u,c,l,f,d;for(;a=s.next(),a.done!==!0;){let p=!1;if(u=a.value,o!=="undirected"){l=u.out;for(c in l){f=l[c];do d=f.target,p=!0,i(u.key,d.key,u.attributes,d.attributes,f.key,f.attributes,f.undirected),
|
|
1766
|
+
f=f.next;while(f)}}if(o!=="directed"){l=u.undirected;for(c in l)if(!(e&&u.key>c)){f=l[c];do d=f.target,d.key!==c&&(d=f.source),p=!0,i(u.key,d.key,u.attributes,d.attributes,f.key,f.attributes,f.undirected),f=f.next;while(f)}}n&&!p&&i(u.key,null,u.attributes,null,null,null,null)}}function DH(t,e){const n={key:t};return eS(e.attributes)||(n.attributes=Vt({},e.attributes)),n}function RH(t,e,n){const r={key:e,source:n.source.key,target:n.target.key};return eS(n.attributes)||(r.attributes=Vt({},n.attributes)),
|
|
1767
|
+
t==="mixed"&&n.undirected&&(r.undirected=!0),r}function kH(t){if(!cn(t))throw new me('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in t))throw new me("Graph.import: serialized node is missing its key.");if("attributes"in t&&(!cn(t.attributes)||t.attributes===null))throw new me("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function TH(t){if(!cn(t))throw new me('Graph.impor\
|
|
1768
|
+
t: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in t))throw new me("Graph.import: serialized edge is missing its source.");if(!("target"in t))throw new me("Graph.import: serialized edge is missing its target.");if("attributes"in t&&(!cn(t.attributes)||t.attributes===null))throw new me("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in t&&typeof t.undirected!=
|
|
1769
|
+
"boolean")throw new me("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}const CH=S6(),AH=new Set(["directed","undirected","mixed"]),cS=new Set(["domain","_events","_eventsCount","_maxListeners"]),SH=[{name:t=>`${t}Edge`,generateKey:!0},{name:t=>`${t}DirectedEdge`,generateKey:!0,type:"directed"},{name:t=>`${t}UndirectedEdge`,generateKey:!0,type:"undirected"},{name:t=>`${t}EdgeWithKey`},{name:t=>`${t}DirectedEdgeWithKey`,type:"directed"},{name:t=>`${t}U\
|
|
1770
|
+
ndirectedEdgeWithKey`,type:"undirected"}],_H={allowSelfLoops:!0,multi:!1,type:"mixed"};function PH(t,e,n){if(n&&!cn(n))throw new me(`Graph.addNode: invalid attributes. Expecting an object but got "${n}"`);if(e=""+e,n=n||{},t._nodes.has(e))throw new Ce(`Graph.addNode: the "${e}" node already exist in the graph.`);const r=new t.NodeDataClass(e,n);return t._nodes.set(e,r),t.emit("nodeAdded",{key:e,attributes:n}),r}function lS(t,e,n){const r=new t.NodeDataClass(e,n);return t._nodes.set(e,r),t.emit("\
|
|
1771
|
+
nodeAdded",{key:e,attributes:n}),r}function dS(t,e,n,r,i,s,o,a){if(!r&&t.type==="undirected")throw new Ce(`Graph.${e}: you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead.`);if(r&&t.type==="directed")throw new Ce(`Graph.${e}: you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead.`);if(a&&!cn(a))throw new me(`Graph.${e}: invalid attributes. Expecting an object but got "${a}"`);if(s=""+s,o=""+o,a=a||
|
|
1772
|
+
{},!t.allowSelfLoops&&s===o)throw new Ce(`Graph.${e}: source & target are the same ("${s}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);const u=t._nodes.get(s),c=t._nodes.get(o);if(!u)throw new ae(`Graph.${e}: source node "${s}" not found.`);if(!c)throw new ae(`Graph.${e}: target node "${o}" not found.`);const l={key:null,undirected:r,source:s,target:o,attributes:a};if(n)i=t._edgeKeyGenerator();else if(i=""+i,t._edges.has(i))throw new Ce(`Grap\
|
|
1773
|
+
h.${e}: the "${i}" edge already exists in the graph.`);if(!t.multi&&(r?typeof u.undirected[o]<"u":typeof u.out[o]<"u"))throw new Ce(`Graph.${e}: an edge linking "${s}" to "${o}" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option.`);const f=new ka(r,i,u,c,a);t._edges.set(i,f);const d=s===o;return r?(u.undirectedDegree++,c.undirectedDegree++,d&&(u.undirectedLoops++,t._undirectedSelfLoopCount++)):(u.outDegree++,c.
|
|
1774
|
+
inDegree++,d&&(u.directedLoops++,t._directedSelfLoopCount++)),t.multi?f.attachMulti():f.attach(),r?t._undirectedSize++:t._directedSize++,l.key=i,t.emit("edgeAdded",l),i}function xH(t,e,n,r,i,s,o,a,u){if(!r&&t.type==="undirected")throw new Ce(`Graph.${e}: you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead.`);if(r&&t.type==="directed")throw new Ce(`Graph.${e}: you cannot merge/update an undirected edge to a directed graph\
|
|
1775
|
+
. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead.`);if(a){if(u){if(typeof a!="function")throw new me(`Graph.${e}: invalid updater function. Expecting a function but got "${a}"`)}else if(!cn(a))throw new me(`Graph.${e}: invalid attributes. Expecting an object but got "${a}"`)}s=""+s,o=""+o;let c;if(u&&(c=a,a=void 0),!t.allowSelfLoops&&s===o)throw new Ce(`Graph.${e}: source & target are the same ("${s}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' optio\
|
|
1776
|
+
n set to false.`);let l=t._nodes.get(s),f=t._nodes.get(o),d,p;if(!n&&(d=t._edges.get(i),d)){if((d.source.key!==s||d.target.key!==o)&&(!r||d.source.key!==o||d.target.key!==s))throw new Ce(`Graph.${e}: inconsistency detected when attempting to merge the "${i}" edge with "${s}" source & "${o}" target vs. ("${d.source.key}", "${d.target.key}").`);p=d}if(!p&&!t.multi&&l&&(p=r?l.undirected[o]:l.out[o]),p){const E=[p.key,!1,!1,!1];if(u?!c:!a)return E;if(u){const R=p.attributes;p.attributes=c(R),t.emit(
|
|
1777
|
+
"edgeAttributesUpdated",{type:"replace",key:p.key,attributes:p.attributes})}else Vt(p.attributes,a),t.emit("edgeAttributesUpdated",{type:"merge",key:p.key,attributes:p.attributes,data:a});return E}a=a||{},u&&c&&(a=c(a));const h={key:null,undirected:r,source:s,target:o,attributes:a};if(n)i=t._edgeKeyGenerator();else if(i=""+i,t._edges.has(i))throw new Ce(`Graph.${e}: the "${i}" edge already exists in the graph.`);let v=!1,b=!1;l||(l=lS(t,s,{}),v=!0,s===o&&(f=l,b=!0)),f||(f=lS(t,o,{}),b=!0),d=new ka(
|
|
1778
|
+
r,i,l,f,a),t._edges.set(i,d);const y=s===o;return r?(l.undirectedDegree++,f.undirectedDegree++,y&&(l.undirectedLoops++,t._undirectedSelfLoopCount++)):(l.outDegree++,f.inDegree++,y&&(l.directedLoops++,t._directedSelfLoopCount++)),t.multi?d.attachMulti():d.attach(),r?t._undirectedSize++:t._directedSize++,h.key=i,t.emit("edgeAdded",h),[i,!0,v,b]}function Ta(t,e){t._edges.delete(e.key);const{source:n,target:r,attributes:i}=e,s=e.undirected,o=n===r;s?(n.undirectedDegree--,r.undirectedDegree--,o&&(n.undirectedLoops--,
|
|
1779
|
+
t._undirectedSelfLoopCount--)):(n.outDegree--,r.inDegree--,o&&(n.directedLoops--,t._directedSelfLoopCount--)),t.multi?e.detachMulti():e.detach(),s?t._undirectedSize--:t._directedSize--,t.emit("edgeDropped",{key:e.key,attributes:i,source:n.key,target:r.key,undirected:s})}class ct extends K_{constructor(e){if(super(),e=Vt({},_H,e),typeof e.multi!="boolean")throw new me(`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${e.multi}".`);if(!AH.has(e.type))throw new me(`Graph.con\
|
|
1780
|
+
structor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "${e.type}".`);if(typeof e.allowSelfLoops!="boolean")throw new me(`Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got "${e.allowSelfLoops}".`);const n=e.type==="mixed"?nS:e.type==="directed"?rS:iS;dr(this,"NodeDataClass",n);const r="geid_"+CH()+"_";let i=0;const s=()=>{let o;do o=r+i++;while(this._edges.has(o));return o};dr(this,"_attributes",{}),dr(this,"_nodes",new Map),dr(
|
|
1781
|
+
this,"_edges",new Map),dr(this,"_directedSize",0),dr(this,"_undirectedSize",0),dr(this,"_directedSelfLoopCount",0),dr(this,"_undirectedSelfLoopCount",0),dr(this,"_edgeKeyGenerator",s),dr(this,"_options",e),cS.forEach(o=>dr(this,o,this[o])),Cr(this,"order",()=>this._nodes.size),Cr(this,"size",()=>this._edges.size),Cr(this,"directedSize",()=>this._directedSize),Cr(this,"undirectedSize",()=>this._undirectedSize),Cr(this,"selfLoopCount",()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount),
|
|
1782
|
+
Cr(this,"directedSelfLoopCount",()=>this._directedSelfLoopCount),Cr(this,"undirectedSelfLoopCount",()=>this._undirectedSelfLoopCount),Cr(this,"multi",this._options.multi),Cr(this,"type",this._options.type),Cr(this,"allowSelfLoops",this._options.allowSelfLoops),Cr(this,"implementation",()=>"graphology")}_resetInstanceCounters(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0}hasNode(e){return this._nodes.has(""+e)}hasDirectedEdge(e,n){if(this.
|
|
1783
|
+
type==="undirected")return!1;if(arguments.length===1){const r=""+e,i=this._edges.get(r);return!!i&&!i.undirected}else if(arguments.length===2){e=""+e,n=""+n;const r=this._nodes.get(e);return r?r.out.hasOwnProperty(n):!1}throw new me(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasUndirectedEdge(e,n){if(this.type==="directed")return!1;if(arguments.length===1){const r=""+
|
|
1784
|
+
e,i=this._edges.get(r);return!!i&&i.undirected}else if(arguments.length===2){e=""+e,n=""+n;const r=this._nodes.get(e);return r?r.undirected.hasOwnProperty(n):!1}throw new me(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasEdge(e,n){if(arguments.length===1){const r=""+e;return this._edges.has(r)}else if(arguments.length===2){e=""+e,n=""+n;const r=this._nodes.get(e);return r?
|
|
1785
|
+
typeof r.out<"u"&&r.out.hasOwnProperty(n)||typeof r.undirected<"u"&&r.undirected.hasOwnProperty(n):!1}throw new me(`Graph.hasEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}directedEdge(e,n){if(this.type==="undirected")return;if(e=""+e,n=""+n,this.multi)throw new Ce("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & targe\
|
|
1786
|
+
t. See #.directedEdges instead.");const r=this._nodes.get(e);if(!r)throw new ae(`Graph.directedEdge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(n))throw new ae(`Graph.directedEdge: could not find the "${n}" target node in the graph.`);const i=r.out&&r.out[n]||void 0;if(i)return i.key}undirectedEdge(e,n){if(this.type==="directed")return;if(e=""+e,n=""+n,this.multi)throw new Ce("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be mul\
|
|
1787
|
+
tiple edges between source & target. See #.undirectedEdges instead.");const r=this._nodes.get(e);if(!r)throw new ae(`Graph.undirectedEdge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(n))throw new ae(`Graph.undirectedEdge: could not find the "${n}" target node in the graph.`);const i=r.undirected&&r.undirected[n]||void 0;if(i)return i.key}edge(e,n){if(this.multi)throw new Ce("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges b\
|
|
1788
|
+
etween source & target. See #.edges instead.");e=""+e,n=""+n;const r=this._nodes.get(e);if(!r)throw new ae(`Graph.edge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(n))throw new ae(`Graph.edge: could not find the "${n}" target node in the graph.`);const i=r.out&&r.out[n]||r.undirected&&r.undirected[n]||void 0;if(i)return i.key}areDirectedNeighbors(e,n){e=""+e,n=""+n;const r=this._nodes.get(e);if(!r)throw new ae(`Graph.areDirectedNeighbors: could not find the "${e}" n\
|
|
1789
|
+
ode in the graph.`);return this.type==="undirected"?!1:n in r.in||n in r.out}areOutNeighbors(e,n){e=""+e,n=""+n;const r=this._nodes.get(e);if(!r)throw new ae(`Graph.areOutNeighbors: could not find the "${e}" node in the graph.`);return this.type==="undirected"?!1:n in r.out}areInNeighbors(e,n){e=""+e,n=""+n;const r=this._nodes.get(e);if(!r)throw new ae(`Graph.areInNeighbors: could not find the "${e}" node in the graph.`);return this.type==="undirected"?!1:n in r.in}areUndirectedNeighbors(e,n){e=
|
|
1790
|
+
""+e,n=""+n;const r=this._nodes.get(e);if(!r)throw new ae(`Graph.areUndirectedNeighbors: could not find the "${e}" node in the graph.`);return this.type==="directed"?!1:n in r.undirected}areNeighbors(e,n){e=""+e,n=""+n;const r=this._nodes.get(e);if(!r)throw new ae(`Graph.areNeighbors: could not find the "${e}" node in the graph.`);return this.type!=="undirected"&&(n in r.in||n in r.out)||this.type!=="directed"&&n in r.undirected}areInboundNeighbors(e,n){e=""+e,n=""+n;const r=this._nodes.get(e);if(!r)
|
|
1791
|
+
throw new ae(`Graph.areInboundNeighbors: could not find the "${e}" node in the graph.`);return this.type!=="undirected"&&n in r.in||this.type!=="directed"&&n in r.undirected}areOutboundNeighbors(e,n){e=""+e,n=""+n;const r=this._nodes.get(e);if(!r)throw new ae(`Graph.areOutboundNeighbors: could not find the "${e}" node in the graph.`);return this.type!=="undirected"&&n in r.out||this.type!=="directed"&&n in r.undirected}inDegree(e){e=""+e;const n=this._nodes.get(e);if(!n)throw new ae(`Graph.inDeg\
|
|
1792
|
+
ree: could not find the "${e}" node in the graph.`);return this.type==="undirected"?0:n.inDegree}outDegree(e){e=""+e;const n=this._nodes.get(e);if(!n)throw new ae(`Graph.outDegree: could not find the "${e}" node in the graph.`);return this.type==="undirected"?0:n.outDegree}directedDegree(e){e=""+e;const n=this._nodes.get(e);if(!n)throw new ae(`Graph.directedDegree: could not find the "${e}" node in the graph.`);return this.type==="undirected"?0:n.inDegree+n.outDegree}undirectedDegree(e){e=""+e;const n=this.
|
|
1793
|
+
_nodes.get(e);if(!n)throw new ae(`Graph.undirectedDegree: could not find the "${e}" node in the graph.`);return this.type==="directed"?0:n.undirectedDegree}inboundDegree(e){e=""+e;const n=this._nodes.get(e);if(!n)throw new ae(`Graph.inboundDegree: could not find the "${e}" node in the graph.`);let r=0;return this.type!=="directed"&&(r+=n.undirectedDegree),this.type!=="undirected"&&(r+=n.inDegree),r}outboundDegree(e){e=""+e;const n=this._nodes.get(e);if(!n)throw new ae(`Graph.outboundDegree: coul\
|
|
1794
|
+
d not find the "${e}" node in the graph.`);let r=0;return this.type!=="directed"&&(r+=n.undirectedDegree),this.type!=="undirected"&&(r+=n.outDegree),r}degree(e){e=""+e;const n=this._nodes.get(e);if(!n)throw new ae(`Graph.degree: could not find the "${e}" node in the graph.`);let r=0;return this.type!=="directed"&&(r+=n.undirectedDegree),this.type!=="undirected"&&(r+=n.inDegree+n.outDegree),r}inDegreeWithoutSelfLoops(e){e=""+e;const n=this._nodes.get(e);if(!n)throw new ae(`Graph.inDegreeWithoutSe\
|
|
1795
|
+
lfLoops: could not find the "${e}" node in the graph.`);return this.type==="undirected"?0:n.inDegree-n.directedLoops}outDegreeWithoutSelfLoops(e){e=""+e;const n=this._nodes.get(e);if(!n)throw new ae(`Graph.outDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type==="undirected"?0:n.outDegree-n.directedLoops}directedDegreeWithoutSelfLoops(e){e=""+e;const n=this._nodes.get(e);if(!n)throw new ae(`Graph.directedDegreeWithoutSelfLoops: could not find the "${e}" node i\
|
|
1796
|
+
n the graph.`);return this.type==="undirected"?0:n.inDegree+n.outDegree-n.directedLoops*2}undirectedDegreeWithoutSelfLoops(e){e=""+e;const n=this._nodes.get(e);if(!n)throw new ae(`Graph.undirectedDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type==="directed"?0:n.undirectedDegree-n.undirectedLoops*2}inboundDegreeWithoutSelfLoops(e){e=""+e;const n=this._nodes.get(e);if(!n)throw new ae(`Graph.inboundDegreeWithoutSelfLoops: could not find the "${e}" node in the \
|
|
1797
|
+
graph.`);let r=0,i=0;return this.type!=="directed"&&(r+=n.undirectedDegree,i+=n.undirectedLoops*2),this.type!=="undirected"&&(r+=n.inDegree,i+=n.directedLoops),r-i}outboundDegreeWithoutSelfLoops(e){e=""+e;const n=this._nodes.get(e);if(!n)throw new ae(`Graph.outboundDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);let r=0,i=0;return this.type!=="directed"&&(r+=n.undirectedDegree,i+=n.undirectedLoops*2),this.type!=="undirected"&&(r+=n.outDegree,i+=n.directedLoops),r-i}degreeWithoutSelfLoops(e){
|
|
1798
|
+
e=""+e;const n=this._nodes.get(e);if(!n)throw new ae(`Graph.degreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);let r=0,i=0;return this.type!=="directed"&&(r+=n.undirectedDegree,i+=n.undirectedLoops*2),this.type!=="undirected"&&(r+=n.inDegree+n.outDegree,i+=n.directedLoops*2),r-i}source(e){e=""+e;const n=this._edges.get(e);if(!n)throw new ae(`Graph.source: could not find the "${e}" edge in the graph.`);return n.source.key}target(e){e=""+e;const n=this._edges.get(e);if(!n)throw new ae(
|
|
1799
|
+
`Graph.target: could not find the "${e}" edge in the graph.`);return n.target.key}extremities(e){e=""+e;const n=this._edges.get(e);if(!n)throw new ae(`Graph.extremities: could not find the "${e}" edge in the graph.`);return[n.source.key,n.target.key]}opposite(e,n){e=""+e,n=""+n;const r=this._edges.get(n);if(!r)throw new ae(`Graph.opposite: could not find the "${n}" edge in the graph.`);const i=r.source.key,s=r.target.key;if(e===i)return s;if(e===s)return i;throw new ae(`Graph.opposite: the "${e}\
|
|
1800
|
+
" node is not attached to the "${n}" edge (${i}, ${s}).`)}hasExtremity(e,n){e=""+e,n=""+n;const r=this._edges.get(e);if(!r)throw new ae(`Graph.hasExtremity: could not find the "${e}" edge in the graph.`);return r.source.key===n||r.target.key===n}isUndirected(e){e=""+e;const n=this._edges.get(e);if(!n)throw new ae(`Graph.isUndirected: could not find the "${e}" edge in the graph.`);return n.undirected}isDirected(e){e=""+e;const n=this._edges.get(e);if(!n)throw new ae(`Graph.isDirected: could not f\
|
|
1801
|
+
ind the "${e}" edge in the graph.`);return!n.undirected}isSelfLoop(e){e=""+e;const n=this._edges.get(e);if(!n)throw new ae(`Graph.isSelfLoop: could not find the "${e}" edge in the graph.`);return n.source===n.target}addNode(e,n){return PH(this,e,n).key}mergeNode(e,n){if(n&&!cn(n))throw new me(`Graph.mergeNode: invalid attributes. Expecting an object but got "${n}"`);e=""+e,n=n||{};let r=this._nodes.get(e);return r?(n&&(Vt(r.attributes,n),this.emit("nodeAttributesUpdated",{type:"merge",key:e,attributes:r.
|
|
1802
|
+
attributes,data:n})),[e,!1]):(r=new this.NodeDataClass(e,n),this._nodes.set(e,r),this.emit("nodeAdded",{key:e,attributes:n}),[e,!0])}updateNode(e,n){if(n&&typeof n!="function")throw new me(`Graph.updateNode: invalid updater function. Expecting a function but got "${n}"`);e=""+e;let r=this._nodes.get(e);if(r){if(n){const s=r.attributes;r.attributes=n(s),this.emit("nodeAttributesUpdated",{type:"replace",key:e,attributes:r.attributes})}return[e,!1]}const i=n?n({}):{};return r=new this.NodeDataClass(
|
|
1803
|
+
e,i),this._nodes.set(e,r),this.emit("nodeAdded",{key:e,attributes:i}),[e,!0]}dropNode(e){e=""+e;const n=this._nodes.get(e);if(!n)throw new ae(`Graph.dropNode: could not find the "${e}" node in the graph.`);let r;if(this.type!=="undirected"){for(const i in n.out){r=n.out[i];do Ta(this,r),r=r.next;while(r)}for(const i in n.in){r=n.in[i];do Ta(this,r),r=r.next;while(r)}}if(this.type!=="directed")for(const i in n.undirected){r=n.undirected[i];do Ta(this,r),r=r.next;while(r)}this._nodes.delete(e),this.
|
|
1804
|
+
emit("nodeDropped",{key:e,attributes:n.attributes})}dropEdge(e){let n;if(arguments.length>1){const r=""+arguments[0],i=""+arguments[1];if(n=lr(this,r,i,this.type),!n)throw new ae(`Graph.dropEdge: could not find the "${r}" -> "${i}" edge in the graph.`)}else if(e=""+e,n=this._edges.get(e),!n)throw new ae(`Graph.dropEdge: could not find the "${e}" edge in the graph.`);return Ta(this,n),this}dropDirectedEdge(e,n){if(arguments.length<2)throw new Ce("Graph.dropDirectedEdge: it does not make sense to \
|
|
1805
|
+
try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new Ce("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");e=""+e,n=""+n;const r=lr(this,e,n,"directed");if(!r)throw new ae(`Graph.dropDirectedEdge: could not find a "${e}" -> "${n}" edge in the graph.`);return Ta(this,r),this}dropUndirectedEdge(e,n){
|
|
1806
|
+
if(arguments.length<2)throw new Ce("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new Ce("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");const r=lr(this,e,n,"undirected");if(!r)throw new ae(`Graph.dropUndirectedEdge: cou\
|
|
1807
|
+
ld not find a "${e}" -> "${n}" edge in the graph.`);return Ta(this,r),this}clear(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")}clearEdges(){const e=this._nodes.values();let n;for(;n=e.next(),n.done!==!0;)n.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")}getAttribute(e){return this._attributes[e]}getAttributes(){return this._attributes}hasAttribute(e){return this._attributes.hasOwnProperty(e)}setAttribute(e,n){
|
|
1808
|
+
return this._attributes[e]=n,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:e}),this}updateAttribute(e,n){if(typeof n!="function")throw new me("Graph.updateAttribute: updater should be a function.");const r=this._attributes[e];return this._attributes[e]=n(r),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:e}),this}removeAttribute(e){return delete this._attributes[e],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:e}),
|
|
1809
|
+
this}replaceAttributes(e){if(!cn(e))throw new me("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=e,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this}mergeAttributes(e){if(!cn(e))throw new me("Graph.mergeAttributes: provided attributes are not a plain object.");return Vt(this._attributes,e),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:e}),this}updateAttributes(e){if(typeof e!="function")
|
|
1810
|
+
throw new me("Graph.updateAttributes: provided updater is not a function.");return this._attributes=e(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this}updateEachNodeAttributes(e,n){if(typeof e!="function")throw new me("Graph.updateEachNodeAttributes: expecting an updater function.");if(n&&!tS(n))throw new me("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const r=this._nodes.
|
|
1811
|
+
values();let i,s;for(;i=r.next(),i.done!==!0;)s=i.value,s.attributes=e(s.key,s.attributes);this.emit("eachNodeAttributesUpdated",{hints:n||null})}updateEachEdgeAttributes(e,n){if(typeof e!="function")throw new me("Graph.updateEachEdgeAttributes: expecting an updater function.");if(n&&!tS(n))throw new me("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const r=this._edges.values();let i,s,o,a;for(;i=r.next(),i.done!==!0;)s=i.
|
|
1812
|
+
value,o=s.source,a=s.target,s.attributes=e(s.key,s.attributes,o.key,a.key,o.attributes,a.attributes,s.undirected);this.emit("eachEdgeAttributesUpdated",{hints:n||null})}forEachAdjacencyEntry(e){if(typeof e!="function")throw new me("Graph.forEachAdjacencyEntry: expecting a callback.");Jh(!1,!1,!1,this,e)}forEachAdjacencyEntryWithOrphans(e){if(typeof e!="function")throw new me("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");Jh(!1,!1,!0,this,e)}forEachAssymetricAdjacencyEntry(e){if(typeof e!=
|
|
1813
|
+
"function")throw new me("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");Jh(!1,!0,!1,this,e)}forEachAssymetricAdjacencyEntryWithOrphans(e){if(typeof e!="function")throw new me("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");Jh(!1,!0,!0,this,e)}nodes(){return typeof Array.from=="function"?Array.from(this._nodes.keys()):QA(this._nodes.keys(),this._nodes.size)}forEachNode(e){if(typeof e!="function")throw new me("Graph.forEachNode: expecting a callback.");const n=this.
|
|
1814
|
+
_nodes.values();let r,i;for(;r=n.next(),r.done!==!0;)i=r.value,e(i.key,i.attributes)}findNode(e){if(typeof e!="function")throw new me("Graph.findNode: expecting a callback.");const n=this._nodes.values();let r,i;for(;r=n.next(),r.done!==!0;)if(i=r.value,e(i.key,i.attributes))return i.key}mapNodes(e){if(typeof e!="function")throw new me("Graph.mapNode: expecting a callback.");const n=this._nodes.values();let r,i;const s=new Array(this.order);let o=0;for(;r=n.next(),r.done!==!0;)i=r.value,s[o++]=e(
|
|
1815
|
+
i.key,i.attributes);return s}someNode(e){if(typeof e!="function")throw new me("Graph.someNode: expecting a callback.");const n=this._nodes.values();let r,i;for(;r=n.next(),r.done!==!0;)if(i=r.value,e(i.key,i.attributes))return!0;return!1}everyNode(e){if(typeof e!="function")throw new me("Graph.everyNode: expecting a callback.");const n=this._nodes.values();let r,i;for(;r=n.next(),r.done!==!0;)if(i=r.value,!e(i.key,i.attributes))return!1;return!0}filterNodes(e){if(typeof e!="function")throw new me(
|
|
1816
|
+
"Graph.filterNodes: expecting a callback.");const n=this._nodes.values();let r,i;const s=[];for(;r=n.next(),r.done!==!0;)i=r.value,e(i.key,i.attributes)&&s.push(i.key);return s}reduceNodes(e,n){if(typeof e!="function")throw new me("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new me("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could \
|
|
1817
|
+
with a simple array.");let r=n;const i=this._nodes.values();let s,o;for(;s=i.next(),s.done!==!0;)o=s.value,r=e(r,o.key,o.attributes);return r}nodeEntries(){const e=this._nodes.values();return new cr(()=>{const n=e.next();if(n.done)return n;const r=n.value;return{value:{node:r.key,attributes:r.attributes},done:!1}})}export(){const e=new Array(this._nodes.size);let n=0;this._nodes.forEach((i,s)=>{e[n++]=DH(s,i)});const r=new Array(this._edges.size);return n=0,this._edges.forEach((i,s)=>{r[n++]=RH(
|
|
1818
|
+
this.type,s,i)}),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:e,edges:r}}import(e,n=!1){if(e instanceof ct)return e.forEachNode((u,c)=>{n?this.mergeNode(u,c):this.addNode(u,c)}),e.forEachEdge((u,c,l,f,d,p,h)=>{n?h?this.mergeUndirectedEdgeWithKey(u,l,f,c):this.mergeDirectedEdgeWithKey(u,l,f,c):h?this.addUndirectedEdgeWithKey(u,l,f,c):this.addDirectedEdgeWithKey(u,l,f,c)}),this;if(!cn(e))throw new me("Graph.import: invalid argu\
|
|
1819
|
+
ment. Expecting a serialized graph or, alternatively, a Graph instance.");if(e.attributes){if(!cn(e.attributes))throw new me("Graph.import: invalid attributes. Expecting a plain object.");n?this.mergeAttributes(e.attributes):this.replaceAttributes(e.attributes)}let r,i,s,o,a;if(e.nodes){if(s=e.nodes,!Array.isArray(s))throw new me("Graph.import: invalid nodes. Expecting an array.");for(r=0,i=s.length;r<i;r++){o=s[r],kH(o);const{key:u,attributes:c}=o;n?this.mergeNode(u,c):this.addNode(u,c)}}if(e.edges){
|
|
1820
|
+
let u=!1;if(this.type==="undirected"&&(u=!0),s=e.edges,!Array.isArray(s))throw new me("Graph.import: invalid edges. Expecting an array.");for(r=0,i=s.length;r<i;r++){a=s[r],TH(a);const{source:c,target:l,attributes:f,undirected:d=u}=a;let p;"key"in a?(p=n?d?this.mergeUndirectedEdgeWithKey:this.mergeDirectedEdgeWithKey:d?this.addUndirectedEdgeWithKey:this.addDirectedEdgeWithKey,p.call(this,a.key,c,l,f)):(p=n?d?this.mergeUndirectedEdge:this.mergeDirectedEdge:d?this.addUndirectedEdge:this.addDirectedEdge,
|
|
1821
|
+
p.call(this,c,l,f))}}return this}nullCopy(e){const n=new ct(Vt({},this._options,e));return n.replaceAttributes(Vt({},this.getAttributes())),n}emptyCopy(e){const n=this.nullCopy(e);return this._nodes.forEach((r,i)=>{const s=Vt({},r.attributes);r=new n.NodeDataClass(i,s),n._nodes.set(i,r)}),n}copy(e){if(e=e||{},typeof e.type=="string"&&e.type!==this.type&&e.type!=="mixed")throw new Ce(`Graph.copy: cannot create an incompatible copy from "${this.type}" type to "${e.type}" because this would mean lo\
|
|
1822
|
+
sing information about the current graph.`);if(typeof e.multi=="boolean"&&e.multi!==this.multi&&e.multi!==!0)throw new Ce("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if(typeof e.allowSelfLoops=="boolean"&&e.allowSelfLoops!==this.allowSelfLoops&&e.allowSelfLoops!==!0)throw new Ce("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not\
|
|
1823
|
+
because this would mean losing information about the current graph.");const n=this.emptyCopy(e),r=this._edges.values();let i,s;for(;i=r.next(),i.done!==!0;)s=i.value,dS(n,"copy",!1,s.undirected,s.key,s.source.key,s.target.key,Vt({},s.attributes));return n}toJSON(){return this.export()}toString(){return"[object Graph]"}inspect(){const e={};this._nodes.forEach((s,o)=>{e[o]=s.attributes});const n={},r={};this._edges.forEach((s,o)=>{const a=s.undirected?"--":"->";let u="",c=s.source.key,l=s.target.
|
|
1824
|
+
key,f;s.undirected&&c>l&&(f=c,c=l,l=f);const d=`(${c})${a}(${l})`;o.startsWith("geid_")?this.multi&&(typeof r[d]>"u"?r[d]=0:r[d]++,u+=`${r[d]}. `):u+=`[${o}]: `,u+=d,n[u]=s.attributes});const i={};for(const s in this)this.hasOwnProperty(s)&&!cS.has(s)&&typeof this[s]!="function"&&typeof s!="symbol"&&(i[s]=this[s]);return i.attributes=this._attributes,i.nodes=e,i.edges=n,dr(i,"constructor",this.constructor),i}}typeof Symbol<"u"&&(ct.prototype[Symbol.for("nodejs.util.inspect.custom")]=ct.prototype.
|
|
1825
|
+
inspect),SH.forEach(t=>{["add","merge","update"].forEach(e=>{const n=t.name(e),r=e==="add"?dS:xH;t.generateKey?ct.prototype[n]=function(i,s,o){return r(this,n,!0,(t.type||this.type)==="undirected",null,i,s,o,e==="update")}:ct.prototype[n]=function(i,s,o,a){return r(this,n,!1,(t.type||this.type)==="undirected",i,s,o,a,e==="update")}})}),q6(ct),Q6(ct),hH(ct),$H(ct);class fS extends ct{constructor(e){const n=Vt({type:"directed"},e);if("multi"in n&&n.multi!==!1)throw new me("DirectedGraph.from: inco\
|
|
1826
|
+
nsistent indication that the graph should be multi in given options!");if(n.type!=="directed")throw new me('DirectedGraph.from: inconsistent "'+n.type+'" type in given options!');super(n)}}class pS extends ct{constructor(e){const n=Vt({type:"undirected"},e);if("multi"in n&&n.multi!==!1)throw new me("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(n.type!=="undirected")throw new me('UndirectedGraph.from: inconsistent "'+n.type+'" type in given o\
|
|
1827
|
+
ptions!');super(n)}}class hS extends ct{constructor(e){const n=Vt({multi:!0},e);if("multi"in n&&n.multi!==!0)throw new me("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");super(n)}}class mS extends ct{constructor(e){const n=Vt({type:"directed",multi:!0},e);if("multi"in n&&n.multi!==!0)throw new me("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(n.type!=="directed")throw new me('MultiDirectedGrap\
|
|
1828
|
+
h.from: inconsistent "'+n.type+'" type in given options!');super(n)}}class gS extends ct{constructor(e){const n=Vt({type:"undirected",multi:!0},e);if("multi"in n&&n.multi!==!0)throw new me("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(n.type!=="undirected")throw new me('MultiUndirectedGraph.from: inconsistent "'+n.type+'" type in given options!');super(n)}}function Ca(t){t.from=function(e,n){const r=Vt({},e.options,n),i=new t(r);return i.
|
|
1829
|
+
import(e),i}}Ca(ct),Ca(fS),Ca(pS),Ca(hS),Ca(mS),Ca(gS),ct.Graph=ct,ct.DirectedGraph=fS,ct.UndirectedGraph=pS,ct.MultiGraph=hS,ct.MultiDirectedGraph=mS,ct.MultiUndirectedGraph=gS,ct.InvalidArgumentsGraphError=me,ct.NotFoundGraphError=ae,ct.UsageGraphError=Ce;const Dw="dashed",Rw=Yt.font,yS=fN("dot");class kw{constructor(e){this.view=e,this.compoundIds=new Set(e.nodes.filter(Yn).map(r=>r.id)),this.edgesWithCompounds=new Set(this.compoundIds.size>0?e.edges.filter(r=>this.compoundIds.has(r.source)||
|
|
1830
|
+
this.compoundIds.has(r.target)).map(r=>r.id):[]);for(const r of e.nodes)this.graphology.addNode(r.id,{origin:r,level:r.level,depth:r.depth??0,modelRef:wb.modelRef(r),deploymentRef:wb.deploymentRef(r),maxConnectedHierarchyDistance:0});for(const r of e.edges){let i=this.graphology.getNodeAttribute(r.source,"deploymentRef"),s=this.graphology.getNodeAttribute(r.target,"deploymentRef");(i===null||s===null)&&(i=this.graphology.getNodeAttribute(r.source,"modelRef"),s=this.graphology.getNodeAttribute(r.
|
|
1831
|
+
target,"modelRef"));let o=-1;i!==null&&s!==null?o=P_(i,s):yS.warn(`Edge ${r.id} of view ${e.id} is invalid, sourceFqn: ${i}, targetFqn: ${s}`),this.graphology.addEdgeWithKey(r.id,r.source,r.target,{origin:r,hierarchyDistance:o,weight:1}),o>this.graphology.getNodeAttribute(r.source,"maxConnectedHierarchyDistance")&&this.graphology.mergeNodeAttributes(r.source,{maxConnectedHierarchyDistance:o}),o>this.graphology.getNodeAttribute(r.target,"maxConnectedHierarchyDistance")&&this.graphology.mergeNodeAttributes(
|
|
1832
|
+
r.target,{maxConnectedHierarchyDistance:o})}this.graphology.forEachEdge((r,{hierarchyDistance:i},s,o,a,u)=>{const c=Math.max(a.maxConnectedHierarchyDistance,u.maxConnectedHierarchyDistance);if(c>i)this.graphology.mergeEdgeAttributes(r,{weight:c-i+1});else{const l=this.graphology.directedDegree(s),f=this.graphology.directedDegree(o);l===1&&f===1&&i>1&&this.graphology.mergeEdgeAttributes(r,{weight:i})}});const n=this.graphvizModel=this.createGraph();this.applyNodeAttributes(n.attributes.node),this.
|
|
1833
|
+
applyEdgeAttributes(n.attributes.edge)}ids=new Set;subgraphs=new Map;nodes=new Map;edges=new Map;compoundIds;edgesWithCompounds;graphology=new ct({allowSelfLoops:!0,multi:!0,type:"directed"});graphvizModel;get hasEdgesWithCompounds(){return this.edgesWithCompounds.size>0}postBuild(e){}build(e){const n=(i,s)=>{const o=this.generateGraphvizId(i),a=this.elementToSubgraph(i,s.subgraph(o));this.subgraphs.set(i.id,a);for(const u of i.children){const c=this.computedNode(u);if(Yn(c))n(c,a);else{const l=Wt(
|
|
1834
|
+
this.getGraphNode(c.id),`Graphviz Node not found for ${c.id}`);a.node(l.id)}}},r=[];for(const i of this.view.nodes)if(Yn(i))Tt(i.parent)&&r.push(i);else{const s=this.generateGraphvizId(i),o=this.elementToNode(i,e.node(s));this.nodes.set(i.id,o)}for(const i of r)n(i,e);for(const i of this.view.edges){const s=this.addEdge(i,e);s&&this.edges.set(i.id,s)}}print(){const e=this.graphvizModel;return this.build(e),this.postBuild(e),BA(this.graphvizModel,{print:{indentStyle:"space",indentSize:2}})}createGraph(){
|
|
1835
|
+
const e=this.view.autoLayout,n=n6({[L.bgcolor]:"transparent",[L.layout]:"dot",[L.compound]:!0,[L.rankdir]:e.direction,[L.TBbalance]:"min",[L.splines]:"spline",[L.outputorder]:"nodesfirst",[L.nodesep]:yt(e.nodeSep??110),[L.ranksep]:yt(e.rankSep??120),[L.pad]:yt(15),[L.fontname]:Rw});return n.attributes.graph.apply({[L.fontsize]:ur(15),[L.labeljust]:e.direction==="RL"?"r":"l",[L.labelloc]:e.direction==="BT"?"b":"t",[L.margin]:50.1}),n}applyNodeAttributes(e){e.apply({[L.fontname]:Rw,[L.shape]:"rect",
|
|
1836
|
+
[L.fillcolor]:Yt.elements[So].fill,[L.fontcolor]:Yt.elements[So].hiContrast,[L.color]:Yt.elements[So].stroke,[L.style]:"filled",[L.penwidth]:0})}applyEdgeAttributes(e){e.apply({[L.arrowsize]:.75,[L.fontname]:Rw,[L.fontsize]:ur(14),[L.penwidth]:ur(2),[L.color]:Yt.relationships[Oa].lineColor,[L.fontcolor]:Yt.relationships[Oa].labelColor})}checkNodeId(e,n=!1){return n?e="cluster_"+e:e.toLowerCase().startsWith("cluster")&&(e="nd_"+e),this.ids.has(e)?null:(this.ids.add(e),e)}generateGraphvizId(e){const n=Yn(
|
|
1837
|
+
e);let r=um(e.id).toLowerCase(),i=this.checkNodeId(r,n);if(i!==null)return i;r=um(e.id).toLowerCase();let s=1;do i=this.checkNodeId(r+"_"+s++,n);while(i===null);return i}elementToSubgraph(e,n){Ie(Yn(e),"node should be compound"),Ie(wp(e.depth),"node.depth should be defined");const r=this.getElementColorValues(e.color),i=g6(r.loContrast);return n.apply({[L.likec4_id]:e.id,[L.likec4_level]:e.level,[L.likec4_depth]:e.depth,[L.fillcolor]:UA(r.fill,e.depth),[L.color]:UA(r.stroke,e.depth),[L.style]:"f\
|
|
1838
|
+
illed",[L.margin]:ur(e.children.length>1?40:32)}),qt(e.title.trim())||n.set(L.label,b6(e,i)),n}elementToNode(e,n){Ie(!Yn(e),"node should not be compound");const r=ce(e.icon),i=this.getElementColorValues(e.color);let s=e.style.size,o=e.style.textSize,a=e.style.padding;!s&&o&&(s=o),!o&&s&&(o=s),!a&&s&&(a=s),s??=W_,o??=z_,a??=H_;const u=Yt.spacing[a];switch(n.attributes.apply({[L.likec4_id]:e.id,[L.likec4_level]:e.level,[L.label]:w6(e,i,{shape:s,text:o}),[L.margin]:`${yt(r?8:u)},${yt(u)}`}),n.attributes.
|
|
1839
|
+
set(L.width,yt(Yt.sizes[s].width)),n.attributes.set(L.height,yt(Yt.sizes[s].height)),e.color!==So&&n.attributes.apply({[L.fillcolor]:i.fill,[L.fontcolor]:i.hiContrast,[L.color]:i.stroke}),e.shape){case"cylinder":case"storage":{n.attributes.apply({[L.margin]:`${yt(r?8:u)},${yt(0)}`,[L.penwidth]:ur(2),[L.shape]:"cylinder"});break}case"browser":{n.attributes.apply({[L.margin]:`${yt(r?8:u+4)},${yt(u+6)}`});break}case"mobile":{n.attributes.apply({[L.margin]:`${yt(r?8:u+4)},${yt(u)}`});break}case"queu\
|
|
1840
|
+
e":{n.attributes.apply({[L.width]:yt(Yt.sizes[s].width),[L.height]:yt(Yt.sizes[s].height-8),[L.margin]:`${yt(r?8:u+4)},${yt(u)}`});break}}return n}leafElements(e){return e===null?this.view.nodes.filter(n=>!Yn(n)):this.computedNode(e).children.flatMap(n=>{const r=this.computedNode(n);return Yn(r)?this.leafElements(r.id):r})}descendants(e){return e===null?this.view.nodes.slice():this.computedNode(e).children.flatMap(n=>{const r=this.computedNode(n);return[r,...this.descendants(r.id)]})}computedNode(e){
|
|
1841
|
+
return Wt(this.view.nodes.find(n=>n.id===e),`Node ${e} not found`)}getGraphNode(e){return this.nodes.get(e)??null}getSubgraph(e){return this.subgraphs.get(e)??null}edgeEndpoint(e,n){let r=this.computedNode(e),i=this.getGraphNode(e),s;return i||(Ie(Yn(r),"endpoint node should be compound"),s=this.getSubgraph(e)?.id,Ie(s,`subgraph ${e} not found`),r=Wt(n(this.leafElements(e)),`leaf element in ${e} not found`),i=Wt(this.getGraphNode(r.id),`source graphviz node ${r.id} not found`)),[r,i,s]}findInternalEdges(e){
|
|
1842
|
+
if(e===null)return this.view.edges.slice();const n=this.computedNode(e);return Xe(this.descendants(e),li(r=>pk(r.inEdges,r.outEdges)),Yo(),V3(pk(n.inEdges,n.outEdges)),xt(r=>this.view.edges.find(i=>i.id===r)),He(ce))}withoutCompoundEdges(e){return this.edgesWithCompounds.size===0?e:{...e,inEdges:e.inEdges.filter(n=>!this.edgesWithCompounds.has(n)),outEdges:e.outEdges.filter(n=>!this.edgesWithCompounds.has(n))}}assignGroups(){const e=Xe(this.view.nodes,He(Yn),xt(r=>r.id),uk(x_),h3(),xt(r=>{const i=this.
|
|
1843
|
+
findInternalEdges(r).filter(s=>s.source!==s.target&&!this.compoundIds.has(s.source)&&!this.compoundIds.has(s.target));return{id:r,edges:i}}),He(({edges:r})=>r.length>1&&r.length<8),n3(4)),n=new Set;for(const r of e){const i=r.edges.filter(s=>!n.has(s.source)&&!n.has(s.target));for(const s of i)try{const o=Wt(this.getGraphNode(s.source),`Graphviz Node not found for ${s.source}`),a=Wt(this.getGraphNode(s.target),`Graphviz Node not found for ${s.target}`);n.add(s.source),n.add(s.target),o.attributes.
|
|
1844
|
+
set(L.group,r.id),a.attributes.set(L.group,r.id)}catch(o){yS.error(`Failed to assign group to edge ${s.id}`,{error:o})}}}applyManualLayout({height:e,...n}){const r=n.x<0?-n.x:0,i=n.y<0?-n.y:0,s=r>0||i>0;for(const{id:o,...a}of n.nodes){const u=this.getGraphNode(o);if(!u)continue;const c=yt(a.center.x)+r,l=yt(e-a.center.y);a.fixedsize?u.attributes.apply({[L.pos]:`${c},${l}!`,[L.pin]:!0,[L.width]:yt(a.fixedsize.width),[L.height]:yt(a.fixedsize.height),[L.fixedsize]:!0}):u.attributes.set(L.pos,`${c}\
|
|
1845
|
+
,${l}`)}for(const[o,a]of this.edges.entries()){a.attributes.delete(L.weight),a.attributes.delete(L.minlen),a.attributes.delete(L.constraint);const u=n.edges.find(c=>c.id===o)?.dotpos;u&&!s&&a.attributes.set(L.pos,u)}return this.graphvizModel.apply({[L.layout]:"fdp",[L.overlap]:"vpsc",[L.sep]:"+50,50",[L.esep]:"+10,10",[L.start]:"random2",[L.splines]:"compound"}),this.graphvizModel.delete(L.compound),this.graphvizModel.delete(L.rankdir),this.graphvizModel.delete(L.nodesep),this.graphvizModel.delete(
|
|
1846
|
+
L.ranksep),this.graphvizModel.delete(L.pack),this.graphvizModel.delete(L.pad),this.graphvizModel.delete(L.packmode),this.graphvizModel.attributes.graph.delete(L.margin),this}getRelationshipColorValues(e){return lb(e)?Yt.relationships[e]:this.view.customColorDefinitions[e]?.relationships??Yt.relationships[So]}getElementColorValues(e){return lb(e)?Yt.elements[e]:this.view.customColorDefinitions[e]?.elements??Yt.elements[So]}}class NH extends kw{createGraph(){const e=super.createGraph(),n=this.view.
|
|
1847
|
+
autoLayout;return e.delete(L.TBbalance),e.apply({[L.nodesep]:yt(n.nodeSep??130),[L.ranksep]:yt(n.rankSep??130)}),e}postBuild(e){Xe(this.view.nodes,xt(n=>({node:n,graphvizNode:this.getGraphNode(n.id)})),Qo(({node:n,graphvizNode:r})=>{if(r!=null)return qd.modelRef(n)??void 0}),vp(),He(qr(2)),N3(n=>{e.subgraph({[L.rank]:"same"},r=>{for(const{graphvizNode:i}of n)r.node(Wt(i).id)})}),u3(()=>{e.set(L.newrank,!0),e.set(L.clusterrank,"global"),e.delete(L.pack),e.delete(L.packmode)}))}elementToSubgraph(e,n){
|
|
1848
|
+
const r=super.elementToSubgraph(e,n);return e.children.length>1&&r.set(L.margin,ur(50)),r}addEdge(e,n){const[r,i]=[e.source,e.target],[s,o,a]=this.edgeEndpoint(r,y=>Qu(y)),[u,c,l]=this.edgeEndpoint(i,Zo),f=fn(l)||fn(a),d=n.edge([o,c],{[L.likec4_id]:e.id,[L.style]:e.line??Dw});l&&d.attributes.set(L.lhead,l),a&&d.attributes.set(L.ltail,a);const p=this.graphology.getEdgeAttribute(e.id,"weight");p>1&&!this.graphology.hasDirectedEdge(e.target,e.source)&&d.attributes.set(L.weight,p);const h=HA(e);if(h&&
|
|
1849
|
+
d.attributes.set(f?L.xlabel:L.label,h),e.color){const y=this.getRelationshipColorValues(e.color);d.attributes.apply({[L.color]:y.lineColor,[L.fontcolor]:y.labelColor})}let[v,b]=[e.head??ys,e.tail??"none"];return v==="none"&&b==="none"?(d.attributes.apply({[L.arrowtail]:"none",[L.arrowhead]:"none",[L.dir]:"none"}),d):e.dir==="both"?(d.attributes.apply({[L.arrowhead]:mn(v),[L.arrowtail]:mn(e.tail??v),[L.dir]:"both"}),!f&&qd.modelRef(s)!==qd.modelRef(u)&&d.attributes.set(L.constraint,!1),d):(v!==ys&&
|
|
1850
|
+
d.attributes.set(L.arrowhead,mn(v)),b!=="none"&&d.attributes.set(L.arrowtail,mn(b)),d)}}class sb extends kw{static toDot(e){return new sb(e).print()}postBuild(e){e.set(L.TBbalance,"max")}addEdge(e,n){const{nodes:r}=this.view,[i,s]=e.dir==="back"?[e.target,e.source]:[e.source,e.target],[o,a,u]=this.edgeEndpoint(i,A=>Qu(A)),[c,l,f]=this.edgeEndpoint(s,Zo),d=n.edge([a,l],{[L.likec4_id]:e.id,[L.style]:e.line??Dw});if(f&&d.attributes.set(L.lhead,f),u&&d.attributes.set(L.ltail,u),e.color&&e.color!==Oa){
|
|
1851
|
+
const A=this.getRelationshipColorValues(e.color);d.attributes.apply({[L.color]:A.lineColor,[L.fontcolor]:A.labelColor})}const p=[e.label?.trim(),e.technology?.trim()].filter(ce).join(`
|
|
1852
|
+
`),h=N_(e.id),v=E6(h,p);d.attributes.set(L.label,v);const b=this.graphology.getEdgeAttribute(e.id,"weight");e.source!==e.target&&b>1&&d.attributes.set(L.weight,b);const y=r.findIndex(A=>A.id===i);r.findIndex(A=>A.id===s)<y&&e.dir!=="back"&&d.attributes.apply({[L.constraint]:!1});let[E,R]=[e.head??ys,e.tail??"none"];return e.dir==="back"?(d.attributes.apply({[L.arrowtail]:mn(E),[L.minlen]:0,[L.dir]:"back"}),R!=="none"&&d.attributes.apply({[L.arrowhead]:mn(R),[L.dir]:"both"}),d):E==="none"&&R==="n\
|
|
1853
|
+
one"||E!=="none"&&R!=="none"?(d.attributes.apply({[L.arrowhead]:mn(E),[L.arrowtail]:mn(R),[L.dir]:"both"}),d):E==="none"?(d.attributes.delete(L.arrowhead),d.attributes.apply({[L.arrowtail]:mn(R),[L.minlen]:0,[L.dir]:"back"}),d):(E!==ys&&d.attributes.set(L.arrowhead,mn(E)),d)}}class IH extends kw{postBuild(e){this.assignGroups();const n=new Set,r=this.view.nodes.reduce((s,o)=>(Yn(o)&&(n.add(o.id),s.push(o)),s),[]);let i=!1;for(const s of r){const o=Xe(s.children,He(l=>!this.compoundIds.has(l)),xt(
|
|
1854
|
+
l=>this.computedNode(l)),He(l=>l.inEdges.length===0&&l.outEdges.length===0));if(o.length<=2)continue;let a=2;switch(!0){case o.length>11:a=4;break;case o.length>4:a=3;break}const u=Wt(this.getSubgraph(s.id),`Subgraph not found for ${s.id}`);let c=null;J3(o,a).forEach(l=>{const f=l.length>1?u.createSubgraph({[L.rank]:"same"}):null;l.forEach((d,p)=>{const h=this.getGraphNode(d.id);h&&(f?.node(h.id),p===0&&(c&&u.edge([c,h],{[L.style]:"invis"}),c=h))}),i=i||!!f})}i&&(e.set(L.newrank,!0),e.set(L.clusterrank,
|
|
1855
|
+
"global"))}addEdge(e,n){const[r,i]=e.dir==="back"?[e.target,e.source]:[e.source,e.target],[s,o,a]=this.edgeEndpoint(r,R=>Qu(R)),[u,c,l]=this.edgeEndpoint(i,Zo),f=e.parent,d=this.graphology.getEdgeAttributes(e.id),p=n.edge([o,c],{[L.likec4_id]:e.id,[L.style]:e.line??Dw});l&&p.attributes.set(L.lhead,l),a&&p.attributes.set(L.ltail,a);const h=fn(l)||fn(a);!this.graphology.hasDirectedEdge(e.target,e.source)&&d.weight>1&&p.attributes.set(L.weight,d.weight);const v=HA(e);if(v&&p.attributes.set(h?L.xlabel:
|
|
1856
|
+
L.label,v),e.color){const R=this.getRelationshipColorValues(e.color);p.attributes.apply({[L.color]:R.lineColor,[L.fontcolor]:R.labelColor})}let[b,y]=[e.head??ys,e.tail??"none"];if(e.dir==="back")return p.attributes.apply({[L.arrowtail]:mn(b),[L.dir]:"back"}),y!=="none"&&p.attributes.apply({[L.arrowhead]:mn(y),[L.dir]:"both",[L.minlen]:0}),p;if(b==="none"&&y==="none")return p.attributes.apply({[L.arrowtail]:"none",[L.arrowhead]:"none",[L.dir]:"none",[L.minlen]:0,[L.constraint]:!1}),p;if(b!=="none"&&
|
|
1857
|
+
y!=="none")return p.attributes.apply({[L.arrowhead]:mn(b),[L.arrowtail]:mn(y),[L.dir]:"both",[L.minlen]:0}),p;if(b!==ys&&p.attributes.set(L.arrowhead,mn(b)),y!=="none"&&p.attributes.set(L.arrowtail,mn(y)),this.view.edges.length===1)return p;let E;return f===null&&s.parent==null&&u.parent==null?E=this.view.edges.filter(R=>{if(R.id===e.id||R.parent!==null||R.source===e.source&&R.target===e.target||R.source===e.target&&R.target===e.source)return!1;const A=this.computedNode(R.source),N=this.computedNode(
|
|
1858
|
+
R.target);return Yn(A)||Yn(N)?!1:A.parent==null&&N.parent==null}):E=this.findInternalEdges(f).filter(R=>!(R.id===e.id||R.source===e.source&&R.target===e.target||R.source===e.target&&R.target===e.source)),E.length===0&&(f===null||this.leafElements(f).length<=3)&&p.attributes.set(L.minlen,0),p}}function Qh(t){const[e,n,r,i]=t?t.split(",").map(a=>zr(+a)):[0,0,0,0],s=Math.round(r-e),o=Math.round(n-i);return{x:Math.round(e),y:Math.round(i),width:s,height:o}}function OH(t){try{const[e,n]=t.split(",");
|
|
1859
|
+
return{x:zr(parseFloat(e)),y:zr(parseFloat(n))}}catch(e){throw new Error(`Failed on parsing pos: ${t}`,{cause:e})}}function vS(t){const{x:e,y:n}=OH(t.pos),r=GA(parseFloat(t.width)),i=GA(parseFloat(t.height));return{x:e-Math.round(r/2),y:n-Math.round(i/2),width:r,height:i}}function wS(t,[e,n]=[0,0]){if(!t||t.length===0)return null;let r=1/0,i=1/0,s=-1/0,o=-1/0,a=13;try{for(const c of t){if(c.op==="F"){a=zr(c.size);continue}if(c.op==="T"){let l=zr(c.pt[0])-e,f=zr(c.width);switch(c.align){case"r":l-=
|
|
1860
|
+
f;break;case"c":l-=Math.round(f/2);break}r=Math.min(r,l),s=Math.max(s,l+f);let d=zr(c.pt[1])-n;i=Math.min(i,Math.round(d-a)),o=Math.max(o,d)}}}catch(c){return vn.warn(`Failed on parsing label draw ops:
|
|
1861
|
+
{labelDrawOps}`,{e:c,labelDrawOps:t}),null}if(r===1/0)return null;const u=2;return{x:r-u,y:i-u,width:s-r+2*u,height:o-i+2*u}}function bS({_draw_:t,likec4_id:e="???"},n="<unknown view>"){try{const r=t.filter(s=>s.op.toLowerCase()==="b");Ie(qr(r,1),`view ${n} edge ${e} should have at least one bezier draw op`),r.length>1&&vn.warn(`view ${n} edge ${e} has more than one bezier draw op, using the first one only`);const i=r[0].points.map(s=>zr(s));return Ie(qr(i,2),`view ${n} edge ${e} should have at \
|
|
1862
|
+
least two points`),i}catch(r){throw new Error(`failed on parsing view ${n} edge ${e} _draw_:
|
|
1863
|
+
${JSON.stringify(t,null,2)}`,{cause:r})}}function LH(t,{id:e,source:n,target:r,dir:i,label:s,description:o,...a},u){const c=wS(t._ldraw_??t._tldraw_??t._hldraw_),l=t.dir==="back"||i==="back";return s=s&&c?WA(s,{maxchars:Kh,maxLines:zA}).join(`
|
|
1864
|
+
`):null,{id:e,source:n,target:r,label:s,...ce(o)&&{description:o},...ce(t.pos)&&{dotpos:t.pos},points:bS(t,u),labelBBox:c,...l?{dir:"back"}:{},...a}}function ES(t,e){const n=Qh(t.bb),{nodes:r,edges:i,manualLayout:s,...o}=e,a={...o,bounds:n,nodes:[],edges:[]},u=t.objects??[];for(const l of r){const f=u.find(d=>d.likec4_id===l.id);Ie(f,`View ${o.id} node ${l.id} not found in graphviz output`);try{const{x:d,y:p,width:h,height:v}="bb"in f?Qh(f.bb):vS(f),b=[d,p];a.nodes.push({...l,position:b,width:h,
|
|
1865
|
+
height:v,labelBBox:wS(f._ldraw_,b)??{x:d,y:p,width:h,height:v}})}catch(d){throw new Error(`Failed on parsing node ${l.id}:
|
|
1866
|
+
${JSON.stringify(f,null,2)}`,{cause:d})}}const c=t.edges??[];for(const l of i){const f=c.find(d=>d.likec4_id===l.id);if(!f){vn.warn`View ${o.id} edge ${l.id} not found in graphviz output, skipping`;continue}a.edges.push(LH(f,l,o.id))}return a}const Zh=t=>String(t+1).padStart(2,"0");function FH(t){const e=Qh(t.bb),n={nodes:[],edges:[],bounds:e},r=new Map,i=t.objects??[];for(const s of i){if(!s.likec4_type)continue;const o=Zh(s._gvid),a=s.likec4_path??"",u=r.get(s._gvid),{x:c,y:l,width:f,height:d}="\
|
|
1867
|
+
bb"in s?Qh(s.bb):vS(s),p={x:c,y:l};if(s.likec4_type==="view")Ie(s.likec4_id,`View ${s} has no likec4_id`),n.nodes.push({id:o,type:"view",parentId:u?.id??null,height:d,width:f,position:p,label:s.label??"",viewId:s.likec4_id});else{const h={id:o,type:s.likec4_type,parentId:u?.id??null,height:d,width:f,position:p,path:a,label:s.label??""},v=[..."subgraphs"in s?s.subgraphs:[],..."nodes"in s?s.nodes:[]];for(const b of v)r.set(b,h);n.nodes.push(h)}}for(const s of t.edges??[])try{const o=Zh(s.tail),a=Zh(
|
|
1868
|
+
s.head);n.edges.push({id:`link${Zh(s._gvid)}`,source:o,target:a,points:bS(s)})}catch(o){vn.warn(`Failed on parsing edge:
|
|
1869
|
+
{edge}`,{error:o,edge:s})}return n}const $S=Yt.font,em="/";class ob{static toDot(e){return new ob(e).print()}subgraphs=new Map;graphvizModel;constructor(e){const n=this.graphvizModel=r6.graph({[L.layout]:"osage",[L.pack]:ur(100),[L.packmode]:"array_ltc",[L.pad]:yt(15),[L.fontname]:$S,[L.splines]:"polyline",[L.esep]:"+20"});n.attributes.graph.apply({[L.fontsize]:ur(20),[L.labeljust]:"l",[L.labelloc]:"t"}),n.attributes.node.apply({[L.fontname]:$S,[L.shape]:"rect",[L.width]:yt(400),[L.height]:yt(300),
|
|
1870
|
+
[L.fixedsize]:!0,[L.fontsize]:10}),n.attributes.edge.apply({[L.penwidth]:ur(2)});const r=new Set(e.map(u=>u.relativePath??""));let i=0,s=[...e];const o=r.size>1;o&&s.sort((u,c)=>{const l=u.relativePath?.split(em)??[""],f=c.relativePath?.split(em)??[""];l.push(u.title??"Untitled"),f.push(c.title??"Untitled");const d=l.length,p=f.length;switch(i=Math.max(i,d,p),!0){case d>p:return-1;case d<p:return 1;default:{for(let h=0;h<d;h++){const v=l[h].localeCompare(f[h]);if(v!==0)return v}return 0}}});const a=new Map;
|
|
1871
|
+
s.forEach((u,c)=>{this.addView(o?u:{...u,relativePath:""},c+i);const l=u.nodes.reduce((f,d)=>(d.navigateTo&&f.add(d.navigateTo),f),new Set);l.size>0&&a.set(u.id,l)});for(const[u,c]of a)for(const l of c)n.edge([u,l])}getParentForPath(e){if(e==="")return this.graphvizModel;const n=e.toLowerCase();let r=this.subgraphs.get(n);if(!r){const i=n.endsWith(".c4")||n.endsWith(".likec4"),s=e.includes(em)?e.slice(0,e.lastIndexOf(em)):"";r=this.getParentForPath(s).subgraph("cluster"+String(this.subgraphs.size+
|
|
1872
|
+
1),{[L.likec4_type]:i?"file":"folder",[L.likec4_path]:e,[L.sortv]:this.subgraphs.size,[L.label]:ce(s)?e.slice(s.length+1):e}),this.subgraphs.set(n,r)}return r}addView(e,n=0){return this.getParentForPath(e.relativePath??"").node(e.id,{[L.likec4_type]:"view",[L.likec4_id]:e.id,[L.sortv]:n,[L.label]:e.title||"Untitled"})}print(){return BA(this.graphvizModel,{print:{indentStyle:"space",indentSize:2}})}}const DS=t=>{switch(!0){case La.isDynamic(t):return new sb(t);case La.isDeployment(t):return new NH(
|
|
1873
|
+
t);case La.isElement(t):return new IH(t);default:je(t)}},Aa=vn.getChild("graphviz-layouter");class RS{constructor(e){this.graphviz=e}get port(){return this.graphviz}changePort(e){this.graphviz=e}async dotToJson(e){let n;try{n=await this.graphviz.layoutJson(e)}catch(r){throw Aa.error(hr(r)),Aa.error`Failed to convert DOT to JSON:\n${e}`,r}try{return JSON.parse(n)}catch(r){throw Aa.error(hr(r)),Aa.error`Failed to parse JSON:\n${n}\n. Generated from DOT:\n${e}`,r}}async layout(e){try{let n=await this.
|
|
1874
|
+
dot(e);const r=await this.dotToJson(n);let i=ES(r,e);if(e.manualLayout){const s=yz(i,e.manualLayout);if(s.diagram)i=s.diagram;else{if(s.relayout.nodes.length>0){const o=DS(e);if(o.hasEdgesWithCompounds)Aa.warn(`Manual layout for view ${e.id} is ignored, as edges with compounds are not supported`);else{o.applyManualLayout(s.relayout);const a=await this.dotToJson(o.print());i=ES(a,e)}}i.hasLayoutDrift=!0}}return n=n.split(`
|
|
1875
|
+
`).filter(s=>!(s.includes("margin")&&s.includes("50.1"))).join(`
|
|
1876
|
+
`),{dot:n,diagram:i}}catch(n){throw new Error(`Error during layout: ${e.id}`,{cause:n})}}async svg(e){let n=await this.dot(e);return n=n.split(`
|
|
1877
|
+
`).filter(r=>!(r.includes("margin")&&r.includes("50.1"))).join(`
|
|
1878
|
+
`),{svg:await this.graphviz.svg(n),dot:n}}async dot(e){let n=DS(e).print();if(!La.isElement(e))return n;try{return await this.graphviz.unflatten(n)}catch(r){return Aa.warn(`Error during unflatten: ${e.id}`,{error:r}),n}}async layoutOverviewGraph(e){if(e.length===0)return Promise.resolve({nodes:[],edges:[],bounds:{x:0,y:0,width:10,height:10}});const n=ob.toDot(e),r=await this.dotToJson(n);return FH(r)}}class MH{value;next;constructor(e){this.value=e}}class BH{#e;#t;#n;constructor(){this.clear()}enqueue(e){
|
|
1879
|
+
const n=new MH(e);this.#e?(this.#t.next=n,this.#t=n):(this.#e=n,this.#t=n),this.#n++}dequeue(){const e=this.#e;if(e)return this.#e=this.#e.next,this.#n--,e.value}peek(){if(this.#e)return this.#e.value}clear(){this.#e=void 0,this.#t=void 0,this.#n=0}get size(){return this.#n}*[Symbol.iterator](){let e=this.#e;for(;e;)yield e.value,e=e.next}}function kS(t){TS(t);const e=new BH;let n=0;const r=()=>{n<t&&e.size>0&&(e.dequeue()(),n++)},i=()=>{n--,r()},s=async(u,c,l)=>{const f=(async()=>u(...l))();c(f);
|
|
1880
|
+
try{await f}catch{}i()},o=(u,c,l)=>{new Promise(f=>{e.enqueue(f)}).then(s.bind(void 0,u,c,l)),(async()=>(await Promise.resolve(),n<t&&r()))()},a=(u,...c)=>new Promise(l=>{o(u,l,c)});return Object.defineProperties(a,{activeCount:{get:()=>n},pendingCount:{get:()=>e.size},clearQueue:{value(){e.clear()}},concurrency:{get:()=>t,set(u){TS(u),t=u,queueMicrotask(()=>{for(;n<t&&e.size>0;)r()})}}}),a}function TS(t){if(!((Number.isInteger(t)||t===Number.POSITIVE_INFINITY)&&t>0))throw new TypeError("Expecte\
|
|
1881
|
+
d `concurrency` to be a number from 1 and up")}const jH=kS(1);class Na{static _graphviz=null;graphviz(){return Promise.resolve().then(()=>Na._graphviz??=dm.load())}async attempt(e,n,r){return await jH(async()=>{const i=vn.getChild("graphviz-wasm");try{return await r()}catch(s){i.error(`FAILED GraphvizWasm.${e}`,{error:s}),i.warn("FAILED DOT:"),i.warn(n),dm.unload(),Na._graphviz=null}i.warn("Retrying..."),await I_(50,300);try{return await r()}finally{dm.unload(),Na._graphviz=null}})}async unflatten(e){
|
|
1882
|
+
return await this.attempt("unflatten",e,async()=>(await this.graphviz()).unflatten(e,1,!1,3).replaceAll(/\t\[/g," [").replaceAll(/\t/g," "))}async acyclic(e){return await this.attempt("acyclic",e,async()=>{const n=(await this.graphviz()).acyclic(e,!0);return n.acyclic&&n.outFile||e})}async layoutJson(e){return await this.attempt("layout",e,async()=>(await this.graphviz()).layout(e,"json",void 0,{yInvert:!0}))}async svg(e){return await this.attempt("svg",e,async()=>(await this.graphviz()).layout(
|
|
1883
|
+
e,"svg"))}}const xd=Symbol.for("idattr"),tm={writeId(t,e){return t[xd]=e,t},readId(t){return t[xd]}},nm={writeId(t,e){return Tt(e)?t[xd]=void 0:t[xd]=e,t},readId(t){return t[xd]}};function bo(t){return t.textDocument.languageId===Wv.languageId}function CS({value:t}){const e=parseFloat(t);return isNaN(e)?100:hk(e,{min:0,max:100})}function Sa({value:t}){switch(t){case"xs":case"sm":case"md":case"lg":case"xl":return t;case"xsmall":return"xs";case"small":return"sm";case"medium":return"md";case"large":
|
|
1884
|
+
return"lg";case"xlarge":return"xl";default:je(t)}}function as(t,e){const n={};if(!t||t.length===0)return n;for(const r of t)if(e(r))switch(!0){case zp(r):{ce(r.value)&&(n.border=r.value);break}case so(r):{const i=Nd(r);ce(i)&&(n.color=i);break}case Ah(r):{ce(r.value)&&(n.shape=r.value);break}case Wr(r):{const i=r.libicon?.ref?.name??r.value;ce(i)&&(n.icon=i);break}case Dh(r):{n.opacity=CS(r);break}case _v(r):{n.multiple=Fy(r.value)?r.value:!1;break}case Lv(r):{ce(r.value)&&(n.size=Sa(r));break}case Nv(
|
|
1885
|
+
r):{ce(r.value)&&(n.padding=Sa(r));break}case jv(r):{ce(r.value)&&(n.textSize=Sa(r));break}default:je(r)}return n}function qH(t,e){const n={};if(!t||t.length===0)return n;for(const r of t)if(e(r))switch(!0){case so(r):{const i=Nd(r);ce(i)&&(n.color=i);break}case Pl(r):{n.line=r.value;break}case Kc(r):{switch(r.key){case"head":{n.head=r.value;break}case"tail":{n.tail=r.value;break}default:je(r)}break}default:je(r)}return n}function Tw(t,e){const{color:n,line:r,head:i,tail:s}=qH(t?.filter(DC),e);return{
|
|
1886
|
+
...n&&n!==Oa?{color:n}:{},...r&&r!==O_?{line:r}:{},...i&&i!==ys?{head:i}:{},...s?{tail:s}:{}}}function Nd(t){return t?.themeColor??t?.customColor?.$refText}function Cw(t){const e=t.rankSep,n=t.nodeSep;let r;switch(t.direction){case"TopBottom":{r="TB";break}case"BottomTop":{r="BT";break}case"LeftRight":{r="LR";break}case"RightLeft":{r="RL";break}default:je(t.direction)}return{direction:r,...n&&{nodeSep:n},...e&&{rankSep:e}}}function GH(t){switch(t){case"TB":return"TopBottom";case"BT":return"Botto\
|
|
1887
|
+
mTop";case"LR":return"LeftRight";case"RL":return"RightLeft";default:je(t)}}function AS(t){if(av(t))return t;if(Rv(t))return t.subject;if(ah(t))return AS(t.subject);je(t)}class UH{parser;locator;constructor(e){this.parser=e.likec4.ModelParser,this.locator=e.likec4.ModelLocator}getDocumentation(e){try{if(jn(e)){const n=lt(e),r=this.parser.forDocument(n).parseDeploymentNode(e),i=[r.id];return r.title!==e.name&&i.push(" ",`**${r.title}**`),i.join(`
|
|
1888
|
+
`)}if(Bn(e)){const n=lt(e),r=this.parser.forDocument(n).parseDeployedInstance(e),i=this.locator.getParsedElement(r.element),s=[r.id,`_instance of_ ${r.element}`];return i&&s.push(" ",`**${i.title}**`),s.join(`
|
|
1889
|
+
`)}if(pn(e)){const n=lt(e),r=this.parser.forDocument(n).parseElement(e);return r?[r.id," ",`**${r.title}**`].join(`
|
|
1890
|
+
`):void 0}}catch(n){Re(n)}}}function WH(t,e){return[t,e]=Aw(t,e)>0?[e,t]:[t,e],zH(t.range,e.range.start)}function Aw(t,e){const n=t.range.start.line-e.range.start.line;return n!==0?n:t.range.start.character-e.range.start.character}function zH(t,e){return!(e.line<t.start.line||e.line>t.end.line||e.line==t.start.line&&e.character<t.start.character||e.line==t.end.line&&e.character>t.end.character)}function rm(t){return t.range.start.line!=t.range.end.line}const Q={newLine:Xi.newLine({allowMore:!0}),
|
|
1891
|
+
oneSpace:Xi.oneSpace(),noSpace:Xi.noSpace(),indent:Xi.indent({allowMore:!0}),noIndent:Xi.noIndent()};class HH extends T8{format(e){this.removeIndentFromTopLevelStatements(e),this.indentContentInBraces(e),this.formatSpecificationRule(e),this.formatGlobals(e),this.formatElementDeclaration(e),this.formatRelation(e),this.formatMetadataProperty(e),this.formatDeploymentNodeDeclaration(e),this.formatDeployedInstance(e),this.formatDeploymentRelation(e),this.formatView(e),this.formatViewRuleGroup(e),this.
|
|
1892
|
+
formatViewRuleGlobalStyle(e),this.formatViewRuleGlobalPredicate(e),this.formatIncludeExcludeExpressions(e),this.formatDeploymentViewRulePredicateExpressions(e),this.formatWhereExpression(e),this.formatWhereExpressionV2(e),this.formatWhereRelationExpression(e),this.formatWhereElementExpression(e),this.formatRelationExpression(e),this.formatAutolayoutProperty(e),this.formatWithPredicate(e),this.formatViewRuleStyle(e),this.formatLeafProperty(e),this.formatLinkProperty(e),this.formatNavigateToProperty(
|
|
1893
|
+
e),this.formatTags(e)}formatTags(e){this.on(e,Bv,(n,r)=>{r.cst(Io(n.$cstNode,"values").slice(1)).prepend(Q.oneSpace),r.keywords(",").prepend(Q.noSpace).append(Q.oneSpace)})}formatDeploymentRelation(e){this.on(e,Qi,(n,r)=>{const i=n?.source?.$cstNode?[n?.source?.$cstNode]:[];r.cst(i).append(Q.oneSpace),r.keywords("]->").prepend(Q.noSpace),r.keywords("-[").append(Q.noSpace),r.nodes(...He([n.target,n.tags],ce)).prepend(Q.oneSpace),r.properties("title","technology").prepend(Q.oneSpace)})}formatRelation(e){
|
|
1894
|
+
this.on(e,Ti,(n,r)=>{const i=n?.source?.$cstNode?[n?.source?.$cstNode]:[];r.cst(i).append(Q.oneSpace),r.keywords("]->").prepend(Q.noSpace),r.keywords("-[").append(Q.noSpace),r.nodes(...He([n.target,n.tags],ce)).prepend(Q.oneSpace),r.properties("title","technology").prepend(Q.oneSpace)}),this.on(e,$v,(n,r)=>{r.keywords("->","<-").surround(Q.oneSpace);const i=r.property("kind");i.nodes[0]?.text.startsWith(".")&&i.surround(Q.oneSpace),r.keywords("]->").prepend(Q.noSpace).append(Q.oneSpace),r.keywords(
|
|
1895
|
+
"-[").prepend(Q.oneSpace).append(Q.noSpace),r.properties("title").prepend(Q.oneSpace)}),this.on(e,wv)?.property("target").prepend(Q.oneSpace),this.on(e,xv,(n,r)=>{r.property("from").append(Q.oneSpace),r.keywords("]->").prepend(Q.noSpace),r.keywords("-[").append(Q.noSpace)}),this.on(e,FC)?.keywords("->").append(Q.oneSpace),this.on(e,Sv)?.keyword("->").prepend(Q.oneSpace)}removeIndentFromTopLevelStatements(e){(jC(e)||Mv(e)||Ol(e)||BC(e)||Cv(e)||qC(e))&&this.getNodeFormatter(e).keywords("specificat\
|
|
1896
|
+
ion","model","views","likec4lib","global","deployments").prepend(Q.noIndent)}indentContentInBraces(e){if(BC(e)||Mv(e)||va(e)||ba(e)||ga(e)||Cv(e)||la(e)||co(e)||$l(e)||El(e)||co(e)||jC(e)||il(e)||OC(e)||NU(e)||Ch(e)||xU(e)||Ol(e)||NC(e)||DU(e)||EU(e)||ud(e)||Oh(e)||mU(e)||gU(e)||Zi(e)||bv(e)||qC(e)||vU(e)||bU(e)||yU(e)){const n=this.getNodeFormatter(e),r=n.keywords("{"),i=n.keywords("}"),s=n.interior(r,i);let o=null;for(const a of s.nodes)(!o||!WH(o,a))&&n.cst([a]).prepend(Q.indent),o=a;r.prepend(
|
|
1897
|
+
Q.noIndent).prepend(Q.oneSpace),i.prepend(Q.noIndent).prepend(Xi.newLine({allowMore:!0}))}}appendKeywordsWithSpace(e){this.on(e,xC)?.keywords("element").append(Q.oneSpace)}formatView(e){this.on(e,ch,(n,r)=>{(n.extends||n.viewOf||n.name)&&r.keywords("view").append(Q.oneSpace),r.keywords("of","extends").surround(Q.oneSpace)}),this.on(e,SC)?.keywords("dynamic","view").append(Q.oneSpace),this.on(e,yv)?.keywords("deployment","view").append(Q.oneSpace)}formatLeafProperty(e){if(pl(e)||Xl(e)||LU(e)||ha(
|
|
1898
|
+
e)||Fv(e)||WC(e)||so(e)||Pl(e)||Kc(e)||Wr(e)||Ah(e)||zp(e)||Dh(e)||_v(e)||Lv(e)||Nv(e)||jv(e)){const n=this.getNodeFormatter(e),r=n.keyword(":"),i=n.keywords("title","description","technology","notation","color","line","head","tail","icon","shape","border","opacity","multiple","size","padding","textSize");r.nodes.length===0?i.append(Q.oneSpace):r.prepend(Q.noSpace).append(Q.oneSpace),n.keyword(";").prepend(Q.noSpace).append(Q.newLine)}}formatLinkProperty(e){this.on(e,bh,(n,r)=>{r.keyword("link").
|
|
1899
|
+
append(Q.oneSpace),r.property("value").append(Q.oneSpace),r.keyword(":").prepend(Q.noSpace).append(Q.oneSpace),r.keyword(";").prepend(Q.noSpace).append(Q.newLine)})}formatNavigateToProperty(e){this.on(e,$h)?.property("key").append(Q.oneSpace)}formatAutolayoutProperty(e){this.on(e,rd,(n,r)=>{r.keyword("autoLayout").append(Q.oneSpace),r.property("rankSep").prepend(Q.oneSpace),r.property("nodeSep").prepend(Q.oneSpace)})}formatMetadataProperty(e){this.on(e,PU,(n,r)=>{r.property("key").append(Q.oneSpace),
|
|
1900
|
+
r.keyword(":").prepend(Q.noSpace).append(Q.oneSpace),r.keyword(";").prepend(Q.noSpace).append(Q.newLine)})}formatElementDeclaration(e){this.on(e,pn,(n,r)=>{const i=dn(n.$cstNode,"kind"),s=dn(n.$cstNode,"name");s&&i&&(Aw(s,i)>0?r.cst([i]).append(Q.oneSpace):(r.cst([s]).append(Q.oneSpace),r.cst([i]).prepend(Q.oneSpace))),r.properties("props").prepend(Q.oneSpace)})}formatGlobals(e){this.on(e,la,(n,r)=>{r.keyword("style").append(Q.oneSpace),r.property("id").append(Q.oneSpace)}),this.on(e,co,(n,r)=>{
|
|
1901
|
+
r.keyword("styleGroup").append(Q.oneSpace)}),this.on(e,$l,(n,r)=>{r.keyword("predicateGroup").append(Q.oneSpace)}),this.on(e,El,(n,r)=>{r.keyword("dynamicPredicateGroup").append(Q.oneSpace)})}formatSpecificationRule(e){if((va(e)||ba(e)||Ph(e)||ga(e))&&this.getNodeFormatter(e).keywords("element","relationship","tag","deploymentNode").append(Q.oneSpace),_h(e)){const n=this.getNodeFormatter(e);n.keyword("color").append(Q.oneSpace),n.property("name").append(Q.oneSpace)}}formatWithPredicate(e){const n=this.
|
|
1902
|
+
getNodeFormatter(e);(ah(e)||Ov(e))&&n.keyword("with").prepend(Q.oneSpace)}formatDeploymentNodeDeclaration(e){this.on(e,jn,(n,r)=>{const i=dn(n.$cstNode,"kind"),s=dn(n.$cstNode,"name");s&&i&&(Aw(s,i)>0?r.cst([i]).append(Q.oneSpace):(r.cst([s]).append(Q.oneSpace),r.cst([i]).prepend(Q.oneSpace))),r.properties("title").prepend(Q.oneSpace)})}formatDeployedInstance(e){this.on(e,Bn,(n,r)=>{const i=n.$cstNode?.content.find(s=>s.text==="=");i&&r.cst([i]).surround(Q.oneSpace),r.keyword("instanceOf").append(
|
|
1903
|
+
Q.oneSpace),r.property("title").prepend(Q.oneSpace)})}formatViewRuleGlobalStyle(e){this.on(e,Uv,(n,r)=>{r.keywords("global","style").append(Q.oneSpace)})}formatViewRuleGlobalPredicate(e){const n=this.getNodeFormatter(e);(Gv(e)||_C(e))&&n.keywords("global","predicate").append(Q.oneSpace)}formatViewRuleGroup(e){this.on(e,Oh,(n,r)=>{r.keyword("group").append(Q.oneSpace)})}formatViewRuleStyle(e){this.on(e,ud)?.keyword("style").append(Q.oneSpace),this.on(e,AC)?.keyword("style").append(Q.oneSpace),this.
|
|
1904
|
+
on(e,kU)?.keyword(",").prepend(Q.noSpace).append(Q.oneSpace),this.on(e,AU)?.keyword(",").prepend(Q.noSpace).append(Q.oneSpace)}formatWhereExpression(e){(oU(e)||Z8(e))&&this.getNodeFormatter(e).keyword("where").append(Q.oneSpace)}formatWhereExpressionV2(e){(aU(e)||eU(e))&&this.getNodeFormatter(e).keyword("where").append(Q.oneSpace)}formatWhereRelationExpression(e){if(this.on(e,pU,(n,r)=>{r.property("operator").surround(Q.oneSpace)}),this.on(e,YC,(n,r)=>{r.keyword("not").append(Q.oneSpace)}),CC(e)||
|
|
1905
|
+
jU(e)||XC(e)){const n=this.getNodeFormatter(e);n.property("operator").surround(Q.oneSpace),n.property("not").surround(Q.oneSpace)}}formatWhereElementExpression(e){if(this.on(e,dU,(n,r)=>{r.property("operator").surround(Q.oneSpace)}),this.on(e,KC,(n,r)=>{r.keyword("not").append(Q.oneSpace)}),kC(e)||BU(e)||MU(e)){const n=this.getNodeFormatter(e);n.property("operator").surround(Q.oneSpace),n.property("not").surround(Q.oneSpace)}}formatIncludeExcludeExpressions(e){if(Ap(e)||yh(e)||yl(e)||ra(e)){const n=this.
|
|
1906
|
+
getNodeFormatter(e);(!e.$cstNode||!rm(e.$cstNode))&&n.keywords("include","exclude").append(Q.oneSpace)}if(PC(e)||UC(e)||UC(e)){const n=this.getNodeFormatter(e),r=this.findPredicateExpressionRoot(e),i=r?.$cstNode&&rm(r?.$cstNode);i&&n.property("value").prepend(Q.indent),n.keyword(",").prepend(Q.noSpace).append(i?Q.newLine:Q.oneSpace)}}formatRelationExpression(e){this.on(e,Av,(n,r)=>{r.keyword("->").append(Q.oneSpace)}),this.on(e,MC,(n,r)=>{r.keyword("->").prepend(Q.oneSpace)}),this.on(e,Pv,(n,r)=>{
|
|
1907
|
+
r.keywords("->","<->").prepend(Q.oneSpace),r.keywords("-[").prepend(Q.oneSpace).append(Q.noSpace),r.keywords("]->").prepend(Q.noSpace).append(Q.oneSpace);const i=r.property("kind");i.nodes[0]?.text.startsWith(".")&&i.surround(Q.oneSpace)}),this.on(e,vv,(n,r)=>{r.property("target").prepend(Q.oneSpace)})}formatDeploymentViewRulePredicateExpressions(e){if(Ap(e)||yh(e)||yl(e)||ra(e)){const n=this.getNodeFormatter(e);(!e.$cstNode||!rm(e.$cstNode))&&n.keywords("include","exclude").append(Q.oneSpace)}if($U(
|
|
1908
|
+
e)){const n=this.getNodeFormatter(e),r=this.findPredicateExpressionRoot(e),i=r?.$cstNode&&rm(r?.$cstNode);i&&n.property("value").prepend(Q.indent),n.keyword(",").prepend(Q.noSpace).append(i?Q.newLine:Q.oneSpace)}}findPredicateExpressionRoot(e){let n=e.$container;for(;;){if(!n||Ap(n)||yh(n)||yl(n)||ra(n))return n;n=n.$container}}on(e,n,r){const i=n(e)?this.getNodeFormatter(e):void 0;return r&&i&&r(e,i),i}}class VH extends MR{projects;constructor(e){super(e),this.projects=e.shared.workspace.ProjectsManager}createDescription(e,n,r){
|
|
1909
|
+
const i=r??lt(e),s=super.createDescription(e,n,r);return i.likec4ProjectId??=this.projects.belongsTo(i.uri),s.likec4ProjectId=i.likec4ProjectId,s}}var Mt=zs();class KH extends BR{projects;constructor(e){super(e),this.projects=e.workspace.ProjectsManager}async updateContent(e,n=Mt.CancellationToken.None){e.likec4ProjectId=this.projects.belongsTo(e.uri),await super.updateContent(e,n)}projectElements(e,n,r){return We(this.symbolIndex.keys()).filter(i=>this.projects.belongsTo(i)===e&&(!r||r.has(i))).
|
|
1910
|
+
flatMap(i=>this.getFileDescriptions(i,n))}}class XH extends _R{projects;constructor(e){super(e),this.projects=e.workspace.ProjectsManager}get allExcludingBuiltin(){return super.all.filter(e=>!bo(e)||bd(e.uri)?!1:(e.likec4ProjectId||(e.likec4ProjectId=this.projects.belongsTo(e.uri)),!0))}projectDocuments(e){return this.allExcludingBuiltin.filter(n=>n.likec4ProjectId===e)}groupedByProject(){return Qo(this.allExcludingBuiltin.toArray(),ci("likec4ProjectId"))}}class YH extends jR{documentFactory;projects;constructor(e){
|
|
1911
|
+
super(e),this.documentFactory=e.workspace.LangiumDocumentFactory,this.projects=e.workspace.ProjectsManager}async loadAdditionalDocuments(e,n){n(this.documentFactory.fromString(tA,Et.parse(HU))),await super.loadAdditionalDocuments(e,n)}async traverseFolder(e,n,r,i){const s=await this.fileSystemProvider.readDirectory(n);await Promise.all(s.map(async o=>{if(!await this.projects.loadConfigFile(o)&&this.includeEntry(e,o,r)){if(o.isDirectory)await this.traverseFolder(e,o.uri,r,i);else if(o.isFile){const a=await this.
|
|
1912
|
+
langiumDocuments.getOrCreateDocument(o.uri);i(a)}}}))}workspace(){return this.folders&&L_(this.folders,1)?this.folders[0]:null}get workspaceUri(){const e=this.workspace();return Ie(e,"Workspace not initialized"),Et.parse(e.uri)}get workspaceURL(){const e=this.workspace();return Ie(e,"Workspace not initialized"),new URL(e.uri)}}const JH=ot.getChild("LikeC4LanguageServices");class QH{constructor(e){this.services=e,this.views=e.likec4.Views,this.builder=e.likec4.ModelBuilder,this.projectsManager=e.
|
|
1913
|
+
shared.workspace.ProjectsManager}views;builder;projectsManager;get workspaceUri(){return this.services.shared.workspace.WorkspaceManager.workspaceUri}projects(){const e=this.services.shared.workspace.ProjectsManager,n=Xe(this.services.shared.workspace.LangiumDocuments.groupedByProject(),ec(),xt(([r,i])=>{const s=r,{folder:o,config:a}=e.getProject(s);return{id:s,folder:o,config:a,documents:xt(i,ci("uri"))}}));return qr(n,1)?n:[{id:Qn.DefaultProjectId,folder:this.services.shared.workspace.WorkspaceManager.
|
|
1914
|
+
workspaceUri,config:{name:"default"},documents:null}]}async diagrams(){return await this.views.diagrams()}async computedModel(e){const n=this.projectsManager.ensureProjectId(e);return await this.builder.buildLikeC4Model(n)}async layoutedModel(e){const n=this.projectsManager.ensureProjectId(e),r=await this.builder.parseModel(n);if(!r)throw new Error("Failed to parse model");const i=await this.views.diagrams(n);return vs.create({...r,__:"layouted",views:Zu(i,ci("id"))})}getErrors(){return this.services.
|
|
1915
|
+
shared.workspace.LangiumDocuments.allExcludingBuiltin.toArray().flatMap(e=>(e.diagnostics??[]).filter(n=>n.severity===Ns.Error).map(({message:n,range:r})=>({message:n,line:r.start.line,range:r,sourceFsPath:e.uri.fsPath})))}async notifyUpdate({changed:e,removed:n}){if(!e&&!n)return!1;const r=this.services.shared.workspace.WorkspaceLock;try{let i=!1;return await r.write(async s=>{await this.services.shared.workspace.DocumentBuilder.update(e?[Et.file(e)]:[],n?[Et.file(n)]:[],s),i=!s.isCancellationRequested}),
|
|
1916
|
+
i}catch(i){return JH.error(hr(i)),!1}}}class Sw{toDispose=[];isDisposed=!1;onDispose(...e){this.toDispose.push(...e)}dispose(){this.throwIfDisposed(),this.isDisposed=!0;let e;for(;e=this.toDispose.pop();)try{e.dispose()}catch(n){zv(n)}}throwIfDisposed(){if(this.isDisposed)throw new Error("This has already been disposed")}}function An(t){return t.el.ref}function Eo(t){const e=[t.$type==="StrictFqnRef"?t.value.$refText:t.el.$refText];let n=t.parent;for(;n;)e.push(n.$type==="StrictFqnRef"?n.value.$refText:
|
|
1917
|
+
n.el.$refText),n=n.parent;return e.length===1?e[0]:e.reverse().join(".")}function ZH(t){let e;for(;e=t.value?.ref;){if(jn(e))return null;if(Bn(e))return e;if(Tt(t.parent))return null;t=t.parent}return null}function Sn(t){const e=Rt(t)?lt(t):t;return Wt(e.likec4ProjectId,()=>`Invalid state, document ${e.uri} has no project ID assigned`)}function Id(...t){var e=t.length>1?t.join(":::"):t[0];return F_(e)}class e5{constructor(e){this.services=e}async provideCodeLens(e,n,r){return bo(e)?(e.state<=qe.
|
|
1918
|
+
Linked&&(ot.debug(`Waiting for document ${e.uri.path} to be Linked`),await this.services.shared.workspace.DocumentBuilder.waitUntil(qe.Linked,e.uri,r),ot.debug("Document is linked")),e.parseResult.value.views.flatMap(i=>i.views).flatMap(i=>{const s=tm.readId(i),o=i.$cstNode?.range;if(!o||!s)return[];const a=Sn(i);return{range:{start:o.start,end:{line:o.start.line,character:o.start.character+4}},command:{command:"likec4.open-preview",arguments:[s,a],title:"open preview"}}})):void 0}}const _w=["co\
|
|
1919
|
+
lor","shape","icon","border","opacity","multiple","size","textSize"].join(",");class t5 extends jT{completionOptions={triggerCharacters:["."]};completionForKeyword(e,n,r){if(this.filterKeyword(e,n)){if(n.value==="deployment"&&qi(e.node,Ol))return r(e,{label:n.value,detail:"Insert deployment view",kind:Pt.Class,insertTextFormat:Mn.Snippet,insertText:["deployment view ${1:view_${TM_FILENAME_BASE}_${CURRENT_SECOND}} {"," title '${2:Untitled}'"," "," include $0","}"].join(`
|
|
1920
|
+
`)});if(["title","description","technology"].includes(n.value))return r(e,{label:n.value,kind:Pt.Property,insertTextFormat:Mn.Snippet,insertText:`${n.value} '\${0}'`});if(n.value==="color")return r(e,{label:n.value,kind:Pt.Property,insertTextFormat:Mn.Snippet,insertText:`${n.value} \${1|${M_.join(",")}|}$0`});if(n.value==="opacity")return r(e,{label:n.value,kind:Pt.Property,insertTextFormat:Mn.Snippet,insertText:`${n.value} \${0:100}%`});if(["views","specification","model","deployment","with"].includes(
|
|
1921
|
+
n.value))return r(e,{label:n.value,detail:`Insert ${n.value} block`,kind:Pt.Module,insertTextFormat:Mn.Snippet,insertText:`${n.value} {
|
|
1922
|
+
$0
|
|
1923
|
+
}`});if(n.value==="group")return r(e,{label:n.value,detail:"Insert group block",kind:Pt.Class,insertTextFormat:Mn.Snippet,insertText:["group '${1:Title}' {"," $0","}"].join(`
|
|
1924
|
+
`)});if(n.value==="dynamic"&&qi(e.node,Ol))return r(e,{label:n.value,detail:"Insert dynamic view",kind:Pt.Class,insertTextFormat:Mn.Snippet,insertText:["dynamic view ${1:view_${TM_FILENAME_BASE}_${CURRENT_SECOND}} {"," title '${2:Untitled}'"," "," $0","}"].join(`
|
|
1925
|
+
`)});if(n.value==="style"&&e.node)return qi(e.node,la)?r(e,{label:n.value,detail:`Insert ${n.value} block`,kind:Pt.Module,insertTextFormat:Mn.Snippet,insertText:`${n.value} \${1:name} \${2:*} {
|
|
1926
|
+
\${3|${_w}|} $0
|
|
1927
|
+
}`}):qi(e.node,X3([Ol,co]))?r(e,{label:n.value,detail:`Insert ${n.value} block`,kind:Pt.Module,insertTextFormat:Mn.Snippet,insertText:`${n.value} \${1:*} {
|
|
1928
|
+
\${2|${_w}|} $0
|
|
1929
|
+
}`}):r(e,{label:n.value,detail:`Insert ${n.value} block`,kind:Pt.Module,insertTextFormat:Mn.Snippet,insertText:`${n.value} {
|
|
1930
|
+
\${1|${_w}|} $0
|
|
1931
|
+
}`});if(n.value==="extend")return r(e,{label:n.value,detail:"Extend another view",kind:Pt.Class,insertTextFormat:Mn.Snippet,insertText:`extend $1 {
|
|
1932
|
+
$0
|
|
1933
|
+
}`});if(n.value==="autoLayout")return r(e,{label:n.value,kind:Pt.Class,insertTextFormat:Mn.Snippet,insertText:"autoLayout ${1|TopBottom,BottomTop,LeftRight,RightLeft|}$0"});r(e,{label:n.value,kind:this.getKeywordCompletionItemKind(n),detail:"Keyword",sortText:"1"})}}}class n5 extends qT{createDocumentHighlight(e){return ge.DocumentHighlight.create(e.segment.range,ge.DocumentHighlightKind.Read)}}class r5{constructor(e){this.services=e}async getDocumentLinks(e,n,r){return bo(e)?Or(e.parseResult.value).
|
|
1934
|
+
filter(bh).map(i=>{try{const s=dn(i.$cstNode,"value")?.range,o=s&&this.resolveLink(e,i.value);if(o&&fo(o))return{range:s,target:o}}catch(s){Re(s)}return null}).nonNullable().toArray():[]}resolveLink(e,n){if(fo(n)||Lh(n))return n;const r=iA(n)?new URL(e.uri.toString(!0)):this.services.shared.workspace.WorkspaceManager.workspaceURL;return new URL(n,r).toString()}relativeLink(e,n){if(Lh(n))return oA(n);if(iA(n)){const r=new URL(e.uri.toString(!0)),i=new URL(n,r).toString();return oA(ZU(i,this.services.
|
|
1935
|
+
shared.workspace.WorkspaceManager.workspaceURL.toString()))}return null}}const SS=ot.getChild("DocumentSymbolProvider");class i5{constructor(e){this.services=e,this.nodeKindProvider=e.shared.lsp.NodeKindProvider,this.parser=e.likec4.ModelParser,this.locator=e.likec4.ModelLocator,this.nameProvider=e.references.NameProvider}nodeKindProvider;nameProvider;parser;locator;async getSymbols(e,n,r){if(!bo(e))return[];e.state<=qe.Linked&&(SS.debug(`Waiting for document ${e.uri.path} to be Linked`),await this.
|
|
1936
|
+
services.shared.workspace.DocumentBuilder.waitUntil(qe.Linked,e.uri,r),SS.debug("document is Linked"));const{parseResult:{value:{specifications:i,models:s,deployments:o,views:a,likec4lib:u}}}=e;return[...u.map(c=>()=>this.getLikec4LibSymbol(c)),...i.map(c=>()=>this.getSpecSymbol(c)),...s.map(c=>()=>this.getModelSymbol(c)),...o.map(c=>()=>this.getDeploymentModelSymbol(c)),...a.map(c=>()=>this.getModelViewsSymbol(c))].flatMap(c=>{try{return c()??[]}catch(l){return Re(l),[]}})}getLikec4LibSymbol(e){
|
|
1937
|
+
const n=e?.$cstNode;if(!n)return[];const r=e.icons.map(i=>this.getLibIconSymbol(i)).filter(ce);return r.length===0?[]:[{kind:br.Namespace,name:"icons",range:n.range,selectionRange:Du(n,"icons")?.range??n.range,children:r}]}getSpecSymbol(e){const n=e?.$cstNode;if(!n)return[];const r=dn(n,"name");if(!r)return[];const i=Xe([...e.elements,...e.tags,...e.relationships],xt(s=>{try{if(va(s)||ba(s)||ga(s))return this.getKindSymbol(s);if(Ph(s))return this.getTagSymbol(s)}catch(o){return Re(o),null}je(s)}),
|
|
1938
|
+
He(ce));return i.length===0?[]:[{kind:br.Namespace,name:e.name,range:n.range,selectionRange:r.range,children:i}]}getModelSymbol(e){const n=e.$cstNode;if(!n)return[];const r=dn(n,"name");return r?[{kind:this.symbolKind(e),name:e.name,range:n.range,selectionRange:r.range,children:e.elements.flatMap(i=>this.getElementsSymbol(i))}]:[]}getDeploymentModelSymbol(e){const n=e.$cstNode;if(!n)return[];const r=dn(n,"name");return r?[{kind:this.symbolKind(e),name:e.name,range:n.range,selectionRange:r.range,
|
|
1939
|
+
children:e.elements.flatMap(i=>this.getDeploymentElementSymbol(i))}]:[]}getElementsSymbol(e){try{if(oa(e))return this.getExtendElementSymbol(e);if(pn(e))return this.getElementSymbol(e)}catch(n){Re(n)}return[]}getExtendElementSymbol(e){const n=e.$cstNode,r=e.element.$cstNode,i=e.body;return!n||!r?[]:[{kind:this.symbolKind(e),name:Eo(e.element),range:n.range,selectionRange:r.range,children:i.elements.flatMap(s=>this.getElementsSymbol(s))}]}getElementSymbol(e){const n=e.$cstNode,r=dn(n,"name");if(!r||
|
|
1940
|
+
!n)return[];const i=e.name,s=e.kind.$refText;return[{kind:this.symbolKind(e),name:i,range:n.range,selectionRange:r.range,detail:s,children:e.body?.elements.flatMap(o=>this.getElementsSymbol(o))??[]}]}getModelViewsSymbol(e){const n=e.$cstNode,r=dn(n,"name");return!r||!n?[]:[{kind:this.symbolKind(e),name:e.name,range:n.range,selectionRange:r.range,children:e.views.flatMap(i=>this.getViewSymbol(i))}]}getKindSymbol(e){return!e.$cstNode||!e.kind.$cstNode||qt(e.kind.name)?null:{kind:this.symbolKind(e),
|
|
1941
|
+
name:e.kind.name,range:e.$cstNode.range,selectionRange:e.kind.$cstNode.range}}getTagSymbol(e){return!e.$cstNode||!e.tag.$cstNode||qt(e.tag.name)?null:{kind:this.symbolKind(e),name:"#"+e.tag.name,range:e.$cstNode.range,selectionRange:e.tag.$cstNode.range}}getLibIconSymbol(e){return!e.$cstNode||qt(e.name)?null:{kind:this.symbolKind(e),name:e.name,range:e.$cstNode.range,selectionRange:e.$cstNode.range}}getViewSymbol(e){const n=e?.$cstNode;if(!n)return[];const r=e.name?dn(n,"name"):null;return r?[{kind:this.
|
|
1942
|
+
symbolKind(e),name:r.text,range:n.range,selectionRange:r.range,children:[]}]:[]}getDeploymentElementSymbol(e){try{if(jn(e))return this.getDeploymentNodeSymbol(e);if(Bn(e))return this.getDeployedInstanceSymbol(e);if(ao(e))return[]}catch(n){Re(n)}return[]}getDeploymentNodeSymbol(e){const n=e.$cstNode,r=this.nameProvider.getNameNode(e);if(!r||!n)return[];const i=this.nameProvider.getNameStrict(e),s=e.kind.$refText;return[{kind:this.symbolKind(e),name:i,range:n.range,selectionRange:r.range,detail:s,
|
|
1943
|
+
children:e.body?.elements.flatMap(o=>this.getDeploymentElementSymbol(o))??[]}]}getDeployedInstanceSymbol(e){const n=e.$cstNode,r=this.nameProvider.getNameNode(e);if(!r||!n)return[];const i=lt(e),s=this.parser.forDocument(i).parseDeployedInstance(e),o=this.nameProvider.getNameStrict(e),a="instance of "+s.element;return[{kind:this.symbolKind(e),name:o,range:n.range,selectionRange:r.range,detail:a,children:[]}]}symbolKind(e){return this.nodeKindProvider.getSymbolKind(e)}}class s5 extends zT{parser;locator;constructor(e){
|
|
1944
|
+
super(e),this.parser=e.likec4.ModelParser,this.locator=e.likec4.ModelLocator}getAstNodeHoverContent(e){if(VC(e))return{contents:{kind:"markdown",value:"tag `"+e.name+"`"}};if(jn(e)){const n=lt(e),r=this.parser.forDocument(n).parseDeploymentNode(e),i=[r.id+" "];return r.title!==e.name&&i.push(`### ${r.title}`),i.push("deployment node `"+r.kind+"` "),{contents:{kind:"markdown",value:i.join(`
|
|
1945
|
+
`)}}}if(Bn(e)){const n=lt(e),r=this.parser.forDocument(n).parseDeployedInstance(e),i=this.locator.getParsedElement(r.element),s=[r.id+" ",`instance of \`${r.element}\``];return i&&s.push(`### ${i.title}`,"element kind `"+i.kind+"` "),{contents:{kind:"markdown",value:s.join(`
|
|
1946
|
+
`)}}}if(xC(e))return{contents:{kind:"markdown",value:"element kind `"+e.name+"`"}};if(wU(e))return{contents:{kind:"markdown",value:"deployment node `"+e.name+"`"}};if(pn(e)){const n=this.locator.getParsedElement(e);return n?{contents:{kind:"markdown",value:[n.id,`### ${n.title}`,"element kind `"+n.kind+"` "].join(`
|
|
1947
|
+
`)}}:void 0}}}class o5 extends m8{highlightElement(e,n){if(pn(e)||jn(e))return this.highlightNameAndKind(e,n);if(Bn(e)){"name"in e&&n({node:e,property:"name",type:Ne.variable,modifier:[ze.definition,ze.readonly]});return}if(dv(e))return this.highlightView(e,n);if(OU(e))return n({node:e,property:"name",type:Ne.function});if(SU(e))return n({node:e,property:"name",type:Ne.type,modifier:[ze.definition]}),"prune";if(xv(e)&&"kind"in e){n({node:e,property:"kind",type:Ne.function});return}if(Ti(e)&&"kin\
|
|
1948
|
+
d"in e&&n({node:e,property:"kind",type:Ne.function}),$h(e)||Wl(e))return n({node:e,property:"key",type:Ne.property}),n({node:e,property:"value",type:Ne.variable,modifier:[ze.definition,ze.readonly]}),"prune";if((Dv(e)||lo(e))&&e.$cstNode)return n({cst:e.$cstNode,type:Ne.variable,modifier:[ze.definition,ze.readonly]}),"prune";if(Tv(e)){e.selector&&n({node:e,property:"selector",type:Ne.variable,modifier:[ze.definition,ze.readonly]});return}if(XC(e)&&ce(e.value)){n({node:e,property:"value",type:Ne.
|
|
1949
|
+
function});return}if((kC(e)||CC(e))&&ce(e.value)){n({node:e,property:"value",type:Ne.type,modifier:[ze.definition,ze.readonly]});return}if((JC(e)||QC(e))&&n({node:e,property:"participant",type:Ne.keyword}),oh(e)&&ce(e.kind))return n({node:e,property:"kind",type:Ne.type,modifier:[ze.definition]}),"prune";if(co(e)||la(e)){n({node:e,property:"id",type:Ne.variable,modifier:[ze.definition,ze.readonly]});return}if(Uv(e)){n({node:e,property:"style",type:Ne.variable,modifier:[ze.definition,ze.readonly]});
|
|
1950
|
+
return}if($l(e)||El(e)){n({node:e,property:"name",type:Ne.variable,modifier:[ze.definition,ze.readonly]});return}if(Gv(e)){n({node:e,property:"predicate",type:Ne.variable,modifier:[ze.definition,ze.readonly]});return}if(uh(e)&&ce(e.tag))return n({node:e,property:"tag",type:Ne.type,modifier:[ze.definition]}),"prune";if(LC(e)||HC(e))return n({node:e,property:"value",type:e.parent?Ne.property:Ne.variable,modifier:[ze.definition,ze.readonly]}),e.parent?void 0:"prune";if(dl(e)||zC(e))return n({node:e,
|
|
1951
|
+
property:"el",type:e.parent?Ne.property:Ne.variable,modifier:[ze.definition,ze.readonly]}),e.parent?void 0:"prune";if(_h(e)){n({node:e,keyword:"color",type:Ne.keyword}),n({node:e,property:"name",type:Ne.type,modifier:[ze.declaration,ze.readonly]});return}if((va(e)||ba(e)||ga(e))&&n({node:e,property:"kind",type:Ne.type,modifier:[ze.declaration,ze.readonly]}),Bv(e))return n({node:e,property:"values",type:Ne.interface});if(VC(e))return n({node:e,property:"name",type:Ne.type,modifier:[ze.definition]});
|
|
1952
|
+
if((Ch(e)||Zi(e)&&il(e.$container))&&n({node:e,property:"key",type:Ne.property}),Dh(e))return n({node:e,property:"key",type:Ne.property}),n({node:e,property:"value",type:Ne.number}),"prune";if(bh(e)||Wr(e)||RC(e))return n({node:e,property:"key",type:Ne.property}),Wr(e)&&(e.libicon||e.value==="none")?(n({node:e,property:e.libicon?"libicon":"value",type:Ne.enum,modifier:[ze.defaultLibrary]}),"prune"):("value"in e&&e.value&&n({node:e,property:"value",type:Ne.string}),"prune");if(so(e)||Ah(e)||Kc(e)||
|
|
1953
|
+
Pl(e)||zp(e)||uU(e))return n({node:e,property:"key",type:Ne.property}),"value"in e&&n({node:e,property:"value",type:Ne.enum}),"prune"}highlightNameAndKind(e,n){if(n({node:e,property:"name",type:Ne.variable,modifier:[ze.declaration,ze.readonly]}),n({node:e,property:"kind",type:Ne.keyword,modifier:[]}),pn(e)){e.props.length>0&&n({node:e,property:"props",type:Ne.string});return}e.title&&n({node:e,property:"title",type:Ne.string})}highlightView(e,n){e.name&&n({node:e,property:"name",type:Ne.variable,
|
|
1954
|
+
modifier:[ze.declaration,ze.readonly,"local"]})}}class _S extends Sw{constructor(e,n="fqn-index"){super(),this.services=e,this.cachePrefix=n,this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.projects=e.shared.workspace.ProjectsManager,this.documentCache=new bb(r=>this.createDocumentIndex(r)),this.workspaceCache=new pp(e.shared,qe.IndexedContent),this.onDispose(e.shared.workspace.DocumentBuilder.onDocumentPhase(qe.IndexedContent,async(r,i)=>(bo(r)&&this.documentCache.set(r,this.createDocumentIndex(
|
|
1955
|
+
r)),await Promise.resolve())))}projects;langiumDocuments;documentCache;workspaceCache;documents(e){return this.langiumDocuments.projectDocuments(e).filter(n=>bo(n)&&n.state>=qe.IndexedContent)}get(e){return e.state<qe.IndexedContent&&Re(`Document ${e.uri.path} is not indexed`),this.documentCache.get(e)}getFqn(e){Ie(pn(e)||sv(e));let n=nm.readId(e);if(ce(n))return n;const r=lt(e);return Ie(bo(r)),Re(`Document ${r.uri.path} is not indexed, but getFqn was called`),this.get(r),Wt(nm.readId(e),"Eleme\
|
|
1956
|
+
nt fqn must be set, invalid state")}byFqn(e,n){return We(this.workspaceCache.get(`${this.cachePrefix}:${e}:${n}`,()=>this.documents(e).toArray().flatMap(r=>this.get(r).byFqn(n))))}directChildrenOf(e,n){return We(this.workspaceCache.get(`${this.cachePrefix}:${e}:directChildrenOf:${n}`,()=>{const r=this.documents(e).reduce((i,s)=>(this.get(s).children(n).forEach(o=>{i.set(o.name,o)}),i),new er);return PS(r).sort((i,s)=>Eb(i.name,s.name))}))}uniqueDescedants(e,n){return We(this.workspaceCache.get(`${this.
|
|
1957
|
+
cachePrefix}:${e}:uniqueDescedants:${n}`,()=>{const{children:r,descendants:i}=this.documents(e).reduce((a,u)=>{const c=this.get(u);return c.children(n).forEach(l=>{a.children.set(l.name,l)}),c.descendants(n).forEach(l=>{a.descendants.set(l.name,l)}),a},{children:new er,descendants:new er}),s=PS(r).sort((a,u)=>Eb(a.name,u.name)),o=[...i.associations()].flatMap(([a,u])=>u.length===1&&!r.has(a)?u:[]);return[...s,...Y_(o)]}))}createDocumentIndex(e){const n=e.parseResult.value.models.flatMap(l=>l.elements);
|
|
1958
|
+
if(n.length===0)return Pa.EMPTY;const r=new Array,i=new er,s=new er,o=new er,a=this.services.workspace.AstNodeDescriptionProvider,u=(l,f,d)=>{const p={...a.createDescription(l,f,e),id:d};return nm.writeId(l,d),o.set(d,p),p},c=(l,f)=>{let d;if(pn(l)){d=V_(l.name,f);const h=u(l,l.name,d);f?i.set(f,h):r.push(h)}else d=Eo(l.element);let p=[];if(an(l.body)&&!qt(l.body.elements)){for(const h of l.body.elements)if(!Ti(h))try{p.push(...c(h,d))}catch(v){Re(v)}}p=[...i.get(d)??[],...p];for(const h of p)s.
|
|
1959
|
+
set(d,h);if(oa(l))for(const h of J_(d))for(const v of p)s.set(h,v);return s.get(d)??[]};for(const l of n)try{if(Ti(l))continue;c(l,null)}catch(f){Re(f)}return new Pa(r,i,s,o,this.projects.belongsTo(e))}}function PS(t){return[...t.associations()].flatMap(([e,n])=>n.length===1?n:[])}class Pa{constructor(e,n,r,i,s){this._rootElements=e,this._children=n,this._descendants=r,this._byfqn=i,this.projectId=s}static EMPTY=new Pa([],new er,new er,new er,Qn.DefaultProjectId);rootElements(){return this._rootElements}byFqn(e){
|
|
1960
|
+
return this._byfqn.get(e)??[]}children(e){return this._children.get(e)??[]}descendants(e){return this._descendants.get(e)??[]}}class a5 extends _S{constructor(e){super(e,"deployments-index"),this.services=e,this.Names=e.references.NameProvider}Names;createDocumentIndex(e){const n=e.parseResult.value.deployments.flatMap(f=>f.elements);if(n.length===0)return Pa.EMPTY;const r=new Array,i=new er,s=new er,o=new er,a=this.Names,u=this.services.workspace.AstNodeDescriptionProvider,c=(f,d,p)=>{const h={
|
|
1961
|
+
...u.createDescription(f,d,e),id:p};return nm.writeId(f,p),o.set(p,h),h},l=(f,d)=>{let p;if(ao(f))p=Eo(f.deploymentNode);else{const v=a.getName(f);if(!ce(v))return[];p=B_(v,d);const b=c(f,v,p);if(d?i.set(d,b):r.push(b),Bn(f))return[]}let h=[];if(an(f.body)){for(const v of f.body.elements)if(!Qi(v))try{h.push(...l(v,p))}catch(b){Re(b)}}h=[...i.get(p)??[],...h];for(const v of h)s.set(p,v);if(ao(f))for(const v of j_(p))for(const b of h)s.set(v,b);return s.get(p)??[]};for(const f of n)try{if(Qi(f))continue;
|
|
1962
|
+
l(f,null)}catch(d){Re(d)}return new Pa(r,i,s,o,this.projects.belongsTo(e))}}const xS=t=>Number.isFinite(t)?t:0;function u5(t){return{days:Math.trunc(t/864e5),hours:Math.trunc(t/36e5%24),minutes:Math.trunc(t/6e4%60),seconds:Math.trunc(t/1e3%60),milliseconds:Math.trunc(t%1e3),microseconds:Math.trunc(xS(t*1e3)%1e3),nanoseconds:Math.trunc(xS(t*1e6)%1e3)}}function c5(t){return{days:t/86400000n,hours:t/3600000n%24n,minutes:t/60000n%60n,seconds:t/1000n%60n,milliseconds:t%1000n,microseconds:0n,nanoseconds:0n}}
|
|
1963
|
+
function l5(t){switch(typeof t){case"number":{if(Number.isFinite(t))return u5(t);break}case"bigint":return c5(t)}throw new TypeError("Expected a finite number or bigint")}const d5=t=>t===0||t===0n,f5=(t,e)=>e===1||e===1n?t:`${t}s`,p5=1e-7,h5=24n*60n*60n*1000n;function im(t,e){const n=typeof t=="bigint";if(!n&&!Number.isFinite(t))throw new TypeError("Expected a finite number or bigint");e={...e};const r=t<0?"-":"";t=t<0?-t:t,e.colonNotation&&(e.compact=!1,e.formatSubMilliseconds=!1,e.separateMilliseconds=
|
|
1964
|
+
!1,e.verbose=!1),e.compact&&(e.unitCount=1,e.secondsDecimalDigits=0,e.millisecondsDecimalDigits=0);let i=[];const s=(l,f)=>{const d=Math.floor(l*10**f+p5);return(Math.round(d)/10**f).toFixed(f)},o=(l,f,d,p)=>{if(!((i.length===0||!e.colonNotation)&&d5(l)&&!(e.colonNotation&&d==="m"))){if(p??=String(l),e.colonNotation){const h=p.includes(".")?p.split(".")[0].length:p.length,v=i.length>0?2:1;p="0".repeat(Math.max(0,v-h))+p}else p+=e.verbose?" "+f5(f,l):d;i.push(p)}},a=l5(t),u=BigInt(a.days);if(e.hideYearAndDays?
|
|
1965
|
+
o(BigInt(u)*24n+BigInt(a.hours),"hour","h"):(e.hideYear?o(u,"day","d"):(o(u/365n,"year","y"),o(u%365n,"day","d")),o(Number(a.hours),"hour","h")),o(Number(a.minutes),"minute","m"),!e.hideSeconds)if(e.separateMilliseconds||e.formatSubMilliseconds||!e.colonNotation&&t<1e3){const l=Number(a.seconds),f=Number(a.milliseconds),d=Number(a.microseconds),p=Number(a.nanoseconds);if(o(l,"second","s"),e.formatSubMilliseconds)o(f,"millisecond","ms"),o(d,"microsecond","\xB5s"),o(p,"nanosecond","ns");else{const h=f+
|
|
1966
|
+
d/1e3+p/1e6,v=typeof e.millisecondsDecimalDigits=="number"?e.millisecondsDecimalDigits:0,b=h>=1?Math.round(h):Math.ceil(h),y=v?h.toFixed(v):b;o(Number.parseFloat(y),"millisecond","ms",y)}}else{const l=(n?Number(t%h5):t)/1e3%60,f=typeof e.secondsDecimalDigits=="number"?e.secondsDecimalDigits:1,d=s(l,f),p=e.keepDecimalsOnWholeSeconds?d:d.replace(/\.0+$/,"");o(Number.parseFloat(p),"second","s",p)}if(i.length===0)return r+"0"+(e.verbose?" milliseconds":"ms");const c=e.colonNotation?":":" ";return typeof e.
|
|
1967
|
+
unitCount=="number"&&(i=i.slice(0,Math.max(e.unitCount,1))),r+i.join(c)}function m5(t){const e=new Map;for(const n of t)if(La.isElement(n)&&n.viewOf&&Tt(n.extends)){const r=e.get(n.viewOf)??[];r.push(n.id),e.set(n.viewOf,r)}for(const{id:n,nodes:r}of t)for(const i of r){const s=qd.modelRef(i);if(i.navigateTo||!s)continue;const o=dk(e.get(s)??[],a=>a!==n);o&&(i.navigateTo=o)}return t}function g5(t,e="/"){const n=Xe(t,xt(u=>u.docUri),He(ce),Yo());if(n.length===0)return"";if(n.length===1){const u=Da(
|
|
1968
|
+
n[0]).pathname.split(e);return u.length<=1?e:(u.pop(),u.join(e)+e)}Ie(qr(n,2),"Expected at least 2 unique URIs");const[r,...i]=n,s=Da(r).pathname.split(e);let o=s.length;for(const u of i){if(u===r)continue;const c=Da(u).pathname.split(e);for(let l=0;l<o;l++)c[l]!==s[l]&&(o=l);if(o===0)return""}const a=s.slice(0,o).join(e);return a.endsWith(e)?a:a+e}function y5(t){const e="/",n=g5(t,e);return t.map(r=>{if(!r.docUri)return{view:r,parts:[]};let i=Da(r.docUri).pathname;return n.length>0?(Ie(i.startsWith(
|
|
1969
|
+
n),`Expect path "${i}" to start with common prefix: "${n}"`),i=i.slice(n.length)):i=i.includes(e)?i.slice(i.lastIndexOf(e)+1):i,{view:r,parts:i.split(e)}}).sort((r,i)=>{if(r.parts.length!==i.parts.length)return r.parts.length-i.parts.length;for(let s=0;s<r.parts.length;s++){const o=db(r.parts[s],i.parts[s]);if(o!==0)return o}return db(r.view.title??r.view.id,i.view.title??i.view.id)}).map(({parts:r,view:i})=>({...i,relativePath:r.join(e)}))}class NS{mergedData=new Map;merge(e){for(const n of e){
|
|
1970
|
+
const{id:r,links:i,tags:s,metadata:o}=n,a=this.mergedData.get(r)??{links:[],tags:[],metadata:{}};i&&a.links.push(...i),s&&(a.tags=Yo([...a.tags,...s])),o&&(a.metadata={...a.metadata,...o}),this.mergedData.set(r,a)}}apply(e){const n=this.mergedData.get(e.id);if(!n)return e;let r=n.links;e.links&&e.links.length>0&&(r=[...e.links,...r]);let i=n.tags;e.tags&&e.tags.length>0&&(i=Yo([...e.tags,...i]));let s=n.metadata;return e.metadata&&(s={...e.metadata,...n.metadata}),{...e,tags:qr(i,1)?i:null,links:qr(
|
|
1971
|
+
r,1)?r:null,...!qt(s)&&{metadata:s}}}}class v5{specs={tags:new Set,elements:{},deployments:{},relationships:{},colors:{}};globals={predicates:{},dynamicPredicates:{},styles:{}};constructor(e){for(const n of e){const{c4Specification:r,c4Globals:i}=n;r.tags.forEach(s=>this.specs.tags.add(s)),Object.assign(this.specs.elements,r.elements),Object.assign(this.specs.relationships,r.relationships),Object.assign(this.specs.colors,r.colors),Object.assign(this.specs.deployments,r.deployments),Object.assign(
|
|
1972
|
+
this.globals.predicates,i.predicates),Object.assign(this.globals.dynamicPredicates,i.dynamicPredicates),Object.assign(this.globals.styles,i.styles)}}toModelElement=({tags:e,links:n,style:{color:r,shape:i,icon:s,opacity:o,border:a,size:u,multiple:c,padding:l,textSize:f},id:d,kind:p,title:h,description:v,technology:b,metadata:y})=>{try{const E=this.specs.elements[p];return E?(r??=E.style.color,i??=E.style.shape,s??=E.style.icon,o??=E.style.opacity,a??=E.style.border,b??=E.technology,c??=E.style.multiple,
|
|
1973
|
+
u??=E.style.size,l??=E.style.padding,f??=E.style.textSize,{...r&&{color:r},...i&&{shape:i},...s&&{icon:s},...y&&!qt(y)&&{metadata:y},...E.notation&&{notation:E.notation},style:{...a&&{border:a},...u&&{size:u},...l&&{padding:l},...f&&{textSize:f},...Fy(c)&&{multiple:c},...wp(o)&&{opacity:o}},links:n??null,tags:e??null,technology:b??null,description:v??null,title:h,kind:p,id:d}):(ot.warn`No kind '${p}' found for ${d}`,null)}catch(E){Re(E)}return null};toModelRelation=({astPath:e,source:n,target:r,
|
|
1974
|
+
kind:i,links:s,id:o,...a})=>fn(i)&&this.specs.relationships[i]?{...this.specs.relationships[i],...a,...s&&{links:s},source:n,target:r,kind:i,id:o}:{...s&&{links:s},...a,source:n,target:r,id:o};toDeploymentElement=e=>{if(!fb.isDeploymentNode(e))return e;try{const n=this.specs.deployments[e.kind];if(!n)return ot.warn`No kind ${e.kind} found for ${e.id}`,null;let{technology:r=n.technology,notation:i=n.notation,style:s}=e;return{...e,...i&&{notation:i},...r&&{technology:r},style:{border:"dashed",opacity:10,
|
|
1975
|
+
...n.style,...s}}}catch(n){Re(n)}return null};toDeploymentRelation=({astPath:e,source:n,target:r,kind:i,links:s,id:o,...a})=>fn(i)&&this.specs.relationships[i]?{...this.specs.relationships[i],...a,...s&&{links:s},source:n,target:r,kind:i,id:o}:{...s&&{links:s},...a,source:n,target:r,id:o}}function w5(t){const e=new v5(t),n=Jo(e.specs.colors,d=>q_(d.color)),r=new NS,i=new NS,s=Xe(t,li(d=>(r.merge(d.c4ExtendElements),xt(d.c4Elements,e.toModelElement))),He(ce),pb,Oy((d,p)=>{const h=hb(p.id);return h&&
|
|
1976
|
+
Tt(d[h])?(ot.debug`No parent found for ${p.id}`,d):(d[p.id]=r.apply(p),d)},{})),o=Xe(t,li(d=>xt(d.c4Relations,e.toModelRelation)),He(d=>d?Tt(s[d.source])||Tt(s[d.target])?(ot.debug`Invalid relation ${d.id}
|
|
1977
|
+
source: ${d.source} resolved: ${!!s[d.source]}
|
|
1978
|
+
target: ${d.target} resolved: ${!!s[d.target]}\n`,!1):!0:!1),Zu(ci("id"))),a=Xe(t,li(d=>(i.merge(d.c4ExtendDeployments),xt(d.c4Deployments,e.toDeploymentElement))),He(ce),pb,Oy((d,p)=>{const h=hb(p.id);return h&&Tt(d[h])?(ot.debug`No parent found for deployment element ${p.id}`,d):(d[p.id]=fb.isDeploymentNode(p)?i.apply(p):p,d)},{})),u=Xe(t,li(d=>xt(d.c4DeploymentRelations,e.toDeploymentRelation)),He(d=>d?Tt(a[d.source.id])||Tt(a[d.target.id])?(ot.debug`Invalid deployment relation ${d.id}
|
|
1979
|
+
source: ${d.source.id} resolved: ${!!a[d.source.id]}
|
|
1980
|
+
target: ${d.target.id} resolved: ${!!a[d.target.id]}\n`,!1):!0:!1),Oy((d,p)=>an(d[p.id])?(ot.debug`Duplicate deployment relation ${p.id}`,d):(d[p.id]=p,d),{}));function c(d){const p=d.uri.toString();return h=>{let{id:v,title:b,description:y,astPath:E,...R}=h;return h.__==="element"&&Tt(b)&&"viewOf"in h&&(b=s[h.viewOf]?.title??null),Tt(b)&&v==="index"&&(b="Landscape view"),{...R,customColorDefinitions:n,docUri:p,description:y,title:b,id:v}}}const l=Xe(t,li(d=>xt(d.c4Views,c(d))),y5);l.some(d=>d.
|
|
1981
|
+
id==="index")||l.unshift({__:"element",id:"index",title:"Landscape view",description:null,tags:null,links:null,customColorDefinitions:n,rules:[{include:[{wildcard:!0}]}]});const f=Xe(l,Zu(ci("id")),X_);return{specification:{tags:Array.from(e.specs.tags),elements:e.specs.elements,relationships:e.specs.relationships,deployments:e.specs.deployments},elements:s,relations:o,globals:e.globals,views:f,deployments:{elements:a,relations:u}}}const Pw=t=>`parsed-model-${t}`,IS=t=>`computed-model-${t}`,$o=ot.
|
|
1982
|
+
getChild("ModelBuilder");class b5 extends Sw{projects;parser;listeners=[];cache;DocumentBuilder;LangiumDocuments;mutex;constructor(e){super(),this.projects=e.shared.workspace.ProjectsManager,this.parser=e.likec4.ModelParser,this.cache=e.ValidatedWorkspaceCache,this.DocumentBuilder=e.shared.workspace.DocumentBuilder,this.LangiumDocuments=e.shared.workspace.LangiumDocuments,this.mutex=e.shared.workspace.WorkspaceLock,this.onDispose(this.DocumentBuilder.onUpdate((n,r)=>{r.length>0&&this.notifyListeners(
|
|
1983
|
+
r)})),this.onDispose(this.DocumentBuilder.onBuildPhase(qe.Validated,(n,r)=>{const i=n.map(ci("uri")).filter(D3(bd));i.length>0&&this.notifyListeners(i)})),$o.debug`created`}unsafeSyncParseModel(e){const n=this.cache,r=$o.getChild(["project",e]);return n.has(Pw(e))&&r.debug("unsafeSyncParseModel from cache"),n.get(Pw(e),()=>{const i=this.documents(e);return i.length===0?($o.debug(`no documents to build model - project ${e}`),null):(r.debug("unsafeSyncParseModel from documents"),w5(i))})}async parseModel(e,n=Mt.
|
|
1984
|
+
CancellationToken.None){const r=this.projects.ensureProjectId(e),i=$o.getChild(["project",r]),s=this.cache.get(Pw(r));if(s)return i.debug("parseModel from cache"),s;const o=performance.now();return await this.mutex.read(async()=>{await jt(n);const a=this.unsafeSyncParseModel(r);return i.debug(`parseModel in ${im(performance.now()-o)}`),a})}previousViews={};unsafeSyncBuildModel(e){const n=this.cache,r=this.cache;return n.get(IS(e),()=>{const i=this.unsafeSyncParseModel(e);if(!i)return vs.EMPTY;const{
|
|
1985
|
+
views:s,...o}=i,a=vs.makeCompute(i),u=[];for(const l of vp(s)){const f=a(l);if(!f.isSuccess){$o.warn(hr(f.error));continue}u.push(f.view)}m5(u);const c=Gr(u,l=>{const f=OS(e,l.id),d=this.previousViews[f],p=d&&rw(l,d)?d:l;return r.set(f,p),[l.id,p]});return this.previousViews={...this.previousViews,...c},vs.create({...o,views:c})})}async buildLikeC4Model(e,n=Mt.CancellationToken.None){const r=this.projects.ensureProjectId(e),i=$o.getChild(["project",r]),s=this.cache.get(IS(r));if(s)return i.debug(
|
|
1986
|
+
"buildLikeC4Model from cache"),s;const o=performance.now();return await this.mutex.read(async()=>{await jt(n);const a=this.unsafeSyncBuildModel(r);return i.debug(`buildLikeC4Model in ${im(performance.now()-o)}`),a})}async computeView(e,n,r=Mt.CancellationToken.None){const i=this.projects.ensureProjectId(n),s=$o.getChild(["project",i]),o=this.cache,a=OS(i,e);if(o.has(a))return o.get(a);const u=await this.parseModel(i,r);return u?o.get(a,()=>{const c=u.views[e];if(!c)return s.warn`computeView: cant find view ${e}`,
|
|
1987
|
+
null;s.debug`computeView: ${e}`;const l=vs.makeCompute(u)(c);if(!l.isSuccess)return Re(l.error),null;let f=l.view;const d=Xe(u.views,vp(),He(G_),He(h=>h.id!==e),Qo(h=>h.viewOf));for(const h of f.nodes)if(!h.navigateTo){const v=d[h.id];v&&(h.navigateTo=v[0].id)}const p=this.previousViews[a];return p&&rw(f,p)?f=p:this.previousViews[a]=f,f}):null}onModelParsed(e){return this.listeners.push(e),js.create(()=>{const n=this.listeners.indexOf(e);n>=0&&this.listeners.splice(n,1)})}documents(e){return this.
|
|
1988
|
+
parser.documents(e).toArray()}notifyListeners(e){for(const n of this.listeners)try{n(e)}catch(r){Re(r)}}}function OS(t,e){return`computed-view-${t}-${e}`}const{findNodeForKeyword:E5,findNodeForProperty:sm}=ag,{getDocument:$5}=Eu;class D5{constructor(e){this.services=e,this.fqnIndex=e.likec4.FqnIndex,this.deploymentsIndex=e.likec4.DeploymentsIndex,this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.parser=e.likec4.ModelParser,this.projects=e.shared.workspace.ProjectsManager}fqnIndex;deploymentsIndex;langiumDocuments;parser;projects;documents(e){
|
|
1989
|
+
return this.parser.documents(e)}getParsedElement(...e){let n,r;if(e.length===2?(n=e[0],r=e[1]):(n=e[0],r=Ly(n)?this.projects.ensureProjectId():Sn(n)),Ly(n)){const s=n,o=this.fqnIndex.byFqn(r,n).head();if(!o)return null;const a=this.langiumDocuments.getDocument(o.documentUri);return a?this.parser.parse(a).c4Elements.find(u=>u.id===s)??null:null}const i=this.fqnIndex.getFqn(n);return this.parser.parse($5(n)).c4Elements.find(s=>s.id===i)??null}locateElement(e,n){const r=this.projects.ensureProjectId(
|
|
1990
|
+
n),i=this.fqnIndex.byFqn(r,e).head(),s=i?.nameSegment??i?.selectionSegment;return!i||!s?null:{uri:i.documentUri.toString(),range:s.range}}locateDeploymentElement(e,n){const r=this.projects.ensureProjectId(n),i=this.deploymentsIndex.byFqn(r,e).head(),s=i?.nameSegment??i?.selectionSegment;return!i||!s?null:{uri:i.documentUri.toString(),range:s.range}}locateRelation(e,n){const r=this.projects.ensureProjectId(n);for(const i of this.documents(r)){const s=i.c4Relations.find(u=>u.id===e)??i.c4DeploymentRelations.
|
|
1991
|
+
find(u=>u.id===e);if(!s)continue;const o=this.services.workspace.AstNodeLocator.getAstNode(i.parseResult.value,s.astPath);if(!Ti(o)&&!Qi(o))continue;let a=o.title?sm(o.$cstNode,"title"):void 0;if(a??=o.kind?sm(o.$cstNode,"kind"):void 0,a??=sm(o.$cstNode,"target"),a??=o.$cstNode,!!a)return{uri:i.uri.toString(),range:a.range}}return null}locateViewAst(e,n){const r=this.projects.ensureProjectId(n);for(const i of this.documents(r)){const s=i.c4Views.find(a=>a.id===e);if(!s)continue;const o=this.services.
|
|
1992
|
+
workspace.AstNodeLocator.getAstNode(i.parseResult.value,s.astPath);if(dv(o))return{doc:i,view:s,viewAst:o}}return null}locateView(e,n){const r=this.locateViewAst(e,n);if(!r)return null;const i=r.viewAst;let s=i.name?sm(i.$cstNode,"name"):void 0;return s??=E5(i.$cstNode,"view"),s??=i.$cstNode,s?{uri:r.doc.uri.toString(),range:s.range}:null}}var xw,LS;function R5(){return LS||(LS=1,xw=t=>{const e=t.match(/^[ \t]*(?=\S)/gm);return e?e.reduce((n,r)=>Math.min(n,r.length),1/0):0}),xw}var k5=R5();const T5=Mi(
|
|
1993
|
+
k5);function FS(t){const e=T5(t);if(e===0)return t;const n=new RegExp(`^[ \\t]{${e}}`,"gm");return t.replace(n,"")}const Do=["this","it","self","super","likec4lib","global"];function ht(t){return async function(e,n,r){try{const i=t(e,n,r);$3(i)&&await i;return}catch(i){const s=i instanceof Error?i.message:String(i);n("error",`Validation failed: ${s}`,{node:e}),Re(i)}}}const{getDocument:C5}=Eu,A5=t=>{const e=t.likec4.DeploymentsIndex,n=t.references.NameProvider;return ht((r,i)=>{const s=n.getName(
|
|
1994
|
+
r);if(!s){i("error","DeploymentNode must be named",{node:r});return}const o=Wt(n.getNameNode(r),"name CstNode not found").range;Do.includes(s)&&i("error",`Reserved word: ${s}`,{node:r,range:o});const a=Sn(r),u=e.getFqn(r);e.byFqn(a,u).limit(2).toArray().length>1&&i("error",`Duplicate node name "${u}"`,{node:r,range:o})})},S5=t=>{const e=t.likec4.DeploymentsIndex,n=t.references.NameProvider;return ht((r,i)=>{const s=n.getName(r);if(!s){i("error","Deployed instance must be named, unique inside nod\
|
|
1995
|
+
e",{node:r});return}const o=Wt(n.getNameNode(r),"name CstNode not found").range;Do.includes(s)&&i("error",`Reserved word: ${s}`,{node:r,range:o});const a=Sn(r),u=e.getFqn(r);e.byFqn(a,u).limit(2).toArray().length>1&&i("error",`Duplicate instance name "${u}"`,{node:r,range:o})})},_5=t=>{const e=t.likec4.ModelParser;return ht((n,r)=>{if(!n.source?.value?.ref){let u=n.source?.$cstNode?.text??"";r("error",`DeploymentRelation source '${u}' not resolved`,{node:n,property:"source"});return}if(!n.target?.
|
|
1996
|
+
value?.ref){let u=n.target?.$cstNode?.text??"";r("error",`DeploymentRelation target '${u}' not resolved`,{node:n,property:"target"});return}const i=C5(n),s=e.forDocument(i),o=s.parseFqnRef(n.source);if(Fa.isModelRef(o)){r("error","DeploymentRelation must refer deployment element",{node:n,property:"source"});return}const a=s.parseFqnRef(n.target);if(Fa.isModelRef(a)){r("error","DeploymentRelation must refer deployment element",{node:n,property:"target"});return}mb(o.deployment,a.deployment)&&r("e\
|
|
1997
|
+
rror","Invalid parent-child relationship",{node:n})})},P5=t=>ht((e,n)=>{const r=e.deploymentNode.value.ref;(!r||!jn(r))&&n("error","ExtendDeployment allows only DeploymentNode",{node:e,property:"deploymentNode"})}),x5=t=>ht((e,n)=>{const r=AS(e.value);switch(!0){case oh(r):case uh(r):case lo(r):{n("warning","Predicate is ignored, as not supported in dynamic views",{node:e});return}}}),N5=t=>{const e=t.likec4.FqnIndex;return ht((n,r)=>{const i=An(n.source),s=i&&e.getFqn(i);s||r("error","Source no\
|
|
1998
|
+
t found (not parsed/indexed yet)",{node:n,property:"source"});const o=An(n.target),a=o&&e.getFqn(o);a||r("error","Target not found (not parsed/indexed yet)",{node:n,property:"target"}),s&&a&&(cm(s,a)||cm(a,s))&&r("error","Invalid parent-child relationship",{node:n})})},{getDocument:I5}=Eu,O5=t=>{const e=t.likec4.FqnIndex,n=t.workspace.AstNodeLocator;return ht((r,i)=>{const s=e.getFqn(r);if(!s){i("error","Not indexed element",{node:r,property:"name"});return}Do.includes(r.name)&&i("error",`Reserv\
|
|
1999
|
+
ed word: ${r.name}`,{node:r,property:"name"});const o=I5(r),a=o.uri,u=n.getAstNodePath(r),c=e.byFqn(Sn(o),s).filter(l=>l.documentUri!==a||l.path!==u).head();if(c){const l=c.documentUri!==a;i("error",`Duplicate element name ${r.name!==s?r.name+" ("+s+")":r.name}`,{node:r,property:"name",...l&&{relatedInformation:[{location:{range:c.nameSegment?.range??c.selectionSegment?.range,uri:c.documentUri.toString()},message:"conflicting element"}]}})}})},L5=t=>ht((e,n)=>{const r=parseFloat(e.value);(isNaN(
|
|
2000
|
+
r)||r<0||r>100)&&n("warning","Value ignored, must be between 0% and 100%",{node:e,property:"value"})}),F5=t=>(e,n)=>{const r=e.$container;r.props.some(i=>Wr(i)&&i!==e)&&n("error","Icon must be defined once",{node:e}),Zi(r)&&il(r.$container)&&r.$container.props.some(i=>Wr(i))&&n("warning","Redundant as icon defined on element",{node:e})},M5=t=>(e,n)=>{qi(e,$v)||n("error","Notes can be defined only inside dynamic view",{node:e})},B5=t=>{const e=t.likec4.FqnIndex;return ht((n,r)=>{const i=An(n.target),
|
|
2001
|
+
s=i&&e.getFqn(i);s||r("error","Target not resolved",{node:n,property:"target"});let o;if(an(n.source)){if(o=An(n.source),!o)return r("error","Source not resolved",{node:n,property:"source"})}else{if(!il(n.$container))return r("error","Sourceless relation must be nested",{node:n});o=n.$container.$container}const a=e.getFqn(o);a||r("error","Source not resolved",{node:n}),a&&s&&mb(a,s)&&r("error","Invalid parent-child relationship",{node:n})})},j5=t=>ht((e,n)=>{e.$container.tags?.values&&e.tags?.values&&
|
|
2002
|
+
n("error","Relation cannot have tags in both header and body",{node:e.tags})}),q5=t=>ht((e,n)=>{e.$containerIndex&&e.$containerIndex>0&&n("warning","Prefer one specification per document",{node:e,property:"name"})}),G5=t=>ht((e,n)=>{e.$containerIndex&&e.$containerIndex>0&&n("warning","Prefer one model per document",{node:e,property:"name"})}),U5=t=>ht((e,n)=>{e.$containerIndex&&e.$containerIndex>0&&n("warning","Prefer one global block per document",{node:e,property:"name"})}),W5=t=>{const e=t.shared.
|
|
2003
|
+
workspace.IndexManager;return ht((n,r)=>{Do.includes(n.name)&&r("error",`Reserved word: ${n.name}`,{node:n,property:"name"});const i=Sn(n),s=e.projectElements(i,Ri).filter(o=>o.name===n.name&&o.node!==n).head();if(s){const o=s.documentUri!==lt(n).uri;r("error",`Duplicate element kind '${n.name}'`,{node:n,property:"name",...o&&{relatedInformation:[{location:{range:s.nameSegment.range,uri:s.documentUri.toString()},message:"conflicting definition"}]}})}})},z5=t=>{const e=t.shared.workspace.IndexManager;
|
|
2004
|
+
return ht((n,r)=>{Do.includes(n.name)&&r("error",`Reserved word: ${n.name}`,{node:n,property:"name"});const i=Sn(n),s=e.projectElements(i,Di).filter(o=>o.name===n.name&&o.node!==n).head();if(s){const o=s.documentUri!==lt(n).uri;r("error",`Duplicate deploymentNode kind '${n.name}'`,{node:n,property:"name",...o&&{relatedInformation:[{location:{range:s.nameSegment.range,uri:s.documentUri.toString()},message:"conflicting definition"}]}})}})},H5=t=>{const e=t.shared.workspace.IndexManager;return ht((n,r)=>{
|
|
2005
|
+
const i="#"+n.name,s=Sn(n),o=e.projectElements(s,ts).filter(a=>a.name===i&&a.node!==n).head();if(o){const a=o.documentUri!==lt(n).uri;r("error",`Duplicate tag '${n.name}'`,{node:n,property:"name",...a&&{relatedInformation:[{location:{range:o.nameSegment.range,uri:o.documentUri.toString()},message:"conflicting definition"}]}})}})},V5=t=>{const e=t.shared.workspace.IndexManager;return ht((n,r)=>{Do.includes(n.name)&&r("error",`Reserved word: ${n.name}`,{node:n,property:"name"});const i=Sn(n);e.projectElements(
|
|
2006
|
+
i,es).filter(s=>s.name===n.name).limit(2).count()>1&&r("error",`Duplicate RelationshipKind '${n.name}'`,{node:n,property:"name"})})},MS=t=>{const e=t.shared.workspace.IndexManager;return ht((n,r)=>{const i=Sn(n),s=e.projectElements(i,ua),o=e.projectElements(i,aa);s.concat(o).filter(a=>a.name===n.name).limit(2).count()>1&&r("error",`Duplicate GlobalPredicateGroup or GlobalDynamicPredicateGroup name '${n.name}'`,{node:n,property:"name"})})},K5=t=>{const e=t.shared.workspace.IndexManager;return ht(
|
|
2007
|
+
(n,r)=>{const i=Sn(n);e.projectElements(i,Dl).filter(s=>s.name===n.name).limit(2).count()>1&&r("error",`Duplicate GlobalStyleId name '${n.name}'`,{node:n,property:"name"})})},X5=t=>{const e=t.shared.workspace.IndexManager;return ht((n,r)=>{if(!n.name)return;Do.includes(n.name)&&r("error",`Reserved word: ${n.name}`,{node:n,property:"name"});const i=Sn(n);e.projectElements(i,io).filter(s=>s.name===n.name).limit(2).count()>1&&r("error",`Duplicate view '${n.name}'`,{node:n,property:"name"})})},Y5=t=>ht(
|
|
2008
|
+
(e,n)=>{const r=wn(e,qp);yl(r)&&n("error",'Invalid usage inside "exclude"',{node:e});const i=Rv(e.subject)?e.subject.subject:e.subject;switch(!0){case dl(i):case Dv(i):case IC(i):case lo(i):return;case oh(i):case uh(i):n("error","Invalid target (expect reference to specific element)",{node:e,property:"subject"});return;default:je(i)}}),J5=t=>ht((e,n)=>{qi(e,pv)&&n("warning","Redundant usage, expand predicate resolves parent element only when used in relations",{node:e})}),Q5=t=>{const e=t.likec4.
|
|
2009
|
+
ModelParser;return ht((n,r)=>{if(n.$container.$type!=="DeploymentViewRulePredicateExpression")return;const i=wn(n,ra);if(!i||i.isInclude!==!0)return;const s=lt(n),o=e.forDocument(s),a="Model reference is allowed in exclude predicate only";if(vv(n)){Ma.isModelRef(o.parseFqnExpr(n.source.from))&&r("error",a,{node:n.source,property:"from"}),Ma.isModelRef(o.parseFqnExpr(n.target))&&r("error",a,{node:n,property:"target"});return}let u;if(Av(n)?u=n.to:Pv(n)?u=n.from:u=n.inout.to,Ma.isModelRef(o.parseFqnExpr(
|
|
2010
|
+
u))){r("error",a,{node:n});return}})},Z5=t=>{const e=t.likec4.ModelParser;return ht((n,r)=>{const i=n.ref.value.ref;if(Tt(i)){r("error","Invalid empty reference",{node:n});return}const s=lt(n),o=e.forDocument(s).parseFqnRefExpr(n);if(n.$container.$type==="DeploymentViewRulePredicateExpression"){if(Ma.isModelRef(o)){r("error","Deployment view predicate must reference deployment model",{node:n});return}if(Ma.isDeploymentRef(o)&&Fa.isInsideInstanceRef(o.ref)){r("error","Must reference deployment no\
|
|
2011
|
+
des or instances, but not internals",{node:n});return}}!jn(i)&&fn(n.selector)&&r("warning",`Selector '${n.selector}' applies to deployment nodes only, ignored here`,{node:n,property:"selector"})})},e9=t=>ht((e,n)=>{if(lo(e.to)&&!Sv(e.$container)){const r=wn(e,ch);Tt(r?.viewOf)&&n("warning","Predicate is ignored as it concerns all relationships",{node:e})}}),t9=t=>ht((e,n)=>{if(lo(e.from)&&!wv(e.$container)){const r=wn(e,ch);Tt(r?.viewOf)&&n("warning","Predicate is ignored as it concerns all rela\
|
|
2012
|
+
tionships",{node:e})}}),n9=t=>ht((e,n)=>{const r=wn(e,qp);yl(r)&&n("error",'Invalid usage inside "exclude"',{node:e})});function r9(t){return e=>t.some(n=>n(e))}const i9=r9([Cv,$l,El,la,co,PC,ah,Ov,av,pv,bv,$v,J8,ra,nU,$C,Tv,cU,mv,iU,Bv,lU,Ap,dv,gv,Bn,jn,Qi,DC,Yi,Ti,tU,RC,$h,pn,oa,ao,va,ba,ga,Ph,_h,Mv]),s9=t=>{let e=t;for(;e&&!_U(e);){if(i9(e))return e;e=e.$container}};function o9(t){const e=t.state>=qe.Validated?t.diagnostics?.filter(r=>r.severity===Ns.Error)??[]:[],n=new WeakSet;for(const{node:r}of e){
|
|
2013
|
+
if(Tt(r)||n.has(r))continue;n.add(r);const i=s9(r);i&&n.add(i)}return{isValid:r=>!n.has(r),invalidNodes:n}}function a9(t){ot.debug("registerValidationChecks"),t.validation.ValidationRegistry.register({DeployedInstance:S5(t),DeploymentNodeKind:z5(t),DeploymentNode:A5(t),DeploymentRelation:_5(t),ExtendDeployment:P5(),FqnRefExpr:Z5(t),RelationExpr:Q5(t),NotesProperty:M5(),OpacityProperty:L5(),IconProperty:F5(),SpecificationRule:q5(),Model:G5(),Globals:U5(),GlobalPredicateGroup:MS(t),GlobalDynamicPredicateGroup:MS(
|
|
2014
|
+
t),GlobalStyleId:K5(t),DynamicViewStep:N5(t),LikeC4View:X5(t),Element:O5(t),ElementKind:W5(t),Relation:B5(t),RelationBody:j5(),Tag:H5(t),DynamicViewPredicateIterator:x5(),ElementPredicateWith:Y5(),RelationPredicateWith:n9(),ExpandElementExpression:J5(),RelationshipKind:V5(t),IncomingRelationExpression:e9(),OutgoingRelationExpression:t9()});const e=t.shared.lsp.Connection;e&&t.shared.workspace.DocumentBuilder.onUpdate((n,r)=>{for(const i of r)ot.debug(`clear diagnostics for deleted ${i.path}`),e.
|
|
2015
|
+
sendDiagnostics({uri:i.toString(),diagnostics:[]})})}function Hr(t){return fn(t)?mt(t).split(`
|
|
2016
|
+
`).join(" "):void 0}function mt(t){return fn(t)?FS(t).trim():void 0}class u9{constructor(e,n){this.services=e,this.doc=n,this.isValid=o9(n).isValid}isValid;resolveFqn(e){return oa(e)?Eo(e.element):ao(e)?Eo(e.deploymentNode):sv(e)?this.services.likec4.DeploymentsIndex.getFqn(e):this.services.likec4.FqnIndex.getFqn(e)}getAstNodePath(e){return this.services.workspace.AstNodeLocator.getAstNodePath(e)}getMetadata(e){if(!e||!this.isValid(e)||qt(e.props))return;const n=Xe(e.props,xt(r=>[r.key,mt(r.value)]),
|
|
2017
|
+
He(([r,i])=>ce(i)),F3());return qt(n)?void 0:n}convertTags(e){return this.parseTags(e)}parseTags(e){let n=e?.tags;if(!n)return null;let r=[];for(;n;){try{if(this.isValid(n)){const i=n.values.map(s=>s.ref?.name).filter(ce);i.length>0&&r.push(...i)}}catch{}n=n.prev}return r=Yo(r.reverse()),Gn(r)?r:null}convertLinks(e){return this.parseLinks(e)}parseLinks(e){if(!(!e?.props||e.props.length===0))return Xe(e.props,He(bh),li(n=>{if(!this.isValid(n))return[];const r=n.value;if(ce(r)){const i=ce(n.title)?
|
|
2018
|
+
Hr(n.title):void 0,s=this.services.lsp.DocumentLinkProvider.relativeLink(this.doc,r);return{url:r,...i&&{title:i},...s&&s!==r&&{relative:s}}}return[]}))}}function*c9(t){const e=gb.from(t.parseResult.value.deployments.flatMap(i=>i.elements)),n=[];let r;for(;r=e.shift();){if(Qi(r)){n.push(r);continue}if(Bn(r)){yield r;continue}if(r.body&&r.body.elements.length>0)for(const i of r.body.elements)e.push(i);yield r}yield*n}function l9(t){return class extends t{parseDeployment(){const e=this.doc;for(const n of c9(
|
|
2019
|
+
e))try{switch(!0){case Qi(n):{this.isValid(n)&&e.c4DeploymentRelations.push(this.parseDeploymentRelation(n));break}case Bn(n):e.c4Deployments.push(this.parseDeployedInstance(n));break;case jn(n):{e.c4Deployments.push(this.parseDeploymentNode(n));break}case ao(n):{const r=this.parseExtendDeployment(n);r&&e.c4ExtendDeployments.push(r);break}default:je(n)}}catch(r){Re(r)}}parseDeploymentNode(e){const n=this.isValid,r=this.resolveFqn(e),i=Wt(e.kind.ref,"DeploymentKind not resolved").name,s=this.convertTags(
|
|
2020
|
+
e.body),o=e.body?.props.find(Zi)?.props,a=as(o,n),u=this.getMetadata(e.body?.props.find(Yi)),c=Xe(e.body?.props??[],He(n),He(pl),Gr(v=>[v.key,v.value||void 0])),l=mt(e.title??c.title),f=mt(c.description),d=Hr(c.technology),p=this.convertLinks(e.body),h=e.body?.props.find(Wr);if(h&&n(h)){const v=h.libicon?.ref?.name??h.value;ce(v)&&(a.icon=v)}return{id:r,kind:i,title:l??um(r),...u&&{metadata:u},...s&&{tags:s},...p&&Gn(p)&&{links:p},...ce(d)&&{technology:d},...ce(f)&&{description:f},style:a}}parseDeployedInstance(e){
|
|
2021
|
+
const n=this.isValid,r=this.resolveFqn(e),i=this.resolveFqn(Wt(An(e.element),"DeployedInstance element not found")),s=this.convertTags(e.body),o=e.body?.props.find(Zi)?.props,a=as(o,n),u=this.getMetadata(e.body?.props.find(Yi)),c=Xe(e.body?.props??[],He(n),He(pl),Gr(v=>[v.key,v.value||void 0])),l=mt(e.title??c.title),f=mt(c.description),d=Hr(c.technology),p=this.convertLinks(e.body),h=e.body?.props.find(Wr);if(h&&n(h)){const v=h.libicon?.ref?.name??h.value;ce(v)&&(a.icon=v)}return{id:r,element:i,
|
|
2022
|
+
...u&&{metadata:u},...l&&{title:l},...s&&{tags:s},...p&&Gn(p)&&{links:p},...ce(d)&&{technology:d},...ce(f)&&{description:f},style:a}}parseExtendDeployment(e){if(!this.isValid(e))return null;const n=this.resolveFqn(e),r=this.parseTags(e.body),i=this.getMetadata(e.body?.props.find(Yi)),s=this.getAstNodePath(e),o=this.parseLinks(e.body)??[];return!r&&qt(i??{})&&qt(o)?null:{id:n,astPath:s,...i&&{metadata:i},...r&&{tags:r},...o&&Gn(o)&&{links:o}}}parseDeploymentRelation(e){const n=this.isValid,r=this.
|
|
2023
|
+
getAstNodePath(e),i=Fa.toDeploymentRef(this.parseFqnRef(e.source)),s=Fa.toDeploymentRef(this.parseFqnRef(e.target)),o=this.convertTags(e)??this.convertTags(e.body),a=this.convertLinks(e.body),u=e.kind?.ref?.name,c=this.getMetadata(e.body?.props.find(Yi)),l=Gr(e.body?.props.filter(Xl)??[],b=>[b.key,b.value]),f=Xe(e.body?.props??[],He(Wl),xt(b=>b.value.view.ref?.name),He(ce),Zo()),d=mt(e.title??l.title),p=mt(l.description),h=Hr(e.technology)??mt(l.technology),v=e.body?.props.find(Ch);return{id:Id(
|
|
2024
|
+
"deployment",r,i.id,s.id),source:i,target:s,...d&&{title:d},...c&&{metadata:c},...ce(h)&&{technology:h},...ce(p)&&{description:p},...u&&{kind:u},...o&&{tags:o},...Gn(a)&&{links:a},...Tw(v?.props,n),...f&&{navigateTo:f},astPath:r}}}}function d9(t){const e=t.length;let n=0,r=0;for(;r<e;){let i=t.charCodeAt(r++);if((i&4294967168)===0){n++;continue}else if((i&4294965248)===0)n+=2;else{if(i>=55296&&i<=56319&&r<e){const s=t.charCodeAt(r);(s&64512)===56320&&(++r,i=((i&1023)<<10)+(s&1023)+65536)}(i&4294901760)===
|
|
2025
|
+
0?n+=3:n+=4}}return n}function f9(t,e,n){const r=t.length;let i=n,s=0;for(;s<r;){let o=t.charCodeAt(s++);if((o&4294967168)===0){e[i++]=o;continue}else if((o&4294965248)===0)e[i++]=o>>6&31|192;else{if(o>=55296&&o<=56319&&s<r){const a=t.charCodeAt(s);(a&64512)===56320&&(++s,o=((o&1023)<<10)+(a&1023)+65536)}(o&4294901760)===0?(e[i++]=o>>12&15|224,e[i++]=o>>6&63|128):(e[i++]=o>>18&7|240,e[i++]=o>>12&63|128,e[i++]=o>>6&63|128)}e[i++]=o&63|128}}const p9=new TextEncoder,h9=50;function m9(t,e,n){p9.encodeInto(
|
|
2026
|
+
t,e.subarray(n))}function g9(t,e,n){t.length>h9?m9(t,e,n):f9(t,e,n)}const y9=4096;function BS(t,e,n){let r=e;const i=r+n,s=[];let o="";for(;r<i;){const a=t[r++];if((a&128)===0)s.push(a);else if((a&224)===192){const u=t[r++]&63;s.push((a&31)<<6|u)}else if((a&240)===224){const u=t[r++]&63,c=t[r++]&63;s.push((a&31)<<12|u<<6|c)}else if((a&248)===240){const u=t[r++]&63,c=t[r++]&63,l=t[r++]&63;let f=(a&7)<<18|u<<12|c<<6|l;f>65535&&(f-=65536,s.push(f>>>10&1023|55296),f=56320|f&1023),s.push(f)}else s.push(
|
|
2027
|
+
a);s.length>=y9&&(o+=String.fromCharCode(...s),s.length=0)}return s.length>0&&(o+=String.fromCharCode(...s)),o}const v9=new TextDecoder,w9=200;function b9(t,e,n){const r=t.subarray(e,e+n);return v9.decode(r)}function E9(t,e,n){return n>w9?b9(t,e,n):BS(t,e,n)}class om{constructor(e,n){this.type=e,this.data=n}}class Jn extends Error{constructor(e){super(e);const n=Object.create(Jn.prototype);Object.setPrototypeOf(this,n),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:Jn.name})}}
|
|
2028
|
+
const Od=4294967295;function $9(t,e,n){const r=n/4294967296,i=n;t.setUint32(e,r),t.setUint32(e+4,i)}function jS(t,e,n){const r=Math.floor(n/4294967296),i=n;t.setUint32(e,r),t.setUint32(e+4,i)}function qS(t,e){const n=t.getInt32(e),r=t.getUint32(e+4);return n*4294967296+r}function D9(t,e){const n=t.getUint32(e),r=t.getUint32(e+4);return n*4294967296+r}const R9=-1,k9=4294967296-1,T9=17179869184-1;function C9({sec:t,nsec:e}){if(t>=0&&e>=0&&t<=T9)if(e===0&&t<=k9){const n=new Uint8Array(4);return new DataView(
|
|
2029
|
+
n.buffer).setUint32(0,t),n}else{const n=t/4294967296,r=t&4294967295,i=new Uint8Array(8),s=new DataView(i.buffer);return s.setUint32(0,e<<2|n&3),s.setUint32(4,r),i}else{const n=new Uint8Array(12),r=new DataView(n.buffer);return r.setUint32(0,e),jS(r,4,t),n}}function A9(t){const e=t.getTime(),n=Math.floor(e/1e3),r=(e-n*1e3)*1e6,i=Math.floor(r/1e9);return{sec:n+i,nsec:r-i*1e9}}function S9(t){if(t instanceof Date){const e=A9(t);return C9(e)}else return null}function _9(t){const e=new DataView(t.buffer,
|
|
2030
|
+
t.byteOffset,t.byteLength);switch(t.byteLength){case 4:return{sec:e.getUint32(0),nsec:0};case 8:{const n=e.getUint32(0),r=e.getUint32(4),i=(n&3)*4294967296+r,s=n>>>2;return{sec:i,nsec:s}}case 12:{const n=qS(e,4),r=e.getUint32(0);return{sec:n,nsec:r}}default:throw new Jn(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${t.length}`)}}function P9(t){const e=_9(t);return new Date(e.sec*1e3+e.nsec/1e6)}const x9={type:R9,encode:S9,decode:P9};class am{constructor(){this.builtInEncoders=[],
|
|
2031
|
+
this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(x9)}register({type:e,encode:n,decode:r}){if(e>=0)this.encoders[e]=n,this.decoders[e]=r;else{const i=-1-e;this.builtInEncoders[i]=n,this.builtInDecoders[i]=r}}tryToEncode(e,n){for(let r=0;r<this.builtInEncoders.length;r++){const i=this.builtInEncoders[r];if(i!=null){const s=i(e,n);if(s!=null){const o=-1-r;return new om(o,s)}}}for(let r=0;r<this.encoders.length;r++){const i=this.encoders[r];if(i!=null){const s=i(e,n);if(s!=null){
|
|
2032
|
+
const o=r;return new om(o,s)}}}return e instanceof om?e:null}decode(e,n,r){const i=n<0?this.builtInDecoders[-1-n]:this.decoders[n];return i?i(e,n,r):new om(n,e)}}am.defaultCodec=new am;function N9(t){return t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer}function Nw(t){return t instanceof Uint8Array?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):N9(t)?new Uint8Array(t):Uint8Array.from(t)}const I9=100,O9=2048;class ab{constructor(e){
|
|
2033
|
+
this.entered=!1,this.extensionCodec=e?.extensionCodec??am.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.maxDepth=e?.maxDepth??I9,this.initialBufferSize=e?.initialBufferSize??O9,this.sortKeys=e?.sortKeys??!1,this.forceFloat32=e?.forceFloat32??!1,this.ignoreUndefined=e?.ignoreUndefined??!1,this.forceIntegerToFloat=e?.forceIntegerToFloat??!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}clone(){
|
|
2034
|
+
return new ab({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,maxDepth:this.maxDepth,initialBufferSize:this.initialBufferSize,sortKeys:this.sortKeys,forceFloat32:this.forceFloat32,ignoreUndefined:this.ignoreUndefined,forceIntegerToFloat:this.forceIntegerToFloat})}reinitializeState(){this.pos=0}encodeSharedRef(e){if(this.entered)return this.clone().encodeSharedRef(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.subarray(0,
|
|
2035
|
+
this.pos)}finally{this.entered=!1}}encode(e){if(this.entered)return this.clone().encode(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(e,n){if(n>this.maxDepth)throw new Error(`Too deep objects in depth ${n}`);e==null?this.encodeNil():typeof e=="boolean"?this.encodeBoolean(e):typeof e=="number"?this.forceIntegerToFloat?this.encodeNumberAsFloat(e):this.encodeNumber(e):typeof e=="string"?this.encodeString(e):this.
|
|
2036
|
+
useBigInt64&&typeof e=="bigint"?this.encodeBigInt64(e):this.encodeObject(e,n)}ensureBufferSizeToWrite(e){const n=this.pos+e;this.view.byteLength<n&&this.resizeBuffer(n*2)}resizeBuffer(e){const n=new ArrayBuffer(e),r=new Uint8Array(n),i=new DataView(n);r.set(this.bytes),this.view=i,this.bytes=r}encodeNil(){this.writeU8(192)}encodeBoolean(e){e===!1?this.writeU8(194):this.writeU8(195)}encodeNumber(e){!this.forceIntegerToFloat&&Number.isSafeInteger(e)?e>=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),
|
|
2037
|
+
this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(211),this.writeI64(e)):this.encodeNumberAsFloat(e)}encodeNumberAsFloat(e){
|
|
2038
|
+
this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))}encodeBigInt64(e){e>=BigInt(0)?(this.writeU8(207),this.writeBigUint64(e)):(this.writeU8(211),this.writeBigInt64(e))}writeStringHeader(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else if(e<4294967296)this.writeU8(219),this.writeU32(e);else throw new Error(`Too long string: ${e} bytes in UTF-8`)}encodeString(e){const r=d9(
|
|
2039
|
+
e);this.ensureBufferSizeToWrite(5+r),this.writeStringHeader(r),g9(e,this.bytes,this.pos),this.pos+=r}encodeObject(e,n){const r=this.extensionCodec.tryToEncode(e,this.context);if(r!=null)this.encodeExtension(r);else if(Array.isArray(e))this.encodeArray(e,n);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else if(typeof e=="object")this.encodeMap(e,n);else throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(e)}`)}encodeBinary(e){const n=e.byteLength;if(n<256)this.writeU8(196),
|
|
2040
|
+
this.writeU8(n);else if(n<65536)this.writeU8(197),this.writeU16(n);else if(n<4294967296)this.writeU8(198),this.writeU32(n);else throw new Error(`Too large binary: ${n}`);const r=Nw(e);this.writeU8a(r)}encodeArray(e,n){const r=e.length;if(r<16)this.writeU8(144+r);else if(r<65536)this.writeU8(220),this.writeU16(r);else if(r<4294967296)this.writeU8(221),this.writeU32(r);else throw new Error(`Too large array: ${r}`);for(const i of e)this.doEncode(i,n+1)}countWithoutUndefined(e,n){let r=0;for(const i of n)
|
|
2041
|
+
e[i]!==void 0&&r++;return r}encodeMap(e,n){const r=Object.keys(e);this.sortKeys&&r.sort();const i=this.ignoreUndefined?this.countWithoutUndefined(e,r):r.length;if(i<16)this.writeU8(128+i);else if(i<65536)this.writeU8(222),this.writeU16(i);else if(i<4294967296)this.writeU8(223),this.writeU32(i);else throw new Error(`Too large map object: ${i}`);for(const s of r){const o=e[s];this.ignoreUndefined&&o===void 0||(this.encodeString(s),this.doEncode(o,n+1))}}encodeExtension(e){if(typeof e.data=="functi\
|
|
2042
|
+
on"){const r=e.data(this.pos+6),i=r.length;if(i>=4294967296)throw new Error(`Too large extension object: ${i}`);this.writeU8(201),this.writeU32(i),this.writeI8(e.type),this.writeU8a(r);return}const n=e.data.length;if(n===1)this.writeU8(212);else if(n===2)this.writeU8(213);else if(n===4)this.writeU8(214);else if(n===8)this.writeU8(215);else if(n===16)this.writeU8(216);else if(n<256)this.writeU8(199),this.writeU8(n);else if(n<65536)this.writeU8(200),this.writeU16(n);else if(n<4294967296)this.writeU8(
|
|
2043
|
+
201),this.writeU32(n);else throw new Error(`Too large extension object: ${n}`);this.writeI8(e.type),this.writeU8a(e.data)}writeU8(e){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,e),this.pos++}writeU8a(e){const n=e.length;this.ensureBufferSizeToWrite(n),this.bytes.set(e,this.pos),this.pos+=n}writeI8(e){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,e),this.pos++}writeU16(e){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,e),this.pos+=2}writeI16(e){this.ensureBufferSizeToWrite(
|
|
2044
|
+
2),this.view.setInt16(this.pos,e),this.pos+=2}writeU32(e){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,e),this.pos+=4}writeI32(e){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,e),this.pos+=4}writeF32(e){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,e),this.pos+=4}writeF64(e){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,e),this.pos+=8}writeU64(e){this.ensureBufferSizeToWrite(8),$9(this.view,this.pos,e),this.pos+=8}writeI64(e){this.ensureBufferSizeToWrite(
|
|
2045
|
+
8),jS(this.view,this.pos,e),this.pos+=8}writeBigUint64(e){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,e),this.pos+=8}writeBigInt64(e){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,e),this.pos+=8}}function L9(t,e){return new ab(e).encodeSharedRef(t)}function Iw(t){return`${t<0?"-":""}0x${Math.abs(t).toString(16).padStart(2,"0")}`}const F9=16,M9=16;class B9{constructor(e=F9,n=M9){this.hit=0,this.miss=0,this.maxKeyLength=e,this.maxLengthPerKey=n,this.caches=[];for(let r=0;r<
|
|
2046
|
+
this.maxKeyLength;r++)this.caches.push([])}canBeCached(e){return e>0&&e<=this.maxKeyLength}find(e,n,r){const i=this.caches[r-1];e:for(const s of i){const o=s.bytes;for(let a=0;a<r;a++)if(o[a]!==e[n+a])continue e;return s.str}return null}store(e,n){const r=this.caches[e.length-1],i={bytes:e,str:n};r.length>=this.maxLengthPerKey?r[Math.random()*r.length|0]=i:r.push(i)}decode(e,n,r){const i=this.find(e,n,r);if(i!=null)return this.hit++,i;this.miss++;const s=BS(e,n,r),o=Uint8Array.prototype.slice.call(
|
|
2047
|
+
e,n,n+r);return this.store(o,s),s}}const Ow="array",Ld="map_key",GS="map_value",j9=t=>{if(typeof t=="string"||typeof t=="number")return t;throw new Jn("The type of key must be string or number but "+typeof t)};class q9{constructor(){this.stack=[],this.stackHeadPosition=-1}get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(e){const n=this.getUninitializedStateFromPool();n.type=Ow,n.position=0,n.size=e,n.array=new Array(e)}pushMapState(e){const n=this.
|
|
2048
|
+
getUninitializedStateFromPool();n.type=Ld,n.readCount=0,n.size=e,n.map={}}getUninitializedStateFromPool(){if(this.stackHeadPosition++,this.stackHeadPosition===this.stack.length){const e={type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null};this.stack.push(e)}return this.stack[this.stackHeadPosition]}release(e){if(this.stack[this.stackHeadPosition]!==e)throw new Error("Invalid stack state. Released state is not on top of the stack.");if(e.type===Ow){const r=e;r.size=0,r.array=
|
|
2049
|
+
void 0,r.position=0,r.type=void 0}if(e.type===Ld||e.type===GS){const r=e;r.size=0,r.map=void 0,r.readCount=0,r.type=void 0}this.stackHeadPosition--}reset(){this.stack.length=0,this.stackHeadPosition=-1}}const Fd=-1,Lw=new DataView(new ArrayBuffer(0)),G9=new Uint8Array(Lw.buffer);try{Lw.getInt8(0)}catch(t){if(!(t instanceof RangeError))throw new Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access")}const US=new RangeError(
|
|
2050
|
+
"Insufficient data"),U9=new B9;class ub{constructor(e){this.totalPos=0,this.pos=0,this.view=Lw,this.bytes=G9,this.headByte=Fd,this.stack=new q9,this.entered=!1,this.extensionCodec=e?.extensionCodec??am.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.rawStrings=e?.rawStrings??!1,this.maxStrLength=e?.maxStrLength??Od,this.maxBinLength=e?.maxBinLength??Od,this.maxArrayLength=e?.maxArrayLength??Od,this.maxMapLength=e?.maxMapLength??Od,this.maxExtLength=e?.maxExtLength??
|
|
2051
|
+
Od,this.keyDecoder=e?.keyDecoder!==void 0?e.keyDecoder:U9,this.mapKeyConverter=e?.mapKeyConverter??j9}clone(){return new ub({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,rawStrings:this.rawStrings,maxStrLength:this.maxStrLength,maxBinLength:this.maxBinLength,maxArrayLength:this.maxArrayLength,maxMapLength:this.maxMapLength,maxExtLength:this.maxExtLength,keyDecoder:this.keyDecoder})}reinitializeState(){this.totalPos=0,this.headByte=Fd,this.stack.reset()}setBuffer(e){
|
|
2052
|
+
const n=Nw(e);this.bytes=n,this.view=new DataView(n.buffer,n.byteOffset,n.byteLength),this.pos=0}appendBuffer(e){if(this.headByte===Fd&&!this.hasRemaining(1))this.setBuffer(e);else{const n=this.bytes.subarray(this.pos),r=Nw(e),i=new Uint8Array(n.length+r.length);i.set(n),i.set(r,n.length),this.setBuffer(i)}}hasRemaining(e){return this.view.byteLength-this.pos>=e}createExtraByteError(e){const{view:n,pos:r}=this;return new RangeError(`Extra ${n.byteLength-r} of ${n.byteLength} byte(s) found at buf\
|
|
2053
|
+
fer[${e}]`)}decode(e){if(this.entered)return this.clone().decode(e);try{this.entered=!0,this.reinitializeState(),this.setBuffer(e);const n=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return n}finally{this.entered=!1}}*decodeMulti(e){if(this.entered){yield*this.clone().decodeMulti(e);return}try{for(this.entered=!0,this.reinitializeState(),this.setBuffer(e);this.hasRemaining(1);)yield this.doDecodeSync()}finally{this.entered=!1}}async decodeAsync(e){if(this.
|
|
2054
|
+
entered)return this.clone().decodeAsync(e);try{this.entered=!0;let n=!1,r;for await(const a of e){if(n)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(a);try{r=this.doDecodeSync(),n=!0}catch(u){if(!(u instanceof RangeError))throw u}this.totalPos+=this.pos}if(n){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return r}const{headByte:i,pos:s,totalPos:o}=this;throw new RangeError(`Insufficient data in parsing ${Iw(i)} at ${o} (${s} in the curr\
|
|
2055
|
+
ent buffer)`)}finally{this.entered=!1}}decodeArrayStream(e){return this.decodeMultiAsync(e,!0)}decodeStream(e){return this.decodeMultiAsync(e,!1)}async*decodeMultiAsync(e,n){if(this.entered){yield*this.clone().decodeMultiAsync(e,n);return}try{this.entered=!0;let r=n,i=-1;for await(const s of e){if(n&&i===0)throw this.createExtraByteError(this.totalPos);this.appendBuffer(s),r&&(i=this.readArraySize(),r=!1,this.complete());try{for(;yield this.doDecodeSync(),--i!==0;);}catch(o){if(!(o instanceof RangeError))
|
|
2056
|
+
throw o}this.totalPos+=this.pos}}finally{this.entered=!1}}doDecodeSync(){e:for(;;){const e=this.readHeadByte();let n;if(e>=224)n=e-256;else if(e<192)if(e<128)n=e;else if(e<144){const i=e-128;if(i!==0){this.pushMapState(i),this.complete();continue e}else n={}}else if(e<160){const i=e-144;if(i!==0){this.pushArrayState(i),this.complete();continue e}else n=[]}else{const i=e-160;n=this.decodeString(i,0)}else if(e===192)n=null;else if(e===194)n=!1;else if(e===195)n=!0;else if(e===202)n=this.readF32();else if(e===
|
|
2057
|
+
203)n=this.readF64();else if(e===204)n=this.readU8();else if(e===205)n=this.readU16();else if(e===206)n=this.readU32();else if(e===207)this.useBigInt64?n=this.readU64AsBigInt():n=this.readU64();else if(e===208)n=this.readI8();else if(e===209)n=this.readI16();else if(e===210)n=this.readI32();else if(e===211)this.useBigInt64?n=this.readI64AsBigInt():n=this.readI64();else if(e===217){const i=this.lookU8();n=this.decodeString(i,1)}else if(e===218){const i=this.lookU16();n=this.decodeString(i,2)}else if(e===
|
|
2058
|
+
219){const i=this.lookU32();n=this.decodeString(i,4)}else if(e===220){const i=this.readU16();if(i!==0){this.pushArrayState(i),this.complete();continue e}else n=[]}else if(e===221){const i=this.readU32();if(i!==0){this.pushArrayState(i),this.complete();continue e}else n=[]}else if(e===222){const i=this.readU16();if(i!==0){this.pushMapState(i),this.complete();continue e}else n={}}else if(e===223){const i=this.readU32();if(i!==0){this.pushMapState(i),this.complete();continue e}else n={}}else if(e===
|
|
2059
|
+
196){const i=this.lookU8();n=this.decodeBinary(i,1)}else if(e===197){const i=this.lookU16();n=this.decodeBinary(i,2)}else if(e===198){const i=this.lookU32();n=this.decodeBinary(i,4)}else if(e===212)n=this.decodeExtension(1,0);else if(e===213)n=this.decodeExtension(2,0);else if(e===214)n=this.decodeExtension(4,0);else if(e===215)n=this.decodeExtension(8,0);else if(e===216)n=this.decodeExtension(16,0);else if(e===199){const i=this.lookU8();n=this.decodeExtension(i,1)}else if(e===200){const i=this.
|
|
2060
|
+
lookU16();n=this.decodeExtension(i,2)}else if(e===201){const i=this.lookU32();n=this.decodeExtension(i,4)}else throw new Jn(`Unrecognized type byte: ${Iw(e)}`);this.complete();const r=this.stack;for(;r.length>0;){const i=r.top();if(i.type===Ow)if(i.array[i.position]=n,i.position++,i.position===i.size)n=i.array,r.release(i);else continue e;else if(i.type===Ld){if(n==="__proto__")throw new Jn("The key __proto__ is not allowed");i.key=this.mapKeyConverter(n),i.type=GS;continue e}else if(i.map[i.key]=
|
|
2061
|
+
n,i.readCount++,i.readCount===i.size)n=i.map,r.release(i);else{i.key=null,i.type=Ld;continue e}}return n}}readHeadByte(){return this.headByte===Fd&&(this.headByte=this.readU8()),this.headByte}complete(){this.headByte=Fd}readArraySize(){const e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:{if(e<160)return e-144;throw new Jn(`Unrecognized array type byte: ${Iw(e)}`)}}}pushMapState(e){if(e>this.maxMapLength)throw new Jn(`Max length exceeded: ma\
|
|
2062
|
+
p length (${e}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(e)}pushArrayState(e){if(e>this.maxArrayLength)throw new Jn(`Max length exceeded: array length (${e}) > maxArrayLength (${this.maxArrayLength})`);this.stack.pushArrayState(e)}decodeString(e,n){return!this.rawStrings||this.stateIsMapKey()?this.decodeUtf8String(e,n):this.decodeBinary(e,n)}decodeUtf8String(e,n){if(e>this.maxStrLength)throw new Jn(`Max length exceeded: UTF-8 byte length (${e}) > maxStrLength (${this.
|
|
2063
|
+
maxStrLength})`);if(this.bytes.byteLength<this.pos+n+e)throw US;const r=this.pos+n;let i;return this.stateIsMapKey()&&this.keyDecoder?.canBeCached(e)?i=this.keyDecoder.decode(this.bytes,r,e):i=E9(this.bytes,r,e),this.pos+=n+e,i}stateIsMapKey(){return this.stack.length>0?this.stack.top().type===Ld:!1}decodeBinary(e,n){if(e>this.maxBinLength)throw new Jn(`Max length exceeded: bin length (${e}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(e+n))throw US;const r=this.pos+n,i=this.bytes.
|
|
2064
|
+
subarray(r,r+e);return this.pos+=n+e,i}decodeExtension(e,n){if(e>this.maxExtLength)throw new Jn(`Max length exceeded: ext length (${e}) > maxExtLength (${this.maxExtLength})`);const r=this.view.getInt8(this.pos+n),i=this.decodeBinary(e,n+1);return this.extensionCodec.decode(i,r,this.context)}lookU8(){return this.view.getUint8(this.pos)}lookU16(){return this.view.getUint16(this.pos)}lookU32(){return this.view.getUint32(this.pos)}readU8(){const e=this.view.getUint8(this.pos);return this.pos++,e}readI8(){
|
|
2065
|
+
const e=this.view.getInt8(this.pos);return this.pos++,e}readU16(){const e=this.view.getUint16(this.pos);return this.pos+=2,e}readI16(){const e=this.view.getInt16(this.pos);return this.pos+=2,e}readU32(){const e=this.view.getUint32(this.pos);return this.pos+=4,e}readI32(){const e=this.view.getInt32(this.pos);return this.pos+=4,e}readU64(){const e=D9(this.view,this.pos);return this.pos+=8,e}readI64(){const e=qS(this.view,this.pos);return this.pos+=8,e}readU64AsBigInt(){const e=this.view.getBigUint64(
|
|
2066
|
+
this.pos);return this.pos+=8,e}readI64AsBigInt(){const e=this.view.getBigInt64(this.pos);return this.pos+=8,e}readF32(){const e=this.view.getFloat32(this.pos);return this.pos+=4,e}readF64(){const e=this.view.getFloat64(this.pos);return this.pos+=8,e}}function W9(t,e){return new ub(e).decode(t)}const z9=t=>typeof ArrayBuffer=="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]",H9=(t,e=0,n=t.byteLength-e)=>{if(!z9(t))throw new TypeError(`The "input" arg\
|
|
2067
|
+
ument must be ArrayBuffer. Received type ${typeof t} (${t})`);return lm.from(t,e,n)},WS=(t,e)=>{if(typeof t!="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof t} (${t})`);return e?lm.from(t,e):lm.from(t)},V9=/^[A-Za-z0-9+/]*={0,2}$/,K9=t=>{if(t.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!V9.exec(t))throw new TypeError("Invalid base64 string.");const e=WS(t,"base64");return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)},
|
|
2068
|
+
X9=t=>{const e=WS(t,"utf8");return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT)},Y9=t=>{let e;if(typeof t=="string"?e=X9(t):e=t,typeof e!="object"||typeof e.byteOffset!="number"||typeof e.byteLength!="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return H9(e.buffer,e.byteOffset,e.byteLength).toString("base64")},{getDocument:J9}=Eu;function Q9({nodes:t,edges:e,...n}){return{...n,nodes:Jo(t,({x:r,y:i,width:s,
|
|
2069
|
+
height:o,isCompound:a,...u})=>({...u,b:[r,i,s,o],c:a})),edges:Jo(e,({points:r,controlPoints:i,labelBBox:s,dotpos:o,...a})=>({...!!i&&{cp:i},...!!s&&{l:s},...!!o&&{dp:o},...a,p:r}))}}function Z9({nodes:t,edges:e,autoLayout:n,...r}){return{...r,autoLayout:U_(n)?{direction:n}:n,nodes:Jo(t,({b:i,c:s,...o})=>({x:i[0],y:i[1],width:i[2],height:i[3],isCompound:s,...o})),edges:Jo(e,({p:i,cp:s,l:o,dp:a,...u})=>({...!!s&&{controlPoints:s},...!!o&&{labelBBox:o},...!!a&&{dotpos:a},...u,points:i}))}}const zS=500;
|
|
2070
|
+
function eV(t){const e=L9(Q9(t)),n=Y9(e),r=[];let i=0;for(;i<n.length;)r.push(" * "+n.slice(i,Math.min(i+zS,n.length))),i+=zS;return r.unshift("/**"," * @likec4-generated(v1)"),r.push(" */"),r.join(`
|
|
2071
|
+
`)}function HS(t){return t.includes("@likec4-generated")}function tV(t){if(!HS(t))throw new Error(`Not a likec4-generated comment: ${t}`);const e=t.trim().split(`
|
|
2072
|
+
`).filter(r=>!r.includes("**")&&!r.includes("@likec4-")&&!r.includes("*/")).map(r=>r.replaceAll("*","").trim()).join(""),n=K9(e);return Z9(W9(n))}function Fw(t){const e=Im(t.$cstNode,["BLOCK_COMMENT"]);if(!(!e||!HS(e.text)))try{return tV(e.text)}catch(n){const r=J9(t);Re(n),ot.warn(`Ignoring manual layout of "${t.name??"unnamed"}" at ${r.uri.fsPath}:${1+(e.range.start.line||0)}`);return}}function nV(t){return class extends t{parseDeploymentView(e){const n=e.body;Ie(n,"DynamicElementView body is \
|
|
2073
|
+
not defined");const r=n.props.filter(this.isValid),i=this.getAstNodePath(e);let s=e.name;s||(s="deployment_"+Id(this.doc.uri.toString(),i));const o=Hr(r.find(f=>f.key==="title")?.value)??null,a=mt(r.find(f=>f.key==="description")?.value)??null,u=this.convertTags(n),c=this.convertLinks(n);tm.writeId(e,s);const l=Fw(e);return{__:"deployment",id:s,astPath:i,title:o,description:a,tags:u,links:Gn(c)?c:null,rules:n.rules.flatMap(f=>{try{return this.isValid(f)?this.parseDeploymentViewRule(f):[]}catch(d){
|
|
2074
|
+
return Re(d),[]}}),...l&&{manualLayout:l}}}parseDeploymentViewRule(e){if(ra(e))return this.parseDeploymentViewRulePredicate(e);if(rd(e))return Cw(e);if(AC(e))return this.parseDeploymentViewRuleStyle(e);je(e)}parseDeploymentViewRulePredicate(e){const n=[];let r=e.expr;for(;r;){try{const i=r.value;if(fn(i)&&this.isValid(i))switch(!0){case rU(i):n.unshift(this.parseFqnExpr(i));break;case TU(i):n.unshift(this.parseElementWhereExpr(i));break;case $C(i):n.unshift(this.parseRelationExpr(i));break;case IU(
|
|
2075
|
+
i):n.unshift(this.parseRelationWhereExpr(i));break;default:je(i)}}catch(i){Re(i)}r=r.prev}return e.isInclude?{include:n}:{exclude:n}}parseDeploymentViewRuleStyle(e){const n=e.props.filter(mv),r=e.props.find(ha),i=mt(r?.value);return{targets:this.parseFqnExpressions(e.targets),...i&&{notation:i},style:{...as(n,this.isValid)}}}}}const VS=({operator:t,not:e},n)=>t.startsWith("!=")?{neq:n}:t.startsWith("=")?{eq:n}:e?{neq:n}:{eq:n};function KS(t){return!JC(t)&&!QC(t)?null:t.participant}function Ro(t){
|
|
2076
|
+
switch(!0){case hU(t):{const e=t.value?.ref?.name,n=KS(t);Ie(e,"Expected tag name");const r={tag:VS(t,e)};return n?{participant:n,operator:r}:r}case fU(t):{const e=t.value?.ref?.name,n=KS(t);Ie(e,"Expected kind name");const r={kind:VS(t,e)};return n?{participant:n,operator:r}:r}case(KC(t)||YC(t)):return{not:Ro(t.value)};case FU(t):{const e=Ro(t.left),n=Ro(t.right),r=t.operator.toLowerCase();switch(r){case"and":{const i=[vb(e)?e.and:e,vb(n)?n.and:n].flat();return Ie(Gn(i),"Expected non-empty arra\
|
|
2077
|
+
y"),{and:i}}case"or":{const i=[yb(e)?e.or:e,yb(n)?n.or:n].flat();return Ie(Gn(i),"Expected non-empty array"),{or:i}}default:je(r)}}default:je(t)}}function rV(t){return class extends t{parseFqnRef(e){const n=Wt(e.value.ref,`FqnRef is empty ${e.$cstNode?.range.start.line}:${e.$cstNode?.range.start.character}`);if(pn(n)){const r=ZH(e);if(!r)return{model:this.resolveFqn(n)};const i=this.resolveFqn(r),s=this.resolveFqn(n);return{deployment:i,element:s}}if(sv(n))return{deployment:this.resolveFqn(n)};je(
|
|
2078
|
+
n)}parseFqnExpr(e){if(lo(e))return{wildcard:!0};if(Tv(e))return this.parseFqnRefExpr(e);je(e)}parseFqnRefExpr(e){const n=this.parseFqnRef(e.ref);switch(!0){case e.selector==="._":return{ref:n,selector:"expanded"};case e.selector===".**":return{ref:n,selector:"descendants"};case e.selector===".*":return{ref:n,selector:"children"};default:return{ref:n}}}parseElementWhereExpr(e){return{where:{expr:this.parseFqnExpr(e.subject),condition:e.where?Ro(e.where):{kind:{neq:"--always-true--"}}}}}parseFqnExpressions(e){
|
|
2079
|
+
const n=[];let r=e;for(;r;){try{fn(r.value)&&this.isValid(r.value)&&n.push(this.parseFqnExpr(r.value))}catch(i){Re(i)}r=r.prev}return n.reverse()}parseRelationWhereExpr(e){return{where:{expr:this.parseRelationExpr(e.subject),condition:e.where?Ro(e.where):{kind:{neq:"--always-true--"}}}}}parseRelationExpr(e){if(Iv(e),vv(e))return{source:this.parseFqnExpr(e.source.from),target:this.parseFqnExpr(e.target),isBidirectional:e.source.isBidirectional};if(MC(e))return{inout:this.parseFqnExpr(e.inout.to)};
|
|
2080
|
+
if(Pv(e))return{outgoing:this.parseFqnExpr(e.from)};if(Av(e))return{incoming:this.parseFqnExpr(e.to)};je(e)}}}function iV(t){return class extends t{parseGlobals(){const{parseResult:e,c4Globals:n}=this.doc,r=this.isValid,i=e.value.globals.filter(r),s=i.flatMap(a=>a.predicates.filter(r));for(const a of s)try{const u=a.name;if(!ce(u))continue;if(u in n.predicates){ot.warn(`Global predicate named "${u}" is already defined`);continue}this.parseAndStoreGlobalPredicateGroupOrDynamic(a,u,n)}catch(u){Re(
|
|
2081
|
+
u)}const o=i.flatMap(a=>a.styles.filter(r));for(const a of o)try{const u=a.id.name;if(!ce(u))continue;if(u in n.styles){ot.warn(`Global style named "${u}" is already defined`);continue}const c=this.parseGlobalStyleOrGroup(a);c.length>0&&(n.styles[u]=c)}catch(u){Re(u)}}parseAndStoreGlobalPredicateGroupOrDynamic(e,n,r){if($l(e)){const i=this.parseGlobalPredicateGroup(e);i.length>0&&(r.predicates[n]=i);return}if(El(e)){const i=this.parseGlobalDynamicPredicateGroup(e);i.length>0&&(r.dynamicPredicates[n]=
|
|
2082
|
+
i);return}je(e)}parseGlobalPredicateGroup(e){return e.predicates.map(n=>this.parseViewRulePredicate(n))}parseGlobalDynamicPredicateGroup(e){return e.predicates.map(n=>this.parseDynamicViewIncludePredicate(n))}parseGlobalStyleOrGroup(e){if(la(e))return[this.parseViewRuleStyle(e)];if(co(e))return e.styles.map(n=>this.parseViewRuleStyle(n));je(e)}}}const sV=ot.getChild("ModelParser");function oV(t){const e=An(t.target);if(!e)throw new Error("RelationRefError: Invalid reference to target");if(an(t.source)){
|
|
2083
|
+
const n=An(t.source);if(!n)throw new Error("RelationRefError: Invalid reference to source");return{source:n,target:e}}if(!il(t.$container))throw new Error("RelationRefError: Invalid container for sourceless relation");return{source:t.$container.$container,target:e}}function*aV(t){const e=gb.from(t.parseResult.value.models.flatMap(i=>i.elements)),n=[];let r;for(;r=e.shift();){if(Ti(r)){n.push(r);continue}if(r.body&&r.body.elements&&r.body.elements.length>0)for(const i of r.body.elements)e.push(i);
|
|
2084
|
+
yield r}yield*n}function uV(t){return class extends t{parseModel(){const e=this.doc;for(const n of aV(e))try{if(pn(n)){e.c4Elements.push(this.parseElement(n));continue}if(Ti(n)){this.isValid(n)&&e.c4Relations.push(this.parseRelation(n));continue}if(oa(n)){const r=this.parseExtendElement(n);r&&e.c4ExtendElements.push(r);continue}je(n)}catch(r){const i=this.getAstNodePath(n),s=hr(r),o=r instanceof Error?r.message:String(s);sV.warn(`Error on {eltype}: ${o}
|
|
2085
|
+
document: {path}
|
|
2086
|
+
astpath: {astPath}
|
|
2087
|
+
${s}`,{path:e.uri.path,eltype:n.$type,astPath:i})}}parseElement(e){const n=this.isValid,r=this.resolveFqn(e),i=Wt(e.kind.ref,"Element kind is not resolved").name,s=this.parseTags(e.body),o=e.body?.props.find(Zi)?.props,a=as(o,n),u=this.getMetadata(e.body?.props.find(Yi)),c=this.getAstNodePath(e);let[l,f,d]=e.props??[];const p=Xe(e.body?.props??[],He(n),He(pl),Gr(b=>[b.key,b.value||void 0]));l=mt(l??p.title),f=mt(p.description??f),d=Hr(p.technology??d);const h=this.parseLinks(e.body),v=e.body?.props.
|
|
2088
|
+
find(Wr);if(v&&n(v)){const b=v.libicon?.ref?.name??v.value;ce(b)&&(a.icon=b)}return{id:r,kind:i,astPath:c,title:l??e.name,...u&&{metadata:u},...s&&{tags:s},...h&&Gn(h)&&{links:h},...ce(d)&&{technology:d},...ce(f)&&{description:f},style:a}}parseExtendElement(e){this.isValid;const n=this.resolveFqn(e),r=this.parseTags(e.body),i=this.getMetadata(e.body?.props.find(Yi)),s=this.getAstNodePath(e),o=this.parseLinks(e.body)??[];return!r&&qt(i??{})&&qt(o)?null:{id:n,astPath:s,...i&&{metadata:i},...r&&{tags:r},
|
|
2089
|
+
...o&&Gn(o)&&{links:o}}}parseRelation(e){const n=this.isValid,r=oV(e),i=this.resolveFqn(r.target),s=this.resolveFqn(r.source),o=this.parseTags(e)??this.parseTags(e.body),a=this.parseLinks(e.body),u=e.kind?.ref?.name,c=this.getMetadata(e.body?.props.find(Yi)),l=this.getAstNodePath(e),f=Gr(e.body?.props.filter(Xl).filter(y=>fn(y.value))??[],y=>[y.key,y.value]),d=Xe(e.body?.props??[],He(Wl),xt(y=>y.value.view.ref?.name),He(ce),Zo()),p=mt(e.title??f.title)??"",h=mt(f.description),v=Hr(e.technology)??
|
|
2090
|
+
mt(f.technology),b=e.body?.props.find(Ch);return{id:Id(l,s,i),astPath:l,source:s,target:i,title:p,...c&&{metadata:c},...ce(v)&&{technology:v},...ce(h)&&{description:h},...u&&{kind:u},...o&&{tags:o},...Gn(a)&&{links:a},...Tw(b?.props,n),...d&&{navigateTo:d}}}}}function cV(t){return class extends t{parsePredicate(e){if(Q8(e))return this.parseElementPredicate(e);if(sU(e))return this.parseRelationPredicate(e);je(e)}parseElementPredicate(e){if(ah(e))return this.parseElementPredicateWith(e);if(Rv(e))return this.
|
|
2091
|
+
parseElementPredicateWhere(e);if(av(e))return this.parseElementExpression(e);je(e)}parseElementExpressionsIterator(e){const n=[];let r=e;for(;r;){try{r.value&&n.unshift(this.parseElementExpression(r.value))}catch(i){Re(i)}r=r.prev}return n}parseElementExpression(e){if(lo(e))return{wildcard:!0};if(oh(e))return Ie(e.kind?.ref,"ElementKindExpr kind is not resolved: "+e.$cstNode?.text),{elementKind:e.kind.ref.name,isEqual:e.isEqual};if(uh(e)){Ie(e.tag?.ref,"ElementTagExpr tag is not resolved: "+e.$cstNode?.
|
|
2092
|
+
text);let n=e.tag.$refText;return n.startsWith("#")&&(n=n.slice(1)),{elementTag:n,isEqual:e.isEqual}}if(IC(e)){const n=An(e.expand);return Ie(n,"Element not found "+e.expand.$cstNode?.text),{expanded:this.resolveFqn(n)}}if(Dv(e)){const n=An(e.parent);return Ie(n,"Element not found "+e.parent.$cstNode?.text),{element:this.resolveFqn(n),isChildren:e.suffix===".*",isDescendants:e.suffix===".**"}}if(dl(e)){const n=An(e);return Ie(n,"Element not found "+e.$cstNode?.text),{element:this.resolveFqn(n)}}
|
|
2093
|
+
je(e)}parseElementPredicateWhere(e){return{where:{expr:this.parseElementExpression(e.subject),condition:e.where?Ro(e.where):{kind:{neq:"--always-true--"}}}}}parseElementPredicateWith(e){const n=this.parseElementPredicate(e.subject);return(e.custom?.props??[]).reduce((r,i)=>{if(!this.isValid(i))return r;if($h(i)){const s=i.value.view.$refText;return ce(s)&&(r.custom.navigateTo=s),r}if(pl(i))return an(i.value)&&(r.custom[i.key]=mt(i.value)||""),r;if(Wr(i)){const s=i.libicon?.ref?.name??i.value;return an(
|
|
2094
|
+
s)&&(r.custom[i.key]=s),r}if(so(i)){const s=Nd(i);return an(s)&&(r.custom[i.key]=s),r}if(Ah(i)||zp(i))return an(i.value)&&(r.custom[i.key]=i.value),r;if(Dh(i))return an(i.value)&&(r.custom[i.key]=CS(i)),r;if(ha(i))return ce(i.value)&&(r.custom[i.key]=mt(i.value)),r;if(_v(i))return Fy(i.value)&&(r.custom[i.key]=i.value),r;if(Lv(i)||jv(i)||Nv(i))return ce(i.value)&&(r.custom[i.key]=Sa(i)),r;je(i)},{custom:{expr:n}})}parseRelationPredicate(e){if(Ov(e)){let n=Iv(e.subject)?this.parseRelationPredicateWhere(
|
|
2095
|
+
e.subject):this.parseRelationExpression(e.subject);return this.parseRelationPredicateWith(e,n)}if(Iv(e))return this.parseRelationPredicateWhere(e);if(pv(e))return this.parseRelationExpression(e);je(e)}parseRelationPredicateWhere(e){return{where:{expr:this.parseRelationExpression(e.subject),condition:e.where?Ro(e.where):{kind:{neq:"--always-true--"}}}}}parseRelationPredicateWith(e,n){return(e.custom?.props??[]).reduce((r,i)=>{if(Xl(i)||ha(i)||GC(i))return an(i.value)&&(r.customRelation[i.key]=mt(
|
|
2096
|
+
i.value)??""),r;if(Kc(i))return ce(i.value)&&(r.customRelation[i.key]=i.value),r;if(so(i)){const s=Nd(i);return ce(s)&&(r.customRelation[i.key]=s),r}if(Pl(i))return ce(i.value)&&(r.customRelation[i.key]=i.value),r;if(Wl(i)){const s=i.value.view.ref?.name;return ce(s)&&(r.customRelation.navigateTo=s),r}je(i)},{customRelation:{relation:n}})}parseRelationExpression(e){if(wv(e))return{source:this.parseElementExpression(e.source.from),target:this.parseElementExpression(e.target),isBidirectional:e.source.
|
|
2097
|
+
isBidirectional};if(Sv(e))return{inout:this.parseElementExpression(e.inout.to)};if(xv(e))return{outgoing:this.parseElementExpression(e.from)};if(FC(e))return{incoming:this.parseElementExpression(e.to)};je(e)}}}function lV(t){return class extends t{parseSpecification(){const{parseResult:{value:{specifications:e}},c4Specification:n}=this.doc,r=this.isValid,i=e.flatMap(c=>c.elements.filter(this.isValid));for(const{kind:c,props:l}of i)try{const f=c.name;if(!ce(f))continue;if(f in n.elements){ot.warn(
|
|
2098
|
+
`Element kind "${f}" is already defined`);continue}const d=l.find(Zi),p=Xe(l.filter(Fv)??[],He(h=>this.isValid(h)&&fn(h.value)),Gr(h=>[h.key,mt(h.value)]));n.elements[f]={...p,style:{...as(d?.props,this.isValid)}}}catch(f){Re(f)}const s=e.flatMap(c=>c.relationships.filter(this.isValid));for(const{kind:c,props:l}of s)try{const f=c.name;if(!ce(f))continue;if(f in n.relationships){ot.warn(`Relationship kind "${f}" is already defined`);continue}const d=Xe(l.filter(WC)??[],He(p=>this.isValid(p)&&fn(p.
|
|
2099
|
+
value)),Gr(p=>[p.key,mt(p.value)]));n.relationships[f]={...d,...Tw(l,this.isValid)}}catch(f){Re(f)}const o=e.flatMap(c=>c.tags.filter(this.isValid));for(const c of o){const l=c.tag.name;ce(l)&&n.tags.add(l)}const a=e.flatMap(c=>c.deploymentNodes.filter(r));for(const c of a)try{Object.assign(n.deployments,this.parseSpecificationDeploymentNodeKind(c))}catch(l){Re(l)}const u=e.flatMap(c=>c.colors.filter(r));for(const{name:c,color:l}of u)try{const f=c.name;if(f in n.colors){ot.warn(`Custom color "${f}\
|
|
2100
|
+
" is already defined`);continue}n.colors[f]={color:l}}catch(f){Re(f)}}parseSpecificationDeploymentNodeKind({kind:e,props:n}){const r=e.name;if(!ce(r))throw new Error("DeploymentNodeKind name is not resolved");const i=n.find(Zi),s=Xe(n.filter(Fv)??[],He(o=>this.isValid(o)&&fn(o.value)),Gr(o=>[o.key,mt(o.value)]));return{[r]:{...s,style:{...as(i?.props,this.isValid)}}}}}}function dV(t){return class extends t{parseViews(){const e=this.isValid;for(const n of this.doc.parseResult.value.views){const r=n.
|
|
2101
|
+
styles.flatMap(i=>{try{return e(i)?this.parseViewRuleStyleOrGlobalRef(i):[]}catch(s){return Re(s),[]}});for(const i of n.views)try{if(!e(i))continue;switch(!0){case ch(i):this.doc.c4Views.push(this.parseElementView(i,r));break;case SC(i):this.doc.c4Views.push(this.parseDynamicElementView(i,r));break;case yv(i):this.doc.c4Views.push(this.parseDeploymentView(i));break;default:je(i)}}catch(s){Re(s)}}}parseElementView(e,n){const r=e.body;Ie(r,"ElementView body is not defined");const i=this.getAstNodePath(
|
|
2102
|
+
e);let s=null;if("viewOf"in e){const p=An(e.viewOf),h=p&&this.resolveFqn(p);h?s=h:ot.warn("viewOf is not resolved: "+e.$cstNode?.text)}let o=e.name;o||(o="view_"+Id(this.doc.uri.toString(),i,s??""));const a=Hr(r.props.find(p=>p.key==="title")?.value)??null,u=mt(r.props.find(p=>p.key==="description")?.value)??null,c=this.convertTags(r),l=this.convertLinks(r),f=Fw(e),d={__:"element",id:o,astPath:i,title:a,description:u,tags:c,links:Gn(l)?l:null,rules:[...n,...r.rules.flatMap(p=>{try{return this.isValid(
|
|
2103
|
+
p)?this.parseViewRule(p):[]}catch(h){return Re(h),[]}})],...s&&{viewOf:s},...f&&{manualLayout:f}};if(tm.writeId(e,d.id),"extends"in e){const p=e.extends.view.ref;return Ie(p?.name,"view extends is not resolved: "+e.$cstNode?.text),Object.assign(d,{extends:p.name})}return d}parseViewRule(e){if(qp(e))return this.parseViewRulePredicate(e);if(Gv(e))return this.parseViewRuleGlobalPredicateRef(e);if(gv(e))return this.parseViewRuleStyleOrGlobalRef(e);if(rd(e))return Cw(e);if(Oh(e))return this.parseViewRuleGroup(
|
|
2104
|
+
e);je(e)}parseViewRulePredicate(e){const n=[];let r=e.predicates;for(;r;){const{value:i,prev:s}=r;try{ce(i)&&this.isValid(i)&&n.unshift(this.parsePredicate(i))}catch(o){Re(o)}if(!s)break;r=s}return yh(e)?{include:n}:{exclude:n}}parseViewRuleGlobalPredicateRef(e){return{predicateId:e.predicate.$refText}}parseViewRuleStyleOrGlobalRef(e){if(ud(e))return this.parseViewRuleStyle(e);if(Uv(e))return this.parseViewRuleGlobalStyle(e);je(e)}parseViewRuleGroup(e){const n=[];for(const r of e.groupRules)try{
|
|
2105
|
+
if(!this.isValid(r))continue;if(qp(r)){n.push(this.parseViewRulePredicate(r));continue}if(Oh(r)){n.push(this.parseViewRuleGroup(r));continue}je(r)}catch(i){Re(i)}return{title:Hr(e.title)??null,groupRules:n,...as(e.props,this.isValid)}}parseViewRuleStyle(e){const n=e.props.filter(mv),r=e.target,i=e.props.find(ha);return this.parseRuleStyle(n,r,i)}parseRuleStyle(e,n,r){const i=as(e,this.isValid),s=mt(r?.value);return{targets:this.parseElementExpressionsIterator(n),...s&&{notation:s},style:{...i}}}parseViewRuleGlobalStyle(e){
|
|
2106
|
+
return{styleId:e.style.$refText}}parseDynamicElementView(e,n){const r=e.body;Ie(r,"DynamicElementView body is not defined");const i=this.isValid,s=r.props.filter(i),o=this.getAstNodePath(e);let a=e.name;a||(a="dynamic_"+Id(this.doc.uri.toString(),o));const u=Hr(s.find(p=>p.key==="title")?.value)??null,c=mt(s.find(p=>p.key==="description")?.value)??null,l=this.convertTags(r),f=this.convertLinks(r);tm.writeId(e,a);const d=Fw(e);return{__:"dynamic",id:a,astPath:o,title:u,description:c,tags:l,links:Gn(
|
|
2107
|
+
f)?f:null,rules:[...n,...r.rules.flatMap(p=>{try{return i(p)?this.parseDynamicViewRule(p):[]}catch(h){return Re(h),[]}},[])],steps:r.steps.reduce((p,h)=>{try{i(h)&&(bv(h)?p.push(this.parseDynamicParallelSteps(h)):p.push(this.parseDynamicStep(h)))}catch(v){Re(v)}return p},[]),...d&&{manualLayout:d}}}parseDynamicViewRule(e){if(RU(e))return this.parseDynamicViewIncludePredicate(e);if(_C(e))return this.parseViewRuleGlobalPredicateRef(e);if(gv(e))return this.parseViewRuleStyleOrGlobalRef(e);if(rd(e))
|
|
2108
|
+
return Cw(e);je(e)}parseDynamicViewIncludePredicate(e){const n=[];let r=e.predicates;for(;r;){try{if(fn(r.value)&&this.isValid(r.value)){const i=this.parseElementPredicate(r.value);n.unshift(i)}}catch(i){Re(i)}r=r.prev}return{include:n}}parseDynamicParallelSteps(e){return{__parallel:e.steps.map(n=>this.parseDynamicStep(n))}}parseDynamicStep(e){const n=An(e.source);if(!n)throw new Error("Invalid reference to source");const r=An(e.target);if(!r)throw new Error("Invalid reference to target");let i=this.
|
|
2109
|
+
resolveFqn(n),s=this.resolveFqn(r);const o=mt(e.title)??null;let a={source:i,target:s,title:o};if(e.isBackward&&(a={source:s,target:i,title:o,isBackward:!0}),!R3(e.custom?.props))return a;for(const u of e.custom.props)try{switch(!0){case Wl(u):{const c=u.value.view.ref?.name;ce(c)&&(a.navigateTo=c);break}case Xl(u):case ha(u):case GC(u):{an(u.value)&&(a[u.key]=mt(u.value)??"");break}case Kc(u):{an(u.value)&&(a[u.key]=u.value);break}case so(u):{const c=Nd(u);an(c)&&(a[u.key]=c);break}case Pl(u):{
|
|
2110
|
+
an(u.value)&&(a[u.key]=u.value);break}default:je(u)}}catch(c){Re(c)}return a}}}const fV=Xe(u9,rV,uV,l9,nV,cV,lV,dV,iV);class pV extends fV{}const XS=ot.getChild("ModelParser");class hV{constructor(e){this.services=e,e.shared.workspace.DocumentBuilder.onDocumentPhase(qe.Linked,n=>{try{bd(n.uri)||this.cachedParsers.set(n,this.createParser(n))}catch(r){XS.warn(hr(r))}}),e.shared.workspace.DocumentBuilder.onDocumentPhase(qe.Validated,n=>{n.diagnostics?.some(r=>r.severity===Ns.Error)&&this.cachedParsers.
|
|
2111
|
+
delete(n)})}cachedParsers=new bb(e=>this.createParser(e));documents(e){return this.services.shared.workspace.LangiumDocuments.projectDocuments(e).map(n=>this.parse(n))}parse(e){try{return this.forDocument(e).doc}catch(n){throw new Error(`Error parsing document ${e.uri.toString()}`,{cause:n})}}forDocument(e){return e.state<qe.Linked&&XS.warn(`Document ${e.uri.toString()} is not linked`),this.cachedParsers.get(e)}createParser(e){e=Object.assign(e,{c4Specification:{tags:new Set,elements:{},relationships:{},
|
|
2112
|
+
colors:{},deployments:{}},c4Elements:[],c4ExtendElements:[],c4ExtendDeployments:[],c4Relations:[],c4Deployments:[],c4DeploymentRelations:[],c4Globals:{predicates:{},dynamicPredicates:{},styles:{}},c4Views:[]});const n=new pV(this.services,e);return n.parseSpecification(),n.parseModel(),n.parseGlobals(),n.parseDeployment(),n.parseViews(),n}}const{findNodeForKeyword:mV}=ag,gV=(t,e,n=0)=>{const r=n>0?" ".repeat(n):"";return[r+`style ${t} {`,...ec(e).map(([i,s])=>r+` ${i} ${i==="opacity"?s.toString()+
|
|
2113
|
+
"%":s}`),r+"}"]},yV=(t,e)=>n=>{if(!ud(n))return!1;const r=n.target.value;if(!r||ce(n.target.prev)||!dl(r))return!1;const i=r.el.ref;return(i?e.getFqn(i):null)===t};function vV(t,{view:e,viewAst:n,targets:r,style:i}){Ie(n.body,`View ${e.id} has no body`);const s=n.$cstNode;Ie(s,"viewCstNode");const o=Qu(n.body.rules)?.$cstNode?.range.end??n.body.$cstNode?.range.end;Ie(o,"insertPos is not defined");const a=s.range.start.character+2,u=t.likec4.FqnIndex,c=He(n.body.rules,ud),l=e.__==="element"?e.viewOf:
|
|
2114
|
+
null,f=[],d=[];r.forEach(b=>{const y=fk(c,yV(b,u)),E=l&&cm(l,b)?b.substring(l.length+1):b;y?f.push({fqn:E,rule:y}):d.push({fqn:E})});const p={start:o,end:o},h=b=>{b.start.line<=p.start.line&&(b.start.line==p.start.line?p.start.character=Math.min(b.start.character,p.start.character):p.start=b.start),b.end.line>=p.end.line&&(b.end.line==p.end.line?p.end.character=Math.max(b.end.character,p.end.character):p.end=b.end)},v=[];if(d.length>0){const b=d.flatMap(({fqn:y})=>gV(y,i,a));v.push(Fn.insert(o,`\
|
|
2115
|
+
|
|
2116
|
+
`+b.join(`
|
|
2117
|
+
`))),p.start={line:o.line+1,character:a},p.end={line:o.line+b.length,character:Qu(b)?.length??0}}if(f.length>0)for(const{rule:b}of f){const y=b.$cstNode;Ie(y,"RuleCstNode not found");for(const[E,R]of ec(i)){const A=E==="opacity"?R.toString()+"%":R,N=b.props.find(ie=>ie.key===E);if(N&&N.$cstNode){const{range:{start:ie,end:we}}=N.$cstNode;h({start:ie,end:we}),v.push(Fn.replace({start:ie,end:we},E+" "+A));continue}const K=mV(y,"{")?.range.end;Ie(K,"Opening brace not found");const J=" ".repeat(2+y.range.
|
|
2118
|
+
start.character),se=J+E+" "+A;v.push(Fn.insert(K,`
|
|
2119
|
+
`+se)),h({start:{line:K.line+1,character:J.length},end:{line:K.line+1,character:se.length}})}}return{modifiedRange:p,edits:v}}const{findNodeForKeyword:wV}=ag;function bV(t,{view:e,viewAst:n,layout:r}){Ie(n.body,`View ${e.id} has no body`);const i=n.$cstNode;Ie(i,"viewCstNode");const s=GH(r.direction),o=fk(n.body.rules,rd);let a=`autoLayout ${s}`;if(wp(r.rankSep)&&(a+=` ${r.rankSep}`,wp(r.nodeSep)&&(a+=` ${r.nodeSep}`)),o&&o.$cstNode)return Fn.replace(o.$cstNode.range,a);const u=wV(n.body.$cstNode,
|
|
2120
|
+
"}")?.range.start;Ie(u,"Closing brace not found");const c=` ${a}
|
|
2121
|
+
`;return Fn.insert(u,c)}function EV(t,e=1,n={}){const{indent:r=" ",includeEmptyLines:i=!1}=n;if(typeof t!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof t}\``);if(typeof e!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof e}\``);if(e<0)throw new RangeError(`Expected \`count\` to be at least 0, got \`${e}\``);if(typeof r!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r}\``);if(e===
|
|
2122
|
+
0)return t;const s=i?/^/gm:/^(?!\s*$)/gm;return t.replace(s,r.repeat(e))}function $V(t,{viewAst:e,layout:n}){Ie(e.$cstNode,"invalid view.$cstNode");const r=Im(e.$cstNode,["BLOCK_COMMENT"]);let i=eV(n);return e.$cstNode.range.start.character>0&&(i=EV(i,e.$cstNode.range.start.character)),r?Fn.replace(r.range,i.trimStart()):Fn.insert({line:e.$cstNode.range.start.line,character:0},i+`
|
|
2123
|
+
`)}class DV{constructor(e){this.services=e,this.locator=e.likec4.ModelLocator}locator;async applyChange(e){const n=this.services.shared.lsp.Connection;Ie(n,"LSP Connection not available");let r=null;try{await this.services.shared.workspace.WorkspaceLock.write(async()=>{const{doc:i,edits:s,modifiedRange:o}=this.convertToTextEdit(e),a={uri:i.textDocument.uri,version:i.textDocument.version};if(!s.length)return;const u=await n.workspace.applyEdit({label:`LikeC4 - change view ${e.viewId}`,edit:{changes:{
|
|
2124
|
+
[a.uri]:s}}});if(!u.applied){n.window.showErrorMessage(`Failed to apply changes ${u.failureReason}`);return}r={uri:a.uri,range:o}})}catch(i){vn.error(`Failed to apply change ${e.change.op} ${e.viewId}`,{error:i})}return r}convertToTextEdit({viewId:e,projectId:n,change:r}){const i=this.locator.locateViewAst(e,n);if(!i)throw new Error(`LikeC4ModelChanges: view not found: ${e}`);switch(r.op){case"change-element-style":return{doc:i.doc,...vV(this.services,{...i,targets:r.targets,style:r.style})};case"\
|
|
2125
|
+
change-autolayout":{const o=bV(this.services,{...i,layout:r.layout});return{doc:i.doc,modifiedRange:o.range,edits:[o]}}case"save-manual-layout":const s=$V(this.services,{...i,layout:r.layout});return{doc:i.doc,modifiedRange:s.range,edits:[s]};default:je(r)}}}class RV extends PR{constructor(e){super(),this.services=e}getNameStrict(e){return Wt(this.getName(e),`Failed getName for ${this.services.workspace.AstNodeLocator.getAstNodePath(e)}`)}getName(e){if(fp(e))return e.name;if(Bn(e))return e.element.
|
|
2126
|
+
el.$refText}getNameNode(e){if(fp(e))return super.getNameNode(e);if(Bn(e))return e.element.el.$refNode}}function kV(t){return Xe(t,Qo(e=>`${e.type}.${e.name}`),ec(),li(([e,n])=>n.length===1?n:[]))}class TV extends NR{constructor(e){super(e)}async computeExports(e,n){const r=[];try{const{specifications:i,models:s,views:o,globals:a,likec4lib:u,deployments:c}=e.parseResult.value;this.exportLibrary(u,r,e),this.exportSpecification(i,r,e),this.exportModel(s,r,e),this.exportViews(o,r,e),this.exportGlobals(
|
|
2127
|
+
a,r,e),this.exportDeployments(c,r,e)}catch(i){Re(i)}return r}exportViews(e,n,r){const i=e?.flatMap(s=>s.views);if(!(Tt(i)||i.length===0))for(const s of i)try{ce(s.name)&&n.push(this.descriptions.createDescription(s,s.name,r))}catch(o){Re(o)}}exportGlobals(e,n,r){if(!(Tt(e)||e.length===0)){for(const i of e.flatMap(s=>s.predicates))try{const s=i;ce(s.name)&&n.push(this.descriptions.createDescription(s,s.name,r))}catch(s){Re(s)}for(const i of e.flatMap(s=>s.styles))try{const s=i.id;ce(s.name)&&n.push(
|
|
2128
|
+
this.descriptions.createDescription(s,s.name,r))}catch(s){Re(s)}}}exportModel(e,n,r){if(!(Tt(e)||e.length===0))for(const i of e.flatMap(s=>s.elements))try{pn(i)&&ce(i.name)&&n.push(this.descriptions.createDescription(i,i.name,r))}catch(s){Re(s)}}exportLibrary(e,n,r){if(!Tt(e))try{for(const i of e.flatMap(s=>s.icons))n.push(this.descriptions.createDescription(i,i.name,r))}catch(i){Re(i)}}exportSpecification(e,n,r){if(!(Tt(e)||e.length===0))for(const i of e.flatMap(s=>[...s.elements,...s.relationships,
|
|
2129
|
+
...s.deploymentNodes,...s.tags,...s.colors]))try{switch(!0){case ga(i):case va(i):{ce(i.kind.name)&&n.push(this.descriptions.createDescription(i.kind,i.kind.name,r));continue}case Ph(i):{ce(i.tag.name)&&n.push(this.descriptions.createDescription(i.tag,"#"+i.tag.name,r));continue}case ba(i):{ce(i.kind.name)&&n.push(this.descriptions.createDescription(i.kind,i.kind.name,r),this.descriptions.createDescription(i.kind,"."+i.kind.name,r));continue}case _h(i):{ce(i.name.name)&&n.push(this.descriptions.
|
|
2130
|
+
createDescription(i.name,i.name.name,r));continue}default:je(i)}}catch(s){Re(s)}}exportDeployments(e,n,r){const i=e?.flatMap(s=>s.elements);if(!(Tt(i)||i.length===0))for(const s of i)try{jn(s)&&ce(s.name)&&n.push(this.descriptions.createDescription(s,s.name,r))}catch(o){Re(o)}}computeLocalScopes(e,n){return new Promise(r=>{const i=e.parseResult.value,s=[],o=new Ms;for(const a of i.models)try{s.push(...this.processContainer(a,o,e))}catch(u){Re(u)}for(const a of i.deployments)try{s.push(...this.processDeployments(
|
|
2131
|
+
a,o,e))}catch(u){Re(u)}kV(s).forEach(a=>{o.add(i,a)}),r(o)})}processContainer(e,n,r){const i=new Ms,s=[];for(const a of e.elements){if(Ti(a))continue;let u;if(pn(a)?(ce(a.name)&&i.add(a.name,this.descriptions.createDescription(a,a.name,r)),u=a.body):oa(a)&&(u=a.body),u&&u.elements.length>0)try{s.push(...this.processContainer(u,n,r))}catch(c){Re(c)}}s.length&&Xe(s,He(a=>!i.has(a.name)),Qo(a=>a.name),ck((a,u)=>{a.length===1&&i.add(u,a[0])}));const o=[...i.values()];return n.addAll(e,o),o}processDeployments(e,n,r){
|
|
2132
|
+
const i=new Ms,s=[];for(const a of e.elements)if(!Qi(a)){if(!ao(a)){let u=this.nameProvider.getName(a);if(ce(u)){const c=this.descriptions.createDescription(a,u,r);i.add(u,c)}}if(!Bn(a)&&a.body)try{s.push(...this.processDeployments(a.body,n,r))}catch(u){Re(u)}}s.length&&Xe(s,He(a=>!i.has(a.name)),Qo(a=>a.name),ck((a,u)=>{a.length===1&&i.add(u,a[0])}));const o=[...i.values()];return n.addAll(e,o),o}}const{getDocument:CV}=Eu;class AV extends LR{deploymentsIndex;fqnIndex;indexManager;constructor(e){
|
|
2133
|
+
super(e),this.indexManager=e.shared.workspace.IndexManager,this.fqnIndex=e.likec4.FqnIndex,this.deploymentsIndex=e.likec4.DeploymentsIndex}getScope(e){try{const n=Sn(e.container),r=this.reflection.getReferenceType(e);try{const i=e.container;if(LC(i))return new Bs(this.streamForFqnRef(n,i,e));if(HC(i))return this.getScopeForStrictFqnRef(n,i,e);if(r!==Dr)return this.getProjectScope(n,r,e);if(zC(i)&&e.property==="el"){const s=i.parent;return s?new Bs(this.fqnIndex.directChildrenOf(n,Eo(s))):this.getProjectScope(
|
|
2134
|
+
n,r,e)}if(dl(i)&&e.property==="el"){const s=i.parent;if(s)return new Bs(this.streamScopeElementRef(s));if(e.reference.$refText==="this"||e.reference.$refText==="it"){const o=wn(i,pn);return o?new Ty([this.descriptions.createDescription(o,e.reference.$refText)]):IR}}return new Bs(We(this.computeScope(n,e)))}catch(i){return Re(i),this.getProjectScope(n,r,e)}}catch(n){return Re(n),IR}}*genUniqueDescedants(e){const n=e();if(!n)return;const r=Sn(n);if(pn(n)){const i=this.fqnIndex.getFqn(n);yield*this.
|
|
2135
|
+
fqnIndex.uniqueDescedants(r,i);return}if(jn(n)){const i=this.deploymentsIndex.getFqn(n);yield*this.deploymentsIndex.uniqueDescedants(r,i)}}streamScopeElementRef(e){return We(this.genUniqueDescedants(()=>e.el.ref))}streamScopeExtendElement({element:e}){return We([e.el.$nodeDescription]).nonNullable().concat(this.genUniqueDescedants(()=>An(e)))}streamScopeElementView({viewOf:e,extends:n}){return e?We([e.el.$nodeDescription]).nonNullable().concat(this.genUniqueDescedants(()=>An(e))):n?We([n]).flatMap(
|
|
2136
|
+
r=>{const i=r.view.ref;return i?this.streamScopeElementView(i):Es}):Es}getScopeForStrictFqnRef(e,n,r){const i=n.parent;return i?new Bs(this.deploymentsIndex.directChildrenOf(e,Eo(i)).filter(s=>this.reflection.isSubtype(s.type,Ur))):this.getProjectScope(e,Ur,r)}streamScopeExtendDeployment({deploymentNode:e}){return We([e.value.$nodeDescription]).nonNullable().concat(this.genUniqueDescedants(()=>{const n=e.value.ref;return n&&jn(n)?n:void 0}))}streamForFqnRef(e,n,r){const i=n.parent;if(!i)return We(
|
|
2137
|
+
this.genScopeForFqnRef(e,n,r));const s=i.value.ref;return s?jn(s)?We(this.genUniqueDescedants(()=>s)):Bn(s)?We(this.streamScopeElementRef(s.element)):pn(s)?We(this.genUniqueDescedants(()=>s)):je(s):Es}*genScopeForFqnRef(e,n,r){yield*this.computeScope(e,r,Ur),yield*this.computeScope(e,r,Ji),qi(n,yv)&&(yield*this.computeScope(e,r,Dr))}*computeScope(e,n,r=this.reflection.getReferenceType(n)){const i=this.reflection.isSubtype(r,Dr),s=this.reflection.isSubtype(r,Tp),o=CV(n.container).precomputedScopes;
|
|
2138
|
+
if(!o){yield*this.getProjectScope(e,r,n).getAllElements();return}const a=c=>this.reflection.isSubtype(c.type,r);let u=n.container;for(;u;){const c=o.get(u).filter(a);c.length>0&&(yield*c),s&&CU(u)&&(yield*this.streamScopeExtendDeployment(u.$container)),i&&OC(u)&&(yield*this.streamScopeExtendElement(u.$container)),i&&NC(u)&&(yield*this.streamScopeElementView(u.$container)),u=u.$container}yield*this.getProjectScope(e,r,n).getAllElements()}getProjectScope(e,n,r){return n===ki?super.getGlobalScope(n,
|
|
2139
|
+
r):this.globalScopeCache.get(`${e}::${n}`,()=>new Ty(this.indexManager.projectElements(e,n)))}getGlobalScope(e,n){if(e===ki)return super.getGlobalScope(e,n);const r=Sn(n.container);return this.getProjectScope(r,e,n)}}var Mw;(t=>{t.type=new Mt.NotificationType("likec4/onDidChangeModel")})(Mw||(Mw={}));var Bw;(t=>{t.req=new Mt.RequestType("likec4/fetchComputedModel")})(Bw||(Bw={}));var jw;(t=>{t.req=new Mt.RequestType0("likec4/fetchViewsFromAllProjects")})(jw||(jw={}));var qw;(t=>{t.req=new Mt.RequestType(
|
|
2140
|
+
"likec4/computeView")})(qw||(qw={}));var Gw;(t=>{t.req=new Mt.RequestType("likec4/fetchLayoutedModel")})(Gw||(Gw={}));var Uw;(t=>{t.req=new Mt.RequestType("likec4/layout-view")})(Uw||(Uw={}));var Ww;(t=>{t.Req=new Mt.RequestType("likec4/validate-layout")})(Ww||(Ww={}));var zw;(t=>{t.req=new Mt.RequestType0("likec4/fetch-projects")})(zw||(zw={}));var Hw;(t=>{t.Req=new Mt.RequestType("likec4/build")})(Hw||(Hw={}));var Vw;(t=>{t.Req=new Mt.RequestType("likec4/locate")})(Vw||(Vw={}));var Kw;(t=>{t.Req=
|
|
2141
|
+
new Mt.RequestType("likec4/change-view")})(Kw||(Kw={}));var Xw;(t=>{t.req=new Mt.RequestType0("likec4/metrics")})(Xw||(Xw={}));const fr=ot.getChild("rpc");class SV extends Sw{constructor(e){super(),this.services=e}init(){const e=this.services.likec4.ModelBuilder,n=this.services.likec4.ModelLocator,r=this.services.likec4.ModelChanges,i=this.services.likec4.Views,s=this.services.shared.lsp.Connection,o=this.services.shared.workspace.ProjectsManager;if(!s){fr.info("[ServerRpc] no connection, not in\
|
|
2142
|
+
itializing");return}fr.info("[ServerRpc] init");const a=this.services.shared.workspace.LangiumDocuments,u=this.services.shared.workspace.DocumentBuilder,c=k3(()=>{fr.debug`sendNotification ${"onDidChangeModel"}`,s.sendNotification(Mw.type,"").catch(d=>(fr.warn(`[ServerRpc] error sending onDidChangeModel: ${d}`),Promise.resolve()))},{triggerAt:"end",minQuietPeriodMs:100,maxBurstDurationMs:500,minGapMs:300});let l=!0;this.onDispose(e.onModelParsed(()=>c.call()),s.onRequest(Bw.req,async({projectId:d,
|
|
2143
|
+
cleanCaches:p},h)=>{if(fr.debug`received request ${"fetchComputedModel"} for project ${d}`,p){const b=(d?a.projectDocuments(d):a.all).map(y=>y.uri).toArray();await u.update(b,[],h)}const v=await e.buildLikeC4Model(d,h);return v!==vs.EMPTY?{model:v.$model}:{model:null}}),s.onRequest(qw.req,async({viewId:d,projectId:p},h)=>({view:await e.computeView(d,p,h)})),s.onRequest(Gw.req,async({projectId:d},p)=>{const h=await e.parseModel(d,p);if(h===null)return{model:null};const v=await i.diagrams(d,p);return{
|
|
2144
|
+
model:{...h,__:"layouted",views:Zu(v,b=>b.id)}}}),s.onRequest(Uw.req,async({viewId:d,projectId:p},h)=>(fr.debug`received request ${"layoutView"} of ${d} from project ${p}`,{result:await i.layoutView(d,p,h)})),s.onRequest(Ww.Req,async({projectId:d},p)=>{const h=await i.layoutAllViews(d,p);return{result:f(h.map(v=>v.diagram))}}),s.onRequest(zw.req,async d=>{fr.debug`received request ${"FetchProjects"}`;const p=a.groupedByProject();return{projects:Jo(p,h=>xt(h,v=>v.uri.toString()))}}),s.onRequest(jw.
|
|
2145
|
+
req,async d=>{fr.debug`received request ${"FetchViewsFromAllProjects"}`;const p=o.all.map(async v=>{const b=await i.computedViews(v,d);return Xe(b,xt(y=>({id:y.id,title:y.title??y.id,projectId:v})),uk((y,E)=>y.id==="index"?-1:E.id==="index"?1:y.title.localeCompare(E.title)))}),h=await Promise.allSettled(p);return await jt(d),{views:Xe(h,He(v=>v.status==="fulfilled"),li(v=>v.value))}}),s.onRequest(Hw.Req,async({docs:d},p)=>{const h=d.map(y=>Et.parse(y)),v=y=>h.every(E=>!pt.equals(E,y)),b=a.allExcludingBuiltin.
|
|
2146
|
+
toArray().filter(y=>v(y.uri)).map(y=>y.uri);fr.debug(`[ServerRpc] received request to build:
|
|
2147
|
+
changed (total ${h.length}):${d.map(y=>`
|
|
2148
|
+
- `+y).join("")}
|
|
2149
|
+
deleted (total ${b.length}):${b.map(y=>`
|
|
2150
|
+
- `+y.toString()).join(`
|
|
2151
|
+
`)}`),!l&&h.length+b.length>0&&await Promise.allSettled([...h,...b].map(async y=>{const E=y.toString();fr.debug(`clear diagnostics for ${E}`);try{await s.sendDiagnostics({uri:E,diagnostics:[]})}catch(R){fr.warn(`error clearing diagnostics for ${E}: ${R}`)}})),l=!1,await jt(p),await u.update(h,b,p)}),s.onRequest(Vw.Req,d=>{switch(!0){case"element"in d:return n.locateElement(d.element,d.projectId);case"relation"in d:return n.locateRelation(d.relation,d.projectId);case"view"in d:return n.locateView(
|
|
2152
|
+
d.view,d.projectId);case"deployment"in d:return n.locateDeploymentElement(d.deployment,d.projectId);default:je(d)}}),s.onRequest(Kw.Req,async(d,p)=>(fr.debug`received request ${"changeView"} of ${d.viewId} from project ${d.projectId}`,await r.applyChange(d))),s.onRequest(Xw.req,async d=>{const p=[...o.all].map(async b=>{const y=await e.buildLikeC4Model(b,d);return y===vs.EMPTY?Promise.reject(new Error("Model is empty")):{elementKinds:Ju(y.$model.specification.elements).length,relationshipKinds:Ju(
|
|
2153
|
+
y.$model.specification.relationships).length,tags:y.$model.specification.tags.length,elements:Ju(y.$model.elements).length,relationships:Ju(y.$model.relations).length,views:Ju(y.$model.views).length,projects:1}}),h=await Promise.allSettled(p);await jt(d);const v=h.filter(b=>b.status==="fulfilled").map(b=>b.value);return{metrics:v.length>0?v.reduce((b,y)=>({elementKinds:b.elementKinds+y.elementKinds,relationshipKinds:b.relationshipKinds+y.relationshipKinds,tags:b.tags+y.tags,elements:b.elements+y.
|
|
2154
|
+
elements,relationships:b.relationships+y.relationships,views:b.views+y.views,projects:b.projects+1})):null}}),js.create(()=>{c.cancel()}));function f(d){return Xe(d,He(p=>!!p.hasLayoutDrift),xt(p=>({uri:n.locateView(p.id).uri,viewId:p.id,severity:ge.DiagnosticSeverity.Warning,message:`Layout drift detected for view '${p.id}'`,range:n.locateView(p.id).range})))}}}class _V{constructor(e){this.services=e}getSymbolKind(e){const n=Rt(e)?e.$type:e.type,r=(...i)=>i.some(s=>this.services.AstReflection.isSubtype(
|
|
2155
|
+
n,s));switch(!0){case r(Dr,uo,Ur,Ji):return br.Constructor;case r(da,pa,fa,ca,Ea):return br.Namespace;case r(io):return br.Class;case r(ts,ki,oo,$a):return br.EnumMember;case r(es,wa):return br.Event;case r(Ri,Di,ya,ma):return br.TypeParameter}return br.Field}getCompletionItemKind(e){const n=Rt(e)?e.$type:e.type,r=(...i)=>i.some(s=>this.services.AstReflection.isSubtype(n,s));switch(!0){case r(oo):return Pt.Color;case r(Dr,Ur,Ji,uo):return Pt.Constructor;case r(da,pa,fa,ca,Ea):return Pt.Module;case r(
|
|
2156
|
+
io):return Pt.Class;case r(ts,ki,oo,$a):return Pt.EnumMember;case r(es,wa):return Pt.Event;case r(Ri,ya,Di,ma):return Pt.TypeParameter;default:return Pt.Reference}}}class PV extends VT{}const _a=ot.getChild("Views");class xV{constructor(e){this.services=e,this.ModelBuilder=e.likec4.ModelBuilder}cache=new WeakMap;viewsWithReportedErrors=new Set;ModelBuilder;get layouter(){return this.services.likec4.Layouter}async computedViews(e,n=Mt.CancellationToken.None){const r=await this.ModelBuilder.buildLikeC4Model(
|
|
2157
|
+
e,n);return vp(r.$model.views)}async layoutAllViews(e,n=Mt.CancellationToken.None){const r=await this.computedViews(e,n);if(r.length===0)return[];_a.debug`layoutAll: ${r.length} views`;const i=[],s=[];for(const o of r)this.viewsWithReportedErrors.delete(o.id),s.push(this.layouter.layout(o).then(a=>(this.viewsWithReportedErrors.delete(o.id),this.cache.set(o,a),a)).catch(a=>(this.cache.delete(o),Re(a),Promise.reject(a))));for(const o of await Promise.allSettled(s))o.status==="fulfilled"&&i.push(o.
|
|
2158
|
+
value);return i.length!==r.length?_a.warn`layouted ${i.length} of ${r.length} views`:i.length>0&&_a.debug`layouted all ${i.length} views`,i}async layoutView(e,n,r=Mt.CancellationToken.None){const i=(await this.ModelBuilder.buildLikeC4Model(n,r)).findView(e)?.$view;if(!i)return _a.warn`layoutView ${e} not found`,null;let s=this.cache.get(i);if(s)return _a.debug`layout ${e} from cache`,await Promise.resolve(s);try{const o=performance.now(),a=await this.layouter.layout(i);return this.viewsWithReportedErrors.
|
|
2159
|
+
delete(e),this.cache.set(i,a),_a.debug(`layout {viewId} ready in ${im(performance.now()-o)}`,{viewId:e}),a}catch(o){if(!this.viewsWithReportedErrors.has(e)){const a=hr(o);this.services.shared.lsp.Connection?.window.showErrorMessage(`LikeC4: ${a}`),this.viewsWithReportedErrors.add(e),zv(o)}return Promise.reject(o)}}async diagrams(e,n=Mt.CancellationToken.None){return(await this.layoutAllViews(e,n)).map(r=>r.diagram)}async viewsAsGraphvizOut(e,n=Mt.CancellationToken.None){const r="All-LayoutedView\
|
|
2160
|
+
s-DotWithSvg",i=this.services.ValidatedWorkspaceCache;if(i.has(r))return await Promise.resolve(i.get(r));const s=(await this.computedViews(e,n)).map(async u=>{const{dot:c,svg:l}=await this.layouter.svg(u);return{id:u.id,dot:c,svg:l}}),o=[],a=await Promise.allSettled(s);for(const u of a)u.status==="fulfilled"?o.push(u.value):Re(u.reason);return i.set(r,o),o}async overviewGraph(){const e="OverviewGraph",n=this.services.ValidatedWorkspaceCache;if(n.has(e))return await Promise.resolve(n.get(e));const r=await this.
|
|
2161
|
+
computedViews(),i=await this.layouter.layoutOverviewGraph(r);return n.set(e,i),i}}const NV={lsp:{NodeKindProvider:t=>new _V(t),WorkspaceSymbolProvider:t=>new PV(t)},workspace:{IndexManager:t=>new KH(t),LangiumDocuments:t=>new XH(t),ProjectsManager:t=>new Qn(t),WorkspaceManager:t=>new YH(t)}};function Nt(t){return e=>new t(e)}const IV={documentation:{DocumentationProvider:Nt(UH)},ValidatedWorkspaceCache:t=>new pp(t.shared,qe.Validated),Rpc:Nt(SV),likec4:{LanguageServices:Nt(QH),Layouter:t=>(ot.debug(
|
|
2162
|
+
"Creating GraphvizLayouter with GraphvizWasmAdapter"),new RS(new Na)),Views:Nt(xV),DeploymentsIndex:Nt(a5),ModelChanges:Nt(DV),FqnIndex:Nt(_S),ModelParser:Nt(hV),ModelBuilder:Nt(b5),ModelLocator:Nt(D5)},lsp:{CompletionProvider:Nt(t5),DocumentHighlightProvider:Nt(n5),DocumentSymbolProvider:Nt(i5),SemanticTokenProvider:Nt(o5),HoverProvider:Nt(s5),CodeLensProvider:Nt(e5),DocumentLinkProvider:Nt(r5),Formatter:Nt(HH)},workspace:{AstNodeDescriptionProvider:Nt(VH)},references:{NameProvider:Nt(RV),ScopeComputation:Nt(
|
|
2163
|
+
TV),ScopeProvider:Nt(AV)}};function OV(t,e,n,r){const i=LV(t),s=[$8({shared:i}),WU,IV,e,n,r].reduce(YS,{}),o=gp(s);return i.ServiceRegistry.register(o),a9(o),t.connection?o.Rpc.init():i.workspace.ConfigurationProvider.initialized({}),{shared:i,likec4:o}}function LV(t={}){const e={...rk,...t};return gp(R8(e),UU,NV)}function YS(t,e){if(e){for(const[n,r]of Object.entries(e))if(r!==void 0){const i=t[n];i!==null&&r!==null&&typeof i=="object"&&typeof r=="object"?t[n]=YS(i,r):t[n]=r}}return t}const FV=t=>({
|
|
2164
|
+
start:Fi.hrtime.bigint(),command:t.map(e=>MV(D_(e))).join(" "),state:{stdout:"",stderr:"",output:""}}),MV=t=>/[^\w./-]/.test(t)?`'${t.replaceAll("'","'\\''")}'`:t,BV=({stdin:t,stdout:e,stderr:n,stdio:r=[t,e,n],env:i,preferLocal:s,cwd:o=".",...a})=>{const u=o instanceof URL?w_(o):Oi.resolve(o),c=i?{...Fi.env,...i}:void 0,l=r[0]?.string;return{...a,input:l,stdio:l===void 0?r:["pipe",...r.slice(1)],env:s?jV(c??Fi.env,u):c,cwd:u}},jV=({Path:t="",PATH:e=t,...n},r)=>{const i=e.split(Oi.delimiter),s=JS(
|
|
2165
|
+
[],Oi.resolve(r)).map(o=>Oi.join(o,"node_modules/.bin")).filter(o=>!i.includes(o));return{...n,PATH:[...s,e].filter(Boolean).join(Oi.delimiter)}},JS=(t,e)=>t.at(-1)===e?t:JS([...t,e],Oi.resolve(e,"..")),qV=async(t,e,n)=>await GV(t,n)?[Yw(t),e.map(r=>HV(r)),{...n,shell:!0}]:[t,e,n],GV=async(t,{shell:e,cwd:n,env:r=Fi.env})=>Fi.platform==="win32"&&!e&&!await UV(t,n,r),UV=async(t,e,{Path:n="",PATH:r=n})=>QS.some(i=>t.toLowerCase().endsWith(i))||(WV[`${t}\0${e}\0${r}`]??=await zV(t,e,r)),WV={},zV=async(t,e,n)=>{
|
|
2166
|
+
const r=n.split(Oi.delimiter).filter(Boolean).map(i=>i.replace(/^"(.*)"$/,"$1"));try{await Promise.all(QS.flatMap(i=>[e,...r].map(s=>`${Oi.resolve(s,t)}${i}`)).map(async i=>{try{await tP(i)}catch{return}throw 0}))}catch{return!0}return!1},QS=[".exe",".com"],HV=t=>Yw(Yw(`"${t.replaceAll(/(\\*)"/g,'$1$1\\"').replace(/(\\*)$/,"$1$1")}"`)),Yw=t=>t.replaceAll(/([()\][%!^"`<>&|;, *?])/g,"^$1"),VV=async(t,{input:e},n)=>{const r=await t;e!==void 0&&r.stdin.end(e);const i=Db(r,"close");try{return await Promise.
|
|
2167
|
+
race([i,...r.stdio.filter(Boolean).map(s=>KV(s))]),XV(n,e_(r)),t_(n)}catch(s){throw await Promise.allSettled([i]),ZS(s,r,n)}},KV=async t=>{for await(const[e]of eP(t,"error"))if(!["ERR_STREAM_PREMATURE_CLOSE","EPIPE"].includes(e?.code))throw e},XV=({command:t},{exitCode:e,signalName:n})=>{if(n!==void 0)throw new ko(`Command was terminated with ${n}: ${t}`);if(e!==void 0)throw new ko(`Command failed with exit code ${e}: ${t}`)},ZS=(t,e,n)=>Object.assign(YV(t,n),e_(e),t_(n)),YV=(t,{command:e})=>t instanceof
|
|
2168
|
+
ko?t:new ko(`Command failed: ${e}`,{cause:t});class ko extends Error{name="SubprocessError"}const e_=({exitCode:t,signalCode:e})=>({...t<1?{}:{exitCode:t},...e===null?{}:{signalName:e}}),t_=({state:{stdout:t,stderr:e,output:n},command:r,start:i})=>({stdout:Jw(t),stderr:Jw(e),output:Jw(n),command:r,durationMs:Number(Fi.hrtime.bigint()-i)/1e6}),Jw=t=>t.at(-1)===`
|
|
2169
|
+
`?t.slice(0,t.at(-2)==="\r"?-2:-1):t,JV=async(t,e,n,r)=>{try{[t,e]=["node","node.exe"].includes(t.toLowerCase())?[Fi.execPath,[...Fi.execArgv.filter(s=>!s.startsWith("--inspect")),...e]]:[t,e];const i=Z_(...await qV(t,e,n));return n_(i.stdout,r,"stdout"),n_(i.stderr,r,"stderr"),i.once("error",()=>{}),await Db(i,"spawn"),i}catch(i){throw ZS(i,{},r)}},n_=(t,{state:e},n)=>{t&&(t.setEncoding("utf8"),e.isIterating||(e.isIterating=!1,t.on("data",r=>{e[n]+=r,e.output+=r})))},QV=async t=>{const[[e,n]]=await Promise.
|
|
2170
|
+
all([Promise.allSettled(t),ZV(t)]);if(n.reason)throw n.reason.pipedFrom=e.reason??e.value,n.reason;if(e.reason)throw e.reason;return{...n.value,pipedFrom:e.value}},ZV=async t=>{try{const[{stdout:e},{stdin:n}]=await Promise.all(t.map(({nodeChildProcess:r})=>r));if(n===null)throw new Error('The "stdin" option must be set on the first "spawn()" call in the pipeline.');if(e===null)throw new Error('The "stdout" option must be set on the last "spawn()" call in the pipeline.');nP(e,n).catch(()=>{})}catch(e){
|
|
2171
|
+
throw await Promise.allSettled(t.map(({nodeChildProcess:n})=>eK(n))),e}},eK=async t=>{const{stdin:e}=await t;e.end()},r_=async function*(t,{state:e},n){if(e.isIterating===!1)throw new Error(`The subprocess must be iterated right away, for example:
|
|
2172
|
+
for await (const line of spawn(...)) { ... }`);e.isIterating=!0;try{const{[n]:r}=await t.nodeChildProcess;if(!r)return;let i="";for await(const s of r.iterator({destroyOnReturn:!1})){const o=`${i}${s}`.split(/\r?\n/);i=o.pop(),yield*o}i&&(yield i)}finally{await t}},tK=async function*(...t){try{let e=[];for(;t.length>0;){e=t.map((o,a)=>e[a]??nK(o));const[{value:n,done:r},i]=await Promise.race(e.map((o,a)=>Promise.all([o,a]))),[s]=t.splice(i,1);e.splice(i,1),r||(t.push(s),yield n)}}finally{await Promise.
|
|
2173
|
+
all(t.map(e=>e.return()))}},nK=async t=>{try{return await t.next()}catch(e){await t.throw(e)}};function Md(t,e,n,r){const[i=[],s={}]=Array.isArray(e)?[e,n]:[[],e],o=FV([t,...i]),a=BV(s),u=JV(t,i,a,o);let c=VV(u,a,o);Object.assign(c,{nodeChildProcess:u}),c=r?QV([r,c]):c;const l=r_(c,o,"stdout"),f=r_(c,o,"stderr");return Object.assign(c,{nodeChildProcess:u,stdout:l,stderr:f,[Symbol.asyncIterator]:()=>tK(l,f),pipe:(d,p,h)=>Md(d,p,h,c)})}var Ar={},To={},i_;function rK(){if(i_)return To;i_=1,Object.defineProperty(
|
|
2174
|
+
To,"__esModule",{value:!0}),To.sync=To.isexe=void 0;const t=Ia,e=Rb,n=async(o,a={})=>{const{ignoreErrors:u=!1}=a;try{return i(await(0,e.stat)(o),a)}catch(c){const l=c;if(u||l.code==="EACCES")return!1;throw l}};To.isexe=n;const r=(o,a={})=>{const{ignoreErrors:u=!1}=a;try{return i((0,t.statSync)(o),a)}catch(c){const l=c;if(u||l.code==="EACCES")return!1;throw l}};To.sync=r;const i=(o,a)=>o.isFile()&&s(o,a),s=(o,a)=>{const u=a.uid??process.getuid?.(),c=a.groups??process.getgroups?.()??[],l=a.gid??process.
|
|
2175
|
+
getgid?.()??c[0];if(u===void 0||l===void 0)throw new Error("cannot get uid or gid");const f=new Set([l,...c]),d=o.mode,p=o.uid,h=o.gid,v=parseInt("100",8),b=parseInt("010",8),y=parseInt("001",8),E=v|b;return!!(d&y||d&b&&f.has(h)||d&v&&p===u||d&E&&u===0)};return To}var Co={},s_;function iK(){if(s_)return Co;s_=1,Object.defineProperty(Co,"__esModule",{value:!0}),Co.sync=Co.isexe=void 0;const t=Ia,e=Rb,n=async(o,a={})=>{const{ignoreErrors:u=!1}=a;try{return s(await(0,e.stat)(o),o,a)}catch(c){const l=c;
|
|
2176
|
+
if(u||l.code==="EACCES")return!1;throw l}};Co.isexe=n;const r=(o,a={})=>{const{ignoreErrors:u=!1}=a;try{return s((0,t.statSync)(o),o,a)}catch(c){const l=c;if(u||l.code==="EACCES")return!1;throw l}};Co.sync=r;const i=(o,a)=>{const{pathExt:u=process.env.PATHEXT||""}=a,c=u.split(";");if(c.indexOf("")!==-1)return!0;for(let l=0;l<c.length;l++){const f=c[l].toLowerCase(),d=o.substring(o.length-f.length).toLowerCase();if(f&&d===f)return!0}return!1},s=(o,a,u)=>o.isFile()&&i(a,u);return Co}var Qw={},o_;function sK(){
|
|
2177
|
+
return o_||(o_=1,Object.defineProperty(Qw,"__esModule",{value:!0})),Qw}var a_;function oK(){return a_||(a_=1,function(t){var e=Ar&&Ar.__createBinding||(Object.create?function(c,l,f,d){d===void 0&&(d=f);var p=Object.getOwnPropertyDescriptor(l,f);(!p||("get"in p?!l.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return l[f]}}),Object.defineProperty(c,d,p)}:function(c,l,f,d){d===void 0&&(d=f),c[d]=l[f]}),n=Ar&&Ar.__setModuleDefault||(Object.create?function(c,l){Object.defineProperty(
|
|
2178
|
+
c,"default",{enumerable:!0,value:l})}:function(c,l){c.default=l}),r=Ar&&Ar.__importStar||function(c){if(c&&c.__esModule)return c;var l={};if(c!=null)for(var f in c)f!=="default"&&Object.prototype.hasOwnProperty.call(c,f)&&e(l,c,f);return n(l,c),l},i=Ar&&Ar.__exportStar||function(c,l){for(var f in c)f!=="default"&&!Object.prototype.hasOwnProperty.call(l,f)&&e(l,c,f)};Object.defineProperty(t,"__esModule",{value:!0}),t.sync=t.isexe=t.posix=t.win32=void 0;const s=r(rK());t.posix=s;const o=r(iK());t.
|
|
2179
|
+
win32=o,i(sK(),t);const u=(process.env._ISEXE_TEST_PLATFORM_||process.platform)==="win32"?o:s;t.isexe=u.isexe,t.sync=u.sync}(Ar)),Ar}var Zw,u_;function aK(){if(u_)return Zw;u_=1;const{isexe:t,sync:e}=oK(),{join:n,delimiter:r,sep:i,posix:s}=Li,o=process.platform==="win32",a=new RegExp(`[${s.sep}${i===s.sep?"":i}]`.replace(/(\\)/g,"\\$1")),u=new RegExp(`^\\.${a.source}`),c=h=>Object.assign(new Error(`not found: ${h}`),{code:"ENOENT"}),l=(h,{path:v=process.env.PATH,pathExt:b=process.env.PATHEXT,delimiter:y=r})=>{
|
|
2180
|
+
const E=h.match(a)?[""]:[...o?[process.cwd()]:[],...(v||"").split(y)];if(o){const R=b||[".EXE",".CMD",".BAT",".COM"].join(y),A=R.split(y).flatMap(N=>[N,N.toLowerCase()]);return h.includes(".")&&A[0]!==""&&A.unshift(""),{pathEnv:E,pathExt:A,pathExtExe:R}}return{pathEnv:E,pathExt:[""]}},f=(h,v)=>{const b=/^".*"$/.test(h)?h.slice(1,-1):h;return(!b&&u.test(v)?v.slice(0,2):"")+n(b,v)},d=async(h,v={})=>{const{pathEnv:b,pathExt:y,pathExtExe:E}=l(h,v),R=[];for(const A of b){const N=f(A,h);for(const K of y){
|
|
2181
|
+
const J=N+K;if(await t(J,{pathExt:E,ignoreErrors:!0})){if(!v.all)return J;R.push(J)}}}if(v.all&&R.length)return R;if(v.nothrow)return null;throw c(h)},p=(h,v={})=>{const{pathEnv:b,pathExt:y,pathExtExe:E}=l(h,v),R=[];for(const A of b){const N=f(A,h);for(const K of y){const J=N+K;if(e(J,{pathExt:E,ignoreErrors:!0})){if(!v.all)return J;R.push(J)}}}if(v.all&&R.length)return R;if(v.nothrow)return null;throw c(h)};return Zw=d,d.sync=p,Zw}var uK=aK();const c_=Mi(uK),eb=kS(Math.max(1,rP.cpus().length));
|
|
2182
|
+
class cK{dotpath;unflattenpath;constructor(e){this.dotpath=e||c_.sync("dot"),this.unflattenpath=c_.sync("unflatten")}async unflatten(e){return await eb(async()=>{const n=vn.getChild("graphviz-binary");let r;try{const i=await Md(this.unflattenpath,["-l 1","-c 3"],{timeout:1e4,stdin:{string:e}});r=i.stdout,qt(i.stderr)||n.warn`Command ${i.command} has stderr:\n${i.stderr}`}catch(i){n.error("FAILED GraphvizBinaryAdapter.unflatten",{error:i}),i instanceof ko&&!qt(i.stdout)&&(n.warn`Command: '${i.command}' returned result but also failed (exitcode ${i.
|
|
2183
|
+
exitCode}): "${i.stderr}"`,r=i.stdout)}return r&&(e=r.replaceAll(/\t\[/g," [").replaceAll(/\t/g," ")),e})}async layoutJson(e){return await eb(async()=>{const n=vn.getChild("graphviz-binary");let r;try{const i=await Md(this.dotpath,["-Tjson","-y"],{timeout:1e4,stdin:{string:e}});r=i.stdout,qt(i.stderr)||n.warn`Command ${i.command} has stderr:\n${i.stderr}`}catch(i){if(n.error("FAILED GraphvizBinaryAdapter.layoutJson",{error:i}),n.warn(`FAILED DOT:
|
|
2184
|
+
${e}`),i instanceof ko&&!qt(i.stdout))n.warn(`Command: '${i.command}' returned result but also failed (exitcode ${i.exitCode}): "${i.stderr}"`),r=i.stdout;else throw i}return r})}async acyclic(e){return Promise.reject(new Error("Method not implemented."))}async svg(e){return await eb(async()=>{const n=vn.getChild("graphviz-binary");let r;try{const i=await Md(this.dotpath,["-Tsvg","-y"],{timeout:1e4,stdin:{string:e}});r=i.stdout,qt(i.stderr)||n.warn`Command ${i.command} has stderr:\n${i.stderr}`}catch(i){
|
|
2185
|
+
if(n.error("FAILED GraphvizBinaryAdapter.svg",{error:i}),n.warn(`FAILED DOT:
|
|
2186
|
+
${e}`),i instanceof ko&&!qt(i.stdout))n.warn`Command: '${i.command}' returned result but also failed (exitcode ${i.exitCode}): "${i.stderr}"`,r=i.stdout;else throw i}return r})}}const lK="likec4",l_="1.27.1",tb=vn.getChild("cli");Gt.bold(Gt.bgRed(Gt.white("ERROR"))),Gt.bold(Gt.yellow("WARN")),Gt.bold(Gt.green("INFO"));function d_(t){const e=vn.getChild(t);return{info(n){e.info(n)},warn(n){if(n instanceof Error){e.warn(`${Gt.red(n.name+" "+n.message)}`,{msg:n});return}if(typeof n=="string"){e.warn(
|
|
2187
|
+
n);return}e.warn`${n}`},warnOnce(n){e.warn(n)},error(n,r){let i=r?.error??n;if(i instanceof Error){if(n===i){e.error(`${Gt.red(i.name+" "+i.message)}`,{error:i});return}e.error(`${n}`,{error:i});return}if(typeof n=="string"){e.error(`${Gt.red(n)}`);return}e.error`${n}`},clearScreen:function(n){},hasErrorLogged:function(n){throw new Error("Function not implemented.")},hasWarned:!1}}const nb=()=>{},dK={info:nb,warn:nb,error:nb},fK=1e6;function f_(t){const[e,n]=$b(t),r=e*1e3+n/fK;return{ms:r,pretty:im(
|
|
2188
|
+
r)}}function pK(t){const e=$b();return{stopAndLog(n="done in "){n=Gt.green(`${n}${f_(e).pretty}`),(t||tb).info(n)}}}function hK(t,e){console.log(Q_(t,{padding:1,margin:1,dimBorder:!0,...e}))}class mK{constructor(e){this.services=e}isInitialized=!1;async initWorkspace(e){if(this.isInitialized)throw new Error("Workspace already initialized");const n=this.services.logger,r=this.services.shared.workspace.WorkspaceManager;n.info(`${Gt.dim("workspace:")} ${e.uri}`),r.initialize({capabilities:{},processId:null,
|
|
2189
|
+
rootUri:null,workspaceFolders:[e]}),await r.initializeWorkspace([e])}async init(){if(this.isInitialized)throw new Error("Workspace already initialized");this.isInitialized=!0;const e=this.services.logger;this.services.likec4.ModelBuilder;const n=this.services.shared.workspace.LangiumDocuments,r=this.services.shared.workspace.DocumentBuilder,i=n.all.toArray(),s=i.filter(o=>!bd(o.uri));if(s.length===0)throw e.error("no LikeC4 sources found"),new Error("no LikeC4 sources found");e.info(`${Gt.dim("w\
|
|
2190
|
+
orkspace:")} found ${s.length} source files`),s.length>1?await r.update(s.map(o=>o.uri),[],void 0):await r.build(i,{validation:!0})}}function gK(t){return e=>new t(e)}const yK={logger:()=>{throw new Error("Logger must be provided")},likec4:{Layouter:()=>{throw new Error("Layouter must be provided")}},cli:{Workspace:gK(mK)}};function p_(t){const e=Pm(t,{useFileSystem:!0,logger:"default",graphviz:"wasm"});let n;switch(e.logger){case!1:n=dK;break;case"vite":n=d_("lang");break;case"default":n=tb.getChild(
|
|
2191
|
+
"lang");break;default:n=e.logger;break}const r=e.graphviz==="binary";n.info(`${Gt.dim("version")} ${l_}`),n.info(`${Gt.dim("layout")} ${r?"binary":"wasm"}`);const i={logger:()=>n,likec4:{Layouter:()=>new RS(r===!0?new cK:new Na)}};return OV(e.useFileSystem?NW:{},yK,i).likec4}const h_=t=>new Error(`Invalid model:
|
|
2192
|
+
${t.getErrors().map(e=>` ${e.sourceFsPath}:${e.line} ${e.message.slice(0,200)}`).join(`
|
|
2193
|
+
`)}`);class us{constructor(e,n,r){this.workspace=e,this.langium=n,this.isPrintErrorEnabled=r,this.logger=n.logger,this.isPrintErrorEnabled&&this.printErrors()}static async fromSource(e,n){const r=p_(Pm(n,{useFileSystem:!1,logger:!1,graphviz:"wasm"})),i=Et.from({scheme:"virtual",path:"/workspace"});await r.cli.Workspace.initWorkspace({uri:i.toString(),name:"virtual"});const s=pt.joinPath(i,"source.likec4");r.shared.workspace.LangiumDocuments.createDocument(s,e),await r.cli.Workspace.init();const o=new us(
|
|
2194
|
+
i.path,r,n?.printErrors??!0);return n?.throwIfInvalid===!0&&o.hasErrors()?(o.dispose(),Promise.reject(h_(o))):o}static likec4Instances=new Map;static async fromWorkspace(e="",n){const r=y_(e);if(!g_(r))throw new Error(`Workspace not found: ${r}`);let i=us.likec4Instances.get(r);if(!i){const s=p_(Pm(n,{useFileSystem:!0,logger:"default",graphviz:"wasm"}));await s.cli.Workspace.initWorkspace({uri:b_(r).toString(),name:v_(r)}),await s.cli.Workspace.init(),i=new us(r,s,n?.printErrors??!0),us.likec4Instances.
|
|
2195
|
+
set(r,i)}return n?.throwIfInvalid===!0&&i.hasErrors()?(i.dispose(),Promise.reject(h_(i))):i}logger;get languageServices(){return this.langium.likec4.LanguageServices}get viewsService(){return this.langium.likec4.Views}get LangiumDocuments(){return this.langium.shared.workspace.LangiumDocuments}ensureSingleProject(){const e=this.langium.likec4.LanguageServices.projects();if(e.length>1)throw this.logger.error(`Multiple projects found:
|
|
2196
|
+
${e.map(n=>` - ${n.folder.fsPath}`).join(`
|
|
2197
|
+
`)}
|
|
2198
|
+
|
|
2199
|
+
${Gt.red("Please specify a project folder")}
|
|
2200
|
+
`),new Error("Multiple projects found")}async diagrams(){return await this.langium.likec4.Views.diagrams()}computedModel(e){const n=this.langium.shared.workspace.ProjectsManager.ensureProjectId(e);return this.langium.likec4.ModelBuilder.unsafeSyncBuildModel(n)}async projects(){const e=this.langium.shared.workspace.ProjectsManager.defaultProjectId;if(e)return[e];const n=(await Promise.allSettled(this.langium.shared.workspace.ProjectsManager.all.map(async r=>await this.langium.likec4.ModelBuilder.
|
|
2201
|
+
parseModel(r)?r:void 0))).filter(r=>r.status==="fulfilled").flatMap(r=>r.value??[]);return qr(n,1)?n:["default"]}async layoutedModel(e){const n=this.langium.shared.workspace.ProjectsManager.ensureProjectId(e),r=await this.langium.likec4.ModelBuilder.parseModel(n);if(!r)throw new Error("Failed to parse model");const i=await this.viewsService.diagrams(n);return iP.create({...r,__:"layouted",views:Zu(i,ci("id"))})}getErrors(){return this.LangiumDocuments.all.toArray().flatMap(e=>(e.diagnostics??[]).
|
|
2202
|
+
filter(n=>n.severity===Ns.Error).map(({message:n,range:r})=>({message:n,line:r.start.line,range:r,sourceFsPath:e.uri.fsPath})))}hasErrors(){return this.LangiumDocuments.all.some(e=>e.diagnostics?.some(n=>n.severity===Ns.Error)??!1)}printErrors(){let e=!1;for(const n of this.LangiumDocuments.all){const r=n.diagnostics?.filter(i=>i.severity===1);if(r&&r.length>0){e=!0;const i=r.flatMap(s=>{const o=s.range.start.line,a=s.message.split(`
|
|
2203
|
+
`);return a.length>10&&(a.length=10,a.push("...")),a.map((u,c)=>c===0?" "+Gt.dim(`Line ${o}: `)+Gt.red(u):" ".repeat(10)+Gt.red(u))}).join(`
|
|
2204
|
+
`);this.logger.error(`Invalid ${n.uri.fsPath}
|
|
2205
|
+
${i}`)}}return e}async notifyUpdate({changed:e,removed:n}){const r=this.langium.shared.workspace.WorkspaceLock;try{let i=!1;return await r.write(async s=>{await this.langium.shared.workspace.DocumentBuilder.update(e?[Et.file(e)]:[],n?[Et.file(n)]:[],s),i=!s.isCancellationRequested}),i}catch(i){return this.logger.error(hr(i)),!1}}onModelUpdate(e){const n=this.langium.likec4.ModelBuilder.onModelParsed(()=>e());return()=>{n.dispose()}}dispose(){for(const[e,n]of us.likec4Instances)n===this&&us.likec4Instances.
|
|
2206
|
+
delete(e)}}export{lK as A,qt as B,Xe as C,Md as D,l_ as E,tb as F,hr as G,pK as H,FS as I,qr as J,hN as K,us as L,h0 as M,I0 as N,Po as T,Yo as a,He as b,ce as c,lA as d,Zo as e,Io as f,lt as g,d_ as h,Rt as i,nW as j,dk as k,Gr as l,xt as m,Tt as n,vn as o,ci as p,Mi as q,fo as r,QU as s,Ly as t,Gt as u,hK as v,sA as w,hk as x,f_ as y,lP as z};
|