iobroker.eos-admin 9.0.21 → 9.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NEXOWATT_EOS_BUILD_INFO.json +17 -11
- package/README.md +37 -9
- package/START_HIER_9.0.21.md +53 -0
- package/START_HIER_9.0.22.md +48 -0
- package/START_HIER_9.0.23.md +47 -0
- package/START_HIER_9.0.24.md +70 -0
- package/START_HIER_9.0.25.md +60 -0
- package/adminWww/.vite/manifest.json +55 -55
- package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +13760 -13760
- package/adminWww/assets/{AdapterUpdateDialog-Dxl_b7Op.js → AdapterUpdateDialog-CLDpmxDx.js} +1 -1
- package/adminWww/assets/{Adapters-CVKKhXmI.js → Adapters-BCGeX2v7.js} +1 -1
- package/adminWww/assets/{ConfigManager-Bf6nTAkL.js → ConfigManager-B_sJf5_w.js} +1 -1
- package/adminWww/assets/{Enums-CJHVJY7t.js → Enums-D3n1pOtc.js} +1 -1
- package/adminWww/assets/{Fields-DWHbZKvm.js → Fields-Bdx5gPoT.js} +1 -1
- package/adminWww/assets/{Files-a6owMTXA.js → Files-BPK84lYU.js} +1 -1
- package/adminWww/assets/{Hosts-LtEMeXpV.js → Hosts--Jr6oLf2.js} +1 -1
- package/adminWww/assets/{Instances-DhChziA1.js → Instances-DxTOzFus.js} +1 -1
- package/adminWww/assets/{Intro-Cyq9gVDC.js → Intro-CYBGeZtu.js} +1 -1
- package/adminWww/assets/{Logs-wcramXsg.js → Logs-CVNC-4S8.js} +1 -1
- package/adminWww/assets/{Objects-DINVHd_e.js → Objects-Cqm9Rvym.js} +1 -1
- package/adminWww/assets/{Overview-DK4R41zR.js → Overview-JgjcHwlz.js} +1 -1
- package/adminWww/assets/{State-DcEACXzL.js → State-BV14HSwZ.js} +1 -1
- package/adminWww/assets/{UsedResources-C1LcM0Rb.js → UsedResources-Dz48WzEF.js} +1 -1
- package/adminWww/assets/{Users-DvDdSyDY.js → Users-D19YlRCD.js} +1 -1
- package/adminWww/assets/{bootstrap-Dbj_GbnP.js → bootstrap-a7POLSDr.js} +4 -4
- package/adminWww/assets/{hostInit-BNFIx0-f.js → hostInit-keGjwsZR.js} +1 -1
- package/adminWww/assets/{icons-material-DVbdXNgr.js → icons-material-Omb_HCfb.js} +1 -1
- package/adminWww/assets/{index-CoKP1NSA.js → index-DqPrQK7T.js} +2 -2
- package/adminWww/assets/{installSVGRenderer-CMvku1F1.js → installSVGRenderer-iWfLFoQU.js} +1 -1
- package/adminWww/assets/{mf-entry-bootstrap-0-ac330bce.js → mf-entry-bootstrap-0-2a856bb6.js} +2 -2
- package/adminWww/index.html +23 -23
- package/adminWww/mf-manifest.json +1 -1
- package/adminWww/mf-stats.json +1 -1
- package/adminWww/remoteEntry-eos-9.0.25.js +12 -0
- package/adminWww/remoteEntry.js +1 -1
- package/build/lib/eosHistoryBackupScope.js +73 -0
- package/build/lib/eosHistoryBackupScope.js.map +1 -0
- package/build/lib/eosKiosk.js +348 -0
- package/build/lib/eosKiosk.js.map +1 -0
- package/build/lib/eosLegacyMigration.js +24 -3
- package/build/lib/eosLegacyMigration.js.map +1 -1
- package/build/lib/eosLicenseService.js +1 -1
- package/build/lib/eosLicenseService.js.map +1 -1
- package/build/lib/eosModuleConfigStore.js +2 -2
- package/build/lib/eosModuleConfigStore.js.map +1 -1
- package/build/lib/eosModuleHost.js +289 -25
- package/build/lib/eosModuleHost.js.map +1 -1
- package/build/lib/eosModuleHttp.js +71 -8
- package/build/lib/eosModuleHttp.js.map +1 -1
- package/build/lib/eosModuleProcess.js +317 -0
- package/build/lib/eosModuleProcess.js.map +1 -0
- package/build/lib/eosModuleProcessProtocol.js +213 -0
- package/build/lib/eosModuleProcessProtocol.js.map +1 -0
- package/build/lib/eosModuleProcessWorker.js +279 -0
- package/build/lib/eosModuleProcessWorker.js.map +1 -0
- package/build/lib/eosPostgresProvisioning.js +189 -0
- package/build/lib/eosPostgresProvisioning.js.map +1 -0
- package/build/lib/eosRuntimeControl.js +224 -0
- package/build/lib/eosRuntimeControl.js.map +1 -0
- package/build/lib/eosRuntimeHealth.js +170 -0
- package/build/lib/eosRuntimeHealth.js.map +1 -0
- package/build/lib/eosUiProcess.js +728 -0
- package/build/lib/eosUiProcess.js.map +1 -0
- package/build/lib/eosUiProcessRpc.js +292 -0
- package/build/lib/eosUiProcessRpc.js.map +1 -0
- package/build/lib/eosUiProcessWorker.js +443 -0
- package/build/lib/eosUiProcessWorker.js.map +1 -0
- package/build/lib/eosUiSecretCodec.js +64 -0
- package/build/lib/eosUiSecretCodec.js.map +1 -0
- package/build/lib/eosUnifiedBoundary.js +28 -4
- package/build/lib/eosUnifiedBoundary.js.map +1 -1
- package/build/lib/eosUpdateSnapshot.js +32 -1
- package/build/lib/eosUpdateSnapshot.js.map +1 -1
- package/build/lib/web.js +175 -18
- package/build/lib/web.js.map +1 -1
- package/build/main.js +6 -2
- package/build/main.js.map +1 -1
- package/docs/reports/unified-9.0.21/CRA_NACHWEISSTAND.md +159 -0
- package/docs/reports/unified-9.0.21/CUSTOMER_UPDATE_BACKEND_REVIEW.md +30 -0
- package/docs/reports/unified-9.0.21/CUSTOMER_UPDATE_UI_REVIEW.md +44 -0
- package/docs/reports/unified-9.0.21/CUSTOMER_UPDATE_WORKER_REVIEW.md +147 -0
- package/docs/reports/unified-9.0.21/CUSTOMER_WORKER_ZWEITPRUEFUNG.md +108 -0
- package/docs/reports/unified-9.0.21/DEVICE_STABILITY_REVIEW.md +50 -0
- package/docs/reports/unified-9.0.21/EMS_STABILITAET.md +41 -0
- package/docs/reports/unified-9.0.21/HISTORY_TARIFF_STABILITY_REVIEW.md +48 -0
- package/docs/reports/unified-9.0.21/MQTT_ZWEITPRUEFUNG_EMS.md +47 -0
- package/docs/reports/unified-9.0.21/PERSISTENZ_STABILITAET.md +76 -0
- package/docs/reports/unified-9.0.21/PRUEFBERICHT.md +64 -0
- package/docs/reports/unified-9.0.21/SECURITY_STABILITY_REVIEW.md +118 -0
- package/docs/reports/unified-9.0.21/UI_SECURITY_GATE_REVIEW.md +62 -0
- package/docs/reports/unified-9.0.21/UPDATE_HTTP_SNAPSHOT_PRUEFUNG.md +46 -0
- package/docs/reports/unified-9.0.21/raw/INDEX.json +1307 -0
- package/docs/reports/unified-9.0.21/raw/audit-full.log +345 -0
- package/docs/reports/unified-9.0.21/raw/audit-full.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/audit-runtime.log +23 -0
- package/docs/reports/unified-9.0.21/raw/audit-runtime.result.json +15 -0
- package/docs/reports/unified-9.0.21/raw/backend-final.log +5 -0
- package/docs/reports/unified-9.0.21/raw/backend-final.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/cra/frontend-installer-sbom.json +32 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-glue/root-glue-focused-node24.tap +34 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-service/lint.log +0 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-service/real920-archive-inspection.json +20 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-service/service-node22.log +110 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-service/service-node24.log +24 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-service/service-verification.json +54 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-service/typecheck.log +0 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/customer-worker-lint.log +0 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/customer-worker-node22.tap +86 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/customer-worker-node24.tap +20 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/customer-worker-strict-typecheck.log +0 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/customer-worker-typecheck.log +0 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/independent-worker-probes.cjs +109 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/node22.tap +86 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/node24.tap +20 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/probes-node22.tap +44 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/probes-node24.tap +13 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/receipt.json +89 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/receipt.json +42 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-before-drain-catch-node22.log +1959 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-before-drain-test-update-node22.log +1968 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-before-drain-test-update-node24.log +337 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-before-runtime-review-node22.log +1895 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-before-runtime-review-node24.log +317 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-final-node22.log +1959 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-final-node24.log +327 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-final-message-test-node22.log +36 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-final-message-test-node24.log +28 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-message-session-node22.log +36 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-message-session-node24.log +28 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-mqtt-command-replay-repro-node22.log +15 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-mqtt-command-replay-repro-node24.log +13 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-mqtt-shutdown-repro-node22.log +16 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-mqtt-shutdown-repro-node24.log +14 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-resources-node22.log +74 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-resources-node24.log +46 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/commands-before-drain-test-update.json +206 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/commands-before-runtime-review.json +150 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/commands-final.json +275 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/commands.json +134 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/env-node22.log +3 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/env-node24.log +1 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-before-drain-test-update-node22.log +2 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-before-drain-test-update-node24.log +0 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-before-runtime-review-node22.log +2 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-before-runtime-review-node24.log +0 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-final-node22.log +2 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-final-node24.log +0 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/mqtt-command-replay-repro.cjs +38 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/mqtt-shutdown-repro.cjs +31 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/regression-node22.log +322 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/regression-node24.log +55 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/run-evidence.py +23 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/run-final-evidence.py +20 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/runtime-lint-920.json +1 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/runtime-lint-921.json +1 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/source-hashes.json +16 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/types-before-drain-test-update-node22.log +0 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/types-before-drain-test-update-node24.log +0 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/types-before-runtime-review-node22.log +0 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/types-before-runtime-review-node24.log +0 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/types-final-node22.log +0 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/types-final-node24.log +0 -0
- package/docs/reports/unified-9.0.21/raw/ems/baseline-files-eslint.json +1 -0
- package/docs/reports/unified-9.0.21/raw/ems/changed-files-eslint.json +1 -0
- package/docs/reports/unified-9.0.21/raw/ems/engine.patch +38 -0
- package/docs/reports/unified-9.0.21/raw/ems/eslint-delta.json +6 -0
- package/docs/reports/unified-9.0.21/raw/ems/evidence.json +171 -0
- package/docs/reports/unified-9.0.21/raw/ems/farm-concurrency-baseline-node24.log +124 -0
- package/docs/reports/unified-9.0.21/raw/ems/farm-concurrency-node22.log +56 -0
- package/docs/reports/unified-9.0.21/raw/ems/farm-concurrency-node24.log +15 -0
- package/docs/reports/unified-9.0.21/raw/ems/farm-owned-methods.patch +133 -0
- package/docs/reports/unified-9.0.21/raw/ems/generated-regression-node22.log +460 -0
- package/docs/reports/unified-9.0.21/raw/ems/generated-regression-node24.log +82 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-frozen-node22.log +170 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-frozen-node24.log +33 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-review-node22.log +153 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-review-node24.log +39 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-reviewed-node22.log +170 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-reviewed-node24.log +33 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-queue-inheritance-before.log +28 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-review-baseline-node24.log +64 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-review-initial-timing.log +32 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-review-node22.log +44 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-review-node24.log +13 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-session-review.cjs +23 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-session-review.log +119 -0
- package/docs/reports/unified-9.0.21/raw/ems/nvp-baseline-node22.log +170 -0
- package/docs/reports/unified-9.0.21/raw/ems/nvp-baseline-node24.log +121 -0
- package/docs/reports/unified-9.0.21/raw/ems/nvp-node22.log +68 -0
- package/docs/reports/unified-9.0.21/raw/ems/nvp-node24.log +17 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-code-delta-inventory.json +32 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-docs-check.log +6 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-farm-fingerprint-moves.json +74 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-lint-policy-tests.log +6 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-lint-security-final-node22.log +5 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-lint-security-final-node24.log +8 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-lint-security-initial.log +6 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-main-full-delta.patch +135 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-reviewed-changes.json +93 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-reviewed-findings-before.json +3185 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-security-final-node22.json +28833 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-security-final-node24.json +28833 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-security-inventory-before.json +28991 -0
- package/docs/reports/unified-9.0.21/raw/ems/update-ui-reviewed-findings.cjs +59 -0
- package/docs/reports/unified-9.0.21/raw/frontend-build.log +152 -0
- package/docs/reports/unified-9.0.21/raw/frontend-build.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/frontend-installer-sbom.json +32 -0
- package/docs/reports/unified-9.0.21/raw/history/baseline920-influx-sequence-node24.log +12 -0
- package/docs/reports/unified-9.0.21/raw/history/baseline920-outage-node24.log +64 -0
- package/docs/reports/unified-9.0.21/raw/history/cra-tariff-source-node22.log +38 -0
- package/docs/reports/unified-9.0.21/raw/history/cra-tariff-source-node24.log +36 -0
- package/docs/reports/unified-9.0.21/raw/history/lint-baseline-comparison.json +83 -0
- package/docs/reports/unified-9.0.21/raw/history/lint-scope.cjs +29 -0
- package/docs/reports/unified-9.0.21/raw/history/regression-node22.log +438 -0
- package/docs/reports/unified-9.0.21/raw/history/regression-node24.log +75 -0
- package/docs/reports/unified-9.0.21/raw/history/results-node22.json +37 -0
- package/docs/reports/unified-9.0.21/raw/history/results-node24.json +66 -0
- package/docs/reports/unified-9.0.21/raw/history/run-checks.py +18 -0
- package/docs/reports/unified-9.0.21/raw/history/source-evidence.json +83 -0
- package/docs/reports/unified-9.0.21/raw/installer-build.log +26 -0
- package/docs/reports/unified-9.0.21/raw/installer-build.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/keygen-source.json +6 -0
- package/docs/reports/unified-9.0.21/raw/lint-final.log +16 -0
- package/docs/reports/unified-9.0.21/raw/lint-final.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/modules-build.log +5 -0
- package/docs/reports/unified-9.0.21/raw/modules-build.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/node22-tests-final.log +13274 -0
- package/docs/reports/unified-9.0.21/raw/node22-tests-final.result.json +13 -0
- package/docs/reports/unified-9.0.21/raw/node22-typecheck-final.log +7 -0
- package/docs/reports/unified-9.0.21/raw/node22-typecheck-final.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.21/raw/node24-tests-final.log +2223 -0
- package/docs/reports/unified-9.0.21/raw/node24-tests-final.result.json +13 -0
- package/docs/reports/unified-9.0.21/raw/node24-typecheck-final.log +5 -0
- package/docs/reports/unified-9.0.21/raw/node24-typecheck-final.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.21/raw/persistence/920-http-draft-revision-node24.log +50 -0
- package/docs/reports/unified-9.0.21/raw/persistence/920-late-commit-overwrite-node24.log +30 -0
- package/docs/reports/unified-9.0.21/raw/persistence/920-save-lifecycle-node24.log +59 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-backend-types.log +0 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-editor-lint.log +0 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-eebus-editor-typecheck.log +0 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-final-format-review.json +24 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-lint.log +0 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-new-update-http-before.log +177 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-new-update-snapshot-before.log +80 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-persistence-final-node22.log +1019 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-persistence-final-node22.receipt.json +28 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-persistence-final-node24.log +174 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-persistence-final-node24.receipt.json +28 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-eslint-final.log +0 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-final-node22.log +137 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-final-node22.receipt.json +21 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-final-node24.log +30 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-final-node24.receipt.json +21 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-strict-typecheck.log +0 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-typecheck-final.log +0 -0
- package/docs/reports/unified-9.0.21/raw/persistence/http-slowbody-after.log +3 -0
- package/docs/reports/unified-9.0.21/raw/persistence/http-slowbody-before-observation.json +25 -0
- package/docs/reports/unified-9.0.21/raw/persistence/http-slowbody-repro.cjs +7 -0
- package/docs/reports/unified-9.0.21/raw/persistence/source-files.pre-final-format.sha256 +14 -0
- package/docs/reports/unified-9.0.21/raw/persistence/source-files.sha256 +14 -0
- package/docs/reports/unified-9.0.21/raw/release-overlay/obsolete-assets-920-added.json +94 -0
- package/docs/reports/unified-9.0.21/raw/release-overlay/publish-catalog-regression.log +49 -0
- package/docs/reports/unified-9.0.21/raw/release-overlay/publish-catalog-regression.result.json +15 -0
- package/docs/reports/unified-9.0.21/raw/sbom-runtime.log +7 -0
- package/docs/reports/unified-9.0.21/raw/sbom-runtime.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/sbom-vendor-check.log +1 -0
- package/docs/reports/unified-9.0.21/raw/sbom-vendor-check.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/backend-typecheck.log +0 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/boundaries-node22.tap +495 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/boundaries-node24.tap +88 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/coexistence-node22.tap +179 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/coexistence-node24.tap +36 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/results.json +118 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/upload-admission-before-node22.tap +63 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/upload-admission-before-node24.tap +47 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/upload-lint.log +0 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/upload-node22.tap +148 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/upload-node24.tap +30 -0
- package/docs/reports/unified-9.0.21/raw/ui-docs-check.log +6 -0
- package/docs/reports/unified-9.0.21/raw/ui-docs-check.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/ui-runtime-final.log +7 -0
- package/docs/reports/unified-9.0.21/raw/ui-runtime-final.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/ui-runtime-sync.log +1 -0
- package/docs/reports/unified-9.0.21/raw/ui-runtime-sync.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/ui-sbom-check.log +6 -0
- package/docs/reports/unified-9.0.21/raw/ui-sbom-check.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/ui-sbom-final.log +6 -0
- package/docs/reports/unified-9.0.21/raw/ui-sbom-final.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/ui-secret-final.log +6 -0
- package/docs/reports/unified-9.0.21/raw/ui-secret-final.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/ui-security-final.log +8 -0
- package/docs/reports/unified-9.0.21/raw/ui-security-final.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/baseline-ui.log +280 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/browser-preview.test.cjs +170 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/draft-regression.log +214 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/eos-updates-before.ts +171 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/lint.log +0 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/results.json +90 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/source-evidence.json +30 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/type-node22.log +0 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/type-node24.log +0 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/ui-node22.log +98 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/ui-node24.log +22 -0
- package/docs/reports/unified-9.0.22/BACKUP_POSTGRES_FOLLOWUP.md +44 -0
- package/docs/reports/unified-9.0.22/ENERGIEFLUSS_BROWSERPRUEFUNG.md +40 -0
- package/docs/reports/unified-9.0.22/ENERGY_FLOW_BACKEND.md +44 -0
- package/docs/reports/unified-9.0.22/FLOW_TARIFF_INDEPENDENT_REVIEW.md +33 -0
- package/docs/reports/unified-9.0.22/OCPP_STOP_WRITER_REVIEW.md +27 -0
- package/docs/reports/unified-9.0.22/POSTGRESQL_SYSTEM_SETUP.md +34 -0
- package/docs/reports/unified-9.0.22/PRUEFBERICHT.md +85 -0
- package/docs/reports/unified-9.0.22/flow/PRUEFVERMERK.md +42 -0
- package/docs/reports/unified-9.0.22/flow/frontend-cadence-tests.log +37 -0
- package/docs/reports/unified-9.0.22/flow/frontend-source-hashes.json +13 -0
- package/docs/reports/unified-9.0.22/flow/frontend-tests.log +31 -0
- package/docs/reports/unified-9.0.22/postgres-history-review.md +43 -0
- package/docs/reports/unified-9.0.22/postgres-real-review.tap +21 -0
- package/docs/reports/unified-9.0.22/postgres-review-lint.log +0 -0
- package/docs/reports/unified-9.0.22/postgres-review-typecheck.log +0 -0
- package/docs/reports/unified-9.0.22/postgres-review-unit-api.tap +25 -0
- package/docs/reports/unified-9.0.22/raw/INDEX.json +43 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/eslint-backup.log +0 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/evcs-stop-writer-after.tap +13 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/evcs-stop-writer-before.tap +54 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/evcs-stop-writer-test-eslint.log +0 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/influx-real-node24.tap +11 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/scope-hashes.json +51 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/storage-nullable-before.tap +96 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/storage-nullable-flow.tap +12 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/tests-node24.tap +116 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/typecheck-backup-scope.log +0 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/typecheck-backup.log +0 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/typecheck-postgres-setup.log +0 -0
- package/docs/reports/unified-9.0.22/raw/current/admin-build.log +152 -0
- package/docs/reports/unified-9.0.22/raw/current/availability-final.log +1 -0
- package/docs/reports/unified-9.0.22/raw/current/backend-build.log +5 -0
- package/docs/reports/unified-9.0.22/raw/current/baseline-repairs.log +60 -0
- package/docs/reports/unified-9.0.22/raw/current/baseline-unified.log +1675 -0
- package/docs/reports/unified-9.0.22/raw/current/combined-fixes.log +65 -0
- package/docs/reports/unified-9.0.22/raw/current/control-final.log +25 -0
- package/docs/reports/unified-9.0.22/raw/current/energyflow-browser.json +244 -0
- package/docs/reports/unified-9.0.22/raw/current/energyflow-browser.stderr +0 -0
- package/docs/reports/unified-9.0.22/raw/current/energyflow-cadence-browser.json +63 -0
- package/docs/reports/unified-9.0.22/raw/current/energyflow-cadence-browser.stderr +0 -0
- package/docs/reports/unified-9.0.22/raw/current/lint-final.log +5 -0
- package/docs/reports/unified-9.0.22/raw/current/lint.log +5 -0
- package/docs/reports/unified-9.0.22/raw/current/markdown-build.log +1 -0
- package/docs/reports/unified-9.0.22/raw/current/modules-build.log +5 -0
- package/docs/reports/unified-9.0.22/raw/current/pre-ocpp-full.log +2337 -0
- package/docs/reports/unified-9.0.22/raw/current/production-audit.json +22 -0
- package/docs/reports/unified-9.0.22/raw/current/production-audit.stderr +1 -0
- package/docs/reports/unified-9.0.22/raw/current/runtime-build-final.log +8 -0
- package/docs/reports/unified-9.0.22/raw/current/runtime-build.log +32 -0
- package/docs/reports/unified-9.0.22/raw/current/runtime-sync.log +1 -0
- package/docs/reports/unified-9.0.22/raw/current/safety-envelope-final.log +1 -0
- package/docs/reports/unified-9.0.22/raw/current/sbom-lock-graph.log +1 -0
- package/docs/reports/unified-9.0.22/raw/current/sbom.log +6120 -0
- package/docs/reports/unified-9.0.22/raw/current/station-permission-final.log +1 -0
- package/docs/reports/unified-9.0.22/raw/current/storage-feedforward-final.log +1 -0
- package/docs/reports/unified-9.0.22/raw/current/typecheck-final.log +5 -0
- package/docs/reports/unified-9.0.22/raw/current/typecheck.log +5 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/eslint.txt +0 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/node22-availability.txt +1 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/node22-safety.txt +1 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/node22-station.txt +1 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/node22-tests.tap +124 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/node24-availability.txt +1 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/node24-safety.txt +1 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/node24-station.txt +1 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/node24-tests.tap +26 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/typecheck.txt +0 -0
- package/docs/reports/unified-9.0.22/raw/flow-backend/core-pv-node22.tap +30 -0
- package/docs/reports/unified-9.0.22/raw/flow-backend/core-pv-node24.tap +11 -0
- package/docs/reports/unified-9.0.22/raw/flow-backend/environment.json +7 -0
- package/docs/reports/unified-9.0.22/raw/flow-backend/lint.log +0 -0
- package/docs/reports/unified-9.0.22/raw/flow-backend/node22.tap +164 -0
- package/docs/reports/unified-9.0.22/raw/flow-backend/node24.tap +33 -0
- package/docs/reports/unified-9.0.22/raw/flow-backend/typecheck.log +0 -0
- package/docs/reports/unified-9.0.22/raw/history-ui/browser-runtime.json +11 -0
- package/docs/reports/unified-9.0.22/raw/history-ui/browser-smoke.json +49 -0
- package/docs/reports/unified-9.0.22/raw/history-ui/browser-smoke.stderr +0 -0
- package/docs/reports/unified-9.0.22/raw/history-ui/build.log +18 -0
- package/docs/reports/unified-9.0.22/raw/history-ui/environment.json +38 -0
- package/docs/reports/unified-9.0.22/raw/history-ui/lint.log +0 -0
- package/docs/reports/unified-9.0.22/raw/history-ui/node22.tap +144 -0
- package/docs/reports/unified-9.0.22/raw/history-ui/node24.tap +30 -0
- package/docs/reports/unified-9.0.22/raw/node22-tests-final.log +14086 -0
- package/docs/reports/unified-9.0.22/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.22/raw/node24-tests-final.log +2356 -0
- package/docs/reports/unified-9.0.22/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.22/raw/postgresql-system/setup-eslint.log +0 -0
- package/docs/reports/unified-9.0.22/raw/postgresql-system/setup-node22.tap +72 -0
- package/docs/reports/unified-9.0.22/raw/postgresql-system/setup-node24.tap +70 -0
- package/docs/reports/unified-9.0.22/raw/postgresql-system/status-eslint.log +0 -0
- package/docs/reports/unified-9.0.22/raw/postgresql-system/typecheck.log +0 -0
- package/docs/reports/unified-9.0.23/MODULE_PROCESS_IMPLEMENTATION.md +43 -0
- package/docs/reports/unified-9.0.23/OCPP_0.4.3_ERGEBNIS.json +24 -0
- package/docs/reports/unified-9.0.23/OCPP_0.4.3_PRUEFBERICHT.md +50 -0
- package/docs/reports/unified-9.0.23/OCPP_AUTOMATISCHE_ZUORDNUNG.md +49 -0
- package/docs/reports/unified-9.0.23/OCPP_CM_INTEGRATION.md +31 -0
- package/docs/reports/unified-9.0.23/PROZESSDIAGNOSE.md +35 -0
- package/docs/reports/unified-9.0.23/PRUEFBERICHT.md +75 -0
- package/docs/reports/unified-9.0.23/UI_EMS_PROZESSGRENZE.md +36 -0
- package/docs/reports/unified-9.0.23/UI_PROCESS_INDEPENDENT_FOLLOWUP.md +33 -0
- package/docs/reports/unified-9.0.23/module-process-contract-review-node22.tap +86 -0
- package/docs/reports/unified-9.0.23/module-process-contract-review-node24.tap +20 -0
- package/docs/reports/unified-9.0.23/module-process-contract-review.md +39 -0
- package/docs/reports/unified-9.0.23/module-process-contract-review.tap +20 -0
- package/docs/reports/unified-9.0.23/module-process-final.tap +27 -0
- package/docs/reports/unified-9.0.23/module-process-static.json +57 -0
- package/docs/reports/unified-9.0.23/raw/INDEX.json +43 -0
- package/docs/reports/unified-9.0.23/raw/build-backend-final.log +5 -0
- package/docs/reports/unified-9.0.23/raw/build-frontend.log +152 -0
- package/docs/reports/unified-9.0.23/raw/build-installer.log +26 -0
- package/docs/reports/unified-9.0.23/raw/build-ui-final.log +7 -0
- package/docs/reports/unified-9.0.23/raw/current/evcs-stop-writer-ocpp043.txt +20 -0
- package/docs/reports/unified-9.0.23/raw/current/ocpp-runtime-feedback-lint.txt +1 -0
- package/docs/reports/unified-9.0.23/raw/current/ocpp-runtime-feedback-tests.txt +28 -0
- package/docs/reports/unified-9.0.23/raw/current/runtime-health-browser.json +49 -0
- package/docs/reports/unified-9.0.23/raw/current/runtime-health-browser.stderr.txt +0 -0
- package/docs/reports/unified-9.0.23/raw/current/runtime-health-lint.txt +1 -0
- package/docs/reports/unified-9.0.23/raw/current/runtime-health-tests.txt +27 -0
- package/docs/reports/unified-9.0.23/raw/current/runtime-health-types.txt +1 -0
- package/docs/reports/unified-9.0.23/raw/eos-production-audit.json +22 -0
- package/docs/reports/unified-9.0.23/raw/idle-pwa-node22.log +75 -0
- package/docs/reports/unified-9.0.23/raw/idle-pwa-node24.log +22 -0
- package/docs/reports/unified-9.0.23/raw/lint-final.log +5 -0
- package/docs/reports/unified-9.0.23/raw/node22-tests-final.log +14612 -0
- package/docs/reports/unified-9.0.23/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.23/raw/node24-tests-final.log +2443 -0
- package/docs/reports/unified-9.0.23/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.23/raw/ocpp-auto-discovery.log +21 -0
- package/docs/reports/unified-9.0.23/raw/ocpp-discovery-browser.json +55 -0
- package/docs/reports/unified-9.0.23/raw/ocpp-discovery-lifecycle-regression.log +48 -0
- package/docs/reports/unified-9.0.23/raw/ocpp-production-audit.json +69 -0
- package/docs/reports/unified-9.0.23/raw/typecheck-final.log +5 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/discovery-review.tap +21 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/lint.log +0 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/node22.tap +118 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/node24.tap +112 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/root-typecheck.log +0 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/typecheck.log +0 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/unified-listen-build-node24.tap +196 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/unified-listen-node22.tap +200 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/web-lint.log +0 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/web-pipeline-node22.tap +92 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/web-pipeline-node24.tap +90 -0
- package/docs/reports/unified-9.0.23/ui-process-contract-review.md +30 -0
- package/docs/reports/unified-9.0.23/ui-process-final-review-node22.tap +50 -0
- package/docs/reports/unified-9.0.23/ui-process-final-review-node24.tap +14 -0
- package/docs/reports/unified-9.0.23/ui-process-followup-hashes.json +13 -0
- package/docs/reports/unified-9.0.23/ui-process-operational-review-node22.tap +30 -0
- package/docs/reports/unified-9.0.23/ui-process-operational-review-node24.tap +11 -0
- package/docs/reports/unified-9.0.23/ui-process-review-node22.tap +48 -0
- package/docs/reports/unified-9.0.23/ui-process-review-node24.tap +46 -0
- package/docs/reports/unified-9.0.24/BACKUP_INTEROP_PRUEFBERICHT.md +48 -0
- package/docs/reports/unified-9.0.24/KIOSK_FRONTEND_BROWSERPRUEFUNG.md +49 -0
- package/docs/reports/unified-9.0.24/KIOSK_UNABHAENGIGER_REVIEW.md +21 -0
- package/docs/reports/unified-9.0.24/OCPP_HOST_MIGRATION.md +41 -0
- package/docs/reports/unified-9.0.24/OCPP_NAMESPACE_REGELPFAD.md +55 -0
- package/docs/reports/unified-9.0.24/OCPP_UNABHAENGIGER_REVIEW.md +37 -0
- package/docs/reports/unified-9.0.24/OCPP_VERWALTUNG.md +33 -0
- package/docs/reports/unified-9.0.24/PRUEFBERICHT.md +54 -0
- package/docs/reports/unified-9.0.24/PUBLISH_OVERLAY_9_0_21.md +23 -0
- package/docs/reports/unified-9.0.24/raw/INDEX.json +43 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/ems-independence-node24.tap +9 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/final-node22.tap +175 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/final-node24.tap +35 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/focused-node22.tap +132 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/focused-node24.tap +27 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/kiosk-review-node24.tap +13 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/kiosk-update-snapshot-node24.tap +22 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/lint-source.txt +0 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/lint-tests.txt +0 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/ocpp-backup-node24.tap +10 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/own-source-hashes.json +12 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/types.txt +0 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/update-snapshot-node24.tap +20 -0
- package/docs/reports/unified-9.0.24/raw/build.log +200 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-browser-node22.json +69 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-browser-node22.stderr.txt +3 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-browser.json +69 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-browser.stderr.txt +2 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-http-node22.txt +253 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-http-node24.txt +52 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-lint.txt +0 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-types.txt +0 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-lease-registration-before.txt +28 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-namespace-independent-node22.txt +302 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-namespace-independent-node24.txt +55 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-native-generic-before.txt +25 -0
- package/docs/reports/unified-9.0.24/raw/current/runtime-health-browser.json +49 -0
- package/docs/reports/unified-9.0.24/raw/current/runtime-health-browser.stderr.txt +0 -0
- package/docs/reports/unified-9.0.24/raw/current/runtime-health-types.txt +0 -0
- package/docs/reports/unified-9.0.24/raw/eos-production-audit.json +77 -0
- package/docs/reports/unified-9.0.24/raw/kiosk-auth-profiles-node22.log +16 -0
- package/docs/reports/unified-9.0.24/raw/kiosk-auth-profiles-node24.log +14 -0
- package/docs/reports/unified-9.0.24/raw/kiosk-browser-node22.json +57 -0
- package/docs/reports/unified-9.0.24/raw/kiosk-browser-node24.json +57 -0
- package/docs/reports/unified-9.0.24/raw/kiosk-idle-node22.log +215 -0
- package/docs/reports/unified-9.0.24/raw/kiosk-idle-node24.log +42 -0
- package/docs/reports/unified-9.0.24/raw/lint.log +45 -0
- package/docs/reports/unified-9.0.24/raw/node22-tests-final.log +15517 -0
- package/docs/reports/unified-9.0.24/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.24/raw/node24-tests-final.log +2595 -0
- package/docs/reports/unified-9.0.24/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.24/raw/ocpp-host-node22.tap +105 -0
- package/docs/reports/unified-9.0.24/raw/ocpp-host-node24.tap +24 -0
- package/docs/reports/unified-9.0.24/raw/ocpp-host-regression-node22.tap +818 -0
- package/docs/reports/unified-9.0.24/raw/ocpp-host-regression-node24.tap +140 -0
- package/docs/reports/unified-9.0.24/raw/ocpp-hosted-mapping-browser.log +2 -0
- package/docs/reports/unified-9.0.24/raw/ocpp-legacy-mapping-browser.log +2 -0
- package/docs/reports/unified-9.0.24/raw/ocpp-namespace-control.log +49 -0
- package/docs/reports/unified-9.0.24/raw/publish-overlay-node22.tap +278 -0
- package/docs/reports/unified-9.0.24/raw/publish-overlay-node24.tap +52 -0
- package/docs/reports/unified-9.0.24/raw/publish-overlay-provenance-922-923.json +32 -0
- package/docs/reports/unified-9.0.24/raw/publish-overlay-provenance.json +19 -0
- package/docs/reports/unified-9.0.24/raw/typecheck.log +5 -0
- package/docs/reports/unified-9.0.25/MIGRATION_INDEPENDENT_REVIEW.md +74 -0
- package/docs/reports/unified-9.0.25/OCPP_STARTSPERRE_9.0.24.md +60 -0
- package/docs/reports/unified-9.0.25/PRUEFBERICHT.md +78 -0
- package/docs/reports/unified-9.0.25/RUNTIME_CONTROLS_BROWSERPRUEFUNG.md +81 -0
- package/docs/reports/unified-9.0.25/RUNTIME_CONTROL_BACKEND.md +58 -0
- package/docs/reports/unified-9.0.25/RUNTIME_CONTROL_INDEPENDENT_REVIEW.md +66 -0
- package/docs/reports/unified-9.0.25/RUNTIME_LOGIN_RECOVERY.md +32 -0
- package/docs/reports/unified-9.0.25/TARIFF_UPDATE_PERSISTENCE.md +50 -0
- package/docs/reports/unified-9.0.25/UI_CONFIG_COMMIT_ACK.md +51 -0
- package/docs/reports/unified-9.0.25/raw/BUILD_CHECKS.json +49 -0
- package/docs/reports/unified-9.0.25/raw/INDEX.json +43 -0
- package/docs/reports/unified-9.0.25/raw/SBOM_GENERATION.json +42 -0
- package/docs/reports/unified-9.0.25/raw/build-backend.log +5 -0
- package/docs/reports/unified-9.0.25/raw/build-frontend.log +152 -0
- package/docs/reports/unified-9.0.25/raw/build-installer.log +26 -0
- package/docs/reports/unified-9.0.25/raw/build-modules.log +5 -0
- package/docs/reports/unified-9.0.25/raw/build-ui-runtime.log +7 -0
- package/docs/reports/unified-9.0.25/raw/eos-production-audit.json +77 -0
- package/docs/reports/unified-9.0.25/raw/eos-production-audit.stderr +1 -0
- package/docs/reports/unified-9.0.25/raw/frontend-sbom.stderr +1 -0
- package/docs/reports/unified-9.0.25/raw/installer-sbom.stderr +1 -0
- package/docs/reports/unified-9.0.25/raw/lint.log +45 -0
- package/docs/reports/unified-9.0.25/raw/node22-tests-final.log +15879 -0
- package/docs/reports/unified-9.0.25/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.25/raw/node24-tests-final.log +2653 -0
- package/docs/reports/unified-9.0.25/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.25/raw/runtime-control-backend/runtime-control-backend-node22-final.tap +236 -0
- package/docs/reports/unified-9.0.25/raw/runtime-control-backend/runtime-control-backend-node24-final.tap +44 -0
- package/docs/reports/unified-9.0.25/raw/runtime-control-backend/source-sha256.json +19 -0
- package/docs/reports/unified-9.0.25/raw/runtime-controls/controls-node22.json +70 -0
- package/docs/reports/unified-9.0.25/raw/runtime-controls/controls-node24.json +70 -0
- package/docs/reports/unified-9.0.25/raw/runtime-controls/health-node22.json +49 -0
- package/docs/reports/unified-9.0.25/raw/runtime-controls/health-node24.json +49 -0
- package/docs/reports/unified-9.0.25/raw/runtime-controls/login-contract-node22.log +15 -0
- package/docs/reports/unified-9.0.25/raw/runtime-controls/login-contract-node24.log +15 -0
- package/docs/reports/unified-9.0.25/raw/runtime-controls/login-node22.json +32 -0
- package/docs/reports/unified-9.0.25/raw/runtime-controls/login-node24.json +32 -0
- package/docs/reports/unified-9.0.25/raw/runtime-login-recovery/node22.log +28 -0
- package/docs/reports/unified-9.0.25/raw/runtime-login-recovery/node24.log +10 -0
- package/docs/reports/unified-9.0.25/raw/runtime-login-recovery/route-regression-node24.log +28 -0
- package/docs/reports/unified-9.0.25/raw/runtime-login-recovery/source-sha256.json +6 -0
- package/docs/reports/unified-9.0.25/raw/runtime-processes/README.md +41 -0
- package/docs/reports/unified-9.0.25/raw/runtime-processes/runtime-control-processes-node22.tap +44 -0
- package/docs/reports/unified-9.0.25/raw/runtime-processes/runtime-control-processes-node24.tap +13 -0
- package/docs/reports/unified-9.0.25/raw/runtime-review/runtime-controls-and-ui-review-node22.tap +232 -0
- package/docs/reports/unified-9.0.25/raw/runtime-review/runtime-controls-and-ui-review-node24.tap +43 -0
- package/docs/reports/unified-9.0.25/raw/runtime-review/runtime-controls-review-node22.tap +68 -0
- package/docs/reports/unified-9.0.25/raw/runtime-review/runtime-controls-review-node24.tap +17 -0
- package/docs/reports/unified-9.0.25/raw/sbom-lock.log +1 -0
- package/docs/reports/unified-9.0.25/raw/sbom-lock.stderr +1 -0
- package/docs/reports/unified-9.0.25/raw/tariff-update/ack-node22.tap +44 -0
- package/docs/reports/unified-9.0.25/raw/tariff-update/ack-node24.tap +40 -0
- package/docs/reports/unified-9.0.25/raw/tariff-update/ack-review-node22.tap +44 -0
- package/docs/reports/unified-9.0.25/raw/tariff-update/ack-review-node24.tap +13 -0
- package/docs/reports/unified-9.0.25/raw/tariff-update/commit-ack-sha256.txt +4 -0
- package/docs/reports/unified-9.0.25/raw/tariff-update/config-ack-result.json +19 -0
- package/docs/reports/unified-9.0.25/raw/tariff-update/generate-921-fixture.cjs +36 -0
- package/docs/reports/unified-9.0.25/raw/tariff-update/node22.tap +68 -0
- package/docs/reports/unified-9.0.25/raw/tariff-update/node24.tap +64 -0
- package/docs/reports/unified-9.0.25/raw/tariff-update/reproduce-config-ack.cjs +55 -0
- package/docs/reports/unified-9.0.25/raw/tariff-update/reviewed-sha256.txt +4 -0
- package/docs/reports/unified-9.0.25/raw/typecheck.log +5 -0
- package/docs/unified/EMS_BEDIEN_DATENPUNKTE_9_0_22.md +51 -0
- package/docs/unified/HISTORY_UI_9_0_22.md +75 -0
- package/docs/unified/POSTGRESQL_9_0_22.md +89 -0
- package/io-package.json +20 -22
- package/modules/backup/README.md +10 -0
- package/modules/backup/RECOVERY-9.0.22.md +59 -0
- package/modules/backup/admin/index.html +2 -1
- package/modules/backup/admin/index.js +17 -1
- package/modules/backup/build/config.js +2 -0
- package/modules/backup/build/coverage.js +64 -0
- package/modules/backup/build/creators.js +22 -17
- package/modules/backup/build/databaseTargets.js +42 -0
- package/modules/backup/build/index.js +47 -4
- package/modules/backup/build/influxIntegrity.js +159 -0
- package/modules/backup/build/postgresHistory.js +91 -0
- package/modules/backup/build/preflight.js +3 -8
- package/modules/backup/build/publicTrust.js +46 -0
- package/modules/backup/build/restore-cli.js +72 -1
- package/modules/backup/build/storageRetention.js +26 -0
- package/modules/backup/build/worker.js +18 -1
- package/modules/backup/src/config.ts +2 -0
- package/modules/backup/src/coverage.ts +50 -0
- package/modules/backup/src/creators.ts +20 -17
- package/modules/backup/src/databaseTargets.ts +45 -0
- package/modules/backup/src/index.ts +37 -4
- package/modules/backup/src/influxIntegrity.ts +125 -0
- package/modules/backup/src/postgresHistory.ts +66 -0
- package/modules/backup/src/preflight.ts +3 -10
- package/modules/backup/src/publicTrust.ts +34 -0
- package/modules/backup/src/restore-cli.ts +55 -4
- package/modules/backup/src/storageRetention.ts +20 -0
- package/modules/backup/src/types.ts +5 -0
- package/modules/backup/src/worker.ts +18 -2
- package/modules/backup/test/completeness.test.cjs +193 -0
- package/modules/backup/test/hosted.test.cjs +43 -3
- package/modules/backup/test/influx-real.test.cjs +75 -0
- package/modules/backup/test/lifecycle.test.cjs +7 -5
- package/modules/backup/test/ocpp-coverage.test.cjs +152 -0
- package/modules/devices/admin/index.html +1 -1
- package/modules/eebus/admin/index.html +1 -1
- package/modules/ocpp/LICENSE +21 -0
- package/modules/ocpp/README.md +61 -0
- package/modules/ocpp/admin/config-fields.json +353 -0
- package/modules/ocpp/admin/index.html +52 -0
- package/modules/ocpp/admin/index.js +228 -0
- package/modules/ocpp/admin/style.css +27 -0
- package/modules/ocpp/build/index.js +401 -0
- package/modules/ocpp/build/operationGuard.js +26 -0
- package/modules/ocpp/build/server.js +155 -0
- package/modules/ocpp/eslint.config.mjs +13 -0
- package/modules/ocpp/index.js +3 -0
- package/modules/ocpp/native-defaults.json +44 -0
- package/modules/ocpp/ocpp/common.js +646 -0
- package/modules/ocpp/ocpp/compact.js +332 -0
- package/modules/ocpp/ocpp/configuration.js +364 -0
- package/modules/ocpp/ocpp/eos-contract.js +149 -0
- package/modules/ocpp/ocpp/freshness.d.ts +10 -0
- package/modules/ocpp/ocpp/freshness.js +272 -0
- package/modules/ocpp/ocpp/schemas/NOTICE.md +17 -0
- package/modules/ocpp/ocpp/schemas/ocpp2_0_1_official.json +1 -0
- package/modules/ocpp/ocpp/schemas/ocpp2_1_official.json +1 -0
- package/modules/ocpp/ocpp/server.js +3 -0
- package/modules/ocpp/ocpp/v16.js +213 -0
- package/modules/ocpp/ocpp/v201.js +4 -0
- package/modules/ocpp/ocpp/v21.js +4 -0
- package/modules/ocpp/ocpp/v2base.js +255 -0
- package/modules/ocpp/package.json +11 -0
- package/modules/ocpp/provenance.json +33 -0
- package/modules/ocpp/runtime.d.ts +16 -0
- package/modules/ocpp/runtime.js +3391 -0
- package/modules/ocpp/src/index.ts +463 -0
- package/modules/ocpp/src/operationGuard.ts +29 -0
- package/modules/ocpp/src/server.ts +193 -0
- package/modules/ocpp/test/configuration-runtime.test.js +786 -0
- package/modules/ocpp/test/core.test.js +772 -0
- package/modules/ocpp/test/eos-contract.test.js +67 -0
- package/modules/ocpp/test/hosted.test.cjs +165 -0
- package/modules/ocpp/tsconfig.json +7 -0
- package/modules/ocpp/validation/manifest.json +36 -0
- package/modules/ocpp/validation/node22-tests.log +525 -0
- package/modules/ocpp/validation/node24-tests.log +92 -0
- package/package.json +29 -11
- package/public/eos-migration/index.html +1 -1
- package/public/eos-migration/index.js +2 -2
- package/public/eos-runtime/index.html +36 -0
- package/public/eos-runtime/index.js +249 -0
- package/public/eos-runtime/style.css +27 -0
- package/release-manifests/unified/build-environment.cdx.json +767 -131
- package/release-manifests/unified/files.json +700 -214
- package/release-manifests/unified/frontend.cdx.json +6 -6
- package/release-manifests/unified/installer.cdx.json +6 -6
- package/release-manifests/unified/obsolete-admin-assets.json +292 -6
- package/release-manifests/unified/runtime.cdx.json +871 -143
- package/release-manifests/unified/validation.json +15 -15
- package/reports/unified/ocpp-pure-pv-9.0.22/PRUEFVERMERK.md +35 -0
- package/reports/unified/ocpp-pure-pv-9.0.22/raw/auto-pv-phases.log +1 -0
- package/reports/unified/ocpp-pure-pv-9.0.22/raw/control-tests.log +11 -0
- package/reports/unified/ocpp-pure-pv-9.0.22/raw/ocpp-stability.log +1 -0
- package/reports/unified/ocpp-pure-pv-9.0.22/raw/rc60.log +1 -0
- package/reports/unified/tariff-energy-flow-9.0.22/PRUEFVERMERK.md +44 -0
- package/reports/unified/tariff-energy-flow-9.0.22/raw/focused-tests.log +37 -0
- package/reports/unified/tariff-energy-flow-9.0.22/raw/grid-charge-policy.log +1 -0
- package/reports/unified/tariff-energy-flow-9.0.22/raw/status-truth.log +1 -0
- package/tools/eos-release-check.cjs +5 -0
- package/tools/eos-release-manifest.cjs +3 -3
- package/tools/eos-sbom-vendored.cjs +2 -1
- package/tools/system/eos-postgresql-setup.cjs +409 -0
- package/tsconfig.eos-history-backup-scope.json +9 -0
- package/tsconfig.eos-postgres-system.json +15 -0
- package/ui/admin/react/assets/index-wHWXfD_g.js +13 -0
- package/ui/admin/react/index.html +1 -1
- package/ui/ems/consumers/evcs.js +11 -7
- package/ui/ems/datapoints.js +14 -5
- package/ui/ems/engine.js +4 -1
- package/ui/ems/modules/charging-management.js +193 -63
- package/ui/ems/modules/core-limits.js +15 -20
- package/ui/ems/modules/storage-control.js +8 -6
- package/ui/ems/modules/tarif-vis.js +7 -2
- package/ui/ems/modules/tariff-status.js +19 -1
- package/ui/eslint.postgres-history.config.mjs +9 -0
- package/ui/io-package.json +5 -1
- package/ui/lib/ems-control-values.js +64 -0
- package/ui/lib/flow-measurement.js +72 -0
- package/ui/lib/hosted-adapter.js +12 -1
- package/ui/lib/influx-history-runtime.js +66 -24
- package/ui/lib/installer-lifecycle.js +4 -2
- package/ui/lib/ocpp-auto-discovery.js +397 -0
- package/ui/lib/ocpp-limit-feedback.js +166 -0
- package/ui/lib/partner-runtime.js +35 -2
- package/ui/lib/partner-websocket.js +4 -1
- package/ui/lib/postgres-history-config.js +57 -0
- package/ui/lib/postgres-history.js +344 -0
- package/ui/lib/runtime-proxy-html.js +34 -1
- package/ui/lib/smarthome-device-controls.js +4 -1
- package/ui/lib/ui-access-policy.js +39 -6
- package/ui/main.js +392 -222
- package/ui/package.json +1 -1
- package/ui/tsconfig.postgres-history.json +4 -0
- package/ui/www/app.js +106 -152
- package/ui/www/auth.js +36 -10
- package/ui/www/charging-diagnostics-appcenter.js +1 -0
- package/ui/www/customer-tariff.js +1 -0
- package/ui/www/dashboard-lp-status.js +1 -0
- package/ui/www/dc-station-display.js +1 -0
- package/ui/www/ems-apps.js +48 -8
- package/ui/www/energy-origin-appcenter.js +1 -0
- package/ui/www/energy-origin-ledger-view.js +1 -0
- package/ui/www/eos-kiosk-settings.js +174 -0
- package/ui/www/eos-session-idle.js +40 -6
- package/ui/www/eos-updates.js +1 -0
- package/ui/www/index.html +2 -1
- package/ui/www/license.js +1 -0
- package/ui/www/licenses/smarthome-markdown-components.json +157 -157
- package/ui/www/live-display.js +4 -2
- package/ui/www/login.js +25 -9
- package/ui/www/manifest.webmanifest +3 -3
- package/ui/www/netoperator-appcenter.js +1 -0
- package/ui/www/netoperator.js +1 -0
- package/ui/www/operating-strategies-appcenter.js +1 -0
- package/ui/www/operating-strategies-rule-builder.js +1 -0
- package/ui/www/power-measurements.js +27 -2
- package/ui/www/pwa.js +1 -0
- package/ui/www/runtime-base.js +1 -0
- package/ui/www/settings.html +13 -1
- package/ui/www/smarthome-activation.js +1 -0
- package/ui/www/smarthome-alias-config.js +1 -0
- package/ui/www/smarthome-custom-config.js +1 -0
- package/ui/www/smarthome-custom-views.js +1 -0
- package/ui/www/smarthome-device-categories.js +1 -0
- package/ui/www/smarthome-device-config.js +1 -0
- package/ui/www/smarthome-device-controls.js +1 -0
- package/ui/www/smarthome-feedback.js +1 -0
- package/ui/www/smarthome-layout-editor.js +1 -0
- package/ui/www/smarthome-presentation.js +1 -0
- package/ui/www/smarthome-setup.js +1 -0
- package/ui/www/smarthome-touch.js +1 -0
- package/ui/www/storagefarm-dispatch.js +1 -0
- package/ui/www/storagefarm-summary.js +1 -0
- package/ui/www/tariff-display.js +62 -2
- package/adminWww/remoteEntry-eos-9.0.21.js +0 -12
- package/ui/admin/react/assets/index-BJO3q7oe.js +0 -13
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))d(c);new MutationObserver(c=>{for(const h of c)if(h.type==="childList")for(const m of h.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&d(m)}).observe(document,{childList:!0,subtree:!0});function o(c){const h={};return c.integrity&&(h.integrity=c.integrity),c.referrerPolicy&&(h.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?h.credentials="include":c.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function d(c){if(c.ep)return;c.ep=!0;const h=o(c);fetch(c.href,h)}})();function Of(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var mo={exports:{}},zi={},go={exports:{}},Ee={};var qd;function ym(){if(qd)return Ee;qd=1;var r=Symbol.for("react.element"),s=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),m=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),S=Symbol.iterator;function E(j){return j===null||typeof j!="object"?null:(j=S&&j[S]||j["@@iterator"],typeof j=="function"?j:null)}var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,I={};function N(j,L,ge){this.props=j,this.context=L,this.refs=I,this.updater=ge||M}N.prototype.isReactComponent={},N.prototype.setState=function(j,L){if(typeof j!="object"&&typeof j!="function"&&j!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,L,"setState")},N.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function $(){}$.prototype=N.prototype;function F(j,L,ge){this.props=j,this.context=L,this.refs=I,this.updater=ge||M}var T=F.prototype=new $;T.constructor=F,R(T,N.prototype),T.isPureReactComponent=!0;var ue=Array.isArray,le=Object.prototype.hasOwnProperty,G={current:null},de={key:!0,ref:!0,__self:!0,__source:!0};function Y(j,L,ge){var ke,U={},ne=null,we=null;if(L!=null)for(ke in L.ref!==void 0&&(we=L.ref),L.key!==void 0&&(ne=""+L.key),L)le.call(L,ke)&&!de.hasOwnProperty(ke)&&(U[ke]=L[ke]);var oe=arguments.length-2;if(oe===1)U.children=ge;else if(1<oe){for(var ve=Array(oe),Ve=0;Ve<oe;Ve++)ve[Ve]=arguments[Ve+2];U.children=ve}if(j&&j.defaultProps)for(ke in oe=j.defaultProps,oe)U[ke]===void 0&&(U[ke]=oe[ke]);return{$$typeof:r,type:j,key:ne,ref:we,props:U,_owner:G.current}}function je(j,L){return{$$typeof:r,type:j.type,key:L,ref:j.ref,props:j.props,_owner:j._owner}}function D(j){return typeof j=="object"&&j!==null&&j.$$typeof===r}function ce(j){var L={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(ge){return L[ge]})}var A=/\/+/g;function Z(j,L){return typeof j=="object"&&j!==null&&j.key!=null?ce(""+j.key):L.toString(36)}function be(j,L,ge,ke,U){var ne=typeof j;(ne==="undefined"||ne==="boolean")&&(j=null);var we=!1;if(j===null)we=!0;else switch(ne){case"string":case"number":we=!0;break;case"object":switch(j.$$typeof){case r:case s:we=!0}}if(we)return we=j,U=U(we),j=ke===""?"."+Z(we,0):ke,ue(U)?(ge="",j!=null&&(ge=j.replace(A,"$&/")+"/"),be(U,L,ge,"",function(Ve){return Ve})):U!=null&&(D(U)&&(U=je(U,ge+(!U.key||we&&we.key===U.key?"":(""+U.key).replace(A,"$&/")+"/")+j)),L.push(U)),1;if(we=0,ke=ke===""?".":ke+":",ue(j))for(var oe=0;oe<j.length;oe++){ne=j[oe];var ve=ke+Z(ne,oe);we+=be(ne,L,ge,ve,U)}else if(ve=E(j),typeof ve=="function")for(j=ve.call(j),oe=0;!(ne=j.next()).done;)ne=ne.value,ve=ke+Z(ne,oe++),we+=be(ne,L,ge,ve,U);else if(ne==="object")throw L=String(j),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.");return we}function X(j,L,ge){if(j==null)return j;var ke=[],U=0;return be(j,ke,"","",function(ne){return L.call(ge,ne,U++)}),ke}function fe(j){if(j._status===-1){var L=j._result;L=L(),L.then(function(ge){(j._status===0||j._status===-1)&&(j._status=1,j._result=ge)},function(ge){(j._status===0||j._status===-1)&&(j._status=2,j._result=ge)}),j._status===-1&&(j._status=0,j._result=L)}if(j._status===1)return j._result.default;throw j._result}var Se={current:null},B={transition:null},ae={ReactCurrentDispatcher:Se,ReactCurrentBatchConfig:B,ReactCurrentOwner:G};function K(){throw Error("act(...) is not supported in production builds of React.")}return Ee.Children={map:X,forEach:function(j,L,ge){X(j,function(){L.apply(this,arguments)},ge)},count:function(j){var L=0;return X(j,function(){L++}),L},toArray:function(j){return X(j,function(L){return L})||[]},only:function(j){if(!D(j))throw Error("React.Children.only expected to receive a single React element child.");return j}},Ee.Component=N,Ee.Fragment=o,Ee.Profiler=c,Ee.PureComponent=F,Ee.StrictMode=d,Ee.Suspense=p,Ee.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ae,Ee.act=K,Ee.cloneElement=function(j,L,ge){if(j==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+j+".");var ke=R({},j.props),U=j.key,ne=j.ref,we=j._owner;if(L!=null){if(L.ref!==void 0&&(ne=L.ref,we=G.current),L.key!==void 0&&(U=""+L.key),j.type&&j.type.defaultProps)var oe=j.type.defaultProps;for(ve in L)le.call(L,ve)&&!de.hasOwnProperty(ve)&&(ke[ve]=L[ve]===void 0&&oe!==void 0?oe[ve]:L[ve])}var ve=arguments.length-2;if(ve===1)ke.children=ge;else if(1<ve){oe=Array(ve);for(var Ve=0;Ve<ve;Ve++)oe[Ve]=arguments[Ve+2];ke.children=oe}return{$$typeof:r,type:j.type,key:U,ref:ne,props:ke,_owner:we}},Ee.createContext=function(j){return j={$$typeof:m,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},j.Provider={$$typeof:h,_context:j},j.Consumer=j},Ee.createElement=Y,Ee.createFactory=function(j){var L=Y.bind(null,j);return L.type=j,L},Ee.createRef=function(){return{current:null}},Ee.forwardRef=function(j){return{$$typeof:g,render:j}},Ee.isValidElement=D,Ee.lazy=function(j){return{$$typeof:b,_payload:{_status:-1,_result:j},_init:fe}},Ee.memo=function(j,L){return{$$typeof:x,type:j,compare:L===void 0?null:L}},Ee.startTransition=function(j){var L=B.transition;B.transition={};try{j()}finally{B.transition=L}},Ee.unstable_act=K,Ee.useCallback=function(j,L){return Se.current.useCallback(j,L)},Ee.useContext=function(j){return Se.current.useContext(j)},Ee.useDebugValue=function(){},Ee.useDeferredValue=function(j){return Se.current.useDeferredValue(j)},Ee.useEffect=function(j,L){return Se.current.useEffect(j,L)},Ee.useId=function(){return Se.current.useId()},Ee.useImperativeHandle=function(j,L,ge){return Se.current.useImperativeHandle(j,L,ge)},Ee.useInsertionEffect=function(j,L){return Se.current.useInsertionEffect(j,L)},Ee.useLayoutEffect=function(j,L){return Se.current.useLayoutEffect(j,L)},Ee.useMemo=function(j,L){return Se.current.useMemo(j,L)},Ee.useReducer=function(j,L,ge){return Se.current.useReducer(j,L,ge)},Ee.useRef=function(j){return Se.current.useRef(j)},Ee.useState=function(j){return Se.current.useState(j)},Ee.useSyncExternalStore=function(j,L,ge){return Se.current.useSyncExternalStore(j,L,ge)},Ee.useTransition=function(){return Se.current.useTransition()},Ee.version="18.3.1",Ee}var Qd;function $o(){return Qd||(Qd=1,go.exports=ym()),go.exports}var Xd;function xm(){if(Xd)return zi;Xd=1;var r=$o(),s=Symbol.for("react.element"),o=Symbol.for("react.fragment"),d=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,h={key:!0,ref:!0,__self:!0,__source:!0};function m(g,p,x){var b,S={},E=null,M=null;x!==void 0&&(E=""+x),p.key!==void 0&&(E=""+p.key),p.ref!==void 0&&(M=p.ref);for(b in p)d.call(p,b)&&!h.hasOwnProperty(b)&&(S[b]=p[b]);if(g&&g.defaultProps)for(b in p=g.defaultProps,p)S[b]===void 0&&(S[b]=p[b]);return{$$typeof:s,type:g,key:E,ref:M,props:S,_owner:c.current}}return zi.Fragment=o,zi.jsx=m,zi.jsxs=m,zi}var Yd;function Sm(){return Yd||(Yd=1,mo.exports=xm()),mo.exports}var l=Sm(),v=$o();const Wf=Of(v);var Jl={},wo={exports:{}},xt={},vo={exports:{}},yo={};var Jd;function km(){return Jd||(Jd=1,(function(r){function s(B,ae){var K=B.length;B.push(ae);e:for(;0<K;){var j=K-1>>>1,L=B[j];if(0<c(L,ae))B[j]=ae,B[K]=L,K=j;else break e}}function o(B){return B.length===0?null:B[0]}function d(B){if(B.length===0)return null;var ae=B[0],K=B.pop();if(K!==ae){B[0]=K;e:for(var j=0,L=B.length,ge=L>>>1;j<ge;){var ke=2*(j+1)-1,U=B[ke],ne=ke+1,we=B[ne];if(0>c(U,K))ne<L&&0>c(we,U)?(B[j]=we,B[ne]=K,j=ne):(B[j]=U,B[ke]=K,j=ke);else if(ne<L&&0>c(we,K))B[j]=we,B[ne]=K,j=ne;else break e}}return ae}function c(B,ae){var K=B.sortIndex-ae.sortIndex;return K!==0?K:B.id-ae.id}if(typeof performance=="object"&&typeof performance.now=="function"){var h=performance;r.unstable_now=function(){return h.now()}}else{var m=Date,g=m.now();r.unstable_now=function(){return m.now()-g}}var p=[],x=[],b=1,S=null,E=3,M=!1,R=!1,I=!1,N=typeof setTimeout=="function"?setTimeout:null,$=typeof clearTimeout=="function"?clearTimeout:null,F=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(B){for(var ae=o(x);ae!==null;){if(ae.callback===null)d(x);else if(ae.startTime<=B)d(x),ae.sortIndex=ae.expirationTime,s(p,ae);else break;ae=o(x)}}function ue(B){if(I=!1,T(B),!R)if(o(p)!==null)R=!0,fe(le);else{var ae=o(x);ae!==null&&Se(ue,ae.startTime-B)}}function le(B,ae){R=!1,I&&(I=!1,$(Y),Y=-1),M=!0;var K=E;try{for(T(ae),S=o(p);S!==null&&(!(S.expirationTime>ae)||B&&!ce());){var j=S.callback;if(typeof j=="function"){S.callback=null,E=S.priorityLevel;var L=j(S.expirationTime<=ae);ae=r.unstable_now(),typeof L=="function"?S.callback=L:S===o(p)&&d(p),T(ae)}else d(p);S=o(p)}if(S!==null)var ge=!0;else{var ke=o(x);ke!==null&&Se(ue,ke.startTime-ae),ge=!1}return ge}finally{S=null,E=K,M=!1}}var G=!1,de=null,Y=-1,je=5,D=-1;function ce(){return!(r.unstable_now()-D<je)}function A(){if(de!==null){var B=r.unstable_now();D=B;var ae=!0;try{ae=de(!0,B)}finally{ae?Z():(G=!1,de=null)}}else G=!1}var Z;if(typeof F=="function")Z=function(){F(A)};else if(typeof MessageChannel<"u"){var be=new MessageChannel,X=be.port2;be.port1.onmessage=A,Z=function(){X.postMessage(null)}}else Z=function(){N(A,0)};function fe(B){de=B,G||(G=!0,Z())}function Se(B,ae){Y=N(function(){B(r.unstable_now())},ae)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(B){B.callback=null},r.unstable_continueExecution=function(){R||M||(R=!0,fe(le))},r.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):je=0<B?Math.floor(1e3/B):5},r.unstable_getCurrentPriorityLevel=function(){return E},r.unstable_getFirstCallbackNode=function(){return o(p)},r.unstable_next=function(B){switch(E){case 1:case 2:case 3:var ae=3;break;default:ae=E}var K=E;E=ae;try{return B()}finally{E=K}},r.unstable_pauseExecution=function(){},r.unstable_requestPaint=function(){},r.unstable_runWithPriority=function(B,ae){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var K=E;E=B;try{return ae()}finally{E=K}},r.unstable_scheduleCallback=function(B,ae,K){var j=r.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?j+K:j):K=j,B){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=K+L,B={id:b++,callback:ae,priorityLevel:B,startTime:K,expirationTime:L,sortIndex:-1},K>j?(B.sortIndex=K,s(x,B),o(p)===null&&B===o(x)&&(I?($(Y),Y=-1):I=!0,Se(ue,K-j))):(B.sortIndex=L,s(p,B),R||M||(R=!0,fe(le))),B},r.unstable_shouldYield=ce,r.unstable_wrapCallback=function(B){var ae=E;return function(){var K=E;E=ae;try{return B.apply(this,arguments)}finally{E=K}}}})(yo)),yo}var ef;function bm(){return ef||(ef=1,vo.exports=km()),vo.exports}var tf;function jm(){if(tf)return xt;tf=1;var r=$o(),s=bm();function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var d=new Set,c={};function h(e,t){m(e,t),m(e+"Capture",t)}function m(e,t){for(c[e]=t,e=0;e<t.length;e++)d.add(t[e])}var g=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,x=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,b={},S={};function E(e){return p.call(S,e)?!0:p.call(b,e)?!1:x.test(e)?S[e]=!0:(b[e]=!0,!1)}function M(e,t,n,i){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function R(e,t,n,i){if(t===null||typeof t>"u"||M(e,t,n,i))return!0;if(i)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function I(e,t,n,i,a,u,f){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=u,this.removeEmptyString=f}var N={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){N[e]=new I(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];N[t]=new I(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){N[e]=new I(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){N[e]=new I(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){N[e]=new I(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){N[e]=new I(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){N[e]=new I(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){N[e]=new I(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){N[e]=new I(e,5,!1,e.toLowerCase(),null,!1,!1)});var $=/[\-:]([a-z])/g;function F(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace($,F);N[t]=new I(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace($,F);N[t]=new I(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace($,F);N[t]=new I(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){N[e]=new I(e,1,!1,e.toLowerCase(),null,!1,!1)}),N.xlinkHref=new I("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){N[e]=new I(e,1,!1,e.toLowerCase(),null,!0,!0)});function T(e,t,n,i){var a=N.hasOwnProperty(t)?N[t]:null;(a!==null?a.type!==0:i||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(R(t,n,a,i)&&(n=null),i||a===null?E(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):a.mustUseProperty?e[a.propertyName]=n===null?a.type===3?!1:"":n:(t=a.attributeName,i=a.attributeNamespace,n===null?e.removeAttribute(t):(a=a.type,n=a===3||a===4&&n===!0?"":""+n,i?e.setAttributeNS(i,t,n):e.setAttribute(t,n))))}var ue=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,le=Symbol.for("react.element"),G=Symbol.for("react.portal"),de=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),je=Symbol.for("react.profiler"),D=Symbol.for("react.provider"),ce=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),be=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),fe=Symbol.for("react.lazy"),Se=Symbol.for("react.offscreen"),B=Symbol.iterator;function ae(e){return e===null||typeof e!="object"?null:(e=B&&e[B]||e["@@iterator"],typeof e=="function"?e:null)}var K=Object.assign,j;function L(e){if(j===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);j=t&&t[1]||""}return`
|
|
2
|
-
`+j+e}var ge=!1;function ke(e,t){if(!e||ge)return"";ge=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(_){var i=_}Reflect.construct(e,[],t)}else{try{t.call()}catch(_){i=_}e.call(t.prototype)}else{try{throw Error()}catch(_){i=_}e()}}catch(_){if(_&&i&&typeof _.stack=="string"){for(var a=_.stack.split(`
|
|
3
|
-
`),u=i.stack.split(`
|
|
4
|
-
`),f=a.length-1,w=u.length-1;1<=f&&0<=w&&a[f]!==u[w];)w--;for(;1<=f&&0<=w;f--,w--)if(a[f]!==u[w]){if(f!==1||w!==1)do if(f--,w--,0>w||a[f]!==u[w]){var y=`
|
|
5
|
-
`+a[f].replace(" at new "," at ");return e.displayName&&y.includes("<anonymous>")&&(y=y.replace("<anonymous>",e.displayName)),y}while(1<=f&&0<=w);break}}}finally{ge=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?L(e):""}function U(e){switch(e.tag){case 5:return L(e.type);case 16:return L("Lazy");case 13:return L("Suspense");case 19:return L("SuspenseList");case 0:case 2:case 15:return e=ke(e.type,!1),e;case 11:return e=ke(e.type.render,!1),e;case 1:return e=ke(e.type,!0),e;default:return""}}function ne(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case de:return"Fragment";case G:return"Portal";case je:return"Profiler";case Y:return"StrictMode";case Z:return"Suspense";case be:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ce:return(e.displayName||"Context")+".Consumer";case D:return(e._context.displayName||"Context")+".Provider";case A:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case X:return t=e.displayName||null,t!==null?t:ne(e.type)||"Memo";case fe:t=e._payload,e=e._init;try{return ne(e(t))}catch{}}return null}function we(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ne(t);case 8:return t===Y?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function oe(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ve(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ve(e){var t=ve(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var a=n.get,u=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(f){i=""+f,u.call(this,f)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(f){i=""+f},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Kn(e){e._valueTracker||(e._valueTracker=Ve(e))}function q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=ve(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function ye(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ue(e,t){var n=t.checked;return K({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function kt(e,t){var n=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;n=oe(t.value!=null?t.value:n),e._wrapperState={initialChecked:i,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function We(e,t){t=t.checked,t!=null&&T(e,"checked",t,!1)}function Qt(e,t){We(e,t);var n=oe(t.value),i=t.type;if(n!=null)i==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?bs(e,t.type,n):t.hasOwnProperty("defaultValue")&&bs(e,t.type,oe(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function iu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function bs(e,t,n){(t!=="number"||ye(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Kr=Array.isArray;function pr(e,t,n,i){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&i&&(e[n].defaultSelected=!0)}else{for(n=""+oe(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,i&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function js(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(o(91));return K({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function lu(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(o(92));if(Kr(n)){if(1<n.length)throw Error(o(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:oe(n)}}function su(e,t){var n=oe(t.value),i=oe(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),i!=null&&(e.defaultValue=""+i)}function au(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function ou(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Es(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?ou(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Hi,uu=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,i,a){MSApp.execUnsafeLocalFunction(function(){return e(t,n,i,a)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Hi=Hi||document.createElement("div"),Hi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Hi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Zr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var qr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},bh=["Webkit","ms","Moz","O"];Object.keys(qr).forEach(function(e){bh.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),qr[t]=qr[e]})});function cu(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||qr.hasOwnProperty(e)&&qr[e]?(""+t).trim():t+"px"}function du(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var i=n.indexOf("--")===0,a=cu(n,t[n],i);n==="float"&&(n="cssFloat"),i?e.setProperty(n,a):e[n]=a}}var jh=K({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ns(e,t){if(t){if(jh[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(o(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(o(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(t.style!=null&&typeof t.style!="object")throw Error(o(62))}}function Cs(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Rs=null;function Ps(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _s=null,mr=null,gr=null;function fu(e){if(e=wi(e)){if(typeof _s!="function")throw Error(o(280));var t=e.stateNode;t&&(t=pl(t),_s(e.stateNode,e.type,t))}}function hu(e){mr?gr?gr.push(e):gr=[e]:mr=e}function pu(){if(mr){var e=mr,t=gr;if(gr=mr=null,fu(e),t)for(e=0;e<t.length;e++)fu(t[e])}}function mu(e,t){return e(t)}function gu(){}var As=!1;function wu(e,t,n){if(As)return e(t,n);As=!0;try{return mu(e,t,n)}finally{As=!1,(mr!==null||gr!==null)&&(gu(),pu())}}function Qr(e,t){var n=e.stateNode;if(n===null)return null;var i=pl(n);if(i===null)return null;n=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(o(231,t,typeof n));return n}var zs=!1;if(g)try{var Xr={};Object.defineProperty(Xr,"passive",{get:function(){zs=!0}}),window.addEventListener("test",Xr,Xr),window.removeEventListener("test",Xr,Xr)}catch{zs=!1}function Eh(e,t,n,i,a,u,f,w,y){var _=Array.prototype.slice.call(arguments,3);try{t.apply(n,_)}catch(W){this.onError(W)}}var Yr=!1,Gi=null,Ki=!1,Is=null,Nh={onError:function(e){Yr=!0,Gi=e}};function Ch(e,t,n,i,a,u,f,w,y){Yr=!1,Gi=null,Eh.apply(Nh,arguments)}function Rh(e,t,n,i,a,u,f,w,y){if(Ch.apply(this,arguments),Yr){if(Yr){var _=Gi;Yr=!1,Gi=null}else throw Error(o(198));Ki||(Ki=!0,Is=_)}}function Zn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function vu(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function yu(e){if(Zn(e)!==e)throw Error(o(188))}function Ph(e){var t=e.alternate;if(!t){if(t=Zn(e),t===null)throw Error(o(188));return t!==e?null:e}for(var n=e,i=t;;){var a=n.return;if(a===null)break;var u=a.alternate;if(u===null){if(i=a.return,i!==null){n=i;continue}break}if(a.child===u.child){for(u=a.child;u;){if(u===n)return yu(a),e;if(u===i)return yu(a),t;u=u.sibling}throw Error(o(188))}if(n.return!==i.return)n=a,i=u;else{for(var f=!1,w=a.child;w;){if(w===n){f=!0,n=a,i=u;break}if(w===i){f=!0,i=a,n=u;break}w=w.sibling}if(!f){for(w=u.child;w;){if(w===n){f=!0,n=u,i=a;break}if(w===i){f=!0,i=u,n=a;break}w=w.sibling}if(!f)throw Error(o(189))}}if(n.alternate!==i)throw Error(o(190))}if(n.tag!==3)throw Error(o(188));return n.stateNode.current===n?e:t}function xu(e){return e=Ph(e),e!==null?Su(e):null}function Su(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Su(e);if(t!==null)return t;e=e.sibling}return null}var ku=s.unstable_scheduleCallback,bu=s.unstable_cancelCallback,_h=s.unstable_shouldYield,Ah=s.unstable_requestPaint,Ge=s.unstable_now,zh=s.unstable_getCurrentPriorityLevel,Ds=s.unstable_ImmediatePriority,ju=s.unstable_UserBlockingPriority,Zi=s.unstable_NormalPriority,Ih=s.unstable_LowPriority,Eu=s.unstable_IdlePriority,qi=null,Xt=null;function Dh(e){if(Xt&&typeof Xt.onCommitFiberRoot=="function")try{Xt.onCommitFiberRoot(qi,e,void 0,(e.current.flags&128)===128)}catch{}}var Ft=Math.clz32?Math.clz32:Th,Lh=Math.log,Mh=Math.LN2;function Th(e){return e>>>=0,e===0?32:31-(Lh(e)/Mh|0)|0}var Qi=64,Xi=4194304;function Jr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Yi(e,t){var n=e.pendingLanes;if(n===0)return 0;var i=0,a=e.suspendedLanes,u=e.pingedLanes,f=n&268435455;if(f!==0){var w=f&~a;w!==0?i=Jr(w):(u&=f,u!==0&&(i=Jr(u)))}else f=n&~a,f!==0?i=Jr(f):u!==0&&(i=Jr(u));if(i===0)return 0;if(t!==0&&t!==i&&(t&a)===0&&(a=i&-i,u=t&-t,a>=u||a===16&&(u&4194240)!==0))return t;if((i&4)!==0&&(i|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0<t;)n=31-Ft(t),a=1<<n,i|=e[n],t&=~a;return i}function Oh(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Wh(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,a=e.expirationTimes,u=e.pendingLanes;0<u;){var f=31-Ft(u),w=1<<f,y=a[f];y===-1?((w&n)===0||(w&i)!==0)&&(a[f]=Oh(w,t)):y<=t&&(e.expiredLanes|=w),u&=~w}}function Ls(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Nu(){var e=Qi;return Qi<<=1,(Qi&4194240)===0&&(Qi=64),e}function Ms(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ei(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ft(t),e[t]=n}function Fh(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0<n;){var a=31-Ft(n),u=1<<a;t[a]=0,i[a]=-1,e[a]=-1,n&=~u}}function Ts(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var i=31-Ft(n),a=1<<i;a&t|e[i]&t&&(e[i]|=t),n&=~a}}var _e=0;function Cu(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Ru,Os,Pu,_u,Au,Ws=!1,Ji=[],bn=null,jn=null,En=null,ti=new Map,ni=new Map,Nn=[],Bh="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function zu(e,t){switch(e){case"focusin":case"focusout":bn=null;break;case"dragenter":case"dragleave":jn=null;break;case"mouseover":case"mouseout":En=null;break;case"pointerover":case"pointerout":ti.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ni.delete(t.pointerId)}}function ri(e,t,n,i,a,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:n,eventSystemFlags:i,nativeEvent:u,targetContainers:[a]},t!==null&&(t=wi(t),t!==null&&Os(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Vh(e,t,n,i,a){switch(t){case"focusin":return bn=ri(bn,e,t,n,i,a),!0;case"dragenter":return jn=ri(jn,e,t,n,i,a),!0;case"mouseover":return En=ri(En,e,t,n,i,a),!0;case"pointerover":var u=a.pointerId;return ti.set(u,ri(ti.get(u)||null,e,t,n,i,a)),!0;case"gotpointercapture":return u=a.pointerId,ni.set(u,ri(ni.get(u)||null,e,t,n,i,a)),!0}return!1}function Iu(e){var t=qn(e.target);if(t!==null){var n=Zn(t);if(n!==null){if(t=n.tag,t===13){if(t=vu(n),t!==null){e.blockedOn=t,Au(e.priority,function(){Pu(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function el(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Bs(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var i=new n.constructor(n.type,n);Rs=i,n.target.dispatchEvent(i),Rs=null}else return t=wi(n),t!==null&&Os(t),e.blockedOn=n,!1;t.shift()}return!0}function Du(e,t,n){el(e)&&n.delete(t)}function Uh(){Ws=!1,bn!==null&&el(bn)&&(bn=null),jn!==null&&el(jn)&&(jn=null),En!==null&&el(En)&&(En=null),ti.forEach(Du),ni.forEach(Du)}function ii(e,t){e.blockedOn===t&&(e.blockedOn=null,Ws||(Ws=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,Uh)))}function li(e){function t(a){return ii(a,e)}if(0<Ji.length){ii(Ji[0],e);for(var n=1;n<Ji.length;n++){var i=Ji[n];i.blockedOn===e&&(i.blockedOn=null)}}for(bn!==null&&ii(bn,e),jn!==null&&ii(jn,e),En!==null&&ii(En,e),ti.forEach(t),ni.forEach(t),n=0;n<Nn.length;n++)i=Nn[n],i.blockedOn===e&&(i.blockedOn=null);for(;0<Nn.length&&(n=Nn[0],n.blockedOn===null);)Iu(n),n.blockedOn===null&&Nn.shift()}var wr=ue.ReactCurrentBatchConfig,tl=!0;function $h(e,t,n,i){var a=_e,u=wr.transition;wr.transition=null;try{_e=1,Fs(e,t,n,i)}finally{_e=a,wr.transition=u}}function Hh(e,t,n,i){var a=_e,u=wr.transition;wr.transition=null;try{_e=4,Fs(e,t,n,i)}finally{_e=a,wr.transition=u}}function Fs(e,t,n,i){if(tl){var a=Bs(e,t,n,i);if(a===null)ia(e,t,i,nl,n),zu(e,i);else if(Vh(a,e,t,n,i))i.stopPropagation();else if(zu(e,i),t&4&&-1<Bh.indexOf(e)){for(;a!==null;){var u=wi(a);if(u!==null&&Ru(u),u=Bs(e,t,n,i),u===null&&ia(e,t,i,nl,n),u===a)break;a=u}a!==null&&i.stopPropagation()}else ia(e,t,i,null,n)}}var nl=null;function Bs(e,t,n,i){if(nl=null,e=Ps(i),e=qn(e),e!==null)if(t=Zn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=vu(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return nl=e,null}function Lu(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(zh()){case Ds:return 1;case ju:return 4;case Zi:case Ih:return 16;case Eu:return 536870912;default:return 16}default:return 16}}var Cn=null,Vs=null,rl=null;function Mu(){if(rl)return rl;var e,t=Vs,n=t.length,i,a="value"in Cn?Cn.value:Cn.textContent,u=a.length;for(e=0;e<n&&t[e]===a[e];e++);var f=n-e;for(i=1;i<=f&&t[n-i]===a[u-i];i++);return rl=a.slice(e,1<i?1-i:void 0)}function il(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ll(){return!0}function Tu(){return!1}function bt(e){function t(n,i,a,u,f){this._reactName=n,this._targetInst=a,this.type=i,this.nativeEvent=u,this.target=f,this.currentTarget=null;for(var w in e)e.hasOwnProperty(w)&&(n=e[w],this[w]=n?n(u):u[w]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?ll:Tu,this.isPropagationStopped=Tu,this}return K(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ll)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ll)},persist:function(){},isPersistent:ll}),t}var vr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Us=bt(vr),si=K({},vr,{view:0,detail:0}),Gh=bt(si),$s,Hs,ai,sl=K({},si,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ks,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ai&&(ai&&e.type==="mousemove"?($s=e.screenX-ai.screenX,Hs=e.screenY-ai.screenY):Hs=$s=0,ai=e),$s)},movementY:function(e){return"movementY"in e?e.movementY:Hs}}),Ou=bt(sl),Kh=K({},sl,{dataTransfer:0}),Zh=bt(Kh),qh=K({},si,{relatedTarget:0}),Gs=bt(qh),Qh=K({},vr,{animationName:0,elapsedTime:0,pseudoElement:0}),Xh=bt(Qh),Yh=K({},vr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Jh=bt(Yh),ep=K({},vr,{data:0}),Wu=bt(ep),tp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},np={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},rp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ip(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=rp[e])?!!t[e]:!1}function Ks(){return ip}var lp=K({},si,{key:function(e){if(e.key){var t=tp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=il(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?np[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ks,charCode:function(e){return e.type==="keypress"?il(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?il(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),sp=bt(lp),ap=K({},sl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Fu=bt(ap),op=K({},si,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ks}),up=bt(op),cp=K({},vr,{propertyName:0,elapsedTime:0,pseudoElement:0}),dp=bt(cp),fp=K({},sl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),hp=bt(fp),pp=[9,13,27,32],Zs=g&&"CompositionEvent"in window,oi=null;g&&"documentMode"in document&&(oi=document.documentMode);var mp=g&&"TextEvent"in window&&!oi,Bu=g&&(!Zs||oi&&8<oi&&11>=oi),Vu=" ",Uu=!1;function $u(e,t){switch(e){case"keyup":return pp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var yr=!1;function gp(e,t){switch(e){case"compositionend":return Hu(t);case"keypress":return t.which!==32?null:(Uu=!0,Vu);case"textInput":return e=t.data,e===Vu&&Uu?null:e;default:return null}}function wp(e,t){if(yr)return e==="compositionend"||!Zs&&$u(e,t)?(e=Mu(),rl=Vs=Cn=null,yr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Bu&&t.locale!=="ko"?null:t.data;default:return null}}var vp={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Gu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!vp[e.type]:t==="textarea"}function Ku(e,t,n,i){hu(i),t=dl(t,"onChange"),0<t.length&&(n=new Us("onChange","change",null,n,i),e.push({event:n,listeners:t}))}var ui=null,ci=null;function yp(e){dc(e,0)}function al(e){var t=jr(e);if(q(t))return e}function xp(e,t){if(e==="change")return t}var Zu=!1;if(g){var qs;if(g){var Qs="oninput"in document;if(!Qs){var qu=document.createElement("div");qu.setAttribute("oninput","return;"),Qs=typeof qu.oninput=="function"}qs=Qs}else qs=!1;Zu=qs&&(!document.documentMode||9<document.documentMode)}function Qu(){ui&&(ui.detachEvent("onpropertychange",Xu),ci=ui=null)}function Xu(e){if(e.propertyName==="value"&&al(ci)){var t=[];Ku(t,ci,e,Ps(e)),wu(yp,t)}}function Sp(e,t,n){e==="focusin"?(Qu(),ui=t,ci=n,ui.attachEvent("onpropertychange",Xu)):e==="focusout"&&Qu()}function kp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return al(ci)}function bp(e,t){if(e==="click")return al(t)}function jp(e,t){if(e==="input"||e==="change")return al(t)}function Ep(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Bt=typeof Object.is=="function"?Object.is:Ep;function di(e,t){if(Bt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var a=n[i];if(!p.call(t,a)||!Bt(e[a],t[a]))return!1}return!0}function Yu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ju(e,t){var n=Yu(e);e=0;for(var i;n;){if(n.nodeType===3){if(i=e+n.textContent.length,e<=t&&i>=t)return{node:n,offset:t-e};e=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Yu(n)}}function ec(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ec(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function tc(){for(var e=window,t=ye();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ye(e.document)}return t}function Xs(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Np(e){var t=tc(),n=e.focusedElem,i=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ec(n.ownerDocument.documentElement,n)){if(i!==null&&Xs(n)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=n.textContent.length,u=Math.min(i.start,a);i=i.end===void 0?u:Math.min(i.end,a),!e.extend&&u>i&&(a=i,i=u,u=a),a=Ju(n,u);var f=Ju(n,i);a&&f&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==f.node||e.focusOffset!==f.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),u>i?(e.addRange(t),e.extend(f.node,f.offset)):(t.setEnd(f.node,f.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Cp=g&&"documentMode"in document&&11>=document.documentMode,xr=null,Ys=null,fi=null,Js=!1;function nc(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Js||xr==null||xr!==ye(i)||(i=xr,"selectionStart"in i&&Xs(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),fi&&di(fi,i)||(fi=i,i=dl(Ys,"onSelect"),0<i.length&&(t=new Us("onSelect","select",null,t,n),e.push({event:t,listeners:i}),t.target=xr)))}function ol(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Sr={animationend:ol("Animation","AnimationEnd"),animationiteration:ol("Animation","AnimationIteration"),animationstart:ol("Animation","AnimationStart"),transitionend:ol("Transition","TransitionEnd")},ea={},rc={};g&&(rc=document.createElement("div").style,"AnimationEvent"in window||(delete Sr.animationend.animation,delete Sr.animationiteration.animation,delete Sr.animationstart.animation),"TransitionEvent"in window||delete Sr.transitionend.transition);function ul(e){if(ea[e])return ea[e];if(!Sr[e])return e;var t=Sr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in rc)return ea[e]=t[n];return e}var ic=ul("animationend"),lc=ul("animationiteration"),sc=ul("animationstart"),ac=ul("transitionend"),oc=new Map,uc="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Rn(e,t){oc.set(e,t),h(t,[e])}for(var ta=0;ta<uc.length;ta++){var na=uc[ta],Rp=na.toLowerCase(),Pp=na[0].toUpperCase()+na.slice(1);Rn(Rp,"on"+Pp)}Rn(ic,"onAnimationEnd"),Rn(lc,"onAnimationIteration"),Rn(sc,"onAnimationStart"),Rn("dblclick","onDoubleClick"),Rn("focusin","onFocus"),Rn("focusout","onBlur"),Rn(ac,"onTransitionEnd"),m("onMouseEnter",["mouseout","mouseover"]),m("onMouseLeave",["mouseout","mouseover"]),m("onPointerEnter",["pointerout","pointerover"]),m("onPointerLeave",["pointerout","pointerover"]),h("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),h("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),h("onBeforeInput",["compositionend","keypress","textInput","paste"]),h("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),h("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),h("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),_p=new Set("cancel close invalid load scroll toggle".split(" ").concat(hi));function cc(e,t,n){var i=e.type||"unknown-event";e.currentTarget=n,Rh(i,t,void 0,e),e.currentTarget=null}function dc(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var i=e[n],a=i.event;i=i.listeners;e:{var u=void 0;if(t)for(var f=i.length-1;0<=f;f--){var w=i[f],y=w.instance,_=w.currentTarget;if(w=w.listener,y!==u&&a.isPropagationStopped())break e;cc(a,w,_),u=y}else for(f=0;f<i.length;f++){if(w=i[f],y=w.instance,_=w.currentTarget,w=w.listener,y!==u&&a.isPropagationStopped())break e;cc(a,w,_),u=y}}}if(Ki)throw e=Is,Ki=!1,Is=null,e}function Le(e,t){var n=t[ca];n===void 0&&(n=t[ca]=new Set);var i=e+"__bubble";n.has(i)||(fc(t,e,2,!1),n.add(i))}function ra(e,t,n){var i=0;t&&(i|=4),fc(n,e,i,t)}var cl="_reactListening"+Math.random().toString(36).slice(2);function pi(e){if(!e[cl]){e[cl]=!0,d.forEach(function(n){n!=="selectionchange"&&(_p.has(n)||ra(n,!1,e),ra(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[cl]||(t[cl]=!0,ra("selectionchange",!1,t))}}function fc(e,t,n,i){switch(Lu(t)){case 1:var a=$h;break;case 4:a=Hh;break;default:a=Fs}n=a.bind(null,t,n,e),a=void 0,!zs||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),i?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function ia(e,t,n,i,a){var u=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var f=i.tag;if(f===3||f===4){var w=i.stateNode.containerInfo;if(w===a||w.nodeType===8&&w.parentNode===a)break;if(f===4)for(f=i.return;f!==null;){var y=f.tag;if((y===3||y===4)&&(y=f.stateNode.containerInfo,y===a||y.nodeType===8&&y.parentNode===a))return;f=f.return}for(;w!==null;){if(f=qn(w),f===null)return;if(y=f.tag,y===5||y===6){i=u=f;continue e}w=w.parentNode}}i=i.return}wu(function(){var _=u,W=Ps(n),V=[];e:{var O=oc.get(e);if(O!==void 0){var Q=Us,ee=e;switch(e){case"keypress":if(il(n)===0)break e;case"keydown":case"keyup":Q=sp;break;case"focusin":ee="focus",Q=Gs;break;case"focusout":ee="blur",Q=Gs;break;case"beforeblur":case"afterblur":Q=Gs;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Q=Ou;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Q=Zh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Q=up;break;case ic:case lc:case sc:Q=Xh;break;case ac:Q=dp;break;case"scroll":Q=Gh;break;case"wheel":Q=hp;break;case"copy":case"cut":case"paste":Q=Jh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Q=Fu}var re=(t&4)!==0,Ke=!re&&e==="scroll",C=re?O!==null?O+"Capture":null:O;re=[];for(var k=_,P;k!==null;){P=k;var H=P.stateNode;if(P.tag===5&&H!==null&&(P=H,C!==null&&(H=Qr(k,C),H!=null&&re.push(mi(k,H,P)))),Ke)break;k=k.return}0<re.length&&(O=new Q(O,ee,null,n,W),V.push({event:O,listeners:re}))}}if((t&7)===0){e:{if(O=e==="mouseover"||e==="pointerover",Q=e==="mouseout"||e==="pointerout",O&&n!==Rs&&(ee=n.relatedTarget||n.fromElement)&&(qn(ee)||ee[on]))break e;if((Q||O)&&(O=W.window===W?W:(O=W.ownerDocument)?O.defaultView||O.parentWindow:window,Q?(ee=n.relatedTarget||n.toElement,Q=_,ee=ee?qn(ee):null,ee!==null&&(Ke=Zn(ee),ee!==Ke||ee.tag!==5&&ee.tag!==6)&&(ee=null)):(Q=null,ee=_),Q!==ee)){if(re=Ou,H="onMouseLeave",C="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(re=Fu,H="onPointerLeave",C="onPointerEnter",k="pointer"),Ke=Q==null?O:jr(Q),P=ee==null?O:jr(ee),O=new re(H,k+"leave",Q,n,W),O.target=Ke,O.relatedTarget=P,H=null,qn(W)===_&&(re=new re(C,k+"enter",ee,n,W),re.target=P,re.relatedTarget=Ke,H=re),Ke=H,Q&&ee)t:{for(re=Q,C=ee,k=0,P=re;P;P=kr(P))k++;for(P=0,H=C;H;H=kr(H))P++;for(;0<k-P;)re=kr(re),k--;for(;0<P-k;)C=kr(C),P--;for(;k--;){if(re===C||C!==null&&re===C.alternate)break t;re=kr(re),C=kr(C)}re=null}else re=null;Q!==null&&hc(V,O,Q,re,!1),ee!==null&&Ke!==null&&hc(V,Ke,ee,re,!0)}}e:{if(O=_?jr(_):window,Q=O.nodeName&&O.nodeName.toLowerCase(),Q==="select"||Q==="input"&&O.type==="file")var se=xp;else if(Gu(O))if(Zu)se=jp;else{se=kp;var he=Sp}else(Q=O.nodeName)&&Q.toLowerCase()==="input"&&(O.type==="checkbox"||O.type==="radio")&&(se=bp);if(se&&(se=se(e,_))){Ku(V,se,n,W);break e}he&&he(e,O,_),e==="focusout"&&(he=O._wrapperState)&&he.controlled&&O.type==="number"&&bs(O,"number",O.value)}switch(he=_?jr(_):window,e){case"focusin":(Gu(he)||he.contentEditable==="true")&&(xr=he,Ys=_,fi=null);break;case"focusout":fi=Ys=xr=null;break;case"mousedown":Js=!0;break;case"contextmenu":case"mouseup":case"dragend":Js=!1,nc(V,n,W);break;case"selectionchange":if(Cp)break;case"keydown":case"keyup":nc(V,n,W)}var pe;if(Zs)e:{switch(e){case"compositionstart":var xe="onCompositionStart";break e;case"compositionend":xe="onCompositionEnd";break e;case"compositionupdate":xe="onCompositionUpdate";break e}xe=void 0}else yr?$u(e,n)&&(xe="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(xe="onCompositionStart");xe&&(Bu&&n.locale!=="ko"&&(yr||xe!=="onCompositionStart"?xe==="onCompositionEnd"&&yr&&(pe=Mu()):(Cn=W,Vs="value"in Cn?Cn.value:Cn.textContent,yr=!0)),he=dl(_,xe),0<he.length&&(xe=new Wu(xe,e,null,n,W),V.push({event:xe,listeners:he}),pe?xe.data=pe:(pe=Hu(n),pe!==null&&(xe.data=pe)))),(pe=mp?gp(e,n):wp(e,n))&&(_=dl(_,"onBeforeInput"),0<_.length&&(W=new Wu("onBeforeInput","beforeinput",null,n,W),V.push({event:W,listeners:_}),W.data=pe))}dc(V,t)})}function mi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function dl(e,t){for(var n=t+"Capture",i=[];e!==null;){var a=e,u=a.stateNode;a.tag===5&&u!==null&&(a=u,u=Qr(e,n),u!=null&&i.unshift(mi(e,u,a)),u=Qr(e,t),u!=null&&i.push(mi(e,u,a))),e=e.return}return i}function kr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function hc(e,t,n,i,a){for(var u=t._reactName,f=[];n!==null&&n!==i;){var w=n,y=w.alternate,_=w.stateNode;if(y!==null&&y===i)break;w.tag===5&&_!==null&&(w=_,a?(y=Qr(n,u),y!=null&&f.unshift(mi(n,y,w))):a||(y=Qr(n,u),y!=null&&f.push(mi(n,y,w)))),n=n.return}f.length!==0&&e.push({event:t,listeners:f})}var Ap=/\r\n?/g,zp=/\u0000|\uFFFD/g;function pc(e){return(typeof e=="string"?e:""+e).replace(Ap,`
|
|
6
|
-
`).replace(zp,"")}function fl(e,t,n){if(t=pc(t),pc(e)!==t&&n)throw Error(o(425))}function hl(){}var la=null,sa=null;function aa(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var oa=typeof setTimeout=="function"?setTimeout:void 0,Ip=typeof clearTimeout=="function"?clearTimeout:void 0,mc=typeof Promise=="function"?Promise:void 0,Dp=typeof queueMicrotask=="function"?queueMicrotask:typeof mc<"u"?function(e){return mc.resolve(null).then(e).catch(Lp)}:oa;function Lp(e){setTimeout(function(){throw e})}function ua(e,t){var n=t,i=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(i===0){e.removeChild(a),li(t);return}i--}else n!=="$"&&n!=="$?"&&n!=="$!"||i++;n=a}while(n);li(t)}function Pn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function gc(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var br=Math.random().toString(36).slice(2),Yt="__reactFiber$"+br,gi="__reactProps$"+br,on="__reactContainer$"+br,ca="__reactEvents$"+br,Mp="__reactListeners$"+br,Tp="__reactHandles$"+br;function qn(e){var t=e[Yt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[on]||n[Yt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=gc(e);e!==null;){if(n=e[Yt])return n;e=gc(e)}return t}e=n,n=e.parentNode}return null}function wi(e){return e=e[Yt]||e[on],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function jr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(o(33))}function pl(e){return e[gi]||null}var da=[],Er=-1;function _n(e){return{current:e}}function Me(e){0>Er||(e.current=da[Er],da[Er]=null,Er--)}function De(e,t){Er++,da[Er]=e.current,e.current=t}var An={},st=_n(An),mt=_n(!1),Qn=An;function Nr(e,t){var n=e.type.contextTypes;if(!n)return An;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var a={},u;for(u in n)a[u]=t[u];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function gt(e){return e=e.childContextTypes,e!=null}function ml(){Me(mt),Me(st)}function wc(e,t,n){if(st.current!==An)throw Error(o(168));De(st,t),De(mt,n)}function vc(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return n;i=i.getChildContext();for(var a in i)if(!(a in t))throw Error(o(108,we(e)||"Unknown",a));return K({},n,i)}function gl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||An,Qn=st.current,De(st,e),De(mt,mt.current),!0}function yc(e,t,n){var i=e.stateNode;if(!i)throw Error(o(169));n?(e=vc(e,t,Qn),i.__reactInternalMemoizedMergedChildContext=e,Me(mt),Me(st),De(st,e)):Me(mt),De(mt,n)}var un=null,wl=!1,fa=!1;function xc(e){un===null?un=[e]:un.push(e)}function Op(e){wl=!0,xc(e)}function zn(){if(!fa&&un!==null){fa=!0;var e=0,t=_e;try{var n=un;for(_e=1;e<n.length;e++){var i=n[e];do i=i(!0);while(i!==null)}un=null,wl=!1}catch(a){throw un!==null&&(un=un.slice(e+1)),ku(Ds,zn),a}finally{_e=t,fa=!1}}return null}var Cr=[],Rr=0,vl=null,yl=0,Pt=[],_t=0,Xn=null,cn=1,dn="";function Yn(e,t){Cr[Rr++]=yl,Cr[Rr++]=vl,vl=e,yl=t}function Sc(e,t,n){Pt[_t++]=cn,Pt[_t++]=dn,Pt[_t++]=Xn,Xn=e;var i=cn;e=dn;var a=32-Ft(i)-1;i&=~(1<<a),n+=1;var u=32-Ft(t)+a;if(30<u){var f=a-a%5;u=(i&(1<<f)-1).toString(32),i>>=f,a-=f,cn=1<<32-Ft(t)+a|n<<a|i,dn=u+e}else cn=1<<u|n<<a|i,dn=e}function ha(e){e.return!==null&&(Yn(e,1),Sc(e,1,0))}function pa(e){for(;e===vl;)vl=Cr[--Rr],Cr[Rr]=null,yl=Cr[--Rr],Cr[Rr]=null;for(;e===Xn;)Xn=Pt[--_t],Pt[_t]=null,dn=Pt[--_t],Pt[_t]=null,cn=Pt[--_t],Pt[_t]=null}var jt=null,Et=null,Te=!1,Vt=null;function kc(e,t){var n=Dt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function bc(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,jt=e,Et=Pn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,jt=e,Et=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Xn!==null?{id:cn,overflow:dn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Dt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,jt=e,Et=null,!0):!1;default:return!1}}function ma(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ga(e){if(Te){var t=Et;if(t){var n=t;if(!bc(e,t)){if(ma(e))throw Error(o(418));t=Pn(n.nextSibling);var i=jt;t&&bc(e,t)?kc(i,n):(e.flags=e.flags&-4097|2,Te=!1,jt=e)}}else{if(ma(e))throw Error(o(418));e.flags=e.flags&-4097|2,Te=!1,jt=e}}}function jc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;jt=e}function xl(e){if(e!==jt)return!1;if(!Te)return jc(e),Te=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!aa(e.type,e.memoizedProps)),t&&(t=Et)){if(ma(e))throw Ec(),Error(o(418));for(;t;)kc(e,t),t=Pn(t.nextSibling)}if(jc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Et=Pn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Et=null}}else Et=jt?Pn(e.stateNode.nextSibling):null;return!0}function Ec(){for(var e=Et;e;)e=Pn(e.nextSibling)}function Pr(){Et=jt=null,Te=!1}function wa(e){Vt===null?Vt=[e]:Vt.push(e)}var Wp=ue.ReactCurrentBatchConfig;function vi(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(o(309));var i=n.stateNode}if(!i)throw Error(o(147,e));var a=i,u=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===u?t.ref:(t=function(f){var w=a.refs;f===null?delete w[u]:w[u]=f},t._stringRef=u,t)}if(typeof e!="string")throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function Sl(e,t){throw e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Nc(e){var t=e._init;return t(e._payload)}function Cc(e){function t(C,k){if(e){var P=C.deletions;P===null?(C.deletions=[k],C.flags|=16):P.push(k)}}function n(C,k){if(!e)return null;for(;k!==null;)t(C,k),k=k.sibling;return null}function i(C,k){for(C=new Map;k!==null;)k.key!==null?C.set(k.key,k):C.set(k.index,k),k=k.sibling;return C}function a(C,k){return C=Fn(C,k),C.index=0,C.sibling=null,C}function u(C,k,P){return C.index=P,e?(P=C.alternate,P!==null?(P=P.index,P<k?(C.flags|=2,k):P):(C.flags|=2,k)):(C.flags|=1048576,k)}function f(C){return e&&C.alternate===null&&(C.flags|=2),C}function w(C,k,P,H){return k===null||k.tag!==6?(k=oo(P,C.mode,H),k.return=C,k):(k=a(k,P),k.return=C,k)}function y(C,k,P,H){var se=P.type;return se===de?W(C,k,P.props.children,H,P.key):k!==null&&(k.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===fe&&Nc(se)===k.type)?(H=a(k,P.props),H.ref=vi(C,k,P),H.return=C,H):(H=Hl(P.type,P.key,P.props,null,C.mode,H),H.ref=vi(C,k,P),H.return=C,H)}function _(C,k,P,H){return k===null||k.tag!==4||k.stateNode.containerInfo!==P.containerInfo||k.stateNode.implementation!==P.implementation?(k=uo(P,C.mode,H),k.return=C,k):(k=a(k,P.children||[]),k.return=C,k)}function W(C,k,P,H,se){return k===null||k.tag!==7?(k=sr(P,C.mode,H,se),k.return=C,k):(k=a(k,P),k.return=C,k)}function V(C,k,P){if(typeof k=="string"&&k!==""||typeof k=="number")return k=oo(""+k,C.mode,P),k.return=C,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case le:return P=Hl(k.type,k.key,k.props,null,C.mode,P),P.ref=vi(C,null,k),P.return=C,P;case G:return k=uo(k,C.mode,P),k.return=C,k;case fe:var H=k._init;return V(C,H(k._payload),P)}if(Kr(k)||ae(k))return k=sr(k,C.mode,P,null),k.return=C,k;Sl(C,k)}return null}function O(C,k,P,H){var se=k!==null?k.key:null;if(typeof P=="string"&&P!==""||typeof P=="number")return se!==null?null:w(C,k,""+P,H);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case le:return P.key===se?y(C,k,P,H):null;case G:return P.key===se?_(C,k,P,H):null;case fe:return se=P._init,O(C,k,se(P._payload),H)}if(Kr(P)||ae(P))return se!==null?null:W(C,k,P,H,null);Sl(C,P)}return null}function Q(C,k,P,H,se){if(typeof H=="string"&&H!==""||typeof H=="number")return C=C.get(P)||null,w(k,C,""+H,se);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case le:return C=C.get(H.key===null?P:H.key)||null,y(k,C,H,se);case G:return C=C.get(H.key===null?P:H.key)||null,_(k,C,H,se);case fe:var he=H._init;return Q(C,k,P,he(H._payload),se)}if(Kr(H)||ae(H))return C=C.get(P)||null,W(k,C,H,se,null);Sl(k,H)}return null}function ee(C,k,P,H){for(var se=null,he=null,pe=k,xe=k=0,et=null;pe!==null&&xe<P.length;xe++){pe.index>xe?(et=pe,pe=null):et=pe.sibling;var Re=O(C,pe,P[xe],H);if(Re===null){pe===null&&(pe=et);break}e&&pe&&Re.alternate===null&&t(C,pe),k=u(Re,k,xe),he===null?se=Re:he.sibling=Re,he=Re,pe=et}if(xe===P.length)return n(C,pe),Te&&Yn(C,xe),se;if(pe===null){for(;xe<P.length;xe++)pe=V(C,P[xe],H),pe!==null&&(k=u(pe,k,xe),he===null?se=pe:he.sibling=pe,he=pe);return Te&&Yn(C,xe),se}for(pe=i(C,pe);xe<P.length;xe++)et=Q(pe,C,xe,P[xe],H),et!==null&&(e&&et.alternate!==null&&pe.delete(et.key===null?xe:et.key),k=u(et,k,xe),he===null?se=et:he.sibling=et,he=et);return e&&pe.forEach(function(Bn){return t(C,Bn)}),Te&&Yn(C,xe),se}function re(C,k,P,H){var se=ae(P);if(typeof se!="function")throw Error(o(150));if(P=se.call(P),P==null)throw Error(o(151));for(var he=se=null,pe=k,xe=k=0,et=null,Re=P.next();pe!==null&&!Re.done;xe++,Re=P.next()){pe.index>xe?(et=pe,pe=null):et=pe.sibling;var Bn=O(C,pe,Re.value,H);if(Bn===null){pe===null&&(pe=et);break}e&&pe&&Bn.alternate===null&&t(C,pe),k=u(Bn,k,xe),he===null?se=Bn:he.sibling=Bn,he=Bn,pe=et}if(Re.done)return n(C,pe),Te&&Yn(C,xe),se;if(pe===null){for(;!Re.done;xe++,Re=P.next())Re=V(C,Re.value,H),Re!==null&&(k=u(Re,k,xe),he===null?se=Re:he.sibling=Re,he=Re);return Te&&Yn(C,xe),se}for(pe=i(C,pe);!Re.done;xe++,Re=P.next())Re=Q(pe,C,xe,Re.value,H),Re!==null&&(e&&Re.alternate!==null&&pe.delete(Re.key===null?xe:Re.key),k=u(Re,k,xe),he===null?se=Re:he.sibling=Re,he=Re);return e&&pe.forEach(function(vm){return t(C,vm)}),Te&&Yn(C,xe),se}function Ke(C,k,P,H){if(typeof P=="object"&&P!==null&&P.type===de&&P.key===null&&(P=P.props.children),typeof P=="object"&&P!==null){switch(P.$$typeof){case le:e:{for(var se=P.key,he=k;he!==null;){if(he.key===se){if(se=P.type,se===de){if(he.tag===7){n(C,he.sibling),k=a(he,P.props.children),k.return=C,C=k;break e}}else if(he.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===fe&&Nc(se)===he.type){n(C,he.sibling),k=a(he,P.props),k.ref=vi(C,he,P),k.return=C,C=k;break e}n(C,he);break}else t(C,he);he=he.sibling}P.type===de?(k=sr(P.props.children,C.mode,H,P.key),k.return=C,C=k):(H=Hl(P.type,P.key,P.props,null,C.mode,H),H.ref=vi(C,k,P),H.return=C,C=H)}return f(C);case G:e:{for(he=P.key;k!==null;){if(k.key===he)if(k.tag===4&&k.stateNode.containerInfo===P.containerInfo&&k.stateNode.implementation===P.implementation){n(C,k.sibling),k=a(k,P.children||[]),k.return=C,C=k;break e}else{n(C,k);break}else t(C,k);k=k.sibling}k=uo(P,C.mode,H),k.return=C,C=k}return f(C);case fe:return he=P._init,Ke(C,k,he(P._payload),H)}if(Kr(P))return ee(C,k,P,H);if(ae(P))return re(C,k,P,H);Sl(C,P)}return typeof P=="string"&&P!==""||typeof P=="number"?(P=""+P,k!==null&&k.tag===6?(n(C,k.sibling),k=a(k,P),k.return=C,C=k):(n(C,k),k=oo(P,C.mode,H),k.return=C,C=k),f(C)):n(C,k)}return Ke}var _r=Cc(!0),Rc=Cc(!1),kl=_n(null),bl=null,Ar=null,va=null;function ya(){va=Ar=bl=null}function xa(e){var t=kl.current;Me(kl),e._currentValue=t}function Sa(e,t,n){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===n)break;e=e.return}}function zr(e,t){bl=e,va=Ar=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(wt=!0),e.firstContext=null)}function At(e){var t=e._currentValue;if(va!==e)if(e={context:e,memoizedValue:t,next:null},Ar===null){if(bl===null)throw Error(o(308));Ar=e,bl.dependencies={lanes:0,firstContext:e}}else Ar=Ar.next=e;return t}var Jn=null;function ka(e){Jn===null?Jn=[e]:Jn.push(e)}function Pc(e,t,n,i){var a=t.interleaved;return a===null?(n.next=n,ka(t)):(n.next=a.next,a.next=n),t.interleaved=n,fn(e,i)}function fn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var In=!1;function ba(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function _c(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function hn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Dn(e,t,n){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(Ce&2)!==0){var a=i.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),i.pending=t,fn(e,n)}return a=i.interleaved,a===null?(t.next=t,ka(i)):(t.next=a.next,a.next=t),i.interleaved=t,fn(e,n)}function jl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,Ts(e,n)}}function Ac(e,t){var n=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var a=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var f={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};u===null?a=u=f:u=u.next=f,n=n.next}while(n!==null);u===null?a=u=t:u=u.next=t}else a=u=t;n={baseState:i.baseState,firstBaseUpdate:a,lastBaseUpdate:u,shared:i.shared,effects:i.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function El(e,t,n,i){var a=e.updateQueue;In=!1;var u=a.firstBaseUpdate,f=a.lastBaseUpdate,w=a.shared.pending;if(w!==null){a.shared.pending=null;var y=w,_=y.next;y.next=null,f===null?u=_:f.next=_,f=y;var W=e.alternate;W!==null&&(W=W.updateQueue,w=W.lastBaseUpdate,w!==f&&(w===null?W.firstBaseUpdate=_:w.next=_,W.lastBaseUpdate=y))}if(u!==null){var V=a.baseState;f=0,W=_=y=null,w=u;do{var O=w.lane,Q=w.eventTime;if((i&O)===O){W!==null&&(W=W.next={eventTime:Q,lane:0,tag:w.tag,payload:w.payload,callback:w.callback,next:null});e:{var ee=e,re=w;switch(O=t,Q=n,re.tag){case 1:if(ee=re.payload,typeof ee=="function"){V=ee.call(Q,V,O);break e}V=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=re.payload,O=typeof ee=="function"?ee.call(Q,V,O):ee,O==null)break e;V=K({},V,O);break e;case 2:In=!0}}w.callback!==null&&w.lane!==0&&(e.flags|=64,O=a.effects,O===null?a.effects=[w]:O.push(w))}else Q={eventTime:Q,lane:O,tag:w.tag,payload:w.payload,callback:w.callback,next:null},W===null?(_=W=Q,y=V):W=W.next=Q,f|=O;if(w=w.next,w===null){if(w=a.shared.pending,w===null)break;O=w,w=O.next,O.next=null,a.lastBaseUpdate=O,a.shared.pending=null}}while(!0);if(W===null&&(y=V),a.baseState=y,a.firstBaseUpdate=_,a.lastBaseUpdate=W,t=a.shared.interleaved,t!==null){a=t;do f|=a.lane,a=a.next;while(a!==t)}else u===null&&(a.shared.lanes=0);nr|=f,e.lanes=f,e.memoizedState=V}}function zc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=n,typeof a!="function")throw Error(o(191,a));a.call(i)}}}var yi={},Jt=_n(yi),xi=_n(yi),Si=_n(yi);function er(e){if(e===yi)throw Error(o(174));return e}function ja(e,t){switch(De(Si,t),De(xi,e),De(Jt,yi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Es(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Es(t,e)}Me(Jt),De(Jt,t)}function Ir(){Me(Jt),Me(xi),Me(Si)}function Ic(e){er(Si.current);var t=er(Jt.current),n=Es(t,e.type);t!==n&&(De(xi,e),De(Jt,n))}function Ea(e){xi.current===e&&(Me(Jt),Me(xi))}var Fe=_n(0);function Nl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Na=[];function Ca(){for(var e=0;e<Na.length;e++)Na[e]._workInProgressVersionPrimary=null;Na.length=0}var Cl=ue.ReactCurrentDispatcher,Ra=ue.ReactCurrentBatchConfig,tr=0,Be=null,Qe=null,Ye=null,Rl=!1,ki=!1,bi=0,Fp=0;function at(){throw Error(o(321))}function Pa(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Bt(e[n],t[n]))return!1;return!0}function _a(e,t,n,i,a,u){if(tr=u,Be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Cl.current=e===null||e.memoizedState===null?$p:Hp,e=n(i,a),ki){u=0;do{if(ki=!1,bi=0,25<=u)throw Error(o(301));u+=1,Ye=Qe=null,t.updateQueue=null,Cl.current=Gp,e=n(i,a)}while(ki)}if(Cl.current=Al,t=Qe!==null&&Qe.next!==null,tr=0,Ye=Qe=Be=null,Rl=!1,t)throw Error(o(300));return e}function Aa(){var e=bi!==0;return bi=0,e}function en(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ye===null?Be.memoizedState=Ye=e:Ye=Ye.next=e,Ye}function zt(){if(Qe===null){var e=Be.alternate;e=e!==null?e.memoizedState:null}else e=Qe.next;var t=Ye===null?Be.memoizedState:Ye.next;if(t!==null)Ye=t,Qe=e;else{if(e===null)throw Error(o(310));Qe=e,e={memoizedState:Qe.memoizedState,baseState:Qe.baseState,baseQueue:Qe.baseQueue,queue:Qe.queue,next:null},Ye===null?Be.memoizedState=Ye=e:Ye=Ye.next=e}return Ye}function ji(e,t){return typeof t=="function"?t(e):t}function za(e){var t=zt(),n=t.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=e;var i=Qe,a=i.baseQueue,u=n.pending;if(u!==null){if(a!==null){var f=a.next;a.next=u.next,u.next=f}i.baseQueue=a=u,n.pending=null}if(a!==null){u=a.next,i=i.baseState;var w=f=null,y=null,_=u;do{var W=_.lane;if((tr&W)===W)y!==null&&(y=y.next={lane:0,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null}),i=_.hasEagerState?_.eagerState:e(i,_.action);else{var V={lane:W,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null};y===null?(w=y=V,f=i):y=y.next=V,Be.lanes|=W,nr|=W}_=_.next}while(_!==null&&_!==u);y===null?f=i:y.next=w,Bt(i,t.memoizedState)||(wt=!0),t.memoizedState=i,t.baseState=f,t.baseQueue=y,n.lastRenderedState=i}if(e=n.interleaved,e!==null){a=e;do u=a.lane,Be.lanes|=u,nr|=u,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ia(e){var t=zt(),n=t.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=e;var i=n.dispatch,a=n.pending,u=t.memoizedState;if(a!==null){n.pending=null;var f=a=a.next;do u=e(u,f.action),f=f.next;while(f!==a);Bt(u,t.memoizedState)||(wt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),n.lastRenderedState=u}return[u,i]}function Dc(){}function Lc(e,t){var n=Be,i=zt(),a=t(),u=!Bt(i.memoizedState,a);if(u&&(i.memoizedState=a,wt=!0),i=i.queue,Da(Oc.bind(null,n,i,e),[e]),i.getSnapshot!==t||u||Ye!==null&&Ye.memoizedState.tag&1){if(n.flags|=2048,Ei(9,Tc.bind(null,n,i,a,t),void 0,null),Je===null)throw Error(o(349));(tr&30)!==0||Mc(n,t,a)}return a}function Mc(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Be.updateQueue,t===null?(t={lastEffect:null,stores:null},Be.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Tc(e,t,n,i){t.value=n,t.getSnapshot=i,Wc(t)&&Fc(e)}function Oc(e,t,n){return n(function(){Wc(t)&&Fc(e)})}function Wc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Bt(e,n)}catch{return!0}}function Fc(e){var t=fn(e,1);t!==null&&Gt(t,e,1,-1)}function Bc(e){var t=en();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ji,lastRenderedState:e},t.queue=e,e=e.dispatch=Up.bind(null,Be,e),[t.memoizedState,e]}function Ei(e,t,n,i){return e={tag:e,create:t,destroy:n,deps:i,next:null},t=Be.updateQueue,t===null?(t={lastEffect:null,stores:null},Be.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(i=n.next,n.next=e,e.next=i,t.lastEffect=e)),e}function Vc(){return zt().memoizedState}function Pl(e,t,n,i){var a=en();Be.flags|=e,a.memoizedState=Ei(1|t,n,void 0,i===void 0?null:i)}function _l(e,t,n,i){var a=zt();i=i===void 0?null:i;var u=void 0;if(Qe!==null){var f=Qe.memoizedState;if(u=f.destroy,i!==null&&Pa(i,f.deps)){a.memoizedState=Ei(t,n,u,i);return}}Be.flags|=e,a.memoizedState=Ei(1|t,n,u,i)}function Uc(e,t){return Pl(8390656,8,e,t)}function Da(e,t){return _l(2048,8,e,t)}function $c(e,t){return _l(4,2,e,t)}function Hc(e,t){return _l(4,4,e,t)}function Gc(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Kc(e,t,n){return n=n!=null?n.concat([e]):null,_l(4,4,Gc.bind(null,t,e),n)}function La(){}function Zc(e,t){var n=zt();t=t===void 0?null:t;var i=n.memoizedState;return i!==null&&t!==null&&Pa(t,i[1])?i[0]:(n.memoizedState=[e,t],e)}function qc(e,t){var n=zt();t=t===void 0?null:t;var i=n.memoizedState;return i!==null&&t!==null&&Pa(t,i[1])?i[0]:(e=e(),n.memoizedState=[e,t],e)}function Qc(e,t,n){return(tr&21)===0?(e.baseState&&(e.baseState=!1,wt=!0),e.memoizedState=n):(Bt(n,t)||(n=Nu(),Be.lanes|=n,nr|=n,e.baseState=!0),t)}function Bp(e,t){var n=_e;_e=n!==0&&4>n?n:4,e(!0);var i=Ra.transition;Ra.transition={};try{e(!1),t()}finally{_e=n,Ra.transition=i}}function Xc(){return zt().memoizedState}function Vp(e,t,n){var i=On(e);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},Yc(e))Jc(t,n);else if(n=Pc(e,t,n,i),n!==null){var a=ft();Gt(n,e,i,a),ed(n,t,i)}}function Up(e,t,n){var i=On(e),a={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(Yc(e))Jc(t,a);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var f=t.lastRenderedState,w=u(f,n);if(a.hasEagerState=!0,a.eagerState=w,Bt(w,f)){var y=t.interleaved;y===null?(a.next=a,ka(t)):(a.next=y.next,y.next=a),t.interleaved=a;return}}catch{}n=Pc(e,t,a,i),n!==null&&(a=ft(),Gt(n,e,i,a),ed(n,t,i))}}function Yc(e){var t=e.alternate;return e===Be||t!==null&&t===Be}function Jc(e,t){ki=Rl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ed(e,t,n){if((n&4194240)!==0){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,Ts(e,n)}}var Al={readContext:At,useCallback:at,useContext:at,useEffect:at,useImperativeHandle:at,useInsertionEffect:at,useLayoutEffect:at,useMemo:at,useReducer:at,useRef:at,useState:at,useDebugValue:at,useDeferredValue:at,useTransition:at,useMutableSource:at,useSyncExternalStore:at,useId:at,unstable_isNewReconciler:!1},$p={readContext:At,useCallback:function(e,t){return en().memoizedState=[e,t===void 0?null:t],e},useContext:At,useEffect:Uc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Pl(4194308,4,Gc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Pl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Pl(4,2,e,t)},useMemo:function(e,t){var n=en();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var i=en();return t=n!==void 0?n(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=Vp.bind(null,Be,e),[i.memoizedState,e]},useRef:function(e){var t=en();return e={current:e},t.memoizedState=e},useState:Bc,useDebugValue:La,useDeferredValue:function(e){return en().memoizedState=e},useTransition:function(){var e=Bc(!1),t=e[0];return e=Bp.bind(null,e[1]),en().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=Be,a=en();if(Te){if(n===void 0)throw Error(o(407));n=n()}else{if(n=t(),Je===null)throw Error(o(349));(tr&30)!==0||Mc(i,t,n)}a.memoizedState=n;var u={value:n,getSnapshot:t};return a.queue=u,Uc(Oc.bind(null,i,u,e),[e]),i.flags|=2048,Ei(9,Tc.bind(null,i,u,n,t),void 0,null),n},useId:function(){var e=en(),t=Je.identifierPrefix;if(Te){var n=dn,i=cn;n=(i&~(1<<32-Ft(i)-1)).toString(32)+n,t=":"+t+"R"+n,n=bi++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Fp++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Hp={readContext:At,useCallback:Zc,useContext:At,useEffect:Da,useImperativeHandle:Kc,useInsertionEffect:$c,useLayoutEffect:Hc,useMemo:qc,useReducer:za,useRef:Vc,useState:function(){return za(ji)},useDebugValue:La,useDeferredValue:function(e){var t=zt();return Qc(t,Qe.memoizedState,e)},useTransition:function(){var e=za(ji)[0],t=zt().memoizedState;return[e,t]},useMutableSource:Dc,useSyncExternalStore:Lc,useId:Xc,unstable_isNewReconciler:!1},Gp={readContext:At,useCallback:Zc,useContext:At,useEffect:Da,useImperativeHandle:Kc,useInsertionEffect:$c,useLayoutEffect:Hc,useMemo:qc,useReducer:Ia,useRef:Vc,useState:function(){return Ia(ji)},useDebugValue:La,useDeferredValue:function(e){var t=zt();return Qe===null?t.memoizedState=e:Qc(t,Qe.memoizedState,e)},useTransition:function(){var e=Ia(ji)[0],t=zt().memoizedState;return[e,t]},useMutableSource:Dc,useSyncExternalStore:Lc,useId:Xc,unstable_isNewReconciler:!1};function Ut(e,t){if(e&&e.defaultProps){t=K({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ma(e,t,n,i){t=e.memoizedState,n=n(i,t),n=n==null?t:K({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var zl={isMounted:function(e){return(e=e._reactInternals)?Zn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var i=ft(),a=On(e),u=hn(i,a);u.payload=t,n!=null&&(u.callback=n),t=Dn(e,u,a),t!==null&&(Gt(t,e,a,i),jl(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var i=ft(),a=On(e),u=hn(i,a);u.tag=1,u.payload=t,n!=null&&(u.callback=n),t=Dn(e,u,a),t!==null&&(Gt(t,e,a,i),jl(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ft(),i=On(e),a=hn(n,i);a.tag=2,t!=null&&(a.callback=t),t=Dn(e,a,i),t!==null&&(Gt(t,e,i,n),jl(t,e,i))}};function td(e,t,n,i,a,u,f){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,u,f):t.prototype&&t.prototype.isPureReactComponent?!di(n,i)||!di(a,u):!0}function nd(e,t,n){var i=!1,a=An,u=t.contextType;return typeof u=="object"&&u!==null?u=At(u):(a=gt(t)?Qn:st.current,i=t.contextTypes,u=(i=i!=null)?Nr(e,a):An),t=new t(n,u),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=zl,e.stateNode=t,t._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=u),t}function rd(e,t,n,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==e&&zl.enqueueReplaceState(t,t.state,null)}function Ta(e,t,n,i){var a=e.stateNode;a.props=n,a.state=e.memoizedState,a.refs={},ba(e);var u=t.contextType;typeof u=="object"&&u!==null?a.context=At(u):(u=gt(t)?Qn:st.current,a.context=Nr(e,u)),a.state=e.memoizedState,u=t.getDerivedStateFromProps,typeof u=="function"&&(Ma(e,t,u,n),a.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(t=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),t!==a.state&&zl.enqueueReplaceState(a,a.state,null),El(e,n,a,i),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function Dr(e,t){try{var n="",i=t;do n+=U(i),i=i.return;while(i);var a=n}catch(u){a=`
|
|
7
|
-
Error generating stack: `+u.message+`
|
|
8
|
-
`+u.stack}return{value:e,source:t,stack:a,digest:null}}function Oa(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Wa(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Kp=typeof WeakMap=="function"?WeakMap:Map;function id(e,t,n){n=hn(-1,n),n.tag=3,n.payload={element:null};var i=t.value;return n.callback=function(){Wl||(Wl=!0,eo=i),Wa(e,t)},n}function ld(e,t,n){n=hn(-1,n),n.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var a=t.value;n.payload=function(){return i(a)},n.callback=function(){Wa(e,t)}}var u=e.stateNode;return u!==null&&typeof u.componentDidCatch=="function"&&(n.callback=function(){Wa(e,t),typeof i!="function"&&(Mn===null?Mn=new Set([this]):Mn.add(this));var f=t.stack;this.componentDidCatch(t.value,{componentStack:f!==null?f:""})}),n}function sd(e,t,n){var i=e.pingCache;if(i===null){i=e.pingCache=new Kp;var a=new Set;i.set(t,a)}else a=i.get(t),a===void 0&&(a=new Set,i.set(t,a));a.has(n)||(a.add(n),e=am.bind(null,e,t,n),t.then(e,e))}function ad(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function od(e,t,n,i,a){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=hn(-1,1),t.tag=2,Dn(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=a,e)}var Zp=ue.ReactCurrentOwner,wt=!1;function dt(e,t,n,i){t.child=e===null?Rc(t,null,n,i):_r(t,e.child,n,i)}function ud(e,t,n,i,a){n=n.render;var u=t.ref;return zr(t,a),i=_a(e,t,n,i,u,a),n=Aa(),e!==null&&!wt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,pn(e,t,a)):(Te&&n&&ha(t),t.flags|=1,dt(e,t,i,a),t.child)}function cd(e,t,n,i,a){if(e===null){var u=n.type;return typeof u=="function"&&!ao(u)&&u.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=u,dd(e,t,u,i,a)):(e=Hl(n.type,null,i,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,(e.lanes&a)===0){var f=u.memoizedProps;if(n=n.compare,n=n!==null?n:di,n(f,i)&&e.ref===t.ref)return pn(e,t,a)}return t.flags|=1,e=Fn(u,i),e.ref=t.ref,e.return=t,t.child=e}function dd(e,t,n,i,a){if(e!==null){var u=e.memoizedProps;if(di(u,i)&&e.ref===t.ref)if(wt=!1,t.pendingProps=i=u,(e.lanes&a)!==0)(e.flags&131072)!==0&&(wt=!0);else return t.lanes=e.lanes,pn(e,t,a)}return Fa(e,t,n,i,a)}function fd(e,t,n){var i=t.pendingProps,a=i.children,u=e!==null?e.memoizedState:null;if(i.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},De(Mr,Nt),Nt|=n;else{if((n&1073741824)===0)return e=u!==null?u.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,De(Mr,Nt),Nt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=u!==null?u.baseLanes:n,De(Mr,Nt),Nt|=i}else u!==null?(i=u.baseLanes|n,t.memoizedState=null):i=n,De(Mr,Nt),Nt|=i;return dt(e,t,a,n),t.child}function hd(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Fa(e,t,n,i,a){var u=gt(n)?Qn:st.current;return u=Nr(t,u),zr(t,a),n=_a(e,t,n,i,u,a),i=Aa(),e!==null&&!wt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,pn(e,t,a)):(Te&&i&&ha(t),t.flags|=1,dt(e,t,n,a),t.child)}function pd(e,t,n,i,a){if(gt(n)){var u=!0;gl(t)}else u=!1;if(zr(t,a),t.stateNode===null)Dl(e,t),nd(t,n,i),Ta(t,n,i,a),i=!0;else if(e===null){var f=t.stateNode,w=t.memoizedProps;f.props=w;var y=f.context,_=n.contextType;typeof _=="object"&&_!==null?_=At(_):(_=gt(n)?Qn:st.current,_=Nr(t,_));var W=n.getDerivedStateFromProps,V=typeof W=="function"||typeof f.getSnapshotBeforeUpdate=="function";V||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(w!==i||y!==_)&&rd(t,f,i,_),In=!1;var O=t.memoizedState;f.state=O,El(t,i,f,a),y=t.memoizedState,w!==i||O!==y||mt.current||In?(typeof W=="function"&&(Ma(t,n,W,i),y=t.memoizedState),(w=In||td(t,n,w,i,O,y,_))?(V||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=y),f.props=i,f.state=y,f.context=_,i=w):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{f=t.stateNode,_c(e,t),w=t.memoizedProps,_=t.type===t.elementType?w:Ut(t.type,w),f.props=_,V=t.pendingProps,O=f.context,y=n.contextType,typeof y=="object"&&y!==null?y=At(y):(y=gt(n)?Qn:st.current,y=Nr(t,y));var Q=n.getDerivedStateFromProps;(W=typeof Q=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(w!==V||O!==y)&&rd(t,f,i,y),In=!1,O=t.memoizedState,f.state=O,El(t,i,f,a);var ee=t.memoizedState;w!==V||O!==ee||mt.current||In?(typeof Q=="function"&&(Ma(t,n,Q,i),ee=t.memoizedState),(_=In||td(t,n,_,i,O,ee,y)||!1)?(W||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(i,ee,y),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(i,ee,y)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||w===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||w===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=ee),f.props=i,f.state=ee,f.context=y,i=_):(typeof f.componentDidUpdate!="function"||w===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||w===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),i=!1)}return Ba(e,t,n,i,u,a)}function Ba(e,t,n,i,a,u){hd(e,t);var f=(t.flags&128)!==0;if(!i&&!f)return a&&yc(t,n,!1),pn(e,t,u);i=t.stateNode,Zp.current=t;var w=f&&typeof n.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&f?(t.child=_r(t,e.child,null,u),t.child=_r(t,null,w,u)):dt(e,t,w,u),t.memoizedState=i.state,a&&yc(t,n,!0),t.child}function md(e){var t=e.stateNode;t.pendingContext?wc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&wc(e,t.context,!1),ja(e,t.containerInfo)}function gd(e,t,n,i,a){return Pr(),wa(a),t.flags|=256,dt(e,t,n,i),t.child}var Va={dehydrated:null,treeContext:null,retryLane:0};function Ua(e){return{baseLanes:e,cachePool:null,transitions:null}}function wd(e,t,n){var i=t.pendingProps,a=Fe.current,u=!1,f=(t.flags&128)!==0,w;if((w=f)||(w=e!==null&&e.memoizedState===null?!1:(a&2)!==0),w?(u=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),De(Fe,a&1),e===null)return ga(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(f=i.children,e=i.fallback,u?(i=t.mode,u=t.child,f={mode:"hidden",children:f},(i&1)===0&&u!==null?(u.childLanes=0,u.pendingProps=f):u=Gl(f,i,0,null),e=sr(e,i,n,null),u.return=t,e.return=t,u.sibling=e,t.child=u,t.child.memoizedState=Ua(n),t.memoizedState=Va,e):$a(t,f));if(a=e.memoizedState,a!==null&&(w=a.dehydrated,w!==null))return qp(e,t,f,i,w,a,n);if(u){u=i.fallback,f=t.mode,a=e.child,w=a.sibling;var y={mode:"hidden",children:i.children};return(f&1)===0&&t.child!==a?(i=t.child,i.childLanes=0,i.pendingProps=y,t.deletions=null):(i=Fn(a,y),i.subtreeFlags=a.subtreeFlags&14680064),w!==null?u=Fn(w,u):(u=sr(u,f,n,null),u.flags|=2),u.return=t,i.return=t,i.sibling=u,t.child=i,i=u,u=t.child,f=e.child.memoizedState,f=f===null?Ua(n):{baseLanes:f.baseLanes|n,cachePool:null,transitions:f.transitions},u.memoizedState=f,u.childLanes=e.childLanes&~n,t.memoizedState=Va,i}return u=e.child,e=u.sibling,i=Fn(u,{mode:"visible",children:i.children}),(t.mode&1)===0&&(i.lanes=n),i.return=t,i.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function $a(e,t){return t=Gl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Il(e,t,n,i){return i!==null&&wa(i),_r(t,e.child,null,n),e=$a(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function qp(e,t,n,i,a,u,f){if(n)return t.flags&256?(t.flags&=-257,i=Oa(Error(o(422))),Il(e,t,f,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(u=i.fallback,a=t.mode,i=Gl({mode:"visible",children:i.children},a,0,null),u=sr(u,a,f,null),u.flags|=2,i.return=t,u.return=t,i.sibling=u,t.child=i,(t.mode&1)!==0&&_r(t,e.child,null,f),t.child.memoizedState=Ua(f),t.memoizedState=Va,u);if((t.mode&1)===0)return Il(e,t,f,null);if(a.data==="$!"){if(i=a.nextSibling&&a.nextSibling.dataset,i)var w=i.dgst;return i=w,u=Error(o(419)),i=Oa(u,i,void 0),Il(e,t,f,i)}if(w=(f&e.childLanes)!==0,wt||w){if(i=Je,i!==null){switch(f&-f){case 4:a=2;break;case 16:a=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|f))!==0?0:a,a!==0&&a!==u.retryLane&&(u.retryLane=a,fn(e,a),Gt(i,e,a,-1))}return so(),i=Oa(Error(o(421))),Il(e,t,f,i)}return a.data==="$?"?(t.flags|=128,t.child=e.child,t=om.bind(null,e),a._reactRetry=t,null):(e=u.treeContext,Et=Pn(a.nextSibling),jt=t,Te=!0,Vt=null,e!==null&&(Pt[_t++]=cn,Pt[_t++]=dn,Pt[_t++]=Xn,cn=e.id,dn=e.overflow,Xn=t),t=$a(t,i.children),t.flags|=4096,t)}function vd(e,t,n){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Sa(e.return,t,n)}function Ha(e,t,n,i,a){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:a}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=i,u.tail=n,u.tailMode=a)}function yd(e,t,n){var i=t.pendingProps,a=i.revealOrder,u=i.tail;if(dt(e,t,i.children,n),i=Fe.current,(i&2)!==0)i=i&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&vd(e,n,t);else if(e.tag===19)vd(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}if(De(Fe,i),(t.mode&1)===0)t.memoizedState=null;else switch(a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&Nl(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),Ha(t,!1,a,n,u);break;case"backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&Nl(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}Ha(t,!0,n,null,u);break;case"together":Ha(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Dl(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function pn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),nr|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,n=Fn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Fn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Qp(e,t,n){switch(t.tag){case 3:md(t),Pr();break;case 5:Ic(t);break;case 1:gt(t.type)&&gl(t);break;case 4:ja(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,a=t.memoizedProps.value;De(kl,i._currentValue),i._currentValue=a;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(De(Fe,Fe.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?wd(e,t,n):(De(Fe,Fe.current&1),e=pn(e,t,n),e!==null?e.sibling:null);De(Fe,Fe.current&1);break;case 19:if(i=(n&t.childLanes)!==0,(e.flags&128)!==0){if(i)return yd(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),De(Fe,Fe.current),i)break;return null;case 22:case 23:return t.lanes=0,fd(e,t,n)}return pn(e,t,n)}var xd,Ga,Sd,kd;xd=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ga=function(){},Sd=function(e,t,n,i){var a=e.memoizedProps;if(a!==i){e=t.stateNode,er(Jt.current);var u=null;switch(n){case"input":a=Ue(e,a),i=Ue(e,i),u=[];break;case"select":a=K({},a,{value:void 0}),i=K({},i,{value:void 0}),u=[];break;case"textarea":a=js(e,a),i=js(e,i),u=[];break;default:typeof a.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=hl)}Ns(n,i);var f;n=null;for(_ in a)if(!i.hasOwnProperty(_)&&a.hasOwnProperty(_)&&a[_]!=null)if(_==="style"){var w=a[_];for(f in w)w.hasOwnProperty(f)&&(n||(n={}),n[f]="")}else _!=="dangerouslySetInnerHTML"&&_!=="children"&&_!=="suppressContentEditableWarning"&&_!=="suppressHydrationWarning"&&_!=="autoFocus"&&(c.hasOwnProperty(_)?u||(u=[]):(u=u||[]).push(_,null));for(_ in i){var y=i[_];if(w=a?.[_],i.hasOwnProperty(_)&&y!==w&&(y!=null||w!=null))if(_==="style")if(w){for(f in w)!w.hasOwnProperty(f)||y&&y.hasOwnProperty(f)||(n||(n={}),n[f]="");for(f in y)y.hasOwnProperty(f)&&w[f]!==y[f]&&(n||(n={}),n[f]=y[f])}else n||(u||(u=[]),u.push(_,n)),n=y;else _==="dangerouslySetInnerHTML"?(y=y?y.__html:void 0,w=w?w.__html:void 0,y!=null&&w!==y&&(u=u||[]).push(_,y)):_==="children"?typeof y!="string"&&typeof y!="number"||(u=u||[]).push(_,""+y):_!=="suppressContentEditableWarning"&&_!=="suppressHydrationWarning"&&(c.hasOwnProperty(_)?(y!=null&&_==="onScroll"&&Le("scroll",e),u||w===y||(u=[])):(u=u||[]).push(_,y))}n&&(u=u||[]).push("style",n);var _=u;(t.updateQueue=_)&&(t.flags|=4)}},kd=function(e,t,n,i){n!==i&&(t.flags|=4)};function Ni(e,t){if(!Te)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function ot(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,i=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,i|=a.subtreeFlags&14680064,i|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,i|=a.subtreeFlags,i|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function Xp(e,t,n){var i=t.pendingProps;switch(pa(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ot(t),null;case 1:return gt(t.type)&&ml(),ot(t),null;case 3:return i=t.stateNode,Ir(),Me(mt),Me(st),Ca(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(xl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Vt!==null&&(ro(Vt),Vt=null))),Ga(e,t),ot(t),null;case 5:Ea(t);var a=er(Si.current);if(n=t.type,e!==null&&t.stateNode!=null)Sd(e,t,n,i,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(o(166));return ot(t),null}if(e=er(Jt.current),xl(t)){i=t.stateNode,n=t.type;var u=t.memoizedProps;switch(i[Yt]=t,i[gi]=u,e=(t.mode&1)!==0,n){case"dialog":Le("cancel",i),Le("close",i);break;case"iframe":case"object":case"embed":Le("load",i);break;case"video":case"audio":for(a=0;a<hi.length;a++)Le(hi[a],i);break;case"source":Le("error",i);break;case"img":case"image":case"link":Le("error",i),Le("load",i);break;case"details":Le("toggle",i);break;case"input":kt(i,u),Le("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!u.multiple},Le("invalid",i);break;case"textarea":lu(i,u),Le("invalid",i)}Ns(n,u),a=null;for(var f in u)if(u.hasOwnProperty(f)){var w=u[f];f==="children"?typeof w=="string"?i.textContent!==w&&(u.suppressHydrationWarning!==!0&&fl(i.textContent,w,e),a=["children",w]):typeof w=="number"&&i.textContent!==""+w&&(u.suppressHydrationWarning!==!0&&fl(i.textContent,w,e),a=["children",""+w]):c.hasOwnProperty(f)&&w!=null&&f==="onScroll"&&Le("scroll",i)}switch(n){case"input":Kn(i),iu(i,u,!0);break;case"textarea":Kn(i),au(i);break;case"select":case"option":break;default:typeof u.onClick=="function"&&(i.onclick=hl)}i=a,t.updateQueue=i,i!==null&&(t.flags|=4)}else{f=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=ou(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=f.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=f.createElement(n,{is:i.is}):(e=f.createElement(n),n==="select"&&(f=e,i.multiple?f.multiple=!0:i.size&&(f.size=i.size))):e=f.createElementNS(e,n),e[Yt]=t,e[gi]=i,xd(e,t,!1,!1),t.stateNode=e;e:{switch(f=Cs(n,i),n){case"dialog":Le("cancel",e),Le("close",e),a=i;break;case"iframe":case"object":case"embed":Le("load",e),a=i;break;case"video":case"audio":for(a=0;a<hi.length;a++)Le(hi[a],e);a=i;break;case"source":Le("error",e),a=i;break;case"img":case"image":case"link":Le("error",e),Le("load",e),a=i;break;case"details":Le("toggle",e),a=i;break;case"input":kt(e,i),a=Ue(e,i),Le("invalid",e);break;case"option":a=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},a=K({},i,{value:void 0}),Le("invalid",e);break;case"textarea":lu(e,i),a=js(e,i),Le("invalid",e);break;default:a=i}Ns(n,a),w=a;for(u in w)if(w.hasOwnProperty(u)){var y=w[u];u==="style"?du(e,y):u==="dangerouslySetInnerHTML"?(y=y?y.__html:void 0,y!=null&&uu(e,y)):u==="children"?typeof y=="string"?(n!=="textarea"||y!=="")&&Zr(e,y):typeof y=="number"&&Zr(e,""+y):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(c.hasOwnProperty(u)?y!=null&&u==="onScroll"&&Le("scroll",e):y!=null&&T(e,u,y,f))}switch(n){case"input":Kn(e),iu(e,i,!1);break;case"textarea":Kn(e),au(e);break;case"option":i.value!=null&&e.setAttribute("value",""+oe(i.value));break;case"select":e.multiple=!!i.multiple,u=i.value,u!=null?pr(e,!!i.multiple,u,!1):i.defaultValue!=null&&pr(e,!!i.multiple,i.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=hl)}switch(n){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ot(t),null;case 6:if(e&&t.stateNode!=null)kd(e,t,e.memoizedProps,i);else{if(typeof i!="string"&&t.stateNode===null)throw Error(o(166));if(n=er(Si.current),er(Jt.current),xl(t)){if(i=t.stateNode,n=t.memoizedProps,i[Yt]=t,(u=i.nodeValue!==n)&&(e=jt,e!==null))switch(e.tag){case 3:fl(i.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&fl(i.nodeValue,n,(e.mode&1)!==0)}u&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Yt]=t,t.stateNode=i}return ot(t),null;case 13:if(Me(Fe),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Te&&Et!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Ec(),Pr(),t.flags|=98560,u=!1;else if(u=xl(t),i!==null&&i.dehydrated!==null){if(e===null){if(!u)throw Error(o(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(o(317));u[Yt]=t}else Pr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ot(t),u=!1}else Vt!==null&&(ro(Vt),Vt=null),u=!0;if(!u)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Fe.current&1)!==0?Xe===0&&(Xe=3):so())),t.updateQueue!==null&&(t.flags|=4),ot(t),null);case 4:return Ir(),Ga(e,t),e===null&&pi(t.stateNode.containerInfo),ot(t),null;case 10:return xa(t.type._context),ot(t),null;case 17:return gt(t.type)&&ml(),ot(t),null;case 19:if(Me(Fe),u=t.memoizedState,u===null)return ot(t),null;if(i=(t.flags&128)!==0,f=u.rendering,f===null)if(i)Ni(u,!1);else{if(Xe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=Nl(e),f!==null){for(t.flags|=128,Ni(u,!1),i=f.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)u=n,e=i,u.flags&=14680066,f=u.alternate,f===null?(u.childLanes=0,u.lanes=e,u.child=null,u.subtreeFlags=0,u.memoizedProps=null,u.memoizedState=null,u.updateQueue=null,u.dependencies=null,u.stateNode=null):(u.childLanes=f.childLanes,u.lanes=f.lanes,u.child=f.child,u.subtreeFlags=0,u.deletions=null,u.memoizedProps=f.memoizedProps,u.memoizedState=f.memoizedState,u.updateQueue=f.updateQueue,u.type=f.type,e=f.dependencies,u.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return De(Fe,Fe.current&1|2),t.child}e=e.sibling}u.tail!==null&&Ge()>Tr&&(t.flags|=128,i=!0,Ni(u,!1),t.lanes=4194304)}else{if(!i)if(e=Nl(f),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ni(u,!0),u.tail===null&&u.tailMode==="hidden"&&!f.alternate&&!Te)return ot(t),null}else 2*Ge()-u.renderingStartTime>Tr&&n!==1073741824&&(t.flags|=128,i=!0,Ni(u,!1),t.lanes=4194304);u.isBackwards?(f.sibling=t.child,t.child=f):(n=u.last,n!==null?n.sibling=f:t.child=f,u.last=f)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Ge(),t.sibling=null,n=Fe.current,De(Fe,i?n&1|2:n&1),t):(ot(t),null);case 22:case 23:return lo(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&(t.mode&1)!==0?(Nt&1073741824)!==0&&(ot(t),t.subtreeFlags&6&&(t.flags|=8192)):ot(t),null;case 24:return null;case 25:return null}throw Error(o(156,t.tag))}function Yp(e,t){switch(pa(t),t.tag){case 1:return gt(t.type)&&ml(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ir(),Me(mt),Me(st),Ca(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Ea(t),null;case 13:if(Me(Fe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Pr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Me(Fe),null;case 4:return Ir(),null;case 10:return xa(t.type._context),null;case 22:case 23:return lo(),null;case 24:return null;default:return null}}var Ll=!1,ut=!1,Jp=typeof WeakSet=="function"?WeakSet:Set,J=null;function Lr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(i){$e(e,t,i)}else n.current=null}function Ka(e,t,n){try{n()}catch(i){$e(e,t,i)}}var bd=!1;function em(e,t){if(la=tl,e=tc(),Xs(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,u=i.focusNode;i=i.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var f=0,w=-1,y=-1,_=0,W=0,V=e,O=null;t:for(;;){for(var Q;V!==n||a!==0&&V.nodeType!==3||(w=f+a),V!==u||i!==0&&V.nodeType!==3||(y=f+i),V.nodeType===3&&(f+=V.nodeValue.length),(Q=V.firstChild)!==null;)O=V,V=Q;for(;;){if(V===e)break t;if(O===n&&++_===a&&(w=f),O===u&&++W===i&&(y=f),(Q=V.nextSibling)!==null)break;V=O,O=V.parentNode}V=Q}n=w===-1||y===-1?null:{start:w,end:y}}else n=null}n=n||{start:0,end:0}}else n=null;for(sa={focusedElem:e,selectionRange:n},tl=!1,J=t;J!==null;)if(t=J,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,J=e;else for(;J!==null;){t=J;try{var ee=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(ee!==null){var re=ee.memoizedProps,Ke=ee.memoizedState,C=t.stateNode,k=C.getSnapshotBeforeUpdate(t.elementType===t.type?re:Ut(t.type,re),Ke);C.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var P=t.stateNode.containerInfo;P.nodeType===1?P.textContent="":P.nodeType===9&&P.documentElement&&P.removeChild(P.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(H){$e(t,t.return,H)}if(e=t.sibling,e!==null){e.return=t.return,J=e;break}J=t.return}return ee=bd,bd=!1,ee}function Ci(e,t,n){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var a=i=i.next;do{if((a.tag&e)===e){var u=a.destroy;a.destroy=void 0,u!==void 0&&Ka(t,n,u)}a=a.next}while(a!==i)}}function Ml(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var i=n.create;n.destroy=i()}n=n.next}while(n!==t)}}function Za(e){var t=e.ref;if(t!==null){var n=e.stateNode;e.tag,e=n,typeof t=="function"?t(e):t.current=e}}function jd(e){var t=e.alternate;t!==null&&(e.alternate=null,jd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Yt],delete t[gi],delete t[ca],delete t[Mp],delete t[Tp])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ed(e){return e.tag===5||e.tag===3||e.tag===4}function Nd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ed(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qa(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=hl));else if(i!==4&&(e=e.child,e!==null))for(qa(e,t,n),e=e.sibling;e!==null;)qa(e,t,n),e=e.sibling}function Qa(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(Qa(e,t,n),e=e.sibling;e!==null;)Qa(e,t,n),e=e.sibling}var tt=null,$t=!1;function Ln(e,t,n){for(n=n.child;n!==null;)Cd(e,t,n),n=n.sibling}function Cd(e,t,n){if(Xt&&typeof Xt.onCommitFiberUnmount=="function")try{Xt.onCommitFiberUnmount(qi,n)}catch{}switch(n.tag){case 5:ut||Lr(n,t);case 6:var i=tt,a=$t;tt=null,Ln(e,t,n),tt=i,$t=a,tt!==null&&($t?(e=tt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):tt.removeChild(n.stateNode));break;case 18:tt!==null&&($t?(e=tt,n=n.stateNode,e.nodeType===8?ua(e.parentNode,n):e.nodeType===1&&ua(e,n),li(e)):ua(tt,n.stateNode));break;case 4:i=tt,a=$t,tt=n.stateNode.containerInfo,$t=!0,Ln(e,t,n),tt=i,$t=a;break;case 0:case 11:case 14:case 15:if(!ut&&(i=n.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){a=i=i.next;do{var u=a,f=u.destroy;u=u.tag,f!==void 0&&((u&2)!==0||(u&4)!==0)&&Ka(n,t,f),a=a.next}while(a!==i)}Ln(e,t,n);break;case 1:if(!ut&&(Lr(n,t),i=n.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(w){$e(n,t,w)}Ln(e,t,n);break;case 21:Ln(e,t,n);break;case 22:n.mode&1?(ut=(i=ut)||n.memoizedState!==null,Ln(e,t,n),ut=i):Ln(e,t,n);break;default:Ln(e,t,n)}}function Rd(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Jp),t.forEach(function(i){var a=um.bind(null,e,i);n.has(i)||(n.add(i),i.then(a,a))})}}function Ht(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];try{var u=e,f=t,w=f;e:for(;w!==null;){switch(w.tag){case 5:tt=w.stateNode,$t=!1;break e;case 3:tt=w.stateNode.containerInfo,$t=!0;break e;case 4:tt=w.stateNode.containerInfo,$t=!0;break e}w=w.return}if(tt===null)throw Error(o(160));Cd(u,f,a),tt=null,$t=!1;var y=a.alternate;y!==null&&(y.return=null),a.return=null}catch(_){$e(a,t,_)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Pd(t,e),t=t.sibling}function Pd(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ht(t,e),tn(e),i&4){try{Ci(3,e,e.return),Ml(3,e)}catch(re){$e(e,e.return,re)}try{Ci(5,e,e.return)}catch(re){$e(e,e.return,re)}}break;case 1:Ht(t,e),tn(e),i&512&&n!==null&&Lr(n,n.return);break;case 5:if(Ht(t,e),tn(e),i&512&&n!==null&&Lr(n,n.return),e.flags&32){var a=e.stateNode;try{Zr(a,"")}catch(re){$e(e,e.return,re)}}if(i&4&&(a=e.stateNode,a!=null)){var u=e.memoizedProps,f=n!==null?n.memoizedProps:u,w=e.type,y=e.updateQueue;if(e.updateQueue=null,y!==null)try{w==="input"&&u.type==="radio"&&u.name!=null&&We(a,u),Cs(w,f);var _=Cs(w,u);for(f=0;f<y.length;f+=2){var W=y[f],V=y[f+1];W==="style"?du(a,V):W==="dangerouslySetInnerHTML"?uu(a,V):W==="children"?Zr(a,V):T(a,W,V,_)}switch(w){case"input":Qt(a,u);break;case"textarea":su(a,u);break;case"select":var O=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!u.multiple;var Q=u.value;Q!=null?pr(a,!!u.multiple,Q,!1):O!==!!u.multiple&&(u.defaultValue!=null?pr(a,!!u.multiple,u.defaultValue,!0):pr(a,!!u.multiple,u.multiple?[]:"",!1))}a[gi]=u}catch(re){$e(e,e.return,re)}}break;case 6:if(Ht(t,e),tn(e),i&4){if(e.stateNode===null)throw Error(o(162));a=e.stateNode,u=e.memoizedProps;try{a.nodeValue=u}catch(re){$e(e,e.return,re)}}break;case 3:if(Ht(t,e),tn(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{li(t.containerInfo)}catch(re){$e(e,e.return,re)}break;case 4:Ht(t,e),tn(e);break;case 13:Ht(t,e),tn(e),a=e.child,a.flags&8192&&(u=a.memoizedState!==null,a.stateNode.isHidden=u,!u||a.alternate!==null&&a.alternate.memoizedState!==null||(Ja=Ge())),i&4&&Rd(e);break;case 22:if(W=n!==null&&n.memoizedState!==null,e.mode&1?(ut=(_=ut)||W,Ht(t,e),ut=_):Ht(t,e),tn(e),i&8192){if(_=e.memoizedState!==null,(e.stateNode.isHidden=_)&&!W&&(e.mode&1)!==0)for(J=e,W=e.child;W!==null;){for(V=J=W;J!==null;){switch(O=J,Q=O.child,O.tag){case 0:case 11:case 14:case 15:Ci(4,O,O.return);break;case 1:Lr(O,O.return);var ee=O.stateNode;if(typeof ee.componentWillUnmount=="function"){i=O,n=O.return;try{t=i,ee.props=t.memoizedProps,ee.state=t.memoizedState,ee.componentWillUnmount()}catch(re){$e(i,n,re)}}break;case 5:Lr(O,O.return);break;case 22:if(O.memoizedState!==null){zd(V);continue}}Q!==null?(Q.return=O,J=Q):zd(V)}W=W.sibling}e:for(W=null,V=e;;){if(V.tag===5){if(W===null){W=V;try{a=V.stateNode,_?(u=a.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none"):(w=V.stateNode,y=V.memoizedProps.style,f=y!=null&&y.hasOwnProperty("display")?y.display:null,w.style.display=cu("display",f))}catch(re){$e(e,e.return,re)}}}else if(V.tag===6){if(W===null)try{V.stateNode.nodeValue=_?"":V.memoizedProps}catch(re){$e(e,e.return,re)}}else if((V.tag!==22&&V.tag!==23||V.memoizedState===null||V===e)&&V.child!==null){V.child.return=V,V=V.child;continue}if(V===e)break e;for(;V.sibling===null;){if(V.return===null||V.return===e)break e;W===V&&(W=null),V=V.return}W===V&&(W=null),V.sibling.return=V.return,V=V.sibling}}break;case 19:Ht(t,e),tn(e),i&4&&Rd(e);break;case 21:break;default:Ht(t,e),tn(e)}}function tn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Ed(n)){var i=n;break e}n=n.return}throw Error(o(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(Zr(a,""),i.flags&=-33);var u=Nd(e);Qa(e,u,a);break;case 3:case 4:var f=i.stateNode.containerInfo,w=Nd(e);qa(e,w,f);break;default:throw Error(o(161))}}catch(y){$e(e,e.return,y)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function tm(e,t,n){J=e,_d(e)}function _d(e,t,n){for(var i=(e.mode&1)!==0;J!==null;){var a=J,u=a.child;if(a.tag===22&&i){var f=a.memoizedState!==null||Ll;if(!f){var w=a.alternate,y=w!==null&&w.memoizedState!==null||ut;w=Ll;var _=ut;if(Ll=f,(ut=y)&&!_)for(J=a;J!==null;)f=J,y=f.child,f.tag===22&&f.memoizedState!==null?Id(a):y!==null?(y.return=f,J=y):Id(a);for(;u!==null;)J=u,_d(u),u=u.sibling;J=a,Ll=w,ut=_}Ad(e)}else(a.subtreeFlags&8772)!==0&&u!==null?(u.return=a,J=u):Ad(e)}}function Ad(e){for(;J!==null;){var t=J;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:ut||Ml(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!ut)if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:Ut(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var u=t.updateQueue;u!==null&&zc(t,u,i);break;case 3:var f=t.updateQueue;if(f!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}zc(t,f,n)}break;case 5:var w=t.stateNode;if(n===null&&t.flags&4){n=w;var y=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":y.autoFocus&&n.focus();break;case"img":y.src&&(n.src=y.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var _=t.alternate;if(_!==null){var W=_.memoizedState;if(W!==null){var V=W.dehydrated;V!==null&&li(V)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(o(163))}ut||t.flags&512&&Za(t)}catch(O){$e(t,t.return,O)}}if(t===e){J=null;break}if(n=t.sibling,n!==null){n.return=t.return,J=n;break}J=t.return}}function zd(e){for(;J!==null;){var t=J;if(t===e){J=null;break}var n=t.sibling;if(n!==null){n.return=t.return,J=n;break}J=t.return}}function Id(e){for(;J!==null;){var t=J;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ml(4,t)}catch(y){$e(t,n,y)}break;case 1:var i=t.stateNode;if(typeof i.componentDidMount=="function"){var a=t.return;try{i.componentDidMount()}catch(y){$e(t,a,y)}}var u=t.return;try{Za(t)}catch(y){$e(t,u,y)}break;case 5:var f=t.return;try{Za(t)}catch(y){$e(t,f,y)}}}catch(y){$e(t,t.return,y)}if(t===e){J=null;break}var w=t.sibling;if(w!==null){w.return=t.return,J=w;break}J=t.return}}var nm=Math.ceil,Tl=ue.ReactCurrentDispatcher,Xa=ue.ReactCurrentOwner,It=ue.ReactCurrentBatchConfig,Ce=0,Je=null,Ze=null,nt=0,Nt=0,Mr=_n(0),Xe=0,Ri=null,nr=0,Ol=0,Ya=0,Pi=null,vt=null,Ja=0,Tr=1/0,mn=null,Wl=!1,eo=null,Mn=null,Fl=!1,Tn=null,Bl=0,_i=0,to=null,Vl=-1,Ul=0;function ft(){return(Ce&6)!==0?Ge():Vl!==-1?Vl:Vl=Ge()}function On(e){return(e.mode&1)===0?1:(Ce&2)!==0&&nt!==0?nt&-nt:Wp.transition!==null?(Ul===0&&(Ul=Nu()),Ul):(e=_e,e!==0||(e=window.event,e=e===void 0?16:Lu(e.type)),e)}function Gt(e,t,n,i){if(50<_i)throw _i=0,to=null,Error(o(185));ei(e,n,i),((Ce&2)===0||e!==Je)&&(e===Je&&((Ce&2)===0&&(Ol|=n),Xe===4&&Wn(e,nt)),yt(e,i),n===1&&Ce===0&&(t.mode&1)===0&&(Tr=Ge()+500,wl&&zn()))}function yt(e,t){var n=e.callbackNode;Wh(e,t);var i=Yi(e,e===Je?nt:0);if(i===0)n!==null&&bu(n),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(n!=null&&bu(n),t===1)e.tag===0?Op(Ld.bind(null,e)):xc(Ld.bind(null,e)),Dp(function(){(Ce&6)===0&&zn()}),n=null;else{switch(Cu(i)){case 1:n=Ds;break;case 4:n=ju;break;case 16:n=Zi;break;case 536870912:n=Eu;break;default:n=Zi}n=Ud(n,Dd.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Dd(e,t){if(Vl=-1,Ul=0,(Ce&6)!==0)throw Error(o(327));var n=e.callbackNode;if(Or()&&e.callbackNode!==n)return null;var i=Yi(e,e===Je?nt:0);if(i===0)return null;if((i&30)!==0||(i&e.expiredLanes)!==0||t)t=$l(e,i);else{t=i;var a=Ce;Ce|=2;var u=Td();(Je!==e||nt!==t)&&(mn=null,Tr=Ge()+500,ir(e,t));do try{lm();break}catch(w){Md(e,w)}while(!0);ya(),Tl.current=u,Ce=a,Ze!==null?t=0:(Je=null,nt=0,t=Xe)}if(t!==0){if(t===2&&(a=Ls(e),a!==0&&(i=a,t=no(e,a))),t===1)throw n=Ri,ir(e,0),Wn(e,i),yt(e,Ge()),n;if(t===6)Wn(e,i);else{if(a=e.current.alternate,(i&30)===0&&!rm(a)&&(t=$l(e,i),t===2&&(u=Ls(e),u!==0&&(i=u,t=no(e,u))),t===1))throw n=Ri,ir(e,0),Wn(e,i),yt(e,Ge()),n;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(o(345));case 2:lr(e,vt,mn);break;case 3:if(Wn(e,i),(i&130023424)===i&&(t=Ja+500-Ge(),10<t)){if(Yi(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){ft(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=oa(lr.bind(null,e,vt,mn),t);break}lr(e,vt,mn);break;case 4:if(Wn(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var f=31-Ft(i);u=1<<f,f=t[f],f>a&&(a=f),i&=~u}if(i=a,i=Ge()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*nm(i/1960))-i,10<i){e.timeoutHandle=oa(lr.bind(null,e,vt,mn),i);break}lr(e,vt,mn);break;case 5:lr(e,vt,mn);break;default:throw Error(o(329))}}}return yt(e,Ge()),e.callbackNode===n?Dd.bind(null,e):null}function no(e,t){var n=Pi;return e.current.memoizedState.isDehydrated&&(ir(e,t).flags|=256),e=$l(e,t),e!==2&&(t=vt,vt=n,t!==null&&ro(t)),e}function ro(e){vt===null?vt=e:vt.push.apply(vt,e)}function rm(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var i=0;i<n.length;i++){var a=n[i],u=a.getSnapshot;a=a.value;try{if(!Bt(u(),a))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Wn(e,t){for(t&=~Ya,t&=~Ol,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ft(t),i=1<<n;e[n]=-1,t&=~i}}function Ld(e){if((Ce&6)!==0)throw Error(o(327));Or();var t=Yi(e,0);if((t&1)===0)return yt(e,Ge()),null;var n=$l(e,t);if(e.tag!==0&&n===2){var i=Ls(e);i!==0&&(t=i,n=no(e,i))}if(n===1)throw n=Ri,ir(e,0),Wn(e,t),yt(e,Ge()),n;if(n===6)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,lr(e,vt,mn),yt(e,Ge()),null}function io(e,t){var n=Ce;Ce|=1;try{return e(t)}finally{Ce=n,Ce===0&&(Tr=Ge()+500,wl&&zn())}}function rr(e){Tn!==null&&Tn.tag===0&&(Ce&6)===0&&Or();var t=Ce;Ce|=1;var n=It.transition,i=_e;try{if(It.transition=null,_e=1,e)return e()}finally{_e=i,It.transition=n,Ce=t,(Ce&6)===0&&zn()}}function lo(){Nt=Mr.current,Me(Mr)}function ir(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Ip(n)),Ze!==null)for(n=Ze.return;n!==null;){var i=n;switch(pa(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&ml();break;case 3:Ir(),Me(mt),Me(st),Ca();break;case 5:Ea(i);break;case 4:Ir();break;case 13:Me(Fe);break;case 19:Me(Fe);break;case 10:xa(i.type._context);break;case 22:case 23:lo()}n=n.return}if(Je=e,Ze=e=Fn(e.current,null),nt=Nt=t,Xe=0,Ri=null,Ya=Ol=nr=0,vt=Pi=null,Jn!==null){for(t=0;t<Jn.length;t++)if(n=Jn[t],i=n.interleaved,i!==null){n.interleaved=null;var a=i.next,u=n.pending;if(u!==null){var f=u.next;u.next=a,i.next=f}n.pending=i}Jn=null}return e}function Md(e,t){do{var n=Ze;try{if(ya(),Cl.current=Al,Rl){for(var i=Be.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Rl=!1}if(tr=0,Ye=Qe=Be=null,ki=!1,bi=0,Xa.current=null,n===null||n.return===null){Xe=1,Ri=t,Ze=null;break}e:{var u=e,f=n.return,w=n,y=t;if(t=nt,w.flags|=32768,y!==null&&typeof y=="object"&&typeof y.then=="function"){var _=y,W=w,V=W.tag;if((W.mode&1)===0&&(V===0||V===11||V===15)){var O=W.alternate;O?(W.updateQueue=O.updateQueue,W.memoizedState=O.memoizedState,W.lanes=O.lanes):(W.updateQueue=null,W.memoizedState=null)}var Q=ad(f);if(Q!==null){Q.flags&=-257,od(Q,f,w,u,t),Q.mode&1&&sd(u,_,t),t=Q,y=_;var ee=t.updateQueue;if(ee===null){var re=new Set;re.add(y),t.updateQueue=re}else ee.add(y);break e}else{if((t&1)===0){sd(u,_,t),so();break e}y=Error(o(426))}}else if(Te&&w.mode&1){var Ke=ad(f);if(Ke!==null){(Ke.flags&65536)===0&&(Ke.flags|=256),od(Ke,f,w,u,t),wa(Dr(y,w));break e}}u=y=Dr(y,w),Xe!==4&&(Xe=2),Pi===null?Pi=[u]:Pi.push(u),u=f;do{switch(u.tag){case 3:u.flags|=65536,t&=-t,u.lanes|=t;var C=id(u,y,t);Ac(u,C);break e;case 1:w=y;var k=u.type,P=u.stateNode;if((u.flags&128)===0&&(typeof k.getDerivedStateFromError=="function"||P!==null&&typeof P.componentDidCatch=="function"&&(Mn===null||!Mn.has(P)))){u.flags|=65536,t&=-t,u.lanes|=t;var H=ld(u,w,t);Ac(u,H);break e}}u=u.return}while(u!==null)}Wd(n)}catch(se){t=se,Ze===n&&n!==null&&(Ze=n=n.return);continue}break}while(!0)}function Td(){var e=Tl.current;return Tl.current=Al,e===null?Al:e}function so(){(Xe===0||Xe===3||Xe===2)&&(Xe=4),Je===null||(nr&268435455)===0&&(Ol&268435455)===0||Wn(Je,nt)}function $l(e,t){var n=Ce;Ce|=2;var i=Td();(Je!==e||nt!==t)&&(mn=null,ir(e,t));do try{im();break}catch(a){Md(e,a)}while(!0);if(ya(),Ce=n,Tl.current=i,Ze!==null)throw Error(o(261));return Je=null,nt=0,Xe}function im(){for(;Ze!==null;)Od(Ze)}function lm(){for(;Ze!==null&&!_h();)Od(Ze)}function Od(e){var t=Vd(e.alternate,e,Nt);e.memoizedProps=e.pendingProps,t===null?Wd(e):Ze=t,Xa.current=null}function Wd(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=Xp(n,t,Nt),n!==null){Ze=n;return}}else{if(n=Yp(n,t),n!==null){n.flags&=32767,Ze=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Xe=6,Ze=null;return}}if(t=t.sibling,t!==null){Ze=t;return}Ze=t=e}while(t!==null);Xe===0&&(Xe=5)}function lr(e,t,n){var i=_e,a=It.transition;try{It.transition=null,_e=1,sm(e,t,n,i)}finally{It.transition=a,_e=i}return null}function sm(e,t,n,i){do Or();while(Tn!==null);if((Ce&6)!==0)throw Error(o(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var u=n.lanes|n.childLanes;if(Fh(e,u),e===Je&&(Ze=Je=null,nt=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||Fl||(Fl=!0,Ud(Zi,function(){return Or(),null})),u=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||u){u=It.transition,It.transition=null;var f=_e;_e=1;var w=Ce;Ce|=4,Xa.current=null,em(e,n),Pd(n,e),Np(sa),tl=!!la,sa=la=null,e.current=n,tm(n),Ah(),Ce=w,_e=f,It.transition=u}else e.current=n;if(Fl&&(Fl=!1,Tn=e,Bl=a),u=e.pendingLanes,u===0&&(Mn=null),Dh(n.stateNode),yt(e,Ge()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],i(a.value,{componentStack:a.stack,digest:a.digest});if(Wl)throw Wl=!1,e=eo,eo=null,e;return(Bl&1)!==0&&e.tag!==0&&Or(),u=e.pendingLanes,(u&1)!==0?e===to?_i++:(_i=0,to=e):_i=0,zn(),null}function Or(){if(Tn!==null){var e=Cu(Bl),t=It.transition,n=_e;try{if(It.transition=null,_e=16>e?16:e,Tn===null)var i=!1;else{if(e=Tn,Tn=null,Bl=0,(Ce&6)!==0)throw Error(o(331));var a=Ce;for(Ce|=4,J=e.current;J!==null;){var u=J,f=u.child;if((J.flags&16)!==0){var w=u.deletions;if(w!==null){for(var y=0;y<w.length;y++){var _=w[y];for(J=_;J!==null;){var W=J;switch(W.tag){case 0:case 11:case 15:Ci(8,W,u)}var V=W.child;if(V!==null)V.return=W,J=V;else for(;J!==null;){W=J;var O=W.sibling,Q=W.return;if(jd(W),W===_){J=null;break}if(O!==null){O.return=Q,J=O;break}J=Q}}}var ee=u.alternate;if(ee!==null){var re=ee.child;if(re!==null){ee.child=null;do{var Ke=re.sibling;re.sibling=null,re=Ke}while(re!==null)}}J=u}}if((u.subtreeFlags&2064)!==0&&f!==null)f.return=u,J=f;else e:for(;J!==null;){if(u=J,(u.flags&2048)!==0)switch(u.tag){case 0:case 11:case 15:Ci(9,u,u.return)}var C=u.sibling;if(C!==null){C.return=u.return,J=C;break e}J=u.return}}var k=e.current;for(J=k;J!==null;){f=J;var P=f.child;if((f.subtreeFlags&2064)!==0&&P!==null)P.return=f,J=P;else e:for(f=k;J!==null;){if(w=J,(w.flags&2048)!==0)try{switch(w.tag){case 0:case 11:case 15:Ml(9,w)}}catch(se){$e(w,w.return,se)}if(w===f){J=null;break e}var H=w.sibling;if(H!==null){H.return=w.return,J=H;break e}J=w.return}}if(Ce=a,zn(),Xt&&typeof Xt.onPostCommitFiberRoot=="function")try{Xt.onPostCommitFiberRoot(qi,e)}catch{}i=!0}return i}finally{_e=n,It.transition=t}}return!1}function Fd(e,t,n){t=Dr(n,t),t=id(e,t,1),e=Dn(e,t,1),t=ft(),e!==null&&(ei(e,1,t),yt(e,t))}function $e(e,t,n){if(e.tag===3)Fd(e,e,n);else for(;t!==null;){if(t.tag===3){Fd(t,e,n);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Mn===null||!Mn.has(i))){e=Dr(n,e),e=ld(t,e,1),t=Dn(t,e,1),e=ft(),t!==null&&(ei(t,1,e),yt(t,e));break}}t=t.return}}function am(e,t,n){var i=e.pingCache;i!==null&&i.delete(t),t=ft(),e.pingedLanes|=e.suspendedLanes&n,Je===e&&(nt&n)===n&&(Xe===4||Xe===3&&(nt&130023424)===nt&&500>Ge()-Ja?ir(e,0):Ya|=n),yt(e,t)}function Bd(e,t){t===0&&((e.mode&1)===0?t=1:(t=Xi,Xi<<=1,(Xi&130023424)===0&&(Xi=4194304)));var n=ft();e=fn(e,t),e!==null&&(ei(e,t,n),yt(e,n))}function om(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Bd(e,n)}function um(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(o(314))}i!==null&&i.delete(t),Bd(e,n)}var Vd;Vd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||mt.current)wt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return wt=!1,Qp(e,t,n);wt=(e.flags&131072)!==0}else wt=!1,Te&&(t.flags&1048576)!==0&&Sc(t,yl,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Dl(e,t),e=t.pendingProps;var a=Nr(t,st.current);zr(t,n),a=_a(null,t,i,e,a,n);var u=Aa();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,gt(i)?(u=!0,gl(t)):u=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,ba(t),a.updater=zl,t.stateNode=a,a._reactInternals=t,Ta(t,i,e,n),t=Ba(null,t,i,!0,u,n)):(t.tag=0,Te&&u&&ha(t),dt(null,t,a,n),t=t.child),t;case 16:i=t.elementType;e:{switch(Dl(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=dm(i),e=Ut(i,e),a){case 0:t=Fa(null,t,i,e,n);break e;case 1:t=pd(null,t,i,e,n);break e;case 11:t=ud(null,t,i,e,n);break e;case 14:t=cd(null,t,i,Ut(i.type,e),n);break e}throw Error(o(306,i,""))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ut(i,a),Fa(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ut(i,a),pd(e,t,i,a,n);case 3:e:{if(md(t),e===null)throw Error(o(387));i=t.pendingProps,u=t.memoizedState,a=u.element,_c(e,t),El(t,i,null,n);var f=t.memoizedState;if(i=f.element,u.isDehydrated)if(u={element:i,isDehydrated:!1,cache:f.cache,pendingSuspenseBoundaries:f.pendingSuspenseBoundaries,transitions:f.transitions},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){a=Dr(Error(o(423)),t),t=gd(e,t,i,n,a);break e}else if(i!==a){a=Dr(Error(o(424)),t),t=gd(e,t,i,n,a);break e}else for(Et=Pn(t.stateNode.containerInfo.firstChild),jt=t,Te=!0,Vt=null,n=Rc(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Pr(),i===a){t=pn(e,t,n);break e}dt(e,t,i,n)}t=t.child}return t;case 5:return Ic(t),e===null&&ga(t),i=t.type,a=t.pendingProps,u=e!==null?e.memoizedProps:null,f=a.children,aa(i,a)?f=null:u!==null&&aa(i,u)&&(t.flags|=32),hd(e,t),dt(e,t,f,n),t.child;case 6:return e===null&&ga(t),null;case 13:return wd(e,t,n);case 4:return ja(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=_r(t,null,i,n):dt(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ut(i,a),ud(e,t,i,a,n);case 7:return dt(e,t,t.pendingProps,n),t.child;case 8:return dt(e,t,t.pendingProps.children,n),t.child;case 12:return dt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(i=t.type._context,a=t.pendingProps,u=t.memoizedProps,f=a.value,De(kl,i._currentValue),i._currentValue=f,u!==null)if(Bt(u.value,f)){if(u.children===a.children&&!mt.current){t=pn(e,t,n);break e}}else for(u=t.child,u!==null&&(u.return=t);u!==null;){var w=u.dependencies;if(w!==null){f=u.child;for(var y=w.firstContext;y!==null;){if(y.context===i){if(u.tag===1){y=hn(-1,n&-n),y.tag=2;var _=u.updateQueue;if(_!==null){_=_.shared;var W=_.pending;W===null?y.next=y:(y.next=W.next,W.next=y),_.pending=y}}u.lanes|=n,y=u.alternate,y!==null&&(y.lanes|=n),Sa(u.return,n,t),w.lanes|=n;break}y=y.next}}else if(u.tag===10)f=u.type===t.type?null:u.child;else if(u.tag===18){if(f=u.return,f===null)throw Error(o(341));f.lanes|=n,w=f.alternate,w!==null&&(w.lanes|=n),Sa(f,n,t),f=u.sibling}else f=u.child;if(f!==null)f.return=u;else for(f=u;f!==null;){if(f===t){f=null;break}if(u=f.sibling,u!==null){u.return=f.return,f=u;break}f=f.return}u=f}dt(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,zr(t,n),a=At(a),i=i(a),t.flags|=1,dt(e,t,i,n),t.child;case 14:return i=t.type,a=Ut(i,t.pendingProps),a=Ut(i.type,a),cd(e,t,i,a,n);case 15:return dd(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ut(i,a),Dl(e,t),t.tag=1,gt(i)?(e=!0,gl(t)):e=!1,zr(t,n),nd(t,i,a),Ta(t,i,a,n),Ba(null,t,i,!0,e,n);case 19:return yd(e,t,n);case 22:return fd(e,t,n)}throw Error(o(156,t.tag))};function Ud(e,t){return ku(e,t)}function cm(e,t,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dt(e,t,n,i){return new cm(e,t,n,i)}function ao(e){return e=e.prototype,!(!e||!e.isReactComponent)}function dm(e){if(typeof e=="function")return ao(e)?1:0;if(e!=null){if(e=e.$$typeof,e===A)return 11;if(e===X)return 14}return 2}function Fn(e,t){var n=e.alternate;return n===null?(n=Dt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Hl(e,t,n,i,a,u){var f=2;if(i=e,typeof e=="function")ao(e)&&(f=1);else if(typeof e=="string")f=5;else e:switch(e){case de:return sr(n.children,a,u,t);case Y:f=8,a|=8;break;case je:return e=Dt(12,n,t,a|2),e.elementType=je,e.lanes=u,e;case Z:return e=Dt(13,n,t,a),e.elementType=Z,e.lanes=u,e;case be:return e=Dt(19,n,t,a),e.elementType=be,e.lanes=u,e;case Se:return Gl(n,a,u,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case D:f=10;break e;case ce:f=9;break e;case A:f=11;break e;case X:f=14;break e;case fe:f=16,i=null;break e}throw Error(o(130,e==null?e:typeof e,""))}return t=Dt(f,n,t,a),t.elementType=e,t.type=i,t.lanes=u,t}function sr(e,t,n,i){return e=Dt(7,e,i,t),e.lanes=n,e}function Gl(e,t,n,i){return e=Dt(22,e,i,t),e.elementType=Se,e.lanes=n,e.stateNode={isHidden:!1},e}function oo(e,t,n){return e=Dt(6,e,null,t),e.lanes=n,e}function uo(e,t,n){return t=Dt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function fm(e,t,n,i,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ms(0),this.expirationTimes=Ms(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ms(0),this.identifierPrefix=i,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function co(e,t,n,i,a,u,f,w,y){return e=new fm(e,t,n,w,y),t===1?(t=1,u===!0&&(t|=8)):t=0,u=Dt(3,null,null,t),e.current=u,u.stateNode=e,u.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ba(u),e}function hm(e,t,n){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:G,key:i==null?null:""+i,children:e,containerInfo:t,implementation:n}}function $d(e){if(!e)return An;e=e._reactInternals;e:{if(Zn(e)!==e||e.tag!==1)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(gt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(o(171))}if(e.tag===1){var n=e.type;if(gt(n))return vc(e,n,t)}return t}function Hd(e,t,n,i,a,u,f,w,y){return e=co(n,i,!0,e,a,u,f,w,y),e.context=$d(null),n=e.current,i=ft(),a=On(n),u=hn(i,a),u.callback=t??null,Dn(n,u,a),e.current.lanes=a,ei(e,a,i),yt(e,i),e}function Kl(e,t,n,i){var a=t.current,u=ft(),f=On(a);return n=$d(n),t.context===null?t.context=n:t.pendingContext=n,t=hn(u,f),t.payload={element:e},i=i===void 0?null:i,i!==null&&(t.callback=i),e=Dn(a,t,f),e!==null&&(Gt(e,a,f,u),jl(e,a,f)),f}function Zl(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function Gd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function fo(e,t){Gd(e,t),(e=e.alternate)&&Gd(e,t)}function pm(){return null}var Kd=typeof reportError=="function"?reportError:function(e){console.error(e)};function ho(e){this._internalRoot=e}ql.prototype.render=ho.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));Kl(e,t,null,null)},ql.prototype.unmount=ho.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;rr(function(){Kl(null,e,null,null)}),t[on]=null}};function ql(e){this._internalRoot=e}ql.prototype.unstable_scheduleHydration=function(e){if(e){var t=_u();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Nn.length&&t!==0&&t<Nn[n].priority;n++);Nn.splice(n,0,e),n===0&&Iu(e)}};function po(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ql(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Zd(){}function mm(e,t,n,i,a){if(a){if(typeof i=="function"){var u=i;i=function(){var _=Zl(f);u.call(_)}}var f=Hd(t,i,e,0,null,!1,!1,"",Zd);return e._reactRootContainer=f,e[on]=f.current,pi(e.nodeType===8?e.parentNode:e),rr(),f}for(;a=e.lastChild;)e.removeChild(a);if(typeof i=="function"){var w=i;i=function(){var _=Zl(y);w.call(_)}}var y=co(e,0,!1,null,null,!1,!1,"",Zd);return e._reactRootContainer=y,e[on]=y.current,pi(e.nodeType===8?e.parentNode:e),rr(function(){Kl(t,y,n,i)}),y}function Xl(e,t,n,i,a){var u=n._reactRootContainer;if(u){var f=u;if(typeof a=="function"){var w=a;a=function(){var y=Zl(f);w.call(y)}}Kl(t,f,e,a)}else f=mm(n,t,e,a,i);return Zl(f)}Ru=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Jr(t.pendingLanes);n!==0&&(Ts(t,n|1),yt(t,Ge()),(Ce&6)===0&&(Tr=Ge()+500,zn()))}break;case 13:rr(function(){var i=fn(e,1);if(i!==null){var a=ft();Gt(i,e,1,a)}}),fo(e,1)}},Os=function(e){if(e.tag===13){var t=fn(e,134217728);if(t!==null){var n=ft();Gt(t,e,134217728,n)}fo(e,134217728)}},Pu=function(e){if(e.tag===13){var t=On(e),n=fn(e,t);if(n!==null){var i=ft();Gt(n,e,t,i)}fo(e,t)}},_u=function(){return _e},Au=function(e,t){var n=_e;try{return _e=e,t()}finally{_e=n}},_s=function(e,t,n){switch(t){case"input":if(Qt(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=pl(i);if(!a)throw Error(o(90));q(i),Qt(i,a)}}}break;case"textarea":su(e,n);break;case"select":t=n.value,t!=null&&pr(e,!!n.multiple,t,!1)}},mu=io,gu=rr;var gm={usingClientEntryPoint:!1,Events:[wi,jr,pl,hu,pu,io]},Ai={findFiberByHostInstance:qn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},wm={bundleType:Ai.bundleType,version:Ai.version,rendererPackageName:Ai.rendererPackageName,rendererConfig:Ai.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ue.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=xu(e),e===null?null:e.stateNode},findFiberByHostInstance:Ai.findFiberByHostInstance||pm,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Yl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yl.isDisabled&&Yl.supportsFiber)try{qi=Yl.inject(wm),Xt=Yl}catch{}}return xt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gm,xt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!po(t))throw Error(o(200));return hm(e,t,null,n)},xt.createRoot=function(e,t){if(!po(e))throw Error(o(299));var n=!1,i="",a=Kd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=co(e,1,!1,null,null,n,!1,i,a),e[on]=t.current,pi(e.nodeType===8?e.parentNode:e),new ho(t)},xt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=xu(t),e=e===null?null:e.stateNode,e},xt.flushSync=function(e){return rr(e)},xt.hydrate=function(e,t,n){if(!Ql(t))throw Error(o(200));return Xl(null,e,t,!0,n)},xt.hydrateRoot=function(e,t,n){if(!po(e))throw Error(o(405));var i=n!=null&&n.hydratedSources||null,a=!1,u="",f=Kd;if(n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onRecoverableError!==void 0&&(f=n.onRecoverableError)),t=Hd(t,null,e,1,n??null,a,!1,u,f),e[on]=t.current,pi(e),i)for(e=0;e<i.length;e++)n=i[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new ql(t)},xt.render=function(e,t,n){if(!Ql(t))throw Error(o(200));return Xl(null,e,t,!1,n)},xt.unmountComponentAtNode=function(e){if(!Ql(e))throw Error(o(40));return e._reactRootContainer?(rr(function(){Xl(null,null,e,!1,function(){e._reactRootContainer=null,e[on]=null})}),!0):!1},xt.unstable_batchedUpdates=io,xt.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!Ql(n))throw Error(o(200));if(e==null||e._reactInternals===void 0)throw Error(o(38));return Xl(e,t,n,!1,i)},xt.version="18.3.1-next-f1338f8080-20240426",xt}var nf;function Em(){if(nf)return wo.exports;nf=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(s){console.error(s)}}return r(),wo.exports=jm(),wo.exports}var rf;function Nm(){if(rf)return Jl;rf=1;var r=Em();return Jl.createRoot=r.createRoot,Jl.hydrateRoot=r.hydrateRoot,Jl}var Cm=Nm();const Rm=Of(Cm);var Ho=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Ff=/^[\\/]{2}/;function Pm(r,s){return s+r.replace(/\\/g,"/")}var lf="popstate";function sf(r){return typeof r=="object"&&r!=null&&"pathname"in r&&"search"in r&&"hash"in r&&"state"in r&&"key"in r}function _m(r={}){function s(c,h){let{pathname:m="/",search:g="",hash:p=""}=dr(c.location.hash.substring(1));return!m.startsWith("/")&&!m.startsWith(".")&&(m="/"+m),Lo("",{pathname:m,search:g,hash:p},h.state&&h.state.usr||null,h.state&&h.state.key||"default")}function o(c,h){let m=c.document.querySelector("base"),g="";if(m&&m.getAttribute("href")){let p=c.location.href,x=p.indexOf("#");g=x===-1?p:p.slice(0,x)}return g+"#"+(typeof h=="string"?h:cr(h))}function d(c,h){Wt(c.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(h)})`)}return zm(s,o,d,r)}function Oe(r,s){if(r===!1||r===null||typeof r>"u")throw new Error(s)}function Wt(r,s){if(!r){typeof console<"u"&&console.warn(s);try{throw new Error(s)}catch{}}}function Am(){return Math.random().toString(36).substring(2,10)}function af(r,s){return{usr:r.state,key:r.key,idx:s,masked:r.mask?{pathname:r.pathname,search:r.search,hash:r.hash}:void 0}}function Lo(r,s,o=null,d,c){return{pathname:typeof r=="string"?r:r.pathname,search:"",hash:"",...typeof s=="string"?dr(s):s,state:o,key:s&&s.key||d||Am(),mask:c}}function cr({pathname:r="/",search:s="",hash:o=""}){return s&&s!=="?"&&(r+=s.charAt(0)==="?"?s:"?"+s),o&&o!=="#"&&(r+=o.charAt(0)==="#"?o:"#"+o),r}function dr(r){let s={};if(r){let o=r.indexOf("#");o>=0&&(s.hash=r.substring(o),r=r.substring(0,o));let d=r.indexOf("?");d>=0&&(s.search=r.substring(d),r=r.substring(0,d)),r&&(s.pathname=r)}return s}function zm(r,s,o,d={}){let{window:c=document.defaultView,v5Compat:h=!1}=d,m=c.history,g="POP",p=null,x=b();x==null&&(x=0,m.replaceState({...m.state,idx:x},""));function b(){return(m.state||{idx:null}).idx}function S(){g="POP";let N=b(),$=N==null?null:N-x;x=N,p&&p({action:g,location:I.location,delta:$})}function E(N,$){g="PUSH";let F=sf(N)?N:Lo(I.location,N,$);o&&o(F,N),x=b()+1;let T=af(F,x),ue=I.createHref(F.mask||F);try{m.pushState(T,"",ue)}catch(le){if(le instanceof DOMException&&le.name==="DataCloneError")throw le;c.location.assign(ue)}h&&p&&p({action:g,location:I.location,delta:1})}function M(N,$){g="REPLACE";let F=sf(N)?N:Lo(I.location,N,$);o&&o(F,N),x=b();let T=af(F,x),ue=I.createHref(F.mask||F);m.replaceState(T,"",ue),h&&p&&p({action:g,location:I.location,delta:0})}function R(N){return Im(c,N)}let I={get action(){return g},get location(){return r(c,m)},listen(N){if(p)throw new Error("A history only accepts one active listener");return c.addEventListener(lf,S),p=N,()=>{c.removeEventListener(lf,S),p=null}},createHref(N){return s(c,N)},createURL:R,encodeLocation(N){let $=R(N);return{pathname:$.pathname,search:$.search,hash:$.hash}},push:E,replace:M,go(N){return m.go(N)}};return I}function Im(r,s,o=!1){let d="http://localhost";r&&(d=r.location.origin!=="null"?r.location.origin:r.location.href),Oe(d,"No window.location.(origin|href) available to create URL");let c=typeof s=="string"?s:cr(s);return c=c.replace(/ $/,"%20"),!o&&Ff.test(c)&&(c=d+c),new URL(c,d)}function Bf(r,s,o="/"){return Dm(r,s,o,!1)}function Dm(r,s,o,d,c){let h=typeof s=="string"?dr(s):s,m=xn(h.pathname||"/",o);if(m==null)return null;let g=Lm(r),p=null,x=Gm(m);for(let b=0;p==null&&b<g.length;++b)p=Hm(g[b],x,d);return p}function Lm(r){let s=Vf(r);return Mm(s),s}function Vf(r,s=[],o=[],d="",c=!1){let h=(m,g,p=c,x)=>{let b={relativePath:x===void 0?m.path||"":x,caseSensitive:m.caseSensitive===!0,childrenIndex:g,route:m};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(d)&&p)return;Oe(b.relativePath.startsWith(d),`Absolute route path "${b.relativePath}" nested under path "${d}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(d.length)}let S=qt([d,b.relativePath]),E=o.concat(b);m.children&&m.children.length>0&&(Oe(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${S}".`),Vf(m.children,s,E,S,p)),!(m.path==null&&!m.index)&&s.push({path:S,score:Um(S,m.index),routesMeta:E.map((M,R)=>{let[I,N]=Hf(M.relativePath,M.caseSensitive,R===E.length-1);return{...M,matcher:I,compiledParams:N}})})};return r.forEach((m,g)=>{if(m.path===""||!m.path?.includes("?"))h(m,g);else for(let p of Uf(m.path))h(m,g,!0,p)}),s}function Uf(r){let s=r.split("/");if(s.length===0)return[];let[o,...d]=s,c=o.endsWith("?"),h=o.replace(/\?$/,"");if(d.length===0)return c?[h,""]:[h];let m=Uf(d.join("/")),g=[];return g.push(...m.map(p=>p===""?h:[h,p].join("/"))),c&&g.push(...m),g.map(p=>r.startsWith("/")&&p===""?"/":p)}function Mm(r){r.sort((s,o)=>s.score!==o.score?o.score-s.score:$m(s.routesMeta.map(d=>d.childrenIndex),o.routesMeta.map(d=>d.childrenIndex)))}var Tm=/^:[\w-]+$/,Om=3,Wm=2,Fm=1,Bm=10,Vm=-2,of=r=>r==="*";function Um(r,s){let o=r.split("/"),d=o.length;return o.some(of)&&(d+=Vm),s&&(d+=Wm),o.filter(c=>!of(c)).reduce((c,h)=>c+(Tm.test(h)?Om:h===""?Fm:Bm),d)}function $m(r,s){return r.length===s.length&&r.slice(0,-1).every((d,c)=>d===s[c])?r[r.length-1]-s[s.length-1]:0}function Hm(r,s,o=!1){let{routesMeta:d}=r,c={},h="/",m=[];for(let g=0;g<d.length;++g){let p=d[g],x=g===d.length-1,b=h==="/"?s:s.slice(h.length)||"/",S={path:p.relativePath,caseSensitive:p.caseSensitive,end:x},E=p.matcher&&p.compiledParams?$f(S,b,p.matcher,p.compiledParams):us(S,b),M=p.route;if(!E&&x&&o&&!d[d.length-1].route.index&&(E=us({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},b)),!E)return null;Object.assign(c,E.params),m.push({params:c,pathname:qt([h,E.pathname]),pathnameBase:qm(qt([h,E.pathnameBase])),route:M}),E.pathnameBase!=="/"&&(h=qt([h,E.pathnameBase]))}return m}function us(r,s){typeof r=="string"&&(r={path:r,caseSensitive:!1,end:!0});let[o,d]=Hf(r.path,r.caseSensitive,r.end);return $f(r,s,o,d)}function $f(r,s,o,d){let c=s.match(o);if(!c)return null;let h=c[0],m=Vr(h,1),g=c.slice(1);return{params:d.reduce((x,{paramName:b,isOptional:S},E)=>{if(b==="*"){let R=g[E]||"";m=Vr(h.slice(0,h.length-R.length),1)}const M=g[E];return S&&!M?x[b]=void 0:x[b]=(M||"").replace(/%2F/g,"/"),x},{}),pathname:h,pathnameBase:m,pattern:r}}function Hf(r,s=!1,o=!0){Wt(r==="*"||!r.endsWith("*")||r.endsWith("/*"),`Route path "${r}" will be treated as if it were "${r.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${r.replace(/\*$/,"/*")}".`);let d=[],c="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,g,p,x,b)=>{if(d.push({paramName:g,isOptional:p!=null}),p){let S=b.charAt(x+m.length);return S&&S!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return r.endsWith("*")?(d.push({paramName:"*"}),c+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?c+="\\/*$":r!==""&&r!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,s?void 0:"i"),d]}function Gm(r){try{return r.split("/").map(s=>decodeURIComponent(s).replace(/\//g,"%2F")).join("/")}catch(s){return Wt(!1,`The URL path "${r}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${s}).`),r}}function xn(r,s){if(s==="/")return r;if(!r.toLowerCase().startsWith(s.toLowerCase()))return null;let o=s.endsWith("/")?s.length-1:s.length,d=r.charAt(o);return d&&d!=="/"?null:r.slice(o)||"/"}function Km(r,s="/"){let{pathname:o,search:d="",hash:c=""}=typeof r=="string"?dr(r):r,h;return o?(o=Gf(o),o.startsWith("/")||o.startsWith("\\")?h=uf(o.substring(1),"/"):h=uf(o,s)):h=s,{pathname:h,search:Qm(d),hash:Xm(c)}}function uf(r,s){let o=Vr(s).split("/");return r.split("/").forEach(c=>{c===".."?o.length>1&&o.pop():c!=="."&&o.push(c)}),o.length>1?o.join("/"):"/"}function xo(r,s,o,d){return`Cannot include a '${r}' character in a manually specified \`to.${s}\` field [${JSON.stringify(d)}]. Please separate it out to the \`to.${o}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Zm(r){return r.filter((s,o)=>o===0||s.route.path&&s.route.path.length>0)}function Go(r){let s=Zm(r);return s.map((o,d)=>d===s.length-1?o.pathname:o.pathnameBase)}function ws(r,s,o,d=!1){let c;typeof r=="string"?c=dr(r):(c={...r},Oe(!c.pathname||!c.pathname.includes("?"),xo("?","pathname","search",c)),Oe(!c.pathname||!c.pathname.includes("#"),xo("#","pathname","hash",c)),Oe(!c.search||!c.search.includes("#"),xo("#","search","hash",c)));let h=r===""||c.pathname==="",m=h?"/":c.pathname,g;if(m==null)g=o;else{let S=s.length-1;if(!d&&m.startsWith("..")){let E=m.split("/");for(;E[0]==="..";)E.shift(),S-=1;c.pathname=E.join("/")}g=S>=0?s[S]:"/"}let p=Km(c,g),x=m&&m!=="/"&&m.endsWith("/"),b=(h||m===".")&&o.endsWith("/");return!p.pathname.endsWith("/")&&(x||b)&&(p.pathname+="/"),p}var Gf=r=>r.replace(/[\\/]{2,}/g,"/"),qt=r=>Gf(r.join("/"));function Vr(r,s=0){let o=r.length;for(;o>s&&r.charCodeAt(o-1)===47;)o--;return o===r.length?r:r.slice(0,o)}var qm=r=>Vr(r).replace(/^\/*/,"/"),Qm=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,Xm=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r,Ym=class{constructor(r,s,o,d=!1){this.status=r,this.statusText=s||"",this.internal=d,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}};function Jm(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}function eg(r){let s=r.map(o=>o.route.path).filter(Boolean);return qt(s)||"/"}var Kf=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Zf(r,s){let o=r;if(typeof o!="string"||!Ho.test(o))return{absoluteURL:void 0,isExternal:!1,to:o};let d=o,c=!1;if(Kf)try{let h=new URL(window.location.href),m=Ff.test(o)?new URL(Pm(o,h.protocol)):new URL(o),g=xn(m.pathname,s);m.origin===h.origin&&g!=null?o=g+m.search+m.hash:c=!0}catch{Wt(!1,`<Link to="${o}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:d,isExternal:c,to:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var cf=new URL("http://localhost");function Ko(r){if(r.createURL)return r.createURL("/");try{return new URL(r.createHref("/"),cf)}catch{return cf}}function So(r,s){return r.origin===s.origin&&(r.origin!=="null"||r.protocol===s.protocol&&r.host===s.host)}function tg(r,s){if(r.startsWith("//"))return!0;let o=s.protocol.toLowerCase();return r.toLowerCase().startsWith(o)?s.host===""||r.slice(o.length).startsWith("//"):!1}function Zo(r,s,o,d){let c=null;try{c=r==null?null:new URL(r,o)}catch{}let h=new URL(s,o),m=c!=null&&!So(c,o),g=!So(h,o);if(d==="reject"){if(m||g)throw new Error("External navigation is not allowed")}else if(g&&(c==null||!tg(r,c)||!So(c,h)))throw new Error("External navigation is not allowed")}var qf=["POST","PUT","PATCH","DELETE"];new Set(qf);var ng=["GET",...qf];new Set(ng);var rg=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function ig(r){try{return rg.includes(new URL(r).protocol)}catch{return!1}}var Hr=v.createContext(null);Hr.displayName="DataRouter";var vs=v.createContext(null);vs.displayName="DataRouterState";var Qf=v.createContext(!1);function lg(){return v.useContext(Qf)}var Xf=v.createContext({isTransitioning:!1});Xf.displayName="ViewTransition";var sg=v.createContext(new Map);sg.displayName="Fetchers";var ag=v.createContext(null);ag.displayName="Await";var Rt=v.createContext(null);Rt.displayName="Navigation";var Ui=v.createContext(null);Ui.displayName="Location";var ln=v.createContext({outlet:null,matches:[],isDataRoute:!1});ln.displayName="Route";var qo=v.createContext(null);qo.displayName="RouteError";var Yf="REACT_ROUTER_ERROR",og="REDIRECT",ug="ROUTE_ERROR_RESPONSE";function cg(r){if(r.startsWith(`${Yf}:${og}:{`))try{let s=JSON.parse(r.slice(28));if(typeof s=="object"&&s&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.location=="string"&&typeof s.reloadDocument=="boolean"&&typeof s.replace=="boolean")return s}catch{}}function dg(r){if(r.startsWith(`${Yf}:${ug}:{`))try{let s=JSON.parse(r.slice(40));if(typeof s=="object"&&s&&typeof s.status=="number"&&typeof s.statusText=="string")return new Ym(s.status,s.statusText,s.data)}catch{}}function fg(r,{relative:s}={}){Oe(Gr(),"useHref() may be used only in the context of a <Router> component.");let{basename:o,navigator:d}=v.useContext(Rt),{hash:c,pathname:h,search:m}=$i(r,{relative:s}),g=h;return o!=="/"&&(g=h==="/"?o:qt([o,h])),d.createHref({pathname:g,search:m,hash:c})}function Gr(){return v.useContext(Ui)!=null}function sn(){return Oe(Gr(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(Ui).location}var Jf="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function eh(r){v.useContext(Rt).static||v.useLayoutEffect(r)}function th(){let{isDataRoute:r}=v.useContext(ln);return r?Eg():hg()}function hg(){Oe(Gr(),"useNavigate() may be used only in the context of a <Router> component.");let r=v.useContext(Hr),{basename:s,navigator:o}=v.useContext(Rt),{matches:d}=v.useContext(ln),{pathname:c}=sn(),h=JSON.stringify(Go(d)),m=v.useRef(!1);return eh(()=>{m.current=!0}),v.useCallback((p,x={})=>{if(Wt(m.current,Jf),!m.current)return;if(typeof p=="number"){o.go(p);return}let b=ws(p,JSON.parse(h),c,x.relative==="path");r==null&&s!=="/"&&(b.pathname=b.pathname==="/"?s:qt([s,b.pathname])),Zo(typeof p=="string"?p:cr(p),o.createHref(b),Ko(o),"reject"),(x.replace?o.replace:o.push)(b,x.state,x)},[s,o,h,c,r])}v.createContext(null);function $i(r,{relative:s}={}){let{matches:o}=v.useContext(ln),{pathname:d}=sn(),c=JSON.stringify(Go(o));return v.useMemo(()=>ws(r,JSON.parse(c),d,s==="path"),[r,c,d,s])}function pg(r,s){return nh(r,s)}function nh(r,s,o){Oe(Gr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:d}=v.useContext(Rt),{matches:c}=v.useContext(ln),h=c[c.length-1],m=h?h.params:{},g=h?h.pathname:"/",p=h?h.pathnameBase:"/",x=h&&h.route;{let N=x&&x.path||"";ih(g,!x||N.endsWith("*")||N.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${N}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
9
|
-
|
|
10
|
-
Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}/*`}">.`)}let b=sn(),S;if(s){let N=typeof s=="string"?dr(s):s;Oe(p==="/"||N.pathname?.startsWith(p),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${N.pathname}" was given in the \`location\` prop.`),S=N}else S=b;let E=S.pathname||"/",M=E;if(p!=="/"){let N=p.replace(/^\//,"").split("/");M="/"+E.replace(/^\//,"").split("/").slice(N.length).join("/")}let R=o&&o.state.matches.length?o.state.matches.map(N=>Object.assign(N,{route:o.manifest[N.route.id]||N.route})):Bf(r,{pathname:M});Wt(x||R!=null,`No routes matched location "${S.pathname}${S.search}${S.hash}" `),Wt(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${S.pathname}${S.search}${S.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let I=yg(R&&R.map(N=>Object.assign({},N,{params:Object.assign({},m,N.params),pathname:qt([p,d.encodeLocation?d.encodeLocation(N.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?p:qt([p,d.encodeLocation?d.encodeLocation(N.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathnameBase])})),c,o);return s&&I?v.createElement(Ui.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...S},navigationType:"POP"}},I):I}function mg(){let r=jg(),s=Jm(r)?`${r.status} ${r.statusText}`:r instanceof Error?r.message:JSON.stringify(r),o=r instanceof Error?r.stack:null,d="rgba(200,200,200, 0.5)",c={padding:"0.5rem",backgroundColor:d},h={padding:"2px 4px",backgroundColor:d},m=null;return console.error("Error handled by React Router default ErrorBoundary:",r),m=v.createElement(v.Fragment,null,v.createElement("p",null,"💿 Hey developer 👋"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:h},"ErrorBoundary")," or"," ",v.createElement("code",{style:h},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},s),o?v.createElement("pre",{style:c},o):null,m)}var gg=v.createElement(mg,null),rh=class extends v.Component{constructor(r){super(r),this.state={location:r.location,revalidation:r.revalidation,error:r.error}}static getDerivedStateFromError(r){return{error:r}}static getDerivedStateFromProps(r,s){return s.location!==r.location||s.revalidation!=="idle"&&r.revalidation==="idle"?{error:r.error,location:r.location,revalidation:r.revalidation}:{error:r.error!==void 0?r.error:s.error,location:s.location,revalidation:r.revalidation||s.revalidation}}componentDidCatch(r,s){this.props.onError?this.props.onError(r,s):console.error("React Router caught the following error during render",r)}render(){let r=this.state.error;if(this.context&&typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){const o=dg(r.digest);o&&(r=o)}let s=r!==void 0?v.createElement(ln.Provider,{value:this.props.routeContext},v.createElement(qo.Provider,{value:r,children:this.props.component})):this.props.children;return this.context?v.createElement(wg,{error:r},s):s}};rh.contextType=Qf;var ko=new WeakMap;function wg({children:r,error:s}){let{basename:o,navigator:d}=v.useContext(Rt);if(typeof s=="object"&&s&&"digest"in s&&typeof s.digest=="string"){let c=cg(s.digest);if(c){let h=ko.get(s);if(h)throw h;let m=Zf(c.location,o),g=m.absoluteURL||m.to;if(Zo(c.location,g,Ko(d),"allow-explicit"),ig(g))throw new Error("Invalid redirect location");if(Kf&&!ko.get(s))if(m.isExternal||c.reloadDocument)window.location.href=g;else{const p=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(m.to,{replace:c.replace}));throw ko.set(s,p),p}return v.createElement("meta",{httpEquiv:"refresh",content:`0;url=${g}`})}}return r}function vg({routeContext:r,match:s,children:o}){let d=v.useContext(Hr);return d&&d.static&&d.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(d.staticContext._deepestRenderedBoundaryId=s.route.id),v.createElement(ln.Provider,{value:r},o)}function yg(r,s=[],o){let d=o?.state;if(r==null){if(!d)return null;if(d.errors)r=d.matches;else if(s.length===0&&!d.initialized&&d.matches.length>0)r=d.matches;else return null}let c=r,h=d?.errors;if(h!=null){let b=c.findIndex(S=>S.route.id&&h?.[S.route.id]!==void 0);Oe(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(h).join(",")}`),c=c.slice(0,Math.min(c.length,b+1))}let m=!1,g=-1;if(o&&d){m=d.renderFallback;for(let b=0;b<c.length;b++){let S=c[b];if((S.route.HydrateFallback||S.route.hydrateFallbackElement)&&(g=b),S.route.id){let{loaderData:E,errors:M}=d,R=S.route.loader&&!E.hasOwnProperty(S.route.id)&&(!M||M[S.route.id]===void 0);if(S.route.lazy||R){o.isStatic&&(m=!0),g>=0?c=c.slice(0,g+1):c=[c[0]];break}}}}let p=o?.onError,x=d&&p?(b,S)=>{p(b,{location:d.location,params:d.matches?.[0]?.params??{},pattern:eg(d.matches),errorInfo:S})}:void 0;return c.reduceRight((b,S,E)=>{let M,R=!1,I=null,N=null;d&&(M=h&&S.route.id?h[S.route.id]:void 0,I=S.route.errorElement||gg,m&&(g<0&&E===0?(ih("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),R=!0,N=null):g===E&&(R=!0,N=S.route.hydrateFallbackElement||null)));let $=s.concat(c.slice(0,E+1)),F=()=>{let T;return M?T=I:R?T=N:S.route.Component?T=v.createElement(S.route.Component,null):S.route.element?T=S.route.element:T=b,v.createElement(vg,{match:S,routeContext:{outlet:b,matches:$,isDataRoute:d!=null},children:T})};return d&&(S.route.ErrorBoundary||S.route.errorElement||E===0)?v.createElement(rh,{location:d.location,revalidation:d.revalidation,component:I,error:M,children:F(),routeContext:{outlet:null,matches:$,isDataRoute:!0},onError:x}):F()},null)}function Qo(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function xg(r){let s=v.useContext(Hr);return Oe(s,Qo(r)),s}function Sg(r){let s=v.useContext(vs);return Oe(s,Qo(r)),s}function kg(r){let s=v.useContext(ln);return Oe(s,Qo(r)),s}function Xo(r){let s=kg(r),o=s.matches[s.matches.length-1];return Oe(o.route.id,`${r} can only be used on routes that contain a unique "id"`),o.route.id}function bg(){return Xo("useRouteId")}function jg(){let r=v.useContext(qo),s=Sg("useRouteError"),o=Xo("useRouteError");return r!==void 0?r:s.errors?.[o]}function Eg(){let{router:r}=xg("useNavigate"),s=Xo("useNavigate"),o=v.useRef(!1);return eh(()=>{o.current=!0}),v.useCallback(async(c,h={})=>{Wt(o.current,Jf),o.current&&(typeof c=="number"?await r.navigate(c):await r.navigate(c,{fromRouteId:s,...h}))},[r,s])}var df={};function ih(r,s,o){!s&&!df[r]&&(df[r]=!0,Wt(!1,o))}v.memo(Ng);function Ng({routes:r,manifest:s,future:o,state:d,isStatic:c,onError:h}){return nh(r,void 0,{manifest:s,state:d,isStatic:c,onError:h})}function ff({to:r,replace:s,state:o,relative:d}){Oe(Gr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:c,navigator:h}=v.useContext(Rt);Wt(!c,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:m}=v.useContext(ln),{pathname:g}=sn(),p=th(),x=ws(r,Go(m),g,d==="path");Zo(typeof r=="string"?r:cr(r),h.createHref(x),Ko(h),"reject");let b=JSON.stringify(x);return v.useEffect(()=>{p(JSON.parse(b),{replace:s,state:o,relative:d})},[p,b,d,s,o]),null}function rt(r){Oe(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Cg({basename:r="/",children:s=null,location:o,navigationType:d="POP",navigator:c,static:h=!1,useTransitions:m}){Oe(!Gr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let g=r.replace(/^\/*/,"/"),p=v.useMemo(()=>({basename:g,navigator:c,static:h,useTransitions:m,future:{}}),[g,c,h,m]);typeof o=="string"&&(o=dr(o));let{pathname:x="/",search:b="",hash:S="",state:E=null,key:M="default",mask:R}=o,I=v.useMemo(()=>{let N=xn(x,g);return N==null?null:{location:{pathname:N,search:b,hash:S,state:E,key:M,mask:R},navigationType:d}},[g,x,b,S,E,M,d,R]);return Wt(I!=null,`<Router basename="${g}"> is not able to match the URL "${x}${b}${S}" because it does not start with the basename, so the <Router> won't render anything.`),I==null?null:v.createElement(Rt.Provider,{value:p},v.createElement(Ui.Provider,{children:s,value:I}))}function Rg({children:r,location:s}){return pg(Mo(r),s)}function Mo(r,s=[]){let o=[];return v.Children.forEach(r,(d,c)=>{if(!v.isValidElement(d))return;let h=[...s,c];if(d.type===v.Fragment){o.push.apply(o,Mo(d.props.children,h));return}Oe(d.type===rt,`[${typeof d.type=="string"?d.type:d.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Oe(!d.props.index||!d.props.children,"An index route cannot have child routes.");let m={id:d.props.id||h.join("-"),caseSensitive:d.props.caseSensitive,element:d.props.element,Component:d.props.Component,index:d.props.index,path:d.props.path,middleware:d.props.middleware,loader:d.props.loader,action:d.props.action,hydrateFallbackElement:d.props.hydrateFallbackElement,HydrateFallback:d.props.HydrateFallback,errorElement:d.props.errorElement,ErrorBoundary:d.props.ErrorBoundary,hasErrorBoundary:d.props.hasErrorBoundary===!0||d.props.ErrorBoundary!=null||d.props.errorElement!=null,shouldRevalidate:d.props.shouldRevalidate,handle:d.props.handle,lazy:d.props.lazy};d.props.children&&(m.children=Mo(d.props.children,h)),o.push(m)}),o}var rs="get",is="application/x-www-form-urlencoded";function ys(r){return typeof HTMLElement<"u"&&r instanceof HTMLElement}function Pg(r){return ys(r)&&r.tagName.toLowerCase()==="button"}function _g(r){return ys(r)&&r.tagName.toLowerCase()==="form"}function Ag(r){return ys(r)&&r.tagName.toLowerCase()==="input"}function zg(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function Ig(r,s){return r.button===0&&(!s||s==="_self")&&!zg(r)}var es=null;function Dg(){if(es===null)try{new FormData(document.createElement("form"),0),es=!1}catch{es=!0}return es}var Lg=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function bo(r){return r!=null&&!Lg.has(r)?(Wt(!1,`"${r}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${is}"`),null):r}function Mg(r,s){let o,d,c,h,m;if(_g(r)){let g=r.getAttribute("action");d=g?xn(g,s):null,o=r.getAttribute("method")||rs,c=bo(r.getAttribute("enctype"))||is,h=new FormData(r)}else if(Pg(r)||Ag(r)&&(r.type==="submit"||r.type==="image")){let g=r.form;if(g==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=r.getAttribute("formaction")||g.getAttribute("action");if(d=p?xn(p,s):null,o=r.getAttribute("formmethod")||g.getAttribute("method")||rs,c=bo(r.getAttribute("formenctype"))||bo(g.getAttribute("enctype"))||is,h=new FormData(g,r),!Dg()){let{name:x,type:b,value:S}=r;if(b==="image"){let E=x?`${x}.`:"";h.append(`${E}x`,"0"),h.append(`${E}y`,"0")}else x&&h.append(x,S)}}else{if(ys(r))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');o=rs,d=null,c=is,m=r}return h&&c==="text/plain"&&(m=h,h=void 0),{action:d,method:o.toLowerCase(),encType:c,formData:h,body:m}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Yo(r,s){if(r===!1||r===null||typeof r>"u")throw new Error(s)}function lh(r,s,o,d){let c=typeof r=="string"?new URL(r,typeof window>"u"?"server://singlefetch/":window.location.origin):r;return o?c.pathname.endsWith("/")?c.pathname=`${c.pathname}_.${d}`:c.pathname=`${c.pathname}.${d}`:c.pathname==="/"?c.pathname=`_root.${d}`:s&&xn(c.pathname,s)==="/"?c.pathname=`${Vr(s)}/_root.${d}`:c.pathname=`${Vr(c.pathname)}.${d}`,c}async function Tg(r,s){if(r.id in s)return s[r.id];try{let o=await import(r.module);return s[r.id]=o,o}catch(o){return console.error(`Error loading route module \`${r.module}\`, reloading page...`),console.error(o),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Og(r){return r==null?!1:r.href==null?r.rel==="preload"&&typeof r.imageSrcSet=="string"&&typeof r.imageSizes=="string":typeof r.rel=="string"&&typeof r.href=="string"}async function Wg(r,s,o){let d=await Promise.all(r.map(async c=>{let h=s.routes[c.route.id];if(h){let m=await Tg(h,o);return m.links?m.links():[]}return[]}));return Ug(d.flat(1).filter(Og).filter(c=>c.rel==="stylesheet"||c.rel==="preload").map(c=>c.rel==="stylesheet"?{...c,rel:"prefetch",as:"style"}:{...c,rel:"prefetch"}))}function hf(r,s,o,d,c,h){let m=(p,x)=>o[x]?p.route.id!==o[x].route.id:!0,g=(p,x)=>o[x].pathname!==p.pathname||o[x].route.path?.endsWith("*")&&o[x].params["*"]!==p.params["*"];return h==="assets"?s.filter((p,x)=>m(p,x)||g(p,x)):h==="data"?s.filter((p,x)=>{let b=d.routes[p.route.id];if(!b||!b.hasLoader)return!1;if(m(p,x)||g(p,x))return!0;if(p.route.shouldRevalidate){let S=p.route.shouldRevalidate({currentUrl:new URL(c.pathname+c.search+c.hash,window.origin),currentParams:o[0]?.params||{},nextUrl:new URL(r,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof S=="boolean")return S}return!0}):[]}function Fg(r,s,{includeHydrateFallback:o}={}){return Bg(r.map(d=>{let c=s.routes[d.route.id];if(!c)return[];let h=[c.module];return c.clientActionModule&&(h=h.concat(c.clientActionModule)),c.clientLoaderModule&&(h=h.concat(c.clientLoaderModule)),o&&c.hydrateFallbackModule&&(h=h.concat(c.hydrateFallbackModule)),c.imports&&(h=h.concat(c.imports)),h}).flat(1))}function Bg(r){return[...new Set(r)]}function Vg(r){let s={},o=Object.keys(r).sort();for(let d of o)s[d]=r[d];return s}function Ug(r,s){let o=new Set;return new Set(s),r.reduce((d,c)=>{let h=JSON.stringify(Vg(c));return o.has(h)||(o.add(h),d.push({key:h,link:c})),d},[])}function Jo(){let r=v.useContext(Hr);return Yo(r,"You must render this element inside a <DataRouterContext.Provider> element"),r}function $g(){let r=v.useContext(vs);return Yo(r,"You must render this element inside a <DataRouterStateContext.Provider> element"),r}var eu=v.createContext(void 0);eu.displayName="FrameworkContext";function xs(){let r=v.useContext(eu);return Yo(r,"You must render this element inside a <HydratedRouter> element"),r}function Hg(r,s){let o=v.useContext(eu),[d,c]=v.useState(!1),[h,m]=v.useState(!1),{onFocus:g,onBlur:p,onMouseEnter:x,onMouseLeave:b,onTouchStart:S}=s,E=v.useRef(null);v.useEffect(()=>{if(r==="render"&&m(!0),r==="viewport"){let I=$=>{$.forEach(F=>{m(F.isIntersecting)})},N=new IntersectionObserver(I,{threshold:.5});return E.current&&N.observe(E.current),()=>{N.disconnect()}}},[r]),v.useEffect(()=>{if(d){let I=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(I)}}},[d]);let M=()=>{c(!0)},R=()=>{c(!1),m(!1)};return o?r!=="intent"?[h,E,{}]:[h,E,{onFocus:Ii(g,M),onBlur:Ii(p,R),onMouseEnter:Ii(x,M),onMouseLeave:Ii(b,R),onTouchStart:Ii(S,M)}]:[!1,E,{}]}function Ii(r,s){return o=>{r&&r(o),o.defaultPrevented||s(o)}}function Gg({page:r,...s}){let o=lg(),{nonce:d}=xs(),{router:c}=Jo(),h=v.useMemo(()=>Bf(c.routes,r,c.basename),[c.routes,r,c.basename]);return h?(s.nonce==null&&d&&(s={...s,nonce:d}),o?v.createElement(Zg,{page:r,matches:h,...s}):v.createElement(qg,{page:r,matches:h,...s})):null}function Kg(r){let{manifest:s,routeModules:o}=xs(),[d,c]=v.useState([]);return v.useEffect(()=>{let h=!1;return Wg(r,s,o).then(m=>{h||c(m)}),()=>{h=!0}},[r,s,o]),d}function Zg({page:r,matches:s,...o}){let d=sn(),{future:c}=xs(),{basename:h}=Jo(),m=v.useMemo(()=>{if(r===d.pathname+d.search+d.hash)return[];let g=lh(r,h,c.v8_trailingSlashAwareDataRequests,"rsc"),p=!1,x=[];for(let b of s)typeof b.route.shouldRevalidate=="function"?p=!0:x.push(b.route.id);return p&&x.length>0&&g.searchParams.set("_routes",x.join(",")),[g.pathname+g.search]},[h,c.v8_trailingSlashAwareDataRequests,r,d,s]);return v.createElement(v.Fragment,null,m.map(g=>v.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...o})))}function qg({page:r,matches:s,...o}){let d=sn(),{future:c,manifest:h,routeModules:m}=xs(),{basename:g}=Jo(),{loaderData:p,matches:x}=$g(),b=v.useMemo(()=>hf(r,s,x,h,d,"data"),[r,s,x,h,d]),S=v.useMemo(()=>hf(r,s,x,h,d,"assets"),[r,s,x,h,d]),E=v.useMemo(()=>{if(r===d.pathname+d.search+d.hash)return[];let I=new Set,N=!1;if(s.forEach(F=>{let T=h.routes[F.route.id];!T||!T.hasLoader||(!b.some(ue=>ue.route.id===F.route.id)&&F.route.id in p&&m[F.route.id]?.shouldRevalidate||T.hasClientLoader?N=!0:I.add(F.route.id))}),I.size===0)return[];let $=lh(r,g,c.v8_trailingSlashAwareDataRequests,"data");return N&&I.size>0&&$.searchParams.set("_routes",s.filter(F=>I.has(F.route.id)).map(F=>F.route.id).join(",")),[$.pathname+$.search]},[g,c.v8_trailingSlashAwareDataRequests,p,d,h,b,s,r,m]),M=v.useMemo(()=>Fg(S,h),[S,h]),R=Kg(S);return v.createElement(v.Fragment,null,E.map(I=>v.createElement("link",{key:I,rel:"prefetch",as:"fetch",href:I,...o})),M.map(I=>v.createElement("link",{key:I,rel:"modulepreload",href:I,...o})),R.map(({key:I,link:N})=>v.createElement("link",{key:I,nonce:o.nonce,...N,crossOrigin:N.crossOrigin??o.crossOrigin})))}function Qg(...r){return s=>{r.forEach(o=>{typeof o=="function"?o(s):o!=null&&(o.current=s)})}}var Xg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Xg&&(window.__reactRouterVersion="7.18.4")}catch{}function Yg({basename:r,children:s,useTransitions:o,window:d}){let c=v.useRef();c.current==null&&(c.current=_m({window:d,v5Compat:!0}));let h=c.current,[m,g]=v.useState({action:h.action,location:h.location}),p=v.useCallback(x=>{o===!1?g(x):v.startTransition(()=>g(x))},[o]);return v.useLayoutEffect(()=>h.listen(p),[h,p]),v.createElement(Cg,{basename:r,children:s,location:m.location,navigationType:m.action,navigator:h,useTransitions:o})}var tu=v.forwardRef(function({onClick:s,discover:o="render",prefetch:d="none",relative:c,reloadDocument:h,replace:m,mask:g,state:p,target:x,to:b,preventScrollReset:S,viewTransition:E,defaultShouldRevalidate:M,...R},I){let{basename:N,navigator:$,useTransitions:F}=v.useContext(Rt),T=typeof b=="string"&&Ho.test(b),ue=Zf(b,N);b=ue.to;let le=fg(b,{relative:c}),G=sn(),de=null;if(g){let X=ws(g,[],G.mask?G.mask.pathname:"/",!0);N!=="/"&&(X.pathname=X.pathname==="/"?N:qt([N,X.pathname])),de=$.createHref(X)}let[Y,je,D]=Hg(d,R),ce=nw(b,{replace:m,mask:g,state:p,target:x,preventScrollReset:S,relative:c,viewTransition:E,defaultShouldRevalidate:M,useTransitions:F});function A(X){s&&s(X),X.defaultPrevented||ce(X)}let Z=!(ue.isExternal||h),be=v.createElement("a",{...R,...D,href:(Z?de:void 0)||ue.absoluteURL||le,onClick:Z?A:s,ref:Qg(I,je),target:x,"data-discover":!T&&o==="render"?"true":void 0});return Y&&!T?v.createElement(v.Fragment,null,be,v.createElement(Gg,{page:le})):be});tu.displayName="Link";var Jg=v.forwardRef(function({"aria-current":s="page",caseSensitive:o=!1,className:d="",end:c=!1,style:h,to:m,viewTransition:g,children:p,...x},b){let S=$i(m,{relative:x.relative}),E=sn(),M=v.useContext(vs),{navigator:R,basename:I}=v.useContext(Rt),N=M!=null&&aw(S)&&g===!0,$=R.encodeLocation?R.encodeLocation(S).pathname:S.pathname,F=E.pathname,T=M&&M.navigation&&M.navigation.location?M.navigation.location.pathname:null;o||(F=F.toLowerCase(),T=T?T.toLowerCase():null,$=$.toLowerCase()),T&&I&&(T=xn(T,I)||T);const ue=$!=="/"&&$.endsWith("/")?$.length-1:$.length;let le=F===$||!c&&F.startsWith($)&&F.charAt(ue)==="/",G=T!=null&&(T===$||!c&&T.startsWith($)&&T.charAt($.length)==="/"),de={isActive:le,isPending:G,isTransitioning:N},Y=le?s:void 0,je;typeof d=="function"?je=d(de):je=[d,le?"active":null,G?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let D=typeof h=="function"?h(de):h;return v.createElement(tu,{...x,"aria-current":Y,className:je,ref:b,style:D,to:m,viewTransition:g},typeof p=="function"?p(de):p)});Jg.displayName="NavLink";var ew=v.forwardRef(({discover:r="render",fetcherKey:s,navigate:o,reloadDocument:d,replace:c,state:h,method:m=rs,action:g,onSubmit:p,relative:x,preventScrollReset:b,viewTransition:S,defaultShouldRevalidate:E,...M},R)=>{let{useTransitions:I}=v.useContext(Rt),N=lw(),$=sw(g,{relative:x}),F=m.toLowerCase()==="get"?"get":"post",T=typeof g=="string"&&Ho.test(g),ue=le=>{if(p&&p(le),le.defaultPrevented)return;le.preventDefault();let G=le.nativeEvent.submitter,de=G?.getAttribute("formmethod")||m,Y=()=>N(G||le.currentTarget,{fetcherKey:s,method:de,navigate:o,replace:c,state:h,relative:x,preventScrollReset:b,viewTransition:S,defaultShouldRevalidate:E});I&&o!==!1?v.startTransition(()=>Y()):Y()};return v.createElement("form",{ref:R,method:F,action:$,onSubmit:d?p:ue,...M,"data-discover":!T&&r==="render"?"true":void 0})});ew.displayName="Form";function tw(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function sh(r){let s=v.useContext(Hr);return Oe(s,tw(r)),s}function nw(r,{target:s,replace:o,mask:d,state:c,preventScrollReset:h,relative:m,viewTransition:g,defaultShouldRevalidate:p,useTransitions:x}={}){let b=th(),S=sn(),E=$i(r,{relative:m});return v.useCallback(M=>{if(Ig(M,s)){M.preventDefault();let R=o!==void 0?o:cr(S)===cr(E),I=()=>b(r,{replace:R,mask:d,state:c,preventScrollReset:h,relative:m,viewTransition:g,defaultShouldRevalidate:p});x?v.startTransition(()=>I()):I()}},[S,b,E,o,d,c,s,r,h,m,g,p,x])}var rw=0,iw=()=>`__${String(++rw)}__`;function lw(){let{router:r}=sh("useSubmit"),{basename:s}=v.useContext(Rt),o=bg(),d=r.fetch,c=r.navigate;return v.useCallback(async(h,m={})=>{let{action:g,method:p,encType:x,formData:b,body:S}=Mg(h,s);if(m.navigate===!1){let E=m.fetcherKey||iw();await d(E,o,m.action||g,{defaultShouldRevalidate:m.defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:b,body:S,formMethod:m.method||p,formEncType:m.encType||x,flushSync:m.flushSync})}else await c(m.action||g,{defaultShouldRevalidate:m.defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:b,body:S,formMethod:m.method||p,formEncType:m.encType||x,replace:m.replace,state:m.state,fromRouteId:o,flushSync:m.flushSync,viewTransition:m.viewTransition})},[d,c,s,o])}function sw(r,{relative:s}={}){let{basename:o}=v.useContext(Rt),d=v.useContext(ln);Oe(d,"useFormAction must be used inside a RouteContext");let[c]=d.matches.slice(-1),h={...$i(r||".",{relative:s})},m=sn();if(r==null){h.search=m.search;let g=new URLSearchParams(h.search),p=g.getAll("index");if(p.some(b=>b==="")){g.delete("index"),p.filter(S=>S).forEach(S=>g.append("index",S));let b=g.toString();h.search=b?`?${b}`:""}}return(!r||r===".")&&c.route.index&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(h.pathname=h.pathname==="/"?o:qt([o,h.pathname])),cr(h)}function aw(r,{relative:s}={}){let o=v.useContext(Xf);Oe(o!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:d}=sh("useViewTransitionState"),c=$i(r,{relative:s});if(!o.isTransitioning)return!1;let h=xn(o.currentLocation.pathname,d)||o.currentLocation.pathname,m=xn(o.nextLocation.pathname,d)||o.nextLocation.pathname;return us(c.pathname,m)!=null||us(c.pathname,h)!=null}const ah=1500,jo=16*1024*1024;class Pe extends Error{constructor(s,o,d){super(s),this.status=o,this.payload=d,this.name="RuntimeRequestError"}status;payload}function Ss(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function cs(r){return Ss(r)&&typeof r.status=="number"&&Number.isInteger(r.status)?r.status:0}function St(r,s){return Ss(r)&&typeof r.message=="string"&&r.message?r.message:s}function To(r,s=0,o={remaining:1e5}){if(o.remaining-=1,s>40||o.remaining<0)throw new Error("API-Daten überschreiten die zulässige Strukturgröße.");if(r===null||typeof r=="string"||typeof r=="boolean"||typeof r=="number"&&Number.isFinite(r))return r;if(Array.isArray(r))return r.map(c=>To(c,s+1,o));if(!Ss(r))throw new Error("Ungültige JSON-Daten.");const d=Object.create(null);for(const[c,h]of Object.entries(r)){if(c==="__proto__"||c==="prototype"||c==="constructor")throw new Error("Unzulässiger API-Datenschlüssel.");d[c]=To(h,s+1,o)}return d}function oh(r){const s=To(r);if(!Ss(s))throw new Error("Ungültige API-Antwort.");return s}function uh(r){const s=oh(r);if(typeof s.enabled!="boolean"||typeof s.authed!="boolean"||typeof s.role!="string"||typeof s.configured!="boolean"||!["iobroker","eos"].includes(String(s.mode))||!["none","customer","installer","admin"].includes(s.role)||s.authenticated!==void 0&&s.authenticated!==s.authed||!Array.isArray(s.capabilities)||!s.capabilities.every(o=>typeof o=="string")||s.capabilities.length>128||s.user!==void 0&&s.user!==null&&typeof s.user!="string"||s.authed&&(s.configured!==!0||!s.user||s.role==="none"||typeof s.csrfToken!="string"||!/^[A-Za-z0-9+/_=-]{16,1024}$/.test(s.csrfToken)))throw new Error("Ungültiger EOS-Anmeldestatus.");return{...s,enabled:s.enabled,configured:s.configured,mode:s.mode,authed:s.authed,role:s.role,loginUrl:typeof s.loginUrl=="string"&&s.loginUrl.length<=4096?s.loginUrl:"",logoutUrl:typeof s.logoutUrl=="string"&&s.logoutUrl.length<=4096?s.logoutUrl:"",csrfToken:s.authed&&typeof s.csrfToken=="string"?s.csrfToken:"",capabilities:s.capabilities,user:typeof s.user=="string"?s.user:null}}class Oo extends Error{constructor(){super("API-Antwort ist zu groß (maximal 16 MiB)."),this.name="ApiResponseLimitError"}}async function ow(r,s){const o=r.body;if(!o||o.locked)throw s.abort(),new Error("API-Antwort enthält keinen lesbaren Datenstrom.");const d=o.getReader(),c=s.signal,h=()=>{d.cancel().catch(()=>{})};c.addEventListener("abort",h,{once:!0});try{if(c.aborted)throw new Error("API-Abruf abgebrochen.");const m=r.headers.get("content-length");if(m!==null){if(!/^\d+$/.test(m)||!Number.isSafeInteger(Number(m)))throw new Error("Ungültige API-Antwortgröße.");if(Number(m)>jo)throw new Oo}let g=new Uint8Array(64*1024),p=0;for(;;){const S=await d.read();if(c.aborted)throw new Error("API-Abruf abgebrochen.");if(S.done)break;const E=p+S.value.byteLength;if(E>jo)throw new Oo;if(E>g.byteLength){const M=new Uint8Array(Math.min(jo,Math.max(E,g.byteLength*2)));M.set(g.subarray(0,p)),g=M}g.set(S.value,p),p=E}const x=new TextDecoder("utf-8",{fatal:!0}).decode(g.subarray(0,p));return JSON.parse(x)}catch(m){throw s.abort(),h(),m}finally{c.removeEventListener("abort",h),d.releaseLock()}}async function ch(r,s,o=!1){const d=/^application\/json(?:\s*;|$)/i.test(r.headers.get("content-type")||"");if(o&&!d&&[401,403,404,502].includes(r.status))throw s.abort(),r.body&&r.body.cancel().catch(()=>{}),r.status===401?new Pe("Die Anmeldung an der Systemverwaltung ist abgelaufen. Bitte dort erneut anmelden.",401,{error:"admin_proxy_auth_required"}):r.status===403?new Pe("Der Admin-Proxy benötigt ein Konto aus der Administratorgruppe der Systemverwaltung.",403,{error:"admin_proxy_forbidden"}):r.status===404?new Pe("Der Admin-Proxy dieser Instanz ist nicht verfügbar. Admin-Version und Instanzfreigabe prüfen.",404,{error:"admin_proxy_unavailable"}):new Pe("Der UI-Adapter ist über den Admin-Proxy nicht erreichbar. Instanzstatus und Port prüfen.",502,{error:"runtime_unreachable"});let c;try{const h=await ow(r,s);c=oh(h)}catch(h){const m=Object.create(null),g=r.ok?h instanceof Oo?h.message:"Ungültige API-Antwort.":`HTTP ${r.status}`;throw new Pe(g,r.status,m)}if(!r.ok||c.ok===!1){const h=typeof c.message=="string"?c.message:typeof c.error=="string"?c.error:`HTTP ${r.status}`;throw new Pe(h,r.status,c)}return c}function Ur(r){if(typeof r!="string"||!/^(0|[1-9]\d{0,5})$/.test(r))throw new Pe("Ungültige Adapterinstanz.",0,{error:"runtime_instance_invalid"});return r}function an(){const r=new URLSearchParams(window.location.search||"").get("instance");if(r!==null)return Ur(r);const s="/proxy/nexowatt-ui.",o=window.location.pathname||"/",d=o.indexOf(s);if(d>=0){const c=o.slice(d+s.length),h=c.indexOf("/");return Ur(h<0?c:c.slice(0,h))}return"0"}function Eo(r){if(typeof r!="string"||r.length>256||!r.startsWith("/")||!r.endsWith("/"))throw new Pe("Der Admin-Verbindungspfad ist ungültig.",0,{error:"runtime_path_invalid"});const s=r.slice(1,-1).split("/");if(r!=="/"&&(s.length>16||s.some(o=>!/^[A-Za-z0-9._~-]{1,128}$/.test(o)||o==="."||o==="..")))throw new Pe("Der Admin-Verbindungspfad ist ungültig.",0,{error:"runtime_path_invalid"});if(/\/proxy\/nexowatt-ui\.(?:0|[1-9][0-9]{0,5})\//u.test(r))throw new Pe("Der Admin-Verbindungspfad ist mehrdeutig.",0,{error:"runtime_path_invalid"});return r}function pf(r,s){const o=`${r}proxy/nexowatt-ui.${s}`;if(o.length>256)throw new Pe("Der Admin-Verbindungspfad ist zu lang.",0,{error:"runtime_path_invalid"});return dh()+o}function dh(){const r=window.location.protocol;if(r!=="http:"&&r!=="https:")throw new Pe("Für die EOS-Verbindung ist HTTP oder HTTPS erforderlich.",0,{error:"runtime_protocol_invalid"});const s=window.location.hostname;if(!s||/[\\\s/?#@]/.test(s))throw new Pe("Der EOS-Hostname ist ungültig.",0,{error:"runtime_host_invalid"});const o=window.location.port;if(o&&(!/^\d{1,5}$/.test(o)||Number(o)<1||Number(o)>65535))throw new Pe("Der EOS-Port ist ungültig.",0,{error:"runtime_port_invalid"});return`${r}//${s}${o?`:${o}`:""}`}function Sn(r=an()){const s=Ur(r),o=window.location.pathname||"/",d="/proxy/nexowatt-ui.",c=o.indexOf(d);if(c>=0){if(o.indexOf(d,c+d.length)>=0||o.indexOf("/adapter/nexowatt-ui/",c+d.length)>=0)throw new Pe("Der Admin-Verbindungspfad ist mehrdeutig.",0,{error:"runtime_path_invalid"});const b=o.slice(c+d.length),S=b.indexOf("/");if(Ur(S<0?b:b.slice(0,S))!==s)throw new Pe("Die Seite gehört zu einer anderen Adapterinstanz.",0,{error:"runtime_instance_mismatch"});const M=Eo(o.slice(0,c+1));return pf(M,s)}if(window.location.protocol!=="https:")return null;const h="/adapter/nexowatt-ui/",m=o.indexOf(h);if(m<0)return null;const g=Eo(o.slice(0,m+1)),p=o.slice(m+h.length);if(p!=="tab.html"&&p!=="react/index.html"&&p!=="react/"&&p!=="react")throw new Pe("Der Admin-Einstiegspfad ist unbekannt.",0,{error:"runtime_path_invalid"});const x=No(()=>window.socketPath)||No(()=>window.parent&&window.parent.socketPath)||No(()=>window.top&&window.top.socketPath);if(x!=null&&x!==""&&!(typeof x=="string"&&x.includes("@@"))&&Eo(x)!==g)throw new Pe("Admin-Pfad und Verbindungspfad stimmen nicht überein.",0,{error:"runtime_path_mismatch"});return pf(g,s)}async function ks(r=an(),s=null){return dh()}function No(r){try{return r()}catch{return null}}async function mf(r,s=ah,o={}){const d=new AbortController;let c,h=!1;try{c=setTimeout(()=>{h=!0,d.abort()},s);const m=await fetch(r,{method:"GET",cache:"no-store",redirect:"error",credentials:o.credentials||"omit",headers:o.headers||void 0,signal:d.signal});return await ch(m,d,o.adminProxy===!0)}catch(m){throw h?new Pe("Der UI-Adapter antwortet nicht rechtzeitig. Bitte Verbindung und Adapterstatus prüfen.",0,{error:"runtime_timeout"}):m instanceof Pe?m:new Pe("Die Verbindung zum UI-Adapter ist nicht erreichbar. Bitte Zugriffspfad und Adapterstatus prüfen.",0,{error:"runtime_network_error"})}finally{c&&clearTimeout(c)}}async function uw(r,s,o=ah,d={}){const c=new AbortController;let h,m=!1;try{h=setTimeout(()=>{m=!0,c.abort()},o);const g=await fetch(r,{method:"POST",cache:"no-store",redirect:"error",credentials:d.credentials||"omit",headers:{"Content-Type":"application/json",...d.headers||{}},body:JSON.stringify(s||{}),signal:c.signal});return await ch(g,c,d.adminProxy===!0)}catch(g){throw m?new Pe("Der UI-Adapter antwortet nicht rechtzeitig. Bitte Verbindung und Adapterstatus prüfen.",0,{error:"runtime_timeout"}):g instanceof Pe?g:new Pe("Die Verbindung zum UI-Adapter ist nicht erreichbar. Bitte Zugriffspfad und Adapterstatus prüfen.",0,{error:"runtime_network_error"})}finally{h&&clearTimeout(h)}}async function fr(r,s=null,o=6e3,d=an(),c=null){const h=Date.now()+o,m=await ks(d,c);let g=h-Date.now();if(g<=0)throw new Pe("Der UI-Adapter antwortet nicht rechtzeitig. Bitte Verbindung und Adapterstatus prüfen.",0,{error:"runtime_timeout"});const p={credentials:"include",adminProxy:m.includes("/proxy/nexowatt-ui.")},x=m+r;if(s!==null){if(new URL(x).origin!==window.location.origin)throw new Pe("Schreibzugriffe benötigen den gemeinsamen HTTPS-Zugang zur UI.",0,{error:"runtime_same_origin_required"});if(!/^\/api\/(?:auth|strict-auth)\/login(?:\?|$)/.test(r)){const b=uh(await mf(m+"/api/auth/status",g,p));if(!b.authed||!b.configured||!b.csrfToken)throw new Pe("Anmeldung erforderlich.",401,{error:"authentication_required"});if(p.headers={"X-NW-CSRF":b.csrfToken},g=h-Date.now(),g<=0)throw new Pe("Die Berechtigungsprüfung hat das Zeitbudget überschritten.",0,{error:"runtime_timeout"})}}return s===null?mf(x,g,p):uw(x,s,g,p)}async function gf(r=an(),s=null){const o=await ks(r,s),d=new URL(o+"/login.html");if(d.username||d.password||d.protocol!=="https:"&&!(d.protocol==="http:"&&["localhost","127.0.0.1","[::1]","::1"].includes(d.hostname)))throw new Pe("Die Anmeldung benötigt einen HTTPS-Zugang.",0,{error:"runtime_secure_route_required"});return d.href}async function cw(r=an(),s=null){return uh(await fr(`/api/strict-auth/status?instance=${encodeURIComponent(Ur(r))}&t=${Date.now()}`,null,6e3,r,s))}async function dw(r=an(),s=null){return await fr(`/api/strict-auth/logout?instance=${encodeURIComponent(Ur(r))}&t=${Date.now()}`,{},6e3,r,s),{ok:!0}}function Kt(r){try{(window.top||window).location.href=r}catch{window.location.href=r}}async function wf(r=null){return fr("/api/installer/notification-mail",r,1e4)}async function ts(r="",s=null){if(!["","/check"].includes(r))throw new Error("Ungültiger Historie-Aufruf.");return fr(`/api/installer/history${r}`,s,15e3)}async function Vn(r="",s=null){return fr(`/api/mesh/coordinator${r}`,s,1e4)}async function Di(r="",s=null){if(!["","/status","/config","/preview"].includes(r))throw new Error("Ungültiger Netzanschluss-Aufruf.");return fr(`/api/dynamic-grid${r}`,s,5e3)}async function vf(r="",s=null){if(!["","/config","/preview","/revoke"].includes(r))throw new Error("Ungültiger Partner-Aufruf.");return fr(`/api/installer/partner-integrations${r}`,s,5e3)}const fw=""+new URL("nexowatt-192-43ZwQ44y.png",import.meta.url).href;function Gn({title:r,subtitle:s,children:o,actions:d=null,compact:c=!1,embedded:h=!1,showBack:m=!0,backLabel:g="Zurück zum Installer"}){v.useEffect(()=>{document.title=r?`NexoWatt EOS – ${r}`:"NexoWatt EOS Admin"},[r]);const p=an();return h?l.jsx("main",{className:"nw-embedded-ems-page",children:o}):l.jsxs("div",{className:"nw-page-shell",children:[l.jsx("div",{className:"nw-page-gradient"}),l.jsxs("div",{className:`nw-page-wrap ${c?"nw-page-wrap--compact":""}`,children:[l.jsxs("header",{className:"nw-hero",children:[l.jsxs("div",{className:"nw-brand",children:[l.jsx("img",{className:"nw-brand__logo",src:fw,alt:"NexoWatt EOS",width:52,height:52}),l.jsx("div",{children:l.jsx("h1",{children:r})})]}),l.jsxs("div",{className:"nw-instance-badge",children:["Instanz ",p]})]}),s||m||d?l.jsxs("section",{className:"nw-header-card",children:[s?l.jsx("p",{className:"nw-subtitle",children:s}):null,l.jsxs("div",{className:"nw-header-card__actions",children:[m?l.jsx(tu,{className:"nw-link-button",to:"/installer",children:g}):null,d]})]}):null,o]})]})}function hw({children:r}){const s=v.useRef(null);return v.useEffect(()=>{const o=s.current;if(!o)return;const d=document.documentElement,c=document.body,h=d.classList.contains("nw-ems-embedded"),m=c.classList.contains("nw-ems-embedded"),g=c.classList.contains("nw-cockpit-page");d.classList.add("nw-ems-embedded"),c.classList.add("nw-ems-embedded","nw-cockpit-page");const p=document.createElement("link");p.rel="stylesheet",p.href=`${Sn()??""}/static/styles.css`,p.dataset.nwEmbeddedEms="true",document.head.appendChild(p);let x=!0,b=0,S=0;const E=()=>{!x||b||(b=window.requestAnimationFrame(()=>{b=0;const R=Math.max(1,Math.ceil(o.getBoundingClientRect().height)+1);R!==S&&(S=R,window.parent.postMessage({type:"nw:dynamic-grid-height",height:R},window.location.origin))}))},M=new ResizeObserver(E);return M.observe(o),p.addEventListener("load",E),window.addEventListener("resize",E),document.fonts?.ready.then(E).catch(()=>{}),E(),()=>{x=!1,M.disconnect(),window.cancelAnimationFrame(b),window.removeEventListener("resize",E),p.removeEventListener("load",E),p.remove(),h||d.classList.remove("nw-ems-embedded"),m||c.classList.remove("nw-ems-embedded"),g||c.classList.remove("nw-cockpit-page")}},[]),l.jsx("div",{className:"nw-embedded-ems-content",ref:s,children:r})}function yf(r){if(!r||r.length>4096||/[\\\u0000-\u0020\u007f]/.test(r)||r.startsWith("//"))return"";try{const s=new URL(r,window.location.origin);return s.username||s.password||!["http:","https:"].includes(s.protocol)||s.origin!==window.location.origin&&s.protocol!=="https:"?"":s.href}catch{return""}}const fh=v.createContext(null);function pw(){return v.useContext(fh)}function xf(r,s,o=null){if(Array.isArray(o)&&!o.includes(r?.role||"")||["license.manage","notifications.manage"].includes(String(s||""))&&r?.role!=="admin"||s==="mesh.configure"&&!["admin","installer"].includes(r?.role||""))return!1;const d=Array.isArray(r?.capabilities)?r.capabilities.map(String):[];return d.includes("*")||d.includes(String(s||""))}function Lt({capability:r,title:s,requiredRole:o="Installer oder Admin",allowedRoles:d=null,embedded:c=!1,children:h}){const m=an(),g=c&&window.parent!==window&&new URLSearchParams(window.location.search).get("embedded")==="1",p=X=>g?l.jsx(hw,{children:X}):X,[x,b]=v.useState("checking"),[S,E]=v.useState(null),[M,R]=v.useState(""),[I,N]=v.useState(!1),[$,F]=v.useState("Berechtigung wird geprüft…"),[T,ue]=v.useState(!1),le=v.useRef(!1),G=v.useRef(0),de=v.useRef(!1),Y=v.useRef(null),je=v.useRef(!1),D=v.useMemo(()=>!!(S?.enabled!==!1&&S?.authed&&xf(S,r,d)),[S,r,d]),ce=v.useCallback(X=>(E(X),X.enabled===!1||!X.configured?(b("locked"),F("Die Anmeldung ist noch nicht korrekt eingerichtet. Der geschützte Bereich bleibt gesperrt."),"denied"):X.authed&&xf(X,r,d)?(b("authorized"),F("Zugriff freigegeben."),"authorized"):(b("locked"),F(X.authed?`Das angemeldete Konto besitzt nicht die erforderliche Rolle (${o}).`:X.mode==="eos"?`Bitte zentral im EOS mit der Rolle ${o} anmelden.`:`Bitte mit einem Benutzerkonto der Rolle ${o} anmelden.`),"denied")),[r,o,d]),A=v.useCallback(X=>(E(null),R(""),b("locked"),F(`Berechtigungsprüfung nicht erreichbar: ${St(X,"Verbindung nicht verfügbar")}. Der Bereich bleibt gesperrt.`),"unavailable"),[]),Z=v.useCallback(async({silent:X=!1}={})=>{if(!le.current||de.current||Y.current!==null||X&&je.current)return"stale";X||(je.current=!1);const fe=++G.current;Y.current=fe;const Se=()=>le.current&&G.current===fe;X||(b("checking"),F("Berechtigung wird geprüft…"));try{const B=await cw(m,null);if(!Se())return"stale";const ae=ce(B);if(B.configured&&(!B.authed||ae==="denied")){const K=!B.authed&&B.mode==="eos"?yf(B.loginUrl):await gf(m,null);Se()&&R(K)}return ae}catch(B){return Se()?A(B):"stale"}finally{Y.current===fe&&(Y.current=null)}},[ce,A,m]);v.useEffect(()=>{le.current=!0,de.current=!1,ue(!1),Z().catch(()=>{});const X=()=>{Z({silent:!0}).catch(()=>{})};window.addEventListener("focus",X);const fe=window.setInterval(()=>{Z({silent:!0}).catch(()=>{})},3e4);return()=>{le.current=!1,G.current+=1,Y.current=null,de.current=!1,window.clearInterval(fe),window.removeEventListener("focus",X)}},[Z]);const be=async()=>{if(!le.current||de.current)return;const X=S,fe=++G.current,Se=()=>le.current&&G.current===fe;Y.current=null,de.current=!0,je.current=!0,ue(!0),E(null),b("locked"),F("Abmeldung läuft…");try{if(await dw(m,null),!Se())return;if(window.navigator.serviceWorker?.controller?.postMessage({type:"NW_AUTH_LOGOUT"}),X?.mode==="eos")R(yf(X.logoutUrl)),N(!0),F("Die Ansicht ist gesperrt. Bitte die zentrale EOS-Abmeldung im eigenen Fenster abschließen.");else{const B=await gf(m,null);if(!Se())return;R(B),N(!1),F(`Abgemeldet. Bitte mit einem Benutzerkonto der Rolle ${o} anmelden.`)}}catch(B){Se()&&F(`Ansicht gesperrt. Die Abmeldung konnte nicht bestätigt werden: ${St(B,"Verbindung nicht verfügbar")}. Bitte erneut prüfen.`)}finally{Se()&&(de.current=!1,ue(!1))}};return p(D&&x==="authorized"?l.jsx(fh.Provider,{value:S,children:l.jsxs("div",{className:"nw-protected-route",children:[!g&&l.jsxs("div",{className:"nw-protected-route__session",children:[l.jsx("span",{children:S?.user?`Angemeldet als ${S.user} (${S.role||"berechtigt"})`:"Geschützter Zugriff aktiv"}),l.jsx("button",{className:"nw-button",disabled:T,onClick:be,type:"button",children:"Abmelden"})]}),h]})}):l.jsx(Gn,{embedded:g,title:s,subtitle:`Dieser Bereich ist ausschließlich für ${o} freigegeben. Inhalte und Lizenzdaten werden erst nach erfolgreicher EOS-Anmeldung geladen.`,showBack:!1,compact:!0,children:l.jsxs("section",{className:"nw-card nw-access-gate","aria-busy":x==="checking"||T,children:[l.jsx("h2",{children:"Zugriff geschützt"}),l.jsx("p",{className:"nw-text-muted",children:"Direkte Links, Browser-Lesezeichen und erneutes Laden umgehen diese Sperre nicht."}),l.jsx("p",{className:"nw-text-muted",id:"nwAuthHelp",children:S?.mode==="eos"?"Die zentrale EOS-Anmeldung bestätigt dein Konto und deine Rolle. Hier wird kein Passwort abgefragt.":"Die Anmeldung öffnet sich in einem eigenen Fenster. Verwende dort dein eigenes Benutzerkonto und kehre anschließend hierher zurück."}),l.jsxs("div",{className:"nw-actions-row",children:[M&&l.jsx("a",{className:"nw-button nw-button--primary",href:M,target:"_blank",rel:"noopener noreferrer",children:I?"Zentral abmelden":S?.authed?"Zur Bedienoberfläche":S?.mode==="eos"?"Zentral anmelden":"Anmeldung öffnen"}),l.jsx("button",{className:"nw-button",disabled:T||x==="checking",onClick:()=>{N(!1),Z()},type:"button",children:"Erneut prüfen"})]}),l.jsx("div",{className:`nw-status ${D?"nw-status--ok":"nw-status--bad"}`,children:$})]})}))}function mw(r){if(r?.authed!==!0||!["admin","installer","customer"].includes(r.role))return[];const s=[{label:"Zum EOS-Dashboard",path:"/"}];return r.role==="admin"&&s.unshift({label:"Zur EOS-Administration",path:"/system/"}),s}function gw(r){return r?.authed!==!0||r.role!=="admin"?[]:[{label:"Devices",path:"/modules/devices/"},{label:"EEBus",path:"/modules/eebus/"},{label:"Sicherung",path:"/modules/backup/"},{label:"Zertifikate",path:"/security/tls/"},{label:"Bestandsübernahme",path:"/migration/"}]}function Sf(){const r=pw(),s=r?.authed===!0&&r?.role==="admin",o=an(),[d,c]=v.useState(null),[h,m]=v.useState("Verbindung wird geprüft…");v.useEffect(()=>{let b=!0;return c(null),m("Verbindung wird geprüft…"),(async()=>{try{const S=await ks(o);if(!b)return;c({instance:o,url:S}),m("Bereit.")}catch{if(!b)return;c(null),m("Die Adresse der Oberfläche konnte nicht ermittelt werden. Bitte die Adapterverbindung prüfen.")}})(),()=>{b=!1}},[o]);const g=d?.instance===o?d.url:null,p=v.useMemo(()=>{const b=window.location.port||(window.location.protocol==="https:"?"443":"80");return`nwAdmin=1&instance=${encodeURIComponent(String(o))}&adminPort=${encodeURIComponent(b)}`},[o]),x=[...gw(r).map(b=>({label:b.label,adminOnly:!0,onClick:()=>Kt(`${g}${b.path}`)})),{label:"E-Mail-Versand",adminOnly:!0,onClick:()=>Kt(`${g}/mail-setup/?instance=${o}#/notification-mail`)},{label:"VIS öffnen",variant:"primary",onClick:()=>Kt(`${g}/`)},{label:"EMS Apps öffnen",onClick:()=>Kt(`${g}/ems-apps.html?${p}`)},...r?.role==="admin"||r?.role==="installer"?[{label:"Historie einrichten",onClick:()=>Kt(`${g}/installer/?instance=${o}#/history-setup`)}]:[],{label:"Simulation",onClick:()=>Kt(`${g}/simulation.html?${p}`)},{label:"Lizenz",adminOnly:!0,onClick:()=>Kt(`${g}/nexowatt/license`)},{label:"SmartHome VIS",onClick:()=>Kt(`${g}/smarthome.html`)},{label:"SmartHome Config",onClick:()=>Kt(`${g}/smarthome-config.html?${p}`)}];return l.jsx(Gn,{title:"Installer",subtitle:"Wähle, was geöffnet werden soll. Die Verbindung wird aus der Adapter-Instanz ermittelt. Die Installer-Seite ist für Konfiguration und Mapping gedacht.",showBack:!1,actions:g?mw(r).map(b=>l.jsx("a",{className:"nw-link-button",href:`${g}${b.path}`,target:"_top",children:b.label},b.path)):null,children:l.jsxs("section",{className:"nw-card nw-card--centered",children:[l.jsx("div",{className:"nw-button-grid",children:x.filter(b=>!b.adminOnly||s).map(b=>l.jsx("button",{className:`nw-button ${b.variant==="primary"?"nw-button--primary":""}`,onClick:()=>{g&&b.onClick()},disabled:!g,type:"button",children:b.label},b.label))}),l.jsx("div",{className:"nw-install-hint",role:"status",children:h})]})})}const pt=()=>{throw new Error("Ungültige Mesh-Daten. Bitte Verbindung und Konfiguration prüfen.")};function Bi(r){if(r===null||typeof r!="object"||Array.isArray(r))return pt();const s=Object.getPrototypeOf(r);return s!==Object.prototype&&s!==null?pt():r}const ie=r=>typeof r=="string"&&r.length<=16384?r:pt(),te=r=>typeof r=="number"&&Number.isFinite(r)?r:pt(),Ot=r=>typeof r=="boolean"?r:pt(),ze=r=>s=>s==null?null:r(s),ht=(r,s)=>o=>o===void 0?s:r(o),Hn=(r,s=1e4)=>o=>Array.isArray(o)&&o.length<=s?o.map(d=>r(d)):pt(),$n=(...r)=>s=>{for(const o of r)if(s===o)return o;return pt()};function Ne(r){return s=>{const o=Bi(s),d=Object.create(null);for(const[c,h]of Object.entries(r))d[c]=h(o[c]);return d}}function Wo(r,s=0,o={remaining:2e5}){if((--o.remaining<0||s>24)&&pt(),!(r===null||typeof r=="boolean")){if(typeof r=="string"){ie(r);return}if(typeof r=="number"){te(r);return}if(Array.isArray(r)){r.length>1e4&&pt();for(const d of r)Wo(d,s+1,o);return}for(const[d,c]of Object.entries(Bi(r)))(d==="__proto__"||d==="prototype"||d==="constructor")&&pt(),Wo(c,s+1,o)}}function hr(r){return s=>(Wo(s),r(s))}const ww=["importW","exportW","l1A","l2A","l3A","evW","chargeW","dischargeW","pvW","flexW"],vw=["importW","exportW","l1A","l2A","l3A"],Co=Ne({importW:te,exportW:te,l1A:te,l2A:te,l3A:te}),ds=Ne({importW:te,exportW:te,l1A:te,l2A:te,l3A:te,evW:te,chargeW:te,dischargeW:te,pvW:te,flexW:te}),hh={limit:Co,reserve:Co,unmonitored:Co},yw=Ne(hh),kf=Ne({id:ie,name:ie,branch:ie,max:ds,fallback:ds,weight:te,commissioned:Ot,watchdogVerified:Ot}),xw=Ne({strategy:$n("fixed","transformer"),headroomW:te,headroomA:te,engagePct:te,releasePct:te}),Sw=Ne({evW:ht(ie,""),chargeW:ht(ie,""),dischargeW:ht(ie,""),pvW:ht(ie,""),flexW:ht(ie,"")}),kw=Ne({gridW:ht(ie,""),l1A:ht(ie,""),l2A:ht(ie,""),l3A:ht(ie,"")}),bw=Ne({id:ie,epoch:ie,importDp:ie,exportDp:ie,unit:$n("Wh","kWh")}),ph=Ne({role:$n("off","master","slave"),mode:$n("diagnostic","active"),siteId:ie,nodeId:ie,masterId:ie,revision:te,intervalMs:te,requestTimeoutMs:te,leaseMs:te,staleMs:te,recoveryCycles:te,rampWPerSecond:te,allocation:xw,masterUrl:ie,localParticipates:Ot,nodes:Hn(kf,99),branches:Hn(Ne({id:ie,...hh}),100),local:kf,site:yw,feedback:Sw,siteFeedback:kw,meter:Ne({id:ie,epoch:ie,importDp:ie,exportDp:ie,unit:$n("Wh","kWh"),archiveIntervalMs:te})}),mh=Ne({importW:te,exportW:te,strategy:r=>r===void 0?void 0:$n("fixed","transformer")(r)}),jw=hr(mh),fs=r=>{const s=Bi(r),o=Ne({seq:te,at:ie,stream:ie,meter:bw,quality:ie,importMilliWh:ze(te),exportMilliWh:ze(te),sourceAt:Hn(ze(te),2)})(r);return(!Number.isSafeInteger(o.seq)||o.seq<1||!Number.isFinite(Date.parse(o.at)))&&pt(),{...s,...o,meter:{...Bi(s.meter),...o.meter}}},Ew=Ne({error:ht(ie,""),local:ze(Ne({sequence:te})),pending:te,lastSync:ze(ie),meterQuality:ie,nodes:Hn(Ne({id:ie,name:ie,last:ze(fs),receivedAt:ze(ie),failure:ht(ie,""),sequence:ht(te,0)}),100)}),Nw=Ne({controlMode:ie,state:ie,reason:ie,operatorLimits:ze(mh),siteMeasurement:ze(Ne({gridW:ze(te),ageMs:ze(te),phaseA:ze(Hn(ze(te),3))})),nodes:Hn(Ne({id:ie,name:ie,online:Ot,ageMs:ze(te),rttMs:ze(te),confirmed:Ot,sample:ze(Ne({gridW:te})),allowed:ds,reserved:ds}),100)}),Cw=Ne({master:ze(Nw),local:ze(Ne({state:ht(ie,""),reason:ht(ie,""),remainingMs:ht(te,0)})),timing:Ne({lastRttMs:ze(te),p95RttMs:ze(te)}),error:ie,accounting:Ew}),Rw=Ne({enabled:Ot}),gh={app:Rw,config:ph,pairedNodes:Hn(ie,99),locked:Ot},Pw=hr(Ne(gh)),_w=hr(Ne({...gh,status:Cw})),Aw=Ne({config:ph,pairingKey:ie}),wh=hr(r=>{const s=Aw(r);return(s.config.role!=="slave"||!/^[A-Za-z0-9_-]{43}$/.test(s.pairingKey))&&pt(),s});function zw(r){r.length>1048576&&pt();let s;try{s=JSON.parse(r)}catch{return pt()}return wh(s)}const Iw=Ne({importEuroKwh:te,exportEuroKwh:te,periodFeeEuro:te}),Dw=Ne({enabled:Ot,intervalMs:te,maxAgeMs:te,maxSkewMs:te,maxArchiveMB:te,operatorName:ie,tariff:Iw,meter:Ne({id:ie,epoch:ie,importDp:ie,exportDp:ie,unit:$n("Wh","kWh"),calibrated:Ot,calibrationUntil:ie})}),bf=hr(Ne({config:Dw})),Lw=hr(Ne({lastSequence:te,records:Hn(fs)})),Mw=hr(r=>{const s=Ne({nodeId:ie,name:ie,operatorName:ie,status:$n("BLOCKED","PARTIAL_PERIOD","DRAFT"),requested:Ne({from:ie,to:ie}),measured:Ne({from:ze(ie),to:ze(ie)}),first:ze(fs),last:ze(fs),count:te,invalid:te,gaps:te,importKwh:ze(te),exportKwh:ze(te),amounts:ze(Ne({importCents:te,exportCents:te,periodFeeCents:te,balanceCents:te})),note:ie,periodFeePending:Ot,usable:Ot,boundaryComplete:Ot,generatedAt:ie})(r);return s.usable&&(!s.amounts||!s.first||!s.last||!s.measured.from||!s.measured.to)&&pt(),{...Bi(r),...s}}),nn=r=>r?new Date(r).toLocaleString("de-DE"):"—",ns=r=>{const s=new Date(r);return new Date(s.getTime()-s.getTimezoneOffset()*6e4).toISOString().slice(0,23)},jf=r=>r==null?"—":r/1e6,Ro=r=>(r/100).toLocaleString("de-DE",{style:"currency",currency:"EUR"});function Po(r,s,o="application/json"){const d=URL.createObjectURL(new Blob([s],{type:`${o};charset=utf-8`})),c=document.createElement("a");c.href=d,c.download=r,c.click(),setTimeout(()=>URL.revokeObjectURL(d),1e3)}const Tw=r=>`"${(typeof r=="number"&&Number.isFinite(r)?String(r):String(r??"").replace(/^[=+\-@\t\r]/,"'$&")).replace(/"/g,'""')}"`;function Ow({meshConfig:r,status:s}){const[o,d]=v.useState(null),[c,h]=v.useState(""),[m,g]=v.useState(!1),[p,x]=v.useState(""),[b,S]=v.useState(ns(Date.now()-30*864e5)),[E,M]=v.useState(ns(Date.now())),[R,I]=v.useState(null),[N,$]=v.useState(null);v.useEffect(()=>{let D=!0;return Vn("/accounting").then(ce=>{const A=bf(ce);D&&d(A.config)}).catch(ce=>{D&&h(St(ce,"Mesh-Anfrage fehlgeschlagen."))}),()=>{D=!1}},[]),v.useEffect(()=>{!N&&r?.role==="master"&&$(s?.master?.operatorLimits||{importW:r.site.limit.importW,exportW:r.site.limit.exportW,strategy:r.allocation.strategy})},[r,s,N]);const F=r.role==="master",T=r.role==="slave"||r.localParticipates,ue=[...r.nodes,...F&&T?[r.local]:[]],le=(D,ce)=>d(A=>A&&{...A,[D]:ce}),G=async D=>{g(!0),h("");try{await D()}catch(ce){h(St(ce,"Mesh-Anfrage fehlgeschlagen."))}finally{g(!1)}},de=D=>{D.preventDefault(),G(async()=>{const ce=bf(await Vn("/accounting",o));d(ce.config),I(null),h("Zählerarchiv und Tarife gespeichert.")})},Y=D=>{D.preventDefault(),G(async()=>{o&&(I(null),I(Mw(await Vn("/accounting/report",{nodeId:p,from:new Date(b).toISOString(),to:new Date(E).toISOString(),tariff:o.tariff}))))})},je=()=>G(async()=>{const D=[];let ce=0,A=null;do{const Z=Lw(await Vn("/accounting/records",{nodeId:p,after:ce}));if(A===null&&(A=Z.lastSequence),!Z.records.length)break;let be=ce;for(const fe of Z.records){if(fe.seq<=be)throw new Error("Ungültige Reihenfolge im Zählerarchiv.");be=fe.seq}for(const fe of Z.records)fe.seq<=A&&Date.parse(fe.at)>=Date.parse(b)&&Date.parse(fe.at)<=Date.parse(E)&&D.push(fe);const X=Z.records.at(-1);if(!X)break;if(ce=X.seq,D.length>1e5)throw new Error("Mehr als 100.000 Datensätze: Exportzeitraum verkleinern.");h(`${ce} von ${A} Archivpositionen geprüft…`)}while(ce<A);Po(`NexoWatt_Zaehler_${p}.jsonl`,D.map(Z=>JSON.stringify(Z)).join(`
|
|
11
|
-
`)+`
|
|
12
|
-
`,"application/x-ndjson"),h(`${D.length} Originaldatensätze exportiert.`)});return l.jsxs(l.Fragment,{children:[F&&N&&l.jsxs("section",{className:"nw-card",children:[l.jsx("h2",{children:"Betreiber · Trafo-Freigabe"}),l.jsx("p",{children:"Die gemeinsame Leistung wird auf die Haus-NVPs verteilt. Absenkungen wirken mit der nächsten Antwort; zusätzliche Freigaben erst nach bestätigter Begrenzung. Technische Anschlussgrenzen und Rückfallreserven bleiben verbindlich."}),l.jsxs("form",{onSubmit:D=>{D.preventDefault(),G(async()=>{$(jw(await Vn("/operating",N))),h("Trafo-Freigabe gespeichert. Umsetzung in der Teilnehmerübersicht kontrollieren.")})},style:{display:"grid",gap:12},children:[l.jsxs("label",{className:"nw-field-label",children:["Verteilung im Betrieb",l.jsxs("select",{className:"nw-input",value:N.strategy||r.allocation?.strategy||"fixed",onChange:D=>$({...N,strategy:D.target.value==="transformer"?"transformer":"fixed"}),children:[l.jsx("option",{value:"fixed",children:"Feste Anteile"}),l.jsx("option",{value:"transformer",children:"Bedarfsabhängig · Trafo / Häuser"})]})]}),["importW","exportW"].map(D=>l.jsxs("label",{className:"nw-field-label",children:[D==="importW"?"Gesamter Bezug maximal W":"Gesamte Einspeisung maximal W",l.jsx("input",{className:"nw-input",type:"number",min:"0",max:r.site.limit[D],value:N[D],onChange:ce=>$({...N,[D]:ce.target.value===""?"":Number(ce.target.value)}),required:!0})]},D)),l.jsx("button",{className:"nw-button nw-button--primary",disabled:m,children:"Gesamtfreigabe übernehmen"})]})]}),l.jsxs("section",{className:"nw-card",children:[l.jsx("h2",{children:F?"Betreiber · Zähler und Abrechnung":"Haus-NVP · Lokales Zählerarchiv"}),l.jsx("p",{role:"status",children:c}),l.jsx("p",{children:"Optionales Archiv mit kumulativem Bezug und Einspeisung. Originalstände bleiben am Haus gespeichert und werden nach einer Verbindungsunterbrechung nachgeliefert. Master und Slave benötigen jeweils ein aktiviertes Archiv."}),s?.accounting?.error&&l.jsxs("p",{role:"alert",children:["Archivstörung: ",s.accounting.error,". Die Regelung läuft über einen getrennten Kanal."]}),T&&l.jsxs("p",{children:["Lokale Datensätze: ",s?.accounting?.local?.sequence||0," · Noch nicht am Master bestätigt: ",F?"lokal am Master":s?.accounting?.pending||0," · Letzter Abgleich: ",nn(s?.accounting?.lastSync)," · Zählerqualität: ",s?.accounting?.meterQuality||"missing"]}),F&&l.jsx("div",{style:{overflowX:"auto",maxHeight:360},children:l.jsxs("table",{style:{width:"100%"},children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Haus"}),l.jsx("th",{children:"Zähler / Epoche"}),l.jsx("th",{children:"Bezug kWh"}),l.jsx("th",{children:"Einspeisung kWh"}),l.jsx("th",{children:"Messzeit / Empfang"}),l.jsx("th",{children:"Qualität / Datensätze"})]})}),l.jsx("tbody",{children:s?.accounting?.nodes?.map(D=>l.jsxs("tr",{children:[l.jsx("td",{children:D.name||D.id}),l.jsxs("td",{children:[D.last?.meter?.id||"Nicht eingerichtet"," / ",D.last?.meter?.epoch||"—"]}),l.jsx("td",{children:D.last?.importMilliWh==null?"—":(D.last.importMilliWh/1e6).toLocaleString("de-DE")}),l.jsx("td",{children:D.last?.exportMilliWh==null?"—":(D.last.exportMilliWh/1e6).toLocaleString("de-DE")}),l.jsxs("td",{children:[nn(D.last?.at),l.jsx("br",{}),nn(D.receivedAt)]}),l.jsxs("td",{children:[D.failure||D.last?.quality||"Fehlt"," / ",D.sequence||0]})]},D.id))})]})}),o&&l.jsx("form",{onSubmit:de,children:l.jsxs("fieldset",{disabled:m,style:{border:0,padding:0,minWidth:0,display:"grid",gap:12},children:[l.jsxs("label",{children:[l.jsx("input",{type:"checkbox",checked:o.enabled,onChange:D=>le("enabled",D.target.checked)})," ",F?"Abrechnung und Zählerarchiv im Master aktivieren":"Lokales Zählerarchiv und Nachlieferung aktivieren"]}),T&&l.jsxs("details",{open:!o.meter.id,children:[l.jsx("summary",{children:"Geeichten Haus-NVP-Zähler zuordnen"}),l.jsx("p",{children:"Bei Zählerwechsel oder Rücksetzung eine neue Epoche vergeben. Eine neue Epoche darf keine fehlende Zählerdifferenz überbrücken. Der eingebaute Verbrauchsverlauf ersetzt diese ausdrückliche Zählerzuordnung nicht."}),[["id","Zählernummer"],["epoch","Zählerepoche (z. B. Einbaudatum)"],["importDp","Kumulativer Bezugszähler – Datenpunkt"],["exportDp","Kumulativer Einspeisezähler – Datenpunkt"]].map(([D,ce])=>l.jsxs("label",{className:"nw-field-label",children:[ce,l.jsx("input",{className:"nw-input",value:o.meter[D],onChange:A=>le("meter",{...o.meter,[D]:A.target.value})})]},D)),l.jsxs("label",{className:"nw-field-label",children:["Einheit der beiden Datenpunkte",l.jsxs("select",{className:"nw-input",value:o.meter.unit,onChange:D=>le("meter",{...o.meter,unit:D.target.value==="Wh"?"Wh":"kWh"}),children:[l.jsx("option",{children:"kWh"}),l.jsx("option",{children:"Wh"})]})]}),l.jsxs("label",{children:[l.jsx("input",{type:"checkbox",checked:o.meter.calibrated,onChange:D=>le("meter",{...o.meter,calibrated:D.target.checked})})," Geeichter Zweirichtungszähler am Haus-NVP und Zuordnung vor Ort geprüft"]}),l.jsxs("label",{className:"nw-field-label",children:["Eichfrist gültig bis",l.jsx("input",{className:"nw-input",type:"date",value:o.meter.calibrationUntil,onChange:D=>le("meter",{...o.meter,calibrationUntil:D.target.value})})]})]}),l.jsxs("details",{children:[l.jsx("summary",{children:"Archivintervalle und Speichergrenze"}),[["intervalMs","Messintervall ms (mindestens 60.000)"],["maxAgeMs","Zählerstand maximal alt ms"],["maxSkewMs","Beide Zählerstände maximal versetzt ms"],["maxArchiveMB","Archivgrenze MiB je Haus"]].map(([D,ce])=>l.jsxs("label",{className:"nw-field-label",children:[ce,l.jsx("input",{className:"nw-input",type:"number",min:"0",value:o[D],onChange:A=>le(D,A.target.value===""?"":Number(A.target.value)),required:!0})]},D)),l.jsx("p",{children:"Archive werden nicht automatisch gelöscht. Bei voller Grenze wird die Erfassung mit einer sichtbaren Störung angehalten; bestätigte Originale bleiben erhalten."})]}),F&&l.jsxs(l.Fragment,{children:[l.jsxs("label",{className:"nw-field-label",children:["Betreibername",l.jsx("input",{className:"nw-input",value:o.operatorName,onChange:D=>le("operatorName",D.target.value)})]}),l.jsx("h3",{children:"Tarif für den ausgewählten Abrechnungsentwurf"}),l.jsx("p",{children:"Preise für den gesamten ausgewerteten Zeitraum eingeben. Bei Tarifwechsel getrennte Zeiträume auswerten. Die Pauschale gilt einmal je Haus und ausgewähltem Zeitraum. Keine automatische Umsatzsteuerberechnung."}),[["importEuroKwh","Bezug EUR/kWh"],["exportEuroKwh","Einspeisegutschrift EUR/kWh"],["periodFeeEuro","Pauschale EUR je ausgewertetem Zeitraum"]].map(([D,ce])=>l.jsxs("label",{className:"nw-field-label",children:[ce,l.jsx("input",{className:"nw-input",type:"number",min:"0",step:"0.000001",value:o.tariff[D],onChange:A=>{le("tariff",{...o.tariff,[D]:A.target.value===""?"":Number(A.target.value)}),I(null)},required:!0})]},D))]}),l.jsx("button",{className:"nw-button nw-button--primary",children:"Archiv-Einstellungen speichern"})]})}),F&&o&&l.jsxs("form",{onSubmit:Y,style:{display:"grid",gap:12,marginTop:24},children:[l.jsx("h3",{children:"Zeitraum auswerten"}),l.jsxs("label",{className:"nw-field-label",children:["Haus",l.jsxs("select",{className:"nw-input",value:p,onChange:D=>{x(D.target.value),I(null)},required:!0,children:[l.jsx("option",{value:"",children:"Haus wählen"}),ue.map(D=>l.jsx("option",{value:D.id,children:D.name||D.id},D.id))]})]}),l.jsxs("label",{className:"nw-field-label",children:["Von (Ortszeit)",l.jsx("input",{className:"nw-input",type:"datetime-local",step:"0.001",value:b,onChange:D=>{S(D.target.value),I(null)},required:!0})]}),l.jsxs("label",{className:"nw-field-label",children:["Bis (Ortszeit)",l.jsx("input",{className:"nw-input",type:"datetime-local",step:"0.001",value:E,onChange:D=>{M(D.target.value),I(null)},required:!0})]}),l.jsx("button",{className:"nw-button nw-button--primary",disabled:m,children:"Abrechnungsentwurf berechnen"}),l.jsx("button",{className:"nw-button",type:"button",disabled:m||!p,onClick:je,children:"Originalzählerstände für Zeitraum exportieren (JSONL)"})]})]}),R&&l.jsxs("section",{className:"nw-card nw-mesh-report",children:[l.jsxs("h2",{children:["Abrechnungsentwurf · ",R.name||R.nodeId]}),l.jsx("p",{children:R.operatorName}),l.jsx("p",{children:l.jsx("strong",{children:R.status==="BLOCKED"?"Gesperrt – Zählerdaten nicht durchgehend zuordenbar":R.status==="PARTIAL_PERIOD"?"Teilzeitraum – angeforderte Randstände fehlen":"Entwurf aus Originalzählerständen"})}),l.jsxs("p",{children:["Gewünscht: ",nn(R.requested.from)," bis ",nn(R.requested.to),l.jsx("br",{}),"Gemessen: ",nn(R.measured.from)," bis ",nn(R.measured.to)]}),l.jsxs("p",{children:[R.count," Datensätze · ",R.invalid," Qualitätsfehler · ",R.gaps," Intervalllücken · Zähler ",R.first?.meter?.id||"—"]}),l.jsxs("table",{style:{width:"100%"},children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Position"}),l.jsx("th",{children:"Anfang kWh"}),l.jsx("th",{children:"Ende kWh"}),l.jsx("th",{children:"Differenz kWh"}),l.jsx("th",{children:"Betrag"})]})}),l.jsx("tbody",{children:[["import","Bezug"],["export","Einspeisung"]].map(([D,ce])=>l.jsxs("tr",{children:[l.jsx("th",{children:ce}),l.jsxs("td",{children:[jf(R.first?.[`${D}MilliWh`]),l.jsx("br",{}),l.jsx("small",{children:nn(R.first?.sourceAt?.[D==="import"?0:1])})]}),l.jsxs("td",{children:[jf(R.last?.[`${D}MilliWh`]),l.jsx("br",{}),l.jsx("small",{children:nn(R.last?.sourceAt?.[D==="import"?0:1])})]}),l.jsx("td",{children:R[`${D}Kwh`]??"—"}),l.jsx("td",{children:R.amounts?Ro(R.amounts[`${D}Cents`]):"—"})]},D))})]}),R.amounts&&l.jsxs("p",{children:["Pauschale: ",Ro(R.amounts.periodFeeCents)," · Saldo Bezug + Pauschale − Einspeisung: ",l.jsx("strong",{children:Ro(R.amounts.balanceCents)})]}),l.jsx("p",{children:R.note}),R.periodFeePending&&l.jsx("p",{children:"Die Pauschale ist für diesen Teilzeitraum noch nicht angesetzt. Randzeiten prüfen und ausdrücklich übernehmen."}),l.jsxs("p",{children:["Originalreferenzen: ",R.first?.stream||"—"," · Sequenz ",R.first?.seq||"—"," bis ",R.last?.seq||"—",". Erstellt ",nn(R.generatedAt),"."]}),l.jsxs("div",{className:"nw-mesh-no-print",style:{display:"flex",flexWrap:"wrap",gap:8},children:[R.usable&&!R.boundaryComplete&&l.jsx("button",{className:"nw-button",onClick:()=>{!R.measured.from||!R.measured.to||(S(ns(R.measured.from)),M(ns(R.measured.to)),h("Gemessene Randzeiten übernommen. Erneut berechnen."))},children:"Gemessene Randzeiten übernehmen"}),l.jsx("button",{className:"nw-button",onClick:()=>Po(`NexoWatt_Entwurf_${R.nodeId}.json`,JSON.stringify(R,null,2)),children:"Prüfbeleg JSON"}),l.jsx("button",{className:"nw-button",disabled:!R.usable,onClick:()=>{if(!R.amounts)return;const D=[["Status","Haus","Von gemessen","Bis gemessen","Bezug kWh","Einspeisung kWh","Bezug Cent","Einspeisung Cent","Pauschale Cent","Saldo Cent"],[R.status,R.name||R.nodeId,R.measured.from,R.measured.to,R.importKwh,R.exportKwh,R.amounts.importCents,R.amounts.exportCents,R.amounts.periodFeeCents,R.amounts.balanceCents]];Po(`NexoWatt_Entwurf_${R.nodeId}.csv`,"\uFEFF"+D.map(ce=>ce.map(Tw).join(";")).join(`\r
|
|
13
|
-
`),"text/csv")},children:"Abrechnungsentwurf CSV"}),l.jsx("button",{className:"nw-button",disabled:!R.usable,onClick:()=>window.print(),children:"Drucken / PDF"})]}),l.jsx("style",{children:"@media print { body * { visibility: hidden; } .nw-mesh-report, .nw-mesh-report * { visibility: visible; color: #111 !important; background: white !important; } .nw-mesh-report { position: absolute; left: 0; top: 0; width: 100%; } .nw-mesh-no-print, .nw-mesh-no-print * { display: none !important; } }"})]})]})}const Vi={importW:"Hausbezug W",exportW:"Einspeisung W",l1A:"Phase L1 A",l2A:"Phase L2 A",l3A:"Phase L3 A",evW:"Ladepunkte gesamt W",chargeW:"Speicherladung W",dischargeW:"Speicherentladung W",pvW:"PV-Erzeugung W",flexW:"Weitere flexible Lasten W"},Ef=()=>({importW:0,exportW:0,l1A:0,l2A:0,l3A:0,evW:0,chargeW:0,dischargeW:0,pvW:0,flexW:0}),Ww=r=>({id:r,name:"",branch:"",max:Ef(),fallback:Ef(),weight:1,commissioned:!1,watchdogVerified:!1});function Br({label:r,value:s,onChange:o}){return l.jsxs("label",{className:"nw-field-label",children:[r,l.jsx("input",{className:"nw-input",type:"number",min:"0",step:"any",value:s??0,onChange:d=>o(d.target.value===""?"":Number(d.target.value)),required:!0})]})}function Nf({value:r,onChange:s}){return l.jsx("div",{style:{overflowX:"auto"},children:l.jsxs("table",{style:{width:"100%"},children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Grenze"}),l.jsx("th",{children:"Anschluss"}),l.jsx("th",{children:"Reserve"}),l.jsx("th",{children:"Nicht erfasste Last"})]})}),l.jsx("tbody",{children:vw.map(o=>l.jsxs("tr",{children:[l.jsx("th",{children:Vi[o]}),["limit","reserve","unmonitored"].map(d=>l.jsx("td",{children:l.jsx(Br,{label:`${d} ${Vi[o]}`,value:r[d][o],onChange:c=>s({...r,[d]:{...r[d],[o]:c}})})},d))]},o))})]})})}function Cf({value:r,onChange:s,local:o=!1}){const d=(c,h)=>s({...r,[c]:h});return l.jsxs("div",{style:{display:"grid",gap:12},children:[!o&&l.jsxs("label",{className:"nw-field-label",children:["Eindeutige Slave-ID",l.jsx("input",{className:"nw-input",value:r.id,onChange:c=>d("id",c.target.value),required:!0,pattern:"[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}"})]}),l.jsxs("label",{className:"nw-field-label",children:["Haus / Gerät",l.jsx("input",{className:"nw-input",value:r.name,onChange:c=>d("name",c.target.value)})]}),l.jsxs("label",{className:"nw-field-label",children:["Strang-ID (optional)",l.jsx("input",{className:"nw-input",value:r.branch,onChange:c=>d("branch",c.target.value)})]}),l.jsx(Br,{label:"Verteilungsgewicht (1–100)",value:r.weight,onChange:c=>d("weight",c)}),l.jsx("div",{style:{overflowX:"auto"},children:l.jsxs("table",{style:{width:"100%"},children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Gesamtes Haus"}),l.jsx("th",{children:"Maximum"}),l.jsx("th",{children:"Sicherer Rückfall"})]})}),l.jsx("tbody",{children:ww.map(c=>l.jsxs("tr",{children:[l.jsx("th",{children:Vi[c]}),["max","fallback"].map(h=>l.jsx("td",{children:l.jsx(Br,{label:`${h==="max"?"Maximum":"Rückfall"} ${Vi[c]}`,value:r[h][c],onChange:m=>d(h,{...r[h],[c]:m})})},h))]},c))})]})}),l.jsxs("label",{children:[l.jsx("input",{type:"checkbox",checked:r.commissioned,onChange:c=>d("commissioned",c.target.checked)})," Lokale Messung, Vorzeichen, Gerätegrenzen und Regelung geprüft"]}),l.jsxs("label",{children:[l.jsx("input",{type:"checkbox",checked:r.watchdogVerified,onChange:c=>d("watchdogVerified",c.target.checked)})," Unabhängigen Geräte-Rückfall bei EOS-/Verbindungsausfall vor Ort nachgewiesen"]})]})}function Fw(){const[r,s]=v.useState(null),[o,d]=v.useState(!1),[c,h]=v.useState(null),[m,g]=v.useState(null),[p,x]=v.useState(0),[b,S]=v.useState("Konfiguration wird geladen…"),[E,M]=v.useState(!1),[R,I]=v.useState(!1),[N,$]=v.useState(""),[F,T]=v.useState(""),[ue,le]=v.useState(""),[G,de]=v.useState([]);v.useEffect(()=>{let A=!0,Z;const be=async(X=!1)=>{try{const fe=_w(await Vn());if(!A)return;s(fe.app),d(!1),g(fe.status),I(fe.locked||fe.config.mode==="active"),de(fe.pairedNodes),X?(h(fe.config),S("Verbindung zuerst im Diagnosebetrieb einrichten.")):h(Se=>Se===null||fe.config.mode==="active"?fe.config:Se)}catch(fe){A&&(S(St(fe,"Mesh-Anfrage fehlgeschlagen.")),[401,403,404].includes(cs(fe)??0)&&(d(!0),h(null),g(null),T("")))}finally{A&&(Z=setTimeout(()=>be(),2e3))}};return be(!0),()=>{A=!1,clearTimeout(Z)}},[]);const Y=(A,Z)=>h(be=>be&&{...be,[A]:Z}),je=async A=>{A.preventDefault(),M(!0),T("");try{const Z=Pw(await Vn("/config",{config:c,pairingKey:N}));h(Z.config),I(Z.config.mode==="active"),$(""),de(Z.pairedNodes),S("Konfiguration gespeichert. Aktive Verbünde starten mit sicherem Rückfall und neuer Synchronisation.")}catch(Z){S(St(Z,"Mesh-Anfrage fehlgeschlagen."))}finally{M(!1)}},D=async()=>{if(c?.nodes[p]){M(!0);try{const A=wh(await Vn("/pair",{nodeId:c.nodes[p].id}));T(JSON.stringify(A,null,2)),S("Paarungsdaten einmalig kopieren und am zugehörigen Slave importieren. Vertraulich behandeln.")}catch(A){S(St(A,"Mesh-Anfrage fehlgeschlagen."))}finally{M(!1)}}},ce=()=>{try{const A=zw(ue);h(A.config),$(A.pairingKey),le(""),S("Paarung übernommen. Master-Adresse und lokale Messwerte ergänzen, anschließend speichern.")}catch(A){S(St(A,"Mesh-Anfrage fehlgeschlagen."))}};return l.jsxs(Gn,{title:"Microgrid · Master / Slave",subtitle:"EMS-App · Ein Trafo-Master · bis zu 99 Haus-Slaves",showBack:!1,compact:new URLSearchParams(window.location.search).has("embedded"),actions:l.jsx("a",{className:"nw-link-button",href:`${Sn()??""}/ems-apps.html?nwAdmin=1`,target:window.parent!==window?"_parent":"_self",children:"Zum EMS-AppCenter"}),children:[o&&l.jsxs("section",{className:"nw-card",children:[l.jsx("p",{role:"alert",children:b}),l.jsx("p",{children:"Die App muss im EMS-AppCenter installiert sein. Zugriff nur für Installer und Admin."})]}),!o&&l.jsxs(l.Fragment,{children:[r&&!r.enabled&&l.jsxs("section",{className:"nw-card",children:[l.jsx("strong",{children:"App inaktiv"}),l.jsx("p",{children:"Einrichtung und gespeicherte Daten sind zugänglich. Regelkommunikation und Zähleraufzeichnung starten erst mit „Aktiv: An“ im EMS-AppCenter."})]}),l.jsxs("section",{className:"nw-card",children:[l.jsx("h2",{children:"Verbindung und Freigaben"}),l.jsx("p",{role:"status",children:b}),m&&l.jsxs(l.Fragment,{children:[l.jsxs("p",{children:[l.jsx("strong",{children:m.master?.controlMode==="LOCAL_AUTONOMY"?"Lokale Hausregelung":m.master?.controlMode==="TRANSFORMER_LIMIT"?"Trafo-Begrenzung":m.master?.state||m.local?.state})," · Antwort ",m.timing.lastRttMs===null?"—":`${Math.round(m.timing.lastRttMs)} ms`," · P95 ",m.timing.p95RttMs===null?"—":`${Math.round(m.timing.p95RttMs)} ms`," · Freigabe ",Math.round(m.local?.remainingMs||0)," ms"]}),l.jsxs("p",{children:[m.master?.reason||m.local?.reason," ",m.error]}),m.master?.siteMeasurement&&l.jsxs("p",{children:["Trafo-NVP: ",m.master.siteMeasurement.gridW!==null?`${Math.round(m.master.siteMeasurement.gridW)} W`:"Messung fehlt"," · Messwertalter: ",m.master.siteMeasurement.ageMs!==null?`${Math.round(m.master.siteMeasurement.ageMs)} ms`:"—"," · Phasen A: ",m.master.siteMeasurement.phaseA?.map(A=>Number(A).toFixed(1)).join(" / ")||"—"]})]}),l.jsx("p",{children:"Der Master begrenzt den gesamten Hausanschluss. 0 ist eine wirksame Grenze. Bei Ausfall bleibt nur der geplante Rückfall; Boost und Zeitpläne erhöhen ihn nicht."}),l.jsx("p",{children:"Direkte Tailscale-Verbindungen bevorzugen; tatsächliche Laufzeit am Standort prüfen. Ein unabhängiger Geräte-Watchdog ist für aktive Regelung erforderlich."}),R&&l.jsxs("p",{children:[l.jsx("strong",{children:"Aktive Konfiguration geschützt."})," Grenz- oder Topologieänderungen benötigen eine geplante Stillsetzung und erneute Inbetriebnahme."]})]}),m?.master&&l.jsxs("section",{className:"nw-card",children:[l.jsxs("h2",{children:["Betreiberübersicht · Teilnehmer (",m.master.nodes.length,"/100 einschließlich optionalem Master-Haus)"]}),l.jsx("div",{style:{overflowX:"auto",maxHeight:360},children:l.jsxs("table",{style:{width:"100%"},children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Haus"}),l.jsx("th",{children:"Verbindung"}),l.jsx("th",{children:"Alter"}),l.jsx("th",{children:"Antwortzeit"}),l.jsx("th",{children:"Bestätigt"}),l.jsx("th",{children:"Haus-NVP aktuell"}),l.jsx("th",{children:"Bezug / Reserviert"}),l.jsx("th",{children:"Einspeisegrenze"})]})}),l.jsx("tbody",{children:m.master.nodes.map(A=>l.jsxs("tr",{children:[l.jsx("td",{children:A.name||A.id}),l.jsx("td",{children:A.online?"Verbunden":"Fehlt"}),l.jsx("td",{children:A.ageMs===null?"—":`${Math.round(A.ageMs)} ms`}),l.jsx("td",{children:A.rttMs===null?"—":`${Math.round(A.rttMs)} ms`}),l.jsx("td",{children:A.confirmed?"Verifiziert":"Ausstehend"}),l.jsx("td",{children:A.sample!==null?`${Math.round(A.sample.gridW)} W`:"—"}),l.jsxs("td",{children:[Math.round(A.allowed.importW)," / ",Math.round(A.reserved.importW)," W"]}),l.jsxs("td",{children:[Math.round(A.allowed.exportW)," W"]})]},A.id))})]})})]}),c&&c.role!=="off"&&l.jsx(Ow,{meshConfig:c,status:m}),c&&l.jsx("form",{onSubmit:je,children:l.jsxs("fieldset",{disabled:E||R,style:{border:0,padding:0,minWidth:0},children:[l.jsxs("section",{className:"nw-card",style:{display:"grid",gap:14},children:[l.jsx("h2",{children:"Verbund einrichten"}),l.jsxs("label",{className:"nw-field-label",children:["Rolle",l.jsxs("select",{className:"nw-input",value:c.role,onChange:A=>Y("role",A.target.value==="master"?"master":A.target.value==="slave"?"slave":"off"),children:[l.jsx("option",{value:"off",children:"Aus"}),l.jsx("option",{value:"master",children:"Master"}),l.jsx("option",{value:"slave",children:"Slave"})]})]}),c.role!=="off"&&l.jsxs(l.Fragment,{children:[["siteId","nodeId","masterId"].map((A,Z)=>l.jsxs("label",{className:"nw-field-label",children:[["Standort-ID","Lokale Knoten-ID","Feste Master-ID"][Z],l.jsx("input",{className:"nw-input",value:c[A],onChange:be=>Y(A,be.target.value),required:!0})]},A)),l.jsx(Br,{label:"Gemeinsame Konfigurationsversion",value:c.revision,onChange:A=>Y("revision",A)}),l.jsxs("label",{className:"nw-field-label",children:["Betrieb",l.jsxs("select",{className:"nw-input",value:c.mode,onChange:A=>Y("mode",A.target.value==="active"?"active":"diagnostic"),children:[l.jsx("option",{value:"diagnostic",children:"Diagnose – noch keine Master-Regelung"}),l.jsx("option",{value:"active",children:"Aktiv – geprüfte Anlage verbindlich begrenzen"})]})]}),c.role==="slave"&&l.jsxs(l.Fragment,{children:[l.jsxs("label",{className:"nw-field-label",children:["Tailscale-Adresse des Masters inklusive EOS-Port",l.jsx("input",{className:"nw-input",placeholder:"http://100.x.x.x:8188",value:c.masterUrl,onChange:A=>Y("masterUrl",A.target.value),required:!0})]}),l.jsxs("label",{className:"nw-field-label",children:["Individueller Paarungsschlüssel",l.jsx("input",{className:"nw-input",type:"password",autoComplete:"new-password",value:N,onChange:A=>$(A.target.value),placeholder:"Leer lassen zum Beibehalten"})]})]}),c.role==="master"&&l.jsxs("label",{children:[l.jsx("input",{type:"checkbox",checked:c.localParticipates,onChange:A=>Y("localParticipates",A.target.checked)})," Master regelt zusätzlich sein eigenes Haus"]}),l.jsxs("details",{children:[l.jsx("summary",{children:"Kommunikationszeiten und Wiederanlauf"}),l.jsx("p",{children:"Startwerte: Austausch 1 s, Antwort-Timeout 800 ms, Freigabe 3 s, Messwertalter höchstens 2 s. Vor Ort prüfen."}),[["intervalMs","Austausch ms"],["requestTimeoutMs","Antwort-Timeout ms"],["leaseMs","Freigabedauer ms"],["staleMs","Maximales Messwertalter ms"],["recoveryCycles","Stabile Zyklen vor Erhöhung"],["rampWPerSecond","Wiederanlauframpe W/s"]].map(([A,Z])=>l.jsx(Br,{label:Z,value:c[A],onChange:be=>Y(A,be)},A))]})]})]}),c.role==="master"&&l.jsxs(l.Fragment,{children:[l.jsxs("section",{className:"nw-card",children:[l.jsx("h2",{children:"Trafo-Regelung"}),l.jsxs("label",{className:"nw-field-label",children:["Verteilung",l.jsxs("select",{className:"nw-input",value:c.allocation?.strategy||"fixed",onChange:A=>Y("allocation",{...c.allocation||{headroomW:1e3,headroomA:3,engagePct:90,releasePct:80},strategy:A.target.value==="transformer"?"transformer":"fixed"}),children:[l.jsx("option",{value:"fixed",children:"Feste Anteile (bisheriges Verhalten)"}),l.jsx("option",{value:"transformer",children:"Bedarfsabhängig · Master am Trafo, Slaves an Häusern"})]})]}),l.jsx("p",{children:"Die Häuser optimieren lokal innerhalb sicherer NVP-Korridore. Bei knapper Kapazität verteilt der Master die Gesamtfreigabe bedarfsgerecht. Haus- und Stranggrenzen gelten in jedem Betriebszustand."}),c.allocation?.strategy==="transformer"&&l.jsxs(l.Fragment,{children:[[["headroomW","Zusätzlicher Spielraum je Haus W"],["headroomA","Zusätzlicher Spielraum je Phase A"],["engagePct","Eingriff ab Trafoauslastung %"],["releasePct","Wiederfreigabe unter Trafoauslastung %"]].map(([A,Z])=>l.jsx(Br,{label:Z,value:c.allocation[A],onChange:be=>Y("allocation",{...c.allocation,[A]:be})},A)),l.jsx("button",{className:"nw-button",type:"button",onClick:()=>h(A=>A&&{...A,intervalMs:250,requestTimeoutMs:200,leaseMs:1500,staleMs:1e3}),children:"Schnellen Takt übernehmen: 250 ms / 200 ms Timeout"}),l.jsx("p",{children:"Nur bei entsprechend schnellen NVP-Messwerten und stabiler Verbindung verwenden. Messung, Netzwerk und Stellgeräte bestimmen zusammen die tatsächliche Reaktionszeit."})]})]}),l.jsxs("section",{className:"nw-card",children:[l.jsx("h2",{children:"Gemeinsamer Anschluss"}),l.jsx("p",{children:"Hauptzähler und alle drei Phasen unter der lokalen Netzmessung zuordnen. Für nicht geregelte Lasten dauerhaft Kapazität vorhalten."}),l.jsx(Nf,{value:c.site,onChange:A=>Y("site",A)}),c.localParticipates&&l.jsxs(l.Fragment,{children:[l.jsx("h3",{children:"Getrennter Hauptzähler des Verbunds"}),l.jsx("p",{children:"Hier die Messung des gesamten Standorts eintragen; die lokale Hausmessung bleibt getrennt."}),["gridW","l1A","l2A","l3A"].map(A=>l.jsxs("label",{className:"nw-field-label",children:[A," – Hauptzähler-DP",l.jsx("input",{className:"nw-input",value:c.siteFeedback?.[A]||"",onChange:Z=>Y("siteFeedback",{...c.siteFeedback,[A]:Z.target.value})})]},A))]})]}),l.jsxs("section",{className:"nw-card",children:[l.jsx("h2",{children:"Stränge"}),c.branches.map((A,Z)=>l.jsxs("details",{children:[l.jsxs("summary",{children:["Strang ",A.id||Z+1]}),l.jsx("input",{className:"nw-input","aria-label":"Strang-ID",value:A.id,onChange:be=>Y("branches",c.branches.map((X,fe)=>Z===fe?{...X,id:be.target.value}:X))}),l.jsx(Nf,{value:A,onChange:be=>Y("branches",c.branches.map((X,fe)=>Z===fe?be:X))}),l.jsx("button",{className:"nw-button",type:"button",onClick:()=>Y("branches",c.branches.filter((be,X)=>X!==Z)),children:"Strang entfernen"})]},Z)),l.jsx("button",{className:"nw-button",type:"button",onClick:()=>Y("branches",[...c.branches,{id:"",reserve:{...c.site.reserve},unmonitored:{...c.site.unmonitored},limit:{importW:0,exportW:0,l1A:0,l2A:0,l3A:0}}]),children:"Strang hinzufügen"})]}),l.jsxs("section",{className:"nw-card",children:[l.jsxs("h2",{children:["Slaves (",c.nodes.length,"/99)"]}),l.jsx("p",{children:"Erst Teilnehmer speichern, dann für jeden Slave eigene Paarungsdaten erzeugen."}),l.jsx("select",{className:"nw-input","aria-label":"Slave auswählen",value:p,onChange:A=>x(Number(A.target.value)),children:c.nodes.map((A,Z)=>l.jsxs("option",{value:Z,children:[A.name||A.id||`Slave ${Z+1}`," ",G.includes(A.id)?"· gepaart":""]},Z))}),c.nodes[p]&&l.jsxs(l.Fragment,{children:[l.jsx(Cf,{value:c.nodes[p],onChange:A=>Y("nodes",c.nodes.map((Z,be)=>be===p?A:Z))}),l.jsx("button",{className:"nw-button",type:"button",onClick:D,children:"Paarung für gespeicherten Slave erzeugen"}),l.jsx("button",{className:"nw-button",type:"button",onClick:()=>{Y("nodes",c.nodes.filter((A,Z)=>Z!==p)),x(0),T("")},children:"Slave entfernen"})]}),l.jsx("button",{className:"nw-button",type:"button",disabled:c.nodes.length>=99,onClick:()=>{Y("nodes",[...c.nodes,Ww(`haus_${c.nodes.length+1}`)]),x(c.nodes.length),T("")},children:"Slave hinzufügen"})]})]}),(c.role==="slave"||c.role==="master"&&c.localParticipates)&&l.jsxs("section",{className:"nw-card",children:[l.jsx("h2",{children:"Lokales Haus"}),l.jsx(Cf,{local:!0,value:c.local,onChange:A=>Y("local",A)}),l.jsx("h3",{children:"Tatsächliche Leistungen"}),l.jsx("p",{children:"Summenmesswerte in W, jeweils positiv. Nur vorhandene Geräte freigeben. Lokalen NVP und Phasen im App-Center zuordnen."}),["evW","chargeW","dischargeW","pvW","flexW"].map(A=>l.jsxs("label",{className:"nw-field-label",children:[Vi[A]," – Messwert-DP",l.jsx("input",{className:"nw-input",value:c.feedback?.[A]||"",onChange:Z=>Y("feedback",{...c.feedback,[A]:Z.target.value})})]},A))]}),l.jsx("section",{className:"nw-card",children:l.jsx("button",{className:"nw-button nw-button--primary",type:"submit",children:"Konfiguration speichern"})}),c.role!=="master"&&l.jsxs("section",{className:"nw-card",children:[l.jsx("h2",{children:"Paarung vom Master übernehmen"}),l.jsx("textarea",{className:"nw-input",rows:5,"aria-label":"Paarungsdaten importieren",value:ue,onChange:A=>le(A.target.value)}),l.jsx("button",{className:"nw-button",type:"button",onClick:ce,children:"Paarung in Formular übernehmen"})]})]})}),F&&l.jsxs("section",{className:"nw-card",children:[l.jsx("h2",{children:"Einmalige Paarungsdaten"}),l.jsx("p",{children:"Enthält den Schlüssel dieses Slaves. Nach Übernahme schließen."}),l.jsx("textarea",{className:"nw-input",rows:8,readOnly:!0,value:F,"aria-label":"Einmalige Paarungsdaten"}),l.jsx("button",{className:"nw-button",onClick:()=>T(""),children:"Schließen und aus Ansicht entfernen"})]})]})]})}const it=r=>r!==null&&typeof r=="object"&&!Array.isArray(r)&&(Object.getPrototypeOf(r)===Object.prototype||Object.getPrototypeOf(r)===null),me=r=>typeof r=="string",lt=r=>typeof r=="number"&&Number.isFinite(r),ct=r=>typeof r=="boolean",Ae=r=>r===null||r===""||lt(r),hs=r=>ct(r)||Ae(r),z=r=>s=>s===void 0||r(s),qe=r=>s=>s===null||r(s),Ct=r=>s=>Array.isArray(s)&&s.every(r);function Ie(r){return s=>{if(!it(s))return!1;for(const o in r)if(Object.hasOwn(r,o)&&!r[o](s[o]))return!1;return!0}}const _o=r=>s=>it(s)&&Object.keys(s).every(o=>!["__proto__","prototype","constructor"].includes(o)&&r(s[o]));function kn(r){const s=[{value:r,depth:0}],o=new Set;let d=0;for(;s.length;){const c=s.pop();if(!c||++d>5e4||c.depth>32)return!1;const h=c.value;if(h===null||ct(h)||lt(h))continue;if(me(h)){if(h.length>1048576)return!1;continue}if(!Array.isArray(h)&&!it(h)||o.has(h))return!1;o.add(h);const m=Object.getOwnPropertyDescriptors(h);for(const g of Object.keys(m)){if(["__proto__","prototype","constructor"].includes(g))return!1;const p=m[g];if(!p||!("value"in p))return!1;if(Array.isArray(h)&&g==="length")continue;const x=p.value;s.push({value:x,depth:c.depth+1})}}return!0}const yn=Ie({stateId:z(me),unit:z(me),sign:z(Ae),maxAgeMs:z(Ae),scale:z(Ae)}),Bw=Ie({stateId:z(me),unit:z(me),sign:z(Ae),maxAgeMs:z(Ae),scale:z(Ae),kind:z(me),importMeasurement:z(yn),exportMeasurement:z(yn)}),Vw=Ie({measurement:z(qe(Bw)),valid:z(ct),reason:z(me)}),Uw=Ie({id:me,source:z(me),measurement:z(yn),importLimitW:z(qe(Ae)),exportLimitW:z(qe(Ae)),importReserveW:z(Ae),exportReserveW:z(Ae)}),Li=Ie({stateId:z(me),scale:z(Ae),sign:z(Ae),readbackStateId:z(me)}),Ao=Ie({stateId:z(me),readbackStateId:z(me),onValue:z(hs),offValue:z(hs)}),$w=Ie({stateId:z(me),ttlMs:z(Ae),writeValue:z(hs),readbackStateId:z(me),expiryBehavior:z(me)}),Hw=Ie({mode:z(me),signedTarget:z(Li),chargeTarget:z(Li),dischargeTarget:z(Li),maxCharge:z(Li),maxDischarge:z(Li),appliedMaxCharge:z(yn),appliedMaxDischarge:z(yn),watchdog:z($w),run:z(Ao),chargeEnable:z(Ao),dischargeEnable:z(Ao)}),Gw=Ie({targetGridImportW:z(Ae),importThresholdW:z(Ae),peakLimitW:z(Ae)}),Kw=Ie({stateId:z(me),availableValue:z(hs),maxAgeMs:z(Ae)}),Zw=Ie({id:me,name:z(me),connectionPointId:z(me),controlPointId:z(me),dispatchGroupId:z(me),primaryPurpose:z(me),authority:z(me),powerMeasurement:z(yn),socMeasurement:z(yn),maxChargeW:z(Ae),maxDischargeW:z(Ae),minSoc:z(Ae),maxSoc:z(Ae),maxDeltaWPerSec:z(Ae),configuredToleranceW:z(Ae),commandTimeoutMs:z(Ae),strategy:z(Gw),command:z(Hw),availability:z(Kw),requestPowerMeasurement:z(yn)}),qw=Ie({stateId:z(me),unit:z(me),scale:z(Ae),readbackStateId:z(me)}),Qw=Ie({id:me,connectionPointId:z(me),referencePowerW:z(Ae),powerMeasurement:z(yn),command:z(qw),evuControl:z(ct)}),Xw=Ie({schemaVersion:z(lt),configVersion:lt,maxSkewMs:z(Ae),points:Ct(Uw),storages:Ct(Zw),pvAssignments:Ct(Qw)}),Yw=Ie({installed:ct,enabled:ct}),Jw=Ie({path:z(me),message:z(me),reason:z(me),code:z(me)}),ur=r=>me(r)||Jw(r),vh=Ie({valid:z(ct),activeEligible:z(ct),errors:z(Ct(ur)),activationErrors:z(Ct(ur)),warnings:z(Ct(ur))}),Rf=Ie({valueW:z(qe(lt)),ageMs:z(qe(lt)),valid:z(ct),reason:z(me)}),ev=Ie({socPct:z(qe(lt)),available:z(ct)}),tv=Ie({id:z(me),requestedW:z(qe(lt)),targetW:z(qe(lt)),minPowerW:z(qe(lt)),maxPowerW:z(qe(lt)),commandConfirmed:z(ct),accepted:z(ct),reason:z(me)}),nv=Ie({id:z(me),appliedConfirmed:z(ct),targetW:z(qe(lt))}),rv=Ie({id:me,connectionPointId:z(me),primaryPurpose:z(me),authority:z(me),requestedW:z(qe(lt)),reason:z(me),status:z(me)}),iv=Ie({points:z(_o(Rf)),storages:z(_o(Rf)),storageTelemetry:z(_o(ev)),errors:z(Ct(ur))}),lv=Ie({ts:z(qe(lt)),status:z(me),configVersion:z(qe(lt)),reason:z(me),budget:z(qe(Ie({reason:z(me)}))),snapshot:z(qe(iv)),storageResults:z(Ct(tv)),pendingIntervals:z(Ct(nv)),errors:z(Ct(ur)),activationErrors:z(Ct(ur)),groups:z(Ct(rv)),writesPerformed:z(qe(lt))}),sv=Ie({config:z(Xw),app:z(Yw),rootSource:z(qe(Vw)),status:z(qe(lv)),validation:z(qe(vh)),locked:z(ct)});function Mi(r,s=!0){if(!kn(r)||!sv(r))throw new Error("Ungültige Antwort der Netzanschluss-API. Der Entwurf bleibt erhalten.");if(s&&(!r.config||!r.app))throw new Error("Unvollständige Antwort der Netzanschluss-API. Der Entwurf bleibt erhalten.");if(r.config&&(!Number.isSafeInteger(r.config.configVersion)||r.config.configVersion<1||r.config.points.length!==2||!r.config.points.some(o=>o.id==="M0")||!r.config.points.some(o=>o.id==="M1")))throw new Error("Ungültige Messstruktur der Netzanschluss-API.");return r}function av(r){return kn(r)&&vh(r)?r:null}function ov(r){return kn(r)&&Ct(ur)(r)?{valid:!1,errors:r}:null}const uv=Ie({enabled:ct,host:me,port:lt,tlsMode:me,user:me,siteName:me,passwordSet:ct});function Pf(r){if(!kn(r)||!it(r)||!uv(r.config)||!Number.isInteger(r.config.port)||r.config.port<1||r.config.port>65535||!["tls","starttls"].includes(r.config.tlsMode))throw new Error("Ungültige Antwort der E-Mail-Konfiguration.");return r.config}function cv(){const[r,s]=v.useState({enabled:!1,host:"",port:465,tlsMode:"tls",user:"",siteName:"",passwordSet:!1}),[o,d]=v.useState(""),[c,h]=v.useState(!1),[m,g]=v.useState(!0),[p,x]=v.useState(!1),[b,S]=v.useState("Versandkonfiguration wird geladen…"),[E,M]=v.useState(!1);v.useEffect(()=>{let N=!0;return wf().then($=>{N&&(s(Pf($)),x(!0),S("SMTP-Zugangsdaten werden verschlüsselt auf dieser Anlage gespeichert."))}).catch($=>{N&&(S(St($,"E-Mail-Konfiguration nicht erreichbar.")),M(!0))}).finally(()=>{N&&g(!1)}),()=>{N=!1}},[]);const R=(N,$)=>s(F=>({...F,[N]:$})),I=async N=>{N.preventDefault(),g(!0),M(!1);try{const $=await wf({...r,password:o,clearPassword:c});s(Pf($)),d(""),h(!1),S("Gespeichert. Unter Kunden-Einstellungen → Benachrichtigungen die Empfängeradresse eintragen und eine Test-Mail senden.")}catch($){S(St($,"E-Mail-Konfiguration nicht erreichbar.")),M(!0)}finally{g(!1)}};return l.jsxs(Gn,{title:"E-Mail-Versand",subtitle:"Direkter Versand wichtiger EOS-Meldungen. Einrichtung ausschließlich durch den Admin.",showBack:!1,children:[l.jsx("section",{className:"nw-card",children:l.jsxs("form",{onSubmit:I,className:"nw-access-gate__form",style:{maxWidth:680,margin:"0 auto"},children:[l.jsxs("label",{className:"nw-field-label",children:[l.jsx("input",{type:"checkbox",checked:r.enabled,disabled:m||!p,onChange:N=>R("enabled",N.target.checked)})," Direkten E-Mail-Versand aktivieren"]}),l.jsx("label",{className:"nw-field-label",htmlFor:"mailFrom",children:"Absender"}),l.jsx("input",{className:"nw-input",id:"mailFrom",value:"info@nexowatt.com",readOnly:!0}),l.jsx("label",{className:"nw-field-label",htmlFor:"mailSite",children:"Anlagenname für die E-Mail"}),l.jsx("input",{className:"nw-input",id:"mailSite",value:r.siteName,maxLength:100,disabled:m,onChange:N=>R("siteName",N.target.value),placeholder:"Zum Beispiel Firmenstandort Rhede"}),l.jsx("label",{className:"nw-field-label",htmlFor:"mailHost",children:"SMTP-Server"}),l.jsx("input",{className:"nw-input",id:"mailHost",value:r.host,disabled:m,required:r.enabled,onChange:N=>R("host",N.target.value),placeholder:"SMTP-Server des E-Mail-Anbieters",autoComplete:"off"}),l.jsx("label",{className:"nw-field-label",htmlFor:"mailTls",children:"Verschlüsselung"}),l.jsxs("select",{className:"nw-input",id:"mailTls",value:r.tlsMode,disabled:m,onChange:N=>{const $=N.target.value;s(F=>({...F,tlsMode:$,port:[465,587].includes(F.port)?$==="tls"?465:587:F.port}))},children:[l.jsx("option",{value:"tls",children:"TLS (normalerweise Port 465)"}),l.jsx("option",{value:"starttls",children:"STARTTLS verpflichtend (normalerweise Port 587)"})]}),l.jsx("label",{className:"nw-field-label",htmlFor:"mailPort",children:"SMTP-Port"}),l.jsx("input",{className:"nw-input",id:"mailPort",type:"number",min:1,max:65535,value:r.port,disabled:m,onChange:N=>R("port",Number(N.target.value))}),l.jsx("label",{className:"nw-field-label",htmlFor:"mailUser",children:"SMTP-Benutzer"}),l.jsx("input",{className:"nw-input",id:"mailUser",value:r.user,disabled:m,required:r.enabled,autoComplete:"off",onChange:N=>R("user",N.target.value)}),l.jsx("label",{className:"nw-field-label",htmlFor:"mailPassword",children:"SMTP-Passwort / App-Passwort"}),l.jsx("input",{className:"nw-input",id:"mailPassword",type:"password",autoComplete:"new-password",value:o,disabled:m,onChange:N=>d(N.target.value),placeholder:r.passwordSet?"Gespeichert – leer lassen zum Beibehalten":"Noch nicht hinterlegt"}),l.jsxs("label",{className:"nw-field-label",children:[l.jsx("input",{type:"checkbox",checked:c,disabled:m,onChange:N=>h(N.target.checked)})," Gespeichertes Passwort löschen (Versand vorher deaktivieren)"]}),l.jsx("button",{className:"nw-button nw-button--primary",type:"submit",disabled:m||!p,children:m?"Bitte warten…":"Versandkonfiguration speichern"}),l.jsx("div",{role:"status",className:`nw-status ${E?"nw-status--bad":"nw-status--ok"}`,children:b})]})}),l.jsxs("section",{className:"nw-card",children:[l.jsx("h2",{children:"Meldeverhalten"}),l.jsx("p",{children:"Harte Fehler: sofort bei Erkennung. Normale Fehler: gesammelt alle 30 Minuten. Sonstige Hinweise, Entwarnungen und Erinnerungen an harte Fehler: als Tageszusammenfassung. Gleichzeitige Störungen werden gebündelt."}),l.jsx("p",{children:"Reguläre Ladepausen, Ladeende und normale PV-Abregelung erzeugen keine Störungsmail. Bei vollständigem Rechner- oder Internetausfall kann dieses Gerät selbst keine E-Mail versenden."}),l.jsx("a",{className:"nw-button",href:`${Sn()??""}/settings.html`,children:"Kunden-Benachrichtigungen öffnen"}),l.jsx("a",{className:"nw-button",href:`${Sn()??""}/ems-apps.html`,children:"Zurück zum App-Center"})]})]})}function Un(r){return r!==null&&typeof r=="object"&&!Array.isArray(r)}function gn(r,s=2048){if(r==null)return"";if(typeof r!="string"||r.length>s)throw new Error("EOS_HISTORY_RESPONSE_INVALID");return r}function Ti(r){return typeof r=="number"&&Number.isFinite(r)&&r>=0?r:null}function _f(r){if(r===void 0||r===""||r==="adapter")return"adapter";if(r==="influxdb2")return r;throw new Error("EOS_HISTORY_RESPONSE_INVALID")}function zo(r){if(!Un(r)||r.ok!==!0||!Un(r.config)||!Un(r.status))throw new Error("EOS_HISTORY_RESPONSE_INVALID");const s=r.config.influxdb2;if(s!==void 0&&!Un(s))throw new Error("EOS_HISTORY_RESPONSE_INVALID");const o=gn(r.configurationRevision,128);if(!o)throw new Error("EOS_HISTORY_RESPONSE_INVALID");return{configurationRevision:o,config:{provider:_f(r.config.provider),instance:gn(r.config.instance,256),influxdb2:{url:gn(s?.url),organization:gn(s?.organization,256),bucket:gn(s?.bucket,256),hasToken:s?.hasToken===!0,hasCaCertificate:s?.hasCaCertificate===!0}},status:{provider:_f(r.status.provider),state:gn(r.status.state,64),queueDepth:Ti(r.status.queueDepth),droppedPoints:Ti(r.status.droppedPoints),lastWriteAt:Ti(r.status.lastWriteAt),lastReadAt:Ti(r.status.lastReadAt),lastError:gn(r.status.lastError,256),readError:gn(r.status.readError,256),writeError:gn(r.status.writeError,256),legacyRecordingCount:Ti(r.status.legacyRecordingCount),writeVerified:r.status.writeVerified===!0}}}function dv(r){return{provider:r.provider,instance:r.instance,url:r.influxdb2.url,organization:r.influxdb2.organization,bucket:r.influxdb2.bucket,token:"",caCertificate:"",clearCaCertificate:!1}}function Af(r){let s;try{s=new URL(r.trim())}catch{throw new Error("EOS_INFLUX_URL_INVALID")}if(r.length>2048||!["http:","https:"].includes(s.protocol)||!s.hostname||s.username||s.password||s.search||s.hash||s.pathname.includes("/api/"))throw new Error("EOS_INFLUX_URL_INVALID");return s}function fv(r,s){if(r.provider==="adapter")return{provider:"adapter",instance:r.instance.trim()};const o=Af(r.url);if(!r.organization.trim()||!r.bucket.trim()||r.organization.length>256||r.bucket.length>256)throw new Error("EOS_INFLUX_CONFIG_INVALID");if(!r.token.trim()){if(!s.influxdb2.hasToken)throw new Error("EOS_INFLUX_TOKEN_REQUIRED");let d=!1;try{d=Af(s.influxdb2.url).origin===o.origin}catch{d=!1}if(!d)throw new Error("EOS_INFLUX_TOKEN_ORIGIN_CHANGED")}if(r.token.length>8192||r.caCertificate.length>65536)throw new Error("EOS_INFLUX_CONFIG_INVALID");if(r.caCertificate.trim()&&o.protocol!=="https:"||r.caCertificate.trim()&&r.clearCaCertificate)throw new Error("EOS_INFLUX_CA_INVALID");return{provider:"influxdb2",influxdb2:{url:r.url.trim(),organization:r.organization.trim(),bucket:r.bucket.trim(),token:r.token.trim(),caCertificate:r.caCertificate.trim(),clearCaCertificate:r.clearCaCertificate}}}function hv(r){if(!Un(r)||r.ok!==!0||!Un(r.check)||typeof r.check.reachable!="boolean"||typeof r.check.readable!="boolean")throw new Error("EOS_HISTORY_RESPONSE_INVALID");return{reachable:r.check.reachable,readable:r.check.readable}}const zf=new Map([["EOS_INFLUX_AUTHORIZATION_FAILED","InfluxDB lehnt den Zugriff ab (401/403). Token sowie Lese- und Schreibrechte für den Bucket prüfen."],["EOS_INFLUX_NOT_FOUND","InfluxDB-Endpunkt oder Bucket nicht gefunden. Serveradresse, Organisation und Bucket prüfen."],["EOS_INFLUX_TLS_FAILED","Das TLS-Zertifikat konnte nicht geprüft werden. Servername, Zertifikatsgültigkeit und gegebenenfalls das CA-Zertifikat prüfen."],["EOS_INFLUX_CA_INVALID","Das CA-Zertifikat ist ungültig oder passt nicht zur Auswahl. PEM nur mit HTTPS verwenden; Ersetzen und Entfernen nicht gleichzeitig wählen."],["EOS_INFLUX_CONNECTION_FAILED","InfluxDB ist nicht erreichbar. Adresse, Port und Netzwerkverbindung prüfen."],["EOS_INFLUX_TIMEOUT","InfluxDB antwortet nicht rechtzeitig. Verbindung und Server prüfen."],["EOS_INFLUX_URL_INVALID","Eine vollständige Serveradresse mit http:// oder https:// und gegebenenfalls Port eintragen. Keine Zugangsdaten oder /api/-Adresse verwenden."],["EOS_INFLUX_CONFIG_INVALID","InfluxDB-Einstellungen sind unvollständig oder ungültig. Organisation, Bucket und Zugangsdaten prüfen."],["EOS_INFLUX_TOKEN_REQUIRED","Für diese Verbindung muss ein InfluxDB-Token eingetragen werden."],["EOS_INFLUX_TOKEN_ORIGIN_CHANGED","Die Serveradresse oder der Port wurde geändert. Dafür einen Token neu eingeben; der gespeicherte Token wird nicht an ein anderes Ziel gesendet."],["EOS_INFLUX_REDIRECT_REJECTED","InfluxDB leitet die Anfrage um. Die endgültige Serveradresse direkt eintragen."],["EOS_INFLUX_RATE_LIMITED","InfluxDB begrenzt derzeit die Anfragen. Später erneut prüfen."],["EOS_INFLUX_NEW_DESTINATION_REQUIRES_TOKEN","Die Serveradresse oder der Port wurde geändert. Dafür einen Token neu eingeben; der gespeicherte Token wird nicht an ein anderes Ziel gesendet."],["EOS_INFLUX_TOKEN_INVALID","Der InfluxDB-Token fehlt oder ist ungültig. Einen gültigen Token für den gewählten Bucket eintragen."],["EOS_INFLUX_PROVIDER_INVALID","Für diese Verbindungsprüfung „InfluxDB 2 direkt“ auswählen."],["EOS_INFLUX_HTTP_REQUIRES_LOCAL_ADDRESS","Unverschlüsseltes HTTP ist nur für lokale Serveradressen erlaubt. Für einen externen InfluxDB-Server HTTPS verwenden."],["EOS_INFLUX_ADDRESS_FORBIDDEN","Diese Serveradresse ist für die Historie-Anbindung nicht zulässig. Eine reguläre InfluxDB-Serveradresse verwenden."],["EOS_INFLUX_CHECK_BUSY","Eine Verbindungsprüfung läuft bereits. Kurz warten und anschließend erneut prüfen."],["EOS_INFLUX_CONFIG_BUSY","Andere Einstellungen werden gerade gespeichert. Kurz warten; der Entwurf bleibt erhalten."],["EOS_INFLUX_CONFIG_SAVE_FAILED","Die Historie-Einstellungen konnten nicht gespeichert werden. Der Entwurf bleibt erhalten. Speicherstatus und EOS-Protokoll prüfen."],["EOS_INFLUX_TOKEN_ENCRYPTION_FAILED","Der Token konnte nicht sicher gespeichert werden. EOS-Systemkonfiguration und Protokoll prüfen; der Entwurf bleibt erhalten."],["EOS_INFLUX_TOKEN_DECRYPTION_FAILED","Der gespeicherte Token konnte nicht gelesen werden. Einen Token erneut eingeben und ausdrücklich speichern."],["EOS_INFLUX_NOT_READY","Der InfluxDB-Server meldet sich noch nicht als betriebsbereit. Serverstatus prüfen."],["EOS_INFLUX_NOT_CONFIGURED","Die direkte InfluxDB-Verbindung ist noch nicht eingerichtet. Einstellungen prüfen und speichern."],["EOS_INFLUX_BUSY","Die Historie ist momentan ausgelastet. Später erneut prüfen."],["EOS_INFLUX_QUEUE_FULL","Die Historie-Warteschlange ist voll; Messwerte wurden verworfen. Serververbindung und Schreibzugriff prüfen."],["EOS_INFLUX_RESPONSE_INVALID","InfluxDB hat keine gültige Antwort geliefert. Serverversion und Verbindung prüfen."],["EOS_INFLUX_RESPONSE_LIMIT","Die Antwort von InfluxDB überschreitet die zulässige Größe. Abfrage und Server prüfen."],["EOS_INFLUX_REQUEST_FAILED","InfluxDB hat die Anfrage abgelehnt. Organisation, Bucket, Token und Serverstatus prüfen."],["EOS_UI_OWNERSHIP_REQUIRED","EOS besitzt aktuell keine Betriebsfreigabe für diese Änderung. Systemfreigabe und Bestandsübernahme prüfen."],["EOS_INSTALLER_CONFIG_CONFLICT","Die Einstellungen wurden inzwischen geändert. Der Entwurf bleibt erhalten. Den gespeicherten Stand vor einem erneuten Speichern neu laden."],["EOS_HISTORY_RESPONSE_INVALID","Die Antwort der Historie ist unvollständig. Es wurde kein Erfolg bestätigt."]]);function Oi(r){const s=Un(r)?r:null,o=s&&Un(s.payload)?s.payload:null,d=typeof o?.error=="string"?o.error:typeof s?.code=="string"?s.code:r instanceof Error?r.message:"";if(o?.saved===!0)return"Die Einstellungen wurden gespeichert, konnten aber noch nicht vollständig aktiviert werden. Den gespeicherten Stand neu laden und die EOS-Betriebsfreigabe prüfen.";const c=zf.get(d);return c||(s?.status===409?zf.get("EOS_INSTALLER_CONFIG_CONFLICT")||"Die Einstellungen wurden inzwischen geändert.":s?.status===401?"Die EOS-Sitzung ist abgelaufen. Bitte erneut anmelden; der Entwurf bleibt geöffnet.":s?.status===403?"Für diese Einrichtung ist eine Installer- oder Admin-Freigabe erforderlich.":"Die Historie-Anfrage konnte nicht abgeschlossen werden. Einstellungen und Verbindung prüfen. Der Entwurf bleibt erhalten.")}function If(r){return r!==null&&r>0&&Number.isFinite(new Date(r).getTime())?new Date(r).toLocaleString("de-DE"):"Noch nicht bestätigt"}function pv(r){return r?r.state==="ready"?r.lastReadAt||r.lastWriteAt?"Eingerichtet":"Eingerichtet; Zugriff noch nicht bestätigt":r.state==="error"?"Fehler":r.state==="disabled"?"Direktverbindung deaktiviert":r.state==="closed"?"Verbindung geschlossen":"Noch nicht bekannt":"Noch nicht bekannt"}const mv={provider:"adapter",instance:"",url:"",organization:"",bucket:"",token:"",caCertificate:"",clearCaCertificate:!1};function gv(){const[r,s]=v.useState(null),[o,d]=v.useState(mv),[c,h]=v.useState(null),[m,g]=v.useState(null),[p,x]=v.useState(!0),[b,S]=v.useState("Historie-Einstellungen werden geladen…"),[E,M]=v.useState(!1),R=v.useRef(!0),I=v.useRef(!1),N=v.useRef(0),$=G=>{s(G),d(dv(G.config)),h(G.status),g(null)};v.useEffect(()=>{R.current=!0,I.current=!0;const G=++N.current;return ts().then(de=>{!R.current||G!==N.current||($(zo(de)),S("Gespeicherter Stand geladen. Änderungen werden erst mit „Speichern“ übernommen."))}).catch(de=>{R.current&&G===N.current&&(M(!0),S(Oi(de)))}).finally(()=>{R.current&&G===N.current&&(x(!1),I.current=!1)}),()=>{R.current=!1,N.current++}},[]);const F=(G,de)=>{d(Y=>({...Y,[G]:de})),g(null)},T=async G=>{if(!(I.current||!r&&G!=="reload")){I.current=!0,x(!0),M(!1),G==="check"&&g(null);try{if(G==="save"||G==="check"){if(!r)return;const de=fv(o,r.config);if(G==="save"){const Y=await ts("",{history:de,expectedConfigurationRevision:r.configurationRevision});R.current&&($(zo(Y)),S("Historie-Einstellungen gespeichert. Der Betriebsstatus zeigt Lese- und Schreibvorgänge getrennt."))}else{const Y=await ts("/check",{history:de});R.current&&(g(hv(Y)),S("Verbindungsprüfung abgeschlossen. Der Entwurf wurde nicht gespeichert; Schreibrechte wurden nicht geprüft."))}}else{const de=zo(await ts());R.current&&(G==="reload"?($(de),S("Gespeicherter Stand neu geladen.")):(h(de.status),S("Betriebsstatus aktualisiert. Der Entwurf bleibt unverändert.")))}}catch(de){R.current&&(M(!0),S(Oi(de)))}finally{R.current&&(I.current=!1,x(!1))}}},ue=o.provider==="influxdb2",le=Sn()??"";return l.jsx(Gn,{title:"Historie einrichten",subtitle:"Datenhaltung für EOS: vorhandenen ioBroker-Historieadapter weiterverwenden oder direkt mit InfluxDB 2 verbinden. Einrichtung durch Installer oder Admin.",children:l.jsxs("form",{className:"nw-history-setup",onSubmit:G=>{G.preventDefault(),T("save")},children:[l.jsxs("section",{className:"nw-card",children:[l.jsx("h2",{children:"Datenquelle"}),l.jsxs("fieldset",{disabled:p||!r,className:"nw-history-fields",children:[l.jsxs("label",{className:"nw-history-field",htmlFor:"historyProvider",children:["Historie-Anbindung",l.jsxs("select",{id:"historyProvider",className:"nw-input",value:o.provider,onChange:G=>F("provider",G.target.value==="influxdb2"?"influxdb2":"adapter"),children:[l.jsx("option",{value:"adapter",children:"Vorhandener ioBroker-Historieadapter"}),l.jsx("option",{value:"influxdb2",children:"InfluxDB 2 direkt"})]})]}),ue?l.jsxs(l.Fragment,{children:[l.jsx("p",{className:"nw-history-note",children:"EOS verbindet sich direkt mit einem bestehenden InfluxDB-2-Server. Die Einrichtung verändert keinen ioBroker-InfluxDB-Adapter und erstellt oder löscht keine Datenbank."}),l.jsxs("div",{className:"nw-history-grid",children:[l.jsxs("label",{className:"nw-history-field nw-history-wide",htmlFor:"historyUrl",children:["Serveradresse mit Port",l.jsx("input",{id:"historyUrl",className:"nw-input",type:"url",required:!0,maxLength:2048,value:o.url,onChange:G=>F("url",G.target.value),placeholder:"https://influx.example:8086",autoComplete:"off"})]}),l.jsxs("label",{className:"nw-history-field",htmlFor:"historyOrganization",children:["Organisation",l.jsx("input",{id:"historyOrganization",className:"nw-input",required:!0,maxLength:256,value:o.organization,onChange:G=>F("organization",G.target.value),autoComplete:"off"})]}),l.jsxs("label",{className:"nw-history-field",htmlFor:"historyBucket",children:["Bucket",l.jsx("input",{id:"historyBucket",className:"nw-input",required:!0,maxLength:256,value:o.bucket,onChange:G=>F("bucket",G.target.value),autoComplete:"off"})]}),l.jsxs("label",{className:"nw-history-field nw-history-wide",htmlFor:"historyToken",children:["InfluxDB-Token",l.jsx("input",{id:"historyToken",className:"nw-input",type:"password",autoComplete:"new-password",maxLength:8192,value:o.token,onChange:G=>F("token",G.target.value),placeholder:r?.config.influxdb2.hasToken?"Token gespeichert – leer lassen zum Beibehalten":"Token mit Zugriff auf diesen Bucket eintragen"}),l.jsx("small",{children:"Der gespeicherte Token wird nicht angezeigt. Bei einem anderen Server oder Port muss ein Token neu eingegeben werden."})]})]}),l.jsxs("details",{className:"nw-history-tls",children:[l.jsx("summary",{children:"Zertifikat und Verschlüsselung"}),l.jsx("p",{children:"Bei HTTPS wird das Serverzertifikat immer geprüft. Bei HTTP werden Token und Daten unverschlüsselt übertragen; dafür ein entsprechend geschütztes lokales Netz verwenden."}),l.jsxs("label",{className:"nw-history-field",htmlFor:"historyCa",children:["Eigenes CA-Zertifikat (optional, PEM)",l.jsx("textarea",{id:"historyCa",className:"nw-input",rows:5,maxLength:65536,spellCheck:!1,value:o.caCertificate,onChange:G=>F("caCertificate",G.target.value),placeholder:r?.config.influxdb2.hasCaCertificate?"CA-Zertifikat gespeichert – leer lassen zum Beibehalten":"-----BEGIN CERTIFICATE-----"}),l.jsx("small",{children:"Nur das öffentliche CA-Zertifikat eintragen, keinen privaten Schlüssel. Ohne eigenes CA-Zertifikat gelten die vertrauenswürdigen Zertifikatsstellen des Systems."})]}),l.jsxs("label",{className:"nw-history-checkbox",children:[l.jsx("input",{id:"historyClearCa",type:"checkbox",checked:o.clearCaCertificate,onChange:G=>F("clearCaCertificate",G.target.checked)}),"Gespeichertes eigenes CA-Zertifikat entfernen"]})]})]}):l.jsxs("label",{className:"nw-history-field",htmlFor:"historyInstance",children:["ioBroker-Historieinstanz",l.jsx("input",{id:"historyInstance",className:"nw-input",value:o.instance,maxLength:256,onChange:G=>F("instance",G.target.value),placeholder:"Zum Beispiel influxdb.0",autoComplete:"off"}),l.jsx("small",{children:"Die bestehende Historie-Anbindung bleibt bis zum ausdrücklichen Speichern erhalten. Die Konfiguration des anderen Adapters wird hier nicht geändert."})]})]}),l.jsxs("div",{className:"nw-actions-row",children:[l.jsx("button",{className:"nw-button nw-button--primary",type:"submit",disabled:p||!r,children:"Speichern"}),ue?l.jsx("button",{className:"nw-button",type:"button",disabled:p||!r,onClick:()=>{T("check")},children:"Verbindung prüfen"}):null,l.jsx("button",{className:"nw-button",type:"button",disabled:p,onClick:()=>{T("reload")},children:r?"Entwurf verwerfen & neu laden":"Erneut laden"})]}),l.jsx("p",{role:"status","aria-live":"polite",className:`nw-status ${E?"nw-status--bad":""}`,children:p?"Bitte warten…":b}),ue?l.jsxs("section",{className:"nw-history-check","aria-label":"Verbindungsprüfung des Entwurfs",children:[l.jsx("h3",{children:"Verbindungsprüfung des Entwurfs"}),l.jsxs("div",{className:"nw-history-check-grid",children:[l.jsxs("div",{children:[l.jsx("span",{children:"Erreichbarkeit"}),l.jsx("strong",{children:m?m.reachable?"Bestätigt":"Nicht bestätigt":"Noch nicht geprüft"})]}),l.jsxs("div",{children:[l.jsx("span",{children:"Lesezugriff"}),l.jsx("strong",{children:m?m.readable?"Bestätigt":"Nicht bestätigt":"Noch nicht geprüft"})]}),l.jsxs("div",{children:[l.jsx("span",{children:"Schreibzugriff"}),l.jsx("strong",{children:"Nicht durch diesen Test geprüft"})]})]}),l.jsx("p",{className:"nw-history-note",children:"Die Prüfung liest ausschließlich. Ein erfolgreicher Test bestätigt weder Schreibrechte noch die Speicherung von Messwerten."})]}):null]}),l.jsxs("section",{className:"nw-card","aria-label":"Gespeicherte Historie im Betrieb",children:[l.jsxs("div",{className:"nw-history-heading",children:[l.jsx("h2",{children:"Gespeicherte Historie im Betrieb"}),l.jsx("button",{className:"nw-button",type:"button",disabled:p||!r,onClick:()=>{T("status")},children:"Status aktualisieren"})]}),l.jsxs("dl",{className:"nw-history-runtime",children:[l.jsxs("div",{children:[l.jsx("dt",{children:"Aktive Anbindung"}),l.jsx("dd",{children:c?c.provider==="influxdb2"?"InfluxDB 2 direkt":"ioBroker-Historieadapter":"Unbekannt"})]}),l.jsxs("div",{children:[l.jsx("dt",{children:"Verbindungszustand"}),l.jsx("dd",{children:pv(c)})]}),l.jsxs("div",{children:[l.jsx("dt",{children:"Letzter bestätigter Lesezugriff"}),l.jsxs("dd",{children:[If(c?.lastReadAt??null),c?.readError?l.jsx("small",{className:"nw-history-failure",children:Oi({code:c.readError})}):null]})]}),l.jsxs("div",{children:[l.jsx("dt",{children:"Letzter bestätigter Schreibzugriff"}),l.jsxs("dd",{children:[c?.writeVerified===!0?If(c.lastWriteAt):"Noch nicht bestätigt",c?.writeError?l.jsx("small",{className:"nw-history-failure",children:Oi({code:c.writeError})}):null]})]}),l.jsxs("div",{children:[l.jsx("dt",{children:"Messwerte in Warteschlange"}),l.jsx("dd",{children:c?.queueDepth??"Unbekannt"})]}),l.jsxs("div",{children:[l.jsx("dt",{children:"Verworfene Messwerte"}),l.jsx("dd",{children:c?.droppedPoints??"Unbekannt"})]})]}),c?.lastError&&c.lastError!==c.readError&&c.lastError!==c.writeError?l.jsx("p",{className:"nw-status nw-status--bad",children:Oi({code:c.lastError})}):null,c?.provider==="influxdb2"&&(c.legacyRecordingCount??0)>0?l.jsxs("p",{className:"nw-history-warning",role:"status",children:["Für ",c.legacyRecordingCount," EOS-Datenpunkte ist im bisherigen ioBroker-InfluxDB-Adapter noch eine Aufzeichnung eingerichtet. Ziel-Bucket und Betriebsstatus dieses Adapters prüfen. Bei demselben Bucket die bisherige Aufzeichnung dieser Datenpunkte gezielt deaktivieren, damit Messwerte nicht doppelt geschrieben werden. EOS ändert diese Einstellungen nicht automatisch."]}):null,l.jsx("p",{className:"nw-history-note",children:"Der Status gehört zur gespeicherten Verbindung. „Eingerichtet“ bestätigt keine Schreibrechte. Reguläre EOS-Verlaufswerte werden standardmäßig im 10-Minuten-Raster geschrieben; ohne frische Messwerte entsteht kein bestätigter Schreibzugriff. Ein Wechsel kopiert keine alten Daten in den neuen Bucket und stellt gelöschte Daten nicht wieder her."}),l.jsxs("div",{className:"nw-actions-row",children:[l.jsx("a",{className:"nw-button",href:`${le}/history.html`,children:"Historie öffnen"}),l.jsx("a",{className:"nw-button",href:`${le}/ems-apps.html`,children:"EMS App-Center öffnen"})]})]})]})})}const wv=r=>typeof r=="string"&&r.length>0&&r.length<=512&&r===r.trim()&&!/[\x00-\x1f\x7f]/.test(r);function vv({currentId:r="",mode:s="read",signal:o}={}){return new Promise((d,c)=>{if(o?.aborted){c(new DOMException("Auswahl abgebrochen.","AbortError"));return}const h=Array.from(crypto.getRandomValues(new Uint8Array(16)),T=>T.toString(16).padStart(2,"0")).join(""),m=window.location.origin,g=window.parent!==window&&new URLSearchParams(window.location.search).get("embedded")==="1";let p=g?window.parent:null,x=null,b=!1,S=!1,E,M;const R=()=>{try{p?.postMessage({type:"nw:dp-picker-cancel",requestId:h},m)}catch{}},I=(T,ue)=>{if(!b){b=!0,clearTimeout(M),clearInterval(E),window.removeEventListener("message",F),window.removeEventListener("pagehide",N),o?.removeEventListener("abort",N),(ue||T===null)&&R();try{x&&!x.closed&&x.close()}catch{}ue?c(ue):d(T)}},N=()=>I(null,new DOMException("Auswahl abgebrochen.","AbortError")),$=()=>{if(!(S||!p||b)){S=!0;try{p.postMessage({type:"nw:dp-picker-open",requestId:h,currentId:r.slice(0,512),mode:s},m)}catch{I(null,new Error("Datenpunktauswahl konnte nicht geöffnet werden."))}}};function F(T){if(!(b||T.origin!==m||T.source!==p||!kn(T.data)||!it(T.data)||T.data.requestId!==h)){if(T.data.type==="nw:dp-picker-ready"&&x){$();return}T.data.type==="nw:dp-picker-opened"&&S&&(clearTimeout(M),M=setTimeout(()=>I(null,new Error("Datenpunktauswahl beendet. Bitte erneut öffnen.")),3e5)),T.data.type==="nw:dp-picker-result"&&S&&(T.data.id===null?I(null):wv(T.data.id)&&I(T.data.id))}}if(window.addEventListener("message",F),window.addEventListener("pagehide",N),o?.addEventListener("abort",N,{once:!0}),M=setTimeout(()=>I(null,new Error("Datenpunktauswahl nicht erreichbar. Bitte Anmeldung prüfen und erneut öffnen.")),15e3),g)$();else{const T=new URL(`${Sn()??""}/ems-apps.html`,m);T.searchParams.set("nwAdmin","1"),T.searchParams.set("dpPicker","1"),T.searchParams.set("requestId",h);try{x=window.open(T.toString(),`nw-dp-picker-${h}`,"popup,width=1050,height=760")}catch{I(null,new Error("Bitte das Fenster zur Datenpunktauswahl im Browser zulassen."));return}if(p=x,!x){I(null,new Error("Bitte das Fenster zur Datenpunktauswahl im Browser zulassen."));return}E=setInterval(()=>{x?.closed&&I(null)},400)}})}const yh=v.createContext({revision:0,blocked:!1});function Zt({label:r,value:s="",onChange:o,required:d=!1,help:c="",maxLength:h=512,mode:m="read",disabled:g=!1}){const p=v.useId(),x=v.useContext(yh),[b,S]=v.useState(!1),[E,M]=v.useState(""),R=v.useRef(null),I=v.useRef({context:x,value:s,onChange:o,disabled:g});I.current={context:x,value:s,onChange:o,disabled:g},v.useLayoutEffect(()=>(R.current?.abort(),R.current=null,S(!1),()=>{R.current?.abort(),R.current=null}),[x.revision,x.blocked,s,g]);async function N(){if(g||x.blocked)return;R.current?.abort();const $=new AbortController,F={context:x,value:s};R.current=$,S(!0),M("");try{const T=await vv({currentId:typeof s=="string"?s:"",mode:m,signal:$.signal});T!==null&&!$.signal.aborted&&R.current===$&&I.current.context.revision===F.context.revision&&!I.current.context.blocked&&I.current.value===F.value&&!I.current.disabled&&I.current.onChange(T)}catch(T){!(T instanceof Error&&T.name==="AbortError")&&!$.signal.aborted&&M(T instanceof Error?T.message:"Datenpunkt konnte nicht gewählt werden.")}finally{R.current===$&&(R.current=null,S(!1))}}return l.jsxs("div",{className:"nw-nvp-field nw-config-field","data-dp-field":"true",children:[l.jsx("label",{htmlFor:p,className:"nw-config-label",children:r}),l.jsxs("div",{className:"nw-dp-field-controls",style:{display:"flex",gap:8,alignItems:"stretch",minWidth:0},children:[l.jsx("input",{id:p,className:"nw-input nw-config-input",style:{minWidth:0,flex:1},value:s??"",required:d,maxLength:h,disabled:g||x.blocked,onChange:$=>o($.target.value)}),l.jsx("button",{type:"button",className:"nw-button nw-config-btn nw-config-btn--ghost","data-dp-pick":"true","aria-label":`Datenpunkt auswählen: ${r}`,disabled:g||x.blocked||b,onClick:N,children:b?"Auswahl offen…":"DP wählen"})]}),c&&l.jsx("small",{children:c}),E&&l.jsx("small",{role:"alert",children:E})]})}const nu=r=>{const s=Object.create(null);for(const[o,d]of Object.entries(r))s[o]=d;return Object.freeze(s)},Fo=nu({selfConsumption:"Eigenverbrauchsoptimierung (EVO)",zeroExport:"Nulleinspeisung",peakShaving:"Lastspitzenkappung",arbitrage:"Arbitrage",tariff:"Tarifgeführter Betrieb"}),ps=nu({M0:"M0 · Gesamtanschluss",M1:"M1 · lokaler Bereich"}),$r=()=>({stateId:"",unit:"W",sign:1,maxAgeMs:5e3}),Df=r=>({id:r,source:r==="M0"?"general":"mapped",...r==="M1"?{measurement:$r()}:{},importLimitW:null,exportLimitW:null,importReserveW:0,exportReserveW:0}),Lf=()=>({schemaVersion:1,configVersion:1,maxSkewMs:1e3,points:[Df("M0"),Df("M1")],storages:[],pvAssignments:[]}),ms=()=>({stateId:"",scale:1,sign:1}),yv=()=>({id:"",name:"",connectionPointId:"",controlPointId:"",dispatchGroupId:"",primaryPurpose:"selfConsumption",authority:"eos",powerMeasurement:$r(),socMeasurement:{stateId:"",scale:1,maxAgeMs:5e3},maxChargeW:"",maxDischargeW:"",minSoc:10,maxSoc:90,maxDeltaWPerSec:"",configuredToleranceW:100,commandTimeoutMs:5e3,strategy:{targetGridImportW:50,importThresholdW:20},command:{mode:"signedTarget",signedTarget:ms()}}),xv=()=>({id:"",connectionPointId:"",referencePowerW:"",powerMeasurement:$r(),command:{stateId:"",unit:"W",scale:1}}),ar=r=>typeof r=="number"&&Number.isFinite(r)?`${(r/1e3).toLocaleString("de-DE",{maximumFractionDigits:2})} kW`:"—",Bo=r=>typeof r=="string"?r:r?.message||r?.reason||r?.code||"Unbekannter Prüfhinweis",ru=(r,s,o)=>{const d={...r};return o?d[s]=o:delete d[s],d};function He({label:r,value:s,onChange:o,min:d=0,max:c,required:h=!0,unit:m="",help:g=""}){return l.jsxs("label",{className:"nw-nvp-field nw-config-field",children:[l.jsxs("span",{className:"nw-config-label",children:[r,m?` (${m})`:""]}),l.jsx("input",{className:"nw-input nw-config-input",type:"number",min:d,max:c,step:"any",required:h,value:s??"",onChange:p=>o(p.target.value===""?"":Number(p.target.value))}),g&&l.jsx("small",{children:g})]})}function ls({label:r,value:s,onChange:o,required:d=!1,help:c="",maxLength:h=256}){return l.jsxs("label",{className:"nw-nvp-field nw-config-field",children:[l.jsx("span",{className:"nw-config-label",children:r}),l.jsx("input",{className:"nw-input nw-config-input",value:s??"",required:d,maxLength:h,onChange:m=>o(m.target.value)}),c&&l.jsx("small",{children:c})]})}function Mt({label:r,value:s,onChange:o,options:d,required:c=!0,placeholder:h=!1}){return l.jsxs("label",{className:"nw-nvp-field nw-config-field",children:[l.jsx("span",{className:"nw-config-label",children:r}),l.jsxs("select",{className:"nw-input nw-config-select",value:s??"",required:c,onChange:m=>o(m.target.value),children:[h&&l.jsx("option",{value:"",children:"Bitte ausdrücklich zuordnen"}),Object.entries(d).map(([m,g])=>l.jsx("option",{value:m,children:String(g)},m))]})]})}function Fr({value:r,onChange:s,label:o="Istleistung · Datenpunkt",storage:d=!1,positiveOnly:c=!1}){const h=r||$r(),m=(g,p)=>s({...h,[g]:p});return l.jsxs("div",{className:"nw-nvp-grid",children:[l.jsx(Zt,{label:o,value:h.stateId,onChange:g=>m("stateId",g),required:!0,help:d?"AC-Wirkung der Batterie. PV und Batterie benötigen getrennte Istwerte.":"Vollständige Datenpunktkennung."}),l.jsx(Mt,{label:"Einheit des Messwerts",value:h.unit,onChange:g=>m("unit",g),options:{W:"Watt (W)",kW:"Kilowatt (kW)"}}),l.jsx(Mt,{label:"Vorzeichen der Messung",value:h.sign,onChange:g=>m("sign",Number(g)),options:c?{1:"Positiver Betrag"}:d?{1:"Positiv = Entladen","-1":"Positiv = Laden"}:{1:"Rohwert unverändert","-1":"Rohwert umkehren"}}),l.jsx(He,{label:"Höchstens zulässiges Messwertalter",unit:"ms",min:1,value:h.maxAgeMs,onChange:g=>m("maxAgeMs",g)})]})}function Sv({rootSource:r}){const s=r?.measurement,o=s?.kind==="split"?[["Netzbezug",s.importMeasurement],["Netzeinspeisung",s.exportMeasurement]]:[["Signierte Netzleistung",s]];return l.jsxs("div",{className:"nw-dynamic-root-source",children:[l.jsx("h3",{children:"M0-Messung aus Allgemein"}),l.jsx("p",{children:"Verknüpfte Quelle, hier schreibgeschützt. M0 erfasst den Gesamtanschluss einschließlich M1."}),l.jsx("dl",{className:"nw-dynamic-readout",children:o.map(([d,c])=>l.jsxs(Wf.Fragment,{children:[l.jsx("dt",{children:d}),l.jsxs("dd",{children:[l.jsx("code",{children:c?.stateId||"Noch nicht zugeordnet"}),c?.stateId&&l.jsxs("small",{children:[c.unit||"Einheit nicht bestätigt"," · Vorzeichen ",c.sign===-1?"umgekehrt":"unverändert"," · Alter maximal ",c.maxAgeMs??s?.maxAgeMs??"—"," ms"]})]})]},d))}),r?.valid===!1&&l.jsx("p",{className:"nw-nvp-notice",children:r.reason||"M0 muss zuerst unter Allgemein vollständig zugeordnet werden."}),s?.kind==="split"&&l.jsxs("p",{children:["Gemeinsames Vorzeichen: ",s.sign===-1?"Bezug minus Einspeisung wird umgekehrt":"Bezug minus Einspeisung","."]}),l.jsx("a",{className:"nw-link-button nw-config-btn",href:`${Sn()??""}/ems-apps.html?nwAdmin=1&tab=mapping`,target:typeof window<"u"&&window.parent!==window?"_parent":"_self",children:"Zuordnung → Allgemein öffnen"})]})}function kv({value:r,onChange:s,rootSource:o=null}){const d=(h,m)=>s({...r,[h]:m}),c=r.id==="M1";return l.jsxs("section",{className:"nw-card nw-config-card nw-nvp-point","aria-label":`${r.id} einrichten`,children:[l.jsxs("div",{className:"nw-nvp-section-heading",children:[l.jsx("h2",{className:"nw-config-card__title",children:ps[r.id]}),l.jsx("span",{className:"nw-nvp-tag",children:c?"Innerhalb von M0":"Gesamtanschluss"})]}),c?l.jsxs(l.Fragment,{children:[l.jsx("p",{children:"M1 misst ausschließlich den lokalen Bereich. Netzbezug ist positiv, Einspeisung negativ."}),l.jsx(Fr,{label:"M1-Nettoleistung · Datenpunkt",value:r.measurement,onChange:h=>d("measurement",h)})]}):l.jsx(Sv,{rootSource:o}),l.jsx("h3",{children:"Anschlussgrenzen und feste Reserven"}),l.jsx("p",{children:"Die Betriebsgrenze ergibt sich aus Anschlussgrenze minus Reserve. 0 W ist eine wirksame Grenze."}),l.jsx("div",{className:"nw-nvp-grid",children:["import","export"].map(h=>{const m=`${h}LimitW`,g=`${h}ReserveW`,p=h==="import"?"Bezug":"Einspeisung",x=c&&r[m]===null,b=r[m],S=r[g];return l.jsxs("div",{className:"nw-nvp-limit",children:[c&&l.jsxs("label",{children:[l.jsx("input",{type:"checkbox",checked:!x,onChange:E=>s({...r,[m]:E.target.checked?"":null,[g]:E.target.checked?r[g]:0})})," ",p," lokal begrenzen"]}),x?l.jsxs("p",{children:[p,": ausdrücklich keine lokale Vertragsgrenze. M0 bleibt wirksam."]}):l.jsxs(l.Fragment,{children:[l.jsx(He,{label:`${p} · Anschlussgrenze`,unit:"W",value:r[m],onChange:E=>d(m,E)}),l.jsx(He,{label:`${p} · feste Reserve`,unit:"W",value:r[g],onChange:E=>d(g,E)}),l.jsxs("p",{className:"nw-text-muted",children:["Betriebsgrenze: ",typeof b=="number"&&typeof S=="number"?`${b-S} W`:"noch nicht festgelegt"]})]})]},h)})})]})}function gs({label:r,value:s,onChange:o}){const d=typeof s=="number"||s==="";return l.jsxs("div",{className:"nw-dynamic-scalar",children:[l.jsx(Mt,{label:`${r} · Datentyp`,value:d?"number":"boolean",onChange:c=>o(c==="number"?0:!1),options:{boolean:"Boolean",number:"Zahl"}}),d?l.jsx(He,{label:r,min:-Number.MAX_SAFE_INTEGER,value:typeof s=="number"||s===""?s:void 0,onChange:o}):l.jsx(Mt,{label:r,value:String(s===!0),onChange:c=>o(c==="true"),options:{true:"true",false:"false"}})]})}function Wi({label:r,value:s,onChange:o,signed:d=!1}){const c=s||ms(),h=(m,g)=>o({...c,[m]:g});return l.jsxs("div",{className:"nw-dynamic-subsection",children:[l.jsx("h4",{children:r}),l.jsxs("div",{className:"nw-nvp-grid",children:[l.jsx(Zt,{mode:"write",label:`${r} · Schreib-Datenpunkt`,value:c.stateId,onChange:m=>h("stateId",m),required:!0}),l.jsx(He,{label:`${r} · W je Rohwert`,min:1e-6,value:c.scale,onChange:m=>h("scale",m),help:"1 für W; 1000 für kW. Der Sollwert in W wird durch diesen Faktor geteilt."}),d&&l.jsx(Mt,{label:"Vorzeichen des Sollwerts",value:c.sign,onChange:m=>h("sign",Number(m)),options:{1:"Positiv = Entladen","-1":"Positiv = Laden"}}),l.jsx(Zt,{label:`${r} · Rücklese-Datenpunkt (optional)`,value:c.readbackStateId,onChange:m=>o(ru(c,"readbackStateId",m)),help:"Rückgelesener Sollwert ist getrennt von der gemessenen Leistung."})]})]})}function bv({label:r,value:s,onChange:o}){const d=(c,h)=>o({...s,[c]:h});return l.jsxs("div",{className:"nw-dynamic-subsection",children:[l.jsx("h4",{children:r}),l.jsxs("div",{className:"nw-nvp-grid",children:[l.jsx(Zt,{mode:"write",label:`${r} · Schreib-Datenpunkt`,value:s.stateId,onChange:c=>d("stateId",c),required:!0}),l.jsx(Zt,{label:`${r} · Rücklese-Datenpunkt (optional)`,value:s.readbackStateId,onChange:c=>o(ru(s,"readbackStateId",c))}),l.jsx(gs,{label:`${r} · Ein-Wert`,value:s.onValue,onChange:c=>d("onValue",c)}),l.jsx(gs,{label:`${r} · Aus-Wert`,value:s.offValue,onChange:c=>d("offValue",c)})]})]})}function jv({value:r,onChange:s,onRemove:o}){const d=(p,x)=>s({...r,[p]:x}),c=r.command||{mode:"signedTarget",signedTarget:ms()},h=(p,x)=>d("command",{...c,[p]:x}),m=(p,x)=>d("strategy",{...r.strategy,[p]:x}),g=p=>{const x={...c,mode:p};["signedTarget","chargeTarget","dischargeTarget","maxCharge","maxDischarge","appliedMaxCharge","appliedMaxDischarge","watchdog"].forEach(S=>delete x[S]),(p==="signedTarget"?["signedTarget"]:p==="splitTarget"?["chargeTarget","dischargeTarget"]:["maxCharge","maxDischarge"]).forEach(S=>{x[S]=c[S]||ms()}),p==="externalLimits"&&(x.appliedMaxCharge=c.appliedMaxCharge||$r(),x.appliedMaxDischarge=c.appliedMaxDischarge||$r(),x.watchdog=c.watchdog||{stateId:"",ttlMs:5e3,writeValue:!0,readbackStateId:"",expiryBehavior:"zeroLimits"}),d("command",x)};return l.jsxs("article",{className:"nw-nvp-device",children:[l.jsxs("div",{className:"nw-nvp-section-heading",children:[l.jsx("h3",{children:r.name||r.id||"Neuer Speicher"}),l.jsx("button",{type:"button",className:"nw-button nw-config-btn",onClick:o,children:"Speicher entfernen"})]}),l.jsxs("div",{className:"nw-nvp-grid",children:[l.jsx(ls,{label:"Speicherkennung",value:r.id,onChange:p=>d("id",p),required:!0,help:"Eindeutige freie Kennung dieser App; keine bestehende Farm-Zuordnung erforderlich."}),l.jsx(ls,{label:"Speichername",value:r.name,onChange:p=>d("name",p)}),l.jsx(Mt,{label:"Physischer Anschlussbereich",value:r.connectionPointId,onChange:p=>d("connectionPointId",p),options:ps,placeholder:!0}),l.jsx(Mt,{label:"Regelmesspunkt",value:r.controlPointId,onChange:p=>d("controlPointId",p),options:ps,placeholder:!0}),l.jsx(ls,{label:"Regel-/Dispatchgruppe",value:r.dispatchGroupId,onChange:p=>d("dispatchGroupId",p),required:!0,help:"Gemeinsame Gruppe nur bei gleichem Bereich, gleicher Aufgabe, Strategie und Hoheit."}),l.jsx(Mt,{label:"Betriebsaufgabe",value:r.primaryPurpose,onChange:p=>d("primaryPurpose",p),options:Fo}),l.jsx(Mt,{label:"Stellhoheit",value:r.authority,onChange:p=>d("authority",p),options:{eos:"EOS gibt Leistungsziele vor",external:"Externer Regler innerhalb EOS-Grenzen"}})]}),l.jsxs("p",{className:"nw-nvp-info",children:["Wirksame Anschlussgrenzen: ",r.connectionPointId==="M1"?"M1 und M0":r.connectionPointId==="M0"?"M0":"noch nicht zugeordnet","."]}),l.jsx("h4",{children:"Istwerte und Verfügbarkeit"}),l.jsx(Fr,{storage:!0,label:"Batterie-Istleistung · Datenpunkt",value:r.powerMeasurement,onChange:p=>d("powerMeasurement",p)}),l.jsxs("div",{className:"nw-nvp-grid",children:[l.jsx(Zt,{label:"SoC · Datenpunkt",value:r.socMeasurement?.stateId,onChange:p=>d("socMeasurement",{...r.socMeasurement,stateId:p}),required:!0}),l.jsx(He,{label:"SoC · Prozentpunkte je Rohwert",min:1e-6,value:r.socMeasurement?.scale,onChange:p=>d("socMeasurement",{...r.socMeasurement,scale:p})}),l.jsx(He,{label:"SoC · Höchstalter",unit:"ms",min:1,value:r.socMeasurement?.maxAgeMs,onChange:p=>d("socMeasurement",{...r.socMeasurement,maxAgeMs:p})})]}),l.jsxs("label",{className:"nw-dynamic-checkbox",children:[l.jsx("input",{type:"checkbox",checked:!!r.availability,onChange:p=>{const x={...r};p.target.checked?x.availability={stateId:"",availableValue:!0,maxAgeMs:5e3}:delete x.availability,s(x)}})," Zusätzliches Verfügbarkeitssignal verwenden"]}),r.availability&&l.jsxs("div",{className:"nw-nvp-grid",children:[l.jsx(Zt,{label:"Verfügbarkeit · Datenpunkt",value:r.availability.stateId,onChange:p=>d("availability",{...r.availability,stateId:p}),required:!0}),l.jsx(gs,{label:"Verfügbar-Wert",value:r.availability.availableValue,onChange:p=>d("availability",{...r.availability,availableValue:p})}),l.jsx(He,{label:"Verfügbarkeit · Höchstalter",unit:"ms",min:1,value:r.availability.maxAgeMs,onChange:p=>d("availability",{...r.availability,maxAgeMs:p})})]}),l.jsx("h4",{children:"Leistungs-, SoC- und Änderungsgrenzen"}),l.jsxs("div",{className:"nw-nvp-grid",children:[l.jsx(He,{label:"Maximale Ladeleistung",unit:"W",value:r.maxChargeW,onChange:p=>d("maxChargeW",p)}),l.jsx(He,{label:"Maximale Entladeleistung",unit:"W",value:r.maxDischargeW,onChange:p=>d("maxDischargeW",p)}),l.jsx(He,{label:"Untergrenze SoC",unit:"%",max:100,value:r.minSoc,onChange:p=>d("minSoc",p)}),l.jsx(He,{label:"Obergrenze SoC",unit:"%",max:100,value:r.maxSoc,onChange:p=>d("maxSoc",p)}),l.jsx(He,{label:"Höchste Leistungsänderung",unit:"W/s",min:1,value:r.maxDeltaWPerSec,onChange:p=>d("maxDeltaWPerSec",p)}),l.jsx(He,{label:"Bestätigungstoleranz",unit:"W",value:r.configuredToleranceW,onChange:p=>d("configuredToleranceW",p)}),l.jsx(He,{label:"Bestätigungsfrist",unit:"ms",min:1,value:r.commandTimeoutMs,onChange:p=>d("commandTimeoutMs",p)})]}),l.jsxs("h4",{children:["Strategie für ",Fo[r.primaryPurpose||""]]}),l.jsxs("div",{className:"nw-nvp-grid",children:[l.jsx(He,{label:"Ziel-Netzbezug",unit:"W",value:r.strategy?.targetGridImportW,onChange:p=>m("targetGridImportW",p)}),l.jsx(He,{label:"Bezugsschwelle / Toleranz",unit:"W",value:r.strategy?.importThresholdW,onChange:p=>m("importThresholdW",p)}),r.primaryPurpose==="peakShaving"&&l.jsx(He,{label:"Lastspitzengrenze",unit:"W",value:r.strategy?.peakLimitW,onChange:p=>m("peakLimitW",p)})]}),r.primaryPurpose==="arbitrage"&&r.authority==="eos"&&l.jsxs(l.Fragment,{children:[l.jsx("p",{children:"Ein extern berechneter Leistungswunsch wird von EOS innerhalb der Anschluss- und Speichergrenzen umgesetzt."}),l.jsx(Fr,{storage:!0,label:"Arbitrage-Leistungswunsch · Datenpunkt",value:r.requestPowerMeasurement,onChange:p=>d("requestPowerMeasurement",p)})]}),r.primaryPurpose==="tariff"&&l.jsx("p",{className:"nw-nvp-info",children:"Der aktive Tarifbetrieb nutzt das zentrale Preissignal. Anschluss- und SoC-Grenzen gelten auch bei günstigen Preisen."}),l.jsx("h4",{children:"Generische Geräteschnittstelle"}),l.jsx(Mt,{label:"Befehlsschnittstelle",value:c.mode,onChange:g,options:{signedTarget:"Signierter Leistungs-Sollwert",splitTarget:"Getrennte Lade-/Entlade-Sollwerte",externalLimits:"Maximale Lade-/Entladefreigaben für externen Regler"}}),c.mode==="signedTarget"&&l.jsx(Wi,{signed:!0,label:"Leistungssollwert",value:c.signedTarget,onChange:p=>h("signedTarget",p)}),c.mode==="splitTarget"&&l.jsxs(l.Fragment,{children:[l.jsx(Wi,{label:"Ladesollwert",value:c.chargeTarget,onChange:p=>h("chargeTarget",p)}),l.jsx(Wi,{label:"Entladesollwert",value:c.dischargeTarget,onChange:p=>h("dischargeTarget",p)}),l.jsx("p",{children:"Richtungswechsel erfolgen erst nach bestätigter Neutralisierung des bisherigen Sollwerts."})]}),c.mode==="externalLimits"&&l.jsxs(l.Fragment,{children:[l.jsx("p",{className:"nw-nvp-notice",children:"Externe Stellhoheit ist für Arbitrage vorgesehen. EOS erteilt maximale Lade-/Entladefreigaben, keine Leistungsziele. Wirksame Grenzrücklesung und geräteseitiger Ablauf sind erforderlich."}),l.jsx(Wi,{label:"Maximale Ladefreigabe",value:c.maxCharge,onChange:p=>h("maxCharge",p)}),l.jsx(Wi,{label:"Maximale Entladefreigabe",value:c.maxDischarge,onChange:p=>h("maxDischarge",p)}),l.jsx(Fr,{positiveOnly:!0,label:"Angewandte Ladegrenze · Datenpunkt",value:c.appliedMaxCharge,onChange:p=>h("appliedMaxCharge",p)}),l.jsx(Fr,{positiveOnly:!0,label:"Angewandte Entladegrenze · Datenpunkt",value:c.appliedMaxDischarge,onChange:p=>h("appliedMaxDischarge",p)}),l.jsxs("div",{className:"nw-nvp-grid",children:[l.jsx(Zt,{mode:"write",label:"Watchdog · Schreib-Datenpunkt",value:c.watchdog?.stateId,onChange:p=>h("watchdog",{...c.watchdog,stateId:p}),required:!0}),l.jsx(Zt,{label:"Watchdog · Rücklese-Datenpunkt",value:c.watchdog?.readbackStateId,onChange:p=>h("watchdog",{...c.watchdog,readbackStateId:p}),required:!0}),l.jsx(He,{label:"Geräteseitige Ablaufzeit",unit:"ms",min:1,value:c.watchdog?.ttlMs,onChange:p=>h("watchdog",{...c.watchdog,ttlMs:p})}),l.jsx(gs,{label:"Watchdog · Schreibwert",value:c.watchdog?.writeValue,onChange:p=>h("watchdog",{...c.watchdog,writeValue:p})})]}),l.jsx("p",{children:"Konfigurierter Gerätevertrag: Nach Ablauf setzt das Gerät seine externen Maximalfreigaben auf 0. Diese Funktion muss im Gerät eingerichtet sein."})]}),l.jsxs("details",{children:[l.jsx("summary",{children:"Optionale Betriebs- und Richtungsfreigaben"}),[["run","Betriebsfreigabe"],["chargeEnable","Ladefreigabe"],["dischargeEnable","Entladefreigabe"]].map(([p,x])=>l.jsxs("div",{children:[l.jsxs("label",{className:"nw-dynamic-checkbox",children:[l.jsx("input",{type:"checkbox",checked:!!c[p],onChange:b=>{const S={...c};b.target.checked?S[p]={stateId:"",onValue:!0,offValue:!1}:delete S[p],d("command",S)}})," ",x," zuordnen"]}),c[p]&&l.jsx(bv,{label:x,value:c[p],onChange:b=>h(p,b)})]},p))]})]})}function Ev({value:r,onChange:s,onRemove:o}){const d=(c,h)=>s({...r,[c]:h});return l.jsxs("article",{className:"nw-nvp-device",children:[l.jsxs("div",{className:"nw-nvp-section-heading",children:[l.jsx("h3",{children:r.id||"Neuer PV-Wechselrichter"}),l.jsx("button",{type:"button",className:"nw-button nw-config-btn",onClick:o,children:"PV entfernen"})]}),l.jsxs("div",{className:"nw-nvp-grid",children:[l.jsx(ls,{label:"PV-Kennung",value:r.id,onChange:c=>d("id",c),required:!0}),l.jsx(Mt,{label:"PV-Anschlussbereich",value:r.connectionPointId,onChange:c=>d("connectionPointId",c),options:ps,placeholder:!0}),l.jsx(He,{label:"AC-Bezugsleistung",unit:"W",min:1,value:r.referencePowerW,onChange:c=>d("referencePowerW",c),help:"Bezugsleistung der Wirkleistungsregelung, keine ungeprüfte DC-Modulleistung."})]}),l.jsx(Fr,{label:"PV-Istleistung · Datenpunkt",value:r.powerMeasurement,onChange:c=>d("powerMeasurement",c)}),l.jsxs("div",{className:"nw-nvp-grid",children:[l.jsx(Zt,{mode:"write",label:"PV-Erzeugungsgrenze · Schreib-Datenpunkt",value:r.command?.stateId,onChange:c=>d("command",{...r.command,stateId:c}),required:!0}),l.jsx(Mt,{label:"Einheit der PV-Vorgabe",value:r.command?.unit,onChange:c=>d("command",{...r.command,unit:c}),options:{W:"Watt (W)","%":"Prozent der AC-Bezugsleistung"}}),l.jsx(He,{label:r.command?.unit==="%"?"Prozentpunkte je Rohwert":"PV-Vorgabe · W je Rohwert",min:1e-6,value:r.command?.scale,onChange:c=>d("command",{...r.command,scale:c})}),l.jsx(Zt,{label:"PV-Erzeugungsgrenze · Rücklese-Datenpunkt (optional)",value:r.command?.readbackStateId,onChange:c=>d("command",ru(r.command||{},"readbackStateId",c))})]}),l.jsxs("label",{className:"nw-dynamic-checkbox",children:[l.jsx("input",{type:"checkbox",checked:r.evuControl===!0,onChange:c=>d("evuControl",c.target.checked)})," Vorhandene EVU-Stufen auf diesen Wechselrichter anwenden"]}),r.evuControl&&l.jsx("p",{children:"Verwendet die bestehende EVU-Anlagenzuordnung. EVU-Stufe und dynamische Anschlussgrenze werden zu einer gemeinsamen Erzeugungsvorgabe zusammengeführt."})]})}function Mf({status:r,preview:s=!1}){if(!r)return l.jsx("p",{children:s?"Noch keine Messwertvorschau verfügbar.":"Noch kein Betriebsstatus verfügbar."});const o=r.ts,d=typeof o!="number"||!Number.isFinite(o)||o>Date.now()||Date.now()-o>15e3,c=r.snapshot||{},h=Object.entries(c.points||{}).map(([E,M])=>({id:E,...M})),m=c.storages||{},g=Array.isArray(r.storageResults)?r.storageResults:[],p=Array.isArray(r.pendingIntervals)?r.pendingIntervals:[],x=[...new Set([...Object.keys(m),...g.map(E=>E.id),...p.map(E=>E.id)])].filter(E=>typeof E=="string"),b=[...Array.isArray(r.errors)?r.errors:[],...Array.isArray(r.activationErrors)?r.activationErrors:[],...Array.isArray(c.errors)?c.errors:[]],S=nu({active:"Aktiv",limited:"Durch Grenzen beschränkt",recovering:"Anschlussgrenze wiederherstellen",handover_pending:"Stellübergabe läuft",handover_confirmed:"Stellübergabe bestätigt",config_invalid:"Konfiguration unvollständig oder ungültig",runtime_error:"Laufzeitfehler","root-measurement-unavailable":"M0-Messung nicht verfügbar","other-actuator-transition-unconfirmed":"Weitere Aktorwirkung noch unbestätigt",inactive:"Inaktiv"});return l.jsxs("div",{className:"nw-dynamic-live",children:[l.jsxs("p",{children:[l.jsx("strong",{children:s?"Vorschau – keine Geräteschreibzugriffe":S[r.status||""]||r.status||"Laufender Betrieb"}),r.configVersion?` · Konfiguration ${r.configVersion}`:""]}),r.reason||r.budget?.reason?l.jsx("p",{children:r.reason||r.budget?.reason}):null,d&&l.jsx("p",{role:"alert",children:"Betriebsanzeige veraltet. Aktuelle Stellwerte können nicht bestätigt werden."}),b.length>0&&l.jsx("ul",{children:b.map((E,M)=>l.jsx("li",{children:Bo(E)},M))}),h.length>0&&l.jsx("div",{className:"nw-nvp-table-wrap",children:l.jsxs("table",{className:"nw-nvp-table",children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Messpunkt"}),l.jsx("th",{children:"Netzleistung"}),l.jsx("th",{children:"Qualität"}),l.jsx("th",{children:"Messwertalter"})]})}),l.jsx("tbody",{children:h.map(E=>l.jsxs("tr",{children:[l.jsx("th",{children:E.id}),l.jsx("td",{children:ar(E.valueW)}),l.jsx("td",{children:d?"Anzeige veraltet":E.valid?"Gültig":E.reason||"Ungültig"}),l.jsx("td",{children:typeof E.ageMs=="number"?`${Math.round(E.ageMs)} ms`:"—"})]},E.id))})]})}),Array.isArray(r.groups)&&r.groups.length>0&&l.jsx("div",{className:"nw-nvp-table-wrap",children:l.jsxs("table",{className:"nw-nvp-table",children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Regelgruppe"}),l.jsx("th",{children:"Bereich / Aufgabe"}),l.jsx("th",{children:"Bedarf"}),l.jsx("th",{children:"Begründung"})]})}),l.jsx("tbody",{children:r.groups.map(E=>l.jsxs("tr",{children:[l.jsx("th",{children:E.id}),l.jsxs("td",{children:[E.connectionPointId," · ",Fo[E.primaryPurpose||""]||E.primaryPurpose,l.jsx("small",{children:E.authority==="external"?"Externe Stellhoheit":"EOS-Stellhoheit"})]}),l.jsx("td",{children:d?"—":ar(E.requestedW)}),l.jsx("td",{children:E.reason||E.status||"—"})]},E.id))})]})}),x.length>0&&l.jsx("div",{className:"nw-nvp-table-wrap",children:l.jsxs("table",{className:"nw-nvp-table","aria-label":"Sollwerte, Bestätigung und Messung",children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Speicher"}),l.jsx("th",{children:"Anforderung"}),l.jsx("th",{children:"Ziel / Freigabe"}),l.jsx("th",{children:"Befehl"}),l.jsx("th",{children:"Anwendung"}),l.jsx("th",{children:"Gemessen"})]})}),l.jsx("tbody",{children:x.map(E=>{const M=m[E]||{},R=c.storageTelemetry?.[E]||{},I=g.find(T=>T.id===E)||{},N=p.find(T=>T.id===E)||{},$=N.appliedConfirmed===!0&&(!Number.isFinite(I.targetW)||N.targetW===I.targetW),F=typeof I.targetW=="number"?ar(I.targetW):typeof I.minPowerW=="number"&&typeof I.maxPowerW=="number"?`${ar(I.minPowerW)} bis ${ar(I.maxPowerW)}`:"—";return l.jsxs("tr",{children:[l.jsx("th",{children:E}),l.jsx("td",{children:d?"—":ar(I.requestedW)}),l.jsx("td",{children:d?"—":F}),l.jsxs("td",{children:[s?"Vorschau":d?"Unbekannt":I.commandConfirmed?"Rücklesung bestätigt":I.accepted?"Gesendet · unbestätigt":"Keine bestätigte Ausgabe",l.jsx("small",{children:I.reason||""})]}),l.jsx("td",{children:s?"Keine Anwendung":d?"Unbekannt":$?"Wirkung / Grenze bestätigt":"Noch nicht bestätigt"}),l.jsxs("td",{children:[ar(M.valueW),l.jsxs("small",{children:[typeof R.socPct=="number"?`${R.socPct} % SoC`:"SoC unbekannt"," · ",R.available===!0&&M.valid?"verfügbar":"Verfügbarkeit unbestätigt"]})]})]},E)})})]})}),typeof r.writesPerformed=="number"&&l.jsxs("p",{children:["Angenommene Schreibvorgänge im letzten Zyklus: ",r.writesPerformed,"."]}),l.jsx("p",{className:"nw-text-muted",children:"Netzbezug positiv; Speicherentladung positiv. Gesendete Sollwerte, bestätigte Gerätegrenzen und gemessene Wirkung sind unterschiedliche Zustände."})]})}function Nv({validation:r}){if(!r)return null;const s=[...r.errors||[],...r.activationErrors||[]];return l.jsxs("div",{className:"nw-dynamic-validation",children:[l.jsx("p",{children:l.jsx("strong",{children:r.valid===!1?"Einrichtung prüfen":r.activeEligible===!1?"Einrichtung noch nicht vollständig aktivierbar":"Einrichtung geprüft"})}),s.length>0&&l.jsx("ul",{children:s.map((o,d)=>l.jsxs("li",{children:[typeof o!="string"&&o.path&&l.jsxs("code",{children:[o.path,": "]}),Bo(o)]},d))}),Array.isArray(r.warnings)&&r.warnings.length>0&&l.jsx("ul",{children:r.warnings.map((o,d)=>l.jsx("li",{children:Bo(o)},d))})]})}function Cv(){const[r,s]=v.useState(null),[o,d]=v.useState(null),[c,h]=v.useState(1),m=v.useRef(null),g=v.useRef(0),[p,x]=v.useState(!1),b="Der gespeicherte Stand wurde außerhalb dieses Formulars geändert. Bitte neu laden. Ihr Entwurf bleibt bis dahin erhalten; Speichern und App-Schalter sind gesperrt.",S=q=>{typeof q=="number"&&(!Number.isSafeInteger(q)||q<1||(g.current=Math.max(g.current,q),x(m.current!==null&&g.current>m.current)))},[E,M]=v.useState({installed:!1,enabled:!1}),[R,I]=v.useState(null),[N,$]=v.useState(null),[F,T]=v.useState(null),[ue,le]=v.useState(null),[G,de]=v.useState(!1),[Y,je]=v.useState(!1),[D,ce]=v.useState(!1),[A,Z]=v.useState(0),[be,X]=v.useState("Dynamischer Netzanschluss wird geladen…"),[fe,Se]=v.useState(!1),B=E.installed&&E.enabled,ae=v.useMemo(()=>({revision:A,blocked:Y||p}),[A,Y,p]),K=(q,ye=!1,Ue=!1)=>{const kt=q.config?.configVersion;if(typeof kt=="number"&&Number.isSafeInteger(kt)&&kt<Math.max(g.current,m.current||0))return!1;if(S(q.config?.configVersion),$(q.status||null),I(q.rootSource||null),q.app&&M(q.app),de(q.locked===!0),ye||Ue){Z(Qt=>Qt+1);const We={...Lf(),...q.config};(!Array.isArray(We.points)||We.points.length!==2)&&(We.points=Lf().points),Array.isArray(We.storages)||(We.storages=[]),Array.isArray(We.pvAssignments)||(We.pvAssignments=[]),d(We),h(We.configVersion||1),m.current=We.configVersion||1,x(g.current>m.current),ye?(s(We),ce(!1),T(null),le(q.validation||null)):s(Qt=>Qt?{...Qt,configVersion:We.configVersion}:We)}return!0};v.useEffect(()=>{const q=ye=>{window.parent===window||ye.source!==window.parent||ye.origin!==window.location.origin||!kn(ye.data)||!it(ye.data)||ye.data.type!=="nw:dynamic-grid-parent-changed"||S(ye.data.configVersion)};return window.addEventListener("message",q),()=>window.removeEventListener("message",q)},[]);const j=q=>{window.parent!==window&&q.config&&Number.isSafeInteger(q.config.configVersion)&&window.parent.postMessage({type:"nw:dynamic-grid-saved",configVersion:q.config.configVersion},window.location.origin)};v.useEffect(()=>{let q=!0,ye;const Ue=async(kt=!1)=>{try{const We=Mi(await Di());if(!q)return;const Qt=K(We,kt);kt&&Qt&&(Se(!1),X("Alle Zuordnungen dieser App werden hier eingerichtet."))}catch(We){q&&(Se(!0),X(St(We,"App nicht erreichbar.")),[401,403].includes(cs(We))&&(s(null),$(null)))}finally{q&&(ye=window.setTimeout(()=>Ue(!1),3e3))}};return Ue(!0),()=>{q=!1,window.clearTimeout(ye)}},[]);const L=q=>{Z(ye=>ye+1),s(q),ce(!0),T(null),le(null)},ge=(q,ye)=>{r&&L({...r,[q]:ye})},ke=(q,ye,Ue)=>q.map((kt,We)=>We===ye?Ue:kt),U=(q,ye)=>{r&&L({...r,[q]:r[q].filter((Ue,kt)=>kt!==ye)})},ne=q=>{if(Se(!0),X(cs(q)===409?"Der gespeicherte Stand wurde geändert oder eine Stellübergabe ist offen. Bitte Betriebsstatus prüfen und neu laden. Ihr Entwurf bleibt erhalten.":St(q,"Speichern fehlgeschlagen.")),q instanceof Pe&&it(q.payload)){const ye=av(q.payload.validation)||ov(q.payload.details);ye&&le(ye)}},we=async()=>{je(!0);try{const q=Mi(await Di());K(q,!0)&&(Se(!1),X("Gespeicherten Stand geladen."))}catch(q){ne(q)}finally{je(!1)}},oe=async(q=!1)=>{if(p){Se(!0),X(b);return}je(!0),Se(!1);try{const ye=q?{installed:!0,enabled:!0}:{installed:!!E.installed,enabled:!!E.enabled},Ue=Mi(await Di("/config",{config:r,expectedConfigVersion:c,app:ye}));if(!K(Ue,!0)){X(b);return}j(Ue),X(Ue.app?.installed&&Ue.app?.enabled?"Dynamischer Netzanschluss aktiviert. Die Laufzeit prüft Messqualität und Bestätigungen vor der Stellwertausgabe.":"Einrichtung als inaktiver Entwurf gespeichert.")}catch(ye){ne(ye)}finally{je(!1)}},ve=async q=>{if(p){Se(!0),X(b);return}je(!0),Se(!1);try{const ye=Mi(await Di("/config",{config:o,expectedConfigVersion:c,app:q}));if(!K(ye,!D,!0)){X(b);return}j(ye),X(q.installed?"App installiert und inaktiv. Die Einrichtung bleibt erhalten.":"App deinstalliert. Die gespeicherte Einrichtung bleibt erhalten.")}catch(ye){ne(ye)}finally{je(!1)}},Ve=async()=>{je(!0),Se(!1);try{const q=Mi(await Di("/preview",{config:r}),!1);le(q.validation||null),T(q.status||null),X("Entwurf geprüft. Die Vorschau schreibt keine Gerätesollwerte.")}catch(q){ne(q)}finally{je(!1)}},Kn=window.parent!==window&&new URLSearchParams(window.location.search).get("embedded")==="1";return l.jsx(yh.Provider,{value:ae,children:l.jsxs(Gn,{embedded:Kn,title:"Dynamischer Netzanschluss",subtitle:"M0 und M1 gemeinsam begrenzen. Speicher und PV vollständig in dieser App zuordnen und betreiben.",showBack:!1,actions:l.jsx("a",{className:"nw-link-button nw-config-btn",href:`${Sn()??""}/ems-apps.html?nwAdmin=1`,target:Kn?"_parent":"_self",children:"Zu EMS Apps"}),children:[l.jsxs("section",{className:"nw-card nw-config-card nw-dynamic-lifecycle",children:[l.jsxs("div",{className:"nw-nvp-section-heading",children:[l.jsx("h2",{className:"nw-config-card__title",children:"App und Betrieb"}),l.jsx("span",{className:`nw-nvp-tag ${B?"nw-dynamic-active":""}`,children:N?.status==="handover_pending"?"Stellübergabe läuft":B?"Dynamisch aktiv":E.installed?"Installiert · inaktiv":"Nicht installiert"})]}),l.jsx("div",{role:fe?"alert":"status",className:`nw-status ${fe?"nw-status--bad":""}`,children:be}),l.jsx("p",{children:"Installiert und aktiviert schaltet diese App auf dynamischen Betrieb. Inaktive Entwürfe erzeugen keine Stellwerte."}),l.jsxs("div",{className:"nw-actions-row",children:[!E.installed&&l.jsx("button",{type:"button",className:"nw-button nw-config-btn",disabled:Y||p||!r,onClick:()=>ve({installed:!0,enabled:!1}),children:"App installieren"}),B&&l.jsx("button",{type:"button",className:"nw-button nw-config-btn",disabled:Y||p,onClick:()=>ve({installed:!0,enabled:!1}),children:"App deaktivieren"}),E.installed&&!B&&l.jsx("button",{type:"button",className:"nw-button nw-config-btn",disabled:Y||p,onClick:()=>ve({installed:!1,enabled:!1}),children:"App deinstallieren"}),l.jsx("button",{type:"button",className:"nw-button nw-config-btn",disabled:Y,onClick:we,children:D?"Entwurf verwerfen und neu laden":"Neu laden"})]}),p&&l.jsx("p",{role:"alert",className:"nw-nvp-notice",children:b}),D&&l.jsx("p",{className:"nw-nvp-notice",children:"Ungespeicherte Änderungen. Der Betriebsstatus gehört zum gespeicherten Stand."}),G&&l.jsx("p",{className:"nw-nvp-notice",children:"Eine Stellübergabe ist noch offen. Der Server prüft, wann Änderungen sicher übernommen werden können."})]}),r&&l.jsx("form",{noValidate:!0,onSubmit:q=>{q.preventDefault(),oe(!0)},"aria-busy":Y,children:l.jsxs("fieldset",{disabled:Y,className:"nw-nvp-fieldset",children:[l.jsxs("section",{className:"nw-card nw-config-card",children:[l.jsx("h2",{className:"nw-config-card__title",children:"Messstruktur und gemeinsame Grenzen"}),l.jsx("p",{children:"M0 umfasst den gesamten Anschluss einschließlich M1. Ein Speicher außerhalb von M1 kann keine lokale M1-Nulleinspeisung herstellen."}),l.jsx(He,{label:"Höchste zeitliche Abweichung zusammengehöriger Messungen",unit:"ms",value:r.maxSkewMs,onChange:q=>ge("maxSkewMs",q)})]}),r.points.map((q,ye)=>l.jsx(kv,{value:q,rootSource:R,onChange:Ue=>ge("points",ke(r.points,ye,Ue))},q.id)),l.jsxs("section",{className:"nw-card nw-config-card",children:[l.jsxs("div",{className:"nw-nvp-section-heading",children:[l.jsx("h2",{className:"nw-config-card__title",children:"Speicher und Betriebsaufgaben"}),l.jsx("button",{className:"nw-button nw-config-btn",type:"button",onClick:()=>ge("storages",[...r.storages,yv()]),children:"Speicher hinzufügen"})]}),l.jsx("p",{children:"Jeder Speicher erhält hier seine eigenen Datenpunkte, Grenzen und Betriebsaufgaben. Die Einrichtung in einer anderen App ist nicht erforderlich."}),!r.storages.length&&l.jsx("p",{children:"Noch kein Speicher eingerichtet."}),r.storages.map((q,ye)=>l.jsx(jv,{value:q,onChange:Ue=>ge("storages",ke(r.storages,ye,Ue)),onRemove:()=>U("storages",ye)},ye))]}),l.jsxs("section",{className:"nw-card nw-config-card",children:[l.jsxs("div",{className:"nw-nvp-section-heading",children:[l.jsx("h2",{className:"nw-config-card__title",children:"PV-Wechselrichter"}),l.jsx("button",{className:"nw-button nw-config-btn",type:"button",onClick:()=>ge("pvAssignments",[...r.pvAssignments,xv()]),children:"PV hinzufügen"})]}),l.jsx("p",{children:"Eine lokale Nulleinspeisung benötigt wirksame Stellmöglichkeiten im lokalen Bereich. PV wird nach gemessener Leistung und verbleibendem Anschlussbudget begrenzt."}),r.pvAssignments.map((q,ye)=>l.jsx(Ev,{value:q,onChange:Ue=>ge("pvAssignments",ke(r.pvAssignments,ye,Ue)),onRemove:()=>U("pvAssignments",ye)},ye))]}),l.jsxs("section",{className:"nw-card nw-config-card",children:[l.jsx("h2",{className:"nw-config-card__title",children:"Einrichtung übernehmen"}),l.jsxs("div",{className:"nw-actions-row",children:[l.jsx("button",{type:"button",className:"nw-button nw-config-btn",onClick:Ve,children:"Einrichtung prüfen"}),l.jsx("button",{type:"button",className:"nw-button nw-config-btn",disabled:p,onClick:()=>oe(!1),children:B?"Änderungen speichern":"Entwurf speichern"}),l.jsx("button",{type:"submit",className:"nw-button nw-config-btn nw-button--primary nw-config-btn--primary",disabled:p,children:B?"Speichern und aktiv halten":"Speichern und aktivieren"})]}),l.jsx("p",{children:"Aktivieren übernimmt Konfiguration und App-Zustand gemeinsam. Unvollständige Zuordnungen werden mit konkreten Gründen abgewiesen. Empfang eines Befehls ersetzt keine bestätigte Gerätewirkung."}),l.jsx(Nv,{validation:ue})]})]})}),F&&l.jsxs("section",{className:"nw-card nw-config-card",children:[l.jsx("h2",{className:"nw-config-card__title",children:"Vorschau der Einrichtung"}),l.jsx(Mf,{preview:!0,status:F})]}),l.jsxs("section",{className:"nw-card nw-config-card",children:[l.jsx("h2",{className:"nw-config-card__title",children:"Betriebsstatus"}),l.jsx(Mf,{status:N})]})]})})}const Rv=["balance.read","telemetry.read","capabilities.read","curtailment.request","storage.charge.request","storage.discharge.request","dispatch.status.read","dispatch.cancel"];function Tt(){throw new Error("Die Partnerdaten sind unvollständig oder ungültig. Bitte Eingaben prüfen oder erneut laden.")}function vn(r,s=256){return typeof r!="string"||r.length>s||/[\u0000-\u001f\u007f]/.test(r)?Tt():r}function rn(r){return typeof r!="boolean"?Tt():r}function wn(r,s,o,d=!1){return typeof r!="number"||!Number.isFinite(r)||r<s||r>o||d&&!Number.isSafeInteger(r)?Tt():r}function ss(r,s){return typeof r!="string"||!s.includes(r)?Tt():r}function as(r,s,o){return!Array.isArray(r)||r.length>s?Tt():r.map(o)}function Vo(r){return!kn(r)||!it(r)||!it(r.arbitrage)?Tt():{configVersion:wn(r.configVersion,1,Number.MAX_SAFE_INTEGER,!0),enabled:rn(r.enabled),partnerId:vn(r.partnerId,128),endpoint:vn(r.endpoint,2048),credentialRef:vn(r.credentialRef,128),grants:as(r.grants,64,s=>it(s)?{appId:ss(s.appId,["arbitrage","energyLedger","directMarketing"]),resourceId:vn(s.resourceId,128),permissions:as(s.permissions,8,o=>ss(o,Rv))}:Tt()),arbitrage:{profile:ss(r.arbitrage.profile,["household","tradingOnly"]),maxCommandSeconds:wn(r.arbitrage.maxCommandSeconds,1,60,!0),resources:as(r.arbitrage.resources,32,s=>{if(!it(s))return Tt();const o={id:vn(s.id,128),maxChargeW:wn(s.maxChargeW,0,1e8,!0),maxDischargeW:wn(s.maxDischargeW,0,1e8,!0),minSocPct:wn(s.minSocPct,0,100),maxSocPct:wn(s.maxSocPct,0,100),maxImportW:wn(s.maxImportW,0,1e8,!0),maxExportW:wn(s.maxExportW,0,1e8,!0),allowGridCharge:rn(s.allowGridCharge),allowGridExport:rn(s.allowGridExport),commissioned:rn(s.commissioned)};return o.minSocPct>=o.maxSocPct?Tt():o})}}}function Io(r,s=!1){return!kn(r)||!it(r)||r.ok!==!0||!it(r.app)||!it(r.status)||!it(r.validation)?Tt():{ok:!0,config:s&&r.preview===!0&&r.config===null&&r.validation.valid===!1?null:Vo(r.config),app:{installed:rn(r.app.installed),enabled:rn(r.app.enabled),active:rn(r.app.active)},status:{connection:ss(r.status.connection,["disabled","blocked","disconnected","connected"]),reason:vn(r.status.reason,512),controlAvailable:rn(r.status.controlAvailable),revision:wn(r.status.revision,0,Number.MAX_SAFE_INTEGER,!0)},validation:xh(r.validation),...r.preview===void 0?{}:{preview:rn(r.preview)}}}function xh(r){return!kn(r)||!it(r)?Tt():{valid:rn(r.valid),errors:as(r.errors,256,s=>it(s)?{path:vn(s.path,512),code:vn(s.code,128),message:vn(s.message,1024)}:Tt())}}const Do={arbitrage:"Arbitrage · Speicherhandel",energyLedger:"Bilanz · Partnerfreigaben",directMarketing:"Direktvermarktung · Partnerfreigaben"},Sh={"balance.read":"Bilanzdaten lesen","telemetry.read":"Messwerte lesen","capabilities.read":"Verfügbare Funktionen lesen","curtailment.request":"Begrenzung anfragen","storage.charge.request":"Laden anfragen","storage.discharge.request":"Entladen anfragen","dispatch.status.read":"Auftragsstatus lesen","dispatch.cancel":"Eigene Aufträge zurücknehmen"},Pv={energyLedger:["balance.read"],directMarketing:["telemetry.read","capabilities.read","curtailment.request","dispatch.status.read","dispatch.cancel"],arbitrage:["telemetry.read","capabilities.read","storage.charge.request","storage.discharge.request","dispatch.status.read","dispatch.cancel"]},_v={disabled:"Verbindung ausgeschaltet",blocked:"Verbindung gesperrt",disconnected:"Nicht verbunden",connected:"Verbunden"},Tf=Object.freeze({DISABLED:"Partnerverbindung ausgeschaltet.",NOT_CONNECTED:"Noch keine bestätigte Partnerverbindung.",CONTROL_UNAVAILABLE:"Die sichere Speichersteuerung ist noch nicht freigegeben.",INVALID_CONFIG:"Die gespeicherte Konfiguration ist unvollständig oder ungültig.",APP_INACTIVE:"Die zugehörige App ist nicht aktiv."});function Av(r){return Object.hasOwn(Tf,r)?Tf[r]:`Statushinweis: ${r}`}function or({label:r,value:s,onChange:o,min:d=0,max:c}){return l.jsxs("label",{className:"nw-nvp-field nw-config-field",children:[l.jsx("span",{className:"nw-config-label",children:r}),l.jsx("input",{className:"nw-input nw-config-input",type:"number",required:!0,min:d,max:c,step:"any",value:s,onChange:h=>o(h.target.value===""?"":Number(h.target.value))})]})}function os({label:r,value:s,onChange:o,help:d="",maxLength:c=128}){return l.jsxs("label",{className:"nw-nvp-field nw-config-field",children:[l.jsx("span",{className:"nw-config-label",children:r}),l.jsx("input",{className:"nw-input nw-config-input",value:s,maxLength:c,autoComplete:"off",onChange:h=>o(h.target.value)}),d&&l.jsx("small",{children:d})]})}function zv({grant:r,resourceIds:s,onChange:o,onRemove:d}){return l.jsxs("article",{className:"nw-nvp-device",children:[l.jsxs("div",{className:"nw-nvp-section-heading",children:[l.jsx("h3",{children:"Ressourcenfreigabe"}),l.jsx("button",{className:"nw-button nw-config-btn",type:"button",onClick:d,children:"Freigabe entfernen"})]}),l.jsxs("label",{className:"nw-nvp-field nw-config-field",children:[l.jsx("span",{className:"nw-config-label",children:"Freigegebene Ressource"}),l.jsxs("select",{className:"nw-input nw-config-select",required:!0,value:r.resourceId,onChange:c=>o({...r,resourceId:c.target.value}),children:[l.jsx("option",{value:"",children:"Ressource ausdrücklich auswählen"}),r.resourceId&&!s.includes(r.resourceId)&&l.jsxs("option",{value:r.resourceId,children:["Nicht zugeordnet: ",r.resourceId]}),s.map(c=>l.jsx("option",{value:c,children:c==="site"?"Anlage (site)":c==="single"?"Einzelspeicher (single)":`Dynamische Gruppe: ${c}`},c))]}),l.jsx("small",{children:"Nur lokal eingerichtete Ressourcen freigeben. Rohdatenpunktpfade sind nicht zulässig."})]}),l.jsx("div",{className:"nw-partner-permissions",children:Pv[r.appId].map(c=>l.jsxs("label",{className:"nw-dynamic-checkbox",children:[l.jsx("input",{type:"checkbox",checked:r.permissions.includes(c),onChange:h=>o({...r,permissions:h.target.checked?[...r.permissions,c]:r.permissions.filter(m=>m!==c)})}),Sh[c]]},c))})]})}function Iv({resource:r,onChange:s,onRemove:o}){const d=(c,h)=>s({...r,[c]:h});return l.jsxs("article",{className:"nw-nvp-device",children:[l.jsxs("div",{className:"nw-nvp-section-heading",children:[l.jsx("h3",{children:r.id||"Neuer Handelsspeicher"}),l.jsx("button",{className:"nw-button nw-config-btn",type:"button",onClick:o,children:"Speicher entfernen"})]}),l.jsxs("label",{className:"nw-nvp-field nw-config-field",children:[l.jsx("span",{className:"nw-config-label",children:"Lokaler Regelpfad"}),l.jsxs("select",{className:"nw-input nw-config-select",value:r.id==="single"?"single":r.id==="farm"?"unsupported":"group",onChange:c=>s({...r,id:c.target.value==="single"?"single":"",commissioned:!1}),children:[l.jsx("option",{value:"single",children:"Vorhandene Einzelspeicher-Regelung (single)"}),l.jsx("option",{value:"group",children:"Konfigurierte dynamische Speichergruppe"}),r.id==="farm"&&l.jsx("option",{value:"unsupported",children:"Speicherfarm: in dieser Version nicht freigegeben"})]})]}),r.id!=="single"&&r.id!=="farm"&&l.jsx(os,{label:"Kennung der konfigurierten dynamischen Speichergruppe",maxLength:64,value:r.id,onChange:c=>s({...r,id:c,commissioned:!1}),help:"Exakte Gruppenkennung aus dem dynamischen Netzanschluss; keine Datenpunktadresse."}),r.id==="single"&&l.jsx("p",{children:"Die vorhandene lokale Speicherregelung muss eingerichtet und aktiv sein. Arbitrage ergänzt ihre Handelsanforderungen; PV und dynamischer Netzanschluss sind dafür nicht erforderlich."}),r.id==="farm"&&l.jsx("p",{className:"nw-nvp-notice",children:"Die bestehende Speicherfarm ist für Partnersteuerung in dieser Version nicht freigegeben. Diese Ressource entfernen oder einen unterstützten Regelpfad einrichten."}),l.jsxs("div",{className:"nw-nvp-grid",children:[l.jsx(or,{label:"Maximale Ladeleistung (W)",value:r.maxChargeW,onChange:c=>d("maxChargeW",c)}),l.jsx(or,{label:"Maximale Entladeleistung (W)",value:r.maxDischargeW,onChange:c=>d("maxDischargeW",c)}),l.jsx(or,{label:"Reserve · Mindest-SoC (%)",value:r.minSocPct,max:100,onChange:c=>d("minSocPct",c)}),l.jsx(or,{label:"Höchster SoC (%)",value:r.maxSocPct,max:100,onChange:c=>d("maxSocPct",c)}),l.jsx(or,{label:"Zulässiger Netzbezug (W)",value:r.maxImportW,onChange:c=>d("maxImportW",c)}),l.jsx(or,{label:"Zulässige Netzeinspeisung (W)",value:r.maxExportW,onChange:c=>d("maxExportW",c)})]}),l.jsxs("label",{className:"nw-dynamic-checkbox",children:[l.jsx("input",{type:"checkbox",checked:r.allowGridCharge,onChange:c=>d("allowGridCharge",c.target.checked)}),"Netzladung für diesen Speicher erlauben"]}),l.jsxs("label",{className:"nw-dynamic-checkbox",children:[l.jsx("input",{type:"checkbox",checked:r.allowGridExport,onChange:c=>d("allowGridExport",c.target.checked)}),"Einspeisung aus diesem Speicher erlauben"]}),l.jsxs("label",{className:"nw-dynamic-checkbox",children:[l.jsx("input",{type:"checkbox",checked:r.id!=="farm"&&r.commissioned,disabled:r.id==="farm",onChange:c=>d("commissioned",c.target.checked)}),"Installateurfreigabe: Messung, Grenzen und sicherer Regelpfad wurden an dieser Anlage geprüft"]})]})}function Uo({appId:r="arbitrage"}){const[s,o]=v.useState(null),[d,c]=v.useState(null),[h,m]=v.useState(null),[g,p]=v.useState(null),[x,b]=v.useState(!1),[S,E]=v.useState(!1),[M,R]=v.useState(!1),[I,N]=v.useState(!1),[$,F]=v.useState(!1),[T,ue]=v.useState("Partnerfreigaben werden geladen…"),[le,G]=v.useState(0),[de,Y]=v.useState(Date.now()),je=v.useRef(null),D=v.useRef(0),ce=v.useRef(!1),A=v.useRef(!0),Z="Der gespeicherte Stand wurde geändert. Ihr Entwurf bleibt erhalten. Vor dem nächsten Speichern bitte neu laden.",be=window.parent!==window&&new URLSearchParams(window.location.search).get("embedded")==="1",X=le===0||de-le>15e3,fe=!X&&!I&&!M,Se=fe&&d?.app.active===!0&&d.status.controlAvailable&&d.status.connection==="connected",B=S||M||I,ae=(U,ne)=>{!A.current||U.config.configVersion<D.current||(D.current=U.config.configVersion,c(U),G(Date.now()),ne?(je.current=U.config.configVersion,o(U.config),b(!1),R(!1),N(!1),m(null),p(null)):je.current!==null&&U.config.configVersion>je.current&&R(!0))},K=async(U=!1)=>{if(!ce.current){U&&(ce.current=!0,E(!0));try{const ne=Io(await vf());if(!U&&ce.current)return;ae(ne,U),A.current&&U&&(ue("Gespeicherter Stand geladen."),F(!1))}catch(ne){if(!A.current)return;G(0),F(!0),ue(St(ne,"Der Betriebsstatus ist nicht erreichbar."))}finally{U&&(ce.current=!1,A.current&&E(!1))}}};v.useEffect(()=>{A.current=!0,K(!0);const U=oe=>{if(oe.origin!==window.location.origin||oe.source!==window.parent||!oe.data||typeof oe.data!="object"||!("type"in oe.data)||oe.data.type!=="nw:partner-integrations-parent-changed"||!("configVersion"in oe.data))return;const ve=oe.data.configVersion;typeof ve!="number"||!Number.isSafeInteger(ve)||ve<1||(D.current=Math.max(D.current,ve),je.current!==null&&ve>je.current&&R(!0))};window.addEventListener("message",U);const ne=window.setInterval(()=>{K()},5e3),we=window.setInterval(()=>Y(Date.now()),1e3);return()=>{A.current=!1,window.clearInterval(ne),window.clearInterval(we),window.removeEventListener("message",U)}},[]);const j=U=>{o(U),b(!0),m(null),p(null)},L=async(U,ne)=>{if(ce.current||!s||je.current===null||U!=="preview"&&(M||I))return;ce.current=!0,E(!0),F(!1);let we=!1;try{const oe=U==="revoke"?{expectedConfigVersion:je.current}:U==="preview"?{config:Vo(s)}:{config:Vo(s),expectedConfigVersion:je.current,...ne===void 0?{}:{app:{installed:!0,enabled:ne}}};we=!0;const ve=await vf(U==="save"?"/config":`/${U}`,oe);if(!A.current)return;if(U==="preview"){const Ve=Io(ve,!0);m(Ve),p(Ve.validation),ue(Ve.validation.valid?"Einrichtung geprüft. Die Vorschau sendet keine Gerätebefehle.":"Die Einrichtung enthält Prüfhinweise.")}else{const Ve=Io(ve);ae(Ve,!0),ue(U==="revoke"?"Partnerverbindung und alle Daten-/Steuerfreigaben wurden widerrufen.":"Konfiguration gespeichert. Der aktuelle Betriebsstatus entscheidet über die Verfügbarkeit."),be&&window.parent.postMessage({type:"nw:partner-integrations-saved",configVersion:Ve.config.configVersion},window.location.origin)}}catch(oe){if(!A.current)return;const ve=cs(oe);if(ve===409&&R(!0),we&&U!=="preview"&&ve!==400&&ve!==422&&ve!==409&&N(!0),oe instanceof Pe&&oe.payload.validation)try{p(xh(oe.payload.validation))}catch{}F(!0),ue(ve===409?Z:St(oe,"Der Auftrag konnte nicht bestätigt werden. Bitte den Serverstand neu laden."))}finally{ce.current=!1,A.current&&E(!1)}},ge=s?.grants.map((U,ne)=>({grant:U,index:ne})).filter(U=>U.grant.appId===r)||[],ke=g||h?.validation||d?.validation;return l.jsxs(Gn,{title:Do[r],embedded:be,subtitle:"Partnerverbindung, ausdrücklich freigegebene Daten und sicher begrenzte Anforderungen.",children:[l.jsxs("section",{className:"nw-card nw-config-card",children:[l.jsxs("div",{className:"nw-nvp-section-heading",children:[l.jsx("h2",{className:"nw-config-card__title",children:Do[r]}),l.jsx("span",{className:"nw-nvp-tag",children:fe&&d?_v[d.status.connection]:"Betriebsstatus unbestätigt"})]}),l.jsx("div",{className:`nw-status ${$?"nw-status--bad":""}`,role:$?"alert":"status",children:T}),r==="arbitrage"?l.jsxs(l.Fragment,{children:[l.jsx("p",{children:"Eigenständiger Speicherhandel für Haushalte oder Anlagen, in denen EOS ausschließlich Speicher für den Handel regelt. PV, Wallbox, Bilanz und dynamischer Netzanschluss sind dafür keine Voraussetzung."}),l.jsxs("p",{children:[l.jsx("strong",{children:Se?"Partnerkanal bereit · jede Steueranforderung wird einzeln geprüft":"Diagnose / Steuerung gesperrt"})," · ",d?Av(d.status.reason):"Status wird geprüft."]}),l.jsx("p",{children:"Lokale Netzgrenzen, Speicherreserve und Geräteschutz haben Vorrang vor Händleranforderungen. Eine Verbindung oder Auftragsannahme bestätigt noch keine Wirkung am Speicher."})]}):l.jsx("p",{children:r==="energyLedger"?"Bilanzdaten dürfen nur für die hier benannten Ressourcen gelesen werden. Diese App erteilt keine Speichersteuerrechte.":"Messwerte und Begrenzungsanfragen werden separat freigegeben. Speicherhandel erhält seine Freigaben ausschließlich in der App Arbitrage."}),X&&l.jsx("p",{className:"nw-nvp-notice",role:"alert",children:"Keine frische Betriebsbestätigung. Aktive Steuerung kann nicht bestätigt werden."}),M&&l.jsx("p",{className:"nw-nvp-notice",role:"alert",children:Z}),I&&l.jsx("p",{className:"nw-nvp-notice",role:"alert",children:"Das Ergebnis der letzten Änderung ist unklar. Vor weiteren Änderungen den Serverstand neu laden."}),x&&l.jsx("p",{className:"nw-nvp-notice",children:"Ungespeicherter Entwurf. Die Betriebsanzeige zeigt den gespeicherten Stand."}),l.jsxs("div",{className:"nw-actions-row",children:[l.jsx("button",{type:"button",className:"nw-button nw-config-btn",disabled:S,onClick:()=>{K(!0)},children:x?"Entwurf verwerfen und neu laden":"Neu laden"}),r==="arbitrage"&&d&&l.jsx("button",{type:"button",className:"nw-button nw-config-btn",disabled:B||x,onClick:()=>{L("save",!d.app.enabled)},children:d.app.enabled?"Arbitrage-App ausschalten":"Arbitrage-App einschalten"})]}),r==="arbitrage"&&d&&l.jsxs("p",{children:["App: ",d.app.installed?d.app.enabled?"Installiert · eingeschaltet":"Installiert · ausgeschaltet":"Nicht installiert",". Ohne bestätigte Steuerfreigabe bleibt der Betrieb in Diagnose."]})]}),s&&l.jsx("form",{onSubmit:U=>{U.preventDefault(),L("save")},"aria-busy":S,children:l.jsxs("fieldset",{className:"nw-nvp-fieldset",disabled:S,children:[l.jsxs("section",{className:"nw-card nw-config-card",children:[l.jsx("h2",{className:"nw-config-card__title",children:"Gemeinsame Partnerverbindung"}),l.jsx("p",{children:"Ein Partnerprofil wird von den Fach-Apps gemeinsam genutzt. Die folgenden Verbindungsdaten gelten auch für die anderen Partnerfreigaben."}),l.jsxs("label",{className:"nw-dynamic-checkbox",children:[l.jsx("input",{type:"checkbox",checked:s.enabled,onChange:U=>j({...s,enabled:U.target.checked})}),"Partnerverbindung einschalten"]}),l.jsxs("div",{className:"nw-nvp-grid",children:[l.jsx(os,{label:"Partnerkennung",value:s.partnerId,onChange:U=>j({...s,partnerId:U})}),l.jsx(os,{label:"Geschützte WebSocket-Adresse (wss://)",maxLength:2048,value:s.endpoint,onChange:U=>j({...s,endpoint:U}),help:"Adresse ohne Zugangsdaten, Token, URL-Parameter oder Fragment."}),l.jsx(os,{label:"Referenz auf das geschützte Zugangstoken",value:s.credentialRef,onChange:U=>j({...s,credentialRef:U}),help:"Name der auf dem EOS-System bereitgestellten Umgebungsvariable mit Präfix NEXOWATT_PARTNER_. Hier keinen Tokenwert eingeben."})]})]}),r==="arbitrage"&&l.jsxs("section",{className:"nw-card nw-config-card",children:[l.jsx("h2",{className:"nw-config-card__title",children:"Speicherhandel und Reserve"}),l.jsxs("div",{className:"nw-nvp-grid",children:[l.jsxs("label",{className:"nw-nvp-field nw-config-field",children:[l.jsx("span",{className:"nw-config-label",children:"Betriebsprofil"}),l.jsxs("select",{className:"nw-input nw-config-select",value:s.arbitrage.profile,onChange:U=>j({...s,arbitrage:{...s.arbitrage,profile:U.target.value==="tradingOnly"?"tradingOnly":"household"}}),children:[l.jsx("option",{value:"household",children:"Haushalt mit Speicherhandel"}),l.jsx("option",{value:"tradingOnly",children:"Nur Speicherhandel"})]})]}),l.jsx(or,{label:"Maximale Gültigkeit einer Anforderung (s)",value:s.arbitrage.maxCommandSeconds,min:1,max:60,onChange:U=>j({...s,arbitrage:{...s.arbitrage,maxCommandSeconds:U}})})]}),l.jsx("p",{children:"Die Speicherkennung verweist auf die lokale Gerätezuordnung. Die Einzelspeicher-Regelung muss lokal eingerichtet und aktiv sein. Alternativ kann eine bestehende dynamische Speichergruppe verwendet werden. Vor einer Steuerfreigabe müssen aktuelle Messwerte, Anschlussgrenzen und der sichere Regelpfad an der Anlage geprüft sein; diese Maske ersetzt keine Inbetriebnahmeprüfung."}),s.arbitrage.resources.map((U,ne)=>l.jsx(Iv,{resource:U,onChange:we=>j({...s,arbitrage:{...s.arbitrage,resources:s.arbitrage.resources.map((oe,ve)=>ve===ne?we:oe)}}),onRemove:()=>j({...s,arbitrage:{...s.arbitrage,resources:s.arbitrage.resources.filter((we,oe)=>oe!==ne)},grants:s.grants.filter(we=>!(we.appId==="arbitrage"&&we.resourceId===U.id))})},ne)),l.jsx("button",{className:"nw-button nw-config-btn",type:"button",disabled:s.arbitrage.resources.length>=32,onClick:()=>j({...s,arbitrage:{...s.arbitrage,resources:[...s.arbitrage.resources,{id:"single",maxChargeW:"",maxDischargeW:"",minSocPct:20,maxSocPct:90,maxImportW:"",maxExportW:"",allowGridCharge:!1,allowGridExport:!1,commissioned:!1}]}}),children:"Handelsspeicher hinzufügen"})]}),l.jsxs("section",{className:"nw-card nw-config-card",children:[l.jsxs("h2",{className:"nw-config-card__title",children:["Freigaben für ",r==="arbitrage"?"Arbitrage":r==="energyLedger"?"Bilanz":"Direktvermarktung"]}),l.jsx("p",{children:"Nur ausdrücklich ausgewählte Daten und Anforderungen dürfen genutzt werden. Neue Freigaben beginnen ohne Rechte."}),ge.length===0&&l.jsx("p",{children:"Noch keine Ressource freigegeben."}),ge.map(({grant:U,index:ne})=>l.jsx(zv,{grant:U,resourceIds:r==="arbitrage"?[...new Set(s.arbitrage.resources.map(we=>we.id).filter(we=>we&&we!=="farm"))]:["site"],onChange:we=>j({...s,grants:s.grants.map((oe,ve)=>ve===ne?we:oe)}),onRemove:()=>j({...s,grants:s.grants.filter((we,oe)=>oe!==ne)})},ne)),l.jsx("button",{className:"nw-button nw-config-btn",type:"button",disabled:s.grants.length>=64,onClick:()=>j({...s,grants:[...s.grants,{appId:r,resourceId:"",permissions:[]}]}),children:"Ressource freigeben"}),s.grants.length>ge.length&&l.jsxs("p",{className:"nw-text-muted",children:[s.grants.length-ge.length," weitere Ressourcenfreigabe(n) werden in den anderen Fach-Apps verwaltet und beim Speichern erhalten."]})]}),l.jsxs("section",{className:"nw-card nw-config-card",children:[l.jsx("h2",{className:"nw-config-card__title",children:"Prüfen und übernehmen"}),l.jsxs("div",{className:"nw-actions-row",children:[l.jsx("button",{className:"nw-button nw-config-btn",type:"button",onClick:()=>{L("preview")},children:"Freigaben prüfen"}),l.jsx("button",{className:"nw-button nw-config-btn nw-button--primary nw-config-btn--primary",type:"submit",disabled:B,children:"Konfiguration speichern"})]}),ke&&l.jsxs("div",{className:"nw-dynamic-validation",children:[l.jsx("p",{children:ke.valid?"Einrichtung formal gültig. Die Betriebsfreigabe wird zusätzlich geprüft.":"Einrichtung prüfen:"}),ke.errors.length>0&&l.jsx("ul",{children:ke.errors.map((U,ne)=>l.jsxs("li",{children:[U.message," ",l.jsxs("small",{children:["(",U.path,")"]})]},ne))})]}),h&&l.jsxs("div",{className:"nw-partner-preview",children:[l.jsx("h3",{children:"Vorschau der Daten- und Steuerfreigaben"}),l.jsx("p",{children:"Geprüfter Entwurf; keine Messwertübertragung und keine Gerätebefehle durch diese Vorschau."}),l.jsx("div",{className:"nw-nvp-table-wrap",children:l.jsxs("table",{className:"nw-nvp-table",children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"App"}),l.jsx("th",{children:"Ressource"}),l.jsx("th",{children:"Erlaubte Nutzung"})]})}),l.jsx("tbody",{children:(h.config?.grants||[]).filter(U=>U.appId===r).map((U,ne)=>l.jsxs("tr",{children:[l.jsx("td",{children:Do[U.appId]}),l.jsx("td",{children:U.resourceId}),l.jsx("td",{children:U.permissions.map(we=>Sh[we]).join(", ")||"Keine Rechte"})]},ne))})]})})]})]})]})}),d&&l.jsxs("section",{className:"nw-card nw-config-card nw-partner-revoke",children:[l.jsx("h2",{className:"nw-config-card__title",children:"Partnerzugriff widerrufen"}),l.jsx("p",{children:"Schaltet die gemeinsame Partnerverbindung aus und entfernt sämtliche Daten- und Steuerfreigaben für Arbitrage, Bilanz und Direktvermarktung. Lokale Schutzfunktionen bleiben zuständig."}),l.jsx("button",{className:"nw-button nw-config-btn",type:"button",disabled:B,onClick:()=>{L("revoke")},children:"Alle Partnerfreigaben jetzt widerrufen"}),l.jsxs("p",{className:"nw-text-muted",children:["Gespeicherte Konfiguration: ",d.config.configVersion,". Letzte Statusabfrage: ",le?new Date(le).toLocaleTimeString("de-DE"):"Nicht bestätigt","."]})]})]})}function Dv(){return l.jsx(Uo,{appId:"arbitrage"})}const Lv={appcenter:{title:"EMS App-Center",path:"/ems-apps.html",needsAdminBackQuery:!0},simulation:{title:"Simulation",path:"/simulation.html",needsAdminBackQuery:!0},license:{title:"Lizenz",path:"/license.html",needsAdminBackQuery:!0},"smarthome-config":{title:"SmartHome Config",path:"/smarthome-config.html",needsAdminBackQuery:!0},"smarthome-vis":{title:"SmartHome VIS",path:"/smarthome.html",needsAdminBackQuery:!1}};function Mv(r,s){if(!r||!r.includes(".html"))return r;const o=r.includes("?")?"&":"?",d=window.location.port||"8081";return`${r}${o}nwAdmin=1&instance=${encodeURIComponent(String(s))}&adminPort=${encodeURIComponent(d)}`}function Wr({targetKey:r}){const s=Lv[r],o=an(),[d,c]=v.useState(null),[h,m]=v.useState("Weiterleitung wird vorbereitet…");v.useEffect(()=>{let p=!0,x;return c(null),m("Weiterleitung wird vorbereitet…"),(async()=>{try{const b=await ks(o);if(!p)return;const S=`${b}${s.needsAdminBackQuery?Mv(s.path,o):s.path}`;c({instance:o,key:r,url:S}),m("Öffne Seite…"),x=setTimeout(()=>{p&&Kt(S)},50)}catch{if(!p)return;c(null),m("Die Adresse der Oberfläche konnte nicht ermittelt werden. Bitte die Adapterverbindung prüfen.")}})(),()=>{p=!1,x!==void 0&&clearTimeout(x)}},[o,r,s.path,s.needsAdminBackQuery]);const g=d?.instance===o&&d.key===r?d.url:null;return l.jsx(Gn,{title:s.title,subtitle:"Weiterleitung wird vorbereitet…",children:l.jsxs("section",{className:"nw-card nw-card--centered",children:[l.jsx("div",{className:`nw-status${g?" nw-status--ok":""}`,role:"status",children:h}),l.jsx("div",{className:"nw-actions-row nw-actions-row--centered",children:l.jsx("button",{className:"nw-button nw-button--primary",onClick:()=>{g&&Kt(g)},disabled:!g,type:"button",children:"Jetzt öffnen"})})]})})}function Tv(){for(const r of["localStorage","sessionStorage"])try{const s=window[r],o=[];for(let d=0;d<s.length;d+=1){const c=s.key(d);c&&c.startsWith("nexowatt-ui.licenseKey.")&&o.push(c)}o.forEach(d=>s.removeItem(d))}catch{}}function Ov(){return v.useEffect(()=>{Tv()},[]),l.jsx(Wr,{targetKey:"license"})}const Fi=["admin","installer"];function Wv(){const r=Sn(),s=r?new URL(r).pathname:"",o=window.location.pathname,d=s&&o.startsWith(`${s}/`)?o.slice(s.length):o;return l.jsxs(Rg,{children:[l.jsx(rt,{path:"/history-setup",element:l.jsx(Lt,{capability:"appcenter.open",requiredRole:"Installer oder Admin",title:"Historie einrichten",allowedRoles:Fi,children:l.jsx(gv,{})})}),l.jsx(rt,{path:"/arbitrage",element:l.jsx(Lt,{embedded:!0,capability:"appcenter.open",requiredRole:"Installer oder Admin",title:"Arbitrage",allowedRoles:Fi,children:l.jsx(Dv,{})})}),l.jsx(rt,{path:"/partner-integrations/energyLedger",element:l.jsx(Lt,{embedded:!0,capability:"appcenter.open",requiredRole:"Installer oder Admin",title:"Bilanz · Partnerfreigaben",allowedRoles:Fi,children:l.jsx(Uo,{appId:"energyLedger"})})}),l.jsx(rt,{path:"/partner-integrations/directMarketing",element:l.jsx(Lt,{embedded:!0,capability:"appcenter.open",requiredRole:"Installer oder Admin",title:"Direktvermarktung · Partnerfreigaben",allowedRoles:Fi,children:l.jsx(Uo,{appId:"directMarketing"})})}),l.jsx(rt,{path:"/dynamic-grid",element:l.jsx(Lt,{embedded:!0,capability:"appcenter.open",requiredRole:"Installer oder Admin",title:"Dynamischer Netzanschluss",allowedRoles:Fi,children:l.jsx(Cv,{})})}),l.jsx(rt,{path:"/nvp-topology",element:l.jsx(ff,{replace:!0,to:"/dynamic-grid"})}),l.jsx(rt,{path:"/mesh-coordinator",element:l.jsx(Lt,{capability:"mesh.configure",requiredRole:"Installer oder Admin",title:"Microgrid",children:d.startsWith("/ems/microgrid")?l.jsx(Fw,{}):l.jsx(Wr,{targetKey:"appcenter"})})}),l.jsx(rt,{path:"/notification-mail",element:l.jsx(Lt,{capability:"notifications.manage",requiredRole:"Admin",title:"E-Mail-Versand",children:l.jsx(cv,{})})}),l.jsx(rt,{element:l.jsx(Lt,{capability:"appcenter.open",title:"Installer",children:l.jsx(Sf,{})}),path:"/"}),l.jsx(rt,{element:l.jsx(Lt,{capability:"appcenter.open",title:"Installer",children:l.jsx(Sf,{})}),path:"/installer"}),l.jsx(rt,{element:l.jsx(Lt,{capability:"license.manage",requiredRole:"Admin",title:"Lizenz",children:l.jsx(Ov,{})}),path:"/license"}),l.jsx(rt,{element:l.jsx(Lt,{capability:"appcenter.open",title:"EMS App-Center",children:l.jsx(Wr,{targetKey:"appcenter"})}),path:"/redirect/appcenter"}),l.jsx(rt,{element:l.jsx(Lt,{capability:"simulation.open",title:"Simulation",children:l.jsx(Wr,{targetKey:"simulation"})}),path:"/redirect/simulation"}),l.jsx(rt,{element:l.jsx(Wr,{targetKey:"smarthome-config"}),path:"/redirect/smarthome-config"}),l.jsx(rt,{element:l.jsx(Wr,{targetKey:"smarthome-vis"}),path:"/redirect/smarthome-vis"}),l.jsx(rt,{element:l.jsx(ff,{replace:!0,to:"/installer"}),path:"*"})]})}const kh=document.getElementById("root");if(!kh)throw new Error("Admin-Anwendung kann nicht gestartet werden: Einbettung fehlt.");Rm.createRoot(kh).render(l.jsx(Wf.StrictMode,{children:l.jsx(Yg,{children:l.jsx(Wv,{})})}));
|