pycharter 0.0.25__py3-none-any.whl → 0.0.26__py3-none-any.whl
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.
- pycharter/__init__.py +6 -0
- pycharter/api/README.md +1 -1
- pycharter/api/dependencies/auth.py +158 -0
- pycharter/api/main.py +30 -2
- pycharter/api/models/etl.py +66 -0
- pycharter/api/routes/v1/__init__.py +4 -0
- pycharter/api/routes/v1/auth.py +97 -0
- pycharter/api/routes/v1/contracts.py +10 -8
- pycharter/api/routes/v1/etl.py +131 -0
- pycharter/cli.py +1 -1
- pycharter/config.py +69 -0
- pycharter/contract_builder/builder.py +32 -37
- pycharter/data/seed/compliance_frameworks.yaml +22 -0
- pycharter/data/seed/contracts.yaml +130 -0
- pycharter/data/seed/data_feeds.yaml +22 -0
- pycharter/data/seed/domains.yaml +13 -0
- pycharter/data/seed/environments.yaml +19 -0
- pycharter/data/seed/owners.yaml +21 -0
- pycharter/data/seed/systems.yaml +13 -0
- pycharter/data/seed/tags.yaml +25 -0
- pycharter/data/templates/contract/README.md +31 -14
- pycharter/data/templates/contract/template_contract.yaml +37 -0
- pycharter/data/templates/etl/README.md +1 -1
- pycharter/data/templates/etl/extract_with_validation.yaml +86 -0
- pycharter/data/templates/etl/load_with_validation.yaml +111 -0
- pycharter/data/templates/etl/settings.yaml +55 -0
- pycharter/db/cli.py +126 -4
- pycharter/db/migrations/versions/20260122000000_change_artifact_unique_constraints_to_title_version.py +2 -2
- pycharter/etl_generator/INTERFACES.md +6 -7
- pycharter/etl_generator/__init__.py +47 -11
- pycharter/etl_generator/config_models.py +673 -0
- pycharter/etl_generator/config_validator.py +133 -157
- pycharter/etl_generator/context.py +3 -0
- pycharter/etl_generator/database.py +5 -1
- pycharter/etl_generator/extractors/__init__.py +4 -2
- pycharter/etl_generator/extractors/cloud_storage.py +9 -9
- pycharter/etl_generator/extractors/database.py +2 -2
- pycharter/etl_generator/extractors/factory.py +15 -33
- pycharter/etl_generator/extractors/file.py +2 -2
- pycharter/etl_generator/extractors/http.py +2 -2
- pycharter/etl_generator/extractors/mongodb.py +393 -0
- pycharter/etl_generator/extractors/streaming.py +2 -2
- pycharter/etl_generator/loaders/__init__.py +15 -9
- pycharter/etl_generator/loaders/{cloud_storage_loader.py → cloud_storage.py} +95 -2
- pycharter/etl_generator/loaders/factory.py +16 -29
- pycharter/etl_generator/loaders/file.py +135 -1
- pycharter/etl_generator/loaders/mongodb.py +416 -0
- pycharter/etl_generator/pipeline.py +283 -164
- pycharter/etl_generator/result.py +16 -0
- pycharter/etl_generator/schemas/__init__.py +71 -42
- pycharter/etl_generator/transformers/config.py +3 -2
- pycharter/etl_generator/transformers/simple_operations.py +57 -4
- pycharter/etl_generator/validation.py +551 -0
- pycharter/runtime_validator/__init__.py +7 -0
- pycharter/runtime_validator/utils.py +33 -0
- pycharter/runtime_validator/validator.py +13 -10
- pycharter/ui/package-lock.json +50 -41
- pycharter/ui/package.json +2 -1
- pycharter/ui/static/404/index.html +1 -1
- pycharter/ui/static/404.html +1 -1
- pycharter/ui/static/__next.__PAGE__.txt +2 -2
- pycharter/ui/static/__next._full.txt +7 -7
- pycharter/ui/static/__next._head.txt +1 -1
- pycharter/ui/static/__next._index.txt +6 -6
- pycharter/ui/static/__next._tree.txt +2 -2
- pycharter/ui/static/_next/static/chunks/0fc1f70b787b8845.js +1 -0
- pycharter/ui/static/_next/static/chunks/17bb8075d7b75663.css +1 -0
- pycharter/ui/static/_next/static/chunks/381932864dcbfdb8.js +1 -0
- pycharter/ui/static/_next/static/chunks/4c951b8e4507e2b3.js +1 -0
- pycharter/ui/static/_next/static/chunks/68b87a6f65abd3ed.js +1 -0
- pycharter/ui/static/_next/static/chunks/78572617b8fae189.js +1 -0
- pycharter/ui/static/_next/static/chunks/8b7be2803e3fe184.js +1 -0
- pycharter/ui/static/_next/static/chunks/a8e529fd1e67f121.js +1 -0
- pycharter/ui/static/_next/static/chunks/c35d998f80be3ff5.js +1 -0
- pycharter/ui/static/_next/static/chunks/e453aa5d01c32c17.js +1 -0
- pycharter/ui/static/_next/static/chunks/f2d240eb057f898a.js +970 -0
- pycharter/ui/static/_next/static/chunks/f7722448f6040846.js +1 -0
- pycharter/ui/static/_not-found/__next._full.txt +12 -12
- pycharter/ui/static/_not-found/__next._head.txt +3 -3
- pycharter/ui/static/_not-found/__next._index.txt +8 -8
- pycharter/ui/static/_not-found/__next._not-found.__PAGE__.txt +2 -2
- pycharter/ui/static/_not-found/__next._not-found.txt +3 -3
- pycharter/ui/static/_not-found/__next._tree.txt +2 -2
- pycharter/ui/static/_not-found/index.html +1 -1
- pycharter/ui/static/_not-found/index.txt +12 -12
- pycharter/ui/static/contracts/__next._full.txt +7 -7
- pycharter/ui/static/contracts/__next._head.txt +1 -1
- pycharter/ui/static/contracts/__next._index.txt +6 -6
- pycharter/ui/static/contracts/__next._tree.txt +2 -2
- pycharter/ui/static/contracts/__next.contracts.__PAGE__.txt +2 -2
- pycharter/ui/static/contracts/__next.contracts.txt +1 -1
- pycharter/ui/static/contracts/index.html +1 -1
- pycharter/ui/static/contracts/index.txt +7 -7
- pycharter/ui/static/documentation/__next._full.txt +7 -7
- pycharter/ui/static/documentation/__next._head.txt +1 -1
- pycharter/ui/static/documentation/__next._index.txt +6 -6
- pycharter/ui/static/documentation/__next._tree.txt +2 -2
- pycharter/ui/static/documentation/__next.documentation.__PAGE__.txt +2 -2
- pycharter/ui/static/documentation/__next.documentation.txt +1 -1
- pycharter/ui/static/documentation/index.html +3 -3
- pycharter/ui/static/documentation/index.txt +7 -7
- pycharter/ui/static/etl/__next._full.txt +21 -0
- pycharter/ui/static/etl/__next._head.txt +7 -0
- pycharter/ui/static/etl/__next._index.txt +9 -0
- pycharter/ui/static/etl/__next._tree.txt +2 -0
- pycharter/ui/static/etl/__next.etl.__PAGE__.txt +9 -0
- pycharter/ui/static/etl/__next.etl.txt +4 -0
- pycharter/ui/static/etl/index.html +2 -0
- pycharter/ui/static/etl/index.txt +21 -0
- pycharter/ui/static/index.html +1 -1
- pycharter/ui/static/index.txt +7 -7
- pycharter/ui/static/metadata/__next._full.txt +7 -7
- pycharter/ui/static/metadata/__next._head.txt +1 -1
- pycharter/ui/static/metadata/__next._index.txt +6 -6
- pycharter/ui/static/metadata/__next._tree.txt +2 -2
- pycharter/ui/static/metadata/__next.metadata.__PAGE__.txt +2 -2
- pycharter/ui/static/metadata/__next.metadata.txt +1 -1
- pycharter/ui/static/metadata/index.html +1 -1
- pycharter/ui/static/metadata/index.txt +7 -7
- pycharter/ui/static/quality/__next._full.txt +7 -7
- pycharter/ui/static/quality/__next._head.txt +1 -1
- pycharter/ui/static/quality/__next._index.txt +6 -6
- pycharter/ui/static/quality/__next._tree.txt +2 -2
- pycharter/ui/static/quality/__next.quality.__PAGE__.txt +2 -2
- pycharter/ui/static/quality/__next.quality.txt +1 -1
- pycharter/ui/static/quality/index.html +2 -2
- pycharter/ui/static/quality/index.txt +7 -7
- pycharter/ui/static/rules/__next._full.txt +7 -7
- pycharter/ui/static/rules/__next._head.txt +1 -1
- pycharter/ui/static/rules/__next._index.txt +6 -6
- pycharter/ui/static/rules/__next._tree.txt +2 -2
- pycharter/ui/static/rules/__next.rules.__PAGE__.txt +2 -2
- pycharter/ui/static/rules/__next.rules.txt +1 -1
- pycharter/ui/static/rules/index.html +1 -1
- pycharter/ui/static/rules/index.txt +7 -7
- pycharter/ui/static/schemas/__next._full.txt +7 -7
- pycharter/ui/static/schemas/__next._head.txt +1 -1
- pycharter/ui/static/schemas/__next._index.txt +6 -6
- pycharter/ui/static/schemas/__next._tree.txt +2 -2
- pycharter/ui/static/schemas/__next.schemas.__PAGE__.txt +2 -2
- pycharter/ui/static/schemas/__next.schemas.txt +1 -1
- pycharter/ui/static/schemas/index.html +1 -1
- pycharter/ui/static/schemas/index.txt +7 -7
- pycharter/ui/static/settings/__next._full.txt +7 -7
- pycharter/ui/static/settings/__next._head.txt +1 -1
- pycharter/ui/static/settings/__next._index.txt +6 -6
- pycharter/ui/static/settings/__next._tree.txt +2 -2
- pycharter/ui/static/settings/__next.settings.__PAGE__.txt +2 -2
- pycharter/ui/static/settings/__next.settings.txt +1 -1
- pycharter/ui/static/settings/index.html +1 -1
- pycharter/ui/static/settings/index.txt +7 -7
- pycharter/ui/static/static/404/index.html +1 -1
- pycharter/ui/static/static/404.html +1 -1
- pycharter/ui/static/static/__next.__PAGE__.txt +1 -1
- pycharter/ui/static/static/__next._full.txt +1 -1
- pycharter/ui/static/static/__next._head.txt +1 -1
- pycharter/ui/static/static/__next._index.txt +1 -1
- pycharter/ui/static/static/__next._tree.txt +1 -1
- pycharter/ui/static/static/_not-found/__next._full.txt +1 -1
- pycharter/ui/static/static/_not-found/__next._head.txt +1 -1
- pycharter/ui/static/static/_not-found/__next._index.txt +1 -1
- pycharter/ui/static/static/_not-found/__next._not-found.__PAGE__.txt +1 -1
- pycharter/ui/static/static/_not-found/__next._not-found.txt +1 -1
- pycharter/ui/static/static/_not-found/__next._tree.txt +1 -1
- pycharter/ui/static/static/_not-found/index.html +1 -1
- pycharter/ui/static/static/_not-found/index.txt +1 -1
- pycharter/ui/static/static/contracts/__next._full.txt +2 -2
- pycharter/ui/static/static/contracts/__next._head.txt +1 -1
- pycharter/ui/static/static/contracts/__next._index.txt +1 -1
- pycharter/ui/static/static/contracts/__next._tree.txt +1 -1
- pycharter/ui/static/static/contracts/__next.contracts.__PAGE__.txt +2 -2
- pycharter/ui/static/static/contracts/__next.contracts.txt +1 -1
- pycharter/ui/static/static/contracts/index.html +1 -1
- pycharter/ui/static/static/contracts/index.txt +2 -2
- pycharter/ui/static/static/documentation/__next._full.txt +1 -1
- pycharter/ui/static/static/documentation/__next._head.txt +1 -1
- pycharter/ui/static/static/documentation/__next._index.txt +1 -1
- pycharter/ui/static/static/documentation/__next._tree.txt +1 -1
- pycharter/ui/static/static/documentation/__next.documentation.__PAGE__.txt +1 -1
- pycharter/ui/static/static/documentation/__next.documentation.txt +1 -1
- pycharter/ui/static/static/documentation/index.html +2 -2
- pycharter/ui/static/static/documentation/index.txt +1 -1
- pycharter/ui/static/static/index.html +1 -1
- pycharter/ui/static/static/index.txt +1 -1
- pycharter/ui/static/static/metadata/__next._full.txt +1 -1
- pycharter/ui/static/static/metadata/__next._head.txt +1 -1
- pycharter/ui/static/static/metadata/__next._index.txt +1 -1
- pycharter/ui/static/static/metadata/__next._tree.txt +1 -1
- pycharter/ui/static/static/metadata/__next.metadata.__PAGE__.txt +1 -1
- pycharter/ui/static/static/metadata/__next.metadata.txt +1 -1
- pycharter/ui/static/static/metadata/index.html +1 -1
- pycharter/ui/static/static/metadata/index.txt +1 -1
- pycharter/ui/static/static/quality/__next._full.txt +2 -2
- pycharter/ui/static/static/quality/__next._head.txt +1 -1
- pycharter/ui/static/static/quality/__next._index.txt +1 -1
- pycharter/ui/static/static/quality/__next._tree.txt +1 -1
- pycharter/ui/static/static/quality/__next.quality.__PAGE__.txt +2 -2
- pycharter/ui/static/static/quality/__next.quality.txt +1 -1
- pycharter/ui/static/static/quality/index.html +2 -2
- pycharter/ui/static/static/quality/index.txt +2 -2
- pycharter/ui/static/static/rules/__next._full.txt +1 -1
- pycharter/ui/static/static/rules/__next._head.txt +1 -1
- pycharter/ui/static/static/rules/__next._index.txt +1 -1
- pycharter/ui/static/static/rules/__next._tree.txt +1 -1
- pycharter/ui/static/static/rules/__next.rules.__PAGE__.txt +1 -1
- pycharter/ui/static/static/rules/__next.rules.txt +1 -1
- pycharter/ui/static/static/rules/index.html +1 -1
- pycharter/ui/static/static/rules/index.txt +1 -1
- pycharter/ui/static/static/schemas/__next._full.txt +1 -1
- pycharter/ui/static/static/schemas/__next._head.txt +1 -1
- pycharter/ui/static/static/schemas/__next._index.txt +1 -1
- pycharter/ui/static/static/schemas/__next._tree.txt +1 -1
- pycharter/ui/static/static/schemas/__next.schemas.__PAGE__.txt +1 -1
- pycharter/ui/static/static/schemas/__next.schemas.txt +1 -1
- pycharter/ui/static/static/schemas/index.html +1 -1
- pycharter/ui/static/static/schemas/index.txt +1 -1
- pycharter/ui/static/static/settings/__next._full.txt +1 -1
- pycharter/ui/static/static/settings/__next._head.txt +1 -1
- pycharter/ui/static/static/settings/__next._index.txt +1 -1
- pycharter/ui/static/static/settings/__next._tree.txt +1 -1
- pycharter/ui/static/static/settings/__next.settings.__PAGE__.txt +1 -1
- pycharter/ui/static/static/settings/__next.settings.txt +1 -1
- pycharter/ui/static/static/settings/index.html +1 -1
- pycharter/ui/static/static/settings/index.txt +1 -1
- pycharter/ui/static/static/static/404/index.html +1 -1
- pycharter/ui/static/static/static/404.html +1 -1
- pycharter/ui/static/static/static/__next.__PAGE__.txt +1 -1
- pycharter/ui/static/static/static/__next._full.txt +2 -2
- pycharter/ui/static/static/static/__next._head.txt +1 -1
- pycharter/ui/static/static/static/__next._index.txt +2 -2
- pycharter/ui/static/static/static/__next._tree.txt +2 -2
- pycharter/ui/static/static/static/_next/static/chunks/f7d1a90dd75d2572.js +1 -0
- pycharter/ui/static/static/static/_not-found/__next._full.txt +2 -2
- pycharter/ui/static/static/static/_not-found/__next._head.txt +1 -1
- pycharter/ui/static/static/static/_not-found/__next._index.txt +2 -2
- pycharter/ui/static/static/static/_not-found/__next._not-found.__PAGE__.txt +1 -1
- pycharter/ui/static/static/static/_not-found/__next._not-found.txt +1 -1
- pycharter/ui/static/static/static/_not-found/__next._tree.txt +2 -2
- pycharter/ui/static/static/static/_not-found/index.html +1 -1
- pycharter/ui/static/static/static/_not-found/index.txt +2 -2
- pycharter/ui/static/static/static/contracts/__next._full.txt +3 -3
- pycharter/ui/static/static/static/contracts/__next._head.txt +1 -1
- pycharter/ui/static/static/static/contracts/__next._index.txt +2 -2
- pycharter/ui/static/static/static/contracts/__next._tree.txt +2 -2
- pycharter/ui/static/static/static/contracts/__next.contracts.__PAGE__.txt +2 -2
- pycharter/ui/static/static/static/contracts/__next.contracts.txt +1 -1
- pycharter/ui/static/static/static/contracts/index.html +1 -1
- pycharter/ui/static/static/static/contracts/index.txt +3 -3
- pycharter/ui/static/static/static/documentation/__next._full.txt +3 -3
- pycharter/ui/static/static/static/documentation/__next._head.txt +1 -1
- pycharter/ui/static/static/static/documentation/__next._index.txt +2 -2
- pycharter/ui/static/static/static/documentation/__next._tree.txt +2 -2
- pycharter/ui/static/static/static/documentation/__next.documentation.__PAGE__.txt +2 -2
- pycharter/ui/static/static/static/documentation/__next.documentation.txt +1 -1
- pycharter/ui/static/static/static/documentation/index.html +2 -2
- pycharter/ui/static/static/static/documentation/index.txt +3 -3
- pycharter/ui/static/static/static/index.html +1 -1
- pycharter/ui/static/static/static/index.txt +2 -2
- pycharter/ui/static/static/static/metadata/__next._full.txt +2 -2
- pycharter/ui/static/static/static/metadata/__next._head.txt +1 -1
- pycharter/ui/static/static/static/metadata/__next._index.txt +2 -2
- pycharter/ui/static/static/static/metadata/__next._tree.txt +2 -2
- pycharter/ui/static/static/static/metadata/__next.metadata.__PAGE__.txt +1 -1
- pycharter/ui/static/static/static/metadata/__next.metadata.txt +1 -1
- pycharter/ui/static/static/static/metadata/index.html +1 -1
- pycharter/ui/static/static/static/metadata/index.txt +2 -2
- pycharter/ui/static/static/static/quality/__next._full.txt +2 -2
- pycharter/ui/static/static/static/quality/__next._head.txt +1 -1
- pycharter/ui/static/static/static/quality/__next._index.txt +2 -2
- pycharter/ui/static/static/static/quality/__next._tree.txt +2 -2
- pycharter/ui/static/static/static/quality/__next.quality.__PAGE__.txt +1 -1
- pycharter/ui/static/static/static/quality/__next.quality.txt +1 -1
- pycharter/ui/static/static/static/quality/index.html +2 -2
- pycharter/ui/static/static/static/quality/index.txt +2 -2
- pycharter/ui/static/static/static/rules/__next._full.txt +2 -2
- pycharter/ui/static/static/static/rules/__next._head.txt +1 -1
- pycharter/ui/static/static/static/rules/__next._index.txt +2 -2
- pycharter/ui/static/static/static/rules/__next._tree.txt +2 -2
- pycharter/ui/static/static/static/rules/__next.rules.__PAGE__.txt +1 -1
- pycharter/ui/static/static/static/rules/__next.rules.txt +1 -1
- pycharter/ui/static/static/static/rules/index.html +1 -1
- pycharter/ui/static/static/static/rules/index.txt +2 -2
- pycharter/ui/static/static/static/schemas/__next._full.txt +2 -2
- pycharter/ui/static/static/static/schemas/__next._head.txt +1 -1
- pycharter/ui/static/static/static/schemas/__next._index.txt +2 -2
- pycharter/ui/static/static/static/schemas/__next._tree.txt +2 -2
- pycharter/ui/static/static/static/schemas/__next.schemas.__PAGE__.txt +1 -1
- pycharter/ui/static/static/static/schemas/__next.schemas.txt +1 -1
- pycharter/ui/static/static/static/schemas/index.html +1 -1
- pycharter/ui/static/static/static/schemas/index.txt +2 -2
- pycharter/ui/static/static/static/settings/__next._full.txt +2 -2
- pycharter/ui/static/static/static/settings/__next._head.txt +1 -1
- pycharter/ui/static/static/static/settings/__next._index.txt +2 -2
- pycharter/ui/static/static/static/settings/__next._tree.txt +2 -2
- pycharter/ui/static/static/static/settings/__next.settings.__PAGE__.txt +1 -1
- pycharter/ui/static/static/static/settings/__next.settings.txt +1 -1
- pycharter/ui/static/static/static/settings/index.html +1 -1
- pycharter/ui/static/static/static/settings/index.txt +2 -2
- pycharter/ui/static/static/static/static/.gitkeep +0 -0
- pycharter/ui/static/static/static/static/404/index.html +1 -0
- pycharter/ui/static/static/static/static/404.html +1 -0
- pycharter/ui/static/static/static/static/__next.__PAGE__.txt +10 -0
- pycharter/ui/static/static/static/static/__next._full.txt +30 -0
- pycharter/ui/static/static/static/static/__next._head.txt +7 -0
- pycharter/ui/static/static/static/static/__next._index.txt +9 -0
- pycharter/ui/static/static/static/static/__next._tree.txt +2 -0
- pycharter/ui/static/static/static/static/_next/static/chunks/222442f6da32302a.js +1 -0
- pycharter/ui/static/static/static/static/_next/static/chunks/247eb132b7f7b574.js +1 -0
- pycharter/ui/static/static/static/static/_next/static/chunks/297d55555b71baba.js +1 -0
- pycharter/ui/static/static/static/static/_next/static/chunks/414e77373f8ff61c.js +1 -0
- pycharter/ui/static/static/static/static/_next/static/chunks/652ad0aa26265c47.js +2 -0
- pycharter/ui/static/static/static/static/_next/static/chunks/9c23f44fff36548a.js +1 -0
- pycharter/ui/static/static/static/static/_next/static/chunks/a6dad97d9634a72d.js +1 -0
- pycharter/ui/static/static/static/static/_next/static/chunks/b32a0963684b9933.js +4 -0
- pycharter/ui/static/static/static/static/_next/static/chunks/db913959c675cea6.js +1 -0
- pycharter/ui/static/static/static/static/_next/static/chunks/f2e7afeab1178138.js +1 -0
- pycharter/ui/static/static/static/static/_next/static/chunks/ff1a16fafef87110.js +1 -0
- pycharter/ui/static/static/static/static/_next/static/chunks/turbopack-ffcb7ab6794027ef.js +3 -0
- pycharter/ui/static/static/static/static/_next/static/tNTkVW6puVXC4bAm4WrHl/_buildManifest.js +11 -0
- pycharter/ui/static/static/static/static/_next/static/tNTkVW6puVXC4bAm4WrHl/_clientMiddlewareManifest.json +1 -0
- pycharter/ui/static/static/static/static/_next/static/tNTkVW6puVXC4bAm4WrHl/_ssgManifest.js +1 -0
- pycharter/ui/static/static/static/static/_not-found/__next._full.txt +17 -0
- pycharter/ui/static/static/static/static/_not-found/__next._head.txt +7 -0
- pycharter/ui/static/static/static/static/_not-found/__next._index.txt +9 -0
- pycharter/ui/static/static/static/static/_not-found/__next._not-found.__PAGE__.txt +5 -0
- pycharter/ui/static/static/static/static/_not-found/__next._not-found.txt +4 -0
- pycharter/ui/static/static/static/static/_not-found/__next._tree.txt +2 -0
- pycharter/ui/static/static/static/static/_not-found/index.html +1 -0
- pycharter/ui/static/static/static/static/_not-found/index.txt +17 -0
- pycharter/ui/static/static/static/static/contracts/__next._full.txt +21 -0
- pycharter/ui/static/static/static/static/contracts/__next._head.txt +7 -0
- pycharter/ui/static/static/static/static/contracts/__next._index.txt +9 -0
- pycharter/ui/static/static/static/static/contracts/__next._tree.txt +2 -0
- pycharter/ui/static/static/static/static/contracts/__next.contracts.__PAGE__.txt +9 -0
- pycharter/ui/static/static/static/static/contracts/__next.contracts.txt +4 -0
- pycharter/ui/static/static/static/static/contracts/index.html +1 -0
- pycharter/ui/static/static/static/static/contracts/index.txt +21 -0
- pycharter/ui/static/static/static/static/documentation/__next._full.txt +21 -0
- pycharter/ui/static/static/static/static/documentation/__next._head.txt +7 -0
- pycharter/ui/static/static/static/static/documentation/__next._index.txt +9 -0
- pycharter/ui/static/static/static/static/documentation/__next._tree.txt +2 -0
- pycharter/ui/static/static/static/static/documentation/__next.documentation.__PAGE__.txt +9 -0
- pycharter/ui/static/static/static/static/documentation/__next.documentation.txt +4 -0
- pycharter/ui/static/static/static/static/documentation/index.html +93 -0
- pycharter/ui/static/static/static/static/documentation/index.txt +21 -0
- pycharter/ui/static/static/static/static/index.html +1 -0
- pycharter/ui/static/static/static/static/index.txt +30 -0
- pycharter/ui/static/static/static/static/metadata/__next._full.txt +21 -0
- pycharter/ui/static/static/static/static/metadata/__next._head.txt +7 -0
- pycharter/ui/static/static/static/static/metadata/__next._index.txt +9 -0
- pycharter/ui/static/static/static/static/metadata/__next._tree.txt +2 -0
- pycharter/ui/static/static/static/static/metadata/__next.metadata.__PAGE__.txt +9 -0
- pycharter/ui/static/static/static/static/metadata/__next.metadata.txt +4 -0
- pycharter/ui/static/static/static/static/metadata/index.html +1 -0
- pycharter/ui/static/static/static/static/metadata/index.txt +21 -0
- pycharter/ui/static/static/static/static/quality/__next._full.txt +21 -0
- pycharter/ui/static/static/static/static/quality/__next._head.txt +7 -0
- pycharter/ui/static/static/static/static/quality/__next._index.txt +9 -0
- pycharter/ui/static/static/static/static/quality/__next._tree.txt +2 -0
- pycharter/ui/static/static/static/static/quality/__next.quality.__PAGE__.txt +9 -0
- pycharter/ui/static/static/static/static/quality/__next.quality.txt +4 -0
- pycharter/ui/static/static/static/static/quality/index.html +2 -0
- pycharter/ui/static/static/static/static/quality/index.txt +21 -0
- pycharter/ui/static/static/static/static/rules/__next._full.txt +21 -0
- pycharter/ui/static/static/static/static/rules/__next._head.txt +7 -0
- pycharter/ui/static/static/static/static/rules/__next._index.txt +9 -0
- pycharter/ui/static/static/static/static/rules/__next._tree.txt +2 -0
- pycharter/ui/static/static/static/static/rules/__next.rules.__PAGE__.txt +9 -0
- pycharter/ui/static/static/static/static/rules/__next.rules.txt +4 -0
- pycharter/ui/static/static/static/static/rules/index.html +1 -0
- pycharter/ui/static/static/static/static/rules/index.txt +21 -0
- pycharter/ui/static/static/static/static/schemas/__next._full.txt +21 -0
- pycharter/ui/static/static/static/static/schemas/__next._head.txt +7 -0
- pycharter/ui/static/static/static/static/schemas/__next._index.txt +9 -0
- pycharter/ui/static/static/static/static/schemas/__next._tree.txt +2 -0
- pycharter/ui/static/static/static/static/schemas/__next.schemas.__PAGE__.txt +9 -0
- pycharter/ui/static/static/static/static/schemas/__next.schemas.txt +4 -0
- pycharter/ui/static/static/static/static/schemas/index.html +1 -0
- pycharter/ui/static/static/static/static/schemas/index.txt +21 -0
- pycharter/ui/static/static/static/static/settings/__next._full.txt +21 -0
- pycharter/ui/static/static/static/static/settings/__next._head.txt +7 -0
- pycharter/ui/static/static/static/static/settings/__next._index.txt +9 -0
- pycharter/ui/static/static/static/static/settings/__next._tree.txt +2 -0
- pycharter/ui/static/static/static/static/settings/__next.settings.__PAGE__.txt +9 -0
- pycharter/ui/static/static/static/static/settings/__next.settings.txt +4 -0
- pycharter/ui/static/static/static/static/settings/index.html +1 -0
- pycharter/ui/static/static/static/static/settings/index.txt +21 -0
- pycharter/ui/static/static/static/static/validation/__next._full.txt +21 -0
- pycharter/ui/static/static/static/static/validation/__next._head.txt +7 -0
- pycharter/ui/static/static/static/static/validation/__next._index.txt +9 -0
- pycharter/ui/static/static/static/static/validation/__next._tree.txt +2 -0
- pycharter/ui/static/static/static/static/validation/__next.validation.__PAGE__.txt +9 -0
- pycharter/ui/static/static/static/static/validation/__next.validation.txt +4 -0
- pycharter/ui/static/static/static/static/validation/index.html +1 -0
- pycharter/ui/static/static/static/static/validation/index.txt +21 -0
- pycharter/ui/static/static/static/validation/__next._full.txt +2 -2
- pycharter/ui/static/static/static/validation/__next._head.txt +1 -1
- pycharter/ui/static/static/static/validation/__next._index.txt +2 -2
- pycharter/ui/static/static/static/validation/__next._tree.txt +2 -2
- pycharter/ui/static/static/static/validation/__next.validation.__PAGE__.txt +1 -1
- pycharter/ui/static/static/static/validation/__next.validation.txt +1 -1
- pycharter/ui/static/static/static/validation/index.html +1 -1
- pycharter/ui/static/static/static/validation/index.txt +2 -2
- pycharter/ui/static/static/validation/__next._full.txt +2 -2
- pycharter/ui/static/static/validation/__next._head.txt +1 -1
- pycharter/ui/static/static/validation/__next._index.txt +1 -1
- pycharter/ui/static/static/validation/__next._tree.txt +1 -1
- pycharter/ui/static/static/validation/__next.validation.__PAGE__.txt +2 -2
- pycharter/ui/static/static/validation/__next.validation.txt +1 -1
- pycharter/ui/static/static/validation/index.html +1 -1
- pycharter/ui/static/static/validation/index.txt +2 -2
- pycharter/ui/static/validation/__next._full.txt +7 -7
- pycharter/ui/static/validation/__next._head.txt +1 -1
- pycharter/ui/static/validation/__next._index.txt +6 -6
- pycharter/ui/static/validation/__next._tree.txt +2 -2
- pycharter/ui/static/validation/__next.validation.__PAGE__.txt +2 -2
- pycharter/ui/static/validation/__next.validation.txt +1 -1
- pycharter/ui/static/validation/index.html +1 -1
- pycharter/ui/static/validation/index.txt +7 -7
- {pycharter-0.0.25.dist-info → pycharter-0.0.26.dist-info}/METADATA +57 -26
- pycharter-0.0.26.dist-info/RECORD +702 -0
- pycharter/etl_generator/config_loader.py +0 -394
- pycharter/etl_generator/loaders/cloud.py +0 -87
- pycharter/etl_generator/loaders/file_loader.py +0 -130
- pycharter/etl_generator/schemas/extract.json +0 -234
- pycharter/etl_generator/schemas/load.json +0 -202
- pycharter/etl_generator/schemas/pipeline.json +0 -94
- pycharter/etl_generator/schemas/transform.json +0 -171
- pycharter-0.0.25.dist-info/RECORD +0 -572
- /pycharter/ui/static/_next/static/{2gKjNv6YvE6BcIdFthBLs → YCnlK66gA7FV5vvcixspB}/_buildManifest.js +0 -0
- /pycharter/ui/static/_next/static/{2gKjNv6YvE6BcIdFthBLs → YCnlK66gA7FV5vvcixspB}/_clientMiddlewareManifest.json +0 -0
- /pycharter/ui/static/_next/static/{2gKjNv6YvE6BcIdFthBLs → YCnlK66gA7FV5vvcixspB}/_ssgManifest.js +0 -0
- /pycharter/ui/static/static/_next/static/{0rYA78L88aUyD2Uh38hhX → 2gKjNv6YvE6BcIdFthBLs}/_buildManifest.js +0 -0
- /pycharter/ui/static/static/_next/static/{0rYA78L88aUyD2Uh38hhX → 2gKjNv6YvE6BcIdFthBLs}/_clientMiddlewareManifest.json +0 -0
- /pycharter/ui/static/static/_next/static/{0rYA78L88aUyD2Uh38hhX → 2gKjNv6YvE6BcIdFthBLs}/_ssgManifest.js +0 -0
- /pycharter/ui/static/{_next → static/_next}/static/chunks/26dfc590f7714c03.js +0 -0
- /pycharter/ui/static/{_next → static/_next}/static/chunks/34d289e6db2ef551.js +0 -0
- /pycharter/ui/static/{_next → static/_next}/static/chunks/99508d9d5869cc27.js +0 -0
- /pycharter/ui/static/{_next → static/_next}/static/chunks/b313c35a6ba76574.js +0 -0
- /pycharter/ui/static/static/static/_next/static/{tNTkVW6puVXC4bAm4WrHl → 0rYA78L88aUyD2Uh38hhX}/_buildManifest.js +0 -0
- /pycharter/ui/static/static/static/_next/static/{tNTkVW6puVXC4bAm4WrHl → 0rYA78L88aUyD2Uh38hhX}/_clientMiddlewareManifest.json +0 -0
- /pycharter/ui/static/static/static/_next/static/{tNTkVW6puVXC4bAm4WrHl → 0rYA78L88aUyD2Uh38hhX}/_ssgManifest.js +0 -0
- /pycharter/ui/static/{_next → static/static/_next}/static/chunks/13d4a0fbd74c1ee4.js +0 -0
- /pycharter/ui/static/{_next → static/static/_next}/static/chunks/2edb43b48432ac04.js +0 -0
- /pycharter/ui/static/static/{_next → static/_next}/static/chunks/c4fa4f4114b7c352.js +0 -0
- /pycharter/ui/static/{_next → static/static/_next}/static/chunks/d2363397e1b2bcab.css +0 -0
- /pycharter/ui/static/{_next → static/static/static/_next}/static/chunks/2ab439ce003cd691.js +0 -0
- /pycharter/ui/static/{_next → static/static/static/_next}/static/chunks/49ca65abd26ae49e.js +0 -0
- /pycharter/ui/static/static/static/{_next → static/_next}/static/chunks/4e310fe5005770a3.css +0 -0
- /pycharter/ui/static/static/{_next → static/static/_next}/static/chunks/5e04d10c4a7b58a3.js +0 -0
- /pycharter/ui/static/static/static/{_next → static/_next}/static/chunks/5fc14c00a2779dc5.js +0 -0
- /pycharter/ui/static/static/{_next → static/static/_next}/static/chunks/75d88a058d8ffaa6.js +0 -0
- /pycharter/ui/static/static/{_next → static/static/_next}/static/chunks/8c89634cf6bad76f.js +0 -0
- /pycharter/ui/static/{_next → static/static/static/_next}/static/chunks/9667e7a3d359eb39.js +0 -0
- /pycharter/ui/static/static/static/{_next → static/_next}/static/chunks/b584574fdc8ab13e.js +0 -0
- /pycharter/ui/static/{_next → static/static/static/_next}/static/chunks/c69f6cba366bd988.js +0 -0
- /pycharter/ui/static/static/static/{_next → static/_next}/static/chunks/d5989c94d3614b3a.js +0 -0
- /pycharter/ui/static/{_next → static/static/static/_next}/static/chunks/f061a4be97bfc3b3.js +0 -0
- {pycharter-0.0.25.dist-info → pycharter-0.0.26.dist-info}/WHEEL +0 -0
- {pycharter-0.0.25.dist-info → pycharter-0.0.26.dist-info}/entry_points.txt +0 -0
- {pycharter-0.0.25.dist-info → pycharter-0.0.26.dist-info}/licenses/LICENSE +0 -0
- {pycharter-0.0.25.dist-info → pycharter-0.0.26.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,65870,e=>{"use strict";var t=e.i(43476),n=e.i(71645),i=e.i(15288),r=e.i(19455),a=e.i(46652),s=e.i(37727),o=e.i(95468),l=e.i(63209),c=e.i(9165),d=function(e,t){var n,i="";for(n=0;n<t;n+=1)i+=e;return i},u=function(e){return 0===e&&-1/0==1/e};function m(e,t){var n="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(n+="\n\n"+e.mark.snippet),i+" "+n):i}function p(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=m(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||""}function h(e,t,n,i,r){var a="",s="",o=Math.floor(r/2)-1;return i-t>o&&(t=i-o+(a=" ... ").length),n-i>o&&(n=i+o-(s=" ...").length),{str:a+e.slice(t,n).replace(/\t/g,"→")+s,pos:i-t+a.length}}function f(e,t){return d(" ",t-e.length)+e}p.prototype=Object.create(Error.prototype),p.prototype.constructor=p,p.prototype.toString=function(e){return this.name+": "+m(this,e)};var x=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var n=/\r?\n|\r|\0/g,i=[0],r=[],a=-1;s=n.exec(e.buffer);)r.push(s.index),i.push(s.index+s[0].length),e.position<=s.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var s,o,l,c="",u=Math.min(e.line+t.linesAfter,r.length).toString().length,m=t.maxLength-(t.indent+u+3);for(o=1;o<=t.linesBefore&&!(a-o<0);o++)l=h(e.buffer,i[a-o],r[a-o],e.position-(i[a]-i[a-o]),m),c=d(" ",t.indent)+f((e.line-o+1).toString(),u)+" | "+l.str+"\n"+c;for(l=h(e.buffer,i[a],r[a],e.position,m),c+=d(" ",t.indent)+f((e.line+1).toString(),u)+" | "+l.str+"\n"+d("-",t.indent+u+3+l.pos)+"^\n",o=1;o<=t.linesAfter&&!(a+o>=r.length);o++)l=h(e.buffer,i[a+o],r[a+o],e.position-(i[a]-i[a+o]),m),c+=d(" ",t.indent)+f((e.line+o+1).toString(),u)+" | "+l.str+"\n";return c.replace(/\n$/,"")},g=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],b=["scalar","sequence","mapping"],v=function(e,t){var n,i;if(Object.keys(t=t||{}).forEach(function(t){if(-1===g.indexOf(t))throw new p('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=(n=t.styleAliases||null,i={},null!==n&&Object.keys(n).forEach(function(e){n[e].forEach(function(t){i[String(t)]=e})}),i),-1===b.indexOf(this.kind))throw new p('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function j(e,t){var n=[];return e[t].forEach(function(e){var t=n.length;n.forEach(function(n,i){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=i)}),n[t]=e}),n}function y(e){return this.extend(e)}y.prototype.extend=function(e){var t=[],n=[];if(e instanceof v)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new p("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.forEach(function(e){if(!(e instanceof v))throw new p("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new p("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new p("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(e){if(!(e instanceof v))throw new p("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(y.prototype);return i.implicit=(this.implicit||[]).concat(t),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=j(i,"implicit"),i.compiledExplicit=j(i,"explicit"),i.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(e){e.multi?(n.multi[e.kind].push(e),n.multi.fallback.push(e)):n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(i);return n}(i.compiledImplicit,i.compiledExplicit),i};var w=new y({explicit:[new v("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}}),new v("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}}),new v("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})]}),N=new v("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),k=new v("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"}),C=new v("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i,r,a=e.length,s=0,o=!1;if(!a)return!1;if(("-"===(r=e[s])||"+"===r)&&(r=e[++s]),"0"===r){if(s+1===a)return!0;if("b"===(r=e[++s])){for(s++;s<a;s++)if("_"!==(r=e[s])){if("0"!==r&&"1"!==r)return!1;o=!0}return o&&"_"!==r}if("x"===r){for(s++;s<a;s++)if("_"!==(r=e[s])){if(!(48<=(t=e.charCodeAt(s))&&t<=57||65<=t&&t<=70||97<=t&&t<=102))return!1;o=!0}return o&&"_"!==r}if("o"===r){for(s++;s<a;s++)if("_"!==(r=e[s])){if(!(48<=(n=e.charCodeAt(s))&&n<=55))return!1;o=!0}return o&&"_"!==r}}if("_"===r)return!1;for(;s<a;s++)if("_"!==(r=e[s])){if(!(48<=(i=e.charCodeAt(s))&&i<=57))return!1;o=!0}return!!o&&"_"!==r},construct:function(e){var t,n=e,i=1;if(-1!==n.indexOf("_")&&(n=n.replace(/_/g,"")),("-"===(t=n[0])||"+"===t)&&("-"===t&&(i=-1),t=(n=n.slice(1))[0]),"0"===n)return 0;if("0"===t){if("b"===n[1])return i*parseInt(n.slice(2),2);if("x"===n[1])return i*parseInt(n.slice(2),16);if("o"===n[1])return i*parseInt(n.slice(2),8)}return i*parseInt(n,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!u(e)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),S=RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),A=/^[-+]?[0-9]+e/,_=new v("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!!S.test(e)&&"_"!==e[e.length-1]},construct:function(e){var t,n;return(n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t)?1===n?1/0:-1/0:".nan"===t?NaN:n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||u(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(1/0===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(-1/0===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(u(e))return"-0.0";return n=e.toString(10),A.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"}),O=w.extend({implicit:[N,k,C,_]}),I=RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),E=RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"),L=new v("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==I.exec(e)||null!==E.exec(e))},construct:function(e){var t,n,i,r,a,s,o,l,c=0,d=null;if(null===(t=I.exec(e))&&(t=E.exec(e)),null===t)throw Error("Date resolve error");if(n=+t[1],i=t[2]-1,r=+t[3],!t[4])return new Date(Date.UTC(n,i,r));if(a=+t[4],s=+t[5],o=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c*=1}return t[9]&&(d=(60*t[10]+ +(t[11]||0))*6e4,"-"===t[9]&&(d=-d)),l=new Date(Date.UTC(n,i,r,a,s,o,c)),d&&l.setTime(l.getTime()-d),l},instanceOf:Date,represent:function(e){return e.toISOString()}}),T=new v("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),M="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r",F=new v("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i=0,r=e.length;for(n=0;n<r;n++)if(!((t=M.indexOf(e.charAt(n)))>64)){if(t<0)return!1;i+=6}return i%8==0},construct:function(e){var t,n,i=e.replace(/[\r\n=]/g,""),r=i.length,a=0,s=[];for(t=0;t<r;t++)t%4==0&&t&&(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)),a=a<<6|M.indexOf(i.charAt(t));return 0==(n=r%4*6)?(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)):18===n?(s.push(a>>10&255),s.push(a>>2&255)):12===n&&s.push(a>>4&255),new Uint8Array(s)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,n,i="",r=0,a=e.length;for(t=0;t<a;t++)t%3==0&&t&&(i+=M[r>>18&63],i+=M[r>>12&63],i+=M[r>>6&63],i+=M[63&r]),r=(r<<8)+e[t];return 0==(n=a%3)?(i+=M[r>>18&63],i+=M[r>>12&63],i+=M[r>>6&63],i+=M[63&r]):2===n?(i+=M[r>>10&63],i+=M[r>>4&63],i+=M[r<<2&63],i+=M[64]):1===n&&(i+=M[r>>2&63],i+=M[r<<4&63],i+=M[64],i+=M[64]),i}}),U=Object.prototype.hasOwnProperty,D=Object.prototype.toString,J=new v("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,i,r,a,s=[];for(t=0,n=e.length;t<n;t+=1){if(i=e[t],a=!1,"[object Object]"!==D.call(i))return!1;for(r in i)if(U.call(i,r))if(a)return!1;else a=!0;if(!a||-1!==s.indexOf(r))return!1;s.push(r)}return!0},construct:function(e){return null!==e?e:[]}}),B=Object.prototype.toString,z=new v("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){var t,n,i,r,a;if(null===e)return!0;for(t=0,a=Array(e.length),n=e.length;t<n;t+=1){if(i=e[t],"[object Object]"!==B.call(i)||1!==(r=Object.keys(i)).length)return!1;a[t]=[r[0],i[r[0]]]}return!0},construct:function(e){var t,n,i,r,a;if(null===e)return[];for(t=0,a=Array(e.length),n=e.length;t<n;t+=1)r=Object.keys(i=e[t]),a[t]=[r[0],i[r[0]]];return a}}),R=Object.prototype.hasOwnProperty,$=new v("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){var t;if(null===e)return!0;for(t in e)if(R.call(e,t)&&null!==e[t])return!1;return!0},construct:function(e){return null!==e?e:{}}}),q=O.extend({implicit:[L,T],explicit:[F,J,z,$]}),P=Object.prototype.hasOwnProperty,V=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Y=/[\x85\u2028\u2029]/,W=/[,\[\]\{\}]/,G=/^(?:!|!!|![a-z\-]+!)$/i,H=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function K(e){return Object.prototype.toString.call(e)}function X(e){return 10===e||13===e}function Z(e){return 9===e||32===e}function Q(e){return 9===e||32===e||10===e||13===e}function ee(e){return 44===e||91===e||93===e||123===e||125===e}function et(e){return 48===e?"\0":97===e?"\x07":98===e?"\b":116===e||9===e?" ":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"\x1b":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"
":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function en(e,t,n){"__proto__"===t?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[t]=n}for(var ei=Array(256),er=Array(256),ea=0;ea<256;ea++)ei[ea]=+!!et(ea),er[ea]=et(ea);function es(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||q,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function eo(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=x(n),new p(t,n)}function el(e,t){throw eo(e,t)}function ec(e,t){e.onWarning&&e.onWarning.call(null,eo(e,t))}var ed={YAML:function(e,t,n){var i,r,a;null!==e.version&&el(e,"duplication of %YAML directive"),1!==n.length&&el(e,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&el(e,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),a=parseInt(i[2],10),1!==r&&el(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=a<2,1!==a&&2!==a&&ec(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,r;2!==n.length&&el(e,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],G.test(i)||el(e,"ill-formed tag handle (first argument) of the TAG directive"),P.call(e.tagMap,i)&&el(e,'there is a previously declared suffix for "'+i+'" tag handle'),H.test(r)||el(e,"ill-formed tag prefix (second argument) of the TAG directive");try{r=decodeURIComponent(r)}catch(t){el(e,"tag prefix is malformed: "+r)}e.tagMap[i]=r}};function eu(e,t,n,i){var r,a,s,o;if(t<n){if(o=e.input.slice(t,n),i)for(r=0,a=o.length;r<a;r+=1)9===(s=o.charCodeAt(r))||32<=s&&s<=1114111||el(e,"expected valid JSON character");else V.test(o)&&el(e,"the stream contains non-printable characters");e.result+=o}}function em(e,t,n,i){var r,a,s,o,l;for("object"==typeof(l=n)&&null!==l||el(e,"cannot merge mappings; the provided source object is unacceptable"),s=0,o=(r=Object.keys(n)).length;s<o;s+=1)a=r[s],P.call(t,a)||(en(t,a,n[a]),i[a]=!0)}function ep(e,t,n,i,r,a,s,o,l){var c,d;if(Array.isArray(r))for(c=0,d=(r=Array.prototype.slice.call(r)).length;c<d;c+=1)Array.isArray(r[c])&&el(e,"nested arrays are not supported inside keys"),"object"==typeof r&&"[object Object]"===K(r[c])&&(r[c]="[object Object]");if("object"==typeof r&&"[object Object]"===K(r)&&(r="[object Object]"),r=String(r),null===t&&(t={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(a))for(c=0,d=a.length;c<d;c+=1)em(e,t,a[c],n);else em(e,t,a,n);else!e.json&&!P.call(n,r)&&P.call(t,r)&&(e.line=s||e.line,e.lineStart=o||e.lineStart,e.position=l||e.position,el(e,"duplicated mapping key")),en(t,r,a),delete n[r];return t}function eh(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):el(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function ef(e,t,n){for(var i=0,r=e.input.charCodeAt(e.position);0!==r;){for(;Z(r);)9===r&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),r=e.input.charCodeAt(++e.position);if(t&&35===r)do r=e.input.charCodeAt(++e.position);while(10!==r&&13!==r&&0!==r)if(X(r))for(eh(e),r=e.input.charCodeAt(e.position),i++,e.lineIndent=0;32===r;)e.lineIndent++,r=e.input.charCodeAt(++e.position);else break}return -1!==n&&0!==i&&e.lineIndent<n&&ec(e,"deficient indentation"),i}function ex(e){var t,n=e.position;return!!((45===(t=e.input.charCodeAt(n))||46===t)&&t===e.input.charCodeAt(n+1)&&t===e.input.charCodeAt(n+2)&&(n+=3,0===(t=e.input.charCodeAt(n))||Q(t)))||!1}function eg(e,t){1===t?e.result+=" ":t>1&&(e.result+=d("\n",t-1))}function eb(e,t){var n,i,r=e.tag,a=e.anchor,s=[],o=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=s),i=e.input.charCodeAt(e.position);0!==i&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,el(e,"tab characters must not be used in indentation")),45===i&&Q(e.input.charCodeAt(e.position+1)));){if(o=!0,e.position++,ef(e,!0,-1)&&e.lineIndent<=t){s.push(null),i=e.input.charCodeAt(e.position);continue}if(n=e.line,ev(e,t,3,!1,!0),s.push(e.result),ef(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==i)el(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return!!o&&(e.tag=r,e.anchor=a,e.kind="sequence",e.result=s,!0)}function ev(e,t,n,i,r){var a,s,o,l,c,u,m,p,h,f=1,x=!1,g=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=s=o=4===n||3===n,i&&ef(e,!0,-1)&&(x=!0,e.lineIndent>t?f=1:e.lineIndent===t?f=0:e.lineIndent<t&&(f=-1)),1===f)for(;function(e){var t,n,i,r,a=!1,s=!1;if(33!==(r=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&el(e,"duplication of a tag property"),60===(r=e.input.charCodeAt(++e.position))?(a=!0,r=e.input.charCodeAt(++e.position)):33===r?(s=!0,n="!!",r=e.input.charCodeAt(++e.position)):n="!",t=e.position,a){do r=e.input.charCodeAt(++e.position);while(0!==r&&62!==r)e.position<e.length?(i=e.input.slice(t,e.position),r=e.input.charCodeAt(++e.position)):el(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==r&&!Q(r);)33===r&&(s?el(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),G.test(n)||el(e,"named tag handle cannot contain such characters"),s=!0,t=e.position+1)),r=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),W.test(i)&&el(e,"tag suffix cannot contain flow indicator characters")}i&&!H.test(i)&&el(e,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch(t){el(e,"tag name is malformed: "+i)}return a?e.tag=i:P.call(e.tagMap,n)?e.tag=e.tagMap[n]+i:"!"===n?e.tag="!"+i:"!!"===n?e.tag="tag:yaml.org,2002:"+i:el(e,'undeclared tag handle "'+n+'"'),!0}(e)||function(e){var t,n;if(38!==(n=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&el(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!Q(n)&&!ee(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&el(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}(e);)ef(e,!0,-1)?(x=!0,o=a,e.lineIndent>t?f=1:e.lineIndent===t?f=0:e.lineIndent<t&&(f=-1)):o=!1;if(o&&(o=x||r),(1===f||4===n)&&(p=1===n||2===n?t:t+1,h=e.position-e.lineStart,1===f?o&&(eb(e,h)||function(e,t,n){var i,r,a,s,o,l,c,d=e.tag,u=e.anchor,m={},p=Object.create(null),h=null,f=null,x=null,g=!1,b=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=m),c=e.input.charCodeAt(e.position);0!==c;){if(g||-1===e.firstTabInLine||(e.position=e.firstTabInLine,el(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(63===c||58===c)&&Q(i))63===c?(g&&(ep(e,m,p,h,f,null,s,o,l),h=f=x=null),b=!0,g=!0,r=!0):g?(g=!1,r=!0):el(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,c=i;else{if(s=e.line,o=e.lineStart,l=e.position,!ev(e,n,2,!1,!0))break;if(e.line===a){for(c=e.input.charCodeAt(e.position);Z(c);)c=e.input.charCodeAt(++e.position);if(58===c)Q(c=e.input.charCodeAt(++e.position))||el(e,"a whitespace character is expected after the key-value separator within a block mapping"),g&&(ep(e,m,p,h,f,null,s,o,l),h=f=x=null),b=!0,g=!1,r=!1,h=e.tag,f=e.result;else{if(!b)return e.tag=d,e.anchor=u,!0;el(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!b)return e.tag=d,e.anchor=u,!0;el(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}if((e.line===a||e.lineIndent>t)&&(g&&(s=e.line,o=e.lineStart,l=e.position),ev(e,t,4,!0,r)&&(g?f=e.result:x=e.result),g||(ep(e,m,p,h,f,x,s,o,l),h=f=x=null),ef(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&0!==c)el(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return g&&ep(e,m,p,h,f,null,s,o,l),b&&(e.tag=d,e.anchor=u,e.kind="mapping",e.result=m),b}(e,h,p))||function(e,t){var n,i,r,a,s,o,l,c,d,u,m,p,h=!0,f=e.tag,x=e.anchor,g=Object.create(null);if(91===(p=e.input.charCodeAt(e.position)))s=93,c=!1,a=[];else{if(123!==p)return!1;s=125,c=!0,a={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),p=e.input.charCodeAt(++e.position);0!==p;){if(ef(e,!0,t),(p=e.input.charCodeAt(e.position))===s)return e.position++,e.tag=f,e.anchor=x,e.kind=c?"mapping":"sequence",e.result=a,!0;h?44===p&&el(e,"expected the node content, but found ','"):el(e,"missed comma between flow collection entries"),u=d=m=null,o=l=!1,63===p&&Q(e.input.charCodeAt(e.position+1))&&(o=l=!0,e.position++,ef(e,!0,t)),n=e.line,i=e.lineStart,r=e.position,ev(e,t,1,!1,!0),u=e.tag,d=e.result,ef(e,!0,t),p=e.input.charCodeAt(e.position),(l||e.line===n)&&58===p&&(o=!0,p=e.input.charCodeAt(++e.position),ef(e,!0,t),ev(e,t,1,!1,!0),m=e.result),c?ep(e,a,g,u,d,m,n,i,r):o?a.push(ep(e,null,g,u,d,m,n,i,r)):a.push(d),ef(e,!0,t),44===(p=e.input.charCodeAt(e.position))?(h=!0,p=e.input.charCodeAt(++e.position)):h=!1}el(e,"unexpected end of the stream within a flow collection")}(e,p)?g=!0:(s&&function(e,t){var n,i,r,a,s,o=1,l=!1,c=!1,u=t,m=0,p=!1;if(124===(s=e.input.charCodeAt(e.position)))r=!1;else{if(62!==s)return!1;r=!0}for(e.kind="scalar",e.result="";0!==s;)if(43===(s=e.input.charCodeAt(++e.position))||45===s)1===o?o=43===s?3:2:el(e,"repeat of a chomping mode identifier");else if((a=48<=(n=s)&&n<=57?n-48:-1)>=0)0===a?el(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?el(e,"repeat of an indentation width identifier"):(u=t+a-1,c=!0);else break;if(Z(s)){do s=e.input.charCodeAt(++e.position);while(Z(s))if(35===s)do s=e.input.charCodeAt(++e.position);while(!X(s)&&0!==s)}for(;0!==s;){for(eh(e),e.lineIndent=0,s=e.input.charCodeAt(e.position);(!c||e.lineIndent<u)&&32===s;)e.lineIndent++,s=e.input.charCodeAt(++e.position);if(!c&&e.lineIndent>u&&(u=e.lineIndent),X(s)){m++;continue}if(e.lineIndent<u){3===o?e.result+=d("\n",l?1+m:m):1===o&&l&&(e.result+="\n");break}for(r?Z(s)?(p=!0,e.result+=d("\n",l?1+m:m)):p?(p=!1,e.result+=d("\n",m+1)):0===m?l&&(e.result+=" "):e.result+=d("\n",m):e.result+=d("\n",l?1+m:m),l=!0,c=!0,m=0,i=e.position;!X(s)&&0!==s;)s=e.input.charCodeAt(++e.position);eu(e,i,e.position,!1)}return!0}(e,p)||function(e,t){var n,i,r;if(39!==(n=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,i=r=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(eu(e,i,e.position,!0),39!==(n=e.input.charCodeAt(++e.position)))return!0;i=e.position,e.position++,r=e.position}else X(n)?(eu(e,i,r,!0),eg(e,ef(e,!1,t)),i=r=e.position):e.position===e.lineStart&&ex(e)?el(e,"unexpected end of the document within a single quoted scalar"):(e.position++,r=e.position);el(e,"unexpected end of the stream within a single quoted scalar")}(e,p)||function(e,t){var n,i,r,a,s,o,l,c;if(34!==(o=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;0!==(o=e.input.charCodeAt(e.position));)if(34===o)return eu(e,n,e.position,!0),e.position++,!0;else if(92===o){if(eu(e,n,e.position,!0),X(o=e.input.charCodeAt(++e.position)))ef(e,!1,t);else if(o<256&&ei[o])e.result+=er[o],e.position++;else if((s=120===(l=o)?2:117===l?4:8*(85===l))>0){for(r=s,a=0;r>0;r--)(s=function(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}(o=e.input.charCodeAt(++e.position)))>=0?a=(a<<4)+s:el(e,"expected hexadecimal character");e.result+=(c=a)<=65535?String.fromCharCode(c):String.fromCharCode((c-65536>>10)+55296,(c-65536&1023)+56320),e.position++}else el(e,"unknown escape sequence");n=i=e.position}else X(o)?(eu(e,n,i,!0),eg(e,ef(e,!1,t)),n=i=e.position):e.position===e.lineStart&&ex(e)?el(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position);el(e,"unexpected end of the stream within a double quoted scalar")}(e,p)?g=!0:!function(e){var t,n,i;if(42!==(i=e.input.charCodeAt(e.position)))return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!Q(i)&&!ee(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&el(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),P.call(e.anchorMap,n)||el(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],ef(e,!0,-1),!0}(e)?function(e,t,n){var i,r,a,s,o,l,c,d,u=e.kind,m=e.result;if(Q(d=e.input.charCodeAt(e.position))||ee(d)||35===d||38===d||42===d||33===d||124===d||62===d||39===d||34===d||37===d||64===d||96===d||(63===d||45===d)&&(Q(i=e.input.charCodeAt(e.position+1))||n&&ee(i)))return!1;for(e.kind="scalar",e.result="",r=a=e.position,s=!1;0!==d;){if(58===d){if(Q(i=e.input.charCodeAt(e.position+1))||n&&ee(i))break}else if(35===d){if(Q(e.input.charCodeAt(e.position-1)))break}else if(e.position===e.lineStart&&ex(e)||n&&ee(d))break;else if(X(d)){if(o=e.line,l=e.lineStart,c=e.lineIndent,ef(e,!1,-1),e.lineIndent>=t){s=!0,d=e.input.charCodeAt(e.position);continue}e.position=a,e.line=o,e.lineStart=l,e.lineIndent=c;break}s&&(eu(e,r,a,!1),eg(e,e.line-o),r=a=e.position,s=!1),Z(d)||(a=e.position+1),d=e.input.charCodeAt(++e.position)}return eu(e,r,a,!1),!!e.result||(e.kind=u,e.result=m,!1)}(e,p,1===n)&&(g=!0,null===e.tag&&(e.tag="?")):(g=!0,(null!==e.tag||null!==e.anchor)&&el(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===f&&(g=o&&eb(e,h))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&el(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),l=0,c=e.implicitTypes.length;l<c;l+=1)if((m=e.implicitTypes[l]).resolve(e.result)){e.result=m.construct(e.result),e.tag=m.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else if("!"!==e.tag){if(P.call(e.typeMap[e.kind||"fallback"],e.tag))m=e.typeMap[e.kind||"fallback"][e.tag];else for(l=0,m=null,c=(u=e.typeMap.multi[e.kind||"fallback"]).length;l<c;l+=1)if(e.tag.slice(0,u[l].tag.length)===u[l].tag){m=u[l];break}m||el(e,"unknown tag !<"+e.tag+">"),null!==e.result&&m.kind!==e.kind&&el(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+m.kind+'", not "'+e.kind+'"'),m.resolve(e.result,e.tag)?(e.result=m.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):el(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||g}function ej(e,t){e=String(e),t=t||{},0!==e.length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var n=new es(e,t),i=e.indexOf("\0");for(-1!==i&&(n.position=i,el(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)!function(e){var t,n,i,r,a=e.position,s=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(r=e.input.charCodeAt(e.position))&&(ef(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0)&&37===r);){for(s=!0,r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!Q(r);)r=e.input.charCodeAt(++e.position);for(n=e.input.slice(t,e.position),i=[],n.length<1&&el(e,"directive name must not be less than one character in length");0!==r;){for(;Z(r);)r=e.input.charCodeAt(++e.position);if(35===r){do r=e.input.charCodeAt(++e.position);while(0!==r&&!X(r))break}if(X(r))break;for(t=e.position;0!==r&&!Q(r);)r=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}0!==r&&eh(e),P.call(ed,n)?ed[n](e,n,i):ec(e,'unknown document directive "'+n+'"')}if(ef(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,ef(e,!0,-1)):s&&el(e,"directives end mark is expected"),ev(e,e.lineIndent-1,4,!1,!0),ef(e,!0,-1),e.checkLineBreaks&&Y.test(e.input.slice(a,e.position))&&ec(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&ex(e)){46===e.input.charCodeAt(e.position)&&(e.position+=3,ef(e,!0,-1));return}e.position<e.length-1&&el(e,"end of the stream or a document separator is expected")}(n);return n.documents}var ey=function(e,t){var n=ej(e,t);if(0!==n.length){if(1===n.length)return n[0];throw new p("expected a single document in the stream, but found more")}},ew=Object.prototype.toString,eN=Object.prototype.hasOwnProperty,ek={};ek[0]="\\0",ek[7]="\\a",ek[8]="\\b",ek[9]="\\t",ek[10]="\\n",ek[11]="\\v",ek[12]="\\f",ek[13]="\\r",ek[27]="\\e",ek[34]='\\"',ek[92]="\\\\",ek[133]="\\N",ek[160]="\\_",ek[8232]="\\L",ek[8233]="\\P";function eC(e,t){return function(){throw Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}function eS({isOpen:e,onClose:i,onSuccess:a}){let[d,u]=(0,n.useState)(!1),[m,p]=(0,n.useState)(null),[h,f]=(0,n.useState)(!1),[x,g]=(0,n.useState)("");if(!e)return null;let b=async e=>{let t=e.target.files?.[0];if(t){if(!t.name.endsWith(".yaml")&&!t.name.endsWith(".yml")&&!t.name.endsWith(".json"))return void p("Please upload a YAML or JSON file (.yaml, .yml, or .json)");try{u(!0),p(null),f(!1),g("Reading file...");let e=await new Promise((e,n)=>{let i=new FileReader;i.onload=t=>{try{let n=t.target?.result;e(n)}catch{n(Error("Failed to read file"))}},i.onerror=()=>n(Error("Failed to read file")),i.readAsText(t)}),n=(e=>{try{return JSON.parse(e)}catch{try{return ey(e)}catch(e){throw Error(`Failed to parse YAML: ${e.message||"Invalid YAML format"}`)}}})(e);if(!n||"object"!=typeof n)throw Error("Contract file must contain a valid object/dictionary");if(!("schema"in n))throw Error('Contract file must contain a "schema" field at the top level');g("Parsing contract...");let i=await c.api.contracts.parse({contract:n});g("Storing schema...");let r=n.schema?.title||n.metadata?.title||t.name.replace(/\.(yaml|yml|json)$/,""),s=i.versions?.schema||n.schema?.version||n.versions?.schema||"1.0.0",o=(await c.api.metadata.storeSchema({schema_name:r,schema:i.schema,version:s})).schema_id;if(i.metadata){g("Storing metadata...");let e=i.versions?.metadata||s;await c.api.metadata.storeMetadata({schema_id:o,metadata:i.metadata,version:e})}i.coercion_rules&&Object.keys(i.coercion_rules).length>0&&(g("Storing coercion rules..."),await c.api.metadata.storeCoercionRules({schema_id:o,coercion_rules:i.coercion_rules,version:i.versions?.coercion_rules||s})),i.validation_rules&&Object.keys(i.validation_rules).length>0&&(g("Storing validation rules..."),await c.api.metadata.storeValidationRules({schema_id:o,validation_rules:i.validation_rules,version:i.versions?.validation_rules||s})),g("Complete!"),f(!0),setTimeout(()=>{a(),v()},1500)}catch(e){p(e.response?.detail||e.message||"Failed to upload contract"),console.error("Upload error:",e)}finally{u(!1)}}},v=()=>{p(null),f(!1),g(""),i()};return(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:(0,t.jsxs)("div",{className:"bg-background rounded-lg shadow-lg max-w-md w-full mx-4 p-6",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold",children:"Upload Contract"}),(0,t.jsx)(r.Button,{variant:"ghost",size:"sm",onClick:v,children:(0,t.jsx)(s.X,{className:"h-4 w-4"})})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium mb-2",children:"Select contract file (YAML or JSON)"}),(0,t.jsx)("input",{type:"file",accept:".yaml,.yml,.json",onChange:b,disabled:d,className:"block w-full text-sm text-muted-foreground file:mr-4 file:py-2 file:px-4 file:rounded-md file:border-0 file:text-sm file:font-semibold file:bg-primary file:text-primary-foreground hover:file:bg-primary/90 cursor-pointer disabled:opacity-50"})]}),x&&(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:x}),m&&(0,t.jsxs)("div",{className:"flex items-start gap-2 p-3 bg-destructive/10 border border-destructive/50 rounded-md",children:[(0,t.jsx)(l.AlertCircle,{className:"h-5 w-5 text-destructive flex-shrink-0 mt-0.5"}),(0,t.jsxs)("div",{className:"text-sm text-destructive",children:[(0,t.jsx)("p",{className:"font-medium",children:"Upload failed"}),(0,t.jsx)("p",{className:"mt-1",children:m})]})]}),h&&(0,t.jsxs)("div",{className:"flex items-start gap-2 p-3 bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 rounded-md",children:[(0,t.jsx)(o.CheckCircle2,{className:"h-5 w-5 text-green-600 dark:text-green-400 flex-shrink-0 mt-0.5"}),(0,t.jsxs)("div",{className:"text-sm text-green-800 dark:text-green-200",children:[(0,t.jsx)("p",{className:"font-medium",children:"Upload successful!"}),(0,t.jsx)("p",{className:"mt-1",children:"Contract has been stored successfully."})]})]})]})]})})}eC("safeLoad","load"),eC("safeLoadAll","loadAll"),eC("safeDump","dump");var eA=e.i(56909),e_=e.i(78583),eO=e.i(39616),eI=e.i(98919),eE=e.i(52571),eL=e.i(7233),eT=e.i(75254);let eM=(0,eT.default)("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);var eF=e.i(75157);let eU=[{id:"schema",label:"Schema",icon:(0,t.jsx)(e_.FileText,{className:"h-4 w-4"})},{id:"coercion",label:"Coercion Rules",icon:(0,t.jsx)(eO.Settings,{className:"h-4 w-4"})},{id:"validation",label:"Validation Rules",icon:(0,t.jsx)(eI.Shield,{className:"h-4 w-4"})},{id:"metadata",label:"Metadata",icon:(0,t.jsx)(eE.Info,{className:"h-4 w-4"})}];function eD({isOpen:e,onClose:i,onSuccess:a}){let d,u,[m,p]=(0,n.useState)("schema"),[h,f]=(0,n.useState)(!1),[x,g]=(0,n.useState)(null),[b,v]=(0,n.useState)(!1),[j,y]=(0,n.useState)(!1),[w,N]=(0,n.useState)(""),[k,C]=(0,n.useState)("1.0.0"),[S,A]=(0,n.useState)({schema:'{\n "type": "object",\n "version": "1.0.0",\n "properties": {}\n}',coercion:"{}",validation:"{}",metadata:"{}"}),[_,O]=(0,n.useState)({schema:"new",coercion:"new",validation:"new",metadata:"new"}),[I,E]=(0,n.useState)({schemas:[],coercion_rules:[],validation_rules:[],metadata:[]}),[L,T]=(0,n.useState)({});(0,n.useEffect)(()=>{e&&M()},[e]);let M=async()=>{y(!0);try{let e=await c.api.metadata.listArtifacts();E(e)}catch(e){console.error("Failed to load artifacts:",e)}finally{y(!1)}};if(!e)return null;let F=(e,t)=>{try{let t=JSON.parse(e);if(0===Object.keys(t).length)return null;return t}catch(e){throw Error(`Invalid JSON in ${t}: ${e.message}`)}},U=async()=>{if(!w.trim())return void g("Contract name is required");let e=w.trim().toLowerCase().replace(/[^a-z0-9_]/g,"_");try{(0,eF.validateName)(e,"Contract name")}catch(e){g(`Invalid contract name format: ${e.message||"Contract name must contain only lowercase letters, numbers, and underscores"}`);return}if(!k.trim())return void g("Version is required");if("new"===_.schema)try{if(!F(S.schema,"schema"))return void g("Schema is required and cannot be empty")}catch(e){g(e.message);return}else if(!L.schema_title||!L.schema_version)return void g("Schema title and version are required");f(!0),g(null),v(!1);try{let t={name:e,version:k,status:"active",description:void 0};if("new"===_.schema){let e=F(S.schema,"schema");e.version||(e.version=k),e.title&&"string"==typeof e.title&&(e.title=e.title.toLowerCase().replace(/[^a-z0-9_]/g,"_")),t.schema=e}else t.schema_title=L.schema_title,t.schema_version=L.schema_version;if("new"===_.coercion){let e=F(S.coercion,"coercion rules");e&&(t.coercion_rules=e)}else L.coercion_rules_title&&L.coercion_rules_version&&(t.coercion_rules_title=L.coercion_rules_title,t.coercion_rules_version=L.coercion_rules_version);if("new"===_.validation){let e=F(S.validation,"validation rules");e&&(t.validation_rules=e)}else L.validation_rules_title&&L.validation_rules_version&&(t.validation_rules_title=L.validation_rules_title,t.validation_rules_version=L.validation_rules_version);if("new"===_.metadata){let e=F(S.metadata,"metadata");e&&(t.metadata=e)}else L.metadata_title&&L.metadata_version&&(t.metadata_title=L.metadata_title,t.metadata_version=L.metadata_version);await c.api.contracts.createMixed(t),v(!0),setTimeout(()=>{a(),D()},1500)}catch(t){let e="Failed to create contract";t instanceof Error?e=t.message:t.response?.detail?e=t.response.detail:t.response?.details?e=t.response.details.map(e=>{let t=e.loc?.join(".")||e.field||"field",n=e.msg||e.message||"validation error";return`${t}: ${n}`}).join("; ")||e:t.message&&(e=t.message),g(e),console.error("Create contract error:",t)}finally{f(!1)}},D=()=>{g(null),v(!1),N(""),C("1.0.0"),O({schema:"new",coercion:"new",validation:"new",metadata:"new"}),A({schema:'{\n "type": "object",\n "version": "1.0.0",\n "properties": {}\n}',coercion:"{}",validation:"{}",metadata:"{}"}),T({}),p("schema"),i()},J=S[m],B=_[m],z="schema"===m,R=e=>{switch(e){case"schema":return"schemas";case"coercion":return"coercion_rules";case"validation":return"validation_rules";case"metadata":return"metadata"}},$=e=>{switch(e){case"schema":return"schema_title";case"coercion":return"coercion_rules_title";case"validation":return"validation_rules_title";case"metadata":return"metadata_title"}},q=e=>{switch(e){case"schema":return"schema_version";case"coercion":return"coercion_rules_version";case"validation":return"validation_rules_version";case"metadata":return"metadata_version"}};return(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:D,children:(0,t.jsxs)("div",{className:"bg-background rounded-lg shadow-lg max-w-4xl w-full mx-4 max-h-[90vh] overflow-hidden flex flex-col",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex justify-between items-center p-6 border-b",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold",children:"Create New Contract"}),(0,t.jsx)(r.Button,{variant:"ghost",size:"sm",onClick:D,children:(0,t.jsx)(s.X,{className:"h-4 w-4"})})]}),(0,t.jsxs)("div",{className:"p-6 border-b grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium mb-2",children:"Contract Name *"}),(0,t.jsx)("input",{type:"text",value:w,onChange:e=>N(e.target.value),placeholder:"e.g., user_contract",className:"w-full px-3 py-2 border border-input rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-ring"}),w&&(0,t.jsxs)("p",{className:"text-xs text-muted-foreground mt-1",children:["Will be normalized to: ",(0,t.jsx)("code",{className:"bg-muted px-1 rounded",children:w.trim().toLowerCase().replace(/[^a-z0-9_]/g,"_")})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Use lowercase letters, numbers, and underscores only"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium mb-2",children:"Contract Version *"}),(0,t.jsx)("input",{type:"text",value:k,onChange:e=>C(e.target.value),placeholder:"e.g., 1.0.0",className:"w-full px-3 py-2 border border-input rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-ring"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Contract version (independent of artifact versions)"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"Same contract name can have multiple versions"})]})]}),(0,t.jsx)("div",{className:"flex border-b px-6",children:eU.map(e=>(0,t.jsxs)("button",{onClick:()=>p(e.id),className:`px-4 py-3 text-sm font-medium flex items-center gap-2 border-b-2 transition-colors ${m===e.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"}`,children:[e.icon,e.label,"schema"===e.id&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:"*"})]},e.id))}),(0,t.jsx)("div",{className:"p-4 border-b bg-muted/30",children:(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsxs)("button",{onClick:()=>O(e=>({...e,[m]:"new"})),className:`flex items-center gap-2 px-4 py-2 rounded-md border transition-colors ${"new"===B?"border-primary bg-primary/10 text-primary":"border-input hover:bg-muted"}`,children:[(0,t.jsx)(eL.Plus,{className:"h-4 w-4"}),"Create New"]}),(0,t.jsxs)("button",{onClick:()=>O(e=>({...e,[m]:"existing"})),className:`flex items-center gap-2 px-4 py-2 rounded-md border transition-colors ${"existing"===B?"border-primary bg-primary/10 text-primary":"border-input hover:bg-muted"}`,children:[(0,t.jsx)(eM,{className:"h-4 w-4"}),"Use Existing"]})]})}),(0,t.jsx)("div",{className:"flex-1 overflow-hidden",children:"new"===B?(0,t.jsxs)("div",{className:"h-full p-6 flex flex-col",children:["schema"===m&&(0,t.jsx)("div",{className:"mb-3 p-3 bg-blue-50 dark:bg-blue-950 border border-blue-200 dark:border-blue-800 rounded-md text-sm",children:(0,t.jsxs)("p",{className:"text-blue-800 dark:text-blue-200",children:[(0,t.jsx)("strong",{children:"Important:"})," The ",(0,t.jsx)("code",{className:"bg-blue-100 dark:bg-blue-900 px-1 rounded",children:"version"})," field in your schema JSON is the ",(0,t.jsx)("em",{children:"artifact version"}),' (not the contract version). Each schema artifact must have a unique title + version combination. If this schema already exists, use "Use Existing" instead.']})}),(0,t.jsx)("textarea",{value:J,onChange:e=>{var t;return t=e.target.value,void A(e=>({...e,[m]:t}))},className:"w-full flex-1 p-4 font-mono text-sm bg-muted rounded-md resize-none outline-none focus:ring-2 focus:ring-ring",placeholder:`Enter ${eU.find(e=>e.id===m)?.label.toLowerCase()} as JSON...`,spellCheck:!1})]}):(0,t.jsx)("div",{className:"h-full overflow-y-auto p-6",children:j?(0,t.jsx)("div",{className:"flex items-center justify-center h-64",children:(0,t.jsx)("p",{className:"text-muted-foreground",children:"Loading available artifacts..."})}):(0,t.jsx)("div",{className:"space-y-4",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium mb-2",children:[eU.find(e=>e.id===m)?.label," ",z&&"*"]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("select",{value:L[$(m)]||"",onChange:e=>{let t=$(m),n=q(m);T(i=>({...i,[t]:e.target.value||void 0,[n]:void 0}))},className:"w-full px-3 py-2 border border-input rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-ring",children:[(0,t.jsxs)("option",{value:"",children:["Select ",eU.find(e=>e.id===m)?.label.toLowerCase()," title..."]}),Array.from(new Set(I[R(m)].map(e=>e.title))).sort().map(e=>(0,t.jsx)("option",{value:e,children:e},e))]}),(0,t.jsxs)("select",{value:L[q(m)]||"",onChange:e=>{let t=q(m);T(n=>({...n,[t]:e.target.value||void 0}))},disabled:!L[$(m)],className:"w-full px-3 py-2 border border-input rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,t.jsx)("option",{value:"",children:"Select version..."}),L[$(m)]&&(d=I[R(m)],u=L[$(m)],Array.from(new Set(d.filter(e=>e.title===u).map(e=>e.version))).sort()).map(e=>(0,t.jsx)("option",{value:e,children:e},e))]})]})]})})})}),(0,t.jsxs)("div",{className:"p-6 border-t flex justify-between items-center",children:[(0,t.jsxs)("div",{className:"flex-1",children:[x&&(0,t.jsxs)("div",{className:"flex items-start gap-2 text-sm text-destructive",children:[(0,t.jsx)(l.AlertCircle,{className:"h-5 w-5 flex-shrink-0 mt-0.5"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium",children:"Error"}),(0,t.jsx)("p",{className:"mt-1",children:x})]})]}),b&&(0,t.jsxs)("div",{className:"flex items-start gap-2 text-sm text-green-600 dark:text-green-400",children:[(0,t.jsx)(o.CheckCircle2,{className:"h-5 w-5 flex-shrink-0 mt-0.5"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium",children:"Success!"}),(0,t.jsx)("p",{className:"mt-1",children:"Contract created successfully."})]})]})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:D,disabled:h,children:"Cancel"}),(0,t.jsxs)(r.Button,{onClick:U,disabled:h||!w.trim()||!k.trim()||"existing"===_.schema&&(!L.schema_title||!L.schema_version),children:[(0,t.jsx)(eA.Save,{className:"h-4 w-4 mr-2"}),h?"Creating...":"Create Contract"]})]})]})]})})}var eJ=e.i(61246);function eB({isOpen:e,contract:i,onClose:a,onSuccess:d}){let[u,m]=(0,n.useState)(null),[p,h]=(0,n.useState)(!1),[f,x]=(0,n.useState)(!1),[g,b]=(0,n.useState)(null),[v,j]=(0,n.useState)(!1),[y,w]=(0,n.useState)("overview"),[N,k]=(0,n.useState)(""),[C,S]=(0,n.useState)(""),[A,_]=(0,n.useState)(""),[O,I]=(0,n.useState)(""),[E,L]=(0,n.useState)(""),[T,M]=(0,n.useState)(""),[F,U]=(0,n.useState)(""),[D,J]=(0,n.useState)("");(0,n.useEffect)(()=>{i&&e&&B()},[i,e]),(0,n.useEffect)(()=>{i&&(k(i.name||""),S(i.version||""),_(i.status||""),I(i.description||""))},[i]),(0,n.useEffect)(()=>{if(u){u.schema&&L(JSON.stringify(u.schema,null,2));let e={};u.metadata&&Object.assign(e,u.metadata),u.ownership&&Object.assign(e,u.ownership),u.governance_rules&&(e.governance_rules=u.governance_rules),Object.keys(e).length>0&&M(JSON.stringify(e,null,2)),u.coercion_rules&&U(JSON.stringify(u.coercion_rules,null,2)),u.validation_rules&&J(JSON.stringify(u.validation_rules,null,2))}},[u]);let B=async()=>{if(i)try{h(!0),b(null);let e=await c.api.contracts.buildFromId(i.id,{include_metadata:!0,include_ownership:!0,include_governance:!0});m(e.contract)}catch(e){b(e.response?.detail||e.message||"Failed to load contract details"),console.error("Error loading contract details:",e)}finally{h(!1)}},z=async()=>{if(i&&u)try{x(!0),b(null),j(!1);let e=[],t={};N!==i.name&&(t.name=N),C!==i.version&&(t.version=C),A!==i.status&&(t.status=A),O!==i.description&&(t.description=O),Object.keys(t).length>0&&(await c.api.contracts.update(i.id,t),e.push("Contract metadata"));let n=i.schema_id;if(!n)throw Error("Contract does not have an associated schema");if(E)try{let t=JSON.parse(E),n=u.schema;if(JSON.stringify(t)!==JSON.stringify(n)){let n=u.versions?.schema||i.version;try{await c.api.metadata.storeSchema({schema_name:N,schema:t,version:n}),e.push("Schema")}catch(e){if(e.response?.detail?.includes("already exists")||e.response?.detail?.includes("duplicate"))throw Error(`Schema update failed: A schema with version '${n}' already exists. Please update the contract version to create a new schema version, or modify the schema version.`);throw e}}}catch(e){throw Error(`Invalid schema JSON: ${e instanceof Error?e.message:"Parse error"}`)}if(T)try{let t=JSON.parse(T),r=u.metadata,a=u.ownership,s=u.governance_rules,o={};if(r&&Object.assign(o,r),a&&Object.assign(o,a),s&&(o.governance_rules=s),JSON.stringify(t)!==JSON.stringify(o)){let r=u.versions?.metadata||i.version;await c.api.metadata.storeMetadata({schema_id:n,metadata:t,version:r}),e.push("Metadata")}}catch(e){throw Error(`Invalid metadata JSON: ${e instanceof Error?e.message:"Parse error"}`)}if(F)try{let t=JSON.parse(F),r=u.coercion_rules;if(JSON.stringify(t)!==JSON.stringify(r)){let r=u.versions?.coercion_rules||i.version;await c.api.metadata.storeCoercionRules({schema_id:n,coercion_rules:t,version:r}),e.push("Coercion rules")}}catch(e){throw Error(`Invalid coercion rules JSON: ${e instanceof Error?e.message:"Parse error"}`)}if(D)try{let t=JSON.parse(D),r=u.validation_rules;if(JSON.stringify(t)!==JSON.stringify(r)){let r=u.versions?.validation_rules||i.version;await c.api.metadata.storeValidationRules({schema_id:n,validation_rules:t,version:r}),e.push("Validation rules")}}catch(e){throw Error(`Invalid validation rules JSON: ${e instanceof Error?e.message:"Parse error"}`)}if(0===e.length)return void b("No changes to save");j(!0),setTimeout(()=>{d(),R()},1500)}catch(e){b(e.response?.detail||e.message||"Failed to update contract"),console.error("Update error:",e)}finally{x(!1)}},R=()=>{b(null),j(!1),m(null),a()};return e&&i?(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:R,children:(0,t.jsxs)("div",{className:"bg-background rounded-lg shadow-lg max-w-4xl w-full mx-4 p-6 max-h-[90vh] overflow-hidden flex flex-col",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsxs)("h2",{className:"text-2xl font-bold",children:["Edit Contract: ",i.name]}),(0,t.jsx)("div",{className:"flex gap-2",children:(0,t.jsx)(r.Button,{variant:"ghost",size:"sm",onClick:R,children:(0,t.jsx)(s.X,{className:"h-4 w-4"})})})]}),(0,t.jsx)("div",{className:"flex gap-2 mb-4 border-b",children:["overview","metadata","schema","coercion","validation"].map(e=>(0,t.jsx)("button",{onClick:()=>w(e),className:`px-4 py-2 text-sm font-medium border-b-2 transition-colors ${y===e?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"}`,children:"coercion"===e?"Coercion Rules":"validation"===e?"Validation Rules":e.charAt(0).toUpperCase()+e.slice(1)},e))}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[p&&(0,t.jsx)("div",{className:"flex justify-center items-center py-12",children:(0,t.jsx)(eJ.PageLoading,{message:"Loading contract details..."})}),g&&!p&&(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsxs)("div",{className:"flex items-start gap-2 p-3 bg-destructive/10 border border-destructive/50 rounded-md",children:[(0,t.jsx)(l.AlertCircle,{className:"h-5 w-5 text-destructive flex-shrink-0 mt-0.5"}),(0,t.jsxs)("div",{className:"text-sm text-destructive",children:[(0,t.jsx)("p",{className:"font-medium",children:"Error"}),(0,t.jsx)("p",{className:"mt-1",children:g})]})]})}),v&&(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsxs)("div",{className:"flex items-start gap-2 p-3 bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 rounded-md",children:[(0,t.jsx)(o.CheckCircle2,{className:"h-5 w-5 text-green-600 dark:text-green-400 flex-shrink-0 mt-0.5"}),(0,t.jsxs)("div",{className:"text-sm text-green-800 dark:text-green-200",children:[(0,t.jsx)("p",{className:"font-medium",children:"Update successful!"}),(0,t.jsx)("p",{className:"mt-1",children:"Contract has been updated successfully."})]})]})}),!p&&(0,t.jsxs)(t.Fragment,{children:["overview"===y&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Name ",(0,t.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,t.jsx)("input",{type:"text",value:N,onChange:e=>k(e.target.value),disabled:f,className:"w-full px-3 py-2 border border-input rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-50",required:!0})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Version ",(0,t.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,t.jsx)("input",{type:"text",value:C,onChange:e=>S(e.target.value),disabled:f,className:"w-full px-3 py-2 border border-input rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-50",required:!0})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium mb-2",children:"Status"}),(0,t.jsxs)("select",{value:A,onChange:e=>_(e.target.value),disabled:f,className:"w-full px-3 py-2 border border-input rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-50",children:[(0,t.jsx)("option",{value:"",children:"None"}),(0,t.jsx)("option",{value:"active",children:"Active"}),(0,t.jsx)("option",{value:"draft",children:"Draft"}),(0,t.jsx)("option",{value:"deprecated",children:"Deprecated"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium mb-2",children:"Description"}),(0,t.jsx)("textarea",{value:O,onChange:e=>I(e.target.value),disabled:f,rows:4,className:"w-full px-3 py-2 border border-input rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-50 resize-none"})]}),i.id&&(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium mb-2",children:"Contract ID"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground font-mono break-all",children:i.id})]})]}),"metadata"===y&&u&&(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium mb-2",children:"Metadata (JSON/YAML)"}),(0,t.jsx)("textarea",{value:T,onChange:e=>M(e.target.value),disabled:f,rows:24,className:"w-full px-3 py-2 border border-input rounded-md bg-background text-foreground font-mono text-sm focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-50 resize-none",placeholder:'{"title": "Contract Title", "version": "1.0.0", "business_owners": [...], "governance_rules": {...}, ...}'}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Enter valid JSON for metadata. This includes all metadata fields including ownership and governance rules."})]}),"schema"===y&&u&&(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium mb-2",children:"Schema Definition (JSON)"}),(0,t.jsx)("textarea",{value:E,onChange:e=>L(e.target.value),disabled:f,rows:20,className:"w-full px-3 py-2 border border-input rounded-md bg-background text-foreground font-mono text-sm focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-50 resize-none",placeholder:'{"type": "object", "properties": {...}, ...}'}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Enter valid JSON Schema"})]}),"coercion"===y&&u&&(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium mb-2",children:"Coercion Rules (JSON)"}),(0,t.jsx)("textarea",{value:F,onChange:e=>U(e.target.value),disabled:f,rows:20,className:"w-full px-3 py-2 border border-input rounded-md bg-background text-foreground font-mono text-sm focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-50 resize-none",placeholder:'{"field_name": "coercion_function", ...}'}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Enter valid JSON for coercion rules"})]}),"validation"===y&&u&&(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium mb-2",children:"Validation Rules (JSON)"}),(0,t.jsx)("textarea",{value:D,onChange:e=>J(e.target.value),disabled:f,rows:20,className:"w-full px-3 py-2 border border-input rounded-md bg-background text-foreground font-mono text-sm focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-50 resize-none",placeholder:'{"field_name": {"validator_name": config, ...}, ...}'}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Enter valid JSON for validation rules"})]})]})]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-4 border-t mt-4",children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:R,disabled:f,children:"Cancel"}),(0,t.jsxs)(r.Button,{onClick:z,disabled:f||!N||!C||p,children:[(0,t.jsx)(eA.Save,{className:"h-4 w-4 mr-2"}),f?"Saving...":"Save Changes"]})]})]})}):null}var ez=e.i(40160),eR=e.i(88511);function e$({contracts:e,onViewDetails:i,onEdit:a}){let[s,o]=(0,n.useState)(null),l=async e=>{try{o(e.id);let t=(await c.api.contracts.buildFromId(e.id,{include_metadata:!0,include_ownership:!0,include_governance:!0})).contract,n=JSON.stringify(t,null,2),i=new Blob([n],{type:"application/json"}),r=URL.createObjectURL(i),a=document.createElement("a");a.href=r,a.download=`${e.name}_v${e.version}.json`,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(r)}catch(e){console.error("Error downloading contract:",e),alert("Failed to download contract. Please try again.")}finally{o(null)}};return(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"min-w-full divide-y divide-border",children:[(0,t.jsx)("thead",{className:"bg-muted/50",children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Name"}),(0,t.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider hidden md:table-cell",children:"Version"}),(0,t.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider hidden lg:table-cell",children:"Status"}),(0,t.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider hidden xl:table-cell",children:"ID"}),(0,t.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider hidden lg:table-cell",children:"Created"}),(0,t.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider hidden xl:table-cell",children:"Updated"}),(0,t.jsx)("th",{className:"px-6 py-3 text-right text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Actions"})]})}),(0,t.jsx)("tbody",{className:"bg-background divide-y divide-border",children:0===e.length?(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:7,className:"px-6 py-8 text-center text-muted-foreground",children:"No contracts found"})}):e.map(e=>(0,t.jsxs)("tr",{className:"hover:bg-muted/50",children:[(0,t.jsxs)("td",{className:"px-6 py-4 whitespace-nowrap",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-foreground",children:e.name}),e.description&&(0,t.jsx)("div",{className:"text-sm text-muted-foreground hidden sm:block",children:(0,eF.truncate)(e.description,50)})]}),(0,t.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-muted-foreground hidden md:table-cell",children:e.version}),(0,t.jsx)("td",{className:"px-6 py-4 whitespace-nowrap hidden lg:table-cell",children:(e=>{if(!e)return null;let n={active:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200",deprecated:"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200",draft:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200"}[e]||"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-200";return(0,t.jsx)("span",{className:`px-2 py-1 rounded text-xs font-medium ${n}`,children:e})})(e.status)}),(0,t.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-muted-foreground hidden xl:table-cell",children:(0,eF.truncate)(e.id,8)}),(0,t.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-muted-foreground hidden lg:table-cell",children:(0,eF.formatDateShort)(e.created_at)}),(0,t.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-muted-foreground hidden xl:table-cell",children:(0,eF.formatDateTimeShort)(e.updated_at)}),(0,t.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-right text-sm font-medium",children:(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(r.Button,{variant:"ghost",size:"sm",onClick:()=>i(e),className:"h-8",children:"View Details"}),(0,t.jsx)(r.Button,{variant:"ghost",size:"sm",onClick:()=>a(e),className:"h-8",title:"Edit contract",children:(0,t.jsx)(eR.Edit,{className:"h-4 w-4"})}),(0,t.jsx)(r.Button,{variant:"ghost",size:"sm",onClick:()=>l(e),disabled:s===e.id,className:"h-8",title:"Download contract",children:(0,t.jsx)(ez.Download,{className:`h-4 w-4 ${s===e.id?"animate-pulse":""}`})})]})})]},e.id))})]})})}var eq=e.i(58041),eP=e.i(95113);let eV=[{id:"overview",label:"Overview",icon:(0,t.jsx)(eq.Database,{className:"h-4 w-4"})},{id:"metadata",label:"Metadata",icon:(0,t.jsx)(eE.Info,{className:"h-4 w-4"})},{id:"schema",label:"Schema",icon:(0,t.jsx)(e_.FileText,{className:"h-4 w-4"})},{id:"coercion",label:"Coercion Rules",icon:(0,t.jsx)(eO.Settings,{className:"h-4 w-4"})},{id:"validation",label:"Validation Rules",icon:(0,t.jsx)(eI.Shield,{className:"h-4 w-4"})}];function eY({contract:e,onClose:a}){let[o,l]=(0,n.useState)(null),[d,u]=(0,n.useState)(!1),[m,p]=(0,n.useState)(null),[h,f]=(0,n.useState)("overview");(0,n.useEffect)(()=>{(async()=>{try{u(!0),p(null);try{let t=await c.api.contracts.buildFromId(e.id,{include_metadata:!0,include_ownership:!0,include_governance:!0});l(t.contract)}catch(n){let t=n.response?.detail||n.message||"";(n.response?.status===404||n.response?.status===422)&&t.includes("does not have a linked schema")?(l({schema:null,metadata:e.description?{description:e.description}:null,ownership:null,governance_rules:null,coercion_rules:null,validation_rules:null}),p("This contract does not have a linked schema. You can view basic contract information, but schema, coercion rules, and validation rules are not available. To fix this, link a schema to the contract or create a new contract with a schema.")):p(t||"Failed to load contract details")}}catch(e){p(e.response?.detail||e.message||"Failed to load contract details"),console.error("Error loading contract details:",e)}finally{u(!1)}})()},[e]);let x=(e,n=0)=>{if(null===e)return(0,t.jsx)("span",{className:"text-muted-foreground",children:"null"});if(void 0===e)return(0,t.jsx)("span",{className:"text-muted-foreground",children:"undefined"});if("string"==typeof e)return(0,t.jsxs)("span",{className:"text-green-600 dark:text-green-400",children:['"',e,'"']});if("number"==typeof e||"boolean"==typeof e)return(0,t.jsx)("span",{className:"text-blue-600 dark:text-blue-400",children:String(e)});if(Array.isArray(e))return 0===e.length?(0,t.jsx)("span",{className:"text-muted-foreground",children:"[]"}):(0,t.jsx)("div",{className:"ml-4 border-l-2 border-border pl-2",children:e.map((e,i)=>(0,t.jsx)("div",{className:"mb-1",children:x(e,n+1)},i))});if("object"==typeof e){let i=Object.entries(e);return 0===i.length?(0,t.jsx)("span",{className:"text-muted-foreground",children:"{}"}):(0,t.jsx)("div",{className:"ml-4 border-l-2 border-border pl-2",children:i.map(([e,i])=>(0,t.jsxs)("div",{className:"mb-2",children:[(0,t.jsxs)("span",{className:"font-semibold text-foreground",children:[e,":"]})," ",x(i,n+1)]},e))})}return(0,t.jsx)("span",{children:String(e)})};if(d)return(0,t.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:(0,t.jsx)("div",{className:"bg-background rounded-lg p-6 max-w-2xl w-full mx-4",children:(0,t.jsx)(eJ.PageLoading,{message:"Loading contract details..."})})});let g=null!==o,b=m?.includes("does not have a linked schema");return!m||g||b?(0,t.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:(0,t.jsxs)("div",{className:"bg-background rounded-lg shadow-lg max-w-4xl w-full max-h-[90vh] flex flex-col overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-6 border-b flex-shrink-0",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-foreground",children:e.name}),(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Version ",e.version]})]}),(0,t.jsx)(r.Button,{variant:"ghost",size:"icon",onClick:a,children:(0,t.jsx)(s.X,{className:"h-4 w-4"})})]}),m&&b&&(0,t.jsx)("div",{className:"mx-6 mt-4 p-4 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg flex-shrink-0",children:(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)(eE.Info,{className:"h-5 w-5 text-yellow-600 dark:text-yellow-400 mt-0.5 flex-shrink-0"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-yellow-800 dark:text-yellow-200",children:"Contract Missing Schema"}),(0,t.jsx)("p",{className:"text-sm text-yellow-700 dark:text-yellow-300 mt-1",children:m})]})]})}),(0,t.jsx)("div",{className:"flex border-b overflow-x-auto flex-shrink-0 bg-background sticky top-0 z-10",children:eV.map(e=>(0,t.jsxs)("button",{onClick:()=>f(e.id),className:`flex items-center gap-2 px-4 py-3 border-b-2 transition-colors whitespace-nowrap ${h===e.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"}`,children:[e.icon,(0,t.jsx)("span",{children:e.label})]},e.id))}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto min-h-0",children:(0,t.jsx)("div",{className:"p-6",children:(0,t.jsxs)(i.Card,{children:[(0,t.jsx)(i.CardHeader,{children:(0,t.jsx)(i.CardTitle,{className:"capitalize",children:h})}),(0,t.jsx)(i.CardContent,{children:o?(0,t.jsxs)("div",{className:"space-y-4",children:["overview"===h&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Name:"})," ",e.name]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Version:"})," ",e.version]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Status:"})," ",e.status]}),e.description&&(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Description:"})," ",e.description]})]}),"metadata"===h&&o.metadata&&(0,t.jsx)("div",{className:"font-mono text-sm",children:x(o.metadata)}),"schema"===h&&o.schema&&(0,t.jsx)("div",{className:"font-mono text-sm",children:x(o.schema)}),"schema"===h&&!o.schema&&(0,t.jsxs)("div",{className:"text-muted-foreground",children:[(0,t.jsx)("p",{children:"Schema is not available for this contract."}),b&&(0,t.jsx)("p",{className:"mt-2 text-sm",children:"This contract does not have a linked schema. Link a schema to view it here."})]}),"coercion"===h&&o.coercion_rules&&(0,t.jsx)("div",{className:"font-mono text-sm",children:x(o.coercion_rules)}),"coercion"===h&&!o.coercion_rules&&(0,t.jsxs)("div",{className:"text-muted-foreground",children:[(0,t.jsx)("p",{children:"Coercion rules are not available for this contract."}),b&&(0,t.jsx)("p",{className:"mt-2 text-sm",children:"Coercion rules require a schema to be linked to the contract."})]}),"validation"===h&&o.validation_rules&&(0,t.jsx)("div",{className:"font-mono text-sm",children:x(o.validation_rules)}),"validation"===h&&!o.validation_rules&&(0,t.jsxs)("div",{className:"text-muted-foreground",children:[(0,t.jsx)("p",{children:"Validation rules are not available for this contract."}),b&&(0,t.jsx)("p",{className:"mt-2 text-sm",children:"Validation rules require a schema to be linked to the contract."})]})]}):(0,t.jsx)("p",{className:"text-muted-foreground",children:"No data available"})})]})})})]})}):(0,t.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:(0,t.jsxs)("div",{className:"bg-background rounded-lg p-6 max-w-2xl w-full mx-4",children:[(0,t.jsx)(eP.default,{error:Error(m),title:"Failed to load contract details"}),(0,t.jsx)("div",{className:"mt-4 flex justify-end",children:(0,t.jsx)(r.Button,{onClick:a,children:"Close"})})]})})}let eW=(0,eT.default)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),eG=(0,eT.default)("Table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]),eH=(0,eT.default)("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);function eK(){let{contracts:e,loading:s,error:o,refetch:l}=(0,a.useContracts)(),[d,u]=(0,n.useState)("table"),[m,p]=(0,n.useState)(null),[h,f]=(0,n.useState)(null),[x,g]=(0,n.useState)(!1),[b,v]=(0,n.useState)(!1),[j,y]=(0,n.useState)(null),[w,N]=(0,n.useState)(!1),k=async e=>{try{y(e.id);let t=(await c.api.contracts.buildFromId(e.id,{include_metadata:!0,include_ownership:!0,include_governance:!0})).contract,n=JSON.stringify(t,null,2),i=new Blob([n],{type:"application/json"}),r=URL.createObjectURL(i),a=document.createElement("a");a.href=r,a.download=`${e.name}_v${e.version}.json`,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(r)}catch(e){console.error("Error downloading contract:",e),alert("Failed to download contract. Please try again.")}finally{y(null)}},C=async()=>{try{N(!0);let e=await c.api.templates.downloadContractArtifacts();(0,eF.downloadBlob)(e,"contract_artifact_templates.zip")}catch(e){console.error("Error downloading contract artifacts:",e),alert(e.message||"Failed to download contract artifact templates")}finally{N(!1)}};return s?(0,t.jsx)(eJ.PageLoading,{message:"Loading contracts..."}):(0,t.jsx)("div",{className:"min-h-screen bg-background",children:(0,t.jsxs)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6",children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-1",children:"Contracts"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"View and manage data contracts stored in the database"})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(r.Button,{variant:"outline",size:"sm",onClick:C,disabled:w,title:"Download contract artifact templates",children:[(0,t.jsx)(ez.Download,{className:`h-4 w-4 mr-2 ${w?"animate-pulse":""}`}),w?"Downloading...":"Download Templates"]}),(0,t.jsxs)(r.Button,{variant:"default",size:"sm",onClick:()=>v(!0),title:"Create new contract",children:[(0,t.jsx)(eL.Plus,{className:"h-4 w-4 mr-2"}),"Create Contract"]}),(0,t.jsxs)(r.Button,{variant:"outline",size:"sm",onClick:()=>g(!0),title:"Upload contract file",children:[(0,t.jsx)(eL.Plus,{className:"h-4 w-4 mr-2"}),"Upload"]}),(0,t.jsx)(r.Button,{variant:"outline",size:"sm",onClick:l,disabled:s,title:"Refresh contracts",children:(0,t.jsx)(eW,{className:`h-4 w-4 ${s?"animate-spin":""}`})}),(0,t.jsx)(r.Button,{variant:"table"===d?"default":"outline",size:"sm",onClick:()=>u("table"),title:"Table view",children:(0,t.jsx)(eG,{className:"h-4 w-4"})}),(0,t.jsx)(r.Button,{variant:"cards"===d?"default":"outline",size:"sm",onClick:()=>u("cards"),title:"Cards view",children:(0,t.jsx)(eH,{className:"h-4 w-4"})})]})]})}),o&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(eP.default,{error:Error(o),title:"Failed to load contracts"}),(0,t.jsx)(r.Button,{onClick:l,variant:"outline",className:"mt-4",children:"Retry"})]}),!o&&(0,t.jsx)(t.Fragment,{children:0===e.length?(0,t.jsxs)(i.Card,{children:[(0,t.jsxs)(i.CardHeader,{children:[(0,t.jsx)(i.CardTitle,{children:"No Contracts Found"}),(0,t.jsx)(i.CardDescription,{children:"No data contracts are currently stored in the database."})]}),(0,t.jsx)(i.CardContent,{children:(0,t.jsxs)(r.Button,{onClick:()=>g(!0),children:[(0,t.jsx)(eL.Plus,{className:"h-4 w-4 mr-2"}),"Upload Your First Contract"]})})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"flex justify-between items-center",children:(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:[e.length," contract",1!==e.length?"s":""," found"]})}),"table"===d?(0,t.jsx)(i.Card,{children:(0,t.jsx)(i.CardContent,{className:"p-0",children:(0,t.jsx)(e$,{contracts:e,onViewDetails:p,onEdit:f})})}):(0,t.jsx)("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:e.map(e=>(0,t.jsxs)(i.Card,{className:"hover:shadow-md transition-shadow",children:[(0,t.jsxs)(i.CardHeader,{children:[(0,t.jsx)(i.CardTitle,{className:"text-lg",children:e.name}),(0,t.jsxs)(i.CardDescription,{children:["Version ",e.version,e.status&&` • ${e.status}`]})]}),(0,t.jsxs)(i.CardContent,{children:[e.description&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground mb-4 line-clamp-2",children:e.description}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(r.Button,{variant:"outline",size:"sm",className:"flex-1",onClick:()=>p(e),children:"View Details"}),(0,t.jsx)(r.Button,{variant:"outline",size:"sm",onClick:()=>k(e),disabled:j===e.id,title:"Download contract",children:(0,t.jsx)(ez.Download,{className:`h-4 w-4 ${j===e.id?"animate-pulse":""}`})})]})]})]},e.id))})]})}),m&&(0,t.jsx)(eY,{contract:m,onClose:()=>p(null)}),(0,t.jsx)(eD,{isOpen:b,onClose:()=>v(!1),onSuccess:l}),(0,t.jsx)(eS,{isOpen:x,onClose:()=>g(!1),onSuccess:l}),(0,t.jsx)(eB,{isOpen:null!==h,contract:h,onClose:()=>f(null),onSuccess:l})]})})}e.s(["default",()=>eK],65870)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*,:before,:after,::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border:0 solid #e5e7eb}:before,:after{--tw-content:""}html,:host{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-feature-settings:inherit;font-variation-settings:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:#0000;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{margin:0;padding:0;list-style:none}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder{opacity:1;color:#9ca3af}textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background:0 0% 100%;--foreground:222.2 84% 4.9%;--card:0 0% 100%;--card-foreground:222.2 84% 4.9%;--popover:0 0% 100%;--popover-foreground:222.2 84% 4.9%;--primary:221.2 83.2% 53.3%;--primary-foreground:210 40% 98%;--secondary:210 40% 96.1%;--secondary-foreground:222.2 47.4% 11.2%;--muted:210 40% 96.1%;--muted-foreground:215.4 16.3% 46.9%;--accent:210 40% 96.1%;--accent-foreground:222.2 47.4% 11.2%;--destructive:0 84.2% 60.2%;--destructive-foreground:210 40% 98%;--border:214.3 31.8% 91.4%;--input:214.3 31.8% 91.4%;--ring:221.2 83.2% 53.3%;--radius:.5rem}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.right-0{right:0}.top-0{top:0}.z-10{z-index:10}.z-50{z-index:50}.mx-4{margin-left:1rem;margin-right:1rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-16{height:4rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-full{height:100%}.h-screen{height:100vh}.max-h-96{max-height:24rem}.max-h-\[90vh\]{max-height:90vh}.min-h-0{min-height:0}.min-h-screen{min-height:100vh}.w-1{width:.25rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-16{width:4rem}.w-20{width:5rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-32{width:8rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-5\/6{width:83.3333%}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-full{width:100%}.min-w-0{min-width:0}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-7xl{max-width:80rem}.max-w-md{max-width:28rem}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.rotate-180{--tw-rotate:180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:2s cubic-bezier(.4,0,.6,1) infinite pulse}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:1s linear infinite spin}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize{resize:both}.scroll-mt-4{scroll-margin-top:1rem}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.125rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem*var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem*var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.375rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem*var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem*var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem*var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem*var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem*var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(2rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem*var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px*var(--tw-divide-y-reverse))}.divide-border>:not([hidden])~:not([hidden]){border-color:hsl(var(--border))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-amber-200{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity,1))}.border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.border-border{border-color:hsl(var(--border))}.border-border\/50{border-color:hsl(var(--border)/.5)}.border-destructive\/50{border-color:hsl(var(--destructive)/.5)}.border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.border-green-500\/20{border-color:#22c55e33}.border-input{border-color:hsl(var(--input))}.border-muted{border-color:hsl(var(--muted))}.border-primary{border-color:hsl(var(--primary))}.border-primary\/20{border-color:hsl(var(--primary)/.2)}.border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.border-transparent{border-color:#0000}.border-yellow-200{--tw-border-opacity:1;border-color:rgb(254 240 138/var(--tw-border-opacity,1))}.border-t-primary{border-top-color:hsl(var(--primary))}.bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.bg-background{background-color:hsl(var(--background))}.bg-black\/50{background-color:#00000080}.bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive\/10{background-color:hsl(var(--destructive)/.1)}.bg-destructive\/5{background-color:hsl(var(--destructive)/.05)}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.bg-input{background-color:hsl(var(--input))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/30{background-color:hsl(var(--muted)/.3)}.bg-muted\/50{background-color:hsl(var(--muted)/.5)}.bg-orange-100{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary\/10{background-color:hsl(var(--primary)/.1)}.bg-primary\/5{background-color:hsl(var(--primary)/.05)}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.bg-yellow-50{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity,1))}.p-0{padding:0}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-0\.5{padding-bottom:.125rem}.pb-1{padding-bottom:.25rem}.pb-3{padding-bottom:.75rem}.pl-2{padding-left:.5rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.leading-8{line-height:2rem}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-amber-800{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-destructive\/90{color:hsl(var(--destructive)/.9)}.text-foreground{color:hsl(var(--foreground))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-yellow-600{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}.text-yellow-700{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity,1))}.text-yellow-800{--tw-text-opacity:1;color:rgb(133 77 14/var(--tw-text-opacity,1))}.underline-offset-4{text-underline-offset:4px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-75{opacity:.75}.shadow-lg{--tw-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline-offset:2px;outline:2px solid #0000}.outline{outline-style:solid}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-black{--tw-ring-opacity:1;--tw-ring-color:rgb(0 0 0/var(--tw-ring-opacity,1))}.ring-opacity-5{--tw-ring-opacity:.05}.ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.filter{filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-shadow{transition-property:box-shadow;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0))}}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.running{animation-play-state:running}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:hsl(var(--muted))}::-webkit-scrollbar-thumb{background:hsl(var(--muted-foreground)/.3);border-radius:4px}::-webkit-scrollbar-thumb:hover{background:hsl(var(--muted-foreground)/.5)}[data-group]{touch-action:none}[data-separator]{position:relative;touch-action:none!important;-webkit-user-select:none!important;user-select:none!important;cursor:col-resize!important;pointer-events:auto!important}[data-separator]:hover{background-color:hsl(var(--primary)/.5)!important}[data-separator][data-separator-state=dragging]{background-color:hsl(var(--primary))!important}.file\:mr-4::file-selector-button{margin-right:1rem}.file\:rounded-md::file-selector-button{border-radius:calc(var(--radius) - 2px)}.file\:border-0::file-selector-button{border-width:0}.file\:bg-primary::file-selector-button{background-color:hsl(var(--primary))}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:px-4::file-selector-button{padding-left:1rem;padding-right:1rem}.file\:py-2::file-selector-button{padding-top:.5rem;padding-bottom:.5rem}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.file\:font-semibold::file-selector-button{font-weight:600}.file\:text-primary-foreground::file-selector-button{color:hsl(var(--primary-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:left-\[2px\]:after{content:var(--tw-content);left:2px}.after\:top-\[2px\]:after{content:var(--tw-content);top:2px}.after\:h-5:after{content:var(--tw-content);height:1.25rem}.after\:w-5:after{content:var(--tw-content);width:1.25rem}.after\:rounded-full:after{content:var(--tw-content);border-radius:9999px}.after\:border:after{content:var(--tw-content);border-width:1px}.after\:border-gray-300:after{content:var(--tw-content);--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.after\:bg-background:after{content:var(--tw-content);background-color:hsl(var(--background))}.after\:transition-all:after{content:var(--tw-content);transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.hover\:translate-x-0\.5:hover{--tw-translate-x:.125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.hover\:scale-105:hover{--tw-scale-x:1.05;--tw-scale-y:1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.hover\:border-gray-300:hover{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-blue-500:hover{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive)/.9)}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted)/.5)}.hover\:bg-primary\/15:hover{background-color:hsl(var(--primary)/.15)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary)/.9)}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary)/.8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:underline:hover{text-decoration-line:underline}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\:shadow-sm:hover{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\:file\:bg-primary\/90::file-selector-button:hover{background-color:hsl(var(--primary)/.9)}.focus\:outline-none:focus{outline-offset:2px;outline:2px solid #0000}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-inset:focus{--tw-ring-inset:inset}.focus\:ring-primary:focus{--tw-ring-color:hsl(var(--primary))}.focus\:ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\:outline-none:focus-visible{outline-offset:2px;outline:2px solid #0000}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.active\:scale-95:active{--tw-scale-x:.95;--tw-scale-y:.95;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.peer:checked~.peer-checked\:bg-primary{background-color:hsl(var(--primary))}.peer:checked~.peer-checked\:after\:translate-x-full:after{content:var(--tw-content);--tw-translate-x:100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.peer:checked~.peer-checked\:after\:border-white:after{content:var(--tw-content);--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity,1))}.peer:focus~.peer-focus\:outline-none{outline-offset:2px;outline:2px solid #0000}.peer:focus~.peer-focus\:ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.peer:focus~.peer-focus\:ring-ring{--tw-ring-color:hsl(var(--ring))}.peer:focus~.peer-focus\:ring-offset-2{--tw-ring-offset-width:2px}.peer:focus~.peer-focus\:ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.dark\:border-amber-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(146 64 14/var(--tw-border-opacity,1))}.dark\:border-blue-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(30 64 175/var(--tw-border-opacity,1))}.dark\:border-destructive:is(.dark *){border-color:hsl(var(--destructive))}.dark\:border-green-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(22 101 52/var(--tw-border-opacity,1))}.dark\:border-red-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(153 27 27/var(--tw-border-opacity,1))}.dark\:border-yellow-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(133 77 14/var(--tw-border-opacity,1))}.dark\:bg-amber-950\/20:is(.dark *){background-color:#451a0333}.dark\:bg-blue-900:is(.dark *){--tw-bg-opacity:1;background-color:rgb(30 58 138/var(--tw-bg-opacity,1))}.dark\:bg-blue-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(23 37 84/var(--tw-bg-opacity,1))}.dark\:bg-gray-800:is(.dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\:bg-green-900:is(.dark *){--tw-bg-opacity:1;background-color:rgb(20 83 45/var(--tw-bg-opacity,1))}.dark\:bg-green-900\/20:is(.dark *){background-color:#14532d33}.dark\:bg-orange-900:is(.dark *){--tw-bg-opacity:1;background-color:rgb(124 45 18/var(--tw-bg-opacity,1))}.dark\:bg-red-900:is(.dark *){--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.dark\:bg-red-900\/20:is(.dark *){background-color:#7f1d1d33}.dark\:bg-yellow-900:is(.dark *){--tw-bg-opacity:1;background-color:rgb(113 63 18/var(--tw-bg-opacity,1))}.dark\:bg-yellow-900\/20:is(.dark *){background-color:#713f1233}.dark\:text-amber-200:is(.dark *){--tw-text-opacity:1;color:rgb(253 230 138/var(--tw-text-opacity,1))}.dark\:text-blue-200:is(.dark *){--tw-text-opacity:1;color:rgb(191 219 254/var(--tw-text-opacity,1))}.dark\:text-blue-400:is(.dark *){--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}.dark\:text-gray-200:is(.dark *){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.dark\:text-green-200:is(.dark *){--tw-text-opacity:1;color:rgb(187 247 208/var(--tw-text-opacity,1))}.dark\:text-green-300:is(.dark *){--tw-text-opacity:1;color:rgb(134 239 172/var(--tw-text-opacity,1))}.dark\:text-green-400:is(.dark *){--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.dark\:text-orange-200:is(.dark *){--tw-text-opacity:1;color:rgb(254 215 170/var(--tw-text-opacity,1))}.dark\:text-orange-400:is(.dark *){--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity,1))}.dark\:text-red-200:is(.dark *){--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.dark\:text-red-300:is(.dark *){--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.dark\:text-red-400:is(.dark *){--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.dark\:text-yellow-200:is(.dark *){--tw-text-opacity:1;color:rgb(254 240 138/var(--tw-text-opacity,1))}.dark\:text-yellow-300:is(.dark *){--tw-text-opacity:1;color:rgb(253 224 71/var(--tw-text-opacity,1))}.dark\:text-yellow-400:is(.dark *){--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\:ml-6{margin-left:1.5rem}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(2rem*var(--tw-space-x-reverse));margin-left:calc(2rem*calc(1 - var(--tw-space-x-reverse)))}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-5xl{font-size:3rem;line-height:1}}@media (min-width:768px){.md\:table-cell{display:table-cell}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:text-6xl{font-size:3.75rem;line-height:1}}@media (min-width:1024px){.lg\:table-cell{display:table-cell}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:px-8{padding-left:2rem;padding-right:2rem}}@media (min-width:1280px){.xl\:table-cell{display:table-cell}}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y:-3px;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:left-4>svg{left:1rem}.\[\&\>svg\]\:top-4>svg{top:1rem}.\[\&\>svg\]\:text-destructive>svg{color:hsl(var(--destructive))}.\[\&\>svg\]\:text-foreground>svg{color:hsl(var(--foreground))}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:1.75rem}.\[\&_p\]\:leading-relaxed p{line-height:1.625}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95468,e=>{"use strict";let t=(0,e.i(75254).default)("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["CheckCircle2",()=>t],95468)},73884,e=>{"use strict";let t=(0,e.i(75254).default)("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",()=>t],73884)},43668,e=>{"use strict";var t=e.i(47167);let a="pycharter_settings",n={apiServer:{url:t.default.env.NEXT_PUBLIC_API_URL||"http://localhost:8000"},database:{enabled:!1},dlq:{enabled:!1}};function r(){try{let e=localStorage.getItem(a);if(e){let t=JSON.parse(e);return{...n,...t,apiServer:{...n.apiServer,...t.apiServer},database:{...n.database,...t.database},dlq:{...n.dlq,...t.dlq}}}}catch(e){console.error("Failed to load settings:",e)}return n}function i(e){try{localStorage.setItem(a,JSON.stringify(e))}catch(e){throw console.error("Failed to save settings:",e),e}}function l(){return r().apiServer.url||n.apiServer.url}e.s(["getApiBaseUrl",()=>l,"getSettings",()=>r,"saveSettings",()=>i])},9165,e=>{"use strict";var t=e.i(43668);class a extends Error{status;response;constructor(e,t,a){super(e),this.status=t,this.response=a,this.name="ApiError"}}async function n(e,n){let r=`${(0,t.getApiBaseUrl)()}${e}`;try{let e=await fetch(r,{...n,headers:{"Content-Type":"application/json",...n?.headers}});if(!e.ok){let t;try{t=await e.json()}catch{t={detail:e.statusText}}let n=t.detail||`API request failed: ${e.statusText}`;throw 422===e.status&&t.details&&Array.isArray(t.details)&&(n=t.details.map(e=>{let t=e.loc?.join(".")||e.field||"field",a=e.msg||e.message||"validation error";return`${t}: ${a}`}).join("; ")||n),new a(n,e.status,t)}let t=e.headers.get("content-type");if(t&&t.includes("application/json"))return e.json();return e.text()}catch(n){if(n instanceof TypeError&&"Failed to fetch"===n.message){let n=(0,t.getApiBaseUrl)();throw new a(`Unable to connect to API server at ${n}. Please ensure the API server is running and the URL is correct.`,0,{originalError:"NetworkError",apiUrl:n,endpoint:e,suggestion:"Check your API server settings in the Settings page"})}throw n}}async function r(e){return n(e,{method:"GET"})}async function i(e,t){return n(e,{method:"POST",body:t?JSON.stringify(t):void 0})}async function l(e,t){return n(e,{method:"PUT",body:t?JSON.stringify(t):void 0})}async function o(e,n){let r=`${(0,t.getApiBaseUrl)()}${e}`,i=await fetch(r,{method:"POST",body:n});if(!i.ok){let e;try{e=await i.json()}catch{e={detail:i.statusText}}throw new a(e.detail||`API request failed: ${i.statusText}`,i.status,e)}let l=i.headers.get("content-type");return l&&l.includes("application/json")?i.json():i.text()}async function s(e){let n=`${(0,t.getApiBaseUrl)()}${e}`,r=await fetch(n,{method:"GET"});if(!r.ok){let e;try{e=await r.json()}catch{e={detail:r.statusText}}throw new a(e.detail||`API request failed: ${r.statusText}`,r.status,e)}return r.blob()}e.s(["ApiError",()=>a,"api",0,{contracts:{list:()=>r("/api/v1/contracts"),get:e=>r(`/api/v1/contracts/${e}`),parse:e=>i("/api/v1/contracts/parse",{contract:e}),parseFile:(e,t)=>{let a=new FormData;return a.append("file",e),void 0!==t&&a.append("validate",String(t)),o("/api/v1/contracts/parse/upload",a)},build:e=>i("/api/v1/contracts/build",e),buildFromId:(e,t)=>{let a=new URLSearchParams;t?.include_metadata!==void 0&&a.append("include_metadata",String(t.include_metadata)),t?.include_ownership!==void 0&&a.append("include_ownership",String(t.include_ownership)),t?.include_governance!==void 0&&a.append("include_governance",String(t.include_governance));let n=a.toString();return i(`/api/v1/contracts/${e}/build${n?`?${n}`:""}`,{})},createFromArtifacts:e=>i("/api/v1/contracts/create-from-artifacts",e),createMixed:e=>i("/api/v1/contracts/create-mixed",e),update:(e,t)=>l(`/api/v1/contracts/${e}`,t)},metadata:{listSchemas:()=>r("/api/v1/metadata/schemas"),getSchema:(e,t)=>{let a=t?`?version=${t}`:"";return r(`/api/v1/metadata/schemas/${e}${a}`)},getCompleteSchema:(e,t)=>{let a=t?`?version=${t}`:"";return r(`/api/v1/metadata/schemas/${e}/complete${a}`)},storeSchema:e=>i("/api/v1/metadata/schemas",e),getMetadata:(e,t)=>{let a=t?`?version=${t}`:"";return r(`/api/v1/metadata/metadata/${e}${a}`)},storeMetadata:e=>i("/api/v1/metadata/metadata",e),getCoercionRules:(e,t)=>{let a=t?`?version=${t}`:"";return r(`/api/v1/metadata/coercion-rules/${e}${a}`)},storeCoercionRules:e=>i("/api/v1/metadata/coercion-rules",e),getValidationRules:(e,t)=>{let a=t?`?version=${t}`:"";return r(`/api/v1/metadata/validation-rules/${e}${a}`)},storeValidationRules:e=>i("/api/v1/metadata/validation-rules",e),getEntityList:e=>r(`/api/v1/metadata/${e}`),createEntity:(e,t)=>i(`/api/v1/metadata/${e}`,t),updateEntity:(e,t,a)=>l(`/api/v1/metadata/${e}/${t}`,a),listArtifacts:()=>r("/api/v1/metadata/artifacts")},validation:{validate:e=>i("/api/v1/validation/validate",e),validateBatch:e=>i("/api/v1/validation/validate-batch",e)},schemas:{generate:e=>i("/api/v1/schemas/generate",e),convert:e=>i("/api/v1/schemas/convert",e)},quality:{listMetrics:e=>{let t=new URLSearchParams;e?.schema_id&&t.append("schema_id",e.schema_id),e?.limit&&t.append("limit",e.limit.toString()),e?.offset&&t.append("offset",e.offset.toString());let a=t.toString();return r(`/api/v1/quality/metrics${a?`?${a}`:""}`)},getMetric:e=>r(`/api/v1/quality/metrics/${e}`),getReport:(e,t)=>{let a=new URLSearchParams;t?.data_source&&a.append("data_source",t.data_source),t?.limit&&a.append("limit",t.limit.toString());let n=a.toString();return r(`/api/v1/quality/reports/${e}${n?`?${n}`:""}`)},check:e=>i("/api/v1/quality/check",e),checkUpload:(e,t)=>{let a=new FormData;return a.append("file",e),t.schema_id&&a.append("schema_id",t.schema_id),t.contract&&a.append("contract",t.contract),void 0!==t.record_violations&&a.append("record_violations",String(t.record_violations)),void 0!==t.calculate_metrics&&a.append("calculate_metrics",String(t.calculate_metrics)),void 0!==t.check_thresholds&&a.append("check_thresholds",String(t.check_thresholds)),t.thresholds&&a.append("thresholds",t.thresholds),void 0!==t.include_field_metrics&&a.append("include_field_metrics",String(t.include_field_metrics)),void 0!==t.sample_size&&a.append("sample_size",String(t.sample_size)),t.data_source&&a.append("data_source",t.data_source),t.data_version&&a.append("data_version",t.data_version),o("/api/v1/quality/check/upload",a)},queryViolations:e=>i("/api/v1/quality/violations",e)},templates:{downloadSchema:()=>s("/api/v1/templates/schema"),downloadContractArtifacts:()=>s("/api/v1/templates/contract-artifacts"),listEtlTemplates:()=>n("/api/v1/templates/etl"),downloadEtlTemplate:async e=>{let n=(0,t.getApiBaseUrl)().replace(/\/$/,""),r=await fetch(`${n}/api/v1/templates/etl/${encodeURIComponent(e)}`);if(!r.ok)throw new a(await r.text()||r.statusText,r.status);return r.text()}},settings:{testDatabase:e=>i("/api/v1/settings/test-database",e),testDlq:e=>i("/api/v1/settings/test-dlq",e),getDlqStats:e=>i("/api/v1/settings/dlq-stats",e)}}])},63209,e=>{"use strict";let t=(0,e.i(75254).default)("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",()=>t],63209)},56909,e=>{"use strict";let t=(0,e.i(75254).default)("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);e.s(["Save",()=>t],56909)},46652,e=>{"use strict";var t=e.i(71645),a=e.i(9165);function n(){let[e,n]=(0,t.useState)([]),[r,i]=(0,t.useState)(!0),[l,o]=(0,t.useState)(null),s=(0,t.useCallback)(async()=>{try{i(!0),o(null);let e=await a.api.contracts.list();n(e.contracts)}catch(t){let e="Failed to load contracts";t instanceof a.ApiError&&(e=0===t.status||t.message.includes("Unable to connect")?"API server is not running. Please start it with: pycharter api":t.message),o(e),console.error("Error loading contracts:",t)}finally{i(!1)}},[]);return(0,t.useEffect)(()=>{s()},[s]),{contracts:e,loading:r,error:l,refetch:s}}e.s(["useContracts",()=>n])},98919,52571,e=>{"use strict";var t=e.i(75254);let a=(0,t.default)("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);e.s(["Shield",()=>a],98919);let n=(0,t.default)("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["Info",()=>n],52571)},78583,e=>{"use strict";let t=(0,e.i(75254).default)("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["FileText",()=>t],78583)},69074,e=>{"use strict";let t=(0,e.i(75254).default)("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);e.s(["Upload",()=>t],69074)},71921,e=>{"use strict";let t;var a=e.i(43476),n=e.i(71645);function r(e,t="Assertion error"){if(!e)throw Error(t)}function i({group:e}){let{orientation:t,panels:a}=e;return a.reduce((e,a)=>e+="horizontal"===t?a.element.offsetWidth:a.element.offsetHeight,0)}function l(e,t){return t.sort("horizontal"===e?o:s)}function o(e,t){let a=e.element.offsetLeft-t.element.offsetLeft;return 0!==a?a:e.element.offsetWidth-t.element.offsetWidth}function s(e,t){let a=e.element.offsetTop-t.element.offsetTop;return 0!==a?a:e.element.offsetHeight-t.element.offsetHeight}function d(e){return null!==e&&"object"==typeof e&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function c(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function u(e){let{element:t,orientation:a,panels:n,separators:o}=e,s=l(a,Array.from(t.children).filter(d).map(e=>({element:e}))).map(({element:e})=>e),u=[],p=!1,f,m=[];for(let t of s)if(t.hasAttribute("data-panel")){let l=n.find(e=>e.element===t);if(l){if(f){let n,o=f.element.getBoundingClientRect(),s=t.getBoundingClientRect();if(p){let e="horizontal"===a?new DOMRect(o.right,o.top,0,o.height):new DOMRect(o.left,o.bottom,o.width,0),t="horizontal"===a?new DOMRect(s.left,s.top,0,s.height):new DOMRect(s.left,s.top,s.width,0);switch(m.length){case 0:n=[e,t];break;case 1:{let i=m[0],l=function({orientation:e,rects:t,targetRect:a}){let n={x:a.x+a.width/2,y:a.y+a.height/2},i,l=Number.MAX_VALUE;for(let a of t){let{x:t,y:r}=c(n,a),o="horizontal"===e?t:r;o<l&&(l=o,i=a)}return r(i,"No rect found"),i}({orientation:a,rects:[o,s],targetRect:i.element.getBoundingClientRect()});n=[i,l===o?t:e];break}default:n=m}}else n=m.length?m:["horizontal"===a?new DOMRect(o.right,s.top,s.left-o.right,s.height):new DOMRect(s.left,o.bottom,s.width,s.top-o.bottom)];for(let t of n)u.push({group:e,groupSize:i({group:e}),panels:[f,l],separator:"width"in t?void 0:t,rect:"width"in t?t:t.element.getBoundingClientRect()})}p=!1,f=l,m=[]}}else if(t.hasAttribute("data-separator")){let e=o.find(e=>e.element===t);e?m.push(e):(f=void 0,m=[])}else p=!0;return u}function p({groupSize:e,panelElement:t,styleProp:a}){let n,[r,i]=function(e){switch(typeof e){case"number":return[e,"px"];case"string":{let t=parseFloat(e);return e.endsWith("%")?[t,"%"]:e.endsWith("px")?[t,"px"]:e.endsWith("rem")?[t,"rem"]:e.endsWith("em")?[t,"em"]:e.endsWith("vh")?[t,"vh"]:e.endsWith("vw")?[t,"vw"]:[t,"%"]}}}(a);switch(i){case"%":n=r/100*e;break;case"px":n=r;break;case"rem":n=r*parseFloat(getComputedStyle(t.ownerDocument.body).fontSize);break;case"em":n=r*parseFloat(getComputedStyle(t).fontSize);break;case"vh":n=r/100*window.innerHeight;break;case"vw":n=r/100*window.innerWidth}return n}function f(e){return parseFloat(e.toFixed(3))}function m(e){let{panels:t}=e,a=i({group:e});return 0===a?t.map(e=>({collapsedSize:0,collapsible:!0===e.panelConstraints.collapsible,defaultSize:void 0,minSize:0,maxSize:100,panelId:e.id})):t.map(e=>{let t,{element:n,panelConstraints:r}=e,i=0;void 0!==r.collapsedSize&&(i=f(p({groupSize:a,panelElement:n,styleProp:r.collapsedSize})/a*100)),void 0!==r.defaultSize&&(t=f(p({groupSize:a,panelElement:n,styleProp:r.defaultSize})/a*100));let l=0;void 0!==r.minSize&&(l=f(p({groupSize:a,panelElement:n,styleProp:r.minSize})/a*100));let o=100;return void 0!==r.maxSize&&(o=f(p({groupSize:a,panelElement:n,styleProp:r.maxSize})/a*100)),{collapsedSize:i,collapsible:!0===r.collapsible,defaultSize:t,minSize:l,maxSize:o,panelId:e.id}})}function h(e,t,a=0){return Math.abs(f(e)-f(t))<=a}let g={cursorFlags:0,interactionState:{state:"inactive"},mountedGroups:new Map},v=new class{#e={};addListener(e,t){let a=this.#e[e];return void 0===a?this.#e[e]=[t]:a.includes(t)||a.push(t),()=>{this.removeListener(e,t)}}emit(e,t){let a=this.#e[e];if(void 0!==a)if(1===a.length)a[0].call(null,t);else{let e=!1,n=null,r=Array.from(a);for(let a=0;a<r.length;a++){let i=r[a];try{i.call(null,t)}catch(t){null===n&&(e=!0,n=t)}}if(e)throw n}}removeAllListeners(){this.#e={}}removeListener(e,t){let a=this.#e[e];if(void 0!==a){let e=a.indexOf(t);e>=0&&a.splice(e,1)}}};function y(e){let t="function"==typeof e?e(g):e;if(g===t)return g;let a=g;return g={...g,...t},void 0!==t.cursorFlags&&v.emit("cursorFlagsChange",g.cursorFlags),void 0!==t.interactionState&&v.emit("interactionStateChange",g.interactionState),void 0!==t.mountedGroups&&(g.mountedGroups.forEach((e,t)=>{e.derivedPanelConstraints.forEach(n=>{if(n.collapsible){let{layout:r}=a.mountedGroups.get(t)??{};if(r){let a=h(n.collapsedSize,e.layout[n.panelId]),i=h(n.collapsedSize,r[n.panelId]);a&&!i&&(t.inMemoryLastExpandedPanelSizes[n.panelId]=r[n.panelId])}}})}),v.emit("mountedGroupsChange",g.mountedGroups)),g}function x(e,t){return h(e,t)?0:e>t?1:-1}function b({panelConstraints:e,size:t}){let{collapsedSize:a=0,collapsible:n,maxSize:r=100,minSize:i=0}=e;return 0>x(t,i)&&(t=n&&0>x(t,(a+i)/2)?a:i),f(t=Math.min(r,t))}function S({delta:e,initialLayout:t,panelConstraints:a,pivotIndices:n,prevLayout:i,trigger:l}){if(h(e,0))return t;let o=Object.values(t),s=Object.values(i),d=[...o],[c,u]=n;r(null!=c,"Invalid first pivot index"),r(null!=u,"Invalid second pivot index");let p=0;if("keyboard"===l){{let t=e<0?u:c,n=a[t];r(n,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:l,minSize:s=0}=n;if(l){let a=o[t];if(r(null!=a,`Previous layout not found for panel index ${t}`),h(a,i)){let t=s-a;x(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let t=e<0?c:u,n=a[t];r(n,`No panel constraints found for index ${t}`);let{collapsedSize:i=0,collapsible:l,minSize:s=0}=n;if(l){let a=o[t];if(r(null!=a,`Previous layout not found for panel index ${t}`),h(a,s)){let t=a-i;x(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}}{let t=e<0?1:-1,n=e<0?u:c,i=0;for(;;){let e=o[n];if(r(null!=e,`Previous layout not found for panel index ${n}`),i+=b({panelConstraints:a[n],size:100})-e,(n+=t)<0||n>=a.length)break}let l=Math.min(Math.abs(e),Math.abs(i));e=e<0?0-l:l}{let t=e<0?c:u;for(;t>=0&&t<a.length;){let n=Math.abs(e)-Math.abs(p),i=o[t];r(null!=i,`Previous layout not found for panel index ${t}`);let l=i-n,s=b({panelConstraints:a[t],size:l});if(!h(i,s)&&(p+=i-s,d[t]=s,p.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?t--:t++}}if(function(e,t){if(e.length!==t.length)return!1;for(let a=0;a<e.length;a++)if(e[a]!=t[a])return!1;return!0}(s,d))return i;{let t=e<0?u:c,n=o[t];r(null!=n,`Previous layout not found for panel index ${t}`);let i=n+p,l=b({panelConstraints:a[t],size:i});if(d[t]=l,!h(l,i)){let t=i-l,n=e<0?u:c;for(;n>=0&&n<a.length;){let i=d[n];r(null!=i,`Previous layout not found for panel index ${n}`);let l=i+t,o=b({panelConstraints:a[n],size:l});if(h(i,o)||(t-=o-i,d[n]=o),h(t,0))break;e>0?n--:n++}}}if(!h(Object.values(d).reduce((e,t)=>t+e,0),100,.1))return i;let f=Object.keys(i);return d.reduce((e,t,a)=>(e[f[a]]=t,e),{})}function w(e){let{mountedGroups:t}=g;for(let[a]of t)if(a.separators.some(t=>t.element===e))return a;throw Error("Could not find parent Group for separator element")}function j(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let a in e)if(void 0===t[a]||0!==x(e[a],t[a]))return!1;return!0}function C({layout:e,panelConstraints:t}){let a=[...Object.values(e)],n=a.reduce((e,t)=>e+t,0);if(a.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${a.map(e=>`${e}%`).join(", ")}`);if(!h(n,100)&&a.length>0)for(let e=0;e<t.length;e++){let t=a[e];r(null!=t,`No layout data found for index ${e}`);let i=100/n*t;a[e]=i}let i=0;for(let e=0;e<t.length;e++){let n=a[e];r(null!=n,`No layout data found for index ${e}`);let l=b({panelConstraints:t[e],size:n});n!=l&&(i+=n-l,a[e]=l)}if(!h(i,0))for(let e=0;e<t.length;e++){let n=a[e];r(null!=n,`No layout data found for index ${e}`);let l=n+i,o=b({panelConstraints:t[e],size:l});if(n!==o&&(i-=o-n,a[e]=o,h(i,0)))break}let l=Object.keys(e);return a.reduce((e,t,a)=>(e[l[a]]=t,e),{})}function z({groupId:e}){let t=()=>{let{mountedGroups:t}=g;for(let[a,n]of t)if(a.id===e)return{group:a,...n};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){let{defaultLayoutDeferred:e,layout:a}=t();return e?{}:a},setLayout(e){let{defaultLayoutDeferred:a,derivedPanelConstraints:n,group:r,layout:i,separatorToPanels:l}=t(),o=C({layout:e,panelConstraints:n});return a?i:(j(i,o)||y(e=>({mountedGroups:new Map(e.mountedGroups).set(r,{defaultLayoutDeferred:a,derivedPanelConstraints:n,layout:o,separatorToPanels:l})})),o)}}}function k(e){let{mountedGroups:t}=g,a=t.get(e);return r(a,`Mounted Group ${e.id} not found`),a}function N(e,t){let a=w(e),n=k(a),i=a.separators.find(t=>t.element===e);r(i,"Matching separator not found");let l=n.separatorToPanels.get(i);r(l,"Matching panels not found");let o=l.map(e=>a.panels.indexOf(e)),s=z({groupId:a.id}).getLayout(),d=C({layout:S({delta:t,initialLayout:s,panelConstraints:n.derivedPanelConstraints,pivotIndices:o,prevLayout:s,trigger:"keyboard"}),panelConstraints:n.derivedPanelConstraints});j(s,d)||y(e=>({mountedGroups:new Map(e.mountedGroups).set(a,{defaultLayoutDeferred:n.defaultLayoutDeferred,derivedPanelConstraints:n.derivedPanelConstraints,layout:d,separatorToPanels:n.separatorToPanels})}))}function P(e){if(e.defaultPrevented)return;let t=e.currentTarget,a=w(t);if(!a.disabled)switch(e.key){case"ArrowDown":e.preventDefault(),"vertical"===a.orientation&&N(t,5);break;case"ArrowLeft":e.preventDefault(),"horizontal"===a.orientation&&N(t,-5);break;case"ArrowRight":e.preventDefault(),"horizontal"===a.orientation&&N(t,5);break;case"ArrowUp":e.preventDefault(),"vertical"===a.orientation&&N(t,-5);break;case"End":e.preventDefault(),N(t,100);break;case"Enter":{e.preventDefault();let a=w(t),{derivedPanelConstraints:n,layout:i,separatorToPanels:l}=k(a),o=a.separators.find(e=>e.element===t);r(o,"Matching separator not found");let s=l.get(o);r(s,"Matching panels not found");let d=s[0],c=n.find(e=>e.panelId===d.id);if(r(c,"Panel metadata not found"),c.collapsible){let e=i[d.id];N(t,(c.collapsedSize===e?a.inMemoryLastExpandedPanelSizes[d.id]??c.minSize:c.collapsedSize)-e)}break}case"F6":{e.preventDefault();let a=w(t).separators.map(e=>e.element),n=Array.from(a).findIndex(t=>t===e.currentTarget);r(null!==n,"Index not found");let i=e.shiftKey?n>0?n-1:a.length-1:n+1<a.length?n+1:0;a[i].focus();break}case"Home":e.preventDefault(),N(t,-100)}}let L=e=>e,_=()=>{},M=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function I(e){let t=e.length;for(;t--;){let a=e[t];if(r(a,"Missing node"),function(e){let t,a=getComputedStyle(e);return!!("fixed"===a.position||"auto"!==a.zIndex&&("static"!==a.position||"flex"===(t=getComputedStyle(T(e)??e).display)||"inline-flex"===t)||1>+a.opacity||"transform"in a&&"none"!==a.transform||"webkitTransform"in a&&"none"!==a.webkitTransform||"mixBlendMode"in a&&"normal"!==a.mixBlendMode||"filter"in a&&"none"!==a.filter||"webkitFilter"in a&&"none"!==a.webkitFilter||"isolation"in a&&"isolate"===a.isolation||M.test(a.willChange)||"touch"===a.webkitOverflowScrolling)}(a))return a}return null}function R(e){return e&&Number(getComputedStyle(e).zIndex)||0}function E(e){let t=[];for(;e;)t.push(e),e=T(e);return t}function T(e){let{parentNode:t}=e;return null!==t&&"object"==typeof t&&"nodeType"in t&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE?t.host:t}function $(e,a){let n=[];return a.forEach((a,i)=>{if(i.disabled)return;let l=(void 0===t&&(t="function"==typeof matchMedia&&!!matchMedia("(pointer:coarse)").matches),t)?10:5,o=u(i),s=function(e,t,a){let n,r={x:1/0,y:1/0};for(let i of t){let t=c(a,i.rect);switch(e){case"horizontal":t.x<=r.x&&(n=i,r=t);break;case"vertical":t.y<=r.y&&(n=i,r=t)}}return n?{distance:r,hitRegion:n}:void 0}(i.orientation,o,{x:e.clientX,y:e.clientY});s&&s.distance.x<=l&&s.distance.y<=l&&function({groupElement:e,hitRegion:t,pointerEventTarget:a}){if(!d(a)||a.contains(e)||e.contains(a))return!0;if(function(e,t){let a;if(e===t)throw Error("Cannot compare node with itself");let n={a:E(e),b:E(t)};for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),a=e;r(a,"Stacking order can only be calculated for elements with a common ancestor");let i={a:R(I(n.a)),b:R(I(n.b))};if(i.a===i.b){let e=a.childNodes,t={a:n.a.at(-1),b:n.b.at(-1)},r=e.length;for(;r--;){let a=e[r];if(a===t.a)return 1;if(a===t.b)return -1}}return Math.sign(i.a-i.b)}(a,e)>0){let r=a;for(;r;){var n;if(r.contains(e))break;if(n=r.getBoundingClientRect(),n.x<t.x+t.width&&n.x+n.width>t.x&&n.y<t.y+t.height&&n.y+n.height>t.y)return!1;r=r.parentElement}}return!0}({groupElement:i.element,hitRegion:s.hitRegion.rect,pointerEventTarget:e.target})&&n.push(s.hitRegion)}),n}function D(e){if(e.defaultPrevented||"mouse"===e.pointerType&&e.button>0)return;let{mountedGroups:t}=g,a=$(e,t),n=new Set,r=new Set,i=new Set,l=new Map,o=!1;a.forEach(e=>{n.add(e.group),e.panels.forEach(e=>{r.add(e)}),e.separator&&(i.add(e.separator),o||(o=!0,e.separator.element.focus()));let a=t.get(e.group);a&&l.set(e.group,a.layout)}),y({interactionState:{hitRegions:a,initialLayoutMap:l,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:"active"}}),a.length&&e.preventDefault()}let A=new WeakMap;function O(e){if(null===e.defaultView||void 0===e.defaultView)return;let{prevStyle:t,styleSheet:a}=A.get(e)??{};void 0===a&&(a=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets=[a]);let{cursorFlags:n,interactionState:r}=g;switch(r.state){case"active":case"hover":{let e=function({cursorFlags:e,groups:t,state:a}){let n=0,r=0;switch(a){case"active":case"hover":t.forEach(e=>{if(!e.disableCursor)switch(e.orientation){case"horizontal":n++;break;case"vertical":r++}})}if(0===n&&0===r)return null;if("active"===a){let t=(4&e)!=0,a=(8&e)!=0;if(e){if((1&e)!=0)return t?"se-resize":a?"ne-resize":"e-resize";if((2&e)!=0)return t?"sw-resize":a?"nw-resize":"w-resize";if(t)return"s-resize";if(a)return"n-resize"}}return n>0&&r>0?"move":n>0?"ew-resize":"ns-resize"}({cursorFlags:n,groups:r.hitRegions.map(e=>e.group),state:r.state}),i=`*{cursor: ${e} !important; ${"active"===r.state?"touch-action: none;":""} }`;if(t===i)return;t=i,e?0===a.cssRules.length?a.insertRule(i):a.replaceSync(i):1===a.cssRules.length&&a.deleteRule(0);break}case"inactive":t=void 0,1===a.cssRules.length&&a.deleteRule(0)}A.set(e,{prevStyle:t,styleSheet:a})}function F({document:e,event:t,hitRegions:a,initialLayoutMap:n,mountedGroups:r,pointerDownAtPoint:i}){let l=0,o=new Map(r);a.forEach(e=>{let{group:a,groupSize:s}=e,{disableCursor:d,orientation:c,panels:u}=a,p=0;p=i?"horizontal"===c?(t.clientX-i.x)/s*100:(t.clientY-i.y)/s*100:"horizontal"===c?t.clientX<0?-100:100:t.clientY<0?-100:100;let f=n.get(a),{defaultLayoutDeferred:m,derivedPanelConstraints:h,layout:g,separatorToPanels:v}=r.get(a)??{defaultLayoutDeferred:!1};if(h&&f&&g&&v){let t=S({delta:p,initialLayout:f,panelConstraints:h,pivotIndices:e.panels.map(e=>u.indexOf(e)),prevLayout:g,trigger:"mouse-or-touch"});if(j(t,g)){if(0!==p&&!d)switch(c){case"horizontal":l|=p<0?1:2;break;case"vertical":l|=p<0?4:8}}else{o.set(e.group,{defaultLayoutDeferred:m,derivedPanelConstraints:h,layout:t,separatorToPanels:v});let a=e.group.panels.map(({id:e})=>e).join(",");e.group.inMemoryLayouts[a]=t}}}),y({cursorFlags:l,mountedGroups:o}),O(e)}function G(e){let{interactionState:t,mountedGroups:a}=g;"active"===t.state&&F({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:a})}function W(e){if(e.defaultPrevented)return;let{interactionState:t,mountedGroups:a}=g;if("active"===t.state){if(0===e.buttons){y(e=>"inactive"===e.interactionState.state?e:{cursorFlags:0,interactionState:{state:"inactive"}}),y(e=>({mountedGroups:new Map(e.mountedGroups)}));return}F({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:a,pointerDownAtPoint:t.pointerDownAtPoint})}else{let n=$(e,a);0===n.length?"inactive"!==t.state&&y({interactionState:{state:"inactive"}}):y({interactionState:{hitRegions:n,state:"hover"}}),O(e.currentTarget)}}function B(e){if(e.defaultPrevented||"mouse"===e.pointerType&&e.button>0)return;let{interactionState:t}=g;"active"===t.state&&(y({cursorFlags:0,interactionState:{state:"inactive"}}),t.hitRegions.length>0&&(O(e.currentTarget),y(e=>({mountedGroups:new Map(e.mountedGroups)})),e.preventDefault()))}function V(e){let t=0,a=0,n={};for(let r of e)if(void 0!==r.defaultSize){t++;let e=f(r.defaultSize);a+=e,n[r.panelId]=e}else n[r.panelId]=void 0;let r=e.length-t;if(0!==r){let t=f((100-a)/r);for(let a of e)void 0===a.defaultSize&&(n[a.panelId]=t)}return n}let q=new Map;function U(){let[e,t]=(0,n.useState)({});return[e,(0,n.useCallback)(()=>t({}),[])]}function J(e){let t=(0,n.useId)();return`${e??t}`}let H=n.useLayoutEffect;function X(e){let t=(0,n.useRef)(e);return H(()=>{t.current=e},[e]),(0,n.useCallback)((...e)=>t.current?.(...e),[t])}function K(...e){return X(t=>{e.forEach(e=>{if(e)switch(typeof e){case"function":e(t);break;case"object":e.current=t}})})}let Y=(0,n.createContext)(null);function Z({children:e,className:t,defaultLayout:o,disableCursor:s,disabled:d,elementRef:c,groupRef:p,id:h,onLayoutChange:x,onLayoutChanged:b,orientation:S="horizontal",style:w,...k}){var N;let _,M,I=(0,n.useRef)({onLayoutChange:{},onLayoutChanged:{}}),R=X(e=>{j(I.current.onLayoutChange,e)||(I.current.onLayoutChange=e,x?.(e))}),E=X(e=>{j(I.current.onLayoutChanged,e)||(I.current.onLayoutChanged=e,b?.(e))}),T=J(h),$=(0,n.useRef)(null),[A,O]=U(),F=(0,n.useRef)({lastExpandedPanelSizes:{},layouts:{},panels:[],separators:[]}),Z=K($,c);_=(0,n.useRef)({getLayout:()=>({}),setLayout:L}),(0,n.useImperativeHandle)(p,()=>_.current,[]),H(()=>{Object.assign(_.current,z({groupId:T}))});let Q=X((e,t)=>{let{interactionState:a,mountedGroups:n}=g;for(let r of n.keys())if(r.id===e){let e=n.get(r);if(e){let n=!1;return"active"===a.state&&(n=a.hitRegions.some(e=>e.group===r)),{flexGrow:e.layout[t]??1,pointerEvents:n?"none":void 0}}}return{flexGrow:o?.[t]??1}}),ee=(0,n.useMemo)(()=>({getPanelStyles:Q,id:T,orientation:S,registerPanel:e=>{let t=F.current;return t.panels=l(S,[...t.panels,e]),O(),()=>{t.panels=t.panels.filter(t=>t!==e),O()}},registerSeparator:e=>{let t=F.current;return t.separators=l(S,[...t.separators,e]),O(),()=>{t.separators=t.separators.filter(t=>t!==e),O()}}}),[Q,T,O,S]),et=(N={defaultLayout:o,disableCursor:s},M=(0,n.useRef)({...N}),H(()=>{for(let e in N)M.current[e]=N[e]},[N]),M.current),ea=(0,n.useRef)(null);return H(()=>{let e,t,a,n,l,o,s,c,p,h,x,b,w=$.current;if(null===w)return;let z=F.current,k={defaultLayout:et.defaultLayout,disableCursor:!!et.disableCursor,disabled:!!d,element:w,id:T,inMemoryLastExpandedPanelSizes:F.current.lastExpandedPanelSizes,inMemoryLayouts:F.current.layouts,orientation:S,panels:z.panels,separators:z.separators};ea.current=k;let N=(e=!0,r(k.element.ownerDocument.defaultView,"Cannot register an unmounted Group"),t=k.element.ownerDocument.defaultView.ResizeObserver,a=new Set,n=new Set,(l=new t(t=>{for(let a of t){let{borderBoxSize:t,target:n}=a;if(n===k.element){if(e){if(0===i({group:k}))return;y(e=>{let t=e.mountedGroups.get(k);if(t){let a=m(k),n=t.defaultLayoutDeferred?V(a):t.layout,r=C({layout:n,panelConstraints:a});return!t.defaultLayoutDeferred&&j(n,r)&&function(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let a in e)if(e[a]!==t[a])return!1;return!0}(t.derivedPanelConstraints,a)?e:{mountedGroups:new Map(e.mountedGroups).set(k,{defaultLayoutDeferred:!1,derivedPanelConstraints:a,layout:r,separatorToPanels:t.separatorToPanels})}}return e})}}else!function(e,t,a){if(!a[0])return;let n=e.panels.find(e=>e.element===t);if(!n||!n.onResize)return;let r=i({group:e}),l="horizontal"===e.orientation?n.element.offsetWidth:n.element.offsetHeight,o=n.mutableValues.prevSize,s={asPercentage:f(l/r*100),inPixels:l};n.mutableValues.prevSize=s,n.onResize(s,n.id,o)}(k,n,t)}})).observe(k.element),k.panels.forEach(e=>{r(!a.has(e.id),`Panel ids must be unique; id "${e.id}" was used more than once`),a.add(e.id),e.onResize&&l.observe(e.element)}),o=i({group:k}),s=m(k),c=k.panels.map(({id:e})=>e).join(","),(p=k.defaultLayout)&&(function(e,t){let a=e.map(e=>e.id),n=Object.keys(t);if(a.length!==n.length)return!1;for(let e of a)if(!n.includes(e))return!1;return!0}(k.panels,p)||(p=void 0)),h=C({layout:k.inMemoryLayouts[c]??p??V(s),panelConstraints:s}),x=u(k),b=k.element.ownerDocument,y(e=>{let t=new Map;return q.set(b,(q.get(b)??0)+1),x.forEach(e=>{e.separator&&t.set(e.separator,e.panels)}),{mountedGroups:new Map(e.mountedGroups).set(k,{defaultLayoutDeferred:0===o,derivedPanelConstraints:s,layout:h,separatorToPanels:t})}}),k.separators.forEach(e=>{r(!n.has(e.id),`Separator ids must be unique; id "${e.id}" was used more than once`),n.add(e.id),e.element.addEventListener("keydown",P)}),1===q.get(b)&&(b.addEventListener("pointerdown",D,!0),b.addEventListener("pointerleave",G),b.addEventListener("pointermove",W),b.addEventListener("pointerup",B,!0)),function(){e=!1,q.set(b,Math.max(0,(q.get(b)??0)-1)),y(e=>{let t=new Map(e.mountedGroups);return t.delete(k),{mountedGroups:t}}),k.separators.forEach(e=>{e.element.removeEventListener("keydown",P)}),q.get(b)||(b.removeEventListener("pointerdown",D,!0),b.removeEventListener("pointerleave",G),b.removeEventListener("pointermove",W),b.removeEventListener("pointerup",B,!0)),l.disconnect()}),L=g.mountedGroups.get(k);if(L){let{defaultLayoutDeferred:e,derivedPanelConstraints:t,layout:a}=L;!e&&t.length>0&&(R(a),E(a),z.panels.forEach(e=>{e.scheduleUpdate()}))}let _=v.addListener("interactionStateChange",()=>{z.panels.forEach(e=>{e.scheduleUpdate()})}),M=v.addListener("mountedGroupsChange",e=>{let t=e.get(k);if(t){let{defaultLayoutDeferred:e,derivedPanelConstraints:a,layout:n}=t;if(e||0===a.length)return;let{interactionState:r}=g,i="active"!==r.state;R(n),i&&E(n),z.panels.forEach(e=>{e.scheduleUpdate()})}});return()=>{ea.current=null,N(),_(),M()}},[d,T,E,R,S,A,et]),(0,n.useEffect)(()=>{let e=ea.current;e&&(e.defaultLayout=o,e.disableCursor=!!s)}),(0,a.jsx)(Y.Provider,{value:ee,children:(0,a.jsx)("div",{...k,"aria-orientation":S,className:t,"data-group":!0,"data-testid":T,id:T,ref:Z,style:{height:"100%",width:"100%",overflow:"hidden",...w,display:"flex",flexDirection:"horizontal"===S?"row":"column",flexWrap:"nowrap"},children:e})})}function Q(){let e=(0,n.useContext)(Y);return r(e,"Group Context not found; did you render a Panel or Separator outside of a Group?"),e}function ee({children:e,className:t,collapsedSize:r="0%",collapsible:l=!1,defaultSize:o,elementRef:s,id:d,maxSize:c="100%",minSize:u="0%",onResize:p,panelRef:m,style:v,...x}){let b=!!d,w=J(d),z=(0,n.useRef)(null),k=K(z,s),[,N]=U(),{getPanelStyles:P,id:L,registerPanel:M}=Q(),I=null!==p,R=X((e,t,a)=>{p?.(e,d,a)});H(()=>{let e=z.current;if(null!==e)return M({element:e,id:w,idIsStable:b,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:I?R:void 0,panelConstraints:{collapsedSize:r,collapsible:l,defaultSize:o,maxSize:c,minSize:u},scheduleUpdate:N})},[r,l,o,N,I,w,b,c,u,R,M]),function(e,t){let{id:a}=Q(),r=(0,n.useRef)({collapse:_,expand:_,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:_});(0,n.useImperativeHandle)(t,()=>r.current,[]),H(()=>{Object.assign(r.current,function({groupId:e,panelId:t}){let a=()=>{let{mountedGroups:t}=g;for(let[a,{defaultLayoutDeferred:n,derivedPanelConstraints:r,layout:i,separatorToPanels:l}]of t)if(a.id===e)return{defaultLayoutDeferred:n,derivedPanelConstraints:r,group:a,layout:i,separatorToPanels:l};throw Error(`Group ${e} not found`)},n=()=>{let e=a().derivedPanelConstraints.find(e=>e.panelId===t);if(void 0!==e)return e;throw Error(`Panel constraints not found for Panel ${t}`)},r=()=>{let e=a().group.panels.find(e=>e.id===t);if(void 0!==e)return e;throw Error(`Layout not found for Panel ${t}`)},l=()=>{let e=a().layout[t];if(void 0!==e)return e;throw Error(`Layout not found for Panel ${t}`)},o=e=>{let n=l();if(e===n)return;let{defaultLayoutDeferred:r,derivedPanelConstraints:i,group:o,layout:s,separatorToPanels:d}=a(),c=o.panels.findIndex(e=>e.id===t),u=c===o.panels.length-1,p=C({layout:S({delta:u?n-e:e-n,initialLayout:s,panelConstraints:i,pivotIndices:u?[c-1,c]:[c,c+1],prevLayout:s,trigger:"imperative-api"}),panelConstraints:i});j(s,p)||y(e=>({mountedGroups:new Map(e.mountedGroups).set(o,{defaultLayoutDeferred:r,derivedPanelConstraints:i,layout:p,separatorToPanels:d})}))};return{collapse:()=>{let{collapsible:e,collapsedSize:t}=n(),{mutableValues:a}=r(),i=l();e&&i!==t&&(a.expandToSize=i,o(t))},expand:()=>{let{collapsible:e,collapsedSize:t,minSize:a}=n(),{mutableValues:i}=r(),s=l();if(e&&s===t){let e=i.expandToSize??a;0===e&&(e=1),o(e)}},getSize:()=>{let{group:e}=a(),t=l(),{element:n}=r();return{asPercentage:t,inPixels:"horizontal"===e.orientation?n.offsetWidth:n.offsetHeight}},isCollapsed:()=>{let{collapsible:e,collapsedSize:t}=n(),a=l();return e&&h(t,a)},resize:e=>{if(l()!==e){let t;switch(typeof e){case"number":{let{group:n}=a();t=f(e/i({group:n})*100);break}case"string":t=parseFloat(e)}o(t)}}}}({groupId:a,panelId:e}))})}(w,m);let E=P(L,w);return(0,a.jsx)("div",{...x,"data-panel":!0,"data-testid":w,id:w,ref:k,style:{...et,flexBasis:0,flexShrink:1,overflow:"hidden",...E},children:(0,a.jsx)("div",{className:t,style:{width:"100%",height:"100%",...v},children:e})})}Z.displayName="Group",ee.displayName="Panel";let et={minHeight:0,maxHeight:"100%",height:"auto",minWidth:0,maxWidth:"100%",width:"auto",border:"none",borderWidth:0,padding:0,margin:0};function ea({children:e,className:t,elementRef:r,id:i,style:l,...o}){let s=J(i),[d,c]=(0,n.useState)({}),[u,p]=(0,n.useState)("inactive"),f=(0,n.useRef)(null),m=K(f,r),{id:h,orientation:g,registerSeparator:y}=Q();return H(()=>{let e=f.current;if(null!==e){let t={element:e,id:s},a=y(t),n=v.addListener("interactionStateChange",e=>{p("inactive"!==e.state&&e.hitRegions.some(e=>e.separator===t)?e.state:"inactive")}),r=v.addListener("mountedGroupsChange",e=>{e.forEach(({derivedPanelConstraints:e,layout:a,separatorToPanels:n},r)=>{if(r.id===h){let i=n.get(t);if(i){let t=i[0],n=r.panels.indexOf(t);c(function({layout:e,panelConstraints:t,panelId:a,panelIndex:n}){let r,i,l=e[a],o=t.find(e=>e.panelId===a);if(o){let s=o.maxSize,d=i=o.collapsible?o.collapsedSize:o.minSize,c=[n,n+1];i=C({layout:S({delta:d-l,initialLayout:e,panelConstraints:t,pivotIndices:c,prevLayout:e,trigger:"keyboard"}),panelConstraints:t})[a],r=C({layout:S({delta:s-l,initialLayout:e,panelConstraints:t,pivotIndices:c,prevLayout:e,trigger:"keyboard"}),panelConstraints:t})[a]}return{valueControls:a,valueMax:r,valueMin:i,valueNow:l}}({layout:a,panelConstraints:e,panelId:t.id,panelIndex:n}))}}})});return()=>{n(),r(),a()}}},[h,s,y]),(0,a.jsx)("div",{...o,"aria-controls":d.valueControls,"aria-orientation":"horizontal"===g?"vertical":"horizontal","aria-valuemax":d.valueMax,"aria-valuemin":d.valueMin,"aria-valuenow":d.valueNow,children:e,className:t,"data-separator":u,"data-testid":s,id:s,ref:m,role:"separator",style:{flexBasis:"auto",...l,flexGrow:0,flexShrink:0},tabIndex:0})}ea.displayName="Separator",e.s(["Group",()=>Z,"Panel",()=>ee,"Separator",()=>ea])},81704,e=>{"use strict";var t=e.i(43476),a=e.i(71645),n=e.i(71921);function r({contracts:e,selectedContractId:a,onContractChange:n,strictMode:r,onStrictModeChange:i,batchMode:l,onBatchModeChange:o}){return(0,t.jsxs)("div",{className:"border-b border-border px-4 py-1.5",style:{flexShrink:0},children:[(0,t.jsxs)("div",{className:"flex items-end gap-4",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{htmlFor:"contract-select",className:"block text-sm font-medium mb-0.5",children:"Select Contract"}),(0,t.jsxs)("select",{id:"contract-select",value:a,onChange:e=>n(e.target.value),className:"w-full px-3 py-2 border border-input rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-ring",children:[(0,t.jsx)("option",{value:"",children:"Choose a contract..."}),e.map(e=>(0,t.jsxs)("option",{value:e.id,children:[e.name," (v",e.version,")"]},e.id))]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4 pb-0.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{type:"checkbox",id:"batch-mode",checked:l,onChange:e=>o(e.target.checked),className:"h-4 w-4 rounded border-input text-primary focus:ring-2 focus:ring-ring"}),(0,t.jsx)("label",{htmlFor:"batch-mode",className:"text-sm font-medium cursor-pointer",children:"Batch Mode"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{type:"checkbox",id:"strict-mode",checked:r,onChange:e=>i(e.target.checked),className:"h-4 w-4 rounded border-input text-primary focus:ring-2 focus:ring-ring"}),(0,t.jsx)("label",{htmlFor:"strict-mode",className:"text-sm font-medium cursor-pointer",children:"Strict Mode"})]})]})]}),(l||r)&&(0,t.jsxs)("div",{className:"flex gap-4 mt-1",children:[l&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"Batch mode: Enter an array of objects to validate multiple records at once"}),r&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"Strict mode: Raises exceptions on validation errors instead of returning error details"})]})]})}var i=e.i(78583),l=e.i(39616),o=e.i(98919),s=e.i(52571),d=e.i(56909),c=e.i(9165);let u=[{id:"schema",label:"Schema",icon:(0,t.jsx)(i.FileText,{className:"h-4 w-4"})},{id:"coercion",label:"Coercion",icon:(0,t.jsx)(l.Settings,{className:"h-4 w-4"})},{id:"validation",label:"Validation",icon:(0,t.jsx)(o.Shield,{className:"h-4 w-4"})},{id:"metadata",label:"Metadata",icon:(0,t.jsx)(s.Info,{className:"h-4 w-4"})}],p=(0,a.memo)(function({contract:e,onChange:n,contractId:r,schemaId:l,onSave:o}){let[s,p]=(0,a.useState)("schema"),[f,m]=(0,a.useState)({schema:"",coercion:"",validation:"",metadata:""}),[h,g]=(0,a.useState)(!1),[v,y]=(0,a.useState)(null),[x,b]=(0,a.useState)(!1);(0,a.useEffect)(()=>{e&&m({schema:JSON.stringify(e.schema||{},null,2),coercion:JSON.stringify(e.coercion_rules||{},null,2),validation:JSON.stringify(e.validation_rules||{},null,2),metadata:JSON.stringify(e.metadata||{},null,2)})},[e]);let S=async()=>{if(!e||!l)return void y("Contract or schema ID is missing");g(!0),y(null),b(!1);try{let t={schema:JSON.parse(f.schema),coercion:JSON.parse(f.coercion),validation:JSON.parse(f.validation),metadata:JSON.parse(f.metadata)},a=t.metadata?.version||e.metadata?.version||"1.0.0";await Promise.all([c.api.metadata.storeCoercionRules({schema_id:l,coercion_rules:t.coercion,version:a}),c.api.metadata.storeValidationRules({schema_id:l,validation_rules:t.validation,version:a}),c.api.metadata.storeMetadata({schema_id:l,metadata:t.metadata,version:a})]),b(!0),setTimeout(()=>b(!1),3e3),o&&o()}catch(e){e instanceof c.ApiError?y(e.message||"Failed to save contract"):e instanceof Error?y(e.message):y("Failed to save contract")}finally{g(!1)}},w=f[s];return(0,t.jsxs)("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",minWidth:0,minHeight:0,overflow:"hidden"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",borderBottom:"1px solid #e5e7eb",height:"3rem",flexShrink:0,minWidth:0,overflow:"hidden"},children:[(0,t.jsx)("div",{style:{flex:1,display:"flex",height:"3rem",overflow:"hidden",minWidth:0},children:u.map(a=>(0,t.jsx)("button",{onClick:()=>p(a.id),disabled:!e,style:{flex:"1 1 0%",padding:"0 0.5rem",height:"3rem",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"0.875rem",fontWeight:500,transition:"colors",borderBottom:s===a.id?"2px solid #3b82f6":"none",borderTop:"none",borderLeft:"none",borderRight:"none",backgroundColor:"transparent",color:s===a.id?"inherit":"#6b7280",cursor:e?"pointer":"not-allowed",opacity:e?1:.5,minWidth:0,overflow:"hidden",outline:"none"},children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem",minWidth:0},children:[a.icon,(0,t.jsx)("span",{children:a.label})]})},a.id))}),(0,t.jsxs)("div",{style:{padding:"0 0.5rem",display:"flex",alignItems:"center",gap:"0.5rem",borderLeft:"1px solid #e5e7eb",flexShrink:0},children:[v&&(0,t.jsx)("span",{style:{fontSize:"0.75rem",color:"#dc2626",maxWidth:"100px",overflow:"hidden",textOverflow:"ellipsis"},children:v}),x&&(0,t.jsx)("span",{style:{fontSize:"0.75rem",color:"#16a34a"},children:"Saved!"}),(0,t.jsxs)("button",{onClick:S,disabled:h||!l||!e,style:{height:"2rem",padding:"0 0.75rem",border:"1px solid #e5e7eb",borderRadius:"0.375rem",backgroundColor:"transparent",cursor:!h&&l&&e?"pointer":"not-allowed",opacity:!h&&l&&e?1:.5,display:"flex",alignItems:"center",fontSize:"0.875rem",minWidth:0},children:[(0,t.jsx)(d.Save,{className:"h-3 w-3",style:{marginRight:"0.25rem"}}),(0,t.jsx)("span",{children:"Save"})]})]})]}),(0,t.jsx)("div",{style:{flex:1,overflow:"hidden",position:"relative",minWidth:0,minHeight:0},children:e?(0,t.jsx)("textarea",{value:w,onChange:t=>((t,a)=>{if(m(e=>({...e,[t]:a})),e)try{let r=JSON.parse(a),i={};switch(t){case"schema":i.schema=r;break;case"coercion":i.coercion_rules=r;break;case"validation":i.validation_rules=r;break;case"metadata":i.metadata=r}n({...e,...i})}catch{}})(s,t.target.value),style:{width:"100%",height:"100%",padding:"1rem",fontFamily:"monospace",fontSize:"0.875rem",border:"none",outline:"none",resize:"none",backgroundColor:"transparent",color:"inherit",boxSizing:"border-box"},placeholder:`Enter ${u.find(e=>e.id===s)?.label.toLowerCase()}...`,spellCheck:!1}):(0,t.jsx)("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"#6b7280"},children:(0,t.jsxs)("div",{style:{textAlign:"center"},children:[(0,t.jsx)(i.FileText,{style:{height:"3rem",width:"3rem",margin:"0 auto 1rem",opacity:.5}}),(0,t.jsx)("p",{children:r?"Loading contract...":"Select a contract to edit"})]})})})]})});var f=e.i(69074);function m({value:e,onChange:n,isValidating:r,hasErrors:l,batchMode:o=!1}){let s=(0,a.useRef)(null),d=(0,a.useCallback)(e=>{let t=e.target.files?.[0];if(!t)return;let a=new FileReader;a.onload=e=>{let t=e.target?.result;try{let e=JSON.parse(t);n(JSON.stringify(e,null,2))}catch{n(t)}},a.readAsText(t)},[n]),c=(0,a.useCallback)(()=>{o?n(JSON.stringify([{name:"John Doe",age:30,email:"john@example.com"},{name:"Jane Smith",age:25,email:"jane@example.com"}],null,2)):n(JSON.stringify({name:"John Doe",age:30,email:"john@example.com"},null,2))},[o,n]);return(0,t.jsxs)("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",minWidth:0,minHeight:0,overflow:"hidden"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 1rem",height:"3rem",borderBottom:"1px solid #e5e7eb",flexShrink:0,minWidth:0},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[(0,t.jsx)(i.FileText,{style:{height:"1rem",width:"1rem",color:"#6b7280"}}),(0,t.jsx)("span",{style:{fontSize:"0.875rem",fontWeight:500},children:"Sample Data"}),r&&(0,t.jsx)("span",{style:{fontSize:"0.75rem",color:"#6b7280",animation:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite"},children:"Validating..."})]}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,t.jsx)("button",{onClick:c,style:{height:"1.75rem",fontSize:"0.75rem",padding:"0 0.5rem",border:"1px solid #e5e7eb",borderRadius:"0.375rem",backgroundColor:"transparent",cursor:"pointer"},children:"Example"}),(0,t.jsxs)("button",{onClick:()=>s.current?.click(),style:{height:"1.75rem",fontSize:"0.75rem",padding:"0 0.5rem",border:"1px solid #e5e7eb",borderRadius:"0.375rem",backgroundColor:"transparent",cursor:"pointer",display:"flex",alignItems:"center"},children:[(0,t.jsx)(f.Upload,{style:{height:"0.75rem",width:"0.75rem",marginRight:"0.25rem"}}),"Upload"]}),(0,t.jsx)("input",{ref:s,type:"file",accept:".json,.txt",onChange:d,style:{display:"none"}})]})]}),(0,t.jsxs)("div",{style:{flex:1,overflow:"hidden",position:"relative",minWidth:0,minHeight:0},children:[(0,t.jsx)("textarea",{value:e,onChange:e=>n(e.target.value),style:{width:"100%",height:"100%",padding:"1rem",fontFamily:"monospace",fontSize:"0.875rem",border:"none",outline:"none",resize:"none",backgroundColor:"transparent",color:"inherit",boxSizing:"border-box"},placeholder:o?'[{"field1": "value1"}, {"field2": "value2"}]':'{"field1": "value1", "field2": "value2"}',spellCheck:!1}),l&&(0,t.jsx)("div",{style:{position:"absolute",top:"0.5rem",right:"0.5rem"},children:(0,t.jsx)("div",{style:{height:"0.5rem",width:"0.5rem",backgroundColor:"#dc2626",borderRadius:"50%",animation:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite"}})})]})]})}var h=e.i(95468),g=e.i(73884),v=e.i(63209);let y=(0,e.i(75254).default)("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);var x=e.i(19455);function b({error:e,onFixInContract:a,onFixInData:n}){return(0,t.jsx)("div",{className:"border border-destructive/50 rounded-lg p-4 bg-destructive/5",children:(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)(v.AlertCircle,{className:"h-5 w-5 text-destructive flex-shrink-0 mt-0.5"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsx)("span",{className:"font-semibold text-destructive",children:e.field}),void 0!==e.input_value&&(0,t.jsxs)("span",{className:"text-xs text-muted-foreground font-mono",children:["(",JSON.stringify(e.input_value),")"]})]}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground mb-3",children:e.message}),(a||n)&&(0,t.jsxs)("div",{className:"flex gap-2",children:[a&&(0,t.jsxs)(x.Button,{variant:"outline",size:"sm",onClick:a,className:"h-7 text-xs",children:[(0,t.jsx)(i.FileText,{className:"h-3 w-3 mr-1"}),"Fix in Contract"]}),n&&(0,t.jsxs)(x.Button,{variant:"outline",size:"sm",onClick:n,className:"h-7 text-xs",children:[(0,t.jsx)(y,{className:"h-3 w-3 mr-1"}),"Fix in Data"]})]})]})]})})}function S(e){if(null===e)return{type:"null"};let t=typeof e;return"number"===t?Number.isInteger(e)?{type:"integer"}:{type:"number"}:"boolean"===t?{type:"boolean"}:"string"===t?{type:"string"}:Array.isArray(e)?{type:"array",items:e.length>0?S(e[0]):{}}:"object"===t?{type:"object",properties:{}}:{type:"string"}}let w=(0,a.memo)(function({result:e,isValidating:n,contract:r,sampleData:i,onContractChange:l,onDataChange:o}){let s=(0,a.useCallback)(e=>{if(!r)return;let t=((e,t,a)=>{try{let n=JSON.parse(a),r={...e};r.schema||(r.schema={type:"object",properties:{},required:[]}),r.schema.properties||(r.schema.properties={}),r.schema.required||(r.schema.required=[]);let i=t.field,l=void 0!==n[i]?n[i]:t.input_value;if(r.schema.properties[i]){let e=r.schema.properties[i];if(t.message.includes("required")||t.message.includes("missing"))r.schema.required?.includes(i)&&(r.schema.required=r.schema.required.filter(e=>e!==i));else if(t.message.includes("type"))r.schema.properties[i]={...e,...S(l)};else if(t.message.includes("minimum")||t.message.includes("greater than")){let a=t.message.match(/should be (greater than|at least) ([\d.]+)/);a&&"number"===e.type&&(e.minimum=parseFloat(a[2])-.1)}else if(t.message.includes("maximum")||t.message.includes("less than")){let a=t.message.match(/should be (less than|at most) ([\d.]+)/);a&&"number"===e.type&&(e.maximum=parseFloat(a[2])+.1)}}else r.schema.properties[i]=S(l);return r}catch{return null}})(r,e,i);t&&l(t)},[r,i,l]),d=(0,a.useCallback)(e=>{try{let t=JSON.parse(i),a=((e,t,a)=>{let n={...e},r=t.field;if(!a?.schema?.properties?.[r])return null;let i=a.schema.properties[r],l=n[r];if(t.message.includes("type"))if("number"===i.type&&"string"==typeof l){let e=parseFloat(l);isNaN(e)||(n[r]=e)}else if("integer"===i.type&&"string"==typeof l){let e=parseInt(l,10);isNaN(e)||(n[r]=e)}else"boolean"===i.type&&"string"==typeof l&&(n[r]="true"===l.toLowerCase());return(t.message.includes("required")||t.message.includes("missing"))&&(void 0!==i.default?n[r]=i.default:n[r]=function(e){switch(e){case"string":return"";case"number":case"integer":return 0;case"boolean":return!1;case"array":return[];case"object":return{};default:return null}}(i.type)),t.message.includes("minimum")&&"number"==typeof l?void 0!==i.minimum&&(n[r]=i.minimum):t.message.includes("maximum")&&"number"==typeof l&&void 0!==i.maximum&&(n[r]=i.maximum),n})(t,e,r);a&&o(JSON.stringify(a,null,2))}catch{}},[i,r,o]),c=e=>e&&"results"in e&&"total_count"in e,u=n?{backgroundColor:"#f3f4f6",icon:(0,t.jsx)("div",{style:{animation:"spin 1s linear infinite",borderRadius:"50%",height:"1.25rem",width:"1.25rem",borderBottom:"2px solid #3b82f6",borderTop:"2px solid transparent",borderLeft:"2px solid transparent",borderRight:"2px solid transparent",flexShrink:0}}),text:"Validating...",color:"#6b7280"}:e?c(e)?0===e.invalid_count?{backgroundColor:"#f0fdf4",icon:(0,t.jsx)(h.CheckCircle2,{style:{height:"1.25rem",width:"1.25rem",color:"#16a34a",flexShrink:0}}),text:`All Valid (${e.valid_count}/${e.total_count})`,color:"#16a34a"}:{backgroundColor:"#fef2f2",icon:(0,t.jsx)(g.XCircle,{style:{height:"1.25rem",width:"1.25rem",color:"#dc2626",flexShrink:0}}),text:`${e.invalid_count} Invalid, ${e.valid_count} Valid (${e.total_count} total)`,color:"#dc2626"}:e.is_valid?{backgroundColor:"#f0fdf4",icon:(0,t.jsx)(h.CheckCircle2,{style:{height:"1.25rem",width:"1.25rem",color:"#16a34a",flexShrink:0}}),text:"Valid",color:"#16a34a"}:{backgroundColor:"#fef2f2",icon:(0,t.jsx)(g.XCircle,{style:{height:"1.25rem",width:"1.25rem",color:"#dc2626",flexShrink:0}}),text:`Invalid (${e.error_count} error${1!==e.error_count?"s":""})`,color:"#dc2626"}:{backgroundColor:"#f3f4f6",icon:(0,t.jsx)(v.AlertCircle,{style:{height:"1.25rem",width:"1.25rem",color:"#6b7280",flexShrink:0}}),text:"Waiting for validation",color:"#6b7280"};return(0,t.jsxs)("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",minWidth:0,minHeight:0,overflow:"hidden"},children:[(0,t.jsx)("div",{style:{padding:"0 1rem",height:"3rem",display:"flex",alignItems:"center",borderBottom:"1px solid #e5e7eb",backgroundColor:u.backgroundColor,flexShrink:0,minWidth:0},children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.75rem"},children:[u.icon,(0,t.jsx)("div",{style:{minWidth:0},children:(0,t.jsx)("div",{style:{fontSize:"0.875rem",fontWeight:600,color:u.color,overflow:"hidden",textOverflow:"ellipsis"},children:u.text})})]})}),(0,t.jsxs)("div",{style:{flex:1,overflowY:"auto",padding:"1rem",minWidth:0,minHeight:0},children:[n&&(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"#6b7280"},children:(0,t.jsxs)("div",{style:{textAlign:"center"},children:[(0,t.jsx)("div",{style:{animation:"spin 1s linear infinite",borderRadius:"50%",height:"2rem",width:"2rem",borderBottom:"2px solid #3b82f6",borderTop:"2px solid transparent",borderLeft:"2px solid transparent",borderRight:"2px solid transparent",margin:"0 auto 0.5rem"}}),(0,t.jsx)("p",{style:{fontSize:"0.875rem",color:"#6b7280"},children:"Validating..."})]})}),!n&&!e&&(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"#6b7280"},children:(0,t.jsxs)("div",{style:{textAlign:"center"},children:[(0,t.jsx)(v.AlertCircle,{style:{height:"3rem",width:"3rem",margin:"0 auto 1rem",opacity:.5}}),(0,t.jsx)("p",{children:"Enter data to validate"})]})}),!n&&e&&c(e)&&(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"1rem"},children:[(0,t.jsxs)("div",{style:{padding:"0.75rem",backgroundColor:"#f3f4f6",borderRadius:"0.375rem",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsx)("div",{style:{fontSize:"0.875rem",fontWeight:600},children:"Batch Summary:"}),(0,t.jsxs)("div",{style:{display:"flex",gap:"1rem",fontSize:"0.875rem"},children:[(0,t.jsxs)("span",{style:{color:"#16a34a",fontWeight:600},children:[e.valid_count," Valid"]}),(0,t.jsxs)("span",{style:{color:"#dc2626",fontWeight:600},children:[e.invalid_count," Invalid"]}),(0,t.jsxs)("span",{style:{color:"#6b7280"},children:[e.total_count," Total"]})]})]}),(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:[(0,t.jsx)("div",{style:{fontSize:"0.875rem",fontWeight:600},children:"Results:"}),e.results.map((e,a)=>(0,t.jsxs)("div",{style:{border:"1px solid #e5e7eb",borderRadius:"0.375rem",padding:"0.75rem",backgroundColor:e.is_valid?"#f0fdf4":"#fef2f2"},children:[(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem",marginBottom:"0.5rem",fontSize:"0.875rem",fontWeight:500},children:e.is_valid?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.CheckCircle2,{style:{height:"1rem",width:"1rem",color:"#16a34a"}}),(0,t.jsxs)("span",{style:{color:"#16a34a"},children:["Record ",a+1,": Valid"]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.XCircle,{style:{height:"1rem",width:"1rem",color:"#dc2626"}}),(0,t.jsxs)("span",{style:{color:"#dc2626"},children:["Record ",a+1,": Invalid (",e.error_count," error",1!==e.error_count?"s":"",")"]})]})}),e.is_valid&&null!=e.data?(0,t.jsx)("div",{style:{marginTop:"0.5rem"},children:(0,t.jsx)("pre",{style:{backgroundColor:"#ffffff",padding:"0.5rem",borderRadius:"0.25rem",fontSize:"0.75rem",overflow:"auto",margin:0,border:"1px solid #e5e7eb"},children:JSON.stringify(e.data,null,2)})}):null,!e.is_valid&&e.errors&&e.errors.length>0&&(0,t.jsx)("div",{style:{marginTop:"0.5rem",display:"flex",flexDirection:"column",gap:"0.5rem"},children:e.errors.map((e,a)=>(0,t.jsx)(b,{error:e,onFixInContract:()=>s(e),onFixInData:()=>d(e)},a))})]},a))]})]}),!n&&e&&!c(e)&&e.is_valid&&null!=e.data&&(0,t.jsxs)("div",{style:{marginBottom:"1rem"},children:[(0,t.jsx)("div",{style:{fontSize:"0.875rem",fontWeight:600,marginBottom:"0.5rem"},children:"Validated Data:"}),(0,t.jsx)("pre",{style:{backgroundColor:"#f3f4f6",padding:"0.75rem",borderRadius:"0.375rem",fontSize:"0.75rem",overflow:"auto",margin:0},children:JSON.stringify(e.data,null,2)})]}),!n&&e&&!c(e)&&!e.is_valid&&e.errors&&e.errors.length>0&&(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:[(0,t.jsx)("div",{style:{fontSize:"0.875rem",fontWeight:600},children:"Errors:"}),e.errors.map((e,a)=>(0,t.jsx)(b,{error:e,onFixInContract:()=>s(e),onFixInData:()=>d(e)},a))]})]})]})});var j=e.i(46652);function C(){let{contracts:e,loading:i,error:l}=(0,j.useContracts)(),[o,s]=(0,a.useState)(""),[d,u]=(0,a.useState)(!1),[f,h]=(0,a.useState)(!1),[g,v]=(0,a.useState)(null),[y,x]=(0,a.useState)(null),[b,S]=(0,a.useState)("{}"),[C,z]=(0,a.useState)(!1);(0,a.useEffect)(()=>{if(!o){v(null),x(null);return}(async()=>{z(!0);try{let[e,t]=await Promise.all([c.api.contracts.get(o),c.api.contracts.buildFromId(o,{include_metadata:!0,include_ownership:!0,include_governance:!0})]);x(e.schema_id||null),v(t.contract)}catch(e){console.error("Failed to load contract:",e),v(null),x(null)}finally{z(!1)}})()},[o]);let{result:k,isValidating:N,error:P}=function(e,t,n={}){let{debounceMs:r=500,enabled:i=!0,strict:l=!1,batchMode:o=!1}=n,[s,d]=(0,a.useState)(null),[u,p]=(0,a.useState)(!1),[f,m]=(0,a.useState)(null),h=(0,a.useCallback)(async()=>{if(!e||!t||!i){d(null),m(null);return}p(!0),m(null);try{let a=JSON.parse(t),n=Array.isArray(a);if(o||n){let t=n?a:[a];if(0===t.length){d(null),m(null),p(!1);return}console.log("Calling batch validation API",{hasContract:!!e,hasSchema:!!e?.schema,recordCount:t.length,strict:l});let r=await c.api.validation.validateBatch({contract:e,data_list:t,strict:l});console.log("Batch validation response:",r),d(r)}else{if(0===Object.keys(a).length&&a.constructor===Object){d(null),m(null),p(!1);return}console.log("Calling validation API",{hasContract:!!e,hasSchema:!!e?.schema,dataKeys:Object.keys(a||{}),strict:l});let t=await c.api.validation.validate({contract:e,data:a,strict:l});console.log("Validation response:",t),d(t)}}catch(t){if(console.error("Validation error:",t),t.message?.includes("JSON")||t.message?.includes("Unexpected token")){d(null),m(null),p(!1);return}let e=t.response?.detail||t.message||"Validation failed";l?o?d({results:[{is_valid:!1,data:null,errors:[{field:"validation",message:e}],error_count:1}],total_count:1,valid_count:0,invalid_count:1}):d({is_valid:!1,data:null,errors:[{field:"validation",message:e}],error_count:1}):(m(e),d(null))}finally{p(!1)}},[e,t,i,l,o]);return(0,a.useEffect)(()=>{let a;if(!e||!t||!i){d(null),m(null);return}try{if(a=JSON.parse(t),Array.isArray(a)){if(0===a.length){d(null),m(null);return}}else if(0===Object.keys(a).length&&a.constructor===Object){d(null),m(null);return}}catch{d(null),m(null);return}console.log("Triggering validation",{hasContract:!!e,hasSchema:!!e?.schema,hasData:!!a,batchMode:o,contractKeys:e?Object.keys(e):[]});let n=setTimeout(()=>{h()},r);return()=>clearTimeout(n)},[e,t,r,i,o,h]),{result:s,isValidating:u,error:f,validate:h}}(g,b,{debounceMs:500,enabled:!!g&&!!b&&""!==b.trim()&&"{}"!==b,strict:d,batchMode:f}),L=(0,a.useCallback)(e=>{v(e)},[]),_=(0,a.useCallback)(async()=>{if(o){z(!0);try{let[e,t]=await Promise.all([c.api.contracts.get(o),c.api.contracts.buildFromId(o,{include_metadata:!0,include_ownership:!0,include_governance:!0})]);x(e.schema_id||null),v(t.contract)}catch(e){console.error("Failed to reload contract:",e)}finally{z(!1)}}},[o]);return i?(0,t.jsx)("div",{className:"flex items-center justify-center h-screen",children:(0,t.jsx)("div",{className:"text-gray-500",children:"Loading contracts..."})}):l&&(l.includes("Unable to connect")||l.includes("API server is not running"))?(0,t.jsx)("div",{className:"flex flex-col items-center justify-center h-screen p-8",children:(0,t.jsxs)("div",{className:"max-w-md text-center",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-foreground mb-4",children:"API Server Not Running"}),(0,t.jsx)("p",{className:"text-muted-foreground mb-6",children:"The validation page requires the API server to be running. Please start it in a separate terminal."}),(0,t.jsxs)("div",{className:"bg-muted p-4 rounded-lg font-mono text-sm text-left",children:[(0,t.jsx)("div",{className:"mb-2",children:"# Terminal 1: Start API server"}),(0,t.jsx)("div",{className:"text-primary",children:"pycharter api"}),(0,t.jsx)("div",{className:"mt-4 mb-2",children:"# Terminal 2: Start UI (already running)"}),(0,t.jsx)("div",{className:"text-primary",children:"pycharter ui dev"})]}),(0,t.jsxs)("p",{className:"text-sm text-muted-foreground mt-4",children:["The API server should be running at ",(0,t.jsx)("code",{className:"bg-muted px-1 rounded",children:"http://localhost:8000"})]})]})}):(0,t.jsxs)("div",{className:"flex flex-col h-full bg-white",children:[(0,t.jsx)(r,{contracts:e,selectedContractId:o,onContractChange:s,strictMode:d,onStrictModeChange:u,batchMode:f,onBatchModeChange:h}),(0,t.jsxs)(n.Group,{orientation:"horizontal",className:"flex-1",children:[(0,t.jsx)(n.Panel,{defaultSize:30,minSize:15,children:(0,t.jsx)("div",{className:"flex flex-col h-full",children:(0,t.jsx)(p,{contract:C?null:g,onChange:L,contractId:o,schemaId:y,onSave:_})})}),(0,t.jsx)(n.Separator,{className:"w-1 bg-gray-300 hover:bg-blue-500 transition-colors"}),(0,t.jsx)(n.Panel,{defaultSize:40,minSize:20,children:(0,t.jsx)("div",{className:"flex flex-col h-full",children:(0,t.jsx)(m,{value:b,onChange:S,isValidating:N,hasErrors:!!k&&("is_valid"in k?!k.is_valid:k.invalid_count>0),batchMode:f})})}),(0,t.jsx)(n.Separator,{className:"w-1 bg-gray-300 hover:bg-blue-500 transition-colors"}),(0,t.jsx)(n.Panel,{defaultSize:30,minSize:15,children:(0,t.jsx)("div",{className:"flex flex-col h-full",children:(0,t.jsx)(w,{result:k,isValidating:N,contract:g,sampleData:b,onContractChange:L,onDataChange:S})})})]})]})}function z(){return(0,t.jsxs)("div",{className:"min-h-screen bg-background",children:[(0,t.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pt-6 pb-1",children:(0,t.jsxs)("div",{className:"mb-1",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-1",children:"Validation"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Test and validate data against contracts and schemas"})]})}),(0,t.jsx)("div",{className:"w-full px-2",style:{height:"calc(100vh - 6rem)"},children:(0,t.jsx)(C,{})})]})}e.s(["default",()=>z],81704)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,58041,e=>{"use strict";let t=(0,e.i(75254).default)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);e.s(["Database",()=>t],58041)},56909,e=>{"use strict";let t=(0,e.i(75254).default)("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);e.s(["Save",()=>t],56909)},37727,7233,e=>{"use strict";var t=e.i(75254);let a=(0,t.default)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",()=>a],37727);let s=(0,t.default)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",()=>s],7233)},78583,e=>{"use strict";let t=(0,e.i(75254).default)("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["FileText",()=>t],78583)},46652,e=>{"use strict";var t=e.i(71645),a=e.i(9165);function s(){let[e,s]=(0,t.useState)([]),[r,i]=(0,t.useState)(!0),[l,n]=(0,t.useState)(null),c=(0,t.useCallback)(async()=>{try{i(!0),n(null);let e=await a.api.contracts.list();s(e.contracts)}catch(t){let e="Failed to load contracts";t instanceof a.ApiError&&(e=0===t.status||t.message.includes("Unable to connect")?"API server is not running. Please start it with: pycharter api":t.message),n(e),console.error("Error loading contracts:",t)}finally{i(!1)}},[]);return(0,t.useEffect)(()=>{c()},[c]),{contracts:e,loading:r,error:l,refetch:c}}e.s(["useContracts",()=>s])},95468,e=>{"use strict";let t=(0,e.i(75254).default)("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["CheckCircle2",()=>t],95468)},98919,52571,e=>{"use strict";var t=e.i(75254);let a=(0,t.default)("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);e.s(["Shield",()=>a],98919);let s=(0,t.default)("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["Info",()=>s],52571)},61246,e=>{"use strict";var t=e.i(43476),a=e.i(75157);function s({className:e,...s}){return(0,t.jsx)("div",{className:(0,a.cn)("animate-pulse rounded-md bg-muted",e),...s})}function r({size:e="md",className:s}){return(0,t.jsx)("div",{className:(0,a.cn)("flex items-center justify-center",s),children:(0,t.jsx)("div",{className:(0,a.cn)("animate-spin rounded-full border-2 border-muted border-t-primary",{sm:"h-4 w-4",md:"h-8 w-8",lg:"h-12 w-12"}[e])})})}function i({message:e="Loading..."}){return(0,t.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-background",children:(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)(r,{size:"lg",className:"mb-4"}),(0,t.jsx)("p",{className:"text-muted-foreground",children:e})]})})}function l(){return(0,t.jsxs)("div",{className:"rounded-lg border bg-card p-6 space-y-4",children:[(0,t.jsx)(s,{className:"h-6 w-3/4"}),(0,t.jsx)(s,{className:"h-4 w-full"}),(0,t.jsx)(s,{className:"h-4 w-5/6"}),(0,t.jsxs)("div",{className:"flex gap-2 mt-4",children:[(0,t.jsx)(s,{className:"h-9 w-20"}),(0,t.jsx)(s,{className:"h-9 w-20"})]})]})}function n({rows:e=5}){return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(s,{className:"h-10 w-full"}),Array.from({length:e}).map((e,a)=>(0,t.jsx)(s,{className:"h-12 w-full"},a))]})}e.s(["CardSkeleton",()=>l,"PageLoading",()=>i,"TableSkeleton",()=>n,"default",()=>r],61246)},43668,e=>{"use strict";var t=e.i(47167);let a="pycharter_settings",s={apiServer:{url:t.default.env.NEXT_PUBLIC_API_URL||"http://localhost:8000"},database:{enabled:!1},dlq:{enabled:!1}};function r(){try{let e=localStorage.getItem(a);if(e){let t=JSON.parse(e);return{...s,...t,apiServer:{...s.apiServer,...t.apiServer},database:{...s.database,...t.database},dlq:{...s.dlq,...t.dlq}}}}catch(e){console.error("Failed to load settings:",e)}return s}function i(e){try{localStorage.setItem(a,JSON.stringify(e))}catch(e){throw console.error("Failed to save settings:",e),e}}function l(){return r().apiServer.url||s.apiServer.url}e.s(["getApiBaseUrl",()=>l,"getSettings",()=>r,"saveSettings",()=>i])},9165,e=>{"use strict";var t=e.i(43668);class a extends Error{status;response;constructor(e,t,a){super(e),this.status=t,this.response=a,this.name="ApiError"}}async function s(e,s){let r=`${(0,t.getApiBaseUrl)()}${e}`;try{let e=await fetch(r,{...s,headers:{"Content-Type":"application/json",...s?.headers}});if(!e.ok){let t;try{t=await e.json()}catch{t={detail:e.statusText}}let s=t.detail||`API request failed: ${e.statusText}`;throw 422===e.status&&t.details&&Array.isArray(t.details)&&(s=t.details.map(e=>{let t=e.loc?.join(".")||e.field||"field",a=e.msg||e.message||"validation error";return`${t}: ${a}`}).join("; ")||s),new a(s,e.status,t)}let t=e.headers.get("content-type");if(t&&t.includes("application/json"))return e.json();return e.text()}catch(s){if(s instanceof TypeError&&"Failed to fetch"===s.message){let s=(0,t.getApiBaseUrl)();throw new a(`Unable to connect to API server at ${s}. Please ensure the API server is running and the URL is correct.`,0,{originalError:"NetworkError",apiUrl:s,endpoint:e,suggestion:"Check your API server settings in the Settings page"})}throw s}}async function r(e){return s(e,{method:"GET"})}async function i(e,t){return s(e,{method:"POST",body:t?JSON.stringify(t):void 0})}async function l(e,t){return s(e,{method:"PUT",body:t?JSON.stringify(t):void 0})}async function n(e,s){let r=`${(0,t.getApiBaseUrl)()}${e}`,i=await fetch(r,{method:"POST",body:s});if(!i.ok){let e;try{e=await i.json()}catch{e={detail:i.statusText}}throw new a(e.detail||`API request failed: ${i.statusText}`,i.status,e)}let l=i.headers.get("content-type");return l&&l.includes("application/json")?i.json():i.text()}async function c(e){let s=`${(0,t.getApiBaseUrl)()}${e}`,r=await fetch(s,{method:"GET"});if(!r.ok){let e;try{e=await r.json()}catch{e={detail:r.statusText}}throw new a(e.detail||`API request failed: ${r.statusText}`,r.status,e)}return r.blob()}e.s(["ApiError",()=>a,"api",0,{contracts:{list:()=>r("/api/v1/contracts"),get:e=>r(`/api/v1/contracts/${e}`),parse:e=>i("/api/v1/contracts/parse",{contract:e}),parseFile:(e,t)=>{let a=new FormData;return a.append("file",e),void 0!==t&&a.append("validate",String(t)),n("/api/v1/contracts/parse/upload",a)},build:e=>i("/api/v1/contracts/build",e),buildFromId:(e,t)=>{let a=new URLSearchParams;t?.include_metadata!==void 0&&a.append("include_metadata",String(t.include_metadata)),t?.include_ownership!==void 0&&a.append("include_ownership",String(t.include_ownership)),t?.include_governance!==void 0&&a.append("include_governance",String(t.include_governance));let s=a.toString();return i(`/api/v1/contracts/${e}/build${s?`?${s}`:""}`,{})},createFromArtifacts:e=>i("/api/v1/contracts/create-from-artifacts",e),createMixed:e=>i("/api/v1/contracts/create-mixed",e),update:(e,t)=>l(`/api/v1/contracts/${e}`,t)},metadata:{listSchemas:()=>r("/api/v1/metadata/schemas"),getSchema:(e,t)=>{let a=t?`?version=${t}`:"";return r(`/api/v1/metadata/schemas/${e}${a}`)},getCompleteSchema:(e,t)=>{let a=t?`?version=${t}`:"";return r(`/api/v1/metadata/schemas/${e}/complete${a}`)},storeSchema:e=>i("/api/v1/metadata/schemas",e),getMetadata:(e,t)=>{let a=t?`?version=${t}`:"";return r(`/api/v1/metadata/metadata/${e}${a}`)},storeMetadata:e=>i("/api/v1/metadata/metadata",e),getCoercionRules:(e,t)=>{let a=t?`?version=${t}`:"";return r(`/api/v1/metadata/coercion-rules/${e}${a}`)},storeCoercionRules:e=>i("/api/v1/metadata/coercion-rules",e),getValidationRules:(e,t)=>{let a=t?`?version=${t}`:"";return r(`/api/v1/metadata/validation-rules/${e}${a}`)},storeValidationRules:e=>i("/api/v1/metadata/validation-rules",e),getEntityList:e=>r(`/api/v1/metadata/${e}`),createEntity:(e,t)=>i(`/api/v1/metadata/${e}`,t),updateEntity:(e,t,a)=>l(`/api/v1/metadata/${e}/${t}`,a),listArtifacts:()=>r("/api/v1/metadata/artifacts")},validation:{validate:e=>i("/api/v1/validation/validate",e),validateBatch:e=>i("/api/v1/validation/validate-batch",e)},schemas:{generate:e=>i("/api/v1/schemas/generate",e),convert:e=>i("/api/v1/schemas/convert",e)},quality:{listMetrics:e=>{let t=new URLSearchParams;e?.schema_id&&t.append("schema_id",e.schema_id),e?.limit&&t.append("limit",e.limit.toString()),e?.offset&&t.append("offset",e.offset.toString());let a=t.toString();return r(`/api/v1/quality/metrics${a?`?${a}`:""}`)},getMetric:e=>r(`/api/v1/quality/metrics/${e}`),getReport:(e,t)=>{let a=new URLSearchParams;t?.data_source&&a.append("data_source",t.data_source),t?.limit&&a.append("limit",t.limit.toString());let s=a.toString();return r(`/api/v1/quality/reports/${e}${s?`?${s}`:""}`)},check:e=>i("/api/v1/quality/check",e),checkUpload:(e,t)=>{let a=new FormData;return a.append("file",e),t.schema_id&&a.append("schema_id",t.schema_id),t.contract&&a.append("contract",t.contract),void 0!==t.record_violations&&a.append("record_violations",String(t.record_violations)),void 0!==t.calculate_metrics&&a.append("calculate_metrics",String(t.calculate_metrics)),void 0!==t.check_thresholds&&a.append("check_thresholds",String(t.check_thresholds)),t.thresholds&&a.append("thresholds",t.thresholds),void 0!==t.include_field_metrics&&a.append("include_field_metrics",String(t.include_field_metrics)),void 0!==t.sample_size&&a.append("sample_size",String(t.sample_size)),t.data_source&&a.append("data_source",t.data_source),t.data_version&&a.append("data_version",t.data_version),n("/api/v1/quality/check/upload",a)},queryViolations:e=>i("/api/v1/quality/violations",e)},templates:{downloadSchema:()=>c("/api/v1/templates/schema"),downloadContractArtifacts:()=>c("/api/v1/templates/contract-artifacts"),listEtlTemplates:()=>s("/api/v1/templates/etl"),downloadEtlTemplate:async e=>{let s=(0,t.getApiBaseUrl)().replace(/\/$/,""),r=await fetch(`${s}/api/v1/templates/etl/${encodeURIComponent(e)}`);if(!r.ok)throw new a(await r.text()||r.statusText,r.status);return r.text()}},settings:{testDatabase:e=>i("/api/v1/settings/test-database",e),testDlq:e=>i("/api/v1/settings/test-dlq",e),getDlqStats:e=>i("/api/v1/settings/dlq-stats",e)}}])},63209,e=>{"use strict";let t=(0,e.i(75254).default)("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",()=>t],63209)},95113,e=>{"use strict";var t=e.i(43476),a=e.i(63209),s=e.i(9165),r=e.i(75157);function i({error:e,title:i="Error",className:l}){if(!e)return null;let n=e instanceof s.ApiError,c=n?e.message:e.message||"An unexpected error occurred";return(0,t.jsx)("div",{className:(0,r.cn)("rounded-lg border border-destructive/50 bg-destructive/10 p-4",l),children:(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)(a.AlertCircle,{className:"h-5 w-5 text-destructive flex-shrink-0 mt-0.5"}),(0,t.jsxs)("div",{className:"ml-3",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-destructive",children:i}),(0,t.jsxs)("div",{className:"mt-2 text-sm text-destructive/90",children:[(0,t.jsx)("p",{children:c}),n&&e.status&&(0,t.jsxs)("p",{className:"mt-1 text-xs opacity-75",children:["Status: ",e.status]})]})]})]})})}e.s(["default",()=>i])},88511,e=>{"use strict";let t=(0,e.i(75254).default)("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);e.s(["Edit",()=>t],88511)},40160,e=>{"use strict";let t=(0,e.i(75254).default)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);e.s(["Download",()=>t],40160)}]);
|