likec4 1.27.3 → 1.28.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/__app__/src/main.js +996 -1021
- package/__app__/src/style.css +1 -1
- package/dist/cli/index.mjs +690 -676
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/shared/{likec4.sbYSTpRI.mjs → likec4.CYGgfB-B.mjs} +1 -1
- package/dist/shared/likec4.DRjStDbg.mjs +2209 -0
- package/dist/shared/{likec4.QmEWuoHf.d.mts → likec4.DwrogUe0.d.mts} +22 -22
- package/dist/vite-plugin/index.d.mts +1 -1
- package/dist/vite-plugin/index.mjs +1 -1
- package/icons/aws/activate.js +21 -1
- package/icons/aws/alexa-for-business.js +21 -1
- package/icons/aws/amplify.js +21 -1
- package/icons/aws/apache-mxnet-on-aws.js +21 -1
- package/icons/aws/api-gateway.js +21 -1
- package/icons/aws/app-config.js +21 -1
- package/icons/aws/app-flow.js +21 -1
- package/icons/aws/app-mesh.js +21 -1
- package/icons/aws/app-runner.js +21 -1
- package/icons/aws/app-stream.js +21 -1
- package/icons/aws/app-sync.js +21 -1
- package/icons/aws/application-auto-scaling.js +21 -1
- package/icons/aws/application-composer.js +21 -1
- package/icons/aws/application-cost-profiler.js +21 -1
- package/icons/aws/application-discovery-service.js +21 -1
- package/icons/aws/application-migration-service.js +21 -1
- package/icons/aws/artifact.js +21 -1
- package/icons/aws/athena.js +21 -1
- package/icons/aws/audit-manager.js +21 -1
- package/icons/aws/augmented-ai-a2i.js +21 -1
- package/icons/aws/aurora.js +21 -1
- package/icons/aws/auto-scaling.js +21 -1
- package/icons/aws/backint-agent.js +21 -1
- package/icons/aws/backup.js +21 -1
- package/icons/aws/batch.js +21 -1
- package/icons/aws/billing-conductor.js +21 -1
- package/icons/aws/bottlerocket.js +21 -1
- package/icons/aws/braket.js +21 -1
- package/icons/aws/budgets.js +21 -1
- package/icons/aws/certificate-manager.js +21 -1
- package/icons/aws/chatbot.js +21 -1
- package/icons/aws/chime-sdk.js +21 -1
- package/icons/aws/chime-voice-connector.js +21 -1
- package/icons/aws/chime.js +21 -1
- package/icons/aws/clean-rooms.js +21 -1
- package/icons/aws/client-vpn.js +21 -1
- package/icons/aws/cloud-control-api.js +21 -1
- package/icons/aws/cloud-development-kit.js +21 -1
- package/icons/aws/cloud-directory.js +21 -1
- package/icons/aws/cloud-formation.js +21 -1
- package/icons/aws/cloud-front.js +21 -1
- package/icons/aws/cloud-hsm.js +21 -1
- package/icons/aws/cloud-map.js +21 -1
- package/icons/aws/cloud-search.js +21 -1
- package/icons/aws/cloud-shell.js +21 -1
- package/icons/aws/cloud-trail.js +21 -1
- package/icons/aws/cloud-wan.js +21 -1
- package/icons/aws/cloud-watch.js +21 -1
- package/icons/aws/cloud9.js +21 -1
- package/icons/aws/code-artifact.js +21 -1
- package/icons/aws/code-build.js +21 -1
- package/icons/aws/code-catalyst.js +21 -1
- package/icons/aws/code-commit.js +21 -1
- package/icons/aws/code-deploy.js +21 -1
- package/icons/aws/code-guru.js +21 -1
- package/icons/aws/code-pipeline.js +21 -1
- package/icons/aws/code-star.js +21 -1
- package/icons/aws/code-whisperer.js +21 -1
- package/icons/aws/cognito.js +21 -1
- package/icons/aws/command-line-interface.js +21 -1
- package/icons/aws/comprehend-medical.js +21 -1
- package/icons/aws/comprehend.js +21 -1
- package/icons/aws/compute-optimizer.js +21 -1
- package/icons/aws/config.js +21 -1
- package/icons/aws/connect.js +21 -1
- package/icons/aws/console-mobile-application.js +21 -1
- package/icons/aws/control-tower.js +21 -1
- package/icons/aws/corretto.js +21 -1
- package/icons/aws/cost-and-usage-report.js +21 -1
- package/icons/aws/cost-explorer.js +21 -1
- package/icons/aws/data-exchange.js +21 -1
- package/icons/aws/data-pipeline.js +21 -1
- package/icons/aws/data-sync.js +21 -1
- package/icons/aws/data-zone.js +21 -1
- package/icons/aws/database-migration-service.js +21 -1
- package/icons/aws/deep-composer.js +21 -1
- package/icons/aws/deep-learning-amis.js +21 -1
- package/icons/aws/deep-learning-containers.js +21 -1
- package/icons/aws/deep-lens.js +21 -1
- package/icons/aws/deep-racer.js +21 -1
- package/icons/aws/detective.js +21 -1
- package/icons/aws/dev-ops-guru.js +21 -1
- package/icons/aws/device-farm.js +21 -1
- package/icons/aws/direct-connect.js +21 -1
- package/icons/aws/directory-service.js +21 -1
- package/icons/aws/distro-for-open-telemetry.js +21 -1
- package/icons/aws/document-db.js +21 -1
- package/icons/aws/dynamo-db.js +21 -1
- package/icons/aws/ec2-auto-scaling.js +21 -1
- package/icons/aws/ec2-image-builder.js +21 -1
- package/icons/aws/ec2.js +21 -1
- package/icons/aws/ecs-anywhere.js +21 -1
- package/icons/aws/efs.js +21 -1
- package/icons/aws/eks-anywhere.js +21 -1
- package/icons/aws/eks-cloud.js +21 -1
- package/icons/aws/eks-distro.js +21 -1
- package/icons/aws/elasti-cache.js +21 -1
- package/icons/aws/elastic-beanstalk.js +21 -1
- package/icons/aws/elastic-block-store.js +21 -1
- package/icons/aws/elastic-container-registry.js +21 -1
- package/icons/aws/elastic-container-service.js +21 -1
- package/icons/aws/elastic-disaster-recovery.js +21 -1
- package/icons/aws/elastic-fabric-adapter.js +21 -1
- package/icons/aws/elastic-inference.js +21 -1
- package/icons/aws/elastic-kubernetes-service.js +21 -1
- package/icons/aws/elastic-load-balancing.js +21 -1
- package/icons/aws/elastic-transcoder.js +21 -1
- package/icons/aws/elemental-appliances-software.js +21 -1
- package/icons/aws/elemental-conductor.js +21 -1
- package/icons/aws/elemental-delta.js +21 -1
- package/icons/aws/elemental-link.js +21 -1
- package/icons/aws/elemental-live.js +21 -1
- package/icons/aws/elemental-media-connect.js +21 -1
- package/icons/aws/elemental-media-convert.js +21 -1
- package/icons/aws/elemental-media-live.js +21 -1
- package/icons/aws/elemental-media-package.js +21 -1
- package/icons/aws/elemental-media-store.js +21 -1
- package/icons/aws/elemental-media-tailor.js +21 -1
- package/icons/aws/elemental-server.js +21 -1
- package/icons/aws/emr.js +21 -1
- package/icons/aws/event-bridge.js +21 -1
- package/icons/aws/express-workflows.js +21 -1
- package/icons/aws/fargate.js +21 -1
- package/icons/aws/fault-injection-simulator.js +21 -1
- package/icons/aws/file-cache.js +21 -1
- package/icons/aws/fin-space.js +21 -1
- package/icons/aws/firewall-manager.js +21 -1
- package/icons/aws/forecast.js +21 -1
- package/icons/aws/fraud-detector.js +21 -1
- package/icons/aws/free-rtos.js +21 -1
- package/icons/aws/fsx-for-lustre.js +21 -1
- package/icons/aws/fsx-for-net-app-ontap.js +21 -1
- package/icons/aws/fsx-for-open-zfs.js +21 -1
- package/icons/aws/fsx-for-wfs.js +21 -1
- package/icons/aws/fsx.js +21 -1
- package/icons/aws/game-kit.js +21 -1
- package/icons/aws/game-lift.js +21 -1
- package/icons/aws/game-sparks.js +21 -1
- package/icons/aws/genomics-cli.js +21 -1
- package/icons/aws/global-accelerator.js +21 -1
- package/icons/aws/glue-data-brew.js +21 -1
- package/icons/aws/glue-elastic-views.js +21 -1
- package/icons/aws/glue.js +21 -1
- package/icons/aws/ground-station.js +21 -1
- package/icons/aws/guard-duty.js +21 -1
- package/icons/aws/health-lake.js +21 -1
- package/icons/aws/honeycode.js +21 -1
- package/icons/aws/iam-identity-center.js +21 -1
- package/icons/aws/identity-and-access-management.js +21 -1
- package/icons/aws/inspector.js +21 -1
- package/icons/aws/interactive-video-service.js +21 -1
- package/icons/aws/io-t-1-click.js +21 -1
- package/icons/aws/io-t-analytics.js +21 -1
- package/icons/aws/io-t-button.js +21 -1
- package/icons/aws/io-t-core.js +21 -1
- package/icons/aws/io-t-device-defender.js +21 -1
- package/icons/aws/io-t-device-management.js +21 -1
- package/icons/aws/io-t-edu-kit.js +21 -1
- package/icons/aws/io-t-events.js +21 -1
- package/icons/aws/io-t-express-link.js +21 -1
- package/icons/aws/io-t-fleet-wise.js +21 -1
- package/icons/aws/io-t-greengrass.js +21 -1
- package/icons/aws/io-t-robo-runner.js +21 -1
- package/icons/aws/io-t-site-wise.js +21 -1
- package/icons/aws/io-t-things-graph.js +21 -1
- package/icons/aws/io-t-twin-maker.js +37 -1
- package/icons/aws/iq.js +21 -1
- package/icons/aws/kendra.js +21 -1
- package/icons/aws/key-management-service.js +21 -1
- package/icons/aws/keyspaces.js +21 -1
- package/icons/aws/kinesis-data-analytics.js +21 -1
- package/icons/aws/kinesis-data-streams.js +21 -1
- package/icons/aws/kinesis-firehose.js +21 -1
- package/icons/aws/kinesis-video-streams.js +21 -1
- package/icons/aws/kinesis.js +21 -1
- package/icons/aws/lake-formation.js +21 -1
- package/icons/aws/lambda.js +21 -1
- package/icons/aws/launch-wizard.js +21 -1
- package/icons/aws/lex.js +21 -1
- package/icons/aws/license-manager.js +21 -1
- package/icons/aws/lightsail.js +21 -1
- package/icons/aws/local-zones.js +21 -1
- package/icons/aws/location-service.js +21 -1
- package/icons/aws/lookout-for-equipment.js +21 -1
- package/icons/aws/lookout-for-metrics.js +21 -1
- package/icons/aws/lookout-for-vision.js +21 -1
- package/icons/aws/lumberyard.js +21 -1
- package/icons/aws/macie.js +21 -1
- package/icons/aws/mainframe-modernization.js +21 -1
- package/icons/aws/managed-blockchain.js +21 -1
- package/icons/aws/managed-grafana.js +21 -1
- package/icons/aws/managed-service-for-prometheus.js +21 -1
- package/icons/aws/managed-services.js +21 -1
- package/icons/aws/managed-streaming-for-apache-kafka.js +21 -1
- package/icons/aws/managed-workflows-for-apache-airflow.js +21 -1
- package/icons/aws/management-console.js +21 -1
- package/icons/aws/marketplace-dark.js +15 -1
- package/icons/aws/marketplace-light.js +15 -1
- package/icons/aws/memory-db-for-redis.js +21 -1
- package/icons/aws/migration-evaluator.js +21 -1
- package/icons/aws/migration-hub.js +21 -1
- package/icons/aws/monitron.js +21 -1
- package/icons/aws/mq.js +21 -1
- package/icons/aws/neptune.js +21 -1
- package/icons/aws/network-firewall.js +21 -1
- package/icons/aws/neuron.js +21 -1
- package/icons/aws/nice-dcv.js +21 -1
- package/icons/aws/nice-engin-frame.js +21 -1
- package/icons/aws/nimble-studio.js +21 -1
- package/icons/aws/nitro-enclaves.js +21 -1
- package/icons/aws/omics.js +21 -1
- package/icons/aws/open-3d-engine.js +21 -1
- package/icons/aws/open-search-service.js +21 -1
- package/icons/aws/ops-works.js +21 -1
- package/icons/aws/organizations.js +21 -1
- package/icons/aws/outposts-family.js +21 -1
- package/icons/aws/outposts-rack.js +21 -1
- package/icons/aws/outposts-servers.js +21 -1
- package/icons/aws/panorama.js +21 -1
- package/icons/aws/parallel-cluster.js +21 -1
- package/icons/aws/personal-health-dashboard.js +21 -1
- package/icons/aws/personalize.js +21 -1
- package/icons/aws/pinpoint-apis.js +21 -1
- package/icons/aws/pinpoint.js +21 -1
- package/icons/aws/polly.js +21 -1
- package/icons/aws/private-5g.js +21 -1
- package/icons/aws/private-certificate-authority.js +28 -1
- package/icons/aws/private-link.js +21 -1
- package/icons/aws/professional-services.js +21 -1
- package/icons/aws/proton.js +21 -1
- package/icons/aws/quantum-ledger-database.js +21 -1
- package/icons/aws/quick-sight.js +21 -1
- package/icons/aws/rds-on-vmware.js +21 -1
- package/icons/aws/rds.js +21 -1
- package/icons/aws/re-post.js +21 -1
- package/icons/aws/red-hat-open-shift-service-on-aws.js +21 -1
- package/icons/aws/redshift.js +21 -1
- package/icons/aws/rekognition.js +21 -1
- package/icons/aws/reserved-instance-reporting.js +21 -1
- package/icons/aws/resilience-hub.js +21 -1
- package/icons/aws/resource-access-manager.js +21 -1
- package/icons/aws/resource-explorer.js +21 -1
- package/icons/aws/robo-maker.js +21 -1
- package/icons/aws/route-53.js +21 -1
- package/icons/aws/s3-on-outposts.js +21 -1
- package/icons/aws/sage-maker-ground-truth.js +21 -1
- package/icons/aws/sage-maker-studio-lab.js +21 -1
- package/icons/aws/sage-maker.js +21 -1
- package/icons/aws/savings-plans.js +21 -1
- package/icons/aws/secrets-manager.js +21 -1
- package/icons/aws/security-hub.js +21 -1
- package/icons/aws/security-lake.js +21 -1
- package/icons/aws/server-migration-service.js +21 -1
- package/icons/aws/serverless-application-repository.js +21 -1
- package/icons/aws/service-catalog.js +21 -1
- package/icons/aws/service-management-connector.js +28 -1
- package/icons/aws/shield.js +21 -1
- package/icons/aws/signer.js +21 -1
- package/icons/aws/sim-space-weaver.js +21 -1
- package/icons/aws/simple-email-service.js +21 -1
- package/icons/aws/simple-notification-service.js +21 -1
- package/icons/aws/simple-queue-service.js +21 -1
- package/icons/aws/simple-storage-service-glacier.js +21 -1
- package/icons/aws/simple-storage-service.js +21 -1
- package/icons/aws/site-to-site-vpn.js +21 -1
- package/icons/aws/snowball-edge.js +21 -1
- package/icons/aws/snowball.js +21 -1
- package/icons/aws/snowcone.js +21 -1
- package/icons/aws/snowmobile.js +21 -1
- package/icons/aws/step-functions.js +21 -1
- package/icons/aws/storage-gateway.js +21 -1
- package/icons/aws/sumerian.js +21 -1
- package/icons/aws/supply-chain.js +21 -1
- package/icons/aws/support.js +21 -1
- package/icons/aws/systems-manager.js +21 -1
- package/icons/aws/tensor-flow-on-aws.js +21 -1
- package/icons/aws/textract.js +21 -1
- package/icons/aws/thinkbox-deadline.js +21 -1
- package/icons/aws/thinkbox-frost.js +21 -1
- package/icons/aws/thinkbox-krakatoa.js +21 -1
- package/icons/aws/thinkbox-sequoia.js +21 -1
- package/icons/aws/thinkbox-stoke.js +21 -1
- package/icons/aws/thinkbox-xmesh.js +21 -1
- package/icons/aws/timestream.js +21 -1
- package/icons/aws/tools-and-sdks.js +21 -1
- package/icons/aws/torch-serve.js +21 -1
- package/icons/aws/training-certification.js +21 -1
- package/icons/aws/transcribe.js +21 -1
- package/icons/aws/transfer-family.js +21 -1
- package/icons/aws/transit-gateway.js +21 -1
- package/icons/aws/translate.js +21 -1
- package/icons/aws/trusted-advisor.js +21 -1
- package/icons/aws/verified-access.js +21 -1
- package/icons/aws/verified-permissions.js +21 -1
- package/icons/aws/virtual-private-cloud.js +21 -1
- package/icons/aws/vmware-cloud-on-aws.js +21 -1
- package/icons/aws/vpc-lattice.js +21 -1
- package/icons/aws/waf.js +21 -1
- package/icons/aws/wavelength.js +21 -1
- package/icons/aws/well-architected-tool.js +21 -1
- package/icons/aws/wickr.js +21 -1
- package/icons/aws/work-docs-sdk.js +21 -1
- package/icons/aws/work-docs.js +21 -1
- package/icons/aws/work-link.js +21 -1
- package/icons/aws/work-mail.js +21 -1
- package/icons/aws/work-spaces-family.js +21 -1
- package/icons/aws/x-ray.js +21 -1
- package/icons/azure/abs-member.js +32 -1
- package/icons/azure/active-directory-connect-health.js +132 -1
- package/icons/azure/activity-log.js +33 -1
- package/icons/azure/administrative-units.js +102 -1
- package/icons/azure/advisor.js +44 -1
- package/icons/azure/ai-studio.js +105 -1
- package/icons/azure/aks-automatic.js +105 -1
- package/icons/azure/aks-istio.js +96 -1
- package/icons/azure/alerts.js +29 -1
- package/icons/azure/all-resources.js +21 -1
- package/icons/azure/analysis-services.js +67 -1
- package/icons/azure/anomaly-detector.js +44 -1
- package/icons/azure/api-center.js +42 -1
- package/icons/azure/api-connections.js +66 -1
- package/icons/azure/api-management-services.js +51 -1
- package/icons/azure/api-proxy.js +32 -1
- package/icons/azure/app-compliance-automation.js +82 -1
- package/icons/azure/app-configuration.js +56 -1
- package/icons/azure/app-registrations.js +39 -1
- package/icons/azure/app-service-certificates.js +42 -1
- package/icons/azure/app-service-domains.js +23 -1
- package/icons/azure/app-service-environments.js +36 -1
- package/icons/azure/app-service-plans.js +66 -1
- package/icons/azure/app-services.js +104 -1
- package/icons/azure/app-space-component.js +39 -1
- package/icons/azure/app-space.js +37 -1
- package/icons/azure/applens.js +45 -1
- package/icons/azure/application-gateway-containers.js +134 -1
- package/icons/azure/application-gateways.js +92 -1
- package/icons/azure/application-group.js +21 -1
- package/icons/azure/application-insights.js +57 -1
- package/icons/azure/application-security-groups.js +54 -1
- package/icons/azure/aquila.js +95 -1
- package/icons/azure/arc-data-services.js +60 -1
- package/icons/azure/arc-kubernetes.js +139 -1
- package/icons/azure/arc-machines.js +40 -1
- package/icons/azure/arc-postgre-sql.js +73 -1
- package/icons/azure/arc-sql-managed-instance.js +75 -1
- package/icons/azure/arc-sql-server.js +40 -1
- package/icons/azure/atm-multistack.js +59 -1
- package/icons/azure/auto-scale.js +43 -1
- package/icons/azure/automanaged-vm.js +65 -1
- package/icons/azure/automation-accounts.js +62 -1
- package/icons/azure/availability-sets.js +70 -1
- package/icons/azure/avs-vm.js +32 -1
- package/icons/azure/azure-a.js +46 -1
- package/icons/azure/azure-ad-b2c.js +129 -1
- package/icons/azure/azure-api-for-fhir.js +33 -1
- package/icons/azure/azure-applied-ai-services.js +81 -1
- package/icons/azure/azure-arc.js +75 -1
- package/icons/azure/azure-attestation.js +35 -1
- package/icons/azure/azure-backup-center.js +63 -1
- package/icons/azure/azure-blockchain-service.js +51 -1
- package/icons/azure/azure-center-for-sap.js +37 -1
- package/icons/azure/azure-chaos-studio.js +75 -1
- package/icons/azure/azure-cloud-shell.js +39 -1
- package/icons/azure/azure-communication-services.js +63 -1
- package/icons/azure/azure-communications-gateway.js +43 -1
- package/icons/azure/azure-compute-galleries.js +35 -1
- package/icons/azure/azure-cosmos-db.js +47 -1
- package/icons/azure/azure-data-catalog.js +91 -1
- package/icons/azure/azure-data-explorer-clusters.js +126 -1
- package/icons/azure/azure-database-maria-db-server.js +56 -1
- package/icons/azure/azure-database-migration-services.js +83 -1
- package/icons/azure/azure-database-my-sql-server.js +56 -1
- package/icons/azure/azure-database-postgre-sql-server-group.js +65 -1
- package/icons/azure/azure-database-postgre-sql-server.js +57 -1
- package/icons/azure/azure-databox-gateway.js +39 -1
- package/icons/azure/azure-databricks.js +12 -1
- package/icons/azure/azure-deployment-environments.js +65 -1
- package/icons/azure/azure-dev-ops.js +21 -1
- package/icons/azure/azure-dev-tunnels.js +48 -1
- package/icons/azure/azure-edge-hardware-center.js +69 -1
- package/icons/azure/azure-experimentation-studio.js +88 -1
- package/icons/azure/azure-fileshares.js +46 -1
- package/icons/azure/azure-firewall-manager.js +60 -1
- package/icons/azure/azure-firewall-policy.js +37 -1
- package/icons/azure/azure-hcp-cache.js +23 -1
- package/icons/azure/azure-hpc-workbenches.js +112 -1
- package/icons/azure/azure-hybrid-center.js +33 -1
- package/icons/azure/azure-information-protection.js +95 -1
- package/icons/azure/azure-io-t-operations.js +57 -1
- package/icons/azure/azure-lighthouse.js +35 -1
- package/icons/azure/azure-load-testing.js +78 -1
- package/icons/azure/azure-managed-grafana.js +19 -1
- package/icons/azure/azure-maps-accounts.js +16 -1
- package/icons/azure/azure-media-service.js +107 -1
- package/icons/azure/azure-migrate.js +57 -1
- package/icons/azure/azure-monitor-dashboard.js +58 -1
- package/icons/azure/azure-monitor-pipeline.js +101 -1
- package/icons/azure/azure-monitors-for-sap-solutions.js +71 -1
- package/icons/azure/azure-net-app-files.js +36 -1
- package/icons/azure/azure-network-function-manager-functions.js +94 -1
- package/icons/azure/azure-network-function-manager.js +98 -1
- package/icons/azure/azure-object-understanding.js +50 -1
- package/icons/azure/azure-open-ai.js +29 -1
- package/icons/azure/azure-operator-5g-core.js +86 -1
- package/icons/azure/azure-operator-insights.js +42 -1
- package/icons/azure/azure-operator-nexus.js +87 -1
- package/icons/azure/azure-operator-service-manager.js +41 -1
- package/icons/azure/azure-orbital.js +115 -1
- package/icons/azure/azure-programmable-connectivity.js +168 -1
- package/icons/azure/azure-purview-accounts.js +100 -1
- package/icons/azure/azure-quotas.js +54 -1
- package/icons/azure/azure-red-hat-open-shift.js +44 -1
- package/icons/azure/azure-sentinel.js +37 -1
- package/icons/azure/azure-service-bus.js +77 -1
- package/icons/azure/azure-sphere.js +68 -1
- package/icons/azure/azure-spring-apps.js +111 -1
- package/icons/azure/azure-sql-edge.js +157 -1
- package/icons/azure/azure-sql-server-stretch-databases.js +82 -1
- package/icons/azure/azure-sql-vm.js +37 -1
- package/icons/azure/azure-sql.js +27 -1
- package/icons/azure/azure-stack-edge.js +44 -1
- package/icons/azure/azure-stack-hci-sizer.js +90 -1
- package/icons/azure/azure-stack.js +54 -1
- package/icons/azure/azure-storage-mover.js +120 -1
- package/icons/azure/azure-support-center-blue.js +53 -1
- package/icons/azure/azure-sustainability.js +75 -1
- package/icons/azure/azure-synapse-analytics.js +60 -1
- package/icons/azure/azure-token-service.js +46 -1
- package/icons/azure/azure-video-indexer.js +82 -1
- package/icons/azure/azure-virtual-desktop.js +19 -1
- package/icons/azure/azure-vmware-solution.js +57 -1
- package/icons/azure/azure-workbooks.js +78 -1
- package/icons/azure/azurite.js +34 -1
- package/icons/azure/backlog.js +48 -1
- package/icons/azure/backup-vault.js +71 -1
- package/icons/azure/bare-metal-infrastructure.js +63 -1
- package/icons/azure/bastions.js +71 -1
- package/icons/azure/batch-accounts.js +52 -1
- package/icons/azure/batch-ai.js +56 -1
- package/icons/azure/biz-talk.js +39 -1
- package/icons/azure/blob-block.js +17 -1
- package/icons/azure/blob-page.js +43 -1
- package/icons/azure/blockchain-applications.js +43 -1
- package/icons/azure/blueprints.js +56 -1
- package/icons/azure/bonsai.js +63 -1
- package/icons/azure/bot-services.js +43 -1
- package/icons/azure/branch.js +43 -1
- package/icons/azure/browser.js +16 -1
- package/icons/azure/bug.js +26 -1
- package/icons/azure/builds.js +48 -1
- package/icons/azure/business-process-tracking.js +28 -1
- package/icons/azure/cache-redis.js +72 -1
- package/icons/azure/cache.js +113 -1
- package/icons/azure/capacity-reservation-groups.js +47 -1
- package/icons/azure/capacity.js +74 -1
- package/icons/azure/cdn-profiles.js +32 -1
- package/icons/azure/central-service-instance-for-sap.js +55 -1
- package/icons/azure/ceres.js +58 -1
- package/icons/azure/change-analysis.js +93 -1
- package/icons/azure/client-apps.js +21 -1
- package/icons/azure/cloud-services-classic.js +48 -1
- package/icons/azure/cloud-services-extended-support.js +78 -1
- package/icons/azure/cloud-test.js +58 -1
- package/icons/azure/code-optimization.js +146 -1
- package/icons/azure/code.js +94 -1
- package/icons/azure/cognitive-search.js +26 -1
- package/icons/azure/cognitive-services-decisions.js +139 -1
- package/icons/azure/cognitive-services.js +42 -1
- package/icons/azure/collaborative-service.js +91 -1
- package/icons/azure/commit.js +30 -1
- package/icons/azure/community-images.js +68 -1
- package/icons/azure/compliance-center.js +70 -1
- package/icons/azure/compliance.js +35 -1
- package/icons/azure/compute-fleet.js +102 -1
- package/icons/azure/computer-vision.js +35 -1
- package/icons/azure/conditional-access.js +45 -1
- package/icons/azure/confidential-ledgers.js +96 -1
- package/icons/azure/connected-cache.js +99 -1
- package/icons/azure/connected-vehicle-platform.js +111 -1
- package/icons/azure/connections.js +54 -1
- package/icons/azure/consortium.js +63 -1
- package/icons/azure/container-apps-environments.js +66 -1
- package/icons/azure/container-instances.js +37 -1
- package/icons/azure/container-registries.js +68 -1
- package/icons/azure/container-services-deprecated.js +142 -1
- package/icons/azure/content-moderators.js +63 -1
- package/icons/azure/content-safety.js +88 -1
- package/icons/azure/controls-horizontal.js +135 -1
- package/icons/azure/controls.js +33 -1
- package/icons/azure/cost-alerts.js +28 -1
- package/icons/azure/cost-analysis.js +35 -1
- package/icons/azure/cost-budgets.js +30 -1
- package/icons/azure/cost-export.js +36 -1
- package/icons/azure/cost-management-and-billing.js +41 -1
- package/icons/azure/cost-management.js +46 -1
- package/icons/azure/counter.js +33 -1
- package/icons/azure/cubes.js +16 -1
- package/icons/azure/custom-ip-prefix.js +51 -1
- package/icons/azure/custom-vision.js +59 -1
- package/icons/azure/customer-lockbox-for-microsoft-azure.js +64 -1
- package/icons/azure/dashboard-hub.js +94 -1
- package/icons/azure/dashboard.js +42 -1
- package/icons/azure/data-box.js +33 -1
- package/icons/azure/data-collection-rules.js +64 -1
- package/icons/azure/data-factories.js +42 -1
- package/icons/azure/data-lake-analytics.js +43 -1
- package/icons/azure/data-lake-storage-gen1.js +49 -1
- package/icons/azure/data-lake-store-gen1.js +49 -1
- package/icons/azure/data-share-invitations.js +34 -1
- package/icons/azure/data-shares.js +67 -1
- package/icons/azure/database-instance-for-sap.js +80 -1
- package/icons/azure/ddo-s-protection-plans.js +47 -1
- package/icons/azure/dedicated-hsm.js +49 -1
- package/icons/azure/defender-cm-local-manager.js +175 -1
- package/icons/azure/defender-dcs-controller.js +99 -1
- package/icons/azure/defender-distributer-control-system.js +67 -1
- package/icons/azure/defender-engineering-station.js +115 -1
- package/icons/azure/defender-external-management.js +132 -1
- package/icons/azure/defender-freezer-monitor.js +217 -1
- package/icons/azure/defender-historian.js +53 -1
- package/icons/azure/defender-hmi.js +54 -1
- package/icons/azure/defender-industrial-packaging-system.js +97 -1
- package/icons/azure/defender-industrial-printer.js +51 -1
- package/icons/azure/defender-industrial-robot.js +165 -1
- package/icons/azure/defender-industrial-scale-system.js +80 -1
- package/icons/azure/defender-marquee.js +68 -1
- package/icons/azure/defender-meter.js +156 -1
- package/icons/azure/defender-plc.js +66 -1
- package/icons/azure/defender-pneumatic-device.js +72 -1
- package/icons/azure/defender-programable-board.js +126 -1
- package/icons/azure/defender-relay.js +67 -1
- package/icons/azure/defender-robot-controller.js +123 -1
- package/icons/azure/defender-rtu.js +23 -1
- package/icons/azure/defender-sensor.js +55 -1
- package/icons/azure/defender-slot.js +31 -1
- package/icons/azure/defender-web-guiding-system.js +266 -1
- package/icons/azure/detonation.js +41 -1
- package/icons/azure/dev-console.js +30 -1
- package/icons/azure/dev-ops-starter.js +102 -1
- package/icons/azure/dev-test-labs.js +46 -1
- package/icons/azure/device-compliance.js +62 -1
- package/icons/azure/device-configuration.js +66 -1
- package/icons/azure/device-enrollment.js +69 -1
- package/icons/azure/device-provisioning-services.js +54 -1
- package/icons/azure/device-security-apple.js +54 -1
- package/icons/azure/device-security-google.js +54 -1
- package/icons/azure/device-security-windows.js +54 -1
- package/icons/azure/device-update-io-t-hub.js +46 -1
- package/icons/azure/devices.js +29 -1
- package/icons/azure/diagnostics-settings.js +51 -1
- package/icons/azure/digital-twins.js +73 -1
- package/icons/azure/disk-encryption-sets.js +63 -1
- package/icons/azure/disk-pool.js +92 -1
- package/icons/azure/disks-classic.js +74 -1
- package/icons/azure/disks-snapshots.js +71 -1
- package/icons/azure/disks.js +63 -1
- package/icons/azure/dns-multistack.js +49 -1
- package/icons/azure/dns-private-resolver.js +50 -1
- package/icons/azure/dns-security-policy.js +90 -1
- package/icons/azure/dns-zones.js +37 -1
- package/icons/azure/download.js +60 -1
- package/icons/azure/e-books.js +42 -1
- package/icons/azure/edge-management.js +64 -1
- package/icons/azure/education.js +42 -1
- package/icons/azure/elastic-job-agents.js +61 -1
- package/icons/azure/elastic-san.js +65 -1
- package/icons/azure/endpoint-analytics.js +83 -1
- package/icons/azure/enterprise-applications.js +66 -1
- package/icons/azure/entra-connect-health.js +132 -1
- package/icons/azure/entra-connect-sync.js +86 -1
- package/icons/azure/entra-connect.js +123 -1
- package/icons/azure/entra-domain-services.js +105 -1
- package/icons/azure/entra-global-secure-access.js +76 -1
- package/icons/azure/entra-id-protection.js +74 -1
- package/icons/azure/entra-identity-custom-roles.js +62 -1
- package/icons/azure/entra-identity-licenses.js +85 -1
- package/icons/azure/entra-identity-risky-signins.js +28 -1
- package/icons/azure/entra-identity-risky-users.js +28 -1
- package/icons/azure/entra-identity-roles-and-administrators.js +53 -1
- package/icons/azure/entra-internet-access.js +105 -1
- package/icons/azure/entra-managed-identities.js +120 -1
- package/icons/azure/entra-private-access.js +104 -1
- package/icons/azure/entra-privleged-identity-management.js +120 -1
- package/icons/azure/entra-verified-id.js +75 -1
- package/icons/azure/error.js +30 -1
- package/icons/azure/event-grid-domains.js +75 -1
- package/icons/azure/event-grid-subscriptions.js +75 -1
- package/icons/azure/event-grid-topics.js +90 -1
- package/icons/azure/event-hub-clusters.js +77 -1
- package/icons/azure/event-hubs.js +64 -1
- package/icons/azure/exchange-access.js +45 -1
- package/icons/azure/exchange-on-premises-access.js +39 -1
- package/icons/azure/express-route-circuits.js +60 -1
- package/icons/azure/express-route-direct.js +61 -1
- package/icons/azure/express-route-traffic-collector.js +97 -1
- package/icons/azure/extended-security-updates.js +44 -1
- package/icons/azure/extensions.js +28 -1
- package/icons/azure/external-identities.js +42 -1
- package/icons/azure/face-apis.js +19 -1
- package/icons/azure/feature-previews.js +21 -1
- package/icons/azure/fhir-service.js +60 -1
- package/icons/azure/fiji.js +42 -1
- package/icons/azure/file.js +29 -1
- package/icons/azure/files.js +45 -1
- package/icons/azure/firewalls.js +32 -1
- package/icons/azure/folder-blank.js +39 -1
- package/icons/azure/folder-website.js +123 -1
- package/icons/azure/form-recognizers.js +48 -1
- package/icons/azure/free-services.js +43 -1
- package/icons/azure/front-door-and-cdn-profiles.js +37 -1
- package/icons/azure/ftp.js +17 -1
- package/icons/azure/function-apps.js +61 -1
- package/icons/azure/gear.js +37 -1
- package/icons/azure/genomics-accounts.js +68 -1
- package/icons/azure/genomics.js +57 -1
- package/icons/azure/globe-error.js +42 -1
- package/icons/azure/globe-success.js +52 -1
- package/icons/azure/globe-warning.js +53 -1
- package/icons/azure/groups.js +42 -1
- package/icons/azure/guide.js +17 -1
- package/icons/azure/hd-insight-clusters.js +71 -1
- package/icons/azure/hdi-aks-cluster.js +60 -1
- package/icons/azure/heart.js +31 -1
- package/icons/azure/help-and-support.js +55 -1
- package/icons/azure/host-groups.js +48 -1
- package/icons/azure/host-pools.js +19 -1
- package/icons/azure/hosts.js +46 -1
- package/icons/azure/ic-m-troubleshooting.js +60 -1
- package/icons/azure/identity-governance.js +52 -1
- package/icons/azure/identity-multi-factor-authentication.js +117 -1
- package/icons/azure/identity-secure-score.js +55 -1
- package/icons/azure/image-definitions.js +38 -1
- package/icons/azure/image-templates.js +43 -1
- package/icons/azure/image-versions.js +38 -1
- package/icons/azure/image.js +31 -1
- package/icons/azure/images.js +37 -1
- package/icons/azure/immersive-readers.js +82 -1
- package/icons/azure/import-export-jobs.js +25 -1
- package/icons/azure/industrial-io-t.js +97 -1
- package/icons/azure/information.js +21 -1
- package/icons/azure/infrastructure-backup.js +89 -1
- package/icons/azure/input-output.js +97 -1
- package/icons/azure/instance-pools.js +87 -1
- package/icons/azure/integration-accounts.js +52 -1
- package/icons/azure/integration-environments.js +94 -1
- package/icons/azure/integration-service-environments.js +90 -1
- package/icons/azure/internet-analyzer-profiles.js +59 -1
- package/icons/azure/intune-app-protection.js +79 -1
- package/icons/azure/intune-for-education.js +79 -1
- package/icons/azure/intune-trends.js +40 -1
- package/icons/azure/intune.js +46 -1
- package/icons/azure/io-t-central-applications.js +20 -1
- package/icons/azure/io-t-edge.js +25 -1
- package/icons/azure/io-t-hub.js +36 -1
- package/icons/azure/ip-address-manager.js +63 -1
- package/icons/azure/ip-groups.js +45 -1
- package/icons/azure/journey-hub.js +30 -1
- package/icons/azure/key-vaults.js +61 -1
- package/icons/azure/keys.js +97 -1
- package/icons/azure/kubernetes-fleet-manager.js +73 -1
- package/icons/azure/kubernetes-services.js +142 -1
- package/icons/azure/lab-accounts.js +69 -1
- package/icons/azure/lab-services.js +46 -1
- package/icons/azure/language-understanding.js +25 -1
- package/icons/azure/language.js +71 -1
- package/icons/azure/launch-portal.js +36 -1
- package/icons/azure/learn.js +61 -1
- package/icons/azure/load-balancer-hub.js +101 -1
- package/icons/azure/load-balancers.js +28 -1
- package/icons/azure/load-test.js +61 -1
- package/icons/azure/load-testing.js +71 -1
- package/icons/azure/local-network-gateways.js +44 -1
- package/icons/azure/location.js +34 -1
- package/icons/azure/log-analytics-query-pack.js +68 -1
- package/icons/azure/log-analytics-workspaces.js +58 -1
- package/icons/azure/log-streaming.js +57 -1
- package/icons/azure/logic-apps-custom-connector.js +76 -1
- package/icons/azure/logic-apps.js +65 -1
- package/icons/azure/machine-learning-studio-classic-web-services.js +49 -1
- package/icons/azure/machine-learning-studio-web-service-plans.js +84 -1
- package/icons/azure/machine-learning-studio-workspaces.js +55 -1
- package/icons/azure/machine-learning.js +29 -1
- package/icons/azure/machines-azure-arc.js +27 -1
- package/icons/azure/maintenance-configuration.js +62 -1
- package/icons/azure/managed-applications-center.js +55 -1
- package/icons/azure/managed-database.js +79 -1
- package/icons/azure/managed-desktop.js +40 -1
- package/icons/azure/managed-dev-ops-pools.js +59 -1
- package/icons/azure/managed-file-shares.js +59 -1
- package/icons/azure/managed-identities.js +66 -1
- package/icons/azure/managed-instance-apache-cassandra.js +100 -1
- package/icons/azure/managed-service-fabric.js +109 -1
- package/icons/azure/management-groups.js +77 -1
- package/icons/azure/management-portal.js +23 -1
- package/icons/azure/marketplace-management.js +47 -1
- package/icons/azure/marketplace.js +38 -1
- package/icons/azure/med-tech-service.js +87 -1
- package/icons/azure/media-file.js +36 -1
- package/icons/azure/media.js +108 -1
- package/icons/azure/mesh-applications.js +47 -1
- package/icons/azure/metrics-advisor.js +58 -1
- package/icons/azure/metrics.js +34 -1
- package/icons/azure/microsoft-defender-easm.js +69 -1
- package/icons/azure/microsoft-defender-for-cloud.js +61 -1
- package/icons/azure/microsoft-defender-for-io-t.js +54 -1
- package/icons/azure/microsoft-dev-box.js +143 -1
- package/icons/azure/mindaro.js +47 -1
- package/icons/azure/mission-landing-zone.js +48 -1
- package/icons/azure/mobile-engagement.js +46 -1
- package/icons/azure/mobile-networks.js +86 -1
- package/icons/azure/mobile.js +28 -1
- package/icons/azure/modular-data-center.js +83 -1
- package/icons/azure/module.js +25 -1
- package/icons/azure/monitor-health-models.js +110 -1
- package/icons/azure/monitor.js +61 -1
- package/icons/azure/multi-tenancy.js +80 -1
- package/icons/azure/multifactor-authentication.js +84 -1
- package/icons/azure/my-customers.js +42 -1
- package/icons/azure/nat.js +56 -1
- package/icons/azure/network-interfaces.js +52 -1
- package/icons/azure/network-managers.js +55 -1
- package/icons/azure/network-security-groups.js +53 -1
- package/icons/azure/network-security-perimeters.js +113 -1
- package/icons/azure/network-watcher.js +55 -1
- package/icons/azure/notification-hub-namespaces.js +33 -1
- package/icons/azure/notification-hubs.js +22 -1
- package/icons/azure/offers.js +35 -1
- package/icons/azure/on-premises-data-gateways.js +44 -1
- package/icons/azure/open-supply-chain-platform.js +111 -1
- package/icons/azure/operation-log-classic.js +44 -1
- package/icons/azure/oracle-database.js +55 -1
- package/icons/azure/os-images-classic.js +60 -1
- package/icons/azure/osconfig.js +82 -1
- package/icons/azure/outbound-connection.js +24 -1
- package/icons/azure/partner-namespace.js +97 -1
- package/icons/azure/partner-registration.js +117 -1
- package/icons/azure/partner-topic.js +93 -1
- package/icons/azure/peering-service.js +27 -1
- package/icons/azure/peerings.js +44 -1
- package/icons/azure/personalizers.js +99 -1
- package/icons/azure/plans.js +40 -1
- package/icons/azure/policy.js +34 -1
- package/icons/azure/power-bi-embedded.js +69 -1
- package/icons/azure/power-platform.js +163 -1
- package/icons/azure/power-up.js +42 -1
- package/icons/azure/power.js +31 -1
- package/icons/azure/powershell.js +30 -1
- package/icons/azure/preview-features.js +72 -1
- package/icons/azure/private-endpoints.js +80 -1
- package/icons/azure/private-link-service.js +83 -1
- package/icons/azure/private-link-services.js +72 -1
- package/icons/azure/private-link.js +94 -1
- package/icons/azure/process-explorer.js +23 -1
- package/icons/azure/production-ready-database.js +70 -1
- package/icons/azure/proximity-placement-groups.js +71 -1
- package/icons/azure/public-ip-addresses-classic.js +36 -1
- package/icons/azure/public-ip-addresses.js +19 -1
- package/icons/azure/public-ip-prefixes.js +85 -1
- package/icons/azure/qn-a-makers.js +61 -1
- package/icons/azure/quickstart-center.js +76 -1
- package/icons/azure/recent.js +57 -1
- package/icons/azure/recovery-services-vaults.js +67 -1
- package/icons/azure/region-management.js +42 -1
- package/icons/azure/relays.js +45 -1
- package/icons/azure/remote-rendering.js +71 -1
- package/icons/azure/reservations.js +37 -1
- package/icons/azure/reserved-capacity.js +45 -1
- package/icons/azure/reserved-ip-addresses-classic.js +38 -1
- package/icons/azure/resource-explorer.js +33 -1
- package/icons/azure/resource-graph-explorer.js +58 -1
- package/icons/azure/resource-group-list.js +48 -1
- package/icons/azure/resource-groups.js +40 -1
- package/icons/azure/resource-guard.js +46 -1
- package/icons/azure/resource-linked.js +51 -1
- package/icons/azure/resource-management-private-link.js +61 -1
- package/icons/azure/resource-mover.js +20 -1
- package/icons/azure/resources-provider.js +27 -1
- package/icons/azure/restore-points-collections.js +73 -1
- package/icons/azure/restore-points.js +72 -1
- package/icons/azure/route-filters.js +39 -1
- package/icons/azure/route-tables.js +62 -1
- package/icons/azure/rtos.js +64 -1
- package/icons/azure/savings-plans.js +75 -1
- package/icons/azure/scheduler-job-collections.js +73 -1
- package/icons/azure/scheduler.js +75 -1
- package/icons/azure/scvmm-management-servers.js +79 -1
- package/icons/azure/search-grid.js +48 -1
- package/icons/azure/search.js +28 -1
- package/icons/azure/security-baselines.js +55 -1
- package/icons/azure/security.js +22 -1
- package/icons/azure/send-grid-accounts.js +42 -1
- package/icons/azure/server-farm.js +65 -1
- package/icons/azure/serverless-search.js +65 -1
- package/icons/azure/service-catalog-mad.js +65 -1
- package/icons/azure/service-endpoint-policies.js +75 -1
- package/icons/azure/service-fabric-clusters.js +97 -1
- package/icons/azure/service-health.js +45 -1
- package/icons/azure/service-providers.js +71 -1
- package/icons/azure/shared-image-galleries.js +32 -1
- package/icons/azure/signal-r.js +22 -1
- package/icons/azure/software-as-a-service.js +65 -1
- package/icons/azure/software-updates.js +22 -1
- package/icons/azure/solutions.js +58 -1
- package/icons/azure/sonic-dash.js +95 -1
- package/icons/azure/spatial-anchor-accounts.js +88 -1
- package/icons/azure/speech-services.js +43 -1
- package/icons/azure/spot-vm.js +40 -1
- package/icons/azure/spot-vmss.js +77 -1
- package/icons/azure/sql-data-warehouses.js +82 -1
- package/icons/azure/sql-database.js +63 -1
- package/icons/azure/sql-elastic-pools.js +89 -1
- package/icons/azure/sql-managed-instance.js +73 -1
- package/icons/azure/sql-server-registries.js +75 -1
- package/icons/azure/sql-server.js +46 -1
- package/icons/azure/ssd.js +36 -1
- package/icons/azure/ssh-keys.js +42 -1
- package/icons/azure/ssis-lift-and-shift-ir.js +72 -1
- package/icons/azure/stack-hci-premium.js +144 -1
- package/icons/azure/static-apps.js +29 -1
- package/icons/azure/stor-simple-data-managers.js +57 -1
- package/icons/azure/stor-simple-device-managers.js +38 -1
- package/icons/azure/storage-accounts-classic.js +53 -1
- package/icons/azure/storage-accounts.js +35 -1
- package/icons/azure/storage-actions.js +88 -1
- package/icons/azure/storage-azure-files.js +47 -1
- package/icons/azure/storage-container.js +35 -1
- package/icons/azure/storage-explorer.js +38 -1
- package/icons/azure/storage-functions.js +57 -1
- package/icons/azure/storage-queue.js +24 -1
- package/icons/azure/storage-sync-services.js +74 -1
- package/icons/azure/stream-analytics-jobs.js +53 -1
- package/icons/azure/subnet.js +43 -1
- package/icons/azure/subscriptions.js +41 -1
- package/icons/azure/system-topic.js +182 -1
- package/icons/azure/table.js +23 -1
- package/icons/azure/tag.js +28 -1
- package/icons/azure/tags.js +46 -1
- package/icons/azure/targets-management.js +54 -1
- package/icons/azure/template-specs.js +67 -1
- package/icons/azure/templates.js +33 -1
- package/icons/azure/tenant-properties.js +90 -1
- package/icons/azure/tenant-status.js +40 -1
- package/icons/azure/test-base.js +56 -1
- package/icons/azure/tfs-vc-repository.js +97 -1
- package/icons/azure/time-series-data-sets.js +63 -1
- package/icons/azure/time-series-insights-access-policies.js +42 -1
- package/icons/azure/time-series-insights-environments.js +39 -1
- package/icons/azure/time-series-insights-event-sources.js +57 -1
- package/icons/azure/toolbox.js +26 -1
- package/icons/azure/traffic-manager-profiles.js +47 -1
- package/icons/azure/translator-text.js +75 -1
- package/icons/azure/troubleshoot.js +38 -1
- package/icons/azure/universal-print.js +74 -1
- package/icons/azure/update-management-center.js +135 -1
- package/icons/azure/updates.js +47 -1
- package/icons/azure/user-privacy.js +55 -1
- package/icons/azure/user-settings.js +68 -1
- package/icons/azure/user-subscriptions.js +104 -1
- package/icons/azure/users.js +26 -1
- package/icons/azure/verifiable-credentials.js +99 -1
- package/icons/azure/verification-as-a-service.js +84 -1
- package/icons/azure/versions.js +24 -1
- package/icons/azure/video-analyzers.js +42 -1
- package/icons/azure/virtual-clusters.js +99 -1
- package/icons/azure/virtual-enclaves.js +40 -1
- package/icons/azure/virtual-instance-for-sap.js +81 -1
- package/icons/azure/virtual-machine.js +52 -1
- package/icons/azure/virtual-machines-classic.js +53 -1
- package/icons/azure/virtual-network-gateways.js +56 -1
- package/icons/azure/virtual-networks-classic.js +86 -1
- package/icons/azure/virtual-networks.js +86 -1
- package/icons/azure/virtual-router.js +29 -1
- package/icons/azure/virtual-visits-builder.js +81 -1
- package/icons/azure/virtual-wan-hub.js +72 -1
- package/icons/azure/virtual-wans.js +60 -1
- package/icons/azure/vm-app-definitions.js +66 -1
- package/icons/azure/vm-app-versions.js +91 -1
- package/icons/azure/vm-image-version.js +103 -1
- package/icons/azure/vm-images-classic.js +60 -1
- package/icons/azure/vm-scale-sets.js +60 -1
- package/icons/azure/wac-installer.js +121 -1
- package/icons/azure/wac.js +56 -1
- package/icons/azure/web-app-database.js +177 -1
- package/icons/azure/web-application-firewall-policies-waf.js +97 -1
- package/icons/azure/web-jobs.js +119 -1
- package/icons/azure/web-slots.js +30 -1
- package/icons/azure/web-test.js +122 -1
- package/icons/azure/website-power.js +90 -1
- package/icons/azure/website-staging.js +24 -1
- package/icons/azure/windows-notification-services.js +78 -1
- package/icons/azure/windows10-core-services.js +61 -1
- package/icons/azure/workbooks.js +38 -1
- package/icons/azure/worker-container-app.js +91 -1
- package/icons/azure/workflow.js +47 -1
- package/icons/azure/workspace-gateway.js +86 -1
- package/icons/azure/workspaces.js +58 -1
- package/icons/gcp/access-context-manager.js +17 -1
- package/icons/gcp/administration.js +46 -1
- package/icons/gcp/advanced-agent-modeling.js +31 -1
- package/icons/gcp/advanced-solutions-lab.js +84 -1
- package/icons/gcp/agent-assist.js +12 -1
- package/icons/gcp/ai-hub.js +23 -1
- package/icons/gcp/ai-platform-unified.js +40 -1
- package/icons/gcp/ai-platform.js +23 -1
- package/icons/gcp/analytics-hub.js +28 -1
- package/icons/gcp/anthos-config-management.js +28 -1
- package/icons/gcp/anthos-service-mesh.js +13 -1
- package/icons/gcp/anthos.js +11 -1
- package/icons/gcp/api-analytics.js +26 -1
- package/icons/gcp/api-monetization.js +23 -1
- package/icons/gcp/api.js +29 -1
- package/icons/gcp/apigee-api-platform.js +35 -1
- package/icons/gcp/apigee-sense.js +28 -1
- package/icons/gcp/app-engine.js +39 -1
- package/icons/gcp/artifact-registry.js +33 -1
- package/icons/gcp/asset-inventory.js +19 -1
- package/icons/gcp/assured-workloads.js +38 -1
- package/icons/gcp/auto-ml-natural-language.js +9 -1
- package/icons/gcp/auto-ml-tables.js +19 -1
- package/icons/gcp/auto-ml-translation.js +25 -1
- package/icons/gcp/auto-ml-video-intelligence.js +25 -1
- package/icons/gcp/auto-ml-vision.js +18 -1
- package/icons/gcp/auto-ml.js +14 -1
- package/icons/gcp/bare-metal-solutions.js +10 -1
- package/icons/gcp/batch.js +12 -1
- package/icons/gcp/beyondcorp.js +13 -1
- package/icons/gcp/big-query.js +28 -1
- package/icons/gcp/bigtable.js +116 -1
- package/icons/gcp/billing.js +34 -1
- package/icons/gcp/binary-authorization.js +22 -1
- package/icons/gcp/catalog.js +29 -1
- package/icons/gcp/certificate-authority-service.js +33 -1
- package/icons/gcp/certificate-manager.js +24 -1
- package/icons/gcp/cloud-api-gateway.js +13 -1
- package/icons/gcp/cloud-apis.js +18 -1
- package/icons/gcp/cloud-armor.js +27 -1
- package/icons/gcp/cloud-asset-inventory.js +10 -1
- package/icons/gcp/cloud-audit-logs.js +60 -1
- package/icons/gcp/cloud-build.js +19 -1
- package/icons/gcp/cloud-cdn.js +22 -1
- package/icons/gcp/cloud-code.js +16 -1
- package/icons/gcp/cloud-composer.js +19 -1
- package/icons/gcp/cloud-data-fusion.js +15 -1
- package/icons/gcp/cloud-deploy.js +10 -1
- package/icons/gcp/cloud-deployment-manager.js +24 -1
- package/icons/gcp/cloud-dns.js +21 -1
- package/icons/gcp/cloud-domains.js +26 -1
- package/icons/gcp/cloud-ekm.js +13 -1
- package/icons/gcp/cloud-endpoints.js +26 -1
- package/icons/gcp/cloud-external-ip-addresses.js +21 -1
- package/icons/gcp/cloud-firewall-rules.js +15 -1
- package/icons/gcp/cloud-for-marketing.js +13 -1
- package/icons/gcp/cloud-functions.js +45 -1
- package/icons/gcp/cloud-generic.js +13 -1
- package/icons/gcp/cloud-gpu.js +18 -1
- package/icons/gcp/cloud-healthcare-api.js +65 -1
- package/icons/gcp/cloud-healthcare-marketplace.js +10 -1
- package/icons/gcp/cloud-hsm.js +43 -1
- package/icons/gcp/cloud-ids.js +42 -1
- package/icons/gcp/cloud-inference-api.js +27 -1
- package/icons/gcp/cloud-interconnect.js +15 -1
- package/icons/gcp/cloud-jobs-api.js +37 -1
- package/icons/gcp/cloud-load-balancing.js +20 -1
- package/icons/gcp/cloud-logging.js +35 -1
- package/icons/gcp/cloud-media-edge.js +23 -1
- package/icons/gcp/cloud-monitoring.js +26 -1
- package/icons/gcp/cloud-nat.js +31 -1
- package/icons/gcp/cloud-natural-language-api.js +40 -1
- package/icons/gcp/cloud-network.js +23 -1
- package/icons/gcp/cloud-ops.js +32 -1
- package/icons/gcp/cloud-optimization-ai-fleet-routing-api.js +34 -1
- package/icons/gcp/cloud-optimization-ai.js +28 -1
- package/icons/gcp/cloud-router.js +13 -1
- package/icons/gcp/cloud-routes.js +18 -1
- package/icons/gcp/cloud-run-for-anthos.js +21 -1
- package/icons/gcp/cloud-run.js +13 -1
- package/icons/gcp/cloud-scheduler.js +49 -1
- package/icons/gcp/cloud-security-scanner.js +21 -1
- package/icons/gcp/cloud-shell.js +16 -1
- package/icons/gcp/cloud-spanner.js +42 -1
- package/icons/gcp/cloud-sql.js +16 -1
- package/icons/gcp/cloud-storage.js +22 -1
- package/icons/gcp/cloud-tasks.js +101 -1
- package/icons/gcp/cloud-test-lab.js +39 -1
- package/icons/gcp/cloud-tpu.js +141 -1
- package/icons/gcp/cloud-translation-api.js +16 -1
- package/icons/gcp/cloud-vision-api.js +40 -1
- package/icons/gcp/cloud-vpn.js +23 -1
- package/icons/gcp/compute-engine.js +23 -1
- package/icons/gcp/configuration-management.js +22 -1
- package/icons/gcp/connectivity-test.js +6 -1
- package/icons/gcp/connectors.js +13 -1
- package/icons/gcp/contact-center-ai.js +6 -1
- package/icons/gcp/container-optimized-os.js +13 -1
- package/icons/gcp/container-registry.js +118 -1
- package/icons/gcp/data-catalog.js +25 -1
- package/icons/gcp/data-labeling.js +31 -1
- package/icons/gcp/data-layers.js +11 -1
- package/icons/gcp/data-loss-prevention-api.js +60 -1
- package/icons/gcp/data-qn-a.js +24 -1
- package/icons/gcp/data-studio.js +28 -1
- package/icons/gcp/data-transfer.js +17 -1
- package/icons/gcp/database-migration-service.js +24 -1
- package/icons/gcp/dataflow.js +50 -1
- package/icons/gcp/datalab.js +13 -1
- package/icons/gcp/dataplex.js +15 -1
- package/icons/gcp/datapol.js +70 -1
- package/icons/gcp/dataprep.js +25 -1
- package/icons/gcp/dataproc-metastore.js +12 -1
- package/icons/gcp/dataproc.js +43 -1
- package/icons/gcp/datashare.js +37 -1
- package/icons/gcp/datastore.js +39 -1
- package/icons/gcp/datastream.js +35 -1
- package/icons/gcp/debugger.js +31 -1
- package/icons/gcp/developer-portal.js +24 -1
- package/icons/gcp/dialogflow-cx.js +28 -1
- package/icons/gcp/dialogflow-insights.js +33 -1
- package/icons/gcp/dialogflow.js +16 -1
- package/icons/gcp/document-ai.js +27 -1
- package/icons/gcp/early-access-center.js +12 -1
- package/icons/gcp/error-reporting.js +42 -1
- package/icons/gcp/eventarc.js +24 -1
- package/icons/gcp/filestore.js +22 -1
- package/icons/gcp/financial-services-marketplace.js +21 -1
- package/icons/gcp/firestore.js +30 -1
- package/icons/gcp/fleet-engine.js +10 -1
- package/icons/gcp/free-trial.js +36 -1
- package/icons/gcp/game-servers.js +32 -1
- package/icons/gcp/gce-systems-management.js +13 -1
- package/icons/gcp/genomics.js +23 -1
- package/icons/gcp/gke-on-prem.js +31 -1
- package/icons/gcp/google-cloud-marketplace.js +29 -1
- package/icons/gcp/google-kubernetes-engine.js +23 -1
- package/icons/gcp/google-maps-platform.js +47 -1
- package/icons/gcp/healthcare-nlp-api.js +13 -1
- package/icons/gcp/home.js +25 -1
- package/icons/gcp/identity-and-access-management.js +23 -1
- package/icons/gcp/identity-aware-proxy.js +32 -1
- package/icons/gcp/identity-platform.js +26 -1
- package/icons/gcp/iot-core.js +23 -1
- package/icons/gcp/iot-edge.js +86 -1
- package/icons/gcp/key-access-justifications.js +46 -1
- package/icons/gcp/key-management-service.js +23 -1
- package/icons/gcp/kuberun.js +26 -1
- package/icons/gcp/launcher.js +35 -1
- package/icons/gcp/local-ssd.js +13 -1
- package/icons/gcp/looker.js +46 -1
- package/icons/gcp/managed-service-for-microsoft-active-directory.js +59 -1
- package/icons/gcp/media-translation-api.js +28 -1
- package/icons/gcp/memorystore.js +26 -1
- package/icons/gcp/migrate-for-anthos.js +13 -1
- package/icons/gcp/migrate-for-compute-engine.js +13 -1
- package/icons/gcp/my-cloud.js +21 -1
- package/icons/gcp/network-connectivity-center.js +84 -1
- package/icons/gcp/network-intelligence-center.js +13 -1
- package/icons/gcp/network-security.js +38 -1
- package/icons/gcp/network-tiers.js +53 -1
- package/icons/gcp/network-topology.js +13 -1
- package/icons/gcp/onboarding.js +25 -1
- package/icons/gcp/os-configuration-management.js +13 -1
- package/icons/gcp/os-inventory-management.js +15 -1
- package/icons/gcp/os-patch-management.js +13 -1
- package/icons/gcp/partner-interconnect.js +21 -1
- package/icons/gcp/partner-portal.js +35 -1
- package/icons/gcp/performance-dashboard.js +13 -1
- package/icons/gcp/permissions.js +35 -1
- package/icons/gcp/persistent-disk.js +10 -1
- package/icons/gcp/phishing-protection.js +48 -1
- package/icons/gcp/policy-analyzer.js +13 -1
- package/icons/gcp/premium-network-tier.js +19 -1
- package/icons/gcp/private-connectivity.js +18 -1
- package/icons/gcp/private-service-connect.js +27 -1
- package/icons/gcp/producer-portal.js +21 -1
- package/icons/gcp/profiler.js +29 -1
- package/icons/gcp/project.js +28 -1
- package/icons/gcp/pub-sub.js +41 -1
- package/icons/gcp/quantum-engine.js +27 -1
- package/icons/gcp/quotas.js +42 -1
- package/icons/gcp/real-world-insights.js +19 -1
- package/icons/gcp/recommendations-ai.js +56 -1
- package/icons/gcp/release-notes.js +12 -1
- package/icons/gcp/retail-api.js +22 -1
- package/icons/gcp/risk-manager.js +12 -1
- package/icons/gcp/runtime-config.js +35 -1
- package/icons/gcp/secret-manager.js +13 -1
- package/icons/gcp/security-command-center.js +18 -1
- package/icons/gcp/security-health-advisor.js +61 -1
- package/icons/gcp/security-key-enforcement.js +21 -1
- package/icons/gcp/security.js +27 -1
- package/icons/gcp/service-discovery.js +36 -1
- package/icons/gcp/speech-to-text.js +93 -1
- package/icons/gcp/stackdriver.js +10 -1
- package/icons/gcp/standard-network-tier.js +13 -1
- package/icons/gcp/stream-suite.js +16 -1
- package/icons/gcp/support.js +29 -1
- package/icons/gcp/tensorflow-enterprise.js +13 -1
- package/icons/gcp/text-to-speech.js +24 -1
- package/icons/gcp/tools-for-powershell.js +29 -1
- package/icons/gcp/trace.js +17 -1
- package/icons/gcp/traffic-director.js +44 -1
- package/icons/gcp/transfer-appliance.js +32 -1
- package/icons/gcp/transfer.js +13 -1
- package/icons/gcp/user-preferences.js +35 -1
- package/icons/gcp/vertex-ai.js +48 -1
- package/icons/gcp/video-intelligence-api.js +15 -1
- package/icons/gcp/virtual-private-cloud.js +25 -1
- package/icons/gcp/visual-inspection.js +24 -1
- package/icons/gcp/vmware-engine.js +13 -1
- package/icons/gcp/web-risk.js +55 -1
- package/icons/gcp/web-security-scanner.js +27 -1
- package/icons/gcp/workflows.js +82 -1
- package/icons/gcp/workload-identity-pool.js +24 -1
- package/icons/tech/aarch64.js +48 -1
- package/icons/tech/adobe-illustrator.js +14 -1
- package/icons/tech/adobe-photoshop.js +14 -1
- package/icons/tech/adobe-premiere-pro.js +16 -1
- package/icons/tech/adobe-xd.js +12 -1
- package/icons/tech/adonis-js.js +14 -1
- package/icons/tech/after-effects.js +16 -1
- package/icons/tech/airflow.js +64 -1
- package/icons/tech/akka.js +21 -1
- package/icons/tech/algolia.js +12 -1
- package/icons/tech/alpine-js.js +17 -1
- package/icons/tech/amazon-web-services.js +21 -1
- package/icons/tech/anaconda.js +12 -1
- package/icons/tech/android-studio.js +44 -1
- package/icons/tech/android.js +35 -1
- package/icons/tech/angular-js.js +24 -1
- package/icons/tech/angular.js +37 -1
- package/icons/tech/ansible.js +15 -1
- package/icons/tech/ant-design.js +112 -1
- package/icons/tech/apache.js +222 -1
- package/icons/tech/apl.js +21 -1
- package/icons/tech/appcelerator.js +12 -1
- package/icons/tech/apple-safari.js +39 -1
- package/icons/tech/apple.js +6 -1
- package/icons/tech/appwrite.js +21 -1
- package/icons/tech/arch-linux.js +29 -1
- package/icons/tech/arduino.js +9 -1
- package/icons/tech/argo-cd.js +134 -1
- package/icons/tech/astro.js +62 -1
- package/icons/tech/atom.js +14 -1
- package/icons/tech/autodesk-maya.js +144 -1
- package/icons/tech/autodesk-shot-grid.js +15 -1
- package/icons/tech/awk.js +34 -1
- package/icons/tech/azios.js +12 -1
- package/icons/tech/azure-devops.js +33 -1
- package/icons/tech/azure-sql-database.js +95 -1
- package/icons/tech/azure.js +55 -1
- package/icons/tech/babel.js +15 -1
- package/icons/tech/backbone-js.js +16 -1
- package/icons/tech/ballerina.js +12 -1
- package/icons/tech/bamboo.js +62 -1
- package/icons/tech/bash.js +22 -1
- package/icons/tech/behance.js +19 -1
- package/icons/tech/bitbucket.js +37 -1
- package/icons/tech/blender.js +21 -1
- package/icons/tech/bootstrap.js +78 -1
- package/icons/tech/bower.js +123 -1
- package/icons/tech/browserstack.js +77 -1
- package/icons/tech/bulma.js +6 -1
- package/icons/tech/bun.js +68 -1
- package/icons/tech/c.js +28 -1
- package/icons/tech/cairo-graphics.js +21 -1
- package/icons/tech/cake-php.js +12 -1
- package/icons/tech/canva.js +9 -1
- package/icons/tech/capacitor.js +25 -1
- package/icons/tech/cassandra.js +101 -1
- package/icons/tech/cent-os.js +22 -1
- package/icons/tech/chrome.js +156 -1
- package/icons/tech/circle-ci.js +12 -1
- package/icons/tech/clarity.js +35 -1
- package/icons/tech/clion.js +98 -1
- package/icons/tech/clojure-script.js +39 -1
- package/icons/tech/clojure.js +42 -1
- package/icons/tech/cloudflare-workers.js +196 -1
- package/icons/tech/cloudflare.js +22 -1
- package/icons/tech/cmake.js +11 -1
- package/icons/tech/code-igniter.js +12 -1
- package/icons/tech/code-pen.js +12 -1
- package/icons/tech/codeac.js +12 -1
- package/icons/tech/codecov.js +12 -1
- package/icons/tech/coffee-script.js +12 -1
- package/icons/tech/composer.js +59 -1
- package/icons/tech/confluence.js +57 -1
- package/icons/tech/consul.js +12 -1
- package/icons/tech/contao.js +15 -1
- package/icons/tech/corejs.js +6 -1
- package/icons/tech/cosmosdb.js +52 -1
- package/icons/tech/couchdb.js +12 -1
- package/icons/tech/cplusplus.js +35 -1
- package/icons/tech/crystal.js +12 -1
- package/icons/tech/csharp.js +28 -1
- package/icons/tech/css3.js +25 -1
- package/icons/tech/cucumber.js +12 -1
- package/icons/tech/cypress.js +34 -1
- package/icons/tech/d3js.js +145 -1
- package/icons/tech/dart.js +24 -1
- package/icons/tech/data-grip.js +109 -1
- package/icons/tech/data-spell.js +102 -1
- package/icons/tech/dbeaver.js +56 -1
- package/icons/tech/debian.js +12 -1
- package/icons/tech/deno.js +6 -1
- package/icons/tech/devicon.js +25 -1
- package/icons/tech/digital-ocean.js +9 -1
- package/icons/tech/discord-js.js +56 -1
- package/icons/tech/django-rest.js +35 -1
- package/icons/tech/django.js +9 -1
- package/icons/tech/docker.js +133 -1
- package/icons/tech/doctrine.js +21 -1
- package/icons/tech/dropwizard.js +70 -1
- package/icons/tech/drupal.js +56 -1
- package/icons/tech/eclipse-ceylon.js +44 -1
- package/icons/tech/eclipse-ide.js +99 -1
- package/icons/tech/eclipse-vert-x.js +29 -1
- package/icons/tech/elasticbeats.js +22 -1
- package/icons/tech/elasticsearch.js +28 -1
- package/icons/tech/electron.js +11 -1
- package/icons/tech/eleventy-11ty.js +15 -1
- package/icons/tech/elixir.js +211 -1
- package/icons/tech/elm.js +19 -1
- package/icons/tech/embedded-c.js +42 -1
- package/icons/tech/ember-js.js +16 -1
- package/icons/tech/envoy.js +28 -1
- package/icons/tech/erlang.js +12 -1
- package/icons/tech/eslint.js +21 -1
- package/icons/tech/express.js +6 -1
- package/icons/tech/facebook.js +15 -1
- package/icons/tech/fast-api.js +12 -1
- package/icons/tech/fastify.js +15 -1
- package/icons/tech/fauna.js +12 -1
- package/icons/tech/feathers.js +6 -1
- package/icons/tech/fedora.js +53 -1
- package/icons/tech/figma.js +24 -1
- package/icons/tech/file-zilla.js +29 -1
- package/icons/tech/firebase.js +12 -1
- package/icons/tech/firefox.js +1405 -1
- package/icons/tech/flask.js +12 -1
- package/icons/tech/flutter.js +16 -1
- package/icons/tech/fortran.js +15 -1
- package/icons/tech/foundation.js +240 -1
- package/icons/tech/fsharp.js +10 -1
- package/icons/tech/gatling.js +12 -1
- package/icons/tech/gatsby.js +12 -1
- package/icons/tech/gazebo.js +23 -1
- package/icons/tech/gcc.js +44 -1
- package/icons/tech/gentoo.js +14 -1
- package/icons/tech/ghost.js +27 -1
- package/icons/tech/gimp.js +382 -1
- package/icons/tech/git.js +12 -1
- package/icons/tech/gitbook.js +13 -1
- package/icons/tech/github-actions.js +21 -1
- package/icons/tech/github-codespaces.js +85 -1
- package/icons/tech/github.js +16 -1
- package/icons/tech/gitlab.js +35 -1
- package/icons/tech/gitpod.js +32 -1
- package/icons/tech/gitter.js +6 -1
- package/icons/tech/gnu-emacs.js +15 -1
- package/icons/tech/go-land.js +88 -1
- package/icons/tech/go.js +294 -1
- package/icons/tech/godot-engine.js +56 -1
- package/icons/tech/google-cloud.js +29 -1
- package/icons/tech/google.js +42 -1
- package/icons/tech/gradle.js +12 -1
- package/icons/tech/grafana.js +30 -1
- package/icons/tech/grails.js +21 -1
- package/icons/tech/graphql.js +15 -1
- package/icons/tech/groovy.js +715 -1
- package/icons/tech/grunt-js.js +260 -1
- package/icons/tech/gulp-js.js +14 -1
- package/icons/tech/hadoop.js +36 -1
- package/icons/tech/handlebars.js +9 -1
- package/icons/tech/hardhat.js +98 -1
- package/icons/tech/harvester.js +10 -1
- package/icons/tech/hashicorp-vault.js +12 -1
- package/icons/tech/haskell.js +10 -1
- package/icons/tech/haxe.js +17 -1
- package/icons/tech/helm.js +12 -1
- package/icons/tech/heroku.js +12 -1
- package/icons/tech/hibernate.js +15 -1
- package/icons/tech/homebrew.js +36 -1
- package/icons/tech/html5.js +23 -1
- package/icons/tech/hugo.js +22 -1
- package/icons/tech/ibm-spss-statistics.js +21 -1
- package/icons/tech/ie10.js +12 -1
- package/icons/tech/ifttt.js +6 -1
- package/icons/tech/influxdb.js +14 -1
- package/icons/tech/inkscape.js +573 -1
- package/icons/tech/insomnia.js +44 -1
- package/icons/tech/intellij-idea.js +92 -1
- package/icons/tech/ionic.js +9 -1
- package/icons/tech/jaeger.js +102 -1
- package/icons/tech/jamstack.js +12 -1
- package/icons/tech/jasmine.js +10 -1
- package/icons/tech/java.js +42 -1
- package/icons/tech/javascript.js +15 -1
- package/icons/tech/jeet.js +163 -1
- package/icons/tech/jekyll.js +232 -1
- package/icons/tech/jenkins.js +126 -1
- package/icons/tech/jest.js +12 -1
- package/icons/tech/jetbrains.js +118 -1
- package/icons/tech/jira-align.js +57 -1
- package/icons/tech/jira.js +62 -1
- package/icons/tech/jquery.js +12 -1
- package/icons/tech/json.js +57 -1
- package/icons/tech/jule.js +12 -1
- package/icons/tech/julia.js +49 -1
- package/icons/tech/junit.js +30 -1
- package/icons/tech/jupyter.js +35 -1
- package/icons/tech/k3os.js +6 -1
- package/icons/tech/k3s.js +12 -1
- package/icons/tech/kafka.js +12 -1
- package/icons/tech/kaggle.js +12 -1
- package/icons/tech/karate.js +15 -1
- package/icons/tech/karma.js +21 -1
- package/icons/tech/keras.js +15 -1
- package/icons/tech/kibana.js +10 -1
- package/icons/tech/knex-js.js +12 -1
- package/icons/tech/knockout.js +13 -1
- package/icons/tech/kotlin.js +25 -1
- package/icons/tech/krakenjs.js +14 -1
- package/icons/tech/ktor.js +48 -1
- package/icons/tech/kubernetes.js +10 -1
- package/icons/tech/labview.js +69 -1
- package/icons/tech/laravel.js +15 -1
- package/icons/tech/latex.js +12 -1
- package/icons/tech/less-js.js +14 -1
- package/icons/tech/linkedin.js +21 -1
- package/icons/tech/linux.js +5267 -1
- package/icons/tech/liquibase.js +12 -1
- package/icons/tech/livewire.js +79 -1
- package/icons/tech/llvm.js +36 -1
- package/icons/tech/logstash.js +10 -1
- package/icons/tech/lua.js +28 -1
- package/icons/tech/lumen.js +12 -1
- package/icons/tech/magento.js +12 -1
- package/icons/tech/markdown.js +44 -1
- package/icons/tech/material-ui.js +11 -1
- package/icons/tech/materialize.js +21 -1
- package/icons/tech/matlab.js +73 -1
- package/icons/tech/matplotlib.js +182 -1
- package/icons/tech/maven.js +620 -1
- package/icons/tech/meteor-js.js +12 -1
- package/icons/tech/microsoft-sql-server.js +6 -1
- package/icons/tech/minitab.js +45 -1
- package/icons/tech/mob-x.js +57 -1
- package/icons/tech/mocha.js +21 -1
- package/icons/tech/modx.js +18 -1
- package/icons/tech/moleculer.js +12 -1
- package/icons/tech/mongodb.js +135 -1
- package/icons/tech/mongoose-js.js +29 -1
- package/icons/tech/moodle.js +145 -1
- package/icons/tech/ms-dos.js +78 -1
- package/icons/tech/mysql.js +12 -1
- package/icons/tech/nano.js +12 -1
- package/icons/tech/nerog.js +136 -1
- package/icons/tech/nestjs.js +12 -1
- package/icons/tech/net-core.js +9 -1
- package/icons/tech/net.js +551 -1
- package/icons/tech/network-x.js +58 -1
- package/icons/tech/new4j.js +21 -1
- package/icons/tech/nextjs.js +6 -1
- package/icons/tech/nginx.js +12 -1
- package/icons/tech/nhibernate.js +21 -1
- package/icons/tech/nim.js +29 -1
- package/icons/tech/nimble.js +84 -1
- package/icons/tech/nix.js +25 -1
- package/icons/tech/nodejs.js +12 -1
- package/icons/tech/nodemon.js +21 -1
- package/icons/tech/nodewebkit.js +42 -1
- package/icons/tech/npm.js +12 -1
- package/icons/tech/nuget.js +12 -1
- package/icons/tech/num-py.js +29 -1
- package/icons/tech/nuxt-js.js +28 -1
- package/icons/tech/objective-c.js +9 -1
- package/icons/tech/ocaml.js +96 -1
- package/icons/tech/oh-my-zsh.js +38 -1
- package/icons/tech/okta.js +21 -1
- package/icons/tech/open-al.js +22 -1
- package/icons/tech/open-api.js +139 -1
- package/icons/tech/open-cl.js +42 -1
- package/icons/tech/open-cv.js +28 -1
- package/icons/tech/open-gl.js +35 -1
- package/icons/tech/open-stack.js +12 -1
- package/icons/tech/open-suse.js +15 -1
- package/icons/tech/open-telemetry.js +21 -1
- package/icons/tech/opera.js +32 -1
- package/icons/tech/oracle.js +12 -1
- package/icons/tech/p5js.js +12 -1
- package/icons/tech/packer.js +15 -1
- package/icons/tech/pandas.js +62 -1
- package/icons/tech/perl.js +21 -1
- package/icons/tech/pf-sense.js +6 -1
- package/icons/tech/phalcon.js +32 -1
- package/icons/tech/phoenix-framework.js +12 -1
- package/icons/tech/photon-engine.js +41 -1
- package/icons/tech/php-storm.js +105 -1
- package/icons/tech/php.js +62 -1
- package/icons/tech/playwrite.js +56 -1
- package/icons/tech/ploty.js +28 -1
- package/icons/tech/podman.js +150 -1
- package/icons/tech/polygon.js +15 -1
- package/icons/tech/portainer.js +12 -1
- package/icons/tech/postcss.js +28 -1
- package/icons/tech/postgresql.js +23 -1
- package/icons/tech/postman.js +28 -1
- package/icons/tech/powershell.js +79 -1
- package/icons/tech/processing.js +201 -1
- package/icons/tech/prometheus.js +12 -1
- package/icons/tech/protractor.js +12 -1
- package/icons/tech/purescript.js +16 -1
- package/icons/tech/putty.js +56 -1
- package/icons/tech/pycharm.js +81 -1
- package/icons/tech/pyscript.js +15 -1
- package/icons/tech/pytest.js +21 -1
- package/icons/tech/python-poetry.js +155 -1
- package/icons/tech/python.js +78 -1
- package/icons/tech/pytorch.js +15 -1
- package/icons/tech/qodana.js +52 -1
- package/icons/tech/qt.js +12 -1
- package/icons/tech/quarkus.js +23 -1
- package/icons/tech/quasar.js +15 -1
- package/icons/tech/qwik.js +37 -1
- package/icons/tech/r.js +57 -1
- package/icons/tech/rabbitmq.js +12 -1
- package/icons/tech/rancher.js +6 -1
- package/icons/tech/raspberrypi.js +28 -1
- package/icons/tech/reach.js +27 -1
- package/icons/tech/react-bootstrap.js +12 -1
- package/icons/tech/react.js +9 -1
- package/icons/tech/realm.js +63 -1
- package/icons/tech/red-cube-s-epic-compiler-thingy-programming-re-ct.js +17 -1
- package/icons/tech/redhat.js +22 -1
- package/icons/tech/redis.js +59 -1
- package/icons/tech/redux.js +12 -1
- package/icons/tech/ren-py.js +547 -1
- package/icons/tech/rider.js +38 -1
- package/icons/tech/robot-operating-system-ros.js +15 -1
- package/icons/tech/rocksdb.js +9 -1
- package/icons/tech/rollup-js.js +155 -1
- package/icons/tech/rspec.js +35 -1
- package/icons/tech/rstudio.js +30 -1
- package/icons/tech/ruby-mine.js +52 -1
- package/icons/tech/ruby-on-rails.js +14 -1
- package/icons/tech/ruby.js +359 -1
- package/icons/tech/rust.js +6 -1
- package/icons/tech/salesforce.js +28 -1
- package/icons/tech/sanity.js +22 -1
- package/icons/tech/sass.js +14 -1
- package/icons/tech/scala.js +21 -1
- package/icons/tech/scalingo.js +29 -1
- package/icons/tech/sdl.js +42 -1
- package/icons/tech/selenium.js +15 -1
- package/icons/tech/sema-software.js +15 -1
- package/icons/tech/sequelize.js +34 -1
- package/icons/tech/shopware.js +9 -1
- package/icons/tech/sketch.js +14 -1
- package/icons/tech/slack.js +35 -1
- package/icons/tech/socket-io.js +45 -1
- package/icons/tech/solid-js.js +121 -1
- package/icons/tech/solidity.js +13 -1
- package/icons/tech/sonarqube.js +12 -1
- package/icons/tech/sourcetree.js +12 -1
- package/icons/tech/spark.js +12 -1
- package/icons/tech/splunk.js +12 -1
- package/icons/tech/spring.js +12 -1
- package/icons/tech/sql-developer.js +43 -1
- package/icons/tech/sqlalchemy.js +21 -1
- package/icons/tech/sqlite.js +45 -1
- package/icons/tech/ssh.js +12 -1
- package/icons/tech/stackoverflow.js +15 -1
- package/icons/tech/stata.js +12 -1
- package/icons/tech/storybook.js +12 -1
- package/icons/tech/streamlit.js +31 -1
- package/icons/tech/stylus.js +9 -1
- package/icons/tech/subversion.js +12 -1
- package/icons/tech/svelte.js +23 -1
- package/icons/tech/swagger.js +21 -1
- package/icons/tech/swift.js +21 -1
- package/icons/tech/symfony.js +12 -1
- package/icons/tech/tailwind-css.js +12 -1
- package/icons/tech/tauri.js +35 -1
- package/icons/tech/tensorflow.js +12 -1
- package/icons/tech/terraform.js +16 -1
- package/icons/tech/tex.js +6 -1
- package/icons/tech/the-algorithms.js +12 -1
- package/icons/tech/three-js.js +139 -1
- package/icons/tech/titanium-sdk.js +12 -1
- package/icons/tech/tomcat.js +26 -1
- package/icons/tech/tortoise-git.js +37 -1
- package/icons/tech/tower.js +369 -1
- package/icons/tech/traefik-mesh.js +12 -1
- package/icons/tech/traefik-proxy.js +12 -1
- package/icons/tech/travis-ci.js +12 -1
- package/icons/tech/trello.js +12 -1
- package/icons/tech/twitter.js +12 -1
- package/icons/tech/typescript.js +16 -1
- package/icons/tech/typo3.js +12 -1
- package/icons/tech/ubuntu.js +12 -1
- package/icons/tech/uml.js +29 -1
- package/icons/tech/unity.js +22 -1
- package/icons/tech/unix.js +12 -1
- package/icons/tech/unreal-engine.js +9 -1
- package/icons/tech/uwsgi.js +38 -1
- package/icons/tech/v8.js +109 -1
- package/icons/tech/vagrant.js +21 -1
- package/icons/tech/vala.js +57 -1
- package/icons/tech/vercel.js +6 -1
- package/icons/tech/veutify.js +11 -1
- package/icons/tech/vim.js +82 -1
- package/icons/tech/visualstudio.js +12 -1
- package/icons/tech/vite.js +6 -1
- package/icons/tech/vitejs.js +56 -1
- package/icons/tech/vscode.js +114 -1
- package/icons/tech/vsphere.js +25 -1
- package/icons/tech/vue-storefront.js +22 -1
- package/icons/tech/vue.js +16 -1
- package/icons/tech/vyper.js +17 -1
- package/icons/tech/webassembly.js +12 -1
- package/icons/tech/webflow.js +12 -1
- package/icons/tech/weblate.js +80 -1
- package/icons/tech/webpack.js +21 -1
- package/icons/tech/webstorm.js +80 -1
- package/icons/tech/windows11.js +12 -1
- package/icons/tech/windows8.js +12 -1
- package/icons/tech/woo-commerce.js +22 -1
- package/icons/tech/wordpress.js +70 -1
- package/icons/tech/xamarin.js +12 -1
- package/icons/tech/xcode.js +623 -1
- package/icons/tech/xml.js +51 -1
- package/icons/tech/yaml.js +16 -1
- package/icons/tech/yarn.js +9 -1
- package/icons/tech/yii-framework.js +35 -1
- package/icons/tech/yuno-host.js +15 -1
- package/icons/tech/zend-framework.js +14 -1
- package/icons/tech/zig.js +28 -1
- package/package.json +42 -38
- package/react/index.d.mts +704 -308
- package/react/index.mjs +25 -25
- package/dist/shared/likec4.CY1x3B5z.mjs +0 -2199
|
@@ -0,0 +1,2209 @@
|
|
|
1
|
+
import*as Aw from"node:fs";import{existsSync as a_}from"node:fs";import Bi,{resolve as u_,basename as c_}from"node:path";import{fileURLToPath as l_,pathToFileURL as d_}from"node:url";import{isatty as f_}from"tty";import h_,{stripVTControlCharacters as p_}from"node:util";import m_ from"util";import qi from"path";import g_ from"os";import y_ from"crypto";import v_ from"net";import w_ from"url";import Fa from"fs";import b_ from"child_process";import{BiMap as E_,nonNullable as It,invariant as _e,defaultTheme as Jt,
|
|
2
|
+
DefaultRelationshipColor as La,nonexhaustive as qe,hierarchyDistance as $_,DefaultThemeColor as Ao,nameFromFqn as Hp,isThemeColor as Sw,compareFqnHierarchically as D_,DefaultArrowType as ws,ComputedNode as Ad,extractStep as R_,ComputedView as Ma,delay as k_,DefaultLineStyle as T_,FqnRef as wn,hasAtLeast as C_,LikeC4Model as bs,stringHash as A_,ThemeColors as S_,AsFqn as __,ancestorsFqn as P_,compareNatural as _w,MultiMap as x_,computeColorValues as N_,sortByFqnHierarchically as Pw,isGlobalFqn as xw,
|
|
3
|
+
parentFqn as Nw,DeploymentElement as I_,isScopedElementView as O_,splitGlobalFqn as Iw,isSameHierarchy as Ow,isAncestor as Kp,FqnExpr as rn,RelationExpr as Sd,GlobalFqn as F_,isNonEmptyArray as Un,LinkedList as Fw,isAutoLayoutDirection as L_,isOrOperator as Lw,isAndOperator as Mw,ModelLayer as M_}from"@likec4/core";import{ComputedNode as Bw,DefaultShapeSize as B_,DefaultTextSize as q_,DefaultPaddingSize as j_,AsFqn as G_,FqnRef as Es}from"@likec4/core/types";import{EventEmitter as U_}from"events";
|
|
4
|
+
import{Buffer as Vp}from"buffer";import{Graphviz as Xp}from"@hpcc-js/wasm-graphviz";import{resolveRulesExtendedViews as W_}from"@likec4/core/compute-view";import{MultiMap as xn,DefaultWeakMap as qw,compareNatural as Yp,sortNaturalByFqn as z_,ancestorsFqn as H_}from"@likec4/core/utils";import ji,{hrtime as jw}from"node:process";import K_ from"boxen";import{spawn as V_}from"node:child_process";import{once as Gw,on as X_}from"node:events";import{stat as Y_}from"node:fs/promises";import{pipeline as J_}from"node:stream/promises";
|
|
5
|
+
import Q_ from"node:os";import Uw from"fs/promises";import{LikeC4Model as Z_}from"@likec4/core/model";const eP={},So=tP(globalThis,eP);function tP(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],
|
|
6
|
+
Reflect.defineProperty(t,r,i),!0},getOwnPropertyDescriptor(n,r){return r in e?Reflect.getOwnPropertyDescriptor(e,r):Reflect.getOwnPropertyDescriptor(t,r)},has(n,r){return r in e||r in t}})}function Ww(t){return typeof t=="function"?t:nP(t)}function nP(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===
|
|
7
|
+
"fatal"||e.level==="error"||e.level==="warning"||e.level==="info";if(t==="debug")return()=>!0;throw new TypeError(`Invalid log level: ${t}.`)}const zw=["debug","info","warning","error","fatal"];function Hw(t,e){const n=zw.indexOf(t);if(n<0)throw new TypeError(`Invalid log level: ${JSON.stringify(t)}.`);const r=zw.indexOf(e);if(r<0)throw new TypeError(`Invalid log level: ${JSON.stringify(e)}.`);return n-r}function rP(t=[]){return Gn.getLogger(t)}const Jp=Symbol.for("logtape.rootLogger");class Gn{static getLogger(e=[]){
|
|
8
|
+
let n=Jp in So?So[Jp]??null:null;return n==null&&(n=new Gn(null,[]),So[Jp]=n),typeof e=="string"?n.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,
|
|
9
|
+
writable:!0,value:void 0}),Object.defineProperty(this,"parentSinks",{enumerable:!0,configurable:!0,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=
|
|
10
|
+
[]}getChild(e){const n=typeof e=="string"?e:e[0],r=this.children[n];let i=r instanceof Gn?r:r?.deref();return i==null&&(i=new Gn(this,[...this.category,n]),this.children[n]="WeakRef"in So?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
|
|
11
|
+
Gn?e:e.deref();n?.resetDescendants()}this.reset()}with(e){return new $w(this,{...e})}filter(e){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||Hw(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||Hw(e.level,this.lowestLevel)<0||!this.filter(e))){for(const r of this.
|
|
12
|
+
getSinks(e.level))if(!n?.has(r))try{r(e)}catch(i){const s=new Set(n);s.add(r),iP.log("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=Gn.getLogger().contextLocalStorage?.getStore()??{};let o;const a=typeof r=="function"?{category:this.category,level:e,timestamp:Date.now(),get message(){return Kw(n,this.properties)},rawMessage:n,get properties(){return o==null&&(o={...s,...r()}),o}}:{category:this.category,level:e,timestamp:Date.now(),
|
|
13
|
+
message:Kw(n,{...s,...r}),rawMessage:n,properties:{...s,...r}};this.emit(a,i)}logLazily(e,n,r={}){const i=Gn.getLogger().contextLocalStorage?.getStore()??{};let s,o;function a(){if((o==null||s==null)&&(o=n((u,...c)=>(s=u,Vw(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=Gn.getLogger().contextLocalStorage?.
|
|
14
|
+
getStore()??{};this.emit({category:this.category,level:e,message:Vw(n,r),rawMessage:n,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(
|
|
15
|
+
"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=="string"?this.log("fatal",e,n[0]??{}):typeof e=="function"?this.logLazily("fatal",e):this.logTemplate("fatal",e,n)}}class $w{constructor(e,n){Object.defineProperty(this,"logger",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"properties",{enumerable:!0,configurable:!0,
|
|
16
|
+
writable:!0,value:void 0}),this.logger=e,this.properties=n}get category(){return this.logger.category}get parent(){return this.logger.parent}getChild(e){return this.logger.getChild(e).with(this.properties)}with(e){return new $w(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){
|
|
17
|
+
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.log("error",e,n[0]??{}):typeof e=="function"?this.logLazily(
|
|
18
|
+
"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)}}const iP=Gn.getLogger(["logtape","meta"]);function Kw(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(
|
|
19
|
+
a),r=""}else r=r+s}return n.push(r),n}function Vw(t,e){const n=[];for(let r=0;r<t.length;r++)n.push(t[r]),r<e.length&&n.push(e[r]);return n}function Fr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function sP(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(
|
|
20
|
+
n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}function Xw(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 Qp,Yw;function oP(){if(Yw)return Qp;Yw=1;let t=null;if(typeof window>"u"&&("process"in
|
|
21
|
+
globalThis&&"versions"in globalThis.process&&"node"in globalThis.process.versions&&typeof globalThis.caches>"u"&&typeof globalThis.addEventListener!="function"||"Bun"in globalThis))try{t=[Xw][0](`${["node","util"].join(":")}`)}catch{t=null}return Qp=t,Qp}var aP=oP();const _d=Fr(aP),Zp={debug:"DBG",info:"INF",warning:"WRN",error:"ERR",fatal:"FTL"},Jw="Deno"in globalThis&&"inspect"in globalThis.Deno&&typeof globalThis.Deno.inspect=="function"?(t,e)=>globalThis.Deno.inspect(t,{strAbbreviateSize:1/0,
|
|
22
|
+
iterableLimit:1/0,...e}):_d!=null&&"inspect"in _d&&typeof _d.inspect=="function"?(t,e)=>_d.inspect(t,{maxArrayLength:1/0,maxStringLength:1/0,...e}):t=>JSON.stringify(t);function Qw(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",""):
|
|
23
|
+
t.timestamp==="time-timezone"?o=>new Date(o).toISOString().replace(/.*T/,"").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??Jw,i=t.level==null||t.level==="ABBR"?o=>Zp[o]:t.level==="abb\
|
|
24
|
+
r"?o=>Zp[o].toLowerCase():t.level==="FULL"?o=>o.toUpperCase():t.level==="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
|
+
|
|
26
|
+
`}}Qw();const em="\x1B[0m",tm={black:"\x1B[30m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m"},nm={bold:"\x1B[1m",dim:"\x1B[2m",italic:"\x1B[3m",underline:"\x1B[4m",strikethrough:"\x1B[9m"},uP={debug:"blue",info:"green",warning:"yellow",error:"red",fatal:"magenta"};function Zw(t={}){const e=t.format,n=typeof t.timestampStyle>"u"?"dim":t.timestampStyle,r=t.timestampColor??null,i=`${n==null?"":nm[n]}${r==null?"":tm[r]}`,s=n==null&&
|
|
27
|
+
r==null?"":em,o=typeof t.levelStyle>"u"?"bold":t.levelStyle,a=t.levelColors??uP,u=typeof t.categoryStyle>"u"?"dim":t.categoryStyle,c=t.categoryColor??null,l=`${u==null?"":nm[u]}${c==null?"":tm[c]}`,f=u==null&&c==null?"":em;return Qw({timestamp:"date-time-tz",value(d){return Jw(d,{colors:!0})},...t,format({timestamp:d,level:h,category:p,message:w,record:v}){const g=a[v.level];return d=`${i}${d}${s}`,h=`${o==null?"":nm[o]}${g==null?"":tm[g]}${h}${o==null&&g==null?"":em}`,e==null?`${d} ${h} ${l}${p}\
|
|
28
|
+
:${f} ${w}`:e({timestamp:d,level:h,category:`${l}${p}${f}`,message:w,record:v})}})}Zw();const cP={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 lP(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.
|
|
29
|
+
getUTCHours().toString().padStart(2,"0")}:${r.getUTCMinutes().toString().padStart(2,"0")}:${r.getUTCSeconds().toString().padStart(2,"0")}.${r.getUTCMilliseconds().toString().padStart(3,"0")}`} %c${Zp[t.level]}%c %c${t.category.join("\xB7")} %c${e}`,"color: gray;",cP[t.level],"background-color: default;","color: gray;","color: default;",...n]}function eb(t={}){const e=t.formatter??lP,n={debug:"debug",info:"info",warning:"warn",error:"error",fatal:"error",...t.levelMap??{}},r=t.console??globalThis.
|
|
30
|
+
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 rm=null;const tb=new Set,Pd=new Set,dP=new Set;function fP(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 hP(t){if(rm!=null&&!t.reset)throw new $s("Already configured; if you want to res\
|
|
31
|
+
et, turn on the reset flag.");if(dP.size>0)throw new $s("Previously configured async disposables are still active. Use configure() instead or explicitly dispose them using dispose().");nb();try{pP(t,!1)}catch(e){throw e instanceof $s&&nb(),e}}function pP(t,e){rm=t;let n=!1,r=!1;for(const s of t.loggers){fP(s)&&(n=!0);const o=Gn.getLogger(s.category);for(const a of s.sinks??[]){const u=t.sinks[a];if(!u)throw new $s(`Sink not found: ${a}.`);o.sinks.push(u)}o.parentSinks=s.parentSinks??"inherit",s.
|
|
32
|
+
lowestLevel!==void 0&&(o.lowestLevel=s.lowestLevel),s.level!==void 0&&(r=!0,o.filters.push(Ww(s.level)));for(const a of s.filters??[]){const u=t.filters?.[a];if(u===void 0)throw new $s(`Filter not found: ${a}.`);o.filters.push(Ww(u))}tb.add(o)}Gn.getLogger().contextLocalStorage=t.contextLocalStorage;for(const s of Object.values(t.sinks)){if(Symbol.asyncDispose in s)throw new $s("Async disposables cannot be used with configureSync().");Symbol.dispose in s&&Pd.add(s)}for(const s of Object.values(t.
|
|
33
|
+
filters??{}))if(!(s==null||typeof s=="string")){if(Symbol.asyncDispose in s)throw new $s("Async disposables cannot be used with configureSync().");Symbol.dispose in s&&Pd.add(s)}"process"in So&&!("Deno"in So)?process.on("exit",im):addEventListener("unload",im);const i=Gn.getLogger(["logtape","meta"]);n||i.sinks.push(eb()),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\
|
|
34
|
+
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\
|
|
35
|
+
deprecated in favor of lowestLevel option. Please update your configuration. See also <https://logtape.org/manual/levels#configuring-severity-levels>.")}function nb(){im(),mP()}function mP(){const t=Gn.getLogger([]);t.resetDescendants(),delete t.contextLocalStorage,tb.clear(),rm=null}function im(){for(const t of Pd)t[Symbol.dispose]();Pd.clear()}class $s extends Error{constructor(e){super(e),this.name="ConfigureError"}}const gP=t=>{sm.forEach(e=>{yP(t,e)})},sm=["name","message","stack","cause",
|
|
36
|
+
"errors"],yP=(t,e)=>{const n=om(t,e);if(n!==void 0){if(vP(n)){Qr(t,e,t[e]);return}wP(n)&&rb(t,e,n)}},om=(t,e)=>{const n=Object.getOwnPropertyDescriptor(t,e);if(n!==void 0)return n;const r=Object.getPrototypeOf(t);return r===null?void 0:om(r,e)},vP=({get:t,set:e})=>t!==void 0&&e===void 0,wP=({enumerable:t,writable:e})=>t||!e,Qr=(t,e,n)=>{rb(t,e,{value:n})},rb=(t,e,n)=>{Object.defineProperty(t,e,{...n,..."get"in n||"set"in n?{}:{writable:!0},enumerable:!1,configurable:!0})},bP=(t,e)=>{if(Array.isArray(
|
|
37
|
+
t.errors)){const n=t.errors.filter(EP).map(e).filter(Boolean);Qr(t,"errors",n)}else $P(t)?Qr(t,"errors",[]):t.errors!==void 0&&DP(t)},EP=t=>t!==void 0,$P=t=>"AggregateError"in globalThis&&(t.name==="AggregateError"||t instanceof AggregateError),DP=t=>{delete t.errors,t.errors!==void 0&&Qr(t,"errors",[])},RP=(t,e)=>{if(!("cause"in t))return;const n=t.cause===void 0?t.cause:e(t.cause);n===void 0?delete t.cause:Qr(t,"cause",n)},ib=t=>kP(t)||TP(t),kP=t=>{try{return t instanceof Error}catch{return!1}},
|
|
38
|
+
TP=t=>{try{return CP.has(Object.prototype.toString.call(t))}catch{return!1}},CP=new Set(["[object Error]","[object DOMException]","[object DOMError]","[object Exception]"]);function xd(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 AP=t=>!Object.isExtensible(t)||sm.some(e=>SP(t,e)||_P(t,e)),SP=(t,e)=>{const n=Object.getOwnPropertyDescriptor(
|
|
39
|
+
t,e);return n!==void 0&&!n.configurable},_P=(t,e)=>{try{return t[e],!1}catch{return!0}},am=t=>{const e=PP(t.message,t.name);Qr(t,"stack",e)},PP=(t="",e="Error")=>{const n=xP(e),{stack:r}=new n(t);return typeof r=="string"&&r!==""?r:`${e}: ${t}`},xP=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},NP=t=>{const e={};for(const n of IP(t))try{const r=t[n],{enumerable:i,configurable:s,
|
|
40
|
+
writable:o=!0}=om(t,n);Object.defineProperty(e,n,{value:r,enumerable:i,configurable:s,writable:o})}catch{}return e},IP=t=>{const e=OP(t);for(const n of sm)FP(t,n)&&e.push(n);return e},OP=t=>{try{return Reflect.ownKeys(t)}catch{return[]}},FP=(t,e)=>{try{return e in t&&!Object.hasOwn(t,e)}catch{return!1}},sb=t=>{const{name:e,message:n,stack:r,cause:i,errors:s,...o}=NP(t),a=LP(n,o),u=jP(e,a);return n===a&&GP(u,o),Object.entries({name:e,stack:r,cause:i,errors:s}).forEach(([c,l])=>{UP(u,c,l)}),r===void 0&&
|
|
41
|
+
am(u),u},LP=(t,e)=>typeof t=="string"&&t!==""?t:qP(MP(e)),MP=t=>{try{return JSON.stringify(t)}catch{return BP(t)}},BP=t=>{try{return String(t)}catch{return"Invalid error"}},qP=t=>t.length<ob?t:`${t.slice(0,ob)}...`,ob=1e3,jP=(t,e)=>t==="AggregateError"&&"AggregateError"in globalThis?new AggregateError([],e):t in ab?new ab[t](e):new Error(e),ab={Error,ReferenceError,TypeError,SyntaxError,RangeError,URIError,EvalError},GP=(t,e)=>{for(const n in e)n in t||(t[n]=e[n])},UP=(t,e,n)=>{n!==void 0&&Qr(t,
|
|
42
|
+
e,n)},WP=t=>{try{const e=new Error(String(t));return am(e),e}catch(e){return e}},{toString:zP}=Object.prototype,HP=t=>KP(t)?sb(t):ib(t)?VP(t)?sb(t):t:WP(t),KP=t=>{try{return xd(t)}catch{return!1}},VP=t=>XP(t)||AP(t)||YP(t),XP=t=>{try{return zP.call(t)==="[object Object]"}catch{return!0}},YP=t=>typeof t.constructor!="function"||typeof t.constructor.name!="string"||t.constructor.name===""||t.constructor.prototype!==Object.getPrototypeOf(t),Nd=(t,{shallow:e=!1}={})=>ub(t,[],e),ub=(t,e,n)=>{if(e.includes(
|
|
43
|
+
t))return;const r=n?JP:s=>ub(s,[...e,t],n),i=HP(t);return QP(i,r),i},JP=t=>t,QP=(t,e)=>{ZP(t),ex(t),tx(t),RP(t,e),bP(t,e),gP(t)},ZP=t=>{if(Id(t.name))return;const e=Object.getPrototypeOf(t).name,n=Id(e)?e:t.constructor.name;Qr(t,"name",n)},ex=t=>{Id(t.message)||Qr(t,"message","")},tx=t=>{Id(t.stack)||am(t)},Id=t=>typeof t=="string"&&t!=="",nx=(t,e,n=t.name)=>{if(rx(e),typeof n!="string")throw new TypeError(`currentName must be a string: ${n}`);return n},rx=t=>{if(!ix(t))throw new TypeError(`Erro\
|
|
44
|
+
rClass must be a class: ${t}`);if(!cb(t.prototype))throw new TypeError(`ErrorClass must inherit from Error: ${t}`);if(!sx(t))throw new TypeError(`ErrorClass must be have a valid constructor: ${t}`)},ix=t=>typeof t=="function"&&typeof t.prototype=="object"&&t.prototype!==null,cb=t=>t!==null&&(t.name==="Error"||cb(Object.getPrototypeOf(t))),sx=t=>typeof t.prototype.constructor=="function",lb=(t,e,n)=>{Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})},ox=(t,e)=>{Object.
|
|
45
|
+
getPrototypeOf(t)!==e.prototype&&(ax(t,e),hb(t,"constructor"),ux(t,e))},ax=(t,e)=>{Object.setPrototypeOf(t,e.prototype)},ux=(t,e)=>{hb(t,"name");const n=db(e.prototype);t.name!==n&&lb(t,"name",n)},db=t=>cx(t)??lx(t)??db(Object.getPrototypeOf(t)),cx=t=>Object.hasOwn(t,"name")&&fb(t.name)?t.name:void 0,lx=t=>typeof t.constructor=="function"&&fb(t.constructor.name)?t.constructor.name:void 0,fb=t=>typeof t=="string"&&t!=="",hb=(t,e)=>{Object.hasOwn(t,e)&&delete t[e]},dx=(t,e)=>{if(!fx(t,e))return;const n=px(
|
|
46
|
+
t,e);lb(t,"stack",n)},fx=(t,e)=>e!==t.name&&e!==""&&t.stack.includes(e)&&hx(),hx=()=>{class t extends Error{}const e={value:pb,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=="string"&&n.includes(pb)},pb="SetErrorClassError",px=({name:t,stack:e},n)=>{if(e.startsWith(`${n}: `))return e.replace(n,t);const r=mx(n,t),[i,s]=r.find(([o])=>e.includes(o));return e.replace(i,s)},mx=(t,e)=>[[
|
|
47
|
+
`
|
|
48
|
+
${t}: `,`
|
|
49
|
+
${e}: `],[`${t}: `,`${e}: `],[`${t} `,`${e} `],[t,e]],gx=(t,e,n)=>{const r=Nd(t),i=nx(r,e,n);return ox(r,e),dx(r,i),r},yx=(t,e)=>e.configurable===!1?vx(t,e):Ex(t,e),vx=(t,e)=>({...e,...wx(t,e),...bx(t,e)}),wx=(t,e)=>e.writable===!0&&t.writable===!1?{writable:!1}:{},bx=(t,e)=>t.hasValue&&"value"in e&&e.writable===!0?{value:t.value}:{},Ex=(t,e)=>{const n=Ba(t.enumerable,e.enumerable,!0),r=Ba(t.writable,e.writable,!0),i=Ba(t.configurable,e.configurable,!0);return{...$x(t,e,r),enumerable:n,configurable:i}},
|
|
50
|
+
$x=(t,e,n)=>t.hasValue?{value:t.value,writable:n}:!mb(t)&&!mb(e)?{value:e.value,writable:n}:{get:Ba(t.get,e.get),set:Ba(t.set,e.set)},mb=({get:t,set:e})=>t!==void 0||e!==void 0,Ba=(t,e,n)=>t??e??n,Dx=(t,e,n)=>{if(!Rx(t))throw new TypeError(`Argument must be an object: ${t}`);if(!kx(e))throw new TypeError(`Property key must be a string, a symbol or an integer: ${e}`);return Tx(n)},Rx=t=>typeof t=="object"&&t!==null,kx=t=>{const e=typeof t;return e==="string"||e==="symbol"||e==="number"},Tx=t=>{if(!xd(
|
|
51
|
+
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 Cx({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}},Cx=({enumerable:t,writable:e,configurable:n,get:r,set:i,unknownProps:s,hasValue:o})=>{gb(o,r,"get"),gb(o,i,"set"),um(t,"enumerable"),um(e,"writable"),um(n,"configurable"),Sx(s)},gb=(t,e,n)=>{
|
|
52
|
+
if(Ax(e,n),t&&e!==void 0)throw new TypeError(`Descriptor property "value" and "${n}" must not both be defined: ${e}`)},Ax=(t,e)=>{if(t!==void 0&&typeof t!="function")throw new TypeError(`Descriptor property "${e}" must be a function: ${t}`)},um=(t,e)=>{if(t!==void 0&&typeof t!="boolean")throw new TypeError(`Descriptor property "${e}" must be a boolean: ${t}`)},Sx=t=>{const[e]=Object.keys(t);if(e!==void 0)throw new TypeError(`Unknown descriptor property "${e}": ${t[e]}`)},_x=(t,e,n)=>{const r=Dx(
|
|
53
|
+
t,e,n),i=yb(t,e),s=yx(r,i);return Px(t,e,s),t},yb=(t,e)=>{const n=Object.getOwnPropertyDescriptor(t,e);if(n!==void 0)return n;const r=Object.getPrototypeOf(t);return r===null?{}:yb(r,e)},Px=(t,e,n)=>{try{Object.defineProperty(t,e,n)}catch{}},xx=(t,e,n)=>{if(n!==void 0)return vb(t,e,n);try{delete t[e]}catch{}if(t[e]!==void 0)return vb(t,e)},vb=(t,e,n)=>{const r=Nx(e);_x(t,e,{value:n,...r})},Nx=t=>typeof t=="string"&&t.startsWith("_")?{enumerable:!1}:{},Ix=(t,e,n={})=>{if(wb(t,"First argument"),wb(
|
|
54
|
+
e,"Second argument"),!xd(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}},wb=(t,e)=>{if(t===void 0)throw new TypeError(`${e} is required.`);if(!Ox(t))throw new TypeError(`${e} must be a plain object or an error: ${t}`)},Ox=t=>xd(t)||ib(t),Fx=({error:t,props:e,propName:n,soft:r})=>Lx(n)||!qx.call(e,n)||r&&t[n]!==void 0,Lx=t=>t in Mx||Bx.has(t),Mx=new Error("check"),
|
|
55
|
+
Bx=new Set(["prototype","errors","cause"]),{propertyIsEnumerable:qx}=Object.prototype,jx=(t,e,n)=>{const{soft:r}=Ix(t,e,n);for(const i of Reflect.ownKeys(e))Gx({error:t,props:e,propName:i,soft:r});return t},Gx=({error:t,props:e,propName:n,soft:r})=>{Fx({error:t,props:e,propName:n,soft:r})||xx(t,n,e[n])},Od=(t,e,n)=>{Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!1,configurable:!0})},Ux=(t,e)=>{if(t.errors===void 0)return;const n=t.errors.map(r=>e(r).error).filter(Boolean);Od(t,"error\
|
|
56
|
+
s",n)},Wx=({target:t,source:e,parent:n,child:r})=>{if(!bb(t)){zx(t,e);return}bb(e)&&Od(t,"errors",[...r.errors,...n.errors])},zx=(t,e)=>{e.errors!==void 0&&Od(t,"errors",e.errors)},bb=t=>t.errors!==void 0&&t.errors.length!==0,Hx=(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},Kx=({name:t,stack:e},n,r)=>r!==""&&e.includes(r)?Vx({name:t,stack:e,newMessage:n,
|
|
57
|
+
currentMessage:r}):Yx(t,e,n),Vx=({name:t,stack:e,newMessage:n,currentMessage:r})=>{const i=Xx(t,n,r),[s,o]=i.find(([a])=>e.includes(a));return e.replace(s,o)},Xx=(t,e,n)=>[[`${t}: ${n}`,`${t}: ${e}`],[`: ${n}`,`: ${e}`],[`
|
|
58
|
+
${n}`,`
|
|
59
|
+
${e}`],[` ${n}`,` ${e}`],[n,e]],Yx=(t,e,n)=>{const r=`${t}: `,i=n.trimEnd();return e===t||e.startsWith(`${t}
|
|
60
|
+
`)?e.replace(t,`${r}${i}`):e.startsWith(r)?e.replace(r,`${r}${i}
|
|
61
|
+
`):`${r}${i}
|
|
62
|
+
${e}`},Jx=(t,e,n)=>{const r=Nd(t),i=Hx(r,e,n);return $b(r,"message",e),Qx(r,e,i),r},Qx=(t,e,n)=>{if(e===n||!Zx())return;const r=Kx(t,e,n);$b(t,"stack",r)},Zx=()=>{const{stack:t}=new Error(Eb);return typeof t=="string"&&t.includes(Eb)},Eb="set-error-message test message",$b=(t,e,n)=>{Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})},e1=(t,e,n)=>{if(typeof e!="string")throw new TypeError(`Second argument must be a message string: ${e}`);const r=Nd(t),i=t1(e,r.message);
|
|
63
|
+
return Jx(r,i,n)},t1=(t,e)=>{const n=t.trim(),r=e.trim();return n===""?r:r===""?n:n1(n,r,t)},n1=(t,e,n)=>t.endsWith(r1)?n.endsWith(i1)?`${t}
|
|
64
|
+
${e}`:`${t} ${e}`:`${e}
|
|
65
|
+
${t}`,r1=":",i1=`
|
|
66
|
+
`,s1=({parent:t,child:e,target:n,stackError:r})=>{const i=t.message,s=r.message;return n.message=e.message,e1(n,i,s)},o1=(t,e)=>Db(t)===e,Db=t=>typeof t=="object"&&t!==null?t.stack:void 0,a1=({wrap:t,target:e,source:n,childHasStack:r})=>t===r?e:(Od(e,"stack",n.stack),n),u1=t=>{const{wrap:e,name:n}=t;return typeof e!="boolean"?n==="Error":(Object.hasOwn(t,"wrap")&&delete t.wrap,e)},Rb=t=>kb(t,[]).error,kb=(t,e)=>{if(e.includes(t))return{};const n=c=>kb(c,[...e,t]),r=Db(t),i=Nd(t,{shallow:!0}),s=o1(
|
|
67
|
+
i,r);Ux(i,n);const{parent:o,childHasStack:a}=c1(i,n);return{error:o,errorHasStack:s||a}},c1=(t,e)=>{const n=u1(t);if(t.cause===void 0)return{parent:t,childHasStack:!1};const{error:r,errorHasStack:i}=e(t.cause);return delete t.cause,{parent:l1({parent:t,child:r,childHasStack:i,wrap:n}),childHasStack:i}},l1=({parent:t,child:e,childHasStack:n,wrap:r})=>{if(e===void 0)return t;const[i,s]=r?[e,t]:[t,e],o=a1({wrap:r,target:i,source:s,childHasStack:n}),a=gx(i,i.constructor,o.name),u=s1({parent:t,child:e,
|
|
68
|
+
target:a,stackError:o});return Wx({target:u,source:s,parent:t,child:e}),jx(u,s,{soft:!r})};function Tb(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]=Tb(t)(i,s);return t.delete(n),r}}function d1(t,{indentation:e}={}){return JSON.stringify(t,Tb(new WeakSet),e)}const Cb=t=>t.split(`
|
|
69
|
+
`).map(e=>e.trim().replace("file://",""));function cm(t,e=2){return t=Array.isArray(t)?t:t.split(`
|
|
70
|
+
`),t.map(n=>`${" ".repeat(e)}${n}`).join(`
|
|
71
|
+
`)}function rr(t){if(typeof t=="string")return t;if(t instanceof Error){const e=Rb(t);if(e.stack){const n=Cb(e.stack);return e.message+`
|
|
72
|
+
`+cm(n.slice(1))}return e.message}return d1(t)}function f1(t){const e=Object.values(t.properties).filter(n=>n instanceof Error).map(n=>{const r=Rb(n);return r.stack&&(r.stack=Cb(r.stack).join(`
|
|
73
|
+
`)),r});return e.length===0?null:e.length===1?e[0]:new AggregateError(e)}function h1(t,e){const n=f1(t.record);if(n){let r=n.message;return n.stack&&(r=r+`
|
|
74
|
+
`+cm(n.stack.split(`
|
|
75
|
+
`).slice(1))),r=`${y1.red}${r}${g1}`,{...t,message:t.message+`
|
|
76
|
+
`+cm(r)}}return t}const p1={debug:"DEBUG",info:"INFO ",warning:"WARN ",error:"ERROR",fatal:"FATAL"},m1=t=>p1[t],g1="\x1B[0m",y1={red:"\x1B[31m"};function v1(t){const e=({timestamp:n,level:r,category:i,message:s})=>`${n} ${r} ${i} ${s}`;return Zw({timestamp:"time",level:m1,categoryStyle:"bold",categoryColor:"cyan",category:".",...t,format:n=>e(h1(n))})}function Ab(t){return eb({formatter:v1(),...t})}const bn=rP("likec4");function w1(t){return bn.getChild(t)}let b1=!1;function E1(t){try{b1=!0;const e=t?.
|
|
77
|
+
sinks??{};hP({...t,sinks:{...e,console:e.console??Ab()},loggers:[{category:["logtape","meta"],sinks:["console"],lowestLevel:"warning"},...t?.loggers??[{category:"likec4",sinks:["console"],lowestLevel:"debug"}]]})}catch(e){console.error(e)}}function lm(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\
|
|
78
|
+
]":!0}function dm(t,e,n=".",r){if(!lm(e))return dm(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]]:lm(o)&&lm(i[s])?i[s]=dm(o,i[s],(n?`${n}.`:"")+s.toString(),r):i[s]=o))}return i}function $1(t){return(...e)=>e.reduce((n,r)=>dm(n,r,"",t),{})}const fm=$1();function kt(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function ir(t){return typeof t==
|
|
79
|
+
"object"&&t!==null&&typeof t.$refText=="string"}function D1(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function Fd(t){return typeof t=="object"&&t!==null&&kt(t.container)&&ir(t.reference)&&typeof t.message=="string"}class Sb{constructor(){this.subtypes={},this.allSubtypes={}}isInstance(e,n){return kt(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!==
|
|
80
|
+
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 Gi(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function Ds(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function _b(t){return Gi(t)&&typeof t.fullText=="string"}class en{constructor(e,n){this.startFn=e,this.
|
|
81
|
+
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(
|
|
82
|
+
r)}toString(){return this.join()}concat(e){return new en(()=>({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 Nn})}join(e=","){const n=this.iterator();let r="",i,s=!1;do i=n.next(),i.done||(s&&(r+=e),r+=R1(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;){
|
|
83
|
+
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 en(this.startFn,n=>{const{done:r,value:i}=this.nextFn(n);return r?Nn:{done:!1,value:e(i)}})}filter(e){return new en(this.
|
|
84
|
+
startFn,n=>{let r;do if(r=this.nextFn(n),!r.done&&e(r.value))return r;while(!r.done);return Nn})}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.
|
|
85
|
+
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 en(()=>({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(Ld(
|
|
86
|
+
s))n.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}}while(n.iterator);return Nn})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const n=e>1?this.flat(e-1):this;return new en(()=>({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(Ld(s))r.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}while(r.iterator);return Nn})}head(){const n=this.iterator().next();if(!n.done)return n.
|
|
87
|
+
value}tail(e=1){return new en(()=>{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 en(()=>({size:0,state:this.startFn()}),n=>(n.size++,n.size>e?Nn:this.nextFn(n.state)))}distinct(e){return new en(()=>({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 Nn})}exclude(e,n){const r=new Set;for(const i of e){
|
|
88
|
+
const s=n?n(i):i;r.add(s)}return this.filter(i=>{const s=n?n(i):i;return!r.has(s)})}}function R1(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function Ld(t){return!!t&&typeof t[Symbol.iterator]=="function"}const qa=new en(()=>{},()=>Nn),Nn=Object.freeze({done:!0,value:void 0});function Xe(...t){if(t.length===1){const e=t[0];if(e instanceof en)return e;if(Ld(e))return new en(()=>e[Symbol.iterator](),n=>n.next());
|
|
89
|
+
if(typeof e.length=="number")return new en(()=>({index:0}),n=>n.index<e.length?{done:!1,value:e[n.index++]}:Nn)}return t.length>1?new en(()=>({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++];Ld(n)?e.iterator=n[Symbol.iterator]():n&&typeof n.length=="number"&&(e.array=n)}}while(e.
|
|
90
|
+
iterator||e.array||e.collIndex<t.length);return Nn}):qa}class _o extends en{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 Nn})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{
|
|
91
|
+
e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var hm;(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})(hm||(hm={}));function Md(t){return new _o(t,e=>Gi(e)?e.content:[],{includeRoot:!0})}function k1(t){return Md(t).filter(Ds)}function T1(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}
|
|
92
|
+
function pm(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function Bd(t){if(!t)return;const{offset:e,end:n,range:r}=t;return{range:r,offset:e,end:n,length:n-e}}var Zr;(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"})(Zr||(Zr={}));function C1(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=
|
|
93
|
+
e.start.character)return Zr.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return Zr.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?Zr.Inside:n?Zr.OverlapBack:r?Zr.OverlapFront:Zr.Outside}function Pb(t,e){return C1(t,e)>Zr.After}const xb=/^[\w\p{L}]$/u;function Rs(t,e,n=xb){if(t){if(e>0){const r=e-
|
|
94
|
+
t.offset,i=t.text.charAt(r);n.test(i)||e--}return Ib(t,e)}}function mm(t,e){if(t){const n=A1(t,!0);if(n&&Nb(n,e))return n;if(_b(t)){const r=t.content.findIndex(i=>!i.hidden);for(let i=r-1;i>=0;i--){const s=t.content[i];if(Nb(s,e))return s}}}}function Nb(t,e){return Ds(t)&&e.includes(t.tokenType.name)}function Ib(t,e){if(Ds(t))return t;if(Gi(t)){const n=Ob(t,e,!1);if(n)return Ib(n,e)}}function gm(t,e){if(Ds(t))return t;if(Gi(t)){const n=Ob(t,e,!0);if(n)return gm(n,e)}}function Ob(t,e,n){let r=0,i=t.
|
|
95
|
+
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 A1(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 S1(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 _1(t,e){
|
|
96
|
+
const n=P1(t,e);return n?n.parent.content.slice(n.a+1,n.b):[]}function P1(t,e){const n=Fb(t),r=Fb(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 Fb(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 Lb extends Error{constructor(e,n){super(e?`${n} at ${e.range.start.line}:${e.range.start.character}`:n)}}function ja(t){
|
|
97
|
+
throw new Error("Error! The input value was not handled.")}const qd="AbstractRule",jd="AbstractType",ym="Condition",Mb="TypeDefinition",vm="ValueLiteral",Ga="AbstractElement";function wm(t){return Je.isInstance(t,Ga)}const Gd="ArrayLiteral",Ua="ArrayType";function x1(t){return Je.isInstance(t,Ua)}const Wa="BooleanLiteral";function N1(t){return Je.isInstance(t,Wa)}const za="Conjunction";function I1(t){return Je.isInstance(t,za)}const Ha="Disjunction";function O1(t){return Je.isInstance(t,Ha)}const Ud="\
|
|
98
|
+
Grammar",bm="GrammarImport",Ka="InferredType";function Bb(t){return Je.isInstance(t,Ka)}const Va="Interface";function qb(t){return Je.isInstance(t,Va)}const Em="NamedArgument",Xa="Negation";function F1(t){return Je.isInstance(t,Xa)}const Wd="NumberLiteral",zd="Parameter",Ya="ParameterReference";function L1(t){return Je.isInstance(t,Ya)}const Ja="ParserRule";function fn(t){return Je.isInstance(t,Ja)}const Qa="ReferenceType";function M1(t){return Je.isInstance(t,Qa)}const Hd="ReturnType";function B1(t){
|
|
99
|
+
return Je.isInstance(t,Hd)}const Za="SimpleType";function jb(t){return Je.isInstance(t,Za)}const Kd="StringLiteral",Po="TerminalRule";function ei(t){return Je.isInstance(t,Po)}const eu="Type";function $m(t){return Je.isInstance(t,eu)}const Dm="TypeAttribute",tu="UnionType";function q1(t){return Je.isInstance(t,tu)}const nu="Action";function ks(t){return Je.isInstance(t,nu)}const ru="Alternatives";function Rm(t){return Je.isInstance(t,ru)}const iu="Assignment";function Lr(t){return Je.isInstance(
|
|
100
|
+
t,iu)}const su="CharacterRange";function j1(t){return Je.isInstance(t,su)}const ou="CrossReference";function au(t){return Je.isInstance(t,ou)}const uu="EndOfFile";function G1(t){return Je.isInstance(t,uu)}const cu="Group";function Ui(t){return Je.isInstance(t,cu)}const lu="Keyword";function Mr(t){return Je.isInstance(t,lu)}const du="NegatedToken";function U1(t){return Je.isInstance(t,du)}const fu="RegexToken";function W1(t){return Je.isInstance(t,fu)}const hu="RuleCall";function ti(t){return Je.
|
|
101
|
+
isInstance(t,hu)}const pu="TerminalAlternatives";function z1(t){return Je.isInstance(t,pu)}const mu="TerminalGroup";function H1(t){return Je.isInstance(t,mu)}const gu="TerminalRuleCall";function Gb(t){return Je.isInstance(t,gu)}const yu="UnorderedGroup";function km(t){return Je.isInstance(t,yu)}const vu="UntilToken";function K1(t){return Je.isInstance(t,vu)}const wu="Wildcard";function V1(t){return Je.isInstance(t,wu)}class Ub extends Sb{getAllTypes(){return[Ga,qd,jd,nu,ru,Gd,Ua,iu,Wa,su,ym,za,ou,
|
|
102
|
+
Ha,uu,Ud,bm,cu,Ka,Va,lu,Em,du,Xa,Wd,zd,Ya,Ja,Qa,fu,Hd,hu,Za,Kd,pu,mu,Po,gu,eu,Dm,Mb,tu,yu,vu,vm,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 hu:case pu:case mu:case gu:case yu:case vu:case wu:return this.isSubtype(Ga,n);case Gd:case Wd:case Kd:return this.isSubtype(vm,n);case Ua:case Qa:case Za:case tu:return this.isSubtype(Mb,n);case Wa:return this.isSubtype(ym,n)||this.isSubtype(vm,n);case za:case Ha:case Xa:case Ya:return this.
|
|
103
|
+
isSubtype(ym,n);case Ka:case Va:case eu:return this.isSubtype(jd,n);case Ja:return this.isSubtype(qd,n)||this.isSubtype(jd,n);case Po:return this.isSubtype(qd,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 jd;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return qd;case"Grammar:usedGrammar\
|
|
104
|
+
s":return Ud;case"NamedArgument:parameter":case"ParameterReference:parameter":return zd;case"TerminalRuleCall:rule":return Po;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 Gd:return{name:Gd,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{
|
|
105
|
+
name:za,properties:[{name:"left"},{name:"right"}]};case Ha:return{name:Ha,properties:[{name:"left"},{name:"right"}]};case Ud:return{name:Ud,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\
|
|
106
|
+
th"}]};case Ka:return{name:Ka,properties:[{name:"name"}]};case Va:return{name:Va,properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case Em:return{name:Em,properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case Xa:return{name:Xa,properties:[{name:"value"}]};case Wd:return{name:Wd,properties:[{name:"value"}]};case zd:return{name:zd,properties:[{name:"name"}]};case Ya:return{name:Ya,properties:[{name:"parameter"}]};case Ja:
|
|
107
|
+
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 Hd:return{name:Hd,properties:[{name:"name"}]};case Za:return{name:Za,properties:[{name:"primit\
|
|
108
|
+
iveType"},{name:"stringType"},{name:"typeRef"}]};case Kd:return{name:Kd,properties:[{name:"value"}]};case Po:return{name:Po,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 Dm:return{name:Dm,properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case tu:return{name:tu,properties:[{name:"types",defaultValue:[]}]};case nu:
|
|
109
|
+
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{
|
|
110
|
+
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:"\
|
|
111
|
+
lookahead"},{name:"terminal"}]};case fu:return{name:fu,properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case hu:return{name:hu,properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case pu:return{name:pu,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:[
|
|
112
|
+
{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 Ub;function Tm(t){for(const[e,n]of Object.entries(t))e.startsWith("$")||(Array.isArray(n)?n.forEach((r,i)=>{kt(
|
|
113
|
+
r)&&(r.$container=t,r.$containerProperty=e,r.$containerIndex=i)}):kt(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 Br(t,e){let n=t;for(;n;){if(e(n))return!0;n=n.$container}return!1}function at(t){const n=Vd(t).$document;if(!n)throw new Error("AST node has no document.");return n}function Vd(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 en(
|
|
114
|
+
()=>({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(kt(s)){if(r.keyIndex++,Cm(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(kt(a)&&Cm(a,n))return{done:!1,value:a}}r.arrayIndex=0}}r.keyIndex++}return Nn})}function qr(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new _o(t,n=>bu(n,e))}function ni(t,e){if(t){
|
|
115
|
+
if(e?.range&&!Cm(t,e.range))return new _o(t,()=>[])}else throw new Error("Root node must be an AstNode.");return new _o(t,n=>bu(n,e),{includeRoot:!0})}function Cm(t,e){var n;if(!e)return!0;const r=(n=t.$cstNode)===null||n===void 0?void 0:n.range;return r?Pb(r,e):!1}function Xd(t){return new en(()=>({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(ir(r))return e.keyIndex++,{done:!1,value:{reference:r,
|
|
116
|
+
container:t,property:n}};if(Array.isArray(r)){for(;e.arrayIndex<r.length;){const i=e.arrayIndex++,s=r[i];if(ir(s))return{done:!1,value:{reference:s,container:t,property:n,index:i}}}e.arrayIndex=0}}e.keyIndex++}return Nn})}function X1(t,e=at(t).parseResult.value){const n=[];return ni(e).forEach(r=>{Xd(r).forEach(i=>{i.reference.ref===t&&n.push(i.reference)})}),Xe(n)}function Am(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.
|
|
117
|
+
name]=Wb(i.defaultValue))}function Wb(t){return Array.isArray(t)?[...t.map(Wb)]:t}function Sm(t,e){const n={$type:t.$type};for(const[r,i]of Object.entries(t))if(!r.startsWith("$"))if(kt(i))n[r]=Sm(i,e);else if(ir(i))n[r]=e(n,r,i.$refNode,i.$refText);else if(Array.isArray(i)){const s=[];for(const o of i)kt(o)?s.push(Sm(o,e)):ir(o)?s.push(e(n,r,o.$refNode,o.$refText)):s.push(o);n[r]=s}else n[r]=i;return Tm(n),n}const xo={__proto__:null,assignMandatoryProperties:Am,copyAstNode:Sm,findLocalReferences:X1,
|
|
118
|
+
findRootNode:Vd,getContainerOfType:Wn,getDocument:at,hasContainerOfType:Br,linkContentToContainer:Tm,streamAllContents:qr,streamAst:ni,streamContents:bu,streamReferences:Xd};function Ae(t){return t.charCodeAt(0)}function _m(t,e){Array.isArray(t)?t.forEach(function(n){e.push(n)}):e.push(t)}function Eu(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 Y1(){throw Error("Internal Error - Shoul\
|
|
119
|
+
d never get here!")}function zb(t){return t.type==="Character"}const Yd=[];for(let t=Ae("0");t<=Ae("9");t++)Yd.push(t);const Jd=[Ae("_")].concat(Yd);for(let t=Ae("a");t<=Ae("z");t++)Jd.push(t);for(let t=Ae("A");t<=Ae("Z");t++)Jd.push(t);const Hb=[Ae(" "),Ae("\f"),Ae(`
|
|
120
|
+
`),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")],J1=/[0-9a-fA-F]/,Qd=/[0-9]/,Q1=/[1-9]/;class Kb{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=
|
|
121
|
+
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":Eu(r,"global");break;case"i":Eu(r,"ignoreCase");break;case"m":Eu(r,"multiLine");break;case"u":Eu(r,"unicode");break;case"y":Eu(r,"sticky");break}if(this.idx!==this.input.length)
|
|
122
|
+
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(){
|
|
123
|
+
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("\
|
|
124
|
+
)"),{type:n,value:r,loc:this.loc(e)}}return Y1()}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(
|
|
125
|
+
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()),
|
|
126
|
+
e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[Ae(`
|
|
127
|
+
`),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.
|
|
128
|
+
regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,n=!1;switch(this.popChar()){case"d":e=Yd;break;case"D":e=Yd,n=!0;break;case"s":e=Hb;break;case"S":e=Hb,n=!0;break;case"w":e=Jd;break;case"W":e=Jd,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(`
|
|
129
|
+
`);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(){
|
|
130
|
+
return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){const e=this.popChar();return{type:"Character",value:Ae(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|
|
131
|
+
`: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,zb(r)&&this.isRangeDash()){this.consumeChar("-");const i=this.classAtom();if(i.type,zb(i)){if(i.value<r.value)throw Error("Range out of order in character class");e.push({from:r.value,to:i.
|
|
132
|
+
value})}else _m(r.value,e),e.push(Ae("-")),_m(i.value,e)}else _m(r.value,e)}return this.consumeChar("]"),{type:"Set",complement:n,value:e}}classAtom(){switch(this.peekChar()){case"]":case`
|
|
133
|
+
`: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"\
|
|
134
|
+
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(Q1.test(e)===!1)throw Error("Expecting a\
|
|
135
|
+
positive integer");for(;Qd.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(Qd.test(e)===!1)throw Error("Expecting an integer");for(;Qd.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){const e=this.popChar();switch(e){case`
|
|
136
|
+
`: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 Qd.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case"]":case`
|
|
137
|
+
`: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(){
|
|
138
|
+
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`
|
|
139
|
+
`: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(J1.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: "+
|
|
140
|
+
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 Zd{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\
|
|
141
|
+
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.
|
|
142
|
+
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 Vb=/\r?\n/gm,Z1=new Kb;class eN extends Zd{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){
|
|
143
|
+
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===`
|
|
144
|
+
`&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const r=ef(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=!!`
|
|
145
|
+
`.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 Pm=new eN;function tN(t){try{return typeof t=="string"&&(t=new RegExp(t)),t=t.toString(),Pm.reset(t),Pm.visit(Z1.pattern(t)),Pm.multiline}catch{return!1}}const nN=`\f
|
|
146
|
+
\r \v \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`.split("");function xm(t){const e=typeof t=="string"?new RegExp(t):t;return nN.some(n=>e.test(n))}function ef(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function rN(t){return Array.prototype.map.call(t,e=>/\w/.test(e)?`[${e.toLowerCase()}${e.toUpperCase()}]`:ef(e)).join("")}function iN(t,e){const n=sN(t),r=e.match(n);return!!r&&r[0].length>0}function sN(t){typeof t=="stri\
|
|
147
|
+
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)||
|
|
148
|
+
[],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,
|
|
149
|
+
s;default:u(1);break}return s}return new RegExp(i(),t.flags)}function tf(t){return t.rules.find(e=>fn(e)&&e.entry)}function Xb(t){return t.rules.filter(e=>ei(e)&&e.hidden)}function Nm(t,e){const n=new Set,r=tf(t);if(!r)return new Set(t.rules);const i=[r].concat(Xb(t));for(const o of i)Yb(o,n,e);const s=new Set;for(const o of t.rules)(n.has(o.name)||ei(o)&&o.hidden)&&s.add(o);return s}function Yb(t,e,n){e.add(t.name),qr(t).forEach(r=>{if(ti(r)||n&&Gb(r)){const i=r.rule.ref;i&&!e.has(i.name)&&Yb(i,
|
|
150
|
+
e,n)}})}function Im(t){if(t.terminal)return t.terminal;if(t.type.ref){const e=Mm(t.type.ref);return e?.terminal}}function Jb(t){return t.hidden&&!xm(Ru(t))}function Io(t,e){return!t||!e?[]:Om(t,e,t.astNode,!0)}function hn(t,e,n){if(!t||!e)return;const r=Om(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 Om(t,e,n,r){if(!r){const i=Wn(t.grammarSource,Lr);if(i&&i.feature===e)return[t]}return Gi(t)&&t.astNode===n?t.content.flatMap(i=>Om(i,e,
|
|
151
|
+
n,!1)):[]}function Fm(t,e){return t?Lm(t,e,t?.astNode):[]}function $u(t,e,n){if(!t)return;const r=Lm(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 Lm(t,e,n){if(t.astNode!==n)return[];if(Mr(t.grammarSource)&&t.grammarSource.value===e)return[t];const r=Md(t).iterator();let i;const s=[];do if(i=r.next(),!i.done){const o=i.value;o.astNode===n?Mr(o.grammarSource)&&o.grammarSource.value===e&&s.push(o):r.prune()}while(!i.done);return s}function Qb(t){
|
|
152
|
+
var e;const n=t.astNode;for(;n===((e=t.container)===null||e===void 0?void 0:e.astNode);){const r=Wn(t.grammarSource,Lr);if(r)return r;t=t.container}}function Mm(t){let e=t;return Bb(e)&&(ks(e.$container)?e=e.$container.$container:fn(e.$container)?e=e.$container:ja(e.$container)),Zb(t,e,new Map)}function Zb(t,e,n){var r;function i(s,o){let a;return Wn(s,Lr)||(a=Zb(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 qr(e)){if(Lr(s)&&s.feature.toLowerCase()==="name")return n.
|
|
153
|
+
set(t,s),s;if(ti(s)&&fn(s.rule.ref))return i(s,s.rule.ref);if(jb(s)&&(!((r=s.typeRef)===null||r===void 0)&&r.ref))return i(s,s.typeRef.ref)}}function e0(t){const e=t.$container;if(Ui(e)){const n=e.elements,r=n.indexOf(t);for(let i=r-1;i>=0;i--){const s=n[i];if(ks(s))return s;{const o=qr(n[i]).find(ks);if(o)return o}}}if(wm(e))return e0(e)}function Oo(t,e){return t==="?"||t==="*"||Ui(e)&&!!e.guardCondition}function t0(t){return t==="*"||t==="+"}function oN(t){return t==="+="}function nf(t){return n0(
|
|
154
|
+
t,new Set)}function n0(t,e){if(e.has(t))return!0;e.add(t);for(const n of qr(t))if(ti(n)){if(!n.rule.ref||fn(n.rule.ref)&&!n0(n.rule.ref,e))return!1}else{if(Lr(n))return!1;if(ks(n))return!1}return!!t.definition}function aN(t){return Bm(t.type,new Set)}function Bm(t,e){if(e.has(t))return!0;if(e.add(t),x1(t))return!1;if(M1(t))return!1;if(q1(t))return t.types.every(n=>Bm(n,e));if(jb(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;
|
|
155
|
+
return $m(n)?Bm(n.type,e):!1}else return!1}else return!1}function Ts(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(fn(e))return e.name;if(qb(e)||$m(e))return e.name}}}function Du(t){var e;if(fn(t))return nf(t)?t.name:(e=Ts(t))!==null&&e!==void 0?e:t.name;if(qb(t)||$m(t)||B1(t))return t.name;if(ks(t)){const n=r0(t);if(n)return n}else if(Bb(t))return t.name;throw new Error("Cannot get name of Unknown Type")}function r0(t){
|
|
156
|
+
var e;if(t.inferredType)return t.inferredType.name;if(!((e=t.type)===null||e===void 0)&&e.ref)return Du(t.type.ref)}function uN(t){var e,n,r;return ei(t)?(n=(e=t.type)===null||e===void 0?void 0:e.name)!==null&&n!==void 0?n:"string":nf(t)?t.name:(r=Ts(t))!==null&&r!==void 0?r:t.name}function i0(t){var e,n,r;return ei(t)?(n=(e=t.type)===null||e===void 0?void 0:e.name)!==null&&n!==void 0?n:"string":(r=Ts(t))!==null&&r!==void 0?r:t.name}function Ru(t){const e={s:!1,i:!1,u:!1},n=Fo(t.definition,e),r=Object.
|
|
157
|
+
entries(e).filter(([,i])=>i).map(([i])=>i).join("");return new RegExp(n,r)}const qm=/[\s\S]/.source;function Fo(t,e){if(z1(t))return cN(t);if(H1(t))return lN(t);if(j1(t))return hN(t);if(Gb(t)){const n=t.rule.ref;if(!n)throw new Error("Missing rule reference.");return ri(Fo(n.definition),{cardinality:t.cardinality,lookahead:t.lookahead})}else{if(U1(t))return fN(t);if(K1(t))return dN(t);if(W1(t)){const n=t.regex.lastIndexOf("/"),r=t.regex.substring(1,n),i=t.regex.substring(n+1);return e&&(e.i=i.includes(
|
|
158
|
+
"i"),e.s=i.includes("s"),e.u=i.includes("u")),ri(r,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}else{if(V1(t))return ri(qm,{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error(`Invalid terminal element: ${t?.$type}`)}}}function cN(t){return ri(t.elements.map(e=>Fo(e)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead})}function lN(t){return ri(t.elements.map(e=>Fo(e)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead})}function dN(t){return ri(`${qm}*\
|
|
159
|
+
?${Fo(t.terminal)}`,{cardinality:t.cardinality,lookahead:t.lookahead})}function fN(t){return ri(`(?!${Fo(t.terminal)})${qm}*?`,{cardinality:t.cardinality,lookahead:t.lookahead})}function hN(t){return t.right?ri(`[${jm(t.left)}-${jm(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1}):ri(jm(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}function jm(t){return ef(t.value)}function ri(t,e){var n;return(e.wrap!==!1||e.lookahead)&&(t=`(${(n=e.lookahead)!==null&&n!==
|
|
160
|
+
void 0?n:""}${t})`),e.cardinality?`${t}${e.cardinality}`:t}const Gm={__proto__:null,findAssignment:Qb,findNameAssignment:Mm,findNodeForKeyword:$u,findNodeForProperty:hn,findNodesForKeyword:Fm,findNodesForKeywordInternal:Lm,findNodesForProperty:Io,getActionAtElement:e0,getActionType:r0,getAllReachableRules:Nm,getCrossReferenceTerminal:Im,getEntryRule:tf,getExplicitRuleType:Ts,getHiddenRules:Xb,getRuleType:i0,getRuleTypeName:uN,getTypeName:Du,isArrayCardinality:t0,isArrayOperator:oN,isCommentTerminal:Jb,
|
|
161
|
+
isDataType:aN,isDataTypeRule:nf,isOptionalCardinality:Oo,terminalRegex:Ru};function pN(t){const e=[],n=t.Grammar;for(const r of n.rules)ei(r)&&Jb(r)&&tN(Ru(r))&&e.push(r.name);return{multilineCommentRules:e,nameRegexp:xb}}var s0=typeof global=="object"&&global&&global.Object===Object&&global,mN=typeof self=="object"&&self&&self.Object===Object&&self,jr=s0||mN||Function("return this")(),sr=jr.Symbol,o0=Object.prototype,gN=o0.hasOwnProperty,yN=o0.toString,ku=sr?sr.toStringTag:void 0;function vN(t){
|
|
162
|
+
var e=gN.call(t,ku),n=t[ku];try{t[ku]=void 0;var r=!0}catch{}var i=yN.call(t);return r&&(e?t[ku]=n:delete t[ku]),i}var wN=Object.prototype,bN=wN.toString;function EN(t){return bN.call(t)}var $N="[object Null]",DN="[object Undefined]",a0=sr?sr.toStringTag:void 0;function Wi(t){return t==null?t===void 0?DN:$N:a0&&a0 in Object(t)?vN(t):EN(t)}function vr(t){return t!=null&&typeof t=="object"}var RN="[object Symbol]";function Tu(t){return typeof t=="symbol"||vr(t)&&Wi(t)==RN}function rf(t,e){for(var n=-1,
|
|
163
|
+
r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var Qe=Array.isArray,u0=sr?sr.prototype:void 0,c0=u0?u0.toString:void 0;function l0(t){if(typeof t=="string")return t;if(Qe(t))return rf(t,l0)+"";if(Tu(t))return c0?c0.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}var kN=/\s/;function TN(t){for(var e=t.length;e--&&kN.test(t.charAt(e)););return e}var CN=/^\s+/;function AN(t){return t&&t.slice(0,TN(t)+1).replace(CN,"")}function or(t){var e=typeof t;return t!=null&&(e=="object"||
|
|
164
|
+
e=="function")}var d0=NaN,SN=/^[-+]0x[0-9a-f]+$/i,_N=/^0b[01]+$/i,PN=/^0o[0-7]+$/i,xN=parseInt;function NN(t){if(typeof t=="number")return t;if(Tu(t))return d0;if(or(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=or(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=AN(t);var n=_N.test(t);return n||PN.test(t)?xN(t.slice(2),n?2:8):SN.test(t)?d0:+t}var IN=1/0,ON=17976931348623157e292;function FN(t){if(!t)return t===0?t:0;if(t=NN(t),t===IN||t===-1/0){var e=t<0?-1:1;return e*ON}return t===t?
|
|
165
|
+
t:0}function sf(t){var e=FN(t),n=e%1;return e===e?n?e-n:e:0}function Cs(t){return t}var LN="[object AsyncFunction]",MN="[object Function]",BN="[object GeneratorFunction]",qN="[object Proxy]";function ii(t){if(!or(t))return!1;var e=Wi(t);return e==MN||e==BN||e==LN||e==qN}var Um=jr["__core-js_shared__"],f0=function(){var t=/[^.]+$/.exec(Um&&Um.keys&&Um.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function jN(t){return!!f0&&f0 in t}var GN=Function.prototype,UN=GN.toString;function As(t){if(t!=
|
|
166
|
+
null){try{return UN.call(t)}catch{}try{return t+""}catch{}}return""}var WN=/[\\^$.*+?()[\]{}|]/g,zN=/^\[object .+?Constructor\]$/,HN=Function.prototype,KN=Object.prototype,VN=HN.toString,XN=KN.hasOwnProperty,YN=RegExp("^"+VN.call(XN).replace(WN,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function JN(t){if(!or(t)||jN(t))return!1;var e=ii(t)?YN:zN;return e.test(As(t))}function QN(t,e){return t?.[e]}function Ss(t,e){var n=QN(t,e);return JN(n)?n:void 0}var Wm=Ss(
|
|
167
|
+
jr,"WeakMap"),h0=Object.create,ZN=function(){function t(){}return function(e){if(!or(e))return{};if(h0)return h0(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function eI(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 Ht(){}function tI(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var nI=800,rI=16,iI=Date.now;function sI(t){var e=0,
|
|
168
|
+
n=0;return function(){var r=iI(),i=rI-(r-n);if(n=r,i>0){if(++e>=nI)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function oI(t){return function(){return t}}var of=function(){try{var t=Ss(Object,"defineProperty");return t({},"",{}),t}catch{}}(),aI=of?function(t,e){return of(t,"toString",{configurable:!0,enumerable:!1,value:oI(e),writable:!0})}:Cs,uI=sI(aI);function p0(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}function m0(t,e,n,r){for(var i=t.length,
|
|
169
|
+
s=n+-1;++s<i;)if(e(t[s],s,t))return s;return-1}function cI(t){return t!==t}function lI(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function zm(t,e,n){return e===e?lI(t,e,n):m0(t,cI,n)}function g0(t,e){var n=t==null?0:t.length;return!!n&&zm(t,e,0)>-1}var dI=9007199254740991,fI=/^(?:0|[1-9]\d*)$/;function af(t,e){var n=typeof t;return e=e??dI,!!e&&(n=="number"||n!="symbol"&&fI.test(t))&&t>-1&&t%1==0&&t<e}function Hm(t,e,n){e=="__proto__"&&of?of(t,e,{configurable:!0,enumerable:!0,
|
|
170
|
+
value:n,writable:!0}):t[e]=n}function Cu(t,e){return t===e||t!==t&&e!==e}var hI=Object.prototype,pI=hI.hasOwnProperty;function uf(t,e,n){var r=t[e];(!(pI.call(t,e)&&Cu(r,n))||n===void 0&&!(e in t))&&Hm(t,e,n)}function Au(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?Hm(n,a,u):uf(n,a,u)}return n}var y0=Math.max;function mI(t,e,n){return e=y0(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,s=y0(r.length-e,0),o=Array(s);++i<s;)
|
|
171
|
+
o[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=n(o),eI(t,this,a)}}function Km(t,e){return uI(mI(t,e,Cs),t+"")}var gI=9007199254740991;function Vm(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=gI}function Gr(t){return t!=null&&Vm(t.length)&&!ii(t)}function v0(t,e,n){if(!or(n))return!1;var r=typeof e;return(r=="number"?Gr(n)&&af(e,n.length):r=="string"&&e in n)?Cu(n[e],t):!1}function yI(t){return Km(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=
|
|
172
|
+
t.length>3&&typeof s=="function"?(i--,s):void 0,o&&v0(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 vI=Object.prototype;function Su(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||vI;return t===n}function wI(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var bI="[object Arguments]";function w0(t){return vr(t)&&Wi(t)==bI}var b0=Object.prototype,EI=b0.hasOwnProperty,$I=b0.propertyIsEnumerable,cf=w0(function(){return arguments}())?
|
|
173
|
+
w0:function(t){return vr(t)&&EI.call(t,"callee")&&!$I.call(t,"callee")};function DI(){return!1}var E0=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$0=E0&&typeof module=="object"&&module&&!module.nodeType&&module,RI=$0&&$0.exports===E0,D0=RI?jr.Buffer:void 0,kI=D0?D0.isBuffer:void 0,_u=kI||DI,TI="[object Arguments]",CI="[object Array]",AI="[object Boolean]",SI="[object Date]",_I="[object Error]",PI="[object Function]",xI="[object Map]",NI="[object Number]",II="[object Object]",OI="\
|
|
174
|
+
[object RegExp]",FI="[object Set]",LI="[object String]",MI="[object WeakMap]",BI="[object ArrayBuffer]",qI="[object DataView]",jI="[object Float32Array]",GI="[object Float64Array]",UI="[object Int8Array]",WI="[object Int16Array]",zI="[object Int32Array]",HI="[object Uint8Array]",KI="[object Uint8ClampedArray]",VI="[object Uint16Array]",XI="[object Uint32Array]",bt={};bt[jI]=bt[GI]=bt[UI]=bt[WI]=bt[zI]=bt[HI]=bt[KI]=bt[VI]=bt[XI]=!0,bt[TI]=bt[CI]=bt[BI]=bt[AI]=bt[qI]=bt[SI]=bt[_I]=bt[PI]=bt[xI]=bt[NI]=
|
|
175
|
+
bt[II]=bt[OI]=bt[FI]=bt[LI]=bt[MI]=!1;function YI(t){return vr(t)&&Vm(t.length)&&!!bt[Wi(t)]}function lf(t){return function(e){return t(e)}}var R0=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Pu=R0&&typeof module=="object"&&module&&!module.nodeType&&module,JI=Pu&&Pu.exports===R0,Xm=JI&&s0.process,zi=function(){try{var t=Pu&&Pu.require&&Pu.require("util").types;return t||Xm&&Xm.binding&&Xm.binding("util")}catch{}}(),k0=zi&&zi.isTypedArray,Ym=k0?lf(k0):YI,QI=Object.prototype,ZI=QI.
|
|
176
|
+
hasOwnProperty;function T0(t,e){var n=Qe(t),r=!n&&cf(t),i=!n&&!r&&_u(t),s=!n&&!r&&!i&&Ym(t),o=n||r||i||s,a=o?wI(t.length,String):[],u=a.length;for(var c in t)(e||ZI.call(t,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||af(c,u)))&&a.push(c);return a}function C0(t,e){return function(n){return t(e(n))}}var eO=C0(Object.keys,Object),tO=Object.prototype,nO=tO.hasOwnProperty;function A0(t){if(!Su(t))return eO(t);var e=[];for(var n in Object(t))
|
|
177
|
+
nO.call(t,n)&&n!="constructor"&&e.push(n);return e}function ar(t){return Gr(t)?T0(t):A0(t)}var rO=Object.prototype,iO=rO.hasOwnProperty,zn=yI(function(t,e){if(Su(e)||Gr(e)){Au(e,ar(e),t);return}for(var n in e)iO.call(e,n)&&uf(t,n,e[n])});function sO(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var oO=Object.prototype,aO=oO.hasOwnProperty;function uO(t){if(!or(t))return sO(t);var e=Su(t),n=[];for(var r in t)r=="constructor"&&(e||!aO.call(t,r))||n.push(r);return n}function Jm(t){
|
|
178
|
+
return Gr(t)?T0(t,!0):uO(t)}var cO=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,lO=/^\w*$/;function Qm(t,e){if(Qe(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||Tu(t)?!0:lO.test(t)||!cO.test(t)||e!=null&&t in Object(e)}var xu=Ss(Object,"create");function dO(){this.__data__=xu?xu(null):{},this.size=0}function fO(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var hO="__lodash_hash_undefined__",pO=Object.prototype,mO=pO.hasOwnProperty;
|
|
179
|
+
function gO(t){var e=this.__data__;if(xu){var n=e[t];return n===hO?void 0:n}return mO.call(e,t)?e[t]:void 0}var yO=Object.prototype,vO=yO.hasOwnProperty;function wO(t){var e=this.__data__;return xu?e[t]!==void 0:vO.call(e,t)}var bO="__lodash_hash_undefined__";function EO(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=xu&&e===void 0?bO:e,this}function _s(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])}}_s.prototype.clear=dO,_s.prototype.delete=
|
|
180
|
+
fO,_s.prototype.get=gO,_s.prototype.has=wO,_s.prototype.set=EO;function $O(){this.__data__=[],this.size=0}function df(t,e){for(var n=t.length;n--;)if(Cu(t[n][0],e))return n;return-1}var DO=Array.prototype,RO=DO.splice;function kO(t){var e=this.__data__,n=df(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():RO.call(e,n,1),--this.size,!0}function TO(t){var e=this.__data__,n=df(e,t);return n<0?void 0:e[n][1]}function CO(t){return df(this.__data__,t)>-1}function AO(t,e){var n=this.__data__,r=df(
|
|
181
|
+
n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function si(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])}}si.prototype.clear=$O,si.prototype.delete=kO,si.prototype.get=TO,si.prototype.has=CO,si.prototype.set=AO;var Nu=Ss(jr,"Map");function SO(){this.size=0,this.__data__={hash:new _s,map:new(Nu||si),string:new _s}}function _O(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function ff(t,e){
|
|
182
|
+
var n=t.__data__;return _O(e)?n[typeof e=="string"?"string":"hash"]:n.map}function PO(t){var e=ff(this,t).delete(t);return this.size-=e?1:0,e}function xO(t){return ff(this,t).get(t)}function NO(t){return ff(this,t).has(t)}function IO(t,e){var n=ff(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function oi(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])}}oi.prototype.clear=SO,oi.prototype.delete=PO,oi.prototype.get=xO,oi.prototype.has=NO,
|
|
183
|
+
oi.prototype.set=IO;var OO="Expected a function";function Zm(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(OO);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(Zm.Cache||oi),n}Zm.Cache=oi;var FO=500;function LO(t){var e=Zm(t,function(r){return n.size===FO&&n.clear(),r}),n=e.cache;return e}var MO=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,
|
|
184
|
+
BO=/\\(\\)?/g,qO=LO(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(MO,function(n,r,i,s){e.push(i?s.replace(BO,"$1"):r||n)}),e});function jO(t){return t==null?"":l0(t)}function hf(t,e){return Qe(t)?t:Qm(t,e)?[t]:qO(jO(t))}function Iu(t){if(typeof t=="string"||Tu(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function eg(t,e){e=hf(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[Iu(e[n++])];return n&&n==r?t:void 0}function GO(t,e,n){var r=t==null?void 0:eg(t,e);return r===
|
|
185
|
+
void 0?n:r}function tg(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var S0=sr?sr.isConcatSpreadable:void 0;function UO(t){return Qe(t)||cf(t)||!!(S0&&t&&t[S0])}function ng(t,e,n,r,i){var s=-1,o=t.length;for(n||(n=UO),i||(i=[]);++s<o;){var a=t[s];n(a)?tg(i,a):r||(i[i.length]=a)}return i}function ur(t){var e=t==null?0:t.length;return e?ng(t):[]}var _0=C0(Object.getPrototypeOf,Object);function P0(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>>>
|
|
186
|
+
0,e>>>=0;for(var s=Array(i);++r<i;)s[r]=t[r+e];return s}function WO(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 zO(){this.__data__=new si,this.size=0}function HO(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function KO(t){return this.__data__.get(t)}function VO(t){return this.__data__.has(t)}var XO=200;function YO(t,e){var n=this.__data__;if(n instanceof si){var r=n.__data__;if(!Nu||r.length<XO-1)return r.push([t,e]),this.
|
|
187
|
+
size=++n.size,this;n=this.__data__=new oi(r)}return n.set(t,e),this.size=n.size,this}function Ur(t){var e=this.__data__=new si(t);this.size=e.size}Ur.prototype.clear=zO,Ur.prototype.delete=HO,Ur.prototype.get=KO,Ur.prototype.has=VO,Ur.prototype.set=YO;function JO(t,e){return t&&Au(e,ar(e),t)}function QO(t,e){return t&&Au(e,Jm(e),t)}var x0=typeof exports=="object"&&exports&&!exports.nodeType&&exports,N0=x0&&typeof module=="object"&&module&&!module.nodeType&&module,ZO=N0&&N0.exports===x0,I0=ZO?jr.
|
|
188
|
+
Buffer:void 0,O0=I0?I0.allocUnsafe:void 0;function eF(t,e){var n=t.length,r=O0?O0(n):new t.constructor(n);return t.copy(r),r}function rg(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 F0(){return[]}var tF=Object.prototype,nF=tF.propertyIsEnumerable,L0=Object.getOwnPropertySymbols,ig=L0?function(t){return t==null?[]:(t=Object(t),rg(L0(t),function(e){return nF.call(t,e)}))}:F0;function rF(t,e){return Au(t,ig(t),e)}var iF=Object.getOwnPropertySymbols,
|
|
189
|
+
M0=iF?function(t){for(var e=[];t;)tg(e,ig(t)),t=_0(t);return e}:F0;function sF(t,e){return Au(t,M0(t),e)}function B0(t,e,n){var r=e(t);return Qe(t)?r:tg(r,n(t))}function sg(t){return B0(t,ar,ig)}function oF(t){return B0(t,Jm,M0)}var og=Ss(jr,"DataView"),ag=Ss(jr,"Promise"),Lo=Ss(jr,"Set"),q0="[object Map]",aF="[object Object]",j0="[object Promise]",G0="[object Set]",U0="[object WeakMap]",W0="[object DataView]",uF=As(og),cF=As(Nu),lF=As(ag),dF=As(Lo),fF=As(Wm),cr=Wi;(og&&cr(new og(new ArrayBuffer(
|
|
190
|
+
1)))!=W0||Nu&&cr(new Nu)!=q0||ag&&cr(ag.resolve())!=j0||Lo&&cr(new Lo)!=G0||Wm&&cr(new Wm)!=U0)&&(cr=function(t){var e=Wi(t),n=e==aF?t.constructor:void 0,r=n?As(n):"";if(r)switch(r){case uF:return W0;case cF:return q0;case lF:return j0;case dF:return G0;case fF:return U0}return e});var hF=Object.prototype,pF=hF.hasOwnProperty;function mF(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&pF.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var pf=jr.Uint8Array;function gF(t){
|
|
191
|
+
var e=new t.constructor(t.byteLength);return new pf(e).set(new pf(t)),e}function yF(t,e){var n=t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var vF=/\w*$/;function wF(t){var e=new t.constructor(t.source,vF.exec(t));return e.lastIndex=t.lastIndex,e}var z0=sr?sr.prototype:void 0,H0=z0?z0.valueOf:void 0;function bF(t){return H0?Object(H0.call(t)):{}}function EF(t,e){var n=t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var $F="[object Boolean]",DF="[object Date]",RF="[ob\
|
|
192
|
+
ject Map]",kF="[object Number]",TF="[object RegExp]",CF="[object Set]",AF="[object String]",SF="[object Symbol]",_F="[object ArrayBuffer]",PF="[object DataView]",xF="[object Float32Array]",NF="[object Float64Array]",IF="[object Int8Array]",OF="[object Int16Array]",FF="[object Int32Array]",LF="[object Uint8Array]",MF="[object Uint8ClampedArray]",BF="[object Uint16Array]",qF="[object Uint32Array]";function jF(t,e,n){var r=t.constructor;switch(e){case _F:return gF(t);case $F:case DF:return new r(+t);case PF:
|
|
193
|
+
return yF(t);case xF:case NF:case IF:case OF:case FF:case LF:case MF:case BF:case qF:return EF(t);case RF:return new r;case kF:case AF:return new r(t);case TF:return wF(t);case CF:return new r;case SF:return bF(t)}}function GF(t){return typeof t.constructor=="function"&&!Su(t)?ZN(_0(t)):{}}var UF="[object Map]";function WF(t){return vr(t)&&cr(t)==UF}var K0=zi&&zi.isMap,zF=K0?lf(K0):WF,HF="[object Set]";function KF(t){return vr(t)&&cr(t)==HF}var V0=zi&&zi.isSet,VF=V0?lf(V0):KF,XF=2,X0="[object Ar\
|
|
194
|
+
guments]",YF="[object Array]",JF="[object Boolean]",QF="[object Date]",ZF="[object Error]",Y0="[object Function]",eL="[object GeneratorFunction]",tL="[object Map]",nL="[object Number]",J0="[object Object]",rL="[object RegExp]",iL="[object Set]",sL="[object String]",oL="[object Symbol]",aL="[object WeakMap]",uL="[object ArrayBuffer]",cL="[object DataView]",lL="[object Float32Array]",dL="[object Float64Array]",fL="[object Int8Array]",hL="[object Int16Array]",pL="[object Int32Array]",mL="[object Ui\
|
|
195
|
+
nt8Array]",gL="[object Uint8ClampedArray]",yL="[object Uint16Array]",vL="[object Uint32Array]",gt={};gt[X0]=gt[YF]=gt[uL]=gt[cL]=gt[JF]=gt[QF]=gt[lL]=gt[dL]=gt[fL]=gt[hL]=gt[pL]=gt[tL]=gt[nL]=gt[J0]=gt[rL]=gt[iL]=gt[sL]=gt[oL]=gt[mL]=gt[gL]=gt[yL]=gt[vL]=!0,gt[ZF]=gt[Y0]=gt[aL]=!1;function mf(t,e,n,r,i,s){var o,a=e&XF;if(o!==void 0)return o;if(!or(t))return t;var u=Qe(t);if(u)return o=mF(t),tI(t,o);var c=cr(t),l=c==Y0||c==eL;if(_u(t))return eF(t);if(c==J0||c==X0||l&&!i)return o=l?{}:GF(t),a?sF(t,
|
|
196
|
+
QO(o,t)):rF(t,JO(o,t));if(!gt[c])return i?t:{};o=jF(t,c),s||(s=new Ur);var f=s.get(t);if(f)return f;s.set(t,o),VF(t)?t.forEach(function(p){o.add(mf(p,e,n,p,t,s))}):zF(t)&&t.forEach(function(p,w){o.set(w,mf(p,e,n,w,t,s))});var d=sg,h=u?void 0:d(t);return p0(h||t,function(p,w){h&&(w=p,p=t[w]),uf(o,w,mf(p,e,n,w,t,s))}),o}var wL=4;function sn(t){return mf(t,wL)}function Ou(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 bL="__lodash_hash_undefined__";function EL(t){
|
|
197
|
+
return this.__data__.set(t,bL),this}function $L(t){return this.__data__.has(t)}function Mo(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new oi;++e<n;)this.add(t[e])}Mo.prototype.add=Mo.prototype.push=EL,Mo.prototype.has=$L;function Q0(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 ug(t,e){return t.has(e)}var DL=1,RL=2;function Z0(t,e,n,r,i,s){var o=n&DL,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&&
|
|
198
|
+
l==t;var f=-1,d=!0,h=n&RL?new Mo:void 0;for(s.set(t,e),s.set(e,t);++f<a;){var p=t[f],w=e[f];if(r)var v=o?r(w,p,f,e,t,s):r(p,w,f,t,e,s);if(v!==void 0){if(v)continue;d=!1;break}if(h){if(!Q0(e,function(g,E){if(!ug(h,E)&&(p===g||i(p,g,n,r,s)))return h.push(E)})){d=!1;break}}else if(!(p===w||i(p,w,n,r,s))){d=!1;break}}return s.delete(t),s.delete(e),d}function kL(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function cg(t){var e=-1,n=Array(t.size);return t.forEach(function(r){
|
|
199
|
+
n[++e]=r}),n}var TL=1,CL=2,AL="[object Boolean]",SL="[object Date]",_L="[object Error]",PL="[object Map]",xL="[object Number]",NL="[object RegExp]",IL="[object Set]",OL="[object String]",FL="[object Symbol]",LL="[object ArrayBuffer]",ML="[object DataView]",eE=sr?sr.prototype:void 0,lg=eE?eE.valueOf:void 0;function BL(t,e,n,r,i,s,o){switch(n){case ML:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case LL:return!(t.byteLength!=e.byteLength||!s(new pf(t),new pf(
|
|
200
|
+
e)));case AL:case SL:case xL:return Cu(+t,+e);case _L:return t.name==e.name&&t.message==e.message;case NL:case OL:return t==e+"";case PL:var a=kL;case IL:var u=r&TL;if(a||(a=cg),t.size!=e.size&&!u)return!1;var c=o.get(t);if(c)return c==e;r|=CL,o.set(t,e);var l=Z0(a(t),a(e),r,i,s,o);return o.delete(t),l;case FL:if(lg)return lg.call(t)==lg.call(e)}return!1}var qL=1,jL=Object.prototype,GL=jL.hasOwnProperty;function UL(t,e,n,r,i,s){var o=n&qL,a=sg(t),u=a.length,c=sg(e),l=c.length;if(u!=l&&!o)return!1;
|
|
201
|
+
for(var f=u;f--;){var d=a[f];if(!(o?d in e:GL.call(e,d)))return!1}var h=s.get(t),p=s.get(e);if(h&&p)return h==e&&p==t;var w=!0;s.set(t,e),s.set(e,t);for(var v=o;++f<u;){d=a[f];var g=t[d],E=e[d];if(r)var D=o?r(E,g,d,e,t,s):r(g,E,d,t,e,s);if(!(D===void 0?g===E||i(g,E,n,r,s):D)){w=!1;break}v||(v=d=="constructor")}if(w&&!v){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)&&(w=!1)}return s.delete(
|
|
202
|
+
t),s.delete(e),w}var WL=1,tE="[object Arguments]",nE="[object Array]",gf="[object Object]",zL=Object.prototype,rE=zL.hasOwnProperty;function HL(t,e,n,r,i,s){var o=Qe(t),a=Qe(e),u=o?nE:cr(t),c=a?nE:cr(e);u=u==tE?gf:u,c=c==tE?gf:c;var l=u==gf,f=c==gf,d=u==c;if(d&&_u(t)){if(!_u(e))return!1;o=!0,l=!1}if(d&&!l)return s||(s=new Ur),o||Ym(t)?Z0(t,e,n,r,i,s):BL(t,e,u,n,r,i,s);if(!(n&WL)){var h=l&&rE.call(t,"__wrapped__"),p=f&&rE.call(e,"__wrapped__");if(h||p){var w=h?t.value():t,v=p?e.value():e;return s||
|
|
203
|
+
(s=new Ur),i(w,v,n,r,s)}}return d?(s||(s=new Ur),UL(t,e,n,r,i,s)):!1}function dg(t,e,n,r,i){return t===e?!0:t==null||e==null||!vr(t)&&!vr(e)?t!==t&&e!==e:HL(t,e,n,r,dg,i)}var KL=1,VL=2;function XL(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 Ur,f;if(!(f===void 0?dg(c,u,KL|VL,r,l):f))return!1}}return!0}function iE(t){
|
|
204
|
+
return t===t&&!or(t)}function YL(t){for(var e=ar(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,iE(i)]}return e}function sE(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function JL(t){var e=YL(t);return e.length==1&&e[0][2]?sE(e[0][0],e[0][1]):function(n){return n===t||XL(n,t,e)}}function QL(t,e){return t!=null&&e in Object(t)}function oE(t,e,n){e=hf(e,t);for(var r=-1,i=e.length,s=!1;++r<i;){var o=Iu(e[r]);if(!(s=t!=null&&n(t,o)))break;t=t[o]}return s||++r!=
|
|
205
|
+
i?s:(i=t==null?0:t.length,!!i&&Vm(i)&&af(o,i)&&(Qe(t)||cf(t)))}function ZL(t,e){return t!=null&&oE(t,e,QL)}var eM=1,tM=2;function nM(t,e){return Qm(t)&&iE(e)?sE(Iu(t),e):function(n){var r=GO(n,t);return r===void 0&&r===e?ZL(n,t):dg(e,r,eM|tM)}}function rM(t){return function(e){return e?.[t]}}function iM(t){return function(e){return eg(e,t)}}function sM(t){return Qm(t)?rM(Iu(t)):iM(t)}function wr(t){return typeof t=="function"?t:t==null?Cs:typeof t=="object"?Qe(t)?nM(t[0],t[1]):JL(t):sM(t)}function oM(t,e,n,r){
|
|
206
|
+
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 aM(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 uM=aM();function cM(t,e){return t&&uM(t,e,ar)}function lM(t,e){return function(n,r){if(n==null)return n;if(!Gr(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 Ps=lM(cM);function dM(t,e,n,r){return Ps(t,function(i,s,o){e(r,i,n(i),o)}),r}function fM(t,e){
|
|
207
|
+
return function(n,r){var i=Qe(n)?oM:dM,s=e?e():{};return i(n,t,wr(r),s)}}var aE=Object.prototype,hM=aE.hasOwnProperty,fg=Km(function(t,e){t=Object(t);var n=-1,r=e.length,i=r>2?e[2]:void 0;for(i&&v0(e[0],e[1],i)&&(r=1);++n<r;)for(var s=e[n],o=Jm(s),a=-1,u=o.length;++a<u;){var c=o[a],l=t[c];(l===void 0||Cu(l,aE[c])&&!hM.call(t,c))&&(t[c]=s[c])}return t});function uE(t){return vr(t)&&Gr(t)}var pM=200;function mM(t,e,n,r){var i=-1,s=g0,o=!0,a=t.length,u=[],c=e.length;if(!a)return u;e.length>=pM&&(s=
|
|
208
|
+
ug,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 yf=Km(function(t,e){return uE(t)?mM(t,ng(e,1,uE,!0)):[]});function Bo(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function on(t,e,n){var r=t==null?0:t.length;return r?(e=e===void 0?1:sf(e),P0(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:sf(e),e=r-e,P0(t,0,e<0?0:e)):[]}function gM(t){return typeof t==
|
|
209
|
+
"function"?t:Cs}function ke(t,e){var n=Qe(t)?p0:Ps;return n(t,gM(e))}function yM(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 vM(t,e){var n=!0;return Ps(t,function(r,i,s){return n=!!e(r,i,s),n}),n}function br(t,e,n){var r=Qe(t)?yM:vM;return r(t,wr(e))}function cE(t,e){var n=[];return Ps(t,function(r,i,s){e(r,i,s)&&n.push(r)}),n}function Hn(t,e){var n=Qe(t)?rg:cE;return n(t,wr(e))}function wM(t){return function(e,n,r){var i=Object(e);if(!Gr(e)){var s=wr(
|
|
210
|
+
n);e=ar(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 bM=Math.max;function EM(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=n==null?0:sf(n);return i<0&&(i=bM(r+i,0)),m0(t,wr(e),i)}var qo=wM(EM);function Er(t){return t&&t.length?t[0]:void 0}function $M(t,e){var n=-1,r=Gr(t)?Array(t.length):[];return Ps(t,function(i,s,o){r[++n]=e(i,s,o)}),r}function ve(t,e){var n=Qe(t)?rf:$M;return n(t,wr(e))}function Kn(t,e){return ng(ve(t,e))}var DM=Object.prototype,
|
|
211
|
+
RM=DM.hasOwnProperty,kM=fM(function(t,e,n){RM.call(t,n)?t[n].push(e):Hm(t,n,[e])}),TM=Object.prototype,CM=TM.hasOwnProperty;function AM(t,e){return t!=null&&CM.call(t,e)}function Te(t,e){return t!=null&&oE(t,e,AM)}var SM="[object String]";function In(t){return typeof t=="string"||!Qe(t)&&vr(t)&&Wi(t)==SM}function _M(t,e){return rf(e,function(n){return t[n]})}function Kt(t){return t==null?[]:_M(t,ar(t))}var PM=Math.max;function En(t,e,n,r){t=Gr(t)?t:Kt(t),n=n?sf(n):0;var i=t.length;return n<0&&(n=
|
|
212
|
+
PM(i+n,0)),In(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&zm(t,e,n)>-1}function lE(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=0;return zm(t,e,i)}var xM="[object Map]",NM="[object Set]",IM=Object.prototype,OM=IM.hasOwnProperty;function ft(t){if(t==null)return!0;if(Gr(t)&&(Qe(t)||typeof t=="string"||typeof t.splice=="function"||_u(t)||Ym(t)||cf(t)))return!t.length;var e=cr(t);if(e==xM||e==NM)return!t.size;if(Su(t))return!A0(t).length;for(var n in t)if(OM.call(t,n))return!1;return!0}var FM="[object R\
|
|
213
|
+
egExp]";function LM(t){return vr(t)&&Wi(t)==FM}var dE=zi&&zi.isRegExp,ai=dE?lf(dE):LM;function ui(t){return t===void 0}function MM(t,e){return t<e}function BM(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&&!Tu(o):n(o,a)))var a=o,u=s}return u}function qM(t){return t&&t.length?BM(t,Cs,MM):void 0}var jM="Expected a function";function GM(t){if(typeof t!="function")throw new TypeError(jM);return function(){var e=arguments;switch(e.length){case 0:return!t.call(
|
|
214
|
+
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 UM(t,e,n,r){if(!or(t))return t;e=hf(e,t);for(var i=-1,s=e.length,o=s-1,a=t;a!=null&&++i<s;){var u=Iu(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=or(l)?l:af(e[i+1])?[]:{})}uf(a,u,c),a=a[u]}return t}function WM(t,e,n){for(var r=-1,i=e.length,s={};++r<i;){var o=e[r],a=eg(t,o);n(
|
|
215
|
+
a,o)&&UM(s,hf(o,t),a)}return s}function $r(t,e){if(t==null)return{};var n=rf(oF(t),function(r){return[r]});return e=wr(e),WM(t,n,function(r,i){return e(r,i[0])})}function zM(t,e,n,r,i){return i(t,function(s,o,a){n=r?(r=!1,s):e(n,s,o,a)}),n}function $n(t,e,n){var r=Qe(t)?WO:zM,i=arguments.length<3;return r(t,wr(e),n,i,Ps)}function vf(t,e){var n=Qe(t)?rg:cE;return n(t,GM(wr(e)))}function HM(t,e){var n;return Ps(t,function(r,i,s){return n=e(r,i,s),!n}),!!n}function fE(t,e,n){var r=Qe(t)?Q0:HM;return r(
|
|
216
|
+
t,wr(e))}var KM=1/0,VM=Lo&&1/cg(new Lo([,-0]))[1]==KM?function(t){return new Lo(t)}:Ht,XM=200;function hE(t,e,n){var r=-1,i=g0,s=t.length,o=!0,a=[],u=a;if(s>=XM){var c=e?null:VM(t);if(c)return cg(c);o=!1,i=ug,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 hg(t){return t&&t.length?hE(t):[]}function YM(t,e){return t&&t.length?hE(t,
|
|
217
|
+
wr(e)):[]}function pg(t){console&&console.error&&console.error(`Error: ${t}`)}function pE(t){console&&console.warn&&console.warn(`Warning: ${t}`)}function mE(t){const e=new Date().getTime(),n=t();return{time:new Date().getTime()-e,value:n}}function gE(t){function e(){}e.prototype=t;const n=new e;function r(){return typeof n.bar}return r(),r(),t}function JM(t){return QM(t)?t.LABEL:t.name}function QM(t){return In(t.LABEL)&&t.LABEL!==""}class Wr{get definition(){return this._definition}set definition(e){
|
|
218
|
+
this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),ke(this.definition,n=>{n.accept(e)})}}class Dn extends Wr{constructor(e){super([]),this.idx=1,zn(this,$r(e,n=>n!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class jo extends Wr{constructor(e){super(e.definition),this.orgText="",zn(this,$r(e,n=>n!==void 0))}}class On extends Wr{constructor(e){super(e.definition),this.ignoreAmbiguities=
|
|
219
|
+
!1,zn(this,$r(e,n=>n!==void 0))}}class an extends Wr{constructor(e){super(e.definition),this.idx=1,zn(this,$r(e,n=>n!==void 0))}}class Vn extends Wr{constructor(e){super(e.definition),this.idx=1,zn(this,$r(e,n=>n!==void 0))}}class Xn extends Wr{constructor(e){super(e.definition),this.idx=1,zn(this,$r(e,n=>n!==void 0))}}class _t extends Wr{constructor(e){super(e.definition),this.idx=1,zn(this,$r(e,n=>n!==void 0))}}class Fn extends Wr{constructor(e){super(e.definition),this.idx=1,zn(this,$r(e,n=>n!==
|
|
220
|
+
void 0))}}class Ln extends Wr{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,zn(this,$r(e,n=>n!==void 0))}}class Et{constructor(e){this.idx=1,zn(this,$r(e,n=>n!==void 0))}accept(e){e.visit(this)}}function ZM(t){return ve(t,wf)}function wf(t){function e(n){return ve(n,wf)}if(t instanceof Dn){const n={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return In(t.label)&&(n.
|
|
221
|
+
label=t.label),n}else{if(t instanceof On)return{type:"Alternative",definition:e(t.definition)};if(t instanceof an)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof Vn)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof Xn)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:wf(new Et({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof Fn)return{type:"RepetitionWithSeparator",idx:t.idx,separator:wf(new Et(
|
|
222
|
+
{terminalType:t.separator})),definition:e(t.definition)};if(t instanceof _t)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof Ln)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof Et){const n={type:"Terminal",name:t.terminalType.name,label:JM(t.terminalType),idx:t.idx};In(t.label)&&(n.terminalLabel=t.label);const r=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(n.pattern=ai(r)?r.source:r),n}else{if(t instanceof jo)return{type:"Rul\
|
|
223
|
+
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 Dn:return this.visitNonTerminal(n);case On:return this.visitAlternative(n);case an:return this.visitOption(n);case Vn:return this.visitRepetitionMandatory(n);case Xn:return this.visitRepetitionMandatoryWithSeparator(n);case Fn:return this.visitRepetitionWithSeparator(n);case _t:return this.visitRepetition(n);case Ln:return this.visitAlternation(
|
|
224
|
+
n);case Et:return this.visitTerminal(n);case jo: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 e2(t){return t instanceof On||t instanceof an||t instanceof _t||t instanceof Vn||t instanceof Xn||t instanceof Fn||t instanceof Et||t instanceof
|
|
225
|
+
jo}function bf(t,e=[]){return t instanceof an||t instanceof _t||t instanceof Fn?!0:t instanceof Ln?fE(t.definition,r=>bf(r,e)):t instanceof Dn&&En(e,t)?!1:t instanceof Wr?(t instanceof Dn&&e.push(t),br(t.definition,r=>bf(r,e))):!1}function t2(t){return t instanceof Ln}function zr(t){if(t instanceof Dn)return"SUBRULE";if(t instanceof an)return"OPTION";if(t instanceof Ln)return"OR";if(t instanceof Vn)return"AT_LEAST_ONE";if(t instanceof Xn)return"AT_LEAST_ONE_SEP";if(t instanceof Fn)return"MANY_SE\
|
|
226
|
+
P";if(t instanceof _t)return"MANY";if(t instanceof Et)return"CONSUME";throw Error("non exhaustive match")}class Ef{walk(e,n=[]){ke(e.definition,(r,i)=>{const s=on(e.definition,i+1);if(r instanceof Dn)this.walkProdRef(r,s,n);else if(r instanceof Et)this.walkTerminal(r,s,n);else if(r instanceof On)this.walkFlat(r,s,n);else if(r instanceof an)this.walkOption(r,s,n);else if(r instanceof Vn)this.walkAtLeastOne(r,s,n);else if(r instanceof Xn)this.walkAtLeastOneSep(r,s,n);else if(r instanceof Fn)this.walkManySep(
|
|
227
|
+
r,s,n);else if(r instanceof _t)this.walkMany(r,s,n);else if(r instanceof Ln)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 an({definition:e.definition})].concat(n,r);this.walk(e,i)}walkAtLeastOneSep(e,n,r){const i=yE(e,n,r);this.walk(e,i)}walkMany(e,n,r){const i=[new an({definition:e.definition})].concat(
|
|
228
|
+
n,r);this.walk(e,i)}walkManySep(e,n,r){const i=yE(e,n,r);this.walk(e,i)}walkOr(e,n,r){const i=n.concat(r);ke(e.definition,s=>{const o=new On({definition:[s]});this.walk(o,i)})}}function yE(t,e,n){return[new an({definition:[new Et({terminalType:t.separator})].concat(t.definition)})].concat(e,n)}function Lu(t){if(t instanceof Dn)return Lu(t.referencedRule);if(t instanceof Et)return i2(t);if(e2(t))return n2(t);if(t2(t))return r2(t);throw Error("non exhaustive match")}function n2(t){let e=[];const n=t.
|
|
229
|
+
definition;let r=0,i=n.length>r,s,o=!0;for(;i&&o;)s=n[r],o=bf(s),e=e.concat(Lu(s)),r=r+1,i=n.length>r;return hg(e)}function r2(t){const e=ve(t.definition,n=>Lu(n));return hg(ur(e))}function i2(t){return[t.terminalType]}const vE="_~IN~_";class s2 extends Ef{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=a2(e.referencedRule,e.idx)+this.topProd.name,s=n.concat(r),o=new On({definition:s}),
|
|
230
|
+
a=Lu(o);this.follows[i]=a}}function o2(t){const e={};return ke(t,n=>{const r=new s2(n).startWalking();zn(e,r)}),e}function a2(t,e){return t.name+e+vE}let $f={};const u2=new Kb;function Df(t){const e=t.toString();if($f.hasOwnProperty(e))return $f[e];{const n=u2.pattern(e);return $f[e]=n,n}}function c2(){$f={}}const wE="Complement Sets are not supported for first char optimization",Rf=`Unable to use "first char" lexer optimizations:
|
|
231
|
+
`;function l2(t,e=!1){try{const n=Df(t);return mg(n.value,{},n.flags.ignoreCase)}catch(n){if(n.message===wE)e&&pE(`${Rf} Unable to optimize: < ${t.toString()} >
|
|
232
|
+
Complement Sets cannot be automatically optimized.
|
|
233
|
+
This will disable the lexer's first char optimizations.
|
|
234
|
+
See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let r="";e&&(r=`
|
|
235
|
+
This will disable the lexer's first char optimizations.
|
|
236
|
+
See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),pg(`${Rf}
|
|
237
|
+
Failed parsing: < ${t.toString()} >
|
|
238
|
+
Using the @chevrotain/regexp-to-ast library
|
|
239
|
+
Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+r)}}return[]}function mg(t,e,n){switch(t.type){case"Disjunction":for(let i=0;i<t.value.length;i++)mg(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":kf(o.value,e,n);break;case"\
|
|
240
|
+
Set":if(o.complement===!0)throw Error(wE);ke(o.value,u=>{if(typeof u=="number")kf(u,e,n);else{const c=u;if(n===!0)for(let l=c.from;l<=c.to;l++)kf(l,e,n);else{for(let l=c.from;l<=c.to&&l<Bu;l++)kf(l,e,n);if(c.to>=Bu){const l=c.from>=Bu?c.from:Bu,f=c.to,d=Hi(l),h=Hi(f);for(let p=d;p<=h;p++)e[p]=p}}}});break;case"Group":mg(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"&&gg(o)===!1||o.type!=="Group"&&a===!1)break}
|
|
241
|
+
break;default:throw Error("non exhaustive match!")}return Kt(e)}function kf(t,e,n){const r=Hi(t);e[r]=r,n===!0&&d2(t,e)}function d2(t,e){const n=String.fromCharCode(t),r=n.toUpperCase();if(r!==n){const i=Hi(r.charCodeAt(0));e[i]=i}else{const i=n.toLowerCase();if(i!==n){const s=Hi(i.charCodeAt(0));e[s]=s}}}function bE(t,e){return qo(t.value,n=>{if(typeof n=="number")return En(e,n);{const r=n;return qo(e,i=>r.from<=i&&i<=r.to)!==void 0}})}function gg(t){const e=t.quantifier;return e&&e.atLeast===0?
|
|
242
|
+
!0:t.value?Qe(t.value)?br(t.value,gg):gg(t.value):!1}class f2 extends Zd{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){En(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?bE(e,this.targetCharCodes)===void 0&&(this.found=!0):bE(e,this.targetCharCodes)!==void 0&&
|
|
243
|
+
(this.found=!0)}}function yg(t,e){if(e instanceof RegExp){const n=Df(e),r=new f2(t);return r.visit(n),r.found}else return qo(e,n=>En(t,n.charCodeAt(0)))!==void 0}const xs="PATTERN",Mu="defaultMode",Tf="modes";let EE=typeof new RegExp("(?:)").sticky=="boolean";function h2(t,e){e=fg(e,{useSticky:EE,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
|
|
244
|
+
`],tracer:(E,D)=>D()});const n=e.tracer;n("initCharCodeToOptimizedIndexMap",()=>{F2()});let r;n("Reject Lexer.NA",()=>{r=vf(t,E=>E[xs]===Mn.NA)});let i=!1,s;n("Transform Patterns",()=>{i=!1,s=ve(r,E=>{const D=E[xs];if(ai(D)){const A=D.source;return A.length===1&&A!=="^"&&A!=="$"&&A!=="."&&!D.ignoreCase?A:A.length===2&&A[0]==="\\"&&!En(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],A[1])?A[1]:e.useSticky?DE(D):$E(D)}else{if(ii(D))return i=!0,{exec:D};if(typeof D=="object")return i=
|
|
245
|
+
!0,D;if(typeof D=="string"){if(D.length===1)return D;{const A=D.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),N=new RegExp(A);return e.useSticky?DE(N):$E(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 D=E.GROUP;if(D!==Mn.SKIPPED){if(In(D))return D;if(ui(D))return!1;throw Error("non exhaustive match")}}),u=ve(r,E=>{const D=E.LONGER_ALT;if(D)return Qe(D)?ve(D,N=>lE(r,N)):[lE(r,D)]}),c=ve(r,E=>E.PUSH_MODE),l=ve(r,E=>Te(E,"POP\
|
|
246
|
+
_MODE"))});let f;n("Line Terminator Handling",()=>{const E=TE(e.lineTerminatorCharacters);f=ve(r,D=>!1),e.positionTracking!=="onlyOffset"&&(f=ve(r,D=>Te(D,"LINE_BREAKS")?!!D.LINE_BREAKS:kE(D,E)===!1&&yg(E,D.PATTERN)))});let d,h,p,w;n("Misc Mapping #2",()=>{d=ve(r,RE),h=ve(s,N2),p=$n(r,(E,D)=>{const A=D.GROUP;return In(A)&&A!==Mn.SKIPPED&&(E[A]=[]),E},{}),w=ve(s,(E,D)=>({pattern:s[D],longerAlt:u[D],canLineTerminator:f[D],isCustom:d[D],short:h[D],group:a[D],push:c[D],pop:l[D],tokenTypeIdx:o[D],tokenType:r[D]}))});
|
|
247
|
+
let v=!0,g=[];return e.safeMode||n("First Char Optimization",()=>{g=$n(r,(E,D,A)=>{if(typeof D.PATTERN=="string"){const N=D.PATTERN.charCodeAt(0),V=Hi(N);vg(E,V,w[A])}else if(Qe(D.START_CHARS_HINT)){let N;ke(D.START_CHARS_HINT,V=>{const J=typeof V=="string"?V.charCodeAt(0):V,se=Hi(J);N!==se&&(N=se,vg(E,se,w[A]))})}else if(ai(D.PATTERN))if(D.PATTERN.unicode)v=!1,e.ensureOptimizations&&pg(`${Rf} Unable to analyze < ${D.PATTERN.toString()} > pattern.
|
|
248
|
+
The regexp unicode flag is not currently supported by the regexp-to-ast library.
|
|
249
|
+
This will disable the lexer's first char optimizations.
|
|
250
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const N=l2(D.PATTERN,e.ensureOptimizations);ft(N)&&(v=!1),ke(N,V=>{vg(E,V,w[A])})}else e.ensureOptimizations&&pg(`${Rf} TokenType: <${D.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
|
|
251
|
+
This will disable the lexer's first char optimizations.
|
|
252
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),v=!1;return E},[])}),{emptyGroups:p,patternIdxToConfig:w,charCodeToPatternIdxToConfig:g,hasCustom:i,canBeOptimized:v}}function p2(t,e){let n=[];const r=g2(t);n=n.concat(r.errors);const i=y2(r.valid),s=i.valid;return n=n.concat(i.errors),n=n.concat(m2(s)),n=n.concat(k2(s)),n=n.concat(T2(s,e)),n=n.concat(C2(s)),n}function m2(t){let e=[];const n=Hn(t,r=>ai(r[xs]));return e=e.concat(w2(n)),e=e.concat($2(
|
|
253
|
+
n)),e=e.concat(D2(n)),e=e.concat(R2(n)),e=e.concat(b2(n)),e}function g2(t){const e=Hn(t,i=>!Te(i,xs)),n=ve(e,i=>({message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:Pt.MISSING_PATTERN,tokenTypes:[i]})),r=yf(t,e);return{errors:n,valid:r}}function y2(t){const e=Hn(t,i=>{const s=i[xs];return!ai(s)&&!ii(s)&&!Te(s,"exec")&&!In(s)}),n=ve(e,i=>({message:"Token Type: ->"+i.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or \
|
|
254
|
+
an Object matching the {ICustomPattern} interface.",type:Pt.INVALID_PATTERN,tokenTypes:[i]})),r=yf(t,e);return{errors:n,valid:r}}const v2=/[^\\][$]/;function w2(t){class e extends Zd{constructor(){super(...arguments),this.found=!1}visitEndAnchor(s){this.found=!0}}const n=Hn(t,i=>{const s=i.PATTERN;try{const o=Df(s),a=new e;return a.visit(o),a.found}catch{return v2.test(s.source)}});return ve(n,i=>({message:`Unexpected RegExp Anchor Error:
|
|
255
|
+
Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
|
|
256
|
+
See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Pt.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}function b2(t){const e=Hn(t,r=>r.PATTERN.test(""));return ve(e,r=>({message:"Token Type: ->"+r.name+"<- static 'PATTERN' must not match an empty string",type:Pt.EMPTY_MATCH_PATTERN,tokenTypes:[r]}))}const E2=/[^\\[][\^]|^\^/;function $2(t){class e extends Zd{constructor(){super(...arguments),this.found=!1}visitStartAnchor(s){this.found=!0}}const n=Hn(t,i=>{const s=i.PATTERN;
|
|
257
|
+
try{const o=Df(s),a=new e;return a.visit(o),a.found}catch{return E2.test(s.source)}});return ve(n,i=>({message:`Unexpected RegExp Anchor Error:
|
|
258
|
+
Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
|
|
259
|
+
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Pt.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}function D2(t){const e=Hn(t,r=>{const i=r[xs];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:Pt.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[r]}))}function R2(t){const e=[];let n=ve(t,s=>$n(t,(o,a)=>(s.PATTERN.source===a.PATTERN.source&&!En(e,a)&&a.
|
|
260
|
+
PATTERN!==Mn.NA&&(e.push(a),o.push(a)),o),[]));n=Ou(n);const r=Hn(n,s=>s.length>1);return ve(r,s=>{const o=ve(s,u=>u.name);return{message:`The same RegExp pattern ->${Er(s).PATTERN}<-has been used in all of the following Token Types: ${o.join(", ")} <-`,type:Pt.DUPLICATE_PATTERNS_FOUND,tokenTypes:s}})}function k2(t){const e=Hn(t,r=>{if(!Te(r,"GROUP"))return!1;const i=r.GROUP;return i!==Mn.SKIPPED&&i!==Mn.NA&&!In(i)});return ve(e,r=>({message:"Token Type: ->"+r.name+"<- static 'GROUP' can only be\
|
|
261
|
+
Lexer.SKIPPED/Lexer.NA/A String",type:Pt.INVALID_GROUP_TYPE_FOUND,tokenTypes:[r]}))}function T2(t,e){const n=Hn(t,i=>i.PUSH_MODE!==void 0&&!En(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:Pt.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}))}function C2(t){const e=[],n=$n(t,(r,i,s)=>{const o=i.PATTERN;return o===Mn.NA||(In(o)?r.push({str:o,idx:s,tokenType:i}):ai(o)&&S2(o)&&r.push({str:o.
|
|
262
|
+
source,idx:s,tokenType:i})),r},[]);return ke(t,(r,i)=>{ke(n,({str:s,idx:o,tokenType:a})=>{if(i<o&&A2(s,r.PATTERN)){const u=`Token: ->${a.name}<- can never be matched.
|
|
263
|
+
Because it appears AFTER the Token Type ->${r.name}<-in the lexer's definition.
|
|
264
|
+
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:u,type:Pt.UNREACHABLE_PATTERN,tokenTypes:[r,a]})}})}),e}function A2(t,e){if(ai(e)){const n=e.exec(t);return n!==null&&n.index===0}else{if(ii(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 S2(t){return qo([".","\\","[","]","|","^","$","(",")","?","*","+","{"],n=>t.source.indexOf(n)!==-1)===void 0}function $E(t){
|
|
265
|
+
const e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}function DE(t){const e=t.ignoreCase?"iy":"y";return new RegExp(`${t.source}`,e)}function _2(t,e,n){const r=[];return Te(t,Mu)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+Mu+`> property in its definition
|
|
266
|
+
`,type:Pt.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Te(t,Tf)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+Tf+`> property in its definition
|
|
267
|
+
`,type:Pt.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Te(t,Tf)&&Te(t,Mu)&&!Te(t.modes,t.defaultMode)&&r.push({message:`A MultiMode Lexer cannot be initialized with a ${Mu}: <${t.defaultMode}>which does not exist
|
|
268
|
+
`,type:Pt.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Te(t,Tf)&&ke(t.modes,(i,s)=>{ke(i,(o,a)=>{if(ui(o))r.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${s}> at index: <${a}>
|
|
269
|
+
`,type:Pt.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=>{!ui(c)&&!En(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}>
|
|
270
|
+
`,type:Pt.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),r}function P2(t,e,n){const r=[];let i=!1;const s=Ou(ur(Kt(t.modes))),o=vf(s,u=>u[xs]===Mn.NA),a=TE(n);return e&&ke(o,u=>{const c=kE(u,a);if(c!==!1){const f={message:O2(u,c),type:c.issue,tokenType:u};r.push(f)}else Te(u,"LINE_BREAKS")?u.LINE_BREAKS===!0&&(i=!0):yg(a,u.PATTERN)&&(i=!0)}),e&&!i&&r.push({message:`Warning: No LINE_BREAKS Found.
|
|
271
|
+
This Lexer has been defined to track line and column information,
|
|
272
|
+
But none of the Token Types can be identified as matching a line terminator.
|
|
273
|
+
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS
|
|
274
|
+
for details.`,type:Pt.NO_LINE_BREAKS_FLAGS}),r}function x2(t){const e={},n=ar(t);return ke(n,r=>{const i=t[r];if(Qe(i))e[r]=[];else throw Error("non exhaustive match")}),e}function RE(t){const e=t.PATTERN;if(ai(e))return!1;if(ii(e))return!0;if(Te(e,"exec"))return!0;if(In(e))return!1;throw Error("non exhaustive match")}function N2(t){return In(t)&&t.length===1?t.charCodeAt(0):!1}const I2={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.
|
|
275
|
+
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 kE(t,e){if(Te(t,"LINE_BREAKS"))return!1;if(ai(t.PATTERN)){try{yg(e,t.PATTERN)}catch(n){return{issue:Pt.IDENTIFY_TERMINATOR,errMsg:n.message}}return!1}else{if(In(t.PATTERN))return!1;if(RE(t))return{issue:Pt.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function O2(t,e){if(e.issue===Pt.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usag\
|
|
276
|
+
e in pattern.
|
|
277
|
+
The problem is in the <${t.name}> Token Type
|
|
278
|
+
Root cause: ${e.errMsg}.
|
|
279
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===Pt.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
|
|
280
|
+
The problem is in the <${t.name}> Token Type
|
|
281
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function TE(t){return ve(t,n=>In(n)?n.charCodeAt(0):n)}function vg(t,e,n){t[e]===void 0?t[e]=[n]:t[e].push(n)}const Bu=256;let Cf=[];function Hi(t){return t<Bu?t:Cf[t]}function F2(){if(ft(Cf)){Cf=new Array(65536);for(let t=0;t<65536;t++)Cf[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]===
|
|
282
|
+
!0}function Af(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}let CE=1;const AE={};function ju(t){const e=L2(t);M2(e),q2(e),B2(e),ke(e,n=>{n.isParent=n.categoryMatches.length>0})}function L2(t){let e=sn(t),n=t,r=!0;for(;r;){n=Ou(ur(ve(n,s=>s.CATEGORIES)));const i=yf(n,e);e=e.concat(i),ft(i)?r=!1:n=i}return e}function M2(t){ke(t,e=>{_E(e)||(AE[CE]=e,e.tokenTypeIdx=CE++),PE(e)&&!Qe(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),PE(e)||(e.CATEGORIES=[]),j2(e)||(e.categoryMatches=[]),G2(e)||(e.categoryMatchesMap=
|
|
283
|
+
{})})}function B2(t){ke(t,e=>{e.categoryMatches=[],ke(e.categoryMatchesMap,(n,r)=>{e.categoryMatches.push(AE[r].tokenTypeIdx)})})}function q2(t){ke(t,e=>{SE([],e)})}function SE(t,e){ke(t,n=>{e.categoryMatchesMap[n.tokenTypeIdx]=!0}),ke(e.CATEGORIES,n=>{const r=t.concat(e);En(r,n)||SE(r,n)})}function _E(t){return Te(t,"tokenTypeIdx")}function PE(t){return Te(t,"CATEGORIES")}function j2(t){return Te(t,"categoryMatches")}function G2(t){return Te(t,"categoryMatchesMap")}function U2(t){return Te(t,"t\
|
|
284
|
+
okenTypeIdx")}const wg={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 Pt;(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.
|
|
285
|
+
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=
|
|
286
|
+
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"})(Pt||(Pt={}));const Gu={deferDefinitionErrorsHandling:!1,
|
|
287
|
+
positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
|
|
288
|
+
`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:wg,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Gu);class Mn{constructor(e,n=Gu){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.
|
|
289
|
+
traceInitIndent++;const o=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${o}--> <${i}>`);const{time:a,value:u}=mE(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.
|
|
290
|
+
a boolean 2nd argument is no longer supported`);this.config=zn({},Gu,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===Gu.lineTerminatorsPattern)this.config.lineTerminatorsPattern=I2;else if(this.config.lineTerminatorCharacters===
|
|
291
|
+
Gu.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
|
|
292
|
+
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:sn(e)},defaultMode:Mu}:(s=!1,i=sn(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",
|
|
293
|
+
()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(_2(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(P2(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},ke(i.modes,(a,u)=>{i.modes[u]=vf(a,c=>ui(c))});const o=ar(i.modes);if(ke(i.modes,(a,u)=>{this.TRACE_INIT(`Mode: <${u}> processing`,()=>{if(this.modes.push(u),
|
|
294
|
+
this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(p2(a,o))}),ft(this.lexerDefinitionErrors)){ju(a);let c;this.TRACE_INIT("analyzeTokenTypes",()=>{c=h2(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]=
|
|
295
|
+
c.charCodeToPatternIdxToConfig,this.emptyGroups=zn({},this.emptyGroups,c.emptyGroups),this.hasCustom=c.hasCustom||this.hasCustom,this.canModeBeOptimized[u]=c.canBeOptimized}})}),this.defaultMode=i.defaultMode,!ft(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const u=ve(this.lexerDefinitionErrors,c=>c.message).join(`-----------------------
|
|
296
|
+
`);throw new Error(`Errors detected in definition of Lexer:
|
|
297
|
+
`+u)}ke(this.lexerDefinitionWarning,a=>{pE(a.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(EE?(this.chopInput=Cs,this.match=this.matchWithTest):(this.updateLastIndex=Ht,this.match=this.matchWithExec),s&&(this.handleModes=Ht),this.trackStartLines===!1&&(this.computeNewColumn=Cs),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=Ht),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.
|
|
298
|
+
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\
|
|
299
|
+
ization Warnings",()=>{const a=$n(this.canModeBeOptimized,(u,c,l)=>(c===!1&&u.push(l),u),[]);if(n.ensureOptimizations&&!ft(a))throw Error(`Lexer Modes: < ${a.join(", ")} > cannot be optimized.
|
|
300
|
+
Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
|
|
301
|
+
Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{c2()}),this.TRACE_INIT("toFastProperties",()=>{gE(this)})})}tokenize(e,n=this.defaultMode){if(!ft(this.lexerDefinitionErrors)){const i=ve(this.lexerDefinitionErrors,s=>s.message).join(`-----------------------
|
|
302
|
+
`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer:
|
|
303
|
+
`+i)}return this.tokenizeInternal(e,n)}tokenizeInternal(e,n){let r,i,s,o,a,u,c,l,f,d,h,p,w,v,g;const E=e,D=E.length;let A=0,N=0;const V=this.hasCustom?0:Math.floor(e.length/10),J=new Array(V),se=[];let ie=this.trackStartLines?1:void 0,we=this.trackStartLines?1:void 0;const B=x2(this.emptyGroups),T=this.trackStartLines,R=this.config.lineTerminatorsPattern;let M=0,S=[],P=[];const O=[],Q=[];Object.freeze(Q);let z;function C(){return S}function ne(Se){const le=Hi(Se),$e=P[le];return $e===void 0?Q:$e}
|
|
304
|
+
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?z=ne:z=C}};function xe(Se){O.push(Se),P=this.charCodeToPatternIdxToConfig[Se],
|
|
305
|
+
S=this.patternIdxToConfig[Se],M=S.length,M=S.length;const le=this.canModeBeOptimized[Se]&&this.config.safeMode===!1;P&&le?z=ne:z=C}xe.call(this,n);let L;const H=this.config.recoveryEnabled;for(;A<D;){u=null;const Se=E.charCodeAt(A),le=z(Se),$e=le.length;for(r=0;r<$e;r++){L=le[r];const Ne=L.pattern;c=null;const de=L.short;if(de!==!1?Se===de&&(u=Ne):L.isCustom===!0?(g=Ne.exec(E,A,J,B),g!==null?(u=g[0],g.payload!==void 0&&(c=g.payload)):u=null):(this.updateLastIndex(Ne,A),u=this.match(Ne,e,A)),u!==
|
|
306
|
+
null){if(a=L.longerAlt,a!==void 0){const I=a.length;for(s=0;s<I;s++){const G=S[a[s]],he=G.pattern;if(l=null,G.isCustom===!0?(g=he.exec(E,A,J,B),g!==null?(o=g[0],g.payload!==void 0&&(l=g.payload)):o=null):(this.updateLastIndex(he,A),o=this.match(he,e,A)),o&&o.length>u.length){u=o,c=l,L=G;break}}}break}}if(u!==null){if(f=u.length,d=L.group,d!==void 0&&(h=L.tokenTypeIdx,p=this.createTokenInstance(u,A,h,L.tokenType,ie,we,f),this.handlePayload(p,c),d===!1?N=this.addToken(J,N,p):B[d].push(p)),e=this.chopInput(
|
|
307
|
+
e,f),A=A+f,we=this.computeNewColumn(we,f),T===!0&&L.canLineTerminator===!0){let Ne=0,de,I;R.lastIndex=0;do de=R.test(u),de===!0&&(I=R.lastIndex-1,Ne++);while(de===!0);Ne!==0&&(ie=ie+Ne,we=f-I,this.updateTokenEndLineColumnLocation(p,d,I,Ne,ie,we,f))}this.handleModes(L,ye,xe,p)}else{const Ne=A,de=ie,I=we;let G=H===!1;for(;G===!1&&A<D;)for(e=this.chopInput(e,1),A++,i=0;i<M;i++){const he=S[i],U=he.pattern,fe=he.short;if(fe!==!1?E.charCodeAt(A)===fe&&(G=!0):he.isCustom===!0?G=U.exec(E,A,J,B)!==null:(this.
|
|
308
|
+
updateLastIndex(U,A),G=U.exec(e)!==null),G===!0)break}if(w=A-Ne,we=this.computeNewColumn(we,w),v=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(E,Ne,w,de,I),se.push({offset:Ne,line:de,column:I,length:w,message:v}),H===!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=
|
|
309
|
+
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+
|
|
310
|
+
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}}Mn.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 \
|
|
311
|
+
to for example to completely ignore whitespace.",Mn.NA=/NOT_APPLICABLE/;function Uo(t){return xE(t)?t.LABEL:t.name}function xE(t){return In(t.LABEL)&&t.LABEL!==""}const W2="parent",NE="categories",IE="label",OE="group",FE="push_mode",LE="pop_mode",ME="longer_alt",BE="line_breaks",qE="start_chars_hint";function jE(t){return z2(t)}function z2(t){const e=t.pattern,n={};if(n.name=t.name,ui(e)||(n.PATTERN=e),Te(t,W2))throw`The parent property is no longer supported.
|
|
312
|
+
See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return Te(t,NE)&&(n.CATEGORIES=t[NE]),ju([n]),Te(t,IE)&&(n.LABEL=t[IE]),Te(t,OE)&&(n.GROUP=t[OE]),Te(t,LE)&&(n.POP_MODE=t[LE]),Te(t,FE)&&(n.PUSH_MODE=t[FE]),Te(t,ME)&&(n.LONGER_ALT=t[ME]),Te(t,BE)&&(n.LINE_BREAKS=t[BE]),Te(t,qE)&&(n.START_CHARS_HINT=t[qE]),n}const Ki=jE({name:"EOF",pattern:Mn.NA});ju([Ki]);function bg(t,e,n,r,i,s,o,a){return{image:e,startOffset:n,endOffset:r,startLine:i,endLine:s,startColumn:o,
|
|
313
|
+
endColumn:a,tokenTypeIdx:t.tokenTypeIdx,tokenType:t}}function GE(t,e){return qu(t,e)}const Wo={buildMismatchTokenMessage({expected:t,actual:e,previous:n,ruleName:r}){return`Expecting ${xE(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}){
|
|
314
|
+
const s="Expecting: ",a=`
|
|
315
|
+
but found: '`+Er(e).image+"'";if(r)return s+r+a;{const u=$n(t,(d,h)=>d.concat(h),[]),c=ve(u,d=>`[${ve(d,h=>Uo(h)).join(", ")}]`),f=`one of these possible Token sequences:
|
|
316
|
+
${ve(c,(d,h)=>` ${h+1}. ${d}`).join(`
|
|
317
|
+
`)}`;return s+f+a}},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:n,ruleName:r}){const i="Expecting: ",o=`
|
|
318
|
+
but found: '`+Er(e).image+"'";if(n)return i+n+o;{const u=`expecting at least one iteration which starts with one of these possible Token sequences::
|
|
319
|
+
<${ve(t,c=>`[${ve(c,l=>Uo(l)).join(",")}]`).join(" ,")}>`;return i+u+o}}};Object.freeze(Wo);const H2={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<-
|
|
320
|
+
inside top level rule: ->`+t.name+"<-"}},Ns={buildDuplicateFoundError(t,e){function n(l){return l instanceof Et?l.terminalType.name:l instanceof Dn?l.nonTerminalName:""}const r=t.name,i=Er(e),s=i.idx,o=zr(i),a=n(i),u=s>0;let c=`->${o}${u?s:""}<- ${a?`with argument: ->${a}<-`:""}
|
|
321
|
+
appears more than once (${e.length} times) in the top level rule: ->${r}<-.
|
|
322
|
+
For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES
|
|
323
|
+
`;return c=c.replace(/[ \t]+/g," "),c=c.replace(/\s\s+/g,`
|
|
324
|
+
`),c},buildNamespaceConflictError(t){return`Namespace conflict found in grammar.
|
|
325
|
+
The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${t.name}>.
|
|
326
|
+
To resolve this make sure each Terminal and Non-Terminal names are unique
|
|
327
|
+
This is easy to accomplish by using the convention that Terminal names start with an uppercase letter
|
|
328
|
+
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
|
|
329
|
+
in <OR${n}> inside <${t.topLevelRule.name}> Rule,
|
|
330
|
+
<${e}> may appears as a prefix path in all these alternatives.
|
|
331
|
+
See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX
|
|
332
|
+
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,
|
|
333
|
+
<${e}> may appears as a prefix path in all these alternatives.
|
|
334
|
+
`;return r=r+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
|
|
335
|
+
For Further details.`,r},buildEmptyRepetitionError(t){let e=zr(t.repetition);return t.repetition.idx!==0&&(e+=t.repetition.idx),`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens.
|
|
336
|
+
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.
|
|
337
|
+
Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(t){return`An Alternation cannot have more than 256 alternatives:
|
|
338
|
+
<OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.
|
|
339
|
+
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.
|
|
340
|
+
rule: <${e}> can be invoked from itself (directly or indirectly)
|
|
341
|
+
without consuming any Tokens. The grammar path that causes this is:
|
|
342
|
+
${r}
|
|
343
|
+
To fix this refactor your grammar to remove the left recursion.
|
|
344
|
+
see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(t){return"deprecated"},buildDuplicateRuleNameError(t){let e;return t.topLevelRule instanceof jo?e=t.topLevelRule.name:e=t.topLevelRule,`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${t.grammarName}<-`}};function K2(t,e){const n=new V2(t,e);return n.resolveRefs(),n.errors}class V2 extends Go{constructor(e,n){super(),this.nameToTopRule=e,this.errMsgProvider=n,this.errors=[]}resolveRefs(){
|
|
345
|
+
ke(Kt(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:Rn.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}}class X2 extends Ef{constructor(e,n){super(),this.topProd=e,this.path=n,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=
|
|
346
|
+
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=sn(this.path.ruleStack).reverse(),this.occurrenceStack=sn(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===
|
|
347
|
+
this.nextProductionName&&e.idx===this.nextProductionOccurrence){const i=n.concat(r);this.updateExpectedNext(),this.walk(e.referencedRule,i)}}updateExpectedNext(){ft(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}}class Y2 extends X2{constructor(e,n){super(e,n),this.path=n,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=
|
|
348
|
+
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 On({definition:i});this.possibleTokTypes=Lu(s),this.found=!0}}}class Sf extends Ef{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}}
|
|
349
|
+
class J2 extends Sf{walkMany(e,n,r){if(e.idx===this.occurrence){const i=Er(n.concat(r));this.result.isEndOfRule=i===void 0,i instanceof Et&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkMany(e,n,r)}}class UE extends Sf{walkManySep(e,n,r){if(e.idx===this.occurrence){const i=Er(n.concat(r));this.result.isEndOfRule=i===void 0,i instanceof Et&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkManySep(e,n,r)}}class Q2 extends Sf{walkAtLeastOne(e,n,r){
|
|
350
|
+
if(e.idx===this.occurrence){const i=Er(n.concat(r));this.result.isEndOfRule=i===void 0,i instanceof Et&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOne(e,n,r)}}class WE extends Sf{walkAtLeastOneSep(e,n,r){if(e.idx===this.occurrence){const i=Er(n.concat(r));this.result.isEndOfRule=i===void 0,i instanceof Et&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOneSep(e,n,r)}}function Eg(t,e,n=[]){n=sn(n);let r=[],i=0;function s(a){
|
|
351
|
+
return a.concat(on(t,i+1))}function o(a){const u=Eg(s(a),e,n);return r.concat(u)}for(;n.length<e&&i<t.length;){const a=t[i];if(a instanceof On)return o(a.definition);if(a instanceof Dn)return o(a.definition);if(a instanceof an)r=o(a.definition);else if(a instanceof Vn){const u=a.definition.concat([new _t({definition:a.definition})]);return o(u)}else if(a instanceof Xn){const u=[new On({definition:a.definition}),new _t({definition:[new Et({terminalType:a.separator})].concat(a.definition)})];return o(
|
|
352
|
+
u)}else if(a instanceof Fn){const u=a.definition.concat([new _t({definition:[new Et({terminalType:a.separator})].concat(a.definition)})]);r=o(u)}else if(a instanceof _t){const u=a.definition.concat([new _t({definition:a.definition})]);r=o(u)}else{if(a instanceof Ln)return ke(a.definition,u=>{ft(u.definition)===!1&&(r=o(u.definition))}),r;if(a instanceof Et)n.push(a.terminalType);else throw Error("non exhaustive match")}i++}return r.push({partialPath:n,suffixDef:on(t,i)}),r}function zE(t,e,n,r){const i="\
|
|
353
|
+
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:[]});!ft(f);){const d=f.pop();if(d===o){a&&Bo(f).idx<=c&&f.pop();continue}const h=d.def,p=d.idx,w=d.ruleStack,v=d.occurrenceStack;if(ft(h))continue;const g=h[0];if(g===i){const E={idx:p,def:on(h),ruleStack:Fu(w),occurrenceStack:Fu(v)};f.push(E)}else if(g instanceof Et)if(p<u-1){const E=p+1,D=e[E];if(n(D,g.terminalType)){const A={idx:E,def:on(h),ruleStack:w,
|
|
354
|
+
occurrenceStack:v};f.push(A)}}else if(p===u-1)l.push({nextTokenType:g.terminalType,nextTokenOccurrence:g.idx,ruleStack:w,occurrenceStack:v}),a=!0;else throw Error("non exhaustive match");else if(g instanceof Dn){const E=sn(w);E.push(g.nonTerminalName);const D=sn(v);D.push(g.idx);const A={idx:p,def:g.definition.concat(s,on(h)),ruleStack:E,occurrenceStack:D};f.push(A)}else if(g instanceof an){const E={idx:p,def:on(h),ruleStack:w,occurrenceStack:v};f.push(E),f.push(o);const D={idx:p,def:g.definition.
|
|
355
|
+
concat(on(h)),ruleStack:w,occurrenceStack:v};f.push(D)}else if(g instanceof Vn){const E=new _t({definition:g.definition,idx:g.idx}),D=g.definition.concat([E],on(h)),A={idx:p,def:D,ruleStack:w,occurrenceStack:v};f.push(A)}else if(g instanceof Xn){const E=new Et({terminalType:g.separator}),D=new _t({definition:[E].concat(g.definition),idx:g.idx}),A=g.definition.concat([D],on(h)),N={idx:p,def:A,ruleStack:w,occurrenceStack:v};f.push(N)}else if(g instanceof Fn){const E={idx:p,def:on(h),ruleStack:w,occurrenceStack:v};
|
|
356
|
+
f.push(E),f.push(o);const D=new Et({terminalType:g.separator}),A=new _t({definition:[D].concat(g.definition),idx:g.idx}),N=g.definition.concat([A],on(h)),V={idx:p,def:N,ruleStack:w,occurrenceStack:v};f.push(V)}else if(g instanceof _t){const E={idx:p,def:on(h),ruleStack:w,occurrenceStack:v};f.push(E),f.push(o);const D=new _t({definition:g.definition,idx:g.idx}),A=g.definition.concat([D],on(h)),N={idx:p,def:A,ruleStack:w,occurrenceStack:v};f.push(N)}else if(g instanceof Ln)for(let E=g.definition.length-
|
|
357
|
+
1;E>=0;E--){const D=g.definition[E],A={idx:p,def:D.definition.concat(on(h)),ruleStack:w,occurrenceStack:v};f.push(A),f.push(o)}else if(g instanceof On)f.push({idx:p,def:g.definition.concat(on(h)),ruleStack:w,occurrenceStack:v});else if(g instanceof jo)f.push(Z2(g,p,w,v));else throw Error("non exhaustive match")}return l}function Z2(t,e,n,r){const i=sn(n);i.push(t.name);const s=sn(r);return s.push(1),{idx:e,def:t.definition,ruleStack:i,occurrenceStack:s}}var Tt;(function(t){t[t.OPTION=0]="OPTION",
|
|
358
|
+
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"})(Tt||(Tt={}));function $g(t){if(t instanceof an||t==="Option")return Tt.OPTION;if(t instanceof _t||t==="Repetition")return Tt.REPETITION;if(t instanceof Vn||t==="RepetitionMandatory")return Tt.REPETITION_MANDATORY;if(t instanceof Xn||t==="Rep\
|
|
359
|
+
etitionMandatoryWithSeparator")return Tt.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof Fn||t==="RepetitionWithSeparator")return Tt.REPETITION_WITH_SEPARATOR;if(t instanceof Ln||t==="Alternation")return Tt.ALTERNATION;throw Error("non exhaustive match")}function HE(t){const{occurrence:e,rule:n,prodType:r,maxLookahead:i}=t,s=$g(r);return s===Tt.ALTERNATION?_f(e,n,i):Pf(e,n,s,i)}function eB(t,e,n,r,i,s){const o=_f(t,e,n),a=YE(o)?Af:qu;return s(o,r,a,i)}function tB(t,e,n,r,i,s){const o=Pf(t,e,
|
|
360
|
+
i,n),a=YE(o)?Af:qu;return s(o[0],a,r)}function nB(t,e,n,r){const i=t.length,s=br(t,o=>br(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 h=c[d],p=h.length;for(let w=0;w<p;w++){const v=this.LA(w+1);if(n(v,h[w])===!1)continue e}return u}}};if(s&&!r){const o=ve(t,u=>ur(u)),a=$n(o,(u,c,l)=>(ke(c,f=>{Te(u,f.tokenTypeIdx)||(u[f.tokenTypeIdx]=l),ke(f.categoryMatches,d=>{
|
|
361
|
+
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 h=this.LA(d+1);if(n(h,l[d])===!1)continue e}return o}}}}function rB(t,e,n){const r=br(t,s=>s.length===1),i=t.length;if(r&&!n){const s=ur(t);if(s.length===1&&ft(s[0].categoryMatches)){const a=s[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===a}}else{
|
|
362
|
+
const o=$n(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 iB extends Ef{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){
|
|
363
|
+
return e.idx===this.targetOccurrence&&this.targetProdType===n?(this.restDef=r.concat(i),!0):!1}walkOption(e,n,r){this.checkIsTarget(e,Tt.OPTION,n,r)||super.walkOption(e,n,r)}walkAtLeastOne(e,n,r){this.checkIsTarget(e,Tt.REPETITION_MANDATORY,n,r)||super.walkOption(e,n,r)}walkAtLeastOneSep(e,n,r){this.checkIsTarget(e,Tt.REPETITION_MANDATORY_WITH_SEPARATOR,n,r)||super.walkOption(e,n,r)}walkMany(e,n,r){this.checkIsTarget(e,Tt.REPETITION,n,r)||super.walkOption(e,n,r)}walkManySep(e,n,r){this.checkIsTarget(
|
|
364
|
+
e,Tt.REPETITION_WITH_SEPARATOR,n,r)||super.walkOption(e,n,r)}}class KE 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,Tt.OPTION)}visitRepetition(e){this.checkIsTarget(e,Tt.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,Tt.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){
|
|
365
|
+
this.checkIsTarget(e,Tt.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,Tt.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,Tt.ALTERNATION)}}function VE(t){const e=new Array(t);for(let n=0;n<t;n++)e[n]=[];return e}function Dg(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(
|
|
366
|
+
o+u)}}e=i}return e}function sB(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 XE(t,e){const n=ve(t,o=>Eg([o],1)),r=VE(n.length),i=ve(n,o=>{const a={};return ke(o,u=>{const c=Dg(u.partialPath);ke(c,l=>{a[l]=!0})}),a});let s=n;for(let o=1;o<=e;o++){const a=s;s=VE(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,h=Dg(f);if(sB(i,
|
|
367
|
+
h,u)||ft(d)||f.length===e){const w=r[u];if(Rg(w,f)===!1){w.push(f);for(let v=0;v<h.length;v++){const g=h[v];i[u][g]=!0}}}else{const w=Eg(d,o+1,f);s[u]=s[u].concat(w),ke(w,v=>{const g=Dg(v.partialPath);ke(g,E=>{i[u][E]=!0})})}}}}return r}function _f(t,e,n,r){const i=new KE(t,Tt.ALTERNATION,r);return e.accept(i),XE(i.result,n)}function Pf(t,e,n,r){const i=new KE(t,n);e.accept(i);const s=i.result,a=new iB(e,t,n).startWalking(),u=new On({definition:s}),c=new On({definition:a});return XE([u,c],r)}function Rg(t,e){
|
|
368
|
+
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 oB(t,e){return t.length<e.length&&br(t,(n,r)=>{const i=e[r];return n===i||i.categoryMatchesMap[n.tokenTypeIdx]})}function YE(t){return br(t,e=>br(e,n=>br(n,r=>ft(r.categoryMatches))))}function aB(t){const e=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.
|
|
369
|
+
grammarName});return ve(e,n=>Object.assign({type:Rn.CUSTOM_LOOKAHEAD_VALIDATION},n))}function uB(t,e,n,r){const i=Kn(t,u=>cB(u,n)),s=EB(t,e,n),o=Kn(t,u=>yB(u,n)),a=Kn(t,u=>fB(u,t,r,n));return i.concat(s,o,a)}function cB(t,e){const n=new dB;t.accept(n);const r=n.allProductions,i=kM(r,lB),s=$r(i,a=>a.length>1);return ve(Kt(s),a=>{const u=Er(a),c=e.buildDuplicateFoundError(t,a),l=zr(u),f={message:c,type:Rn.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:l,occurrence:u.idx},d=JE(u);return d&&(f.parameter=
|
|
370
|
+
d),f})}function lB(t){return`${zr(t)}_#_${t.idx}_#_${JE(t)}`}function JE(t){return t instanceof Et?t.terminalType.name:t instanceof Dn?t.nonTerminalName:""}class dB 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.
|
|
371
|
+
push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}}function fB(t,e,n,r){const i=[];if($n(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:Rn.DUPLICATE_RULE_NAME,ruleName:t.name})}return i}function hB(t,e,n){const r=[];let i;return En(e,t)||(i=`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${n}\
|
|
372
|
+
<-as it is not defined in any of the super grammars `,r.push({message:i,type:Rn.INVALID_RULE_OVERRIDE,ruleName:t})),r}function QE(t,e,n,r=[]){const i=[],s=xf(e.definition);if(ft(s))return[];{const o=t.name;En(s,t)&&i.push({message:n.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:r}),type:Rn.LEFT_RECURSION,ruleName:o});const u=yf(s,r.concat([t])),c=Kn(u,l=>{const f=sn(r);return f.push(l),QE(t,l,n,f)});return i.concat(c)}}function xf(t){let e=[];if(ft(t))return e;const n=Er(t);if(n instanceof
|
|
373
|
+
Dn)e.push(n.referencedRule);else if(n instanceof On||n instanceof an||n instanceof Vn||n instanceof Xn||n instanceof Fn||n instanceof _t)e=e.concat(xf(n.definition));else if(n instanceof Ln)e=ur(ve(n.definition,s=>xf(s.definition)));else if(!(n instanceof Et))throw Error("non exhaustive match");const r=bf(n),i=t.length>1;if(r&&i){const s=on(t);return e.concat(xf(s))}else return e}class kg extends Go{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(
|
|
374
|
+
e)}}function pB(t,e){const n=new kg;t.accept(n);const r=n.alternations;return Kn(r,s=>{const o=Fu(s.definition);return Kn(o,(a,u)=>{const c=zE([a],[],qu,1);return ft(c)?[{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:s,emptyChoiceIdx:u}),type:Rn.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:s.idx,alternative:u+1}]:[]})})}function mB(t,e,n){const r=new kg;t.accept(r);let i=r.alternations;return i=vf(i,o=>o.ignoreAmbiguities===!0),Kn(i,o=>{const a=o.idx,u=o.maxLookahead||e,c=_f(
|
|
375
|
+
a,t,u,o),l=wB(c,o,t,n),f=bB(c,o,t,n);return l.concat(f)})}class gB 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 yB(t,e){const n=new kg;t.accept(n);const r=n.alternations;return Kn(r,s=>s.definition.length>255?[{message:e.buildTooManyAlternativesError(
|
|
376
|
+
{topLevelRule:t,alternation:s}),type:Rn.TOO_MANY_ALTS,ruleName:t.name,occurrence:s.idx}]:[])}function vB(t,e,n){const r=[];return ke(t,i=>{const s=new gB;i.accept(s);const o=s.allProductions;ke(o,a=>{const u=$g(a),c=a.maxLookahead||e,l=a.idx,d=Pf(l,i,u,c)[0];if(ft(ur(d))){const h=n.buildEmptyRepetitionError({topLevelRule:i,repetition:a});r.push({message:h,type:Rn.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),r}function wB(t,e,n,r){const i=[],s=$n(t,(a,u,c)=>(e.definition[c].ignoreAmbiguities===!0||
|
|
377
|
+
ke(u,l=>{const f=[c];ke(t,(d,h)=>{c!==h&&Rg(d,l)&&e.definition[h].ignoreAmbiguities!==!0&&f.push(h)}),f.length>1&&!Rg(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:Rn.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:e.idx,alternatives:a.alts}})}function bB(t,e,n,r){const i=$n(t,(o,a,u)=>{const c=ve(a,l=>({idx:u,path:l}));return o.concat(
|
|
378
|
+
c)},[]);return Ou(Kn(i,o=>{if(e.definition[o.idx].ignoreAmbiguities===!0)return[];const u=o.idx,c=o.path,l=Hn(i,d=>e.definition[d.idx].ignoreAmbiguities!==!0&&d.idx<u&&oB(d.path,c));return ve(l,d=>{const h=[d.idx+1,u+1],p=e.idx===0?"":e.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:e,ambiguityIndices:h,prefixPath:d.path}),type:Rn.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:p,alternatives:h}})}))}function EB(t,e,n){const r=[],i=ve(e,s=>s.name);return ke(
|
|
379
|
+
t,s=>{const o=s.name;if(En(i,o)){const a=n.buildNamespaceConflictError(s);r.push({message:a,type:Rn.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:o})}}),r}function $B(t){const e=fg(t,{errMsgProvider:H2}),n={};return ke(t.rules,r=>{n[r.name]=r}),K2(n,e.errMsgProvider)}function DB(t){return t=fg(t,{errMsgProvider:Ns}),uB(t.rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}const ZE="MismatchedTokenException",e$="NoViableAltException",t$="EarlyExitException",n$="NotAllInputParsedException",r$=[ZE,e$,t$,
|
|
380
|
+
n$];Object.freeze(r$);function Nf(t){return En(r$,t.name)}class If 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 i$ extends If{constructor(e,n,r){super(e,n),this.previousToken=r,this.name=ZE}}class RB extends If{constructor(e,n,r){super(e,n),this.previousToken=r,this.name=e$}}class kB extends If{constructor(e,n){super(e,n),this.name=n$}}class TB extends If{constructor(e,n,r){
|
|
381
|
+
super(e,n),this.previousToken=r,this.name=t$}}const Tg={},s$="InRuleRecoveryException";class CB extends Error{constructor(e){super(e),this.name=s$}}class AB{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Te(e,"recoveryEnabled")?e.recoveryEnabled:ci.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=SB)}getTokenToInsert(e){const n=bg(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return n.isInsertedInRecovery=!0,n}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){
|
|
382
|
+
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),h=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:c,previous:d,ruleName:this.getCurrRuleFullName()}),p=new i$(h,c,this.LA(0));p.resyncedTokens=Fu(a),this.SAVE_ERROR(p)};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)?
|
|
383
|
+
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(
|
|
384
|
+
e)){const r=this.SKIP_TOKEN();return this.consumeToken(),r}throw new CB("sad sad panda")}canPerformInRuleRecovery(e,n){return this.canRecoverWithSingleTokenInsertion(e,n)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,n){if(!this.canTokenTypeBeInsertedInRecovery(e)||ft(n))return!1;const r=this.LA(1);return qo(n,s=>this.tokenMatcher(r,s))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){
|
|
385
|
+
const n=this.getCurrFollowKey(),r=this.getFollowSetFromFollowKey(n);return En(r,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let n=this.LA(1),r=2;for(;;){const i=qo(e,s=>GE(n,s));if(i!==void 0)return i;n=this.LA(r),r++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return Tg;const e=this.getLastExplicitRuleShortName(),n=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:n,inRule:this.
|
|
386
|
+
shortRuleNameToFullName(r)}}buildFullFollowKeyStack(){const e=this.RULE_STACK,n=this.RULE_OCCURRENCE_STACK;return ve(e,(r,i)=>i===0?Tg:{ruleName:this.shortRuleNameToFullName(r),idxInCallingRule:n[i],inRule:this.shortRuleNameToFullName(e[i-1])})}flattenFollowSet(){const e=ve(this.buildFullFollowKeyStack(),n=>this.getFollowSetFromFollowKey(n));return ur(e)}getFollowSetFromFollowKey(e){if(e===Tg)return[Ki];const n=e.ruleName+e.idxInCallingRule+vE+e.inRule;return this.resyncFollows[n]}addToResyncTokens(e,n){
|
|
387
|
+
return this.tokenMatcher(e,Ki)||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=sn(this.RULE_OCCURRENCE_STACK);return{ruleStack:r,occurrenceStack:i,lastTok:e,lastTokOccurrence:n}}getHumanReadableRuleStack(){return ve(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}}function SB(t,e,n,r,i,s,o){
|
|
388
|
+
const a=this.getKeyForAutomaticLookahead(r,i);let u=this.firstAfterRepMap[a];if(u===void 0){const d=this.getCurrRuleFullName(),h=this.getGAstProductions()[d];u=new s(h,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=Ki,l=1),!(c===void 0||l===void 0)&&this.shouldInRepetitionRecoveryBeTried(c,l,o)&&this.tryInRepetitionRecovery(t,e,n,c)}const _B=4,Vi=8,o$=1<<Vi,a$=2<<Vi,Cg=3<<Vi,Ag=4<<Vi,Sg=5<<Vi,Of=6<<Vi;
|
|
389
|
+
function _g(t,e,n){return n|e|t}class Pg{constructor(e){var n;this.maxLookahead=(n=e?.maxLookahead)!==null&&n!==void 0?n:ci.maxLookahead}validate(e){const n=this.validateNoLeftRecursion(e.rules);if(ft(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 Kn(e,n=>QE(n,n,Ns))}validateEmptyOrAlternatives(e){
|
|
390
|
+
return Kn(e,n=>pB(n,Ns))}validateAmbiguousAlternationAlternatives(e,n){return Kn(e,r=>mB(r,n,Ns))}validateSomeNonEmptyLookaheadPath(e,n){return vB(e,n,Ns)}buildLookaheadForAlternation(e){return eB(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,nB)}buildLookaheadForOptional(e){return tB(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,$g(e.prodType),rB)}}class PB{initLooksAhead(e){this.dynamicTokensEnabled=Te(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:
|
|
391
|
+
ci.dynamicTokensEnabled,this.maxLookahead=Te(e,"maxLookahead")?e.maxLookahead:ci.maxLookahead,this.lookaheadStrategy=Te(e,"lookaheadStrategy")?e.lookaheadStrategy:new Pg({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}=NB(n);ke(r,c=>{const l=c.idx===0?"":c.idx;this.TRACE_INIT(
|
|
392
|
+
`${zr(c)}${l}`,()=>{const f=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:c.idx,rule:n,maxLookahead:c.maxLookahead||this.maxLookahead,hasPredicates:c.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),d=_g(this.fullRuleNameToShort[n.name],o$,c.idx);this.setLaFuncCache(d,f)})}),ke(i,c=>{this.computeLookaheadFunc(n,c.idx,Cg,"Repetition",c.maxLookahead,zr(c))}),ke(s,c=>{this.computeLookaheadFunc(n,c.idx,a$,"Option",c.maxLookahead,zr(c))}),ke(o,c=>{this.computeLookaheadFunc(
|
|
393
|
+
n,c.idx,Ag,"RepetitionMandatory",c.maxLookahead,zr(c))}),ke(a,c=>{this.computeLookaheadFunc(n,c.idx,Of,"RepetitionMandatoryWithSeparator",c.maxLookahead,zr(c))}),ke(u,c=>{this.computeLookaheadFunc(n,c.idx,Sg,"RepetitionWithSeparator",c.maxLookahead,zr(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,
|
|
394
|
+
prodType:i}),u=_g(this.fullRuleNameToShort[e.name],r,n);this.setLaFuncCache(u,a)})}getKeyForAutomaticLookahead(e,n){const r=this.getLastExplicitRuleShortName();return _g(r,e,n)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,n){this.lookAheadFuncsCache.set(e,n)}}class xB extends Go{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.
|
|
395
|
+
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){
|
|
396
|
+
this.dslMethods.alternation.push(e)}}const Ff=new xB;function NB(t){Ff.reset(),t.accept(Ff);const e=Ff.dslMethods;return Ff.reset(),e}function u$(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset)}function c$(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&&
|
|
397
|
+
(t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine)}function IB(t,e,n){t.children[n]===void 0?t.children[n]=[e]:t.children[n].push(e)}function OB(t,e,n){t.children[e]===void 0?t.children[e]=[n]:t.children[e].push(n)}const FB="name";function l$(t,e){Object.defineProperty(t,FB,{enumerable:!1,configurable:!0,writable:!1,value:e})}function LB(t,e){const n=ar(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&&
|
|
398
|
+
this[c.name](c.children,e)}}}function MB(t,e){const n=function(){};l$(n,t+"BaseSemantics");const r={visit:function(i,s){if(Qe(i)&&(i=i[0]),!ui(i))return this[i.name](i.children,s)},validateVisitor:function(){const i=qB(this,e);if(!ft(i)){const s=ve(i,o=>o.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
|
|
399
|
+
${s.join(`
|
|
400
|
+
|
|
401
|
+
`).replace(/\n/g,`
|
|
402
|
+
`)}`)}}};return n.prototype=r,n.prototype.constructor=n,n._RULE_NAMES=e,n}function BB(t,e,n){const r=function(){};l$(r,t+"BaseSemanticsWithDefaults");const i=Object.create(n.prototype);return ke(e,s=>{i[s]=LB}),r.prototype=i,r.prototype.constructor=r,r}var xg;(function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"})(xg||(xg={}));function qB(t,e){return jB(t,e)}function jB(t,e){const n=Hn(e,i=>ii(t[i])===!1),r=ve(n,i=>({msg:`Missing visitor method: <${i}> o\
|
|
403
|
+
n ${t.constructor.name} CST Visitor.`,type:xg.MISSING_METHOD,methodName:i}));return Ou(r)}class GB{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=Te(e,"nodeLocationTracking")?e.nodeLocationTracking:ci.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=Ht,this.cstFinallyStateUpdate=Ht,this.cstPostTerminal=Ht,this.cstPostNonTerminal=Ht,this.cstPostRule=Ht;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=
|
|
404
|
+
c$,this.setNodeLocationFromNode=c$,this.cstPostRule=Ht,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Ht,this.setNodeLocationFromNode=Ht,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=u$,this.setNodeLocationFromNode=u$,this.cstPostRule=Ht,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):
|
|
405
|
+
(this.setNodeLocationFromToken=Ht,this.setNodeLocationFromNode=Ht,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=Ht,this.setNodeLocationFromNode=Ht,this.cstPostRule=Ht,this.setInitialNodeLocation=Ht;else throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,
|
|
406
|
+
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.
|
|
407
|
+
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.
|
|
408
|
+
length-1];IB(r,n,e),this.setNodeLocationFromToken(r.location,n)}cstPostNonTerminal(e,n){const r=this.CST_STACK[this.CST_STACK.length-1];OB(r,n,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){if(ui(this.baseCstVisitorConstructor)){const e=MB(this.className,ar(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(ui(this.baseCstVisitorWithDefaultsConstructor)){const e=BB(
|
|
409
|
+
this.className,ar(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 UB{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=
|
|
410
|
+
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)):Bf}LA(e){const n=this.currIdx+e;return n<0||this.tokVectorLength<=n?Bf:this.tokVector[n]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){
|
|
411
|
+
this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}}class WB{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(
|
|
412
|
+
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){
|
|
413
|
+
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(
|
|
414
|
+
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.
|
|
415
|
+
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(
|
|
416
|
+
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){
|
|
417
|
+
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(
|
|
418
|
+
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=qf){if(En(this.definedRulesNames,
|
|
419
|
+
e)){const o={message:Ns.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:Rn.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=qf){const i=hB(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.
|
|
420
|
+
saveRecogState();try{return e.apply(this,n),!0}catch(i){if(Nf(i))return!1;throw i}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return ZM(Kt(this.gastProductionsCache))}}class zB{initRecognizerEngine(e,n){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Af,this.subruleIdx=0,this.definedRulesNames=[],this.
|
|
421
|
+
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.
|
|
422
|
+
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
|
|
423
|
+
For Further details.`);if(Qe(e)){if(ft(e))throw Error(`A Token Vocabulary cannot be empty.
|
|
424
|
+
Note that the first argument for the parser constructor
|
|
425
|
+
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.
|
|
426
|
+
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
|
|
427
|
+
For Further details.`)}if(Qe(e))this.tokensMap=$n(e,(s,o)=>(s[o.name]=o,s),{});else if(Te(e,"modes")&&br(ur(Kt(e.modes)),U2)){const s=ur(Kt(e.modes)),o=hg(s);this.tokensMap=$n(o,(a,u)=>(a[u.name]=u,a),{})}else if(or(e))this.tokensMap=sn(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=Ki;const r=Te(e,"modes")?ur(Kt(e.modes)):Kt(e),i=br(r,s=>ft(s.categoryMatches));this.
|
|
428
|
+
tokenMatcher=i?Af:qu,ju(Kt(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'
|
|
429
|
+
Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const i=Te(r,"resyncEnabled")?r.resyncEnabled:qf.resyncEnabled,s=Te(r,"recoveryValueFunc")?r.recoveryValueFunc:qf.recoveryValueFunc,o=this.ruleShortNameIdx<<_B+Vi;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.
|
|
430
|
+
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(Nf(e)){const o=e;if(s){const a=this.
|
|
431
|
+
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(a$,n);return this.optionInternalLogic(e,n,
|
|
432
|
+
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(Ag,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(
|
|
433
|
+
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,Tt.REPETITION_MANDATORY,n.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,n],i,Ag,e,Q2)}atLeastOneSepFirstInternal(e,n){const r=this.getKeyForAutomaticLookahead(Of,e);this.atLeastOneSepFirstInternalLogic(e,n,r)}atLeastOneSepFirstInternalLogic(e,n,r){const i=n.DEF,s=n.SEP;if(this.getLaFuncFromCache(r).call(
|
|
434
|
+
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,WE],a,Of,e,WE)}else throw this.raiseEarlyExitException(e,Tt.REPETITION_MANDATORY_WITH_SEPARATOR,n.ERR_MSG)}manyInternal(e,n){const r=this.getKeyForAutomaticLookahead(Cg,e);return this.manyInternalLogic(e,n,r)}manyInternalLogic(e,n,r){let i=this.getLaFuncFromCache(r),s;if(typeof n!="f\
|
|
435
|
+
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,Cg,e,J2,o)}manySepFirstInternal(e,n){const r=this.getKeyForAutomaticLookahead(Sg,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.
|
|
436
|
+
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,UE],a,Sg,e,UE)}}repetitionSepSecondInternal(e,n,r,i,s){for(;r();)this.CONSUME(n),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,n,r,i,s],r,Of,e,s)}doSingleRepetition(e){const n=this.getLexerPosition();return e.call(this),this.getLexerPosition()>n}orInternal(e,n){const r=this.getKeyForAutomaticLookahead(o$,n),
|
|
437
|
+
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 kB(n,e))}}subruleInternal(e,n,r){let i;try{
|
|
438
|
+
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 Nf(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):
|
|
439
|
+
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 i$(i,n,s))}consumeInternalRecovery(e,n,r){if(this.recoveryEnabled&&r.name==="MismatchedTokenException"&&!this.
|
|
440
|
+
isBackTracking()){const i=this.getFollowsForInRuleRecovery(e,n);try{return this.tryInRuleRecovery(e,i)}catch(s){throw s.name===s$?r:s}}else throw r}saveRecogState(){const e=this.errors,n=sn(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.
|
|
441
|
+
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),Ki)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}class HB{initErrorHandler(e){this.
|
|
442
|
+
_errors=[],this.errorMessageProvider=Te(e,"errorMessageProvider")?e.errorMessageProvider:ci.errorMessageProvider}SAVE_ERROR(e){if(Nf(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:sn(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return sn(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,n,r){const i=this.getCurrRuleFullName(),s=this.getGAstProductions()[i],
|
|
443
|
+
a=Pf(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 TB(c,this.LA(1),this.LA(0)))}raiseNoAltException(e,n){const r=this.getCurrRuleFullName(),i=this.getGAstProductions()[r],s=_f(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.
|
|
444
|
+
errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:s,actual:o,previous:a,customUserDescription:n,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new RB(u,this.LA(1),a))}}class KB{initContentAssist(){}computeContentAssist(e,n){const r=this.gastProductionsCache[e];if(ui(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return zE([r],n,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const n=Er(e.ruleStack),i=this.getGAstProductions()[n];return new Y2(
|
|
445
|
+
i,e).startWalking()}}const Lf={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Lf);const d$=!0,f$=Math.pow(2,Vi)-1,h$=jE({name:"RECORDING_PHASE_TOKEN",pattern:Mn.NA});ju([h$]);const p$=bg(h$,`This IToken indicates the Parser is in Recording Phase
|
|
446
|
+
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(p$);const VB={name:`This CSTNode indicates the Parser is in Recording Phase
|
|
447
|
+
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}};class XB{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(
|
|
448
|
+
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.
|
|
449
|
+
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[`\
|
|
450
|
+
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 Bf}topLevelRuleRecord(e,n){try{const r=new jo({definition:[],name:e});return r.name=e,this.recordingProdStack.push(r),
|
|
451
|
+
n.call(this),this.recordingProdStack.pop(),r}catch(r){if(r.KNOWN_RECORDER_ERROR!==!0)try{r.message=r.message+`
|
|
452
|
+
This error was thrown during the "grammar recording phase" For more info see:
|
|
453
|
+
https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw r}throw r}}optionInternalRecord(e,n){return Uu.call(this,an,e,n)}atLeastOneInternalRecord(e,n){Uu.call(this,Vn,n,e)}atLeastOneSepFirstInternalRecord(e,n){Uu.call(this,Xn,n,e,d$)}manyInternalRecord(e,n){Uu.call(this,_t,n,e)}manySepFirstInternalRecord(e,n){Uu.call(this,Fn,n,e,d$)}orInternalRecord(e,n){return YB.call(this,e,n)}subruleInternalRecord(e,n,r){if(Mf(n),!e||Te(e,"ruleName")===!1){const a=new Error(`<SUBRULE${m$(
|
|
454
|
+
n)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>
|
|
455
|
+
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 Dn({idx:n,nonTerminalName:s,label:r?.LABEL,referencedRule:void 0});return i.definition.push(o),this.outputCst?VB:Lf}consumeInternalRecord(e,n,r){if(Mf(n),!_E(e)){const o=new Error(`<CONSUME${m$(n)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>
|
|
456
|
+
inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}const i=Bo(this.recordingProdStack),s=new Et({idx:n,terminalType:e,label:r?.LABEL});return i.definition.push(s),p$}}function Uu(t,e,n,r=!1){Mf(n);const i=Bo(this.recordingProdStack),s=ii(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.
|
|
457
|
+
pop(),Lf}function YB(t,e){Mf(e);const n=Bo(this.recordingProdStack),r=Qe(t)===!1,i=r===!1?t:t.DEF,s=new Ln({definition:[],idx:e,ignoreAmbiguities:r&&t.IGNORE_AMBIGUITIES===!0});Te(t,"MAX_LOOKAHEAD")&&(s.maxLookahead=t.MAX_LOOKAHEAD);const o=fE(i,a=>ii(a.GATE));return s.hasPredicates=o,n.definition.push(s),ke(i,a=>{const u=new On({definition:[]});s.definition.push(u),Te(a,"IGNORE_AMBIGUITIES")?u.ignoreAmbiguities=a.IGNORE_AMBIGUITIES:Te(a,"GATE")&&(u.ignoreAmbiguities=!0),this.recordingProdStack.
|
|
458
|
+
push(u),a.ALT.call(this),this.recordingProdStack.pop()}),Lf}function m$(t){return t===0?"":`${t}`}function Mf(t){if(t<0||t>f$){const e=new Error(`Invalid DSL Method idx value: <${t}>
|
|
459
|
+
Idx value must be a none negative value smaller than ${f$+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}class JB{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=ci.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&&
|
|
460
|
+
console.log(`${r}--> <${e}>`);const{time:i,value:s}=mE(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 QB(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 Bf=bg(Ki,"",NaN,NaN,
|
|
461
|
+
NaN,NaN,NaN,NaN);Object.freeze(Bf);const ci=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Wo,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),qf=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});var Rn;(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",
|
|
462
|
+
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\
|
|
463
|
+
EAD_VALIDATION"})(Rn||(Rn={}));function g$(t=void 0){return function(){return t}}class Td{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",()=>{gE(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),ke(this.definedRulesNames,
|
|
464
|
+
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=$B({rules:Kt(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(r)}),this.TRACE_INIT("Grammar Validations",()=>{if(ft(r)&&this.skipValidations===!1){const i=DB({rules:Kt(this.gastProductionsCache),tokenTypes:Kt(this.tokensMap),errMsgProvider:Ns,
|
|
465
|
+
grammarName:n}),s=aB({lookaheadStrategy:this.lookaheadStrategy,rules:Kt(this.gastProductionsCache),tokenTypes:Kt(this.tokensMap),grammarName:n});this.definitionErrors=this.definitionErrors.concat(i,s)}}),ft(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{const i=o2(Kt(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:Kt(
|
|
466
|
+
this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Kt(this.gastProductionsCache))})),!Td.DEFER_DEFINITION_ERRORS_HANDLING&&!ft(this.definitionErrors))throw e=ve(this.definitionErrors,i=>i.message),new Error(`Parser Definition Errors detected:
|
|
467
|
+
${e.join(`
|
|
468
|
+
-------------------------------
|
|
469
|
+
`)}`)})}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.
|
|
470
|
+
Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
|
|
471
|
+
See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
|
|
472
|
+
For further details.`);this.skipValidations=Te(n,"skipValidations")?n.skipValidations:ci.skipValidations}}Td.DEFER_DEFINITION_ERRORS_HANDLING=!1,QB(Td,[AB,PB,GB,UB,zB,WB,HB,KB,XB,JB]);class ZB extends Td{constructor(e,n=ci){const r=sn(n);r.outputCst=!1,super(e,r)}}function zo(t,e,n){return`${t.name}_${e}_${n}`}const Xi=1,eq=2,y$=4,v$=5,Wu=7,tq=8,nq=9,rq=10,iq=11,w$=12;class Ng{constructor(e){this.target=e}isEpsilon(){return!1}}class Ig extends Ng{constructor(e,n){super(e),this.tokenType=n}}class b$ extends Ng{constructor(e){
|
|
473
|
+
super(e)}isEpsilon(){return!0}}class Og extends Ng{constructor(e,n,r){super(e),this.rule=n,this.followState=r}isEpsilon(){return!0}}function sq(t){const e={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};oq(e,t);const n=t.length;for(let r=0;r<n;r++){const i=t[r],s=Is(e,i,i);s!==void 0&&yq(e,i,s)}return e}function oq(t,e){const n=e.length;for(let r=0;r<n;r++){const i=e[r],s=Qt(t,i,void 0,{type:eq}),o=Qt(t,i,void 0,{type:Wu});s.stop=o,t.ruleToStartState.
|
|
474
|
+
set(i,s),t.ruleToStopState.set(i,o)}}function E$(t,e,n){return n instanceof Et?Fg(t,e,n.terminalType,n):n instanceof Dn?gq(t,e,n):n instanceof Ln?dq(t,e,n):n instanceof an?fq(t,e,n):n instanceof _t?aq(t,e,n):n instanceof Fn?uq(t,e,n):n instanceof Vn?cq(t,e,n):n instanceof Xn?lq(t,e,n):Is(t,e,n)}function aq(t,e,n){const r=Qt(t,e,n,{type:v$});Yi(t,r);const i=Ho(t,e,r,n,Is(t,e,n));return D$(t,e,n,i)}function uq(t,e,n){const r=Qt(t,e,n,{type:v$});Yi(t,r);const i=Ho(t,e,r,n,Is(t,e,n)),s=Fg(t,e,n.separator,
|
|
475
|
+
n);return D$(t,e,n,i,s)}function cq(t,e,n){const r=Qt(t,e,n,{type:y$});Yi(t,r);const i=Ho(t,e,r,n,Is(t,e,n));return $$(t,e,n,i)}function lq(t,e,n){const r=Qt(t,e,n,{type:y$});Yi(t,r);const i=Ho(t,e,r,n,Is(t,e,n)),s=Fg(t,e,n.separator,n);return $$(t,e,n,i,s)}function dq(t,e,n){const r=Qt(t,e,n,{type:Xi});Yi(t,r);const i=ve(n.definition,o=>E$(t,e,o));return Ho(t,e,r,n,...i)}function fq(t,e,n){const r=Qt(t,e,n,{type:Xi});Yi(t,r);const i=Ho(t,e,r,n,Is(t,e,n));return hq(t,e,n,i)}function Is(t,e,n){const r=Hn(
|
|
476
|
+
ve(n.definition,i=>E$(t,e,i)),i=>i!==void 0);return r.length===1?r[0]:r.length===0?void 0:mq(t,r)}function $$(t,e,n,r,i){const s=r.left,o=r.right,a=Qt(t,e,n,{type:iq});Yi(t,a);const u=Qt(t,e,n,{type:w$});return s.loopback=a,u.loopback=a,t.decisionMap[zo(e,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",n.idx)]=a,qt(o,a),i===void 0?(qt(a,s),qt(a,u)):(qt(a,u),qt(a,i.left),qt(i.right,s)),{left:s,right:u}}function D$(t,e,n,r,i){const s=r.left,o=r.right,a=Qt(t,e,n,{type:rq});Yi(t,a);const u=Qt(
|
|
477
|
+
t,e,n,{type:w$}),c=Qt(t,e,n,{type:nq});return a.loopback=c,u.loopback=c,qt(a,s),qt(a,u),qt(o,c),i!==void 0?(qt(c,u),qt(c,i.left),qt(i.right,s)):qt(c,a),t.decisionMap[zo(e,i?"RepetitionWithSeparator":"Repetition",n.idx)]=a,{left:a,right:u}}function hq(t,e,n,r){const i=r.left,s=r.right;return qt(i,s),t.decisionMap[zo(e,"Option",n.idx)]=i,r}function Yi(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}function Ho(t,e,n,r,...i){const s=Qt(t,e,r,{type:tq,start:n});n.
|
|
478
|
+
end=s;for(const a of i)a!==void 0?(qt(n,a.left),qt(a.right,s)):qt(n,s);const o={left:n,right:s};return t.decisionMap[zo(e,pq(r),r.idx)]=n,o}function pq(t){if(t instanceof Ln)return"Alternation";if(t instanceof an)return"Option";if(t instanceof _t)return"Repetition";if(t instanceof Fn)return"RepetitionWithSeparator";if(t instanceof Vn)return"RepetitionMandatory";if(t instanceof Xn)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function mq(t,e){const n=e.
|
|
479
|
+
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 Og,c=a,l=e[s+1].left;o.left.type===Xi&&o.right.type===Xi&&a!==void 0&&(u&&c.followState===o.right||a.target===o.right)?(u?c.followState=l:a.target=l,vq(t,o.right)):qt(o.right,l)}const r=e[0],i=e[n-1];return{left:r.left,right:i.right}}function Fg(t,e,n,r){const i=Qt(t,e,r,{type:Xi}),s=Qt(t,e,r,{type:Xi});return Lg(i,new Ig(s,n)),{left:i,right:s}}function gq(t,e,n){const r=n.
|
|
480
|
+
referencedRule,i=t.ruleToStartState.get(r),s=Qt(t,e,n,{type:Xi}),o=Qt(t,e,n,{type:Xi}),a=new Og(i,r,o);return Lg(s,a),{left:s,right:o}}function yq(t,e,n){const r=t.ruleToStartState.get(e);qt(r,n.left);const i=t.ruleToStopState.get(e);return qt(n.right,i),{left:r,right:i}}function qt(t,e){const n=new b$(e);Lg(t,n)}function Qt(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(
|
|
481
|
+
i),i}function Lg(t,e){t.transitions.length===0&&(t.epsilonOnlyTransitions=e.isEpsilon()),t.transitions.push(e)}function vq(t,e){t.states.splice(t.states.indexOf(e),1)}const jf={};class Mg{constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){const n=R$(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.
|
|
482
|
+
map)e+=n+":";return e}}function R$(t,e=!0){return`${e?`a${t.alt}`:""}s${t.state.stateNumber}:${t.stack.map(n=>n.stateNumber.toString()).join("_")}`}function wq(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 k${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.
|
|
483
|
+
predicates[r]===!0?"1":"0";return e}}const T$=new k$;class bq extends Pg{constructor(e){var n;super(),this.logging=(n=e?.logging)!==null&&n!==void 0?n:r=>console.log(r)}initialize(e){this.atn=sq(e.rules),this.dfas=Eq(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,
|
|
484
|
+
f=ve(HE({maxLookahead:1,occurrence:n,prodType:"Alternation",rule:r}),d=>ve(d,h=>h[0]));if(C$(f,!1)&&!s){const d=$n(f,(h,p,w)=>(ke(p,v=>{v&&(h[v.tokenTypeIdx]=w,ke(v.categoryMatches,g=>{h[g]=w}))}),h),{});return i?function(h){var p;const w=this.LA(1),v=d[w.tokenTypeIdx];if(h!==void 0&&v!==void 0){const g=(p=h[v])===null||p===void 0?void 0:p.GATE;if(g!==void 0&&g.call(this)===!1)return}return v}:function(){const h=this.LA(1);return d[h.tokenTypeIdx]}}else return i?function(d){const h=new k$,p=d===
|
|
485
|
+
void 0?0:d.length;for(let v=0;v<p;v++){const g=d?.[v].GATE;h.set(v,g===void 0||g.call(this))}const w=Bg.call(this,o,l,h,a);return typeof w=="number"?w:void 0}:function(){const d=Bg.call(this,o,l,T$,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(HE({maxLookahead:1,occurrence:n,prodType:i,rule:r}),d=>ve(d,h=>h[0]));if(C$(f)&&f[0][0]&&
|
|
486
|
+
!s){const d=f[0],h=ur(d);if(h.length===1&&ft(h[0].categoryMatches)){const w=h[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===w}}else{const p=$n(h,(w,v)=>(v!==void 0&&(w[v.tokenTypeIdx]=!0,ke(v.categoryMatches,g=>{w[g]=!0})),w),{});return function(){const w=this.LA(1);return p[w.tokenTypeIdx]===!0}}}return function(){const d=Bg.call(this,o,l,T$,a);return typeof d=="object"?!1:d===0}}}function C$(t,e=!0){const n=new Set;for(const r of t){const i=new Set;for(const s of r){if(s===
|
|
487
|
+
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 Eq(t){const e=t.decisionStates.length,n=Array(e);for(let r=0;r<e;r++)n[r]=wq(t.decisionStates[r],r);return n}function Bg(t,e,n,r){const i=t[e](n);let s=i.start;if(s===void 0){const a=xq(i.atnStartState);s=_$(i,A$(a)),i.start=s}return $q.apply(this,[i,s,n,r])}function $q(t,e,n,r){let i=e,s=1;const o=[];let a=this.LA(s++);for(;;){
|
|
488
|
+
let u=Aq(i,a);if(u===void 0&&(u=Dq.apply(this,[t,i,a,s,n,r])),u===jf)return Cq(o,i,a);if(u.isAcceptState===!0)return u.prediction;i=u,o.push(a),a=this.LA(s++)}}function Dq(t,e,n,r,i,s){const o=Sq(e.configs,n,i);if(o.size===0)return S$(t,e,n,jf),jf;let a=A$(o);const u=Pq(o,i);if(u!==void 0)a.isAcceptState=!0,a.prediction=u,a.configs.uniqueAlt=u;else if(Fq(o)){const c=qM(o.alts);a.isAcceptState=!0,a.prediction=c,a.configs.uniqueAlt=c,Rq.apply(this,[t,r,o.alts,s])}return a=S$(t,e,n,a),a}function Rq(t,e,n,r){
|
|
489
|
+
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=kq({topLevelRule:o,ambiguityIndices:n,production:a,prefixPath:i});r(u)}function kq(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 <${Tq(t.production)}${n}> inside <${t.topLevelRule.name}> Rule,
|
|
490
|
+
<${e}> may appears as a prefix path in all these alternatives.
|
|
491
|
+
`;return r=r+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
|
|
492
|
+
For Further details.`,r}function Tq(t){if(t instanceof Dn)return"SUBRULE";if(t instanceof an)return"OPTION";if(t instanceof Ln)return"OR";if(t instanceof Vn)return"AT_LEAST_ONE";if(t instanceof Xn)return"AT_LEAST_ONE_SEP";if(t instanceof Fn)return"MANY_SEP";if(t instanceof _t)return"MANY";if(t instanceof Et)return"CONSUME";throw Error("non exhaustive match")}function Cq(t,e,n){const r=Kn(e.configs.elements,s=>s.state.transitions),i=YM(r.filter(s=>s instanceof Ig).map(s=>s.tokenType),s=>s.tokenTypeIdx);
|
|
493
|
+
return{actualToken:n,possibleTokenTypes:i,tokenPath:t}}function Aq(t,e){return t.edges[e.tokenTypeIdx]}function Sq(t,e,n){const r=new Mg,i=[];for(const o of t.elements){if(n.is(o.alt)===!1)continue;if(o.state.type===Wu){i.push(o);continue}const a=o.state.transitions.length;for(let u=0;u<a;u++){const c=o.state.transitions[u],l=_q(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 Mg;for(const o of r.elements)Gf(o,s)}if(i.length>0&&
|
|
494
|
+
!Iq(s))for(const o of i)s.add(o);return s}function _q(t,e){if(t instanceof Ig&&GE(e,t.tokenType))return t.target}function Pq(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 A$(t){return{configs:t,edges:{},isAcceptState:!1,prediction:-1}}function S$(t,e,n,r){return r=_$(t,r),e.edges[n.tokenTypeIdx]=r,r}function _$(t,e){if(e===jf)return e;const n=e.configs.key,r=t.states[n];return r!==void 0?r:(e.configs.finalize(),t.states[n]=
|
|
495
|
+
e,e)}function xq(t){const e=new Mg,n=t.transitions.length;for(let r=0;r<n;r++){const s={state:t.transitions[r].target,alt:r,stack:[]};Gf(s,e)}return e}function Gf(t,e){const n=t.state;if(n.type===Wu){if(t.stack.length>0){const i=[...t.stack],o={state:i.pop(),alt:t.alt,stack:i};Gf(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=Nq(t,s);o!==void 0&&Gf(o,e)}}function Nq(t,e){if(e instanceof b$)return{state:e.target,
|
|
496
|
+
alt:t.alt,stack:t.stack};if(e instanceof Og){const n=[...t.stack,e.followState];return{state:e.target,alt:t.alt,stack:n}}}function Iq(t){for(const e of t.elements)if(e.state.type===Wu)return!0;return!1}function Oq(t){for(const e of t.elements)if(e.state.type!==Wu)return!1;return!0}function Fq(t){if(Oq(t))return!0;const e=Lq(t.elements);return Mq(e)&&!Bq(e)}function Lq(t){const e=new Map;for(const n of t){const r=R$(n,!1);let i=e.get(r);i===void 0&&(i={},e.set(r,i)),i[n.alt]=!0}return e}function Mq(t){
|
|
497
|
+
for(const e of Array.from(t.values()))if(Object.keys(e).length>1)return!0;return!1}function Bq(t){for(const e of Array.from(t.values()))if(Object.keys(e).length===1)return!0;return!1}var P$;(function(t){function e(n){return typeof n=="string"}t.is=e})(P$||(P$={}));var qg;(function(t){function e(n){return typeof n=="string"}t.is=e})(qg||(qg={}));var x$;(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})(x$||(x$=
|
|
498
|
+
{}));var Uf;(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})(Uf||(Uf={}));var ot;(function(t){function e(r,i){return r===Number.MAX_VALUE&&(r=Uf.MAX_VALUE),i===Number.MAX_VALUE&&(i=Uf.MAX_VALUE),{line:r,character:i}}t.create=e;function n(r){let i=r;return j.objectLiteral(i)&&j.uinteger(i.line)&&j.uinteger(i.character)}t.is=n})(ot||(ot={}));var Ye;(function(t){function e(r,i,s,o){if(j.uinteger(r)&&j.uinteger(i)&&j.uinteger(
|
|
499
|
+
s)&&j.uinteger(o))return{start:ot.create(r,i),end:ot.create(s,o)};if(ot.is(r)&&ot.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 j.objectLiteral(i)&&ot.is(i.start)&&ot.is(i.end)}t.is=n})(Ye||(Ye={}));var Wf;(function(t){function e(r,i){return{uri:r,range:i}}t.create=e;function n(r){let i=r;return j.objectLiteral(i)&&Ye.is(i.range)&&(j.string(i.uri)||j.undefined(i.uri))}t.is=n})(Wf||(Wf={}));
|
|
500
|
+
var N$;(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 j.objectLiteral(i)&&Ye.is(i.targetRange)&&j.string(i.targetUri)&&Ye.is(i.targetSelectionRange)&&(Ye.is(i.originSelectionRange)||j.undefined(i.originSelectionRange))}t.is=n})(N$||(N$={}));var jg;(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 j.objectLiteral(i)&&j.numberRange(
|
|
501
|
+
i.red,0,1)&&j.numberRange(i.green,0,1)&&j.numberRange(i.blue,0,1)&&j.numberRange(i.alpha,0,1)}t.is=n})(jg||(jg={}));var I$;(function(t){function e(r,i){return{range:r,color:i}}t.create=e;function n(r){const i=r;return j.objectLiteral(i)&&Ye.is(i.range)&&jg.is(i.color)}t.is=n})(I$||(I$={}));var O$;(function(t){function e(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}t.create=e;function n(r){const i=r;return j.objectLiteral(i)&&j.string(i.label)&&(j.undefined(i.textEdit)||Bn.is(i))&&(j.undefined(
|
|
502
|
+
i.additionalTextEdits)||j.typedArray(i.additionalTextEdits,Bn.is))}t.is=n})(O$||(O$={}));var F$;(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(F$||(F$={}));var L$;(function(t){function e(r,i,s,o,a,u){const c={startLine:r,endLine:i};return j.defined(s)&&(c.startCharacter=s),j.defined(o)&&(c.endCharacter=o),j.defined(a)&&(c.kind=a),j.defined(u)&&(c.collapsedText=u),c}t.create=e;function n(r){const i=r;return j.objectLiteral(i)&&j.uinteger(i.startLine)&&j.uinteger(i.startLine)&&
|
|
503
|
+
(j.undefined(i.startCharacter)||j.uinteger(i.startCharacter))&&(j.undefined(i.endCharacter)||j.uinteger(i.endCharacter))&&(j.undefined(i.kind)||j.string(i.kind))}t.is=n})(L$||(L$={}));var Gg;(function(t){function e(r,i){return{location:r,message:i}}t.create=e;function n(r){let i=r;return j.defined(i)&&Wf.is(i.location)&&j.string(i.message)}t.is=n})(Gg||(Gg={}));var Os;(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(Os||(Os={}));var M$;(function(t){t.Unnecessary=1,t.Deprecated=2})(M$||
|
|
504
|
+
(M$={}));var B$;(function(t){function e(n){const r=n;return j.objectLiteral(r)&&j.string(r.href)}t.is=e})(B$||(B$={}));var zf;(function(t){function e(r,i,s,o,a,u){let c={range:r,message:i};return j.defined(s)&&(c.severity=s),j.defined(o)&&(c.code=o),j.defined(a)&&(c.source=a),j.defined(u)&&(c.relatedInformation=u),c}t.create=e;function n(r){var i;let s=r;return j.defined(s)&&Ye.is(s.range)&&j.string(s.message)&&(j.number(s.severity)||j.undefined(s.severity))&&(j.integer(s.code)||j.string(s.code)||
|
|
505
|
+
j.undefined(s.code))&&(j.undefined(s.codeDescription)||j.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(j.string(s.source)||j.undefined(s.source))&&(j.undefined(s.relatedInformation)||j.typedArray(s.relatedInformation,Gg.is))}t.is=n})(zf||(zf={}));var Ko;(function(t){function e(r,i,...s){let o={title:r,command:i};return j.defined(s)&&s.length>0&&(o.arguments=s),o}t.create=e;function n(r){let i=r;return j.defined(i)&&j.string(i.title)&&j.string(i.command)}t.is=n})(Ko||(Ko={}));
|
|
506
|
+
var Bn;(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 j.objectLiteral(o)&&j.string(o.newText)&&Ye.is(o.range)}t.is=i})(Bn||(Bn={}));var Ug;(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 j.objectLiteral(i)&&j.string(
|
|
507
|
+
i.label)&&(j.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(j.string(i.description)||i.description===void 0)}t.is=n})(Ug||(Ug={}));var Vo;(function(t){function e(n){const r=n;return j.string(r)}t.is=e})(Vo||(Vo={}));var q$;(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 Bn.
|
|
508
|
+
is(o)&&(Ug.is(o.annotationId)||Vo.is(o.annotationId))}t.is=i})(q$||(q$={}));var Wg;(function(t){function e(r,i){return{textDocument:r,edits:i}}t.create=e;function n(r){let i=r;return j.defined(i)&&Xg.is(i.textDocument)&&Array.isArray(i.edits)}t.is=n})(Wg||(Wg={}));var zg;(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===
|
|
509
|
+
"create"&&j.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||j.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||j.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Vo.is(i.annotationId))}t.is=n})(zg||(zg={}));var Hg;(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.
|
|
510
|
+
kind==="rename"&&j.string(i.oldUri)&&j.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||j.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||j.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Vo.is(i.annotationId))}t.is=n})(Hg||(Hg={}));var Kg;(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;
|
|
511
|
+
return i&&i.kind==="delete"&&j.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||j.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||j.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Vo.is(i.annotationId))}t.is=n})(Kg||(Kg={}));var Vg;(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=>j.string(i.kind)?zg.is(i)||Hg.is(i)||Kg.is(i):Wg.is(i)))}t.
|
|
512
|
+
is=e})(Vg||(Vg={}));var j$;(function(t){function e(r){return{uri:r}}t.create=e;function n(r){let i=r;return j.defined(i)&&j.string(i.uri)}t.is=n})(j$||(j$={}));var G$;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return j.defined(i)&&j.string(i.uri)&&j.integer(i.version)}t.is=n})(G$||(G$={}));var Xg;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return j.defined(i)&&j.string(i.uri)&&(i.version===null||j.integer(i.version))}
|
|
513
|
+
t.is=n})(Xg||(Xg={}));var U$;(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 j.defined(i)&&j.string(i.uri)&&j.string(i.languageId)&&j.integer(i.version)&&j.string(i.text)}t.is=n})(U$||(U$={}));var Yg;(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(n){const r=n;return r===t.PlainText||r===t.Markdown}t.is=e})(Yg||(Yg={}));var zu;(function(t){function e(n){const r=n;return j.objectLiteral(n)&&Yg.is(r.kind)&&j.
|
|
514
|
+
string(r.value)}t.is=e})(zu||(zu={}));var Ct;(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})(Ct||(Ct={}));var kn;(function(t){t.PlainText=1,t.Snippet=2})(kn||(kn={}));var W$;(function(t){t.Deprecated=1})(W$||(W$={}));var z$;
|
|
515
|
+
(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&&j.string(i.newText)&&Ye.is(i.insert)&&Ye.is(i.replace)}t.is=n})(z$||(z$={}));var H$;(function(t){t.asIs=1,t.adjustIndentation=2})(H$||(H$={}));var K$;(function(t){function e(n){const r=n;return r&&(j.string(r.detail)||r.detail===void 0)&&(j.string(r.description)||r.description===void 0)}t.is=e})(K$||(K$={}));var V$;(function(t){function e(n){return{label:n}}t.create=e})(V$||(V$={}));var X$;
|
|
516
|
+
(function(t){function e(n,r){return{items:n||[],isIncomplete:!!r}}t.create=e})(X$||(X$={}));var Hf;(function(t){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=e;function n(r){const i=r;return j.string(i)||j.objectLiteral(i)&&j.string(i.language)&&j.string(i.value)}t.is=n})(Hf||(Hf={}));var Y$;(function(t){function e(n){let r=n;return!!r&&j.objectLiteral(r)&&(zu.is(r.contents)||Hf.is(r.contents)||j.typedArray(r.contents,Hf.is))&&(n.range===void 0||Ye.is(n.range))}t.
|
|
517
|
+
is=e})(Y$||(Y$={}));var J$;(function(t){function e(n,r){return r?{label:n,documentation:r}:{label:n}}t.create=e})(J$||(J$={}));var Q$;(function(t){function e(n,r,...i){let s={label:n};return j.defined(r)&&(s.documentation=r),j.defined(i)?s.parameters=i:s.parameters=[],s}t.create=e})(Q$||(Q$={}));var Z$;(function(t){t.Text=1,t.Read=2,t.Write=3})(Z$||(Z$={}));var eD;(function(t){function e(n,r){let i={range:n};return j.number(r)&&(i.kind=r),i}t.create=e})(eD||(eD={}));var Dr;(function(t){t.File=1,
|
|
518
|
+
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})(Dr||(Dr={}));var tD;(function(t){t.Deprecated=1})(tD||(tD={}));var nD;(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}
|
|
519
|
+
t.create=e})(nD||(nD={}));var rD;(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})(rD||(rD={}));var iD;(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&&j.string(i.name)&&j.number(i.kind)&&Ye.is(i.range)&&Ye.is(i.selectionRange)&&(i.detail===void 0||j.string(i.detail))&&(i.deprecated===void 0||
|
|
520
|
+
j.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}t.is=n})(iD||(iD={}));var sD;(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"})(sD||(sD={}));var Kf;(function(t){t.Invoked=1,t.Automatic=2})(Kf||(Kf={}));var oD;
|
|
521
|
+
(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 j.defined(i)&&j.typedArray(i.diagnostics,zf.is)&&(i.only===void 0||j.typedArray(i.only,j.string))&&(i.triggerKind===void 0||i.triggerKind===Kf.Invoked||i.triggerKind===Kf.Automatic)}t.is=n})(oD||(oD={}));var aD;(function(t){function e(r,i,s){let o={title:r},a=!0;return typeof i=="string"?(a=!1,o.kind=i):Ko.is(i)?o.command=i:o.edit=i,a&&s!==void 0&&(o.
|
|
522
|
+
kind=s),o}t.create=e;function n(r){let i=r;return i&&j.string(i.title)&&(i.diagnostics===void 0||j.typedArray(i.diagnostics,zf.is))&&(i.kind===void 0||j.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Ko.is(i.command))&&(i.isPreferred===void 0||j.boolean(i.isPreferred))&&(i.edit===void 0||Vg.is(i.edit))}t.is=n})(aD||(aD={}));var uD;(function(t){function e(r,i){let s={range:r};return j.defined(i)&&(s.data=i),s}t.create=e;function n(r){let i=r;return j.defined(i)&&Ye.is(
|
|
523
|
+
i.range)&&(j.undefined(i.command)||Ko.is(i.command))}t.is=n})(uD||(uD={}));var cD;(function(t){function e(r,i){return{tabSize:r,insertSpaces:i}}t.create=e;function n(r){let i=r;return j.defined(i)&&j.uinteger(i.tabSize)&&j.boolean(i.insertSpaces)}t.is=n})(cD||(cD={}));var lD;(function(t){function e(r,i,s){return{range:r,target:i,data:s}}t.create=e;function n(r){let i=r;return j.defined(i)&&Ye.is(i.range)&&(j.undefined(i.target)||j.string(i.target))}t.is=n})(lD||(lD={}));var dD;(function(t){function e(r,i){
|
|
524
|
+
return{range:r,parent:i}}t.create=e;function n(r){let i=r;return j.objectLiteral(i)&&Ye.is(i.range)&&(i.parent===void 0||t.is(i.parent))}t.is=n})(dD||(dD={}));var Be;(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\
|
|
525
|
+
yword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator"})(Be||(Be={}));var We;(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"})(We||(We={}));var fD;(function(t){function e(n){const r=n;return j.
|
|
526
|
+
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})(fD||(fD={}));var hD;(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)&&j.string(i.text)}t.is=n})(hD||(hD={}));var pD;(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)&&j.boolean(i.caseSensitiveLookup)&&
|
|
527
|
+
(j.string(i.variableName)||i.variableName===void 0)}t.is=n})(pD||(pD={}));var mD;(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)&&(j.string(i.expression)||i.expression===void 0)}t.is=n})(mD||(mD={}));var gD;(function(t){function e(r,i){return{frameId:r,stoppedLocation:i}}t.create=e;function n(r){const i=r;return j.defined(i)&&Ye.is(r.stoppedLocation)}t.is=n})(gD||(gD={}));var Jg;(function(t){t.Type=1,t.Parameter=2;function e(n){
|
|
528
|
+
return n===1||n===2}t.is=e})(Jg||(Jg={}));var Qg;(function(t){function e(r){return{value:r}}t.create=e;function n(r){const i=r;return j.objectLiteral(i)&&(i.tooltip===void 0||j.string(i.tooltip)||zu.is(i.tooltip))&&(i.location===void 0||Wf.is(i.location))&&(i.command===void 0||Ko.is(i.command))}t.is=n})(Qg||(Qg={}));var yD;(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 j.objectLiteral(i)&&ot.is(i.position)&&(j.
|
|
529
|
+
string(i.label)||j.typedArray(i.label,Qg.is))&&(i.kind===void 0||Jg.is(i.kind))&&i.textEdits===void 0||j.typedArray(i.textEdits,Bn.is)&&(i.tooltip===void 0||j.string(i.tooltip)||zu.is(i.tooltip))&&(i.paddingLeft===void 0||j.boolean(i.paddingLeft))&&(i.paddingRight===void 0||j.boolean(i.paddingRight))}t.is=n})(yD||(yD={}));var vD;(function(t){function e(n){return{kind:"snippet",value:n}}t.createSnippet=e})(vD||(vD={}));var wD;(function(t){function e(n,r,i,s){return{insertText:n,filterText:r,range:i,
|
|
530
|
+
command:s}}t.create=e})(wD||(wD={}));var bD;(function(t){function e(n){return{items:n}}t.create=e})(bD||(bD={}));var ED;(function(t){t.Invoked=0,t.Automatic=1})(ED||(ED={}));var $D;(function(t){function e(n,r){return{range:n,text:r}}t.create=e})($D||($D={}));var DD;(function(t){function e(n,r){return{triggerKind:n,selectedCompletionInfo:r}}t.create=e})(DD||(DD={}));var RD;(function(t){function e(n){const r=n;return j.objectLiteral(r)&&qg.is(r.uri)&&j.string(r.name)}t.is=e})(RD||(RD={}));var kD;(function(t){
|
|
531
|
+
function e(s,o,a,u){return new qq(s,o,a,u)}t.create=e;function n(s){let o=s;return!!(j.defined(o)&&j.string(o.uri)&&(j.undefined(o.languageId)||j.string(o.languageId))&&j.uinteger(o.lineCount)&&j.func(o.getText)&&j.func(o.positionAt)&&j.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),
|
|
532
|
+
h=s.offsetAt(f.range.end);if(h<=c)a=a.substring(0,d)+f.newText+a.substring(h,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}})(kD||(kD={}));let qq=class{constructor(e,n,r,i){this._uri=e,this._languageId=n,
|
|
533
|
+
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(
|
|
534
|
+
i);r=s==="\r"||s===`
|
|
535
|
+
`,s==="\r"&&i+1<n.length&&n.charAt(i+1)===`
|
|
536
|
+
`&&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 ot.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 ot.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.
|
|
537
|
+
max(Math.min(r+e.character,i),r)}get lineCount(){return this.getLineOffsets().length}};var j;(function(t){const e=Object.prototype.toString;function n(h){return typeof h<"u"}t.defined=n;function r(h){return typeof h>"u"}t.undefined=r;function i(h){return h===!0||h===!1}t.boolean=i;function s(h){return e.call(h)==="[object String]"}t.string=s;function o(h){return e.call(h)==="[object Number]"}t.number=o;function a(h,p,w){return e.call(h)==="[object Number]"&&p<=h&&h<=w}t.numberRange=a;function u(h){
|
|
538
|
+
return e.call(h)==="[object Number]"&&-2147483648<=h&&h<=2147483647}t.integer=u;function c(h){return e.call(h)==="[object Number]"&&0<=h&&h<=2147483647}t.uinteger=c;function l(h){return e.call(h)==="[object Function]"}t.func=l;function f(h){return h!==null&&typeof h=="object"}t.objectLiteral=f;function d(h,p){return Array.isArray(h)&&h.every(p)}t.typedArray=d})(j||(j={}));class jq{constructor(){this.nodeStack=[]}get current(){var e;return(e=this.nodeStack[this.nodeStack.length-1])!==null&&e!==void 0?
|
|
539
|
+
e:this.rootNode}buildRootNode(e){return this.rootNode=new CD(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){const n=new ey;return n.grammarSource=e,n.root=this.rootNode,this.current.content.push(n),this.nodeStack.push(n),n}buildLeafNode(e,n){const r=new Zg(e.startOffset,e.image.length,pm(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(
|
|
540
|
+
e);r>=0&&n.content.splice(r,1)}}addHiddenNodes(e){const n=[];for(const s of e){const o=new Zg(s.startOffset,s.image.length,pm(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=
|
|
541
|
+
e),e.$cstNode=n;const r=this.nodeStack.pop();r?.content.length===0&&this.removeNode(r)}}class TD{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(){
|
|
542
|
+
return this.root.fullText.substring(this.offset,this.end)}}class Zg extends TD{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 ey extends TD{constructor(){super(...arguments),this.content=new Dw(this)}get children(){return this.
|
|
543
|
+
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.
|
|
544
|
+
_rangeCache}else return{start:ot.create(0,0),end:ot.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 Dw extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,Dw.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.
|
|
545
|
+
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 CD extends ey{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}}const ty=Symbol("Datatype");function ny(t){return t.$type===ty}const AD="\u200B",SD=t=>t.endsWith(AD)?t:t+AD;class _D{constructor(e){this._unorderedGroups=new Map,this.allRules=
|
|
546
|
+
new Map,this.lexer=e.parser.Lexer;const n=this.lexer.definition,r=e.LanguageMetaData.mode==="production";this.wrapper=new Hq(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.
|
|
547
|
+
IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}}class Gq extends _D{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new jq,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(SD(
|
|
548
|
+
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(nf(e))return ty;{const n=Ts(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,
|
|
549
|
+
{});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===ty&&(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;
|
|
550
|
+
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=Mr(r)?i.image:this.converter.convert(i.image,o);this.assign(a.operator,a.feature,l,o,u)}else if(ny(c)){let l=i.
|
|
551
|
+
image;Mr(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.
|
|
552
|
+
operator,i.feature,e,r,s);else if(!i){const o=this.current;if(ny(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=
|
|
553
|
+
e}}construct(){if(this.isRecording())return;const e=this.current;return Tm(e),this.nodeBuilder.construct(e),this.stack.pop(),ny(e)?this.converter.convert(e.value,e.$cstNode):(Am(this.astReflection,e),e)}getAssignment(e){if(!this.assignmentMap.has(e)){const n=Wn(e,Lr);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"=":{
|
|
554
|
+
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 Uq{buildMismatchTokenMessage(e){return Wo.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return Wo.buildNotAllInputParsedMessage(
|
|
555
|
+
e)}buildNoViableAltMessage(e){return Wo.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return Wo.buildEarlyExitMessage(e)}}class PD extends Uq{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 Wq extends _D{constructor(){
|
|
556
|
+
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(SD(e.name),this.startImplementation(
|
|
557
|
+
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){
|
|
558
|
+
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 zq={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new PD};
|
|
559
|
+
class Hq extends ZB{constructor(e,n){const r=n&&"maxLookahead"in n;super(e,Object.assign(Object.assign(Object.assign({},zq),{lookaheadStrategy:r?new Pg({maxLookahead:n.maxLookahead}):new bq({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){
|
|
560
|
+
this.option(e,n)}wrapMany(e,n){this.many(e,n)}wrapAtLeastOne(e,n){this.atLeastOne(e,n)}}function xD(t,e,n){return Kq({parser:e,tokens:n,ruleNames:new Map},t),e}function Kq(t,e){const n=Nm(e,!1),r=Xe(e.rules).filter(fn).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,Fs(s,i.definition))}}function Fs(t,e,n=!1){let r;if(Mr(e))r=ej(t,e);else if(ks(e))r=Vq(t,e);else if(Lr(e))r=Fs(t,e.terminal);else if(au(e))
|
|
561
|
+
r=ND(t,e);else if(ti(e))r=Xq(t,e);else if(Rm(e))r=Jq(t,e);else if(km(e))r=Qq(t,e);else if(Ui(e))r=Zq(t,e);else if(G1(e)){const i=t.consume++;r=()=>t.parser.consume(i,Ki,e)}else throw new Lb(e.$cstNode,`Unexpected element type: ${e.$type}`);return ID(t,n?void 0:Vf(e),r,e.cardinality)}function Vq(t,e){const n=Du(e);return()=>t.parser.action(n,e)}function Xq(t,e){const n=e.rule.ref;if(fn(n)){const r=t.subrule++,i=n.fragment,s=e.arguments.length>0?Yq(n,e.arguments):()=>({});return o=>t.parser.subrule(
|
|
562
|
+
r,OD(t,n),i,e,s(o))}else if(ei(n)){const r=t.consume++,i=ry(t,n.name);return()=>t.parser.consume(r,i,e)}else if(n)ja();else throw new Lb(e.$cstNode,`Undefined rule: ${e.rule.$refText}`)}function Yq(t,e){const n=e.map(r=>li(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 li(t){if(O1(t)){const e=li(t.left),n=li(t.right);return r=>e(r)||n(r)}else if(I1(t)){const e=li(t.left),n=li(t.right);return r=>e(r)&&n(r)}else if(F1(t)){
|
|
563
|
+
const e=li(t.value);return n=>!e(n)}else if(L1(t)){const e=t.parameter.ref.name;return n=>n!==void 0&&n[e]===!0}else if(N1(t)){const e=!!t.true;return()=>e}ja()}function Jq(t,e){if(e.elements.length===1)return Fs(t,e.elements[0]);{const n=[];for(const i of e.elements){const s={ALT:Fs(t,i,!0)},o=Vf(i);o&&(s.GATE=li(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 Qq(t,e){if(e.elements.length===1)
|
|
564
|
+
return Fs(t,e.elements[0]);const n=[];for(const a of e.elements){const u={ALT:Fs(t,a,!0)},c=Vf(a);c&&(u.GATE=li(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 h=i(r,f);f.unorderedGroups.get(h)||f.unorderedGroups.set(h,[]);const p=f.unorderedGroups.get(h);typeof p?.[c]>"u"&&(p[c]=!0)}};const d=u.GATE;return d?l.GATE=()=>d(a):
|
|
565
|
+
l.GATE=()=>{const h=f.unorderedGroups.get(i(r,f));return!h?.[c]},l})),o=ID(t,Vf(e),s,"*");return a=>{o(a),t.parser.isRecording()||t.parser.unorderedGroups.delete(i(r,t.parser))}}function Zq(t,e){const n=e.elements.map(r=>Fs(t,r));return r=>n.forEach(i=>i(r))}function Vf(t){if(Ui(t))return t.guardCondition}function ND(t,e,n=e.terminal){if(n)if(ti(n)&&fn(n.rule.ref)){const r=n.rule.ref,i=t.subrule++;return s=>t.parser.subrule(i,OD(t,r),!1,e,s)}else if(ti(n)&&ei(n.rule.ref)){const r=t.consume++,i=ry(
|
|
566
|
+
t,n.rule.ref.name);return()=>t.parser.consume(r,i,e)}else if(Mr(n)){const r=t.consume++,i=ry(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=Mm(e.type.ref),i=r?.terminal;if(!i)throw new Error("Could not find name assignment for type: "+Du(e.type.ref));return ND(t,e,i)}}function ej(t,e){const n=t.consume++,r=t.tokens[e.value];if(!r)throw new Error(
|
|
567
|
+
"Could not find token for keyword: "+e.value);return()=>t.parser.consume(n,r,e)}function ID(t,e,n,r){const i=e&&li(e);if(!r)if(i){const s=t.or++;return o=>t.parser.alternatives(s,[{ALT:()=>n(o),GATE:()=>i(o)},{ALT:g$(),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:g$(),
|
|
568
|
+
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 ja()}function OD(t,e){const n=tj(t,e),r=t.parser.getRule(n);if(!r)throw new Error(`Rule "${n}" not found."`);return r}function tj(t,e){if(fn(e))return e.name;if(t.ruleNames.has(e))return t.ruleNames.get(e);{let n=e,r=n.$container,i=e.$type;for(;!fn(r);)(Ui(r)||Rm(r)||km(r))&&(i=r.elements.indexOf(n).toString()+":"+i),
|
|
569
|
+
n=r,r=r.$container;return i=r.name+":"+i,t.ruleNames.set(e,i),i}}function ry(t,e){const n=t.tokens[e];if(!n)throw new Error(`Token "${e}" not found."`);return n}function nj(t){const e=t.Grammar,n=t.parser.Lexer,r=new Wq(t);return xD(e,r,n.definition),r.finalize(),r}function rj(t){const e=ij(t);return e.finalize(),e}function ij(t){const e=t.Grammar,n=t.parser.Lexer,r=new Gq(t);return xD(e,r,n.definition)}class sj{constructor(){this.diagnostics=[]}buildTokens(e,n){const r=Xe(Nm(e,!1)),i=this.buildTerminalTokens(
|
|
570
|
+
r),s=this.buildKeywordTokens(r,i,n);return i.forEach(o=>{const a=o.PATTERN;typeof a=="object"&&a&&"test"in a&&xm(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(ei).filter(n=>!n.fragment).map(n=>this.buildTerminalToken(n)).toArray()}buildTerminalToken(e){const n=Ru(e),r=this.requiresCustomPattern(n)?this.regexPatternFunction(n):n,i={name:e.
|
|
571
|
+
name,PATTERN:r};return typeof r=="function"&&(i.LINE_BREAKS=!0),e.hidden&&(i.GROUP=xm(n)?Mn.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(fn).flatMap(i=>qr(i).filter(Mr)).distinct(i=>i.value).toArray().sort((i,s)=>s.value.length-i.value.length).map(i=>this.
|
|
572
|
+
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(rN(e.value)):e.value}findLongerAlt(e,n){return n.reduce((r,i)=>{const s=i?.PATTERN;return s?.source&&iN("^"+s.source+"$",e.value)&&r.push(i),r},[])}}class oj{convert(e,n){let r=n.grammarSource;if(au(r)&&(r=Im(r)),ti(r)){const i=r.rule.
|
|
573
|
+
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 di.convertInt(n);case"STRING":return di.convertString(n);case"ID":return di.convertID(n)}switch((i=i0(e))===null||i===void 0?void 0:i.toLowerCase()){case"number":return di.convertNumber(n);case"boolean":return di.convertBoolean(n);case"bigint":return di.convertBigint(n);case"date":return di.convertDate(n);default:return n}}}
|
|
574
|
+
var di;(function(t){function e(c){let l="";for(let f=1;f<c.length-1;f++){const d=c.charAt(f);if(d==="\\"){const h=c.charAt(++f);l+=n(h)}else l+=d}return l}t.convertString=e;function n(c){switch(c){case"b":return"\b";case"f":return"\f";case"n":return`
|
|
575
|
+
`;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})(di||(di={}));var Ls={},Xf={},FD;function Ms(){if(FD)return Xf;FD=1,Object.
|
|
576
|
+
defineProperty(Xf,"__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={})),Xf.default=e,Xf}var un={},LD;function Hu(){if(LD)return un;LD=1,Object.defineProperty(un,"__esModule",{value:!0}),un.stringArray=un.array=un.func=un.error=un.number=un.string=un.boolean=void 0;function t(a){return a===!0||a===
|
|
577
|
+
!1}un.boolean=t;function e(a){return typeof a=="string"||a instanceof String}un.string=e;function n(a){return typeof a=="number"||a instanceof Number}un.number=n;function r(a){return a instanceof Error}un.error=r;function i(a){return typeof a=="function"}un.func=i;function s(a){return Array.isArray(a)}un.array=s;function o(a){return s(a)&&a.every(u=>e(u))}return un.stringArray=o,un}var Bs={},MD;function Xo(){if(MD)return Bs;MD=1,Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.Emitter=Bs.Event=
|
|
578
|
+
void 0;const t=Ms();var e;(function(i){const s={dispose(){}};i.None=function(){return s}})(e||(Bs.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);
|
|
579
|
+
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(){
|
|
580
|
+
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&&
|
|
581
|
+
this._callbacks.invoke.call(this._callbacks,s)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}return Bs.Emitter=r,r._noop=function(){},Bs}var BD;function Yf(){if(BD)return Ls;BD=1,Object.defineProperty(Ls,"__esModule",{value:!0}),Ls.CancellationTokenSource=Ls.CancellationToken=void 0;const t=Ms(),e=Hu(),n=Xo();var r;(function(a){a.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.Event.None}),a.Cancelled=Object.freeze({isCancellationRequested:!0,
|
|
582
|
+
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||(Ls.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(){
|
|
583
|
+
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 Ls.CancellationTokenSource=o,Ls}var ht=Yf();
|
|
584
|
+
function aj(){return new Promise(t=>{typeof setImmediate>"u"?setTimeout(t,0):setImmediate(t)})}let Jf=0,uj=10;function cj(){return Jf=performance.now(),new ht.CancellationTokenSource}const Qf=Symbol("OperationCancelled");function Zf(t){return t===Qf}async function jt(t){if(t===ht.CancellationToken.None)return;const e=performance.now();if(e-Jf>=uj&&(Jf=e,await aj(),Jf=performance.now()),t.isCancellationRequested)throw Qf}class iy{constructor(){this.promise=new Promise((e,n)=>{this.resolve=r=>(e(r),
|
|
585
|
+
this),this.reject=r=>(n(r),this)})}}class Cd{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(Cd.isIncremental(r)){const i=GD(r.range),s=this.offsetAt(i.start),o=this.offsetAt(i.
|
|
586
|
+
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=qD(r.text,!1,s);if(u-a===l.length)for(let d=0,h=l.length;d<h;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,h=c.length;d<h;d++)c[d]=c[d]+f}else if(Cd.isFull(r))this._content=r.text,
|
|
587
|
+
this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=qD(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.
|
|
588
|
+
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&&jD(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||
|
|
589
|
+
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 eh;(function(t){function e(i,s,o,a){return new Cd(i,s,o,a)}t.create=e;function n(i,s,o){if(i instanceof Cd)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=sy(s.map(lj),(l,f)=>{const d=l.range.start.line-f.range.start.line;return d===0?l.range.
|
|
590
|
+
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})(eh||(eh={}));function sy(t,e){if(t.length<=1)return t;const n=t.length/2|0,r=t.slice(0,n),i=t.slice(n);sy(r,e),sy(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++]=
|
|
591
|
+
i[o++];for(;s<r.length;)t[a++]=r[s++];for(;o<i.length;)t[a++]=i[o++];return t}function qD(t,e,n=0){const r=e?[n]:[];for(let i=0;i<t.length;i++){const s=t.charCodeAt(i);jD(s)&&(s===13&&i+1<t.length&&t.charCodeAt(i+1)===10&&i++,r.push(n+i+1))}return r}function jD(t){return t===13||t===10}function GD(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 lj(t){const e=GD(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var UD;(()=>{
|
|
592
|
+
var t={975:B=>{function T(S){if(typeof S!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(S))}function R(S,P){for(var O,Q="",z=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(Q.length<2||z!==2||Q.charCodeAt(Q.length-1)!==46||Q.charCodeAt(Q.length-2)!==46){if(Q.length>2){var xe=Q.lastIndexOf("/");if(xe!==Q.length-1){xe===-1?(Q="",z=0):z=(Q=Q.slice(0,xe)).length-
|
|
593
|
+
1-Q.lastIndexOf("/"),C=ye,ne=0;continue}}else if(Q.length===2||Q.length===1){Q="",z=0,C=ye,ne=0;continue}}P&&(Q.length>0?Q+="/..":Q="..",z=2)}else Q.length>0?Q+="/"+S.slice(C+1,ye):Q=S.slice(C+1,ye),z=ye-C-1;C=ye,ne=0}else O===46&&ne!==-1?++ne:ne=-1}return Q}var M={resolve:function(){for(var S,P="",O=!1,Q=arguments.length-1;Q>=-1&&!O;Q--){var z;Q>=0?z=arguments[Q]:(S===void 0&&(S=process.cwd()),z=S),T(z),z.length!==0&&(P=z+"/"+P,O=z.charCodeAt(0)===47)}return P=R(P,!O),O?P.length>0?"/"+P:"/":P.length>
|
|
594
|
+
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=R(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=
|
|
595
|
+
M.resolve(S))===(P=M.resolve(P)))return"";for(var O=1;O<S.length&&S.charCodeAt(O)===47;++O);for(var Q=S.length,z=Q-O,C=1;C<P.length&&P.charCodeAt(C)===47;++C);for(var ne=P.length-C,ye=z<ne?z:ne,xe=-1,L=0;L<=ye;++L){if(L===ye){if(ne>ye){if(P.charCodeAt(C+L)===47)return P.slice(C+L+1);if(L===0)return P.slice(C+L)}else z>ye&&(S.charCodeAt(O+L)===47?xe=L:L===0&&(xe=0));break}var H=S.charCodeAt(O+L);if(H!==P.charCodeAt(C+L))break;H===47&&(xe=L)}var Se="";for(L=O+xe+1;L<=Q;++L)L!==Q&&S.charCodeAt(L)!==
|
|
596
|
+
47||(Se.length===0?Se+="..":Se+="/..");return Se.length>0?Se+P.slice(C+xe):(C+=xe,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,Q=-1,z=!0,C=S.length-1;C>=1;--C)if((P=S.charCodeAt(C))===47){if(!z){Q=C;break}}else z=!1;return Q===-1?O?"/":".":O&&Q===1?"//":S.slice(0,Q)},basename:function(S,P){if(P!==void 0&&typeof P!="string")throw new TypeError('"ext" argument must be a string');T(S);var O,
|
|
597
|
+
Q=0,z=-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 xe=S.charCodeAt(O);if(xe===47){if(!C){Q=O+1;break}}else ye===-1&&(C=!1,ye=O+1),ne>=0&&(xe===P.charCodeAt(ne)?--ne==-1&&(z=O):(ne=-1,z=ye))}return Q===z?z=ye:z===-1&&(z=S.length),S.slice(Q,z)}for(O=S.length-1;O>=0;--O)if(S.charCodeAt(O)===47){if(!C){Q=O+1;break}}else z===-1&&(C=!1,z=O+1);return z===-1?"":S.slice(Q,z)},extname:function(S){T(S);for(var P=-1,
|
|
598
|
+
O=0,Q=-1,z=!0,C=0,ne=S.length-1;ne>=0;--ne){var ye=S.charCodeAt(ne);if(ye!==47)Q===-1&&(z=!1,Q=ne+1),ye===46?P===-1?P=ne:C!==1&&(C=1):P!==-1&&(C=-1);else if(!z){O=ne+1;break}}return P===-1||Q===-1||C===0||C===1&&P===Q-1&&P===O+1?"":S.slice(P,Q)},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 Q=O.dir||O.root,z=O.base||(O.name||"")+(O.ext||"");return Q?Q===O.root?Q+z:Q+"/"+
|
|
599
|
+
z:z}(0,S)},parse:function(S){T(S);var P={root:"",dir:"",base:"",ext:"",name:""};if(S.length===0)return P;var O,Q=S.charCodeAt(0),z=Q===47;z?(P.root="/",O=1):O=0;for(var C=-1,ne=0,ye=-1,xe=!0,L=S.length-1,H=0;L>=O;--L)if((Q=S.charCodeAt(L))!==47)ye===-1&&(xe=!1,ye=L+1),Q===46?C===-1?C=L:H!==1&&(H=1):C!==-1&&(H=-1);else if(!xe){ne=L+1;break}return C===-1||ye===-1||H===0||H===1&&C===ye-1&&C===ne+1?ye!==-1&&(P.base=P.name=ne===0&&z?S.slice(1,ye):S.slice(ne,ye)):(ne===0&&z?(P.name=S.slice(1,C),P.base=
|
|
600
|
+
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):z&&(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 R=e[B]={exports:{}};return t[B](R,R.exports,n),R.exports}n.d=(B,T)=>{for(var R in T)n.o(T,R)&&!n.o(B,R)&&Object.defineProperty(B,R,{enumerable:!0,get:T[R]})},n.o=(B,T)=>Object.prototype.hasOwnProperty.call(B,T),n.r=B=>{typeof Symbol<"u"&&Symbol.
|
|
601
|
+
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.
|
|
602
|
+
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 ("//")')}}
|
|
603
|
+
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,R,M,S,P,O=!1){typeof T=="object"?(this.scheme=T.scheme||c,this.authority=T.authority||c,this.path=
|
|
604
|
+
T.path||c,this.query=T.query||c,this.fragment=T.fragment||c):(this.scheme=function(Q,z){return Q||z?Q:"file"}(T,O),this.authority=R||c,this.path=function(Q,z){switch(Q){case"https":case"http":case"file":z?z[0]!==l&&(z=l+z):z=l}return z}(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:R,authority:M,path:S,query:P,fragment:O}=T;return R===void 0?R=this.scheme:R===null&&(R=c),M===void 0?M=this.authority:M===null&&(M=c),
|
|
605
|
+
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),R===this.scheme&&M===this.authority&&S===this.path&&P===this.query&&O===this.fragment?this:new p(R,M,S,P,O)}static parse(T,R=!1){const M=f.exec(T);return M?new p(M[2]||c,V(M[4]||c),V(M[5]||c),V(M[7]||c),V(M[9]||c),R):new p(c,c,c,c,c)}static file(T){let R=c;if(i&&(T=T.replace(/\\/g,l)),T[0]===l&&T[1]===l){const M=T.indexOf(l,2);M===-1?(R=T.substring(2),T=l):(R=T.substring(2,M),
|
|
606
|
+
T=T.substring(M)||l)}return new p("file",R,T,c,c)}static from(T){const R=new p(T.scheme,T.authority,T.path,T.query,T.fragment);return u(R,!0),R}toString(T=!1){return D(this,T)}toJSON(){return this}static revive(T){if(T){if(T instanceof d)return T;{const R=new p(T);return R._formatted=T.external,R._fsPath=T._sep===h?T.fsPath:null,R}}return T}}const h=i?1:void 0;class p extends d{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=E(this)),this._fsPath}toString(T=!1){return T?
|
|
607
|
+
D(this,!0):(this._formatted||(this._formatted=D(this,!1)),this._formatted)}toJSON(){const T={$mid:1};return this._fsPath&&(T.fsPath=this._fsPath,T._sep=h),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 w={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"\
|
|
608
|
+
%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function v(B,T,R){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||R&&O===91||R&&O===93||R&&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 Q=w[O];Q!==void 0?(S!==-1&&(M+=encodeURIComponent(B.substring(S,P)),S=-1),M+=Q):S===-1&&(S=P)}}return S!==
|
|
609
|
+
-1&&(M+=encodeURIComponent(B.substring(S))),M!==void 0?M:B}function g(B){let T;for(let R=0;R<B.length;R++){const M=B.charCodeAt(R);M===35||M===63?(T===void 0&&(T=B.substr(0,R)),T+=w[M]):T!==void 0&&(T+=B[R])}return T!==void 0?T:B}function E(B,T){let R;return R=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].
|
|
610
|
+
toLowerCase()+B.path.substr(2):B.path,i&&(R=R.replace(/\//g,"\\")),R}function D(B,T){const R=T?g:v;let M="",{scheme:S,authority:P,path:O,query:Q,fragment:z}=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+=R(ne,!1,!1):(M+=R(ne.substr(0,C),!1,!1),M+=":",M+=R(ne.substr(C+1),!1,!0)),M+="@"}P=P.toLowerCase(),C=P.lastIndexOf(":"),C===-1?M+=R(P,!1,!0):(M+=R(P.substr(0,C),!1,!0),M+=P.substr(C))}if(O){
|
|
611
|
+
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+=R(O,!0,!1)}return Q&&(M+="?",M+=R(Q,!1,!1)),z&&(M+="#",M+=T?z:v(z,!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;
|
|
612
|
+
function V(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,...R){return T.with({path:se.join(T.path,...R)})},B.resolvePath=function(T,...R){let M=T.path,S=!1;M[0]!==ie&&(M=ie+M,S=!0);let P=se.resolve(M,...R);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 R=se.dirname(T.path);return R.length===1&&R.charCodeAt(0)===46&&(R=""),T.
|
|
613
|
+
with({path:R})},B.basename=function(T){return se.basename(T.path)},B.extname=function(T){return se.extname(T.path)}})(we||(we={})),UD=r})();const{URI:yt,Utils:Ku}=UD;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"?yt.parse(
|
|
614
|
+
s).path:s.path,u=typeof o=="string"?yt.parse(o).path:o.path,c=a.split("/").filter(p=>p.length>0),l=u.split("/").filter(p=>p.length>0);if(e){const p=/^[A-Z]:$/;if(c[0]&&p.test(c[0])&&(c[0]=c[0].toLowerCase()),l[0]&&p.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),h=l.slice(f).join("/");return d+h}t.relative=r;function i(s){return yt.parse(s.toString()).toString()}t.normalize=i})(pt||(pt={}));var je;
|
|
615
|
+
(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"})(je||(je={}));class dj{constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,n=ht.CancellationToken.None){const r=await this.fileSystemProvider.readFile(
|
|
616
|
+
e);return this.createAsync(e,r,n)}fromTextDocument(e,n,r){return n=n??yt.parse(e.uri),ht.CancellationToken.is(r)?this.createAsync(n,e,r):this.create(n,e,r)}fromString(e,n,r){return ht.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.
|
|
617
|
+
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:je.Parsed,references:[],textDocument:r};else{const o=this.createTextDocumentGetter(n,i);s={parseResult:e,
|
|
618
|
+
uri:n,state:je.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!==
|
|
619
|
+
a&&(e.parseResult=await this.parseAsync(e.uri,a,n),e.parseResult.value.$document=e),e.state=je.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=eh.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,n??""))}}class WD{constructor(e){this.documentMap=new Map,this.langiumDocumentFactory=
|
|
620
|
+
e.workspace.LangiumDocumentFactory,this.serviceRegistry=e.ServiceRegistry}get all(){return Xe(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){
|
|
621
|
+
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=je.Changed,r.precomputedScopes=void 0,r.diagnostics=void 0),r}deleteDocument(e){const n=e.toString(),r=this.documentMap.
|
|
622
|
+
get(n);return r&&(r.state=je.Changed,this.documentMap.delete(n)),r}}const oy=Symbol("ref_resolving");class fj{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=ht.CancellationToken.None){for(const r of ni(e.parseResult.value))await jt(n),Xd(r).forEach(i=>this.doLink(i,e))}doLink(e,n){var r;const i=e.reference;if(i._ref===void 0){
|
|
623
|
+
i._ref=oy;try{const s=this.getCandidate(e);if(Fd(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.
|
|
624
|
+
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(kt(this._ref))return this._ref;if(D1(this._nodeDescription)){const u=s.loadAstNode(this._nodeDescription);this._ref=u??s.createLinkingError({reference:o,container:e,property:n},this._nodeDescription)}else if(this.
|
|
625
|
+
_ref===void 0){this._ref=oy;const u=Vd(e).$document,c=s.getLinkedNode({reference:o,container:e,property:n});if(c.error&&u&&u.state<je.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===oy)throw new Error(`Cyclic reference resolution detected: ${s.astNodeLocator.getAstNodePath(e)}/${n} (symbol '${i}')`);return kt(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},
|
|
626
|
+
get error(){return Fd(this._ref)?this._ref:void 0}};return o}getLinkedNode(e){var n;try{const r=this.getCandidate(e);if(Fd(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 \
|
|
627
|
+
'${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=Vd(e.container).$document;r&&r.state<je.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\
|
|
628
|
+
ot resolve reference to ${i} named '${e.reference.$refText}'.`,targetDescription:n})}}function th(t){return typeof t.name=="string"}class zD{getName(e){if(th(e))return e.name}getNameNode(e){return hn(e.$cstNode,"name")}}class hj{constructor(e){this.nameProvider=e.references.NameProvider,this.index=e.shared.workspace.IndexManager,this.nodeLocator=e.workspace.AstNodeLocator}findDeclaration(e){if(e){const n=Qb(e),r=e.astNode;if(n&&r){const i=r[n.feature];if(ir(i))return i.ref;if(Array.isArray(i)){for(const s of i)
|
|
629
|
+
if(ir(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||T1(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&&
|
|
630
|
+
(i=i.filter(s=>pt.equals(s.sourceUri,n.documentUri))),r.push(...i),Xe(r)}getReferenceToSelf(e){const n=this.nameProvider.getNameNode(e);if(n){const r=at(e),i=this.nodeLocator.getAstNodePath(e);return{sourceUri:r.uri,sourcePath:i,targetUri:r.uri,targetPath:i,segment:Bd(n),local:!0}}}}class qs{constructor(e){if(this.map=new Map,e)for(const[n,r]of e)this.add(n,r)}get size(){return hm.sum(Xe(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,n){if(n===void 0)return this.map.delete(
|
|
631
|
+
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.
|
|
632
|
+
forEach(i=>e(i,r,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return Xe(this.map.entries()).flatMap(([e,n])=>n.map(r=>[e,r]))}keys(){return Xe(this.map.keys())}values(){return Xe(this.map.values()).flat()}entriesGroupedByKey(){return Xe(this.map.entries())}}class HD{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.
|
|
633
|
+
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 KD{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async computeExports(e,n=ht.CancellationToken.None){return this.computeExportsForNode(e.parseResult.value,e,void 0,n)}async computeExportsForNode(e,n,r=bu,i=ht.CancellationToken.None){
|
|
634
|
+
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=ht.CancellationToken.None){const r=e.parseResult.value,i=new qs;for(const s of qr(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,
|
|
635
|
+
n))}}}class js{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 VD{constructor(e,n,r){var i;this.
|
|
636
|
+
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=Xe(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}}const pj={getElement(){},
|
|
637
|
+
getAllElements(){return qa}};class XD{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 mj extends XD{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,
|
|
638
|
+
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 gj extends XD{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();
|
|
639
|
+
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 nh extends mj{constructor(e,n){super(),n?(this.toDispose.push(e.workspace.DocumentBuilder.
|
|
640
|
+
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 YD{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 nh(e.shared)}getScope(e){const n=[],r=this.reflection.
|
|
641
|
+
getReferenceType(e),i=at(e.container).precomputedScopes;if(i){let o=e.container;do{const a=i.get(o);a.length>0&&n.push(Xe(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 js(Xe(e),n,r)}createScopeForNodes(e,n,r){const i=Xe(e).map(s=>{const o=this.nameProvider.getName(s);if(o)return this.descriptions.createDescription(s,o)}).nonNullable();return new js(
|
|
642
|
+
i,n,r)}getGlobalScope(e,n){return this.globalScopeCache.get(e,()=>new VD(this.indexManager.allElements(e)))}}function yj(t){return typeof t.$comment=="string"}function JD(t){return typeof t=="object"&&!!t&&("$ref"in t||"$error"in t)}class vj{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.
|
|
643
|
+
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=at(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(ir(n)){const d=n.ref,h=r?n.$refText:
|
|
644
|
+
void 0;if(d){const p=at(d);let w="";this.currentDocument&&this.currentDocument!==p&&(a?w=a(p.uri,n):w=p.uri.toString());const v=this.astNodeLocator.getAstNodePath(d);return{$ref:`${w}#${v}`,$refText:h}}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:h}}else if(kt(n)){let d;if(s&&(d=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},n)),(!e||n.$document)&&d?.$textRegion&&(d.$textRegion.documentURI=(l=this.currentDocument)===
|
|
645
|
+
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 h=this.commentProvider.getComment(n);h&&(d.$comment=h.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(
|
|
646
|
+
"$")).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];JD(f)?c[l]=this.reviveReference(e,u,n,f,r):kt(f)&&this.linkNode(f,n,r,e,u,l)}else JD(c)?e[u]=this.reviveReference(e,u,n,c,r):kt(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.
|
|
647
|
+
getRefNode(r,i.$ref,s.uriConverter);if(kt(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):yt.parse(n),c=this.langiumDocuments.getDocument(u);return c?c.parseResult.value:"Could not find document\
|
|
648
|
+
for URI: "+n}const s=r?r(n.substring(0,i)):yt.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 wj{get map(){return this.fileExtensionMap}constructor(e){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.textDocuments=e?.workspace.
|
|
649
|
+
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\
|
|
650
|
+
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){
|
|
651
|
+
try{return this.getServices(e),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}}function Vu(t){return{code:t}}var rh;(function(t){t.all=["fast","slow","built-in"]})(rh||(rh={}));class bj{constructor(e){this.entries=new qs,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(
|
|
652
|
+
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 ja()}}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(Zf(s))throw s;console.error(`${n}:`,s),s instanceof
|
|
653
|
+
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=Xe(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\
|
|
654
|
+
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 Ej{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData}async validateDocument(e,n={},r=ht.
|
|
655
|
+
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)===Rr.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)===Rr.ParsingError}))||(this.processLinkingErrors(e,s,n),n.stopAfterLinkingErrors&&s.some(o=>{var a;return((a=
|
|
656
|
+
o.data)===null||a===void 0?void 0:a.code)===Rr.LinkingError}))))return s;try{s.push(...await this.validateAst(i.value,n,r))}catch(o){if(Zf(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:ay(c),range:{start:{line:u.line-1,character:u.
|
|
657
|
+
column-1},end:{line:u.line-1,character:u.column+u.length-1}},message:u.message,data:Dj(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=pm(i.token);if(s){const o={severity:ay("error"),range:s,message:i.message,data:Vu(
|
|
658
|
+
Rr.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:Rr.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=ht.CancellationToken.None){const i=[],s=(o,a,u)=>{i.push(this.toDiagnostic(o,a,u))};return await this.validateAstBefore(e,n,
|
|
659
|
+
s,r),await this.validateAstNodes(e,n,s,r),await this.validateAstAfter(e,n,s,r),i}async validateAstBefore(e,n,r,i=ht.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=ht.CancellationToken.None){await Promise.all(ni(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=ht.
|
|
660
|
+
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:$j(r),severity:ay(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 $j(t){if(t.range)return t.range;let e;return typeof t.property=="string"?e=hn(t.node.$cstNode,
|
|
661
|
+
t.property,t.index):typeof t.keyword=="string"&&(e=$u(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 ay(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 Dj(t){switch(t){case"error":return Vu(Rr.LexingError);case"warning":return Vu(Rr.LexingWarning);case"info":return Vu(Rr.LexingInfo);case"hint":return Vu(
|
|
662
|
+
Rr.LexingHint);default:throw new Error("Invalid diagnostic severity: "+t)}}var Rr;(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"})(Rr||(Rr={}));class QD{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,n,r){const i=r??at(e);n??(n=this.nameProvider.getName(e));const s=this.astNodeLocator.
|
|
663
|
+
getAstNodePath(e);if(!n)throw new Error(`Node at path ${s} has no name.`);let o;const a=()=>{var u;return o??(o=Bd((u=this.nameProvider.getNameNode(e))!==null&&u!==void 0?u:e.$cstNode))};return{node:e,name:n,get nameSegment(){return a()},selectionSegment:Bd(e.$cstNode),type:e.$type,documentUri:i.uri,path:s}}}class Rj{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,n=ht.CancellationToken.None){const r=[],i=e.parseResult.value;for(const s of ni(i))await jt(n),
|
|
664
|
+
Xd(s).filter(o=>!Fd(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=at(e.container).uri;return{sourceUri:i,sourcePath:this.nodeLocator.getAstNodePath(e.container),targetUri:n.documentUri,targetPath:n.path,segment:Bd(r),local:pt.equals(n.documentUri,i)}}}class kj{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){const n=this.
|
|
665
|
+
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)}}
|
|
666
|
+
var Tj=Xo();class Cj{constructor(e){this._ready=new iy,this.settings={},this.workspaceConfig=!1,this.onConfigurationSectionUpdateEmitter=new Tj.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.
|
|
667
|
+
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){
|
|
668
|
+
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 Gs;(function(t){function e(n){return{dispose:async()=>await n()}}t.create=e})(Gs||(Gs={}));class Aj{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new qs,
|
|
669
|
+
this.documentPhaseListeners=new qs,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=je.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=ht.CancellationToken.None){var i,s;for(const o of e){const a=o.uri.toString();if(o.state===je.Validated){if(typeof n.
|
|
670
|
+
validation=="boolean"&&n.validation)o.state=je.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:rh.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=je.
|
|
671
|
+
IndexedReferences)}}}else this.buildState.delete(a)}this.currentState=je.Changed,await this.emitUpdate(e.map(o=>o.uri),[]),await this.buildDocuments(e,n,r)}async update(e,n,r=ht.CancellationToken.None){this.currentState=je.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=je.Changed,
|
|
672
|
+
this.langiumDocuments.addDocument(u)}this.buildState.delete(o.toString())}const i=Xe(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,je.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<je.Linked||!(!((a=
|
|
673
|
+
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){
|
|
674
|
+
return e.references.some(r=>r.error!==void 0)?!0:this.indexManager.isAffected(e,n)}onUpdate(e){return this.updateListeners.push(e),Gs.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,je.Parsed,r,s=>this.langiumDocumentFactory.update(s,r)),await this.runCancelable(e,je.IndexedContent,r,s=>this.indexManager.updateContent(s,r)),await this.runCancelable(e,je.ComputedScopes,r,async s=>{
|
|
675
|
+
const o=this.serviceRegistry.getServices(s.uri).references.ScopeComputation;s.precomputedScopes=await o.computeLocalScopes(s,r)}),await this.runCancelable(e,je.Linked,r,s=>this.serviceRegistry.getServices(s.uri).references.Linker.link(s,r)),await this.runCancelable(e,je.IndexedReferences,r,s=>this.indexManager.updateReferences(s,r));const i=e.filter(s=>this.shouldValidate(s));await this.runCancelable(i,je.Validated,r,s=>this.validate(s,r));for(const s of e){const o=this.buildState.get(s.uri.toString());
|
|
676
|
+
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),Gs.create(()=>{
|
|
677
|
+
this.buildPhaseListeners.delete(e,n)})}onDocumentPhase(e,n){return this.documentPhaseListeners.add(e,n),Gs.create(()=>{this.documentPhaseListeners.delete(e,n)})}waitUntil(e,n,r){let i;if(n&&"path"in n?i=n:r=n,r??(r=ht.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(Qf):new Promise((s,o)=>{const a=this.onBuildPhase(e,()=>{if(a.dispose(),u.dispose(),
|
|
678
|
+
i){const c=this.langiumDocuments.getDocument(i);s(c?.uri)}else s(void 0)}),u=r.onCancellationRequested(()=>{a.dispose(),u.dispose(),o(Qf)})})}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(!Zf(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){
|
|
679
|
+
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:rh.all;c.result.validationChecks?c.result.validationChecks.push(...l):c.result.validationChecks=[...l]}}getBuildOptions(e){
|
|
680
|
+
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 ZD{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new gj,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,n){const r=at(e).uri,i=[];return this.referenceIndex.forEach(s=>{s.forEach(o=>{pt.equals(o.targetUri,r)&&o.targetPath===n&&i.push(o)})}),
|
|
681
|
+
Xe(i)}allElements(e,n){let r=Xe(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.
|
|
682
|
+
delete(n)}async updateContent(e,n=ht.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=ht.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(
|
|
683
|
+
e.uri.toString());return r?r.some(i=>!i.local&&n.has(i.targetUri.toString())):!1}}class eR{constructor(e){this.initialBuildOptions={},this._ready=new iy,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=
|
|
684
|
+
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=ht.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(
|
|
685
|
+
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 yt.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(
|
|
686
|
+
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 Sj{buildUnexpectedCharactersMessage(e,n,r,i,s){return wg.buildUnexpectedCharactersMessage(e,n,r,i,s)}buildUnableToPopLexerModeMessage(e){return wg.buildUnableToPopLexerModeMessage(e)}}const _j={
|
|
687
|
+
mode:"full"};class Pj{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=nR(n)?Object.values(n):n,i=e.LanguageMetaData.mode==="production";this.chevrotainLexer=new Mn(r,{positionTracking:"full",skipValidations:i,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.
|
|
688
|
+
tokenTypes}tokenize(e,n=_j){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(nR(e))return e;const n=tR(e)?Object.values(e.modes).flat():e,r={};return n.forEach(i=>r[i.name]=i),r}}function xj(t){return Array.isArray(t)&&(t.length===0||"name"in t[0])}function tR(t){return t&&"modes"in t&&"de\
|
|
689
|
+
faultMode"in t}function nR(t){return!xj(t)&&!tR(t)}function Nj(t,e,n){let r,i;typeof t=="string"?(i=e,r=n):(i=t.range.start,r=e),i||(i=ot.create(0,0));const s=rR(t),o=cy(r),a=Fj({lines:s,position:i,options:o});return jj({index:0,tokens:a,position:i})}function Ij(t,e){const n=cy(e),r=rR(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 rR(t){let e="";return typeof t=="string"?e=t:e=t.text,e.split(Vb)}const iR=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,
|
|
690
|
+
Oj=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function Fj(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 h=(e=t.options.start)===null||e===void 0?void 0:e.exec(l);h&&(f=h.index+h[0].length)}else{const h=(n=t.options.line)===null||n===void 0?void 0:n.exec(l);h&&(f=h.index+h[0].length)}if(c){const h=(r=t.options.end)===null||r===void 0?void 0:r.exec(l);
|
|
691
|
+
h&&(l=l.substring(0,h.index))}if(l=l.substring(0,qj(l)),uy(l,f)>=l.length){if(i.length>0){const h=ot.create(s,o);i.push({type:"break",content:"",range:Ye.create(h,h)})}}else{iR.lastIndex=f;const h=iR.exec(l);if(h){const p=h[0],w=h[1],v=ot.create(s,o+f),g=ot.create(s,o+f+p.length);i.push({type:"tag",content:w,range:Ye.create(v,g)}),f+=p.length,f=uy(l,f)}if(f<l.length){const p=l.substring(f),w=Array.from(p.matchAll(Oj));i.push(...Lj(w,p,s,o+f))}}s++,o=0}return i.length>0&&i[i.length-1].type==="bre\
|
|
692
|
+
ak"?i.slice(0,-1):i}function Lj(t,e,n,r){const i=[];if(t.length===0){const s=ot.create(n,r),o=ot.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(ot.create(n,s+r),ot.create(n,u+r))});let l=c.length+1;const f=a[1];if(i.push({type:"inline-tag",content:f,range:Ye.create(ot.create(n,s+l+r),ot.create(n,s+l+f.length+r))}),l+=f.length,a.length===
|
|
693
|
+
4){l+=a[2].length;const d=a[3];i.push({type:"text",content:d,range:Ye.create(ot.create(n,s+l+r),ot.create(n,s+l+d.length+r))})}else i.push({type:"text",content:"",range:Ye.create(ot.create(n,s+l+r),ot.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(ot.create(n,s+r),ot.create(n,s+r+o.length))})}return i}const Mj=/\S/,Bj=/\s*$/;function uy(t,e){const n=t.substring(e).match(Mj);return n?e+n.index:t.length}function qj(t){const e=t.match(
|
|
694
|
+
Bj);if(e&&typeof e.index=="number")return e.index}function jj(t){var e,n,r,i;const s=ot.create(t.position.line,t.position.character);if(t.tokens.length===0)return new uR([],Ye.create(s,s));const o=[];for(;t.index<t.tokens.length;){const c=Gj(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 uR(o,Ye.create(a,u))}function Gj(t,e){const n=t.
|
|
695
|
+
tokens[t.index];if(n.type==="tag")return oR(t,!1);if(n.type==="text"||n.type==="inline-tag")return sR(t);Uj(n,e),t.index++}function Uj(t,e){if(e){const n=new cR("",t.range);"inlines"in e?e.inlines.push(n):e.content.inlines.push(n)}}function sR(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(Wj(t)),r=e,e=t.tokens[t.index];return new fy(i,Ye.create(n.range.start,r.range.end))}function Wj(t){return t.tokens[t.index].type==="inline-tag"?oR(t,!0):
|
|
696
|
+
aR(t)}function oR(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=aR(t);return new dy(r,new fy([s],s.range),e,Ye.create(n.range.start,s.range.end))}else{const s=sR(t);return new dy(r,s,e,Ye.create(n.range.start,s.range.end))}else{const s=n.range;return new dy(r,new fy([],s),e,s)}}function aR(t){const e=t.tokens[t.index++];return new cR(e.content,e.range)}function cy(t){if(!t)return cy({start:"/**",end:"*/",line:"*"});const{start:e,end:n,
|
|
697
|
+
line:r}=t;return{start:ly(e,!0),end:ly(n,!1),line:ly(r,!0)}}function ly(t,e){if(typeof t=="string"||typeof t=="object"){const n=typeof t=="string"?ef(t):t.source;return e?new RegExp(`^\\s*${n}`):new RegExp(`\\s*${n}\\s*$`)}else return t}class uR{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.
|
|
698
|
+
elements)if(e.length===0)e=n.toString();else{const r=n.toString();e+=lR(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+=lR(n)+i}return n.trim()}}class dy{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}
|
|
699
|
+
${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=zj(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.
|
|
700
|
+
content.inlines.length>1&&(i=`${i}
|
|
701
|
+
${n}`),this.inline?`{${i}}`:i}}function zj(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=uy(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:Hj(e,o)}}function Hj(t,e){try{return yt.parse(t,!0),`[${e}](${t})`}catch{return t}}class fy{constructor(e,n){this.inlines=e,this.range=n}toString(){let e="";
|
|
702
|
+
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+=`
|
|
703
|
+
`)}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+=`
|
|
704
|
+
`)}return n}}class cR{constructor(e,n){this.text=e,this.range=n}toString(){return this.text}toMarkdown(){return this.text}}function lR(t){return t.endsWith(`
|
|
705
|
+
`)?`
|
|
706
|
+
`:`
|
|
707
|
+
|
|
708
|
+
`}class Kj{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const n=this.commentProvider.getComment(e);if(n&&Ij(n))return Nj(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.
|
|
709
|
+
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=at(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 Vj{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){
|
|
710
|
+
var n;return yj(e)?e.$comment:(n=mm(e.$cstNode,this.grammarConfig().multilineCommentRules))===null||n===void 0?void 0:n.text}}class Xj{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,n){return Promise.resolve(this.syncParser.parse(e))}}class Yj{constructor(){this.previousTokenSource=new ht.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();const n=cj();return this.previousTokenSource=n,this.enqueue(this.writeQueue,e,n.token)}read(e){
|
|
711
|
+
return this.enqueue(this.readQueue,e)}enqueue(e,n,r=ht.CancellationToken.None){const i=new iy,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})=>{
|
|
712
|
+
try{const s=await Promise.resolve().then(()=>n(i));r.resolve(s)}catch(s){Zf(s)?r.resolve(void 0):r.reject(s)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}class Jj{constructor(e){this.grammarElementIdMap=new HD,this.tokenTypeIdMap=new HD,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.
|
|
713
|
+
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 ni(e))n.set(i,{});if(e.$cstNode)for(const i of Md(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.
|
|
714
|
+
$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)kt(a)?o.push(this.dehydrateAstNode(a,n)):ir(a)?o.push(this.dehydrateReference(a,n)):o.push(a)}else kt(s)?r[i]=this.dehydrateAstNode(s,n):ir(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)),
|
|
715
|
+
r}dehydrateCstNode(e,n){const r=n.cstNodes.get(e);return _b(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=n.astNodes.get(e.astNode),Gi(e)?r.content=e.content.map(i=>this.dehydrateCstNode(i,n)):Ds(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(
|
|
716
|
+
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 ni(e))n.set(s,{});let i;if(e.$cstNode)for(const s of Md(e.$cstNode)){let o;"fullText"in s?(o=new CD(s.fullText),i=o):"content"in s?o=new ey:"tokenType"in s&&(o=this.hydrateCstLeafNode(s)),o&&(r.set(s,o),o.root=i)}return{astNodes:n,cstNodes:r}}hydrateAstNode(e,n){
|
|
717
|
+
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)kt(a)?o.push(this.setParent(this.hydrateAstNode(a,n),r)):ir(a)?o.push(this.hydrateReference(a,r,i,n)):o.push(a)}else kt(s)?r[i]=this.setParent(this.hydrateAstNode(s,n),r):ir(s)?r[i]=this.hydrateReference(s,r,i,n):s!==
|
|
718
|
+
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),Gi(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),
|
|
719
|
+
r=e.offset,i=e.length,s=e.startLine,o=e.startColumn,a=e.endLine,u=e.endColumn,c=e.hidden;return new Zg(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(){
|
|
720
|
+
let e=0;for(const n of ni(this.grammar))wm(n)&&this.grammarElementIdMap.set(n,e++)}}function dR(t){return{documentation:{CommentProvider:e=>new Vj(e),DocumentationProvider:e=>new Kj(e)},parser:{AsyncParser:e=>new Xj(e),GrammarConfig:e=>pN(e),LangiumParser:e=>rj(e),CompletionParser:e=>nj(e),ValueConverter:()=>new oj,TokenBuilder:()=>new sj,Lexer:e=>new Pj(e),ParserErrorMessageProvider:()=>new PD,LexerErrorMessageProvider:()=>new Sj},workspace:{AstNodeLocator:()=>new kj,AstNodeDescriptionProvider:e=>new QD(
|
|
721
|
+
e),ReferenceDescriptionProvider:e=>new Rj(e)},references:{Linker:e=>new fj(e),NameProvider:()=>new zD,ScopeProvider:e=>new YD(e),ScopeComputation:e=>new KD(e),References:e=>new hj(e)},serializer:{Hydrator:e=>new Jj(e),JsonSerializer:e=>new vj(e)},validation:{DocumentValidator:e=>new Ej(e),ValidationRegistry:e=>new bj(e)},shared:()=>t.shared}}function fR(t){return{ServiceRegistry:e=>new wj(e),workspace:{LangiumDocuments:e=>new WD(e),LangiumDocumentFactory:e=>new dj(e),DocumentBuilder:e=>new Aj(e),
|
|
722
|
+
IndexManager:e=>new ZD(e),WorkspaceManager:e=>new eR(e),FileSystemProvider:e=>t.fileSystemProvider(e),WorkspaceLock:()=>new Yj,ConfigurationProvider:e=>new Cj(e)}}}var ih;(function(t){t.merge=(e,n)=>oh(oh({},e),n)})(ih||(ih={}));function sh(t,e,n,r,i,s,o,a,u){const c=[t,e,n,r,i,s,o,a,u].reduce(oh,{});return pR(c)}const hR=Symbol("isProxy");function hy(t){if(t&&t[hR])for(const e of Object.values(t))hy(e);return t}function pR(t,e){const n=new Proxy({},{deleteProperty:()=>!1,set:()=>{throw new Error(
|
|
723
|
+
"Cannot set property on injected service container")},get:(r,i)=>i===hR?!0:gR(r,i,t,e||n),getOwnPropertyDescriptor:(r,i)=>(gR(r,i,t,e||n),Object.getOwnPropertyDescriptor(r,i)),has:(r,i)=>i in t,ownKeys:()=>[...Object.getOwnPropertyNames(t)]});return n}const mR=Symbol();function gR(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]===mR)throw new Error('Cycle detected. Please make "'+
|
|
724
|
+
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]=mR;try{t[e]=typeof i=="function"?i(r):pR(i,r)}catch(s){throw t[e]=s instanceof Error?s:void 0,s}return t[e]}else return}function oh(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]=oh(i,r):t[n]=r}}return t}class Qj{readFile(){throw new Error("No fil\
|
|
725
|
+
e system is available.")}async readDirectory(){return[]}}const yR={fileSystemProvider:()=>new Qj},Zj={Grammar:()=>{},LanguageMetaData:()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"})},e4={AstReflection:()=>new Ub};function t4(){const t=sh(fR(yR),e4),e=sh(dR({shared:t}),Zj);return t.ServiceRegistry.register(e),e}function n4(t){var e;const n=t4(),r=n.serializer.JsonSerializer.deserialize(t);return n.shared.workspace.LangiumDocumentFactory.fromModel(r,yt.parse(`memory://${(e=
|
|
726
|
+
r.name)!==null&&e!==void 0?e:"grammar"}.langium`)),r}var r4={done:!0,hasNext:!1},Xu={done:!1,hasNext:!1},i4=()=>r4,s4=t=>({hasNext:!0,next:t,done:!1});function He(t,...e){let n=t,r=e.map(s=>"lazy"in s?o4(s):void 0),i=0;for(;i<e.length;){if(r[i]===void 0||!a4(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(vR(u,o,s))break;let{isSingle:a}=s.at(-1);n=a?o[0]:o,i+=s.length}return n}function vR(t,e,n){
|
|
727
|
+
if(n.length===0)return e.push(t),!1;let r=t,i=Xu,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(vR(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 o4(t){let{lazy:e,lazyArgs:n}=t,r=e(...n);return Object.assign(r,{isSingle:e.single??!1,index:0,items:[]})}function a4(t){return typeof t=="string"||typeof t=="object"&&t!==null&&Symbol.iterator in
|
|
728
|
+
t}function wR(t,e){let n=e.length-t.length;if(n===1){let[r,...i]=e;return He(r,{lazy:t,lazyArgs:i})}if(n===0){let r={lazy:t,lazyArgs:e};return Object.assign(i=>He(i,r),r)}throw new Error("Wrong number of arguments")}function u4(t,e,n){let r=i=>t(i,...e);return n===void 0?r:Object.assign(r,{lazy:n,lazyArgs:e})}function ct(t,e,n){let r=t.length-e.length;if(r===0)return t(...e);if(r===1)return u4(t,e,n);throw new Error("Wrong number of arguments")}function ah(...t){return ct(Object.values,t)}function Yo(...t){
|
|
729
|
+
return wR(c4,t)}function c4(){let t=new Set;return e=>t.has(e)?Xu:(t.add(e),{done:!1,hasNext:!0,next:e})}function l4(...t){return ct(d4,t,f4)}var d4=(t,e)=>e<0?[]:t.slice(0,e);function f4(t){if(t<=0)return i4;let e=t;return n=>(e-=1,{done:e<=0,hasNext:!0,next:n})}function lr(...t){return ct(h4,t)}var h4=(t,e)=>t.length>=e,bR={asc:(t,e)=>t>e,desc:(t,e)=>t<e};function p4(t,e){let[n,...r]=e;if(!m4(n)){let s=py(...r);return t(n,s)}let i=py(n,...r);return s=>t(s,i)}function py(t,e,...n){let r=typeof t==
|
|
730
|
+
"function"?t:t[0],i=typeof t=="function"?"asc":t[1],{[i]:s}=bR,o=e===void 0?void 0:py(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 m4(t){if(ER(t))return!0;if(typeof t!="object"||!Array.isArray(t))return!1;let[e,n,...r]=t;return ER(e)&&typeof n=="string"&&n in bR&&r.length===0}var ER=t=>typeof t=="function"&&t.length===1;function g4(...t){return ct(y4,t)}function y4(t,e){return e(t),t}function $R(...t){return ct(v4,t)}function v4(t,e){let n=[...t];return n.
|
|
731
|
+
sort(e),n}function w4(...t){return p4(b4,t)}var b4=(t,e)=>[...t].sort(e);function my(...t){return ct(E4,t)}var E4=(t,e,n)=>t.reduce(e,n);function $4(...t){return ct(D4,t)}function D4(t){return[...t].reverse()}function fi(...t){return ct(R4,t)}var R4=(t,e)=>t[e];function Jo(...t){return ct(k4,t)}function k4(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 Yu(...t){return ct(Object.keys,t)}function Ju(...t){return ct(T4,t)}var T4=t=>t.
|
|
732
|
+
at(-1);function xt(...t){return ct(C4,t,A4)}var C4=(t,e)=>t.map(e),A4=t=>(e,n,r)=>({done:!1,hasNext:!0,next:t(e,n,r)});function Hr(...t){return ct(S4,t)}function S4(t,e){let n={};for(let[r,i]of t.entries()){let[s,o]=e(i,r,t);n[s]=o}return n}function uh(t){return typeof t=="number"&&!Number.isNaN(t)}function _4(t){return t instanceof Promise}function gy(t){return typeof t=="string"}function Gt(t){return t===void 0?!0:typeof t=="string"||Array.isArray(t)?t.length===0:Object.keys(t).length===0}function Tn(t){
|
|
733
|
+
return t!=null}function P4(t){return e=>!t(e)}function Rt(t){return t==null}function DR(t){return Array.isArray(t)}function yy(t){return typeof t=="boolean"}function cn(t){return t!==void 0}function x4(t,{triggerAt:e="end",minQuietPeriodMs:n,maxBurstDurationMs:r,minGapMs:i,reducer:s=N4}){let o,a,u,c,l=()=>{let h=u;h!==void 0&&(u=void 0,t(h),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:(...h)=>{let p=o===
|
|
734
|
+
void 0&&a===void 0;if((e!=="start"||p)&&(u=s(u,...h)),!(o===void 0&&!p)){{clearTimeout(o);let w=Date.now();c??=w;let v=Math.min(n,r-(w-c));o=setTimeout(d,v)}e!=="end"&&p&&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 N4=()=>"";function Qo(...t){return ct(I4,t)}var I4=(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)),
|
|
735
|
+
o.push(i)}}return Object.fromEntries(n)};function O4(){return F4}var F4=t=>t;function Qu(...t){return ct(L4,t)}function L4(t,e){let n={};for(let[r,i]of t.entries()){let s=e(i,r,t);n[s]=i}return n}function Kr(...t){return ct(M4,t,B4)}var M4=(t,e)=>t.flatMap(e),B4=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 q4(...t){return ct(j4,t,G4)}function j4(t,e){return t.forEach(e),t}var G4=t=>(e,n,r)=>(t(e,n,r),{done:!1,hasNext:!0,
|
|
736
|
+
next:e});function RR(...t){return ct(U4,t)}function U4(t,e){for(let[n,r]of Object.entries(t))e(r,n,t);return t}function W4(...t){return ct(Object.fromEntries,t)}function Zu(...t){return ct(Object.entries,t)}function ze(...t){return ct(z4,t,H4)}var z4=(t,e)=>t.filter(e),H4=t=>(e,n,r)=>t(e,n,r)?{done:!1,hasNext:!0,next:e}:Xu,kR=t=>Object.assign(t,{single:!0});function TR(...t){return ct(K4,t,kR(V4))}var K4=(t,e)=>t.find(e),V4=t=>(e,n,r)=>t(e,n,r)?{done:!0,hasNext:!0,next:e}:Xu;function CR(...t){return ct(
|
|
737
|
+
X4,t)}var X4=(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 ct(Y4,t,kR(J4))}var Y4=([t])=>t,J4=()=>Q4,Q4=t=>({hasNext:!0,next:t,done:!0});function AR(...t){return ct(Z4,t)}var Z4=(t,e)=>[...t,...e];function e3(...t){return wR(t3,t)}function t3(t){if(t.length===0)return s4;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),Xu)}}function n3(...t){return ct(
|
|
738
|
+
r3,t)}var r3=(t,e)=>e.some(n=>n(t));function i3(...t){return ct(s3,t)}function s3(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 SR(...t){return ct(o3,t)}var o3=(t,{min:e,max:n})=>e!==void 0&&t<e?e:n!==void 0&&t>n?n:t,
|
|
739
|
+
a3={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,
|
|
740
|
+
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]},u3=Object.entries(a3);function vy(t){return String(t)}vy.open="",vy.close="";function c3(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\
|
|
741
|
+
r")||e?.platform==="win32"||t&&n.TERM!=="dumb"||"CI"in n)||typeof window<"u"&&!!window.chrome}function l3(t=!1){let e=c3(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 u3)i[o]=e?r(s(a[0]),s(a[1]),a[2]):vy;return i}var d3=process.env.FORCE_TTY!==void 0||
|
|
742
|
+
f_(1),Ut=l3(d3),Us={},Ot={},_R;function wy(){if(_R)return Ot;_R=1,Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.thenable=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=="f\
|
|
743
|
+
unction"}Ot.func=i;function s(c){return Array.isArray(c)}Ot.array=s;function o(c){return s(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&&i(c.then)}return Ot.thenable=u,Ot}var Ze={},Ws={},zs={},ch={},by={},Ee={},PR;function xR(){if(PR)return Ee;PR=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Message=Ee.NotificationType9=Ee.NotificationType8=Ee.NotificationType7=Ee.NotificationType6=Ee.NotificationType5=Ee.
|
|
744
|
+
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=Hu();var e;(function(T){T.ParseError=-32700,T.InvalidRequest=-32600,T.MethodNotFound=-32601,T.InvalidParams=
|
|
745
|
+
-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(R,M,S){super(M),this.code=t.number(R)?R:e.UnknownErrorCode,this.data=S,Object.setPrototypeOf(this,n.prototype)}toJson(){
|
|
746
|
+
const R={code:this.code,message:this.message};return this.data!==void 0&&(R.data=this.data),R}}Ee.ResponseError=n;class r{constructor(R){this.kind=R}static is(R){return R===r.auto||R===r.byName||R===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(R,M){this.method=R,this.numberOfParams=M}get parameterStructures(){return r.auto}}Ee.AbstractMessageSignature=i;class s extends i{constructor(R){
|
|
747
|
+
super(R,0)}}Ee.RequestType0=s;class o extends i{constructor(R,M=r.auto){super(R,1),this._parameterStructures=M}get parameterStructures(){return this._parameterStructures}}Ee.RequestType=o;class a extends i{constructor(R,M=r.auto){super(R,1),this._parameterStructures=M}get parameterStructures(){return this._parameterStructures}}Ee.RequestType1=a;class u extends i{constructor(R){super(R,2)}}Ee.RequestType2=u;class c extends i{constructor(R){super(R,3)}}Ee.RequestType3=c;class l extends i{constructor(R){
|
|
748
|
+
super(R,4)}}Ee.RequestType4=l;class f extends i{constructor(R){super(R,5)}}Ee.RequestType5=f;class d extends i{constructor(R){super(R,6)}}Ee.RequestType6=d;class h extends i{constructor(R){super(R,7)}}Ee.RequestType7=h;class p extends i{constructor(R){super(R,8)}}Ee.RequestType8=p;class w extends i{constructor(R){super(R,9)}}Ee.RequestType9=w;class v extends i{constructor(R,M=r.auto){super(R,1),this._parameterStructures=M}get parameterStructures(){return this._parameterStructures}}Ee.NotificationType=
|
|
749
|
+
v;class g extends i{constructor(R){super(R,0)}}Ee.NotificationType0=g;class E extends i{constructor(R,M=r.auto){super(R,1),this._parameterStructures=M}get parameterStructures(){return this._parameterStructures}}Ee.NotificationType1=E;class D extends i{constructor(R){super(R,2)}}Ee.NotificationType2=D;class A extends i{constructor(R){super(R,3)}}Ee.NotificationType3=A;class N extends i{constructor(R){super(R,4)}}Ee.NotificationType4=N;class V extends i{constructor(R){super(R,5)}}Ee.NotificationType5=
|
|
750
|
+
V;class J extends i{constructor(R){super(R,6)}}Ee.NotificationType6=J;class se extends i{constructor(R){super(R,7)}}Ee.NotificationType7=se;class ie extends i{constructor(R){super(R,8)}}Ee.NotificationType8=ie;class we extends i{constructor(R){super(R,9)}}Ee.NotificationType9=we;var B;return function(T){function R(P){const O=P;return O&&t.string(O.method)&&(t.string(O.id)||t.number(O.id))}T.isRequest=R;function M(P){const O=P;return O&&t.string(O.method)&&P.id===void 0}T.isNotification=M;function S(P){
|
|
751
|
+
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 hi={},NR;function IR(){if(NR)return hi;NR=1;var t;Object.defineProperty(hi,"__esModule",{value:!0}),hi.LRUCache=hi.LinkedMap=hi.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||(hi.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=
|
|
752
|
+
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.
|
|
753
|
+
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.
|
|
754
|
+
_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.
|
|
755
|
+
_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,
|
|
756
|
+
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&&
|
|
757
|
+
!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(
|
|
758
|
+
"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=
|
|
759
|
+
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)}}hi.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.
|
|
760
|
+
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 hi.LRUCache=r,hi}var ec={},OR;function f3(){if(OR)return ec;OR=1,Object.defineProperty(ec,"__esModule",{value:!0}),ec.Disposable=void 0;var t;return function(e){function n(r){return{dispose:r}}e.create=n}(t||(ec.Disposable=t={})),ec}var Hs={},
|
|
761
|
+
FR;function h3(){if(FR)return Hs;FR=1,Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.SharedArrayReceiverStrategy=Hs.SharedArraySenderStrategy=void 0;const t=Yf();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)
|
|
762
|
+
return;const l=new Int32Array(c,0,1);Atomics.store(l,0,e.Cancelled)}cleanup(a){this.buffers.delete(a)}dispose(){this.buffers.clear()}}Hs.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(){
|
|
763
|
+
this.kind="request"}createCancellationTokenSource(a){const u=a.$cancellationData;return u===void 0?new t.CancellationTokenSource:new i(u)}}return Hs.SharedArrayReceiverStrategy=s,Hs}var pi={},tc={},LR;function MR(){if(LR)return tc;LR=1,Object.defineProperty(tc,"__esModule",{value:!0}),tc.Semaphore=void 0;const t=Ms();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.
|
|
764
|
+
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()},
|
|
765
|
+
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 tc.Semaphore=e,tc}var BR;function p3(){if(BR)return pi;BR=1,Object.defineProperty(pi,"__esModule",{value:!0}),pi.ReadableStreamMessageReader=pi.AbstractMessageReader=pi.MessageReader=void 0;const t=Ms(),e=Hu(),n=Xo(),r=MR();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)&&
|
|
766
|
+
e.func(f.onPartialMessage)}u.is=c})(i||(pi.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.
|
|
767
|
+
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"}`)}}pi.AbstractMessageReader=s;var o;(function(u){function c(l){let f,d;const h=new Map;let p;const w=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,h.set(d.name,d)),l.contentDecoders!==void 0)for(const v of l.contentDecoders)h.set(
|
|
768
|
+
v.name,v);if(l.contentTypeDecoder!==void 0&&(p=l.contentTypeDecoder,w.set(p.name,p)),l.contentTypeDecoders!==void 0)for(const v of l.contentTypeDecoders)w.set(v.name,v)}return p===void 0&&(p=(0,t.default)().applicationJson.decoder,w.set(p.name,p)),{charset:f,contentDecoder:d,contentDecoders:h,contentTypeDecoder:p,contentTypeDecoders:w}}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(
|
|
769
|
+
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()),
|
|
770
|
+
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.
|
|
771
|
+
${JSON.stringify(Object.fromEntries(f))}`));return}const h=parseInt(d);if(isNaN(h)){this.fireError(new Error(`Content-Length value must be a number. Got ${d}`));return}this.nextMessageLength=h}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.
|
|
772
|
+
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}),
|
|
773
|
+
this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}return pi.ReadableStreamMessageReader=a,pi}var mi={},qR;function m3(){if(qR)return mi;qR=1,Object.defineProperty(mi,"__esModule",{value:!0}),mi.WriteableStreamMessageWriter=mi.AbstractMessageWriter=mi.MessageWriter=void 0;const t=Ms(),e=Hu(),n=MR(),r=Xo(),i="Content-Length: ",s=`\r
|
|
774
|
+
`;var o;(function(l){function f(d){let h=d;return h&&e.func(h.dispose)&&e.func(h.onClose)&&e.func(h.onError)&&e.func(h.write)}l.is=f})(o||(mi.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,h){this.errorEmitter.fire([this.asError(f),d,h])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(
|
|
775
|
+
void 0)}asError(f){return f instanceof Error?f:new Error(`Writer received error. Reason: ${e.string(f.message)?f.message:"unknown"}`)}}mi.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){
|
|
776
|
+
super(),this.writable=f,this.options=u.fromOptions(d),this.errorCount=0,this.writeSemaphore=new n.Semaphore(1),this.writable.onError(h=>this.fireError(h)),this.writable.onClose(()=>this.fireClose())}async write(f){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(f,this.options).then(h=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(h):h).then(h=>{const p=[];return p.push(i,h.byteLength.toString(),s),p.push(s),this.doWrite(f,p,h)},h=>{throw this.
|
|
777
|
+
fireError(h),h}))}async doWrite(f,d,h){try{return await this.writable.write(d.join(""),"ascii"),this.writable.write(h)}catch(p){return this.handleError(p,f),Promise.reject(p)}}handleError(f,d){this.errorCount++,this.fireError(f,d,this.errorCount)}end(){this.writable.end()}}return mi.WriteableStreamMessageWriter=c,mi}var nc={},jR;function g3(){if(jR)return nc;jR=1,Object.defineProperty(nc,"__esModule",{value:!0}),nc.AbstractMessageBuffer=void 0;const t=13,e=10,n=`\r
|
|
778
|
+
`;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 h=this._chunks[a];for(u=0;u<h.length;){switch(h[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:
|
|
779
|
+
o=2;break;case 3:o=4,u++;break e;default:o=0}break;default:o=0}u++}c+=h.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 h=0;h<d.length-2;h++){const p=d[h],w=p.indexOf(":");if(w===-1)throw new Error(`Message header must separate key and value using ':'
|
|
780
|
+
${p}`);const v=p.substr(0,w),g=p.substr(w+1).trim();f.set(s?v.toLowerCase():v,g)}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(
|
|
781
|
+
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 nc.AbstractMessageBuffer=r,nc}var Ey={},GR;function y3(){return GR||(GR=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.
|
|
782
|
+
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=Ms(),n=Hu(),r=xR(),i=IR(),s=Xo(),o=Yf();var a;(function(R){R.type=new r.NotificationType(
|
|
783
|
+
"$/cancelRequest")})(a||(a={}));var u;(function(R){function M(S){return typeof S=="string"||typeof S=="number"}R.is=M})(u||(t.ProgressToken=u={}));var c;(function(R){R.type=new r.NotificationType("$/progress")})(c||(c={}));class l{constructor(){}}t.ProgressType=l;var f;(function(R){function M(S){return n.func(S)}R.is=M})(f||(f={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var d;(function(R){R[R.Off=0]="Off",R[R.Messages=1]="Messages",R[R.Compact=2]="Compact",
|
|
784
|
+
R[R.Verbose=3]="Verbose"})(d||(t.Trace=d={}));var h;(function(R){R.Off="off",R.Messages="messages",R.Compact="compact",R.Verbose="verbose"})(h||(t.TraceValues=h={})),function(R){function M(P){if(!n.string(P))return R.Off;switch(P=P.toLowerCase(),P){case"off":return R.Off;case"messages":return R.Messages;case"compact":return R.Compact;case"verbose":return R.Verbose;default:return R.Off}}R.fromString=M;function S(P){switch(P){case R.Off:return"off";case R.Messages:return"messages";case R.Compact:return"\
|
|
785
|
+
compact";case R.Verbose:return"verbose";default:return"off"}}R.toString=S}(d||(t.Trace=d={}));var p;(function(R){R.Text="text",R.JSON="json"})(p||(t.TraceFormat=p={})),function(R){function M(S){return n.string(S)?(S=S.toLowerCase(),S==="json"?R.JSON:R.Text):R.Text}R.fromString=M}(p||(t.TraceFormat=p={}));var w;(function(R){R.type=new r.NotificationType("$/setTrace")})(w||(t.SetTraceNotification=w={}));var v;(function(R){R.type=new r.NotificationType("$/logTrace")})(v||(t.LogTraceNotification=v={}));
|
|
786
|
+
var g;(function(R){R[R.Closed=1]="Closed",R[R.Disposed=2]="Disposed",R[R.AlreadyListening=3]="AlreadyListening"})(g||(t.ConnectionErrors=g={}));class E extends Error{constructor(M,S){super(S),this.code=M,Object.setPrototypeOf(this,E.prototype)}}t.ConnectionError=E;var D;(function(R){function M(S){const P=S;return P&&n.func(P.cancelUndispatched)}R.is=M})(D||(t.ConnectionStrategy=D={}));var A;(function(R){function M(S){const P=S;return P&&(P.kind===void 0||P.kind==="id")&&n.func(P.createCancellationTokenSource)&&
|
|
787
|
+
(P.dispose===void 0||n.func(P.dispose))}R.is=M})(A||(t.IdCancellationReceiverStrategy=A={}));var N;(function(R){function M(S){const P=S;return P&&P.kind==="request"&&n.func(P.createCancellationTokenSource)&&(P.dispose===void 0||n.func(P.dispose))}R.is=M})(N||(t.RequestCancellationReceiverStrategy=N={}));var V;(function(R){R.Message=Object.freeze({createCancellationTokenSource(S){return new o.CancellationTokenSource}});function M(S){return A.is(S)||N.is(S)}R.is=M})(V||(t.CancellationReceiverStrategy=
|
|
788
|
+
V={}));var J;(function(R){R.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)}R.is=M})(J||(t.CancellationSenderStrategy=J={}));var se;(function(R){R.Message=Object.freeze({receiver:V.Message,sender:J.Message});function M(S){const P=S;return P&&V.is(P.receiver)&&J.is(P.sender)}R.is=M})(se||(t.CancellationStrategy=se={}));var ie;(function(R){function M(S){const P=S;return P&&
|
|
789
|
+
n.func(P.handleMessage)}R.is=M})(ie||(t.MessageStrategy=ie={}));var we;(function(R){function M(S){const P=S;return P&&(se.is(P.cancellationStrategy)||D.is(P.connectionStrategy)||ie.is(P.messageStrategy))}R.is=M})(we||(t.ConnectionOptions=we={}));var B;(function(R){R[R.New=1]="New",R[R.Listening=2]="Listening",R[R.Closed=3]="Closed",R[R.Disposed=4]="Disposed"})(B||(B={}));function T(R,M,S,P){const O=S!==void 0?S:t.NullLogger;let Q=0,z=0,C=0;const ne="2.0";let ye;const xe=new Map;let L;const H=new Map,
|
|
790
|
+
Se=new Map;let le,$e=new i.LinkedMap,Ne=new Map,de=new Set,I=new Map,G=d.Off,he=p.Text,U,fe=B.New;const Ve=new s.Emitter,st=new s.Emitter,ue=new s.Emitter,Ie=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 wt($){return $===null?"res-unknown-"+(++C).toString():"res-"+$.toString()}function et(){return"\
|
|
791
|
+
not-"+(++z).toString()}function Xt($,W){r.Message.isRequest(W)?$.set(Ge(W.id),W):r.Message.isResponse(W)?$.set(wt(W.id),W):$.set(et(),W)}function tn($){}function yn(){return fe===B.Listening}function X(){return fe===B.Closed}function Y(){return fe===B.Disposed}function pe(){(fe===B.New||fe===B.Listening)&&(fe=B.Closed,st.fire(void 0))}function nn($){Ve.fire([$,void 0,void 0])}function Yt($){Ve.fire($)}R.onClose(pe),R.onError(nn),M.onClose(pe),M.onError(Yt);function Nr(){le||$e.size===0||(le=(0,e.
|
|
792
|
+
default)().timer.setImmediate(()=>{le=void 0,ds()}))}function Fi($){r.Message.isRequest($)?hs($):r.Message.isNotification($)?Li($):r.Message.isResponse($)?ps($):Mi($)}function ds(){if($e.size===0)return;const $=$e.shift();try{const W=P?.messageStrategy;ie.is(W)?W.handleMessage($,Fi):Fi($)}finally{Nr()}}const fs=$=>{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 Me=P?.connectionStrategy,tt=Me&&Me.cancelUndispatched?
|
|
793
|
+
Me.cancelUndispatched(oe,tn):void 0;if(tt&&(tt.error!==void 0||tt.result!==void 0)){$e.delete(te),I.delete(W),tt.id=oe.id,Ir(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(),Jr($);return}else de.add(W)}Xt($e,$)}finally{Nr()}};function hs($){if(Y())return;function W(Oe,ut,nt){const zt={jsonrpc:ne,id:$.id};Oe instanceof r.ResponseError?zt.error=Oe.toJson():zt.result=Oe===void 0?null:Oe,Ir(zt,
|
|
794
|
+
ut,nt),M.write(zt).catch(()=>O.error("Sending response failed."))}function te(Oe,ut,nt){const zt={jsonrpc:ne,id:$.id,error:Oe.toJson()};Ir(zt,ut,nt),M.write(zt).catch(()=>O.error("Sending response failed."))}function oe(Oe,ut,nt){Oe===void 0&&(Oe=null);const zt={jsonrpc:ne,id:$.id,result:Oe};Ir(zt,ut,nt),M.write(zt).catch(()=>O.error("Sending response failed."))}ys($);const Ue=xe.get($.method);let Me,tt;Ue&&(Me=Ue.type,tt=Ue.handler);const be=Date.now();if(tt||ye){const Oe=$.id??String(Date.now()),
|
|
795
|
+
ut=A.is(De.receiver)?De.receiver.createCancellationTokenSource(Oe):De.receiver.createCancellationTokenSource($);$.id!==null&&de.has($.id)&&ut.cancel(),$.id!==null&&I.set(Oe,ut);try{let nt;if(tt)if($.params===void 0){if(Me!==void 0&&Me.numberOfParams!==0){te(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${$.method} defines ${Me.numberOfParams} params but received none.`),$.method,be);return}nt=tt(ut.token)}else if(Array.isArray($.params)){if(Me!==void 0&&Me.parameterStructures===r.ParameterStructures.
|
|
796
|
+
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,ut.token)}else{if(Me!==void 0&&Me.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,ut.token)}else ye&&(nt=ye($.method,$.params,ut.token));const zt=nt;
|
|
797
|
+
nt?zt.then?zt.then(vn=>{I.delete(Oe),W(vn,$.method,be)},vn=>{I.delete(Oe),vn instanceof r.ResponseError?te(vn,$.method,be):vn&&n.string(vn.message)?te(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${$.method} failed with message: ${vn.message}`),$.method,be):te(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${$.method} failed unexpectedly without providing any details.`),$.method,be)}):(I.delete(Oe),W(nt,$.method,be)):(I.delete(Oe),oe(nt,$.method,be))}catch(nt){I.delete(Oe),nt instanceof
|
|
798
|
+
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 ps($){if(!Y())if($.id===null)$.error?O.error(`Received response message \
|
|
799
|
+
without id: Error is:
|
|
800
|
+
${JSON.stringify($.error,void 0,4)}`):O.error("Received response message without id. No further error information provided.");else{const W=$.id,te=Ne.get(W);if(vs($,te),te!==void 0){Ne.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\
|
|
801
|
+
ler '${te.method}' failed unexpectedly.`)}}}}function Li($){if(Y())return;let W,te;if($.method===a.type.method){const oe=$.params.id;de.delete(oe),Jr($);return}else{const oe=H.get($.method);oe&&(te=oe.handler,W=oe.type)}if(te||L)try{if(Jr($),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;
|
|
802
|
+
$.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\
|
|
803
|
+
n ${$.method} defines parameters by position but received parameters by name`),te($.params);else L&&L($.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 Mi($){if(!$){O.error("Received empty message.");return}O.error(`Received message which is neither a response nor a notification message:
|
|
804
|
+
${JSON.stringify($,null,4)}`);const W=$;if(n.string(W.id)||n.number(W.id)){const te=W.id,oe=Ne.get(te);oe&&oe.reject(new Error("The received response has neither a result nor an error property."))}}function Pn($){if($!=null)switch(G){case d.Verbose:return JSON.stringify($,null,4);case d.Compact:return JSON.stringify($);default:return}}function ms($){if(!(G===d.Off||!U))if(he===p.Text){let W;(G===d.Verbose||G===d.Compact)&&$.params&&(W=`Params: ${Pn($.params)}
|
|
805
|
+
|
|
806
|
+
`),U.log(`Sending request '${$.method} - (${$.id})'.`,W)}else nr("send-request",$)}function gs($){if(!(G===d.Off||!U))if(he===p.Text){let W;(G===d.Verbose||G===d.Compact)&&($.params?W=`Params: ${Pn($.params)}
|
|
807
|
+
|
|
808
|
+
`:W=`No parameters provided.
|
|
809
|
+
|
|
810
|
+
`),U.log(`Sending notification '${$.method}'.`,W)}else nr("send-notification",$)}function Ir($,W,te){if(!(G===d.Off||!U))if(he===p.Text){let oe;(G===d.Verbose||G===d.Compact)&&($.error&&$.error.data?oe=`Error data: ${Pn($.error.data)}
|
|
811
|
+
|
|
812
|
+
`:$.result?oe=`Result: ${Pn($.result)}
|
|
813
|
+
|
|
814
|
+
`:$.error===void 0&&(oe=`No result returned.
|
|
815
|
+
|
|
816
|
+
`)),U.log(`Sending response '${W} - (${$.id})'. Processing request took ${Date.now()-te}ms`,oe)}else nr("send-response",$)}function ys($){if(!(G===d.Off||!U))if(he===p.Text){let W;(G===d.Verbose||G===d.Compact)&&$.params&&(W=`Params: ${Pn($.params)}
|
|
817
|
+
|
|
818
|
+
`),U.log(`Received request '${$.method} - (${$.id})'.`,W)}else nr("receive-request",$)}function Jr($){if(!(G===d.Off||!U||$.method===v.type.method))if(he===p.Text){let W;(G===d.Verbose||G===d.Compact)&&($.params?W=`Params: ${Pn($.params)}
|
|
819
|
+
|
|
820
|
+
`:W=`No parameters provided.
|
|
821
|
+
|
|
822
|
+
`),U.log(`Received notification '${$.method}'.`,W)}else nr("receive-notification",$)}function vs($,W){if(!(G===d.Off||!U))if(he===p.Text){let te;if((G===d.Verbose||G===d.Compact)&&($.error&&$.error.data?te=`Error data: ${Pn($.error.data)}
|
|
823
|
+
|
|
824
|
+
`:$.result?te=`Result: ${Pn($.result)}
|
|
825
|
+
|
|
826
|
+
`:$.error===void 0&&(te=`No result returned.
|
|
827
|
+
|
|
828
|
+
`)),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 nr("receive-response",$)}function nr($,W){if(!U||G===d.Off)return;const te={isLSPMessage:!0,type:$,message:W,timestamp:Date.now()};U.log(te)}function yr(){if(X())throw new E(g.Closed,"Connection is closed.");if(Y())throw new E(g.Disposed,"Co\
|
|
829
|
+
nnection is disposed.")}function Co(){if(yn())throw new E(g.AlreadyListening,"Connection is already listening")}function q(){if(!yn())throw new Error("Call listen() first.")}function b($){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):[b(W)];case r.ParameterStructures.byName:if(!m(W))throw new Error("Received parameters by name but param is n\
|
|
830
|
+
ot an object literal.");return _(W);case r.ParameterStructures.byPosition:return[b(W)];default:throw new Error(`Unknown parameter structure ${$.toString()}`)}}function y($,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(b(W[Ue]));if(W.length<oe)for(let Ue=W.length;Ue<oe;Ue++)te.push(null);break}return te}const x={sendNotification:($,...W)=>{yr();let te,oe;if(n.string($)){
|
|
831
|
+
te=$;const Me=W[0];let tt=0,be=r.ParameterStructures.auto;r.ParameterStructures.is(Me)&&(tt=1,be=Me);let Oe=W.length;const ut=Oe-tt;switch(ut){case 0:oe=void 0;break;case 1:oe=k(be,W[tt]);break;default:if(be===r.ParameterStructures.byName)throw new Error(`Received ${ut} parameters for 'by Name' notification parameter structure.`);oe=W.slice(tt,Oe).map(nt=>b(nt));break}}else{const Me=W;te=$.method,oe=y($,Me)}const Ue={jsonrpc:ne,method:te,params:oe};return gs(Ue),M.write(Ue).catch(Me=>{throw O.error(
|
|
832
|
+
"Sending notification failed."),Me})},onNotification:($,W)=>{yr();let te;return n.func($)?L=$:W&&(n.string($)?(te=$,H.set($,{type:void 0,handler:W})):(te=$.method,H.set($.method,{type:$,handler:W}))),{dispose:()=>{te!==void 0?H.delete(te):L=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:Ie.event,
|
|
833
|
+
sendRequest:($,...W)=>{yr(),q();let te,oe,Ue;if(n.string($)){te=$;const Oe=W[0],ut=W[W.length-1];let nt=0,zt=r.ParameterStructures.auto;r.ParameterStructures.is(Oe)&&(nt=1,zt=Oe);let vn=W.length;o.CancellationToken.is(ut)&&(vn=vn-1,Ue=ut);const Or=vn-nt;switch(Or){case 0:oe=void 0;break;case 1:oe=k(zt,W[nt]);break;default:if(zt===r.ParameterStructures.byName)throw new Error(`Received ${Or} parameters for 'by Name' request parameter structure.`);oe=W.slice(nt,vn).map(o_=>b(o_));break}}else{const Oe=W;
|
|
834
|
+
te=$.method,oe=y($,Oe);const ut=$.numberOfParams;Ue=o.CancellationToken.is(Oe[ut])?Oe[ut]:void 0}const Me=Q++;let tt;Ue&&(tt=Ue.onCancellationRequested(()=>{const Oe=De.sender.sendCancellation(x,Me);return Oe===void 0?(O.log(`Received no promise from cancellation strategy when cancelling id ${Me}`),Promise.resolve()):Oe.catch(()=>{O.log(`Sending cancellation messages for id ${Me} failed`)})}));const be={jsonrpc:ne,id:Me,method:te,params:oe};return ms(be),typeof De.sender.enableCancellation=="fun\
|
|
835
|
+
ction"&&De.sender.enableCancellation(be),new Promise(async(Oe,ut)=>{const nt=Or=>{Oe(Or),De.sender.cleanup(Me),tt?.dispose()},zt=Or=>{ut(Or),De.sender.cleanup(Me),tt?.dispose()},vn={method:te,timerStart:Date.now(),resolve:nt,reject:zt};try{await M.write(be),Ne.set(Me,vn)}catch(Or){throw O.error("Sending request failed."),vn.reject(new r.ResponseError(r.ErrorCodes.MessageWriteError,Or.message?Or.message:"Unknown reason")),Or}})},onRequest:($,W)=>{yr();let te=null;return f.is($)?(te=void 0,ye=$):n.
|
|
836
|
+
string($)?(te=null,W!==void 0&&(te=$,xe.set($,{handler:W,type:void 0}))):W!==void 0&&(te=$.method,xe.set($.method,{type:$,handler:W})),{dispose:()=>{te!==null&&(te!==void 0?xe.delete(te):ye=void 0)}}},hasPendingResponse:()=>Ne.size>0,trace:async($,W,te)=>{let oe=!1,Ue=p.Text;te!==void 0&&(n.boolean(te)?oe=te:(oe=te.sendNotification||!1,Ue=te.traceFormat||p.Text)),G=$,he=Ue,G===d.Off?U=void 0:U=W,oe&&!X()&&!Y()&&await x.sendNotification(w.type,{value:d.toString($)})},onError:Ve.event,onClose:st.event,
|
|
837
|
+
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 Ne.values())W.reject($);Ne=new Map,I=new Map,de=new Set,$e=new i.LinkedMap,n.func(M.dispose)&&M.dispose(),n.func(R.dispose)&&R.dispose()},listen:()=>{yr(),Co(),fe=B.Listening,R.listen(fs)},inspect:()=>{(0,e.default)().console.log("ins\
|
|
838
|
+
pect")}};return x.onNotification(v.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):Ie.fire($)}),x}t.createMessageConnection=T}(Ey)),Ey}var UR;function $y(){return UR||(UR=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=
|
|
839
|
+
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.
|
|
840
|
+
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=xR();Object.defineProperty(t,"Me\
|
|
841
|
+
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(){
|
|
842
|
+
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.
|
|
843
|
+
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(
|
|
844
|
+
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.
|
|
845
|
+
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}});
|
|
846
|
+
const n=IR();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=f3();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,
|
|
847
|
+
get:function(){return i.Emitter}});const s=Yf();Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return s.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return s.CancellationToken}});const o=h3();Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return o.SharedArraySenderStrategy}}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return o.SharedArrayReceiverStrategy}});
|
|
848
|
+
const a=p3();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=m3();Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return u.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",
|
|
849
|
+
{enumerable:!0,get:function(){return u.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return u.WriteableStreamMessageWriter}});const c=g3();Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return c.AbstractMessageBuffer}});const l=y3();Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return l.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){
|
|
850
|
+
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}}),
|
|
851
|
+
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}}),
|
|
852
|
+
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",
|
|
853
|
+
{enumerable:!0,get:function(){return l.MessageStrategy}});const f=Ms();t.RAL=f.default}(by)),by}var WR;function v3(){if(WR)return ch;WR=1,Object.defineProperty(ch,"__esModule",{value:!0});const t=m_,e=$y();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.
|
|
854
|
+
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),
|
|
855
|
+
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=h=>{h==null?l():f(h)};typeof u=="string"?this.stream.write(u,c,d):this.stream.write(
|
|
856
|
+
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(
|
|
857
|
+
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.
|
|
858
|
+
RAL.install(s)}a.install=u}(o||(o={})),ch.default=o,ch}var zR;function Ks(){return zR||(zR=1,function(t){var e=zs&&zs.__createBinding||(Object.create?function(B,T,R,M){M===void 0&&(M=R);var S=Object.getOwnPropertyDescriptor(T,R);(!S||("get"in S?!T.__esModule:S.writable||S.configurable))&&(S={enumerable:!0,get:function(){return T[R]}}),Object.defineProperty(B,M,S)}:function(B,T,R,M){M===void 0&&(M=R),B[M]=T[R]}),n=zs&&zs.__exportStar||function(B,T){for(var R in B)R!=="default"&&!Object.prototype.
|
|
859
|
+
hasOwnProperty.call(T,R)&&e(T,B,R)};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=v3();r.default.install();const i=qi,s=g_,o=y_,a=v_,u=$y();n($y(),t);
|
|
860
|
+
class c extends u.AbstractMessageReader{constructor(T){super(),this.process=T;let R=this.process;R.on("error",M=>this.fireError(M)),R.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 R=this.process;R.on("error",M=>this.fireError(M)),R.on("close",()=>this.fireClose)}write(T){try{return typeof this.
|
|
861
|
+
process.send=="function"&&this.process.send(T,void 0,void 0,R=>{R?(this.errorCount++,this.handleError(R,T)):this.errorCount=0}),Promise.resolve()}catch(R){return this.handleError(R,T),Promise.reject(R)}}handleError(T,R){this.errorCount++,this.fireError(T,R,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",R=>this.fireError(R)),T.on("message",R=>{this.onData.fire(R)})}listen(T){
|
|
862
|
+
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",R=>this.fireError(R))}write(T){try{return this.port.postMessage(T),Promise.resolve()}catch(R){return this.handleError(R,T),Promise.reject(R)}}handleError(T,R){this.errorCount++,this.fireError(T,R,this.errorCount)}end(){}}t.PortMessageWriter=d;class h extends u.ReadableStreamMessageReader{constructor(T,R="ut\
|
|
863
|
+
f-8"){super((0,r.default)().stream.asReadableStream(T),R)}}t.SocketMessageReader=h;class p extends u.WriteableStreamMessageWriter{constructor(T,R){super((0,r.default)().stream.asWritableStream(T),R),this.socket=T}dispose(){super.dispose(),this.socket.destroy()}}t.SocketMessageWriter=p;class w extends u.ReadableStreamMessageReader{constructor(T,R){super((0,r.default)().stream.asReadableStream(T),R)}}t.StreamMessageReader=w;class v extends u.WriteableStreamMessageWriter{constructor(T,R){super((0,r.
|
|
864
|
+
default)().stream.asWritableStream(T),R)}}t.StreamMessageWriter=v;const g=process.env.XDG_RUNTIME_DIR,E=new Map([["linux",107],["darwin",103]]);function D(){const B=(0,o.randomBytes)(21).toString("hex");if(process.platform==="win32")return`\\\\.\\pipe\\vscode-jsonrpc-${B}-sock`;let T;g?T=i.join(g,`vscode-ipc-${B}.sock`):T=i.join(s.tmpdir(),`vscode-${B}.sock`);const R=E.get(process.platform);return R!==void 0&&T.length>R&&(0,r.default)().console.warn(`WARNING: IPC handle "${T}" is longer than ${R}\
|
|
865
|
+
characters.`),T}t.generateRandomPipeName=D;function A(B,T="utf-8"){let R;const M=new Promise((S,P)=>{R=S});return new Promise((S,P)=>{let O=(0,a.createServer)(Q=>{O.close(),R([new h(Q,T),new p(Q,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 R=(0,a.createConnection)(B);return[new h(R,T),new p(R,T)]}t.createServerPipeTransport=N;function V(B,T="utf-8"){let R;const M=new Promise((S,P)=>{R=S});
|
|
866
|
+
return new Promise((S,P)=>{const O=(0,a.createServer)(Q=>{O.close(),R([new h(Q,T),new p(Q,T)])});O.on("error",P),O.listen(B,"127.0.0.1",()=>{O.removeListener("error",P),S({onConnected:()=>M})})})}t.createClientSocketTransport=V;function J(B,T="utf-8"){const R=(0,a.createConnection)(B,"127.0.0.1");return[new h(R,T),new p(R,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}
|
|
867
|
+
function we(B,T,R,M){R||(R=u.NullLogger);const S=se(B)?new w(B):B,P=ie(T)?new v(T):T;return u.ConnectionStrategy.is(M)&&(M={connectionStrategy:M}),(0,u.createMessageConnection)(S,P,R,M)}t.createMessageConnection=we}(zs)),zs}var Dy,HR;function KR(){return HR||(HR=1,Dy=Ks()),Dy}var Vs={},lh={exports:{}},VR;function Ry(){return VR||(VR=1,function(t,e){(function(n){{var r=n(Xw,e);r!==void 0&&(t.exports=r)}})(function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.TextDocument=r.EOL=r.WorkspaceFolder=
|
|
868
|
+
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=
|
|
869
|
+
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=
|
|
870
|
+
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(b){function _(m){return typeof m=="string"}b.is=
|
|
871
|
+
_})(i||(r.DocumentUri=i={}));var s;(function(b){function _(m){return typeof m=="string"}b.is=_})(s||(r.URI=s={}));var o;(function(b){b.MIN_VALUE=-2147483648,b.MAX_VALUE=2147483647;function _(m){return typeof m=="number"&&b.MIN_VALUE<=m&&m<=b.MAX_VALUE}b.is=_})(o||(r.integer=o={}));var a;(function(b){b.MIN_VALUE=0,b.MAX_VALUE=2147483647;function _(m){return typeof m=="number"&&b.MIN_VALUE<=m&&m<=b.MAX_VALUE}b.is=_})(a||(r.uinteger=a={}));var u;(function(b){function _(k,y){return k===Number.MAX_VALUE&&
|
|
872
|
+
(k=a.MAX_VALUE),y===Number.MAX_VALUE&&(y=a.MAX_VALUE),{line:k,character:y}}b.create=_;function m(k){var y=k;return q.objectLiteral(y)&&q.uinteger(y.line)&&q.uinteger(y.character)}b.is=m})(u||(r.Position=u={}));var c;(function(b){function _(k,y,x,$){if(q.uinteger(k)&&q.uinteger(y)&&q.uinteger(x)&&q.uinteger($))return{start:u.create(k,y),end:u.create(x,$)};if(u.is(k)&&u.is(y))return{start:k,end:y};throw new Error("Range#create called with invalid arguments[".concat(k,", ").concat(y,", ").concat(x,
|
|
873
|
+
", ").concat($,"]"))}b.create=_;function m(k){var y=k;return q.objectLiteral(y)&&u.is(y.start)&&u.is(y.end)}b.is=m})(c||(r.Range=c={}));var l;(function(b){function _(k,y){return{uri:k,range:y}}b.create=_;function m(k){var y=k;return q.objectLiteral(y)&&c.is(y.range)&&(q.string(y.uri)||q.undefined(y.uri))}b.is=m})(l||(r.Location=l={}));var f;(function(b){function _(k,y,x,$){return{targetUri:k,targetRange:y,targetSelectionRange:x,originSelectionRange:$}}b.create=_;function m(k){var y=k;return q.objectLiteral(
|
|
874
|
+
y)&&c.is(y.targetRange)&&q.string(y.targetUri)&&c.is(y.targetSelectionRange)&&(c.is(y.originSelectionRange)||q.undefined(y.originSelectionRange))}b.is=m})(f||(r.LocationLink=f={}));var d;(function(b){function _(k,y,x,$){return{red:k,green:y,blue:x,alpha:$}}b.create=_;function m(k){var y=k;return q.objectLiteral(y)&&q.numberRange(y.red,0,1)&&q.numberRange(y.green,0,1)&&q.numberRange(y.blue,0,1)&&q.numberRange(y.alpha,0,1)}b.is=m})(d||(r.Color=d={}));var h;(function(b){function _(k,y){return{range:k,
|
|
875
|
+
color:y}}b.create=_;function m(k){var y=k;return q.objectLiteral(y)&&c.is(y.range)&&d.is(y.color)}b.is=m})(h||(r.ColorInformation=h={}));var p;(function(b){function _(k,y,x){return{label:k,textEdit:y,additionalTextEdits:x}}b.create=_;function m(k){var y=k;return q.objectLiteral(y)&&q.string(y.label)&&(q.undefined(y.textEdit)||J.is(y))&&(q.undefined(y.additionalTextEdits)||q.typedArray(y.additionalTextEdits,J.is))}b.is=m})(p||(r.ColorPresentation=p={}));var w;(function(b){b.Comment="comment",b.Imports=
|
|
876
|
+
"imports",b.Region="region"})(w||(r.FoldingRangeKind=w={}));var v;(function(b){function _(k,y,x,$,W,te){var oe={startLine:k,endLine:y};return q.defined(x)&&(oe.startCharacter=x),q.defined($)&&(oe.endCharacter=$),q.defined(W)&&(oe.kind=W),q.defined(te)&&(oe.collapsedText=te),oe}b.create=_;function m(k){var y=k;return q.objectLiteral(y)&&q.uinteger(y.startLine)&&q.uinteger(y.startLine)&&(q.undefined(y.startCharacter)||q.uinteger(y.startCharacter))&&(q.undefined(y.endCharacter)||q.uinteger(y.endCharacter))&&
|
|
877
|
+
(q.undefined(y.kind)||q.string(y.kind))}b.is=m})(v||(r.FoldingRange=v={}));var g;(function(b){function _(k,y){return{location:k,message:y}}b.create=_;function m(k){var y=k;return q.defined(y)&&l.is(y.location)&&q.string(y.message)}b.is=m})(g||(r.DiagnosticRelatedInformation=g={}));var E;(function(b){b.Error=1,b.Warning=2,b.Information=3,b.Hint=4})(E||(r.DiagnosticSeverity=E={}));var D;(function(b){b.Unnecessary=1,b.Deprecated=2})(D||(r.DiagnosticTag=D={}));var A;(function(b){function _(m){var k=m;
|
|
878
|
+
return q.objectLiteral(k)&&q.string(k.href)}b.is=_})(A||(r.CodeDescription=A={}));var N;(function(b){function _(k,y,x,$,W,te){var oe={range:k,message:y};return q.defined(x)&&(oe.severity=x),q.defined($)&&(oe.code=$),q.defined(W)&&(oe.source=W),q.defined(te)&&(oe.relatedInformation=te),oe}b.create=_;function m(k){var y,x=k;return q.defined(x)&&c.is(x.range)&&q.string(x.message)&&(q.number(x.severity)||q.undefined(x.severity))&&(q.integer(x.code)||q.string(x.code)||q.undefined(x.code))&&(q.undefined(
|
|
879
|
+
x.codeDescription)||q.string((y=x.codeDescription)===null||y===void 0?void 0:y.href))&&(q.string(x.source)||q.undefined(x.source))&&(q.undefined(x.relatedInformation)||q.typedArray(x.relatedInformation,g.is))}b.is=m})(N||(r.Diagnostic=N={}));var V;(function(b){function _(k,y){for(var x=[],$=2;$<arguments.length;$++)x[$-2]=arguments[$];var W={title:k,command:y};return q.defined(x)&&x.length>0&&(W.arguments=x),W}b.create=_;function m(k){var y=k;return q.defined(y)&&q.string(y.title)&&q.string(y.command)}
|
|
880
|
+
b.is=m})(V||(r.Command=V={}));var J;(function(b){function _(x,$){return{range:x,newText:$}}b.replace=_;function m(x,$){return{range:{start:x,end:x},newText:$}}b.insert=m;function k(x){return{range:x,newText:""}}b.del=k;function y(x){var $=x;return q.objectLiteral($)&&q.string($.newText)&&c.is($.range)}b.is=y})(J||(r.TextEdit=J={}));var se;(function(b){function _(k,y,x){var $={label:k};return y!==void 0&&($.needsConfirmation=y),x!==void 0&&($.description=x),$}b.create=_;function m(k){var y=k;return q.
|
|
881
|
+
objectLiteral(y)&&q.string(y.label)&&(q.boolean(y.needsConfirmation)||y.needsConfirmation===void 0)&&(q.string(y.description)||y.description===void 0)}b.is=m})(se||(r.ChangeAnnotation=se={}));var ie;(function(b){function _(m){var k=m;return q.string(k)}b.is=_})(ie||(r.ChangeAnnotationIdentifier=ie={}));var we;(function(b){function _(x,$,W){return{range:x,newText:$,annotationId:W}}b.replace=_;function m(x,$,W){return{range:{start:x,end:x},newText:$,annotationId:W}}b.insert=m;function k(x,$){return{
|
|
882
|
+
range:x,newText:"",annotationId:$}}b.del=k;function y(x){var $=x;return J.is($)&&(se.is($.annotationId)||ie.is($.annotationId))}b.is=y})(we||(r.AnnotatedTextEdit=we={}));var B;(function(b){function _(k,y){return{textDocument:k,edits:y}}b.create=_;function m(k){var y=k;return q.defined(y)&&ne.is(y.textDocument)&&Array.isArray(y.edits)}b.is=m})(B||(r.TextDocumentEdit=B={}));var T;(function(b){function _(k,y,x){var $={kind:"create",uri:k};return y!==void 0&&(y.overwrite!==void 0||y.ignoreIfExists!==
|
|
883
|
+
void 0)&&($.options=y),x!==void 0&&($.annotationId=x),$}b.create=_;function m(k){var y=k;return y&&y.kind==="create"&&q.string(y.uri)&&(y.options===void 0||(y.options.overwrite===void 0||q.boolean(y.options.overwrite))&&(y.options.ignoreIfExists===void 0||q.boolean(y.options.ignoreIfExists)))&&(y.annotationId===void 0||ie.is(y.annotationId))}b.is=m})(T||(r.CreateFile=T={}));var R;(function(b){function _(k,y,x,$){var W={kind:"rename",oldUri:k,newUri:y};return x!==void 0&&(x.overwrite!==void 0||x.
|
|
884
|
+
ignoreIfExists!==void 0)&&(W.options=x),$!==void 0&&(W.annotationId=$),W}b.create=_;function m(k){var y=k;return y&&y.kind==="rename"&&q.string(y.oldUri)&&q.string(y.newUri)&&(y.options===void 0||(y.options.overwrite===void 0||q.boolean(y.options.overwrite))&&(y.options.ignoreIfExists===void 0||q.boolean(y.options.ignoreIfExists)))&&(y.annotationId===void 0||ie.is(y.annotationId))}b.is=m})(R||(r.RenameFile=R={}));var M;(function(b){function _(k,y,x){var $={kind:"delete",uri:k};return y!==void 0&&
|
|
885
|
+
(y.recursive!==void 0||y.ignoreIfNotExists!==void 0)&&($.options=y),x!==void 0&&($.annotationId=x),$}b.create=_;function m(k){var y=k;return y&&y.kind==="delete"&&q.string(y.uri)&&(y.options===void 0||(y.options.recursive===void 0||q.boolean(y.options.recursive))&&(y.options.ignoreIfNotExists===void 0||q.boolean(y.options.ignoreIfNotExists)))&&(y.annotationId===void 0||ie.is(y.annotationId))}b.is=m})(M||(r.DeleteFile=M={}));var S;(function(b){function _(m){var k=m;return k&&(k.changes!==void 0||
|
|
886
|
+
k.documentChanges!==void 0)&&(k.documentChanges===void 0||k.documentChanges.every(function(y){return q.string(y.kind)?T.is(y)||R.is(y)||M.is(y):B.is(y)}))}b.is=_})(S||(r.WorkspaceEdit=S={}));var P=function(){function b(_,m){this.edits=_,this.changeAnnotations=m}return b.prototype.insert=function(_,m,k){var y,x;if(k===void 0?y=J.insert(_,m):ie.is(k)?(x=k,y=we.insert(_,m,k)):(this.assertChangeAnnotations(this.changeAnnotations),x=this.changeAnnotations.manage(k),y=we.insert(_,m,x)),this.edits.push(
|
|
887
|
+
y),x!==void 0)return x},b.prototype.replace=function(_,m,k){var y,x;if(k===void 0?y=J.replace(_,m):ie.is(k)?(x=k,y=we.replace(_,m,k)):(this.assertChangeAnnotations(this.changeAnnotations),x=this.changeAnnotations.manage(k),y=we.replace(_,m,x)),this.edits.push(y),x!==void 0)return x},b.prototype.delete=function(_,m){var k,y;if(m===void 0?k=J.del(_):ie.is(m)?(y=m,k=we.del(_,m)):(this.assertChangeAnnotations(this.changeAnnotations),y=this.changeAnnotations.manage(m),k=we.del(_,y)),this.edits.push(k),
|
|
888
|
+
y!==void 0)return y},b.prototype.add=function(_){this.edits.push(_)},b.prototype.all=function(){return this.edits},b.prototype.clear=function(){this.edits.splice(0,this.edits.length)},b.prototype.assertChangeAnnotations=function(_){if(_===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},b}(),O=function(){function b(_){this._annotations=_===void 0?Object.create(null):_,this._counter=0,this._size=0}return b.prototype.all=function(){return this._annotations},
|
|
889
|
+
Object.defineProperty(b.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),b.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},b.prototype.nextId=function(){return this._counter++,this._counter.toString()},b}(),Q=function(){function b(_){
|
|
890
|
+
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 y=new P(k.edits,m._changeAnnotations);m._textEditChanges[k.textDocument.uri]=y}})):_.changes&&Object.keys(_.changes).forEach(function(k){var y=new P(_.changes[k]);m._textEditChanges[k]=y})):this._workspaceEdit={}}return Object.defineProperty(
|
|
891
|
+
b.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}),b.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\
|
|
892
|
+
nges.");var m={uri:_.uri,version:_.version},k=this._textEditChanges[m.uri];if(!k){var y=[],x={textDocument:m,edits:y};this._workspaceEdit.documentChanges.push(x),k=new P(y,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 y=[];this._workspaceEdit.changes[_]=y,k=new P(y),this._textEditChanges[_]=k}
|
|
893
|
+
return k}},b.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())},b.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},b.prototype.createFile=function(_,m,k){if(this.initDocumentChanges(),
|
|
894
|
+
this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var y;se.is(m)||ie.is(m)?y=m:k=m;var x,$;if(y===void 0?x=T.create(_,k):($=ie.is(y)?y:this._changeAnnotations.manage(y),x=T.create(_,k,$)),this._workspaceEdit.documentChanges.push(x),$!==void 0)return $},b.prototype.renameFile=function(_,m,k,y){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document\
|
|
895
|
+
changes.");var x;se.is(k)||ie.is(k)?x=k:y=k;var $,W;if(x===void 0?$=R.create(_,m,y):(W=ie.is(x)?x:this._changeAnnotations.manage(x),$=R.create(_,m,y,W)),this._workspaceEdit.documentChanges.push($),W!==void 0)return W},b.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 y;se.is(m)||ie.is(m)?y=m:k=m;var x,$;if(y===void 0?x=M.create(_,k):($=ie.is(y)?y:this._changeAnnotations.
|
|
896
|
+
manage(y),x=M.create(_,k,$)),this._workspaceEdit.documentChanges.push(x),$!==void 0)return $},b}();r.WorkspaceChange=Q;var z;(function(b){function _(k){return{uri:k}}b.create=_;function m(k){var y=k;return q.defined(y)&&q.string(y.uri)}b.is=m})(z||(r.TextDocumentIdentifier=z={}));var C;(function(b){function _(k,y){return{uri:k,version:y}}b.create=_;function m(k){var y=k;return q.defined(y)&&q.string(y.uri)&&q.integer(y.version)}b.is=m})(C||(r.VersionedTextDocumentIdentifier=C={}));var ne;(function(b){
|
|
897
|
+
function _(k,y){return{uri:k,version:y}}b.create=_;function m(k){var y=k;return q.defined(y)&&q.string(y.uri)&&(y.version===null||q.integer(y.version))}b.is=m})(ne||(r.OptionalVersionedTextDocumentIdentifier=ne={}));var ye;(function(b){function _(k,y,x,$){return{uri:k,languageId:y,version:x,text:$}}b.create=_;function m(k){var y=k;return q.defined(y)&&q.string(y.uri)&&q.string(y.languageId)&&q.integer(y.version)&&q.string(y.text)}b.is=m})(ye||(r.TextDocumentItem=ye={}));var xe;(function(b){b.PlainText=
|
|
898
|
+
"plaintext",b.Markdown="markdown";function _(m){var k=m;return k===b.PlainText||k===b.Markdown}b.is=_})(xe||(r.MarkupKind=xe={}));var L;(function(b){function _(m){var k=m;return q.objectLiteral(m)&&xe.is(k.kind)&&q.string(k.value)}b.is=_})(L||(r.MarkupContent=L={}));var H;(function(b){b.Text=1,b.Method=2,b.Function=3,b.Constructor=4,b.Field=5,b.Variable=6,b.Class=7,b.Interface=8,b.Module=9,b.Property=10,b.Unit=11,b.Value=12,b.Enum=13,b.Keyword=14,b.Snippet=15,b.Color=16,b.File=17,b.Reference=18,
|
|
899
|
+
b.Folder=19,b.EnumMember=20,b.Constant=21,b.Struct=22,b.Event=23,b.Operator=24,b.TypeParameter=25})(H||(r.CompletionItemKind=H={}));var Se;(function(b){b.PlainText=1,b.Snippet=2})(Se||(r.InsertTextFormat=Se={}));var le;(function(b){b.Deprecated=1})(le||(r.CompletionItemTag=le={}));var $e;(function(b){function _(k,y,x){return{newText:k,insert:y,replace:x}}b.create=_;function m(k){var y=k;return y&&q.string(y.newText)&&c.is(y.insert)&&c.is(y.replace)}b.is=m})($e||(r.InsertReplaceEdit=$e={}));var Ne;
|
|
900
|
+
(function(b){b.asIs=1,b.adjustIndentation=2})(Ne||(r.InsertTextMode=Ne={}));var de;(function(b){function _(m){var k=m;return k&&(q.string(k.detail)||k.detail===void 0)&&(q.string(k.description)||k.description===void 0)}b.is=_})(de||(r.CompletionItemLabelDetails=de={}));var I;(function(b){function _(m){return{label:m}}b.create=_})(I||(r.CompletionItem=I={}));var G;(function(b){function _(m,k){return{items:m||[],isIncomplete:!!k}}b.create=_})(G||(r.CompletionList=G={}));var he;(function(b){function _(k){
|
|
901
|
+
return k.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}b.fromPlainText=_;function m(k){var y=k;return q.string(y)||q.objectLiteral(y)&&q.string(y.language)&&q.string(y.value)}b.is=m})(he||(r.MarkedString=he={}));var U;(function(b){function _(m){var k=m;return!!k&&q.objectLiteral(k)&&(L.is(k.contents)||he.is(k.contents)||q.typedArray(k.contents,he.is))&&(m.range===void 0||c.is(m.range))}b.is=_})(U||(r.Hover=U={}));var fe;(function(b){function _(m,k){return k?{label:m,documentation:k}:{label:m}}b.create=
|
|
902
|
+
_})(fe||(r.ParameterInformation=fe={}));var Ve;(function(b){function _(m,k){for(var y=[],x=2;x<arguments.length;x++)y[x-2]=arguments[x];var $={label:m};return q.defined(k)&&($.documentation=k),q.defined(y)?$.parameters=y:$.parameters=[],$}b.create=_})(Ve||(r.SignatureInformation=Ve={}));var st;(function(b){b.Text=1,b.Read=2,b.Write=3})(st||(r.DocumentHighlightKind=st={}));var ue;(function(b){function _(m,k){var y={range:m};return q.number(k)&&(y.kind=k),y}b.create=_})(ue||(r.DocumentHighlight=ue=
|
|
903
|
+
{}));var Ie;(function(b){b.File=1,b.Module=2,b.Namespace=3,b.Package=4,b.Class=5,b.Method=6,b.Property=7,b.Field=8,b.Constructor=9,b.Enum=10,b.Interface=11,b.Function=12,b.Variable=13,b.Constant=14,b.String=15,b.Number=16,b.Boolean=17,b.Array=18,b.Object=19,b.Key=20,b.Null=21,b.EnumMember=22,b.Struct=23,b.Event=24,b.Operator=25,b.TypeParameter=26})(Ie||(r.SymbolKind=Ie={}));var re;(function(b){b.Deprecated=1})(re||(r.SymbolTag=re={}));var De;(function(b){function _(m,k,y,x,$){var W={name:m,kind:k,
|
|
904
|
+
location:{uri:x,range:y}};return $&&(W.containerName=$),W}b.create=_})(De||(r.SymbolInformation=De={}));var Ge;(function(b){function _(m,k,y,x){return x!==void 0?{name:m,kind:k,location:{uri:y,range:x}}:{name:m,kind:k,location:{uri:y}}}b.create=_})(Ge||(r.WorkspaceSymbol=Ge={}));var wt;(function(b){function _(k,y,x,$,W,te){var oe={name:k,detail:y,kind:x,range:$,selectionRange:W};return te!==void 0&&(oe.children=te),oe}b.create=_;function m(k){var y=k;return y&&q.string(y.name)&&q.number(y.kind)&&
|
|
905
|
+
c.is(y.range)&&c.is(y.selectionRange)&&(y.detail===void 0||q.string(y.detail))&&(y.deprecated===void 0||q.boolean(y.deprecated))&&(y.children===void 0||Array.isArray(y.children))&&(y.tags===void 0||Array.isArray(y.tags))}b.is=m})(wt||(r.DocumentSymbol=wt={}));var et;(function(b){b.Empty="",b.QuickFix="quickfix",b.Refactor="refactor",b.RefactorExtract="refactor.extract",b.RefactorInline="refactor.inline",b.RefactorRewrite="refactor.rewrite",b.Source="source",b.SourceOrganizeImports="source.organi\
|
|
906
|
+
zeImports",b.SourceFixAll="source.fixAll"})(et||(r.CodeActionKind=et={}));var Xt;(function(b){b.Invoked=1,b.Automatic=2})(Xt||(r.CodeActionTriggerKind=Xt={}));var tn;(function(b){function _(k,y,x){var $={diagnostics:k};return y!=null&&($.only=y),x!=null&&($.triggerKind=x),$}b.create=_;function m(k){var y=k;return q.defined(y)&&q.typedArray(y.diagnostics,N.is)&&(y.only===void 0||q.typedArray(y.only,q.string))&&(y.triggerKind===void 0||y.triggerKind===Xt.Invoked||y.triggerKind===Xt.Automatic)}b.is=
|
|
907
|
+
m})(tn||(r.CodeActionContext=tn={}));var yn;(function(b){function _(k,y,x){var $={title:k},W=!0;return typeof y=="string"?(W=!1,$.kind=y):V.is(y)?$.command=y:$.edit=y,W&&x!==void 0&&($.kind=x),$}b.create=_;function m(k){var y=k;return y&&q.string(y.title)&&(y.diagnostics===void 0||q.typedArray(y.diagnostics,N.is))&&(y.kind===void 0||q.string(y.kind))&&(y.edit!==void 0||y.command!==void 0)&&(y.command===void 0||V.is(y.command))&&(y.isPreferred===void 0||q.boolean(y.isPreferred))&&(y.edit===void 0||
|
|
908
|
+
S.is(y.edit))}b.is=m})(yn||(r.CodeAction=yn={}));var X;(function(b){function _(k,y){var x={range:k};return q.defined(y)&&(x.data=y),x}b.create=_;function m(k){var y=k;return q.defined(y)&&c.is(y.range)&&(q.undefined(y.command)||V.is(y.command))}b.is=m})(X||(r.CodeLens=X={}));var Y;(function(b){function _(k,y){return{tabSize:k,insertSpaces:y}}b.create=_;function m(k){var y=k;return q.defined(y)&&q.uinteger(y.tabSize)&&q.boolean(y.insertSpaces)}b.is=m})(Y||(r.FormattingOptions=Y={}));var pe;(function(b){
|
|
909
|
+
function _(k,y,x){return{range:k,target:y,data:x}}b.create=_;function m(k){var y=k;return q.defined(y)&&c.is(y.range)&&(q.undefined(y.target)||q.string(y.target))}b.is=m})(pe||(r.DocumentLink=pe={}));var nn;(function(b){function _(k,y){return{range:k,parent:y}}b.create=_;function m(k){var y=k;return q.objectLiteral(y)&&c.is(y.range)&&(y.parent===void 0||b.is(y.parent))}b.is=m})(nn||(r.SelectionRange=nn={}));var Yt;(function(b){b.namespace="namespace",b.type="type",b.class="class",b.enum="enum",b.
|
|
910
|
+
interface="interface",b.struct="struct",b.typeParameter="typeParameter",b.parameter="parameter",b.variable="variable",b.property="property",b.enumMember="enumMember",b.event="event",b.function="function",b.method="method",b.macro="macro",b.keyword="keyword",b.modifier="modifier",b.comment="comment",b.string="string",b.number="number",b.regexp="regexp",b.operator="operator",b.decorator="decorator"})(Yt||(r.SemanticTokenTypes=Yt={}));var Nr;(function(b){b.declaration="declaration",b.definition="de\
|
|
911
|
+
finition",b.readonly="readonly",b.static="static",b.deprecated="deprecated",b.abstract="abstract",b.async="async",b.modification="modification",b.documentation="documentation",b.defaultLibrary="defaultLibrary"})(Nr||(r.SemanticTokenModifiers=Nr={}));var Fi;(function(b){function _(m){var k=m;return q.objectLiteral(k)&&(k.resultId===void 0||typeof k.resultId=="string")&&Array.isArray(k.data)&&(k.data.length===0||typeof k.data[0]=="number")}b.is=_})(Fi||(r.SemanticTokens=Fi={}));var ds;(function(b){
|
|
912
|
+
function _(k,y){return{range:k,text:y}}b.create=_;function m(k){var y=k;return y!=null&&c.is(y.range)&&q.string(y.text)}b.is=m})(ds||(r.InlineValueText=ds={}));var fs;(function(b){function _(k,y,x){return{range:k,variableName:y,caseSensitiveLookup:x}}b.create=_;function m(k){var y=k;return y!=null&&c.is(y.range)&&q.boolean(y.caseSensitiveLookup)&&(q.string(y.variableName)||y.variableName===void 0)}b.is=m})(fs||(r.InlineValueVariableLookup=fs={}));var hs;(function(b){function _(k,y){return{range:k,
|
|
913
|
+
expression:y}}b.create=_;function m(k){var y=k;return y!=null&&c.is(y.range)&&(q.string(y.expression)||y.expression===void 0)}b.is=m})(hs||(r.InlineValueEvaluatableExpression=hs={}));var ps;(function(b){function _(k,y){return{frameId:k,stoppedLocation:y}}b.create=_;function m(k){var y=k;return q.defined(y)&&c.is(k.stoppedLocation)}b.is=m})(ps||(r.InlineValueContext=ps={}));var Li;(function(b){b.Type=1,b.Parameter=2;function _(m){return m===1||m===2}b.is=_})(Li||(r.InlayHintKind=Li={}));var Mi;(function(b){
|
|
914
|
+
function _(k){return{value:k}}b.create=_;function m(k){var y=k;return q.objectLiteral(y)&&(y.tooltip===void 0||q.string(y.tooltip)||L.is(y.tooltip))&&(y.location===void 0||l.is(y.location))&&(y.command===void 0||V.is(y.command))}b.is=m})(Mi||(r.InlayHintLabelPart=Mi={}));var Pn;(function(b){function _(k,y,x){var $={position:k,label:y};return x!==void 0&&($.kind=x),$}b.create=_;function m(k){var y=k;return q.objectLiteral(y)&&u.is(y.position)&&(q.string(y.label)||q.typedArray(y.label,Mi.is))&&(y.
|
|
915
|
+
kind===void 0||Li.is(y.kind))&&y.textEdits===void 0||q.typedArray(y.textEdits,J.is)&&(y.tooltip===void 0||q.string(y.tooltip)||L.is(y.tooltip))&&(y.paddingLeft===void 0||q.boolean(y.paddingLeft))&&(y.paddingRight===void 0||q.boolean(y.paddingRight))}b.is=m})(Pn||(r.InlayHint=Pn={}));var ms;(function(b){function _(m){return{kind:"snippet",value:m}}b.createSnippet=_})(ms||(r.StringValue=ms={}));var gs;(function(b){function _(m,k,y,x){return{insertText:m,filterText:k,range:y,command:x}}b.create=_})(
|
|
916
|
+
gs||(r.InlineCompletionItem=gs={}));var Ir;(function(b){function _(m){return{items:m}}b.create=_})(Ir||(r.InlineCompletionList=Ir={}));var ys;(function(b){b.Invoked=0,b.Automatic=1})(ys||(r.InlineCompletionTriggerKind=ys={}));var Jr;(function(b){function _(m,k){return{range:m,text:k}}b.create=_})(Jr||(r.SelectedCompletionInfo=Jr={}));var vs;(function(b){function _(m,k){return{triggerKind:m,selectedCompletionInfo:k}}b.create=_})(vs||(r.InlineCompletionContext=vs={}));var nr;(function(b){function _(m){
|
|
917
|
+
var k=m;return q.objectLiteral(k)&&s.is(k.uri)&&q.string(k.name)}b.is=_})(nr||(r.WorkspaceFolder=nr={})),r.EOL=[`
|
|
918
|
+
`,`\r
|
|
919
|
+
`,"\r"];var yr;(function(b){function _(x,$,W,te){return new Co(x,$,W,te)}b.create=_;function m(x){var $=x;return!!(q.defined($)&&q.string($.uri)&&(q.undefined($.languageId)||q.string($.languageId))&&q.uinteger($.lineCount)&&q.func($.getText)&&q.func($.positionAt)&&q.func($.offsetAt))}b.is=m;function k(x,$){for(var W=x.getText(),te=y($,function(Oe,ut){var nt=Oe.range.start.line-ut.range.start.line;return nt===0?Oe.range.start.character-ut.range.start.character:nt}),oe=W.length,Ue=te.length-1;Ue>=
|
|
920
|
+
0;Ue--){var Me=te[Ue],tt=x.offsetAt(Me.range.start),be=x.offsetAt(Me.range.end);if(be<=oe)W=W.substring(0,tt)+Me.newText+W.substring(be,W.length);else throw new Error("Overlapping edit");oe=tt}return W}b.applyEdits=k;function y(x,$){if(x.length<=1)return x;var W=x.length/2|0,te=x.slice(0,W),oe=x.slice(W);y(te,$),y(oe,$);for(var Ue=0,Me=0,tt=0;Ue<te.length&&Me<oe.length;){var be=$(te[Ue],oe[Me]);be<=0?x[tt++]=te[Ue++]:x[tt++]=oe[Me++]}for(;Ue<te.length;)x[tt++]=te[Ue++];for(;Me<oe.length;)x[tt++]=
|
|
921
|
+
oe[Me++];return x}})(yr||(r.TextDocument=yr={}));var Co=function(){function b(_,m,k,y){this._uri=_,this._languageId=m,this._version=k,this._content=y,this._lineOffsets=void 0}return Object.defineProperty(b.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"version",{get:function(){return this._version},enumerable:!1,
|
|
922
|
+
configurable:!0}),b.prototype.getText=function(_){if(_){var m=this.offsetAt(_.start),k=this.offsetAt(_.end);return this._content.substring(m,k)}return this._content},b.prototype.update=function(_,m){this._content=_.text,this._version=m,this._lineOffsets=void 0},b.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var _=[],m=this._content,k=!0,y=0;y<m.length;y++){k&&(_.push(y),k=!1);var x=m.charAt(y);k=x==="\r"||x===`
|
|
923
|
+
`,x==="\r"&&y+1<m.length&&m.charAt(y+1)===`
|
|
924
|
+
`&&y++}k&&m.length>0&&_.push(m.length),this._lineOffsets=_}return this._lineOffsets},b.prototype.positionAt=function(_){_=Math.max(Math.min(_,this._content.length),0);var m=this.getLineOffsets(),k=0,y=m.length;if(y===0)return u.create(0,_);for(;k<y;){var x=Math.floor((k+y)/2);m[x]>_?y=x:k=x+1}var $=k-1;return u.create($,_-m[$])},b.prototype.offsetAt=function(_){var m=this.getLineOffsets();if(_.line>=m.length)return this._content.length;if(_.line<0)return 0;var k=m[_.line],y=_.line+1<m.length?m[_.
|
|
925
|
+
line+1]:this._content.length;return Math.max(Math.min(k+_.character,y),k)},Object.defineProperty(b.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),b}(),q;(function(b){var _=Object.prototype.toString;function m(be){return typeof be<"u"}b.defined=m;function k(be){return typeof be>"u"}b.undefined=k;function y(be){return be===!0||be===!1}b.boolean=y;function x(be){return _.call(be)==="[object String]"}b.string=x;function $(be){return _.call(
|
|
926
|
+
be)==="[object Number]"}b.number=$;function W(be,Oe,ut){return _.call(be)==="[object Number]"&&Oe<=be&&be<=ut}b.numberRange=W;function te(be){return _.call(be)==="[object Number]"&&-2147483648<=be&&be<=2147483647}b.integer=te;function oe(be){return _.call(be)==="[object Number]"&&0<=be&&be<=2147483647}b.uinteger=oe;function Ue(be){return _.call(be)==="[object Function]"}b.func=Ue;function Me(be){return be!==null&&typeof be=="object"}b.objectLiteral=Me;function tt(be,Oe){return Array.isArray(be)&&
|
|
927
|
+
be.every(Oe)}b.typedArray=tt})(q||(q={}))})}(lh,lh.exports)),lh.exports}var Cn={},XR;function At(){if(XR)return Cn;XR=1,Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.ProtocolNotificationType=Cn.ProtocolNotificationType0=Cn.ProtocolRequestType=Cn.ProtocolRequestType0=Cn.RegistrationType=Cn.MessageDirection=void 0;const t=Ks();var e;(function(a){a.clientToServer="clientToServer",a.serverToClient="serverToClient",a.both="both"})(e||(Cn.MessageDirection=e={}));class n{constructor(u){this.method=
|
|
928
|
+
u}}Cn.RegistrationType=n;class r extends t.RequestType0{constructor(u){super(u)}}Cn.ProtocolRequestType0=r;class i extends t.RequestType{constructor(u){super(u,t.ParameterStructures.byName)}}Cn.ProtocolRequestType=i;class s extends t.NotificationType0{constructor(u){super(u)}}Cn.ProtocolNotificationType0=s;class o extends t.NotificationType{constructor(u){super(u,t.ParameterStructures.byName)}}return Cn.ProtocolNotificationType=o,Cn}var ky={},Ft={},YR;function Ty(){if(YR)return Ft;YR=1,Object.defineProperty(
|
|
929
|
+
Ft,"__esModule",{value:!0}),Ft.objectLiteral=Ft.typedArray=Ft.stringArray=Ft.array=Ft.func=Ft.error=Ft.number=Ft.string=Ft.boolean=void 0;function t(c){return c===!0||c===!1}Ft.boolean=t;function e(c){return typeof c=="string"||c instanceof String}Ft.string=e;function n(c){return typeof c=="number"||c instanceof Number}Ft.number=n;function r(c){return c instanceof Error}Ft.error=r;function i(c){return typeof c=="function"}Ft.func=i;function s(c){return Array.isArray(c)}Ft.array=s;function o(c){return s(
|
|
930
|
+
c)&&c.every(l=>e(l))}Ft.stringArray=o;function a(c,l){return Array.isArray(c)&&c.every(l)}Ft.typedArray=a;function u(c){return c!==null&&typeof c=="object"}return Ft.objectLiteral=u,Ft}var rc={},JR;function w3(){if(JR)return rc;JR=1,Object.defineProperty(rc,"__esModule",{value:!0}),rc.ImplementationRequest=void 0;const t=At();var e;return function(n){n.method="textDocument/implementation",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)}(e||(rc.ImplementationRequest=
|
|
931
|
+
e={})),rc}var ic={},QR;function b3(){if(QR)return ic;QR=1,Object.defineProperty(ic,"__esModule",{value:!0}),ic.TypeDefinitionRequest=void 0;const t=At();var e;return function(n){n.method="textDocument/typeDefinition",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)}(e||(ic.TypeDefinitionRequest=e={})),ic}var Xs={},ZR;function E3(){if(ZR)return Xs;ZR=1,Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.DidChangeWorkspaceFoldersNotification=Xs.WorkspaceFoldersRequest=
|
|
932
|
+
void 0;const t=At();var e;(function(r){r.method="workspace/workspaceFolders",r.messageDirection=t.MessageDirection.serverToClient,r.type=new t.ProtocolRequestType0(r.method)})(e||(Xs.WorkspaceFoldersRequest=e={}));var n;return function(r){r.method="workspace/didChangeWorkspaceFolders",r.messageDirection=t.MessageDirection.clientToServer,r.type=new t.ProtocolNotificationType(r.method)}(n||(Xs.DidChangeWorkspaceFoldersNotification=n={})),Xs}var sc={},ek;function $3(){if(ek)return sc;ek=1,Object.defineProperty(
|
|
933
|
+
sc,"__esModule",{value:!0}),sc.ConfigurationRequest=void 0;const t=At();var e;return function(n){n.method="workspace/configuration",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType(n.method)}(e||(sc.ConfigurationRequest=e={})),sc}var Ys={},tk;function D3(){if(tk)return Ys;tk=1,Object.defineProperty(Ys,"__esModule",{value:!0}),Ys.ColorPresentationRequest=Ys.DocumentColorRequest=void 0;const t=At();var e;(function(r){r.method="textDocument/documentColor",r.messageDirection=
|
|
934
|
+
t.MessageDirection.clientToServer,r.type=new t.ProtocolRequestType(r.method)})(e||(Ys.DocumentColorRequest=e={}));var n;return function(r){r.method="textDocument/colorPresentation",r.messageDirection=t.MessageDirection.clientToServer,r.type=new t.ProtocolRequestType(r.method)}(n||(Ys.ColorPresentationRequest=n={})),Ys}var Js={},nk;function R3(){if(nk)return Js;nk=1,Object.defineProperty(Js,"__esModule",{value:!0}),Js.FoldingRangeRefreshRequest=Js.FoldingRangeRequest=void 0;const t=At();var e;(function(r){
|
|
935
|
+
r.method="textDocument/foldingRange",r.messageDirection=t.MessageDirection.clientToServer,r.type=new t.ProtocolRequestType(r.method)})(e||(Js.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||(Js.FoldingRangeRefreshRequest=n={})),Js}var oc={},rk;function k3(){if(rk)return oc;rk=1,Object.defineProperty(oc,"__esModule",{value:!0}),oc.DeclarationRequest=void 0;
|
|
936
|
+
const t=At();var e;return function(n){n.method="textDocument/declaration",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)}(e||(oc.DeclarationRequest=e={})),oc}var ac={},ik;function T3(){if(ik)return ac;ik=1,Object.defineProperty(ac,"__esModule",{value:!0}),ac.SelectionRangeRequest=void 0;const t=At();var e;return function(n){n.method="textDocument/selectionRange",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(
|
|
937
|
+
n.method)}(e||(ac.SelectionRangeRequest=e={})),ac}var gi={},sk;function C3(){if(sk)return gi;sk=1,Object.defineProperty(gi,"__esModule",{value:!0}),gi.WorkDoneProgressCancelNotification=gi.WorkDoneProgressCreateRequest=gi.WorkDoneProgress=void 0;const t=Ks(),e=At();var n;(function(s){s.type=new t.ProgressType;function o(a){return a===s.type}s.is=o})(n||(gi.WorkDoneProgress=n={}));var r;(function(s){s.method="window/workDoneProgress/create",s.messageDirection=e.MessageDirection.serverToClient,s.type=
|
|
938
|
+
new e.ProtocolRequestType(s.method)})(r||(gi.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||(gi.WorkDoneProgressCancelNotification=i={})),gi}var yi={},ok;function A3(){if(ok)return yi;ok=1,Object.defineProperty(yi,"__esModule",{value:!0}),yi.CallHierarchyOutgoingCallsRequest=yi.CallHierarchyIncomingCallsRequest=yi.CallHierarchyPrepareRequest=
|
|
939
|
+
void 0;const t=At();var e;(function(i){i.method="textDocument/prepareCallHierarchy",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(e||(yi.CallHierarchyPrepareRequest=e={}));var n;(function(i){i.method="callHierarchy/incomingCalls",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(n||(yi.CallHierarchyIncomingCallsRequest=n={}));var r;return function(i){i.method="callHierarchy/outgoingCalls",i.messageDirection=
|
|
940
|
+
t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)}(r||(yi.CallHierarchyOutgoingCallsRequest=r={})),yi}var An={},ak;function S3(){if(ak)return An;ak=1,Object.defineProperty(An,"__esModule",{value:!0}),An.SemanticTokensRefreshRequest=An.SemanticTokensRangeRequest=An.SemanticTokensDeltaRequest=An.SemanticTokensRequest=An.SemanticTokensRegistrationType=An.TokenFormat=void 0;const t=At();var e;(function(a){a.Relative="relative"})(e||(An.TokenFormat=e={}));var n;(function(a){
|
|
941
|
+
a.method="textDocument/semanticTokens",a.type=new t.RegistrationType(a.method)})(n||(An.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||(An.SemanticTokensRequest=r={}));var i;(function(a){a.method="textDocument/semanticTokens/full/delta",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(
|
|
942
|
+
a.method),a.registrationMethod=n.method})(i||(An.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||(An.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||(An.SemanticTokensRefreshRequest=
|
|
943
|
+
o={})),An}var uc={},uk;function _3(){if(uk)return uc;uk=1,Object.defineProperty(uc,"__esModule",{value:!0}),uc.ShowDocumentRequest=void 0;const t=At();var e;return function(n){n.method="window/showDocument",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType(n.method)}(e||(uc.ShowDocumentRequest=e={})),uc}var cc={},ck;function P3(){if(ck)return cc;ck=1,Object.defineProperty(cc,"__esModule",{value:!0}),cc.LinkedEditingRangeRequest=void 0;const t=At();var e;return function(n){
|
|
944
|
+
n.method="textDocument/linkedEditingRange",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)}(e||(cc.LinkedEditingRangeRequest=e={})),cc}var ln={},lk;function x3(){if(lk)return ln;lk=1,Object.defineProperty(ln,"__esModule",{value:!0}),ln.WillDeleteFilesRequest=ln.DidDeleteFilesNotification=ln.DidRenameFilesNotification=ln.WillRenameFilesRequest=ln.DidCreateFilesNotification=ln.WillCreateFilesRequest=ln.FileOperationPatternKind=void 0;const t=At();var e;
|
|
945
|
+
(function(u){u.file="file",u.folder="folder"})(e||(ln.FileOperationPatternKind=e={}));var n;(function(u){u.method="workspace/willCreateFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolRequestType(u.method)})(n||(ln.WillCreateFilesRequest=n={}));var r;(function(u){u.method="workspace/didCreateFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolNotificationType(u.method)})(r||(ln.DidCreateFilesNotification=r={}));var i;(function(u){u.method=
|
|
946
|
+
"workspace/willRenameFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolRequestType(u.method)})(i||(ln.WillRenameFilesRequest=i={}));var s;(function(u){u.method="workspace/didRenameFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolNotificationType(u.method)})(s||(ln.DidRenameFilesNotification=s={}));var o;(function(u){u.method="workspace/didDeleteFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolNotificationType(
|
|
947
|
+
u.method)})(o||(ln.DidDeleteFilesNotification=o={}));var a;return function(u){u.method="workspace/willDeleteFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolRequestType(u.method)}(a||(ln.WillDeleteFilesRequest=a={})),ln}var vi={},dk;function N3(){if(dk)return vi;dk=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi.MonikerRequest=vi.MonikerKind=vi.UniquenessLevel=void 0;const t=At();var e;(function(i){i.document="document",i.project="project",i.group="group",i.
|
|
948
|
+
scheme="scheme",i.global="global"})(e||(vi.UniquenessLevel=e={}));var n;(function(i){i.$import="import",i.$export="export",i.local="local"})(n||(vi.MonikerKind=n={}));var r;return function(i){i.method="textDocument/moniker",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)}(r||(vi.MonikerRequest=r={})),vi}var wi={},fk;function I3(){if(fk)return wi;fk=1,Object.defineProperty(wi,"__esModule",{value:!0}),wi.TypeHierarchySubtypesRequest=wi.TypeHierarchySupertypesRequest=
|
|
949
|
+
wi.TypeHierarchyPrepareRequest=void 0;const t=At();var e;(function(i){i.method="textDocument/prepareTypeHierarchy",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(e||(wi.TypeHierarchyPrepareRequest=e={}));var n;(function(i){i.method="typeHierarchy/supertypes",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(n||(wi.TypeHierarchySupertypesRequest=n={}));var r;return function(i){i.method="typeHierarch\
|
|
950
|
+
y/subtypes",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)}(r||(wi.TypeHierarchySubtypesRequest=r={})),wi}var Qs={},hk;function O3(){if(hk)return Qs;hk=1,Object.defineProperty(Qs,"__esModule",{value:!0}),Qs.InlineValueRefreshRequest=Qs.InlineValueRequest=void 0;const t=At();var e;(function(r){r.method="textDocument/inlineValue",r.messageDirection=t.MessageDirection.clientToServer,r.type=new t.ProtocolRequestType(r.method)})(e||(Qs.InlineValueRequest=
|
|
951
|
+
e={}));var n;return function(r){r.method="workspace/inlineValue/refresh",r.messageDirection=t.MessageDirection.serverToClient,r.type=new t.ProtocolRequestType0(r.method)}(n||(Qs.InlineValueRefreshRequest=n={})),Qs}var bi={},pk;function F3(){if(pk)return bi;pk=1,Object.defineProperty(bi,"__esModule",{value:!0}),bi.InlayHintRefreshRequest=bi.InlayHintResolveRequest=bi.InlayHintRequest=void 0;const t=At();var e;(function(i){i.method="textDocument/inlayHint",i.messageDirection=t.MessageDirection.clientToServer,
|
|
952
|
+
i.type=new t.ProtocolRequestType(i.method)})(e||(bi.InlayHintRequest=e={}));var n;(function(i){i.method="inlayHint/resolve",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(n||(bi.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||(bi.InlayHintRefreshRequest=r={})),bi}var Yn={},mk;function L3(){if(mk)return Yn;
|
|
953
|
+
mk=1,Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.DiagnosticRefreshRequest=Yn.WorkspaceDiagnosticRequest=Yn.DocumentDiagnosticRequest=Yn.DocumentDiagnosticReportKind=Yn.DiagnosticServerCancellationData=void 0;const t=Ks(),e=Ty(),n=At();var r;(function(u){function c(l){const f=l;return f&&e.boolean(f.retriggerRequest)}u.is=c})(r||(Yn.DiagnosticServerCancellationData=r={}));var i;(function(u){u.Full="full",u.Unchanged="unchanged"})(i||(Yn.DocumentDiagnosticReportKind=i={}));var s;(function(u){
|
|
954
|
+
u.method="textDocument/diagnostic",u.messageDirection=n.MessageDirection.clientToServer,u.type=new n.ProtocolRequestType(u.method),u.partialResult=new t.ProgressType})(s||(Yn.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||(Yn.WorkspaceDiagnosticRequest=o={}));var a;return function(u){u.method="workspace/diagnostic/refresh",u.
|
|
955
|
+
messageDirection=n.MessageDirection.serverToClient,u.type=new n.ProtocolRequestType0(u.method)}(a||(Yn.DiagnosticRefreshRequest=a={})),Yn}var St={},gk;function M3(){if(gk)return St;gk=1,Object.defineProperty(St,"__esModule",{value:!0}),St.DidCloseNotebookDocumentNotification=St.DidSaveNotebookDocumentNotification=St.DidChangeNotebookDocumentNotification=St.NotebookCellArrayChange=St.DidOpenNotebookDocumentNotification=St.NotebookDocumentSyncRegistrationType=St.NotebookDocument=St.NotebookCell=St.
|
|
956
|
+
ExecutionSummary=St.NotebookCellKind=void 0;const t=Ry(),e=Ty(),n=At();var r;(function(h){h.Markup=1,h.Code=2;function p(w){return w===1||w===2}h.is=p})(r||(St.NotebookCellKind=r={}));var i;(function(h){function p(g,E){const D={executionOrder:g};return(E===!0||E===!1)&&(D.success=E),D}h.create=p;function w(g){const E=g;return e.objectLiteral(E)&&t.uinteger.is(E.executionOrder)&&(E.success===void 0||e.boolean(E.success))}h.is=w;function v(g,E){return g===E?!0:g==null||E===null||E===void 0?!1:g.executionOrder===
|
|
957
|
+
E.executionOrder&&g.success===E.success}h.equals=v})(i||(St.ExecutionSummary=i={}));var s;(function(h){function p(E,D){return{kind:E,document:D}}h.create=p;function w(E){const D=E;return e.objectLiteral(D)&&r.is(D.kind)&&t.DocumentUri.is(D.document)&&(D.metadata===void 0||e.objectLiteral(D.metadata))}h.is=w;function v(E,D){const A=new Set;return E.document!==D.document&&A.add("document"),E.kind!==D.kind&&A.add("kind"),E.executionSummary!==D.executionSummary&&A.add("executionSummary"),(E.metadata!==
|
|
958
|
+
void 0||D.metadata!==void 0)&&!g(E.metadata,D.metadata)&&A.add("metadata"),(E.executionSummary!==void 0||D.executionSummary!==void 0)&&!i.equals(E.executionSummary,D.executionSummary)&&A.add("executionSummary"),A}h.diff=v;function g(E,D){if(E===D)return!0;if(E==null||D===null||D===void 0||typeof E!=typeof D||typeof E!="object")return!1;const A=Array.isArray(E),N=Array.isArray(D);if(A!==N)return!1;if(A&&N){if(E.length!==D.length)return!1;for(let V=0;V<E.length;V++)if(!g(E[V],D[V]))return!1}if(e.objectLiteral(
|
|
959
|
+
E)&&e.objectLiteral(D)){const V=Object.keys(E),J=Object.keys(D);if(V.length!==J.length||(V.sort(),J.sort(),!g(V,J)))return!1;for(let se=0;se<V.length;se++){const ie=V[se];if(!g(E[ie],D[ie]))return!1}}return!0}})(s||(St.NotebookCell=s={}));var o;(function(h){function p(v,g,E,D){return{uri:v,notebookType:g,version:E,cells:D}}h.create=p;function w(v){const g=v;return e.objectLiteral(g)&&e.string(g.uri)&&t.integer.is(g.version)&&e.typedArray(g.cells,s.is)}h.is=w})(o||(St.NotebookDocument=o={}));var a;
|
|
960
|
+
(function(h){h.method="notebookDocument/sync",h.messageDirection=n.MessageDirection.clientToServer,h.type=new n.RegistrationType(h.method)})(a||(St.NotebookDocumentSyncRegistrationType=a={}));var u;(function(h){h.method="notebookDocument/didOpen",h.messageDirection=n.MessageDirection.clientToServer,h.type=new n.ProtocolNotificationType(h.method),h.registrationMethod=a.method})(u||(St.DidOpenNotebookDocumentNotification=u={}));var c;(function(h){function p(v){const g=v;return e.objectLiteral(g)&&
|
|
961
|
+
t.uinteger.is(g.start)&&t.uinteger.is(g.deleteCount)&&(g.cells===void 0||e.typedArray(g.cells,s.is))}h.is=p;function w(v,g,E){const D={start:v,deleteCount:g};return E!==void 0&&(D.cells=E),D}h.create=w})(c||(St.NotebookCellArrayChange=c={}));var l;(function(h){h.method="notebookDocument/didChange",h.messageDirection=n.MessageDirection.clientToServer,h.type=new n.ProtocolNotificationType(h.method),h.registrationMethod=a.method})(l||(St.DidChangeNotebookDocumentNotification=l={}));var f;(function(h){
|
|
962
|
+
h.method="notebookDocument/didSave",h.messageDirection=n.MessageDirection.clientToServer,h.type=new n.ProtocolNotificationType(h.method),h.registrationMethod=a.method})(f||(St.DidSaveNotebookDocumentNotification=f={}));var d;return function(h){h.method="notebookDocument/didClose",h.messageDirection=n.MessageDirection.clientToServer,h.type=new n.ProtocolNotificationType(h.method),h.registrationMethod=a.method}(d||(St.DidCloseNotebookDocumentNotification=d={})),St}var lc={},yk;function B3(){if(yk)
|
|
963
|
+
return lc;yk=1,Object.defineProperty(lc,"__esModule",{value:!0}),lc.InlineCompletionRequest=void 0;const t=At();var e;return function(n){n.method="textDocument/inlineCompletion",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)}(e||(lc.InlineCompletionRequest=e={})),lc}var vk;function q3(){return vk||(vk=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSymbolRequest=t.CodeActionResolveRequest=t.CodeActionRequest=t.DocumentSymbolRequest=
|
|
964
|
+
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=
|
|
965
|
+
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=
|
|
966
|
+
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=
|
|
967
|
+
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=
|
|
968
|
+
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=
|
|
969
|
+
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=
|
|
970
|
+
t.InlineValueRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchySubtypesRequest=t.TypeHierarchyPrepareRequest=void 0;const e=At(),n=Ry(),r=Ty(),i=w3();Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return i.ImplementationRequest}});const s=b3();Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return s.TypeDefinitionRequest}});const o=E3();Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return o.WorkspaceFoldersRequest}}),
|
|
971
|
+
Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return o.DidChangeWorkspaceFoldersNotification}});const a=$3();Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return a.ConfigurationRequest}});const u=D3();Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return u.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return u.ColorPresentationRequest}});
|
|
972
|
+
const c=R3();Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return c.FoldingRangeRequest}}),Object.defineProperty(t,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return c.FoldingRangeRefreshRequest}});const l=k3();Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return l.DeclarationRequest}});const f=T3();Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return f.SelectionRangeRequest}});const d=C3();
|
|
973
|
+
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 h=A3();Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return h.CallHierarchyIncomingCallsRequest}}),
|
|
974
|
+
Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return h.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return h.CallHierarchyPrepareRequest}});const p=S3();Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return p.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return p.SemanticTokensRequest}}),Object.defineProperty(t,
|
|
975
|
+
"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return p.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return p.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return p.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return p.SemanticTokensRegistrationType}});const w=_3();Object.defineProperty(
|
|
976
|
+
t,"ShowDocumentRequest",{enumerable:!0,get:function(){return w.ShowDocumentRequest}});const v=P3();Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return v.LinkedEditingRangeRequest}});const g=x3();Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return g.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return g.DidCreateFilesNotification}}),Object.defineProperty(t,"Wil\
|
|
977
|
+
lCreateFilesRequest",{enumerable:!0,get:function(){return g.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return g.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return g.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return g.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,
|
|
978
|
+
get:function(){return g.WillDeleteFilesRequest}});const E=N3();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 D=I3();Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return D.TypeHierarchyPrepareRequest}}),Object.defineProperty(
|
|
979
|
+
t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return D.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return D.TypeHierarchySupertypesRequest}});const A=O3();Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return A.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return A.InlineValueRefreshRequest}});const N=F3();Object.defineProperty(
|
|
980
|
+
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 V=L3();Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return V.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnost\
|
|
981
|
+
icReportKind",{enumerable:!0,get:function(){return V.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return V.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return V.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return V.DiagnosticRefreshRequest}});const J=M3();Object.defineProperty(t,"NotebookCellKind",
|
|
982
|
+
{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.
|
|
983
|
+
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}}),
|
|
984
|
+
Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return J.DidCloseNotebookDocumentNotification}});const se=B3();Object.defineProperty(t,"InlineCompletionRequest",{enumerable:!0,get:function(){return se.InlineCompletionRequest}});var ie;(function(m){function k(y){const x=y;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(y){const x=y;return r.objectLiteral(
|
|
985
|
+
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(y){const x=y;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(y){if(!Array.isArray(y))return!1;for(let x of y)if(!r.string(x)&&!ie.is(x)&&!B.is(x))return!1;return!0}m.is=k})(T||(t.DocumentSelector=T={}));
|
|
986
|
+
var R;(function(m){m.method="client/registerCapability",m.messageDirection=e.MessageDirection.serverToClient,m.type=new e.ProtocolRequestType(m.method)})(R||(t.RegistrationRequest=R={}));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){
|
|
987
|
+
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 Q;(function(m){function k(y){const x=y;return x&&r.string(x.id)&&x.id.length>0}m.hasId=k})(Q||(t.StaticRegistrationOptions=Q={}));var z;(function(m){function k(y){const x=y;return x&&(x.documentSelector===null||T.is(x.documentSelector))}m.is=k})(z||
|
|
988
|
+
(t.TextDocumentRegistrationOptions=z={}));var C;(function(m){function k(x){const $=x;return r.objectLiteral($)&&($.workDoneProgress===void 0||r.boolean($.workDoneProgress))}m.is=k;function y(x){const $=x;return $&&r.boolean($.workDoneProgress)}m.hasWorkDoneProgress=y})(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){
|
|
989
|
+
m.unknownProtocolVersion=1})(ye||(t.InitializeErrorCodes=ye={}));var xe;(function(m){m.method="initialized",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolNotificationType(m.method)})(xe||(t.InitializedNotification=xe={}));var L;(function(m){m.method="shutdown",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType0(m.method)})(L||(t.ShutdownRequest=L={}));var H;(function(m){m.method="exit",m.messageDirection=e.MessageDirection.clientToServer,
|
|
990
|
+
m.type=new e.ProtocolNotificationType0(m.method)})(H||(t.ExitNotification=H={}));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.
|
|
991
|
+
type=new e.ProtocolNotificationType(m.method)})($e||(t.ShowMessageNotification=$e={}));var Ne;(function(m){m.method="window/showMessageRequest",m.messageDirection=e.MessageDirection.serverToClient,m.type=new e.ProtocolRequestType(m.method)})(Ne||(t.ShowMessageRequest=Ne={}));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\
|
|
992
|
+
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 he;(function(m){m.method="textDocument/didOpen",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolNotificationType(m.method)})(he||(t.DidOpenTextDocumentNotification=he={}));var U;(function(m){function k(x){let $=x;return $!=null&&
|
|
993
|
+
typeof $.text=="string"&&$.range!==void 0&&($.rangeLength===void 0||typeof $.rangeLength=="number")}m.isIncremental=k;function y(x){let $=x;return $!=null&&typeof $.text=="string"&&$.range===void 0&&$.rangeLength===void 0}m.isFull=y})(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 Ve;(function(m){
|
|
994
|
+
m.method="textDocument/didClose",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolNotificationType(m.method)})(Ve||(t.DidCloseTextDocumentNotification=Ve={}));var st;(function(m){m.method="textDocument/didSave",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolNotificationType(m.method)})(st||(t.DidSaveTextDocumentNotification=st={}));var ue;(function(m){m.Manual=1,m.AfterDelay=2,m.FocusOut=3})(ue||(t.TextDocumentSaveReason=ue={}));var Ie;(function(m){
|
|
995
|
+
m.method="textDocument/willSave",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolNotificationType(m.method)})(Ie||(t.WillSaveTextDocumentNotification=Ie={}));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,
|
|
996
|
+
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 wt;(function(m){function k(y){const x=y;return r.objectLiteral(x)&&(n.URI.is(x.baseUri)||n.WorkspaceFolder.is(x.baseUri))&&r.string(x.pattern)}m.is=k})(wt||(t.RelativePattern=wt={}));var et;(function(m){m.Create=1,m.Change=2,m.Delete=4})(et||(t.WatchKind=et={}));var Xt;(function(m){m.method="textDocument/pub\
|
|
997
|
+
lishDiagnostics",m.messageDirection=e.MessageDirection.serverToClient,m.type=new e.ProtocolNotificationType(m.method)})(Xt||(t.PublishDiagnosticsNotification=Xt={}));var tn;(function(m){m.Invoked=1,m.TriggerCharacter=2,m.TriggerForIncompleteCompletions=3})(tn||(t.CompletionTriggerKind=tn={}));var yn;(function(m){m.method="textDocument/completion",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(yn||(t.CompletionRequest=yn={}));var X;(function(m){m.
|
|
998
|
+
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 pe;(function(m){m.Invoked=1,m.TriggerCharacter=2,m.ContentChange=3})(pe||(t.SignatureHelpTriggerKind=pe={}));var nn;(function(m){m.method="textDocument/sig\
|
|
999
|
+
natureHelp",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(nn||(t.SignatureHelpRequest=nn={}));var Yt;(function(m){m.method="textDocument/definition",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(Yt||(t.DefinitionRequest=Yt={}));var Nr;(function(m){m.method="textDocument/references",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(Nr||(t.ReferencesRequest=
|
|
1000
|
+
Nr={}));var Fi;(function(m){m.method="textDocument/documentHighlight",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(Fi||(t.DocumentHighlightRequest=Fi={}));var ds;(function(m){m.method="textDocument/documentSymbol",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(ds||(t.DocumentSymbolRequest=ds={}));var fs;(function(m){m.method="textDocument/codeAction",m.messageDirection=e.MessageDirection.clientToServer,
|
|
1001
|
+
m.type=new e.ProtocolRequestType(m.method)})(fs||(t.CodeActionRequest=fs={}));var hs;(function(m){m.method="codeAction/resolve",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(hs||(t.CodeActionResolveRequest=hs={}));var ps;(function(m){m.method="workspace/symbol",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(ps||(t.WorkspaceSymbolRequest=ps={}));var Li;(function(m){m.method="workspaceSymbol/reso\
|
|
1002
|
+
lve",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(Li||(t.WorkspaceSymbolResolveRequest=Li={}));var Mi;(function(m){m.method="textDocument/codeLens",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(Mi||(t.CodeLensRequest=Mi={}));var Pn;(function(m){m.method="codeLens/resolve",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(Pn||(t.CodeLensResolveRequest=
|
|
1003
|
+
Pn={}));var ms;(function(m){m.method="workspace/codeLens/refresh",m.messageDirection=e.MessageDirection.serverToClient,m.type=new e.ProtocolRequestType0(m.method)})(ms||(t.CodeLensRefreshRequest=ms={}));var gs;(function(m){m.method="textDocument/documentLink",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(gs||(t.DocumentLinkRequest=gs={}));var Ir;(function(m){m.method="documentLink/resolve",m.messageDirection=e.MessageDirection.clientToServer,m.
|
|
1004
|
+
type=new e.ProtocolRequestType(m.method)})(Ir||(t.DocumentLinkResolveRequest=Ir={}));var ys;(function(m){m.method="textDocument/formatting",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(ys||(t.DocumentFormattingRequest=ys={}));var Jr;(function(m){m.method="textDocument/rangeFormatting",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(Jr||(t.DocumentRangeFormattingRequest=Jr={}));var vs;(function(m){
|
|
1005
|
+
m.method="textDocument/rangesFormatting",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(vs||(t.DocumentRangesFormattingRequest=vs={}));var nr;(function(m){m.method="textDocument/onTypeFormatting",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(nr||(t.DocumentOnTypeFormattingRequest=nr={}));var yr;(function(m){m.Identifier=1})(yr||(t.PrepareSupportDefaultBehavior=yr={}));var Co;(function(m){m.method=
|
|
1006
|
+
"textDocument/rename",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(Co||(t.RenameRequest=Co={}));var q;(function(m){m.method="textDocument/prepareRename",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(q||(t.PrepareRenameRequest=q={}));var b;(function(m){m.method="workspace/executeCommand",m.messageDirection=e.MessageDirection.clientToServer,m.type=new e.ProtocolRequestType(m.method)})(b||(t.ExecuteCommandRequest=
|
|
1007
|
+
b={}));var _;(function(m){m.method="workspace/applyEdit",m.messageDirection=e.MessageDirection.serverToClient,m.type=new e.ProtocolRequestType("workspace/applyEdit")})(_||(t.ApplyWorkspaceEditRequest=_={}))}(ky)),ky}var dc={},wk;function j3(){if(wk)return dc;wk=1,Object.defineProperty(dc,"__esModule",{value:!0}),dc.createProtocolConnection=void 0;const t=Ks();function e(n,r,i,s){return t.ConnectionStrategy.is(s)&&(s={connectionStrategy:s}),(0,t.createMessageConnection)(n,r,i,s)}return dc.createProtocolConnection=
|
|
1008
|
+
e,dc}var bk;function G3(){return bk||(bk=1,function(t){var e=Vs&&Vs.__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=Vs&&Vs.__exportStar||function(s,o){for(var a in s)a!=="default"&&!Object.prototype.hasOwnProperty.call(o,a)&&e(o,s,a)};Object.defineProperty(
|
|
1009
|
+
t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,n(Ks(),t),n(Ry(),t),n(At(),t),n(q3(),t);var r=j3();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={}))}(Vs)),Vs}var Ek;function Lt(){return Ek||
|
|
1010
|
+
(Ek=1,function(t){var e=Ws&&Ws.__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=Ws&&Ws.__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.
|
|
1011
|
+
createProtocolConnection=void 0;const r=KR();n(KR(),t),n(G3(),t);function i(s,o,a,u){return(0,r.createMessageConnection)(s,o,a,u)}t.createProtocolConnection=i}(Ws)),Ws}var Jn={},$k;function Dk(){if($k)return Jn;$k=1,Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.generateUuid=Jn.parse=Jn.isUUID=Jn.v4=Jn.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(){
|
|
1012
|
+
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.
|
|
1013
|
+
_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"],Jn.empty=new t("00000000-0000-0000-0000-000000000000");function n(){return new e}Jn.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)}Jn.isUUID=i;function s(a){if(!i(a))throw new Error("invalid uuid");return new t(a)}Jn.parse=s;function o(){return n().asHex()}return Jn.generateUuid=
|
|
1014
|
+
o,Jn}var Ei={},Rk;function U3(){if(Rk)return Ei;Rk=1,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.attachPartialResult=Ei.ProgressFeature=Ei.attachWorkDone=void 0;const t=Lt(),e=Dk();class n{constructor(d,h){this._connection=d,this._token=h,n.Instances.set(this._token,this)}begin(d,h,p,w){let v={kind:"begin",title:d,percentage:h,message:p,cancellable:w};this._connection.sendProgress(t.WorkDoneProgress.type,this._token,v)}report(d,h){let p={kind:"report"};typeof d=="number"?(p.percentage=d,
|
|
1015
|
+
h!==void 0&&(p.message=h)):p.message=d,this._connection.sendProgress(t.WorkDoneProgress.type,this._token,p)}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,h){super(d,h),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(){}}
|
|
1016
|
+
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 h=d.workDoneToken;return delete d.workDoneToken,new n(f,h)}Ei.attachWorkDone=o;const a=f=>class extends f{constructor(){super(),this._progressSupported=!1}initialize(d){super.initialize(d),d?.window?.workDoneProgress===!0&&(this._progressSupported=
|
|
1017
|
+
!0,this.connection.onNotification(t.WorkDoneProgressCancelNotification.type,h=>{let p=n.Instances.get(h.token);(p instanceof r||p instanceof s)&&p.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)}};Ei.ProgressFeature=a;var u;(function(f){
|
|
1018
|
+
f.type=new t.ProgressType})(u||(u={}));class c{constructor(d,h){this._connection=d,this._token=h}report(d){this._connection.sendProgress(u.type,this._token,d)}}function l(f,d){if(d===void 0||d.partialResultToken===void 0)return;const h=d.partialResultToken;return delete d.partialResultToken,new c(f,h)}return Ei.attachPartialResult=l,Ei}var fc={},kk;function W3(){if(kk)return fc;kk=1,Object.defineProperty(fc,"__esModule",{value:!0}),fc.ConfigurationFeature=void 0;const t=Lt(),e=wy(),n=r=>class extends r{getConfiguration(i){
|
|
1019
|
+
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 fc.ConfigurationFeature=n,fc}var hc={},Tk;function z3(){if(Tk)return hc;Tk=1,Object.defineProperty(hc,"__esModule",{value:!0}),hc.WorkspaceFoldersFeature=void 0;const t=Lt(),e=n=>class extends n{constructor(){
|
|
1020
|
+
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(){
|
|
1021
|
+
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 pc={},Ck;function H3(){if(Ck)
|
|
1022
|
+
return pc;Ck=1,Object.defineProperty(pc,"__esModule",{value:!0}),pc.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.
|
|
1023
|
+
CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(i,(s,o)=>r(s,o,this.attachWorkDoneProgress(s),this.attachPartialResultProgress(i,s)))}}}};return pc.CallHierarchyFeature=e,pc}var $i={},Ak;function Sk(){if(Ak)return $i;Ak=1,Object.defineProperty($i,"__esModule",{value:!0}),$i.SemanticTokensBuilder=$i.SemanticTokensDiff=$i.SemanticTokensFeature=void 0;const t=Lt(),e=i=>class extends i{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(t.SemanticTokensRefreshRequest.
|
|
1024
|
+
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(
|
|
1025
|
+
o,a)))}}}};$i.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]?
|
|
1026
|
+
[{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}]:[]}}$i.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++]=
|
|
1027
|
+
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 $i.SemanticTokensBuilder=
|
|
1028
|
+
r,$i}var mc={},_k;function K3(){if(_k)return mc;_k=1,Object.defineProperty(mc,"__esModule",{value:!0}),mc.ShowDocumentFeature=void 0;const t=Lt(),e=n=>class extends n{showDocument(r){return this.connection.sendRequest(t.ShowDocumentRequest.type,r)}};return mc.ShowDocumentFeature=e,mc}var gc={},Pk;function V3(){if(Pk)return gc;Pk=1,Object.defineProperty(gc,"__esModule",{value:!0}),gc.FileOperationsFeature=void 0;const t=Lt(),e=n=>class extends n{onDidCreateFiles(r){return this.connection.onNotification(
|
|
1029
|
+
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(
|
|
1030
|
+
t.WillDeleteFilesRequest.type,(i,s)=>r(i,s))}};return gc.FileOperationsFeature=e,gc}var yc={},xk;function X3(){if(xk)return yc;xk=1,Object.defineProperty(yc,"__esModule",{value:!0}),yc.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 yc.LinkedEditingRangeFeature=e,yc}var vc={},Nk;function Y3(){if(Nk)return vc;Nk=1,Object.defineProperty(
|
|
1031
|
+
vc,"__esModule",{value:!0}),vc.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.
|
|
1032
|
+
connection.onRequest(i,(s,o)=>r(s,o,this.attachWorkDoneProgress(s),this.attachPartialResultProgress(i,s)))}}}};return vc.TypeHierarchyFeature=e,vc}var wc={},Ik;function J3(){if(Ik)return wc;Ik=1,Object.defineProperty(wc,"__esModule",{value:!0}),wc.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(
|
|
1033
|
+
i)))}}};return wc.InlineValueFeature=e,wc}var bc={},Ok;function Q3(){if(Ok)return bc;Ok=1,Object.defineProperty(bc,"__esModule",{value:!0}),bc.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 bc.FoldingRangeFeature=
|
|
1034
|
+
e,bc}var Ec={},Fk;function Z3(){if(Fk)return Ec;Fk=1,Object.defineProperty(Ec,"__esModule",{value:!0}),Ec.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 Ec.InlayHintFeature=e,Ec}var $c={},Lk;function eG(){
|
|
1035
|
+
if(Lk)return $c;Lk=1,Object.defineProperty($c,"__esModule",{value:!0}),$c.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(
|
|
1036
|
+
i,s,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(t.WorkspaceDiagnosticRequest.partialResult,i)))}}};return $c.DiagnosticFeature=e,$c}var Zs={},Dc={},Mk;function Bk(){if(Mk)return Dc;Mk=1,Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.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.
|
|
1037
|
+
_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=
|
|
1038
|
+
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}\
|
|
1039
|
+
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.
|
|
1040
|
+
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.
|
|
1041
|
+
dispose())})}}return Dc.TextDocuments=e,Dc}var qk;function jk(){if(qk)return Zs;qk=1,Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.NotebookDocuments=Zs.NotebookSyncFeature=void 0;const t=Lt(),e=Bk(),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.
|
|
1042
|
+
connection.onNotification(t.DidSaveNotebookDocumentNotification.type,a=>{o(a)}),onDidCloseNotebookDocument:o=>this.connection.onNotification(t.DidCloseNotebookDocumentNotification.type,a=>{o(a)})}}};Zs.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){
|
|
1043
|
+
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=
|
|
1044
|
+
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==
|
|
1045
|
+
"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)
|
|
1046
|
+
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 h=c.change;h.metadata!==void 0&&(d=!0,l.metadata=h.metadata);const p=[],w=[],v=[],g=[];if(h.cells!==void 0){const V=h.cells;if(V.structure!==void 0){const J=V.structure.
|
|
1047
|
+
array;if(l.cells.splice(J.start,J.deleteCount,...J.cells!==void 0?J.cells:[]),V.structure.didOpen!==void 0)for(const se of V.structure.didOpen)a.openTextDocument({textDocument:se}),p.push(se.uri);if(V.structure.didClose)for(const se of V.structure.didClose)a.closeTextDocument({textDocument:se}),w.push(se.uri)}if(V.data!==void 0){const J=new Map(V.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,
|
|
1048
|
+
ie);if(v.push({old:we[0],new:ie}),J.delete(ie.document),J.size===0)break}}}if(V.textContent!==void 0)for(const J of V.textContent)a.changeTextDocument({textDocument:J.document,contentChanges:J.changes}),g.push(J.document.uri)}this.updateCellMap(l);const E={notebookDocument:l};d&&(E.metadata={old:f,new:l.metadata});const D=[];for(const V of p)D.push(this.getNotebookCell(V));const A=[];for(const V of w)A.push(this.getNotebookCell(V));const N=[];for(const V of g)N.push(this.getNotebookCell(V));(D.length>
|
|
1049
|
+
0||A.length>0||v.length>0||N.length>0)&&(E.cells={added:D,removed:A,changed:{data:v,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.
|
|
1050
|
+
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 Zs.NotebookDocuments=i,Zs}var Rc={},Gk;function tG(){if(Gk)return Rc;Gk=1,Object.defineProperty(Rc,"__esModule",{value:!0}),Rc.MonikerFeature=void 0;const t=Lt(),e=n=>class extends n{get moniker(){
|
|
1051
|
+
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 Rc.MonikerFeature=e,Rc}var Uk;function Wk(){if(Uk)return Ze;Uk=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=
|
|
1052
|
+
Ze.combineConsoleFeatures=Ze._NotebooksImpl=Ze._LanguagesImpl=Ze.BulkUnregistration=Ze.BulkRegistration=Ze.ErrorMessageTracker=void 0;const t=Lt(),e=wy(),n=Dk(),r=U3(),i=W3(),s=z3(),o=H3(),a=Sk(),u=K3(),c=V3(),l=X3(),f=Y3(),d=J3(),h=Q3(),p=Z3(),w=eG(),v=jk(),g=tG();function E(de){if(de!==null)return de}class D{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(
|
|
1053
|
+
G)})}}Ze.ErrorMessageTracker=D;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){
|
|
1054
|
+
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 he={type:t.MessageType.Error,message:I,actions:G};return this.connection.sendRequest(
|
|
1055
|
+
t.ShowMessageRequest.type,he).then(E)}showWarningMessage(I,...G){let he={type:t.MessageType.Warning,message:I,actions:G};return this.connection.sendRequest(t.ShowMessageRequest.type,he).then(E)}showInformationMessage(I,...G){let he={type:t.MessageType.Info,message:I,actions:G};return this.connection.sendRequest(t.ShowMessageRequest.type,he).then(E)}}const V=(0,u.ShowDocumentFeature)((0,r.ProgressFeature)(N));var J;(function(de){function I(){return new se}de.create=I})(J||(Ze.BulkRegistration=J={}));
|
|
1056
|
+
class se{constructor(){this._registrations=[],this._registered=new Set}add(I,G){const he=e.string(I)?I:I.method;if(this._registered.has(he))throw new Error(`${he} is already added to this registration`);const U=n.generateUuid();this._registrations.push({id:U,method:he,registerOptions:G||{}}),this._registered.add(he)}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){
|
|
1057
|
+
this._connection=I,this._unregistrations=new Map,G.forEach(he=>{this._unregistrations.set(he.method,he)})}get isAttached(){return!!this._connection}attach(I){this._connection=I}add(I){this._unregistrations.set(I.method,I)}dispose(){let I=[];for(let he of this._unregistrations.values())I.push(he);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.
|
|
1058
|
+
method,he=this._unregistrations.get(G);if(!he)return!1;let U={unregisterations:[he]};return this._connection.sendRequest(t.UnregistrationRequest.type,U).then(()=>{this._unregistrations.delete(G)},fe=>{this._connection.console.info(`Un-registering request handler for ${he.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,he){
|
|
1059
|
+
return I instanceof se?this.registerMany(I):I instanceof we?this.registerSingle1(I,G,he):this.registerSingle2(I,G)}registerSingle1(I,G,he){const U=e.string(G)?G:G.method,fe=n.generateUuid();let Ve={registrations:[{id:fe,method:U,registerOptions:he||{}}]};return I.isAttached||I.attach(this.connection),this.connection.sendRequest(t.RegistrationRequest.type,Ve).then(st=>(I.add({id:fe,method:U}),I),st=>(this.connection.console.info(`Registering request handler for ${U} failed.`),Promise.reject(st)))}registerSingle2(I,G){
|
|
1060
|
+
const he=e.string(I)?I:I.method,U=n.generateUuid();let fe={registrations:[{id:U,method:he,registerOptions:G||{}}]};return this.connection.sendRequest(t.RegistrationRequest.type,fe).then(Ve=>t.Disposable.create(()=>{this.unregisterSingle(U,he).catch(()=>{this.connection.console.info(`Un-registering capability with id ${U} failed.`)})}),Ve=>(this.connection.console.info(`Registering request handler for ${he} failed.`),Promise.reject(Ve)))}unregisterSingle(I,G){let he={unregisterations:[{id:I,method:G}]};
|
|
1061
|
+
return this.connection.sendRequest(t.UnregistrationRequest.type,he).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(he=>({id:he.id,method:he.method}))),he=>(this.connection.console.info("Bulk registration failed."),Promise.reject(he)))}}class T{constructor(){}attach(I){this._connection=I}get connection(){
|
|
1062
|
+
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 he=G(I)?I:{edit:I};return this.connection.sendRequest(t.ApplyWorkspaceEditRequest.type,he)}}const R=(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)
|
|
1063
|
+
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){
|
|
1064
|
+
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)(
|
|
1065
|
+
this.connection,G)}}Ze._LanguagesImpl=P;const O=(0,h.FoldingRangeFeature)((0,g.MonikerFeature)((0,w.DiagnosticFeature)((0,p.InlayHintFeature)((0,d.InlineValueFeature)((0,f.TypeHierarchyFeature)((0,l.LinkedEditingRangeFeature)((0,a.SemanticTokensFeature)((0,o.CallHierarchyFeature)(P)))))))));class Q{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){
|
|
1066
|
+
return(0,r.attachWorkDone)(this.connection,I)}attachPartialResultProgress(I,G){return(0,r.attachPartialResult)(this.connection,G)}}Ze._NotebooksImpl=Q;const z=(0,v.NotebookSyncFeature)(Q);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 xe(de,I){return function(G){return I(de(G))}}Ze.combineClientFeatures=
|
|
1067
|
+
xe;function L(de,I){return function(G){return I(de(G))}}Ze.combineWindowFeatures=L;function H(de,I){return function(G){return I(de(G))}}Ze.combineWorkspaceFeatures=H;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,Ve){return U&&fe?Ve(U,fe):U||fe}return{__brand:"features",console:G(de.console,I.console,C),tracer:G(de.tracer,I.tracer,ye),telemetry:G(
|
|
1068
|
+
de.telemetry,I.telemetry,ne),client:G(de.client,I.client,xe),window:G(de.window,I.window,L),workspace:G(de.workspace,I.workspace,H),languages:G(de.languages,I.languages,Se),notebooks:G(de.notebooks,I.notebooks,le)}}Ze.combineFeatures=$e;function Ne(de,I,G){const he=G&&G.console?new(G.console(A)):new A,U=de(he);he.rawAttach(U);const fe=G&&G.tracer?new(G.tracer(M)):new M,Ve=G&&G.telemetry?new(G.telemetry(S)):new S,st=G&&G.client?new(G.client(B)):new B,ue=G&&G.window?new(G.window(V)):new V,Ie=G&&G.
|
|
1069
|
+
workspace?new(G.workspace(R)):new R,re=G&&G.languages?new(G.languages(O)):new O,De=G&&G.notebooks?new(G.notebooks(z)):new z,Ge=[he,fe,Ve,st,ue,Ie,re,De];function wt(X){return X instanceof Promise?X:e.thenable(X)?new Promise((Y,pe)=>{X.then(nn=>Y(nn),nn=>pe(nn))}):Promise.resolve(X)}let et,Xt,tn,yn={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 pe=e.string(X)?X:X.method;return U.sendNotification(
|
|
1070
|
+
pe,Y)},onNotification:(X,Y)=>U.onNotification(X,Y),onProgress:U.onProgress,sendProgress:U.sendProgress,onInitialize:X=>(Xt=X,{dispose:()=>{Xt=void 0}}),onInitialized:X=>U.onNotification(t.InitializedNotification.type,X),onShutdown:X=>(et=X,{dispose:()=>{et=void 0}}),onExit:X=>(tn=X,{dispose:()=>{tn=void 0}}),get console(){return he},get telemetry(){return Ve},get tracer(){return fe},get client(){return st},get window(){return ue},get workspace(){return Ie},get languages(){return re},get notebooks(){
|
|
1071
|
+
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.
|
|
1072
|
+
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,pe)=>X(Y,pe,(0,r.attachWorkDone)(U,Y),void 0)),onCompletion:X=>U.onRequest(t.CompletionRequest.type,(Y,pe)=>X(Y,pe,(0,r.attachWorkDone)(U,Y),
|
|
1073
|
+
(0,r.attachPartialResult)(U,Y))),onCompletionResolve:X=>U.onRequest(t.CompletionResolveRequest.type,X),onSignatureHelp:X=>U.onRequest(t.SignatureHelpRequest.type,(Y,pe)=>X(Y,pe,(0,r.attachWorkDone)(U,Y),void 0)),onDeclaration:X=>U.onRequest(t.DeclarationRequest.type,(Y,pe)=>X(Y,pe,(0,r.attachWorkDone)(U,Y),(0,r.attachPartialResult)(U,Y))),onDefinition:X=>U.onRequest(t.DefinitionRequest.type,(Y,pe)=>X(Y,pe,(0,r.attachWorkDone)(U,Y),(0,r.attachPartialResult)(U,Y))),onTypeDefinition:X=>U.onRequest(
|
|
1074
|
+
t.TypeDefinitionRequest.type,(Y,pe)=>X(Y,pe,(0,r.attachWorkDone)(U,Y),(0,r.attachPartialResult)(U,Y))),onImplementation:X=>U.onRequest(t.ImplementationRequest.type,(Y,pe)=>X(Y,pe,(0,r.attachWorkDone)(U,Y),(0,r.attachPartialResult)(U,Y))),onReferences:X=>U.onRequest(t.ReferencesRequest.type,(Y,pe)=>X(Y,pe,(0,r.attachWorkDone)(U,Y),(0,r.attachPartialResult)(U,Y))),onDocumentHighlight:X=>U.onRequest(t.DocumentHighlightRequest.type,(Y,pe)=>X(Y,pe,(0,r.attachWorkDone)(U,Y),(0,r.attachPartialResult)(U,
|
|
1075
|
+
Y))),onDocumentSymbol:X=>U.onRequest(t.DocumentSymbolRequest.type,(Y,pe)=>X(Y,pe,(0,r.attachWorkDone)(U,Y),(0,r.attachPartialResult)(U,Y))),onWorkspaceSymbol:X=>U.onRequest(t.WorkspaceSymbolRequest.type,(Y,pe)=>X(Y,pe,(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,pe)=>X(Y,pe,(0,r.attachWorkDone)(U,Y),(0,r.attachPartialResult)(U,Y))),onCodeActionResolve:X=>U.
|
|
1076
|
+
onRequest(t.CodeActionResolveRequest.type,(Y,pe)=>X(Y,pe)),onCodeLens:X=>U.onRequest(t.CodeLensRequest.type,(Y,pe)=>X(Y,pe,(0,r.attachWorkDone)(U,Y),(0,r.attachPartialResult)(U,Y))),onCodeLensResolve:X=>U.onRequest(t.CodeLensResolveRequest.type,(Y,pe)=>X(Y,pe)),onDocumentFormatting:X=>U.onRequest(t.DocumentFormattingRequest.type,(Y,pe)=>X(Y,pe,(0,r.attachWorkDone)(U,Y),void 0)),onDocumentRangeFormatting:X=>U.onRequest(t.DocumentRangeFormattingRequest.type,(Y,pe)=>X(Y,pe,(0,r.attachWorkDone)(U,Y),
|
|
1077
|
+
void 0)),onDocumentOnTypeFormatting:X=>U.onRequest(t.DocumentOnTypeFormattingRequest.type,(Y,pe)=>X(Y,pe)),onRenameRequest:X=>U.onRequest(t.RenameRequest.type,(Y,pe)=>X(Y,pe,(0,r.attachWorkDone)(U,Y),void 0)),onPrepareRename:X=>U.onRequest(t.PrepareRenameRequest.type,(Y,pe)=>X(Y,pe)),onDocumentLinks:X=>U.onRequest(t.DocumentLinkRequest.type,(Y,pe)=>X(Y,pe,(0,r.attachWorkDone)(U,Y),(0,r.attachPartialResult)(U,Y))),onDocumentLinkResolve:X=>U.onRequest(t.DocumentLinkResolveRequest.type,(Y,pe)=>X(Y,
|
|
1078
|
+
pe)),onDocumentColor:X=>U.onRequest(t.DocumentColorRequest.type,(Y,pe)=>X(Y,pe,(0,r.attachWorkDone)(U,Y),(0,r.attachPartialResult)(U,Y))),onColorPresentation:X=>U.onRequest(t.ColorPresentationRequest.type,(Y,pe)=>X(Y,pe,(0,r.attachWorkDone)(U,Y),(0,r.attachPartialResult)(U,Y))),onFoldingRanges:X=>U.onRequest(t.FoldingRangeRequest.type,(Y,pe)=>X(Y,pe,(0,r.attachWorkDone)(U,Y),(0,r.attachPartialResult)(U,Y))),onSelectionRanges:X=>U.onRequest(t.SelectionRangeRequest.type,(Y,pe)=>X(Y,pe,(0,r.attachWorkDone)(
|
|
1079
|
+
U,Y),(0,r.attachPartialResult)(U,Y))),onExecuteCommand:X=>U.onRequest(t.ExecuteCommandRequest.type,(Y,pe)=>X(Y,pe,(0,r.attachWorkDone)(U,Y),void 0)),dispose:()=>U.dispose()};for(let X of Ge)X.attach(yn);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(Xt){let Y=Xt(X,new t.CancellationTokenSource().token,(0,r.attachWorkDone)(U,X),void 0);return wt(Y).then(pe=>{if(pe instanceof t.
|
|
1080
|
+
ResponseError)return pe;let nn=pe;nn||(nn={capabilities:{}});let Yt=nn.capabilities;Yt||(Yt={},nn.capabilities=Yt),Yt.textDocumentSync===void 0||Yt.textDocumentSync===null?Yt.textDocumentSync=e.number(yn.__textDocumentSync)?yn.__textDocumentSync:t.TextDocumentSyncKind.None:!e.number(Yt.textDocumentSync)&&!e.number(Yt.textDocumentSync.change)&&(Yt.textDocumentSync.change=e.number(yn.__textDocumentSync)?yn.__textDocumentSync:t.TextDocumentSyncKind.None);for(let Nr of Ge)Nr.fillServerCapabilities(Yt);
|
|
1081
|
+
return nn})}else{let Y={capabilities:{textDocumentSync:t.TextDocumentSyncKind.None}};for(let pe of Ge)pe.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{tn&&tn()}finally{I.shutdownReceived?I.exit(0):I.exit(1)}}),U.onNotification(t.SetTraceNotification.type,X=>{fe.trace=t.Trace.fromString(X.value)}),yn}return Ze.createConnection=
|
|
1082
|
+
Ne,Ze}var Sn={},zk;function nG(){if(zk)return Sn;zk=1,Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.resolveModulePath=Sn.FileSystem=Sn.resolveGlobalYarnPath=Sn.resolveGlobalNodePath=Sn.resolve=Sn.uriToFilePath=void 0;const t=w_,e=qi,n=Fa,r=b_;function i(f){let d=t.parse(f);if(d.protocol!=="file:"||!d.path)return;let h=d.path.split("/");for(var p=0,w=h.length;p<w;p++)h[p]=decodeURIComponent(h[p]);if(process.platform==="win32"&&h.length>1){let v=h[0],g=h[1];v.length===0&&g.length>1&&g[1]===
|
|
1083
|
+
":"&&h.shift()}return e.normalize(h.join("/"))}Sn.uriToFilePath=i;function s(){return process.platform==="win32"}function o(f,d,h,p){const w="NODE_PATH",v=["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((g,E)=>{let D=process.env,A=Object.create(null);Object.keys(D).forEach(N=>A[N]=D[N]),
|
|
1084
|
+
d&&n.existsSync(d)&&(A[w]?A[w]=d+e.delimiter+A[w]:A[w]=d,p&&p(`NODE_PATH value is: ${A[w]}`)),A.ELECTRON_RUN_AS_NODE="1";try{let N=(0,r.fork)("",[],{cwd:h,env:A,execArgv:["-e",v]});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?g(J.r):E(new Error(`Failed to resolve module: ${f}`)))});let V={c:"rs",a:f};N.send(V)}catch(N){E(N)}})}Sn.resolve=o;function a(f){let d="npm";const h=Object.
|
|
1085
|
+
create(null);Object.keys(process.env).forEach(v=>h[v]=process.env[v]),h.NO_UPDATE_NOTIFIER="true";const p={encoding:"utf8",env:h};s()&&(d="npm.cmd",p.shell=!0);let w=()=>{};try{process.on("SIGPIPE",w);let v=(0,r.spawnSync)(d,["config","get","prefix"],p).stdout;if(!v){f&&f("'npm config get prefix' didn't return a value.");return}let g=v.trim();return f&&f(`'npm config get prefix' value is: ${g}`),g.length>0?s()?e.join(g,"node_modules"):e.join(g,"lib","node_modules"):void 0}catch{return}finally{process.
|
|
1086
|
+
removeListener("SIGPIPE",w)}}Sn.resolveGlobalNodePath=a;function u(f){let d="yarn",h={encoding:"utf8"};s()&&(d="yarn.cmd",h.shell=!0);let p=()=>{};try{process.on("SIGPIPE",p);let w=(0,r.spawnSync)(d,["global","dir","--json"],h),v=w.stdout;if(!v){f&&(f("'yarn global dir' didn't return a value."),w.stderr&&f(w.stderr));return}let g=v.trim().split(/\r?\n/);for(let E of g)try{let D=JSON.parse(E);if(D.type==="log")return e.join(D.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener(
|
|
1087
|
+
"SIGPIPE",p)}}Sn.resolveGlobalYarnPath=u;var c;(function(f){let d;function h(){return d!==void 0||(process.platform==="win32"?d=!1:d=!n.existsSync(__filename.toUpperCase())||!n.existsSync(__filename.toLowerCase())),d}f.isCaseSensitive=h;function p(w,v){return h()?e.normalize(v).indexOf(e.normalize(w))===0:e.normalize(v).toLowerCase().indexOf(e.normalize(w).toLowerCase())===0}f.isParent=p})(c||(Sn.FileSystem=c={}));function l(f,d,h,p){return h?(e.isAbsolute(h)||(h=e.join(f,h)),o(d,h,h,p).then(w=>c.
|
|
1088
|
+
isParent(h,w)?w:Promise.reject(new Error(`Failed to load ${d} from node path location.`))).then(void 0,w=>o(d,a(p),f,p))):o(d,a(p),f,p)}return Sn.resolveModulePath=l,Sn}var Cy,Hk;function Kk(){return Hk||(Hk=1,Cy=Lt()),Cy}var eo={},kc={},Vk;function rG(){if(Vk)return kc;Vk=1,Object.defineProperty(kc,"__esModule",{value:!0}),kc.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,
|
|
1089
|
+
this.attachWorkDoneProgress(i)))}}};return kc.InlineCompletionFeature=e,kc}var Xk;function iG(){return Xk||(Xk=1,function(t){var e=eo&&eo.__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=eo&&eo.__exportStar||function(u,c){for(var l in u)l!=="default"&&
|
|
1090
|
+
!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=Sk();Object.defineProperty(t,"SemanticTokensBuilder",{enumerable:!0,get:function(){return r.SemanticTokensBuilder}});const i=rG();n(Lt(),t);const s=Bk();Object.defineProperty(t,"TextDocuments",{enumerable:!0,get:function(){return s.TextDocuments}});const o=jk();Object.defineProperty(t,"NotebookDocument\
|
|
1091
|
+
s",{enumerable:!0,get:function(){return o.NotebookDocuments}}),n(Wk(),t);var a;(function(u){u.all={__brand:"features",languages:i.InlineCompletionFeature}})(a||(t.ProposedFeatures=a={}))}(eo)),eo}var Yk;function Jk(){return Yk||(Yk=1,function(t){var e=Us&&Us.__createBinding||(Object.create?function(g,E,D,A){A===void 0&&(A=D);var N=Object.getOwnPropertyDescriptor(E,D);(!N||("get"in N?!E.__esModule:N.writable||N.configurable))&&(N={enumerable:!0,get:function(){return E[D]}}),Object.defineProperty(
|
|
1092
|
+
g,A,N)}:function(g,E,D,A){A===void 0&&(A=D),g[A]=E[D]}),n=Us&&Us.__exportStar||function(g,E){for(var D in g)D!=="default"&&!Object.prototype.hasOwnProperty.call(E,D)&&e(E,g,D)};Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=t.Files=void 0;const r=h_,i=wy(),s=Wk(),o=nG(),a=Kk();n(Kk(),t),n(iG(),t);var u;(function(g){g.uriToFilePath=o.uriToFilePath,g.resolveGlobalNodePath=o.resolveGlobalNodePath,g.resolveGlobalYarnPath=o.resolveGlobalYarnPath,g.resolve=o.resolve,g.resolveModulePath=
|
|
1093
|
+
o.resolveModulePath})(u||(t.Files=u={}));function c(){}let l=!1,f;function d(){const g="--clientProcessId";function E(D){try{let A=parseInt(D);isNaN(A)||(f=setInterval(()=>{try{process.kill(A,0)}catch{process.exit(l?0:1)}},3e3))}catch{}}for(let D=2;D<process.argv.length;D++){let A=process.argv[D];if(A===g&&D+1<process.argv.length){E(process.argv[D+1]);return}else{let N=A.split("=");N[0]===g&&E(N[1])}}}d();const h={initialize:g=>{const E=g.processId;i.number(E)&&f===void 0&&setInterval(()=>{try{process.
|
|
1094
|
+
kill(E,0)}catch{process.exit(l?0:1)}},3e3)},get shutdownReceived(){return l},set shutdownReceived(g){l=g},exit:g=>{process.exit(g)}};function p(g,E,D,A){let N,V,J,se;return g!==void 0&&g.__brand==="features"&&(N=g,g=E,E=D,D=A),a.ConnectionStrategy.is(g)||a.ConnectionOptions.is(g)?se=g:(V=g,J=E,se=D),w(V,J,se,N)}t.createConnection=p;function w(g,E,D,A){let N=!1;if(!g&&!E&&process.argv.length>2){let ie,we,B=process.argv.slice(2);for(let T=0;T<B.length;T++){let R=B[T];if(R==="--node-ipc"){g=new a.IPCMessageReader(
|
|
1095
|
+
process),E=new a.IPCMessageWriter(process);break}else if(R==="--stdio"){N=!0,g=process.stdin,E=process.stdout;break}else if(R==="--socket"){ie=parseInt(B[T+1]);break}else if(R==="--pipe"){we=B[T+1];break}else{var V=R.split("=");if(V[0]==="--socket"){ie=parseInt(V[1]);break}else if(V[0]==="--pipe"){we=V[1];break}}}if(ie){let T=(0,a.createServerSocketTransport)(ie);g=T[0],E=T[1]}else if(we){let T=(0,a.createServerPipeTransport)(we);g=T[0],E=T[1]}}var J="Use arguments of createConnection or set com\
|
|
1096
|
+
mand line parameters: '--node-ipc', '--stdio' or '--socket={number}'";if(!g)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(g.read)&&i.func(g.on)){let ie=g;ie.on("end",()=>{process.exit(l?0:1)}),ie.on("close",()=>{process.exit(l?0:1)})}const se=ie=>{const we=(0,a.createProtocolConnection)(g,E,ie,D);return N&&v(ie),we};return(0,s.createConnection)(se,h,A)}function v(g){function E(A){return A.map(N=>typeof N=="str\
|
|
1097
|
+
ing"?N:(0,r.inspect)(N)).join(" ")}const D=new Map;console.assert=function(N,...V){if(!N)if(V.length===0)g.error("Assertion failed");else{const[J,...se]=V;g.error(`Assertion failed: ${J} ${E(se)}`)}},console.count=function(N="default"){const V=String(N);let J=D.get(V)??0;J+=1,D.set(V,J),g.log(`${V}: ${V}`)},console.countReset=function(N){N===void 0?D.clear():D.delete(String(N))},console.debug=function(...N){g.log(E(N))},console.dir=function(N,V){g.log((0,r.inspect)(N,V))},console.log=function(...N){
|
|
1098
|
+
g.log(E(N))},console.error=function(...N){g.error(E(N))},console.trace=function(...N){const V=new Error().stack.replace(/(.+\n){2}/,"");let J="Trace";N.length!==0&&(J+=`: ${E(N)}`),g.log(`${J}
|
|
1099
|
+
${V}`)},console.warn=function(...N){g.warn(E(N))}}}(Us)),Us}var ge=Jk();function Qk(t,e){const n={stacks:t,tokens:e};return sG(n),n.stacks.flat().forEach(i=>{i.property=void 0}),eT(n.stacks).map(i=>i[i.length-1])}function Ay(t){const{next:e,cardinalities:n,visited:r,plus:i}=t,s=[],o=e.feature;if(r.has(o))return[];Ui(o)||r.add(o);let a,u=o;for(;u.$container;)if(Ui(u.$container)){a=u.$container;break}else if(wm(u.$container))u=u.$container;else break;if(t0(u.cardinality)){const c=ea({next:{feature:u,
|
|
1100
|
+
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(...Zk({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(...Ay({next:{feature:a,type:e.type},cardinalities:n,visited:r,plus:i}))}return s}function Sy(t){return kt(t)&&(t={feature:t}),ea({next:t,cardinalities:new Map,visited:new Set,plus:new Set})}
|
|
1101
|
+
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(Ui(u))return o.has(u)?[]:(o.add(u),Zk(i,0,s,o,a).map(l=>dh(l,u.cardinality,s)));if(Rm(u)||km(u))return u.elements.flatMap(l=>ea({next:{feature:l,type:c,property:i.property},cardinalities:s,visited:o,plus:a})).map(l=>dh(l,u.cardinality,s));if(Lr(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,
|
|
1102
|
+
visited:o,plus:a}).map(f=>dh(f,u.cardinality,s))}else{if(ks(u))return Ay({next:{feature:u,type:Du(u),property:(n=i.property)!==null&&n!==void 0?n:u.feature},cardinalities:s,visited:o,plus:a});if(ti(u)&&fn(u.rule.ref)){const l=u.rule.ref,f={feature:l.definition,type:l.fragment||l.dataType?void 0:(r=Ts(l))!==null&&r!==void 0?r:l.name,property:i.property};return ea({next:f,cardinalities:s,visited:o,plus:a}).map(d=>dh(d,u.cardinality,s))}else return[i]}}function dh(t,e,n){return n.set(t.feature,e),t}
|
|
1103
|
+
function Zk(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 sG(t){for(const e of t.tokens){const n=eT(t.stacks,e);t.stacks=n}}function eT(t,e){const n=[];for(const r of t)n.push(...oG(r,e));return n}function oG(t,e){const n=new Map,r=new Set(t.map(s=>s.feature).filter(aG)),
|
|
1104
|
+
i=[];for(;t.length>0;){const s=t.pop(),o=Ay({next:s,cardinalities:n,plus:r,visited:new Set}).filter(a=>e?_y(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 aG(t){if(t.cardinality==="+")return!0;const e=Wn(t,Lr);return!!(e&&e.cardinality==="+")}function _y(t,e){if(Mr(t))return t.value===e.image;if(ti(t))return uG(t.rule.ref,e);if(au(t)){const n=Im(t);if(n)return _y(n,e)}return!1}function uG(t,e){return fn(
|
|
1105
|
+
t)?Sy(t.definition).some(r=>_y(r.feature,e)):ei(t)?Ru(t).test(e.image):!1}function cG(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 tT{constructor(e){this.scopeProvider=e.references.ScopeProvider,this.grammar=e.Grammar,this.completionParser=e.
|
|
1106
|
+
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=>Mr(c.feature)?c.feature.
|
|
1107
|
+
value:c.feature,u=[];for(const c of s)if(await Promise.all(Xe(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 Xe(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=tf(
|
|
1108
|
+
this.grammar),c=Sy({feature:u.definition,type:Ts(u)});return s.length>0?(s.shift(),Qk(c.map(l=>[l]),s)):c}const o=[...s].splice(i.tokenIndex);return Qk([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,D]=l,A=(r=gm(s,E))===null||r===void 0?void 0:r.astNode;yield Object.assign(Object.
|
|
1109
|
+
assign({},c),{node:A,tokenOffset:E,tokenEndOffset:D,features:this.findFeaturesAt(o,E)})}const{nextTokenStart:f,nextTokenEnd:d,previousTokenStart:h,previousTokenEnd:p}=this.backtrackToAnyToken(a,u);let w=f;u<=f&&h!==void 0&&(w=h);const v=(i=gm(s,w))===null||i===void 0?void 0:i.astNode;let g=!0;if(h!==void 0&&p!==void 0&&p===u&&(yield Object.assign(Object.assign({},c),{node:v,tokenOffset:h,tokenEndOffset:p,features:this.findFeaturesAt(o,h)}),g=this.performNextTokenCompletion(e,a.substring(h,p),h,p),
|
|
1110
|
+
g&&(yield Object.assign(Object.assign({},c),{node:v,tokenOffset:p,tokenEndOffset:p,features:this.findFeaturesAt(o,p)}))),v)g&&(yield Object.assign(Object.assign({},c),{node:v,tokenOffset:f,tokenEndOffset:d,features:this.findFeaturesAt(o,f)}));else{const E=tf(this.grammar);if(!E)throw new Error("Missing entry parser rule");yield Object.assign(Object.assign({},c),{tokenOffset:f,tokenEndOffset:d,features:Sy(E.definition)})}}performNextTokenCompletion(e,n,r,i){return new RegExp("\\P{L}$","u").test(n)}findDataTypeRuleStart(e,n){
|
|
1111
|
+
var r,i;let s=Rs(e,n,this.grammarConfig.nameRegexp),o=!!(!((r=Wn(s?.grammarSource,fn))===null||r===void 0)&&r.dataType);if(o){for(;o;)s=s?.container,o=!!(!((i=Wn(s?.grammarSource,fn))===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?
|
|
1112
|
+
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(Mr(n.feature))return this.completionForKeyword(e,n.feature,r);if(au(n.feature)&&e.node)return this.completionForCrossReference(
|
|
1113
|
+
e,n,r)}completionForCrossReference(e,n,r){const i=Wn(n.feature,Lr);let s=e.node;if(i&&s){n.type&&(s={$type:n.type,$container:s,$containerProperty:n.property},Am(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.
|
|
1114
|
+
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.
|
|
1115
|
+
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(
|
|
1116
|
+
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().
|
|
1117
|
+
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 lG{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=Rs(s,e.textDocument.offsetAt(n.position),this.grammarConfig.nameRegexp);if(o)return this.
|
|
1118
|
+
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=at(n.astNode);if(n&&r)return{source:e,target:n,targetDocument:r}}}}class nT{constructor(e){this.references=e.references.References,this.nameProvider=e.references.NameProvider,
|
|
1119
|
+
this.grammarConfig=e.parser.GrammarConfig}getDocumentHighlight(e,n,r){const i=e.parseResult.value.$cstNode;if(!i)return;const s=Rs(i,e.textDocument.offsetAt(n.position),this.grammarConfig.nameRegexp);if(!s)return;const o=this.references.findDeclaration(s);if(o){const a=pt.equals(at(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.
|
|
1120
|
+
range)}}class dG{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){
|
|
1121
|
+
const r=[];for(const i of bu(n)){const s=this.getSymbol(e,i);r.push(...s)}if(r.length>0)return r}}class fG{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.
|
|
1122
|
+
LanguageServer.onInitialized(r=>{n&&this.registerFileWatcher(e)})}registerFileWatcher(e){const n=Xe(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.
|
|
1123
|
+
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([yt.parse(e.document.uri)],[])}didChangeWatchedFiles(e){const n=Xe(e.changes).filter(i=>i.type!==ge.FileChangeType.Deleted).distinct(i=>i.uri).map(i=>yt.parse(i.uri)).toArray(),r=Xe(e.changes).filter(i=>i.type===ge.FileChangeType.Deleted).distinct(i=>i.uri).map(i=>yt.parse(i.
|
|
1124
|
+
uri)).toArray();this.fireDocumentUpdate(n,r)}}class hG{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=qr(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)||
|
|
1125
|
+
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 k1(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.
|
|
1126
|
+
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 pG{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)===
|
|
1127
|
+
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 rT<=e&&e<=iT&&mG<=n&&n<=gG||e===sT&&n!==sT}toUpperCharCode(e){return rT<=e&&e<=iT?e-32:e}}const rT=97,iT=122,mG=65,gG=90,sT=95;class oT{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;
|
|
1128
|
+
if(s){const o=e.textDocument.offsetAt(n.position),a=Rs(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 yG extends oT{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 fh=Lt();const vG={[ge.SemanticTokenTypes.class]:0,[ge.
|
|
1129
|
+
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.
|
|
1130
|
+
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},wG={[ge.SemanticTokenModifiers.abstract]:1,[ge.SemanticTokenModifiers.async]:2,[ge.SemanticTokenModifiers.declaration]:4,[ge.SemanticTokenModifiers.defaultLibrary]:8,[ge.SemanticTokenModifiers.definition]:16,[ge.SemanticTokenModifiers.deprecated]:32,
|
|
1131
|
+
[ge.SemanticTokenModifiers.documentation]:64,[ge.SemanticTokenModifiers.modification]:128,[ge.SemanticTokenModifiers.readonly]:256,[ge.SemanticTokenModifiers.static]:512};function bG(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 \
|
|
1132
|
+
'${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 EG 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(){
|
|
1133
|
+
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 $G{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===
|
|
1134
|
+
void 0?void 0:r.semanticTokens)})}initialize(e){this.clientCapabilities=e}get tokenTypes(){return vG}get tokenModifiers(){return wG}get semanticTokensOptions(){return{legend:{tokenTypes:Object.keys(this.tokenTypes),tokenModifiers:Object.keys(this.tokenModifiers)},full:{delta:!0},range:!0}}async semanticHighlight(e,n,r=ht.CancellationToken.None){return this.currentRange=void 0,this.currentDocument=e,this.currentTokensBuilder=this.getDocumentTokensBuilder(e),this.currentTokensBuilder.flush(),await this.
|
|
1135
|
+
computeHighlighting(e,this.createAcceptor(),r),this.currentTokensBuilder.build()}async semanticHighlightRange(e,n,r=ht.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=ht.CancellationToken.None){return this.currentRange=void 0,this.currentDocument=e,
|
|
1136
|
+
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(
|
|
1137
|
+
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 EG;return this.tokensBuilders.set(e.uri.toString(),r),r}async computeHighlighting(e,n,r){const i=e.parseResult.value,s=ni(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;
|
|
1138
|
+
let s=e.modifier;if(this.currentRange&&!Pb(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.
|
|
1139
|
+
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 h=f;f=this.currentDocument.textDocument.offsetAt({line:d+1,character:0}),this.currentTokensBuilder.push(d,0,f-h-1,o,a)}this.currentTokensBuilder.push(c,0,r.end.character,
|
|
1140
|
+
o,a)}}highlightProperty(e){const n=[];if(typeof e.index=="number"){const s=hn(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=$u(n.$cstNode,r,s);u&&a.push(u)}else a.push(...Fm(n.$cstNode,r));for(const u of a)this.highlightNode({node:u,type:i,modifier:o})}highlightNode(e){
|
|
1141
|
+
const{node:n,type:r,modifier:i}=e,s=n.range;this.highlightToken({range:s,type:r,modifier:i})}}var aT;(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=[];
|
|
1142
|
+
for(let o=0;o<r.length;o+=i){const a=r.slice(o,o+i);s.push(a)}return s}})(aT||(aT={}));function DG(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 RG{constructor(e){this.onInitializeEmitter=new fh.Emitter,this.onInitializedEmitter=
|
|
1143
|
+
new fh.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(){hy(this.services),this.services.ServiceRegistry.all.forEach(e=>hy(e))}hasService(e){return this.services.ServiceRegistry.all.some(r=>e(r)!==void 0)}buildInitializeResult(e){
|
|
1144
|
+
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(z=>{var C;return(C=z.lsp)===null||C===void 0?void 0:C.Formatter}),l=u.map(z=>{var C,ne;return(ne=(C=z.lsp)===null||C===void 0?void 0:C.Formatter)===null||ne===void 0?void 0:ne.formatOnTypeOptions}).find(z=>!!z),f=this.hasService(z=>{var C;return(C=z.lsp)===null||C===void 0?void 0:C.CodeActionProvider}),
|
|
1145
|
+
d=this.hasService(z=>{var C;return(C=z.lsp)===null||C===void 0?void 0:C.SemanticTokenProvider}),h=bG(u.map(z=>{var C,ne;return(ne=(C=z.lsp)===null||C===void 0?void 0:C.SemanticTokenProvider)===null||ne===void 0?void 0:ne.semanticTokensOptions})),p=(i=(r=this.services.lsp)===null||r===void 0?void 0:r.ExecuteCommandHandler)===null||i===void 0?void 0:i.commands,w=this.hasService(z=>{var C;return(C=z.lsp)===null||C===void 0?void 0:C.DocumentLinkProvider}),v=DG(u.map(z=>{var C,ne;return(ne=(C=z.lsp)===
|
|
1146
|
+
null||C===void 0?void 0:C.SignatureHelp)===null||ne===void 0?void 0:ne.signatureHelpOptions})),g=this.hasService(z=>{var C;return(C=z.lsp)===null||C===void 0?void 0:C.TypeProvider}),E=this.hasService(z=>{var C;return(C=z.lsp)===null||C===void 0?void 0:C.ImplementationProvider}),D=this.hasService(z=>{var C;return(C=z.lsp)===null||C===void 0?void 0:C.CompletionProvider}),A=cG(u.map(z=>{var C,ne;return(ne=(C=z.lsp)===null||C===void 0?void 0:C.CompletionProvider)===null||ne===void 0?void 0:ne.completionOptions})),
|
|
1147
|
+
N=this.hasService(z=>{var C;return(C=z.lsp)===null||C===void 0?void 0:C.ReferencesProvider}),V=this.hasService(z=>{var C;return(C=z.lsp)===null||C===void 0?void 0:C.DocumentSymbolProvider}),J=this.hasService(z=>{var C;return(C=z.lsp)===null||C===void 0?void 0:C.DefinitionProvider}),se=this.hasService(z=>{var C;return(C=z.lsp)===null||C===void 0?void 0:C.DocumentHighlightProvider}),ie=this.hasService(z=>{var C;return(C=z.lsp)===null||C===void 0?void 0:C.FoldingRangeProvider}),we=this.hasService(z=>{
|
|
1148
|
+
var C;return(C=z.lsp)===null||C===void 0?void 0:C.HoverProvider}),B=this.hasService(z=>{var C;return(C=z.lsp)===null||C===void 0?void 0:C.RenameProvider}),T=this.hasService(z=>{var C;return(C=z.lsp)===null||C===void 0?void 0:C.CallHierarchyProvider}),R=this.hasService(z=>{var C;return(C=z.lsp)===null||C===void 0?void 0:C.TypeHierarchyProvider}),M=this.hasService(z=>{var C;return(C=z.lsp)===null||C===void 0?void 0:C.CodeLensProvider}),S=this.hasService(z=>{var C;return(C=z.lsp)===null||C===void 0?
|
|
1149
|
+
void 0:C.DeclarationProvider}),P=this.hasService(z=>{var C;return(C=z.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:p&&{commands:p},textDocumentSync:{change:fh.TextDocumentSyncKind.Incremental,openClose:!0,save:!!o.didSaveDocument,willSave:!!o.willSaveDocument,willSaveWaitUntil:!!o.willSaveDocumentWaitUntil},completionProvider:D?
|
|
1150
|
+
A:void 0,referencesProvider:N,documentSymbolProvider:V,definitionProvider:J,typeDefinitionProvider:g,documentHighlightProvider:se,codeActionProvider:f,documentFormattingProvider:c,documentRangeFormattingProvider:c,documentOnTypeFormattingProvider:l,foldingRangeProvider:ie,hoverProvider:we,renameProvider:B?{prepareProvider:!0}:void 0,semanticTokensProvider:d?h:void 0,signatureHelpProvider:v,implementationProvider:E,callHierarchyProvider:T?{}:void 0,typeHierarchyProvider:R?{}:void 0,documentLinkProvider:w?
|
|
1151
|
+
{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){
|
|
1152
|
+
const n=this.services.lsp.Connection,r=n?Object.assign(Object.assign({},e),{register:i=>n.client.register(fh.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 kG{getSymbolKind(e){
|
|
1153
|
+
return ge.SymbolKind.Field}getCompletionItemKind(e){return ge.CompletionItemKind.Reference}}class TG{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=Rs(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(
|
|
1154
|
+
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 CG{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=Rs(s,o,this.grammarConfig.nameRegexp);
|
|
1155
|
+
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=Bn.replace(f.segment.range,n.newName),h=f.sourceUri.toString();i[h]?i[h].push(d):i[h]=[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=Rs(r,i,this.grammarConfig.nameRegexp);if(!s)return;if(this.
|
|
1156
|
+
references.findDeclaration(s)||this.isNameNode(s))return s.range}}isNameNode(e){return e?.astNode&&th(e.astNode)&&e===this.nameProvider.getNameNode(e.astNode)}}class uT{constructor(e){this.indexManager=e.workspace.IndexManager,this.nodeKindProvider=e.lsp.NodeKindProvider,this.fuzzyMatcher=e.lsp.FuzzyMatcher}async getSymbols(e,n=ht.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.
|
|
1157
|
+
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 cT{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(){
|
|
1158
|
+
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){
|
|
1159
|
+
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,
|
|
1160
|
+
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.
|
|
1161
|
+
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(
|
|
1162
|
+
(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 AG{constructor(e){this.notebookDocuments=new Map,this.notebookCellMap=new Map,
|
|
1163
|
+
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 cT(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){
|
|
1164
|
+
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 Ia,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(e.notebooks.synchronization.onDidOpenNotebookDocument(i=>{const s=pt.normalize(i.notebookDocument.uri);this.notebookDocuments.
|
|
1165
|
+
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=[],h=[];
|
|
1166
|
+
if(c.cells!==void 0){const E=c.cells;if(E.structure!==void 0){const D=E.structure.array;if(o.cells.splice(D.start,D.deleteCount,...D.cells!==void 0?D.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 D=new Map(E.data.map(A=>[A.document,A]));for(let A=0;A<=o.cells.length;A++){const N=D.get(
|
|
1167
|
+
o.cells[A].document);if(N!==void 0){const V=o.cells.splice(A,1,N);if(d.push({old:V[0],new:N}),D.delete(N.document),D.size===0)break}}}if(E.textContent!==void 0)for(const D of E.textContent)n.changeTextDocument({textDocument:D.document,contentChanges:D.changes}),h.push(D.document.uri)}this.updateCellMap(o);const p={notebookDocument:o};u&&(p.metadata={old:a,new:o.metadata});const w=[];for(const E of l)w.push(this.getNotebookCell(E));const v=[];for(const E of f)v.push(this.getNotebookCell(E));const g=[];
|
|
1168
|
+
for(const E of h)g.push(this.getNotebookCell(E));(w.length>0||v.length>0||d.length>0||g.length>0)&&(p.cells={added:w,removed:v,changed:{data:d,textContent:g}}),(p.metadata!==void 0||p.cells!==void 0)&&this._onDidChange.fire(p)})),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),
|
|
1169
|
+
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 Ia{onDidOpenTextDocument(e){return this.openHandler=e,ge.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(e){
|
|
1170
|
+
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 Ia.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return Ia.NULL_DISPOSE}onDidSaveTextDocument(){
|
|
1171
|
+
return Ia.NULL_DISPOSE}}Ia.NULL_DISPOSE=Object.freeze({dispose:()=>{}});function SG(t){return ih.merge(dR(t),_G(t))}function _G(t){return{lsp:{CompletionProvider:e=>new tT(e),DocumentSymbolProvider:e=>new dG(e),HoverProvider:e=>new yG(e),FoldingRangeProvider:e=>new hG(e),ReferencesProvider:e=>new TG(e),DefinitionProvider:e=>new lG(e),DocumentHighlightProvider:e=>new nT(e),RenameProvider:e=>new CG(e)},shared:()=>t.shared}}function PG(t){return ih.merge(fR(t),xG(t))}function xG(t){return{lsp:{Connection:()=>t.
|
|
1172
|
+
connection,LanguageServer:e=>new RG(e),DocumentUpdateHandler:e=>new fG(e),WorkspaceSymbolProvider:e=>new uT(e),NodeKindProvider:()=>new kG,FuzzyMatcher:()=>new pG},workspace:{TextDocuments:()=>new cT(eh),NotebookDocuments:e=>new AG(e.workspace.TextDocuments)}}}class NG{constructor(){this.collector=()=>{}}getNodeFormatter(e){return new IG(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){
|
|
1173
|
+
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.
|
|
1174
|
+
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),h=i.get(d),p=(l=c.options.priority)!==null&&l!==void 0?l:0,w=(f=h?.options.priority)!==null&&f!==void 0?f:0;(!h||w<=p)&&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=[];
|
|
1175
|
+
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=qr(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||
|
|
1176
|
+
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=Ds(f),h=this.nodeModeToKey(f,"prepend"),p=n.get(h);if(n.delete(h),p){const g=this.createTextEdit(
|
|
1177
|
+
c,f,p,s);for(const E of g)E&&this.insideRange(E.range,i)&&o.push(E)}const w=this.nodeModeToKey(f,"append"),v=n.get(w);if(n.delete(w),v){const g=S1(f);if(g){const E=this.createTextEdit(f,g,v,s);for(const D of E)D&&this.insideRange(D.range,i)&&o.push(D)}}if(!p&&f.hidden){const g=this.createHiddenTextEdits(c,f,void 0,s);for(const E of g)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===
|
|
1178
|
+
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),h=this.getIndentationCharacterCount(i,l)-f;if(h===0)return[];let p="";h>0&&(p=(i.options.insertSpaces?" ":" ").repeat(h));const w=n.text.split(`
|
|
1179
|
+
`);w[0]=c+w[0];for(let v=0;v<w.length;v++){const g=o+v,E={character:0,line:g};if(h>0)a.push({newText:p,range:{start:E,end:E}});else{const D=w[v];let A=0;for(;A<D.length;A++){const N=D.charAt(A);if(N!==" "&&N!==" ")break}a.push({newText:"",range:{start:E,end:{line:g,character:Math.min(A,Math.abs(h))}}})}}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){
|
|
1180
|
+
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.
|
|
1181
|
+
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)),Ds(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.
|
|
1182
|
+
fitIntoOptions(n,s,i);const a=(r.options.insertSpaces?" ".repeat(r.options.tabSize):" ").repeat(r.indentation);return{newText:`${`
|
|
1183
|
+
`.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:`${`
|
|
1184
|
+
`.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 _o(i,s=>this.iterateCst(s,n)):qa}iterateCst(e,n){if(!Gi(e))return qa;const r=n.indentation;
|
|
1185
|
+
return new en(()=>({index:0}),i=>i.index<e.content.length?{done:!1,value:e.content[i.index++]}:(n.indentation=r,Nn))}}class IG{constructor(e,n){this.astNode=e,this.collector=n}node(e){return new xr(e.$cstNode?[e.$cstNode]:[],this.collector)}nodes(...e){const n=[];for(const r of e)r.$cstNode&&n.push(r.$cstNode);return new xr(n,this.collector)}property(e,n){const r=hn(this.astNode.$cstNode,e,n);return new xr(r?[r]:[],this.collector)}properties(...e){const n=[];for(const r of e){const i=Io(this.astNode.
|
|
1186
|
+
$cstNode,r);n.push(...i)}return new xr(n,this.collector)}keyword(e,n){const r=$u(this.astNode.$cstNode,e,n);return new xr(r?[r]:[],this.collector)}keywords(...e){const n=[];for(const r of e){const i=Fm(this.astNode.$cstNode,r);n.push(...i)}return new xr(n,this.collector)}cst(e){return new xr([...e],this.collector)}interior(e,n){const r=e.nodes,i=n.nodes;if(r.length!==1||i.length!==1)return new xr([],this.collector);let s=r[0],o=i[0];if(s.offset>o.offset){const a=s;s=o,o=a}return new xr(_1(s,o),this.
|
|
1187
|
+
collector)}}class xr{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 xr(this.nodes.slice(e,n),this.collector)}}var Ji;(function(t){function e(...l){return{options:{},moves:l.flatMap(f=>f.moves).sort(c)}}t.fit=e;function n(l){
|
|
1188
|
+
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,h,p,w,v,g;const E=(d=l.lines)!==null&&d!==void 0?d:0,D=(h=f.lines)!==null&&h!==void 0?h:0,A=(p=
|
|
1189
|
+
l.tabs)!==null&&p!==void 0?p:0,N=(w=f.tabs)!==null&&w!==void 0?w:0,V=(v=l.characters)!==null&&v!==void 0?v:0,J=(g=f.characters)!==null&&g!==void 0?g:0;return E<D?-1:E>D?1:A<N?-1:A>N?1:V<J?-1:V>J?1:0}})(Ji||(Ji={}));var Py,lT;function OG(){return lT||(lT=1,Py=Jk()),Py}OG();var to={},Tc={},Cc={},no={},kr={},Di={},dT;function fT(){if(dT)return Di;dT=1,Object.defineProperty(Di,"__esModule",{value:!0}),Di.normalizePath=Di.convertSlashes=Di.cleanPath=void 0;const t=qi;function e(s){let o=(0,t.normalize)(
|
|
1190
|
+
s);return o.length>1&&o[o.length-1]===t.sep&&(o=o.substring(0,o.length-1)),o}Di.cleanPath=e;const n=/[\\/]/g;function r(s,o){return s.replace(n,o)}Di.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 Di.normalizePath=i,Di}var Ri={},hT;function FG(){if(hT)return Ri;hT=1,Object.defineProperty(
|
|
1191
|
+
Ri,"__esModule",{value:!0}),Ri.build=Ri.joinDirectoryPath=Ri.joinPathWithBasePath=void 0;const t=qi,e=fT();function n(a,u){return u+a}Ri.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}Ri.joinDirectoryPath=s;function o(a,u){const{relativePaths:c,includeBasePath:l}=u;return c&&a?r(a,u):l?n:i}return Ri.build=o,Ri}var Ac={},
|
|
1192
|
+
pT;function LG(){if(pT)return Ac;pT=1,Object.defineProperty(Ac,"__esModule",{value:!0}),Ac.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 Ac.
|
|
1193
|
+
build=s,Ac}var Sc={},mT;function MG(){if(mT)return Sc;mT=1,Object.defineProperty(Sc,"__esModule",{value:!0}),Sc.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 Sc.build=s,Sc}var _c={},gT;function BG(){if(gT)return _c;gT=1,Object.defineProperty(_c,"__esModule",{value:!0}),_c.build=
|
|
1194
|
+
void 0;const t=r=>r,e=()=>[""].slice(0,0);function n(r){return r.group?e:t}return _c.build=n,_c}var Pc={},yT;function qG(){if(yT)return Pc;yT=1,Object.defineProperty(Pc,"__esModule",{value:!0}),Pc.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 Pc.build=n,Pc}var ro={},vT;function jG(){if(vT)return ro;vT=1;var t=ro&&ro.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(ro,"__esModule",{value:!0}),
|
|
1195
|
+
ro.build=void 0;const e=t(Fa),n=qi,r=function(u,c,l){const{queue:f,options:{suppressErrors:d}}=c;f.enqueue(),e.default.realpath(u,(h,p)=>{if(h)return f.dequeue(d?null:h,c);e.default.stat(p,(w,v)=>{if(w)return f.dequeue(d?null:w,c);if(v.isDirectory()&&o(u,p,c))return f.dequeue(null,c);l(v,p),f.dequeue(null,c)})})},i=function(u,c,l){const{queue:f,options:{suppressErrors:d}}=c;f.enqueue();try{const h=e.default.realpathSync(u),p=e.default.statSync(h);if(p.isDirectory()&&o(u,h,c))return;l(p,h)}catch(h){
|
|
1196
|
+
if(!d)throw h}};function s(u,c){return!u.resolveSymlinks||u.excludeSymlinks?null:c?i:r}ro.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 h=l.symlinks.get(f);!!h&&(h===c||h.startsWith(c)||c.startsWith(h))?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 ro}var xc={},wT;function GG(){if(wT)return xc;wT=1,Object.defineProperty(xc,"__esModule",{value:!0}),
|
|
1197
|
+
xc.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,h){f(l&&!h?l:null,d)}function c(l,f){const{onlyCounts:d,group:h,maxFiles:p}=l;return d?f?t:i:h?f?e:a:p?f?r:o:f?n:s}return xc.
|
|
1198
|
+
build=c,xc}var io={},bT;function UG(){if(bT)return io;bT=1;var t=io&&io.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(io,"__esModule",{value:!0}),io.build=void 0;const e=t(Fa),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),
|
|
1199
|
+
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 io.build=s,io}var Nc={},ET;function WG(){if(ET)return Nc;ET=1,Object.defineProperty(Nc,"__esModule",{value:!0}),Nc.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 Nc.Queue=t,Nc}var Ic={},$T;function zG(){if($T)return Ic;$T=
|
|
1200
|
+
1,Object.defineProperty(Ic,"__esModule",{value:!0}),Ic.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 Ic.Counter=t,Ic}var DT;function RT(){if(DT)return kr;DT=1;var t=kr&&kr.__createBinding||(Object.create?function(v,g,E,D){D===void 0&&(D=E);var A=Object.getOwnPropertyDescriptor(g,E);(!A||("get"in A?!g.__esModule:A.
|
|
1201
|
+
writable||A.configurable))&&(A={enumerable:!0,get:function(){return g[E]}}),Object.defineProperty(v,D,A)}:function(v,g,E,D){D===void 0&&(D=E),v[D]=g[E]}),e=kr&&kr.__setModuleDefault||(Object.create?function(v,g){Object.defineProperty(v,"default",{enumerable:!0,value:g})}:function(v,g){v.default=g}),n=kr&&kr.__importStar||function(v){if(v&&v.__esModule)return v;var g={};if(v!=null)for(var E in v)E!=="default"&&Object.prototype.hasOwnProperty.call(v,E)&&t(g,v,E);return e(g,v),g};Object.defineProperty(
|
|
1202
|
+
kr,"__esModule",{value:!0}),kr.Walker=void 0;const r=qi,i=fT(),s=n(FG()),o=n(LG()),a=n(MG()),u=n(BG()),c=n(qG()),l=n(jG()),f=n(GG()),d=n(UG()),h=WG(),p=zG();class w{root;isSynchronous;state;joinPath;pushDirectory;pushFile;getArray;groupFiles;resolveSymlink;walkDirectory;callbackInvoker;constructor(g,E,D){this.isSynchronous=!D,this.callbackInvoker=f.build(E,this.isSynchronous),this.root=(0,i.normalizePath)(g,E),this.state={root:this.root.slice(0,-1),paths:[""].slice(0,0),groups:[],counts:new p.Counter,
|
|
1203
|
+
options:E,queue:new h.Queue((A,N)=>this.callbackInvoker(N,A,D)),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.
|
|
1204
|
+
state,null):null}walk=(g,E,D)=>{const{paths:A,options:{filters:N,resolveSymlinks:V,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 R=this.getArray(this.state.paths);for(let M=0;M<g.length;++M){const S=g[M];if(S.isFile()||S.isSymbolicLink()&&!V&&!J){const P=this.joinPath(S.name,E);this.pushFile(P,R,this.state.counts,N)}else if(S.isDirectory()){let P=s.joinDirectoryPath(S.name,E,
|
|
1205
|
+
this.state.options.pathSeparator);if(se&&se(S.name,P))continue;this.walkDirectory(this.state,P,P,D-1,this.walk)}else if(S.isSymbolicLink()&&this.resolveSymlink){let P=s.joinPathWithBasePath(S.name,E);this.resolveSymlink(P,this.state,(O,Q)=>{if(O.isDirectory()){if(Q=(0,i.normalizePath)(Q,this.state.options),se&&se(S.name,B?Q:P+T))return;this.walkDirectory(this.state,Q,B?Q:P+T,D-1,this.walk)}else{Q=B?Q:P;const z=(0,r.basename)(Q),C=(0,i.normalizePath)((0,r.dirname)(Q),this.state.options);Q=this.joinPath(
|
|
1206
|
+
z,C),this.pushFile(Q,R,this.state.counts,N)}})}}this.groupFiles(this.state.groups,E,R)}}return kr.Walker=w,kr}var kT;function HG(){if(kT)return no;kT=1,Object.defineProperty(no,"__esModule",{value:!0}),no.callback=no.promise=void 0;const t=RT();function e(r,i){return new Promise((s,o)=>{n(r,i,(a,u)=>{if(a)return o(a);s(u)})})}no.promise=e;function n(r,i,s){new t.Walker(r,i,s).start()}return no.callback=n,no}var Oc={},TT;function KG(){if(TT)return Oc;TT=1,Object.defineProperty(Oc,"__esModule",{value:!0}),
|
|
1207
|
+
Oc.sync=void 0;const t=RT();function e(n,r){return new t.Walker(n,r).start()}return Oc.sync=e,Oc}var CT;function VG(){if(CT)return Cc;CT=1,Object.defineProperty(Cc,"__esModule",{value:!0}),Cc.APIBuilder=void 0;const t=HG(),e=KG();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 Cc.APIBuilder=n,Cc}var xy={},Ny,AT;
|
|
1208
|
+
function hh(){if(AT)return Ny;AT=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})`,h=`(?!${n}{0,1}${u})`,p=`(?!${l})`,w=`[^.${s}]`,v=`${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:h,NO_DOTS_SLASH:p,QMARK_NO_DOT:w,STAR:v,START_ANCHOR:c,SEP:"/"},D={...E,SLASH_LITERAL:`[${t}]`,QMARK:e,STAR:`${e}\
|
|
1209
|
+
*?`,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",
|
|
1210
|
+
upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return Ny={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,
|
|
1211
|
+
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,
|
|
1212
|
+
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:"\
|
|
1213
|
+
(?:",close:")"}}},globChars(N){return N===!0?D:E}},Ny}var ST;function ph(){return ST||(ST=1,function(t){const{REGEX_BACKSLASH:e,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=hh();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.
|
|
1214
|
+
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}\
|
|
1215
|
+
(?:${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}}(xy)),xy}var Iy,_T;function XG(){if(_T)return Iy;_T=1;const t=ph(),{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:h,CHAR_RIGHT_PARENTHESES:p,
|
|
1216
|
+
CHAR_RIGHT_SQUARE_BRACKET:w}=hh(),v=D=>D===a||D===r,g=D=>{D.isPrefix!==!0&&(D.depth=D.isGlobstar?1/0:1)};return Iy=(D,A)=>{const N=A||{},V=D.length-1,J=N.parts===!0||N.scanToEnd===!0,se=[],ie=[],we=[];let B=D,T=-1,R=0,M=0,S=!1,P=!1,O=!1,Q=!1,z=!1,C=!1,ne=!1,ye=!1,xe=!1,L=!1,H=0,Se,le,$e={value:"",depth:0,isGlob:!1};const Ne=()=>T>=V,de=()=>B.charCodeAt(T+1),I=()=>(Se=le,B.charCodeAt(++T));for(;T<V;){le=I();let Ve;if(le===r){ne=$e.backslashes=!0,le=I(),le===u&&(C=!0);continue}if(C===!0||le===u){for(H++;Ne()!==
|
|
1217
|
+
!0&&(le=I());){if(le===r){ne=$e.backslashes=!0,I();continue}if(le===u){H++;continue}if(C!==!0&&le===s&&(le=I())===s){if(S=$e.isBrace=!0,O=$e.isGlob=!0,L=!0,J===!0)continue;break}if(C!==!0&&le===i){if(S=$e.isBrace=!0,O=$e.isGlob=!0,L=!0,J===!0)continue;break}if(le===h&&(H--,H===0)){C=!1,S=$e.isBrace=!0,L=!0;break}}if(J===!0)continue;break}if(le===a){if(se.push(T),ie.push($e),$e={value:"",depth:0,isGlob:!1},L===!0)continue;if(Se===s&&T===R+1){R+=2;continue}M=T+1;continue}if(N.noext!==!0&&(le===f||
|
|
1218
|
+
le===n||le===e||le===d||le===o)===!0&&de()===c){if(O=$e.isGlob=!0,Q=$e.isExtglob=!0,L=!0,le===o&&T===R&&(xe=!0),J===!0){for(;Ne()!==!0&&(le=I());){if(le===r){ne=$e.backslashes=!0,le=I();continue}if(le===p){O=$e.isGlob=!0,L=!0;break}}continue}break}if(le===e){if(Se===e&&(z=$e.isGlobstar=!0),O=$e.isGlob=!0,L=!0,J===!0)continue;break}if(le===d){if(O=$e.isGlob=!0,L=!0,J===!0)continue;break}if(le===l){for(;Ne()!==!0&&(Ve=I());){if(Ve===r){ne=$e.backslashes=!0,I();continue}if(Ve===w){P=$e.isBracket=!0,
|
|
1219
|
+
O=$e.isGlob=!0,L=!0;break}}if(J===!0)continue;break}if(N.nonegate!==!0&&le===o&&T===R){ye=$e.negated=!0,R++;continue}if(N.noparen!==!0&&le===c){if(O=$e.isGlob=!0,J===!0){for(;Ne()!==!0&&(le=I());){if(le===c){ne=$e.backslashes=!0,le=I();continue}if(le===p){L=!0;break}}continue}break}if(O===!0){if(L=!0,J===!0)continue;break}}N.noext===!0&&(Q=!1,O=!1);let G=B,he="",U="";R>0&&(he=B.slice(0,R),B=B.slice(R),M-=R),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!==
|
|
1220
|
+
B&&v(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:he,input:D,start:R,base:G,glob:U,isBrace:S,isBracket:P,isGlob:O,isExtglob:Q,isGlobstar:z,negated:ye,negatedExtglob:xe};if(N.tokens===!0&&(fe.maxDepth=0,v(le)||ie.push($e),fe.tokens=ie),N.parts===!0||N.tokens===!0){let Ve;for(let st=0;st<se.length;st++){const ue=Ve?Ve+1:R,Ie=se[st],re=D.slice(ue,Ie);N.tokens&&(st===0&&R!==0?(ie[st].isPrefix=!0,
|
|
1221
|
+
ie[st].value=he):ie[st].value=re,g(ie[st]),fe.maxDepth+=ie[st].depth),(st!==0||re!=="")&&we.push(re),Ve=Ie}if(Ve&&Ve+1<D.length){const st=D.slice(Ve+1);we.push(st),N.tokens&&(ie[ie.length-1].value=st,g(ie[ie.length-1]),fe.maxDepth+=ie[ie.length-1].depth)}fe.slashes=se,fe.parts=we}return fe},Iy}var Oy,PT;function YG(){if(PT)return Oy;PT=1;const t=hh(),e=ph(),{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==
|
|
1222
|
+
"function")return f.expandRange(...l,f);l.sort();const d=`[${l.join("-")}]`;try{new RegExp(d)}catch{return l.map(p=>e.escapeRegex(p)).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},h=typeof d.maxLength=="number"?Math.min(n,d.maxLength):n;let p=l.length;if(p>h)throw new SyntaxError(`Input length: ${p}, exceeds maximum allowed length: ${h}`);const w={
|
|
1223
|
+
type:"bos",value:"",output:d.prepend||""},v=[w],g=d.capture?"":"?:",E=t.globChars(d.windows),D=t.extglobChars(E),{DOT_LITERAL:A,PLUS_LITERAL:N,SLASH_LITERAL:V,ONE_CHAR:J,DOTS_SLASH:se,NO_DOT:ie,NO_DOT_SLASH:we,NO_DOTS_SLASH:B,QMARK:T,QMARK_NO_DOT:R,STAR:M,START_ANCHOR:S}=E,P=ue=>`(${g}(?:(?!${S}${ue.dot?se:A}).)*?)`,O=d.dot?"":ie,Q=d.dot?T:R;let z=d.bash===!0?P(d):M;d.capture&&(z=`(${z})`),typeof d.noext=="boolean"&&(d.noextglob=d.noext);const C={input:l,index:-1,start:0,dot:d.dot===!0,consumed:"",
|
|
1224
|
+
output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:v};l=e.removePrefix(l,C),p=l.length;const ne=[],ye=[],xe=[];let L=w,H;const Se=()=>C.index===p-1,le=C.peek=(ue=1)=>l[C.index+ue],$e=C.advance=()=>l[++C.index]||"",Ne=()=>l.slice(C.index+1),de=(ue="",Ie=0)=>{C.consumed+=ue,C.index+=Ie},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:
|
|
1225
|
+
(C.negated=!0,C.start++,!0)},he=ue=>{C[ue]++,xe.push(ue)},U=ue=>{C[ue]--,xe.pop()},fe=ue=>{if(L.type==="globstar"){const Ie=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"&&!Ie&&!re&&(C.output=C.output.slice(0,-L.output.length),L.type="star",L.value="*",L.output=z,C.output+=L.output)}if(ne.length&&ue.type!=="paren"&&(ne[ne.length-1].inner+=ue.value),(ue.value||ue.output)&&I(ue),L&&L.type===
|
|
1226
|
+
"text"&&ue.type==="text"){L.output=(L.output||L.value)+ue.value,L.value+=ue.value;return}ue.prev=L,v.push(ue),L=ue},Ve=(ue,Ie)=>{const re={...D[Ie],conditions:1,inner:""};re.prev=L,re.parens=C.parens,re.output=C.output;const De=(d.capture?"(":"")+re.open;he("parens"),fe({type:ue,value:Ie,output:C.output?"":J}),fe({type:"paren",extglob:!0,value:$e(),output:De}),ne.push(re)},st=ue=>{let Ie=ue.close+(d.capture?")":""),re;if(ue.type==="negate"){let De=z;if(ue.inner&&ue.inner.length>1&&ue.inner.includes(
|
|
1227
|
+
"/")&&(De=P(d)),(De!==z||Se()||/^\)+$/.test(Ne()))&&(Ie=ue.close=`)$))${De}`),ue.inner.includes("*")&&(re=Ne())&&/^\.[^\\/.]+$/.test(re)){const Ge=c(re,{...f,fastpaths:!1}).output;Ie=ue.close=`)${Ge})${De})`}ue.prev.type==="bos"&&(C.negatedExtglob=!0)}fe({type:"paren",extglob:!0,value:H,output:Ie}),U("parens")};if(d.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(l)){let ue=!1,Ie=l.replace(s,(re,De,Ge,wt,et,Xt)=>wt==="\\"?(ue=!0,re):wt==="?"?De?De+wt+(et?T.repeat(et.length):""):Xt===0?Q+(et?T.repeat(
|
|
1228
|
+
et.length):""):T.repeat(Ge.length):wt==="."?A.repeat(Ge.length):wt==="*"?De?De+wt+(et?z:""):z:De?re:`\\${re}`);return ue===!0&&(d.unescape===!0?Ie=Ie.replace(/\\/g,""):Ie=Ie.replace(/\\+/g,re=>re.length%2===0?"\\\\":re?"\\":"")),Ie===l&&d.contains===!0?(C.output=l,C):(C.output=e.wrapOutput(Ie,C,f),C)}for(;!Se();){if(H=$e(),H==="\0")continue;if(H==="\\"){const re=le();if(re==="/"&&d.bash!==!0||re==="."||re===";")continue;if(!re){H+="\\",fe({type:"text",value:H});continue}const De=/^\\+/.exec(Ne());
|
|
1229
|
+
let Ge=0;if(De&&De[0].length>2&&(Ge=De[0].length,C.index+=Ge,Ge%2!==0&&(H+="\\")),d.unescape===!0?H=$e():H+=$e(),C.brackets===0){fe({type:"text",value:H});continue}}if(C.brackets>0&&(H!=="]"||L.value==="["||L.value==="[^")){if(d.posix!==!1&&H===":"){const re=L.value.slice(1);if(re.includes("[")&&(L.posix=!0,re.includes(":"))){const De=L.value.lastIndexOf("["),Ge=L.value.slice(0,De),wt=L.value.slice(De+2),et=r[wt];if(et){L.value=Ge+et,C.backtrack=!0,$e(),!w.output&&v.indexOf(L)===1&&(w.output=J);
|
|
1230
|
+
continue}}}(H==="["&&le()!==":"||H==="-"&&le()==="]")&&(H=`\\${H}`),H==="]"&&(L.value==="["||L.value==="[^")&&(H=`\\${H}`),d.posix===!0&&H==="!"&&L.value==="["&&(H="^"),L.value+=H,I({value:H});continue}if(C.quotes===1&&H!=='"'){H=e.escapeRegex(H),L.value+=H,I({value:H});continue}if(H==='"'){C.quotes=C.quotes===1?0:1,d.keepQuotes===!0&&fe({type:"text",value:H});continue}if(H==="("){he("parens"),fe({type:"paren",value:H});continue}if(H===")"){if(C.parens===0&&d.strictBrackets===!0)throw new SyntaxError(
|
|
1231
|
+
u("opening","("));const re=ne[ne.length-1];if(re&&C.parens===re.parens+1){st(ne.pop());continue}fe({type:"paren",value:H,output:C.parens?")":"\\)"}),U("parens");continue}if(H==="["){if(d.nobracket===!0||!Ne().includes("]")){if(d.nobracket!==!0&&d.strictBrackets===!0)throw new SyntaxError(u("closing","]"));H=`\\${H}`}else he("brackets");fe({type:"bracket",value:H});continue}if(H==="]"){if(d.nobracket===!0||L&&L.type==="bracket"&&L.value.length===1){fe({type:"text",value:H,output:`\\${H}`});continue}
|
|
1232
|
+
if(C.brackets===0){if(d.strictBrackets===!0)throw new SyntaxError(u("opening","["));fe({type:"text",value:H,output:`\\${H}`});continue}U("brackets");const re=L.value.slice(1);if(L.posix!==!0&&re[0]==="^"&&!re.includes("/")&&(H=`/${H}`),L.value+=H,I({value:H}),d.literalBrackets===!1||e.hasRegexChars(re))continue;const De=e.escapeRegex(L.value);if(C.output=C.output.slice(0,-L.value.length),d.literalBrackets===!0){C.output+=De,L.value=De;continue}L.value=`(${g}${De}|${L.value})`,C.output+=L.value;continue}
|
|
1233
|
+
if(H==="{"&&d.nobrace!==!0){he("braces");const re={type:"brace",value:H,output:"(",outputIndex:C.output.length,tokensIndex:C.tokens.length};ye.push(re),fe(re);continue}if(H==="}"){const re=ye[ye.length-1];if(d.nobrace===!0||!re){fe({type:"text",value:H,output:H});continue}let De=")";if(re.dots===!0){const Ge=v.slice(),wt=[];for(let et=Ge.length-1;et>=0&&(v.pop(),Ge[et].type!=="brace");et--)Ge[et].type!=="dots"&&wt.unshift(Ge[et].value);De=a(wt,d),C.backtrack=!0}if(re.comma!==!0&&re.dots!==!0){const Ge=C.
|
|
1234
|
+
output.slice(0,re.outputIndex),wt=C.tokens.slice(re.tokensIndex);re.value=re.output="\\{",H=De="\\}",C.output=Ge;for(const et of wt)C.output+=et.output||et.value}fe({type:"brace",value:H,output:De}),U("braces"),ye.pop();continue}if(H==="|"){ne.length>0&&ne[ne.length-1].conditions++,fe({type:"text",value:H});continue}if(H===","){let re=H;const De=ye[ye.length-1];De&&xe[xe.length-1]==="braces"&&(De.comma=!0,re="|"),fe({type:"comma",value:H,output:re});continue}if(H==="/"){if(L.type==="dot"&&C.index===
|
|
1235
|
+
C.start+1){C.start=C.index+1,C.consumed="",C.output="",v.pop(),L=w;continue}fe({type:"slash",value:H,output:V});continue}if(H==="."){if(C.braces>0&&L.type==="dot"){L.value==="."&&(L.output=A);const re=ye[ye.length-1];L.type="dots",L.output+=H,L.value+=H,re.dots=!0;continue}if(C.braces+C.parens===0&&L.type!=="bos"&&L.type!=="slash"){fe({type:"text",value:H,output:A});continue}fe({type:"dot",value:H,output:A});continue}if(H==="?"){if(!(L&&L.value==="(")&&d.noextglob!==!0&&le()==="("&&le(2)!=="?"){
|
|
1236
|
+
Ve("qmark",H);continue}if(L&&L.type==="paren"){const De=le();let Ge=H;(L.value==="("&&!/[!=<:]/.test(De)||De==="<"&&!/<([!=]|\w+>)/.test(Ne()))&&(Ge=`\\${H}`),fe({type:"text",value:H,output:Ge});continue}if(d.dot!==!0&&(L.type==="slash"||L.type==="bos")){fe({type:"qmark",value:H,output:R});continue}fe({type:"qmark",value:H,output:T});continue}if(H==="!"){if(d.noextglob!==!0&&le()==="("&&(le(2)!=="?"||!/[!=<:]/.test(le(3)))){Ve("negate",H);continue}if(d.nonegate!==!0&&C.index===0){G();continue}}if(H===
|
|
1237
|
+
"+"){if(d.noextglob!==!0&&le()==="("&&le(2)!=="?"){Ve("plus",H);continue}if(L&&L.value==="("||d.regex===!1){fe({type:"plus",value:H,output:N});continue}if(L&&(L.type==="bracket"||L.type==="paren"||L.type==="brace")||C.parens>0){fe({type:"plus",value:H});continue}fe({type:"plus",value:N});continue}if(H==="@"){if(d.noextglob!==!0&&le()==="("&&le(2)!=="?"){fe({type:"at",extglob:!0,value:H,output:""});continue}fe({type:"text",value:H});continue}if(H!=="*"){(H==="$"||H==="^")&&(H=`\\${H}`);const re=i.
|
|
1238
|
+
exec(Ne());re&&(H+=re[0],C.index+=re[0].length),fe({type:"text",value:H});continue}if(L&&(L.type==="globstar"||L.star===!0)){L.type="star",L.star=!0,L.value+=H,L.output=z,C.backtrack=!0,C.globstar=!0,de(H);continue}let ue=Ne();if(d.noextglob!==!0&&/^\([^?]/.test(ue)){Ve("star",H);continue}if(L.type==="star"){if(d.noglobstar===!0){de(H);continue}const re=L.prev,De=re.prev,Ge=re.type==="slash"||re.type==="bos",wt=De&&(De.type==="star"||De.type==="globstar");if(d.bash===!0&&(!Ge||ue[0]&&ue[0]!=="/")){
|
|
1239
|
+
fe({type:"star",value:H,output:""});continue}const et=C.braces>0&&(re.type==="comma"||re.type==="brace"),Xt=ne.length&&(re.type==="pipe"||re.type==="paren");if(!Ge&&re.type!=="paren"&&!et&&!Xt){fe({type:"star",value:H,output:""});continue}for(;ue.slice(0,3)==="/**";){const tn=l[C.index+4];if(tn&&tn!=="/")break;ue=ue.slice(3),de("/**",3)}if(re.type==="bos"&&Se()){L.type="globstar",L.value+=H,L.output=P(d),C.output=L.output,C.globstar=!0,de(H);continue}if(re.type==="slash"&&re.prev.type!=="bos"&&!wt&&
|
|
1240
|
+
Se()){C.output=C.output.slice(0,-(re.output+L.output).length),re.output=`(?:${re.output}`,L.type="globstar",L.output=P(d)+(d.strictSlashes?")":"|$)"),L.value+=H,C.globstar=!0,C.output+=re.output+L.output,de(H);continue}if(re.type==="slash"&&re.prev.type!=="bos"&&ue[0]==="/"){const tn=ue[1]!==void 0?"|$":"";C.output=C.output.slice(0,-(re.output+L.output).length),re.output=`(?:${re.output}`,L.type="globstar",L.output=`${P(d)}${V}|${V}${tn})`,L.value+=H,C.output+=re.output+L.output,C.globstar=!0,de(
|
|
1241
|
+
H+$e()),fe({type:"slash",value:"/",output:""});continue}if(re.type==="bos"&&ue[0]==="/"){L.type="globstar",L.value+=H,L.output=`(?:^|${V}|${P(d)}${V})`,C.output=L.output,C.globstar=!0,de(H+$e()),fe({type:"slash",value:"/",output:""});continue}C.output=C.output.slice(0,-L.output.length),L.type="globstar",L.output=P(d),L.value+=H,C.output+=L.output,C.globstar=!0,de(H);continue}const Ie={type:"star",value:H,output:z};if(d.bash===!0){Ie.output=".*?",(L.type==="bos"||L.type==="slash")&&(Ie.output=O+Ie.
|
|
1242
|
+
output),fe(Ie);continue}if(L&&(L.type==="bracket"||L.type==="paren")&&d.regex===!0){Ie.output=H,fe(Ie);continue}(C.index===C.start||L.type==="slash"||L.type==="dot")&&(L.type==="dot"?(C.output+=we,L.output+=we):d.dot===!0?(C.output+=B,L.output+=B):(C.output+=O,L.output+=O),le()!=="*"&&(C.output+=J,L.output+=J)),fe(Ie)}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(
|
|
1243
|
+
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&&(L.type==="star"||L.type==="bracket")&&fe({type:"maybe_slash",value:"",output:`${V}?`}),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},h=typeof d.
|
|
1244
|
+
maxLength=="number"?Math.min(n,d.maxLength):n,p=l.length;if(p>h)throw new SyntaxError(`Input length: ${p}, exceeds maximum allowed length: ${h}`);l=o[l]||l;const{DOT_LITERAL:w,SLASH_LITERAL:v,ONE_CHAR:g,DOTS_SLASH:E,NO_DOT:D,NO_DOTS:A,NO_DOTS_SLASH:N,STAR:V,START_ANCHOR:J}=t.globChars(d.windows),se=d.dot?A:D,ie=d.dot?N:D,we=d.capture?"":"?:",B={negated:!1,prefix:""};let T=d.bash===!0?".*?":V;d.capture&&(T=`(${T})`);const R=O=>O.noglobstar===!0?T:`(${we}(?:(?!${J}${O.dot?E:w}).)*?)`,M=O=>{switch(O){case"\
|
|
1245
|
+
*":return`${se}${g}${T}`;case".*":return`${w}${g}${T}`;case"*.*":return`${se}${T}${w}${g}${T}`;case"*/*":return`${se}${T}${v}${g}${ie}${T}`;case"**":return se+R(d);case"**/*":return`(?:${se}${R(d)}${v})?${ie}${g}${T}`;case"**/*.*":return`(?:${se}${R(d)}${v})?${ie}${T}${w}${g}${T}`;case"**/.*":return`(?:${se}${R(d)}${v})?${w}${g}${T}`;default:{const Q=/^(.*?)\.(\w+)$/.exec(O);if(!Q)return;const z=M(Q[1]);return z?z+w+Q[2]:void 0}}},S=e.removePrefix(l,B);let P=M(S);return P&&d.strictSlashes!==!0&&
|
|
1246
|
+
(P+=`${v}?`),P},Oy=c,Oy}var Fy,xT;function NT(){if(xT)return Fy;xT=1;const t=XG(),e=YG(),n=ph(),r=hh(),i=o=>o&&typeof o=="object"&&!Array.isArray(o),s=(o,a,u=!1)=>{if(Array.isArray(o)){const v=o.map(E=>s(E,a,u));return E=>{for(const D of v){const A=D(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),h=d.state;delete d.state;
|
|
1247
|
+
let p=()=>!1;if(l.ignore){const v={...a,ignore:null,onMatch:null,onResult:null};p=s(l.ignore,v,u)}const w=(v,g=!1)=>{const{isMatch:E,match:D,output:A}=s.test(v,d,a,{glob:o,posix:f}),N={glob:o,state:h,regex:d,posix:f,input:v,output:A,match:D,isMatch:E};return typeof l.onResult=="function"&&l.onResult(N),E===!1?(N.isMatch=!1,g?N:!1):p(v)?(typeof l.onIgnore=="function"&&l.onIgnore(N),N.isMatch=!1,g?N:!1):(typeof l.onMatch=="function"&&l.onMatch(N),g?N:!0)};return u&&(w.state=h),w};return s.test=(o,a,u,{
|
|
1248
|
+
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 h=o===c,p=h&&d?d(o):o;return h===!1&&(p=d?d(o):o,h=p===c),(h===!1||f.capture===!0)&&(f.matchBase===!0||f.basename===!0?h=s.matchBase(o,a,u,l):h=a.exec(p)),{isMatch:!!h,match:h,output:p}},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.
|
|
1249
|
+
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 h=`${f}(?:${o.output})${d}`;o&&o.negated===!0&&(h=`^(?!${h}).*$`);const p=s.toRegex(h,a);return c===!0&&(p.state=o),p},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]==="*")&&
|
|
1250
|
+
(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,Fy=s,Fy}var Ly,IT;function JG(){if(IT)return Ly;IT=1;const t=NT(),e=ph();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),Ly=n,Ly}var OT;function QG(){if(OT)return Tc;OT=1,Object.defineProperty(
|
|
1251
|
+
Tc,"__esModule",{value:!0}),Tc.Builder=void 0;const t=qi,e=VG();var n=null;try{require.resolve("picomatch"),n=JG()}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(){
|
|
1252
|
+
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.
|
|
1253
|
+
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){
|
|
1254
|
+
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 Tc.Builder=r,Tc}var My={},FT;function ZG(){return FT||(FT=1,Object.defineProperty(My,"__esModule",{value:!0})),My}var LT;function e8(){return LT||(LT=
|
|
1255
|
+
1,function(t){var e=to&&to.__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=to&&to.__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=
|
|
1256
|
+
void 0;const r=QG();Object.defineProperty(t,"fdir",{enumerable:!0,get:function(){return r.Builder}}),n(ZG(),t)}(to)),to}var t8=e8();class n8{constructor(){this.encoding="utf-8"}readFile(e){return Aw.promises.readFile(e.fsPath,this.encoding)}async readDirectory(e){return(await Aw.promises.readdir(e.fsPath,{withFileTypes:!0})).map(r=>({dirent:r,isFile:r.isFile(),isDirectory:r.isDirectory(),uri:pt.joinPath(e,r.name)}))}}const mh="DeploymentElement";function gh(t){return K.isInstance(t,mh)}const By="\
|
|
1257
|
+
DeploymentNodeOrElementKind",yh="DeploymentViewRule";function r8(t){return K.isInstance(t,yh)}const Fc="DynamicViewRule";function qy(t){return K.isInstance(t,Fc)}const so="ElementProperty";function i8(t){return K.isInstance(t,so)}const jy="ExpressionV2";function s8(t){return K.isInstance(t,jy)}const Gy="ExtendElementProperty",vh="FqnExpr";function MT(t){return K.isInstance(t,vh)}const wh="FqnExprOrWhere";function BT(t){return K.isInstance(t,wh)}const bh="FqnExprOrWith";function qT(t){return K.isInstance(
|
|
1258
|
+
t,bh)}const Uy="FqnReferenceable",oo="LikeC4View";function Wy(t){return K.isInstance(t,oo)}const Eh="MetadataProperty";function Qi(t){return K.isInstance(t,Eh)}const zy="ModelReferenceable",ta="Referenceable",$h="RelationExpr";function Dh(t){return K.isInstance(t,$h)}const Rh="RelationExprOrWhere";function o8(t){return K.isInstance(t,Rh)}const kh="RelationExprOrWith";function a8(t){return K.isInstance(t,kh)}const Lc="RelationProperty",Th="RelationshipStyleProperty";function jT(t){return K.isInstance(
|
|
1259
|
+
t,Th)}const Hy="SizeProperty";function u8(t){return K.isInstance(t,Hy)}const na="StringProperty";function GT(t){return K.isInstance(t,na)}const ra="StyleProperty";function Ky(t){return K.isInstance(t,ra)}const Ch="ViewProperty";function c8(t){return K.isInstance(t,Ch)}const Mc="ViewRule";function l8(t){return K.isInstance(t,Mc)}const Ah="ViewRuleStyleOrGlobalRef";function Vy(t){return K.isInstance(t,Ah)}const Bc="WhereElement";function UT(t){return K.isInstance(t,Bc)}const qc="WhereElementExpres\
|
|
1260
|
+
sion";function d8(t){return K.isInstance(t,qc)}const WT="WhereExpression",Sh="WhereKindEqual";function f8(t){return K.isInstance(t,Sh)}const jc="WhereRelation";function zT(t){return K.isInstance(t,jc)}const Gc="WhereRelationExpression";function h8(t){return K.isInstance(t,Gc)}const _h="WhereTagEqual";function p8(t){return K.isInstance(t,_h)}const Uc="ArrowProperty";function Wc(t){return K.isInstance(t,Uc)}const zc="BorderProperty";function Ph(t){return K.isInstance(t,zc)}const Hc="ColorProperty";
|
|
1261
|
+
function ao(t){return K.isInstance(t,Hc)}const uo="CustomColor",xh="CustomElementProperties";function m8(t){return K.isInstance(t,xh)}const Nh="CustomRelationProperties";function g8(t){return K.isInstance(t,Nh)}const ki="DeployedInstance";function Qn(t){return K.isInstance(t,ki)}const Ih="DeployedInstanceBody";function HT(t){return K.isInstance(t,Ih)}const Tr="DeploymentNode";function qn(t){return K.isInstance(t,Tr)}const Oh="DeploymentNodeBody";function KT(t){return K.isInstance(t,Oh)}const Ti="\
|
|
1262
|
+
DeploymentNodeKind";function y8(t){return K.isInstance(t,Ti)}const Fh="DeploymentRelation";function Ci(t){return K.isInstance(t,Fh)}const Lh="DeploymentRelationBody";function v8(t){return K.isInstance(t,Lh)}const Kc="DeploymentView";function VT(t){return K.isInstance(t,Kc)}const Mh="DeploymentViewBody";function Xy(t){return K.isInstance(t,Mh)}const Vc="DeploymentViewRulePredicate";function ia(t){return K.isInstance(t,Vc)}const Xc="DeploymentViewRuleStyle";function Yc(t){return K.isInstance(t,Xc)}
|
|
1263
|
+
const Jc="DirectedRelationExpr";function w8(t){return K.isInstance(t,Jc)}const sa="DynamicView";function XT(t){return K.isInstance(t,sa)}const Bh="DynamicViewBody";function YT(t){return K.isInstance(t,Bh)}const Qc="DynamicViewGlobalPredicateRef";function JT(t){return K.isInstance(t,Qc)}const Zc="DynamicViewIncludePredicate";function QT(t){return K.isInstance(t,Zc)}const qh="DynamicViewParallelSteps";function Yy(t){return K.isInstance(t,qh)}const Jy="DynamicViewRef",jh="DynamicViewStep";function Qy(t){
|
|
1264
|
+
return K.isInstance(t,jh)}const Zn="Element";function pn(t){return K.isInstance(t,Zn)}const Gh="ElementBody";function Uh(t){return K.isInstance(t,Gh)}const Ai="ElementKind";function ZT(t){return K.isInstance(t,Ai)}const el="ElementKindExpression";function eC(t){return K.isInstance(t,el)}const Wh="ElementRef";function Zy(t){return K.isInstance(t,Wh)}const tl="ElementStringProperty";function nl(t){return K.isInstance(t,tl)}const rl="ElementStyleProperty";function oa(t){return K.isInstance(t,rl)}const il="\
|
|
1265
|
+
ElementTagExpression";function tC(t){return K.isInstance(t,il)}const aa="ElementView";function zh(t){return K.isInstance(t,aa)}const Hh="ElementViewBody";function ev(t){return K.isInstance(t,Hh)}const tv="ElementViewRef",Kh="Expressions";function nC(t){return K.isInstance(t,Kh)}const sl="ExtendDeployment";function co(t){return K.isInstance(t,sl)}const Vh="ExtendDeploymentBody";function rC(t){return K.isInstance(t,Vh)}const lo="ExtendElement";function ua(t){return K.isInstance(t,lo)}const Xh="Ext\
|
|
1266
|
+
endElementBody";function nv(t){return K.isInstance(t,Xh)}const Yh="FqnExpressions";function b8(t){return K.isInstance(t,Yh)}const ol="FqnExprWhere";function rv(t){return K.isInstance(t,ol)}const al="FqnExprWith";function Jh(t){return K.isInstance(t,al)}const Qh="FqnRef";function iC(t){return K.isInstance(t,Qh)}const ul="FqnRefExpr";function Zh(t){return K.isInstance(t,ul)}const ca="GlobalDynamicPredicateGroup";function cl(t){return K.isInstance(t,ca)}const la="GlobalPredicateGroup";function ll(t){
|
|
1267
|
+
return K.isInstance(t,la)}const da="Globals";function iv(t){return K.isInstance(t,da)}const ep="GlobalStyle";function fa(t){return K.isInstance(t,ep)}const tp="GlobalStyleGroup";function fo(t){return K.isInstance(t,tp)}const dl="GlobalStyleId",fl="IconProperty";function Zi(t){return K.isInstance(t,fl)}const es="Imported";function Vr(t){return K.isInstance(t,es)}const np="ImportsFromPoject";function sv(t){return K.isInstance(t,np)}const hl="IncomingRelationExpr";function E8(t){return K.isInstance(
|
|
1268
|
+
t,hl)}const pl="InOutRelationExpr";function sC(t){return K.isInstance(t,pl)}const Si="LibIcon";function $8(t){return K.isInstance(t,Si)}const rp="LikeC4Grammar";function oC(t){return K.isInstance(t,rp)}const ip="LikeC4Lib";function D8(t){return K.isInstance(t,ip)}const ml="LineProperty";function gl(t){return K.isInstance(t,ml)}const yl="LinkProperty";function sp(t){return K.isInstance(t,yl)}const vl="MetadataAttribute";function R8(t){return K.isInstance(t,vl)}const wl="MetadataBody";function k8(t){
|
|
1269
|
+
return K.isInstance(t,wl)}const ha="Model";function aC(t){return K.isInstance(t,ha)}const pa="ModelDeployments";function uC(t){return K.isInstance(t,pa)}const ma="ModelViews";function bl(t){return K.isInstance(t,ma)}const El="MultipleProperty";function ov(t){return K.isInstance(t,El)}const op="NavigateToProperty";function ap(t){return K.isInstance(t,op)}const $l="NotationProperty";function ga(t){return K.isInstance(t,$l)}const Dl="NotesProperty";function cC(t){return K.isInstance(t,Dl)}const Rl="\
|
|
1270
|
+
OpacityProperty";function up(t){return K.isInstance(t,Rl)}const kl="OutgoingRelationExpr";function lC(t){return K.isInstance(t,kl)}const Tl="PaddingSizeProperty";function av(t){return K.isInstance(t,Tl)}const cp="Relation";function _i(t){return K.isInstance(t,cp)}const lp="RelationBody";function T8(t){return K.isInstance(t,lp)}const Cl="RelationExprWhere";function uv(t){return K.isInstance(t,Cl)}const Al="RelationExprWith";function cv(t){return K.isInstance(t,Al)}const Sl="RelationNavigateToProp\
|
|
1271
|
+
erty";function _l(t){return K.isInstance(t,Sl)}const ts="RelationshipKind";function C8(t){return K.isInstance(t,ts)}const Pl="RelationStringProperty";function xl(t){return K.isInstance(t,Pl)}const Nl="RelationStyleProperty";function dp(t){return K.isInstance(t,Nl)}const Il="ShapeProperty";function fp(t){return K.isInstance(t,Il)}const Ol="ShapeSizeProperty";function lv(t){return K.isInstance(t,Ol)}const hp="SpecificationColor";function pp(t){return K.isInstance(t,hp)}const ya="SpecificationDeplo\
|
|
1272
|
+
ymentNodeKind";function va(t){return K.isInstance(t,ya)}const wa="SpecificationElementKind";function ba(t){return K.isInstance(t,wa)}const Fl="SpecificationElementStringProperty";function dv(t){return K.isInstance(t,Fl)}const Ea="SpecificationRelationshipKind";function $a(t){return K.isInstance(t,Ea)}const Ll="SpecificationRelationshipStringProperty";function dC(t){return K.isInstance(t,Ll)}const Da="SpecificationRule";function fC(t){return K.isInstance(t,Da)}const Ra="SpecificationTag";function mp(t){
|
|
1273
|
+
return K.isInstance(t,Ra)}const gp="StrictFqnElementRef";function fv(t){return K.isInstance(t,gp)}const yp="StrictFqnRef";function hC(t){return K.isInstance(t,yp)}const ns="Tag";function pC(t){return K.isInstance(t,ns)}const vp="Tags";function hv(t){return K.isInstance(t,vp)}const Ml="TextSizeProperty";function pv(t){return K.isInstance(t,Ml)}const mv="ViewRef",Bl="ViewRuleAutoLayout";function ql(t){return K.isInstance(t,Bl)}const jl="ViewRuleGlobalPredicateRef";function gv(t){return K.isInstance(
|
|
1274
|
+
t,jl)}const Gl="ViewRuleGlobalStyle";function yv(t){return K.isInstance(t,Gl)}const Ul="ViewRuleGroup";function wp(t){return K.isInstance(t,Ul)}const Wl="ViewRulePredicate";function zl(t){return K.isInstance(t,Wl)}const Hl="ViewRuleStyle";function ka(t){return K.isInstance(t,Hl)}const Kl="ViewStringProperty";function A8(t){return K.isInstance(t,Kl)}const Vl="WhereBinaryExpression";function S8(t){return K.isInstance(t,Vl)}const Xl="WhereElementKind";function _8(t){return K.isInstance(t,Xl)}const Yl="\
|
|
1275
|
+
WhereElementNegation";function mC(t){return K.isInstance(t,Yl)}const Jl="WhereElementTag";function P8(t){return K.isInstance(t,Jl)}const Ql="WhereRelationKind";function gC(t){return K.isInstance(t,Ql)}const Zl="WhereRelationNegation";function yC(t){return K.isInstance(t,Zl)}const ed="WhereRelationParticipantKind";function vC(t){return K.isInstance(t,ed)}const td="WhereRelationParticipantTag";function wC(t){return K.isInstance(t,td)}const nd="WhereRelationTag";function x8(t){return K.isInstance(t,
|
|
1276
|
+
nd)}const rd="WildcardExpression";function bC(t){return K.isInstance(t,rd)}class EC extends Sb{getAllTypes(){return[Uc,zc,Hc,uo,xh,Nh,ki,Ih,mh,Tr,Oh,Ti,By,Fh,Lh,Kc,Mh,yh,Vc,Xc,Jc,sa,Bh,Qc,Zc,qh,Jy,Fc,jh,Zn,Gh,Ai,el,so,Wh,tl,rl,il,aa,Hh,tv,jy,Kh,sl,Vh,lo,Xh,Gy,vh,wh,bh,ol,al,Yh,Qh,ul,Uy,ca,la,ep,tp,dl,da,fl,es,np,pl,hl,Si,rp,ip,oo,ml,yl,vl,wl,Eh,ha,pa,zy,ma,El,op,$l,Dl,Rl,kl,Tl,ta,cp,lp,$h,Rh,kh,Cl,Al,Sl,Lc,Pl,Nl,ts,Th,Il,Ol,Hy,hp,ya,wa,Fl,Ea,Ll,Da,Ra,gp,yp,na,ra,ns,vp,Ml,Ch,mv,Mc,Bl,jl,Gl,Ul,Wl,
|
|
1277
|
+
Hl,Ah,Kl,Vl,Bc,qc,Xl,Yl,Jl,WT,Sh,jc,Gc,Ql,Zl,ed,td,nd,_h,rd]}computeIsSubtype(e,n){switch(e){case Uc:case ml:return this.isSubtype(Th,n);case zc:case El:case Rl:case Il:return this.isSubtype(ra,n);case Hc:return this.isSubtype(Th,n)||this.isSubtype(ra,n);case ki:case Tr:return this.isSubtype(mh,n)||this.isSubtype(ta,n);case Ti:case Ai:return this.isSubtype(By,n);case Kc:case sa:case aa:return this.isSubtype(oo,n);case Vc:case Xc:return this.isSubtype(yh,n);case Jc:case hl:case pl:case kl:return this.
|
|
1278
|
+
isSubtype($h,n);case Qc:case Zc:return this.isSubtype(Fc,n);case Zn:return this.isSubtype(Uy,n)||this.isSubtype(zy,n)||this.isSubtype(ta,n);case el:case il:case ul:case rd:return this.isSubtype(vh,n);case tl:return this.isSubtype(so,n)||this.isSubtype(na,n);case rl:return this.isSubtype(so,n);case sl:case lo:case ta:return this.isSubtype(Uy,n);case vh:case ol:return this.isSubtype(wh,n);case wh:case al:return this.isSubtype(bh,n);case bh:case kh:return this.isSubtype(jy,n);case fl:return this.isSubtype(
|
|
1279
|
+
so,n)||this.isSubtype(ra,n);case es:return this.isSubtype(zy,n)||this.isSubtype(ta,n);case yl:return this.isSubtype(so,n)||this.isSubtype(Gy,n)||this.isSubtype(Lc,n)||this.isSubtype(Ch,n);case vl:case $l:case Dl:case Fl:case Ll:return this.isSubtype(na,n);case wl:return this.isSubtype(Eh,n);case Eh:return this.isSubtype(so,n)||this.isSubtype(Gy,n)||this.isSubtype(Lc,n);case Tl:case Ol:case Ml:return this.isSubtype(Hy,n)||this.isSubtype(ra,n);case $h:case Cl:return this.isSubtype(Rh,n);case Rh:case Al:
|
|
1280
|
+
return this.isSubtype(kh,n);case Sl:case Nl:return this.isSubtype(Lc,n);case Pl:return this.isSubtype(Lc,n)||this.isSubtype(na,n);case Bl:return this.isSubtype(yh,n)||this.isSubtype(Fc,n)||this.isSubtype(Mc,n);case jl:case Ul:case Wl:return this.isSubtype(Mc,n);case Gl:case Hl:return this.isSubtype(Ah,n);case Ah:return this.isSubtype(Fc,n)||this.isSubtype(Mc,n);case Kl:return this.isSubtype(na,n)||this.isSubtype(Ch,n);case Vl:return this.isSubtype(qc,n)||this.isSubtype(Gc,n);case Bc:case Yl:return this.
|
|
1281
|
+
isSubtype(qc,n);case qc:case Gc:return this.isSubtype(WT,n);case Xl:return this.isSubtype(Bc,n)||this.isSubtype(Sh,n);case Jl:return this.isSubtype(Bc,n)||this.isSubtype(_h,n);case jc:case Zl:return this.isSubtype(Gc,n);case Ql:case ed:return this.isSubtype(Sh,n)||this.isSubtype(jc,n);case td:case nd:return this.isSubtype(jc,n)||this.isSubtype(_h,n);default:return!1}}getReferenceType(e){const n=`${e.container.$type}:${e.property}`;switch(n){case"ColorProperty:customColor":return uo;case"Deployme\
|
|
1282
|
+
ntNode:kind":return Ti;case"DeploymentRelation:kind":case"DynamicViewStep:kind":case"OutgoingRelationExpr:kind":case"Relation:kind":case"WhereRelationKind:value":return ts;case"DynamicViewGlobalPredicateRef:predicate":return ca;case"DynamicViewRef:view":return sa;case"Element:kind":case"ElementKindExpression:kind":return Ai;case"ElementTagExpression:tag":case"Tags:values":case"WhereElementTag:value":case"WhereRelationParticipantTag:value":case"WhereRelationTag:value":return ns;case"ElementViewRe\
|
|
1283
|
+
f:view":return aa;case"FqnRef:value":case"StrictFqnRef:value":return ta;case"IconProperty:libicon":return Si;case"Imported:imported":case"StrictFqnElementRef:el":return Zn;case"ViewRef:view":return oo;case"ViewRuleGlobalPredicateRef:predicate":return la;case"ViewRuleGlobalStyle:style":return dl;case"WhereElementKind:value":case"WhereRelationParticipantKind:value":return By;default:throw new Error(`${n} is not a valid reference id.`)}}getTypeMetaData(e){switch(e){case Uc:return{name:Uc,properties:[
|
|
1284
|
+
{name:"key"},{name:"value"}]};case zc:return{name:zc,properties:[{name:"key"},{name:"value"}]};case Hc:return{name:Hc,properties:[{name:"customColor"},{name:"key"},{name:"themeColor"}]};case uo:return{name:uo,properties:[{name:"name"}]};case xh:return{name:xh,properties:[{name:"props",defaultValue:[]}]};case Nh:return{name:Nh,properties:[{name:"props",defaultValue:[]}]};case ki:return{name:ki,properties:[{name:"body"},{name:"name"},{name:"target"},{name:"title"}]};case Ih:return{name:Ih,properties:[
|
|
1285
|
+
{name:"elements",defaultValue:[]},{name:"props",defaultValue:[]},{name:"tags"}]};case Tr:return{name:Tr,properties:[{name:"body"},{name:"kind"},{name:"name"},{name:"title"}]};case Oh:return{name:Oh,properties:[{name:"elements",defaultValue:[]},{name:"props",defaultValue:[]},{name:"tags"}]};case Ti:return{name:Ti,properties:[{name:"name"}]};case Fh:return{name:Fh,properties:[{name:"body"},{name:"kind"},{name:"source"},{name:"tags"},{name:"target"},{name:"technology"},{name:"title"}]};case Lh:return{
|
|
1286
|
+
name:Lh,properties:[{name:"props",defaultValue:[]},{name:"tags"}]};case Kc:return{name:Kc,properties:[{name:"body"},{name:"name"}]};case Mh:return{name:Mh,properties:[{name:"props",defaultValue:[]},{name:"rules",defaultValue:[]},{name:"tags"}]};case Vc:return{name:Vc,properties:[{name:"expr"},{name:"isInclude",defaultValue:!1}]};case Xc:return{name:Xc,properties:[{name:"props",defaultValue:[]},{name:"targets"}]};case Jc:return{name:Jc,properties:[{name:"source"},{name:"target"}]};case sa:return{
|
|
1287
|
+
name:sa,properties:[{name:"body"},{name:"name"}]};case Bh:return{name:Bh,properties:[{name:"props",defaultValue:[]},{name:"rules",defaultValue:[]},{name:"steps",defaultValue:[]},{name:"tags"}]};case Qc:return{name:Qc,properties:[{name:"predicate"}]};case Zc:return{name:Zc,properties:[{name:"exprs"}]};case qh:return{name:qh,properties:[{name:"steps",defaultValue:[]}]};case Jy:return{name:Jy,properties:[{name:"view"}]};case jh:return{name:jh,properties:[{name:"custom"},{name:"isBackward",defaultValue:!1},
|
|
1288
|
+
{name:"kind"},{name:"source"},{name:"target"},{name:"title"}]};case Zn:return{name:Zn,properties:[{name:"body"},{name:"kind"},{name:"name"},{name:"props",defaultValue:[]}]};case Gh:return{name:Gh,properties:[{name:"elements",defaultValue:[]},{name:"props",defaultValue:[]},{name:"tags"}]};case Ai:return{name:Ai,properties:[{name:"name"}]};case el:return{name:el,properties:[{name:"isEqual",defaultValue:!1},{name:"kind"}]};case Wh:return{name:Wh,properties:[{name:"modelElement"}]};case tl:return{name:tl,
|
|
1289
|
+
properties:[{name:"key"},{name:"value"}]};case rl:return{name:rl,properties:[{name:"key"},{name:"props",defaultValue:[]}]};case il:return{name:il,properties:[{name:"isEqual",defaultValue:!1},{name:"tag"}]};case aa:return{name:aa,properties:[{name:"body"},{name:"extends"},{name:"name"},{name:"viewOf"}]};case Hh:return{name:Hh,properties:[{name:"props",defaultValue:[]},{name:"rules",defaultValue:[]},{name:"tags"}]};case tv:return{name:tv,properties:[{name:"view"}]};case Kh:return{name:Kh,properties:[
|
|
1290
|
+
{name:"prev"},{name:"value"}]};case sl:return{name:sl,properties:[{name:"body"},{name:"deploymentNode"}]};case Vh:return{name:Vh,properties:[{name:"elements",defaultValue:[]},{name:"props",defaultValue:[]},{name:"tags"}]};case lo:return{name:lo,properties:[{name:"body"},{name:"element"}]};case Xh:return{name:Xh,properties:[{name:"elements",defaultValue:[]},{name:"props",defaultValue:[]},{name:"tags"}]};case Yh:return{name:Yh,properties:[{name:"prev"},{name:"value"}]};case ol:return{name:ol,properties:[
|
|
1291
|
+
{name:"subject"},{name:"where"}]};case al:return{name:al,properties:[{name:"custom"},{name:"subject"}]};case Qh:return{name:Qh,properties:[{name:"parent"},{name:"value"}]};case ul:return{name:ul,properties:[{name:"ref"},{name:"selector"}]};case ca:return{name:ca,properties:[{name:"name"},{name:"predicates",defaultValue:[]}]};case la:return{name:la,properties:[{name:"name"},{name:"predicates",defaultValue:[]}]};case da:return{name:da,properties:[{name:"name"},{name:"predicates",defaultValue:[]},{
|
|
1292
|
+
name:"styles",defaultValue:[]}]};case ep:return{name:ep,properties:[{name:"id"},{name:"props",defaultValue:[]},{name:"targets"}]};case tp:return{name:tp,properties:[{name:"id"},{name:"styles",defaultValue:[]}]};case dl:return{name:dl,properties:[{name:"name"}]};case fl:return{name:fl,properties:[{name:"key"},{name:"libicon"},{name:"value"}]};case es:return{name:es,properties:[{name:"imported"},{name:"prev"}]};case np:return{name:np,properties:[{name:"imports"},{name:"project"}]};case hl:return{name:hl,
|
|
1293
|
+
properties:[{name:"to"}]};case pl:return{name:pl,properties:[{name:"inout"}]};case Si:return{name:Si,properties:[{name:"name"}]};case rp:return{name:rp,properties:[{name:"deployments",defaultValue:[]},{name:"globals",defaultValue:[]},{name:"imports",defaultValue:[]},{name:"likec4lib",defaultValue:[]},{name:"models",defaultValue:[]},{name:"specifications",defaultValue:[]},{name:"views",defaultValue:[]}]};case ip:return{name:ip,properties:[{name:"icons",defaultValue:[]}]};case ml:return{name:ml,properties:[
|
|
1294
|
+
{name:"key"},{name:"value"}]};case yl:return{name:yl,properties:[{name:"key"},{name:"title"},{name:"value"}]};case vl:return{name:vl,properties:[{name:"key"},{name:"value"}]};case wl:return{name:wl,properties:[{name:"props",defaultValue:[]}]};case ha:return{name:ha,properties:[{name:"elements",defaultValue:[]},{name:"name"}]};case pa:return{name:pa,properties:[{name:"elements",defaultValue:[]},{name:"name"}]};case ma:return{name:ma,properties:[{name:"name"},{name:"styles",defaultValue:[]},{name:"\
|
|
1295
|
+
views",defaultValue:[]}]};case El:return{name:El,properties:[{name:"key"},{name:"value"}]};case op:return{name:op,properties:[{name:"key"},{name:"value"}]};case $l:return{name:$l,properties:[{name:"key"},{name:"value"}]};case Dl:return{name:Dl,properties:[{name:"key"},{name:"value"}]};case Rl:return{name:Rl,properties:[{name:"key"},{name:"value"}]};case kl:return{name:kl,properties:[{name:"from"},{name:"isBidirectional",defaultValue:!1},{name:"kind"}]};case Tl:return{name:Tl,properties:[{name:"k\
|
|
1296
|
+
ey"},{name:"value"}]};case cp:return{name:cp,properties:[{name:"body"},{name:"kind"},{name:"source"},{name:"tags"},{name:"target"},{name:"technology"},{name:"title"}]};case lp:return{name:lp,properties:[{name:"props",defaultValue:[]},{name:"tags"}]};case Cl:return{name:Cl,properties:[{name:"subject"},{name:"where"}]};case Al:return{name:Al,properties:[{name:"custom"},{name:"subject"}]};case Sl:return{name:Sl,properties:[{name:"key"},{name:"value"}]};case ts:return{name:ts,properties:[{name:"name"}]};case Pl:
|
|
1297
|
+
return{name:Pl,properties:[{name:"key"},{name:"value"}]};case Nl:return{name:Nl,properties:[{name:"key"},{name:"props",defaultValue:[]}]};case Il:return{name:Il,properties:[{name:"key"},{name:"value"}]};case Ol:return{name:Ol,properties:[{name:"key"},{name:"value"}]};case hp:return{name:hp,properties:[{name:"color"},{name:"name"}]};case ya:return{name:ya,properties:[{name:"kind"},{name:"props",defaultValue:[]}]};case wa:return{name:wa,properties:[{name:"kind"},{name:"props",defaultValue:[]}]};case Fl:
|
|
1298
|
+
return{name:Fl,properties:[{name:"key"},{name:"value"}]};case Ea:return{name:Ea,properties:[{name:"kind"},{name:"props",defaultValue:[]}]};case Ll:return{name:Ll,properties:[{name:"key"},{name:"value"}]};case Da:return{name:Da,properties:[{name:"colors",defaultValue:[]},{name:"deploymentNodes",defaultValue:[]},{name:"elements",defaultValue:[]},{name:"name"},{name:"relationships",defaultValue:[]},{name:"tags",defaultValue:[]}]};case Ra:return{name:Ra,properties:[{name:"tag"}]};case gp:return{name:gp,
|
|
1299
|
+
properties:[{name:"el"},{name:"parent"}]};case yp:return{name:yp,properties:[{name:"parent"},{name:"value"}]};case ns:return{name:ns,properties:[{name:"name"}]};case vp:return{name:vp,properties:[{name:"prev"},{name:"values",defaultValue:[]}]};case Ml:return{name:Ml,properties:[{name:"key"},{name:"value"}]};case mv:return{name:mv,properties:[{name:"view"}]};case Bl:return{name:Bl,properties:[{name:"direction"},{name:"nodeSep"},{name:"rankSep"}]};case jl:return{name:jl,properties:[{name:"predicat\
|
|
1300
|
+
e"}]};case Gl:return{name:Gl,properties:[{name:"style"}]};case Ul:return{name:Ul,properties:[{name:"groupRules",defaultValue:[]},{name:"props",defaultValue:[]},{name:"title"}]};case Wl:return{name:Wl,properties:[{name:"exprs"},{name:"isInclude",defaultValue:!1}]};case Hl:return{name:Hl,properties:[{name:"props",defaultValue:[]},{name:"targets"}]};case Kl:return{name:Kl,properties:[{name:"key"},{name:"value"}]};case Vl:return{name:Vl,properties:[{name:"left"},{name:"operator"},{name:"right"}]};case Xl:
|
|
1301
|
+
return{name:Xl,properties:[{name:"not",defaultValue:!1},{name:"operator"},{name:"value"}]};case Yl:return{name:Yl,properties:[{name:"value"}]};case Jl:return{name:Jl,properties:[{name:"not",defaultValue:!1},{name:"operator"},{name:"value"}]};case Ql:return{name:Ql,properties:[{name:"not",defaultValue:!1},{name:"operator"},{name:"value"}]};case Zl:return{name:Zl,properties:[{name:"value"}]};case ed:return{name:ed,properties:[{name:"not",defaultValue:!1},{name:"operator"},{name:"participant"},{name:"\
|
|
1302
|
+
value"}]};case td:return{name:td,properties:[{name:"not",defaultValue:!1},{name:"operator"},{name:"participant"},{name:"value"}]};case nd:return{name:nd,properties:[{name:"not",defaultValue:!1},{name:"operator"},{name:"value"}]};case rd:return{name:rd,properties:[{name:"isWildcard",defaultValue:!1}]};default:return{name:e,properties:[]}}}}const K=new EC;let $C;const N8=()=>$C??($C=n4(`{"$type":"Grammar","isDeclared":true,"name":"LikeC4","rules":[{"$type":"ParserRule","entry":true,"name":"LikeC4G\
|
|
1303
|
+
rammar","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"imports","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"specifications","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"models","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Assignment","feature":"\
|
|
1304
|
+
views","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}},{"$type":"Assignment","feature":"globals","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@110"},"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"},"argum\
|
|
1305
|
+
ents":[]}}],"cardinality":"*"},"definesHiddenTokens":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":"+"}\
|
|
1306
|
+
,{"$type":"Keyword","value":"}"},{"$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@140"},"arguments":[]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name\
|
|
1307
|
+
":"ElementKind","definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@145"},"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@145"},"arguments":[]}},"definesHiddenTokens":false,"entry":false,"fragm\
|
|
1308
|
+
ent":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"RelationshipKind","definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@145"},"arguments":[]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CustomColor","definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Ru\
|
|
1309
|
+
leCall","rule":{"$ref":"#/rules@144"},"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@145"},"arguments":[]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name"\
|
|
1310
|
+
:"SpecificationRule","definition":{"$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"},"argument\
|
|
1311
|
+
s":[]}},{"$type":"Assignment","feature":"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\
|
|
1312
|
+
":false,"entry":false,"fragment":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":"Alter\
|
|
1313
|
+
natives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@129"},"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":"=","\
|
|
1314
|
+
terminal":{"$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@163"},"arguments":[]}},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","na\
|
|
1315
|
+
me":"SpecificationDeploymentNodeKind","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":"RuleCa\
|
|
1316
|
+
ll","rule":{"$ref":"#/rules@129"},"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":[]}}]},"definesH\
|
|
1317
|
+
iddenTokens":false,"entry":false,"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@139"},"arguments":[]}}]},"defi\
|
|
1318
|
+
nesHiddenTokens":false,"entry":false,"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":"+=","\
|
|
1319
|
+
terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@132"},"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","f\
|
|
1320
|
+
eature":"key","operator":"=","terminal":{"$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@163"},"arguments":[]}},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":fa\
|
|
1321
|
+
lse},{"$type":"ParserRule","name":"ImportsFromPoject","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"import"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"imports","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Keyword","value":"}"}]},{"$type":"Assignment","feature":"imports","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref"\
|
|
1322
|
+
:"#/rules@17"},"arguments":[]}}]},{"$type":"Keyword","value":"from"},{"$type":"Assignment","feature":"project","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@163"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Imported","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"imported","operator":"=","terminal":{"$type":"CrossReference","type"\
|
|
1323
|
+
:{"$ref":"#/rules@20"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@145"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"Imported"},"feature":"prev","operator":"="},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"imported","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@20"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@145"},"arguments":[]},"d\
|
|
1324
|
+
eprecatedSyntax":false}}],"cardinality":"*"},{"$type":"Keyword","value":";","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@142"},"arguments":[]},"deprecatedSynt\
|
|
1325
|
+
ax":false},"cardinality":"+"},{"$type":"Group","elements":[{"$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@142"},"arguments":[]},"deprecatedSyntax":false},"cardinality":"*"}],"cardinality":"*"},{"$type":"Keyword","value":";","cardinal\
|
|
1326
|
+
ity":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"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@24"},"argument\
|
|
1327
|
+
s":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[{"$type":"NamedArgument","value":{"$type":"BooleanLiteral","true":true},"calledByName":false}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"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"\
|
|
1328
|
+
,"elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"kind","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@3"},"deprecatedSyntax":false}},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@145"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@145"},"arguments":[]}},{"$type":"RuleCal\
|
|
1329
|
+
l","rule":{"$ref":"#/rules@161"},"arguments":[]},{"$type":"Assignment","feature":"kind","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@3"},"deprecatedSyntax":false}}]}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@163"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rule\
|
|
1330
|
+
s@163"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@163"},"arguments":[]}},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@163"},"arguments":[]},"cardinality":"?"}],"cardinality":"?"}],"cardinality":"?"}],"cardinality":"?"},{"$type":"Assignment","feature":"body","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":\
|
|
1331
|
+
"#/rules@21"},"arguments":[]},"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ElementBody","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"tags","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$ty\
|
|
1332
|
+
pe":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},"cardinality":"*"},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[{"$type":"NamedArgument","value":{"$type":"BooleanLiteral","true":false},"calledByName":false}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":\
|
|
1333
|
+
false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ElementProperty","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@129"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@116"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@120"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@36"},"arguments":[]}]}\
|
|
1334
|
+
,"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ElementStringProperty","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"\
|
|
1335
|
+
,"feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@163"},"arguments":[]}},{"$type":"Keyword","value":";","cardinality":"?"}]},"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\
|
|
1336
|
+
":"#/rules@28"},"arguments":[]}},{"$type":"Assignment","feature":"body","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]}}]},"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":\
|
|
1337
|
+
"#/rules@18"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},"cardinality":"*"},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[{"$type":"NamedArgument","value":{"$type":"BooleanLiteral","true":true},"calledByName":false}]},{"$type":"RuleCall","rule":{"$ref":"\
|
|
1338
|
+
#/rules@20"},"arguments":[]}]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ExtendElementProperty","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@116"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@36"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenToke\
|
|
1339
|
+
ns":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ElementRef","definition":{"$type":"Assignment","feature":"modelElement","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"StrictFqnElementRef","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"el","operator":"=","terminal\
|
|
1340
|
+
":{"$type":"CrossReference","type":{"$ref":"#/rules@20"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@145"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"StrictFqnElementRef"},"feature":"parent","operator":"="},{"$type":"RuleCall","rule":{"$ref":"#/rules@158"},"arguments":[]},{"$type":"Assignment","feature":"el","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@20"},"ter\
|
|
1341
|
+
minal":{"$type":"RuleCall","rule":{"$ref":"#/rules@145"},"arguments":[]},"deprecatedSyntax":false}}],"cardinality":"*"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"FqnRef","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/types@1"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@145"},"argum\
|
|
1342
|
+
ents":[]},"deprecatedSyntax":false}},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"FqnRef"},"feature":"parent","operator":"="},{"$type":"RuleCall","rule":{"$ref":"#/rules@158"},"arguments":[]},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/types@1"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@145"},"arguments":[]},"deprecatedSyntax":false}}],"cardinality":"*"}]},"definesHidde\
|
|
1343
|
+
nTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"StrictFqnRef","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/types@1"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@145"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name"\
|
|
1344
|
+
:"StrictFqnRef"},"feature":"parent","operator":"="},{"$type":"RuleCall","rule":{"$ref":"#/rules@158"},"arguments":[]},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/types@1"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@145"},"arguments":[]},"deprecatedSyntax":false}}],"cardinality":"*"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","na\
|
|
1345
|
+
me":"Relation","parameters":[{"$type":"Parameter","name":"isExplicit"}],"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","guardCondition":{"$type":"ParameterReference","parameter":{"$ref":"#/rules@31/parameters@0"}},"elements":[{"$type":"Assignment","feature":"source","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}}]},{"$type":"Group","guardCondition":{"$type":"Negation","value":{"$type":"ParameterReference"\
|
|
1346
|
+
,"parameter":{"$ref":"#/rules@31/parameters@0"}}},"elements":[{"$type":"Assignment","feature":"source","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"}]}]},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"kind","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@5"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@143"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Group","elemen\
|
|
1347
|
+
ts":[{"$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@29"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCal\
|
|
1348
|
+
l","rule":{"$ref":"#/rules@163"},"arguments":[]}},{"$type":"Assignment","feature":"technology","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@163"},"arguments":[]},"cardinality":"?"}],"cardinality":"?"},{"$type":"Assignment","feature":"tags","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"body","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@32"},"arguments"\
|
|
1349
|
+
:[]},"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@18"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3\
|
|
1350
|
+
3"},"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@34"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@69"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@35"},"arguments":[]},{"$type":"RuleCall","rul\
|
|
1351
|
+
e":{"$ref":"#/rules@116"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@36"},"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":[{"$type":"Keyword","value":"title"},{"$type":"Keyword","value":"technology"},{"$type\
|
|
1352
|
+
":"Keyword","value":"description"}]}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@163"},"arguments":[]}},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"RelationStyleProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment"\
|
|
1353
|
+
,"feature":"key","operator":"=","terminal":{"$type":"Keyword","value":"style"}},{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@132"},"arguments":[]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"MetadataProperty","definition":{"$type":"Group","elements":[{\
|
|
1354
|
+
"$type":"Keyword","value":"metadata"},{"$type":"RuleCall","rule":{"$ref":"#/rules@37"},"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":"RuleCall","rule":{"$ref":"#/rules@38"},"arguments":[]},"cardinality":"*"},{"$type":"Keywo\
|
|
1355
|
+
rd","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@164"},"arguments":[]}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$re\
|
|
1356
|
+
f":"#/rules@163"},"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":"{"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"views","operato\
|
|
1357
|
+
r":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@40"},"arguments":[]}},{"$type":"Assignment","feature":"styles","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@62"},"arguments":[]}}],"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"LikeC4ViewRule","returnType":{"$ref":"#/types@2"},"definition":{"$type":"Alternatives"\
|
|
1358
|
+
,"elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@42"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@105"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ElementView","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"view"},{"$type":"Assignment","feature":"name","operator":"=","ter\
|
|
1359
|
+
minal":{"$type":"RuleCall","rule":{"$ref":"#/rules@145"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"extends"},{"$type":"Assignment","feature":"extends","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@44"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"of"},{"$type":"Assignment","feature":"viewOf","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/ru\
|
|
1360
|
+
les@27"},"arguments":[]}}]}],"cardinality":"?"},{"$type":"Assignment","feature":"body","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@46"},"arguments":[]},"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DynamicView","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"dynamic"},{"$type":"Keyword","value":"view"},{"$type":"Assignment","feature":\
|
|
1361
|
+
"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@145"},"arguments":[]}},{"$type":"Assignment","feature":"body","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@47"},"arguments":[]},"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ViewRef","definition":{"$type":"Assignment","feature":"view","operator":"=","terminal":{"$type":"CrossRefere\
|
|
1362
|
+
nce","type":{"$ref":"#/types@2"},"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@41"},"deprecatedSyntax":false}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"Pa\
|
|
1363
|
+
rserRule","name":"DynamicViewRef","definition":{"$type":"Assignment","feature":"view","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@42"},"deprecatedSyntax":false}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ElementViewBody","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"tags","operator":"=","terminal":{"$type":\
|
|
1364
|
+
"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]},"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters"\
|
|
1365
|
+
:[],"wildcard":false},{"$type":"ParserRule","name":"DynamicViewBody","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"tags","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]},"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Assignment"\
|
|
1366
|
+
,"feature":"steps","operator":"+=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@54"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@55"},"arguments":[]}]}},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@53"},"arguments":[]}}],"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wild\
|
|
1367
|
+
card":false},{"$type":"ParserRule","name":"ViewProperty","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@49"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@116"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ViewStringProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","term\
|
|
1368
|
+
inal":{"$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@163"},"arguments":[]}},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"V\
|
|
1369
|
+
iewLayoutDirection","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":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@56"},\
|
|
1370
|
+
"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@57"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@62"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@63"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ViewRuleGroup","definition":{"$type":"Group","elements":[{"$type":"Keyword","valu\
|
|
1371
|
+
e":"group"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@163"},"arguments":[]},"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@117"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@123"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@118"},"arguments":[]}]},"c\
|
|
1372
|
+
ardinality":"*"},{"$type":"Assignment","feature":"groupRules","operator":"+=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@56"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[]}]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DynamicViewRule","definition":{"$type":"Alternati\
|
|
1373
|
+
ves","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@58"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@59"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@62"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@63"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DynamicViewParallelSteps","definition":{"$type":"Group","elements":[{"$type":"Al\
|
|
1374
|
+
ternatives","elements":[{"$type":"Keyword","value":"parallel"},{"$type":"Keyword","value":"par"}]},{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"steps","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@55"},"arguments":[]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DynamicViewStep","definition":{"$type":"Gro\
|
|
1375
|
+
up","elements":[{"$type":"Assignment","feature":"source","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"isBackward","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\
|
|
1376
|
+
@5"},"deprecatedSyntax":false}},{"$type":"Keyword","value":"]->"}]},{"$type":"Assignment","feature":"kind","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@5"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@143"},"arguments":[]},"deprecatedSyntax":false}}]},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type"\
|
|
1377
|
+
:"RuleCall","rule":{"$ref":"#/rules@163"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"custom","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@67"},"arguments":[]},"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ViewRulePredicate","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":\
|
|
1378
|
+
"isInclude","operator":"?=","terminal":{"$type":"Keyword","value":"include"}},{"$type":"Keyword","value":"exclude"}]},{"$type":"Assignment","feature":"exprs","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@70"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ViewRuleGlobalPredicateRef","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"global"},\
|
|
1379
|
+
{"$type":"Keyword","value":"predicate"},{"$type":"Assignment","feature":"predicate","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@111"},"deprecatedSyntax":false}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DynamicViewIncludePredicate","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"include"},{"$type":"Assignment","feature":"exprs","operator":"=",\
|
|
1380
|
+
"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@70"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DynamicViewGlobalPredicateRef","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"global"},{"$type":"Keyword","value":"predicate"},{"$type":"Assignment","feature":"predicate","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@112"},"dep\
|
|
1381
|
+
recatedSyntax":false}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ViewRuleStyle","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"style"},{"$type":"Assignment","feature":"targets","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@83"},"arguments":[]}},{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type"\
|
|
1382
|
+
:"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@128"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@64"},"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":\
|
|
1383
|
+
"Assignment","feature":"style","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@113"},"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@60"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@61"},"arguments":[]}]},"definesHi\
|
|
1384
|
+
ddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"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@50"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Assignment","feature":"rankSep","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref\
|
|
1385
|
+
":"#/rules@165"},"arguments":[]}},{"$type":"Assignment","feature":"nodeSep","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@165"},"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"\
|
|
1386
|
+
:"notation"}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@163"},"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":"=",\
|
|
1387
|
+
"terminal":{"$type":"Keyword","value":"notes"}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@163"},"arguments":[]}},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CustomElementProperties","definition":{"$type":"Group","elements":[{"$type":\
|
|
1388
|
+
"Keyword","value":"{"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@68"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@64"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@128"},"arguments":[]}]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false\
|
|
1389
|
+
,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CustomRelationProperties","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@69"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@34"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@64"},"arguments":[]},{"$type":"RuleCall"\
|
|
1390
|
+
,"rule":{"$ref":"#/rules@65"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@132"},"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","f\
|
|
1391
|
+
eature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@43"},"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\
|
|
1392
|
+
":"RuleCall","rule":{"$ref":"#/rules@45"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Expressions","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@71"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"Expressions"},"fe\
|
|
1393
|
+
ature":"prev","operator":"="},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@71"},"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@74"},"arguments":[\
|
|
1394
|
+
]},{"$type":"RuleCall","rule":{"$ref":"#/rules@72"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"FqnExprOrWith","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@73"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"FqnExprWith"},"feature":"subject","operator":"="},{"$type":"Keyword","val\
|
|
1395
|
+
ue":"with"},{"$type":"Assignment","feature":"custom","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@66"},"arguments":[]},"cardinality":"?"}],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"FqnExprOrWhere","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@76"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Action","inf\
|
|
1396
|
+
erredType":{"$type":"InferredType","name":"FqnExprWhere"},"feature":"subject","operator":"="},{"$type":"Keyword","value":"where"},{"$type":"Assignment","feature":"where","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@84"},"arguments":[]},"cardinality":"?"}],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"RelationExprOrWith","definition":{"$type":"Group","elemen\
|
|
1397
|
+
ts":[{"$type":"RuleCall","rule":{"$ref":"#/rules@75"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"RelationExprWith"},"feature":"subject","operator":"="},{"$type":"Keyword","value":"with"},{"$type":"Assignment","feature":"custom","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@67"},"arguments":[]},"cardinality":"?"}],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens"\
|
|
1398
|
+
:[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"RelationExprOrWhere","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@78"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"RelationExprWhere"},"feature":"subject","operator":"="},{"$type":"Keyword","value":"where"},{"$type":"Assignment","feature":"where","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@90"},"ar\
|
|
1399
|
+
guments":[]},"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":"InferredType","name":"WildcardExpression"}},{"$type":"Assignment","feature":"isWildcard","operator":"?=","terminal":{"$type":"Keyword","value":"*"}}]},{"$type":"Group","elemen\
|
|
1400
|
+
ts":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"ElementTagExpression"}},{"$type":"Keyword","value":"element.tag"},{"$type":"RuleCall","rule":{"$ref":"#/rules@147"},"arguments":[]},{"$type":"Assignment","feature":"tag","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@4"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@142"},"arguments":[]},"deprecatedSyntax":false},"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Action","inferred\
|
|
1401
|
+
Type":{"$type":"InferredType","name":"ElementKindExpression"}},{"$type":"Keyword","value":"element.kind"},{"$type":"RuleCall","rule":{"$ref":"#/rules@147"},"arguments":[]},{"$type":"Assignment","feature":"kind","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@3"},"deprecatedSyntax":false},"cardinality":"?"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@77"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"w\
|
|
1402
|
+
ildcard":false},{"$type":"ParserRule","name":"FqnRefExpr","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"ref","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}},{"$type":"Assignment","feature":"selector","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@155"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@156"},"arguments":[]}]},"cardinality":"?"}]},"definesHi\
|
|
1403
|
+
ddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"RelationExpr","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@79"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@81"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"InOutRelationExpr","inferredType"\
|
|
1404
|
+
:{"$type":"InferredType","name":"RelationExpr"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@80"},"arguments":[]},{"$type":"Group","elements":[{"$type":"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":"I\
|
|
1405
|
+
ncomingRelationExpr","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"->"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@76"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DirectedRelationExpr","inferredType":{"$type":"InferredType","name":"RelationExpr"},"definition":{"$type":"Group","elements":[{"$typ\
|
|
1406
|
+
e":"RuleCall","rule":{"$ref":"#/rules@82"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"DirectedRelationExpr"},"feature":"source","operator":"="},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@76"},"arguments":[]}}],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","\
|
|
1407
|
+
name":"OutgoingRelationExpr","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@76"},"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":"=","\
|
|
1408
|
+
terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@5"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@145"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Keyword","value":"]->"}]},{"$type":"Assignment","feature":"kind","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@5"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@143"},"arguments":[]},"deprecatedSyntax":false}}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTok\
|
|
1409
|
+
ens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"FqnExpressions","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@76"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"FqnExpressions"},"feature":"prev","operator":"="},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"value","operator":"=","termin\
|
|
1410
|
+
al":{"$type":"RuleCall","rule":{"$ref":"#/rules@76"},"arguments":[]},"cardinality":"?"}],"cardinality":"*"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"WhereElementExpression","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@85"},"arguments":[]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"WhereE\
|
|
1411
|
+
lementOr","inferredType":{"$type":"InferredType","name":"WhereElementExpression"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@86"},"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":"=","t\
|
|
1412
|
+
erminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@86"},"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@87"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$t\
|
|
1413
|
+
ype":"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@87"},"arguments":[]}}],"cardinality":"*"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"WhereElementPrim\
|
|
1414
|
+
ary","inferredType":{"$type":"InferredType","name":"WhereElementExpression"},"definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"RuleCall","rule":{"$ref":"#/rules@84"},"arguments":[]},{"$type":"Keyword","value":")"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@88"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@89"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"para\
|
|
1415
|
+
meters":[],"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@84"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"WhereElement","definition":{"$type":"Alternatives","elements":[{"$ty\
|
|
1416
|
+
pe":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"WhereElementTag"}},{"$type":"Keyword","value":"tag"},{"$type":"RuleCall","rule":{"$ref":"#/rules@146"},"arguments":[]},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@4"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@142"},"arguments":[]},"deprecatedSyntax":false},"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Action","\
|
|
1417
|
+
inferredType":{"$type":"InferredType","name":"WhereElementKind"}},{"$type":"Keyword","value":"kind"},{"$type":"RuleCall","rule":{"$ref":"#/rules@146"},"arguments":[]},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/types@4"},"deprecatedSyntax":false},"cardinality":"?"}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"WhereRelationExpression\
|
|
1418
|
+
","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@91"},"arguments":[]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"WhereRelationOr","inferredType":{"$type":"InferredType","name":"WhereRelationExpression"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@92"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredTy\
|
|
1419
|
+
pe","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@92"},"arguments":[]}}],"cardinality":"*"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"WhereRelationAnd","inferredType":\
|
|
1420
|
+
{"$type":"InferredType","name":"WhereRelationExpression"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@93"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"WhereBinaryExpression"},"feature":"left","operator":"="},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"and"}},{"$type":"Assignment","feature":"right","operator":"=","terminal":{"$type":"Rule\
|
|
1421
|
+
Call","rule":{"$ref":"#/rules@93"},"arguments":[]}}],"cardinality":"*"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"WhereRelationPrimary","inferredType":{"$type":"InferredType","name":"WhereRelationExpression"},"definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"RuleCall","rule":{"$ref":"#/rules@90"},"arguments":[]},{"$type":"Keywo\
|
|
1422
|
+
rd","value":")"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@94"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@95"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"WhereRelationNegation","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"not"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules\
|
|
1423
|
+
@90"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"WhereRelation","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"WhereRelationTag"}},{"$type":"Keyword","value":"tag"},{"$type":"RuleCall","rule":{"$ref":"#/rules@146"},"arguments":[]},{"$type":"Assignment","feature":"value","operator":"=","\
|
|
1424
|
+
terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@4"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@142"},"arguments":[]},"deprecatedSyntax":false},"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"WhereRelationKind"}},{"$type":"Keyword","value":"kind"},{"$type":"RuleCall","rule":{"$ref":"#/rules@146"},"arguments":[]},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"CrossReference","typ\
|
|
1425
|
+
e":{"$ref":"#/rules@5"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@145"},"arguments":[]},"deprecatedSyntax":false},"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"WhereRelationParticipantTag"}},{"$type":"Assignment","feature":"participant","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@138"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@158"},"arguments":[]},{"$type":"Keyword","va\
|
|
1426
|
+
lue":"tag"},{"$type":"RuleCall","rule":{"$ref":"#/rules@146"},"arguments":[]},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@4"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@142"},"arguments":[]},"deprecatedSyntax":false},"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Action","inferredType":{"$type":"InferredType","name":"WhereRelationParticipantKind"}},{"$type":"Assignment","feature":"participant","opera\
|
|
1427
|
+
tor":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@138"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@158"},"arguments":[]},{"$type":"Keyword","value":"kind"},{"$type":"RuleCall","rule":{"$ref":"#/rules@146"},"arguments":[]},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/types@4"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@145"},"arguments":[]},"deprecatedSyntax":false},"cardinality":"?"}]}]},\
|
|
1428
|
+
"definesHiddenTokens":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"},"argu\
|
|
1429
|
+
ments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@103"},"arguments":[{"$type":"NamedArgument","value":{"$type":"BooleanLiteral","true":true},"calledByName":false}]},{"$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":"\
|
|
1430
|
+
Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"kind","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@7"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@145"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@145"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","term\
|
|
1431
|
+
inal":{"$type":"RuleCall","rule":{"$ref":"#/rules@145"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@161"},"arguments":[]},{"$type":"Assignment","feature":"kind","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@7"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@145"},"arguments":[]},"deprecatedSyntax":false}}]}]},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@163"},"arguments":[]},"c\
|
|
1432
|
+
ardinality":"?"},{"$type":"Assignment","feature":"body","operator":"=","terminal":{"$type":"RuleCall","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":{"$re\
|
|
1433
|
+
f":"#/rules@18"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},"cardinality":"*"},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@99"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@103"},"arguments":[{"$type":"NamedArgument","value":{"$type":"BooleanLiteral","tru\
|
|
1434
|
+
e":false},"calledByName":false}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@97"},"arguments":[]}]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"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@145"},"\
|
|
1435
|
+
arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@161"},"arguments":[]}],"cardinality":"?"},{"$type":"Keyword","value":"instanceOf"},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@163"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"body","operator":"=","terminal":{"$type"\
|
|
1436
|
+
:"RuleCall","rule":{"$ref":"#/rules@100"},"arguments":[]},"cardinality":"?"},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"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@18"},"arguments":[]},"car\
|
|
1437
|
+
dinality":"?"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},"cardinality":"*"},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@103"},"arguments":[{"$type":"NamedArgument","value":{"$type":"BooleanLiteral","true":false},"calledByName":false}]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment\
|
|
1438
|
+
":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@30"},"arguments":[]}},{"$type":"Assignment","feature":"body","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@102"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":fa\
|
|
1439
|
+
lse,"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@18"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},"cardinality":"*"},{\
|
|
1440
|
+
"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@99"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@103"},"arguments":[{"$type":"NamedArgument","value":{"$type":"BooleanLiteral","true":true},"calledByName":false}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@97"},"arguments":[]}]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment\
|
|
1441
|
+
":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DeploymentRelation","parameters":[{"$type":"Parameter","name":"isExplicit"}],"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","guardCondition":{"$type":"ParameterReference","parameter":{"$ref":"#/rules@103/parameters@0"}},"elements":[{"$type":"Assignment","feature":"source","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]\
|
|
1442
|
+
}}]},{"$type":"Group","guardCondition":{"$type":"Negation","value":{"$type":"ParameterReference","parameter":{"$ref":"#/rules@103/parameters@0"}}},"elements":[{"$type":"Assignment","feature":"source","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"}]}]},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"->"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-["},{"$type":"Assignment","feature":"kind","operator":"=","\
|
|
1443
|
+
terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@5"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@145"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Keyword","value":"]->"}]},{"$type":"Assignment","feature":"kind","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@5"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@143"},"arguments":[]},"deprecatedSyntax":false}}]},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$t\
|
|
1444
|
+
ype":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@163"},"arguments":[]}},{"$type":"Assignment","feature":"technology","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@163"},"arguments":[]},"cardinality":"?"}],"cardinality":"?"},{"$type":"Assignment","feature":"tags","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":\
|
|
1445
|
+
"#/rules@18"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"body","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@104"},"arguments":[]},"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"wildcard":false},{"$type":"ParserRule","name":"DeploymentRelationBody","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"tags","operator":"=","terminal":{"$type":"R\
|
|
1446
|
+
uleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@33"},"arguments":[]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DeploymentView","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"deployment"},{"\
|
|
1447
|
+
$type":"Keyword","value":"view"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@145"},"arguments":[]}},{"$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":"ParserRule","name":"DeploymentViewBody","definition":{"$type":\
|
|
1448
|
+
"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"tags","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]},"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@107"},"arguments":[]},"cardinality":"\
|
|
1449
|
+
*"},{"$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@109"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@108"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@63"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":\
|
|
1450
|
+
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@83"},"arguments":[]}},{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/ru\
|
|
1451
|
+
les@128"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@64"},"arguments":[]}]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DeploymentViewRulePredicate","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"isInclude","operator":"?=","terminal":{"$type":"Keyword","value":"include\
|
|
1452
|
+
"}},{"$type":"Keyword","value":"exclude"}]},{"$type":"Assignment","feature":"expr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@70"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Globals","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"global"}},{"$type":"Keyword","value":"\
|
|
1453
|
+
{"},{"$type":"Group","elements":[{"$type":"Assignment","feature":"predicates","operator":"+=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@111"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@112"},"arguments":[]}]},"cardinality":"*"},{"$type":"Assignment","feature":"styles","operator":"+=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@114"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"\
|
|
1454
|
+
#/rules@115"},"arguments":[]}]},"cardinality":"*"}],"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"GlobalPredicateGroup","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"predicateGroup"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@164"},"arguments":[]}},{"$type":"Key\
|
|
1455
|
+
word","value":"{"},{"$type":"Assignment","feature":"predicates","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@56"},"arguments":[]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"GlobalDynamicPredicateGroup","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"dynamicPredicateGroup"},{"$type":"Assignment","feat\
|
|
1456
|
+
ure":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@164"},"arguments":[]}},{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"predicates","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@58"},"arguments":[]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"GlobalStyleId","definition":{"$t\
|
|
1457
|
+
ype":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@164"},"arguments":[]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"GlobalStyle","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"style"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@113"},"arguments":[]}},{"$type":"\
|
|
1458
|
+
Assignment","feature":"targets","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@83"},"arguments":[]}},{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"props","operator":"+=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@128"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@64"},"arguments":[]}]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":fa\
|
|
1459
|
+
lse,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"GlobalStyleGroup","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"styleGroup"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@113"},"arguments":[]}},{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"styles","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@60"},"arguments":[]},"cardinality":"*"}\
|
|
1460
|
+
,{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"LinkProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Keyword","value":"link"}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@141"},"a\
|
|
1461
|
+
rguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@163"},"arguments":[]},"cardinality":"?"},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ColorProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Keyword","\
|
|
1462
|
+
value":"color"}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"themeColor","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@136"},"arguments":[]}},{"$type":"Assignment","feature":"customColor","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@6"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@144"},"arguments":[]},"deprecatedSyntax":false}}]},{"$type":"Keyword","value":\
|
|
1463
|
+
";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"OpacityProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Keyword","value":"opacity"}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@162"},"argum\
|
|
1464
|
+
ents":[]}},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"MultipleProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Keyword","value":"multiple"}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCa\
|
|
1465
|
+
ll","rule":{"$ref":"#/rules@133"},"arguments":[]}},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"IconProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Keyword","value":"icon"}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assi\
|
|
1466
|
+
gnment","feature":"libicon","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@140"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"none"},{"$type":"RuleCall","rule":{"$ref":"#/rules@141"},"arguments":[]}]}}]},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,\
|
|
1467
|
+
"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ShapeProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Keyword","value":"shape"}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@137"},"arguments":[]}},{"$type":"Keyword","value":";","cardinality":"\
|
|
1468
|
+
?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"BorderStyleValue","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@134"},"arguments":[]},{"$type":"Keyword","value":"none"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"BorderProperty","defin\
|
|
1469
|
+
ition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Keyword","value":"border"}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@122"},"arguments":[]}},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"Parser\
|
|
1470
|
+
Rule","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","value":"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":fal\
|
|
1471
|
+
se,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ShapeSizeProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Keyword","value":"size"}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@124"},"arguments":[]}},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenToken\
|
|
1472
|
+
s":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PaddingSizeProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Keyword","value":"padding"}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@124"},"arguments":[]}},{"$type":"Keyword","value":";\
|
|
1473
|
+
","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"TextSizeProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Keyword","value":"textSize"}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@124"},"argum\
|
|
1474
|
+
ents":[]}},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"StyleProperty","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@117"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@121"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@123"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref"\
|
|
1475
|
+
:"#/rules@118"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@120"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@119"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@125"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@126"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@127"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","na\
|
|
1476
|
+
me":"ElementStyleProperty","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@128"},"arguments":[]},"cardinality":"*"},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{\
|
|
1477
|
+
"$type":"ParserRule","name":"LineProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Keyword","value":"line"}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@134"},"arguments":[]}},{"$type":"Keyword","value":";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"pa\
|
|
1478
|
+
rameters":[],"wildcard":false},{"$type":"ParserRule","name":"ArrowProperty","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"key","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"head"},{"$type":"Keyword","value":"tail"}]}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@135"},"arguments":[]}},{"$type":"Keyword","value"\
|
|
1479
|
+
:";","cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"RelationshipStyleProperty","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@117"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@130"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@131"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":fals\
|
|
1480
|
+
e,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Boolean","dataType":"boolean","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"true"},{"$type":"Keyword","value":"false"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"LineOptions","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"solid"},{"$ty\
|
|
1481
|
+
pe":"Keyword","value":"dashed"},{"$type":"Keyword","value":"dotted"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ArrowType","dataType":"string","definition":{"$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":"d\
|
|
1482
|
+
iamond"},{"$type":"Keyword","value":"odiamond"},{"$type":"Keyword","value":"crow"},{"$type":"Keyword","value":"open"},{"$type":"Keyword","value":"vee"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ThemeColor","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"primary"},{"$type":"Keyword","value":"secondary"},{"$type":"Keyword","value":"muted"},{"$type":"\
|
|
1483
|
+
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":"Keyword","value":"amber"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ElementShape","dataType":"string","definition":{"$type":"Alternatives","elements":[{\
|
|
1484
|
+
"$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","value":"queue"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Participant","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"K\
|
|
1485
|
+
eyword","value":"source"},{"$type":"Keyword","value":"target"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CustomColorValue","dataType":"string","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@157"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@145"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16\
|
|
1486
|
+
6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@165"},"arguments":[]}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"IconId","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@152"},"arguments":[]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Uri","dataType":"stri\
|
|
1487
|
+
ng","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@153"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@154"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"TagId","dataType":"string","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@157"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#\
|
|
1488
|
+
/rules@145"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DotId","dataType":"string","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@159"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@145"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"Pars\
|
|
1489
|
+
erRule","name":"CustomColorId","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@164"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@137"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@135"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@134"},"arguments":[]},{"$type":"Keyword","value":"element"},{"$type":"Keyword","value":"model"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"\
|
|
1490
|
+
hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Id","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@164"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@137"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@136"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@135"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@134"},"arguments":[]},{"$type":"RuleCa\
|
|
1491
|
+
ll","rule":{"$ref":"#/rules@138"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@124"},"arguments":[]},{"$type":"Keyword","value":"element"},{"$type":"Keyword","value":"model"},{"$type":"Keyword","value":"group"},{"$type":"Keyword","value":"node"},{"$type":"Keyword","value":"deployment"},{"$type":"Keyword","value":"instance"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"\
|
|
1492
|
+
EqOperator","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@161"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@160"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"is"}},{"$type":"Assignment","feature":"not","operator":"?=","terminal":{"\
|
|
1493
|
+
$type":"Keyword","value":"not"},"cardinality":"?"}]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"IsEqual","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"isEqual","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@161"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@160"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"\
|
|
1494
|
+
hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","hidden":true,"name":"BLOCK_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"LINE_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"\
|
|
1495
|
+
: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},{"$type":"TerminalRule","name":"URI_WITH_SCHEMA","definition":{"$type":"RegexToken","regex":"/\\\\w+:\\\\/{2}\\\\S+/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"URI_RELATIVE","definition":{"$type":"RegexToken","regex":"/\\\\.{0,2}\\\\/[^\\\\/]\
|
|
1496
|
+
\\\\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":{"$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":"TerminalR\
|
|
1497
|
+
ule","name":"StickyDot","definition":{"$type":"RegexToken","regex":"/\\\\b\\\\./"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"Dot","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"."}},"fragment":false,"hidden":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":\
|
|
1498
|
+
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":"/\\"[^\\"]*\\"|'[^']*'/"},"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":"Retur\
|
|
1499
|
+
nType","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":false}],"types":[{"$type":"Type","name":"ModelReferenceable","type":{"$type":"UnionType","types":[{"$type":"SimpleType","typeRef":{"$ref":"#/rules@20"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@17"}}]}},{"$type":"Type","name":"Referenceable","typ\
|
|
1500
|
+
e":{"$type":"UnionType","types":[{"$type":"SimpleType","typeRef":{"$ref":"#/rules@97"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@99"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@20"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@17"}}]}},{"$type":"Type","name":"LikeC4View","type":{"$type":"UnionType","types":[{"$type":"SimpleType","typeRef":{"$ref":"#/rules@41"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@42"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@105"}}]}},{"\
|
|
1501
|
+
$type":"Type","name":"StringProperty","type":{"$type":"UnionType","types":[{"$type":"SimpleType","typeRef":{"$ref":"#/rules@23"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@49"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@34"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@38"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@10"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@15"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@64"}},{"$type":"SimpleType","typeRef":{"$ref":\
|
|
1502
|
+
"#/rules@65"}}]}},{"$type":"Type","name":"DeploymentNodeOrElementKind","type":{"$type":"UnionType","types":[{"$type":"SimpleType","typeRef":{"$ref":"#/rules@3"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@7"}}]}},{"$type":"Type","name":"WhereTagEqual","type":{"$type":"UnionType","types":[{"$type":"SimpleType","typeRef":{"$ref":"#/rules@89/definition/elements@0/elements@0/inferredType"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@95/definition/elements@0/elements@0/inferredType"}},{"$\
|
|
1503
|
+
type":"SimpleType","typeRef":{"$ref":"#/rules@95/definition/elements@2/elements@0/inferredType"}}]}},{"$type":"Type","name":"WhereKindEqual","type":{"$type":"UnionType","types":[{"$type":"SimpleType","typeRef":{"$ref":"#/rules@89/definition/elements@1/elements@0/inferredType"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@95/definition/elements@1/elements@0/inferredType"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@95/definition/elements@3/elements@0/inferredType"}}]}},{"$type":"Type",\
|
|
1504
|
+
"name":"WhereExpression","type":{"$type":"UnionType","types":[{"$type":"SimpleType","typeRef":{"$ref":"#/rules@84"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@90"}}]}},{"$type":"Type","name":"DeploymentElement","type":{"$type":"UnionType","types":[{"$type":"SimpleType","typeRef":{"$ref":"#/rules@97"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@99"}}]}},{"$type":"Type","name":"FqnReferenceable","type":{"$type":"UnionType","types":[{"$type":"SimpleType","typeRef":{"$ref":"#/types@1"}}\
|
|
1505
|
+
,{"$type":"SimpleType","typeRef":{"$ref":"#/rules@20"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@24"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@101"}}]}},{"$type":"Type","name":"SizeProperty","type":{"$type":"UnionType","types":[{"$type":"SimpleType","typeRef":{"$ref":"#/rules@125"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@126"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@127"}}]}}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"interfaces":[],"usedGra\
|
|
1506
|
+
mmars":[]}`)),vv={languageId:"likec4",fileExtensions:[".c4",".likec4",".like-c4"],caseInsensitive:!1,mode:"production"},I8={skipValidations:!0,recoveryEnabled:!0,nodeLocationTracking:"full"},O8={AstReflection:()=>new EC},F8={Grammar:()=>N8(),LanguageMetaData:()=>vv,parser:{ParserConfig:()=>I8}},L8=[...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",
|
|
1507
|
+
"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",
|
|
1508
|
+
"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\
|
|
1509
|
+
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-\
|
|
1510
|
+
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\
|
|
1511
|
+
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-\
|
|
1512
|
+
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-\
|
|
1513
|
+
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\
|
|
1514
|
+
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\
|
|
1515
|
+
-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\
|
|
1516
|
+
-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-\
|
|
1517
|
+
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",
|
|
1518
|
+
"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",
|
|
1519
|
+
"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\
|
|
1520
|
+
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\
|
|
1521
|
+
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\
|
|
1522
|
+
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",
|
|
1523
|
+
"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",
|
|
1524
|
+
"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\
|
|
1525
|
+
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",
|
|
1526
|
+
"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\
|
|
1527
|
+
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\
|
|
1528
|
+
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-\
|
|
1529
|
+
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","\
|
|
1530
|
+
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\
|
|
1531
|
+
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\
|
|
1532
|
+
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\
|
|
1533
|
+
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","\
|
|
1534
|
+
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\
|
|
1535
|
+
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\
|
|
1536
|
+
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\
|
|
1537
|
+
-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",
|
|
1538
|
+
"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\
|
|
1539
|
+
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",
|
|
1540
|
+
"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",
|
|
1541
|
+
"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-\
|
|
1542
|
+
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\
|
|
1543
|
+
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\
|
|
1544
|
+
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","\
|
|
1545
|
+
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\
|
|
1546
|
+
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",
|
|
1547
|
+
"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","\
|
|
1548
|
+
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\
|
|
1549
|
+
-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\
|
|
1550
|
+
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","\
|
|
1551
|
+
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",
|
|
1552
|
+
"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\
|
|
1553
|
+
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",
|
|
1554
|
+
"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\
|
|
1555
|
+
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\
|
|
1556
|
+
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\
|
|
1557
|
+
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)),DC=["likec4lib {"," icons {",...L8.map(t=>" "+t)," }","}"].join(`
|
|
1558
|
+
`),RC="likec4builtin",M8=`${RC}:///likec4/lib/icons.c4`;function id(t){return t.scheme===RC}const rt=bn.getChild("server");function sd(t){rt.error(rr(t))}function Re(t){rt.warn(rr(t))}var wv,kC;function B8(){return kC||(kC=1,wv=NT()),wv}var q8=B8();const TC=Fr(q8),j8=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,CC=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,G8=/^([/\\]\s*){2,}[^/\\]/,U8=/^\.?\//;function bv(t){return["./","../"].some(e=>t.startsWith(e))}function rs(t,e={}){return typeof e=="boolean"&&(e={acceptRelative:e}),
|
|
1559
|
+
e.strict?j8.test(t):CC.test(t)||(e.acceptRelative?G8.test(t):!1)}function W8(t="",e){return t.endsWith("/")}function z8(t="",e){return(W8(t)?t.slice(0,-1):t)||"/"}function AC(t="",e){return t.endsWith("/")?t:t+"/"}function od(t=""){return t.startsWith("/")}function SC(t=""){return(od(t)?t.slice(1):t)||"/"}function H8(t=""){return od(t)?t:"/"+t}function K8(t,e){if(V8(e))return t;const n=z8(e);if(!t.startsWith(n))return t;const r=t.slice(n.length);return r[0]==="/"?r:"/"+r}function V8(t){return!t||
|
|
1560
|
+
t==="/"}function X8(t){return t&&t!=="/"}function _C(t,...e){let n=t||"";for(const r of e.filter(i=>X8(i)))if(n){const i=r.replace(U8,"");n=AC(n)+i}else n=r;return n}function bp(...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&&rs(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("/");
|
|
1561
|
+
return i>=0?n[0]?.startsWith("/")&&!s.startsWith("/")?s="/"+s:n[0]?.startsWith("./")&&!s.startsWith("./")&&(s="./"+s):s="../".repeat(-1*i)+s,n[n.length-1]?.endsWith("/")&&!s.endsWith("/")&&(s+="/"),s}function PC(t){return Ev(t,"")}function Ev(t,e){let n=t.match(CC);return n||(n=t.match(/^\/{2,}/)),n?e+t.slice(n[0].length):e+t}const Y8=Symbol.for("ufo:protocolRelative");function J8(t="",e){const n=t.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(n){const[,f,d=""]=n;return{protocol:f.
|
|
1562
|
+
toLowerCase(),pathname:d,href:f+d,auth:"",host:"",search:"",hash:""}}if(!rs(t,{acceptRelative:!0}))return Ta(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}=Ta(a);return{protocol:r.toLowerCase(),auth:i?i.slice(0,Math.max(0,i.length-1)):"",host:o,pathname:u,search:c,hash:l,[Y8]:!r}}function Ta(t=""){const[e="",n="",r=""]=(t.
|
|
1563
|
+
match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:e,search:n,hash:r}}const Q8=/\/([^/]+)$/;function Z8(t="",e){const{pathname:n}=J8(t),r=n.match(Q8);return r?r[1]:void 0}var eU=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,tU=/[\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]/,
|
|
1564
|
+
nU=/[\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]/,
|
|
1565
|
+
$v={Space_Separator:eU,ID_Start:tU,ID_Continue:nU},Mt={isSpaceSeparator(t){return typeof t=="string"&&$v.Space_Separator.test(t)},isIdStartChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t==="$"||t==="_"||$v.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"||$v.ID_Continue.test(t))},isDigit(t){return typeof t=="string"&&/[0-9]/.test(t)},isHexDigit(t){return typeof t==
|
|
1566
|
+
"string"&&/[0-9A-Fa-f]/.test(t)}};let Dv,_n,Pi,Ep,is,Cr,Zt,Rv,ad;var rU=function(e,n){Dv=String(e),_n="start",Pi=[],Ep=0,is=1,Cr=0,Zt=void 0,Rv=void 0,ad=void 0;do Zt=iU(),aU[_n]();while(Zt.type!=="eof");return typeof n=="function"?kv({"":ad},"",n):ad};function kv(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=kv(r,s,n);o===void 0?delete r[s]:Object.defineProperty(r,s,{value:o,writable:!0,enumerable:!0,configurable:!0})}else
|
|
1567
|
+
for(const i in r){const s=kv(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,Pe,ud,xi,Ke;function iU(){for(Fe="default",Pe="",ud=!1,xi=1;;){Ke=Ni();const t=xC[Fe]();if(t)return t}}function Ni(){if(Dv[Ep])return String.fromCodePoint(Dv.codePointAt(Ep))}function Z(){const t=Ni();return t===`
|
|
1568
|
+
`?(is++,Cr=0):t?Cr+=t.length:Cr++,t&&(Ep+=t.length),t}const xC={default(){switch(Ke){case" ":case"\v":case"\f":case" ":case"\xA0":case"\uFEFF":case`
|
|
1569
|
+
`:case"\r":case"\u2028":case"\u2029":Z();return;case"/":Z(),Fe="comment";return;case void 0:return Z(),$t("eof")}if(Mt.isSpaceSeparator(Ke)){Z();return}return xC[_n]()},comment(){switch(Ke){case"*":Z(),Fe="multiLineComment";return;case"/":Z(),Fe="singleLineComment";return}throw Dt(Z())},multiLineComment(){switch(Ke){case"*":Z(),Fe="multiLineCommentAsterisk";return;case void 0:throw Dt(Z())}Z()},multiLineCommentAsterisk(){switch(Ke){case"*":Z();return;case"/":Z(),Fe="default";return;case void 0:throw Dt(
|
|
1570
|
+
Z())}Z(),Fe="multiLineComment"},singleLineComment(){switch(Ke){case`
|
|
1571
|
+
`:case"\r":case"\u2028":case"\u2029":Z(),Fe="default";return;case void 0:return Z(),$t("eof")}Z()},value(){switch(Ke){case"{":case"[":return $t("punctuator",Z());case"n":return Z(),ho("ull"),$t("null",null);case"t":return Z(),ho("rue"),$t("boolean",!0);case"f":return Z(),ho("alse"),$t("boolean",!1);case"-":case"+":Z()==="-"&&(xi=-1),Fe="sign";return;case".":Pe=Z(),Fe="decimalPointLeading";return;case"0":Pe=Z(),Fe="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"\
|
|
1572
|
+
9":Pe=Z(),Fe="decimalInteger";return;case"I":return Z(),ho("nfinity"),$t("numeric",1/0);case"N":return Z(),ho("aN"),$t("numeric",NaN);case'"':case"'":ud=Z()==='"',Pe="",Fe="string";return}throw Dt(Z())},identifierNameStartEscape(){if(Ke!=="u")throw Dt(Z());Z();const t=Tv();switch(t){case"$":case"_":break;default:if(!Mt.isIdStartChar(t))throw NC();break}Pe+=t,Fe="identifierName"},identifierName(){switch(Ke){case"$":case"_":case"\u200C":case"\u200D":Pe+=Z();return;case"\\":Z(),Fe="identifierNameEs\
|
|
1573
|
+
cape";return}if(Mt.isIdContinueChar(Ke)){Pe+=Z();return}return $t("identifier",Pe)},identifierNameEscape(){if(Ke!=="u")throw Dt(Z());Z();const t=Tv();switch(t){case"$":case"_":case"\u200C":case"\u200D":break;default:if(!Mt.isIdContinueChar(t))throw NC();break}Pe+=t,Fe="identifierName"},sign(){switch(Ke){case".":Pe=Z(),Fe="decimalPointLeading";return;case"0":Pe=Z(),Fe="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":Pe=Z(),Fe="decimalInteger";return;case"I":return Z(),
|
|
1574
|
+
ho("nfinity"),$t("numeric",xi*(1/0));case"N":return Z(),ho("aN"),$t("numeric",NaN)}throw Dt(Z())},zero(){switch(Ke){case".":Pe+=Z(),Fe="decimalPoint";return;case"e":case"E":Pe+=Z(),Fe="decimalExponent";return;case"x":case"X":Pe+=Z(),Fe="hexadecimal";return}return $t("numeric",xi*0)},decimalInteger(){switch(Ke){case".":Pe+=Z(),Fe="decimalPoint";return;case"e":case"E":Pe+=Z(),Fe="decimalExponent";return}if(Mt.isDigit(Ke)){Pe+=Z();return}return $t("numeric",xi*Number(Pe))},decimalPointLeading(){if(Mt.
|
|
1575
|
+
isDigit(Ke)){Pe+=Z(),Fe="decimalFraction";return}throw Dt(Z())},decimalPoint(){switch(Ke){case"e":case"E":Pe+=Z(),Fe="decimalExponent";return}if(Mt.isDigit(Ke)){Pe+=Z(),Fe="decimalFraction";return}return $t("numeric",xi*Number(Pe))},decimalFraction(){switch(Ke){case"e":case"E":Pe+=Z(),Fe="decimalExponent";return}if(Mt.isDigit(Ke)){Pe+=Z();return}return $t("numeric",xi*Number(Pe))},decimalExponent(){switch(Ke){case"+":case"-":Pe+=Z(),Fe="decimalExponentSign";return}if(Mt.isDigit(Ke)){Pe+=Z(),Fe="\
|
|
1576
|
+
decimalExponentInteger";return}throw Dt(Z())},decimalExponentSign(){if(Mt.isDigit(Ke)){Pe+=Z(),Fe="decimalExponentInteger";return}throw Dt(Z())},decimalExponentInteger(){if(Mt.isDigit(Ke)){Pe+=Z();return}return $t("numeric",xi*Number(Pe))},hexadecimal(){if(Mt.isHexDigit(Ke)){Pe+=Z(),Fe="hexadecimalInteger";return}throw Dt(Z())},hexadecimalInteger(){if(Mt.isHexDigit(Ke)){Pe+=Z();return}return $t("numeric",xi*Number(Pe))},string(){switch(Ke){case"\\":Z(),Pe+=sU();return;case'"':if(ud)return Z(),$t(
|
|
1577
|
+
"string",Pe);Pe+=Z();return;case"'":if(!ud)return Z(),$t("string",Pe);Pe+=Z();return;case`
|
|
1578
|
+
`:case"\r":throw Dt(Z());case"\u2028":case"\u2029":uU(Ke);break;case void 0:throw Dt(Z())}Pe+=Z()},start(){switch(Ke){case"{":case"[":return $t("punctuator",Z())}Fe="value"},beforePropertyName(){switch(Ke){case"$":case"_":Pe=Z(),Fe="identifierName";return;case"\\":Z(),Fe="identifierNameStartEscape";return;case"}":return $t("punctuator",Z());case'"':case"'":ud=Z()==='"',Fe="string";return}if(Mt.isIdStartChar(Ke)){Pe+=Z(),Fe="identifierName";return}throw Dt(Z())},afterPropertyName(){if(Ke===":")return $t(
|
|
1579
|
+
"punctuator",Z());throw Dt(Z())},beforePropertyValue(){Fe="value"},afterPropertyValue(){switch(Ke){case",":case"}":return $t("punctuator",Z())}throw Dt(Z())},beforeArrayValue(){if(Ke==="]")return $t("punctuator",Z());Fe="value"},afterArrayValue(){switch(Ke){case",":case"]":return $t("punctuator",Z())}throw Dt(Z())},end(){throw Dt(Z())}};function $t(t,e){return{type:t,value:e,line:is,column:Cr}}function ho(t){for(const e of t){if(Ni()!==e)throw Dt(Z());Z()}}function sU(){switch(Ni()){case"b":return Z(),
|
|
1580
|
+
"\b";case"f":return Z(),"\f";case"n":return Z(),`
|
|
1581
|
+
`;case"r":return Z(),"\r";case"t":return Z()," ";case"v":return Z(),"\v";case"0":if(Z(),Mt.isDigit(Ni()))throw Dt(Z());return"\0";case"x":return Z(),oU();case"u":return Z(),Tv();case`
|
|
1582
|
+
`:case"\u2028":case"\u2029":return Z(),"";case"\r":return Z(),Ni()===`
|
|
1583
|
+
`&&Z(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw Dt(Z());case void 0:throw Dt(Z())}return Z()}function oU(){let t="",e=Ni();if(!Mt.isHexDigit(e)||(t+=Z(),e=Ni(),!Mt.isHexDigit(e)))throw Dt(Z());return t+=Z(),String.fromCodePoint(parseInt(t,16))}function Tv(){let t="",e=4;for(;e-- >0;){const n=Ni();if(!Mt.isHexDigit(n))throw Dt(Z());t+=Z()}return String.fromCodePoint(parseInt(t,16))}const aU={start(){if(Zt.type==="eof")throw po();Cv()},beforePropertyName(){switch(Zt.
|
|
1584
|
+
type){case"identifier":case"string":Rv=Zt.value,_n="afterPropertyName";return;case"punctuator":$p();return;case"eof":throw po()}},afterPropertyName(){if(Zt.type==="eof")throw po();_n="beforePropertyValue"},beforePropertyValue(){if(Zt.type==="eof")throw po();Cv()},beforeArrayValue(){if(Zt.type==="eof")throw po();if(Zt.type==="punctuator"&&Zt.value==="]"){$p();return}Cv()},afterPropertyValue(){if(Zt.type==="eof")throw po();switch(Zt.value){case",":_n="beforePropertyName";return;case"}":$p()}},afterArrayValue(){
|
|
1585
|
+
if(Zt.type==="eof")throw po();switch(Zt.value){case",":_n="beforeArrayValue";return;case"]":$p()}},end(){}};function Cv(){let t;switch(Zt.type){case"punctuator":switch(Zt.value){case"{":t={};break;case"[":t=[];break}break;case"null":case"boolean":case"numeric":case"string":t=Zt.value;break}if(ad===void 0)ad=t;else{const e=Pi[Pi.length-1];Array.isArray(e)?e.push(t):Object.defineProperty(e,Rv,{value:t,writable:!0,enumerable:!0,configurable:!0})}if(t!==null&&typeof t=="object")Pi.push(t),Array.isArray(
|
|
1586
|
+
t)?_n="beforeArrayValue":_n="beforePropertyName";else{const e=Pi[Pi.length-1];e==null?_n="end":Array.isArray(e)?_n="afterArrayValue":_n="afterPropertyValue"}}function $p(){Pi.pop();const t=Pi[Pi.length-1];t==null?_n="end":Array.isArray(t)?_n="afterArrayValue":_n="afterPropertyValue"}function Dt(t){return Dp(t===void 0?`JSON5: invalid end of input at ${is}:${Cr}`:`JSON5: invalid character '${IC(t)}' at ${is}:${Cr}`)}function po(){return Dp(`JSON5: invalid end of input at ${is}:${Cr}`)}function NC(){
|
|
1587
|
+
return Cr-=5,Dp(`JSON5: invalid identifier character at ${is}:${Cr}`)}function uU(t){console.warn(`JSON5: '${IC(t)}' in strings is not valid ECMAScript; consider escaping`)}function IC(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 Dp(t){const e=new SyntaxError(
|
|
1588
|
+
t);return e.lineNumber=is,e.columnNumber=Cr,e}var cU=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 w of n){let v;typeof w=="string"?v=w:(typeof w=="number"||w instanceof String||w instanceof Number)&&(v=String(w)),v!==void 0&&o.indexOf(v)<0&&o.push(v)}}return r instanceof Number?r=Number(r):r instanceof String&&(r=String(r)),typeof r=="number"?r>
|
|
1589
|
+
0&&(r=Math.min(10,Math.floor(r)),u=" ".substr(0,r)):typeof r=="string"&&(u=r.substr(0,10)),l("",{"":e});function l(w,v){let g=v[w];switch(g!=null&&(typeof g.toJSON5=="function"?g=g.toJSON5(w):typeof g.toJSON=="function"&&(g=g.toJSON(w))),a&&(g=a.call(v,w,g)),g instanceof Number?g=Number(g):g instanceof String?g=String(g):g instanceof Boolean&&(g=g.valueOf()),g){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof g=="string")return f(g);if(typeof g=="number")return String(
|
|
1590
|
+
g);if(typeof g=="object")return Array.isArray(g)?p(g):d(g)}function f(w){const v={"'":.1,'"':.2},g={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let E="";for(let A=0;A<w.length;A++){const N=w[A];switch(N){case"'":case'"':v[N]++,E+=N;continue;case"\0":if(Mt.isDigit(w[A+1])){E+="\\x00";continue}}if(g[N]){E+=g[N];continue}if(N<" "){let V=N.charCodeAt(0).toString(16);E+="\\x"+("00"+V).substring(V.length);
|
|
1591
|
+
continue}E+=N}const D=c||Object.keys(v).reduce((A,N)=>v[A]<v[N]?A:N);return E=E.replace(new RegExp(D,"g"),g[D]),D+E+D}function d(w){if(i.indexOf(w)>=0)throw TypeError("Converting circular structure to JSON5");i.push(w);let v=s;s=s+u;let g=o||Object.keys(w),E=[];for(const A of g){const N=l(A,w);if(N!==void 0){let V=h(A)+":";u!==""&&(V+=" "),V+=N,E.push(V)}}let D;if(E.length===0)D="{}";else{let A;if(u==="")A=E.join(","),D="{"+A+"}";else{let N=`,
|
|
1592
|
+
`+s;A=E.join(N),D=`{
|
|
1593
|
+
`+s+A+`,
|
|
1594
|
+
`+v+"}"}}return i.pop(),s=v,D}function h(w){if(w.length===0)return f(w);const v=String.fromCodePoint(w.codePointAt(0));if(!Mt.isIdStartChar(v))return f(w);for(let g=v.length;g<w.length;g++)if(!Mt.isIdContinueChar(String.fromCodePoint(w.codePointAt(g))))return f(w);return w}function p(w){if(i.indexOf(w)>=0)throw TypeError("Converting circular structure to JSON5");i.push(w);let v=s;s=s+u;let g=[];for(let D=0;D<w.length;D++){const A=l(String(D),w);g.push(A!==void 0?A:"null")}let E;if(g.length===0)E=
|
|
1595
|
+
"[]";else if(u==="")E="["+g.join(",")+"]";else{let D=`,
|
|
1596
|
+
`+s,A=g.join(D);E=`[
|
|
1597
|
+
`+s+A+`,
|
|
1598
|
+
`+v+"]"}return i.pop(),s=v,E}};const lU={parse:rU,stringify:cU};var OC=lU,Av;function FC(t){return{lang:t?.lang??Av?.lang,message:t?.message,abortEarly:t?.abortEarly??Av?.abortEarly,abortPipeEarly:t?.abortPipeEarly??Av?.abortPipeEarly}}var dU;function fU(t){return dU?.get(t)}var hU;function pU(t){return hU?.get(t)}var mU;function gU(t,e){return mU?.get(t)?.get(e)}function yU(t){const e=typeof t;return e==="string"?`"${t}"`:e==="number"||e==="bigint"||e==="boolean"?`${t}`:e==="object"||e==="funct\
|
|
1599
|
+
ion"?(t&&Object.getPrototypeOf(t)?.constructor?.name)??"null":e}function cd(t,e,n,r,i){const s=i&&"input"in i?i.input:n.value,o=i?.expected??t.expects??null,a=i?.received??yU(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??gU(t.reference,u.lang)??(c?pU(
|
|
1600
|
+
u.lang):null)??r.message??fU(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 ld(t){return{version:1,vendor:"valibot",validate(e){return t["~run"]({value:e},FC())}}}var vU=class extends Error{constructor(t){super(t[0].message),this.name="ValiError",this.issues=t}};function Rp(t){return{kind:"metadata",type:"description",reference:Rp,description:t}}function LC(t){return{kind:"validation",type:"non_empty",reference:LC,async:!1,
|
|
1601
|
+
expects:"!0",message:t,"~run"(e,n){return e.typed&&e.value.length===0&&cd(this,"length",e,n,{received:"0"}),e}}}function wU(t,e,n){return typeof t.fallback=="function"?t.fallback(e,n):t.fallback}function MC(t,e,n){return typeof t.default=="function"?t.default(e,n):t.default}function BC(t,e){return{kind:"schema",type:"array",reference:BC,expects:"Array",async:!1,item:t,message:e,get"~standard"(){return ld(this)},"~run"(n,r){const i=n.value;if(Array.isArray(i)){n.typed=!0,n.value=[];for(let s=0;s<
|
|
1602
|
+
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 cd(this,"type",n,r);return n}}}function qC(t,e){return{kind:"schema",type:"object",reference:qC,expects:"Object",async:!1,entries:t,message:e,get"~standard"(){return ld(this)},
|
|
1603
|
+
"~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]:MC(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.
|
|
1604
|
+
typed||(n.typed=!1),n.value[s]=u.value}else if(o.fallback!==void 0)n.value[s]=wU(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(cd(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 cd(this,"type",n,r);return n}}}function Sv(t,e){return{kind:"schema",type:"optional",reference:Sv,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:e,get"~standard"(){return ld(this)},"~\
|
|
1605
|
+
run"(n,r){return n.value===void 0&&(this.default!==void 0&&(n.value=MC(this,n,r)),n.value===void 0)?(n.typed=!0,n):this.wrapped["~run"](n,r)}}}function _v(t){return{kind:"schema",type:"string",reference:_v,expects:"string",async:!1,message:t,get"~standard"(){return ld(this)},"~run"(e,n){return typeof e.value=="string"?e.typed=!0:cd(this,"type",e,n),e}}}function bU(t,e,n){const r=t["~run"]({value:e},FC(n));if(r.issues)throw new vU(r.issues);return r.value}function kp(...t){return{...t[0],pipe:t,get"\
|
|
1606
|
+
~standard"(){return ld(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 jC=kp(_v(),LC()),EU=qC({name:kp(jC,Rp("Project name, must be unique in the workspace")),contactPerson:Sv(kp(jC,Rp("A person who has been involved in creating or maintaining this project"))),exclude:Sv(kp(BC(_v()),Rp('List of file patterns to exclude from t\
|
|
1607
|
+
he project, default is ["**/node_modules/**/*"]')))});function $U(t){return DU(OC.parse(t))}function DU(t){return bU(EU,t)}const GC=rt.getChild("ProjectsManager");class jn{constructor(e){this.services=e,GC.debug`created`}static DefaultProjectId="default";static ConfigFileNames=[".likec4rc",".likec4.config.json","likec4.config.json"];projectIdToFolder=new E_;_projects=[];defaultGlobalProject={id:jn.DefaultProjectId,config:{name:jn.DefaultProjectId,exclude:["**/node_modules/**/*"]},exclude:TC("**/\
|
|
1608
|
+
node_modules/**/*")};get defaultProjectId(){if(!(this._projects.length>1))return this._projects[0]?.id??jn.DefaultProjectId}get all(){return lr(this._projects,1)?[...xt(this._projects,fi("id")),jn.DefaultProjectId]:[jn.DefaultProjectId]}getProject(e){const n=typeof e=="string"?e:e.likec4ProjectId||this.belongsTo(e);if(n===jn.DefaultProjectId){const s=this.services.workspace.WorkspaceManager.workspaceUri;return{id:n,folder:s,config:this.defaultGlobalProject.config}}const{config:r,folder:i}=It(this.
|
|
1609
|
+
_projects.find(s=>s.id===n),`Project "${n}" not found`);return{id:n,folder:yt.parse(i),config:r}}ensureProjectId(e){return e===jn.DefaultProjectId?e:e?(_e(this.projectIdToFolder.has(e),`Project ID ${e} is not registered`),e):It(this.defaultProjectId,()=>`Specify exact project, known: [${[...this.projectIdToFolder.keys()].join(", ")}]`)}hasMultipleProjects(){return this._projects.length>1}checkIfExcluded(e){let n=e.toString();const r=this.findProjectForDocument(n);return r.exclude?r.exclude(PC(n)):
|
|
1610
|
+
!1}isConfigFile(e){const n=Z8(e.uri.toString())?.toLowerCase();return!!n&&jn.ConfigFileNames.includes(n)}async loadConfigFile(e){if(!e.isDirectory&&this.isConfigFile(e))return await this.registerProject(e.uri)}async registerProject(e){if(yt.isUri(e)){const u=e,c=await this.services.workspace.FileSystemProvider.readFile(u),l=$U(c),f=bp(u.path,".."),d=u.with({path:f});return this.registerProject({config:l,folderUri:d})}const{config:n,folderUri:r}=e;let i=n.name,s=1;for(;this.projectIdToFolder.has(
|
|
1611
|
+
i);)i=`${n.name}-${s++}`;let o;yt.isUri(r)?o=r.toString():o=rs(r)?r:Ev(r,"file://");const a={id:i,config:n,folder:o};return Rt(n.exclude)?a.exclude=this.defaultGlobalProject.exclude:lr(n.exclude,1)&&(a.exclude=TC(n.exclude)),this._projects=He([...this._projects,a],w4([({folder:u})=>PC(u).split("/").length,"desc"])),this.projectIdToFolder.set(i,o),GC.info`register project ${i} folder: ${o})`,a}belongsTo(e){let n;return typeof e=="string"?n=rs(e)?e:Ev(e,"file://"):yt.isUri(e)?n=e.toString():n=e.uri.
|
|
1612
|
+
toString(),this.findProjectForDocument(n).id}findProjectForDocument(e){return this.mappingsToProject.get(e,()=>this._projects.find(({folder:n})=>e.startsWith(n))??this.defaultGlobalProject)}_mappingsToProject;get mappingsToProject(){return this._mappingsToProject??=new nh(this.services),this._mappingsToProject}}const RU={fileSystemProvider:()=>new CU},kU=[...vv.fileExtensions,...jn.ConfigFileNames],TU=t=>kU.some(e=>t.endsWith(e));let CU=class extends n8{async readFile(e){return id(e)?Promise.resolve(
|
|
1613
|
+
DC):await super.readFile(e)}async readDirectory(e){const n=[];try{const r=await new t8.fdir().withSymlinks({resolvePaths:!1}).withFullPaths().filter(TU).crawl(e.fsPath).withPromise();for(const i of r)n.push({isFile:!0,isDirectory:!1,uri:yt.file(i)})}catch(r){sd(r)}return n}};var AU=Object.getOwnPropertyNames,SU=Object.getOwnPropertySymbols,_U=Object.prototype.hasOwnProperty;function UC(t,e){return function(r,i,s){return t(r,i,s)&&e(r,i,s)}}function Tp(t){return function(n,r,i){if(!n||!r||typeof n!=
|
|
1614
|
+
"object"||typeof r!="object")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 WC(t){return AU(t).concat(SU(t))}var PU=Object.hasOwn||function(t,e){return _U.call(t,e)};function mo(t,e){return t===e||!t&&!e&&t!==t&&e!==e}var xU="__v",NU="__o",IU="_owner",zC=Object.getOwnPropertyDescriptor,HC=Object.keys;function OU(t,e,n){var r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(
|
|
1615
|
+
t[r],e[r],r,r,t,e,n))return!1;return!0}function FU(t,e){return mo(t.getTime(),e.getTime())}function LU(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function MU(t,e){return t===e}function KC(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,h=a.value;if(n.equals(d[0],h[0],u,f,t,e,n)&&n.equals(
|
|
1616
|
+
d[1],h[1],d[0],h[0],t,e,n)){l=i[f]=!0;break}f++}if(!l)return!1;u++}return!0}var BU=mo;function qU(t,e,n){var r=HC(t),i=r.length;if(HC(e).length!==i)return!1;for(;i-- >0;)if(!XC(t,e,n,r[i]))return!1;return!0}function dd(t,e,n){var r=WC(t),i=r.length;if(WC(e).length!==i)return!1;for(var s,o,a;i-- >0;)if(s=r[i],!XC(t,e,n,s)||(o=zC(t,s),a=zC(e,s),(o||a)&&(!o||!a||o.configurable!==a.configurable||o.enumerable!==a.enumerable||o.writable!==a.writable)))return!1;return!0}function jU(t,e){return mo(t.valueOf(),
|
|
1617
|
+
e.valueOf())}function GU(t,e){return t.source===e.source&&t.flags===e.flags}function VC(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 UU(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 WU(t,e){return t.hostname===
|
|
1618
|
+
e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function XC(t,e,n,r){return(r===IU||r===NU||r===xU)&&(t.$$typeof||e.$$typeof)?!0:PU(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}var zU="[object Arguments]",HU="[object Boolean]",KU="[object Date]",VU="[object Error]",XU="[object Map]",YU="[object Number]",JU="[object Object]",QU="[object RegExp]",ZU="[object Set]",eW="[object String]",tW="[object URL]",nW=Array.
|
|
1619
|
+
isArray,YC=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,JC=Object.assign,rW=Object.prototype.toString.call.bind(Object.prototype.toString);function iW(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(p,w,v){if(p===w)return!0;if(p==null||w==null)return!1;
|
|
1620
|
+
var g=typeof p;if(g!==typeof w)return!1;if(g!=="object")return g==="number"?o(p,w,v):g==="function"?i(p,w,v):!1;var E=p.constructor;if(E!==w.constructor)return!1;if(E===Object)return a(p,w,v);if(nW(p))return e(p,w,v);if(YC!=null&&YC(p))return f(p,w,v);if(E===Date)return n(p,w,v);if(E===RegExp)return c(p,w,v);if(E===Map)return s(p,w,v);if(E===Set)return l(p,w,v);var D=rW(p);return D===KU?n(p,w,v):D===QU?c(p,w,v):D===XU?s(p,w,v):D===ZU?l(p,w,v):D===JU?typeof p.then!="function"&&typeof w.then!="fun\
|
|
1621
|
+
ction"&&a(p,w,v):D===tW?d(p,w,v):D===VU?r(p,w,v):D===zU?a(p,w,v):D===HU||D===YU||D===eW?u(p,w,v):!1}}function sW(t){var e=t.circular,n=t.createCustomConfig,r=t.strict,i={areArraysEqual:r?dd:OU,areDatesEqual:FU,areErrorsEqual:LU,areFunctionsEqual:MU,areMapsEqual:r?UC(KC,dd):KC,areNumbersEqual:BU,areObjectsEqual:r?dd:qU,arePrimitiveWrappersEqual:jU,areRegExpsEqual:GU,areSetsEqual:r?UC(VC,dd):VC,areTypedArraysEqual:r?dd:UU,areUrlsEqual:WU};if(n&&(i=JC({},i,n(i))),e){var s=Tp(i.areArraysEqual),o=Tp(
|
|
1622
|
+
i.areMapsEqual),a=Tp(i.areObjectsEqual),u=Tp(i.areSetsEqual);i=JC({},i,{areArraysEqual:s,areMapsEqual:o,areObjectsEqual:a,areSetsEqual:u})}return i}function oW(t){return function(e,n,r,i,s,o,a){return t(e,n,a)}}function aW(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,h=l.meta;return n(u,c,{cache:d,equals:i,meta:h,strict:s})};if(e)return function(u,c){return n(u,c,{cache:new WeakMap,equals:i,
|
|
1623
|
+
meta:void 0,strict:s})};var o={cache:void 0,equals:i,meta:void 0,strict:s};return function(u,c){return n(u,c,o)}}var Pv=ss();ss({strict:!0}),ss({circular:!0}),ss({circular:!0,strict:!0}),ss({createInternalComparator:function(){return mo}}),ss({strict:!0,createInternalComparator:function(){return mo}}),ss({circular:!0,createInternalComparator:function(){return mo}}),ss({circular:!0,createInternalComparator:function(){return mo},strict:!0});function ss(t){t===void 0&&(t={});var e=t.circular,n=e===
|
|
1624
|
+
void 0?!1:e,r=t.createInternalComparator,i=t.createState,s=t.strict,o=s===void 0?!1:s,a=sW(t),u=iW(a),c=r?r(u):oW(u);return aW({circular:n,comparator:u,createState:i,equals:c,strict:o})}function QC(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 ZC=(t,e)=>t.
|
|
1625
|
+
width>e.width+10||t.height>e.height+10;function uW(t,e){if(t.hash===e.hash)return{diagram:QC(t,e)};if(Pv(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||ZC(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:QC(t,
|
|
1626
|
+
e)};const n=t.nodes.reduce((r,i)=>{const s=e.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||ZC(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:Zu(e.edges).flatMap(([r,i])=>i.dotpos?{id:r,dotpos:i.dotpos}:[])}}}function eA(t){return typeof t=="object"&&t!==null&&typeof t.id=="string"}function xv(t){return typeof t==
|
|
1627
|
+
"object"&&t!==null&&t.$$type==="Node"&&typeof t.id=="string"}function tA(t){return xv(t)||eA(t)}function fd(t){return typeof t=="string"||tA(t)}function cW(t){return Array.isArray(t)&&t.every(fd)}function lW(t){return["n","ne","e","se","s","sw","w","nw","c"].includes(t)}function nA(t){if(tA(t))return t;const[e,n,r]=t.split(":");return lW(r)?{id:e,port:n,compass:r}:{id:e,port:n}}function dW(t){if(t.length<2&&(fd(t[0])&&fd(t[1]))===!1)throw Error("EdgeTargets must have at least 2 elements.");return t.
|
|
1628
|
+
map(e=>nA(e))}const Cp=Object.seal({Graph:null,Digraph:null,Subgraph:null,Node:null,Edge:null});function fW(t){return Object.assign(Object.seal(Object.assign({},Cp)),t)}function hW(...t){const[e,...n]=t;return(...r)=>n.reduce((i,s)=>s(i),e(...r))}function dr(t,...e){return hW(t,...e)}const pW=t=>(...e)=>n=>t(n,...e),mW=t=>({[Symbol.iterator]:t}),Ar=pW((t,e)=>Array.from(mW(function*(){for(const n of t)yield e(n)})));class rA{options;getLocation(){return this.options?.locationFunction?.()??null}constructor(e){
|
|
1629
|
+
this.options=e}createElement(e,n,r=[]){return{location:this.getLocation(),...n,type:e,children:r}}}const it=rA.prototype.createElement.bind(new rA),gW=/\r?\n/;function Sr(t){return e=>e.join(t)}function yW(t){return e=>t+e+t}function os(t,e){return n=>t+n+e}function Ap(t){return e=>t+e}const iA=t=>t.replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/"/g,'\\"'),Sp=t=>t.split(gW),hd=(t,e,n)=>dr(Sp,Ar(Ap(t==="space"?" ".repeat(e):`
|
|
1630
|
+
`)),Sr(n)),go=t=>{switch(t){case"crlf":return`\r
|
|
1631
|
+
`;case"lf":return`
|
|
1632
|
+
`}},vW={match(t){return t.type==="AttributeList"},print(t,e){if(e.children.length===0)return`${e.kind.toLocaleLowerCase()} [];`;const n=go(t.endOfLine);return dr(Ar(t.print),Sr(n),hd(t.indentStyle,t.indentSize,n),os(`${e.kind.toLocaleLowerCase()} [${n}`,`${n}];`))(e.children)}},wW={match(t){return t.type==="Attribute"},print(t,e){return`${t.print(e.key)} = ${t.print(e.value)};`}},bW={match(t){return t.type==="Comment"},print(t,e){const n=go(t.endOfLine);switch(e.kind){case"Block":return dr(Sp,Ar(
|
|
1633
|
+
Ap(" * ")),Sr(n),os(`/**${n}`,`${n} */`))(e.value);case"Macro":return dr(Sp,Ar(Ap("# ")),Sr(n))(e.value);case"Slash":default:return dr(Sp,Ar(Ap("// ")),Sr(n))(e.value)}}},EW={match(t){return t.type==="Dot"},print(t,e){return e.children.map(t.print).join(go(t.endOfLine))}},$W={match(t){return t.type==="Edge"},print(t,e){const n=dr(Ar(t.print),Sr(t.directed?" -> ":" -- "))(e.targets);if(e.children.length===0)return`${n};`;const r=go(t.endOfLine),i=dr(Ar(t.print),Sr(r),hd(t.indentStyle,t.indentSize,
|
|
1634
|
+
r),os(`[${r}`,`${r}];`))(e.children);return`${n} ${i}`}},DW={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=dr(Ar(t.print),Sr(r),hd(t.indentStyle,t.indentSize,r),os(`{${r}`,`${r}}`))(e.children);return`${n.join(" ")} ${i}`}},RW=dr(iA,yW('"')),kW=os("<",">"),TW={match(t){return t.type==="Literal"},print(t,e){
|
|
1635
|
+
switch(e.quoted){case"html":return kW(e.value);case!0:return RW(e.value);case!1:default:return iA(e.value)}}},CW={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=dr(Ar(t.print),Sr(r),hd(t.indentStyle,t.indentSize,r),os(`[${r}`,`${r}];`))(e.children);return`${n} ${i}`}},AW={match(t){return t.type==="NodeRefGroup"},print(t,e){return dr(Ar(t.print),Sr(" "),os("{","}"))(e.children)}},SW={match(t){return t.type==="Node\
|
|
1636
|
+
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(":")}},_W={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=dr(Ar(t.print),Sr(r),hd(t.indentStyle,t.indentSize,r),os(`{${r}`,`${r}}`))(e.children);return`${n.join(" ")} ${i}`}},PW=[vW,wW,bW,EW,$W,DW,TW,CW,AW,SW,_W];class xW{options;#e=[...PW];constructor(e={}){
|
|
1637
|
+
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 NW(t,e){const n=new xW(e).print(t);if(!n)throw new Error;return n}function _p(t,e){if(typeof e=="string"){const n=e.trim();return/^<.+>$/ms.test(n)?it("Attribute",{key:it("Literal",{value:t,quoted:!1},[]),value:it("Literal",{value:n.
|
|
1638
|
+
slice(1,n.length-1),quoted:"html"},[])},[]):it("Attribute",{key:it("Literal",{value:t,quoted:!1},[]),value:it("Literal",{value:e,quoted:!0},[])},[])}return it("Attribute",{key:it("Literal",{value:t,quoted:!1},[]),value:it("Literal",{value:String(e),quoted:!1},[])},[])}function yo(t,e){return it("Comment",{kind:e,value:t},[])}function sA(t,e){return Array.from(function*(){for(const[n,r]of e.values)yield _p(n,r);for(const n of Object.values(e.attributes))n.size>0&&(n.comment&&(yield yo(n.comment,t.
|
|
1639
|
+
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 IW={match(t){return t.$$type==="AttributeList"},convert(t,e){return it("AttributeList",{kind:e.$$kind},e.values.map(([n,r])=>_p(n,r)))}},OW={match(t){return t.$$type==="Edge"},convert(t,e){
|
|
1640
|
+
return it("Edge",{targets:e.targets.map(n=>xv(n)?it("NodeRef",{id:it("Literal",{value:n.id,quoted:!0},[])},[]):eA(n)?it("NodeRef",{id:it("Literal",{value:n.id,quoted:!0},[]),port:n.port?it("Literal",{value:n.port,quoted:!0},[]):void 0,compass:n.compass?it("Literal",{value:n.compass,quoted:!0},[]):void 0},[]):it("NodeRefGroup",{},n.map(r=>xv(r)?it("NodeRef",{id:it("Literal",{value:r.id,quoted:!0},[])},[]):it("NodeRef",{id:it("Literal",{value:r.id,quoted:!0},[]),port:r.port?it("Literal",{value:r.port,
|
|
1641
|
+
quoted:!0},[]):void 0,compass:r.compass?it("Literal",{value:r.compass,quoted:!0},[]):void 0},[]))))},[...e.attributes.comment?[yo(e.attributes.comment,t.commentKind)]:[],...e.attributes.values.map(([n,r])=>_p(n,r))])}},FW={match(t){return t.$$type==="Graph"},convert(t,e){return it("Dot",{},[...e.comment?[yo(e.comment,t.commentKind)]:[],it("Graph",{directed:e.directed,strict:e.strict,id:e.id?it("Literal",{value:e.id,quoted:!0},[]):void 0},sA(t,e))])}},LW={match(t){return t.$$type==="Node"},convert(t,e){
|
|
1642
|
+
return it("Node",{id:it("Literal",{value:e.id,quoted:!0},[])},[...e.attributes.comment?[yo(e.attributes.comment,t.commentKind)]:[],...e.attributes.values.map(([n,r])=>_p(n,r))])}},MW={match(t){return t.$$type==="Subgraph"},convert(t,e){return it("Subgraph",{id:e.id?it("Literal",{value:e.id,quoted:!0},[]):void 0},sA(t,e))}},BW=[IW,OW,LW,FW,MW];class qW{options;#e=[...BW];constructor(e={}){this.options=e}convert(e){const n=[...this.#e],{commentKind:r="Slash"}=this.options,i={commentKind:r,convert(s){
|
|
1643
|
+
for(const o of n)if(o.match(s))return o.convert(i,s);throw Error()}};return i.convert(e)}}function jW(t,e){return new qW(e).convert(t)}const F=new Proxy(Object.freeze({}),{get:(t,e)=>e});class Nv{}class Iv extends Nv{#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(
|
|
1644
|
+
e);for(const[r,i]of n)this.set(r,i)}clear(){this.#e.clear()}}class Ov extends Iv{$$kind;get $$type(){return"AttributeList"}comment;constructor(e,n){super(n),this.$$kind=e}}class oA extends Iv{#e=Cp;id;comment;attributes=Object.freeze({graph:new Ov("Graph"),edge:new Ov("Edge"),node:new Ov("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,
|
|
1645
|
+
subgraphs:new Set};with(e){this.#e=fW(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){
|
|
1646
|
+
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=>cW(s)?dW(s):nA(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.
|
|
1647
|
+
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(
|
|
1648
|
+
o),o}typeof e=="object"&&e!==null&&this.attributes.edge.apply(e)}graph(e){this.attributes.graph.apply(e)}}class aA extends oA{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 GW extends aA{get directed(){return!0}}let UW=class extends aA{get directed(){return!1}};class WW extends oA{get $$type(){return"Subgraph"}id;constructor(...e){
|
|
1649
|
+
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 uA extends Iv{comment}let zW=class extends Nv{id;get $$type(){return"Node"}comment;attributes;constructor(e,n){super(),this.id=e,this.attributes=new uA(n)}port(e){return typeof e=="string"?{id:this.id,port:e}:{id:this.id,...e}}};class HW extends Nv{targets;get $$type(){return"Edge"}comment;attributes;constructor(e,n){
|
|
1650
|
+
if(super(),this.targets=e,e.length<2&&(fd(e[0])&&fd(e[1]))===!1)throw Error("The element of Edge target is missing or not satisfied as Edge target.");this.attributes=new uA(n)}}Object.assign(Cp,{Graph:UW,Digraph:GW,Subgraph:WW,Node:zW,Edge:HW});function cA(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 lA(t,e=Cp){return Object.
|
|
1651
|
+
freeze({digraph:cA.call(e,!0,t),graph:cA.call(e,!1,t)})}const dA=lA(!1),KW=dA.digraph;dA.graph;const VW=lA(!0);function fA(t,e){const n=jW(t,e?.convert);return NW(n,e?.print)}var Fv,hA;function XW(){if(hA)return Fv;hA=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(`
|
|
1652
|
+
`).map(o=>t(o)).join(`
|
|
1653
|
+
`)}Fv=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||`
|
|
1654
|
+
`+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(h){return h.slice(-1)===`
|
|
1655
|
+
`&&(h=h.slice(0,h.length-1)),u(h)}).join(a);return i.trim===!0&&(d=e(d)),d};function n(r){return r}return Fv}var YW=XW();const JW=Fr(YW),Pp={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<
|
|
1656
|
+
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 Pp.hue2rgb(s,i,t+1/3)*255;case"g":return Pp.hue2rgb(s,i,t)*255;case"b":return Pp.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:
|
|
1657
|
+
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}}},QW={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},ZW={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},Le={channel:Pp,lang:QW,unit:ZW},as={};for(let t=0;t<=255;t++)as[t]=Le.unit.dec2hex(t);const mn={ALL:0,RGB:1,HSL:2};class ez{constructor(){this.type=mn.ALL}get(){return this.type}set(e){if(this.type&&this.type!==
|
|
1658
|
+
e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=mn.ALL}is(e){return this.type===e}}class tz{constructor(e,n){this.color=n,this.changed=!1,this.data=e,this.type=new ez}set(e,n){return this.color=n,this.changed=!1,this.data=e,this.type.type=mn.ALL,this}_ensureHSL(){const e=this.data,{h:n,s:r,l:i}=e;n===void 0&&(e.h=Le.channel.rgb2hsl(e,"h")),r===void 0&&(e.s=Le.channel.rgb2hsl(e,"s")),i===void 0&&(e.l=Le.channel.rgb2hsl(e,"l"))}_ensureRGB(){
|
|
1659
|
+
const e=this.data,{r:n,g:r,b:i}=e;n===void 0&&(e.r=Le.channel.hsl2rgb(e,"r")),r===void 0&&(e.g=Le.channel.hsl2rgb(e,"g")),i===void 0&&(e.b=Le.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,n=e.r;return!this.type.is(mn.HSL)&&n!==void 0?n:(this._ensureHSL(),Le.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,n=e.g;return!this.type.is(mn.HSL)&&n!==void 0?n:(this._ensureHSL(),Le.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,n=e.b;return!this.type.is(mn.HSL)&&n!==void 0?n:(this._ensureHSL(),Le.
|
|
1660
|
+
channel.hsl2rgb(e,"b"))}get h(){const e=this.data,n=e.h;return!this.type.is(mn.RGB)&&n!==void 0?n:(this._ensureRGB(),Le.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,n=e.s;return!this.type.is(mn.RGB)&&n!==void 0?n:(this._ensureRGB(),Le.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,n=e.l;return!this.type.is(mn.RGB)&&n!==void 0?n:(this._ensureRGB(),Le.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(mn.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(mn.RGB),
|
|
1661
|
+
this.changed=!0,this.data.g=e}set b(e){this.type.set(mn.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(mn.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(mn.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(mn.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const Lv=new tz({r:0,g:0,b:0,a:0},"transparent"),Ca={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;const e=t.match(Ca.re);if(!e)return;const n=e[1],
|
|
1662
|
+
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 Lv.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?`#${as[Math.round(e)]}${as[Math.round(n)]}${as[Math.round(r)]}${as[Math.round(i*255)]}`:`#${as[Math.round(e)]}${as[Math.round(n)]}${as[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,
|
|
1663
|
+
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 Le.channel.clamp.h(parseFloat(n)*.9);case"rad":return Le.channel.clamp.h(parseFloat(n)*180/Math.PI);case"turn":return Le.channel.clamp.h(parseFloat(n)*360)}}return Le.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 Lv.set({h:vo._hue2deg(r),s:Le.channel.clamp.s(parseFloat(
|
|
1664
|
+
i)),l:Le.channel.clamp.l(parseFloat(s)),a:o?Le.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(${Le.lang.round(e)}, ${Le.lang.round(n)}%, ${Le.lang.round(r)}%, ${i})`:`hsl(${Le.lang.round(e)}, ${Le.lang.round(n)}%, ${Le.lang.round(r)}%)`}},pd={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",
|
|
1665
|
+
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\
|
|
1666
|
+
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\
|
|
1667
|
+
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:"\
|
|
1668
|
+
#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:"\
|
|
1669
|
+
#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:"\
|
|
1670
|
+
#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=pd.colors[t];if(e)return Ca.parse(e)},stringify:t=>{const e=Ca.stringify(t);for(const n in pd.colors)if(pd.colors[n]===e)return n}},md={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,
|
|
1671
|
+
parse:t=>{const e=t.charCodeAt(0);if(e!==114&&e!==82)return;const n=t.match(md.re);if(!n)return;const[,r,i,s,o,a,u,c,l]=n;return Lv.set({r:Le.channel.clamp.r(i?parseFloat(r)*2.55:parseFloat(r)),g:Le.channel.clamp.g(o?parseFloat(s)*2.55:parseFloat(s)),b:Le.channel.clamp.b(u?parseFloat(a)*2.55:parseFloat(a)),a:c?Le.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(${Le.lang.round(e)}, ${Le.lang.round(n)}, ${Le.lang.round(r)}, ${Le.lang.
|
|
1672
|
+
round(i)})`:`rgb(${Le.lang.round(e)}, ${Le.lang.round(n)}, ${Le.lang.round(r)})`}},us={format:{keyword:pd,hex:Ca,rgb:md,rgba:md,hsl:vo,hsla:vo},parse:t=>{if(typeof t!="string")return t;const e=Ca.parse(t)||md.parse(t)||vo.parse(t)||pd.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(mn.HSL)||t.data.r===void 0?vo.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?md.stringify(t):Ca.
|
|
1673
|
+
stringify(t)},nz=(t,e)=>{const n=us.parse(t);for(const r in e)n[r]=Le.channel.clamp[r](e[r]);return us.stringify(n)},pA=t=>us.format.hex.stringify(us.parse(t)),rz=(t,e,n)=>{const r=us.parse(t),i=r[e],s=Le.channel.clamp[e](i+n);return i!==s&&(r[e]=s),us.stringify(r)},iz=(t,e)=>rz(t,"a",-.3),sz=(t,e)=>{const n=us.parse(t),r={};for(const i in e)e[i]&&(r[i]=n[i]+e[i]);return nz(t,r)},oz=(t,e)=>{const n=us.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],Le.channel.max[s]);
|
|
1674
|
+
return sz(t,r)};function er(t){return t.children.length>0}function gn(t){switch(t){case"open":return"vee";default:return t}}function Xr(t){return Array.isArray(t)?[Xr(t[0]),Xr(t[1])]:(_e(isFinite(t),`Invalid not finite point value ${t}`),Math.round(t))}const mA=t=>(_e(isFinite(t),`Invalid not finite inch value ${t}`),Math.floor(t*72)),vt=t=>Math.ceil(t/72*1e3)/1e3,fr=t=>Math.ceil(t);fr(40).toString();function gA(t,e){return pA(oz(t,{l:-35-5*e,s:-15-5*e}))}function az(t){return pA(iz(t))}function uz(t){
|
|
1675
|
+
return t.trim().replaceAll("&","&").replaceAll("<","<").replaceAll(">",">")}function yA(t,{maxchars:e,maxLines:n,sanitize:r=O4()}){let i=JW(t,{width:e,indent:"",escape:r}).split(`
|
|
1676
|
+
`);return cn(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=yA(t,{maxchars:e,maxLines:r,sanitize:uz}).join("<BR/>");i&&(o=`<B>${o}</B>`);const a=s?` COLOR="${s}"`:"";return`<FONT POINT-SIZE="${fr(n)}"${a}>${o}</FONT>`}function Mv(t){return Jt.textSizes[t]}function cz(t){switch(t){case"xs":case"sm":return 25;case"md":return 35;case"lg":case"xl":return 45;default:qe(t)}}function lz(t,e,n){const r=["sm","xs"].includes(n.shape),i=ce(
|
|
1677
|
+
t.icon),s=[wo({text:t.title,fontsize:Mv(n.text),maxchars:cz(n.shape),maxLines:r?1:3})];if(n.shape!=="xs"&&(ce(t.technology?.trim())&&s.push(wo({text:t.technology,fontsize:Math.ceil(Mv(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(Mv(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===
|
|
1678
|
+
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 dz(t,e){const n=wo({text:t.title.toUpperCase(),maxchars:50,fontsize:11,maxLines:1,bold:!0,color:e});return n.includes("<BR/>")?`<<TABLE\
|
|
1679
|
+
BORDER="0" CELLPADDING="0" CELLSPACING="0"><TR><TD ALIGN="TEXT" BALIGN="LEFT">${n}</TD></TR></TABLE>>`:`<${n}>`}const xp=40,vA=5,Bv=`BGCOLOR="${Jt.relationships[La].labelBgColor}A0"`;function wA({label:t,technology:e}){const n=[];if(ce(t?.trim())&&n.push(wo({text:t,maxchars:xp,fontsize:14,maxLines:vA,bold:t==="[...]"})),ce(e?.trim())&&n.push(wo({text:`[ ${e} ]`,fontsize:12,maxLines:1,maxchars:xp})),n.length===0)return null;const r=n.map(i=>`<TR><TD ALIGN="TEXT" BALIGN="LEFT">${i}</TD></TR>`).join(
|
|
1680
|
+
"");return`<<TABLE BORDER="0" CELLPADDING="3" CELLSPACING="0" ${Bv}>${r}</TABLE>>`}function fz(t,e){const n=`<TABLE BORDER="0" CELLPADDING="6" ${Bv}><TR><TD WIDTH="20" HEIGHT="20"><FONT POINT-SIZE="${fr(14)}"><B>${t}</B></FONT></TD></TR></TABLE>`;return ce(e?.trim())?`<${['<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">',"<TR>",`<TD>${n}</TD>`,`<TD ${Bv} CELLPADDING="3">`,wo({text:e,maxchars:xp,fontsize:14,maxLines:5}),"</TD>","</TR>","</TABLE>"].join("")}>`:`<${n}>`}var qv,bA;function jv(){if(bA)
|
|
1681
|
+
return qv;bA=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++]}})},
|
|
1682
|
+
t.is=function(e){return e instanceof t?!0:typeof e=="object"&&e!==null&&typeof e.next=="function"},qv=t,qv}var hz=jv();const hr=Fr(hz);var Np={},EA;function pz(){return EA||(EA=1,Np.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u",Np.SYMBOL_SUPPORT=typeof Symbol<"u"),Np}var Gv,$A;function DA(){if($A)return Gv;$A=1;var t=jv(),e=pz(),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?
|
|
1683
|
+
null:r&&typeof s[Symbol.iterator]=="function"?s[Symbol.iterator]():typeof s.next=="function"?s:null}return Gv=function(o){var a=i(o);if(!a)throw new Error("obliterator: target is not iterable nor a valid iterator.");return a},Gv}var Uv,RA;function mz(){if(RA)return Uv;RA=1;var t=DA();return Uv=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}},Uv}var gz=mz();const kA=Fr(gz);
|
|
1684
|
+
var Wv,TA;function yz(){if(TA)return Wv;TA=1;var t=jv(),e=DA();return Wv=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})},Wv}var vz=yz();const Ii=Fr(vz);function wz(){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=wz;typeof Object.assign=="function"&&
|
|
1685
|
+
(Vt=Object.assign);function pr(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 dn(t){return typeof t=="object"&&t!==null}function CA(t){let e;for(e in t)return!1;return!0}function mr(t,e,n){Object.defineProperty(t,e,{enumerable:!1,configurable:!1,writable:!0,value:n})}function _r(t,e,n){const r={enumerable:!0,configurable:!0};typeof n=="function"?r.get=
|
|
1686
|
+
n:(r.value=n,r.writable=!1),Object.defineProperty(t,e,r)}function AA(t){return!(!dn(t)||t.attributes&&!Array.isArray(t.attributes))}function bz(){let t=Math.floor(Math.random()*256)&255;return()=>t++}class zv extends Error{constructor(e){super(),this.name="GraphError",this.message=e}}class me extends zv{constructor(e){super(e),this.name="InvalidArgumentsGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,me.prototype.constructor)}}class ae extends zv{constructor(e){
|
|
1687
|
+
super(e),this.name="NotFoundGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ae.prototype.constructor)}}class Ce extends zv{constructor(e){super(e),this.name="UsageGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Ce.prototype.constructor)}}function SA(t,e){this.key=t,this.attributes=e,this.clear()}SA.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=
|
|
1688
|
+
0,this.in={},this.out={},this.undirected={}};function _A(t,e){this.key=t,this.attributes=e,this.clear()}_A.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}};function PA(t,e){this.key=t,this.attributes=e,this.clear()}PA.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}};function Aa(t,e,n,r,i){this.key=e,this.attributes=i,this.undirected=t,this.source=n,this.target=r}Aa.prototype.attach=function(){let t="\
|
|
1689
|
+
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)},Aa.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},Aa.prototype.detach=function(){
|
|
1690
|
+
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]},Aa.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!==
|
|
1691
|
+
void 0&&(this.next.previous=this.previous))};const xA=0,NA=1,Ez=2,IA=3;function Oi(t,e,n,r,i,s,o){let a,u,c,l;if(r=""+r,n===xA){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===IA){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 \
|
|
1692
|
+
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===NA?a=u.source:a=u.target,c=i,l=s}return[a,c,l]}function $z(t,e,n){t.prototype[e]=function(r,i,s){const[o,a]=Oi(this,e,n,r,i,s);return o.attributes[a]}}function Dz(t,e,n){t.prototype[e]=function(r,i){const[s]=Oi(this,e,n,r,i);return s.attributes}}function Rz(t,e,n){t.prototype[e]=function(r,i,s){const[o,a]=Oi(this,e,n,r,i,s);return o.attributes.hasOwnProperty(
|
|
1693
|
+
a)}}function kz(t,e,n){t.prototype[e]=function(r,i,s,o){const[a,u,c]=Oi(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 Tz(t,e,n){t.prototype[e]=function(r,i,s,o){const[a,u,c]=Oi(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,
|
|
1694
|
+
name:u}),this}}function Cz(t,e,n){t.prototype[e]=function(r,i,s){const[o,a]=Oi(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 Az(t,e,n){t.prototype[e]=function(r,i,s){const[o,a]=Oi(this,e,n,r,i,s);if(!dn(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 Sz(t,e,n){
|
|
1695
|
+
t.prototype[e]=function(r,i,s){const[o,a]=Oi(this,e,n,r,i,s);if(!dn(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 _z(t,e,n){t.prototype[e]=function(r,i,s){const[o,a]=Oi(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\
|
|
1696
|
+
ed",{key:o.key,type:"update",attributes:o.attributes}),this}}const Pz=[{name:t=>`get${t}Attribute`,attacher:$z},{name:t=>`get${t}Attributes`,attacher:Dz},{name:t=>`has${t}Attribute`,attacher:Rz},{name:t=>`set${t}Attribute`,attacher:kz},{name:t=>`update${t}Attribute`,attacher:Tz},{name:t=>`remove${t}Attribute`,attacher:Cz},{name:t=>`replace${t}Attributes`,attacher:Az},{name:t=>`merge${t}Attributes`,attacher:Sz},{name:t=>`update${t}Attributes`,attacher:_z}];function xz(t){Pz.forEach(function({name:e,
|
|
1697
|
+
attacher:n}){n(t,e("Node"),xA),n(t,e("Source"),NA),n(t,e("Target"),Ez),n(t,e("Opposite"),IA)})}function Nz(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.`);
|
|
1698
|
+
const o=""+r,a=""+i;if(i=arguments[2],s=pr(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 Iz(t,e,n){t.prototype[e]=function(r){
|
|
1699
|
+
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=pr(this,s,o,n),!i)throw new ae(`Graph.${e}: could not find an edge for the given path ("${s}" - "${o}").`)}else{
|
|
1700
|
+
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 Oz(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.`);
|
|
1701
|
+
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=pr(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\
|
|
1702
|
+
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 Fz(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\
|
|
1703
|
+
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=pr(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}\
|
|
1704
|
+
: 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 Lz(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 \
|
|
1705
|
+
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=pr(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\
|
|
1706
|
+
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 Mz(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}\
|
|
1707
|
+
: 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=pr(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.
|
|
1708
|
+
_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 Bz(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\
|
|
1709
|
+
} 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=pr(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(
|
|
1710
|
+
`Graph.${e}: could not find the "${r}" edge in the graph.`)}if(!dn(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 qz(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\
|
|
1711
|
+
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=pr(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=""+
|
|
1712
|
+
r,s=this._edges.get(r),!s)throw new ae(`Graph.${e}: could not find the "${r}" edge in the graph.`)}if(!dn(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 jz(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.
|
|
1713
|
+
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=pr(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\
|
|
1714
|
+
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 Gz=[{name:t=>`get${t}Attribute`,attacher:Nz},{name:t=>`get${t}Attributes`,attacher:Iz},{name:t=>`has${t}Attribute`,attacher:Oz},{name:t=>`se\
|
|
1715
|
+
t${t}Attribute`,attacher:Fz},{name:t=>`update${t}Attribute`,attacher:Lz},{name:t=>`remove${t}Attribute`,attacher:Mz},{name:t=>`replace${t}Attributes`,attacher:Bz},{name:t=>`merge${t}Attributes`,attacher:qz},{name:t=>`update${t}Attributes`,attacher:jz}];function Uz(t){Gz.forEach(function({name:e,attacher:n}){n(t,e("Edge"),"mixed"),n(t,e("DirectedEdge"),"directed"),n(t,e("UndirectedEdge"),"undirected")})}const Wz=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"o\
|
|
1716
|
+
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 zz(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 Hz(t,e,n,r){let i,s,o,a=!1;for(const u in e)if(u!==r){i=e[u];
|
|
1717
|
+
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 Hv(t,e){const n=Object.keys(t),r=n.length;let i,s=0;return new hr(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.
|
|
1718
|
+
attributes,undirected:i.undirected}}})}function Kz(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 Vz(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 Kv(t,e){let n=t[e];return n.next!==void 0?new hr(function(){if(!n)return{done:!0};
|
|
1719
|
+
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}}):hr.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 Xz(t,e){if(t.size===0)return[];if(e==="mixed"||e===t.type)return typeof Array.from=="funct\
|
|
1720
|
+
ion"?Array.from(t._edges.keys()):kA(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 OA(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,
|
|
1721
|
+
source:d,target:h}=a;if(u=r(l,f,d.key,h.key,d.attributes,h.attributes,a.undirected),t&&u)return l}}function Yz(t,e){if(t.size===0)return hr.empty();const n=e!=="mixed"&&e!==t.type,r=e==="undirected",i=t._edges.values();return new hr(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.
|
|
1722
|
+
undirected},done:!1}})}function Vv(t,e,n,r,i,s){const o=e?Hz:zz;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 Jz(t,e,n,r){const i=[];return Vv(!1,t,e,n,r,function(s){i.push(s)}),i}function Qz(t,e,n){let r=hr.empty();return t!=="undirected"&&(e!=="out"&&typeof n.in<"u"&&(r=Ii(r,Hv(n.in))),e!=="in"&&typeof n.out<"u"&&(r=Ii(r,Hv(n.out,e?void 0:n.key)))),t!=="directed"&&typeof n.
|
|
1723
|
+
undirected<"u"&&(r=Ii(r,Hv(n.undirected))),r}function Xv(t,e,n,r,i,s,o){const a=n?Vz:Kz;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 Zz(t,e,n,r,i){const s=[];return Xv(!1,t,e,n,r,i,function(o){s.push(o)}),s}function e6(t,e,n,r){let i=hr.empty();return t!=="undirected"&&(typeof n.in<"u"&&e!=="out"&&r in n.
|
|
1724
|
+
in&&(i=Ii(i,Kv(n.in,r))),typeof n.out<"u"&&e!=="in"&&r in n.out&&(e||n.key!==r)&&(i=Ii(i,Kv(n.out,r)))),t!=="directed"&&typeof n.undirected<"u"&&r in n.undirected&&(i=Ii(i,Kv(n.undirected,r))),i}function t6(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 Xz(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}\
|
|
1725
|
+
" node in the graph.`);return Jz(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 Zz(r,this.multi,i,a,o)}throw new me(`Graph.${n}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function n6(t,e){const{name:n,type:r,direction:i}=e,
|
|
1726
|
+
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,OA(!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 Vv(!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\
|
|
1727
|
+
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 Xv(!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+=
|
|
1728
|
+
this.directedSize),f=new Array(d);let h=0;c.push((p,w,v,g,E,D,A)=>{f[h++]=l(p,w,v,g,E,D,A)})}else f=[],c.push((d,h,p,w,v,g,E)=>{f.push(l(d,h,p,w,v,g,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,h,p,w,v,g,E)=>{l(d,h,p,w,v,g,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.
|
|
1729
|
+
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=
|
|
1730
|
+
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((h,p,w,v,g,E,D)=>{d=l(d,h,p,w,v,g,E,D)}),this[s].apply(this,c),d}}function r6(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,OA(!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\
|
|
1731
|
+
nd the "${u}" node in the graph.`);return Vv(!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 Xv(!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].
|
|
1732
|
+
toUpperCase()+n.slice(1,-1);t.prototype[o]=function(){const u=Array.prototype.slice.call(arguments),c=u.pop();return u.push((f,d,h,p,w,v,g)=>c(f,d,h,p,w,v,g)),!!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,h,p,w,v,g)=>!c(f,d,h,p,w,v,g)),!this[s].apply(this,u)}}function i6(t,e){const{name:n,type:r,direction:i}=e,s=n.slice(0,-1)+"Entries";t.prototype[s]=function(o,a){if(r!==
|
|
1733
|
+
"mixed"&&this.type!=="mixed"&&r!==this.type)return hr.empty();if(!arguments.length)return Yz(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 Qz(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 \
|
|
1734
|
+
the graph.`);return e6(r,i,u,a)}throw new me(`Graph.${s}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function s6(t){Wz.forEach(e=>{t6(t,e),n6(t,e),r6(t,e),i6(t,e)})}const o6=[{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:"\
|
|
1735
|
+
undirectedNeighbors",type:"undirected"}];function Ip(){this.A=null,this.B=null}Ip.prototype.wrap=function(t){this.A===null?this.A=t:this.B===null&&(this.B=t)},Ip.prototype.has=function(t){return this.A!==null&&t in this.A||this.B!==null&&t in this.B};function gd(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 Yv(t,e,n,r,i){if(e!=="mixed"){if(e==="undirected")return gd(t,null,r,r.undirected,
|
|
1736
|
+
i);if(typeof n=="string")return gd(t,null,r,r[n],i)}const s=new Ip;let o;if(e!=="undirected"){if(n!=="out"){if(o=gd(t,null,r,r.in,i),t&&o)return o;s.wrap(r.in)}if(n!=="in"){if(o=gd(t,s,r,r.out,i),t&&o)return o;s.wrap(r.out)}}if(e!=="directed"&&(o=gd(t,s,r,r.undirected,i),t&&o))return o}function a6(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 Yv(!1,t,e,n,function(i){r.push(i)}),r}function yd(t,e,n){const r=Object.
|
|
1737
|
+
keys(n),i=r.length;let s=0;return new hr(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 u6(t,e,n){if(t!=="mixed"){if(t==="undirected")return yd(null,n,n.undirected);if(typeof e=="string")return yd(null,n,n[e])}let r=hr.empty();const i=new Ip;return t!=="undirected"&&(e!=="out"&&(r=Ii(r,yd(i,n,n.in))),e!==
|
|
1738
|
+
"in"&&(r=Ii(r,yd(i,n,n.out)))),t!=="directed"&&(r=Ii(r,yd(i,n,n.undirected))),r}function c6(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 a6(r==="mixed"?this.type:r,i,o)}}function l6(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){
|
|
1739
|
+
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.`);Yv(!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,h)=>{f.push(l(d,h))}),f};const a="filter"+n[0].toUpperCase()+n.slice(1);t.prototype[a]=function(c,l){const f=[];return this[s](c,(d,h)=>{l(d,h)&&f.push(d)}),f};const u="reduce"+
|
|
1740
|
+
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,(h,p)=>{d=l(d,h,p)}),d}}function d6(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!==
|
|
1741
|
+
"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 Yv(!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,h)=>!l(d,h))}}function f6(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)
|
|
1742
|
+
return hr.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 u6(r==="mixed"?this.type:r,i,a)}}function h6(t){o6.forEach(e=>{c6(t,e),l6(t,e),d6(t,e),f6(t,e)})}function Op(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 h=!1;if(u=a.value,o!=="undirected"){l=u.out;for(c in l){f=l[c];do d=f.target,h=!0,i(u.key,d.key,u.attributes,d.attributes,f.key,f.attributes,f.undirected),
|
|
1743
|
+
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),h=!0,i(u.key,d.key,u.attributes,d.attributes,f.key,f.attributes,f.undirected),f=f.next;while(f)}}n&&!h&&i(u.key,null,u.attributes,null,null,null,null)}}function p6(t,e){const n={key:t};return CA(e.attributes)||(n.attributes=Vt({},e.attributes)),n}function m6(t,e,n){const r={key:e,source:n.source.key,target:n.target.key};return CA(n.attributes)||(r.attributes=Vt({},n.attributes)),
|
|
1744
|
+
t==="mixed"&&n.undirected&&(r.undirected=!0),r}function g6(t){if(!dn(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&&(!dn(t.attributes)||t.attributes===null))throw new me("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function y6(t){if(!dn(t))throw new me('Graph.impor\
|
|
1745
|
+
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&&(!dn(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!=
|
|
1746
|
+
"boolean")throw new me("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}const v6=bz(),w6=new Set(["directed","undirected","mixed"]),FA=new Set(["domain","_events","_eventsCount","_maxListeners"]),b6=[{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\
|
|
1747
|
+
ndirectedEdgeWithKey`,type:"undirected"}],E6={allowSelfLoops:!0,multi:!1,type:"mixed"};function $6(t,e,n){if(n&&!dn(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 LA(t,e,n){const r=new t.NodeDataClass(e,n);return t._nodes.set(e,r),t.emit("\
|
|
1748
|
+
nodeAdded",{key:e,attributes:n}),r}function MA(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&&!dn(a))throw new me(`Graph.${e}: invalid attributes. Expecting an object but got "${a}"`);if(s=""+s,o=""+o,a=a||
|
|
1749
|
+
{},!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\
|
|
1750
|
+
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 Aa(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.
|
|
1751
|
+
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 D6(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\
|
|
1752
|
+
. 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(!dn(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\
|
|
1753
|
+
n set to false.`);let l=t._nodes.get(s),f=t._nodes.get(o),d,h;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}").`);h=d}if(!h&&!t.multi&&l&&(h=r?l.undirected[o]:l.out[o]),h){const E=[h.key,!1,!1,!1];if(u?!c:!a)return E;if(u){const D=h.attributes;h.attributes=c(D),t.emit(
|
|
1754
|
+
"edgeAttributesUpdated",{type:"replace",key:h.key,attributes:h.attributes})}else Vt(h.attributes,a),t.emit("edgeAttributesUpdated",{type:"merge",key:h.key,attributes:h.attributes,data:a});return E}a=a||{},u&&c&&(a=c(a));const p={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 w=!1,v=!1;l||(l=LA(t,s,{}),w=!0,s===o&&(f=l,v=!0)),f||(f=LA(t,o,{}),v=!0),d=new Aa(
|
|
1755
|
+
r,i,l,f,a),t._edges.set(i,d);const g=s===o;return r?(l.undirectedDegree++,f.undirectedDegree++,g&&(l.undirectedLoops++,t._undirectedSelfLoopCount++)):(l.outDegree++,f.inDegree++,g&&(l.directedLoops++,t._directedSelfLoopCount++)),t.multi?d.attachMulti():d.attach(),r?t._undirectedSize++:t._directedSize++,p.key=i,t.emit("edgeAdded",p),[i,!0,w,v]}function Sa(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--,
|
|
1756
|
+
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 dt extends U_{constructor(e){if(super(),e=Vt({},E6,e),typeof e.multi!="boolean")throw new me(`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${e.multi}".`);if(!w6.has(e.type))throw new me(`Graph.con\
|
|
1757
|
+
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"?SA:e.type==="directed"?_A:PA;mr(this,"NodeDataClass",n);const r="geid_"+v6()+"_";let i=0;const s=()=>{let o;do o=r+i++;while(this._edges.has(o));return o};mr(this,"_attributes",{}),mr(this,"_nodes",new Map),mr(
|
|
1758
|
+
this,"_edges",new Map),mr(this,"_directedSize",0),mr(this,"_undirectedSize",0),mr(this,"_directedSelfLoopCount",0),mr(this,"_undirectedSelfLoopCount",0),mr(this,"_edgeKeyGenerator",s),mr(this,"_options",e),FA.forEach(o=>mr(this,o,this[o])),_r(this,"order",()=>this._nodes.size),_r(this,"size",()=>this._edges.size),_r(this,"directedSize",()=>this._directedSize),_r(this,"undirectedSize",()=>this._undirectedSize),_r(this,"selfLoopCount",()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount),
|
|
1759
|
+
_r(this,"directedSelfLoopCount",()=>this._directedSelfLoopCount),_r(this,"undirectedSelfLoopCount",()=>this._undirectedSelfLoopCount),_r(this,"multi",this._options.multi),_r(this,"type",this._options.type),_r(this,"allowSelfLoops",this._options.allowSelfLoops),_r(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.
|
|
1760
|
+
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=""+
|
|
1761
|
+
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?
|
|
1762
|
+
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\
|
|
1763
|
+
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\
|
|
1764
|
+
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\
|
|
1765
|
+
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\
|
|
1766
|
+
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=
|
|
1767
|
+
""+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)
|
|
1768
|
+
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\
|
|
1769
|
+
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.
|
|
1770
|
+
_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\
|
|
1771
|
+
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\
|
|
1772
|
+
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\
|
|
1773
|
+
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 \
|
|
1774
|
+
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){
|
|
1775
|
+
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(
|
|
1776
|
+
`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}\
|
|
1777
|
+
" 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\
|
|
1778
|
+
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 $6(this,e,n).key}mergeNode(e,n){if(n&&!dn(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.
|
|
1779
|
+
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(
|
|
1780
|
+
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 Sa(this,r),r=r.next;while(r)}for(const i in n.in){r=n.in[i];do Sa(this,r),r=r.next;while(r)}}if(this.type!=="directed")for(const i in n.undirected){r=n.undirected[i];do Sa(this,r),r=r.next;while(r)}this._nodes.delete(e),this.
|
|
1781
|
+
emit("nodeDropped",{key:e,attributes:n.attributes})}dropEdge(e){let n;if(arguments.length>1){const r=""+arguments[0],i=""+arguments[1];if(n=pr(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 Sa(this,n),this}dropDirectedEdge(e,n){if(arguments.length<2)throw new Ce("Graph.dropDirectedEdge: it does not make sense to \
|
|
1782
|
+
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=pr(this,e,n,"directed");if(!r)throw new ae(`Graph.dropDirectedEdge: could not find a "${e}" -> "${n}" edge in the graph.`);return Sa(this,r),this}dropUndirectedEdge(e,n){
|
|
1783
|
+
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=pr(this,e,n,"undirected");if(!r)throw new ae(`Graph.dropUndirectedEdge: cou\
|
|
1784
|
+
ld not find a "${e}" -> "${n}" edge in the graph.`);return Sa(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){
|
|
1785
|
+
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}),
|
|
1786
|
+
this}replaceAttributes(e){if(!dn(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(!dn(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")
|
|
1787
|
+
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&&!AA(n))throw new me("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const r=this._nodes.
|
|
1788
|
+
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&&!AA(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.
|
|
1789
|
+
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.");Op(!1,!1,!1,this,e)}forEachAdjacencyEntryWithOrphans(e){if(typeof e!="function")throw new me("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");Op(!1,!1,!0,this,e)}forEachAssymetricAdjacencyEntry(e){if(typeof e!=
|
|
1790
|
+
"function")throw new me("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");Op(!1,!0,!1,this,e)}forEachAssymetricAdjacencyEntryWithOrphans(e){if(typeof e!="function")throw new me("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");Op(!1,!0,!0,this,e)}nodes(){return typeof Array.from=="function"?Array.from(this._nodes.keys()):kA(this._nodes.keys(),this._nodes.size)}forEachNode(e){if(typeof e!="function")throw new me("Graph.forEachNode: expecting a callback.");const n=this.
|
|
1791
|
+
_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(
|
|
1792
|
+
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(
|
|
1793
|
+
"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 \
|
|
1794
|
+
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 hr(()=>{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++]=p6(s,i)});const r=new Array(this._edges.size);return n=0,this._edges.forEach((i,s)=>{r[n++]=m6(
|
|
1795
|
+
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 dt)return e.forEachNode((u,c)=>{n?this.mergeNode(u,c):this.addNode(u,c)}),e.forEachEdge((u,c,l,f,d,h,p)=>{n?p?this.mergeUndirectedEdgeWithKey(u,l,f,c):this.mergeDirectedEdgeWithKey(u,l,f,c):p?this.addUndirectedEdgeWithKey(u,l,f,c):this.addDirectedEdgeWithKey(u,l,f,c)}),this;if(!dn(e))throw new me("Graph.import: invalid argu\
|
|
1796
|
+
ment. Expecting a serialized graph or, alternatively, a Graph instance.");if(e.attributes){if(!dn(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],g6(o);const{key:u,attributes:c}=o;n?this.mergeNode(u,c):this.addNode(u,c)}}if(e.edges){
|
|
1797
|
+
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],y6(a);const{source:c,target:l,attributes:f,undirected:d=u}=a;let h;"key"in a?(h=n?d?this.mergeUndirectedEdgeWithKey:this.mergeDirectedEdgeWithKey:d?this.addUndirectedEdgeWithKey:this.addDirectedEdgeWithKey,h.call(this,a.key,c,l,f)):(h=n?d?this.mergeUndirectedEdge:this.mergeDirectedEdge:d?this.addUndirectedEdge:this.addDirectedEdge,
|
|
1798
|
+
h.call(this,c,l,f))}}return this}nullCopy(e){const n=new dt(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\
|
|
1799
|
+
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\
|
|
1800
|
+
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,MA(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.
|
|
1801
|
+
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)&&!FA.has(s)&&typeof this[s]!="function"&&typeof s!="symbol"&&(i[s]=this[s]);return i.attributes=this._attributes,i.nodes=e,i.edges=n,mr(i,"constructor",this.constructor),i}}typeof Symbol<"u"&&(dt.prototype[Symbol.for("nodejs.util.inspect.custom")]=dt.prototype.
|
|
1802
|
+
inspect),b6.forEach(t=>{["add","merge","update"].forEach(e=>{const n=t.name(e),r=e==="add"?MA:D6;t.generateKey?dt.prototype[n]=function(i,s,o){return r(this,n,!0,(t.type||this.type)==="undirected",null,i,s,o,e==="update")}:dt.prototype[n]=function(i,s,o,a){return r(this,n,!1,(t.type||this.type)==="undirected",i,s,o,a,e==="update")}})}),xz(dt),Uz(dt),s6(dt),h6(dt);class BA extends dt{constructor(e){const n=Vt({type:"directed"},e);if("multi"in n&&n.multi!==!1)throw new me("DirectedGraph.from: inco\
|
|
1803
|
+
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 qA extends dt{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\
|
|
1804
|
+
ptions!');super(n)}}class jA extends dt{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 GA extends dt{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\
|
|
1805
|
+
h.from: inconsistent "'+n.type+'" type in given options!');super(n)}}class UA extends dt{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 _a(t){t.from=function(e,n){const r=Vt({},e.options,n),i=new t(r);return i.
|
|
1806
|
+
import(e),i}}_a(dt),_a(BA),_a(qA),_a(jA),_a(GA),_a(UA),dt.Graph=dt,dt.DirectedGraph=BA,dt.UndirectedGraph=qA,dt.MultiGraph=jA,dt.MultiDirectedGraph=GA,dt.MultiUndirectedGraph=UA,dt.InvalidArgumentsGraphError=me,dt.NotFoundGraphError=ae,dt.UsageGraphError=Ce;const Jv="dashed",Qv=Jt.font,WA=w1("dot");class Zv{constructor(e){this.view=e,this.compoundIds=new Set(e.nodes.filter(er).map(r=>r.id)),this.edgesWithCompounds=new Set(this.compoundIds.size>0?e.edges.filter(r=>this.compoundIds.has(r.source)||
|
|
1807
|
+
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:Bw.modelRef(r),deploymentRef:Bw.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.
|
|
1808
|
+
target,"modelRef"));let o=-1;i!==null&&s!==null?o=$_(i,s):WA.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(
|
|
1809
|
+
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.
|
|
1810
|
+
applyEdgeAttributes(n.attributes.edge)}ids=new Set;subgraphs=new Map;nodes=new Map;edges=new Map;compoundIds;edgesWithCompounds;graphology=new dt({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(er(c))n(c,a);else{const l=It(
|
|
1811
|
+
this.getGraphNode(c.id),`Graphviz Node not found for ${c.id}`);a.node(l.id)}}},r=[];for(const i of this.view.nodes)if(er(i))Rt(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),fA(this.graphvizModel,{print:{indentStyle:"space",indentSize:2}})}createGraph(){
|
|
1812
|
+
const e=this.view.autoLayout,n=KW({[F.likec4_viewId]:this.view.id,[F.bgcolor]:"transparent",[F.layout]:"dot",[F.compound]:!0,[F.rankdir]:e.direction,[F.TBbalance]:"min",[F.splines]:"spline",[F.outputorder]:"nodesfirst",[F.nodesep]:vt(e.nodeSep??110),[F.ranksep]:vt(e.rankSep??120),[F.pad]:vt(15),[F.fontname]:Qv});return n.attributes.graph.apply({[F.fontsize]:fr(15),[F.labeljust]:e.direction==="RL"?"r":"l",[F.labelloc]:e.direction==="BT"?"b":"t",[F.margin]:50.1}),n}applyNodeAttributes(e){e.apply({
|
|
1813
|
+
[F.fontname]:Qv,[F.shape]:"rect",[F.fillcolor]:Jt.elements[Ao].fill,[F.fontcolor]:Jt.elements[Ao].hiContrast,[F.color]:Jt.elements[Ao].stroke,[F.style]:"filled",[F.penwidth]:0})}applyEdgeAttributes(e){e.apply({[F.arrowsize]:.75,[F.fontname]:Qv,[F.fontsize]:fr(14),[F.penwidth]:fr(2),[F.color]:Jt.relationships[La].lineColor,[F.fontcolor]:Jt.relationships[La].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(
|
|
1814
|
+
e),e)}generateGraphvizId(e){const n=er(e);let r=Hp(e.id).toLowerCase(),i=this.checkNodeId(r,n);if(i!==null)return i;r=Hp(e.id).toLowerCase();let s=1;do i=this.checkNodeId(r+"_"+s++,n);while(i===null);return i}elementToSubgraph(e,n){_e(er(e),"node should be compound"),_e(uh(e.depth),"node.depth should be defined");const r=this.getElementColorValues(e.color),i=az(r.loContrast);return n.apply({[F.likec4_id]:e.id,[F.likec4_level]:e.level,[F.likec4_depth]:e.depth,[F.fillcolor]:gA(r.fill,e.depth),[F.color]:gA(
|
|
1815
|
+
r.stroke,e.depth),[F.style]:"filled",[F.margin]:fr(e.children.length>1?40:32)}),Gt(e.title.trim())||n.set(F.label,dz(e,i)),n}elementToNode(e,n){_e(!er(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??=B_,o??=q_,a??=j_;const u=Jt.spacing[a];switch(n.attributes.apply({[F.likec4_id]:e.id,[F.likec4_level]:e.level,[F.label]:lz(e,i,{shape:s,text:o}),[F.margin]:`${vt(
|
|
1816
|
+
r?8:u)},${vt(u)}`}),n.attributes.set(F.width,vt(Jt.sizes[s].width)),n.attributes.set(F.height,vt(Jt.sizes[s].height)),e.color!==Ao&&n.attributes.apply({[F.fillcolor]:i.fill,[F.fontcolor]:i.hiContrast,[F.color]:i.stroke}),e.shape){case"cylinder":case"storage":{n.attributes.apply({[F.margin]:`${vt(r?8:u)},${vt(0)}`,[F.penwidth]:fr(2),[F.shape]:"cylinder"});break}case"browser":{n.attributes.apply({[F.margin]:`${vt(r?8:u+4)},${vt(u+6)}`});break}case"mobile":{n.attributes.apply({[F.margin]:`${vt(r?8:
|
|
1817
|
+
u+4)},${vt(u)}`});break}case"queue":{n.attributes.apply({[F.width]:vt(Jt.sizes[s].width),[F.height]:vt(Jt.sizes[s].height-8),[F.margin]:`${vt(r?8:u+4)},${vt(u)}`});break}}return n}leafElements(e){return e===null?this.view.nodes.filter(n=>!er(n)):this.computedNode(e).children.flatMap(n=>{const r=this.computedNode(n);return er(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.
|
|
1818
|
+
descendants(r.id)]})}computedNode(e){return It(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||(_e(er(r),"endpoint node should be compound"),s=this.getSubgraph(e)?.id,_e(s,`subgraph ${e} not found`),r=It(n(this.leafElements(e)),`leaf element in ${e} not found`),i=It(this.getGraphNode(r.id),`source graphviz node ${r.
|
|
1819
|
+
id} not found`)),[r,i,s]}findInternalEdges(e){if(e===null)return this.view.edges.slice();const n=this.computedNode(e);return He(this.descendants(e),Kr(r=>AR(r.inEdges,r.outEdges)),Yo(),e3(AR(n.inEdges,n.outEdges)),xt(r=>this.view.edges.find(i=>i.id===r)),ze(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=He(this.view.nodes,
|
|
1820
|
+
ze(er),xt(r=>r.id),$R(D_),$4(),xt(r=>{const i=this.findInternalEdges(r).filter(s=>s.source!==s.target&&!this.compoundIds.has(s.source)&&!this.compoundIds.has(s.target));return{id:r,edges:i}}),ze(({edges:r})=>r.length>1&&r.length<8),l4(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=It(this.getGraphNode(s.source),`Graphviz Node not found for ${s.source}`),a=It(this.getGraphNode(s.target),`Graphviz Node not found for ${s.target}`);
|
|
1821
|
+
n.add(s.source),n.add(s.target),o.attributes.set(F.group,r.id),a.attributes.set(F.group,r.id)}catch(o){WA.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=vt(a.center.x)+r,l=vt(e-a.center.y);a.fixedsize?u.attributes.apply({[F.pos]:`${c},${l}!`,[F.pin]:!0,[F.width]:vt(a.fixedsize.width),[F.height]:vt(a.fixedsize.height),[F.
|
|
1822
|
+
fixedsize]:!0}):u.attributes.set(F.pos,`${c},${l}`)}for(const[o,a]of this.edges.entries()){a.attributes.delete(F.weight),a.attributes.delete(F.minlen),a.attributes.delete(F.constraint);const u=n.edges.find(c=>c.id===o)?.dotpos;u&&!s&&a.attributes.set(F.pos,u)}return this.graphvizModel.apply({[F.layout]:"fdp",[F.overlap]:"vpsc",[F.sep]:"+50,50",[F.esep]:"+10,10",[F.start]:"random2",[F.splines]:"compound"}),this.graphvizModel.delete(F.compound),this.graphvizModel.delete(F.rankdir),this.graphvizModel.
|
|
1823
|
+
delete(F.nodesep),this.graphvizModel.delete(F.ranksep),this.graphvizModel.delete(F.pack),this.graphvizModel.delete(F.pad),this.graphvizModel.delete(F.packmode),this.graphvizModel.attributes.graph.delete(F.margin),this}getRelationshipColorValues(e){return Sw(e)?Jt.relationships[e]:this.view.customColorDefinitions[e]?.relationships??Jt.relationships[Ao]}getElementColorValues(e){return Sw(e)?Jt.elements[e]:this.view.customColorDefinitions[e]?.elements??Jt.elements[Ao]}}class R6 extends Zv{createGraph(){
|
|
1824
|
+
const e=super.createGraph(),n=this.view.autoLayout;return e.delete(F.TBbalance),e.apply({[F.nodesep]:vt(n.nodeSep??130),[F.ranksep]:vt(n.rankSep??130)}),e}postBuild(e){He(this.view.nodes,xt(n=>({node:n,graphvizNode:this.getGraphNode(n.id)})),Qo(({node:n,graphvizNode:r})=>{if(r!=null)return Ad.modelRef(n)??void 0}),ah(),ze(lr(2)),q4(n=>{e.subgraph({[F.rank]:"same"},r=>{for(const{graphvizNode:i}of n)r.node(It(i).id)})}),g4(()=>{e.set(F.newrank,!0),e.set(F.clusterrank,"global"),e.delete(F.pack),e.delete(
|
|
1825
|
+
F.packmode)}))}elementToSubgraph(e,n){const r=super.elementToSubgraph(e,n);return e.children.length>1&&r.set(F.margin,fr(50)),r}addEdge(e,n){const[r,i]=[e.source,e.target],[s,o,a]=this.edgeEndpoint(r,g=>Ju(g)),[u,c,l]=this.edgeEndpoint(i,Zo),f=Tn(l)||Tn(a),d=n.edge([o,c],{[F.likec4_id]:e.id,[F.style]:e.line??Jv});l&&d.attributes.set(F.lhead,l),a&&d.attributes.set(F.ltail,a);const h=this.graphology.getEdgeAttribute(e.id,"weight");h>1&&!this.graphology.hasDirectedEdge(e.target,e.source)&&d.attributes.
|
|
1826
|
+
set(F.weight,h);const p=wA(e);if(p&&d.attributes.set(f?F.xlabel:F.label,p),e.color){const g=this.getRelationshipColorValues(e.color);d.attributes.apply({[F.color]:g.lineColor,[F.fontcolor]:g.labelColor})}let[w,v]=[e.head??ws,e.tail??"none"];return w==="none"&&v==="none"?(d.attributes.apply({[F.arrowtail]:"none",[F.arrowhead]:"none",[F.dir]:"none"}),d):e.dir==="both"?(d.attributes.apply({[F.arrowhead]:gn(w),[F.arrowtail]:gn(e.tail??w),[F.dir]:"both"}),!f&&Ad.modelRef(s)!==Ad.modelRef(u)&&d.attributes.
|
|
1827
|
+
set(F.constraint,!1),d):(w!==ws&&d.attributes.set(F.arrowhead,gn(w)),v!=="none"&&d.attributes.set(F.arrowtail,gn(v)),d)}}class Rw extends Zv{static toDot(e){return new Rw(e).print()}postBuild(e){e.delete(F.TBbalance)}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=>Ju(A)),[c,l,f]=this.edgeEndpoint(s,Zo),d=n.edge([a,l],{[F.likec4_id]:e.id,[F.style]:e.line??Jv});if(f&&d.attributes.set(F.lhead,f),u&&d.attributes.set(F.
|
|
1828
|
+
ltail,u),e.color&&e.color!==La){const A=this.getRelationshipColorValues(e.color);d.attributes.apply({[F.color]:A.lineColor,[F.fontcolor]:A.labelColor})}const h=[e.label?.trim(),e.technology?.trim()].filter(ce).join(`
|
|
1829
|
+
`),p=R_(e.id),w=fz(p,h);d.attributes.set(F.label,w);const v=this.graphology.getEdgeAttribute(e.id,"weight");e.source!==e.target&&v>1&&d.attributes.set(F.weight,v);const g=r.findIndex(A=>A.id===i);r.findIndex(A=>A.id===s)<g&&e.dir!=="back"&&d.attributes.apply({[F.constraint]:!1});let[E,D]=[e.head??ws,e.tail??"none"];return e.dir==="back"?(d.attributes.apply({[F.arrowtail]:gn(E),[F.minlen]:0,[F.dir]:"back"}),D!=="none"&&d.attributes.apply({[F.arrowhead]:gn(D),[F.dir]:"both"}),d):E==="none"&&D==="n\
|
|
1830
|
+
one"||E!=="none"&&D!=="none"?(d.attributes.apply({[F.arrowhead]:gn(E),[F.arrowtail]:gn(D),[F.dir]:"both"}),d):E==="none"?(d.attributes.delete(F.arrowhead),d.attributes.apply({[F.arrowtail]:gn(D),[F.minlen]:0,[F.dir]:"back"}),d):(E!==ws&&d.attributes.set(F.arrowhead,gn(E)),d)}}class k6 extends Zv{postBuild(e){this.assignGroups();const n=new Set,r=this.view.nodes.reduce((s,o)=>(er(o)&&(n.add(o.id),s.push(o)),s),[]);let i=!1;for(const s of r){const o=He(s.children,ze(l=>!this.compoundIds.has(l)),xt(
|
|
1831
|
+
l=>this.computedNode(l)),ze(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=It(this.getSubgraph(s.id),`Subgraph not found for ${s.id}`);let c=null;i3(o,a).forEach(l=>{const f=l.length>1?u.createSubgraph({[F.rank]:"same"}):null;l.forEach((d,h)=>{const p=this.getGraphNode(d.id);p&&(f?.node(p.id),h===0&&(c&&u.edge([c,p],{[F.style]:"invis"}),c=p))}),i=i||!!f})}i&&(e.set(F.newrank,!0),e.set(F.clusterrank,
|
|
1832
|
+
"global"))}addEdge(e,n){const[r,i]=e.dir==="back"?[e.target,e.source]:[e.source,e.target],[s,o,a]=this.edgeEndpoint(r,D=>Ju(D)),[u,c,l]=this.edgeEndpoint(i,Zo),f=e.parent,d=this.graphology.getEdgeAttributes(e.id),h=n.edge([o,c],{[F.likec4_id]:e.id,[F.style]:e.line??Jv});l&&h.attributes.set(F.lhead,l),a&&h.attributes.set(F.ltail,a);const p=Tn(l)||Tn(a);!this.graphology.hasDirectedEdge(e.target,e.source)&&d.weight>1&&h.attributes.set(F.weight,d.weight);const w=wA(e);if(w&&h.attributes.set(p?F.xlabel:
|
|
1833
|
+
F.label,w),e.color){const D=this.getRelationshipColorValues(e.color);h.attributes.apply({[F.color]:D.lineColor,[F.fontcolor]:D.labelColor})}let[v,g]=[e.head??ws,e.tail??"none"];if(e.dir==="back")return h.attributes.apply({[F.arrowtail]:gn(v),[F.dir]:"back"}),g!=="none"&&h.attributes.apply({[F.arrowhead]:gn(g),[F.dir]:"both",[F.minlen]:0}),h;if(v==="none"&&g==="none")return h.attributes.apply({[F.arrowtail]:"none",[F.arrowhead]:"none",[F.dir]:"none",[F.minlen]:0,[F.constraint]:!1}),h;if(v!=="none"&&
|
|
1834
|
+
g!=="none")return h.attributes.apply({[F.arrowhead]:gn(v),[F.arrowtail]:gn(g),[F.dir]:"both",[F.minlen]:0}),h;if(v!==ws&&h.attributes.set(F.arrowhead,gn(v)),g!=="none"&&h.attributes.set(F.arrowtail,gn(g)),this.view.edges.length===1)return h;let E;return f===null&&s.parent==null&&u.parent==null?E=this.view.edges.filter(D=>{if(D.id===e.id||D.parent!==null||D.source===e.source&&D.target===e.target||D.source===e.target&&D.target===e.source)return!1;const A=this.computedNode(D.source),N=this.computedNode(
|
|
1835
|
+
D.target);return er(A)||er(N)?!1:A.parent==null&&N.parent==null}):E=this.findInternalEdges(f).filter(D=>!(D.id===e.id||D.source===e.source&&D.target===e.target||D.source===e.target&&D.target===e.source)),E.length===0&&(f===null||this.leafElements(f).length<=3)&&h.attributes.set(F.minlen,0),h}}function Fp(t){const[e,n,r,i]=t?t.split(",").map(a=>Xr(+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 T6(t){try{const[e,n]=t.split(",");
|
|
1836
|
+
return{x:Xr(parseFloat(e)),y:Xr(parseFloat(n))}}catch(e){throw new Error(`Failed on parsing pos: ${t}`,{cause:e})}}function zA(t){const{x:e,y:n}=T6(t.pos),r=mA(parseFloat(t.width)),i=mA(parseFloat(t.height));return{x:e-Math.round(r/2),y:n-Math.round(i/2),width:r,height:i}}function HA(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=Xr(c.size);continue}if(c.op==="T"){let l=Xr(c.pt[0])-e,f=Xr(c.width);switch(c.align){case"r":l-=
|
|
1837
|
+
f;break;case"c":l-=Math.round(f/2);break}r=Math.min(r,l),s=Math.max(s,l+f);let d=Xr(c.pt[1])-n;i=Math.min(i,Math.round(d-a)),o=Math.max(o,d)}}}catch(c){return bn.warn(`Failed on parsing label draw ops:
|
|
1838
|
+
{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 KA({_draw_:t,likec4_id:e="???"},n="<unknown view>"){try{const r=t.filter(s=>s.op.toLowerCase()==="b");_e(lr(r,1),`view ${n} edge ${e} should have at least one bezier draw op`),r.length>1&&bn.warn(`view ${n} edge ${e} has more than one bezier draw op, using the first one only`);const i=r[0].points.map(s=>Xr(s));return _e(lr(i,2),`view ${n} edge ${e} should have at \
|
|
1839
|
+
least two points`),i}catch(r){throw new Error(`failed on parsing view ${n} edge ${e} _draw_:
|
|
1840
|
+
${JSON.stringify(t,null,2)}`,{cause:r})}}function C6(t,{id:e,source:n,target:r,dir:i,label:s,description:o,...a},u){const c=HA(t._ldraw_??t._tldraw_??t._hldraw_),l=t.dir==="back"||i==="back";return s=s&&c?yA(s,{maxchars:xp,maxLines:vA}).join(`
|
|
1841
|
+
`):null,{id:e,source:n,target:r,label:s,...ce(o)&&{description:o},...ce(t.pos)&&{dotpos:t.pos},points:KA(t,u),labelBBox:c,...l?{dir:"back"}:{},...a}}function VA(t,e){const n=Fp(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);_e(f,`View ${o.id} node ${l.id} not found in graphviz output`);try{const{x:d,y:h,width:p,height:w}="bb"in f?Fp(f.bb):zA(f),v=[d,h];a.nodes.push({...l,position:v,width:p,
|
|
1842
|
+
height:w,labelBBox:HA(f._ldraw_,v)??{x:d,y:h,width:p,height:w}})}catch(d){throw new Error(`Failed on parsing node ${l.id}:
|
|
1843
|
+
${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){bn.warn`View ${o.id} edge ${l.id} not found in graphviz output, skipping`;continue}a.edges.push(C6(f,l,o.id))}return a}const Lp=t=>String(t+1).padStart(2,"0");function A6(t){const e=Fp(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=Lp(s._gvid),a=s.likec4_path??"",u=r.get(s._gvid),{x:c,y:l,width:f,height:d}="\
|
|
1844
|
+
bb"in s?Fp(s.bb):zA(s),h={x:c,y:l};if(s.likec4_type==="view")_e(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:h,label:s.label??"",viewId:s.likec4_id});else{const p={id:o,type:s.likec4_type,parentId:u?.id??null,height:d,width:f,position:h,path:a,label:s.label??""},w=[..."subgraphs"in s?s.subgraphs:[],..."nodes"in s?s.nodes:[]];for(const v of w)r.set(v,p);n.nodes.push(p)}}for(const s of t.edges??[])try{const o=Lp(s.tail),a=Lp(
|
|
1845
|
+
s.head);n.edges.push({id:`link${Lp(s._gvid)}`,source:o,target:a,points:KA(s)})}catch(o){bn.warn(`Failed on parsing edge:
|
|
1846
|
+
{edge}`,{error:o,edge:s})}return n}const XA=Jt.font,Mp="/";class kw{static toDot(e){return new kw(e).print()}subgraphs=new Map;graphvizModel;constructor(e){const n=this.graphvizModel=VW.graph({[F.layout]:"osage",[F.pack]:fr(100),[F.packmode]:"array_ltc",[F.pad]:vt(15),[F.fontname]:XA,[F.splines]:"polyline",[F.esep]:"+20"});n.attributes.graph.apply({[F.fontsize]:fr(20),[F.labeljust]:"l",[F.labelloc]:"t"}),n.attributes.node.apply({[F.fontname]:XA,[F.shape]:"rect",[F.width]:vt(400),[F.height]:vt(300),
|
|
1847
|
+
[F.fixedsize]:!0,[F.fontsize]:10}),n.attributes.edge.apply({[F.penwidth]:fr(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(Mp)??[""],f=c.relativePath?.split(Mp)??[""];l.push(u.title??"Untitled"),f.push(c.title??"Untitled");const d=l.length,h=f.length;switch(i=Math.max(i,d,h),!0){case d>h:return-1;case d<h:return 1;default:{for(let p=0;p<d;p++){const w=l[p].localeCompare(f[p]);if(w!==0)return w}return 0}}});const a=new Map;
|
|
1848
|
+
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(Mp)?e.slice(0,e.lastIndexOf(Mp)):"";r=this.getParentForPath(s).subgraph("cluster"+String(this.subgraphs.size+
|
|
1849
|
+
1),{[F.likec4_type]:i?"file":"folder",[F.likec4_path]:e,[F.sortv]:this.subgraphs.size,[F.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,{[F.likec4_type]:"view",[F.likec4_id]:e.id,[F.sortv]:n,[F.label]:e.title||"Untitled"})}print(){return fA(this.graphvizModel,{print:{indentStyle:"space",indentSize:2}})}}const YA=t=>{switch(!0){case Ma.isDynamic(t):return new Rw(t);case Ma.isDeployment(t):return new R6(
|
|
1850
|
+
t);case Ma.isElement(t):return new k6(t);default:qe(t)}},Pa=bn.getChild("graphviz-layouter");class JA{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 Pa.error(rr(r)),Pa.error`Failed to convert DOT to JSON:\n${e}`,r}try{return JSON.parse(n)}catch(r){throw Pa.error(rr(r)),Pa.error`Failed to parse JSON:\n${n}\n. Generated from DOT:\n${e}`,r}}async layout(e){try{let n=await this.
|
|
1851
|
+
dot(e);const r=await this.dotToJson(n);let i=VA(r,e);if(e.manualLayout){const s=uW(i,e.manualLayout);if(s.diagram)i=s.diagram;else{if(s.relayout.nodes.length>0){const o=YA(e);if(o.hasEdgesWithCompounds)Pa.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=VA(a,e)}}i.hasLayoutDrift=!0}}return n=n.split(`
|
|
1852
|
+
`).filter(s=>!(s.includes("margin")&&s.includes("50.1"))).join(`
|
|
1853
|
+
`),{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(`
|
|
1854
|
+
`).filter(r=>!(r.includes("margin")&&r.includes("50.1"))).join(`
|
|
1855
|
+
`),{svg:await this.graphviz.svg(n),dot:n}}async dot(e){let n=YA(e).print();if(!Ma.isElement(e))return n;try{return await this.graphviz.unflatten(n)}catch(r){return Pa.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=kw.toDot(e),r=await this.dotToJson(n);return A6(r)}}class S6{value;next;constructor(e){this.value=e}}class _6{#e;#t;#r;constructor(){this.clear()}enqueue(e){
|
|
1856
|
+
const n=new S6(e);this.#e?(this.#t.next=n,this.#t=n):(this.#e=n,this.#t=n),this.#r++}dequeue(){const e=this.#e;if(e)return this.#e=this.#e.next,this.#r--,e.value}peek(){if(this.#e)return this.#e.value}clear(){this.#e=void 0,this.#t=void 0,this.#r=0}get size(){return this.#r}*[Symbol.iterator](){let e=this.#e;for(;e;)yield e.value,e=e.next}}function QA(t){ZA(t);const e=new _6;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);
|
|
1857
|
+
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){ZA(u),t=u,queueMicrotask(()=>{for(;n<t&&e.size>0;)r()})}}}),a}function ZA(t){if(!((Number.isInteger(t)||t===Number.POSITIVE_INFINITY)&&t>0))throw new TypeError("Expecte\
|
|
1858
|
+
d `concurrency` to be a number from 1 and up")}const P6=QA(1);class Oa{static _graphviz=null;graphviz(){return Promise.resolve().then(()=>Oa._graphviz??=Xp.load())}async attempt(e,n,r){return await P6(async()=>{const i=bn.getChild("graphviz-wasm");try{return await r()}catch(s){i.error("FAILED GraphvizWasm. {logMessage}",{error:s,logMessage:e}),i.warn("FAILED DOT:"),i.warn(n),Xp.unload(),Oa._graphviz=null}i.warn("Retrying..."),await k_(50,300);try{return await r()}finally{Xp.unload(),Oa._graphviz=
|
|
1859
|
+
null}})}async unflatten(e){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.
|
|
1860
|
+
graphviz()).layout(e,"svg"))}}const vd=Symbol.for("idattr"),Bp={writeId(t,e){return t[vd]=e,t},readId(t){return t[vd]}},qp={writeId(t,e){return Rt(e)?t[vd]=void 0:t[vd]=e,t},readId(t){return t[vd]}};function bo(t){return t.textDocument.languageId===vv.languageId}function eS({value:t}){const e=parseFloat(t);return isNaN(e)?100:SR(e,{min:0,max:100})}function xa({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"\
|
|
1861
|
+
md";case"large":return"lg";case"xlarge":return"xl";default:qe(t)}}function x6(t,e){const n={};if(!t||t.length===0)return n;for(const r of t)if(e(r))switch(!0){case ao(r):{const i=wd(r);ce(i)&&(n.color=i);break}case gl(r):{n.line=r.value;break}case Wc(r):{switch(r.key){case"head":{n.head=r.value;break}case"tail":{n.tail=r.value;break}default:qe(r)}break}default:qe(r)}return n}function ew(t,e){const{color:n,line:r,head:i,tail:s}=x6(t?.filter(jT),e);return{...n&&n!==La?{color:n}:{},...r&&r!==T_?{line:r}:
|
|
1862
|
+
{},...i&&i!==ws?{head:i}:{},...s?{tail:s}:{}}}function wd(t){return t?.themeColor??t?.customColor?.$refText}function tw(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:qe(t.direction)}return{direction:r,...n&&{nodeSep:n},...e&&{rankSep:e}}}function N6(t){switch(t){case"TB":return"TopBottom";case"BT":return"BottomTop";case"LR":return"LeftRight";case"RL":return"\
|
|
1863
|
+
RightLeft";default:qe(t)}}function jp(t){return Wn(t,e=>zl(e)||ia(e)||QT(e))}const nw=t=>aC(t)||Uh(t)||nv(t)||ev(t)||YT(t)||Zy(t),rw=t=>uC(t)||Xy(t)||KT(t)||rC(t)||HT(t);function I6(t){for(;;){if(rw(t)||nw(t))return!1;if(iv(t)||bl(t))return!0;if(t.$container)t=t.$container;else return!1}}function O6(t){for(;;){if(rw(t))return!1;if(nw(t))return!0;if(t.$container)t=t.$container;else return!1}}function F6(t){for(;;){if(nw(t))return!1;if(rw(t))return!0;if(t.$container)t=t.$container;else return!1}}class L6{parser;locator;constructor(e){
|
|
1864
|
+
this.parser=e.likec4.ModelParser,this.locator=e.likec4.ModelLocator}getDocumentation(e){try{if(qn(e)){const n=at(e),r=this.parser.forDocument(n).parseDeploymentNode(e),i=[r.id];return r.title!==e.name&&i.push(" ",`**${r.title}**`),i.join(`
|
|
1865
|
+
`)}if(Qn(e)){const n=at(e),r=this.parser.forDocument(n).parseDeployedInstance(e),[i,s]=wn.isImportRef(r.element)?[r.element.project,r.element.model]:[n.likec4ProjectId,r.element.model],o=i?this.locator.getParsedElement(s,i):this.locator.getParsedElement(s),a=[r.id,`_instance of_ ${r.element}`];return o&&a.push(" ",`**${o.title}**`),a.join(`
|
|
1866
|
+
`)}if(pn(e)){const n=at(e),r=this.parser.forDocument(n).parseElement(e);return r?[r.id," ",`**${r.title}**`].join(`
|
|
1867
|
+
`):void 0}}catch(n){Re(n)}}}function M6(t,e){return[t,e]=iw(t,e)>0?[e,t]:[t,e],B6(t.range,e.range.start)}function iw(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 B6(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 tS(t){return t.range.start.line!=t.range.end.line}const ee={newLine:Ji.newLine({allowMore:!0}),
|
|
1868
|
+
oneSpace:Ji.oneSpace(),noSpace:Ji.noSpace(),indent:Ji.indent({allowMore:!0}),noIndent:Ji.noIndent()};class q6 extends NG{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.
|
|
1869
|
+
formatViewRuleGlobalStyle(e),this.formatViewRuleGlobalPredicate(e),this.formatIncludeExcludeExpressions(e),this.formatWhereExpression(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(e),this.formatTags(e)}formatTags(e){this.on(e,hv,(n,r)=>{r.cst(Io(n.$cstNode,"valu\
|
|
1870
|
+
es").slice(1)).prepend(ee.oneSpace),r.keywords(",").prepend(ee.noSpace).append(ee.oneSpace)})}formatDeploymentRelation(e){this.on(e,Ci,(n,r)=>{const i=n?.source?.$cstNode?[n?.source?.$cstNode]:[];r.cst(i).append(ee.oneSpace),r.keywords("]->").prepend(ee.noSpace),r.keywords("-[").append(ee.noSpace),r.nodes(...ze([n.target,n.tags],ce)).prepend(ee.oneSpace),r.properties("title","technology").prepend(ee.oneSpace)})}formatRelation(e){this.on(e,n=>_i(n)||Ci(n),(n,r)=>{const i=n?.source?.$cstNode?[n?.source?.
|
|
1871
|
+
$cstNode]:[];r.cst(i).append(ee.oneSpace),r.keywords("]->").prepend(ee.noSpace),r.keywords("-[").append(ee.noSpace),r.nodes(...ze([n.target,n.tags],ce)).prepend(ee.oneSpace),r.properties("title","technology").prepend(ee.oneSpace)}),this.on(e,Qy,(n,r)=>{r.keywords("->","<-").surround(ee.oneSpace);const i=r.property("kind");i.nodes[0]?.text.startsWith(".")&&i.surround(ee.oneSpace),r.keywords("]->").prepend(ee.noSpace).append(ee.oneSpace),r.keywords("-[").prepend(ee.oneSpace).append(ee.noSpace),r.properties(
|
|
1872
|
+
"title").prepend(ee.oneSpace)})}removeIndentFromTopLevelStatements(e){oC(e.$container)&&this.getNodeFormatter(e).keywords("specification","model","views","likec4lib","global","deployments","import").prepend(ee.noIndent)}indentContentInBraces(e){if(D8(e)||fC(e)||ba(e)||$a(e)||va(e)||iv(e)||fa(e)||fo(e)||ll(e)||cl(e)||fo(e)||aC(e)||Uh(e)||nv(e)||T8(e)||dp(e)||k8(e)||bl(e)||ev(e)||YT(e)||Xy(e)||ka(e)||wp(e)||m8(e)||g8(e)||oa(e)||Yy(e)||uC(e)||KT(e)||v8(e)||HT(e)){const n=this.getNodeFormatter(e),r=n.
|
|
1873
|
+
keywords("{"),i=n.keywords("}"),s=n.interior(r,i);let o=null;for(const a of s.nodes)(!o||!M6(o,a))&&n.cst([a]).prepend(ee.indent),o=a;r.prepend(ee.noIndent).prepend(ee.oneSpace),i.prepend(ee.noIndent).prepend(Ji.newLine({allowMore:!0}))}}appendKeywordsWithSpace(e){this.on(e,ZT)?.keywords("element").append(ee.oneSpace)}formatView(e){this.on(e,zh,(n,r)=>{(n.extends||n.viewOf||n.name)&&r.keywords("view").append(ee.oneSpace),r.keywords("of","extends").surround(ee.oneSpace)}),this.on(e,XT)?.keywords(
|
|
1874
|
+
"dynamic","view").append(ee.oneSpace),this.on(e,VT)?.keywords("deployment","view").append(ee.oneSpace)}formatLeafProperty(e){if(nl(e)||xl(e)||A8(e)||ga(e)||dv(e)||dC(e)||ao(e)||gl(e)||Wc(e)||Zi(e)||fp(e)||Ph(e)||up(e)||ov(e)||lv(e)||av(e)||pv(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(ee.oneSpace):
|
|
1875
|
+
r.prepend(ee.noSpace).append(ee.oneSpace),n.keyword(";").prepend(ee.noSpace).append(ee.newLine)}}formatLinkProperty(e){this.on(e,sp,(n,r)=>{r.keyword("link").append(ee.oneSpace),r.property("value").append(ee.oneSpace),r.keyword(":").prepend(ee.noSpace).append(ee.oneSpace),r.keyword(";").prepend(ee.noSpace).append(ee.newLine)})}formatNavigateToProperty(e){this.on(e,ap)?.property("key").append(ee.oneSpace)}formatAutolayoutProperty(e){this.on(e,ql,(n,r)=>{r.keyword("autoLayout").append(ee.oneSpace),
|
|
1876
|
+
r.property("rankSep").prepend(ee.oneSpace),r.property("nodeSep").prepend(ee.oneSpace)})}formatMetadataProperty(e){this.on(e,R8,(n,r)=>{r.property("key").append(ee.oneSpace),r.keyword(":").prepend(ee.noSpace).append(ee.oneSpace),r.keyword(";").prepend(ee.noSpace).append(ee.newLine)})}formatElementDeclaration(e){this.on(e,pn,(n,r)=>{const i=hn(n.$cstNode,"kind"),s=hn(n.$cstNode,"name");s&&i&&(iw(s,i)>0?r.cst([i]).append(ee.oneSpace):(r.cst([s]).append(ee.oneSpace),r.cst([i]).prepend(ee.oneSpace))),
|
|
1877
|
+
r.properties("props").prepend(ee.oneSpace)})}formatGlobals(e){this.on(e,fa,(n,r)=>{r.keyword("style").append(ee.oneSpace),r.property("id").append(ee.oneSpace)}),this.on(e,fo,(n,r)=>{r.keyword("styleGroup").append(ee.oneSpace)}),this.on(e,ll,(n,r)=>{r.keyword("predicateGroup").append(ee.oneSpace)}),this.on(e,cl,(n,r)=>{r.keyword("dynamicPredicateGroup").append(ee.oneSpace)})}formatSpecificationRule(e){if((ba(e)||$a(e)||mp(e)||va(e))&&this.getNodeFormatter(e).keywords("element","relationship","tag",
|
|
1878
|
+
"deploymentNode").append(ee.oneSpace),pp(e)){const n=this.getNodeFormatter(e);n.keyword("color").append(ee.oneSpace),n.property("name").append(ee.oneSpace)}}formatWithPredicate(e){(Jh(e)||cv(e))&&this.getNodeFormatter(e).keyword("with").prepend(ee.oneSpace)}formatDeploymentNodeDeclaration(e){this.on(e,qn,(n,r)=>{const i=hn(n.$cstNode,"kind"),s=hn(n.$cstNode,"name");s&&i&&(iw(s,i)>0?r.cst([i]).append(ee.oneSpace):(r.cst([s]).append(ee.oneSpace),r.cst([i]).prepend(ee.oneSpace))),r.properties("titl\
|
|
1879
|
+
e").prepend(ee.oneSpace)})}formatDeployedInstance(e){this.on(e,Qn,(n,r)=>{const i=n.$cstNode?.content.find(s=>s.text==="=");i&&r.cst([i]).surround(ee.oneSpace),r.keyword("instanceOf").append(ee.oneSpace),r.property("title").prepend(ee.oneSpace)})}formatViewRuleGlobalStyle(e){this.on(e,yv,(n,r)=>{r.keywords("global","style").append(ee.oneSpace)})}formatViewRuleGlobalPredicate(e){const n=this.getNodeFormatter(e);(gv(e)||JT(e))&&n.keywords("global","predicate").append(ee.oneSpace)}formatViewRuleGroup(e){
|
|
1880
|
+
this.on(e,wp,(n,r)=>{r.keyword("group").append(ee.oneSpace)})}formatViewRuleStyle(e){this.on(e,ka)?.keyword("style").append(ee.oneSpace),this.on(e,Yc)?.keyword("style").append(ee.oneSpace),this.on(e,nC)?.keyword(",").prepend(ee.noSpace).append(ee.oneSpace),this.on(e,b8)?.keyword(",").prepend(ee.noSpace).append(ee.oneSpace)}formatWhereExpression(e){(uv(e)||rv(e))&&this.getNodeFormatter(e).keyword("where").append(ee.oneSpace)}formatWhereRelationExpression(e){if(this.on(e,h8,(n,r)=>{r.property("ope\
|
|
1881
|
+
rator").surround(ee.oneSpace)}),this.on(e,yC,(n,r)=>{r.keyword("not").append(ee.oneSpace)}),zT(e)||x8(e)||gC(e)){const n=this.getNodeFormatter(e);n.property("operator").surround(ee.oneSpace),n.property("not").surround(ee.oneSpace)}}formatWhereElementExpression(e){if(this.on(e,d8,(n,r)=>{r.property("operator").surround(ee.oneSpace)}),this.on(e,mC,(n,r)=>{r.keyword("not").append(ee.oneSpace)}),UT(e)||P8(e)||_8(e)){const n=this.getNodeFormatter(e);n.property("operator").surround(ee.oneSpace),n.property(
|
|
1882
|
+
"not").surround(ee.oneSpace)}}formatIncludeExcludeExpressions(e){if(qy(e)||zl(e)||ia(e)){const n=this.getNodeFormatter(e);(!e.$cstNode||!tS(e.$cstNode))&&n.keywords("include","exclude").append(ee.oneSpace)}if(nC(e)){const n=this.getNodeFormatter(e),r=this.findPredicateExpressionRoot(e),i=r?.$cstNode&&tS(r?.$cstNode);i&&n.property("value").prepend(ee.indent),n.keyword(",").prepend(ee.noSpace).append(i?ee.newLine:ee.oneSpace)}}formatRelationExpression(e){this.on(e,E8,(n,r)=>{r.keyword("->").append(
|
|
1883
|
+
ee.oneSpace)}),this.on(e,sC,(n,r)=>{r.keyword("->").prepend(ee.oneSpace)}),this.on(e,lC,(n,r)=>{r.keywords("->","<->").prepend(ee.oneSpace),r.keywords("-[").prepend(ee.oneSpace).append(ee.noSpace),r.keywords("]->").prepend(ee.noSpace).append(ee.oneSpace);const i=r.property("kind");i.nodes[0]?.text.startsWith(".")&&i.surround(ee.oneSpace)}),this.on(e,w8,(n,r)=>{r.property("target").prepend(ee.oneSpace)})}findPredicateExpressionRoot(e){let n=e.$container;for(;;){if(!n||qy(n)||zl(n)||ia(n))return n;
|
|
1884
|
+
n=n.$container}}on(e,n,r){const i=n(e)?this.getNodeFormatter(e):void 0;return r&&i&&r(e,i),i}}class j6 extends QD{constructor(e){super(e),this.services=e}createDescription(e,n,r){const i=r??at(e),s=super.createDescription(e,n,r);return i.likec4ProjectId??=this.services.shared.workspace.ProjectsManager.belongsTo(i.uri),s.likec4ProjectId=i.likec4ProjectId,s}}var Bt=Ks();class G6 extends ZD{constructor(e){super(e),this.services=e}async updateContent(e,n=Bt.CancellationToken.None){const r=this.services.
|
|
1885
|
+
workspace.ProjectsManager;e.likec4ProjectId=r.belongsTo(e.uri),await super.updateContent(e,n)}projectElements(e,n,r){const i=this.services.workspace.ProjectsManager;return Xe(this.symbolIndex.keys()).filter(s=>i.belongsTo(s)===e&&(!r||r.has(s))).flatMap(s=>this.getFileDescriptions(s,n))}}class U6 extends WD{constructor(e){super(e),this.services=e}get allExcludingBuiltin(){const e=this.services.workspace.ProjectsManager;return super.all.filter(n=>!bo(n)||id(n.uri)?!1:(n.likec4ProjectId??=e.belongsTo(
|
|
1886
|
+
n.uri),!0))}projectDocuments(e){return this.allExcludingBuiltin.filter(n=>n.likec4ProjectId===e)}groupedByProject(){return Qo(this.allExcludingBuiltin.toArray(),fi("likec4ProjectId"))}}class W6 extends eR{constructor(e){super(e),this.services=e,this.documentFactory=e.workspace.LangiumDocumentFactory}documentFactory;async loadAdditionalDocuments(e,n){const r=this.services.workspace.ProjectsManager;for(const i of e)try{const s=await this.fileSystemProvider.readDirectory(yt.parse(i.uri));for(const o of s)
|
|
1887
|
+
try{await r.loadConfigFile(o)}catch(a){sd(a)}}catch(s){sd(s)}n(this.documentFactory.fromString(DC,yt.parse(M8))),await super.loadAdditionalDocuments(e,n)}includeEntry(e,n,r){return this.services.workspace.ProjectsManager.isConfigFile(n)?!1:n.isFile?!this.services.workspace.ProjectsManager.checkIfExcluded(n.uri):super.includeEntry(e,n,r)}workspace(){return this.folders&&C_(this.folders,1)?this.folders[0]:null}get workspaceUri(){const e=this.workspace();return _e(e,"Workspace not initialized"),yt.
|
|
1888
|
+
parse(e.uri)}get workspaceURL(){const e=this.workspace();return _e(e,"Workspace not initialized"),new URL(e.uri)}}const z6=rt.getChild("LikeC4LanguageServices");class H6{constructor(e){this.services=e,this.views=e.likec4.Views,this.builder=e.likec4.ModelBuilder,this.projectsManager=e.shared.workspace.ProjectsManager}views;builder;projectsManager;get workspaceUri(){return this.services.shared.workspace.WorkspaceManager.workspaceUri}projects(){const e=this.services.shared.workspace.ProjectsManager,
|
|
1889
|
+
n=He(this.services.shared.workspace.LangiumDocuments.groupedByProject(),Zu(),xt(([s,o])=>{const a=s,{folder:u,config:c}=e.getProject(a);return{id:a,folder:u,config:c,documents:xt(o,fi("uri"))}}));if(lr(n,1))return n;const{folder:r,config:i}=e.getProject(jn.DefaultProjectId);return[{id:jn.DefaultProjectId,folder:r,config:i,documents:null}]}async diagrams(){return await this.views.diagrams()}async computedModel(e){const n=this.projectsManager.ensureProjectId(e);return await this.builder.buildLikeC4Model(
|
|
1890
|
+
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 bs.create({...r,__:"layouted",views:Qu(i,fi("id"))})}getErrors(){return this.services.shared.workspace.LangiumDocuments.allExcludingBuiltin.toArray().flatMap(e=>(e.diagnostics??[]).filter(n=>n.severity===Os.Error).map(({message:n,range:r})=>({message:n,line:r.start.line,range:r,sourceFsPath:e.uri.fsPath})))}async notifyUpdate({
|
|
1891
|
+
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?[yt.file(e)]:[],n?[yt.file(n)]:[],s),i=!s.isCancellationRequested}),i}catch(i){return z6.error(rr(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){sd(
|
|
1892
|
+
n)}}throwIfDisposed(){if(this.isDisposed)throw new Error("This has already been disposed")}}function Eo(t){let e=fv(t)?t.el.ref:t.modelElement.value.ref;return e?.$type==="Imported"&&(e=e.imported.ref),e?.$type==="Element"?e:void 0}function $o(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:n.el.$refText),n=n.parent;return e.length===1?e[0]:e.reverse().join(".")}function K6(t){for(;t.parent;)t=t.parent;return t.
|
|
1893
|
+
value.ref??null}function V6(t){let e;for(;e=t.value?.ref;){if(qn(e))return null;if(Qn(e))return e;if(Rt(t.parent))return null;t=t.parent}return null}function X6(t){const e=K6(t);return e?.$type==="Imported"?e:null}function Y6(t){let e;for(;e=t.value?.ref;){if(gh(e))return!0;if(Rt(t.parent))return!1;t=t.parent}return!1}function Wt(t){if(Vr(t)){for(;t.$type==="Imported"&&t.$container;)t=t.$container;_e(sv(t))}if(sv(t))return t.project;const e=kt(t)?at(t):t;return It(e.likec4ProjectId,()=>`Invalid \
|
|
1894
|
+
state, document ${e.uri} has no project ID assigned`)}function bd(...t){var e=t.length>1?t.join(":::"):t[0];return A_(e)}function nS(t){try{return t()}catch(e){rt.debug("Safe call failed",{error:e});return}}class J6{constructor(e){this.services=e}async provideCodeLens(e,n,r){return bo(e)?(e.state<=je.Linked&&(rt.debug(`Waiting for document ${e.uri.path} to be Linked`),await this.services.shared.workspace.DocumentBuilder.waitUntil(je.Linked,e.uri,r),rt.debug("Document is linked")),e.parseResult.value.
|
|
1895
|
+
views.flatMap(i=>i.views).flatMap(i=>{const s=Bp.readId(i),o=i.$cstNode?.range;if(!o||!s)return[];const a=Wt(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 ow=["color","shape","icon","border","opacity","multiple","size","textSize"].join(",");class Q6 extends tT{constructor(e){super(e),this.services=e}completionOptions={triggerCharacters:["."]};completionForKeyword(e,n,r){
|
|
1896
|
+
if(this.filterKeyword(e,n))switch(!0){case n.value==="import":r(e,{label:n.value,kind:Ct.Snippet,insertTextFormat:kn.Snippet,insertText:`${n.value} { $0 } from '\${1|${this.services.shared.workspace.ProjectsManager.all.join(",")}|}'`});break;case(n.value==="deployment"&&Br(e.node,bl)):r(e,{label:n.value,detail:"Insert deployment view",kind:Ct.Class,insertTextFormat:kn.Snippet,insertText:["deployment view ${1:view_${TM_FILENAME_BASE}_${CURRENT_SECOND}} {"," title '${2:Untitled}'"," "," include $0",
|
|
1897
|
+
"}"].join(`
|
|
1898
|
+
`)});break;case["title","description","technology"].includes(n.value):r(e,{label:n.value,kind:Ct.Property,insertTextFormat:kn.Snippet,insertText:`${n.value} '\${0}'`});break;case n.value==="color":r(e,{label:n.value,kind:Ct.Property,insertTextFormat:kn.Snippet,insertText:`${n.value} \${1|${S_.join(",")}|}$0`});break;case n.value==="opacity":r(e,{label:n.value,kind:Ct.Property,insertTextFormat:kn.Snippet,insertText:`${n.value} \${0:100}%`});break;case["views","specification","model","deployment",
|
|
1899
|
+
"with"].includes(n.value):r(e,{label:n.value,detail:`Insert ${n.value} block`,kind:Ct.Module,insertTextFormat:kn.Snippet,insertText:`${n.value} {
|
|
1900
|
+
$0
|
|
1901
|
+
}`});break;case n.value==="group":r(e,{label:n.value,detail:"Insert group block",kind:Ct.Class,insertTextFormat:kn.Snippet,insertText:["group '${1:Title}' {"," $0","}"].join(`
|
|
1902
|
+
`)});break;case(n.value==="dynamic"&&Br(e.node,bl)):r(e,{label:n.value,detail:"Insert dynamic view",kind:Ct.Class,insertTextFormat:kn.Snippet,insertText:["dynamic view ${1:view_${TM_FILENAME_BASE}_${CURRENT_SECOND}} {"," title '${2:Untitled}'"," "," $0","}"].join(`
|
|
1903
|
+
`)});break;case(n.value==="style"&&e.node&&Br(e.node,fa)):r(e,{label:n.value,detail:`Insert ${n.value} block`,kind:Ct.Module,insertTextFormat:kn.Snippet,insertText:`${n.value} \${1:name} \${2:*} {
|
|
1904
|
+
\${3|${ow}|} $0
|
|
1905
|
+
}`});break;case(n.value==="style"&&e.node&&Br(e.node,n3([bl,fo]))):r(e,{label:n.value,detail:`Insert ${n.value} block`,kind:Ct.Module,insertTextFormat:kn.Snippet,insertText:`${n.value} \${1:*} {
|
|
1906
|
+
\${2|${ow}|} $0
|
|
1907
|
+
}`});break;case n.value==="style":r(e,{label:n.value,detail:`Insert ${n.value} block`,kind:Ct.Module,insertTextFormat:kn.Snippet,insertText:`${n.value} {
|
|
1908
|
+
\${1|${ow}|} $0
|
|
1909
|
+
}`});break;case n.value==="extend":r(e,{label:n.value,detail:"Extend another view",kind:Ct.Class,insertTextFormat:kn.Snippet,insertText:`extend $1 {
|
|
1910
|
+
$0
|
|
1911
|
+
}`});break;case n.value==="autoLayout":r(e,{label:n.value,kind:Ct.Class,insertTextFormat:kn.Snippet,insertText:"autoLayout ${1|TopBottom,BottomTop,LeftRight,RightLeft|}$0"});break;default:r(e,{label:n.value,kind:this.getKeywordCompletionItemKind(n),detail:"Keyword",sortText:"1"})}}}class Z6 extends nT{createDocumentHighlight(e){return ge.DocumentHighlight.create(e.segment.range,ge.DocumentHighlightKind.Read)}}class eH{constructor(e){this.services=e}async getDocumentLinks(e,n,r){return bo(e)?qr(e.
|
|
1912
|
+
parseResult.value).filter(sp).map(i=>{try{const s=hn(i.$cstNode,"value")?.range,o=s&&this.resolveLink(e,i.value);if(o&&rs(o))return{range:s,target:o}}catch(s){Re(s)}return null}).nonNullable().toArray():[]}resolveLink(e,n){if(rs(n)||od(n))return n;if(bv(n))return bp(e.uri.toString(),"../",n);const r=this.services.shared.workspace.ProjectsManager.getProject(e).folder;return bp(r.toString(),n)}relativeLink(e,n){if(od(n))return SC(n);if(bv(n)){const r=new URL(e.uri.toString(!0)),i=new URL(n,r).toString();
|
|
1913
|
+
return SC(K8(i,this.services.shared.workspace.WorkspaceManager.workspaceURL.toString()))}return null}}const rS=rt.getChild("DocumentSymbolProvider");class tH{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<=je.Linked&&(rS.debug(`Waiting for document ${e.uri.
|
|
1914
|
+
path} to be Linked`),await this.services.shared.workspace.DocumentBuilder.waitUntil(je.Linked,e.uri,r),rS.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(
|
|
1915
|
+
l),[]}})}getLikec4LibSymbol(e){const n=e?.$cstNode;if(!n)return[];const r=e.icons.map(i=>this.getLibIconSymbol(i)).filter(ce);return r.length===0?[]:[{kind:Dr.Namespace,name:"icons",range:n.range,selectionRange:$u(n,"icons")?.range??n.range,children:r}]}getSpecSymbol(e){const n=e?.$cstNode;if(!n)return[];const r=hn(n,"name");if(!r)return[];const i=He([...e.elements,...e.tags,...e.relationships],xt(s=>{try{if(ba(s)||$a(s)||va(s))return this.getKindSymbol(s);if(mp(s))return this.getTagSymbol(s)}catch(o){
|
|
1916
|
+
return Re(o),null}qe(s)}),ze(ce));return i.length===0?[]:[{kind:Dr.Namespace,name:e.name,range:n.range,selectionRange:r.range,children:i}]}getModelSymbol(e){const n=e.$cstNode;if(!n)return[];const r=hn(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=hn(n,"name");return r?[{kind:this.symbolKind(e),name:e.name,range:n.range,
|
|
1917
|
+
selectionRange:r.range,children:e.elements.flatMap(i=>this.getDeploymentElementSymbol(i))}]:[]}getElementsSymbol(e){try{if(ua(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:$o(e.element),range:n.range,selectionRange:r.range,children:i.elements.flatMap(s=>this.getElementsSymbol(s))}]}getElementSymbol(e){const n=e.$cstNode,
|
|
1918
|
+
r=hn(n,"name");if(!r||!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=hn(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||Gt(e.kind.name)?null:{kind:this.
|
|
1919
|
+
symbolKind(e),name:e.kind.name,range:e.$cstNode.range,selectionRange:e.kind.$cstNode.range}}getTagSymbol(e){return!e.$cstNode||!e.tag.$cstNode||Gt(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||Gt(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?hn(n,"name"):null;
|
|
1920
|
+
return r?[{kind:this.symbolKind(e),name:r.text,range:n.range,selectionRange:r.range,children:[]}]:[]}getDeploymentElementSymbol(e){try{if(qn(e))return this.getDeploymentNodeSymbol(e);if(Qn(e))return this.getDeployedInstanceSymbol(e);if(co(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.
|
|
1921
|
+
range,detail:s,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=at(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 nH extends oT{parser;locator;constructor(e){
|
|
1922
|
+
super(e),this.parser=e.likec4.ModelParser,this.locator=e.likec4.ModelLocator}getAstNodeHoverContent(e){if(pC(e))return{contents:{kind:"markdown",value:"tag `"+e.name+"`"}};if(qn(e)){const n=at(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(`
|
|
1923
|
+
`)}}}if(Qn(e)){const n=at(e),r=this.parser.forDocument(n).parseDeployedInstance(e),[i,s]=wn.isImportRef(r.element)?[r.element.project,r.element.model]:[n.likec4ProjectId,r.element.model],o=i?this.locator.getParsedElement(s,i):this.locator.getParsedElement(s),a=[r.id+" ",`instance of \`${r.element}\``];return o&&a.push(`### ${o.title}`,"element kind `"+o.kind+"` "),{contents:{kind:"markdown",value:a.join(`
|
|
1924
|
+
`)}}}if(ZT(e))return{contents:{kind:"markdown",value:"element kind `"+e.name+"`"}};if(y8(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(`
|
|
1925
|
+
`)}}:void 0}}}class rH extends $G{highlightElement(e,n){if(pn(e)||qn(e)||Qn(e))return this.highlightNameAndKind(e,n);if(Wy(e))return this.highlightView(e,n);if(C8(e))return n({node:e,property:"name",type:Be.function});if($8(e))return n({node:e,property:"name",type:Be.type,modifier:[We.definition]}),"prune";if((_i(e)||lC(e)&&"kind"in e)&&n({node:e,property:"kind",type:Be.function}),ap(e)||_l(e))return n({node:e,property:"key",type:Be.property}),n({node:e,property:"value",type:Be.variable,modifier:[
|
|
1926
|
+
We.definition,We.readonly]}),"prune";if(Zh(e)||bC(e))return n({cst:e.$cstNode,type:Be.variable,modifier:[We.definition,We.readonly]}),Zh(e)&&e.selector&&n({node:e,property:"selector",type:Be.variable,modifier:[We.definition,We.readonly]}),"prune";if(gC(e)&&ce(e.value)){n({node:e,property:"value",type:Be.function});return}if((UT(e)||zT(e))&&ce(e.value)){n({node:e,property:"value",type:Be.type,modifier:[We.definition,We.readonly]});return}if((vC(e)||wC(e))&&n({node:e,property:"participant",type:Be.
|
|
1927
|
+
keyword}),eC(e)&&ce(e.kind))return n({node:e,property:"kind",type:Be.type,modifier:[We.definition]}),"prune";if(fo(e)||fa(e)){n({node:e,property:"id",type:Be.variable,modifier:[We.definition,We.readonly]});return}if(yv(e)){n({node:e,property:"style",type:Be.variable,modifier:[We.definition,We.readonly]});return}if(ll(e)||cl(e)){n({node:e,property:"name",type:Be.variable,modifier:[We.definition,We.readonly]});return}if(gv(e)){n({node:e,property:"predicate",type:Be.variable,modifier:[We.definition,
|
|
1928
|
+
We.readonly]});return}if(tC(e)&&ce(e.tag))return n({node:e,property:"tag",type:Be.type,modifier:[We.definition]}),"prune";if(iC(e)||hC(e))return n({node:e,property:"value",type:Be.variable,modifier:[We.definition,We.readonly]}),e.parent?void 0:"prune";if(fv(e))return n({node:e,property:"el",type:Be.variable,modifier:[We.definition,We.readonly]}),e.parent?void 0:"prune";if(Vr(e))return n({node:e,property:"imported",type:Be.variable,modifier:[We.definition,We.readonly]}),"prune";if(pp(e)){n({node:e,
|
|
1929
|
+
keyword:"color",type:Be.keyword}),n({node:e,property:"name",type:Be.type,modifier:[We.declaration,We.readonly]});return}if((ba(e)||$a(e)||va(e))&&n({node:e,property:"kind",type:Be.type,modifier:[We.declaration,We.readonly]}),hv(e))return n({node:e,property:"values",type:Be.interface}),"prune";if(pC(e))return n({node:e,property:"name",type:Be.type,modifier:[We.definition]});if((dp(e)||oa(e))&&n({node:e,property:"key",type:Be.property}),up(e))return n({node:e,property:"key",type:Be.property}),n({node:e,
|
|
1930
|
+
property:"value",type:Be.number}),"prune";if(sp(e)||Zi(e)||GT(e))return n({node:e,property:"key",type:Be.property}),Zi(e)&&(e.libicon||e.value==="none")?(n({node:e,property:e.libicon?"libicon":"value",type:Be.enum,modifier:[We.defaultLibrary]}),"prune"):("value"in e&&e.value&&n({node:e,property:"value",type:Be.string}),"prune");if(ao(e)||fp(e)||Wc(e)||gl(e)||Ph(e)||u8(e))return n({node:e,property:"key",type:Be.property}),"value"in e&&n({node:e,property:"value",type:Be.enum}),"prune"}highlightNameAndKind(e,n){
|
|
1931
|
+
if(n({node:e,property:"name",type:Be.function,modifier:[We.declaration,We.readonly]}),Qn(e)||n({node:e,property:"kind",type:Be.keyword,modifier:[]}),pn(e)){e.props.length>0&&n({node:e,property:"props",type:Be.string});return}e.title&&n({node:e,property:"title",type:Be.string})}highlightView(e,n){e.name&&n({node:e,property:"name",type:Be.interface,modifier:[We.declaration,We.readonly,"local"]})}}class iS extends sw{constructor(e,n="fqn-index"){super(),this.services=e,this.cachePrefix=n,this.langiumDocuments=
|
|
1932
|
+
e.shared.workspace.LangiumDocuments,this.projects=e.shared.workspace.ProjectsManager,this.documentCache=new qw(r=>this.createDocumentIndex(r)),this.workspaceCache=new nh(e.shared,je.IndexedContent),this.onDispose(e.shared.workspace.DocumentBuilder.onDocumentPhase(je.IndexedContent,r=>{bo(r)&&this.documentCache.set(r,this.createDocumentIndex(r))}))}projects;langiumDocuments;documentCache;workspaceCache;documents(e){return this.langiumDocuments.projectDocuments(e).filter(n=>bo(n)&&n.state>=je.IndexedContent)}get(e){
|
|
1933
|
+
return e.state<je.IndexedContent&&Re(`Document ${e.uri.path} is not indexed`),this.documentCache.get(e)}resolve(e){return e.$type==="Imported"?this.getFqn(e.imported.ref):e.$type==="Element"?this.getFqn(e):this.services.likec4.DeploymentsIndex.getFqn(e)}getFqn(e){_e(pn(e)||gh(e));let n=qp.readId(e);if(ce(n))return n;const r=at(e);return _e(bo(r)),Re(`Document ${r.uri.path} is not indexed, but getFqn was called`),this.get(r),It(qp.readId(e),"Element fqn must be set, invalid state")}byFqn(e,n){return Xe(
|
|
1934
|
+
this.workspaceCache.get(`${this.cachePrefix}:${e}:fqn:${n}`,()=>this.documents(e).toArray().flatMap(r=>this.get(r).byFqn(n))))}rootElements(e){return Xe(this.workspaceCache.get(`${this.cachePrefix}:${e}:rootElements`,()=>{const n=this.documents(e).reduce((r,i)=>(this.get(i).rootElements().forEach(s=>{r.set(s.name,s)}),r),new xn);return aw(n).sort((r,i)=>Yp(r.name,i.name))}))}directChildrenOf(e,n){return Xe(this.workspaceCache.get(`${this.cachePrefix}:${e}:directChildrenOf:${n}`,()=>{const r=this.
|
|
1935
|
+
documents(e).reduce((i,s)=>(this.get(s).children(n).forEach(o=>{i.set(o.name,o)}),i),new xn);return aw(r).sort((i,s)=>Yp(i.name,s.name))}))}uniqueDescedants(e,n){return Xe(this.workspaceCache.get(`${this.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 xn,descendants:new xn}),s=aw(
|
|
1936
|
+
r).sort((a,u)=>Yp(a.name,u.name)),o=[...i.associations()].flatMap(([a,u])=>u.length===1&&!r.has(a)?u:[]);return[...s,...z_(o)]}))}createDocumentIndex(e){const n=e.parseResult.value.models.flatMap(f=>f.elements);if(n.length===0)return Na.EMPTY;const r=e.likec4ProjectId??=this.projects.belongsTo(e),i=new Array,s=new xn,o=new xn,a=new xn,u=this.services.workspace.AstNodeDescriptionProvider,c=(f,d,h)=>{const p={...u.createDescription(f,d,e),id:h,likec4ProjectId:r};return qp.writeId(f,h),a.set(h,p),p},
|
|
1937
|
+
l=(f,d)=>{let h;if(pn(f)){h=G_(f.name,d);const w=c(f,f.name,h);d?s.set(d,w):i.push(w)}else h=$o(f.element);let p=[];if(cn(f.body)&&!Gt(f.body.elements)){for(const w of f.body.elements)if(!_i(w))try{p.push(...l(w,h))}catch(v){Re(v)}}p=[...s.get(h)??[],...p];for(const w of p)o.set(h,w);if(ua(f))for(const w of H_(h))for(const v of p)o.set(w,v);return o.get(h)??[]};for(const f of n)try{if(_i(f))continue;l(f,null)}catch(d){Re(d)}return new Na(i,s,o,a,r)}}function aw(t){return[...t.associations()].flatMap(
|
|
1938
|
+
([e,n])=>n.length===1?n:[])}class Na{constructor(e,n,r,i,s){this._rootElements=e,this._children=n,this._descendants=r,this._byfqn=i,this.projectId=s}static EMPTY=new Na([],new xn,new xn,new xn,jn.DefaultProjectId);rootElements(){return this._rootElements}byFqn(e){return this._byfqn.get(e)??[]}children(e){return this._children.get(e)??[]}descendants(e){return this._descendants.get(e)??[]}}class iH extends iS{constructor(e){super(e,"deployments-index"),this.services=e,this.Names=e.references.NameProvider}Names;createDocumentIndex(e){
|
|
1939
|
+
const n=e.parseResult.value.deployments.flatMap(d=>d.elements);if(n.length===0)return Na.EMPTY;const r=e.likec4ProjectId??=this.projects.belongsTo(e),i=new Array,s=new xn,o=new xn,a=new xn,u=this.Names,c=this.services.workspace.AstNodeDescriptionProvider,l=(d,h,p)=>{const w={...c.createDescription(d,h,e),id:p,likec4ProjectId:r};return qp.writeId(d,p),a.set(p,w),w},f=(d,h)=>{let p;if(co(d))p=$o(d.deploymentNode);else{const v=u.getName(d);if(!ce(v))return[];p=__(v,h);const g=l(d,v,p);if(h?s.set(h,
|
|
1940
|
+
g):i.push(g),Qn(d))return[]}let w=[];if(cn(d.body)){for(const v of d.body.elements)if(!Ci(v))try{w.push(...f(v,p))}catch(g){Re(g)}}w=[...s.get(p)??[],...w];for(const v of w)o.set(p,v);if(co(d))for(const v of P_(p))for(const g of w)o.set(v,g);return o.get(p)??[]};for(const d of n)try{if(Ci(d))continue;f(d,null)}catch(h){Re(h)}return new Na(i,s,o,a,r)}}const sS=t=>Number.isFinite(t)?t:0;function sH(t){return{days:Math.trunc(t/864e5),hours:Math.trunc(t/36e5%24),minutes:Math.trunc(t/6e4%60),seconds:Math.
|
|
1941
|
+
trunc(t/1e3%60),milliseconds:Math.trunc(t%1e3),microseconds:Math.trunc(sS(t*1e3)%1e3),nanoseconds:Math.trunc(sS(t*1e6)%1e3)}}function oH(t){return{days:t/86400000n,hours:t/3600000n%24n,minutes:t/60000n%60n,seconds:t/1000n%60n,milliseconds:t%1000n,microseconds:0n,nanoseconds:0n}}function aH(t){switch(typeof t){case"number":{if(Number.isFinite(t))return sH(t);break}case"bigint":return oH(t)}throw new TypeError("Expected a finite number or bigint")}const uH=t=>t===0||t===0n,cH=(t,e)=>e===1||e===1n?
|
|
1942
|
+
t:`${t}s`,lH=1e-7,dH=24n*60n*60n*1000n;function Gp(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=!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+lH);return(Math.round(d)/10**f).toFixed(f)},o=(l,f,d,h)=>{if(!((i.
|
|
1943
|
+
length===0||!e.colonNotation)&&uH(l)&&!(e.colonNotation&&d==="m"))){if(h??=String(l),e.colonNotation){const p=h.includes(".")?h.split(".")[0].length:h.length,w=i.length>0?2:1;h="0".repeat(Math.max(0,w-p))+h}else h+=e.verbose?" "+cH(f,l):d;i.push(h)}},a=aH(t),u=BigInt(a.days);if(e.hideYearAndDays?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||
|
|
1944
|
+
e.formatSubMilliseconds||!e.colonNotation&&t<1e3){const l=Number(a.seconds),f=Number(a.milliseconds),d=Number(a.microseconds),h=Number(a.nanoseconds);if(o(l,"second","s"),e.formatSubMilliseconds)o(f,"millisecond","ms"),o(d,"microsecond","\xB5s"),o(h,"nanosecond","ns");else{const p=f+d/1e3+h/1e6,w=typeof e.millisecondsDecimalDigits=="number"?e.millisecondsDecimalDigits:0,v=p>=1?Math.round(p):Math.ceil(p),g=w?p.toFixed(w):v;o(Number.parseFloat(g),"millisecond","ms",g)}}else{const l=(n?Number(t%dH):
|
|
1945
|
+
t)/1e3%60,f=typeof e.secondsDecimalDigits=="number"?e.secondsDecimalDigits:1,d=s(l,f),h=e.keepDecimalsOnWholeSeconds?d:d.replace(/\.0+$/,"");o(Number.parseFloat(h),"second","s",h)}if(i.length===0)return r+"0"+(e.verbose?" milliseconds":"ms");const c=e.colonNotation?":":" ";return typeof e.unitCount=="number"&&(i=i.slice(0,Math.max(e.unitCount,1))),r+i.join(c)}function fH(t){const e=new Map;for(const n of t)if(Ma.isElement(n)&&n.viewOf&&Rt(n.extends)){const r=e.get(n.viewOf)??[];r.push(n.id),e.set(
|
|
1946
|
+
n.viewOf,r)}for(const{id:n,nodes:r}of t)for(const i of r){const s=Ad.modelRef(i);if(i.navigateTo||!s)continue;const o=TR(e.get(s)??[],a=>a!==n);o&&(i.navigateTo=o)}return t}function hH(t,e="/"){const n=He(t,xt(u=>u.docUri),ze(ce),Yo());if(n.length===0)return"";if(n.length===1){const u=Ta(n[0]).pathname.split(e);return u.length<=1?e:(u.pop(),u.join(e)+e)}_e(lr(n,2),"Expected at least 2 unique URIs");const[r,...i]=n,s=Ta(r).pathname.split(e);let o=s.length;for(const u of i){if(u===r)continue;const c=Ta(
|
|
1947
|
+
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 pH(t){const e="/",n=hH(t,e);return t.map(r=>{if(!r.docUri)return{view:r,parts:[]};let i=Ta(r.docUri).pathname;return n.length>0?(_e(i.startsWith(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.
|
|
1948
|
+
parts.length-i.parts.length;for(let s=0;s<r.parts.length;s++){const o=_w(r.parts[s],i.parts[s]);if(o!==0)return o}return _w(r.view.title??r.view.id,i.view.title??i.view.id)}).map(({parts:r,view:i})=>({...i,relativePath:r.join(e)}))}class oS{mergedData=new Map;merge(e){for(const n of e){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){
|
|
1949
|
+
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:lr(i,1)?i:null,links:lr(r,1)?r:null,...!Gt(s)&&{metadata:s}}}}class mH{specs={tags:new Set,elements:{},deployments:{},relationships:{},colors:{}};globals={predicates:{},dynamicPredicates:{},styles:{}};imports=new x_(Set);constructor(e){for(const n of e){
|
|
1950
|
+
const{c4Specification:r,c4Globals:i,c4Imports:s}=n;r.tags.forEach(o=>this.specs.tags.add(o)),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(this.globals.predicates,i.predicates),Object.assign(this.globals.dynamicPredicates,i.dynamicPredicates),Object.assign(this.globals.styles,i.styles);for(const[o,a]of s)this.imports.set(o,a)}}toModelElement=({
|
|
1951
|
+
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:h,title:p,description:w,technology:v,metadata:g})=>{try{const E=this.specs.elements[h];return E?(r??=E.style.color,i??=E.style.shape,s??=E.style.icon,o??=E.style.opacity,a??=E.style.border,v??=E.technology,c??=E.style.multiple,u??=E.style.size,l??=E.style.padding,f??=E.style.textSize,{...r&&{color:r},...i&&{shape:i},...s&&{icon:s},...g&&!Gt(g)&&{metadata:g},...E.notation&&{notation:E.
|
|
1952
|
+
notation},style:{...a&&{border:a},...u&&{size:u},...l&&{padding:l},...f&&{textSize:f},...yy(c)&&{multiple:c},...uh(o)&&{opacity:o}},links:n??null,tags:e??null,technology:v??null,description:w??null,title:p,kind:h,id:d}):(rt.warn`No kind '${h}' found for ${d}`,null)}catch(E){Re(E)}return null};toModelRelation=({astPath:e,source:n,target:r,kind:i,links:s,id:o,...a})=>{const u=Es.toModelFqn(r),c=Es.toModelFqn(n);return Tn(i)&&this.specs.relationships[i]?{...this.specs.relationships[i],...a,...s&&{links:s},
|
|
1953
|
+
source:c,target:u,kind:i,id:o}:{...s&&{links:s},...a,source:c,target:u,id:o}};toDeploymentElement=e=>{if("element"in e&&!("kind"in e))return{...e,element:Es.toModelFqn(e.element)};if("element"in e)return null;try{const n=this.specs.deployments[e.kind];if(!n)return rt.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,...n.style,...s}}}catch(n){Re(n)}return null};toDeploymentRelation=({
|
|
1954
|
+
astPath:e,source:n,target:r,kind:i,links:s,id:o,...a})=>Tn(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 gH(t){const e=new mH(t),n=Jo(e.specs.colors,d=>N_(d.color)),r=new oS,i=new oS,s=He(t,Kr(d=>(r.merge(d.c4ExtendElements),xt(d.c4Elements,e.toModelElement))),ze(ce),Pw,my((d,h)=>{const p=Nw(h.id);return p&&Rt(d[p])?(rt.debug`No parent found for ${h.id}`,d):(d[h.id]=r.apply(
|
|
1955
|
+
h),d)},{})),o=He(t,Kr(d=>xt(d.c4Relations,e.toModelRelation)),ze(d=>d?Rt(s[d.source])&&!xw(d.source)||Rt(s[d.target])&&!xw(d.target)?(rt.debug`Invalid relation ${d.id}
|
|
1956
|
+
source: ${d.source} resolved: ${!!s[d.source]}
|
|
1957
|
+
target: ${d.target} resolved: ${!!s[d.target]}\n`,!1):!0:!1),Qu(fi("id"))),a=He(t,Kr(d=>(i.merge(d.c4ExtendDeployments),xt(d.c4Deployments,e.toDeploymentElement))),ze(ce),Pw,my((d,h)=>{const p=Nw(h.id);return p&&Rt(d[p])?(rt.debug`No parent found for deployment element ${h.id}`,d):(d[h.id]=I_.isDeploymentNode(h)?i.apply(h):h,d)},{})),u=He(t,Kr(d=>xt(d.c4DeploymentRelations,e.toDeploymentRelation)),ze(d=>d?Rt(a[d.source.id])||Rt(a[d.target.id])?(rt.debug`Invalid deployment relation ${d.id}
|
|
1958
|
+
source: ${d.source.id} resolved: ${!!a[d.source.id]}
|
|
1959
|
+
target: ${d.target.id} resolved: ${!!a[d.target.id]}\n`,!1):!0:!1),my((d,h)=>cn(d[h.id])?(rt.debug`Duplicate deployment relation ${h.id}`,d):(d[h.id]=h,d),{}));function c(d){const h=d.uri.toString();return p=>{let{id:w,title:v,description:g,astPath:E,...D}=p;return p.__==="element"&&Rt(v)&&"viewOf"in p&&(v=s[p.viewOf]?.title??null),Rt(v)&&w==="index"&&(v="Landscape view"),{...D,customColorDefinitions:n,docUri:h,description:g,title:v,id:w}}}const l=He(t,Kr(d=>xt(d.c4Views,c(d))),pH);l.some(d=>d.
|
|
1960
|
+
id==="index")||l.unshift({__:"element",id:"index",title:"Landscape view",description:null,tags:null,links:null,customColorDefinitions:n,rules:[{include:[{wildcard:!0}]}]});const f=He(l,Qu(fi("id")),W_);return{data:{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},imports:{}},imports:e.imports}}const yH=t=>`parsed-without-\
|
|
1961
|
+
imports-${t}`,aS=t=>`parsed-model-${t}`,uS=t=>`computed-model-${t}`,cs=rt.getChild("ModelBuilder");class vH extends sw{projects;parser;listeners=[];cache;DocumentBuilder;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.mutex=e.shared.workspace.WorkspaceLock,this.onDispose(this.DocumentBuilder.onUpdate((n,r)=>{r.length>0&&this.notifyListeners(
|
|
1962
|
+
r)})),this.onDispose(this.DocumentBuilder.onBuildPhase(je.Validated,(n,r)=>{const i=n.map(fi("uri")).filter(P4(id));i.length>0&&this.notifyListeners(i)})),cs.debug`created`}unsafeSyncParseModelData(e){const n=this.cache,r=cs.getChild(["project",e]),i=yH(e);return n.has(i)&&r.debug`unsafeSyncBuildModelData from cache, project ${e}`,n.get(i,()=>{try{const s=this.documents(e);return s.length===0?(cs.debug`no documents to build model, project ${e}`,null):(r.debug`unsafeSyncBuildModelData, project ${e}`,
|
|
1963
|
+
gH(s))}catch(s){return Re(s),null}})}unsafeSyncJoinedModelData(e){const n=this.cache,r=aS(e);return n.get(r,()=>{const i=this.unsafeSyncParseModelData(e);if(!i)return null;if(i.imports.size>0){cs.debug`processing imports of ${e}`;const s=[...i.imports.associations()].reduce((o,[a,u])=>{const c=this.unsafeSyncParseModelData(a);if(c){const l=He([...u],Kr(f=>c.data.elements[f]??[]));lr(l,1)&&(o[a]=l)}return o},{});return{...i.data,imports:s}}return i.data})}async parseModel(e,n=Bt.CancellationToken.
|
|
1964
|
+
None){const r=this.projects.ensureProjectId(e),i=cs.getChild(["project",r]),s=this.cache.get(aS(r));if(s)return i.debug`parseModel from cache, project ${r}`,s;const o=performance.now();return await this.mutex.read(async()=>{await jt(n);const a=this.unsafeSyncJoinedModelData(r);return i.debug(`parseModel, project ${r} in ${Gp(performance.now()-o)}`),a})}previousViews={};unsafeSyncBuildModel(e){const n=this.cache,r=this.cache;return n.get(uS(e),()=>{const i=this.unsafeSyncJoinedModelData(e);if(!i)
|
|
1965
|
+
return bs.EMPTY;const{views:s,...o}=i,a=bs.makeCompute(i),u=[];for(const l of ah(s)){const f=a(l);if(!f.isSuccess){cs.warn(rr(f.error));continue}u.push(f.view)}fH(u);const c=Hr(u,l=>{const f=cS(e,l.id),d=this.previousViews[f],h=d&&Pv(l,d)?d:l;return r.set(f,h),[l.id,h]});return this.previousViews={...this.previousViews,...c},bs.create({...o,views:c})})}async buildLikeC4Model(e,n=Bt.CancellationToken.None){const r=this.projects.ensureProjectId(e),i=cs.getChild(["project",r]),s=this.cache.get(uS(r));
|
|
1966
|
+
if(s)return i.debug("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 ${Gp(performance.now()-o)}`),a})}async computeView(e,n,r=Bt.CancellationToken.None){const i=this.projects.ensureProjectId(n),s=cs.getChild(["project",i]),o=this.cache,a=cS(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}`,
|
|
1967
|
+
null;s.debug`computeView: ${e}`;const l=bs.makeCompute(u)(c);if(!l.isSuccess)return Re(l.error),null;let f=l.view;const d=He(u.views,ah(),ze(O_),ze(p=>p.id!==e),Qo(p=>p.viewOf));for(const p of f.nodes)if(!p.navigateTo){const w=d[p.id];w&&(p.navigateTo=w[0].id)}const h=this.previousViews[a];return h&&Pv(f,h)?f=h:this.previousViews[a]=f,f}):null}onModelParsed(e){return this.listeners.push(e),Gs.create(()=>{const n=this.listeners.indexOf(e);n>=0&&this.listeners.splice(n,1)})}documents(e){return this.
|
|
1968
|
+
parser.documents(e).toArray()}notifyListeners(e){for(const n of this.listeners)try{n(e)}catch(r){Re(r)}}}function cS(t,e){return`computed-view-${t}-${e}`}const{findNodeForKeyword:wH,findNodeForProperty:Up}=Gm,{getDocument:bH}=xo;class EH{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){
|
|
1969
|
+
return this.parser.documents(e)}getParsedElement(...e){let n,r;if(e.length===2?(n=e[0],r=e[1]):(n=e[0],r=gy(n)?this.projects.ensureProjectId():Wt(n)),gy(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(bH(n)).c4Elements.find(s=>s.id===i)??null}locateElement(e,n){let[r,i]=Iw(e);r??=this.projects.ensureProjectId(
|
|
1970
|
+
n);const s=this.fqnIndex.byFqn(r,i).head(),o=s?.nameSegment??s?.selectionSegment;return!s||!o?null:{uri:s.documentUri.toString(),range:o.range}}locateDeploymentElement(e,n){let[r,i]=Iw(e);r??=this.projects.ensureProjectId(n);const s=this.deploymentsIndex.byFqn(r,i).head(),o=s?.nameSegment??s?.selectionSegment;return!s||!o?null:{uri:s.documentUri.toString(),range:o.range}}locateRelation(e,n){const r=this.projects.ensureProjectId(n);for(const i of this.documents(r)){const s=i.c4Relations.find(u=>u.
|
|
1971
|
+
id===e)??i.c4DeploymentRelations.find(u=>u.id===e);if(!s)continue;const o=this.services.workspace.AstNodeLocator.getAstNode(i.parseResult.value,s.astPath);if(!_i(o)&&!Ci(o))continue;let a=o.title?Up(o.$cstNode,"title"):void 0;if(a??=o.kind?Up(o.$cstNode,"kind"):void 0,a??=Up(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);
|
|
1972
|
+
if(!s)continue;const o=this.services.workspace.AstNodeLocator.getAstNode(i.parseResult.value,s.astPath);if(Wy(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?Up(i.$cstNode,"name"):void 0;return s??=wH(i.$cstNode,"view"),s??=i.$cstNode,s?{uri:r.doc.uri.toString(),range:s.range}:null}}var uw,lS;function $H(){return lS||(lS=1,uw=t=>{const e=t.match(/^[ \t]*(?=\S)/gm);return e?e.reduce((n,r)=>Math.min(n,r.
|
|
1973
|
+
length),1/0):0}),uw}var DH=$H();const RH=Fr(DH);function dS(t){const e=RH(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 lt(t){return async function(e,n,r){try{const i=t(e,n,r);_4(i)&&await i;return}catch(i){const s=i instanceof Error?i.message:String(i);n("error",`Validation failed: ${s}`,{node:e}),rt.debug(`Validation failed: ${s}`,{error:i})}}}const{getDocument:kH}=xo,TH=t=>{const e=t.likec4.
|
|
1974
|
+
DeploymentsIndex,n=t.references.NameProvider;return lt((r,i)=>{const s=n.getName(r);if(!s){i("error","DeploymentNode must be named",{node:r});return}const o=It(n.getNameNode(r),"name CstNode not found").range;Do.includes(s)&&i("error",`Reserved word: ${s}`,{node:r,range:o});const a=Wt(r),u=e.getFqn(r);e.byFqn(a,u).limit(2).toArray().length>1&&i("error",`Duplicate node name "${u}"`,{node:r,range:o})})},CH=t=>{const e=t.likec4.DeploymentsIndex,n=t.references.NameProvider;return lt((r,i)=>{const s=n.
|
|
1975
|
+
getName(r);if(!s){i("error","Deployed instance must be named, unique inside node",{node:r});return}const o=It(n.getNameNode(r),"name CstNode not found").range;Do.includes(s)&&i("error",`Reserved word: ${s}`,{node:r,range:o});const a=Wt(r),u=e.getFqn(r);e.byFqn(a,u).limit(2).toArray().length>1&&i("error",`Duplicate instance name "${u}"`,{node:r,range:o})})},AH=t=>{const e=t.likec4.ModelParser;return lt((n,r)=>{if(!n.target?.value?.ref){let u=n.target?.$cstNode?.text??"";r("error",`DeploymentRelat\
|
|
1976
|
+
ion target '${u}' not resolved`,{node:n,property:"target"});return}const i=kH(n),s=e.forDocument(i);let o;try{o=s._resolveDeploymentRelationSource(n)}catch{r("error","DeploymentRelation source not resolved",{node:n,property:"source"});return}if(wn.isImportRef(o)){r("error","DeploymentRelation cannot refer imported model (not implemented yet)",{node:n,property:"source"});return}if(wn.isModelRef(o)){r("error","DeploymentRelation must refer deployment element",{node:n,property:"source"});return}const a=s.
|
|
1977
|
+
parseFqnRef(n.target);if(wn.isImportRef(a)){r("error","DeploymentRelation cannot refer imported model (not implemented yet)",{node:n,property:"target"});return}if(wn.isModelRef(a)){r("error","DeploymentRelation must refer deployment element",{node:n,property:"target"});return}Ow(o.deployment,a.deployment)&&r("error","Invalid parent-child relationship",{node:n})})},SH=t=>lt((e,n)=>{const r=e.deploymentNode.value.ref;(!r||!qn(r))&&n("error","ExtendDeployment allows only DeploymentNode",{node:e,property:"\
|
|
1978
|
+
deploymentNode"})}),_H=t=>{const e=t.likec4.FqnIndex;return lt((n,r)=>{const i=Eo(n.source),s=i&&e.getFqn(i);s||r("error","Source not found (not parsed/indexed yet)",{node:n,property:"source"});const o=Eo(n.target),a=o&&e.getFqn(o);a||r("error","Target not found (not parsed/indexed yet)",{node:n,property:"target"}),s&&a&&(Kp(s,a)||Kp(a,s))&&r("error","Invalid parent-child relationship",{node:n})})},{getDocument:PH}=xo,xH=t=>{const e=t.likec4.FqnIndex,n=t.workspace.AstNodeLocator;return lt((r,i)=>{
|
|
1979
|
+
const s=e.getFqn(r);if(!s){i("error","Not indexed element",{node:r,property:"name"});return}Do.includes(r.name)&&i("error",`Reserved word: ${r.name}`,{node:r,property:"name"});const o=PH(r),a=o.uri,u=n.getAstNodePath(r),c=e.byFqn(Wt(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?.
|
|
1980
|
+
range,uri:c.documentUri.toString()},message:"conflicting element"}]}})}})},NH=t=>lt((e,n)=>{Y6(e.modelElement)&&n("error","Only model elements allowed here",{node:e,property:"modelElement"})}),{getDocument:IH}=xo,OH=t=>{const e=t.shared.workspace.ProjectsManager;return lt((n,r)=>{const i=IH(n),s=Wt(i);if(n.project===s){r("error","Imported project cannot be the same as the current project",{node:n,property:"project"});return}if(!e.all.includes(n.project)){r("error","Imported project not found",{node:n,
|
|
1981
|
+
property:"project"});return}})},FH=t=>(t.likec4.FqnIndex,lt((e,n)=>{})),LH=t=>lt((e,n)=>{const r=parseFloat(e.value);(isNaN(r)||r<0||r>100)&&n("warning","Value ignored, must be between 0% and 100%",{node:e,property:"value"})}),MH=t=>(e,n)=>{const r=e.$container;r.props.some(i=>Zi(i)&&i!==e)&&n("error","Icon must be defined once",{node:e}),oa(r)&&Uh(r.$container)&&r.$container.props.some(i=>Zi(i))&&n("warning","Redundant as icon defined on element",{node:e})},BH=t=>(e,n)=>{Br(e,Qy)||n("error","No\
|
|
1982
|
+
tes can be defined only inside dynamic view",{node:e})},qH=t=>{const e=t.likec4.ModelParser;return lt((n,r)=>{const i=e.forDocument(at(n)),s=nS(()=>i._resolveRelationSource(n));if(!s){r("error","Source not resolved",{node:n,property:"source"});return}const o=nS(()=>i.parseFqnRef(n.target));if(!o){r("error","Target not resolved",{node:n,property:"target"});return}wn.isImportRef(s)&&(wn.isImportRef(o)?r("warning","Relationship between imported elements may not be visible in origin projects",{node:n}):
|
|
1983
|
+
r("warning","Relationship from imported element to local element may not be visible in origin project",{node:n,property:"source"})),Ow(wn.toModelFqn(s),wn.toModelFqn(o))&&r("error","Invalid parent-child relationship",{node:n})})},jH=t=>lt((e,n)=>{e.$container.tags?.values&&e.tags?.values&&n("error","Relation cannot have tags in both header and body",{node:e.tags})}),GH=t=>lt((e,n)=>{e.$containerIndex&&e.$containerIndex>0&&n("warning","Prefer one specification per document",{node:e,property:"name"})}),
|
|
1984
|
+
UH=t=>lt((e,n)=>{e.$containerIndex&&e.$containerIndex>0&&n("warning","Prefer one model per document",{node:e,property:"name"})}),WH=t=>lt((e,n)=>{e.$containerIndex&&e.$containerIndex>0&&n("warning","Prefer one global block per document",{node:e,property:"name"})}),zH=t=>{const e=t.shared.workspace.IndexManager;return lt((n,r)=>{Do.includes(n.name)&&r("error",`Reserved word: ${n.name}`,{node:n,property:"name"});const i=Wt(n),s=e.projectElements(i,Ai).filter(o=>o.name===n.name&&o.node!==n).head();
|
|
1985
|
+
if(s){const o=s.documentUri!==at(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"}]}})}})},HH=t=>{const e=t.shared.workspace.IndexManager;return lt((n,r)=>{Do.includes(n.name)&&r("error",`Reserved word: ${n.name}`,{node:n,property:"name"});const i=Wt(n),s=e.projectElements(i,Ti).filter(o=>o.name===n.name&&o.node!==n).head();if(s){const o=s.documentUri!==
|
|
1986
|
+
at(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"}]}})}})},KH=t=>{const e=t.shared.workspace.IndexManager;return lt((n,r)=>{const i="#"+n.name,s=Wt(n),o=e.projectElements(s,ns).filter(a=>a.name===i&&a.node!==n).head();if(o){const a=o.documentUri!==at(n).uri;r("error",`Duplicate tag '${n.name}'`,{node:n,property:"name",...a&&{relatedInformation:[
|
|
1987
|
+
{location:{range:o.nameSegment.range,uri:o.documentUri.toString()},message:"conflicting definition"}]}})}})},VH=t=>{const e=t.shared.workspace.IndexManager;return lt((n,r)=>{Do.includes(n.name)&&r("error",`Reserved word: ${n.name}`,{node:n,property:"name"});const i=Wt(n);e.projectElements(i,ts).filter(s=>s.name===n.name).limit(2).count()>1&&r("error",`Duplicate RelationshipKind '${n.name}'`,{node:n,property:"name"})})},fS=t=>{const e=t.shared.workspace.IndexManager;return lt((n,r)=>{const i=Wt(n),
|
|
1988
|
+
s=e.projectElements(i,la),o=e.projectElements(i,ca);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"})})},XH=t=>{const e=t.shared.workspace.IndexManager;return lt((n,r)=>{const i=Wt(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"})})},YH=t=>{const e=t.shared.workspace.IndexManager;
|
|
1989
|
+
return lt((n,r)=>{if(!n.name)return;Do.includes(n.name)&&r("error",`Reserved word: ${n.name}`,{node:n,property:"name"});const i=Wt(n);e.projectElements(i,oo).filter(s=>s.name===n.name).limit(2).count()>1&&r("error",`Duplicate view '${n.name}'`,{node:n,property:"name"})})},JH=t=>{const e=t.likec4.ModelParser;return lt((n,r)=>{const i=jp(n);if(i?.$type!=="DynamicViewIncludePredicate"&&i?.isInclude!==!0){r("error",'Invalid usage inside "exclude"',{node:n});return}const s=i.$type==="DynamicViewInclu\
|
|
1990
|
+
dePredicate",o=e.forDocument(at(i));let a=rn.unwrap(o.parseFqnExprWith(n).custom.expr);switch(!0){case(rn.isWildcard(a)&&s):case(rn.isElementKindExpr(a)&&s):case(rn.isElementTagExpr(a)&&s):{r("warning","Predicate is ignored, as not supported in dynamic views",{node:n});return}case rn.isWildcard(a):case rn.isModelRef(a):case rn.isDeploymentRef(a):return;case rn.isElementKindExpr(a):case rn.isElementTagExpr(a):r("error","Invalid target (expect reference to specific element)",{node:n,property:"subj\
|
|
1991
|
+
ect"});return;default:qe(a)}})},QH=t=>{const e=t.likec4.ModelParser;return lt((n,r)=>{const i=e.forDocument(at(n)).parseFqnRefExpr(n),s=jp(n),o=F6(n)&&!Br(n,a=>Yc(a)||ka(a));if(s?.$type==="DeploymentViewRulePredicate"||o){if(!Br(n,Dh)){if(rn.isModelRef(i)){r("error","Deployment view predicate must reference deployment model",{node:n});return}if(rn.isDeploymentRef(i)&&wn.isInsideInstanceRef(i.ref)){r("error","Must reference deployment nodes or instances, but not internals",{node:n});return}}ce(n.
|
|
1992
|
+
selector)&&!qn(n.ref.value?.ref)&&r("warning",`Selector '${n.selector}' applies to deployment nodes only, ignored here`,{node:n,property:"selector"});return}if(s?.$type==="DynamicViewIncludePredicate")switch(!0){case rn.isElementKindExpr(i):case rn.isElementTagExpr(i):case rn.isWildcard(i):{r("warning","Predicate is ignored, as not supported in dynamic views",{node:n});return}}})},ZH=t=>lt((e,n)=>{if(e.to.$type==="WildcardExpression"&&!sC(e.$container)){const r=Wn(e,zh);Rt(r?.viewOf)&&n("warning",
|
|
1993
|
+
"Predicate is ignored as it concerns all relationships",{node:e})}}),e5=t=>lt((e,n)=>{if(jp(e)?.$type==="ViewRulePredicate"&&e.$container.$type!=="DirectedRelationExpr"&&e.from.$type==="WildcardExpression"){const r=Wn(e,zh);r&&Rt(r.viewOf)&&n("warning","Predicate is ignored as it concerns all relationships",{node:e})}}),t5=t=>{const e=t.likec4.ModelParser;return lt((n,r)=>{const i=Wn(n,ia);if(!i||i.isInclude!==!0)return;const s=at(n),o=e.forDocument(s);let a=Sd.unwrap(o.parseRelationExpr(n));const u="\
|
|
1994
|
+
Model reference is allowed in exclude predicate only";if(Sd.isDirect(a)){(rn.isModelRef(a.source)||rn.isModelRef(a.target))&&r("error",u,{node:n});return}let c;if(Sd.isIncoming(a)?c=a.incoming:Sd.isOutgoing(a)?c=a.outgoing:c=a.inout,rn.isModelRef(c)){r("error",u,{node:n});return}})},n5=t=>lt((e,n)=>{const r=jp(e);if(!(!r||r.$type=="DynamicViewIncludePredicate")&&!r.isInclude){n("error",'Invalid usage inside "exclude"',{node:e});return}});function r5(t){return e=>t.some(n=>n(e))}const i5=r5([sv,Vr,
|
|
1995
|
+
iv,ll,cl,fa,fo,Jh,cv,MT,Dh,Yy,Qy,r8,ia,s8,Dh,Zh,c8,Ky,hv,l8,qy,Wy,Vy,Qn,qn,Ci,jT,Qi,_i,i8,GT,ap,pn,Zy,ua,co,ba,$a,va,mp,pp,fC]),s5=t=>{let e=t;for(;e&&!oC(e);){if(i5(e))return e;e=e.$container}};function o5(t){const e=t.state>=je.Validated?t.diagnostics?.filter(r=>r.severity===Os.Error)??[]:[],n=new WeakSet;for(const{node:r}of e){if(Rt(r)||n.has(r))continue;n.add(r);const i=s5(r);i&&n.add(i)}return{isValid:r=>!n.has(r),invalidNodes:n}}function a5(t){rt.debug("registerValidationChecks"),t.validation.
|
|
1996
|
+
ValidationRegistry.register({DeployedInstance:CH(t),DeploymentNodeKind:HH(t),DeploymentNode:TH(t),DeploymentRelation:AH(t),ExtendDeployment:SH(),FqnRefExpr:QH(t),RelationExpr:t5(t),NotesProperty:BH(),OpacityProperty:LH(),IconProperty:MH(),SpecificationRule:GH(),Model:UH(),Globals:WH(),GlobalPredicateGroup:fS(t),GlobalDynamicPredicateGroup:fS(t),GlobalStyleId:XH(t),DynamicViewStep:_H(t),LikeC4View:YH(t),Element:xH(t),ElementRef:NH(),ElementKind:zH(t),Relation:qH(t),RelationBody:jH(),Tag:KH(t),FqnExprWith:JH(
|
|
1997
|
+
t),RelationExprWith:n5(),RelationshipKind:VH(t),IncomingRelationExpr:ZH(),OutgoingRelationExpr:e5(),ImportsFromPoject:OH(t),Imported:FH(t)});const e=t.shared.lsp.Connection;e&&t.shared.workspace.DocumentBuilder.onUpdate((n,r)=>{for(const i of r)rt.debug(`clear diagnostics for deleted ${i.path}`),e.sendDiagnostics({uri:i.toString(),diagnostics:[]})})}function Yr(t){return Tn(t)?mt(t).split(`
|
|
1998
|
+
`).join(" "):void 0}function mt(t){return Tn(t)?dS(t).trim():void 0}class u5{constructor(e,n){this.services=e,this.doc=n,this.isValid=o5(n).isValid}isValid;get project(){return this.services.shared.workspace.ProjectsManager.getProject(this.doc)}resolveFqn(e){if(Vr(e)){const n=Wt(e),r=this.resolveFqn(It(e.imported.ref,`FqnRef is empty of imported: ${e.$cstNode?.text}`));return this.doc.c4Imports.set(n,r),F_(n,r)}return ua(e)?$o(e.element):co(e)?$o(e.deploymentNode):gh(e)?this.services.likec4.DeploymentsIndex.
|
|
1999
|
+
getFqn(e):this.services.likec4.FqnIndex.getFqn(e)}getAstNodePath(e){return this.services.workspace.AstNodeLocator.getAstNodePath(e)}getMetadata(e){if(!e||!this.isValid(e)||Gt(e.props))return;const n=He(e.props,xt(r=>[r.key,mt(r.value)]),ze(([r,i])=>ce(i)),W4());return Gt(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}
|
|
2000
|
+
return r=Yo(r.reverse()),Un(r)?r:null}convertLinks(e){return this.parseLinks(e)}parseLinks(e){if(!(!e?.props||e.props.length===0))return He(e.props,ze(sp),Kr(n=>{if(!this.isValid(n))return[];const r=n.value;if(ce(r)){const i=ce(n.title)?Yr(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[]}))}parseIconProperty(e){if(!e||!this.isValid(e))return;const{libicon:n,value:r}=e;switch(!0){case!!n:return n.ref?.
|
|
2001
|
+
name;case(r&&rs(r)):return r;case(r&&bv(r)):return bp(this.doc.uri.toString(),"../",r);case(r&&od(r)):return _C(this.project.folder.toString(),r);default:return}}parseElementStyle(e){if(!e)return{};if(DR(e)){const n=this.parseStyleProps(e?.find(oa)?.props),r=this.parseIconProperty(e?.find(Zi));return r&&(n.icon=r),n}return this.parseStyleProps(e.props)}parseStyleProps(e){const n={};if(!e||e.length===0)return n;for(const r of e)if(this.isValid(r))switch(!0){case Ph(r):{ce(r.value)&&(n.border=r.value);
|
|
2002
|
+
break}case ao(r):{const i=wd(r);ce(i)&&(n.color=i);break}case fp(r):{ce(r.value)&&(n.shape=r.value);break}case Zi(r):{const i=this.parseIconProperty(r);ce(i)&&(n.icon=i);break}case up(r):{n.opacity=eS(r);break}case ov(r):{n.multiple=yy(r.value)?r.value:!1;break}case lv(r):{ce(r.value)&&(n.size=xa(r));break}case av(r):{ce(r.value)&&(n.padding=xa(r));break}case pv(r):{ce(r.value)&&(n.textSize=xa(r));break}default:qe(r)}return n}}function*c5(t){const e=Fw.from(t.parseResult.value.deployments.flatMap(
|
|
2003
|
+
i=>i.elements)),n=[];let r;for(;r=e.shift();){if(Ci(r)){n.push(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 l5(t){return class extends t{parseDeployment(){const e=this.doc;for(const n of c5(e))try{switch(!0){case Ci(n):{this.isValid(n)&&e.c4DeploymentRelations.push(this.parseDeploymentRelation(n));break}case Qn(n):e.c4Deployments.push(this.parseDeployedInstance(n));break;case qn(n):{e.c4Deployments.push(this.parseDeploymentNode(
|
|
2004
|
+
n));break}case co(n):{const r=this.parseExtendDeployment(n);r&&e.c4ExtendDeployments.push(r);break}default:qe(n)}}catch(r){Re(r)}}parseDeploymentNode(e){const n=this.isValid,r=this.resolveFqn(e),i=It(e.kind.ref,"DeploymentKind not resolved").name,s=this.convertTags(e.body),o=this.parseElementStyle(e.body?.props),a=this.getMetadata(e.body?.props.find(Qi)),u=He(e.body?.props??[],ze(n),ze(nl),Hr(h=>[h.key,h.value||void 0])),c=mt(e.title??u.title),l=mt(u.description),f=Yr(u.technology),d=this.convertLinks(
|
|
2005
|
+
e.body);return{id:r,kind:i,title:c??Hp(r),...a&&{metadata:a},...s&&{tags:s},...d&&Un(d)&&{links:d},...ce(f)&&{technology:f},...ce(l)&&{description:l},style:o}}parseDeployedInstance(e){const n=this.isValid,r=this.resolveFqn(e),i=this.parseFqnRef(e.target.modelElement);_e(wn.isModelRef(i)||wn.isImportRef(i),"Target must be a model reference");const s=this.convertTags(e.body),o=this.parseElementStyle(e.body?.props),a=this.getMetadata(e.body?.props.find(Qi)),u=He(e.body?.props??[],ze(n),ze(nl),Hr(h=>[
|
|
2006
|
+
h.key,h.value||void 0])),c=mt(e.title??u.title),l=mt(u.description),f=Yr(u.technology),d=this.convertLinks(e.body);return{id:r,element:i,...a&&{metadata:a},...c&&{title:c},...s&&{tags:s},...d&&Un(d)&&{links:d},...ce(f)&&{technology:f},...ce(l)&&{description:l},style:o}}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(Qi)),s=this.getAstNodePath(e),o=this.parseLinks(e.body)??[];return!r&&Gt(i??{})&&Gt(
|
|
2007
|
+
o)?null:{id:n,astPath:s,...i&&{metadata:i},...r&&{tags:r},...o&&Un(o)&&{links:o}}}_resolveDeploymentRelationSource(e){if(cn(e.source))return this.parseFqnRef(e.source);if(e.$container.$type==="DeploymentNodeBody"||e.$container.$type==="DeployedInstanceBody")return{deployment:this.resolveFqn(e.$container.$container)};throw new Error("RelationRefError: Invalid container for sourceless relation")}parseDeploymentRelation(e){const n=this.isValid,r=this.getAstNodePath(e),i=wn.toDeploymentRef(this._resolveDeploymentRelationSource(
|
|
2008
|
+
e)),s=wn.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(Qi)),l=Hr(e.body?.props.filter(xl)??[],v=>[v.key,v.value]),f=He(e.body?.props??[],ze(_l),xt(v=>v.value.view.ref?.name),ze(ce),Zo()),d=mt(e.title??l.title),h=mt(l.description),p=Yr(e.technology)??mt(l.technology),w=e.body?.props.find(dp);return{id:bd("deployment",r,i.id,s.id),source:i,target:s,...d&&{title:d},...c&&
|
|
2009
|
+
{metadata:c},...ce(p)&&{technology:p},...ce(h)&&{description:h},...u&&{kind:u},...o&&{tags:o},...Un(a)&&{links:a},...ew(w?.props,n),...f&&{navigateTo:f},astPath:r}}}}function d5(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)===0?n+=3:n+=4}}return n}function f5(t,e,n){const r=t.length;
|
|
2010
|
+
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 h5=new TextEncoder,p5=50;function m5(t,e,n){h5.encodeInto(t,e.subarray(n))}function g5(t,e,n){t.length>p5?m5(
|
|
2011
|
+
t,e,n):f5(t,e,n)}const y5=4096;function hS(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(a);s.length>=y5&&(o+=String.fromCharCode(...s),s.
|
|
2012
|
+
length=0)}return s.length>0&&(o+=String.fromCharCode(...s)),o}const v5=new TextDecoder,w5=200;function b5(t,e,n){const r=t.subarray(e,e+n);return v5.decode(r)}function E5(t,e,n){return n>w5?b5(t,e,n):hS(t,e,n)}class Wp{constructor(e,n){this.type=e,this.data=n}}class tr extends Error{constructor(e){super(e);const n=Object.create(tr.prototype);Object.setPrototypeOf(this,n),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:tr.name})}}const Ed=4294967295;function $5(t,e,n){const r=n/
|
|
2013
|
+
4294967296,i=n;t.setUint32(e,r),t.setUint32(e+4,i)}function pS(t,e,n){const r=Math.floor(n/4294967296),i=n;t.setUint32(e,r),t.setUint32(e+4,i)}function mS(t,e){const n=t.getInt32(e),r=t.getUint32(e+4);return n*4294967296+r}function D5(t,e){const n=t.getUint32(e),r=t.getUint32(e+4);return n*4294967296+r}const R5=-1,k5=4294967296-1,T5=17179869184-1;function C5({sec:t,nsec:e}){if(t>=0&&e>=0&&t<=T5)if(e===0&&t<=k5){const n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,t),n}else{const n=t/
|
|
2014
|
+
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),pS(r,4,t),n}}function A5(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 S5(t){if(t instanceof Date){const e=A5(t);return C5(e)}else return null}function _5(t){const e=new DataView(t.buffer,t.byteOffset,t.byteLength);switch(t.byteLength){case 4:
|
|
2015
|
+
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=mS(e,4),r=e.getUint32(0);return{sec:n,nsec:r}}default:throw new tr(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${t.length}`)}}function P5(t){const e=_5(t);return new Date(e.sec*1e3+e.nsec/1e6)}const x5={type:R5,encode:S5,decode:P5};class zp{constructor(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=
|
|
2016
|
+
[],this.register(x5)}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 Wp(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){const o=r;return new Wp(o,s)}}}return e instanceof Wp?
|
|
2017
|
+
e:null}decode(e,n,r){const i=n<0?this.builtInDecoders[-1-n]:this.decoders[n];return i?i(e,n,r):new Wp(n,e)}}zp.defaultCodec=new zp;function N5(t){return t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer}function cw(t){return t instanceof Uint8Array?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):N5(t)?new Uint8Array(t):Uint8Array.from(t)}const I5=100,O5=2048;class Tw{constructor(e){this.entered=!1,this.extensionCodec=e?.extensionCodec??
|
|
2018
|
+
zp.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.maxDepth=e?.maxDepth??I5,this.initialBufferSize=e?.initialBufferSize??O5,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(){return new Tw({extensionCodec:this.extensionCodec,context:this.
|
|
2019
|
+
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,this.pos)}finally{this.entered=!1}}encode(e){if(this.entered)return this.
|
|
2020
|
+
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.useBigInt64&&typeof e=="bigint"?this.encodeBigInt64(e):this.encodeObject(
|
|
2021
|
+
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),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?
|
|
2022
|
+
(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){this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.
|
|
2023
|
+
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=d5(e);this.ensureBufferSizeToWrite(5+r),this.writeStringHeader(r),g5(e,this.bytes,
|
|
2024
|
+
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),this.writeU8(n);else if(n<65536)this.writeU8(197),this.writeU16(n);else if(n<
|
|
2025
|
+
4294967296)this.writeU8(198),this.writeU32(n);else throw new Error(`Too large binary: ${n}`);const r=cw(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)e[i]!==void 0&&r++;return r}encodeMap(e,n){const r=Object.keys(e);this.
|
|
2026
|
+
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=="function"){const r=e.data(this.pos+6),i=r.length;if(i>=4294967296)throw new Error(
|
|
2027
|
+
`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(201),this.writeU32(n);else throw new Error(`Too large extension object: ${n}`);
|
|
2028
|
+
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(2),this.view.setInt16(this.pos,e),this.pos+=2}writeU32(e){this.
|
|
2029
|
+
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),$5(this.view,this.pos,e),this.pos+=8}writeI64(e){this.ensureBufferSizeToWrite(8),pS(this.view,this.pos,e),this.pos+=8}writeBigUint64(e){
|
|
2030
|
+
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 F5(t,e){return new Tw(e).encodeSharedRef(t)}function lw(t){return`${t<0?"-":""}0x${Math.abs(t).toString(16).padStart(2,"0")}`}const L5=16,M5=16;class B5{constructor(e=L5,n=M5){this.hit=0,this.miss=0,this.maxKeyLength=e,this.maxLengthPerKey=n,this.caches=[];for(let r=0;r<this.maxKeyLength;r++)this.caches.push([])}canBeCached(e){
|
|
2031
|
+
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=hS(e,n,r),o=Uint8Array.prototype.slice.call(e,n,n+r);return this.store(o,s),s}}const dw="array",$d="\
|
|
2032
|
+
map_key",gS="map_value",q5=t=>{if(typeof t=="string"||typeof t=="number")return t;throw new tr("The type of key must be string or number but "+typeof t)};class j5{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=dw,n.position=0,n.size=e,n.array=new Array(e)}pushMapState(e){const n=this.getUninitializedStateFromPool();n.type=$d,n.readCount=
|
|
2033
|
+
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===dw){const r=e;r.size=0,r.array=void 0,r.position=0,r.type=void 0}if(e.type===$d||e.
|
|
2034
|
+
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 Dd=-1,fw=new DataView(new ArrayBuffer(0)),G5=new Uint8Array(fw.buffer);try{fw.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 yS=new RangeError("Insufficient data"),U5=new B5;class Cw{constructor(e){
|
|
2035
|
+
this.totalPos=0,this.pos=0,this.view=fw,this.bytes=G5,this.headByte=Dd,this.stack=new j5,this.entered=!1,this.extensionCodec=e?.extensionCodec??zp.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.rawStrings=e?.rawStrings??!1,this.maxStrLength=e?.maxStrLength??Ed,this.maxBinLength=e?.maxBinLength??Ed,this.maxArrayLength=e?.maxArrayLength??Ed,this.maxMapLength=e?.maxMapLength??Ed,this.maxExtLength=e?.maxExtLength??Ed,this.keyDecoder=e?.keyDecoder!==void 0?e.keyDecoder:
|
|
2036
|
+
U5,this.mapKeyConverter=e?.mapKeyConverter??q5}clone(){return new Cw({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=Dd,this.stack.reset()}setBuffer(e){const n=cw(e);this.bytes=n,this.view=new DataView(
|
|
2037
|
+
n.buffer,n.byteOffset,n.byteLength),this.pos=0}appendBuffer(e){if(this.headByte===Dd&&!this.hasRemaining(1))this.setBuffer(e);else{const n=this.bytes.subarray(this.pos),r=cw(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 buffer[${e}]`)}decode(e){if(this.entered)return this.
|
|
2038
|
+
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.entered)return this.clone().decodeAsync(e);try{this.
|
|
2039
|
+
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 ${lw(i)} at ${o} (${s} in the current buffer)`)}finally{this.entered=!1}}decodeArrayStream(e){
|
|
2040
|
+
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))throw o}this.totalPos+=this.pos}}finally{this.entered=
|
|
2041
|
+
!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===203)n=this.readF64();else if(e===204)n=this.
|
|
2042
|
+
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===219){const i=this.lookU32();n=this.decodeString(
|
|
2043
|
+
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===196){const i=this.lookU8();n=this.decodeBinary(
|
|
2044
|
+
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.lookU16();n=this.decodeExtension(i,2)}else if(e===
|
|
2045
|
+
201){const i=this.lookU32();n=this.decodeExtension(i,4)}else throw new tr(`Unrecognized type byte: ${lw(e)}`);this.complete();const r=this.stack;for(;r.length>0;){const i=r.top();if(i.type===dw)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===$d){if(n==="__proto__")throw new tr("The key __proto__ is not allowed");i.key=this.mapKeyConverter(n),i.type=gS;continue e}else if(i.map[i.key]=n,i.readCount++,i.readCount===i.size)n=i.map,r.release(
|
|
2046
|
+
i);else{i.key=null,i.type=$d;continue e}}return n}}readHeadByte(){return this.headByte===Dd&&(this.headByte=this.readU8()),this.headByte}complete(){this.headByte=Dd}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 tr(`Unrecognized array type byte: ${lw(e)}`)}}}pushMapState(e){if(e>this.maxMapLength)throw new tr(`Max length exceeded: map length (${e}) > maxMapLengthLength (${this.maxMapLength}\
|
|
2047
|
+
)`);this.stack.pushMapState(e)}pushArrayState(e){if(e>this.maxArrayLength)throw new tr(`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 tr(`Max length exceeded: UTF-8 byte length (${e}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+n+e)throw yS;
|
|
2048
|
+
const r=this.pos+n;let i;return this.stateIsMapKey()&&this.keyDecoder?.canBeCached(e)?i=this.keyDecoder.decode(this.bytes,r,e):i=E5(this.bytes,r,e),this.pos+=n+e,i}stateIsMapKey(){return this.stack.length>0?this.stack.top().type===$d:!1}decodeBinary(e,n){if(e>this.maxBinLength)throw new tr(`Max length exceeded: bin length (${e}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(e+n))throw yS;const r=this.pos+n,i=this.bytes.subarray(r,r+e);return this.pos+=n+e,i}decodeExtension(e,n){if(e>
|
|
2049
|
+
this.maxExtLength)throw new tr(`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(){const e=this.view.getInt8(this.pos);return this.pos++,e}readU16(){
|
|
2050
|
+
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=D5(this.view,this.pos);return this.pos+=8,e}readI64(){const e=mS(this.view,this.pos);return this.pos+=8,e}readU64AsBigInt(){const e=this.view.getBigUint64(this.pos);return this.pos+=8,e}readI64AsBigInt(){const e=this.view.
|
|
2051
|
+
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 W5(t,e){return new Cw(e).decode(t)}const z5=t=>typeof ArrayBuffer=="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]",H5=(t,e=0,n=t.byteLength-e)=>{if(!z5(t))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof t} (${t})`);return Vp.
|
|
2052
|
+
from(t,e,n)},vS=(t,e)=>{if(typeof t!="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof t} (${t})`);return e?Vp.from(t,e):Vp.from(t)},K5=/^[A-Za-z0-9+/]*={0,2}$/,V5=t=>{if(t.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!K5.exec(t))throw new TypeError("Invalid base64 string.");const e=vS(t,"base64");return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)},X5=t=>{const e=vS(t,"utf8");return new Uint8Array(e.buffer,e.byteOffset,
|
|
2053
|
+
e.byteLength/Uint8Array.BYTES_PER_ELEMENT)},Y5=t=>{let e;if(typeof t=="string"?e=X5(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 H5(e.buffer,e.byteOffset,e.byteLength).toString("base64")},{getDocument:J5}=xo;function Q5({nodes:t,edges:e,...n}){return{...n,nodes:Jo(t,({x:r,y:i,width:s,height:o,isCompound:a,...u})=>({...u,b:[r,i,s,o],c:a})),edges:Jo(
|
|
2054
|
+
e,({points:r,controlPoints:i,labelBBox:s,dotpos:o,...a})=>({...!!i&&{cp:i},...!!s&&{l:s},...!!o&&{dp:o},...a,p:r}))}}function Z5({nodes:t,edges:e,autoLayout:n,...r}){return{...r,autoLayout:L_(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 wS=500;function eK(t){const e=F5(Q5(t)),n=Y5(e),r=[];let i=0;for(;i<
|
|
2055
|
+
n.length;)r.push(" * "+n.slice(i,Math.min(i+wS,n.length))),i+=wS;return r.unshift("/**"," * @likec4-generated(v1)"),r.push(" */"),r.join(`
|
|
2056
|
+
`)}function bS(t){return t.includes("@likec4-generated")}function tK(t){if(!bS(t))throw new Error(`Not a likec4-generated comment: ${t}`);const e=t.trim().split(`
|
|
2057
|
+
`).filter(r=>!r.includes("**")&&!r.includes("@likec4-")&&!r.includes("*/")).map(r=>r.replaceAll("*","").trim()).join(""),n=V5(e);return Z5(W5(n))}function hw(t){const e=mm(t.$cstNode,["BLOCK_COMMENT"]);if(!(!e||!bS(e.text)))try{return tK(e.text)}catch(n){const r=J5(t);Re(n),rt.warn(`Ignoring manual layout of "${t.name??"unnamed"}" at ${r.uri.fsPath}:${1+(e.range.start.line||0)}`);return}}function nK(t){return class extends t{parseDeploymentView(e){const n=e.body;_e(n,"DynamicElementView body is \
|
|
2058
|
+
not defined");const r=n.props.filter(this.isValid),i=this.getAstNodePath(e);let s=e.name;s||(s="deployment_"+bd(this.doc.uri.toString(),i));const o=Yr(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);Bp.writeId(e,s);const l=hw(e);return{__:"deployment",id:s,astPath:i,title:o,description:a,tags:u,links:Un(c)?c:null,rules:n.rules.flatMap(f=>{try{return this.isValid(f)?this.parseDeploymentViewRule(f):[]}catch(d){
|
|
2059
|
+
return Re(d),[]}}),...l&&{manualLayout:l}}}parseDeploymentViewRule(e){if(ia(e))return this.parseDeploymentViewRulePredicate(e);if(ql(e))return tw(e);if(Yc(e))return this.parseDeploymentViewRuleStyle(e);qe(e)}parseDeploymentViewRulePredicate(e){const n=[];let r=e.expr;for(;r;){try{const i=r.value;Tn(i)&&this.isValid(i)&&n.unshift(this.parseExpressionV2(i))}catch(i){Re(i)}r=r.prev}return e.isInclude?{include:n}:{exclude:n}}parseDeploymentViewRuleStyle(e){const n=this.parseStyleProps(e.props.filter(
|
|
2060
|
+
Ky)),r=mt(e.props.find(ga)?.value);return{targets:this.parseFqnExpressions(e.targets),style:n,...r&&{notation:r}}}}}const ES=({operator:t,not:e},n)=>t.startsWith("!=")?{neq:n}:t.startsWith("=")?{eq:n}:e?{neq:n}:{eq:n};function $S(t){return!vC(t)&&!wC(t)?null:t.participant}function Rd(t){switch(!0){case p8(t):{const e=t.value?.ref?.name,n=$S(t);_e(e,"Expected tag name");const r={tag:ES(t,e)};return n?{participant:n,operator:r}:r}case f8(t):{const e=t.value?.ref?.name,n=$S(t);_e(e,"Expected kind n\
|
|
2061
|
+
ame");const r={kind:ES(t,e)};return n?{participant:n,operator:r}:r}case(mC(t)||yC(t)):return{not:Rd(t.value)};case S8(t):{const e=Rd(t.left),n=Rd(t.right),r=t.operator.toLowerCase();switch(r){case"and":{const i=[Mw(e)?e.and:e,Mw(n)?n.and:n].flat();return _e(Un(i),"Expected non-empty array"),{and:i}}case"or":{const i=[Lw(e)?e.or:e,Lw(n)?n.or:n].flat();return _e(Un(i),"Expected non-empty array"),{or:i}}default:qe(r)}}default:qe(t)}}function rK(t){return class extends t{parseFqnRef(e){const n=It(e.
|
|
2062
|
+
value?.ref,`FqnRef is empty ${e.$cstNode?.range.start.line}:${e.$cstNode?.range.start.character}`);if(Vr(n)){const r={project:Wt(n),model:this.resolveFqn(It(n.imported.ref,`FqnRef is empty of imported: ${n.$cstNode?.text}`))};return this.doc.c4Imports.set(r.project,r.model),r}if(pn(n)){const r=X6(e);if(r){const a={project:Wt(r),model:this.resolveFqn(n)};return this.doc.c4Imports.set(a.project,a.model),a}const i=V6(e);if(!i)return{model:this.resolveFqn(n)};const s=this.resolveFqn(i),o=this.resolveFqn(
|
|
2063
|
+
n);return{deployment:s,element:o}}if(gh(n))return{deployment:this.resolveFqn(n)};qe(n)}parseExpressionV2(e){if(qT(e))return this.parseFqnExprOrWith(e);if(a8(e))return this.parseRelationExprOrWith(e);qe(e)}parseFqnExprOrWith(e){if(Jh(e))return this.parseFqnExprWith(e);if(BT(e))return this.parseFqnExprOrWhere(e);qe(e)}parseFqnExprWith(e){const n=this.parseFqnExprOrWhere(e.subject);return(e.custom?.props??[]).reduce((r,i)=>{if(!this.isValid(i))return r;if(ap(i)){const s=i.value.view.$refText;return ce(
|
|
2064
|
+
s)&&(r.custom.navigateTo=s),r}if(nl(i))return cn(i.value)&&(r.custom[i.key]=mt(i.value)||""),r;if(Zi(i)){const s=this.parseIconProperty(i);return cn(s)&&(r.custom[i.key]=s),r}if(ao(i)){const s=wd(i);return cn(s)&&(r.custom[i.key]=s),r}if(fp(i)||Ph(i))return cn(i.value)&&(r.custom[i.key]=i.value),r;if(up(i))return cn(i.value)&&(r.custom[i.key]=eS(i)),r;if(ga(i))return ce(i.value)&&(r.custom[i.key]=mt(i.value)),r;if(ov(i))return yy(i.value)&&(r.custom[i.key]=i.value),r;if(lv(i)||pv(i)||av(i))return ce(
|
|
2065
|
+
i.value)&&(r.custom[i.key]=xa(i)),r;qe(i)},{custom:{expr:n}})}parseFqnExprOrWhere(e){if(rv(e))return this.parseFqnExprWhere(e);if(MT(e))return this.parseFqnExpr(e);qe(e)}parseFqnExprWhere(e){return _e(!rv(e.subject),"FqnExprWhere is not allowed as subject of FqnExprWhere"),{where:{expr:this.parseFqnExpr(e.subject),condition:e.where?Rd(e.where):{kind:{neq:"--always-true--"}}}}}parseFqnExpr(e){if(bC(e))return{wildcard:!0};if(eC(e))return _e(e.kind?.ref,"ElementKindExpr kind is not resolved: "+e.$cstNode?.
|
|
2066
|
+
text),{elementKind:e.kind.ref.name,isEqual:e.isEqual};if(tC(e)){_e(e.tag?.ref,"ElementTagExpr tag is not resolved: "+e.$cstNode?.text);let n=e.tag.$refText;return n.startsWith("#")&&(n=n.slice(1)),{elementTag:n,isEqual:e.isEqual}}if(Zh(e))return this.parseFqnRefExpr(e);qe(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:"\
|
|
2067
|
+
children"};default:return{ref:n}}}parseFqnExpressions(e){const n=[];let r=e;for(;r;){try{Tn(r.value)&&this.isValid(r.value)&&n.push(this.parseFqnExpr(r.value))}catch(i){Re(i)}r=r.prev}return n.reverse()}parseRelationExprOrWith(e){if(cv(e))return this.parseRelationExprWith(e);if(o8(e))return this.parseRelationExprOrWhere(e);qe(e)}parseRelationExprWith(e){const n=this.parseRelationExprOrWhere(e.subject);return(e.custom?.props??[]).reduce((r,i)=>{if(xl(i)||ga(i)||cC(i))return cn(i.value)&&(r.customRelation[i.
|
|
2068
|
+
key]=mt(i.value)??""),r;if(Wc(i))return ce(i.value)&&(r.customRelation[i.key]=i.value),r;if(ao(i)){const s=wd(i);return ce(s)&&(r.customRelation[i.key]=s),r}if(gl(i))return ce(i.value)&&(r.customRelation[i.key]=i.value),r;if(_l(i)){const s=i.value.view.ref?.name;return ce(s)&&(r.customRelation.navigateTo=s),r}qe(i)},{customRelation:{expr:n}})}parseRelationExprOrWhere(e){if(uv(e))return this.parseRelationExprWhere(e);if(Dh(e))return this.parseRelationExpr(e);qe(e)}parseRelationExprWhere(e){return _e(
|
|
2069
|
+
!uv(e.subject),"RelationExprWhere is not allowed as subject of RelationExprWhere"),{where:{expr:this.parseRelationExpr(e.subject),condition:e.where?Rd(e.where):{kind:{neq:"--always-true--"}}}}}parseRelationExpr(e){switch(e.$type){case"DirectedRelationExpr":return{source:this.parseFqnExpr(e.source.from),target:this.parseFqnExpr(e.target),isBidirectional:e.source.isBidirectional};case"InOutRelationExpr":return{inout:this.parseFqnExpr(e.inout.to)};case"OutgoingRelationExpr":return{outgoing:this.parseFqnExpr(
|
|
2070
|
+
e.from)};case"IncomingRelationExpr":return{incoming:this.parseFqnExpr(e.to)};default:qe(e)}}}}function iK(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){rt.warn(`Global predicate named "${u}" is already defined`);continue}this.parseAndStoreGlobalPredicateGroupOrDynamic(a,u,n)}catch(u){Re(u)}const o=i.flatMap(
|
|
2071
|
+
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){rt.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(ll(e)){const i=this.parseGlobalPredicateGroup(e);i.length>0&&(r.predicates[n]=i);return}if(cl(e)){const i=this.parseGlobalDynamicPredicateGroup(e);i.length>0&&(r.dynamicPredicates[n]=i);return}qe(e)}parseGlobalPredicateGroup(e){
|
|
2072
|
+
return e.predicates.map(n=>this.parseViewRulePredicate(n))}parseGlobalDynamicPredicateGroup(e){return e.predicates.map(n=>this.parseDynamicViewIncludePredicate(n))}parseGlobalStyleOrGroup(e){if(fa(e))return[this.parseViewRuleStyle(e)];if(fo(e))return e.styles.map(n=>this.parseViewRuleStyle(n));qe(e)}}}function sK(t){return class extends t{parseImports(){const e=this.doc.parseResult.value.imports??[];for(const n of e){const r=n.project;let i=n.imports;for(;i;){try{this.doc.c4Imports.set(r,this.resolveFqn(
|
|
2073
|
+
It(i.imported.ref,`ElementRef is empty of imported: ${i.imported.$refText}`)))}catch(s){Re(s)}i=i.prev}}}}}const oK=rt.getChild("ModelParser");function*aK(t){const e=Fw.from(t.parseResult.value.models.flatMap(i=>i.elements)),n=[];let r;for(;r=e.shift();){if(_i(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);yield r}yield*n}function uK(t){return class extends t{parseModel(){const e=this.doc;for(const n of aK(e))try{if(pn(n)){e.c4Elements.
|
|
2074
|
+
push(this.parseElement(n));continue}if(_i(n)){this.isValid(n)&&e.c4Relations.push(this.parseRelation(n));continue}if(ua(n)){const r=this.parseExtendElement(n);r&&e.c4ExtendElements.push(r);continue}qe(n)}catch(r){const i=this.getAstNodePath(n),s=rr(r),o=r instanceof Error?r.message:String(s);oK.warn(`Error on {eltype}: ${o}
|
|
2075
|
+
document: {path}
|
|
2076
|
+
astpath: {astPath}
|
|
2077
|
+
${s}`,{path:e.uri.path,eltype:n.$type,astPath:i})}}parseElement(e){const n=this.isValid,r=this.resolveFqn(e),i=It(e.kind.ref,"Element kind is not resolved").name,s=this.parseTags(e.body),o=this.parseElementStyle(e.body?.props),a=this.getMetadata(e.body?.props.find(Qi)),u=this.getAstNodePath(e);let[c,l,f]=e.props??[];const d=He(e.body?.props??[],ze(n),ze(nl),Hr(p=>[p.key,p.value||void 0]));c=mt(c??d.title),l=mt(d.description??l),f=Yr(d.technology??f);const h=this.parseLinks(e.body);return{id:r,kind:i,
|
|
2078
|
+
astPath:u,title:c??e.name,...a&&{metadata:a},...s&&{tags:s},...h&&Un(h)&&{links:h},...ce(f)&&{technology:f},...ce(l)&&{description:l},style:o}}parseExtendElement(e){const n=this.resolveFqn(e),r=this.parseTags(e.body),i=this.getMetadata(e.body?.props.find(Qi)),s=this.getAstNodePath(e),o=this.parseLinks(e.body)??[];return!r&&Gt(i??{})&&Gt(o)?null:{id:n,astPath:s,...i&&{metadata:i},...r&&{tags:r},...o&&Un(o)&&{links:o}}}_resolveRelationSource(e){if(cn(e.source)){const n=this.parseFqnRef(e.source);return _e(
|
|
2079
|
+
Es.isModelRef(n)||Es.isImportRef(n),"Relation source must be a model reference"),n}if(!Uh(e.$container))throw new Error("RelationRefError: Invalid container for sourceless relation");return{model:this.resolveFqn(e.$container.$container)}}parseRelation(e){const n=this.isValid,r=this._resolveRelationSource(e),i=this.parseFqnRef(e.target);_e(Es.isModelRef(i)||Es.isImportRef(i),"Target must be a model reference");const s=this.parseTags(e)??this.parseTags(e.body),o=this.parseLinks(e.body),a=e.kind?.ref?.
|
|
2080
|
+
name,u=this.getMetadata(e.body?.props.find(Qi)),c=this.getAstNodePath(e),l=Hr(e.body?.props.filter(xl).filter(v=>Tn(v.value))??[],v=>[v.key,v.value]),f=He(e.body?.props??[],ze(_l),xt(v=>v.value.view.ref?.name),ze(ce),Zo()),d=mt(e.title??l.title)??"",h=mt(l.description),p=Yr(e.technology)??mt(l.technology),w=e.body?.props.find(dp);return{id:bd(c,r.model,i.model),astPath:c,source:r,target:i,title:d,...u&&{metadata:u},...ce(p)&&{technology:p},...ce(h)&&{description:h},...a&&{kind:a},...s&&{tags:s},
|
|
2081
|
+
...Un(o)&&{links:o},...ew(w?.props,n),...f&&{navigateTo:f}}}}}function cK(t){return class extends t{parsePredicate(e){return this.parseExpressionV2(e)}parseElementPredicate(e){if(Jh(e))return this.parseFqnExprWith(e);if(BT(e))return this.parseFqnExprOrWhere(e);qe(e)}parseElementPredicateOrWhere(e){return this.parseFqnExprOrWhere(e)}parseElementExpression(e){return this.parseFqnExpr(e)}parseElementPredicateWhere(e){return this.parseFqnExprWhere(e)}parseElementPredicateWith(e){return this.parseFqnExprWith(
|
|
2082
|
+
e)}parseRelationPredicate(e){return this.parseRelationExprOrWith(e)}parseRelationPredicateOrWhere(e){return this.parseRelationExprOrWhere(e)}parseRelationPredicateWhere(e){return this.parseRelationExprWhere(e)}parseRelationPredicateWith(e){return this.parseRelationExprWith(e)}parseRelationExpression(e){return this.parseRelationExpr(e)}}}function lK(t){return class extends t{parseSpecification(){const{parseResult:{value:{specifications:e}},c4Specification:n}=this.doc,r=this.isValid,i=e.flatMap(c=>c.
|
|
2083
|
+
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){rt.warn(`Element kind "${f}" is already defined`);continue}const d=this.parseElementStyle(l.find(oa)),h=He(l.filter(dv)??[],ze(p=>this.isValid(p)&&Tn(p.value)),Hr(p=>[p.key,mt(p.value)]));n.elements[f]={...h,style:d}}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){
|
|
2084
|
+
rt.warn(`Relationship kind "${f}" is already defined`);continue}const d=He(l.filter(dC)??[],ze(h=>this.isValid(h)&&Tn(h.value)),Hr(h=>[h.key,mt(h.value)]));n.relationships[f]={...d,...ew(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(
|
|
2085
|
+
c=>c.colors.filter(r));for(const{name:c,color:l}of u)try{const f=c.name;if(f in n.colors){rt.warn(`Custom color "${f}" 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=this.parseElementStyle(n.find(oa)),s=He(n.filter(dv)??[],ze(o=>this.isValid(o)&&Tn(o.value)),Hr(o=>[o.key,mt(o.value)]));return{[r]:{...s,style:i}}}}}function dK(t){return class extends t{parseViews(){
|
|
2086
|
+
const e=this.isValid;for(const n of this.doc.parseResult.value.views){const r=n.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 zh(i):this.doc.c4Views.push(this.parseElementView(i,r));break;case XT(i):this.doc.c4Views.push(this.parseDynamicElementView(i,r));break;case VT(i):this.doc.c4Views.push(this.parseDeploymentView(i));break;default:qe(i)}}catch(s){Re(s)}}}parseElementView(e,n){
|
|
2087
|
+
const r=e.body;_e(r,"ElementView body is not defined");const i=this.getAstNodePath(e);let s=null;if("viewOf"in e){const h=Eo(e.viewOf),p=h&&this.resolveFqn(h);p?s=p:rt.warn("viewOf is not resolved: "+e.$cstNode?.text)}let o=e.name;o||(o="view_"+bd(this.doc.uri.toString(),i,s??""));const a=Yr(r.props.find(h=>h.key==="title")?.value)??null,u=mt(r.props.find(h=>h.key==="description")?.value)??null,c=this.convertTags(r),l=this.convertLinks(r),f=hw(e),d={__:"element",id:o,astPath:i,title:a,description:u,
|
|
2088
|
+
tags:c,links:Un(l)?l:null,rules:[...n,...r.rules.flatMap(h=>{try{return this.isValid(h)?this.parseViewRule(h):[]}catch(p){return Re(p),[]}})],...s&&{viewOf:s},...f&&{manualLayout:f}};if(Bp.writeId(e,d.id),"extends"in e){const h=e.extends.view.ref;return _e(h?.name,"view extends is not resolved: "+e.$cstNode?.text),Object.assign(d,{extends:h.name})}return d}parseViewRule(e){if(zl(e))return this.parseViewRulePredicate(e);if(gv(e))return this.parseViewRuleGlobalPredicateRef(e);if(Vy(e))return this.
|
|
2089
|
+
parseViewRuleStyleOrGlobalRef(e);if(ql(e))return tw(e);if(wp(e))return this.parseViewRuleGroup(e);qe(e)}parseViewRulePredicate(e){const n=[];let r=e.exprs;for(;r;){const{value:i,prev:s}=r;try{if(ce(i)&&this.isValid(i)){const o=this.parsePredicate(i);n.unshift(o)}}catch(o){Re(o)}if(!s)break;r=s}return e.isInclude?{include:n}:{exclude:n}}parseViewRuleGlobalPredicateRef(e){return{predicateId:e.predicate.$refText}}parseViewRuleStyleOrGlobalRef(e){if(ka(e))return this.parseViewRuleStyle(e);if(yv(e))return this.
|
|
2090
|
+
parseViewRuleGlobalStyle(e);qe(e)}parseViewRuleGroup(e){const n=[];for(const r of e.groupRules)try{if(!this.isValid(r))continue;if(zl(r)){n.push(this.parseViewRulePredicate(r));continue}if(wp(r)){n.push(this.parseViewRuleGroup(r));continue}qe(r)}catch(i){Re(i)}return{title:Yr(e.title)??null,groupRules:n,...this.parseStyleProps(e.props)}}parseViewRuleStyle(e){const n=e.props.filter(Ky),r=e.targets,i=e.props.find(ga);return this.parseRuleStyle(n,r,i)}parseRuleStyle(e,n,r){const i=this.parseStyleProps(
|
|
2091
|
+
e),s=mt(r?.value);return{targets:this.parseFqnExpressions(n).filter(o=>M_.Expression.isFqnExpr(o)),...s&&{notation:s},style:{...i}}}parseViewRuleGlobalStyle(e){return{styleId:e.style.$refText}}parseDynamicElementView(e,n){const r=e.body;_e(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_"+bd(this.doc.uri.toString(),o));const u=Yr(s.find(h=>h.key==="title")?.value)??null,c=mt(s.find(h=>h.key==="description")?.
|
|
2092
|
+
value)??null,l=this.convertTags(r),f=this.convertLinks(r);Bp.writeId(e,a);const d=hw(e);return{__:"dynamic",id:a,astPath:o,title:u,description:c,tags:l,links:Un(f)?f:null,rules:[...n,...r.rules.flatMap(h=>{try{return i(h)?this.parseDynamicViewRule(h):[]}catch(p){return Re(p),[]}},[])],steps:r.steps.reduce((h,p)=>{try{i(p)&&(Yy(p)?h.push(this.parseDynamicParallelSteps(p)):h.push(this.parseDynamicStep(p)))}catch(w){Re(w)}return h},[]),...d&&{manualLayout:d}}}parseDynamicViewRule(e){if(QT(e))return this.
|
|
2093
|
+
parseDynamicViewIncludePredicate(e);if(JT(e))return this.parseViewRuleGlobalPredicateRef(e);if(Vy(e))return this.parseViewRuleStyleOrGlobalRef(e);if(ql(e))return tw(e);qe(e)}parseDynamicViewIncludePredicate(e){const n=[];let r=e.exprs;for(;r;){try{if(Tn(r.value)&&this.isValid(r.value)&&qT(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){
|
|
2094
|
+
const n=Eo(e.source);if(!n)throw new Error("Invalid reference to source");const r=Eo(e.target);if(!r)throw new Error("Invalid reference to target");let i=this.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}),!DR(e.custom?.props))return a;for(const u of e.custom.props)try{switch(!0){case _l(u):{const c=u.value.view.ref?.name;ce(c)&&(a.navigateTo=c);break}case xl(u):case ga(u):case cC(u):{cn(
|
|
2095
|
+
u.value)&&(a[u.key]=mt(u.value)??"");break}case Wc(u):{cn(u.value)&&(a[u.key]=u.value);break}case ao(u):{const c=wd(u);cn(c)&&(a[u.key]=c);break}case gl(u):{cn(u.value)&&(a[u.key]=u.value);break}default:qe(u)}}catch(c){Re(c)}return a}}}const fK=He(u5,rK,sK,uK,l5,nK,cK,lK,dK,iK);class hK extends fK{}const DS=rt.getChild("ModelParser");class pK{constructor(e){this.services=e,e.shared.workspace.DocumentBuilder.onDocumentPhase(je.Linked,n=>{try{id(n.uri)||this.cachedParsers.set(n,this.createParser(n))}catch(r){
|
|
2096
|
+
DS.warn(rr(r))}}),e.shared.workspace.DocumentBuilder.onDocumentPhase(je.Validated,n=>{n.diagnostics?.some(r=>r.severity===Os.Error)&&this.cachedParsers.delete(n)})}cachedParsers=new qw(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<je.Linked&&DS.warn(`Docu\
|
|
2097
|
+
ment ${e.uri.toString()} is not linked`),this.cachedParsers.get(e)}createParser(e){const n={c4Specification:{tags:new Set,elements:{},relationships:{},colors:{},deployments:{}},c4Elements:[],c4ExtendElements:[],c4ExtendDeployments:[],c4Relations:[],c4Deployments:[],c4DeploymentRelations:[],c4Globals:{predicates:{},dynamicPredicates:{},styles:{}},c4Views:[],c4Imports:new xn(Set)};e=Object.assign(e,n);const r=new hK(this.services,e);return r.parseSpecification(),r.parseImports(),r.parseModel(),r.parseGlobals(),
|
|
2098
|
+
r.parseDeployment(),r.parseViews(),r}}const{findNodeForKeyword:mK}=Gm,gK=(t,e,n=0)=>{const r=n>0?" ".repeat(n):"";return[r+`style ${t} {`,...Zu(e).map(([i,s])=>r+` ${i} ${i==="opacity"?s.toString()+"%":s}`),r+"}"]},yK=(t,e)=>n=>{if(!ka(n)&&!Yc(n))return!1;const r=n.targets.value;if(!r||ce(n.targets.prev)||r.$type!=="FqnRefExpr"||ce(r.selector))return!1;const i=r.ref?.value?.ref;return(i?e.resolve(i):null)===t};function vK(t,{view:e,viewAst:n,targets:r,style:i}){_e(n.body,`View ${e.id} has no bo\
|
|
2099
|
+
dy`);const s=n.$cstNode;_e(s,"viewCstNode");const o=Ju(n.body.rules)?.$cstNode?.range.end??n.body.$cstNode?.range.end;_e(o,"insertPos is not defined");const a=s.range.start.character+2,u=t.likec4.FqnIndex,c=ze(n.body.rules,v=>ka(v)||Yc(v)),l=e.__==="element"?e.viewOf:null,f=[],d=[];r.forEach(v=>{const g=CR(c,yK(v,u)),E=l&&Kp(l,v)?v.substring(l.length+1):v;g?f.push({fqn:E,rule:g}):d.push({fqn:E})});const h={start:o,end:o},p=v=>{v.start.line<=h.start.line&&(v.start.line==h.start.line?h.start.character=
|
|
2100
|
+
Math.min(v.start.character,h.start.character):h.start=v.start),v.end.line>=h.end.line&&(v.end.line==h.end.line?h.end.character=Math.max(v.end.character,h.end.character):h.end=v.end)},w=[];if(d.length>0){const v=d.flatMap(({fqn:g})=>gK(g,i,a));w.push(Bn.insert(o,`
|
|
2101
|
+
`+v.join(`
|
|
2102
|
+
`))),h.start={line:o.line+1,character:a},h.end={line:o.line+v.length,character:Ju(v)?.length??0}}if(f.length>0)for(const{rule:v}of f){const g=v.$cstNode;_e(g,"RuleCstNode not found");for(const[E,D]of Zu(i)){const A=E==="opacity"?D.toString()+"%":D,N=v.props.find(ie=>ie.key===E);if(N&&N.$cstNode){const{range:{start:ie,end:we}}=N.$cstNode;p({start:ie,end:we}),w.push(Bn.replace({start:ie,end:we},E+" "+A));continue}const V=mK(g,"{")?.range.end;_e(V,"Opening brace not found");const J=" ".repeat(2+g.range.
|
|
2103
|
+
start.character),se=J+E+" "+A;w.push(Bn.insert(V,`
|
|
2104
|
+
`+se)),p({start:{line:V.line+1,character:J.length},end:{line:V.line+1,character:se.length}})}}return{modifiedRange:h,edits:w}}const{findNodeForKeyword:wK}=Gm;function bK(t,{view:e,viewAst:n,layout:r}){_e(n.body,`View ${e.id} has no body`);const i=n.$cstNode;_e(i,"viewCstNode");const s=N6(r.direction),o=CR(n.body.rules,ql);let a=`autoLayout ${s}`;if(uh(r.rankSep)&&(a+=` ${r.rankSep}`,uh(r.nodeSep)&&(a+=` ${r.nodeSep}`)),o&&o.$cstNode)return Bn.replace(o.$cstNode.range,a);const u=wK(n.body.$cstNode,
|
|
2105
|
+
"}")?.range.start;_e(u,"Closing brace not found");const c=` ${a}
|
|
2106
|
+
`;return Bn.insert(u,c)}function EK(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===
|
|
2107
|
+
0)return t;const s=i?/^/gm:/^(?!\s*$)/gm;return t.replace(s,r.repeat(e))}function $K(t,{viewAst:e,layout:n}){_e(e.$cstNode,"invalid view.$cstNode");const r=mm(e.$cstNode,["BLOCK_COMMENT"]);let i=eK(n);return e.$cstNode.range.start.character>0&&(i=EK(i,e.$cstNode.range.start.character)),r?Bn.replace(r.range,i.trimStart()):Bn.insert({line:e.$cstNode.range.start.line,character:0},i+`
|
|
2108
|
+
`)}class DK{constructor(e){this.services=e,this.locator=e.likec4.ModelLocator}locator;async applyChange(e){const n=this.services.shared.lsp.Connection;_e(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:{
|
|
2109
|
+
[a.uri]:s}}});if(!u.applied){n.window.showErrorMessage(`Failed to apply changes ${u.failureReason}`);return}r={uri:a.uri,range:o}})}catch(i){bn.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,...vK(this.services,{...i,targets:r.targets,style:r.style})};case"\
|
|
2110
|
+
change-autolayout":{const o=bK(this.services,{...i,layout:r.layout});return{doc:i.doc,modifiedRange:o.range,edits:[o]}}case"save-manual-layout":const s=$K(this.services,{...i,layout:r.layout});return{doc:i.doc,modifiedRange:s.range,edits:[s]};default:qe(r)}}}class RK extends zD{constructor(e){super(),this.services=e}getNameStrict(e){return It(this.getName(e),`Failed getName for ${this.services.workspace.AstNodeLocator.getAstNodePath(e)}`)}getName(e){if(th(e))return e.name;if(Vr(e))return e.imported.
|
|
2111
|
+
$refText;if(Qn(e))return e.target.modelElement.value.$refText}getNameNode(e){if(th(e))return super.getNameNode(e);if(Vr(e))return e.imported.$refNode;if(Qn(e))return e.target.modelElement.value.$refNode}}function kK(t){return He(t,Qo(e=>`${e.type}.${e.name}`),Zu(),Kr(([e,n])=>n.length===1?n:[]))}class TK extends KD{constructor(e){super(e)}async computeExports(e,n){const r=[];try{const{specifications:i,models:s,views:o,globals:a,likec4lib:u,deployments:c,imports:l}=e.parseResult.value;this.exportLibrary(
|
|
2112
|
+
u,r,e),this.exportSpecification(i,r,e),this.exportModel(s,r,e),this.exportViews(o,r,e),this.exportGlobals(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(!(Rt(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(!(Rt(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(
|
|
2113
|
+
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(this.descriptions.createDescription(s,s.name,r))}catch(s){Re(s)}}}exportModel(e,n,r){if(!(Rt(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(!Rt(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){
|
|
2114
|
+
if(!(Rt(e)||e.length===0))for(const i of e.flatMap(s=>[...s.elements,...s.relationships,...s.deploymentNodes,...s.tags,...s.colors]))try{switch(!0){case va(i):case ba(i):{ce(i.kind.name)&&n.push(this.descriptions.createDescription(i.kind,i.kind.name,r));continue}case mp(i):{ce(i.tag.name)&&n.push(this.descriptions.createDescription(i.tag,"#"+i.tag.name,r));continue}case $a(i):{ce(i.kind.name)&&n.push(this.descriptions.createDescription(i.kind,i.kind.name,r),this.descriptions.createDescription(i.
|
|
2115
|
+
kind,"."+i.kind.name,r));continue}case pp(i):{ce(i.name.name)&&n.push(this.descriptions.createDescription(i.name,i.name.name,r));continue}default:qe(i)}}catch(s){Re(s)}}exportDeployments(e,n,r){const i=e?.flatMap(s=>s.elements);if(!(Rt(i)||i.length===0))for(const s of i)try{qn(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 qs;for(const a of i.models)try{s.push(...this.processContainer(
|
|
2116
|
+
a,o,e))}catch(u){Re(u)}for(const a of i.deployments)try{s.push(...this.processDeployments(a,o,e))}catch(u){Re(u)}for(const a of i.imports.flatMap(u=>u.imports))try{let u=a;for(;u;)s.push(this.descriptions.createDescription(u,u.imported.$refText,e)),u=u.prev}catch(u){Re(u)}kK(s).forEach(a=>{o.add(i,a)}),r(o)})}processContainer(e,n,r){const i=new qs,s=[];for(const a of e.elements){if(_i(a))continue;let u;if(pn(a)?(ce(a.name)&&i.add(a.name,this.descriptions.createDescription(a,a.name,r)),u=a.body,u&&
|
|
2117
|
+
(n.add(u,this.descriptions.createDescription(a,"this",r)),n.add(u,this.descriptions.createDescription(a,"it",r)))):ua(a)&&(u=a.body),u&&u.elements.length>0)try{s.push(...this.processContainer(u,n,r))}catch(c){Re(c)}}s.length&&He(s,ze(a=>!i.has(a.name)),Qo(a=>a.name),RR((a,u)=>{a.length===1&&i.add(u,a[0])}));const o=[...i.values()];return n.addAll(e,o),o}processDeployments(e,n,r){const i=new qs,s=[];for(const a of e.elements){if(Ci(a))continue;let u=a.body;if(!co(a)){let c=this.nameProvider.getName(
|
|
2118
|
+
a);if(ce(c)){const l=this.descriptions.createDescription(a,c,r);i.add(c,l)}u&&(n.add(u,this.descriptions.createDescription(a,"this",r)),n.add(u,this.descriptions.createDescription(a,"it",r)))}if(u)try{s.push(...this.processDeployments(u,n,r))}catch(c){Re(c)}}s.length&&He(s,ze(a=>!i.has(a.name)),Qo(a=>a.name),RR((a,u)=>{a.length===1&&i.add(u,a[0])}));const o=[...i.values()];return n.addAll(e,o),o}}const{getDocument:RS}=xo;class CK extends YD{deploymentsIndex;fqnIndex;indexManager;constructor(e){super(
|
|
2119
|
+
e),this.indexManager=e.shared.workspace.IndexManager,this.fqnIndex=e.likec4.FqnIndex,this.deploymentsIndex=e.likec4.DeploymentsIndex}getScope(e){try{const n=Wt(e.container),r=this.reflection.getReferenceType(e);try{const i=e.container;if(iC(i))return new js(this.streamForFqnRef(n,i,e));if(hC(i))return this.getScopeForStrictFqnRef(n,i,e);if(r!==Zn)return this.getProjectScope(n,r,e);if(Vr(i)){const s=Wt(i);return new js(this.fqnIndex.rootElements(s))}if(fv(i)&&e.property==="el"){const s=i.parent;return s?
|
|
2120
|
+
new js(this.fqnIndex.directChildrenOf(n,$o(s))):this.getProjectScope(n,r,e)}return new js(Xe(this.computeScope(n,e)))}catch(i){return Re(i),this.getProjectScope(n,r,e)}}catch(n){return Re(n),pj}}*genUniqueDescedants(e){const n=e();if(!n)return;const r=Wt(n);if(pn(n)){const i=this.fqnIndex.getFqn(n);yield*this.fqnIndex.uniqueDescedants(r,i);return}if(qn(n)){const i=this.deploymentsIndex.getFqn(n);yield*this.deploymentsIndex.uniqueDescedants(r,i)}}*genScopeExtendElement({element:e}){e.el.$nodeDescription&&
|
|
2121
|
+
(yield e.el.$nodeDescription),yield*this.genUniqueDescedants(()=>Eo(e))}*genScopeElementView({viewOf:e,extends:n}){if(e){e.modelElement.value.$nodeDescription&&(yield e.modelElement.value.$nodeDescription),yield*this.genUniqueDescedants(()=>Eo(e));return}if(n){const r=n.view.ref;r&&(yield*this.genScopeElementView(r))}}getScopeForStrictFqnRef(e,n,r){const i=n.parent;return i?new js(this.deploymentsIndex.directChildrenOf(e,$o(i)).filter(s=>this.reflection.isSubtype(s.type,Tr))):this.getProjectScope(
|
|
2122
|
+
e,Tr,r)}*genScopeExtendDeployment({deploymentNode:e}){e.value.$nodeDescription&&(yield e.value.$nodeDescription),yield*this.genUniqueDescedants(()=>{const n=e.value.ref;return n&&qn(n)?n:void 0})}streamForFqnRef(e,n,r){const i=n.parent;if(!i)return Xe(this.genScopeForParentlessFqnRef(e,n,r));const s=i.value.ref;return s?Vr(s)?Xe(this.genUniqueDescedants(()=>s.imported.ref)):qn(s)?Xe(this.genUniqueDescedants(()=>s)):Qn(s)?Xe(this.genUniqueDescedants(()=>{const o=s.target.modelElement.value.ref;return Vr(
|
|
2123
|
+
o)?o.imported.ref:pn(o)?o:void 0})):pn(s)?Xe(this.genUniqueDescedants(()=>s)):qe(s):qa}*genScopeForParentlessFqnRef(e,n,r){Br(n,Zy)||O6(n)?yield*this.computeScope(e,r,Zn):I6(n)?(yield*this.computeScope(e,r,Zn),yield*this.computeScope(e,r,Tr),yield*this.computeScope(e,r,ki)):(yield*this.computeScope(e,r,Tr),yield*this.computeScope(e,r,ki),Br(n,Xy)&&(yield*this.computeScope(e,r,Zn)));const i=RS(n).precomputedScopes;i&&(yield*i.values().filter(s=>this.reflection.isSubtype(s.type,es)))}*computeScope(e,n,r=this.
|
|
2124
|
+
reflection.getReferenceType(n)){const i=this.reflection.isSubtype(r,Zn),s=this.reflection.isSubtype(r,mh),o=RS(n.container).precomputedScopes;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&&rC(u)&&(yield*this.genScopeExtendDeployment(u.$container)),i&&nv(u)&&(yield*this.genScopeExtendElement(u.$container)),i&&ev(u)&&(yield*this.genScopeElementView(u.$container)),
|
|
2125
|
+
u=u.$container}yield*this.getProjectScope(e,r,n).getAllElements()}getProjectScope(e,n,r){return n===Si?super.getGlobalScope(n,r):this.globalScopeCache.get(`${e}::${n}`,()=>new VD(this.indexManager.projectElements(e,n)))}getGlobalScope(e,n){if(e===Si)return super.getGlobalScope(e,n);const r=Wt(n.container);return this.getProjectScope(r,e,n)}}var kS;(t=>t.type=new Bt.NotificationType("likec4/onDidChangeModel"))(kS||={});var TS;(t=>t.req=new Bt.RequestType("likec4/fetchComputedModel"))(TS||={});var CS;
|
|
2126
|
+
(t=>t.req=new Bt.RequestType0("likec4/fetchViewsFromAllProjects"))(CS||={});var AS;(t=>t.req=new Bt.RequestType("likec4/computeView"))(AS||={});var SS;(t=>t.req=new Bt.RequestType("likec4/fetchLayoutedModel"))(SS||={});var _S;(t=>t.req=new Bt.RequestType("likec4/layout-view"))(_S||={});var PS;(t=>t.Req=new Bt.RequestType("likec4/validate-layout"))(PS||={});var xS;(t=>t.req=new Bt.RequestType0("likec4/fetch-projects"))(xS||={});var NS;(t=>t.Req=new Bt.RequestType("likec4/build"))(NS||={});var IS;
|
|
2127
|
+
(t=>t.Req=new Bt.RequestType("likec4/locate"))(IS||={});var OS;(t=>t.Req=new Bt.RequestType("likec4/change-view"))(OS||={});var FS;(t=>t.req=new Bt.RequestType0("likec4/metrics"))(FS||={});const gr=rt.getChild("rpc");class AK 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;
|
|
2128
|
+
if(!s){gr.info("[ServerRpc] no connection, not initializing");return}gr.info("[ServerRpc] init");const a=this.services.shared.workspace.LangiumDocuments,u=this.services.shared.workspace.DocumentBuilder,c=x4(()=>{gr.debug`sendNotification ${"onDidChangeModel"}`,s.sendNotification(kS.type,"").catch(d=>(gr.warn(`[ServerRpc] error sending onDidChangeModel: ${d}`),Promise.resolve()))},{triggerAt:"end",minQuietPeriodMs:100,maxBurstDurationMs:500,minGapMs:300});let l=!0;this.onDispose(e.onModelParsed(()=>c.
|
|
2129
|
+
call()),s.onRequest(TS.req,async({projectId:d,cleanCaches:h},p)=>{if(gr.debug`received request ${"fetchComputedModel"} for project ${d}`,h){const v=(d?a.projectDocuments(d):a.all).map(g=>g.uri).toArray();await u.update(v,[],p)}const w=await e.buildLikeC4Model(d,p);return w!==bs.EMPTY?{model:w.$model}:{model:null}}),s.onRequest(AS.req,async({viewId:d,projectId:h},p)=>({view:await e.computeView(d,h,p)})),s.onRequest(SS.req,async({projectId:d},h)=>{const p=await e.parseModel(d,h);if(p===null)return{
|
|
2130
|
+
model:null};const w=await i.diagrams(d,h);return{model:{...p,__:"layouted",views:Qu(w,v=>v.id)}}}),s.onRequest(_S.req,async({viewId:d,projectId:h},p)=>(gr.debug`received request ${"layoutView"} of ${d} from project ${h}`,{result:await i.layoutView(d,h,p)})),s.onRequest(PS.Req,async({projectId:d},h)=>{const p=await i.layoutAllViews(d,h);return{result:f(p.map(w=>w.diagram))}}),s.onRequest(xS.req,async d=>{gr.debug`received request ${"FetchProjects"}`;const h=a.groupedByProject();return{projects:Jo(
|
|
2131
|
+
h,p=>xt(p,w=>w.uri.toString()))}}),s.onRequest(CS.req,async d=>{gr.debug`received request ${"FetchViewsFromAllProjects"}`;const h=o.all.map(async w=>{const v=await i.computedViews(w,d);return He(v,xt(g=>({id:g.id,title:g.title??g.id,projectId:w})),$R((g,E)=>g.id==="index"?-1:E.id==="index"?1:g.title.localeCompare(E.title)))}),p=await Promise.allSettled(h);return await jt(d),{views:He(p,ze(w=>w.status==="fulfilled"),Kr(w=>w.value))}}),s.onRequest(NS.Req,async({docs:d},h)=>{const p=d.map(g=>yt.parse(
|
|
2132
|
+
g)),w=g=>p.every(E=>!pt.equals(E,g)),v=a.allExcludingBuiltin.toArray().filter(g=>w(g.uri)).map(g=>g.uri);gr.debug(`[ServerRpc] received request to build:
|
|
2133
|
+
changed (total ${p.length}):${d.map(g=>`
|
|
2134
|
+
- `+g).join("")}
|
|
2135
|
+
deleted (total ${v.length}):${v.map(g=>`
|
|
2136
|
+
- `+g.toString()).join(`
|
|
2137
|
+
`)}`),!l&&p.length+v.length>0&&await Promise.allSettled([...p,...v].map(async g=>{const E=g.toString();gr.debug(`clear diagnostics for ${E}`);try{await s.sendDiagnostics({uri:E,diagnostics:[]})}catch(D){gr.warn(`error clearing diagnostics for ${E}: ${D}`)}})),l=!1,await jt(h),await u.update(p,v,h)}),s.onRequest(IS.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(
|
|
2138
|
+
d.view,d.projectId);case"deployment"in d:return n.locateDeploymentElement(d.deployment,d.projectId);default:qe(d)}}),s.onRequest(OS.Req,async(d,h)=>(gr.debug`received request ${"changeView"} of ${d.viewId} from project ${d.projectId}`,await r.applyChange(d))),s.onRequest(FS.req,async d=>{const h=[...o.all].map(async v=>{const g=await e.buildLikeC4Model(v,d);return g===bs.EMPTY?Promise.reject(new Error("Model is empty")):{elementKinds:Yu(g.$model.specification.elements).length,relationshipKinds:Yu(
|
|
2139
|
+
g.$model.specification.relationships).length,tags:g.$model.specification.tags.length,elements:Yu(g.$model.elements).length,relationships:Yu(g.$model.relations).length,views:Yu(g.$model.views).length,projects:1}}),p=await Promise.allSettled(h);await jt(d);const w=p.filter(v=>v.status==="fulfilled").map(v=>v.value);return{metrics:w.length>0?w.reduce((v,g)=>({elementKinds:v.elementKinds+g.elementKinds,relationshipKinds:v.relationshipKinds+g.relationshipKinds,tags:v.tags+g.tags,elements:v.elements+g.
|
|
2140
|
+
elements,relationships:v.relationships+g.relationships,views:v.views+g.views,projects:v.projects+1})):null}}),Gs.create(()=>{c.cancel()}));function f(d){return He(d,ze(h=>!!h.hasLayoutDrift),xt(h=>({uri:n.locateView(h.id).uri,viewId:h.id,severity:ge.DiagnosticSeverity.Warning,message:`Layout drift detected for view '${h.id}'`,range:n.locateView(h.id).range})))}}}class SK{constructor(e){this.services=e}getSymbolKind(e){const n=kt(e)?e.$type:e.type,r=(...i)=>i.some(s=>this.services.AstReflection.isSubtype(
|
|
2141
|
+
n,s));switch(!0){case r(Zn,lo,Tr,ki,es):return Dr.Constructor;case r(ha,ma,pa,da,Da):return Dr.Namespace;case r(oo):return Dr.Class;case r(ns,Si,uo,Ra):return Dr.EnumMember;case r(ts,Ea):return Dr.Event;case r(Ai,Ti,wa,ya):return Dr.TypeParameter}return Dr.Field}getCompletionItemKind(e){const n=kt(e)?e.$type:e.type,r=(...i)=>i.some(s=>this.services.AstReflection.isSubtype(n,s));switch(!0){case r(uo):return Ct.Color;case r(Zn,Tr,ki,lo,es):return Ct.Constructor;case r(ha,ma,pa,da,Da):return Ct.Module;case r(
|
|
2142
|
+
oo):return Ct.Class;case r(ns,Si,uo,Ra):return Ct.EnumMember;case r(ts,Ea):return Ct.Event;case r(Ai,wa,Ti,ya):return Ct.TypeParameter;default:return Ct.Reference}}}class _K extends uT{}var pw={exports:{}},LS;function PK(){return LS||(LS=1,function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(u,c,l){this.fn=u,this.context=c,this.once=l||!1}function s(u,c,l,f,d){if(typeof l!="function")throw new TypeError(
|
|
2143
|
+
"The listener must be a function");var h=new i(l,f||u,d),p=n?n+c:c;return u._events[p]?u._events[p].fn?u._events[p]=[u._events[p],h]:u._events[p].push(h):(u._events[p]=h,u._eventsCount++),u}function o(u,c){--u._eventsCount===0?u._events=new r:delete u._events[c]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],l,f;if(this._eventsCount===0)return c;for(f in l=this._events)e.call(l,f)&&c.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?c.concat(
|
|
2144
|
+
Object.getOwnPropertySymbols(l)):c},a.prototype.listeners=function(c){var l=n?n+c:c,f=this._events[l];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,h=f.length,p=new Array(h);d<h;d++)p[d]=f[d].fn;return p},a.prototype.listenerCount=function(c){var l=n?n+c:c,f=this._events[l];return f?f.fn?1:f.length:0},a.prototype.emit=function(c,l,f,d,h,p){var w=n?n+c:c;if(!this._events[w])return!1;var v=this._events[w],g=arguments.length,E,D;if(v.fn){switch(v.once&&this.removeListener(c,v.fn,void 0,!0),g){case 1:
|
|
2145
|
+
return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,l),!0;case 3:return v.fn.call(v.context,l,f),!0;case 4:return v.fn.call(v.context,l,f,d),!0;case 5:return v.fn.call(v.context,l,f,d,h),!0;case 6:return v.fn.call(v.context,l,f,d,h,p),!0}for(D=1,E=new Array(g-1);D<g;D++)E[D-1]=arguments[D];v.fn.apply(v.context,E)}else{var A=v.length,N;for(D=0;D<A;D++)switch(v[D].once&&this.removeListener(c,v[D].fn,void 0,!0),g){case 1:v[D].fn.call(v[D].context);break;case 2:v[D].fn.call(v[D].context,
|
|
2146
|
+
l);break;case 3:v[D].fn.call(v[D].context,l,f);break;case 4:v[D].fn.call(v[D].context,l,f,d);break;default:if(!E)for(N=1,E=new Array(g-1);N<g;N++)E[N-1]=arguments[N];v[D].fn.apply(v[D].context,E)}}return!0},a.prototype.on=function(c,l,f){return s(this,c,l,f,!1)},a.prototype.once=function(c,l,f){return s(this,c,l,f,!0)},a.prototype.removeListener=function(c,l,f,d){var h=n?n+c:c;if(!this._events[h])return this;if(!l)return o(this,h),this;var p=this._events[h];if(p.fn)p.fn===l&&(!d||p.once)&&(!f||p.
|
|
2147
|
+
context===f)&&o(this,h);else{for(var w=0,v=[],g=p.length;w<g;w++)(p[w].fn!==l||d&&!p[w].once||f&&p[w].context!==f)&&v.push(p[w]);v.length?this._events[h]=v.length===1?v[0]:v:o(this,h)}return this},a.prototype.removeAllListeners=function(c){var l;return c?(l=n?n+c:c,this._events[l]&&o(this,l)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,t.exports=a}(pw)),pw.exports}var xK=PK();const NK=Fr(
|
|
2148
|
+
xK);class MS extends Error{constructor(e){super(e),this.name="TimeoutError"}}class IK extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const BS=t=>globalThis.DOMException===void 0?new IK(t):new DOMException(t),qS=t=>{const e=t.reason===void 0?BS("This operation was aborted."):t.reason;return e instanceof Error?e:BS(e)};function OK(t,e){const{milliseconds:n,fallback:r,message:i,customTimers:s={setTimeout,clearTimeout}}=e;let o,a;const c=new Promise((l,f)=>{if(typeof n!=
|
|
2149
|
+
"number"||Math.sign(n)!==1)throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${n}\``);if(e.signal){const{signal:h}=e;h.aborted&&f(qS(h)),a=()=>{f(qS(h))},h.addEventListener("abort",a,{once:!0})}if(n===Number.POSITIVE_INFINITY){t.then(l,f);return}const d=new MS;o=s.setTimeout.call(void 0,()=>{if(r){try{l(r())}catch(h){f(h)}return}typeof t.cancel=="function"&&t.cancel(),i===!1?l():i instanceof Error?f(i):(d.message=i??`Promise timed out after ${n} milliseconds`,f(d))},n),
|
|
2150
|
+
(async()=>{try{l(await t)}catch(h){f(h)}})()}).finally(()=>{c.clear(),a&&e.signal&&e.signal.removeEventListener("abort",a)});return c.clear=()=>{s.clearTimeout.call(void 0,o),o=void 0},c}function FK(t,e,n){let r=0,i=t.length;for(;i>0;){const s=Math.trunc(i/2);let o=r+s;n(t[o],e)<=0?(r=++o,i-=s+1):i=s}return r}class LK{#e=[];enqueue(e,n){n={priority:0,...n};const r={priority:n.priority,id:n.id,run:e};if(this.size===0||this.#e[this.size-1].priority>=n.priority){this.#e.push(r);return}const i=FK(this.#e,
|
|
2151
|
+
r,(s,o)=>o.priority-s.priority);this.#e.splice(i,0,r)}setPriority(e,n){const r=this.#e.findIndex(s=>s.id===e);if(r===-1)throw new ReferenceError(`No promise function with the id "${e}" exists in the queue.`);const[i]=this.#e.splice(r,1);this.enqueue(i.run,{priority:n,id:e})}dequeue(){return this.#e.shift()?.run}filter(e){return this.#e.filter(n=>n.priority===e.priority).map(n=>n.run)}get size(){return this.#e.length}}class MK extends NK{#e;#t;#r=0;#h;#a;#p=0;#i;#u;#n;#m;#s=0;#c;#o;#g;#w=1n;timeout;constructor(e){
|
|
2152
|
+
if(super(),e={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:LK,...e},!(typeof e.intervalCap=="number"&&e.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${e.intervalCap?.toString()??""}\` (${typeof e.intervalCap})`);if(e.interval===void 0||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got\
|
|
2153
|
+
\`${e.interval?.toString()??""}\` (${typeof e.interval})`);this.#e=e.carryoverConcurrencyCount,this.#t=e.intervalCap===Number.POSITIVE_INFINITY||e.interval===0,this.#h=e.intervalCap,this.#a=e.interval,this.#n=new e.queueClass,this.#m=e.queueClass,this.concurrency=e.concurrency,this.timeout=e.timeout,this.#g=e.throwOnTimeout===!0,this.#o=e.autoStart===!1}get#b(){return this.#t||this.#r<this.#h}get#E(){return this.#s<this.#c}#$(){this.#s--,this.#l(),this.emit("next")}#D(){this.#v(),this.#y(),this.#u=
|
|
2154
|
+
void 0}get#R(){const e=Date.now();if(this.#i===void 0){const n=this.#p-e;if(n<0)this.#r=this.#e?this.#s:0;else return this.#u===void 0&&(this.#u=setTimeout(()=>{this.#D()},n)),!0}return!1}#l(){if(this.#n.size===0)return this.#i&&clearInterval(this.#i),this.#i=void 0,this.emit("empty"),this.#s===0&&this.emit("idle"),!1;if(!this.#o){const e=!this.#R;if(this.#b&&this.#E){const n=this.#n.dequeue();return n?(this.emit("active"),n(),e&&this.#y(),!0):!1}}return!1}#y(){this.#t||this.#i!==void 0||(this.#i=
|
|
2155
|
+
setInterval(()=>{this.#v()},this.#a),this.#p=Date.now()+this.#a)}#v(){this.#r===0&&this.#s===0&&this.#i&&(clearInterval(this.#i),this.#i=void 0),this.#r=this.#e?this.#s:0,this.#d()}#d(){for(;this.#l(););}get concurrency(){return this.#c}set concurrency(e){if(!(typeof e=="number"&&e>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this.#c=e,this.#d()}async#k(e){return new Promise((n,r)=>{e.addEventListener("abort",()=>{r(e.reason)},{once:!0})})}setPriority(e,n){
|
|
2156
|
+
this.#n.setPriority(e,n)}async add(e,n={}){return n.id??=(this.#w++).toString(),n={timeout:this.timeout,throwOnTimeout:this.#g,...n},new Promise((r,i)=>{this.#n.enqueue(async()=>{this.#s++,this.#r++;try{n.signal?.throwIfAborted();let s=e({signal:n.signal});n.timeout&&(s=OK(Promise.resolve(s),{milliseconds:n.timeout})),n.signal&&(s=Promise.race([s,this.#k(n.signal)]));const o=await s;r(o),this.emit("completed",o)}catch(s){if(s instanceof MS&&!n.throwOnTimeout){r();return}i(s),this.emit("error",s)}finally{
|
|
2157
|
+
this.#$()}},n),this.emit("add"),this.#l()})}async addAll(e,n){return Promise.all(e.map(async r=>this.add(r,n)))}start(){return this.#o?(this.#o=!1,this.#d(),this):this}pause(){this.#o=!0}clear(){this.#n=new this.#m}async onEmpty(){this.#n.size!==0&&await this.#f("empty")}async onSizeLessThan(e){this.#n.size<e||await this.#f("next",()=>this.#n.size<e)}async onIdle(){this.#s===0&&this.#n.size===0||await this.#f("idle")}async#f(e,n){return new Promise(r=>{const i=()=>{n&&!n()||(this.off(e,i),r())};
|
|
2158
|
+
this.on(e,i)})}get size(){return this.#n.size}sizeBy(e){return this.#n.filter(e).length}get pending(){return this.#s}get isPaused(){return this.#o}}class BK{constructor(e){this.services=e,this.ModelBuilder=e.likec4.ModelBuilder}cache=new WeakMap;viewsWithReportedErrors=new Set;ModelBuilder;queue=new MK({concurrency:4,timeout:1e4,throwOnTimeout:!0});get layouter(){return this.services.likec4.Layouter}async computedViews(e,n=Bt.CancellationToken.None){const r=await this.ModelBuilder.buildLikeC4Model(
|
|
2159
|
+
e,n);return ah(r.$model.views)}async layoutAllViews(e,n=Bt.CancellationToken.None){const r=await this.computedViews(e,n);if(r.length===0)return[];const i=rt.getChild(["views",e??""]);i.debug`layoutAll: ${r.length} views`;const s=[],o=[];for(const a of r)this.viewsWithReportedErrors.delete(a.id),o.push(Promise.resolve().then(async()=>{const u=await this.queue.add(async()=>(i.debug`layouting view ${a.id}...`,await this.layouter.layout(a)));return u?(i.debug`done layout view ${a.id}`,this.viewsWithReportedErrors.
|
|
2160
|
+
delete(a.id),this.cache.set(a,u),u):Promise.reject(new Error(`Failed to layout view ${a.id}`))}).catch(u=>(i.warn(`fail layout view ${a.id}`,{e:u}),this.cache.delete(a),Promise.reject(u))));for(const a of await Promise.allSettled(o))a.status==="fulfilled"?s.push(a.value):i.error(rr(a.reason));return s.length!==r.length?i.warn`layouted ${s.length} of ${r.length} views`:s.length>0&&i.debug`layouted all ${s.length} views`,s}async layoutView(e,n,r=Bt.CancellationToken.None){const i=(await this.ModelBuilder.
|
|
2161
|
+
buildLikeC4Model(n,r)).findView(e)?.$view,s=rt.getChild(["views",n??""]);if(!i)return s.warn`layoutView ${e} not found`,null;let o=this.cache.get(i);if(o)return s.debug`layout ${e} from cache`,await Promise.resolve(o);try{const a=performance.now(),u=await this.queue.add(async()=>(s.debug`layouting view ${i.id}...`,await this.layouter.layout(i)));if(!u)throw new Error(`Failed to layout view ${e}`);return this.viewsWithReportedErrors.delete(e),this.cache.set(i,u),s.debug(`layout {viewId} ready in ${Gp(
|
|
2162
|
+
performance.now()-a)}`,{viewId:e}),u}catch(a){if(!this.viewsWithReportedErrors.has(e)){const u=rr(a);this.services.shared.lsp.Connection?.window.showErrorMessage(`LikeC4: ${u}`),this.viewsWithReportedErrors.add(e),sd(a)}return Promise.reject(a)}}async diagrams(e,n=Bt.CancellationToken.None){return(await this.layoutAllViews(e,n)).map(r=>r.diagram)}async viewsAsGraphvizOut(e,n=Bt.CancellationToken.None){const r="All-LayoutedViews-DotWithSvg",i=this.services.ValidatedWorkspaceCache;if(i.has(r))return await Promise.
|
|
2163
|
+
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.computedViews(),i=await this.layouter.layoutOverviewGraph(r);return n.set(
|
|
2164
|
+
e,i),i}}const qK={lsp:{NodeKindProvider:t=>new SK(t),WorkspaceSymbolProvider:t=>new _K(t)},workspace:{IndexManager:t=>new G6(t),LangiumDocuments:t=>new U6(t),ProjectsManager:t=>new jn(t),WorkspaceManager:t=>new W6(t)}};function Nt(t){return e=>new t(e)}const jK={documentation:{DocumentationProvider:Nt(L6)},ValidatedWorkspaceCache:t=>new nh(t.shared,je.Validated),Rpc:Nt(AK),likec4:{LanguageServices:Nt(H6),Layouter:t=>(rt.debug("Creating GraphvizLayouter with GraphvizWasmAdapter"),new JA(new Oa)),
|
|
2165
|
+
Views:Nt(BK),DeploymentsIndex:Nt(iH),ModelChanges:Nt(DK),FqnIndex:Nt(iS),ModelParser:Nt(pK),ModelBuilder:Nt(vH),ModelLocator:Nt(EH)},lsp:{CompletionProvider:Nt(Q6),DocumentHighlightProvider:Nt(Z6),DocumentSymbolProvider:Nt(tH),SemanticTokenProvider:Nt(rH),HoverProvider:Nt(nH),CodeLensProvider:Nt(J6),DocumentLinkProvider:Nt(eH),Formatter:Nt(q6)},workspace:{AstNodeDescriptionProvider:Nt(j6)},references:{NameProvider:Nt(RK),ScopeComputation:Nt(TK),ScopeProvider:Nt(CK)}};function GK(t,e,n,r){const i=UK(
|
|
2166
|
+
t),s=[SG({shared:i}),F8,jK,e,n,r].reduce(jS,{}),o=sh(s);return i.ServiceRegistry.register(o),a5(o),t.connection?o.Rpc.init():i.workspace.ConfigurationProvider.initialized({}),{shared:i,likec4:o}}function UK(t={}){const e={...yR,...t};return sh(PG(e),O8,qK)}function jS(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]=jS(i,r):t[n]=r}}return t}const WK=t=>({start:ji.hrtime.bigint(),command:t.map(e=>zK(p_(e))).join(
|
|
2167
|
+
" "),state:{stdout:"",stderr:"",output:""}}),zK=t=>/[^\w./-]/.test(t)?`'${t.replaceAll("'","'\\''")}'`:t,HK=({stdin:t,stdout:e,stderr:n,stdio:r=[t,e,n],env:i,preferLocal:s,cwd:o=".",...a})=>{const u=o instanceof URL?l_(o):Bi.resolve(o),c=i?{...ji.env,...i}:void 0,l=r[0]?.string;return{...a,input:l,stdio:l===void 0?r:["pipe",...r.slice(1)],env:s?KK(c??ji.env,u):c,cwd:u}},KK=({Path:t="",PATH:e=t,...n},r)=>{const i=e.split(Bi.delimiter),s=GS([],Bi.resolve(r)).map(o=>Bi.join(o,"node_modules/.bin")).
|
|
2168
|
+
filter(o=>!i.includes(o));return{...n,PATH:[...s,e].filter(Boolean).join(Bi.delimiter)}},GS=(t,e)=>t.at(-1)===e?t:GS([...t,e],Bi.resolve(e,"..")),VK=async(t,e,n)=>await XK(t,n)?[mw(t),e.map(r=>ZK(r)),{...n,shell:!0}]:[t,e,n],XK=async(t,{shell:e,cwd:n,env:r=ji.env})=>ji.platform==="win32"&&!e&&!await YK(t,n,r),YK=async(t,e,{Path:n="",PATH:r=n})=>US.some(i=>t.toLowerCase().endsWith(i))||(JK[`${t}\0${e}\0${r}`]??=await QK(t,e,r)),JK={},QK=async(t,e,n)=>{const r=n.split(Bi.delimiter).filter(Boolean).
|
|
2169
|
+
map(i=>i.replace(/^"(.*)"$/,"$1"));try{await Promise.all(US.flatMap(i=>[e,...r].map(s=>`${Bi.resolve(s,t)}${i}`)).map(async i=>{try{await Y_(i)}catch{return}throw 0}))}catch{return!0}return!1},US=[".exe",".com"],ZK=t=>mw(mw(`"${t.replaceAll(/(\\*)"/g,'$1$1\\"').replace(/(\\*)$/,"$1$1")}"`)),mw=t=>t.replaceAll(/([()\][%!^"`<>&|;, *?])/g,"^$1"),e9=async(t,{input:e},n)=>{const r=await t;e!==void 0&&r.stdin.end(e);const i=Gw(r,"close");try{return await Promise.race([i,...r.stdio.filter(Boolean).map(
|
|
2170
|
+
s=>t9(s))]),n9(n,zS(r)),HS(n)}catch(s){throw await Promise.allSettled([i]),WS(s,r,n)}},t9=async t=>{for await(const[e]of X_(t,"error"))if(!["ERR_STREAM_PREMATURE_CLOSE","EPIPE"].includes(e?.code))throw e},n9=({command:t},{exitCode:e,signalName:n})=>{if(n!==void 0)throw new Ro(`Command was terminated with ${n}: ${t}`);if(e!==void 0)throw new Ro(`Command failed with exit code ${e}: ${t}`)},WS=(t,e,n)=>Object.assign(r9(t,n),zS(e),HS(n)),r9=(t,{command:e})=>t instanceof Ro?t:new Ro(`Command failed: ${e}`,
|
|
2171
|
+
{cause:t});class Ro extends Error{name="SubprocessError"}const zS=({exitCode:t,signalCode:e})=>({...t<1?{}:{exitCode:t},...e===null?{}:{signalName:e}}),HS=({state:{stdout:t,stderr:e,output:n},command:r,start:i})=>({stdout:gw(t),stderr:gw(e),output:gw(n),command:r,durationMs:Number(ji.hrtime.bigint()-i)/1e6}),gw=t=>t.at(-1)===`
|
|
2172
|
+
`?t.slice(0,t.at(-2)==="\r"?-2:-1):t,i9=async(t,e,n,r)=>{try{[t,e]=["node","node.exe"].includes(t.toLowerCase())?[ji.execPath,[...ji.execArgv.filter(s=>!s.startsWith("--inspect")),...e]]:[t,e];const i=V_(...await VK(t,e,n));return KS(i.stdout,r,"stdout"),KS(i.stderr,r,"stderr"),i.once("error",()=>{}),await Gw(i,"spawn"),i}catch(i){throw WS(i,{},r)}},KS=(t,{state:e},n)=>{t&&(t.setEncoding("utf8"),e.isIterating||(e.isIterating=!1,t.on("data",r=>{e[n]+=r,e.output+=r})))},s9=async t=>{const[[e,n]]=await Promise.
|
|
2173
|
+
all([Promise.allSettled(t),o9(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}},o9=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.');J_(e,n).catch(()=>{})}catch(e){
|
|
2174
|
+
throw await Promise.allSettled(t.map(({nodeChildProcess:n})=>a9(n))),e}},a9=async t=>{const{stdin:e}=await t;e.end()},VS=async function*(t,{state:e},n){if(e.isIterating===!1)throw new Error(`The subprocess must be iterated right away, for example:
|
|
2175
|
+
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}},u9=async function*(...t){try{let e=[];for(;t.length>0;){e=t.map((o,a)=>e[a]??c9(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.
|
|
2176
|
+
all(t.map(e=>e.return()))}},c9=async t=>{try{return await t.next()}catch(e){await t.throw(e)}};function kd(t,e,n,r){const[i=[],s={}]=Array.isArray(e)?[e,n]:[[],e],o=WK([t,...i]),a=HK(s),u=i9(t,i,a,o);let c=e9(u,a,o);Object.assign(c,{nodeChildProcess:u}),c=r?s9([r,c]):c;const l=VS(c,o,"stdout"),f=VS(c,o,"stderr");return Object.assign(c,{nodeChildProcess:u,stdout:l,stderr:f,[Symbol.asyncIterator]:()=>u9(l,f),pipe:(d,h,p)=>kd(d,h,p,c)})}var Pr={},ko={},XS;function l9(){if(XS)return ko;XS=1,Object.defineProperty(
|
|
2177
|
+
ko,"__esModule",{value:!0}),ko.sync=ko.isexe=void 0;const t=Fa,e=Uw,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}};ko.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}};ko.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.
|
|
2178
|
+
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,h=o.uid,p=o.gid,w=parseInt("100",8),v=parseInt("010",8),g=parseInt("001",8),E=w|v;return!!(d&g||d&v&&f.has(p)||d&w&&h===u||d&E&&u===0)};return ko}var To={},YS;function d9(){if(YS)return To;YS=1,Object.defineProperty(To,"__esModule",{value:!0}),To.sync=To.isexe=void 0;const t=Fa,e=Uw,n=async(o,a={})=>{const{ignoreErrors:u=!1}=a;try{return s(await(0,e.stat)(o),o,a)}catch(c){const l=c;
|
|
2179
|
+
if(u||l.code==="EACCES")return!1;throw l}};To.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}};To.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 To}var yw={},JS;function f9(){
|
|
2180
|
+
return JS||(JS=1,Object.defineProperty(yw,"__esModule",{value:!0})),yw}var QS;function h9(){return QS||(QS=1,function(t){var e=Pr&&Pr.__createBinding||(Object.create?function(c,l,f,d){d===void 0&&(d=f);var h=Object.getOwnPropertyDescriptor(l,f);(!h||("get"in h?!l.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return l[f]}}),Object.defineProperty(c,d,h)}:function(c,l,f,d){d===void 0&&(d=f),c[d]=l[f]}),n=Pr&&Pr.__setModuleDefault||(Object.create?function(c,l){Object.defineProperty(
|
|
2181
|
+
c,"default",{enumerable:!0,value:l})}:function(c,l){c.default=l}),r=Pr&&Pr.__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=Pr&&Pr.__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(l9());t.posix=s;const o=r(d9());t.
|
|
2182
|
+
win32=o,i(f9(),t);const u=(process.env._ISEXE_TEST_PLATFORM_||process.platform)==="win32"?o:s;t.isexe=u.isexe,t.sync=u.sync}(Pr)),Pr}var vw,ZS;function p9(){if(ZS)return vw;ZS=1;const{isexe:t,sync:e}=h9(),{join:n,delimiter:r,sep:i,posix:s}=qi,o=process.platform==="win32",a=new RegExp(`[${s.sep}${i===s.sep?"":i}]`.replace(/(\\)/g,"\\$1")),u=new RegExp(`^\\.${a.source}`),c=p=>Object.assign(new Error(`not found: ${p}`),{code:"ENOENT"}),l=(p,{path:w=process.env.PATH,pathExt:v=process.env.PATHEXT,delimiter:g=r})=>{
|
|
2183
|
+
const E=p.match(a)?[""]:[...o?[process.cwd()]:[],...(w||"").split(g)];if(o){const D=v||[".EXE",".CMD",".BAT",".COM"].join(g),A=D.split(g).flatMap(N=>[N,N.toLowerCase()]);return p.includes(".")&&A[0]!==""&&A.unshift(""),{pathEnv:E,pathExt:A,pathExtExe:D}}return{pathEnv:E,pathExt:[""]}},f=(p,w)=>{const v=/^".*"$/.test(p)?p.slice(1,-1):p;return(!v&&u.test(w)?w.slice(0,2):"")+n(v,w)},d=async(p,w={})=>{const{pathEnv:v,pathExt:g,pathExtExe:E}=l(p,w),D=[];for(const A of v){const N=f(A,p);for(const V of g){
|
|
2184
|
+
const J=N+V;if(await t(J,{pathExt:E,ignoreErrors:!0})){if(!w.all)return J;D.push(J)}}}if(w.all&&D.length)return D;if(w.nothrow)return null;throw c(p)},h=(p,w={})=>{const{pathEnv:v,pathExt:g,pathExtExe:E}=l(p,w),D=[];for(const A of v){const N=f(A,p);for(const V of g){const J=N+V;if(e(J,{pathExt:E,ignoreErrors:!0})){if(!w.all)return J;D.push(J)}}}if(w.all&&D.length)return D;if(w.nothrow)return null;throw c(p)};return vw=d,d.sync=h,vw}var m9=p9();const e_=Fr(m9),ww=QA(Math.max(1,Q_.cpus().length));
|
|
2185
|
+
class g9{dotpath;unflattenpath;constructor(e){this.dotpath=e||e_.sync("dot"),this.unflattenpath=e_.sync("unflatten")}async unflatten(e){return await ww(async()=>{const n=bn.getChild("graphviz-binary");let r;try{const i=await kd(this.unflattenpath,["-l 1","-c 3"],{timeout:1e4,stdin:{string:e}});r=i.stdout,Gt(i.stderr)||n.warn`Command ${i.command} has stderr:\n${i.stderr}`}catch(i){n.error("FAILED GraphvizBinaryAdapter.unflatten",{error:i}),i instanceof Ro&&!Gt(i.stdout)&&(n.warn`Command: '${i.command}' returned result but also failed (exitcode ${i.
|
|
2186
|
+
exitCode}): "${i.stderr}"`,r=i.stdout)}return r&&(e=r.replaceAll(/\t\[/g," [").replaceAll(/\t/g," ")),e})}async layoutJson(e){return await ww(async()=>{const n=bn.getChild("graphviz-binary");let r;try{const i=await kd(this.dotpath,["-Tjson","-y"],{timeout:1e4,stdin:{string:e}});r=i.stdout,Gt(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:
|
|
2187
|
+
${e}`),i instanceof Ro&&!Gt(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 ww(async()=>{const n=bn.getChild("graphviz-binary");let r;try{const i=await kd(this.dotpath,["-Tsvg","-y"],{timeout:1e4,stdin:{string:e}});r=i.stdout,Gt(i.stderr)||n.warn`Command ${i.command} has stderr:\n${i.stderr}`}catch(i){
|
|
2188
|
+
if(n.error("FAILED GraphvizBinaryAdapter.svg",{error:i}),n.warn(`FAILED DOT:
|
|
2189
|
+
${e}`),i instanceof Ro&&!Gt(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 y9="likec4",t_="1.28.1",bw=bn.getChild("cli");Ut.bold(Ut.bgRed(Ut.white("ERROR"))),Ut.bold(Ut.yellow("WARN")),Ut.bold(Ut.green("INFO"));function n_(t){const e=bn.getChild(t);return{info(n){e.info(n)},warn(n){if(n instanceof Error){e.warn(`${Ut.red(n.name+" "+n.message)}`,{msg:n});return}if(typeof n=="string"){e.warn(
|
|
2190
|
+
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(`${Ut.red(i.name+" "+i.message)}`,{error:i});return}e.error(`${n}`,{error:i});return}if(typeof n=="string"){e.error(`${Ut.red(n)}`);return}e.error`${n}`},clearScreen:function(n){},hasErrorLogged:function(n){throw new Error("Function not implemented.")},hasWarned:!1}}const Ew=()=>{},v9={info:Ew,warn:Ew,error:Ew},w9=1e6;function r_(t){const[e,n]=jw(t),r=e*1e3+n/w9;return{ms:r,pretty:Gp(
|
|
2191
|
+
r)}}function b9(t){const e=jw();return{stopAndLog(n="done in "){n=Ut.green(`${n}${r_(e).pretty}`),(t||bw).info(n)}}}function E9(t,e){console.log(K_(t,{padding:1,margin:1,dimBorder:!0,...e}))}class $9{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(`${Ut.dim("workspace:")} ${e.uri}`),r.initialize({capabilities:{},processId:null,
|
|
2192
|
+
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=>!id(o.uri));if(s.length===0)throw e.error("no LikeC4 sources found"),new Error("no LikeC4 sources found");e.info(`${Ut.dim("w\
|
|
2193
|
+
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 D9(t){return e=>new t(e)}const R9={logger:()=>{throw new Error("Logger must be provided")},likec4:{Layouter:()=>{throw new Error("Layouter must be provided")}},cli:{Workspace:D9($9)}};function i_(t){const e=fm(t,{useFileSystem:!0,logger:"default",graphviz:"wasm"});let n;switch(e.logger){case!1:n=v9;break;case"vite":n=n_("lang");break;case"default":n=bw.getChild(
|
|
2194
|
+
"lang");break;default:n=e.logger;break}const r=e.graphviz==="binary";n.info(`${Ut.dim("version")} ${t_}`),n.info(`${Ut.dim("layout")} ${r?"binary":"wasm"}`);const i={logger:()=>n,likec4:{Layouter:()=>new JA(r===!0?new g9:new Oa)}};return GK(e.useFileSystem?RU:{},R9,i).likec4}const s_=t=>new Error(`Invalid model:
|
|
2195
|
+
${t.getErrors().map(e=>` ${e.sourceFsPath}:${e.line} ${e.message.slice(0,200)}`).join(`
|
|
2196
|
+
`)}`);class ls{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=i_(fm(n,{useFileSystem:!1,logger:!1,graphviz:"wasm"})),i=yt.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 ls(
|
|
2197
|
+
i.path,r,n?.printErrors??!0);return n?.throwIfInvalid===!0&&o.hasErrors()?(o.dispose(),Promise.reject(s_(o))):o}static likec4Instances=new Map;static async fromWorkspace(e="",n){const r=u_(e);if(!a_(r))throw new Error(`Workspace not found: ${r}`);let i=ls.likec4Instances.get(r);if(!i){const s=i_(fm(n,{useFileSystem:!0,logger:"default",graphviz:"wasm"}));await s.cli.Workspace.initWorkspace({uri:d_(r).toString(),name:c_(r)}),await s.cli.Workspace.init(),i=new ls(r,s,n?.printErrors??!0),ls.likec4Instances.
|
|
2198
|
+
set(r,i)}return n?.throwIfInvalid===!0&&i.hasErrors()?(i.dispose(),Promise.reject(s_(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:
|
|
2199
|
+
${e.map(n=>` - ${n.folder.fsPath}`).join(`
|
|
2200
|
+
`)}
|
|
2201
|
+
|
|
2202
|
+
${Ut.red("Please specify a project folder")}
|
|
2203
|
+
`),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.
|
|
2204
|
+
parseModel(r)?r:void 0))).filter(r=>r.status==="fulfilled").flatMap(r=>r.value??[]);return lr(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 Z_.create({...r,__:"layouted",views:Qu(i,fi("id"))})}getErrors(){return this.LangiumDocuments.all.toArray().flatMap(e=>(e.diagnostics??[]).
|
|
2205
|
+
filter(n=>n.severity===Os.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===Os.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(`
|
|
2206
|
+
`);return a.length>10&&(a.length=10,a.push("...")),a.map((u,c)=>c===0?" "+Ut.dim(`Line ${o}: `)+Ut.red(u):" ".repeat(10)+Ut.red(u))}).join(`
|
|
2207
|
+
`);this.logger.error(`Invalid ${n.uri.fsPath}
|
|
2208
|
+
${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?[yt.file(e)]:[],n?[yt.file(n)]:[],s),i=!s.isCancellationRequested}),i}catch(i){return this.logger.error(rr(i)),!1}}onModelUpdate(e){const n=this.langium.likec4.ModelBuilder.onModelParsed(()=>e());return()=>{n.dispose()}}dispose(){for(const[e,n]of ls.likec4Instances)n===this&&ls.likec4Instances.
|
|
2209
|
+
delete(e)}}export{SR as A,r_ as B,He as C,sP as D,y9 as E,Gt as F,t_ as G,b9 as H,dS as I,lr as J,E1 as K,ls as L,Ab as M,Vb as N,_o as T,Yo as a,ze as b,ce as c,OC as d,Zo as e,Io as f,at as g,n_ as h,kt as i,_C as j,TR as k,Hr as l,xt as m,Rt as n,bn as o,fi as p,Fr as q,rs as r,H8 as s,gy as t,Ut as u,bw as v,AC as w,kd as x,rr as y,E9 as z};
|