iobroker.eos-admin 9.0.17 → 9.0.18
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 +12 -14
- package/README.md +5 -3
- package/START_HIER_9.0.18.md +47 -0
- package/adminWww/.vite/manifest.json +39 -39
- package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +107 -107
- package/adminWww/assets/{AdapterUpdateDialog-Cpo3dAfY.js → AdapterUpdateDialog-ByJk9Cxj.js} +1 -1
- package/adminWww/assets/{Adapters-n2ukPDdC.js → Adapters-V2JtEPZX.js} +1 -1
- package/adminWww/assets/{ConfigManager-BVZ6_Ebo.js → ConfigManager-BKcdyJnN.js} +1 -1
- package/adminWww/assets/{Enums-CQ6yHG2W.js → Enums-ChbfAWzp.js} +1 -1
- package/adminWww/assets/{Fields-CaJqzoW-.js → Fields-DzaVXEvg.js} +1 -1
- package/adminWww/assets/{Files-DfvpKGa3.js → Files-CRpIXj4X.js} +1 -1
- package/adminWww/assets/{Hosts-3xLBsdG6.js → Hosts-rOgfd2wo.js} +1 -1
- package/adminWww/assets/{Instances-B7hKEhyw.js → Instances-BxLhJ6Pb.js} +1 -1
- package/adminWww/assets/{Intro-BV4kYZdT.js → Intro-BOql527d.js} +1 -1
- package/adminWww/assets/{Logs-DpL9eY69.js → Logs-WUUDY7a4.js} +1 -1
- package/adminWww/assets/{Objects-dN06jhQk.js → Objects-DYaZkCK7.js} +1 -1
- package/adminWww/assets/{Overview-Lip63_ej.js → Overview-C6hiiPbm.js} +1 -1
- package/adminWww/assets/{State-BSO2X_xN.js → State-AH43l7fG.js} +1 -1
- package/adminWww/assets/{UsedResources-DvqzszKI.js → UsedResources-jhsRMH4X.js} +1 -1
- package/adminWww/assets/{Users-Csqd1xA-.js → Users-D9wyLyJ1.js} +1 -1
- package/adminWww/assets/{bootstrap-C3HM8kNL.js → bootstrap-gVLo1K_2.js} +3 -3
- package/adminWww/assets/{hostInit-DdxBUeXQ.js → hostInit-Dt_M-NAC.js} +1 -1
- package/adminWww/assets/{icons-material-D1Tb_725.js → icons-material-DuVW_EUA.js} +1 -1
- package/adminWww/assets/{index-BOujTMyH.js → index-B1cnPkSO.js} +2 -2
- package/adminWww/assets/{installSVGRenderer-BZyrUVAo.js → installSVGRenderer-GvgHjubR.js} +1 -1
- package/adminWww/assets/{mf-entry-bootstrap-0-3418586b.js → mf-entry-bootstrap-0-6b32b635.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.18.js +12 -0
- package/adminWww/remoteEntry.js +1 -1
- package/build/lib/eosDeviceEmsPlan.js +739 -0
- package/build/lib/eosDeviceEmsPlan.js.map +1 -0
- package/build/lib/eosDeviceEmsService.js +377 -0
- package/build/lib/eosDeviceEmsService.js.map +1 -0
- package/build/lib/eosModuleHost.js +53 -2
- package/build/lib/eosModuleHost.js.map +1 -1
- package/build/lib/eosModuleHttp.js +1 -1
- package/build/lib/eosModuleHttp.js.map +1 -1
- package/build/lib/web.js +15 -0
- package/build/lib/web.js.map +1 -1
- package/docs/reports/unified-9.0.18/ALIAS_V1_COVERAGE.json +5056 -0
- package/docs/reports/unified-9.0.18/ALIAS_V1_VERTRAG.md +257 -0
- package/docs/reports/unified-9.0.18/ANFORDERUNGEN.md +55 -0
- package/docs/reports/unified-9.0.18/CUSTOMER_TARIFF_REVIEW.md +33 -0
- package/docs/reports/unified-9.0.18/GERAETE_EMS_EINRICHTUNG.md +86 -0
- package/docs/reports/unified-9.0.18/INSTALLER_LIFECYCLE_REVIEW.md +29 -0
- package/docs/reports/unified-9.0.18/KUNDENTARIF_EINRICHTUNG.md +27 -0
- package/docs/reports/unified-9.0.18/PRUEFBERICHT.md +87 -0
- package/docs/reports/unified-9.0.18/UNABHAENGIGER_REVIEW.md +63 -0
- package/docs/reports/unified-9.0.18/raw/INDEX.json +331 -0
- package/docs/reports/unified-9.0.18/raw/audit-full.log +345 -0
- package/docs/reports/unified-9.0.18/raw/audit-full.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/audit-runtime.log +23 -0
- package/docs/reports/unified-9.0.18/raw/audit-runtime.result.json +15 -0
- package/docs/reports/unified-9.0.18/raw/backend-final.log +5 -0
- package/docs/reports/unified-9.0.18/raw/backend-final.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/frontend-build.log +152 -0
- package/docs/reports/unified-9.0.18/raw/frontend-build.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/installer-build.log +26 -0
- package/docs/reports/unified-9.0.18/raw/installer-build.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/keygen-source.json +6 -0
- package/docs/reports/unified-9.0.18/raw/lint-final.log +5 -0
- package/docs/reports/unified-9.0.18/raw/lint-final.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/modules-build.log +5 -0
- package/docs/reports/unified-9.0.18/raw/modules-build.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/node22-tests-final.log +9859 -0
- package/docs/reports/unified-9.0.18/raw/node22-tests-final.result.json +13 -0
- package/docs/reports/unified-9.0.18/raw/node22-typecheck-final.log +7 -0
- package/docs/reports/unified-9.0.18/raw/node22-typecheck-final.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.18/raw/node24-tests-final.log +1663 -0
- package/docs/reports/unified-9.0.18/raw/node24-tests-final.result.json +13 -0
- package/docs/reports/unified-9.0.18/raw/node24-typecheck-final.log +5 -0
- package/docs/reports/unified-9.0.18/raw/node24-typecheck-final.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.18/raw/sbom-runtime.log +7 -0
- package/docs/reports/unified-9.0.18/raw/sbom-runtime.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/sbom-vendor-check.log +1 -0
- package/docs/reports/unified-9.0.18/raw/sbom-vendor-check.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/ui-docs-check.log +6 -0
- package/docs/reports/unified-9.0.18/raw/ui-docs-check.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/ui-runtime-final.log +7 -0
- package/docs/reports/unified-9.0.18/raw/ui-runtime-final.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/ui-runtime-sync.log +6 -0
- package/docs/reports/unified-9.0.18/raw/ui-runtime-sync.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/ui-sbom-check.log +6 -0
- package/docs/reports/unified-9.0.18/raw/ui-sbom-check.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/ui-sbom-final.log +14 -0
- package/docs/reports/unified-9.0.18/raw/ui-sbom-final.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/ui-secret-final.log +6 -0
- package/docs/reports/unified-9.0.18/raw/ui-secret-final.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/ui-security-final.log +8 -0
- package/docs/reports/unified-9.0.18/raw/ui-security-final.result.json +14 -0
- package/io-package.json +8 -8
- package/modules/devices/admin/alias-contract-v1.json +189 -0
- package/modules/devices/admin/ems-assignment.d.ts +10 -0
- package/modules/devices/admin/ems-assignment.js +194 -0
- package/modules/devices/admin/host-bridge.js +47 -0
- package/modules/devices/admin/index.html +19 -1
- package/modules/devices/admin/index_m.js +73 -1
- package/modules/devices/admin/style.css +15 -0
- package/modules/devices/checks/emsAssignment.check.js +128 -0
- package/modules/devices/eslint.hosted.config.mjs +1 -1
- package/modules/devices/index.js +11 -0
- package/modules/devices/lib/alias-contract-v1.json +189 -0
- package/modules/devices/lib/aliasContract.js +7 -1
- package/modules/devices/lib/device-alias-semantics-v1.json +1605 -0
- package/modules/devices/lib/deviceAliasSemantics.js +109 -0
- package/modules/devices/lib/deviceRuntime.js +3 -0
- package/modules/devices/test/aliasContractV1.test.js +1 -1
- package/modules/devices/test/deviceAliasSemantics.test.js +163 -0
- package/modules/devices/test/emsAssignmentUi.test.js +190 -0
- package/modules/devices/tsconfig.alias-semantics.json +17 -0
- package/modules/devices/tsconfig.ems-ui.json +9 -0
- package/package.json +9 -7
- package/release-manifests/unified/build-environment.cdx.json +6 -6
- package/release-manifests/unified/files.json +194 -85
- 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 +84 -0
- package/release-manifests/unified/runtime.cdx.json +23 -23
- package/release-manifests/unified/validation.json +15 -15
- package/tools/eos-release-check.cjs +1 -1
- package/tools/eos-release-manifest.cjs +5 -5
- package/ui/docs/security/eslint-reviewed-findings.json +32 -18
- package/ui/ems/datapoints.js +22 -1
- package/ui/ems/modules/tariff-provider.js +232 -54
- package/ui/io-package.json +5 -1
- package/ui/lib/customer-tariff.js +241 -0
- package/ui/lib/installer-lifecycle.js +87 -0
- package/ui/main.js +203 -117
- package/ui/package.json +8 -4
- package/ui/www/customer-tariff.css +21 -0
- package/ui/www/customer-tariff.js +333 -0
- package/ui/www/ems-apps.js +16 -6
- package/ui/www/manifest.webmanifest +2 -2
- package/ui/www/settings.html +45 -0
- package/adminWww/remoteEntry-eos-9.0.17.js +0 -12
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026 NexoWatt. All rights reserved.
|
|
3
|
+
* Confidential and Proprietary.
|
|
4
|
+
* Use, modification or distribution without express written permission is prohibited.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
8
|
+
*
|
|
9
|
+
* Quelle: src-ts/runtime-executables/www/customer-tariff.ts
|
|
10
|
+
* Quell-Hash: sha256:dab28ef2897dc9e0b884e797fc84e74fce129aabd578c09a08e4e1b461b68d59
|
|
11
|
+
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
|
+
*
|
|
13
|
+
* Zweck:
|
|
14
|
+
* Diese JavaScript-Datei ist das ausführbare Build-Artefakt für www/customer-tariff.js.
|
|
15
|
+
* Die fachliche Bearbeitung erfolgt ab 0.7.131 in der TypeScript-Quelle.
|
|
16
|
+
* Ab 0.7.132 sind doppelte Legacy-JS-Bäume wie .nwcore entfernt.
|
|
17
|
+
*
|
|
18
|
+
* Pflege-Regel:
|
|
19
|
+
* 1. Änderung zuerst in src-ts/runtime-executables/ vornehmen.
|
|
20
|
+
* 2. npm run sync:ts-runtime-executables ausführen.
|
|
21
|
+
* 3. npm run test:runtime-executables prüfen.
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* NexoWatt Quellcode-Erklärung (DE)
|
|
25
|
+
* Aufgabe: Richtet den gemeinsamen Anlagentarif in den Kundeneinstellungen ein.
|
|
26
|
+
* Daten und Wirkung: Schreibt ausschließlich geänderte Tarifparameter über die
|
|
27
|
+
* dedizierte Kunden-API; niemals eine vollständige App-Center-Konfiguration.
|
|
28
|
+
* auth.ts setzt Sitzung und CSRF. Der Server prüft Rechte, Lizenz, Preiszuordnung,
|
|
29
|
+
* Revision und Quellen. Token werden nicht angezeigt oder lokal gespeichert.
|
|
30
|
+
* Bei Änderungen: Quellwechsel, Pflichtfelder, Secret-Erhalt, Konflikte und
|
|
31
|
+
* unveränderte Geräteeinstellungen prüfen. Kein automatischer Schreibretry.
|
|
32
|
+
*/
|
|
33
|
+
(() => {
|
|
34
|
+
'use strict';
|
|
35
|
+
const endpoint = '/api/customer/tariff-provider';
|
|
36
|
+
const installerSelection = '__installer__';
|
|
37
|
+
const supported = new Set(['manual-dp', 'tibber', 'energyzero', 'entsoe', 'market-profile']);
|
|
38
|
+
const formulaFields = [
|
|
39
|
+
['marketMultiplier', 'customerTariffMultiplier', 1], ['supplierMarkupEurPerKwh', 'customerTariffMarkup', 0],
|
|
40
|
+
['gridVariableEurPerKwh', 'customerTariffGrid', 0], ['taxEurPerKwh', 'customerTariffTax', 0],
|
|
41
|
+
['otherVariableEurPerKwh', 'customerTariffOther', 0], ['vatPct', 'customerTariffVat', 0],
|
|
42
|
+
];
|
|
43
|
+
const isRecord = (value) => !!value && typeof value === 'object' && !Array.isArray(value);
|
|
44
|
+
const ownValue = (value, key) => Object.hasOwn(value, key) ? Reflect.get(value, key) : undefined;
|
|
45
|
+
const text = (value, fallback = '') => typeof value === 'string' ? value : fallback;
|
|
46
|
+
function choices(value) {
|
|
47
|
+
if (!Array.isArray(value))
|
|
48
|
+
return [];
|
|
49
|
+
return value.slice(0, 64).flatMap((item) => {
|
|
50
|
+
if (!isRecord(item) || typeof item.id !== 'string' || item.id.length > 80 || typeof item.name !== 'string')
|
|
51
|
+
return [];
|
|
52
|
+
const countries = Array.isArray(item.countries) ? item.countries.filter((country) => typeof country === 'string')
|
|
53
|
+
: text(item.country, 'DE/NL').split('/');
|
|
54
|
+
return [{ id: item.id, name: item.name.slice(0, 160), countries }];
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
function decode(value) {
|
|
58
|
+
if (!isRecord(value) || value.ok !== true || value.scope !== 'system' || typeof value.revision !== 'string'
|
|
59
|
+
|| value.revision.length > 160 || !value.revision || !isRecord(value.config))
|
|
60
|
+
throw new Error('Die gespeicherte Tarifanbindung wurde nicht bestätigt. Bitte neu laden.');
|
|
61
|
+
const flags = isRecord(value.credentialsPresent) ? value.credentialsPresent : {};
|
|
62
|
+
return { revision: value.revision, config: value.config, credentialsPresent: { accessToken: flags.accessToken === true, securityToken: flags.securityToken === true },
|
|
63
|
+
providers: choices(value.providers).filter(provider => supported.has(provider.id)), profiles: choices(value.profiles), status: isRecord(value.status) ? value.status : {}, configuredExternally: value.configuredExternally === true };
|
|
64
|
+
}
|
|
65
|
+
async function request(body) {
|
|
66
|
+
const options = { cache: 'no-store', credentials: 'same-origin', signal: AbortSignal.timeout(15000) };
|
|
67
|
+
if (body) {
|
|
68
|
+
options.method = 'PUT';
|
|
69
|
+
options.headers = { 'Content-Type': 'application/json' };
|
|
70
|
+
options.body = JSON.stringify(body);
|
|
71
|
+
}
|
|
72
|
+
const response = await fetch(endpoint, options);
|
|
73
|
+
if (response.status === 401)
|
|
74
|
+
throw new Error('Sitzung abgelaufen. Bitte erneut bei EOS anmelden. Deine Eingaben bleiben im Formular.');
|
|
75
|
+
if (response.status === 403)
|
|
76
|
+
throw new Error('Tarifanbindung nicht freigegeben. Bitte Anmeldung und Systemfreigabe prüfen.');
|
|
77
|
+
if (response.status === 409)
|
|
78
|
+
throw new Error('Der Tarif wurde inzwischen geändert. Deine Eingaben bleiben erhalten. Gespeicherten Tarif laden und Änderungen abgleichen.');
|
|
79
|
+
if (!response.ok)
|
|
80
|
+
throw new Error('Die Tarifanbindung konnte nicht bestätigt werden. Anbieter, Pflichtfelder und Verbindung prüfen. Es wird nichts automatisch erneut gesendet.');
|
|
81
|
+
return decode(await response.json());
|
|
82
|
+
}
|
|
83
|
+
function initialize() {
|
|
84
|
+
const panelNode = document.getElementById('customerTariffPanel');
|
|
85
|
+
const formNode = document.getElementById('customerTariffForm');
|
|
86
|
+
if (!(panelNode instanceof HTMLDetailsElement) || !(formNode instanceof HTMLFormElement))
|
|
87
|
+
return;
|
|
88
|
+
const panel = panelNode;
|
|
89
|
+
const form = formNode;
|
|
90
|
+
const input = (id) => { const value = document.getElementById(id); if (!(value instanceof HTMLInputElement))
|
|
91
|
+
throw new Error('Tarif-Eingabefeld fehlt'); return value; };
|
|
92
|
+
const select = (id) => { const value = document.getElementById(id); if (!(value instanceof HTMLSelectElement))
|
|
93
|
+
throw new Error('Tarif-Auswahl fehlt'); return value; };
|
|
94
|
+
const element = (id) => { const value = document.getElementById(id); if (!(value instanceof HTMLElement))
|
|
95
|
+
throw new Error('Tarif-Anzeige fehlt'); return value; };
|
|
96
|
+
const fieldsetNode = document.getElementById('customerTariffFields');
|
|
97
|
+
const saveNode = document.getElementById('customerTariffSave');
|
|
98
|
+
const reloadNode = document.getElementById('customerTariffReload');
|
|
99
|
+
if (!(fieldsetNode instanceof HTMLFieldSetElement) || !(saveNode instanceof HTMLButtonElement) || !(reloadNode instanceof HTMLButtonElement))
|
|
100
|
+
return;
|
|
101
|
+
const fieldset = fieldsetNode;
|
|
102
|
+
const save = saveNode;
|
|
103
|
+
const reload = reloadNode;
|
|
104
|
+
const country = select('customerTariffCountry');
|
|
105
|
+
const provider = select('customerTariffProvider');
|
|
106
|
+
const source = select('customerTariffSource');
|
|
107
|
+
const profile = select('customerTariffProfile');
|
|
108
|
+
const credential = input('customerTariffCredential');
|
|
109
|
+
const enabled = input('customerTariffEnabled');
|
|
110
|
+
const use = input('customerTariffUse');
|
|
111
|
+
const home = input('customerTariffHome');
|
|
112
|
+
const status = element('customerTariffStatus');
|
|
113
|
+
let view = null;
|
|
114
|
+
let baseline = {};
|
|
115
|
+
let busy = false;
|
|
116
|
+
let dirty = false;
|
|
117
|
+
function show(message, error = false) { status.textContent = message; status.dataset.error = String(error); }
|
|
118
|
+
function setOptions(target, items, selected, allowCurrent = false) {
|
|
119
|
+
target.replaceChildren();
|
|
120
|
+
const placeholder = document.createElement('option');
|
|
121
|
+
placeholder.value = '';
|
|
122
|
+
placeholder.textContent = 'Bitte auswählen';
|
|
123
|
+
target.appendChild(placeholder);
|
|
124
|
+
for (const item of items) {
|
|
125
|
+
const option = document.createElement('option');
|
|
126
|
+
option.value = item.id;
|
|
127
|
+
option.textContent = item.name;
|
|
128
|
+
target.appendChild(option);
|
|
129
|
+
}
|
|
130
|
+
if (allowCurrent && selected && !items.some(item => item.id === selected)) {
|
|
131
|
+
const option = document.createElement('option');
|
|
132
|
+
option.value = selected;
|
|
133
|
+
option.textContent = supported.has(selected) ? 'Aktuelle Tarifquelle · im gewählten Land nicht verfügbar' : 'Vorhandener Tarif · vom Installateur eingerichtet';
|
|
134
|
+
target.appendChild(option);
|
|
135
|
+
}
|
|
136
|
+
target.value = items.some(item => item.id === selected) || allowCurrent ? selected : '';
|
|
137
|
+
}
|
|
138
|
+
function providerChoices() {
|
|
139
|
+
if (!view)
|
|
140
|
+
return;
|
|
141
|
+
setOptions(provider, view.providers.filter(item => item.countries.includes(country.value)), provider.value || (view.configuredExternally ? installerSelection : text(view.config.providerId)), true);
|
|
142
|
+
setOptions(profile, view.profiles.filter(item => item.countries.includes(country.value)), profile.value || text(view.config.providerProfileId));
|
|
143
|
+
setOptions(source, view.providers.filter(item => ['entsoe', 'energyzero'].includes(item.id) && item.countries.includes(country.value)), source.value || text(view.config.sourceId));
|
|
144
|
+
}
|
|
145
|
+
function secretKey() {
|
|
146
|
+
if (provider.value === 'tibber')
|
|
147
|
+
return 'accessToken';
|
|
148
|
+
return provider.value === 'entsoe' || (provider.value === 'market-profile' && source.value === 'entsoe') ? 'securityToken' : '';
|
|
149
|
+
}
|
|
150
|
+
function mayKeepSecret(key) {
|
|
151
|
+
if (!view || view.configuredExternally)
|
|
152
|
+
return false;
|
|
153
|
+
const previousSource = view.config.providerId === 'market-profile' ? view.config.sourceId : view.config.providerId;
|
|
154
|
+
const nextSource = provider.value === 'market-profile' ? source.value : provider.value;
|
|
155
|
+
const present = key === 'accessToken' ? view.credentialsPresent.accessToken : view.credentialsPresent.securityToken;
|
|
156
|
+
return provider.value === view.config.providerId && previousSource === nextSource && present;
|
|
157
|
+
}
|
|
158
|
+
function visibility() {
|
|
159
|
+
const kind = provider.value;
|
|
160
|
+
const external = !!kind && !supported.has(kind);
|
|
161
|
+
const market = kind === 'market-profile';
|
|
162
|
+
element('customerTariffProfileField').hidden = !market;
|
|
163
|
+
element('customerTariffSourceField').hidden = !market;
|
|
164
|
+
element('customerTariffHomeField').hidden = kind !== 'tibber';
|
|
165
|
+
const hasFormula = market || kind === 'entsoe';
|
|
166
|
+
element('customerTariffFormula').hidden = !hasFormula;
|
|
167
|
+
for (const [, id] of formulaFields)
|
|
168
|
+
input(id).disabled = !hasFormula;
|
|
169
|
+
input('customerTariffIncludesVat').disabled = !hasFormula;
|
|
170
|
+
enabled.disabled = external || kind === 'manual-dp';
|
|
171
|
+
use.disabled = external || kind === 'manual-dp';
|
|
172
|
+
const key = secretKey();
|
|
173
|
+
element('customerTariffCredentialField').hidden = !key;
|
|
174
|
+
credential.disabled = !key;
|
|
175
|
+
element('customerTariffCredentialLabel').textContent = key === 'accessToken' ? 'Tibber Access Token' : 'ENTSO-E Security Token';
|
|
176
|
+
element('customerTariffCredentialHint').textContent = key && mayKeepSecret(key)
|
|
177
|
+
? 'Zugangsschlüssel gespeichert. Leer lassen, um ihn zu behalten; für einen Austausch einen neuen eingeben.'
|
|
178
|
+
: 'Für die neu gewählte Tarifquelle den passenden Zugangsschlüssel eingeben. Gespeicherte Schlüssel anderer Quellen werden nicht übernommen.';
|
|
179
|
+
element('customerTariffProviderHint').textContent = external ? 'Diese Anbindung wurde vom Installateur eingerichtet und bleibt erhalten. Für einen Anbieterwechsel eine unterstützte Tarifquelle auswählen.'
|
|
180
|
+
: market ? 'Anbieterprofile berechnen Preise aus einer Marktpreisquelle und deinen Vertragsbestandteilen. Sie sind keine direkte Anmeldung beim gewählten Stromanbieter.'
|
|
181
|
+
: kind === 'manual-dp' ? 'Die vorhandenen, vom Installateur zugeordneten Preis-Datenpunkte bleiben erhalten.'
|
|
182
|
+
: kind === 'entsoe' ? 'ENTSO-E liefert Börsenpreise. Ergänze die vereinbarten Preisbestandteile, um deinen Vertragspreis abzubilden.'
|
|
183
|
+
: kind === 'energyzero' ? 'EnergyZero liefert eine öffentliche Preiszeitreihe für die Niederlande. Prüfe die Übereinstimmung mit deinem Stromvertrag.'
|
|
184
|
+
: kind === 'tibber' ? 'Verbinde dein Tibber-Konto mit deinem persönlichen Token. Bei mehreren Haushalten die passende Home-ID eintragen.'
|
|
185
|
+
: 'Wähle die Preisquelle für deinen Stromtarif.';
|
|
186
|
+
}
|
|
187
|
+
function values() {
|
|
188
|
+
const formula = { priceIncludesVat: input('customerTariffIncludesVat').checked };
|
|
189
|
+
for (const [key, id] of formulaFields)
|
|
190
|
+
Reflect.set(formula, key, Number(input(id).value));
|
|
191
|
+
return { enabled: enabled.checked, providerId: provider.value, sourceId: source.value, providerProfileId: profile.value,
|
|
192
|
+
country: country.value, homeId: home.value.trim(), useForTariff: use.checked, formula };
|
|
193
|
+
}
|
|
194
|
+
function patch() {
|
|
195
|
+
const current = values();
|
|
196
|
+
const result = {};
|
|
197
|
+
for (const [key, value] of Object.entries(current)) {
|
|
198
|
+
if (['sourceId', 'providerProfileId'].includes(key) && provider.value !== 'market-profile')
|
|
199
|
+
continue;
|
|
200
|
+
if (key === 'homeId' && provider.value !== 'tibber')
|
|
201
|
+
continue;
|
|
202
|
+
if (key === 'formula' && !['entsoe', 'market-profile'].includes(provider.value))
|
|
203
|
+
continue;
|
|
204
|
+
if (key === 'formula') {
|
|
205
|
+
const delta = {};
|
|
206
|
+
const oldFormula = isRecord(baseline.formula) ? baseline.formula : {};
|
|
207
|
+
for (const [field, next] of Object.entries(isRecord(value) ? value : {}))
|
|
208
|
+
if (next !== ownValue(oldFormula, field))
|
|
209
|
+
Reflect.set(delta, field, next);
|
|
210
|
+
if (Object.keys(delta).length)
|
|
211
|
+
result.formula = delta;
|
|
212
|
+
}
|
|
213
|
+
else if (value !== ownValue(baseline, key))
|
|
214
|
+
Reflect.set(result, key, value);
|
|
215
|
+
}
|
|
216
|
+
const key = secretKey();
|
|
217
|
+
if (key && credential.value.trim())
|
|
218
|
+
result.credentials = key === 'accessToken'
|
|
219
|
+
? { accessToken: credential.value.trim() } : { securityToken: credential.value.trim() };
|
|
220
|
+
return result;
|
|
221
|
+
}
|
|
222
|
+
function controls() { fieldset.disabled = busy || !view; save.disabled = busy || !view || !dirty; reload.disabled = busy; }
|
|
223
|
+
function render(next) {
|
|
224
|
+
view = next;
|
|
225
|
+
const config = next.config;
|
|
226
|
+
const formula = isRecord(config.formula) ? config.formula : {};
|
|
227
|
+
country.value = config.country === 'NL' ? 'NL' : 'DE';
|
|
228
|
+
provider.value = '';
|
|
229
|
+
profile.value = '';
|
|
230
|
+
source.value = '';
|
|
231
|
+
providerChoices();
|
|
232
|
+
enabled.checked = config.enabled === true;
|
|
233
|
+
use.checked = config.useForTariff === true;
|
|
234
|
+
home.value = text(config.homeId);
|
|
235
|
+
for (const [key, id, fallback] of formulaFields) {
|
|
236
|
+
const value = ownValue(formula, key);
|
|
237
|
+
input(id).value = String(typeof value === 'number' && Number.isFinite(value) ? value : fallback);
|
|
238
|
+
}
|
|
239
|
+
input('customerTariffIncludesVat').checked = formula.priceIncludesVat === true;
|
|
240
|
+
credential.value = '';
|
|
241
|
+
visibility();
|
|
242
|
+
baseline = values();
|
|
243
|
+
dirty = false;
|
|
244
|
+
const lastUpdate = typeof next.status.lastUpdate === 'number' ? next.status.lastUpdate : 0;
|
|
245
|
+
const updated = lastUpdate > 0 && Number.isFinite(new Date(lastUpdate).getTime()) ? new Date(lastUpdate).toLocaleString('de-DE') : '';
|
|
246
|
+
const state = next.status.state;
|
|
247
|
+
element('customerTariffFetchStatus').textContent = state === 'ready' ? `Preisabruf erfolgreich${updated ? ` · zuletzt ${updated}` : ''}.`
|
|
248
|
+
: state === 'error' ? 'Preisabruf derzeit nicht bestätigt. Zugang und Tarifquelle prüfen.'
|
|
249
|
+
: state === 'pending' ? 'Preisabruf wird vorbereitet.' : state === 'disabled' || !enabled.checked ? 'Direkter Preisabruf ist ausgeschaltet.'
|
|
250
|
+
: 'Preisabruf noch nicht bestätigt. Gespeicherte Tarifanbindung und aktueller Abrufstatus sind getrennte Ergebnisse.';
|
|
251
|
+
}
|
|
252
|
+
async function synchronize(saving) {
|
|
253
|
+
if (busy || (saving && !view))
|
|
254
|
+
return;
|
|
255
|
+
let body;
|
|
256
|
+
if (saving && view) {
|
|
257
|
+
if (!form.reportValidity())
|
|
258
|
+
return;
|
|
259
|
+
const kind = provider.value;
|
|
260
|
+
if (!supported.has(kind) || !view.providers.some(item => item.id === kind && item.countries.includes(country.value))) {
|
|
261
|
+
show('Bitte eine unterstützte Tarifquelle für das gewählte Land auswählen.', true);
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
if (kind === 'market-profile' && (!source.value || !profile.value)) {
|
|
265
|
+
show('Bitte Anbieterprofil und Marktpreisquelle auswählen.', true);
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
const key = secretKey();
|
|
269
|
+
if (enabled.checked && key && !credential.value.trim() && !mayKeepSecret(key)) {
|
|
270
|
+
show('Bitte den passenden Zugangsschlüssel für die gewählte Tarifquelle eintragen.', true);
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
const changes = patch();
|
|
274
|
+
if (!Object.keys(changes).length) {
|
|
275
|
+
dirty = false;
|
|
276
|
+
controls();
|
|
277
|
+
show('Keine Änderungen zu speichern.');
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
body = { expectedRevision: view.revision, config: changes };
|
|
281
|
+
}
|
|
282
|
+
busy = true;
|
|
283
|
+
controls();
|
|
284
|
+
show(saving ? 'Tarifanbindung wird gespeichert …' : 'Gespeicherte Tarifanbindung wird geladen …');
|
|
285
|
+
try {
|
|
286
|
+
render(await request(body));
|
|
287
|
+
show(saving ? 'Tarifanbindung gespeichert. Der Preisabruf wird separat geprüft; Anlagenfreigaben bleiben unverändert.' : 'Gespeicherte Tarifanbindung geladen.');
|
|
288
|
+
}
|
|
289
|
+
catch (error) {
|
|
290
|
+
show(error instanceof Error ? error.message : 'Tarifanbindung nicht verfügbar.', true);
|
|
291
|
+
}
|
|
292
|
+
finally {
|
|
293
|
+
busy = false;
|
|
294
|
+
controls();
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
form.addEventListener('input', () => { if (view && !busy) {
|
|
298
|
+
dirty = Object.keys(patch()).length > 0;
|
|
299
|
+
controls();
|
|
300
|
+
show('Ungespeicherte Tarifänderungen.');
|
|
301
|
+
} });
|
|
302
|
+
form.addEventListener('change', event => {
|
|
303
|
+
if (event.target === provider || event.target === source)
|
|
304
|
+
credential.value = '';
|
|
305
|
+
if (event.target === provider && provider.value === 'manual-dp') {
|
|
306
|
+
enabled.checked = false;
|
|
307
|
+
use.checked = false;
|
|
308
|
+
}
|
|
309
|
+
if (event.target === country) {
|
|
310
|
+
credential.value = '';
|
|
311
|
+
providerChoices();
|
|
312
|
+
}
|
|
313
|
+
visibility();
|
|
314
|
+
if (view && !busy) {
|
|
315
|
+
dirty = Object.keys(patch()).length > 0;
|
|
316
|
+
controls();
|
|
317
|
+
show('Ungespeicherte Tarifänderungen.');
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
form.addEventListener('submit', event => { event.preventDefault(); void synchronize(true); });
|
|
321
|
+
reload.addEventListener('click', () => { if (dirty && !window.confirm('Ungespeicherte Tarifänderungen verwerfen und gespeicherten Tarif laden?'))
|
|
322
|
+
return; void synchronize(false); });
|
|
323
|
+
panel.addEventListener('toggle', () => { if (panel.open && !view && !busy)
|
|
324
|
+
void synchronize(false); });
|
|
325
|
+
window.addEventListener('pagehide', () => { credential.value = ''; });
|
|
326
|
+
if (panel.open)
|
|
327
|
+
void synchronize(false);
|
|
328
|
+
}
|
|
329
|
+
if (document.readyState === 'loading')
|
|
330
|
+
document.addEventListener('DOMContentLoaded', initialize, { once: true });
|
|
331
|
+
else
|
|
332
|
+
initialize();
|
|
333
|
+
})();
|
package/ui/www/ems-apps.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
8
8
|
*
|
|
9
9
|
* Quelle: src-ts/runtime-executables/www/ems-apps.ts
|
|
10
|
-
* Quell-Hash: sha256:
|
|
10
|
+
* Quell-Hash: sha256:b4369cfa8be7f9da648a4bc71cfcec49cf2cdced3f79650a1459b3f11ff11d7c
|
|
11
11
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
12
|
*
|
|
13
13
|
* Zweck:
|
|
@@ -1026,6 +1026,7 @@
|
|
|
1026
1026
|
];
|
|
1027
1027
|
|
|
1028
1028
|
let currentConfig = null;
|
|
1029
|
+
let configurationRevision = null;
|
|
1029
1030
|
// CAS stammt ausschließlich aus einem vollständig geladenen Gesamtstand.
|
|
1030
1031
|
// Eine Änderungsmeldung erhöht nur die beobachtete Version, niemals den Save-Token.
|
|
1031
1032
|
let dynamicGridLoadedVersion = null;
|
|
@@ -1750,6 +1751,12 @@ function _collectFlowPowerDpIsWFromUI() {
|
|
|
1750
1751
|
if (data && data.startup && typeof data.message === 'string' && /^EOS_[A-Z0-9_]{1,91}$/.test(String(err))) {
|
|
1751
1752
|
throw new Error(data.message.slice(0, 512) + ' (' + String(err) + ')');
|
|
1752
1753
|
}
|
|
1754
|
+
if (err === 'EOS_INSTALLER_CONFIG_CHANGED') {
|
|
1755
|
+
throw new Error('Die EMS-Zuordnung wurde inzwischen geändert. Deine Eingaben bleiben erhalten. Bitte den aktuellen Stand über „Neu laden“ laden und die Änderungen vor erneutem Speichern vergleichen.');
|
|
1756
|
+
}
|
|
1757
|
+
if (['EOS_EMS_OBJECT_PROVISION_FAILED', 'EOS_EMS_APPLY_FAILED'].includes(err) && typeof data.message === 'string') {
|
|
1758
|
+
throw new Error(data.message.slice(0, 500));
|
|
1759
|
+
}
|
|
1753
1760
|
throw new Error(err === 'DYNAMIC_GRID_VERSION_CONFLICT' ? dynamicGridReloadNotice : err);
|
|
1754
1761
|
}
|
|
1755
1762
|
|
|
@@ -9964,8 +9971,8 @@ http://mesh-peer.local:8188" ${isEos ? '' : 'disabled'}>${_meshHtmlEscape(Array.
|
|
|
9964
9971
|
grid.appendChild(mkDpField('FENECON gesamte PV (W)', `sf_${idx}_feneconPvTotalId`, s.feneconPvTotalId, (v) => { const sf2 = _ensureStorageFarmCfg(); sf2.storages[i].feneconPvTotalId = v; }, 'ProductionActivePower · typ. 327'));
|
|
9965
9972
|
}
|
|
9966
9973
|
|
|
9967
|
-
grid.appendChild(mkDpField('PV-/WR-Leistung (W)', `sf_${idx}_pvPowerId`, s.pvPowerId, (v) => { const sf2 = _ensureStorageFarmCfg(); sf2.storages[i].pvPowerId = v; }, '
|
|
9968
|
-
grid.appendChild(mkGridHelp('PV-/WR-Leistung passend zur Kopplung zuordnen. Derselbe Wechselrichter-DP wird in der Farm nur einmal gezählt. Bei vorhandener Anlagen-PV werden AC-/unbekannte Farmwerte nicht doppelt addiert; DC-/Hybrid-PV wird nur ergänzt, wenn sie noch nicht enthalten ist.'));
|
|
9974
|
+
grid.appendChild(mkDpField('PV-/WR-Leistung – Messwert-Datenpunkt (W)', `sf_${idx}_pvPowerId`, s.pvPowerId, (v) => { const sf2 = _ensureStorageFarmCfg(); sf2.storages[i].pvPowerId = v; }, 'Datenpunkt auswählen · keine feste Wattzahl eingeben'));
|
|
9975
|
+
grid.appendChild(mkGridHelp('Hier den Datenpunkt der gemessenen PV-/WR-Leistung passend zur Kopplung zuordnen, nicht die Nennleistung als Zahl. Derselbe Wechselrichter-DP wird in der Farm nur einmal gezählt. Bei vorhandener Anlagen-PV werden AC-/unbekannte Farmwerte nicht doppelt addiert; DC-/Hybrid-PV wird nur ergänzt, wenn sie noch nicht enthalten ist.'));
|
|
9969
9976
|
|
|
9970
9977
|
// Istwerte (Messwerte)
|
|
9971
9978
|
grid.appendChild(mkGridDivider('Istwerte (Messwerte)'));
|
|
@@ -13334,6 +13341,7 @@ http://mesh-peer.local:8188" ${isEos ? '' : 'disabled'}>${_meshHtmlEscape(Array.
|
|
|
13334
13341
|
async function loadConfig() {
|
|
13335
13342
|
setStatus('Lade Konfiguration…');
|
|
13336
13343
|
const data = await fetchJson('/api/installer/config?t=' + Date.now(), { cache: 'no-store' });
|
|
13344
|
+
configurationRevision = typeof data.configurationRevision === 'string' ? data.configurationRevision : null;
|
|
13337
13345
|
const cfg = (data && data.config && typeof data.config === 'object') ? data.config : {};
|
|
13338
13346
|
|
|
13339
13347
|
// Runtime-Fallback: Die Lizenzseite nutzt /api/license/info und kann eine Lizenz sofort
|
|
@@ -14334,8 +14342,9 @@ http://mesh-peer.local:8188" ${isEos ? '' : 'disabled'}>${_meshHtmlEscape(Array.
|
|
|
14334
14342
|
if (storageCount > _maxStorageCount()) {
|
|
14335
14343
|
throw new Error(`Diese Lizenz erlaubt maximal ${_maxStorageCount()} Speichersysteme; konfiguriert sind ${storageCount}. Bitte die Speicherzuordnung anpassen.`);
|
|
14336
14344
|
}
|
|
14337
|
-
const payload = { patch, restartEms: true, expectedDynamicGridConfigVersion };
|
|
14345
|
+
const payload = { patch, restartEms: true, expectedDynamicGridConfigVersion, expectedConfigurationRevision: configurationRevision };
|
|
14338
14346
|
const data = await fetchJson('/api/installer/config', { method: 'POST', body: JSON.stringify(payload) });
|
|
14347
|
+
configurationRevision = data.configurationRevision;
|
|
14339
14348
|
applyConfigToUI(data.config || {});
|
|
14340
14349
|
clearDirty();
|
|
14341
14350
|
setStatus('Gespeichert. EMS wurde neu gestartet.', 'ok');
|
|
@@ -14390,7 +14399,8 @@ http://mesh-peer.local:8188" ${isEos ? '' : 'disabled'}>${_meshHtmlEscape(Array.
|
|
|
14390
14399
|
});
|
|
14391
14400
|
// Der M0-Verweis der eigenen Netzanschluss-App darf direkt die bestehende Zuordnung öffnen.
|
|
14392
14401
|
const requestedTab = new URLSearchParams(window.location.search || '').get('tab');
|
|
14393
|
-
|
|
14402
|
+
const linkedTabs = new Set(['apps', 'mapping', 'flow', 'evcs', 'storageconfig', 'storagefarm']);
|
|
14403
|
+
_showTab(linkedTabs.has(requestedTab) && btns.some(btn => btn.getAttribute('data-tab') === requestedTab) ? requestedTab : 'apps');
|
|
14394
14404
|
}
|
|
14395
14405
|
|
|
14396
14406
|
// Unter-Reiter im Energiefluss-Tab (Basis/Verbraucher/Erzeuger/Optionen)
|
|
@@ -17046,7 +17056,7 @@ if (els.ocppAutoDetect) {
|
|
|
17046
17056
|
const expectedDynamicGridConfigVersion = requireDynamicGridSaveVersion();
|
|
17047
17057
|
const endMutation = beginAppCenterMutation();
|
|
17048
17058
|
try {
|
|
17049
|
-
const payload = { backup: obj, restartEms: true, mode: 'replace', expectedDynamicGridConfigVersion };
|
|
17059
|
+
const payload = { backup: obj, restartEms: true, mode: 'replace', expectedDynamicGridConfigVersion, expectedConfigurationRevision: configurationRevision };
|
|
17050
17060
|
await fetchJson('/api/installer/backup/import', { method: 'POST', body: JSON.stringify(payload) });
|
|
17051
17061
|
setBackupStatus('Import erfolgreich. Konfiguration wurde übernommen (EMS neu gestartet).', 'ok');
|
|
17052
17062
|
await loadConfig();
|
package/ui/www/settings.html
CHANGED
|
@@ -34,6 +34,8 @@
|
|
|
34
34
|
<meta name="viewport" content="width=device-width,initial-scale=1"/>
|
|
35
35
|
<title>NexoWatt EOS – Einstellungen</title>
|
|
36
36
|
<link rel="stylesheet" href="/static/styles.css"/>
|
|
37
|
+
<link rel="stylesheet" href="/static/customer-tariff.css?v=9.0.18"/>
|
|
38
|
+
<script src="/static/customer-tariff.js?v=9.0.18" defer></script>
|
|
37
39
|
<script src="/static/nw-i18n.js" defer></script>
|
|
38
40
|
<script defer src="/eos-session-idle.js"></script>
|
|
39
41
|
</head>
|
|
@@ -390,6 +392,49 @@
|
|
|
390
392
|
<div class="nw-settings-note">
|
|
391
393
|
Tarif-Optimierung, zeitvariables Netzentgelt und das PV-Saisonprofil sind hier gebündelt, damit die Regelung schneller auffindbar bleibt.
|
|
392
394
|
</div>
|
|
395
|
+
<details class="nw-customer-tariff" id="customerTariffPanel">
|
|
396
|
+
<summary>Stromtarif verbinden <span>Tarifquelle und Zugangsdaten</span></summary>
|
|
397
|
+
<p>Dieser Tarif gilt gemeinsam für diese EOS-Anlage. Wähle deine Preisquelle oder ein Anbieterprofil; die Regelung und Anlagenlimits werden hier nicht freigegeben.</p>
|
|
398
|
+
<form id="customerTariffForm" autocomplete="off">
|
|
399
|
+
<fieldset id="customerTariffFields" disabled>
|
|
400
|
+
<legend>Tarifanbindung</legend>
|
|
401
|
+
<div class="nw-customer-tariff-grid">
|
|
402
|
+
<label for="customerTariffCountry">Land<select id="customerTariffCountry"><option value="DE">Deutschland</option><option value="NL">Niederlande</option></select></label>
|
|
403
|
+
<label for="customerTariffProvider">Tarifquelle<select id="customerTariffProvider" required><option value="">Tarifquelle auswählen</option></select></label>
|
|
404
|
+
<label class="nw-customer-tariff-check" for="customerTariffEnabled"><input id="customerTariffEnabled" type="checkbox">Preise direkt abrufen</label>
|
|
405
|
+
<label id="customerTariffProfileField" for="customerTariffProfile" hidden>Anbieterprofil<select id="customerTariffProfile"></select></label>
|
|
406
|
+
<label id="customerTariffSourceField" for="customerTariffSource" hidden>Marktpreisquelle<select id="customerTariffSource"></select></label>
|
|
407
|
+
<label id="customerTariffHomeField" for="customerTariffHome" hidden>Tibber Home-ID (optional)<input id="customerTariffHome" type="text" maxlength="128" autocomplete="off"></label>
|
|
408
|
+
<label class="nw-customer-tariff-check" for="customerTariffUse"><input id="customerTariffUse" type="checkbox">Diese Preise im EOS verwenden</label>
|
|
409
|
+
</div>
|
|
410
|
+
<p id="customerTariffProviderHint" class="nw-customer-tariff-hint"></p>
|
|
411
|
+
<div id="customerTariffCredentialField" hidden>
|
|
412
|
+
<label for="customerTariffCredential" id="customerTariffCredentialLabel">Zugangsschlüssel</label>
|
|
413
|
+
<input id="customerTariffCredential" type="password" maxlength="4096" autocomplete="new-password" spellcheck="false">
|
|
414
|
+
<small id="customerTariffCredentialHint">Gespeicherte Zugangsschlüssel werden nicht angezeigt. Leer lassen, um sie zu behalten.</small>
|
|
415
|
+
</div>
|
|
416
|
+
<details id="customerTariffFormula" hidden>
|
|
417
|
+
<summary>Vertragliche Preisbestandteile</summary>
|
|
418
|
+
<p>Börsenpreise sind kein vollständiger Vertragspreis. Übernimm die Bestandteile aus deinem Stromvertrag; es erfolgt kein automatischer Vertragsabgleich.</p>
|
|
419
|
+
<div class="nw-customer-tariff-grid">
|
|
420
|
+
<label for="customerTariffMultiplier">Marktpreisfaktor<input id="customerTariffMultiplier" type="number" min="0" max="10" step="0.0001"></label>
|
|
421
|
+
<label for="customerTariffMarkup">Lieferantenaufschlag (€/kWh)<input id="customerTariffMarkup" type="number" min="-10" max="10" step="0.0001"></label>
|
|
422
|
+
<label for="customerTariffGrid">Variables Netzentgelt (€/kWh)<input id="customerTariffGrid" type="number" min="-10" max="10" step="0.0001"></label>
|
|
423
|
+
<label for="customerTariffTax">Steuern / Umlagen (€/kWh)<input id="customerTariffTax" type="number" min="-10" max="10" step="0.0001"></label>
|
|
424
|
+
<label for="customerTariffOther">Weitere variable Kosten (€/kWh)<input id="customerTariffOther" type="number" min="-10" max="10" step="0.0001"></label>
|
|
425
|
+
<label for="customerTariffVat">Mehrwertsteuer (%)<input id="customerTariffVat" type="number" min="0" max="100" step="0.1"></label>
|
|
426
|
+
<label class="nw-customer-tariff-check" for="customerTariffIncludesVat"><input id="customerTariffIncludesVat" type="checkbox">Preise enthalten bereits Mehrwertsteuer</label>
|
|
427
|
+
</div>
|
|
428
|
+
</details>
|
|
429
|
+
</fieldset>
|
|
430
|
+
<div class="nw-customer-tariff-actions">
|
|
431
|
+
<button type="submit" class="btn" id="customerTariffSave" disabled>Tarifanbindung speichern</button>
|
|
432
|
+
<button type="button" class="btn" id="customerTariffReload">Gespeicherten Tarif laden</button>
|
|
433
|
+
</div>
|
|
434
|
+
<p id="customerTariffStatus" role="status" aria-live="polite">Zum Einrichten öffnen.</p>
|
|
435
|
+
<p id="customerTariffFetchStatus" class="nw-customer-tariff-hint"></p>
|
|
436
|
+
</form>
|
|
437
|
+
</details>
|
|
393
438
|
<label class="row"><span>Dynamischer Zeittarif</span>
|
|
394
439
|
<div class="nw-evcs-mode-buttons nw-evcs-mode-buttons-2 nw-toggle" data-toggle-for="s_dyn_toggle"><button type="button" data-value="false">Aus</button><button type="button" data-value="true">An</button></div>
|
|
395
440
|
<input type="checkbox" class="nw-toggle-hidden" id="s_dyn_toggle" data-scope="settings" data-key="dynamicTariff">
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./assets/vite-preload-helper-BbbETgeG.js";import{xc as t}from"./assets/loadShare-eager-dmdYQhAl.js";import{t as n}from"./assets/helpers-C0aN90O2.js";var r={};typeof __VUE_HMR_RUNTIME__>`u`&&(globalThis.__VUE_HMR_RUNTIME__={createRecord(){},rerender(){},reload(){}});var i=`__mf_init__virtual:mf:__mfe_internal__iobroker_admin__mf_owner__142799131032512__mf_v__runtimeInit__mf_v__.js__`,a=globalThis[i];if(!a){let e,t,n=new Promise((n,r)=>{e=n,t=r});a=globalThis[i]={initPromise:n,initResolve:e,initReject:t}}var o=a.initResolve,{initReject:s}=a,c=e=>{throw s(e),e},l=`__mf_module_cache__`;globalThis[l]||={share:{},remote:{}},globalThis[l].share||={},globalThis[l].remote||={};var u=globalThis[l];for(let e of Object.keys(u.share))if(e.startsWith(`default:`)){let t=e.slice(8);u.share[t]===void 0&&(u.share[t]=u.share[e])}else if(!e.includes(`:`)){let t=`default:`+e;u.share[t]===void 0&&(u.share[t]=u.share[e])}var d={},f=Array.isArray(`default`)?`default`:[`default`],p=`default`,m=`iobroker_admin`,h=[[`react`,`leaflet`,`semver`],[`react/jsx-runtime`,`react-dom`,`@emotion/react`,`react-dropzone`,`leaflet-geosearch`],[`react-dom/client`,`@emotion/styled`,`react-ace`],[`@mui/material`],[`@iobroker/gui-components`,`@mui/x-date-pickers`],[`@iobroker/json-config`],[`@iobroker/dm-gui-components`]],g,_;async function v(e){for(let t=0;;t++)try{return await e()}catch(e){throw e}}var y=Symbol(`mf.originalSharedProvider`),b={emit:e=>e},x=e=>Array.isArray(e.scope)?e.scope:[e.scope||`default`],S=(e,t)=>{if(t!==`version-first`)return e;let n={};for(let[t,r]of Object.entries(e))n[t]=Object.assign({},r,{[y]:r});return n},C=(e,t)=>{if(!t)return;let n=Object.entries(e||{}),r=n.find(([,e])=>e===t);if(r)return{version:r[0],provider:t,registered:!0};if(typeof t.version==`string`&&t.version)return{version:t.version,provider:t,registered:!1};let i=n.filter(([,e])=>e===t||!!(t.from&&(e==null?void 0:e.from)===t.from));if(i.length===1)return{version:i[0][0],provider:t,registered:!1}},w=(e,t,r,i)=>{var a;if(!e||!r)return;let o=Object.fromEntries(Object.entries(e).filter(([,e])=>{var t;return(e==null||(t=e.shareConfig)==null?void 0:t.import)!==!1}));if(Object.keys(o).length===0)return;let s=x(r),c=S(o,i),l={};for(let e of s)l[e||`default`]={[t]:c};let u=(a=n.getRegisteredShare(l,t,{...r,scope:s,strategy:i},b))==null?void 0:a.shared;return(u==null?void 0:u[y])||u},T=(e,t,n,r)=>{var i;let a=e=>E(e,n),o=Object.fromEntries(Object.entries(e||{}).filter(([,e])=>{var t;return!a(e)&&(e==null||(t=e.shareConfig)==null?void 0:t.import)!==!1}));n!=null&&n.version&&((i=n.shareConfig)==null?void 0:i.import)!==!1&&(o[n.version]||(o[n.version]=n));let s=w(o,t,n,r);return a(s)?void 0:s},E=(e,t)=>e===t||!!(t!=null&&t.from&&(e==null?void 0:e.from)===t.from),D=(e,t,n,r,i,a,o,s,c)=>{var l,u;if(c!==`version-first`||!s)return;let d=t==null||(l=t.options)==null||(l=l.shared)==null?void 0:l[i],f=Array.isArray(d)?d.find(e=>(e==null?void 0:e.version)===a):void 0,p=((s==null?void 0:s.from)===(t==null||(u=t.options)==null?void 0:u.name)?s:void 0)||(E(f,s)?f:t?void 0:s);if(p)return e.some(e=>{var i,a;return e!==t&&(e==null||(i=e.options)==null?void 0:i.name)===(o==null?void 0:o.from)&&(e==null||(a=e.shareScopeMap)==null?void 0:a[r])===n})?p:void 0},ee=(e,t,n,r,i,a,o,s,c)=>{let l=a.registered?D(e,t,n,r,i,a.version,a.provider,s,c):void 0,u=l||o;if(u&&(!a.registered||E(u,s)))return{provider:u,scopeRootProvider:l}};async function O(){return g||=v(()=>e(()=>import(`./assets/_virtual_mf-localSharedImportMap___mfe_internal__iobroker_admin__mf_owner__1-DMV_e2iP.js`),[],import.meta.url)).catch(e=>{throw g=void 0,e}),g}async function k(){return r}async function A(e={},n=[],r={}){var i,s;let l=(e,t,n,r)=>{let i=(Array.isArray(r)?r[0]:r)||`default`,a=t||!n?e:e+`@`+n,o={canonical:i+`:`+a};return i==="default"&&(o.aliases=[a]),o},g=(e,t)=>{let n=e[t.canonical];if(n!==void 0)return n;let r=t.aliases||[];for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=e[n];if(r!==void 0)return e[t.canonical]=r,r}},y=Symbol.for(`module-federation.shared-cache-listeners`),b=Symbol.for(`module-federation.shared-cache-owners`),x=e=>{let t=e[b];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,b,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},S=(e,t)=>{var n;return(n=e[b])==null?void 0:n[t.canonical]},D=e=>{let t=[e,e==null?void 0:e.default];for(let e of t)if(e&&typeof e==`object`){for(let t of[`__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE`,`__TEST_INTERNALS`,`__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED`]){let n=e[t];if(n&&typeof n==`object`)return{internals:n}}if(typeof e.useState==`function`)return{hook:e.useState}}},k=(e,t)=>{if(e===t)return!0;let n=D(e),r=D(t);if(!n||!r)return!1;let i=n.internals,a=r.internals;return i!==void 0||a!==void 0?i!==void 0&&i===a:typeof n.hook==`function`&&n.hook===r.hook},A=(e,t,n,r)=>{var i;let a=g(e,t);if(a!==void 0&&k(a,n))return n;e[t.canonical]=n;let o=t.aliases||[];for(let t of o)Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0});let s=e[b];r===void 0?s&&delete s[t.canonical]:x(e)[t.canonical]=r;let c=(i=e[y])==null?void 0:i[t.canonical];if(c)for(let e of c)e(n);return n},j=Symbol.for(`module-federation.tree-shaking-shared-cache`),M=e=>{let t=e[j];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,j,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},N=(e,t,n,r)=>{if(!Array.isArray(n))return r;let i=[...new Set(n)].sort(),a=M(e),o=a[t.canonical]||=[],s=o.find(e=>e.providedExports.length===i.length&&e.providedExports.every((e,t)=>e===i[t]));return s?s.value=r:o.push({providedExports:i,value:r}),r},P=Symbol.for(`module-federation.tree-shaking-shared-selection-cache`),F=e=>{let t=e[P];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,P,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},I=(e,t,n)=>{var r;let i=g(e,t);return i===void 0?(r=e[P])==null||(r=r[t.canonical])==null?void 0:r[n]:i},L=(e,t,n,r)=>{let i=F(e),a=i[t.canonical]||=Object.create(null);return a[n]=r,r},R=((i=globalThis.__FEDERATION__)==null?void 0:i.__INSTANCES__)||[],te=(s=n.find(e=>e==null?void 0:e.from))==null?void 0:s.from,ne=R.find(t=>{var n,r;return(t==null||(n=t.options)==null?void 0:n.name)===te&&(t==null||(r=t.shareScopeMap)==null?void 0:r.default)===e})||R.find(t=>{var n,r;return(t==null||(n=t.options)==null?void 0:n.name)!==m&&(t==null||(r=t.shareScopeMap)==null?void 0:r.default)===e}),re=Object.create(null),ie=e=>{let t=Object.create(null);for(let[n,r]of Object.entries(e||{}))t[n]=Object.assign(Object.create(null),r);return t},ae=(e,t)=>{var n;for(let[i,a]of Object.entries(((n=q.shareScopeMap)==null?void 0:n[e])||{}))for(let[e,n]of Object.entries(a||{})){var r;if(!n||n.get===((r=B[i])==null?void 0:r.get))continue;let a=t[i]||={};a[e]===void 0&&(a[e]=n)}},oe=(e,t)=>{ae(e,t);let n=!ne&&Object.values(t||{}).some(e=>Object.values(e||{}).some(V)),r=n?ie(t):t;return re[e]={host:t,runtime:r,isWebpackScope:n},r},se=()=>{let e=Object.values(re).filter(({isWebpackScope:e})=>e);if(e.length!==0)for(let{host:t,runtime:n}of e)for(let[e,r]of Object.entries(t||{})){let t=n[e]||=Object.create(null);for(let[e,n]of Object.entries(r||{}))t[e]=n}},z=Object.create(null);for(let[t,n]of Object.entries(e)){let e=z[t]=Object.create(null);for(let[t,r]of Object.entries(n))e[t]=Object.assign({},r)}let{usedShared:B,usedRemotes:ce}=await O();function V(e){if(typeof(e==null?void 0:e.get)!=`function`)return!1;let t=Function.prototype.toString.call(e.get);return t.includes(`__webpack_require__`)||/\.\s*e\s*\([^)]*\)\s*\.then\s*\(/.test(t)}let le=Object.values(z).some(e=>Object.values(e||{}).some(V)),ue=e=>{let t=e.split(`/`);return e.startsWith(`@`)?t.slice(0,2).join(`/`):t[0]},H=(t,n,r,i)=>{if(typeof T!=`function`)return;let a=ue(t),o=!i||a===t?[[t,n]]:[[t,n],[a,B[a]]];for(let[n,i]of o){if(!i)continue;let a=T(r?n===t?r:z[n]:z[n]??e[n],n,i,`version-first`);if(a)return a}},de=(e,t,n)=>{let r=H(e,t,n,!0);return r&&V(r)&&!r.lib&&!r.loaded?r:void 0};var U=d[p];if(U||=d[p]={from:m},n.indexOf(U)>=0)return;n.push(U);let fe=e=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t},pe=[],me=globalThis.window===void 0?await Promise.all([]):[],W=`__mf_vite_runtime_share_load_id__`,he=0,G=new Map,K=new Map,q=t({name:m,remotes:ce,shared:B,plugins:[ge(),_e(),...pe,...me],shareStrategy:`version-first`});q.initShareScopeMap(`default`,oe(`default`,e));function ge(){return{name:`vite-share-pin-lifecycle-plugin`,resolveShare(e){var t;let n=(t=e.shareInfo)==null?void 0:t[W],r=n===void 0?void 0:K.get(n);if(!r)return e;let i=e.resolver;return e.resolver=(...e)=>(r.pinned.reapply(),i(...e)),r.pinned.reveal(),e}}}function _e(){return{name:`vite-real-name-snapshot-plugin`,afterLoadSnapshot(e){let t=e&&e.remoteSnapshot,n=t&&t.globalName,r=t&&t.version;if(!n||!r||!t.remoteEntry)return e;let i=globalThis.__FEDERATION__&&globalThis.__FEDERATION__.moduleInfo,a=n+`:`+r;return i&&!i[a]&&(i[a]=t),e}}}let ve=q.sharedHandler.hooks.lifecycle.resolveShare;if(!q.__mfKeepAdoptedProviders){var J,ye;q.__mfKeepAdoptedProviders=!0,(J=q.sharedHandler)==null||(J=J.hooks)==null||(J=J.lifecycle)==null||(J=J.afterRegisterShare)==null||(ye=J.on)==null||ye.call(J,e=>{var t,n,r;let{shared:i,previousShared:a,registeredShared:o}=e||{},s=(t=q.shareScopeMap)==null||(t=t[e.scope])==null?void 0:t[e.pkgName];if(i&&s){if(((n=i.shareConfig)==null?void 0:n.import)!==!1){var c;o!==i&&(o==null||(c=o.shareConfig)==null?void 0:c.import)===!1&&!o.loaded&&s[i.version]===o&&(s[i.version]=i)}else o===i&&a&&((r=a.shareConfig)==null?void 0:r.import)!==!1&&s[i.version]===i&&(s[i.version]=a)}})}let Y=new WeakMap;ve.on(e=>{var t;let n=(t=e.shareInfo)==null?void 0:t[W],r=e.resolver;return typeof r==`function`&&(e.resolver=(...t)=>{var i;let a=r(...t);if((a==null||(i=a.shared)==null||(i=i.shareConfig)==null?void 0:i.import)===!1&&typeof w==`function`&&B[e.pkgName]){var o,s;let t=w((o=e.shareScopeMap)==null||(o=o[e.scope])==null?void 0:o[e.pkgName],e.pkgName,B[e.pkgName],`version-first`);t&&((s=t.shareConfig)==null?void 0:s.import)!==!1&&(a={shared:t,useTreesShaking:a.useTreesShaking})}let c=a==null?void 0:a.shared;return c&&(typeof c==`object`||typeof c==`function`)&&!Y.has(c)&&Y.set(c,{from:c.from}),n!==void 0&&c&&G.set(n,c),a}),e});let be=(e,t,n,r)=>{if(!e||e[t]!==n)return;let i=Object.assign({},r,{version:r.version??t,scope:r.scope??(n==null?void 0:n.scope)??[`default`],strategy:`loaded-first`}),a=r.from;e[t]=i;let o=()=>n===void 0?e[t]===void 0:e[t]===n;return{provider:i,reveal(){return e[t]===i&&(n===void 0?delete e[t]:e[t]=n,!0)},reapply(){return o()?(e[t]=i,!0):!1},release(s,c=!0){return r.from=a,e[t]===i?c?s?(i.from=a,s&&i.lib&&(i.loaded=!0),r.strategy===void 0?delete i.strategy:i.strategy=r.strategy,!0):(n===void 0?delete e[t]:e[t]=n,!1):(n===void 0?delete e[t]:e[t]=n,!0):!c&&o()}}},xe=e=>Object.entries(e||{}).map(([e,t])=>({provider:t,version:e,from:t.from,registered:!0})),Se=(e,t)=>{if(t===void 0)return;let n;for(let r of e){let e=r.provider,i=e.treeShaking||e;if(r.loadedFactory===t||e.lib===t||i.lib===t){if(n)return;n=r}}return n},Ce=async(e,t,n)=>{let r=++he;K.set(r,{pinned:n});try{let n=await q.loadShare(e,{customShareInfo:{shareConfig:t,[W]:r}});return{factory:n===!1?void 0:n,selectedProvider:G.get(r)}}finally{G.delete(r),K.delete(r)}},we=async(e,t,n,r,i,a,o=!0)=>{let s=a.from,c=be(n,r,i,a);if(!c)return;let l;try{l=await Ce(e,t,c)}catch(e){throw c.release(!1),e}let u=l==null?void 0:l.factory;if(u===void 0){c.release(!1);return}let d=xe(n),f=c.provider.treeShaking||c.provider,p=c.provider.lib===u||f.lib===u;if(!o&&p){let e=d.findIndex(e=>e.provider===c.provider);e!==-1&&d.splice(e,1)}!o&&!d.some(e=>e.provider===a)&&d.push({provider:a,version:r,from:s,registered:!1,loadedFactory:p?u:void 0});let m=!o&&l.selectedProvider===c.provider&&p?a:l.selectedProvider;if(m&&!d.some(e=>e.provider===m)){let e=Y.get(m),t=typeof m.version==`string`&&m.version?m.version:r;d.push({provider:m,version:t,from:e?e.from:m.from,registered:(n==null?void 0:n[t])===m,loadedFactory:u})}let h=d.find(e=>e.provider===m)??Se(d,u);if(!c.release(!0,(h==null?void 0:h.provider)===c.provider)||!h)return;let g=Y.get(h.provider);h.from=h.provider===a?s:g?g.from:h.provider.from,g&&(h.provider.from=g.from);let _=typeof u==`function`?u():u,v=await Promise.resolve(_);if(!(h.registered&&(n==null?void 0:n[h.version])!==h.provider))return{provider:h.provider,selection:h,resolved:v}},Te=new Set,Ee=new Map,De=async(t,n,r)=>{var i;let a=!!((i=n.shareConfig)!=null&&i.singleton);if(!a&&n.canLiveRebind!==!1)try{var o,s;let i=T(r,t,n,`version-first`),c=C(r,i);if(!c||((o=n.shareConfig)==null?void 0:o.import)===!1&&E(i,n)||(i==null||(s=i.shareConfig)==null?void 0:s.import)===!1)return;let{version:d}=c;if(!a&&d!==n.version||!i.lib&&!i.loading&&!(i.loaded&&typeof i.get==`function`))return;let f=l(t,a,n.version,n.scope);if(g(u.share,f)!==void 0)return;let p=e[t],m=p==null?void 0:p[d];if(c.registered&&!E(m,i))return;let h,_=i.lib;if(!_&&V(i)||(!_&&i.loading&&(_=await i.loading),!_&&i.loaded&&typeof i.get==`function`&&(_=await i.get()),!_))return;let v=typeof _==`function`?_():_,y=await Promise.resolve(v),b=c.registered?m:i;h={provider:b,selection:{provider:b,version:d,from:i.from,registered:c.registered},resolved:y};let x=h==null?void 0:h.provider,S=h==null?void 0:h.selection;if(!S)return;let w=h==null?void 0:h.resolved;if(w===void 0||g(u.share,f)!==void 0||S.registered&&(p==null?void 0:p[S.version])!==x)return;A(u.share,f,fe(w),S.from),Te.add(x)}catch(e){console.error(`[Module Federation] Failed to bridge materialized shared module "`+t+`"`,e)}},Oe=async(t,n,r,i,a)=>{try{var o,s,c,d;let f=l(t,(o=n.shareConfig)==null?void 0:o.singleton,n.version,n.scope),p=g(u.share,f),h=S(u.share,f),_=T(r,t,n,`version-first`),v=_||w(r,t,n,`version-first`)||n,y=C(r,v);if(!y)return;let b=E(v,n),{version:x}=y;if(!((s=n.shareConfig)!=null&&s.singleton)&&x!==n.version)return;let D=i==null?void 0:i[x],O=ee(R,ne,e,`default`,t,y,_,D,`version-first`);if(!O&&!b)return;let{provider:k,scopeRootProvider:j}=O||{provider:v,scopeRootProvider:void 0};if(n.canLiveRebind===!1||((c=n.shareConfig)==null?void 0:c.import)===!1&&E(k,n)||(k==null||(d=k.shareConfig)==null?void 0:d.import)===!1||p!==void 0&&h!==m)return;let M=e[t],N=M==null?void 0:M[x];if(y.registered&&!j&&!E(N,k))return;let P=await we(t,n.shareConfig,M,x,N,k,y.registered&&!b),F=P==null?void 0:P.provider,I=P==null?void 0:P.selection;if(!I||E(F,n)||a&&(a.version!==I.version||!E({from:I.from},a.provider))||Te.has(F))return;let L=P==null?void 0:P.resolved;if(L===void 0)return;let te=g(u.share,f),re=S(u.share,f);if(te!==void 0&&re!==m||I.registered&&(M==null?void 0:M[I.version])!==F)return;a||Ee.set(t,{version:I.version,provider:{from:I.from}}),Te.add(F);let ie=fe(L);A(u.share,f,ie,I.from)}catch(e){console.error(`[Module Federation] Failed to bridge external shared module "`+t+`"`,e)}};for(let e of h)await Promise.all(e.map(async e=>{let t=B[e];t&&t.materialize!==!1&&!t.treeShaking&&await De(e,t,z[e])}));for(let[e,t]of Object.entries(B)){var ke;if(t.treeShaking)continue;let n=l(e,(ke=t.shareConfig)==null?void 0:ke.singleton,t.version,t.scope);if(g(u.share,n)!==void 0)continue;let r=l(e,!0,t.version,t.scope),i=g(u.share,r);i!==void 0&&A(u.share,n,i,S(u.share,r))}let Ae=[`react`,`leaflet`,`semver`,`react/jsx-runtime`,`react-dom`,`@emotion/react`,`react-dropzone`,`leaflet-geosearch`,`react-dom/client`,`@emotion/styled`,`react-ace`,`@mui/material`,`@iobroker/gui-components`,`@mui/x-date-pickers`,`@iobroker/json-config`,`@iobroker/dm-gui-components`],je=[[`react`,`leaflet`,`semver`],[`react/jsx-runtime`,`react-dom`,`@emotion/react`,`react-dropzone`,`leaflet-geosearch`],[`react-dom/client`,`@emotion/styled`,`react-ace`],[`@mui/material`],[`@iobroker/gui-components`,`@mui/x-date-pickers`],[`@iobroker/json-config`],[`@iobroker/dm-gui-components`]],X=new Map(Ae.map((e,t)=>[e,t])),Me={3:[0],4:[0],5:[0],6:[0],7:[1],8:[0,4],9:[5,0],10:[0,4],11:[5,9,0,4],12:[6,0,4,11],13:[5,9,11,0,4],14:[5,9,12,11,13,0,4,6],15:[12,14,11]},Z=Ae.filter(e=>{var t;return B[e]&&(B[e].materialize!==!1||((t=B[e].shareConfig)==null?void 0:t.import)===!1&&!B[e].lazy)});u.providerInit||=new Map;let Ne=(e,t)=>{let n=u.providerInit.get(e);if(n)return n;let r=Promise.resolve().then(t);return u.providerInit.set(e,r),r.catch(()=>u.providerInit.delete(e)),r};var Pe=async e=>{let t=new Set(e);for(let e of je)await Promise.all(e.filter(e=>t.has(e)).map(async e=>{var t,n,r;let i=B[e],a=l(e,(t=i.shareConfig)==null?void 0:t.singleton,i.version,i.scope);if(((n=i.shareConfig)==null?void 0:n.import)===!1||i.treeShaking||g(u.share,a)!==void 0)return;let o=l(e,!0,i.version,i.scope),s=g(u.share,o);if(s!==void 0){A(u.share,a,s,S(u.share,o));return}let c=typeof H==`function`?H(e,i):void 0;if(c){var d,f;let t=c.lib;if(!t&&c.loading&&(t=await c.loading),!t&&c.loaded&&typeof c.get==`function`&&(t=await c.get()),t){let e=typeof t==`function`?t():t,n=await Promise.resolve(e);A(u.share,a,(e=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t})(n),c.from);return}if(typeof V==`function`&&V(c)&&((d=i.shareConfig)!=null&&d.singleton||((f=C(z[e],c))==null?void 0:f.version)===i.version))return}let p=a.canonical,h=await Ne(p,async()=>{let e=await i.get(),t=typeof e==`function`?e():e;return Promise.resolve(t)});for(let t of((r=q.options.shared)==null?void 0:r[e])||[])t.get===i.get&&(t.eager=!0);let _=(e=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t})(h),v=_===h?{...h}:_;v.__esModule!==!0&&Object.defineProperty(v,"__esModule",{value:!0,enumerable:!1}),A(u.share,a,v,m)}))};let Q=e=>{var t,n;let r=B[e];if(!r.treeShaking&&((t=r.shareConfig)==null?void 0:t.import)!==!1)return!1;let i=l(e,(n=r.shareConfig)==null?void 0:n.singleton,r.version,r.scope);return r.treeShaking?I(u.share,i,m)===void 0&&g(u.share,i)===void 0:g(u.share,i)===void 0},Fe=e=>{var t,n;let r=B[e],i=l(e,(t=r.shareConfig)==null?void 0:t.singleton,r.version,r.scope);return(r.treeShaking?I(u.share,i,m)??g(u.share,i):g(u.share,i))===void 0?r.treeShaking||((n=r.shareConfig)==null?void 0:n.import)===!1?!0:typeof T==`function`&&!!T(z[e],e,r,`version-first`):!1},Ie=e=>{let t=!0;for(;t;){t=!1;for(let n of Z){let r=X.get(n);e.has(r)||(Me[r]||[]).some(t=>e.has(t))&&(e.add(r),t=!0)}}return e},Le=Ie(new Set(Z.filter(Fe).map(e=>X.get(e)))),Re=Z.filter(e=>!Le.has(X.get(e)));var ze=Z.filter(e=>Le.has(X.get(e)));await Pe(Re).catch(c);try{await v(async()=>{await Promise.all(await q.initializeSharing(`default`,{strategy:`version-first`,from:`build`,initScope:n}))})}catch(e){console.error(`[Module Federation]`,e)}se();let Be=async()=>{for(let t of h)await Promise.all(t.map(async t=>{let n=B[t];n&&n.materialize!==!1&&!n.treeShaking&&await Oe(t,n,e[t],z[t],void 0)}))};le?_=Be:await Be();try{var Ve;let e=(Ve=globalThis.__FEDERATION__)==null?void 0:Ve.__SHARE__,t=Object.create(null);if(e)for(let[,n]of Object.entries(e))for(let e of f){let r=n==null?void 0:n[e];if(r)for(let[e,n]of Object.entries(r)){let r=B==null?void 0:B[e],i=z[e],a=Ee.get(e);if(!r||!i||!a||r.treeShaking)continue;let o=t[e]||(t[e]=Object.create(null));for(let[e,t]of Object.entries(n)){if(!t.lib||a.version!==e||!E(t,a.provider))continue;let n=i[e];(t===n||n!=null&&n.from&&t.from===n.from)&&(t===r||r.from&&t.from===r.from||o[e]===void 0&&(o[e]=t))}}}for(let e of h)await Promise.all(e.map(async e=>{let n=t[e];n&&await Oe(e,B[e],n,z[e],Ee.get(e))}))}catch(e){console.error(`[Module Federation] Failed to bridge external shared modules`,e)}let He=async()=>{},Ue=async(t,n)=>{var r,i;let a=l(t,(r=n.shareConfig)==null?void 0:r.singleton,n.version,n.scope),o=n.treeShaking?I(u.share,a,m):g(u.share,a);if(((i=n.shareConfig)==null?void 0:i.import)!==!1||o!==void 0||de(t,n,z[t]))return;let s=e=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t},c=e==null?void 0:e[t],d=w(c,t,n,`version-first`)||n,f=C(c,d);if(!f)return;let p=e=>{var t;return e===n||(e==null||(t=e.shareConfig)==null?void 0:t.import)===!1};if(p(d))return;let{version:h}=f,_=c==null?void 0:c[h],v=await we(t,n.shareConfig,c,h,_,d,f.registered),y=v==null?void 0:v.selection,b=v==null?void 0:v.provider,x=v==null?void 0:v.resolved;if(!y||p(b)||x===void 0||(n.treeShaking?I(u.share,a,m):g(u.share,a))!==void 0||y.registered&&(c==null?void 0:c[y.version])!==b)return;let S=s(x);if(n.treeShaking){let e=n.treeShaking.providedExports??n.treeShaking.usedExports??[];N(u.share,a,e,S),L(u.share,a,m,S)}else A(u.share,a,S,y.from)},We=[],Ge=new Set;for(let e of ze){let t=B[e],n=X.get(e);if(Q(e))try{var Ke;t.treeShaking?await He(e,t):((Ke=t.shareConfig)==null?void 0:Ke.import)===!1&&await Ue(e,t)}catch(t){console.error(`[Module Federation] Failed to resolve runtime-only shared module "${e}"`,t)}Q(e)&&Ge.add(n)}Ie(Ge),We.push(...ze.filter(e=>!Ge.has(X.get(e)))),await Pe(We).catch(c);let $=new Map;return a.loadLazyShares=async t=>{let n=new Set(t);for(let t of h)await Promise.all(t.filter(e=>n.has(e)).map(t=>{let n=B[t];if(!n||!n.lazy||!Q(t))return;let r=$.get(t);return r||(r=Oe(t,n,e[t],z[t],void 0).then(()=>Q(t)?Ue(t,n):void 0),r.catch(()=>$.delete(t)),$.set(t,r)),r}))},o(q),q}async function j(e){let t=await k();if(!(e in t))throw Error(`[Module Federation] Module ${e} does not exist in container.`);return _&&await _(),u.pendingShareLoads&&await Promise.all(u.pendingShareLoads),t[e]().then(e=>()=>e)}export{j as get,A as init};
|
|
2
|
-
if (typeof document !== 'undefined' && document.head) {
|
|
3
|
-
try {
|
|
4
|
-
for (const __mfWarmupPath of ["assets/_virtual_mf-localSharedImportMap___mfe_internal__iobroker_admin__mf_owner__1-DMV_e2iP.js","assets/rolldown-runtime-sJBDdmOt.js","assets/loadShare-eager-dmdYQhAl.js","assets/vite-preload-helper-BbbETgeG.js"]) {
|
|
5
|
-
const __mfWarmupLink = document.createElement('link');
|
|
6
|
-
__mfWarmupLink.rel = 'modulepreload';
|
|
7
|
-
__mfWarmupLink.crossOrigin = '';
|
|
8
|
-
__mfWarmupLink.href = new URL(__mfWarmupPath, import.meta.url).href;
|
|
9
|
-
document.head.appendChild(__mfWarmupLink);
|
|
10
|
-
}
|
|
11
|
-
} catch (__mfWarmupError) {}
|
|
12
|
-
}
|