iobroker.admin 6.1.2 → 6.1.4

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.
@@ -1 +0,0 @@
1
- {"version":3,"sources":["assets/sentry.svg","Utils.jsx","dialogs/CommandDialog.jsx","helpers/cardSort.jsx","components/DragWrapper.jsx","components/DrawerItem.jsx","components/CustomDragLayer.jsx","components/ContextWrapper.jsx","components/CustomPopper.jsx","components/Drawer.jsx","components/Connecting.jsx","components/Wizard/WizardPasswordTab.jsx","components/LicenseTexts.jsx","components/Wizard/WizardLicenseTab.jsx","assets/pin.svg","components/Wizard/WizardSettingsTab.jsx","components/Wizard/WizardAuthSSLTab.jsx","components/Wizard/WizardPortForwarding.jsx","assets/longLogo.svg","dialogs/WizardDialog.jsx","dialogs/SystemSettingsTabs/MainSettingsDialog.jsx","dialogs/SystemSettingsTabs/RepositoriesDialog.jsx","dialogs/SystemSettingsTabs/LicensesDialog.jsx","dialogs/SystemSettingsTabs/CertificatesDialog.jsx","dialogs/SystemSettingsTabs/SSLDialog.jsx","dialogs/SystemSettingsTabs/ACLDialog.jsx","dialogs/SystemSettingsTabs/StatisticsDialog.jsx","webpack://src-rx/./src/assets/css/style.css?dfc8","dialogs/SystemSettingsDialog.jsx","login/Login.jsx","dialogs/ExpertModeDialog.jsx","dialogs/NewsAdminDialog.jsx","dialogs/HostWarningDialog.jsx","Workers/LogsWorker.jsx","Workers/InstancesWorker.jsx","Workers/HostsWorker.jsx","Workers/AdaptersWorker.jsx","Workers/ObjectsWorker.jsx","dialogs/GenereteInputsModal.jsx","helpers/hooks/useStateLocal.jsx","dialogs/DiscoveryDialog.jsx","App.jsx","webpack://src-rx/./src/index.css?449b","bootstrap.jsx","components/Command.jsx","components/CustomModal.jsx","components/CustomSelectButton.jsx","components/HostSelectors.jsx","components/IsVisible.jsx","components/JsonConfigComponent/ConfigGeneric.jsx","components/JsonConfigComponent/ConfigAlive.jsx","components/JsonConfigComponent/ConfigAutocomplete.jsx","components/JsonConfigComponent/ConfigAutocompleteSendTo.jsx","components/JsonConfigComponent/ConfigCRON.jsx","components/JsonConfigComponent/ConfigCertificateSelect.jsx","components/JsonConfigComponent/ConfigCheckbox.jsx","components/JsonConfigComponent/ChipInput.jsx","components/JsonConfigComponent/ConfigChip.jsx","components/JsonConfigComponent/ConfigColor.jsx","components/JsonConfigComponent/ConfigCoordinates.jsx","components/JsonConfigComponent/ConfigCustom.jsx","components/JsonConfigComponent/ConfigDatePicker.jsx","components/JsonConfigComponent/ConfigFileSelector.jsx","components/JsonConfigComponent/ConfigFile.jsx","components/JsonConfigComponent/ConfigFunc.jsx","components/JsonConfigComponent/ConfigIP.jsx","components/JsonConfigComponent/ConfigImageUpload.jsx","components/JsonConfigComponent/ConfigInstanceSelect.jsx","components/JsonConfigComponent/ConfigJsonEditor.jsx","components/JsonConfigComponent/ConfigLanguage.jsx","components/JsonConfigComponent/ConfigNumber.jsx","components/JsonConfigComponent/ConfigObjectId.jsx","components/JsonConfigComponent/ConfigPassword.jsx","components/JsonConfigComponent/ConfigPattern.jsx","components/JsonConfigComponent/ConfigRoom.jsx","components/JsonConfigComponent/ConfigSelect.jsx","components/JsonConfigComponent/ConfigSelectSendTo.jsx","components/JsonConfigComponent/ConfigSendto.jsx","components/JsonConfigComponent/ConfigSetState.jsx","components/JsonConfigComponent/ConfigSlider.jsx","components/JsonConfigComponent/ConfigStaticDivider.jsx","components/JsonConfigComponent/ConfigStaticHeader.jsx","components/JsonConfigComponent/ConfigStaticImage.jsx","components/JsonConfigComponent/ConfigStaticText.jsx","components/JsonConfigComponent/ConfigTable.jsx","components/JsonConfigComponent/ConfigText.jsx","components/JsonConfigComponent/ConfigTextSendTo.jsx","components/JsonConfigComponent/ConfigTimePicker.jsx","components/JsonConfigComponent/ConfigTopic.jsx","components/JsonConfigComponent/ConfigUser.jsx","components/JsonConfigComponent/ConfigPanel.jsx","components/State.jsx","components/TabContainer.jsx","components/TabContent.jsx","components/TabHeader.jsx","components/ToggleThemeMenu.jsx","components/Utils.jsx","dialogs/AdapterUpdateDialog.jsx","dialogs/LicenseDialog.jsx","dialogs/SlowConnectionWarningDialog.jsx","helpers/MaterialDynamicIcon.jsx","helpers/MobileDialog.jsx","dialogs/AdapterDeletionDialog.jsx","assets/globe.svg","assets/link.svg","components/MDUtils.jsx","components/Markdown.jsx","dialogs/AdapterInfoDialog.jsx","dialogs/AddInstanceDialog.jsx","components/Adapters/AdapterRow.jsx","components/Adapters/AdapterTile.jsx","dialogs/GitHubInstallDialog.jsx","components/Adapters/AdaptersUpdater.jsx","dialogs/AdaptersUpdaterDialog.jsx","dialogs/RatingDialog.jsx","tabs/Adapters.jsx","tabs/CustomTab.jsx"],"names":[],"mappings":"kIAAI,GAEA,EAAY,KAEhB,aAAoB,CAAE,UAAW,OAAO,OAAS,OAAO,OAAO,KAAK,EAAI,SAAU,EAAQ,CAAE,OAAS,GAAI,EAAG,EAAI,UAAU,OAAQ,IAAK,CAAE,GAAI,GAAS,UAAU,GAAI,OAAS,KAAO,GAAc,OAAO,UAAU,eAAe,KAAK,EAAQ,CAAG,GAAK,GAAO,GAAO,EAAO,GAAU,CAAE,MAAO,EAAQ,EAAU,GAAS,MAAM,KAAM,SAAS,CAAG,CAElV,WAAkC,EAAQ,EAAU,CAAE,GAAI,GAAU,KAAM,MAAO,CAAC,EAAG,GAAI,GAAS,GAA8B,EAAQ,CAAQ,EAAO,EAAK,EAAG,GAAI,OAAO,sBAAuB,CAAE,GAAI,GAAmB,OAAO,sBAAsB,CAAM,EAAG,IAAK,EAAI,EAAG,EAAI,EAAiB,OAAQ,IAAkC,EAArB,EAAiB,GAAQ,IAAS,QAAQ,CAAG,GAAK,IAAiB,EAAC,OAAO,UAAU,qBAAqB,KAAK,EAAQ,CAAG,GAAa,GAAO,GAAO,EAAO,IAAQ,CAAE,MAAO,EAAQ,CAE3e,YAAuC,EAAQ,EAAU,CAAE,GAAI,GAAU,KAAM,MAAO,CAAC,EAAG,GAAI,GA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GAClB,KAAK,MAAM,oBAAoB,KAAK,SAAS,EAErD,CAEA,QAAS,CACL,MAAK,MAAK,MAAM,KAIT,kBAAC,UACJ,IAAK,GAAM,KAAK,UAAY,EAC5B,MAAQ,KAAK,MAAM,IACnB,UAAY,KAAK,MAAM,QAAQ,KAC/B,IAAM,KAAK,MAAM,KACjB,QAAU,GAAK,CACX,EAAE,OAAO,QAAU,KACnB,KAAK,SAAS,CAAC,KAAM,KAAK,MAAM,KAAK,QAAQ,aAAc,UAAU,CAAE,CAAC,CAC5E,EACJ,EAZW,kBAAC,KAAc,IAAC,CAa/B,CACJ,CAEA,EAAU,UAAY,CAClB,EAAG,SACH,KAAM,WACN,UAAW,WACX,IAAK,sBACL,gBAAiB,sBAEjB,SAAU,WACV,SAAU,WACV,KAAM,WACN,cAAe,WACf,MAAO,UAEP,WAAY,SACZ,oBAAqB,SACrB,sBAAuB,QAC3B,EAEA,WAAe,eAAU,EAAE,kBAAW,CAAM,EAAE,CAAS,CAAC,C","file":"static/js/5710.ca490b55.chunk.js","sourcesContent":["var _path;\n\nvar _excluded = [\"title\", \"titleId\"];\n\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgSentry(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n viewBox: \"0 0 256 230\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M251.22 187.856c5.785 10.045 6.345 20.608 1.538 28.958-4.8 8.357-14.192 13.143-25.768 13.143h-21.816c.259-4.068.431-8.17.431-12.302 0-4.628-.215-9.198-.531-13.754l14.35-.014c3.528 0 6.38-2.867 6.38-6.403a6.46 6.46 0 0 0-.768-3.053l-91.46-158.97a6.349 6.349 0 0 0-5.54-3.24 6.374 6.374 0 0 0-5.461 3.09l-14.522 25.243c44.134 33.27 73.804 84.813 77.864 143.333.316 4.548.531 9.119.531 13.753 0 4.132-.172 8.228-.424 12.302h-71.246c.388-4.053.611-8.148.611-12.302 0-4.649-.273-9.233-.776-13.753-3.52-32.206-19.286-60.748-42.503-80.89l-10.003 17.376c17.54 16.325 29.512 38.558 32.767 63.514.59 4.505.92 9.09.92 13.753 0 4.154-.273 8.264-.74 12.302H29.01c-11.576 0-20.968-4.793-25.768-13.15-4.807-8.35-4.247-18.905 1.538-28.958l13.56-23.238a79.42 79.42 0 0 1 20.715 16.052l-8.083 13.768a6.523 6.523 0 0 0-.77 3.054 6.383 6.383 0 0 0 6.382 6.395l32.033.015c-2.687-15.356-9.772-29.21-19.918-40.183-5.979-6.445-12.963-11.9-20.738-16.074l35.77-62.15a151.427 151.427 0 0 1 21.564 14.624c30.827 25.013 51.644 61.955 55.416 103.776h19.172c-3.91-48.892-28.477-92.006-64.937-120.548a171.205 171.205 0 0 0-21.672-14.457l30.532-53.045C109.583 5.77 118.42 0 128.036 0c9.607 0 18.438 5.77 24.223 15.823l98.961 172.033z\",\n fill: \"#FB2D26\"\n })));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgSentry);\nexport default __webpack_public_path__ + \"static/media/sentry.e732e10c5c1ceed0955b2fec6dab33f8.svg\";\nexport { ForwardRef as ReactComponent };","const ANSI_RESET = 0;\nconst ANSI_RESET_COLOR = 39;\nconst ANSI_RESET_BG_COLOR = 49;\nconst ANSI_BOLD = 1;\nconst ANSI_RESET_BOLD = 22;\n\nconst STYLES = {\n 30: {color: 'black'}, // ANSI_BLACK\n 31: {color: 'red'}, // ANSI_RED\n 32: {color: 'green'}, // ANSI_GREEN\n 33: {color: 'yellow'}, // ANSI_YELLOW\n 34: {color: 'blue'}, // ANSI_BLUE\n 35: {color: 'purple'}, // ANSI_PURPLE\n 36: {color: 'cyan'}, // ANSI_CYAN\n 37: {color: 'white'}, // ANSI_WHITE\n\n 90: {color: 'grey'}, // ANSI_BRIGHT_BLACK\n 91: {color: 'lightred'}, // ANSI_BRIGHT_RED\n 92: {color: 'lightgreen'}, // ANSI_BRIGHT_GREEN\n 93: {color: 'lightyellow'}, // ANSI_BRIGHT_YELLOW\n 94: {color: 'lightblue'}, // ANSI_BRIGHT_BLUE\n 95: {color: 'lightpurple'}, // ANSI_BRIGHT_PURPLE\n 96: {color: 'lightcyan'}, // ANSI_BRIGHT_CYAN\n 97: {color: 'white'}, // ANSI_BRIGHT_WHITE\n\n 40: {backgroundColor: 'black'}, // ANSI_BG_BLACK\n 41: {backgroundColor: 'red'}, // ANSI_BG_RED\n 42: {backgroundColor: 'green'}, // ANSI_BG_GREEN\n 43: {backgroundColor: 'yellow'}, // ANSI_BG_YELLOW\n 44: {backgroundColor: 'blue'}, // ANSI_BG_BLUE\n 45: {backgroundColor: 'purple'}, // ANSI_BG_PURPLE\n 46: {backgroundColor: 'cyan'}, // ANSI_BG_CYAN\n 47: {backgroundColor: 'white'}, // ANSI_BG_WHITE\n\n 100: {backgroundColor: 'grey'}, // ANSI_BRIGHT_BG_BLACK\n 101: {backgroundColor: 'lightred'}, // ANSI_BRIGHT_BG_RED\n 102: {backgroundColor: 'lightgreen'}, // ANSI_BRIGHT_BG_GREEN\n 103: {backgroundColor: 'lightyellow'}, // ANSI_BRIGHT_BG_YELLOW\n 104: {backgroundColor: 'lightblue'}, // ANSI_BRIGHT_BG_BLUE\n 105: {backgroundColor: 'lightpurple'}, // ANSI_BRIGHT_BG_PURPLE\n 106: {backgroundColor: 'lightcyan'}, // ANSI_BRIGHT_BG_CYAN\n 107: {backgroundColor: 'white'}, // ANSI_BRIGHT_BG_WHITE\n}\n\nclass Utils {\n\n /**\n * Format bytes to MB or GB\n * @param {!number} bytes\n * @returns {String}\n */\n static formatRam(bytes) {\n\n const GB = Math.floor(bytes / (1024 * 1024 * 1024) * 10) / 10;\n bytes %= (1024 * 1024 * 1024);\n const MB = Math.floor(bytes / (1024 * 1024) * 10) / 10;\n let text = '';\n\n if (GB > 1) {\n text += GB + ' GB';\n } else {\n text += MB + ' MB';\n }\n\n return text;\n }\n\n static formatSpeed(mhz) {\n return mhz + ' MHz';\n }\n\n static formatBytes(bytes) {\n if (Math.abs(bytes) < 1024) {\n return bytes + ' B';\n }\n\n const units = ['KB','MB','GB'];\n //const units = ['KiB','MiB','GiB','TiB','PiB','EiB','ZiB','YiB'];\n let u = -1;\n\n do {\n bytes /= 1024;\n ++u;\n } while (Math.abs(bytes) >= 1024 && u < units.length - 1);\n\n return bytes.toFixed(1) + ' ' + units[u];\n }\n\n static getFileExtension(fileName) {\n const pos = fileName.lastIndexOf('.');\n if (pos !== -1) {\n return fileName.substring(pos + 1).toLowerCase();\n } else {\n return null;\n }\n }\n\n // Big thanks to: https://stackoverflow.com/questions/35969656/how-can-i-generate-the-opposite-color-according-to-current-color\n static invertColor(hex, bw) {\n if (hex === undefined || hex === null || hex === '' || typeof hex !== 'string') {\n return '';\n }\n if (hex.indexOf('#') === 0) {\n hex = hex.slice(1);\n }\n // convert 3-digit hex to 6-digits.\n if (hex.length === 3) {\n hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\n }\n if (hex.length !== 6) {\n throw new Error('Invalid HEX color.');\n }\n let r = parseInt(hex.slice(0, 2), 16);\n let g = parseInt(hex.slice(2, 4), 16);\n let b = parseInt(hex.slice(4, 6), 16);\n\n if (bw) {\n // http://stackoverflow.com/a/3943023/112731\n return (r * 0.299 + g * 0.587 + b * 0.114) > 186\n ? '#000000'\n : '#FFFFFF';\n }\n // invert color components\n r = (255 - r).toString(16);\n g = (255 - g).toString(16);\n b = (255 - b).toString(16);\n // pad each with zeros and return\n return '#' + r.padStart(2, '0') + g.padStart(2, '0') + b.padStart(2, '0');\n }\n\n /**\n * Format number in seconds to time text\n * @param {number} seconds\n * @param {function} t i18n.t function\n * @returns {String}\n */\n static formatSeconds(seconds, t) {\n const days = Math.floor(seconds / (3600 * 24));\n seconds %= 3600 * 24;\n let hours = Math.floor(seconds / 3600);\n if (hours < 10) {\n hours = '0' + hours;\n }\n seconds %= 3600;\n let minutes = Math.floor(seconds / 60);\n if (minutes < 10) {\n minutes = '0' + minutes;\n }\n seconds %= 60;\n seconds = Math.floor(seconds);\n if (seconds < 10) {\n seconds = '0' + seconds;\n }\n let text = '';\n if (days) {\n text += days + ' ' + t('daysShortText') + ' ';\n }\n text += hours + ':' + minutes + ':' + seconds;\n\n return text;\n }\n\n // internal use\n static _replaceLink(link, objects, adapterInstance, attr, placeholder, hosts, hostname, adminInstance) {\n if (attr === 'protocol') {\n attr = 'secure';\n }\n\n try {\n const object = objects['system.adapter.' + adapterInstance];\n\n if (link && object) {\n if (attr === 'secure') {\n link = link.replace(`%${placeholder}%`, object.native[attr] ? 'https' : 'http');\n } else {\n let value = object.native[attr];\n // workaround for port\n if ((attr === 'webinterfacePort' || attr === 'port') && (!value || value === '0')) {\n if (object.native.secure === true) {\n value = 443;\n } else {\n value = 80;\n }\n }\n\n if (attr === 'bind' || attr === 'ip') {\n let ip = object.native.bind || object.native.ip;\n if (ip === '0.0.0.0') {\n ip = Utils.getHostname(object, objects, hosts, hostname, adminInstance);\n }\n if (!link.includes(`%${placeholder}%`)) {\n link = link.replace(`%native_${placeholder}%`, ip || '');\n } else {\n link = link.replace(`%${placeholder}%`, ip || '');\n }\n } else if (!link.includes(`%${placeholder}%`)) {\n link = link.replace(`%native_${placeholder}%`, value);\n } else {\n link = link.replace(`%${placeholder}%`, value);\n }\n }\n } else {\n console.log('Cannot get link ' + attr);\n link = link.replace(`%${placeholder}%`, '');\n }\n } catch (error) {\n console.log(error);\n }\n return link;\n }\n\n static ip2int(ip) {\n return ip.split('.').reduce((ipInt, octet) => (ipInt << 8) + parseInt(octet, 10), 0) >>> 0;\n }\n\n static findNetworkAddressOfHost(obj, localIp) {\n const networkInterfaces = obj?.native?.hardware?.networkInterfaces;\n if (!networkInterfaces) {\n return null;\n }\n\n let hostIp;\n Object.keys(networkInterfaces).forEach(inter => {\n networkInterfaces[inter].forEach(ip => {\n if (ip.internal) {\n return;\n } else if (localIp.includes(':') && ip.family !== 'IPv6') {\n return;\n } else if (localIp.includes('.') && !localIp.match(/[^.\\d]/) && ip.family !== 'IPv4') {\n return;\n }\n if (localIp === '127.0.0.0' || localIp === 'localhost' || localIp.match(/[^.\\d]/)) { // if DNS name\n hostIp = ip.address;\n } else {\n if (ip.family === 'IPv4' && localIp.includes('.') &&\n (Utils.ip2int(localIp) & Utils.ip2int(ip.netmask)) === (Utils.ip2int(ip.address) & Utils.ip2int(ip.netmask))) {\n hostIp = ip.address;\n } else {\n hostIp = ip.address;\n }\n }\n });\n });\n\n if (!hostIp) {\n Object.keys(networkInterfaces).forEach(inter => {\n networkInterfaces[inter].forEach(ip => {\n if (ip.internal) {\n return;\n } else if (localIp.includes(':') && ip.family !== 'IPv6') {\n return;\n } else if (localIp.includes('.') && !localIp.match(/[^.\\d]/) && ip.family !== 'IPv4') {\n return;\n }\n if (localIp === '127.0.0.0' || localIp === 'localhost' || localIp.match(/[^.\\d]/)) { // if DNS name\n hostIp = ip.address;\n } else {\n hostIp = ip.address;\n }\n });\n });\n }\n\n if (!hostIp) {\n Object.keys(networkInterfaces).forEach(inter => {\n networkInterfaces[inter].forEach(ip => {\n if (ip.internal) {\n return;\n }\n hostIp = ip.address;\n });\n });\n }\n\n return hostIp;\n }\n\n static getHostname(instanceObj, objects, hosts, currentHostname, adminInstance) {\n if (!instanceObj || !instanceObj.common) {\n return null;\n }\n\n let hostname;\n // check if the adapter from the same host as admin\n const adminHost = objects['system.adapter.' + adminInstance]?.common?.host;\n if (instanceObj.common.host !== adminHost) {\n // find IP address\n const host = hosts.find(obj => obj._id === 'system.host.' + instanceObj.common.host);\n if (host) {\n const ip = Utils.findNetworkAddressOfHost(host, currentHostname);\n if (ip) {\n hostname = ip;\n } else {\n console.warn(`Cannot find suitable IP in host ${instanceObj.common.host} for ${instanceObj._id}`);\n return null;\n }\n } else {\n console.warn(`Cannot find host ${instanceObj.common.host} for ${instanceObj._id}`);\n return null\n }\n } else {\n hostname = currentHostname;\n }\n return hostname;\n }\n\n /**\n * Format number in seconds to time text\n * @param {string} link pattern for link\n * @param {string} adapter admin name\n * @param {string} instance admin instance\n * @param {object} context {objects, hostname(of browser), protocol(of browser)}\n * @returns {array<any>}\n */\n static replaceLink(link, adapter, instance, context) {\n const _urls = [];\n let port;\n\n if (link) {\n const instanceObj = context.objects[`system.adapter.${adapter}.${instance}`];\n const native = instanceObj?.native || {};\n\n let placeholders = link.match(/%(\\w+)%/g);\n\n if (placeholders) {\n for (let p = 0; p < placeholders.length; p++) {\n let placeholder = placeholders[p];\n\n if (placeholder === '%ip%') {\n let ip = native.bind || native.ip;\n if (!ip || ip === '127.0.0.1' || ip === 'localhost' || ip === '0.0.0.0') {\n // Check host\n ip = Utils.getHostname(instanceObj, context.objects, context.hosts, context.hostname, context.adminInstance);\n }\n\n if (_urls.length) {\n _urls.forEach(item => item.url = item.url.replace('%ip%', ip));\n } else {\n link = link.replace('%ip%', ip ||'');\n }\n } else if (placeholder === '%protocol%') {\n let protocol = native.secure === undefined ? native.protocol : native.secure;\n if (protocol === true || protocol === 'true') {\n protocol = 'https';\n } else if (protocol === false || protocol === 'false' || !protocol) {\n protocol = 'http';\n }\n protocol = protocol.replace(/:$/, '');\n\n if (_urls.length) {\n _urls.forEach(item => item.url = item.url.replace('%protocol%', protocol));\n } else {\n link = link.replace('%protocol%', protocol);\n }\n } else if (placeholder === '%instance%') {\n link = link.replace('%instance%', instance);\n if (_urls.length) {\n _urls.forEach(item => item.url = item.url.replace('%instance%', instance));\n } else {\n link = link.replace('%instance%', instance);\n }\n } else {\n // remove %%\n placeholder = placeholder.replace(/%/g, '');\n\n if (placeholder.startsWith('native_')) {\n placeholder = placeholder.substring(7);\n }\n\n // like web.0_port or web_protocol\n if (!placeholder.includes('_')) {\n // if only one instance\n const adapterInstance = adapter + '.' + instance;\n if (_urls.length) {\n _urls.forEach(item =>\n item.url = Utils._replaceLink(item.url, context.objects, adapterInstance, placeholder, placeholder, context.hosts, context.hostname, context.adminInstance));\n } else {\n link = Utils._replaceLink(link, context.objects, adapterInstance, placeholder, placeholder, context.hosts, context.hostname, context.adminInstance);\n port = context.objects['system.adapter.' + adapterInstance]?.native?.port;\n }\n } else {\n const [adapterInstance, attr] = placeholder.split('_');\n\n // if instance number not found\n if (!adapterInstance.match(/\\.[0-9]+$/)) {\n // list all possible instances\n let ids;\n if (adapter === adapterInstance) {\n // take only this one instance and that's all\n ids = [adapter + '.' + instance];\n } else {\n ids = Object.keys(context.objects)\n .filter(id => id.startsWith('system.adapter.' + adapterInstance + '.') && context.objects[id].common.enabled)\n .map(id => id.substring(15));\n }\n\n // eslint-disable-next-line\n ids.forEach(id => {\n if (_urls.length) {\n const item = _urls.find(t => t.instance === id);\n if (item) {\n item.url = Utils._replaceLink(item.url, context.objects, id, attr, placeholder, context.hosts, context.hostname, context.adminInstance);\n } else {\n // add new\n const _link = Utils._replaceLink(link, context.objects, id, attr, placeholder, context.hosts, context.hostname, context.adminInstance);\n const _port = context.objects['system.adapter.' + id]?.native?.port;\n _urls.push({url: _link, port: _port, instance: id});\n }\n } else {\n const _link = Utils._replaceLink(link, context.objects, id, attr, placeholder, context.hosts, context.hostname, context.adminInstance);\n const _port = context.objects['system.adapter.' + id]?.native?.port;\n _urls.push({url: _link, port: _port, instance: id});\n }\n });\n } else {\n link = Utils._replaceLink(link, context.objects, adapterInstance, attr, placeholder, context.hosts, context.hostname, context.adminInstance);\n port = context.objects['system.adapter.' + adapterInstance]?.native?.port;\n }\n }\n }\n }\n }\n }\n\n if (_urls.length) {\n return _urls;\n } else {\n return [{url: link, port}];\n }\n }\n\n static objectMap(object, callback) {\n let result = [];\n for (let key in object) {\n result.push(callback(object[key], key));\n }\n return result;\n }\n\n static fixAdminUI(obj) {\n if (obj && obj.common && !obj.common.adminUI) {\n if (obj.common.noConfig) {\n obj.common.adminUI = obj.common.adminUI || {};\n obj.common.adminUI.config = 'none';\n } else if (obj.common.jsonConfig) {\n obj.common.adminUI = obj.common.adminUI || {};\n obj.common.adminUI.config = 'json';\n } else if (obj.common.materialize) {\n obj.common.adminUI = obj.common.adminUI || {};\n obj.common.adminUI.config = 'materialize';\n } else {\n obj.common.adminUI = obj.common.adminUI || {};\n obj.common.adminUI.config = 'html';\n }\n\n if (obj.common.jsonCustom) {\n obj.common.adminUI = obj.common.adminUI || {};\n obj.common.adminUI.custom = 'json';\n } else if (obj.common.supportCustoms) {\n obj.common.adminUI = obj.common.adminUI || {};\n obj.common.adminUI.custom = 'json';\n }\n\n if (obj.common.materializeTab && obj.common.adminTab) {\n obj.common.adminUI = obj.common.adminUI || {};\n obj.common.adminUI.tab = 'materialize';\n } else if (obj.common.adminTab) {\n obj.common.adminUI = obj.common.adminUI || {};\n obj.common.adminUI.tab = 'html';\n }\n\n obj.common.adminUI && console.warn(`Please add to \"${obj._id.replace(/\\.\\d+$/, '')}\" common.adminUI=${JSON.stringify(obj.common.adminUI)}`);\n }\n }\n\n static parseColorMessage(text) {\n if (text && (text.includes('\\u001b[') || text.includes('\\u001B['))) {\n // eslint-disable-next-line\n let m = text.match(/\\u001b\\[\\d+m/gi);\n if (m) {\n const original = text;\n const result = [];\n let style = {};\n for (let i = 0; i < m.length; i++) {\n const pos = text.indexOf(m[i]);\n if (pos) {\n result.push({ text: text.substring(0, pos), style: JSON.parse(JSON.stringify(style)) });\n }\n const code = parseInt(m[i].substring(2), 10);\n if (STYLES[code]) {\n Object.assign(style, STYLES[code]);\n } else if (ANSI_RESET_COLOR === code) {\n delete style.color;\n } else if (ANSI_RESET_BG_COLOR === code) {\n delete style.backgroundColor;\n } else if (ANSI_RESET_BOLD === code) {\n delete style.fontWeight;\n } else if (ANSI_BOLD === code) {\n style.fontWeight = 'bold';\n } else if (ANSI_RESET === code) {\n style = {};\n }\n text = text.substring(m[i].length + pos);\n }\n if (text) {\n result.push({ text, style: JSON.parse(JSON.stringify(style)) });\n }\n\n return {original, parts: result};\n } else {\n return text;\n }\n } else {\n return text;\n }\n }\n\n static PASSWORD_ERROR_LENGTH = 'Password must be at least 8 characters long and have numbers, upper and lower case letters';\n static PASSWORD_ERROR_NOT_EQUAL = 'Repeat password is not equal with password';\n static PASSWORD_ERROR_EMPTY = 'Empty password is not allowed';\n static PASSWORD_SET = '***********';\n\n static checkPassword(password, passwordRepeat) {\n password = password || '';\n passwordRepeat = passwordRepeat || '';\n if (password && passwordRepeat && password !== Utils.PASSWORD_SET && passwordRepeat !== Utils.PASSWORD_SET) {\n if (password.length < 8 || !password.match(/\\d/) || !password.match(/[a-z]/) || !password.match(/[A-Z]/)) {\n return Utils.PASSWORD_ERROR_LENGTH;\n } else if (password !== passwordRepeat) {\n return Utils.PASSWORD_ERROR_NOT_EQUAL;\n } else {\n return false;\n }\n } else if (password && password !== Utils.PASSWORD_SET) {\n if (password.length < 8 || !password.match(/\\d/) || !password.match(/[a-z]/) || !password.match(/[A-Z]/)) {\n return Utils.PASSWORD_ERROR_LENGTH;\n } else {\n return false;\n }\n } else if (passwordRepeat && passwordRepeat !== Utils.PASSWORD_SET) {\n if (passwordRepeat.length < 8 || !passwordRepeat.match(/\\d/) || !passwordRepeat.match(/[a-z]/) || !passwordRepeat.match(/[A-Z]/)) {\n return Utils.PASSWORD_ERROR_LENGTH;\n } else {\n return false;\n }\n } else if (password === Utils.PASSWORD_SET || passwordRepeat === Utils.PASSWORD_SET) {\n return false;\n } else {\n return Utils.PASSWORD_ERROR_EMPTY;\n }\n }\n}\n\nexport default Utils;","import React, { Component } from 'react';\n\nimport PropTypes from 'prop-types';\n\nimport { withStyles } from '@mui/styles';\n\nimport {\n Button,\n Checkbox,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n FormControlLabel,\n IconButton,\n} from '@mui/material';\n\nimport CloseIcon from '@mui/icons-material/Close';\nimport OpenInBrowserIcon from '@mui/icons-material/OpenInBrowser';\n\nimport Command from '../components/Command';\n\nconst styles = theme => ({\n closeButton: {\n position: 'absolute',\n right: theme.spacing(1),\n top: theme.spacing(1),\n color: theme.palette.grey[500],\n },\n hiddenDialog: {\n display: 'none',\n },\n dialogRoot: {\n height: 'calc(100% - 64px)',\n }\n});\n\nclass CommandDialog extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n log: ['$ iobroker ' + (props.cmd || '')],\n init: false,\n max: null,\n value: null,\n progressText: '',\n closeOnReady: (window._localStorage || window.localStorage).getItem('CommandDialog.closeOnReady') === 'true',\n checked: true\n };\n\n this.t = props.t;\n }\n render() {\n const { classes } = this.props;\n\n return <Dialog\n scroll=\"paper\"\n fullWidth={true}\n classes={{ root: !this.props.visible ? classes.hiddenDialog : '', paper: classes.dialogRoot }}\n onClose={this.props.inBackground ? this.props.onClose : this.props.onInBackground}\n open={true}\n maxWidth=\"md\"\n >\n <DialogTitle>\n {this.state.progressText || this.props.t('Running command')}\n <IconButton size=\"large\" className={classes.closeButton} onClick={this.props.onClose} disabled={this.props.inBackground}>\n <CloseIcon />\n </IconButton>\n </DialogTitle>\n <DialogContent dividers style={{ height: '100%' }}>\n <Command\n noSpacing={true}\n key=\"command\"\n ready={this.props.ready}\n currentHost={this.props.currentHost}\n socket={this.props.socket}\n t={this.props.t}\n inBackground={this.props.inBackground}\n commandError={this.props.commandError}\n errorFunc={this.props.errorFunc}\n performed={this.props.performed}\n callback={this.props.callback}\n cmd={this.props.cmd}\n onFinished={() => this.state.closeOnReady && this.props.onClose()}\n onSetCommandRunning={running => this.props.onSetCommandRunning(running)}\n />\n </DialogContent>\n <DialogActions style={{ justifyContent: 'space-between' }}>\n <FormControlLabel\n control={\n <Checkbox\n disabled={this.props.inBackground}\n checked={this.state.closeOnReady}\n onChange={e => {\n this.setState({ closeOnReady: e.target.checked });\n (window._localStorage || window.localStorage).setItem('CommandDialog.closeOnReady', e.target.checked ? 'true' : 'false');\n }} />}\n label={this.props.t('close on ready')}\n />\n <div>\n <Button\n variant=\"contained\"\n autoFocus\n disabled={this.props.inBackground}\n style={{ marginRight: 8 }}\n onClick={this.props.onInBackground}\n startIcon={<OpenInBrowserIcon />}\n color=\"primary\">\n {this.props.confirmText || this.props.t('In background')}\n </Button>\n <Button\n variant=\"contained\"\n disabled={!this.props.inBackground}\n onClick={this.props.onClose}\n color=\"grey\"\n startIcon={<CloseIcon />}\n >\n {this.props.t('Close')}\n </Button>\n </div>\n </DialogActions>\n </Dialog>;\n }\n}\n\nCommandDialog.propTypes = {\n t: PropTypes.func,\n confirmText: PropTypes.string,\n header: PropTypes.string,\n onClose: PropTypes.func.isRequired,\n callback: PropTypes.bool,\n onInBackground: PropTypes.func.isRequired,\n visible: PropTypes.bool.isRequired,\n ready: PropTypes.bool.isRequired,\n onSetCommandRunning: PropTypes.func.isRequired,\n cmd: PropTypes.string,\n errorFunc: PropTypes.func,\n performed: PropTypes.func,\n inBackground: PropTypes.bool,\n commandError: PropTypes.bool,\n socket: PropTypes.object.isRequired,\n currentHost: PropTypes.string.isRequired,\n};\n\nexport default withStyles(styles)(CommandDialog);","import _ from 'lodash';\n\nconst funcSet = _.throttle(\n (setTabs, tabs) => setTabs(tabs)\n , 200);\n\nconst moveCard = (id, atIndex, tabs, setTabs, hoverClientY, hoverMiddleY) => {\n const { card, index } = findCard(id, tabs);\n if (index === atIndex) {\n return;\n }\n if (index < atIndex && hoverClientY < hoverMiddleY) {\n return;\n }\n if (index > atIndex && hoverClientY > hoverMiddleY) {\n return;\n }\n if (card && index !== atIndex) {\n const copyCard = JSON.parse(JSON.stringify(tabs));\n copyCard.splice(index, 1);\n copyCard.splice(atIndex, 0, card);\n funcSet(setTabs,copyCard);\n }\n};\n\nconst findCard = (id, cards) => {\n const card = cards.find(c => c.name === id);\n return {\n card,\n index: cards.indexOf(card),\n };\n};\n\nexport { moveCard, findCard };","import React, { useEffect, useRef } from 'react';\nimport { useDrag, useDrop } from 'react-dnd';\nimport { getEmptyImage } from 'react-dnd-html5-backend';\nimport { findCard, moveCard } from '../helpers/cardSort';\nconst style = {\n cursor: 'move',\n};\nconst DragWrapper = ({ canDrag, setEndDrag, iconJSX, selected, compact, badgeContent, badgeColor, tab, tabs, setTabs, _id, children, name }) => {\n const ref = useRef(null);\n const [{ handlerId }, drop] = useDrop({\n accept: 'box',\n collect(monitor) {\n return {\n handlerId: monitor.getHandlerId(),\n };\n },\n // canDrop: () => false,\n hover({ _id: draggedId }, monitor) {\n if (!ref.current) {\n return;\n }\n const { index: overIndexActions } = findCard(_id, tabs);\n const hoverBoundingRect = ref.current?.getBoundingClientRect();\n const hoverMiddleY = (hoverBoundingRect.bottom - hoverBoundingRect.top) / 2;\n const clientOffset = monitor.getClientOffset();\n const hoverClientY = clientOffset.y - hoverBoundingRect.top;\n moveCard(draggedId,\n overIndexActions,\n tabs,\n setTabs,\n hoverClientY,\n hoverMiddleY\n );\n }\n });\n\n const [{ isDragging }, drag, preview] = useDrag({\n type: 'box',\n item: { _id: tab.name, ...tab, iconJSX, selected, compact, badgeContent, badgeColor },\n canDrag: () => canDrag,\n end: () => setEndDrag(),\n collect: monitor => ({ isDragging: monitor.isDragging() }),\n });\n\n useEffect(() => {\n preview(getEmptyImage(), { captureDraggingState: true });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n const opacity = isDragging ? 0 : 1;\n drag(drop(ref));\n\n return <div ref={ref} style={{ ...style, opacity }} data-handler-id={handlerId}>\n <a type=\"box\" data-handler-id={handlerId} onClick={event => event.preventDefault()} href={`/#${name}`} style={{ ...style, opacity, color: 'inherit', textDecoration: 'none' }} >\n {children}\n </a>\n </div>;\n}\n\nexport default DragWrapper;","import PropTypes from 'prop-types';\nimport clsx from 'clsx';\n\nimport { withStyles } from '@mui/styles';\n\nimport Badge from '@mui/material/Badge';\nimport Grid from '@mui/material/Grid';\nimport ListItemButton from '@mui/material/ListItemButton';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemText from '@mui/material/ListItemText';\nimport Tooltip from '@mui/material/Tooltip';\n\nimport amber from '@mui/material/colors/amber';\n\nimport Utils from '../Utils';\nimport { Checkbox } from '@mui/material';\n\nconst styles = theme => ({\n selected: {\n background: theme.palette.primary.main,\n color: theme.palette.mode === 'light' ? 'white' : Utils.invertColor(theme.palette.primary.main, true),\n '&:hover': {\n color: theme.palette.primary.main,\n '& $selectedIcon': {\n color: theme.palette.primary.main,\n }\n },\n },\n selectedIcon: {\n color: theme.palette.mode === 'light' ? 'white' : Utils.invertColor(theme.palette.primary.main, true),\n },\n compactBadge: {\n paddingLeft: 12,\n },\n noWrap: {\n flexWrap: 'nowrap',\n height: 40\n },\n warn: {\n backgroundColor: amber[500]\n }\n});\n\nconst DrawerItem = props => {\n const {\n badgeColor,\n badgeContent,\n classes,\n compact,\n icon,\n onClick,\n selected,\n text,\n editList,\n visible,\n editListFunc,\n badgeAdditionalContent,\n badgeAdditionalColor,\n style\n } = props;\n\n let content = text ? text.replace('&gt;', '>') : '';\n\n if (content === 'Text->Kommandos') {\n content = 'Text→Cmd';\n } else if (content === 'Text->Commands') {\n content = 'Text→Cmd';\n }\n\n return <div style={Object.assign({ display: 'flex' }, style || {})}>\n {!!editList && <Checkbox checked={visible} onClick={editListFunc} />}\n <ListItemButton\n className={clsx({ [classes.selected]: selected }, compact && classes.compactBadge)}\n onClick={onClick}\n >\n <Tooltip title={compact ? content : ''}>\n <Grid\n container\n spacing={1}\n alignItems=\"center\"\n className={classes.noWrap}\n >\n <Grid item>\n <ListItemIcon style={{ minWidth: 0 }} classes={{root: clsx(selected && classes.selectedIcon)}}>\n <Badge\n badgeContent={badgeContent || 0}\n color={(badgeColor === 'warn' ? 'default' : badgeColor) || 'primary'}\n classes={badgeColor === 'warn' ? { badge: classes.warn } : {}}\n >\n {icon}\n </Badge>\n </ListItemIcon>\n </Grid>\n {!compact &&\n <Grid item>\n <ListItemText>\n <Badge\n badgeContent={badgeAdditionalContent || 0}\n color={(badgeAdditionalColor === 'warn' ? 'default' : badgeAdditionalColor) || 'primary'}\n classes={badgeAdditionalColor === 'warn' ? { badge: classes.warn } : {}}\n >\n {content}\n </Badge>\n </ListItemText>\n </Grid>\n }\n </Grid>\n </Tooltip>\n </ListItemButton>\n </div>;\n}\n\nDrawerItem.propTypes = {\n icon: PropTypes.object,\n onClick: PropTypes.func,\n style: PropTypes.object,\n selected: PropTypes.bool,\n compact: PropTypes.bool,\n text: PropTypes.string,\n themeType: PropTypes.string,\n badgeContent: PropTypes.number,\n badgeColor: PropTypes.oneOf(['', 'default', 'primary', 'secondary', 'error', 'warn'])\n};\n\nexport default withStyles(styles)(DrawerItem);","\nimport React from 'react';\nimport { useDragLayer } from 'react-dnd';\nimport DrawerItem from './DrawerItem';\nimport { withStyles } from '@mui/styles';\n\nconst layerStyles = {\n position: 'fixed',\n pointerEvents: 'none',\n zIndex: 100,\n left: 0,\n top: 0,\n width: '100%',\n height: '100%'\n};\n\nconst snapToGrid = (x, y) => {\n const snappedX = Math.round(x / 32) * 32\n const snappedY = Math.round(y / 32) * 32\n return [snappedX, snappedY]\n}\n\nconst getItemStyles = (initialOffset, currentOffset, isSnapToGrid) => {\n if (!initialOffset || !currentOffset) {\n return {\n display: 'none'\n };\n }\n let { x, y } = currentOffset;\n if (isSnapToGrid) {\n x -= initialOffset.x;\n y -= initialOffset.y;\n [x, y] = snapToGrid(x, y);\n x += initialOffset.x;\n y += initialOffset.y;\n }\n const transform = `translate(${x}px, ${y}px)`;\n return {\n transform,\n WebkitTransform: transform\n };\n}\n\nconst styles = theme => ({\n root: {\n background: theme.palette.background.default,\n }\n})\nconst CustomDragLayer = ({ classes }) => {\n const {\n itemType,\n isDragging,\n item,\n initialOffset,\n currentOffset,\n // targetIds\n } = useDragLayer(monitor => ({\n item: monitor.getItem(),\n itemType: monitor.getItemType(),\n initialOffset: monitor.getInitialSourceClientOffset(),\n currentOffset: monitor.getSourceClientOffset(),\n isDragging: monitor.isDragging(),\n targetIds: monitor.getTargetIds()\n }));\n\n const renderItem = () => {\n switch (itemType) {\n case 'box':\n return <div className={classes.root} style={{ width: 179, }}><DrawerItem\n key={item.name}\n editList={true}\n visible={item.visible}\n editListFunc={() => { }}\n compact={item.compact}\n // onClick={() => this.props.handleNavigation(tab.name)}\n icon={item.iconJSX}\n text={item.title}\n selected={item.selected}\n badgeContent={item.badgeContent}\n badgeColor={item.badgeColor} /></div>;\n default:\n return null;\n }\n }\n\n if (!isDragging) {\n return null;\n }\n\n return <div style={layerStyles}>\n <div style={getItemStyles(initialOffset, currentOffset)}>\n {renderItem()}\n </div>\n </div>;\n};\n\nexport default withStyles(styles)(CustomDragLayer);","import React, {\n createContext,\n useEffect,\n useState,\n} from 'react';\n\nimport Adapters from '../tabs/Adapters';\n\nexport const ContextWrapper = createContext();\n\nexport const ContextWrapperProvider = ({ children }) => {\n const [stateContext, setState] = useState({\n hostsUpdate: 0,\n adaptersUpdate: 0,\n\n hosts: null,\n repository: null,\n installed: null\n });\n\n const setStateContext = obj => {\n setState(prevState =>\n Object.keys(prevState).length === Object.keys(obj).length ?\n { ...obj }\n :\n { ...prevState, ...obj }\n );\n };\n\n useEffect(() => {\n if (stateContext.hosts) {\n const jsControllerVersion = stateContext.repository['js-controller'].version;\n let count = 0;\n stateContext.hosts.forEach(element => {\n if (Adapters.updateAvailable(element.common.installedVersion, jsControllerVersion)) {\n count++;\n }\n });\n setStateContext({ hostsUpdate: count });\n }\n\n if (stateContext.installed) {\n let count = 0;\n Object.keys(stateContext.installed).forEach(element => {\n const _installed = stateContext.installed[element];\n const adapter = stateContext.repository[element];\n if (element !== 'js-controller' &&\n element !== 'hosts' &&\n _installed?.version &&\n adapter?.version &&\n _installed.ignoreVersion !== adapter.version &&\n Adapters.updateAvailable(_installed.version, adapter.version)\n ) {\n count++;\n }\n });\n\n setStateContext({ adaptersUpdate: count });\n }\n\n }, [stateContext.hosts, stateContext.installed, stateContext.repository]);\n\n return <ContextWrapper.Provider value={{ stateContext, setStateContext }}>\n {children}\n </ContextWrapper.Provider>;\n};","import React from 'react';\nimport { makeStyles } from '@mui/styles';\nimport Popper from '@mui/material/Popper';\nimport Typography from '@mui/material/Typography';\nimport Fade from '@mui/material/Fade';\nimport Paper from '@mui/material/Paper';\nimport { IconButton } from '@mui/material';\nimport EditIcon from '@mui/icons-material/Edit';\nimport I18n from '@iobroker/adapter-react-v5/i18n';\n\nconst useStyles = makeStyles((theme) => ({\n typography: {\n padding: theme.spacing(2),\n },\n}));\n\nlet timer;\n\nconst CustomPopper = ({ editList, onClick }) => {\n const [anchorEl, setAnchorEl] = React.useState(null);\n const [open, setOpen] = React.useState(false);\n const [placement, setPlacement] = React.useState();\n const classes = useStyles();\n\n const handleClick = (newPlacement) => (event) => {\n setAnchorEl(event.currentTarget);\n setOpen((prev) => placement !== newPlacement || !prev);\n setPlacement(newPlacement);\n };\n return <>\n <IconButton\n size=\"large\"\n style={editList ? { color: 'red' } : null}\n onClick={(el) => {\n onClick();\n if (!editList) {\n handleClick('right')(el);\n timer = setTimeout(() => setOpen(false), 3000);\n } else {\n setOpen(false);\n clearTimeout(timer);\n }\n }}\n title={I18n.t('show/hide item')}>\n <EditIcon />\n </IconButton>\n <Popper style={{ zIndex: 2222 }} open={open} anchorEl={anchorEl} placement={placement} transition>\n {({ TransitionProps }) => (\n <Fade {...TransitionProps} timeout={350}>\n <Paper>\n <Typography className={classes.typography}>{I18n.t('You can drag and drop list items for reorder')}</Typography>\n </Paper>\n </Fade>\n )}\n </Popper>\n </>;\n}\n\nexport default CustomPopper;","import React, { Component } from 'react';\nimport { withStyles } from '@mui/styles';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\n\nimport { Avatar, Drawer as MaterialDrawer } from '@mui/material';\nimport IconButton from '@mui/material/IconButton';\nimport List from '@mui/material/List';\nimport Typography from '@mui/material/Typography';\n\nimport SwipeableDrawer from '@mui/material/SwipeableDrawer';\nimport ChevronLeftIcon from '@mui/icons-material/ChevronLeft';\nimport AppsIcon from '@mui/icons-material/Apps';\nimport InfoIcon from '@mui/icons-material/Info';\nimport StoreIcon from '@mui/icons-material/Store';\nimport SubtitlesIcon from '@mui/icons-material/Subtitles';\nimport ViewListIcon from '@mui/icons-material/ViewList';\nimport ArtTrackIcon from '@mui/icons-material/ArtTrack';\nimport DvrIcon from '@mui/icons-material/Dvr';\nimport ViewHeadlineIcon from '@mui/icons-material/ViewHeadline';\nimport SubscriptionsIcon from '@mui/icons-material/Subscriptions';\nimport FlashOnIcon from '@mui/icons-material/FlashOn';\nimport PersonOutlineIcon from '@mui/icons-material/PersonOutline';\nimport StorageIcon from '@mui/icons-material/Storage';\nimport FilesIcon from '@mui/icons-material/FileCopy';\n\nimport LogoutIcon from '@iobroker/adapter-react-v5/icons/IconLogout';\n\nimport Icon from '@iobroker/adapter-react-v5/Components/Icon';\nimport I18n from '@iobroker/adapter-react-v5/i18n';\nimport withWidth from '@iobroker/adapter-react-v5/Components/withWidth';\n\nimport DragWrapper from './DragWrapper';\nimport CustomDragLayer from './CustomDragLayer';\nimport { ContextWrapper } from './ContextWrapper';\nimport CustomPopper from './CustomPopper';\nimport { getHref } from '../tabs/CustomTab';\nimport DrawerItem from './DrawerItem';\nimport Adapters from '../tabs/Adapters';\n\nexport const DRAWER_FULL_WIDTH = 180;\nexport const DRAWER_COMPACT_WIDTH = 50;\n\nfunction ucFirst(str) {\n return str.substring(0, 1).toUpperCase() + str.substring(1).toLowerCase();\n}\n\nconst styles = theme => ({\n root: {\n flexShrink: 0,\n transition: theme.transitions.create('width', {\n easing: theme.transitions.easing.easeOut,\n duration: theme.transitions.duration.enteringScreen,\n }),\n display: 'flex',\n flexDirection: 'column',\n },\n rootFullWidth: {\n width: DRAWER_FULL_WIDTH,\n },\n rootCompactWidth: {\n width: DRAWER_COMPACT_WIDTH,\n },\n paper: {\n width: 'inherit',\n overflowX: 'hidden'\n },\n header: {\n display: 'flex',\n alignItems: 'center',\n padding: theme.spacing(0, 1),\n ...theme.mixins.toolbar,\n justifyContent: 'flex-end',\n position: 'sticky',\n top: 0,\n zIndex: 2,\n background: theme.palette.background.default\n },\n headerCompact: {\n padding: 0,\n },\n headerLogout: {\n justifyContent: 'space-between'\n },\n list: {\n paddingTop: 0,\n flex: '1 0 auto',\n },\n logout: {\n color: theme.palette.primary.main\n },\n icon: {\n width: 20,\n height: 20,\n },\n logoWhite: {\n background: '#FFFFFF'\n },\n logoSize: {\n width: 50,\n height: 50\n },\n avatarBlock: {\n width: '100%',\n display: 'flex',\n // justifyContent: 'center',\n // marginLeft: 48,\n marginTop: 5,\n marginBottom: 5\n },\n avatarNotVisible: {\n opacity: 0,\n transition: 'opacity 0.3s'\n },\n avatarVisible: {\n opacity: 1\n },\n expand: {\n marginBottom: 5,\n marginLeft: 5\n },\n styleVersion: {\n fontSize: 10,\n color: theme.palette.mode === 'dark' ? '#ffffff5e' : '#0000005e',\n alignSelf: 'center',\n marginLeft: 5\n },\n editButton: {\n position: 'sticky',\n bottom: 0,\n right: 0,\n width: 'fit-content',\n marginLeft: 'auto',\n marginTop: 'auto',\n transition: 'opacity 0.5s',\n }\n});\n\nexport const STATES = {\n opened: 0,\n closed: 1,\n compact: 2\n};\n\nconst tabsInfo = {\n 'tab-intro': {order: 1, icon: <AppsIcon />},\n 'tab-info': {order: 5, icon: <InfoIcon />, host: true},\n 'tab-adapters': {order: 10, icon: <StoreIcon />, host: true},\n 'tab-instances': {order: 15, icon: <SubtitlesIcon />, host: true},\n 'tab-objects': {order: 20, icon: <ViewListIcon />},\n 'tab-enums': {order: 25, icon: <ArtTrackIcon />},\n 'tab-devices': {order: 27, icon: <DvrIcon />, host: true},\n 'tab-logs': {order: 30, icon: <ViewHeadlineIcon />, host: true},\n 'tab-scenes': {order: 35, icon: <SubscriptionsIcon />},\n 'tab-events': {order: 40, icon: <FlashOnIcon />},\n 'tab-users': {order: 45, icon: <PersonOutlineIcon />},\n 'tab-javascript': {order: 50},\n 'tab-text2command-0': {order: 55, instance: 0},\n 'tab-text2command-1': {order: 56, instance: 1},\n 'tab-text2command-2': {order: 57, instance: 2},\n 'tab-node-red-0': {order: 60, instance: 0},\n 'tab-node-red-1': {order: 61, instance: 1},\n 'tab-node-red-2': {order: 62, instance: 2},\n 'tab-fullcalendar-0': {order: 65, instance: 0},\n 'tab-fullcalendar-1': {order: 66, instance: 1},\n 'tab-fullcalendar-2': {order: 67, instance: 2},\n 'tab-echarts': {order: 70, instance: 2},\n 'tab-eventlist-0': {order: 80, instance: 0},\n 'tab-eventlist-1': {order: 81, instance: 1},\n 'tab-eventlist-2': {order: 82, instance: 2},\n 'tab-hosts': {order: 100, icon: <StorageIcon />},\n 'tab-files': {order: 110, icon: <FilesIcon />},\n};\n\nclass Drawer extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n tabs: [],\n editList: false,\n logErrors: 0,\n logWarnings: 0,\n hostError: 0,\n hostsUpdate: Drawer.calculateHostUpdates(this.props.hosts, this.props.repository),\n adaptersUpdate: Drawer.calculateAdapterUpdates(this.props.installed, this.props.repository),\n };\n\n this.instances = null;\n\n this.refEditButton = React.createRef();\n\n this.getTabs();\n }\n\n static getDerivedStateFromProps(props, state) {\n const hostsUpdate = Drawer.calculateHostUpdates(props.hosts, props.repository);\n const adaptersUpdate = Drawer.calculateAdapterUpdates(props.installed, props.repository);\n if (hostsUpdate !== state.hostsUpdate || adaptersUpdate !== state.adaptersUpdate) {\n return { hostsUpdate, adaptersUpdate };\n } else {\n return null;\n }\n }\n\n static calculateHostUpdates(hosts, repository) {\n if (hosts && repository) {\n const jsControllerVersion = repository['js-controller']?.version || '';\n let count = 0;\n hosts.forEach(element => {\n if (Adapters.updateAvailable(element.common.installedVersion, jsControllerVersion)) {\n count++;\n }\n });\n return count;\n } else {\n return 0;\n }\n }\n\n static calculateAdapterUpdates(installed, repository) {\n if (installed) {\n let count = 0;\n\n Object.keys(installed).sort().forEach(element => {\n const _installed = installed[element];\n const adapter = repository && repository[element];\n if (element !== 'js-controller' &&\n element !== 'hosts' &&\n _installed?.version &&\n adapter?.version &&\n _installed.ignoreVersion !== adapter.version &&\n Adapters.updateAvailable(_installed.version, adapter.version)\n ) {\n count++;\n }\n });\n\n return count;\n } else {\n return 0;\n }\n }\n\n instanceChangedHandler = changes => {\n this.getTabs(true);\n }\n\n componentDidMount() {\n this.props.instancesWorker.registerHandler(this.instanceChangedHandler, true);\n\n this.onNotificationsHandler()\n .then(() => {\n this.props.hostsWorker.registerNotificationHandler(this.onNotificationsHandler);\n\n if (!this.logsHandlerRegistered) {\n this.logsHandlerRegistered = true;\n this.props.logsWorker.registerErrorCountHandler(this.onErrorsUpdates);\n this.props.logsWorker.registerWarningCountHandler(this.onWarningsUpdates);\n }\n });\n }\n\n onNotificationsHandler = () => {\n return this.props.hostsWorker.getNotifications()\n .then(notifications => this.calculateWarning(notifications))\n .catch(error => window.alert('Cannot get notifications: ' + error));\n };\n\n onErrorsUpdates = logErrors => {\n if (this.props.currentTab !== 'tab-logs' || (this.props.currentTab === 'tab-logs' && this.state.logErrors)) {\n this.setState({ logErrors });\n }\n }\n\n onWarningsUpdates = logWarnings => {\n if (this.props.currentTab !== 'tab-logs' || (this.props.currentTab === 'tab-logs' && this.state.logWarnings)) {\n this.setState({ logWarnings });\n }\n }\n\n calculateWarning = notifications => {\n if (!notifications) {\n return;\n }\n\n let count = 0;\n\n Object.keys(notifications).forEach(host => {\n if (!notifications[host]?.result?.system) {\n return;\n }\n\n if (Object.keys(notifications[host].result.system.categories).length) {\n let obj = notifications[host].result.system.categories;\n\n Object.keys(obj).forEach(nameTab =>\n Object.keys(obj[nameTab].instances).forEach(_ => count++));\n }\n });\n\n this.setState({ hostError: count });\n }\n\n componentWillUnmount() {\n this.props.instancesWorker.unregisterHandler(this.instanceChangedHandler);\n this.props.hostsWorker.unregisterNotificationHandler(this.onNotificationsHandler);\n\n if (this.logsHandlerRegistered) {\n this.logsHandlerRegistered = false;\n this.props.logsWorker.unregisterErrorCountHandler(this.onErrorsUpdates);\n this.props.logsWorker.unregisterWarningCountHandler(this.onWarningsUpdates);\n }\n }\n\n componentDidUpdate() {\n if (!this.isSwipeable() && this.props.state !== STATES.opened && this.state.editList) {\n this.setState({ editList: false });\n }\n }\n\n getTabs(update) {\n return this.props.socket.getCompactInstances(update)\n .then(instances => {\n let dynamicTabs = [];\n if (instances) {\n Object.keys(instances).forEach(id => {\n const instance = instances[id];\n\n if (!instance || !instance.adminTab) {\n return;\n }\n\n let tab = 'tab-' + id.replace('system.adapter.', '').replace(/\\.\\d+$/, '');\n\n const singleton = instance.adminTab.singleton;\n let instNum;\n if (!singleton) {\n const m = id.match(/\\.(\\d+)$/);\n if (m) {\n instNum = parseInt(m[1], 10);\n tab += '-' + instNum;\n }\n }\n\n if (dynamicTabs.find(item => item.name === tab)) {\n return;\n }\n\n let title;\n\n if (instance.adminTab.name) {\n if (typeof instance.adminTab.name === 'object') {\n if (instance.adminTab.name[this.props.lang]) {\n title = instance.adminTab.name[this.props.lang];\n } else if (instance.adminTab.name.en) {\n title = this.props.t(instance.adminTab.name.en);\n } else {\n title = this.props.t(instance.name);\n }\n } else {\n title = this.props.t(instance.adminTab.name);\n }\n } else {\n title = this.props.t(instance.name);\n }\n\n let obj;\n if (tabsInfo[tab]) {\n obj = Object.assign({ name: tab }, tabsInfo[tab]);\n } else {\n obj = { name: tab, order: instance.adminTab.order !== undefined ? instance.adminTab.order : 200};\n }\n\n if (!obj.icon) {\n obj.icon = `adapter/${instance.name}/${instance.icon}`;\n }\n\n obj.title = title;\n\n if (!singleton) {\n //obj.instance = instance;\n if (instNum) {\n obj.title += ' ' + instNum;\n }\n }\n dynamicTabs.push(obj);\n });\n }\n\n const READY_TO_USE = ['tab-intro', 'tab-adapters', 'tab-instances', 'tab-logs', 'tab-files', 'tab-objects', 'tab-hosts', 'tab-users', 'tab-enums'];\n // DEV ONLY\n let tabs = Object.keys(tabsInfo).filter(name => READY_TO_USE.includes(name));\n\n tabs = tabs.map(name => {\n const obj = Object.assign({ name }, tabsInfo[name]);\n obj.title = I18n.t(ucFirst(name.replace('tab-', '').replace('-0', '').replace(/-(\\d+)$/, ' $1')));\n obj.visible = true;\n return obj;\n });\n\n // add dynamic tabs\n tabs = tabs.concat(dynamicTabs);\n\n tabs = tabs.filter(obj => obj);\n tabs.forEach(obj => obj.visible = true);\n\n tabs.sort((a, b) => {\n if (a.order && b.order) {\n return a.order - b.order;\n } else if (a.order) {\n return -1;\n } else if (b.order) {\n return 1;\n } else {\n return a.name > b.name ? -1 : (a.name > b.name ? 1 : 0);\n }\n });\n\n // Convert\n this.props.socket.getCompactSystemConfig()\n .then(systemConfig => {\n systemConfig.common.tabsVisible = systemConfig.common.tabsVisible || [];\n\n tabs.forEach(tab => {\n const it = systemConfig.common.tabsVisible.find(el => el.name === tab.name);\n if (it) {\n tab.visible = it.visible;\n }\n });\n\n const map = {}\n systemConfig.common.tabsVisible.forEach((item, i) => map[item.name] = i);\n\n tabs.sort((a, b) => {\n const aa = map[a.name];\n const bb = map[b.name];\n if (aa !== undefined && bb !== undefined) {\n return aa - bb;\n } else if (aa) {\n return -1;\n } else if (bb) {\n return 1;\n } else {\n return 0;\n }\n });\n\n this.setState({tabs}, () => {\n const tabsVisible = tabs.map(({ name, visible }) => ({ name, visible }));\n\n if (JSON.stringify(tabsVisible) !== JSON.stringify(systemConfig.common.tabsVisible)) {\n this.props.socket.getSystemConfig(true)\n .then(systemConfig => {\n systemConfig.common.tabsVisible = tabsVisible;\n\n return this.props.socket.setSystemConfig(systemConfig)\n .catch(e => window.alert('Cannot set system config: ' + e));\n });\n }\n });\n });\n })\n .catch(error => window.alert('Cannot get instances: ' + error));\n }\n\n getHeader() {\n const { classes, state, handleNavigation } = this.props;\n\n return <div className={clsx(\n classes.header,\n this.props.state === STATES.opened && this.props.isSecure && classes.headerLogout,\n !this.isSwipeable() && this.props.state !== STATES.opened && classes.headerCompact\n )}>\n <div className={clsx(classes.avatarBlock, state === 0 && classes.avatarVisible, classes.avatarNotVisible)}>\n <a href=\"/#easy\" onClick={event => event.preventDefault()} style={{ color: 'inherit', textDecoration: 'none' }}>\n {this.props.adminGuiConfig.icon ?\n <div style={{height: 50, withWidth: 102, lineHeight: '50px'}}>\n <img src={this.props.adminGuiConfig.icon} alt=\"logo\" style={{maxWidth: '100%', maxHeight: '100%', verticalAlign: 'middle'}}/>\n </div>\n :\n <Avatar\n onClick={() => handleNavigation('easy')}\n className={classes.logoSize}\n alt=\"ioBroker\"\n src=\"img/no-image.png\"\n />\n }\n </a>\n {!this.props.adminGuiConfig.icon && this.props.versionAdmin && <Typography className={classes.styleVersion}>v{this.props.versionAdmin}</Typography>}\n </div>\n <IconButton\n size=\"large\"\n onClick={() => {\n if (this.isSwipeable() || this.props.state === STATES.compact) {\n this.props.onStateChange(STATES.closed);\n } else {\n this.props.onStateChange(STATES.compact)\n }\n }}\n >\n <ChevronLeftIcon />\n </IconButton>\n </div>;\n }\n\n isSwipeable() {\n return this.props.width === 'xs' || this.props.width === 'sm';\n }\n\n tabsEditSystemConfig = idx => {\n const { tabs } = this.state;\n const { socket } = this.props;\n let newTabs = JSON.parse(JSON.stringify(tabs));\n if (idx !== undefined) {\n newTabs[idx].visible = !newTabs[idx].visible;\n }\n return this.props.socket.getSystemConfig(true)\n .then(newObjCopy => {\n newObjCopy.common.tabsVisible = newTabs.map(({ name, visible }) => ({ name, visible }));\n\n if (idx !== undefined) {\n this.setState({ tabs: newTabs }, () =>\n socket.setSystemConfig(newObjCopy)\n .catch(e => window.alert('Cannot set system config: ' + e)));\n } else {\n return socket.setSystemConfig(newObjCopy)\n .catch(e => window.alert('Cannot set system config: ' + e));\n }\n });\n }\n\n getNavigationItems() {\n const { tabs, editList, logErrors, logWarnings } = this.state;\n const { systemConfig, currentTab, state, classes, handleNavigation } = this.props;\n if (!systemConfig) {\n return;\n }\n return tabs.map((tab, idx) => {\n if (!editList && !tab.visible) {\n return null\n }\n\n if (this.props.adminGuiConfig.admin.menu && this.props.adminGuiConfig.admin.menu[tab.name] === false) {\n return null;\n }\n\n return <DragWrapper\n key={tab.name}\n canDrag={editList}\n name={tab.name}\n iconJSX={!!tabsInfo[tab.name]?.icon ? tabsInfo[tab.name].icon : <Icon className={classes.icon} src={tab.icon} />}\n _id={tab.name}\n selected={currentTab === tab.name}\n tab={tab}\n compact={!this.isSwipeable() && state !== STATES.opened}\n badgeContent={logErrors || logWarnings || 0}\n badgeColor={logErrors ? 'error' : (logWarnings ? 'warn' : '')}\n tabs={tabs}\n setEndDrag={() => this.tabsEditSystemConfig()}\n setTabs={newObj => this.setState({ tabs: newObj })}\n >\n <DrawerItem\n themeType={this.props.themeType}\n key={tab.name}\n editList={editList}\n visible={tab.visible}\n editListFunc={() => this.tabsEditSystemConfig(idx)}\n compact={!this.isSwipeable() && state !== STATES.opened}\n onClick={e => {\n if (e.ctrlKey || e.shiftKey) {\n getHref(this.props.instancesWorker, tab.name, this.props.hostname, this.props.protocol, this.props.port, this.props.hosts, this.props.adminInstance)\n .then(href => {\n if (href) {\n console.log(href);\n // Open in new tab\n window.open(`${window.location.protocol}//${window.location.host}/${href}`, tab.name).focus();\n } else {\n handleNavigation(tab.name);\n }\n });\n } else {\n handleNavigation(tab.name);\n }\n }}\n icon={!!tabsInfo[tab.name]?.icon ? tabsInfo[tab.name].icon : <Icon src={tab.icon} className={classes.icon} />}\n text={tab.title}\n selected={currentTab === tab.name}\n badgeContent={this.badge(tab).content}\n badgeColor={this.badge(tab).color}\n badgeAdditionalContent={this.badge(tab)?.additionalContent}\n badgeAdditionalColor={this.badge(tab)?.additionalColor}\n />\n </DragWrapper>;\n });\n }\n\n badge = tab => {\n switch (tab.name) {\n case 'tab-logs':\n const { logErrors, logWarnings } = this.state;\n return { content: logErrors || logWarnings || 0, color: (logErrors ? 'error' : 'warn') || '' };\n\n case 'tab-adapters':\n return { content: this.state.adaptersUpdate || 0, color: 'primary' };\n\n case 'tab-hosts':\n return { content: this.state.hostsUpdate || 0, color: 'primary', additionalContent: this.state.hostError, additionalColor: 'error' };\n\n default:\n return { content: 0, color: '', additionalContent: 0, additionalColor: '' };\n }\n }\n\n render() {\n const { classes } = this.props;\n\n if (this.isSwipeable()) {\n return <SwipeableDrawer\n className={classes.root}\n anchor=\"left\"\n open={this.props.state !== STATES.closed}\n onClose={() => this.props.onStateChange(STATES.closed)}\n onOpen={() => this.props.onStateChange(STATES.opened)}\n classes={{ paper: classes.paper }}\n >\n <CustomDragLayer />\n\n {this.getHeader()}\n\n <List>\n {this.getNavigationItems()}\n </List>\n {this.props.isSecure &&\n <DrawerItem\n themeType={this.props.themeType}\n compact={!this.isSwipeable() && this.props.state !== STATES.opened}\n onClick={this.props.onLogout}\n text={this.props.t('Logout')}\n icon={<LogoutIcon />}\n />\n }\n {this.props.adminGuiConfig.admin.menu.editable !== false && this.props.state === STATES.opened && <div className={this.props.classes.editButton}>\n <CustomPopper\n editList={this.state.editList}\n onClick={() => this.setState({ editList: !this.state.editList })}\n />\n </div>}\n </SwipeableDrawer>;\n } else {\n return <MaterialDrawer\n className={clsx(classes.root, this.props.state !== STATES.opened ? classes.rootCompactWidth : classes.rootFullWidth)}\n variant=\"persistent\"\n anchor=\"left\"\n open={this.props.state !== STATES.closed}\n classes={{ paper: classes.paper }}\n onMouseEnter={() => this.refEditButton.current && (this.refEditButton.current.style.opacity = 1)}\n onMouseLeave={() => this.refEditButton.current && (this.refEditButton.current.style.opacity = 0)}\n >\n <CustomDragLayer />\n\n {this.getHeader()}\n <List className={classes.list}>\n {this.getNavigationItems()}\n </List>\n {this.props.isSecure &&\n <DrawerItem\n themeType={this.props.themeType}\n style={{flexShrink: 0}}\n compact={!this.isSwipeable() && this.props.state !== STATES.opened}\n onClick={this.props.onLogout} text={this.props.t('Logout')}\n icon={<LogoutIcon />}\n />\n }\n {this.props.adminGuiConfig.admin.menu.editable !== false && this.props.state === STATES.opened && <div\n className={this.props.classes.editButton}\n style={{opacity: 0}}\n ref={this.refEditButton}\n >\n <CustomPopper\n editList={this.state.editList}\n onClick={() => this.setState({ editList: !this.state.editList })}\n />\n </div>}\n </MaterialDrawer>;\n }\n }\n}\n\nDrawer.propTypes = {\n t: PropTypes.func,\n lang: PropTypes.string,\n state: PropTypes.number,\n adminGuiConfig: PropTypes.object,\n onStateChange: PropTypes.func,\n onLogout: PropTypes.func,\n systemConfig: PropTypes.object,\n logoutTitle: PropTypes.string,\n isSecure: PropTypes.bool,\n currentTab: PropTypes.string,\n themeName: PropTypes.string,\n themeType: PropTypes.string,\n socket: PropTypes.object,\n ready: PropTypes.bool,\n versionAdmin: PropTypes.string,\n expertMode: PropTypes.bool,\n handleNavigation: PropTypes.func,\n\n instancesWorker: PropTypes.object,\n hostsWorker: PropTypes.object,\n logsWorker: PropTypes.object,\n\n hostname: PropTypes.string,\n protocol: PropTypes.string,\n port: PropTypes.number,\n adminInstance: PropTypes.string,\n\n installed: PropTypes.object,\n hosts: PropTypes.array,\n repository: PropTypes.object,\n};\n\nDrawer.contextType = ContextWrapper;\nexport default withWidth()(withStyles(styles)(Drawer));","import { withStyles } from '@mui/styles';\n\nconst offset = 187;\n\nconst styles = {\n root: {\n left: 0,\n top: 0,\n width: '100%',\n height: '100%',\n position: 'fixed',\n background: 'rgba(0, 0, 0, .3)',\n zIndex: 20000\n },\n connecting: {\n left: '40%',\n top: '40%',\n width: '20%',\n height: '20%',\n position: 'absolute'\n },\n spinner: {\n animation: '$rotator 1.4s linear infinite'\n },\n path: {\n strokeDasharray: 187,\n strokeDashoffset: 0,\n transformOrigin: 'center',\n animation: '$dash 1.4s ease-in-out infinite, $colors 5.6s ease-in-out infinite'\n },\n '@keyframes colors': {\n '0%': {\n stroke: '#4285F4'\n },\n '25%': {\n stroke: '#DE3E35'\n },\n '50%': {\n stroke: '#F7C223'\n },\n '75%': {\n stroke: '#1B9A59'\n },\n '100%': {\n stroke: '#4285F4'\n }\n },\n '@keyframes dash': {\n '0%': {\n strokeDashoffset: offset\n },\n '50%': {\n strokeDashoffset: offset / 4,\n transform: 'rotate(135deg)'\n },\n '100%': {\n strokeDashoffset: offset,\n transform: 'rotate(450deg)'\n }\n },\n '@keyframes rotator': {\n '0%': {\n transform: 'rotate(0deg)'\n },\n '100%': {\n transform: 'rotate(270deg)'\n }\n }\n};\n\nfunction Connecting(props) {\n\n const { classes } = props;\n\n return <div className={ classes.root }>\n <div className={ classes.connecting }>\n <svg className={ classes.spinner } width=\"100%\" height=\"100%\" viewBox=\"0 0 66 66\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle className={ classes.path } fill=\"none\" strokeWidth=\"6\" strokeLinecap=\"round\" cx=\"33\" cy=\"33\" r=\"30\"/>\n </svg>\n </div>\n </div>;\n}\n\nexport default withStyles(styles)(Connecting);","import { createRef, Component } from 'react';\nimport {withStyles} from '@mui/styles';\nimport PropTypes from 'prop-types';\nimport TextField from '@mui/material/TextField';\nimport Grid from '@mui/material/Grid';\nimport Toolbar from '@mui/material/Grid';\n\nimport Button from '@mui/material/Button';\nimport Paper from '@mui/material/Paper';\nimport IconCheck from '@mui/icons-material/Check';\n\nimport withWidth from '@iobroker/adapter-react-v5/Components/withWidth';\n\nimport AdminUtils from '../../Utils';\n\nconst TOOLBAR_HEIGHT = 64;\n\nconst styles = theme => ({\n paper: {\n height: '100%',\n maxHeight: '100%',\n maxWidth: '100%',\n overflow: 'hidden',\n },\n title: {\n color: theme.palette.secondary.main,\n },\n form: {\n height: `calc(100% - ${TOOLBAR_HEIGHT + parseInt(theme.spacing(1), 10)}px)`,\n overflow: 'auto',\n },\n input: {\n width: 400,\n marginBottom: theme.spacing(2)\n },\n grow: {\n flexGrow: 1,\n },\n toolbar: {\n height: TOOLBAR_HEIGHT,\n lineHeight: TOOLBAR_HEIGHT + 'px',\n }\n});\n\nclass WizardPasswordTab extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n password: '',\n passwordRepeat: '',\n errorPassword: true,\n errorPasswordRepeat: false,\n };\n\n this.focusRef = createRef();\n }\n\n componentDidMount() {\n this.focusRef.current && this.focusRef.current.focus();\n }\n\n render() {\n return <Paper className={ this.props.classes.paper }>\n <form className={ this.props.classes.form} noValidate autoComplete=\"off\">\n <Grid container direction=\"column\">\n <Grid item>\n <h2 className={ this.props.classes.title }>{ this.props.t('You must set the administrator password') }</h2>\n </Grid>\n <Grid item>\n <TextField\n variant=\"standard\"\n disabled\n className={ this.props.classes.input }\n label={this.props.t('Administrator name')}\n value=\"admin\"\n InputProps={{ readOnly: true }}\n helperText={ this.props.t('Administrator name cannot be changed') }\n />\n </Grid>\n <Grid item>\n <TextField\n variant=\"standard\"\n inputProps={{\n autoComplete: 'new-password',\n form: {\n autoComplete: 'off',\n },\n }}\n onKeyDown={e => {\n if (e.keyCode === 13 && this.state.password && !this.state.errorPassword) {\n const el = window.document.getElementById('admin_password');\n if (el) {\n el.focus();\n }\n }\n }}\n autoComplete=\"off\"\n className={ this.props.classes.input }\n ref={ this.focusRef }\n label={this.props.t('Administrator password')}\n type=\"password\"\n value={ this.state.password }\n error={ this.state.errorPassword }\n onChange={ e => {\n const errorPassword = AdminUtils.checkPassword(e.target.value);\n const errorPasswordRepeat = AdminUtils.checkPassword(e.target.value, this.state.passwordRepeat);\n this.setState({\n password: e.target.value,\n errorPassword: errorPassword ? this.props.t(errorPassword) : false,\n errorPasswordRepeat: errorPasswordRepeat ? this.props.t(errorPasswordRepeat) : false\n });\n } }\n helperText={ this.props.t('Password must be at least 8 characters long and have numbers, upper and lower case letters') }\n />\n </Grid>\n <Grid item>\n <TextField\n variant=\"standard\"\n inputProps={{\n autoComplete: 'new-password',\n form: {autoComplete: 'off'},\n id: 'admin_password'\n }}\n onKeyDown={e => {\n if (e.keyCode === 13 && this.state.password && !this.state.errorPassword && !this.state.errorPasswordRepeat) {\n this.props.onDone(this.state.password);\n }\n } }\n autoComplete=\"off\"\n className={ this.props.classes.input }\n label={ this.props.t('Repeat administrator password') }\n value={ this.state.passwordRepeat }\n type=\"password\"\n error={ !!this.state.errorPasswordRepeat }\n onChange={ e => {\n const errorPasswordRepeat = AdminUtils.checkPassword(this.state.password, e.target.value);\n this.setState({\n passwordRepeat: e.target.value,\n errorPasswordRepeat: errorPasswordRepeat ? this.props.t(errorPasswordRepeat) : false\n });\n } }\n helperText={ this.state.errorPasswordRepeat || '' }\n />\n </Grid>\n </Grid>\n </form>\n <Toolbar className={ this.props.classes.toolbar }>\n <div className={ this.props.classes.grow }/>\n <Button color=\"primary\" variant={\"contained\"} onClick={ () => this.props.onDone(this.state.password) } disabled={ !!this.state.errorPasswordRepeat || this.state.errorPassword } startIcon={<IconCheck/>}>{ this.props.t('Set administrator password') }</Button>\n </Toolbar>\n </Paper>;\n }\n}\n\nWizardPasswordTab.propTypes = {\n t: PropTypes.func,\n socket: PropTypes.object,\n onDone: PropTypes.func.isRequired,\n};\n\nexport default withWidth()(withStyles(styles)(WizardPasswordTab));\n","const license = {\n 'en': 'The MIT License (MIT)\\n' +\n '\\n' +\n 'Copyright © 2014-2021 bluefox, 2014 hobbyquaker\\n' +\n '\\n' +\n 'Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\\n' +\n 'The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\\n' +\n 'THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n',\n\n 'de': 'MIT-Lizenz (MIT)\\n' +\n '\\n' +\n 'Copyright © 2014-2021 bluefox, 2014 hobbyquaker\\n' +\n '\\n' +\n 'Hiermit wird unentgeltlich jeder Person, die eine Kopie der Software und der zugehörigen Dokumentationen (die \"Software\") erhält, die Erlaubnis erteilt, sie uneingeschränkt zu benutzen, inklusive und ohne Ausnahme dem Recht, sie zu verwenden, kopieren, ändern, fusionieren, verlegen, verbreiten, unterlizenzieren und/oder zu verkaufen, und Personen, die diese Software erhalten, diese Rechte zu geben, unter den folgenden Bedingungen:\\n' +\n 'Der obige Urheberrechtsvermerk und dieser Erlaubnisvermerk sind in allen Kopien oder Teilkopien der Software beizulegen.\\n' +\n 'DIE SOFTWARE WIRD OHNE JEDE AUSDRÜCKLICHE ODER IMPLIZIERTE GARANTIE BEREITGESTELLT, EINSCHLIESSLICH DER GARANTIE ZUR BENUTZUNG FÜR DEN VORGESEHENEN ODER EINEM BESTIMMTEN ZWECK SOWIE JEGLICHER RECHTSVERLETZUNG, JEDOCH NICHT DARAUF BESCHRÄNKT. IN KEINEM FALL SIND DIE AUTOREN ODER COPYRIGHTINHABER FÜR JEGLICHEN SCHADEN ODER SONSTIGE ANSPRÜCHE HAFTBAR ZU MACHEN, OB INFOLGE DER ERFÜLLUNG EINES VERTRAGES, EINES DELIKTES ODER ANDERS IM ZUSAMMENHANG MIT DER SOFTWARE ODER SONSTIGER VERWENDUNG DER SOFTWARE ENTSTANDEN.',\n\n 'ru': 'Лицензия MIT\\n' +\n '\\n' +\n 'Copyright © 2014-2021 bluefox, 2014 hobbyquaker\\n' +\n '\\n' +\n 'Данная лицензия разрешает лицам, получившим копию данного программного обеспечения и сопутствующей документации (в дальнейшем именуемыми «Программное Обеспечение»), безвозмездно использовать Программное Обеспечение без ограничений, включая неограниченное право на использование, копирование, изменение, добавление, публикацию, распространение, сублицензирование и/или продажу копий Программного Обеспечения, также как и лицам, которым предоставляется данное Программное Обеспечение, при соблюдении следующих условий:\\n' +\n 'Указанное выше уведомление об авторском праве и данные условия должны быть включены во все копии или значимые части данного Программного Обеспечения.\\n' +\n 'ДАННОЕ ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ ПРЕДОСТАВЛЯЕТСЯ «КАК ЕСТЬ», БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ, ЯВНО ВЫРАЖЕННЫХ ИЛИ ПОДРАЗУМЕВАЕМЫХ, ВКЛЮЧАЯ, НО НЕ ОГРАНИЧИВАЯСЬ ГАРАНТИЯМИ ТОВАРНОЙ ПРИГОДНОСТИ, СООТВЕТСТВИЯ ПО ЕГО КОНКРЕТНОМУ НАЗНАЧЕНИЮ И ОТСУТСТВИЯ НАРУШЕНИЙ ПРАВ. НИ В КАКОМ СЛУЧАЕ АВТОРЫ ИЛИ ПРАВООБЛАДАТЕЛИ НЕ НЕСУТ ОТВЕТСТВЕННОСТИ ПО ИСКАМ О ВОЗМЕЩЕНИИ УЩЕРБА, УБЫТКОВ ИЛИ ДРУГИХ ТРЕБОВАНИЙ ПО ДЕЙСТВУЮЩИМ КОНТРАКТАМ, ДЕЛИКТАМ ИЛИ ИНОМУ, ВОЗНИКШИМ ИЗ, ИМЕЮЩИМ ПРИЧИНОЙ ИЛИ СВЯЗАННЫМ С ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ ИЛИ ИСПОЛЬЗОВАНИЕМ ПРОГРАММНОГО ОБЕСПЕЧЕНИЯ ИЛИ ИНЫМИ ДЕЙСТВИЯМИ С ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ.',\n\n 'it': 'Licenza MIT\\n' +\n '\\n' +\n 'Copyright © 2014-2021 bluefox, 2014 hobbyquaker\\n' +\n '\\n' +\n 'Si concede gratuitamente l\\'autorizzazione, a chiunque ottenga una copia di questo software e dei file di documentazione associati (il \"Software\"), di dare opera al Software senza restrizioni, compresi senza limitazione i diritti di utilizzare, copiare, modificare, unire, pubblicare, distribuire, concedere in sublicenza ovvero vendere copie del Software, e di consentire alle persone a cui il Software è fornito di fare altrettanto, posto che siano rispettate le seguenti condizioni:\\n' +\n 'l\\'avviso di copyright unitamente a questo avviso di licenza devono essere sempre inclusi in tutte le copie o parti sostanziali del Software.\\n' +\n 'IL SOFTWARE VIENE FORNITO \"COSÌ COM\\'È\" SENZA GARANZIE DI ALCUN TIPO, ESPLICITE O IMPLICITE, COMPRESE, MA NON SOLO, LE GARANZIE DI COMMERCIABILITÀ, IDONEITÀ AD UN PARTICOLARE SCOPO E NON VIOLAZIONE DI DIRITTI ALTRUI. IN NESSUN CASO GLI AUTORI DEL SOFTWARE O I TITOLARI DEL COPYRIGHT POTRANNO ESSERE RITENUTI RESPONSABILI DI RECLAMI, DANNI O ALTRE RESPONSABILITÀ, DERIVANTI DA O COLLEGATI A CONTRATTO, ILLECITO CIVILE O IN ALTRA RELAZIONE CON IL SOFTWARE O CON IL SUO UTILIZZO O CON ALTRE OPERAZIONI DEL SOFTWARE.',\n\n 'fr': 'Licence MIT\\n' +\n '\\n' +\n 'Copyright © 2014-2021 bluefox, 2014 hobbyquaker\\n' +\n '\\n' +\n 'Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\\n' +\n 'The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\\n' +\n 'THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n',\n\n 'pt': 'Licença MIT\\n' +\n '\\n' +\n 'Copyright © 2014-2021 bluefox, 2014 hobbyquaker\\n' +\n '\\n' +\n 'Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\\n' +\n 'The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\\n' +\n 'THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n',\n\n 'nl': 'MIT-licentie\\n' +\n '\\n' +\n 'Copyright © 2014-2021 bluefox, 2014 hobbyquaker\\n' +\n '\\n' +\n 'Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\\n' +\n 'The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\\n' +\n 'THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n',\n\n 'es': 'Licencia MIT\\n' +\n '\\n' +\n 'Copyright © 2014-2021 bluefox, 2014 hobbyquaker\\n' +\n '\\n' +\n 'Se concede permiso, de forma gratuita, a cualquier persona que obtenga una copia de este software y de los archivos de documentación asociados (el \"Software\"), para utilizar el Software sin restricción, incluyendo sin limitación los derechos a usar, copiar, modificar, fusionar, publicar, distribuir, sublicenciar, y/o vender copias del Software, y a permitir a las personas a las que se les proporcione el Software a hacer lo mismo, sujeto a las siguientes condiciones:\\n' +\n 'El aviso de copyright anterior y este aviso de permiso se incluirán en todas las copias o partes sustanciales del Software.\\n' +\n 'EL SOFTWARE SE PROPORCIONA \"TAL CUAL\", SIN GARANTÍA DE NINGÚN TIPO, EXPRESA O IMPLÍCITA, INCLUYENDO PERO NO LIMITADO A GARANTÍAS DE COMERCIALIZACIÓN, IDONEIDAD PARA UN PROPÓSITO PARTICULAR Y NO INFRACCIÓN. EN NINGÚN CASO LOS AUTORES O TITULARES DEL COPYRIGHT SERÁN RESPONSABLES DE NINGUNA RECLAMACIÓN, DAÑOS U OTRAS RESPONSABILIDADES, YA SEA EN UNA ACCIÓN DE CONTRATO, AGRAVIO O CUALQUIER OTRO MOTIVO, QUE SURJA DE O EN CONEXIÓN CON EL SOFTWARE O EL USO U OTRO TIPO DE ACCIONES EN EL SOFTWARE.',\n\n 'pl': 'Licencja MIT\\n' +\n '\\n' +\n 'Copyright © 2014-2021 bluefox, 2014 hobbyquaker\\n' +\n '\\n' +\n 'Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\\n' +\n 'The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\\n' +\n 'THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n',\n\n 'zh-cn': 'MIT许可证\\n' +\n '\\n' +\n 'Copyright © 2014-2021 bluefox, 2014 hobbyquaker\\n' +\n '\\n' +\n '特此向任何得到本软件副本或相关文档的人授权:被授权人有权使用、复制、修改、 合并、出版、发布、散布、再授权和/或贩售软件及软件的副本,及授予被供应人 同等权利,只需服从以下义务:\\n' +\n '在软件和软件的所有副本中都必须包含以上版权声明和本许可声明。\\n' +\n '该软件是\"按原样\"提供的,没有任何形式的明示或暗示,包括但不限于为特定目的和 不侵权的适销性和适用性的保证担保。在任何情况下,作者或版权持有人,都无权要求 任何索赔,或有关损害赔偿的其他责任。无论在本软件的使用上或其他买卖交易中, 是否涉及合同,侵权或其他行为。\\n'\n};\n\nexport default license;","import { createRef, Component } from 'react';\nimport {withStyles} from '@mui/styles';\nimport PropTypes from 'prop-types';\nimport Toolbar from '@mui/material/Toolbar';\nimport MenuItem from '@mui/material/MenuItem';\nimport Grid from '@mui/material/Grid';\nimport Select from '@mui/material/Select';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport Checkbox from '@mui/material/Checkbox';\nimport Button from '@mui/material/Button';\nimport FormControl from '@mui/material/FormControl';\nimport InputLabel from '@mui/material/InputLabel';\nimport Paper from '@mui/material/Paper';\nimport Dialog from '@mui/material/Dialog';\nimport DialogActions from '@mui/material/DialogActions';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogContentText from '@mui/material/DialogContentText';\nimport DialogTitle from '@mui/material/DialogTitle';\n\nimport IconWorld from '@mui/icons-material/Language';\nimport IconCheck from '@mui/icons-material/Check';\nimport IconCancel from '@mui/icons-material/Close';\n\nimport I18n from '@iobroker/adapter-react-v5/i18n';\nimport withWidth from '@iobroker/adapter-react-v5/Components/withWidth';\nimport LicenseTexts from '../LicenseTexts';\n\nconst TOOLBAR_HEIGHT = 64;\n\nconst styles = theme => ({\n paper: {\n height: '100%',\n maxHeight: '100%',\n maxWidth: '100%',\n overflow: 'hidden',\n },\n gridDiv: {\n height: 'calc(100% - ' + TOOLBAR_HEIGHT + 'px)',\n width: '100%',\n overflow: 'hidden',\n padding: theme.spacing(2),\n textAlign: 'center'\n },\n languageSelect: {\n minWidth: 200,\n marginRight: theme.spacing(3),\n },\n licenseDiv: {\n width: '100%',\n height: `calc(100% - ${theme.mixins.toolbar.minHeight + parseInt(theme.spacing(1), 10) + 70}px)`,\n overflow: 'auto',\n },\n grow: {\n flexGrow: 1,\n },\n statAccept: {\n marginTop: 10,\n color: '#ff636e',\n },\n statAcceptDiv: {\n display: 'inline-block',\n },\n statAcceptNote: {\n textAlign: 'left',\n marginLeft: 32,\n },\n greenButton: {\n marginLeft: theme.spacing(1),\n },\n toolbar: {\n height: TOOLBAR_HEIGHT,\n lineHeight: TOOLBAR_HEIGHT + 'px',\n },\n licenseTextDiv: {\n width: '100%',\n maxWidth: 600,\n textAlign: 'left',\n margin: 'auto',\n },\n licenseText: {\n marginBottom: 15,\n }\n});\n\nclass WizardLicenseTab extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n statisticsAccepted: false,\n lang: this.props.lang || I18n.getLanguage(),\n notAgree: false,\n };\n\n this.focusRef = createRef();\n }\n\n componentDidMount() {\n this.focusRef.current && this.focusRef.current.focus();\n }\n\n renderNotAgree() {\n if (!this.state.notAgree) {\n return null;\n }\n return <Dialog\n open={true}\n onClose={() => this.setState({ notAgree: false }) }\n >\n <DialogTitle >{ this.props.t('Message') }</DialogTitle>\n <DialogContent>\n <DialogContentText id=\"alert-dialog-description\">\n <span role=\"img\" aria-label=\"unhappy\">😒</span> { this.props.t('Sorry, you cannot use ioBroker.')}\n </DialogContentText>\n </DialogContent>\n <DialogActions>\n <Button\n onClick={() => this.setState({ notAgree: false }) }\n color=\"primary\"\n startIcon={<IconCheck/>}\n >\n { I18n.t('Understand') }\n </Button>\n </DialogActions>\n </Dialog>\n }\n\n renderLicenseText() {\n let lines = LicenseTexts[I18n.getLanguage()] || LicenseTexts.en;\n lines = lines.split('\\n');\n return <div className={this.props.classes.licenseTextDiv}>{lines.map((line, i) => <div className={this.props.classes.licenseText} key={i}>{line}</div>)}</div>;\n }\n\n render() {\n return <Paper className={ this.props.classes.paper }>\n <Grid container className={ this.props.classes.gridDiv } direction=\"column\">\n <Grid item>\n <FormControl variant=\"standard\" className={ this.props.classes.languageSelect }>\n <InputLabel><IconWorld/>{ this.props.t('Language') }</InputLabel>\n <Select\n variant=\"standard\"\n value={ I18n.getLanguage() }\n onChange={e => {\n I18n.setLanguage(e.target.value);\n this.setState( { lang: e.target.value });\n }}\n >\n <MenuItem value=\"en\">English</MenuItem>\n <MenuItem value=\"de\">Deutsch</MenuItem>\n <MenuItem value=\"ru\">русский</MenuItem>\n <MenuItem value=\"pt\">Portugues</MenuItem>\n <MenuItem value=\"nl\">Nederlands</MenuItem>\n <MenuItem value=\"fr\">français</MenuItem>\n <MenuItem value=\"it\">Italiano</MenuItem>\n <MenuItem value=\"es\">Espanol</MenuItem>\n <MenuItem value=\"pl\">Polski</MenuItem>\n <MenuItem value=\"zh-cn\">简体中文</MenuItem>\n </Select>\n </FormControl>\n <div className={ this.props.classes.statAcceptDiv }>\n <FormControlLabel\n className={ this.props.classes.statAccept }\n control={<Checkbox ref={ this.focusRef } checked={ this.state.statisticsAccepted } onChange={e => this.setState({statisticsAccepted: e.target.checked }) } />}\n label={ this.props.t('I agree with the collection of anonymous statistics.') }\n />\n <div className={ this.props.classes.statAcceptNote }>{ this.props.t('(This can be disabled later in settings)') }</div>\n </div>\n </Grid>\n <Grid item>\n <h1>{ this.props.t('License terms') }</h1>\n </Grid>\n <Grid item className={ this.props.classes.licenseDiv }>\n {this.renderLicenseText()}\n </Grid>\n </Grid>\n <Toolbar className={ this.props.classes.toolbar }>\n <div className={ this.props.classes.grow }/>\n <Button variant=\"contained\" color=\"grey\" onClick={ () => this.setState({notAgree: true}) } startIcon={<IconCancel/>}>{ this.props.t('Not agree') }</Button>\n <Button variant=\"contained\" color=\"primary\" className={ this.props.classes.greenButton } disabled={ !this.state.statisticsAccepted } onClick={ () => this.props.onDone({lang: this.state.lang}) } startIcon={<IconCheck/>}>{ this.props.t('Agree') }</Button>\n <div className={ this.props.classes.grow }/>\n </Toolbar>\n { this.renderNotAgree() }\n </Paper>;\n }\n}\n\nWizardLicenseTab.propTypes = {\n t: PropTypes.func,\n socket: PropTypes.object,\n onDone: PropTypes.func.isRequired,\n};\n\nexport default withWidth()(withStyles(styles)(WizardLicenseTab));\n","var _excluded = [\"title\", \"titleId\"];\n\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgPin(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 293.334 293.334\",\n width: \"48px\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n style: {\n fill: \"#4dabf5\"\n },\n d: \"M146.667,0C94.903,0,52.946,41.957,52.946,93.721c0,22.322,7.849,42.789,20.891,58.878 c4.204,5.178,11.237,13.331,14.903,18.906c21.109,32.069,48.19,78.643,56.082,116.864c1.354,6.527,2.986,6.641,4.743,0.212 c5.629-20.609,20.228-65.639,50.377-112.757c3.595-5.619,10.884-13.483,15.409-18.379c6.554-7.098,12.009-15.224,16.154-24.084 c5.651-12.086,8.882-25.466,8.882-39.629C240.387,41.962,198.43,0,146.667,0z M146.667,144.358 c-28.892,0-52.313-23.421-52.313-52.313c0-28.887,23.421-52.307,52.313-52.307s52.313,23.421,52.313,52.307 C198.98,120.938,175.559,144.358,146.667,144.358z\"\n }), /*#__PURE__*/React.createElement(\"circle\", {\n style: {\n fill: \"#4dabf5\"\n },\n cx: 146.667,\n cy: 90.196,\n r: 21.756\n })));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgPin);\nexport default __webpack_public_path__ + \"static/media/pin.773680e20aed21cad6ec30a795863659.svg\";\nexport { ForwardRef as ReactComponent };","import { createRef, Component } from 'react';\nimport { withStyles } from '@mui/styles';\nimport PropTypes from 'prop-types';\nimport Grid from '@mui/material/Grid';\nimport Toolbar from '@mui/material/Grid';\nimport InputLabel from '@mui/material/InputLabel';\nimport MenuItem from '@mui/material/MenuItem';\nimport FormControl from '@mui/material/FormControl';\nimport Select from '@mui/material/Select';\nimport TextField from '@mui/material/TextField';\nimport Fab from '@mui/material/Fab';\n\nimport 'ol/ol.css';\nimport Map from 'ol/Map';\nimport View from 'ol/View';\nimport Feature from 'ol/Feature';\nimport {Tile, Vector as LayerVector } from 'ol/layer';\nimport { Icon, Style } from 'ol/style';\nimport {OSM, Vector as VectorSource} from 'ol/source';\nimport { Point } from 'ol/geom';\nimport { toLonLat, fromLonLat } from 'ol/proj';\n\nimport Button from '@mui/material/Button';\nimport Paper from '@mui/material/Paper';\n\nimport withWidth from '@iobroker/adapter-react-v5/Components/withWidth';\n\n//Icons\nimport {FaCrosshairs as GeoIcon} from 'react-icons/fa';\nimport PinSVG from '../../assets/pin.svg';\nimport IconCheck from '@mui/icons-material/Check';\n\nconst TOOLBAR_HEIGHT = 64;\nconst SETTINGS_WIDTH = 300;\n\nconst styles = theme => ({\n paper: {\n height: '100%',\n maxHeight: '100%',\n maxWidth: '100%',\n overflow: 'hidden',\n },\n title: {\n color: theme.palette.secondary.main,\n },\n mainGrid: {\n height: 'calc(100% - ' + TOOLBAR_HEIGHT + 'px)',\n overflow: 'auto',\n },\n grow: {\n flexGrow: 1,\n },\n mapGrid: {\n height: '100%',\n width: `calc(100% - ${SETTINGS_WIDTH + parseInt(theme.spacing(4), 10)}px)`,\n overflow: 'hidden',\n },\n map: {\n height: '100%',\n width: '100%',\n overflow: 'hidden',\n },\n controlItem: {\n width: SETTINGS_WIDTH,\n marginBottom: theme.spacing(1),\n },\n controlItemAddress: {\n width: SETTINGS_WIDTH - 40,\n marginBottom: theme.spacing(1),\n },\n gridSettings: {\n width: SETTINGS_WIDTH + parseInt(theme.spacing(2), 10),\n margin: theme.spacing(1),\n textAlign: 'left',\n height: '100%',\n overflow: 'auto'\n },\n toolbar: {\n height: TOOLBAR_HEIGHT,\n lineHeight: TOOLBAR_HEIGHT + 'px',\n },\n settingsGrid: {\n width: '100%',\n height: 'calc(100% - 54px)',\n }\n});\n\nclass WizardSettingsTab extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n password: '',\n passwordRepeat: '',\n errorPassword: false,\n errorPasswordRepeat: false,\n tempUnit: '°C',\n currency: '€',\n dateFormat: 'DD.MM.YYYY',\n isFloatComma: true,\n country: '',\n city: '',\n address: '',\n longitude: 0,\n latitude: 0,\n firstDayOfWeek: 'monday'\n };\n\n this.focusRef = createRef();\n\n this.props.socket.getCompactSystemConfig(true)\n .then(obj =>\n this.setState({\n tempUnit: obj.common.tempUnit,\n currency: obj.common.currency,\n dateFormat: obj.common.dateFormat,\n isFloatComma: obj.common.isFloatComma,\n country: obj.common.country,\n city: obj.common.city,\n address: '',\n longitude: obj.common.longitude,\n latitude: obj.common.latitude,\n firstDayOfWeek: obj.common.firstDayOfWeek || 'monday',\n }, () => this.updateMap()));\n }\n\n positionReady(position) {\n this.setState({\n latitude: position.coords.latitude.toFixed(8),\n longitude: position.coords.longitude.toFixed(8)\n }, () => this.updateMap());\n }\n\n getPositionForAddress() {\n window.fetch('https://nominatim.openstreetmap.org/search?format=json&q=' + encodeURIComponent(this.state.country + ' ' + this.state.city + ' ' + this.state.address))\n .then(data => data.json())\n .then(data => {\n let changed = false;\n\n if (!data || !data[0]) {\n return window.alert(this.props.t('Nothing found'));\n }\n\n let latitude = parseFloat(this.state.latitude);\n if (latitude !== parseFloat(data[0].lat)) {\n latitude = parseFloat(data[0].lat);\n changed = true;\n }\n let longitude = parseFloat(this.state.longitude);\n if (longitude !== parseFloat(data[0].lon)) {\n longitude = parseFloat(data[0].lon);\n changed = true;\n }\n changed && this.setState({longitude, latitude}, () =>\n this.updateMap());\n })\n .catch(e =>\n window.alert(this.props.t('Cannot fetch address %s', e)));\n }\n\n updateMap() {\n // OPEN STREET MAPS\n if (window.navigator.geolocation && (!this.state.longitude || !this.state.latitude)) {\n window.navigator.geolocation.getCurrentPosition(position => this.positionReady(position));\n }\n\n const center = fromLonLat([parseFloat(this.state.longitude || 0), parseFloat(this.state.latitude || 0)]);\n\n if (!this.OSM) {\n // get the coordinates from browser\n\n this.OSM = {};\n this.OSM.markerSource = new VectorSource();\n\n this.OSM.markerStyle = new Style({\n image: new Icon(/** @type {olx.style.IconOptions} */ ({\n anchor: [0.5, 49],\n anchorXUnits: 'fraction',\n anchorYUnits: 'pixels',\n opacity: 0.75,\n src: PinSVG\n }))\n });\n\n this.OSM.oMap = new Map({\n target: 'map',\n layers: [\n new Tile({source: new OSM()}),\n new LayerVector({\n source: this.OSM.markerSource,\n style: this.OSM.markerStyle,\n })\n ],\n view: new View({center, zoom: 17})\n });\n\n this.OSM.marker = new Feature({\n geometry: new Point(center),\n name: this.props.t('Your home')\n });\n\n this.OSM.markerSource.addFeature(this.OSM.marker);\n\n this.OSM.oMap.on('singleclick', event => {\n const lonLat = toLonLat(event.coordinate);\n this.setState( {longitude: lonLat[0], latitude: lonLat[1]}, () => this.updateMap());\n });\n }\n\n const zoom = this.OSM.oMap.getView().getZoom();\n this.OSM.marker.setGeometry(new Point(center));\n this.OSM.oMap.setView(new View({center, zoom}));\n }\n\n componentDidMount() {\n this.focusRef.current && this.focusRef.current.focus();\n this.updateMap();\n }\n\n render() {\n return <Paper className={ this.props.classes.paper }>\n <Grid container direction=\"column\" className={ this.props.classes.mainGrid }>\n <Grid item className={ this.props.classes.gridSettings }>\n <Grid container direction=\"column\">\n <Grid item>\n <h2 className={ this.props.classes.title }>{ this.props.t('Important main settings') }</h2>\n </Grid>\n <Grid container direction=\"column\" className={this.props.classes.settingsGrid}>\n <Grid item style={{textAlign: 'left'}}>\n <FormControl variant=\"standard\" className={ this.props.classes.controlItem }>\n <InputLabel>{ this.props.t('Temperature unit') }</InputLabel>\n <Select\n variant=\"standard\"\n value={ this.state.tempUnit }\n onChange={e => this.setState({tempUnit: e.target.value}) }\n >\n <MenuItem value=\"°C\">°C</MenuItem>\n <MenuItem value=\"°F\">°F</MenuItem>\n </Select>\n </FormControl>\n </Grid>\n <Grid item>\n <TextField\n variant=\"standard\"\n label={ this.props.t('Currency') }\n className={ this.props.classes.controlItem }\n value={ this.state.currency }\n onChange={ e => this.setState( {currency: e.target.value })}\n />\n </Grid>\n <Grid item style={{textAlign: 'left'}}>\n <FormControl variant=\"standard\" className={ this.props.classes.controlItem }>\n <InputLabel>{ this.props.t('Date format') }</InputLabel>\n <Select\n variant=\"standard\"\n value={ this.state.dateFormat }\n onChange={e => this.setState({dateFormat: e.target.value}) }\n >\n <MenuItem value=\"DD.MM.YYYY\">DD.MM.YYYY</MenuItem>\n <MenuItem value=\"YYYY.MM.DD\">YYYY.MM.DD</MenuItem>\n <MenuItem value=\"MM/DD/YYYY\">MM/DD/YYYY</MenuItem>\n </Select>\n </FormControl>\n </Grid>\n <Grid item style={{textAlign: 'left'}}>\n <FormControl variant=\"standard\" className={ this.props.classes.controlItem }>\n <InputLabel>{ this.props.t('Float divider') }</InputLabel>\n <Select\n variant=\"standard\"\n value={ this.state.isFloatComma }\n onChange={e => this.setState({isFloatComma: e.target.value}) }\n >\n <MenuItem value={ true }>{this.props.t('comma')} - 3,14</MenuItem>\n <MenuItem value={ false }>{this.props.t('point')} - 3.14</MenuItem>\n </Select>\n </FormControl>\n </Grid>\n <Grid item style={{textAlign: 'left'}}>\n <FormControl variant=\"standard\" className={ this.props.classes.controlItem }>\n <InputLabel>{ this.props.t('Country') }</InputLabel>\n <Select\n variant=\"standard\"\n value={ this.state.country || '' }\n onChange={e => this.setState({country: e.target.value}) }\n >\n <MenuItem value=\"\">{ this.props.t('Please select country') }</MenuItem>\n <MenuItem value=\"Germany\">{ this.props.t('Germany') }</MenuItem>\n <MenuItem value=\"Austria\">{ this.props.t('Austria') }</MenuItem>\n <MenuItem value=\"Switzerland\">{ this.props.t('Switzerland') }</MenuItem>\n <MenuItem value=\"Russian Federation\">{ this.props.t('Russian Federation') }</MenuItem>\n <MenuItem value=\"France\">{ this.props.t('France') }</MenuItem>\n <MenuItem value=\"Netherlands\">{ this.props.t('Netherlands') }</MenuItem>\n <MenuItem value=\"Italy\">{ this.props.t('Italy') }</MenuItem>\n <MenuItem value=\"United Kingdom\">{ this.props.t('United Kingdom') }</MenuItem>\n <MenuItem value=\"United States\">{ this.props.t('United States') }</MenuItem>\n <MenuItem value=\"China\">{ this.props.t('China') }</MenuItem>\n\n <MenuItem value=\"Afghanistan\">{ this.props.t('Afghanistan') }</MenuItem>\n <MenuItem value=\"Albania\">{ this.props.t('Albania') }</MenuItem>\n <MenuItem value=\"Algeria\">{ this.props.t('Algeria') }</MenuItem>\n <MenuItem value=\"American Samoa\">{ this.props.t('American Samoa') }</MenuItem>\n <MenuItem value=\"Andorra\">{ this.props.t('Andorra') }</MenuItem>\n <MenuItem value=\"Angola\">{ this.props.t('Angola') }</MenuItem>\n <MenuItem value=\"Anguilla\">{ this.props.t('Anguilla') }</MenuItem>\n <MenuItem value=\"Antarctica\">{ this.props.t('Antarctica') }</MenuItem>\n <MenuItem value=\"Antigua and Barbuda\">{ this.props.t('Antigua and Barbuda') }</MenuItem>\n <MenuItem value=\"Argentina\">{ this.props.t('Argentina') }</MenuItem>\n <MenuItem value=\"Armenia\">{ this.props.t('Armenia') }</MenuItem>\n <MenuItem value=\"Aruba\">{ this.props.t('Aruba') }</MenuItem>\n <MenuItem value=\"Australia\">{ this.props.t('Australia') }</MenuItem>\n <MenuItem value=\"Azerbaijan\">{ this.props.t('Azerbaijan') }</MenuItem>\n <MenuItem value=\"Bahamas\">{ this.props.t('Bahamas') }</MenuItem>\n <MenuItem value=\"Bahrain\">{ this.props.t('Bahrain') }</MenuItem>\n <MenuItem value=\"Bangladesh\">{ this.props.t('Bangladesh') }</MenuItem>\n <MenuItem value=\"Barbados\">{ this.props.t('Barbados') }</MenuItem>\n <MenuItem value=\"Belarus\">{ this.props.t('Belarus') }</MenuItem>\n <MenuItem value=\"Belgium\">{ this.props.t('Belgium') }</MenuItem>\n <MenuItem value=\"Belize\">{ this.props.t('Belize') }</MenuItem>\n <MenuItem value=\"Benin\">{ this.props.t('Benin') }</MenuItem>\n <MenuItem value=\"Bermuda\">{ this.props.t('Bermuda') }</MenuItem>\n <MenuItem value=\"Bhutan\">{ this.props.t('Bhutan') }</MenuItem>\n <MenuItem value=\"Bolivia\">{ this.props.t('Bolivia') }</MenuItem>\n <MenuItem value=\"Bosnia and Herzegovina\">{ this.props.t('Bosnia and Herzegovina') }</MenuItem>\n <MenuItem value=\"Botswana\">{ this.props.t('Botswana') }</MenuItem>\n <MenuItem value=\"Bouvet Island\">{ this.props.t('Bouvet Island') }</MenuItem>\n <MenuItem value=\"Brazil\">{ this.props.t('Brazil') }</MenuItem>\n <MenuItem value=\"British Indian Ocean Territory\">{ this.props.t('British Indian Ocean Territory') }</MenuItem>\n <MenuItem value=\"Brunei Darussalam\">{ this.props.t('Brunei Darussalam') }</MenuItem>\n <MenuItem value=\"Bulgaria\">{ this.props.t('Bulgaria') }</MenuItem>\n <MenuItem value=\"Burkina Faso\">{ this.props.t('Burkina Faso') }</MenuItem>\n <MenuItem value=\"Burundi\">{ this.props.t('Burundi') }</MenuItem>\n <MenuItem value=\"Cambodia\">{ this.props.t('Cambodia') }</MenuItem>\n <MenuItem value=\"Cameroon\">{ this.props.t('Cameroon') }</MenuItem>\n <MenuItem value=\"Canada\">{ this.props.t('Canada') }</MenuItem>\n <MenuItem value=\"Cape Verde\">{ this.props.t('Cape Verde') }</MenuItem>\n <MenuItem value=\"Cayman Islands\">{ this.props.t('Cayman Islands') }</MenuItem>\n <MenuItem value=\"Central African Republic\">{ this.props.t('Central African Republic') }</MenuItem>\n <MenuItem value=\"Chad\">{ this.props.t('Chad') }</MenuItem>\n <MenuItem value=\"Chile\">{ this.props.t('Chile') }</MenuItem>\n <MenuItem value=\"Christmas Island\">{ this.props.t('Christmas Island') }</MenuItem>\n <MenuItem value=\"Cocos Islands\">{ this.props.t('Cocos Islands') }</MenuItem>\n <MenuItem value=\"Colombia\">{ this.props.t('Colombia') }</MenuItem>\n <MenuItem value=\"Comoros\">{ this.props.t('Comoros') }</MenuItem>\n <MenuItem value=\"Congo\">{ this.props.t('Congo') }</MenuItem>\n <MenuItem value=\"Cook Islands\">{ this.props.t('Cook Islands') }</MenuItem>\n <MenuItem value=\"Costa Rica\">{ this.props.t('Costa Rica') }</MenuItem>\n <MenuItem value=\"Croatia\">{ this.props.t('Croatia') }</MenuItem>\n <MenuItem value=\"Cuba\">{ this.props.t('Cuba') }</MenuItem>\n <MenuItem value=\"Cyprus\">{ this.props.t('Cyprus') }</MenuItem>\n <MenuItem value=\"Czech Republic\">{ this.props.t('Czech Republic') }</MenuItem>\n <MenuItem value=\"Denmark\">{ this.props.t('Denmark') }</MenuItem>\n <MenuItem value=\"Djibouti\">{ this.props.t('Djibouti') }</MenuItem>\n <MenuItem value=\"Dominica\">{ this.props.t('Dominica') }</MenuItem>\n <MenuItem value=\"Dominican Republic\">{ this.props.t('Dominican Republic') }</MenuItem>\n <MenuItem value=\"East Timor\">{ this.props.t('East Timor') }</MenuItem>\n <MenuItem value=\"Ecuador\">{ this.props.t('Ecuador') }</MenuItem>\n <MenuItem value=\"Egypt\">{ this.props.t('Egypt') }</MenuItem>\n <MenuItem value=\"El Salvador\">{ this.props.t('El Salvador') }</MenuItem>\n <MenuItem value=\"Equatorial Guinea\">{ this.props.t('Equatorial Guinea') }</MenuItem>\n <MenuItem value=\"Eritrea\">{ this.props.t('Eritrea') }</MenuItem>\n <MenuItem value=\"Estonia\">{ this.props.t('Estonia') }</MenuItem>\n <MenuItem value=\"Ethiopia\">{ this.props.t('Ethiopia') }</MenuItem>\n <MenuItem value=\"Falkland Islands (Malvinas)\">{ this.props.t('Falkland Islands (Malvinas)') }</MenuItem>\n <MenuItem value=\"Faroe Islands\">{ this.props.t('Faroe Islands') }</MenuItem>\n <MenuItem value=\"Fiji\">{ this.props.t('Fiji') }</MenuItem>\n <MenuItem value=\"Finland\">{ this.props.t('Finland') }</MenuItem>\n <MenuItem value=\"French Guiana\">{ this.props.t('French Guiana') }</MenuItem>\n <MenuItem value=\"French Polynesia\">{ this.props.t('French Polynesia') }</MenuItem>\n <MenuItem value=\"French Southern Territories\">{ this.props.t('French Southern Territories') }</MenuItem>\n <MenuItem value=\"Gabon\">{ this.props.t('Gabon') }</MenuItem>\n <MenuItem value=\"Gambia\">{ this.props.t('Gambia') }</MenuItem>\n <MenuItem value=\"Georgia\">{ this.props.t('Georgia') }</MenuItem>\n <MenuItem value=\"Ghana\">{ this.props.t('Ghana') }</MenuItem>\n <MenuItem value=\"Gibraltar\">{ this.props.t('Gibraltar') }</MenuItem>\n <MenuItem value=\"Guernsey\">{ this.props.t('Guernsey') }</MenuItem>\n <MenuItem value=\"Greece\">{ this.props.t('Greece') }</MenuItem>\n <MenuItem value=\"Greenland\">{ this.props.t('Greenland') }</MenuItem>\n <MenuItem value=\"Grenada\">{ this.props.t('Grenada') }</MenuItem>\n <MenuItem value=\"Guadeloupe\">{ this.props.t('Guadeloupe') }</MenuItem>\n <MenuItem value=\"Guam\">{ this.props.t('Guam') }</MenuItem>\n <MenuItem value=\"Guatemala\">{ this.props.t('Guatemala') }</MenuItem>\n <MenuItem value=\"Guinea\">{ this.props.t('Guinea') }</MenuItem>\n <MenuItem value=\"Guinea-Bissau\">{ this.props.t('Guinea-Bissau') }</MenuItem>\n <MenuItem value=\"Guyana\">{ this.props.t('Guyana') }</MenuItem>\n <MenuItem value=\"Haiti\">{ this.props.t('Haiti') }</MenuItem>\n <MenuItem value=\"Heard and Mc Donald Islands\">{ this.props.t('Heard and Mc Donald Islands') }</MenuItem>\n <MenuItem value=\"Honduras\">{ this.props.t('Honduras') }</MenuItem>\n <MenuItem value=\"Hong Kong\">{ this.props.t('Hong Kong') }</MenuItem>\n <MenuItem value=\"Hungary\">{ this.props.t('Hungary') }</MenuItem>\n <MenuItem value=\"Iceland\">{ this.props.t('Iceland') }</MenuItem>\n <MenuItem value=\"India\">{ this.props.t('India') }</MenuItem>\n <MenuItem value=\"Isle of Man\">{ this.props.t('Isle of Man') }</MenuItem>\n <MenuItem value=\"Indonesia\">{ this.props.t('Indonesia') }</MenuItem>\n <MenuItem value=\"Iran\">{ this.props.t('Iran') }</MenuItem>\n <MenuItem value=\"Iraq\">{ this.props.t('Iraq') }</MenuItem>\n <MenuItem value=\"Ireland\">{ this.props.t('Ireland') }</MenuItem>\n <MenuItem value=\"Israel\">{ this.props.t('Israel') }</MenuItem>\n <MenuItem value=\"Ivory Coast\">{ this.props.t('Ivory Coast') }</MenuItem>\n <MenuItem value=\"Jersey\">{ this.props.t('Jersey') }</MenuItem>\n <MenuItem value=\"Jamaica\">{ this.props.t('Jamaica') }</MenuItem>\n <MenuItem value=\"Japan\">{ this.props.t('Japan') }</MenuItem>\n <MenuItem value=\"Jordan\">{ this.props.t('Jordan') }</MenuItem>\n <MenuItem value=\"Kazakhstan\">{ this.props.t('Kazakhstan') }</MenuItem>\n <MenuItem value=\"Kenya\">{ this.props.t('Kenya') }</MenuItem>\n <MenuItem value=\"Kiribati\">{ this.props.t('Kiribati') }</MenuItem>\n <MenuItem value=\"Korea\">{ this.props.t('Korea') }</MenuItem>\n <MenuItem value=\"Kosovo\">{ this.props.t('Kosovo') }</MenuItem>\n <MenuItem value=\"Kuwait\">{ this.props.t('Kuwait') }</MenuItem>\n <MenuItem value=\"Kyrgyzstan\">{ this.props.t('Kyrgyzstan') }</MenuItem>\n <MenuItem value=\"Lao People's Democratic Republic\">{ this.props.t('Lao People\\'s Democratic Republic') }</MenuItem>\n <MenuItem value=\"Latvia\">{ this.props.t('Latvia') }</MenuItem>\n <MenuItem value=\"Lebanon\">{ this.props.t('Lebanon') }</MenuItem>\n <MenuItem value=\"Lesotho\">{ this.props.t('Lesotho') }</MenuItem>\n <MenuItem value=\"Liberia\">{ this.props.t('Liberia') }</MenuItem>\n <MenuItem value=\"Libyan Arab Jamahiriya\">{ this.props.t('Libyan Arab Jamahiriya') }</MenuItem>\n <MenuItem value=\"Liechtenstein\">{ this.props.t('Liechtenstein') }</MenuItem>\n <MenuItem value=\"Lithuania\">{ this.props.t('Lithuania') }</MenuItem>\n <MenuItem value=\"Luxembourg\">{ this.props.t('Luxembourg') }</MenuItem>\n <MenuItem value=\"Macau\">{ this.props.t('Macau') }</MenuItem>\n <MenuItem value=\"Macedonia\">{ this.props.t('Macedonia') }</MenuItem>\n <MenuItem value=\"Madagascar\">{ this.props.t('Madagascar') }</MenuItem>\n <MenuItem value=\"Malawi\">{ this.props.t('Malawi') }</MenuItem>\n <MenuItem value=\"Malaysia\">{ this.props.t('Malaysia') }</MenuItem>\n <MenuItem value=\"Maldives\">{ this.props.t('Maldives') }</MenuItem>\n <MenuItem value=\"Mali\">{ this.props.t('Mali') }</MenuItem>\n <MenuItem value=\"Malta\">{ this.props.t('Malta') }</MenuItem>\n <MenuItem value=\"Marshall Islands\">{ this.props.t('Marshall Islands') }</MenuItem>\n <MenuItem value=\"Martinique\">{ this.props.t('Martinique') }</MenuItem>\n <MenuItem value=\"Mauritania\">{ this.props.t('Mauritania') }</MenuItem>\n <MenuItem value=\"Mauritius\">{ this.props.t('Mauritius') }</MenuItem>\n <MenuItem value=\"Mayotte\">{ this.props.t('Mayotte') }</MenuItem>\n <MenuItem value=\"Mexico\">{ this.props.t('Mexico') }</MenuItem>\n <MenuItem value=\"Micronesia\">{ this.props.t('Micronesia') }</MenuItem>\n <MenuItem value=\"Moldova\">{ this.props.t('Moldova') }</MenuItem>\n <MenuItem value=\"Monaco\">{ this.props.t('Monaco') }</MenuItem>\n <MenuItem value=\"Mongolia\">{ this.props.t('Mongolia') }</MenuItem>\n <MenuItem value=\"Montenegro\">{ this.props.t('Montenegro') }</MenuItem>\n <MenuItem value=\"Montserrat\">{ this.props.t('Montserrat') }</MenuItem>\n <MenuItem value=\"Morocco\">{ this.props.t('Morocco') }</MenuItem>\n <MenuItem value=\"Mozambique\">{ this.props.t('Mozambique') }</MenuItem>\n <MenuItem value=\"Myanmar\">{ this.props.t('Myanmar') }</MenuItem>\n <MenuItem value=\"Namibia\">{ this.props.t('Namibia') }</MenuItem>\n <MenuItem value=\"Nauru\">{ this.props.t('Nauru') }</MenuItem>\n <MenuItem value=\"Nepal\">{ this.props.t('Nepal') }</MenuItem>\n <MenuItem value=\"Netherlands Antilles\">{ this.props.t('Netherlands Antilles') }</MenuItem>\n <MenuItem value=\"New Caledonia\">{ this.props.t('New Caledonia') }</MenuItem>\n <MenuItem value=\"New Zealand\">{ this.props.t('New Zealand') }</MenuItem>\n <MenuItem value=\"Nicaragua\">{ this.props.t('Nicaragua') }</MenuItem>\n <MenuItem value=\"Niger\">{ this.props.t('Niger') }</MenuItem>\n <MenuItem value=\"Nigeria\">{ this.props.t('Nigeria') }</MenuItem>\n <MenuItem value=\"Niue\">{ this.props.t('Niue') }</MenuItem>\n <MenuItem value=\"Norfolk Island\">{ this.props.t('Norfolk Island') }</MenuItem>\n <MenuItem value=\"Northern Mariana Islands\">{ this.props.t('Northern Mariana Islands') }</MenuItem>\n <MenuItem value=\"Norway\">{ this.props.t('Norway') }</MenuItem>\n <MenuItem value=\"Oman\">{ this.props.t('Oman') }</MenuItem>\n <MenuItem value=\"Pakistan\">{ this.props.t('Pakistan') }</MenuItem>\n <MenuItem value=\"Palau\">{ this.props.t('Palau') }</MenuItem>\n <MenuItem value=\"Palestine\">{ this.props.t('Palestine') }</MenuItem>\n <MenuItem value=\"Panama\">{ this.props.t('Panama') }</MenuItem>\n <MenuItem value=\"Papua New Guinea\">{ this.props.t('Papua New Guinea') }</MenuItem>\n <MenuItem value=\"Paraguay\">{ this.props.t('Paraguay') }</MenuItem>\n <MenuItem value=\"Peru\">{ this.props.t('Peru') }</MenuItem>\n <MenuItem value=\"Philippines\">{ this.props.t('Philippines') }</MenuItem>\n <MenuItem value=\"Pitcairn\">{ this.props.t('Pitcairn') }</MenuItem>\n <MenuItem value=\"Poland\">{ this.props.t('Poland') }</MenuItem>\n <MenuItem value=\"Portugal\">{ this.props.t('Portugal') }</MenuItem>\n <MenuItem value=\"Puerto Rico\">{ this.props.t('Puerto Rico') }</MenuItem>\n <MenuItem value=\"Qatar\">{ this.props.t('Qatar') }</MenuItem>\n <MenuItem value=\"Reunion\">{ this.props.t('Reunion') }</MenuItem>\n <MenuItem value=\"Romania\">{ this.props.t('Romania') }</MenuItem>\n <MenuItem value=\"Rwanda\">{ this.props.t('Rwanda') }</MenuItem>\n <MenuItem value=\"Saint Kitts and Nevis\">{ this.props.t('Saint Kitts and Nevis') }</MenuItem>\n <MenuItem value=\"Saint Lucia\">{ this.props.t('Saint Lucia') }</MenuItem>\n <MenuItem value=\"Saint Vincent and the Grenadines\">{ this.props.t('Saint Vincent and the Grenadines') }</MenuItem>\n <MenuItem value=\"Samoa\">{ this.props.t('Samoa') }</MenuItem>\n <MenuItem value=\"San Marino\">{ this.props.t('San Marino') }</MenuItem>\n <MenuItem value=\"Sao Tome and Principe\">{ this.props.t('Sao Tome and Principe') }</MenuItem>\n <MenuItem value=\"Saudi Arabia\">{ this.props.t('Saudi Arabia') }</MenuItem>\n <MenuItem value=\"Senegal\">{ this.props.t('Senegal') }</MenuItem>\n <MenuItem value=\"Serbia\">{ this.props.t('Serbia') }</MenuItem>\n <MenuItem value=\"Seychelles\">{ this.props.t('Seychelles') }</MenuItem>\n <MenuItem value=\"Sierra Leone\">{ this.props.t('Sierra Leone') }</MenuItem>\n <MenuItem value=\"Singapore\">{ this.props.t('Singapore') }</MenuItem>\n <MenuItem value=\"Slovakia\">{ this.props.t('Slovakia') }</MenuItem>\n <MenuItem value=\"Slovenia\">{ this.props.t('Slovenia') }</MenuItem>\n <MenuItem value=\"Solomon Islands\">{ this.props.t('Solomon Islands') }</MenuItem>\n <MenuItem value=\"Somalia\">{ this.props.t('Somalia') }</MenuItem>\n <MenuItem value=\"South Africa\">{ this.props.t('South Africa') }</MenuItem>\n <MenuItem value=\"South Georgia South Sandwich Islands\">{ this.props.t('South Georgia South Sandwich Islands') }</MenuItem>\n <MenuItem value=\"Spain\">{ this.props.t('Spain') }</MenuItem>\n <MenuItem value=\"Sri Lanka\">{ this.props.t('Sri Lanka') }</MenuItem>\n <MenuItem value=\"St. Helena\">{ this.props.t('St. Helena') }</MenuItem>\n <MenuItem value=\"St. Pierre and Miquelon\">{ this.props.t('St. Pierre and Miquelon') }</MenuItem>\n <MenuItem value=\"Sudan\">{ this.props.t('Sudan') }</MenuItem>\n <MenuItem value=\"Suriname\">{ this.props.t('Suriname') }</MenuItem>\n <MenuItem value=\"Svalbard and Jan Mayen Islands\">{ this.props.t('Svalbard and Jan Mayen Islands') }</MenuItem>\n <MenuItem value=\"Swaziland\">{ this.props.t('Swaziland') }</MenuItem>\n <MenuItem value=\"Sweden\">{ this.props.t('Sweden') }</MenuItem>\n <MenuItem value=\"Syrian Arab Republic\">{ this.props.t('Syrian Arab Republic') }</MenuItem>\n <MenuItem value=\"Taiwan\">{ this.props.t('Taiwan') }</MenuItem>\n <MenuItem value=\"Tajikistan\">{ this.props.t('Tajikistan') }</MenuItem>\n <MenuItem value=\"Tanzania\">{ this.props.t('Tanzania') }</MenuItem>\n <MenuItem value=\"Thailand\">{ this.props.t('Thailand') }</MenuItem>\n <MenuItem value=\"Togo\">{ this.props.t('Togo') }</MenuItem>\n <MenuItem value=\"Tokelau\">{ this.props.t('Tokelau') }</MenuItem>\n <MenuItem value=\"Tonga\">{ this.props.t('Tonga') }</MenuItem>\n <MenuItem value=\"Trinidad and Tobago\">{ this.props.t('Trinidad and Tobago') }</MenuItem>\n <MenuItem value=\"Tunisia\">{ this.props.t('Tunisia') }</MenuItem>\n <MenuItem value=\"Turkey\">{ this.props.t('Turkey') }</MenuItem>\n <MenuItem value=\"Turkmenistan\">{ this.props.t('Turkmenistan') }</MenuItem>\n <MenuItem value=\"Turks and Caicos Islands\">{ this.props.t('Turks and Caicos Islands') }</MenuItem>\n <MenuItem value=\"Tuvalu\">{ this.props.t('Tuvalu') }</MenuItem>\n <MenuItem value=\"Uganda\">{ this.props.t('Uganda') }</MenuItem>\n <MenuItem value=\"Ukraine\">{ this.props.t('Ukraine') }</MenuItem>\n <MenuItem value=\"United Arab Emirates\">{ this.props.t('United Arab Emirates') }</MenuItem>\n <MenuItem value=\"United States minor outlying islands\">{ this.props.t('United States minor outlying islands') }</MenuItem>\n <MenuItem value=\"Uruguay\">{ this.props.t('Uruguay') }</MenuItem>\n <MenuItem value=\"Uzbekistan\">{ this.props.t('Uzbekistan') }</MenuItem>\n <MenuItem value=\"Vanuatu\">{ this.props.t('Vanuatu') }</MenuItem>\n <MenuItem value=\"Vatican City State\">{ this.props.t('Vatican City State') }</MenuItem>\n <MenuItem value=\"Venezuela\">{ this.props.t('Venezuela') }</MenuItem>\n <MenuItem value=\"Vietnam\">{ this.props.t('Vietnam') }</MenuItem>\n <MenuItem value=\"Virgin Islands (British)\">{ this.props.t('Virgin Islands (British)') }</MenuItem>\n <MenuItem value=\"Virgin Islands (U.S.)\">{ this.props.t('Virgin Islands (U.S.)') }</MenuItem>\n <MenuItem value=\"Wallis and Futuna Islands\">{ this.props.t('Wallis and Futuna Islands') }</MenuItem>\n <MenuItem value=\"Western Sahara\">{ this.props.t('Western Sahara') }</MenuItem>\n <MenuItem value=\"Yemen\">{ this.props.t('Yemen') }</MenuItem>\n <MenuItem value=\"Zaire\">{ this.props.t('Zaire') }</MenuItem>\n <MenuItem value=\"Zambia\">{ this.props.t('Zambia') }</MenuItem>\n <MenuItem value=\"Zimbabwe\">{ this.props.t('Zimbabwe') }</MenuItem>\n </Select>\n </FormControl>\n </Grid>\n <Grid item>\n <TextField\n variant=\"standard\"\n label={ this.props.t('City') }\n className={ this.props.classes.controlItem }\n value={ this.state.city }\n onChange={ e => this.setState( {city: e.target.value })}\n />\n </Grid>\n <Grid item>\n <TextField\n variant=\"standard\"\n label={ this.props.t('Address') }\n className={ this.props.classes.controlItemAddress }\n value={ this.state.address }\n onKeyUp={e => e.keyCode === 13 && this.getPositionForAddress() }\n onChange={ e => this.setState( {address: e.target.value })}\n helperText={ this.props.t('Used only to calculate position.')}\n />\n <Fab size=\"small\" onClick={() => this.getPositionForAddress() }><GeoIcon/></Fab>\n </Grid>\n <Grid item>\n <TextField\n variant=\"standard\"\n label={ this.props.t('Longitude') }\n className={ this.props.classes.controlItem }\n value={ this.state.longitude }\n onChange={ e => this.setState( {longitude: parseFloat(e.target.value.replace(',', '.')) })}\n />\n </Grid>\n <Grid item>\n <TextField\n variant=\"standard\"\n label={ this.props.t('Latitude') }\n className={ this.props.classes.controlItem }\n value={ this.state.latitude }\n onChange={ e => this.setState( {latitude: parseFloat(e.target.value.replace(',', '.')) })}\n />\n </Grid>\n <Grid item style={{textAlign: 'left'}}>\n <FormControl variant=\"standard\" className={ this.props.classes.controlItem }>\n <InputLabel>{ this.props.t('Week starts with') }</InputLabel>\n <Select\n variant=\"standard\"\n value={ this.state.firstDayOfWeek }\n onChange={e => this.setState({firstDayOfWeek: e.target.value}) }\n >\n <MenuItem value=\"monday\">{this.props.t('monday')}</MenuItem>\n <MenuItem value=\"sunday\">{this.props.t('sunday')}</MenuItem>\n </Select>\n </FormControl>\n </Grid>\n </Grid>\n </Grid>\n </Grid>\n <Grid item className={ this.props.classes.mapGrid }>\n <div id=\"map\" className={ this.props.classes.map }/>\n </Grid>\n </Grid>\n <Toolbar className={ this.props.classes.toolbar }>\n <div className={ this.props.classes.grow }/>\n <Button\n variant=\"contained\"\n color=\"primary\"\n onClick={ () => this.props.onDone({\n tempUnit: this.state.tempUnit,\n currency: this.state.currency,\n dateFormat: this.state.dateFormat,\n isFloatComma: this.state.isFloatComma,\n country: this.state.country,\n city: this.state.city,\n longitude: this.state.longitude,\n latitude: this.state.latitude,\n }) }\n startIcon={<IconCheck/>}\n >{ this.props.t('Save') }</Button>\n <div className={ this.props.classes.grow }/>\n </Toolbar>\n </Paper>;\n }\n}\n\nWizardSettingsTab.propTypes = {\n t: PropTypes.func,\n socket: PropTypes.object,\n onDone: PropTypes.func.isRequired,\n};\n\nexport default withWidth()(withStyles(styles)(WizardSettingsTab));\n","import { createRef, Component } from 'react';\nimport {withStyles} from '@mui/styles';\nimport PropTypes from 'prop-types';\n\nimport Grid from '@mui/material/Grid';\nimport Toolbar from '@mui/material/Grid';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport Checkbox from '@mui/material/Checkbox';\nimport Button from '@mui/material/Button';\nimport Paper from '@mui/material/Paper';\nimport InputLabel from '@mui/material/InputLabel';\nimport MenuItem from '@mui/material/MenuItem';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport FormControl from '@mui/material/FormControl';\nimport Select from '@mui/material/Select';\nimport FormGroup from '@mui/material/FormGroup';\n\nimport IconCheck from '@mui/icons-material/Check';\n\nimport withWidth from '@iobroker/adapter-react-v5/Components/withWidth';\n\nconst TOOLBAR_HEIGHT = 64;\n\nconst styles = theme => ({\n paper: {\n height: '100%',\n maxHeight: '100%',\n maxWidth: '100%',\n overflow: 'hidden',\n },\n title: {\n color: theme.palette.secondary.main,\n },\n form: {\n height: `calc(100% - ${TOOLBAR_HEIGHT + parseInt(theme.spacing(1), 10)}px)`,\n overflow: 'auto',\n },\n input: {\n width: 400,\n textAlign: 'left',\n },\n inputLine: {\n width: 400,\n margin: 'auto',\n marginBottom: 50\n },\n grow: {\n flexGrow: 1,\n },\n toolbar: {\n height: TOOLBAR_HEIGHT,\n lineHeight: TOOLBAR_HEIGHT + 'px',\n }\n});\n\nclass WizardAuthSSLTab extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n auth: !!this.props.auth,\n secure: !!this.props.secure,\n };\n\n this.focusRef = createRef();\n }\n\n componentDidMount() {\n this.focusRef.current && this.focusRef.current.focus();\n }\n\n render() {\n return <Paper className={ this.props.classes.paper }>\n <form className={ this.props.classes.form} noValidate autoComplete=\"off\">\n <Grid container direction=\"column\">\n <Grid item>\n <h2 className={ this.props.classes.title }>{ this.props.t('It is suggested to enable the authentication in admin') }</h2>\n </Grid>\n <Grid item className={this.props.classes.inputLine}>\n <FormGroup>\n <FormControlLabel\n className={this.props.classes.input}\n control={\n <Checkbox\n checked={this.state.auth}\n onChange={() => this.setState({auth: !this.state.auth})}\n />\n }\n label={this.props.t('Authentication in Admin')}\n\n />\n <FormHelperText>{this.props.t('Activate the check of password in admin if you plan to access your ioBroker is not in \"Demilitarized Zone\"')}</FormHelperText>\n </FormGroup>\n </Grid>\n <Grid item>\n <FormControl variant=\"standard\" className={this.props.classes.input}>\n <InputLabel>{this.props.t('Certificates')}</InputLabel>\n <Select\n variant=\"standard\"\n value={this.state.secure}\n onChange={e => this.setState({secure: e.target.value})}\n >\n <MenuItem value={false}>{this.props.t('No SSL')}</MenuItem>\n <MenuItem value={true}>{this.props.t('Use self signed certificates')}</MenuItem>\n </Select>\n <FormHelperText>{this.state.secure ?\n this.props.t('Browsers will inform you about the problem with self-signed certificates, but the communication is encrypted.') :\n this.props.t('Your communication with admin is not encrypted')}</FormHelperText>\n </FormControl>\n </Grid>\n </Grid>\n </form>\n <Toolbar className={ this.props.classes.toolbar }>\n <div className={ this.props.classes.grow }/>\n <Button color=\"primary\" variant=\"contained\" onClick={ () => this.props.onDone({auth: this.state.auth, secure: this.state.secure}) } startIcon={<IconCheck/>}>{ this.props.t('Apply') }</Button>\n </Toolbar>\n </Paper>;\n }\n}\n\nWizardAuthSSLTab.propTypes = {\n auth: PropTypes.bool,\n secure: PropTypes.bool,\n t: PropTypes.func,\n socket: PropTypes.object,\n onDone: PropTypes.func.isRequired,\n};\n\nexport default withWidth()(withStyles(styles)(WizardAuthSSLTab));\n","import { createRef, Component } from 'react';\nimport {withStyles} from '@mui/styles';\nimport PropTypes from 'prop-types';\nimport Grid from '@mui/material/Grid';\nimport Toolbar from '@mui/material/Grid';\nimport Button from '@mui/material/Button';\nimport Paper from '@mui/material/Paper';\n\nimport IconCloud from '@mui/icons-material/Public';\nimport IconCloudPro from '@mui/icons-material/Language';\nimport IconCheck from '@mui/icons-material/Check';\n\nimport withWidth from '@iobroker/adapter-react-v5/Components/withWidth';\n\nconst TOOLBAR_HEIGHT = 64;\n\nconst styles = theme => ({\n paper: {\n height: '100%',\n maxHeight: '100%',\n maxWidth: '100%',\n overflow: 'hidden',\n },\n title: {\n color: theme.palette.secondary.main,\n },\n form: {\n height: `calc(100% - ${TOOLBAR_HEIGHT + parseInt(theme.spacing(1), 10)}px)`,\n overflow: 'auto',\n },\n input: {\n width: 400,\n marginBottom: theme.spacing(2)\n },\n grow: {\n flexGrow: 1,\n },\n toolbar: {\n height: TOOLBAR_HEIGHT,\n lineHeight: TOOLBAR_HEIGHT + 'px',\n },\n text: {\n fontSize: 16,\n },\n\n error: {\n fontSize: 24,\n color: '#c61f1f'\n },\n warning: {\n fontSize: 20,\n color: '#c6891f'\n },\n information: {\n fontSize: 18,\n color: '#429c1b'\n },\n button: {\n marginRight: theme.spacing(2),\n },\n});\n\nclass WizardPortForwarding extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n auth: true,\n secure: false\n };\n\n this.focusRef = createRef();\n }\n\n componentDidMount() {\n this.focusRef.current && this.focusRef.current.focus();\n }\n\n render() {\n return <Paper className={ this.props.classes.paper }>\n <form className={ this.props.classes.form} noValidate autoComplete=\"off\">\n <Grid container direction=\"column\">\n <Grid item>\n <h2 className={ this.props.classes.title }>{ this.props.t('Important information about port forwarding') }</h2>\n </Grid>\n <Grid item>\n {!this.props.auth ? <div className={this.props.classes.error}>{this.props.t('Warning!')}</div> : null}\n {this.props.auth && !this.props.secure ? <div className={this.props.classes.warning}>{this.props.t('Be aware!')}</div> : null}\n {this.props.auth && this.props.secure ? <div className={this.props.classes.information}>{this.props.t('Information')}</div> : null}\n\n <div className={this.props.classes.text}>{this.props.t('Do not expose iobroker Admin or Web interfaces to the internet directly via the port forwarding!')}</div>\n </Grid>\n <Grid item style={{marginTop: 16}}>\n <div className={this.props.classes.text}>{this.props.t('The Cloud services from iobroker.net/pro can help here to do that securely:')}</div>\n </Grid>\n <Grid item style={{marginTop: 16}}>\n <Button\n className={this.props.classes.button}\n color=\"secondary\"\n variant=\"contained\"\n onClick={ () => window.open('https://iobroker.pro', 'help') }\n startIcon={<IconCloudPro />}\n >ioBroker.pro</Button>\n <Button\n color=\"secondary\"\n variant=\"contained\"\n onClick={ () => window.open('https://iobroker.net', 'help') }\n startIcon={<IconCloud />}\n >ioBroker.net</Button>\n </Grid>\n </Grid>\n </form>\n <Toolbar className={ this.props.classes.toolbar }>\n <div className={ this.props.classes.grow }/>\n <Button color=\"primary\" variant=\"contained\" onClick={ () => this.props.onDone(this.state.password) } startIcon={<IconCheck/>}>{ this.props.t('Understand') }</Button>\n </Toolbar>\n </Paper>;\n }\n}\n\nWizardPortForwarding.propTypes = {\n auth: PropTypes.bool,\n secure: PropTypes.bool,\n t: PropTypes.func,\n socket: PropTypes.object,\n onDone: PropTypes.func.isRequired,\n};\n\nexport default withWidth()(withStyles(styles)(WizardPortForwarding));\n","var _style, _g, _path, _path2, _path3, _path4, _path5, _path6, _path7, _path8, _g2, _path9, _path10;\n\nvar _excluded = [\"title\", \"titleId\"];\n\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgLongLogo(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 550 370\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _style || (_style = /*#__PURE__*/React.createElement(\"style\", {\n type: \"text/css\"\n }, \"\\n\\t.st0{fill:#144578;}\\n\\t.st1{fill:#3499CC;}\\n\")), _g || (_g = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n className: \"st0\",\n d: \"M293.2,244.1h-2.4v-3.2h-8.3v3.2h-2.4v-6.5c0-1,0.2-1.8,0.5-2.6s0.8-1.5,1.4-2.1c0.6-0.6,1.3-1,2.1-1.3 c0.8-0.3,1.7-0.5,2.6-0.5h5.3c0.2,0,0.3,0,0.5,0.1c0.1,0.1,0.3,0.1,0.4,0.3c0.1,0.1,0.2,0.2,0.3,0.4c0.1,0.1,0.1,0.3,0.1,0.5V244.1 z M282.6,238.5h8.3v-5.1h-4.1c-0.1,0-0.2,0-0.5,0c-0.2,0-0.5,0.1-0.8,0.2c-0.3,0.1-0.6,0.2-1,0.4s-0.7,0.4-0.9,0.7 s-0.5,0.7-0.7,1.2s-0.3,1-0.3,1.7V238.5z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"st0\",\n d: \"M306.4,242.9c0,0.2,0,0.3-0.1,0.5c-0.1,0.1-0.1,0.3-0.3,0.4c-0.1,0.1-0.2,0.2-0.4,0.3 c-0.1,0.1-0.3,0.1-0.5,0.1h-5.3c-0.3,0-0.6,0-0.9-0.1c-0.3-0.1-0.7-0.2-1-0.3s-0.6-0.3-0.9-0.6c-0.3-0.2-0.6-0.5-0.8-0.8 c-0.2-0.3-0.4-0.7-0.5-1.1c-0.1-0.4-0.2-0.9-0.2-1.4v-5.4h2.4v5.4c0,0.3,0.1,0.6,0.2,0.8c0.1,0.2,0.3,0.5,0.4,0.6s0.4,0.3,0.6,0.4 s0.5,0.1,0.8,0.1h4.1v-7.5h2.4V242.9z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"st0\",\n d: \"M317.5,236.6h-4.1v7.5H311v-7.5H308v-2.4h3.1v-3.2h2.4v3.2h4.1V236.6z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"st0\",\n d: \"M329.7,240.8c0,0.4-0.1,0.8-0.2,1.1c-0.1,0.3-0.2,0.6-0.4,0.9c-0.2,0.2-0.4,0.5-0.6,0.6 c-0.2,0.2-0.5,0.3-0.7,0.4c-0.2,0.1-0.5,0.2-0.7,0.2s-0.5,0.1-0.7,0.1h-4.3c-0.3,0-0.7-0.1-1.1-0.2c-0.4-0.1-0.7-0.3-1.1-0.6 c-0.3-0.3-0.6-0.6-0.8-1s-0.3-0.9-0.3-1.5v-3.2c0-0.6,0.1-1.1,0.3-1.5s0.5-0.8,0.8-1c0.3-0.3,0.7-0.5,1.1-0.6 c0.4-0.1,0.7-0.2,1.1-0.2h4.3c0.6,0,1.1,0.1,1.5,0.3c0.4,0.2,0.8,0.5,1,0.8c0.3,0.3,0.5,0.7,0.6,1.1c0.1,0.4,0.2,0.7,0.2,1.1V240.8 z M327.4,237.6c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c0.3,0,0.7,0.1,1.1,0.2c0.4,0.1,0.7,0.3,1.1,0.6 c0.3,0.3,0.6,0.6,0.8,1C381,236.4,381.1,236.9,381.1,237.5z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"st0\",\n d: \"M396.2,244.1H392c-0.3,0-0.7-0.1-1.1-0.2c-0.4-0.1-0.7-0.3-1.1-0.6c-0.3-0.3-0.6-0.6-0.8-1s-0.3-0.9-0.3-1.5 v-6.5h2.4v6.5c0,0.3,0.1,0.5,0.2,0.7c0.2,0.2,0.4,0.2,0.7,0.2h4.2V244.1z M399.5,245c0,0.4-0.1,0.8-0.2,1.1 c-0.1,0.3-0.2,0.6-0.4,0.9c-0.2,0.2-0.4,0.5-0.6,0.6c-0.2,0.2-0.5,0.3-0.7,0.4s-0.5,0.2-0.7,0.2c-0.2,0.1-0.5,0.1-0.7,0.1H392V246 h4.3c0.3,0,0.6-0.1,0.7-0.2c0.2-0.2,0.2-0.4,0.2-0.7v-10.8h2.4V245z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"st0\",\n d: \"M412.5,240.8c0,0.4-0.1,0.8-0.2,1.1c-0.1,0.3-0.2,0.6-0.4,0.9c-0.2,0.2-0.4,0.5-0.6,0.6 c-0.2,0.2-0.5,0.3-0.7,0.4c-0.2,0.1-0.5,0.2-0.7,0.2s-0.5,0.1-0.7,0.1h-4.3c-0.3,0-0.7-0.1-1.1-0.2c-0.4-0.1-0.7-0.3-1.1-0.6 c-0.3-0.3-0.6-0.6-0.8-1s-0.3-0.9-0.3-1.5v-3.2c0-0.6,0.1-1.1,0.3-1.5s0.5-0.8,0.8-1c0.3-0.3,0.7-0.5,1.1-0.6 c0.4-0.1,0.7-0.2,1.1-0.2h4.3c0.6,0,1.1,0.1,1.5,0.3c0.4,0.2,0.8,0.5,1,0.8c0.3,0.3,0.5,0.7,0.6,1.1c0.1,0.4,0.2,0.7,0.2,1.1V240.8 z M410.1,237.6c0-0.3-0.1-0.6-0.2-0.7c-0.2-0.2-0.4-0.2-0.7-0.2h-4.2c-0.3,0-0.6,0.1-0.7,0.2c-0.2,0.2-0.2,0.4-0.2,0.7v3.2 c0,0.3,0.1,0.5,0.2,0.7c0.2,0.2,0.4,0.2,0.7,0.2h4.2c0.3,0,0.6-0.1,0.7-0.2c0.2-0.2,0.2-0.4,0.2-0.7V237.6z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"st0\",\n d: \"M425.2,242.9c0,0.2,0,0.3-0.1,0.5c-0.1,0.1-0.1,0.3-0.3,0.4c-0.1,0.1-0.2,0.2-0.4,0.3 c-0.1,0.1-0.3,0.1-0.5,0.1h-5.3c-0.3,0-0.6,0-0.9-0.1c-0.3-0.1-0.7-0.2-1-0.3s-0.6-0.3-0.9-0.6c-0.3-0.2-0.6-0.5-0.8-0.8 c-0.2-0.3-0.4-0.7-0.5-1.1c-0.1-0.4-0.2-0.9-0.2-1.4v-5.4h2.4v5.4c0,0.3,0.1,0.6,0.2,0.8c0.1,0.2,0.3,0.5,0.4,0.6s0.4,0.3,0.6,0.4 s0.5,0.1,0.8,0.1h4.1v-7.5h2.4V242.9z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"st0\",\n d: \"M436,236.6h-5.3c-0.3,0-0.6,0.1-0.7,0.2c-0.2,0.2-0.2,0.4-0.2,0.7v6.5h-2.4v-6.5c0-0.4,0.1-0.8,0.2-1.1 c0.1-0.3,0.2-0.6,0.4-0.8c0.2-0.2,0.4-0.5,0.6-0.6c0.2-0.2,0.5-0.3,0.7-0.4c0.2-0.1,0.5-0.2,0.7-0.2c0.3-0.1,0.5-0.1,0.7-0.1h5.3 V236.6z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"st0\",\n d: \"M447.8,244.1h-1.1c-0.3,0-0.7-0.1-1.1-0.2c-0.4-0.1-0.7-0.3-1.1-0.6c-0.3-0.3-0.6-0.6-0.8-1s-0.3-0.9-0.3-1.5 v-10.7h2.4v10.7c0,0.3,0.1,0.5,0.3,0.7c0.2,0.2,0.4,0.3,0.7,0.3h1.1V244.1z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"st0\",\n d: \"M451.7,232.2h-2.4v-2.1h2.4V232.2z M451.7,244.1h-2.4v-9.8h2.4V244.1z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"st0\",\n d: \"M462.6,232.4h-5.3c-0.3,0-0.6,0.1-0.7,0.2c-0.2,0.2-0.2,0.4-0.2,0.7v10.8H454v-10.8c0-0.4,0.1-0.8,0.2-1.1 c0.1-0.3,0.2-0.6,0.4-0.8c0.2-0.2,0.4-0.5,0.6-0.6c0.2-0.2,0.5-0.3,0.7-0.4c0.2-0.1,0.5-0.2,0.7-0.2c0.2-0.1,0.5-0.1,0.7-0.1h5.3 V232.4z M462.6,236.6h-5.3v-2.4h5.3V236.6z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"st0\",\n d: \"M474.7,237.5c0,0.3-0.1,0.7-0.2,1.1c-0.1,0.4-0.3,0.7-0.6,1.1c-0.3,0.3-0.6,0.6-1,0.8 c-0.4,0.2-0.9,0.3-1.5,0.3h-4.3v-2.2h4.3c0.3,0,0.6-0.1,0.7-0.3s0.3-0.4,0.3-0.7c0-0.3-0.1-0.6-0.3-0.7c-0.2-0.2-0.4-0.3-0.7-0.3 h-4.3c-0.3,0-0.6,0.1-0.7,0.3c-0.2,0.2-0.3,0.4-0.3,0.7v3.3c0,0.3,0.1,0.6,0.3,0.7c0.2,0.2,0.4,0.3,0.7,0.3h4.2v2.3h-4.3 c-0.3,0-0.7-0.1-1.1-0.2c-0.4-0.1-0.7-0.3-1.1-0.6c-0.3-0.3-0.6-0.6-0.8-1c-0.2-0.4-0.3-0.9-0.3-1.5v-3.3c0-0.3,0.1-0.7,0.2-1.1 c0.1-0.4,0.3-0.7,0.6-1.1c0.3-0.3,0.6-0.6,1-0.8c0.4-0.2,0.9-0.3,1.5-0.3h4.3c0.3,0,0.7,0.1,1.1,0.2c0.4,0.1,0.7,0.3,1.1,0.6 c0.3,0.3,0.6,0.6,0.8,1C474.6,236.4,474.7,236.9,474.7,237.5z\"\n }))), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n className: \"st1\",\n d: \"M221.6,211.5c0,1.3-0.2,2.6-0.6,4c-0.4,1.4-1.1,2.8-2.1,4c-1,1.2-2.3,2.3-3.8,3.1c-1.6,0.8-3.5,1.2-5.8,1.2 h-38.6c-0.7,0-1.4-0.1-2-0.4c-0.6-0.3-1.2-0.6-1.6-1.1c-0.5-0.5-0.8-1-1.1-1.6c-0.3-0.6-0.4-1.3-0.4-2v-45.9c0-0.7,0.1-1.4,0.4-2 c0.3-0.6,0.6-1.2,1.1-1.6c0.5-0.5,1-0.8,1.6-1.1c0.6-0.3,1.3-0.4,2-0.4h34c1.3,0,2.6,0.2,4,0.7c1.4,0.4,2.8,1.2,4,2.1 c1.2,1,2.3,2.3,3.1,3.8c0.8,1.6,1.2,3.5,1.2,5.8v1.9c0,1.8-0.3,3.7-0.9,5.8c-0.6,2.1-1.6,4-2.9,5.9c1.1,0.7,2.2,1.6,3.2,2.5 c1,1,1.9,2.1,2.6,3.4c0.8,1.3,1.4,2.8,1.8,4.4c0.4,1.6,0.7,3.5,0.7,5.4V211.5z M211.4,209.5c0-1.3-0.2-2.5-0.6-3.6 c-0.4-1.1-1-2-1.8-2.7c-0.8-0.8-1.7-1.3-2.7-1.7c-1.1-0.4-2.3-0.6-3.6-0.6h-22.9v-10.3h18.4c1.3,0,2.5-0.2,3.6-0.6 c1.1-0.4,2-1,2.7-1.7c0.8-0.8,1.3-1.7,1.7-2.7c0.4-1.1,0.6-2.3,0.6-3.6V180c0-1.5-0.7-2.2-2.1-2.2h-29v35.8h33.6c0.2,0,0.4,0,0.7,0 c0.3,0,0.5-0.1,0.7-0.2c0.2-0.1,0.4-0.4,0.5-0.7c0.2-0.3,0.2-0.7,0.2-1.3V209.5z\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n className: \"st1\",\n d: \"M266.9,191.7H244c-1.4,0-2.4,0.3-3.1,1c-0.7,0.7-1.1,1.7-1.1,3v28.1h-10.2v-28.1c0-1.7,0.2-3.3,0.7-4.7 c0.4-1.4,1-2.6,1.8-3.7c0.7-1.1,1.6-2,2.6-2.7c1-0.7,2-1.4,3-1.8c1.1-0.5,2.1-0.8,3.2-1c1.1-0.2,2.1-0.3,3-0.3h23V191.7z\"\n })), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n className: \"st1\",\n d: \"M320.1,209.5c0,1.7-0.2,3.3-0.7,4.7c-0.4,1.4-1,2.6-1.8,3.7c-0.7,1.1-1.6,2-2.5,2.7c-1,0.7-2,1.4-3,1.8 c-1.1,0.5-2.1,0.8-3.2,1c-1.1,0.2-2.1,0.3-3.1,0.3h-18.4c-1.4,0-2.9-0.2-4.6-0.7c-1.7-0.5-3.2-1.3-4.6-2.4c-1.4-1.1-2.6-2.6-3.6-4.4 c-1-1.8-1.4-4-1.4-6.7v-13.8c0-2.6,0.5-4.8,1.4-6.6c1-1.8,2.1-3.3,3.6-4.4c1.4-1.1,3-2,4.6-2.4c1.7-0.5,3.2-0.7,4.6-0.7h18.4 c2.6,0,4.8,0.5,6.7,1.4c1.8,0.9,3.3,2.1,4.4,3.5c1.1,1.4,1.9,3,2.4,4.6c0.5,1.7,0.8,3.2,0.8,4.7V209.5z M310,195.8 c0-1.4-0.4-2.5-1.1-3.1c-0.7-0.7-1.7-1-3.1-1h-18.3c-1.4,0-2.4,0.3-3.1,1c-0.7,0.7-1.1,1.7-1.1,3v13.8c0,1.3,0.4,2.3,1.1,3.1 c0.7,0.7,1.7,1.1,3.1,1.1h18.3c1.4,0,2.4-0.4,3.1-1.1c0.7-0.7,1-1.7,1-3.1V195.8z\"\n })), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n className: \"st1\",\n d: \"M339.8,167.6h-10.2v2.5c3.4,0,6.8-0.1,10.2-0.2V167.6z\"\n })), _path5 || (_path5 = /*#__PURE__*/React.createElement(\"path\", {\n className: \"st1\",\n d: \"M329.6,170.1v53.7h10.2v-54.3C336.4,169.7,333,170,329.6,170.1z\"\n })), _path6 || (_path6 = /*#__PURE__*/React.createElement(\"path\", {\n className: \"st1\",\n d: \"M379.1,181.4h-16.3l-18.6,15c-0.6,0.4-1,1-1.4,1.6c-0.3,0.6-0.5,1.3-0.6,2.1c-0.1,1.6,0.5,2.9,1.6,3.9 l20.5,19.8h14.7l-24-23.1L379.1,181.4z\"\n })), _path7 || (_path7 = /*#__PURE__*/React.createElement(\"path\", {\n className: \"st1\",\n d: \"M429.6,195.5c0,1.4-0.2,2.9-0.7,4.6c-0.5,1.6-1.3,3.1-2.4,4.5c-1.1,1.4-2.6,2.6-4.3,3.5c-1.8,0.9-4,1.4-6.5,1.4 h-18.4v-9.7h18.4c1.4,0,2.5-0.4,3.2-1.3c0.8-0.8,1.1-1.9,1.1-3.2c0-1.3-0.4-2.4-1.3-3.1c-0.8-0.8-1.9-1.1-3.1-1.1h-18.4 c-1.4,0-2.5,0.4-3.2,1.3c-0.8,0.8-1.1,1.9-1.1,3.2v14.2c0,1.4,0.4,2.4,1.3,3.2s1.9,1.1,3.2,1.1h18.3v9.7h-18.4 c-1.4,0-2.9-0.2-4.6-0.7c-1.6-0.5-3.1-1.3-4.5-2.4c-1.4-1.1-2.6-2.6-3.5-4.3c-0.9-1.8-1.4-4-1.4-6.5v-14.3c0-1.4,0.2-2.9,0.7-4.6 c0.5-1.6,1.3-3.1,2.4-4.5c1.1-1.4,2.6-2.6,4.3-3.5c1.8-0.9,4-1.4,6.5-1.4h18.4c1.4,0,2.9,0.2,4.6,0.7c1.6,0.5,3.1,1.3,4.5,2.4 c1.4,1.1,2.6,2.6,3.5,4.3C429.2,190.8,429.6,192.9,429.6,195.5z\"\n })), _path8 || (_path8 = /*#__PURE__*/React.createElement(\"path\", {\n className: \"st1\",\n d: \"M474.1,191.7h-22.9c-1.4,0-2.4,0.3-3.1,1c-0.7,0.7-1.1,1.7-1.1,3v28.1h-10.2v-28.1c0-1.7,0.2-3.3,0.7-4.7 c0.4-1.4,1-2.6,1.8-3.7c0.7-1.1,1.6-2,2.6-2.7s2-1.4,3-1.8c1.1-0.5,2.1-0.8,3.2-1c1.1-0.2,2.1-0.3,3-0.3h23V191.7z\"\n })), _g2 || (_g2 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n className: \"st0\",\n d: \"M126.3,168.8l0,10.8c11.4,3.5,18.9,13.9,18.9,26.4c0,15.4-12.6,27.9-28.1,27.9S89.1,221.4,89.1,206 c0-12.5,7.5-22.8,18.9-26.4v-10.8c-16.9,3.8-28.7,18.9-28.7,37.1c0,21.1,16.9,38.3,37.9,38.3S155,227.1,155,206 C155,187.8,143.2,172.6,126.3,168.8z\"\n }))), _path9 || (_path9 = /*#__PURE__*/React.createElement(\"path\", {\n className: \"st1\",\n d: \"M117.2,178.1c1.9,0,3.8,0.2,5.7,0.6v-10.3c-1.9-0.3-3.8-0.4-5.7-0.4s-3.8,0.1-5.7,0.4v10.3 C113.3,178.3,115.2,178.1,117.2,178.1z\"\n })), _path10 || (_path10 = /*#__PURE__*/React.createElement(\"path\", {\n className: \"st1\",\n d: \"M112,182c1.4-0.3,3.2-0.5,5.3-0.5c2.1,0,4,0.2,5.4,0.5c0,15.9,0,31.9,0,47.8c-3.6,0.8-7.1,0.8-10.7,0 C112,214,112,198,112,182z\"\n })));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgLongLogo);\nexport default __webpack_public_path__ + \"static/media/longLogo.d88c527f6b93b57693fe78d036047c6b.svg\";\nexport { ForwardRef as ReactComponent };","import { Component } from 'react';\nimport { withStyles } from '@mui/styles';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\n\nimport Button from '@mui/material/Button';\nimport Dialog from '@mui/material/Dialog';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport AppBar from '@mui/material/AppBar';\nimport Toolbar from '@mui/material/Toolbar';\nimport Stepper from '@mui/material/Stepper';\nimport Step from '@mui/material/Step';\nimport StepLabel from '@mui/material/StepLabel';\n\n// Icons\nimport PlayArrowIcon from '@mui/icons-material/PlayArrow';\nimport CheckIcon from '@mui/icons-material/Check';\n\nimport withWidth from '@iobroker/adapter-react-v5/Components/withWidth';\nimport Router from '@iobroker/adapter-react-v5/Components/Router';\n\nimport ToggleThemeMenu from '../components/ToggleThemeMenu';\nimport WizardPasswordTab from '../components/Wizard/WizardPasswordTab';\nimport WizardLicenseTab from '../components/Wizard/WizardLicenseTab';\nimport WizardFinishImage from '../assets/wizard-finish.jpg';\nimport WizardWelcomeImage from '../assets/wizard-welcome.jpg';\nimport WizardSettingsTab from '../components/Wizard/WizardSettingsTab';\nimport WizardAuthSSLTab from '../components/Wizard/WizardAuthSSLTab';\nimport WizardPortForwarding from '../components/Wizard/WizardPortForwarding';\nimport Logo from '../assets/logo.png';\nimport LongLogo from '../assets/longLogo.svg';\n\nconst TOOLBAR_HEIGHT = 64;\n\nconst styles = theme => ({\n dialog: {\n height: '100%',\n maxHeight: '100%',\n maxWidth: '100%',\n },\n paper: {\n width: '100%',\n height: '100%',\n overflow: 'hidden'\n },\n content: {\n textAlign: 'center',\n },\n tabPanel: {\n width: '100%',\n overflow: 'hidden',\n height: `calc(100% - 72px)`,\n },\n fullHeightWithoutToolbar: {\n height: `calc(100% - ${TOOLBAR_HEIGHT}px)`,\n width: '100%',\n overflow: 'auto',\n },\n finishBackground: {\n backgroundImage: `url(${WizardFinishImage})`,\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n backgroundPosition: 'center',\n },\n welcomeBackground: {\n backgroundImage: `url(${WizardWelcomeImage})`,\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n backgroundPosition: 'center',\n },\n grow: {\n flexGrow: 1,\n },\n playIcon: {\n marginLeft: theme.spacing(1),\n },\n toolbar: {\n height: TOOLBAR_HEIGHT,\n },\n logo: {\n width: 32,\n height: 32,\n borderRadius: '50%',\n background: 'white',\n marginRight: theme.spacing(1),\n verticalAlign: 'middle',\n },\n themeButton: {\n float: 'right',\n display: 'inline-block',\n marginTop: -1,\n marginRight: theme.spacing(1)\n },\n\n finalText: {\n fontSize: 48,\n marginTop: 80,\n color: '#265063',\n fontWeight: 'bold'\n },\n finalLongLogo: {\n width: 500,\n }\n});\n\nclass WizardDialog extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n exitAvailable: false,\n activeStep: 0,\n auth: false,\n secure: false,\n };\n this.adminInstance = null;\n\n this.password = '';\n\n this.lastPage = 1;\n }\n\n componentDidMount() {\n this.props.socket.getCurrentInstance()\n .then(namespace =>\n this.props.socket.getObject('system.adapter.' + namespace)\n .then(obj => {\n this.adminInstance = obj;\n this.setState({ auth: obj.native.auth, secure: obj.native.secure });\n }));\n }\n\n renderWelcome() {\n // shutterstock Standard commercial license on ioBroker GmbH: https://www.shutterstock.com/de/image-vector/welcome-neon-text-vector-sign-design-1186433386\n return <div className={ clsx(this.props.classes.paper, this.props.classes.welcomeBackground) }>\n <div className={ this.props.classes.fullHeightWithoutToolbar }>\n\n </div>\n <Toolbar className={ this.props.classes.toolbar }>\n <div className={ this.props.classes.grow }/>\n <Button\n variant=\"contained\"\n color=\"primary\"\n onClick={ () =>\n this.props.socket.getCompactSystemConfig(true)\n .then(obj =>\n this.setState( { activeStep: this.state.activeStep + 1 + (obj.common.licenseConfirmed ? 0 : 0) }))\n }>\n { this.props.t('Start wizard') } <PlayArrowIcon className={ this.props.classes.playIcon }/></Button>\n <div className={ this.props.classes.grow }/>\n </Toolbar>\n </div>;\n }\n\n renderLicense() {\n return <WizardLicenseTab\n t={ this.props.t }\n socket={ this.props.socket }\n themeName={ this.props.themeName }\n onDone={ settings => {\n this.props.socket.getSystemConfig(true)\n .then(obj => {\n obj.common.licenseConfirmed = true;\n if (settings?.lang) {\n obj.common.language = settings.lang;\n }\n return this.props.socket.setSystemConfig(obj);\n })\n .then(() => this.setState( {activeStep: this.state.activeStep + 1 }));\n } }\n />;\n }\n\n renderPassword() {\n return <WizardPasswordTab\n t={ this.props.t }\n socket={ this.props.socket }\n themeName={ this.props.themeName }\n onDone={ pass =>\n this.props.socket.changePassword('admin', pass)\n .then(() =>\n this.setState( {activeStep: this.state.activeStep + 1 }))}\n />;\n }\n\n renderSettings() {\n return <WizardSettingsTab\n t={ this.props.t }\n socket={ this.props.socket }\n themeName={ this.props.themeName }\n onDone={settings =>\n this.props.socket.getSystemConfig(true)\n .then(obj => {\n Object.assign(obj.common, settings);\n return this.props.socket.setSystemConfig(obj);\n })\n .then(() =>\n this.setState({activeStep: this.state.activeStep + 1}))\n }\n />;\n }\n\n renderAuthentication() {\n return <WizardAuthSSLTab\n t={ this.props.t }\n auth={this.state.auth}\n secure={this.state.secure}\n socket={ this.props.socket }\n themeName={ this.props.themeName }\n onDone={settings =>\n this.setState(settings, () => this.setState({ activeStep: this.state.activeStep + 1 }))}\n />;\n }\n\n renderPortForwarding() {\n return <WizardPortForwarding\n t={ this.props.t }\n socket={ this.props.socket }\n themeName={ this.props.themeName }\n auth={this.state.auth}\n secure={this.state.secure}\n onDone={() =>\n this.setState({ activeStep: this.state.activeStep + 1 })}\n />;\n }\n\n async onClose() {\n // read if discovery is available\n const discovery = await this.props.socket.getState('system.adapter.discovery.0.alive');\n\n if (this.adminInstance) {\n let certPublic;\n let certPrivate;\n if (this.adminInstance.native.secure !== this.state.secure || this.adminInstance.native.auth !== this.state.auth) {\n if (this.state.secure && (!this.adminInstance.certPublic || !!this.adminInstance.certPrivate)) {\n // get certificates\n try {\n const certs = await this.props.socket.getCertificates();\n certPublic = certs && certs.find(c => c.type === 'public');\n certPrivate = certs && certs.find(c => c.type === 'private');\n } catch (e) {\n window.alert('Cannot read certificates: ' + e);\n }\n }\n this.adminInstance.native.auth = this.state.auth;\n\n if (this.state.secure) {\n if (!(this.adminInstance.native.certPublic || certPublic) ||\n !(this.adminInstance.native.certPrivate || certPrivate))\n {\n window.alert(this.props.t('Cannot enable authentication as no certificates found!'));\n this.adminInstance.native.secure = false;\n\n await this.props.socket.setObject(this.adminInstance._id, this.adminInstance);\n setTimeout(() => window.location = `http://${window.location.host}/#tab-adapters${discovery ? '/discovery' : ''}`, 1000);\n return this.props.onClose();\n } else {\n this.adminInstance.native.secure = this.state.secure;\n this.adminInstance.native.certPublic = this.adminInstance.native.certPublic || certPublic.name;\n this.adminInstance.native.certPrivate = this.adminInstance.native.certPrivate || certPrivate.name;\n }\n }\n\n await this.props.socket.setObject(this.adminInstance._id, this.adminInstance);\n\n // redirect to https or http\n setTimeout(() => {\n if (this.adminInstance.native.secure) {\n window.location = `https://${window.location.host}/#tab-adapters${discovery ? '/discovery' : ''}`;\n } else {\n window.location = `http://${window.location.host}/#tab-adapters${discovery ? '/discovery' : ''}`;\n }\n }, 1000);\n\n this.props.onClose();\n } else {\n Router.doNavigate('tab-adapters', discovery ? 'discovery' : undefined);\n this.props.onClose();\n }\n } else {\n Router.doNavigate('tab-adapters', discovery ? 'discovery' : undefined);\n this.props.onClose();\n }\n }\n\n renderFinish() {\n // Free Image license: https://pixabay.com/illustrations/road-sky-mountains-clouds-black-908176/\n return <div className={ clsx(this.props.classes.paper, this.props.classes.finishBackground) }>\n <div className={ this.props.classes.fullHeightWithoutToolbar }>\n <div className={this.props.classes.finalText}>{this.props.t('Have fun automating your home with')}</div>\n <img src={LongLogo} alt=\"ioBroker\" className={this.props.classes.finalLongLogo}/>\n </div>\n <Toolbar className={ this.props.classes.toolbar }>\n <div className={ this.props.classes.grow }/>\n <Button variant=\"contained\" color=\"primary\" onClick={ async () => await this.onClose() } startIcon={<CheckIcon/>}>{ this.props.t('Finish') }</Button>\n <div className={ this.props.classes.grow }/>\n </Toolbar>\n </div>;\n }\n\n render() {\n return <Dialog\n className={ this.props.classes.dialog }\n open={ true }\n onClose={ () => {} }\n fullWidth={ true }\n fullScreen={ true }\n aria-labelledby=\"wizard-dialog-title\"\n >\n <DialogTitle id=\"wizard-dialog-title\"><img src={Logo} className={this.props.classes.logo} alt=\"logo\"/>{ this.props.t('Initial ioBroker setup') } <ToggleThemeMenu className={this.props.classes.themeButton} t={this.props.t} toggleTheme={this.props.toggleTheme} themeName={this.props.themeName} size=\"small\"/></DialogTitle>\n <DialogContent className={ this.props.classes.content }>\n <AppBar position=\"static\">\n <Stepper activeStep={ this.state.activeStep }>\n <Step><StepLabel>{ this.props.t('Welcome') }</StepLabel></Step>\n <Step><StepLabel>{ this.props.t('License agreement') }</StepLabel></Step>\n <Step><StepLabel>{ this.props.t('Password') }</StepLabel></Step>\n <Step><StepLabel>{ this.props.t('Authentication') }</StepLabel></Step>\n <Step><StepLabel>{ this.props.t('Port forwarding') }</StepLabel></Step>\n <Step><StepLabel>{ this.props.t('Settings') }</StepLabel></Step>\n <Step><StepLabel>{ this.props.t('Finish') }</StepLabel></Step>\n </Stepper>\n </AppBar>\n {this.state.activeStep === 0 ? <div className={ this.props.classes.tabPanel }>{ this.renderWelcome() }</div> : null }\n {this.state.activeStep === 1 ? <div className={ this.props.classes.tabPanel }>{ this.renderLicense() }</div> : null }\n {this.state.activeStep === 2 ? <div className={ this.props.classes.tabPanel }>{ this.renderPassword() }</div> : null }\n {this.state.activeStep === 3 ? <div className={ this.props.classes.tabPanel }>{ this.renderAuthentication() }</div> : null }\n {this.state.activeStep === 4 ? <div className={ this.props.classes.tabPanel }>{ this.renderPortForwarding() }</div> : null }\n {this.state.activeStep === 5 ? <div className={ this.props.classes.tabPanel }>{ this.renderSettings() }</div> : null }\n {this.state.activeStep === 6 ? <div className={ this.props.classes.tabPanel }>{ this.renderFinish() }</div> : null }\n </DialogContent>\n </Dialog>;\n }\n}\n\nWizardDialog.propTypes = {\n t: PropTypes.func,\n lang: PropTypes.string,\n socket: PropTypes.object,\n onClose: PropTypes.func,\n toggleTheme: PropTypes.func,\n themeName: PropTypes.string,\n};\n\nexport default withWidth()(withStyles(styles)(WizardDialog));\n","import { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { MapContainer as LeafletMap, TileLayer } from 'react-leaflet';\nimport { OpenStreetMapProvider } from 'leaflet-geosearch';\n\nimport { withStyles } from '@mui/styles';\nimport Grid from '@mui/material/Grid';\nimport InputLabel from '@mui/material/InputLabel';\nimport MenuItem from '@mui/material/MenuItem';\nimport FormControl from '@mui/material/FormControl';\nimport Select from '@mui/material/Select';\nimport TextField from '@mui/material/TextField';\nimport { FormHelperText } from '@mui/material';\n\nimport ConfirmDialog from '@iobroker/adapter-react-v5/Dialogs/Confirm';\nimport withWidth from '@iobroker/adapter-react-v5/Components/withWidth';\n\nimport Utils from '../../Utils';\nimport countries from '../../assets/json/countries';\n\nconst styles = theme => ({\n tabPanel: {\n width: '100%',\n height: '100% ',\n overflow: 'auto',\n overflowX: 'hidden',\n padding: 15,\n //backgroundColor: blueGrey[ 50 ]\n },\n formControl: {\n marginRight: theme.spacing(1),\n minWidth: '100%',\n },\n selectEmpty: {\n marginTop: theme.spacing(2),\n },\n map: {\n borderRadius: 5\n }\n});\n\nclass MainSettingsDialog extends Component {\n constructor(props) {\n super(props);\n this.state = {\n values: [],\n data: {},\n zoom: 14\n };\n }\n\n getSettings() {\n return [\n {\n id: 'language',\n title: 'System language:',\n translate: false,\n values: [\n {\n id: 'en',\n title: 'English'\n },\n {\n id: 'de',\n title: 'Deutsch'\n },\n {\n id: 'ru',\n title: 'русский'\n },\n {\n id: 'pt',\n title: 'Portugues'\n },\n {\n id: 'nl',\n title: 'Nederlands'\n },\n {\n id: 'fr',\n title: 'français'\n },\n {\n id: 'it',\n title: 'Italiano'\n },\n {\n id: 'es',\n title: 'Espanol'\n },\n {\n id: 'pl',\n title: 'Polski'\n },\n {\n id: 'zh-ch',\n title: '简体中文'\n }\n ]\n },\n {\n id: 'tempUnit',\n title: 'Temperature units',\n translate: false,\n values: [\n {\n id: '°C',\n title: '°C'\n },\n {\n id: '°F',\n title: '°F'\n }\n ]\n },\n {\n id: 'currency',\n title: 'Currency sign',\n translate: false,\n allowText: true,\n values: [\n {\n id: '€',\n title: '€'\n },\n {\n id: '$',\n title: '$'\n },\n {\n id: '₽',\n title: '₽'\n },\n {\n id: '₤',\n title: '₤'\n },\n {\n id: 'CHF',\n title: 'CHF'\n }\n ]\n },\n {\n id: 'dateFormat',\n title: 'Date format',\n translate: true,\n values: [\n {\n id: 'DD.MM.YYYY',\n title: 'DD.MM.YYYY'\n },\n {\n id: 'YYYY.MM.DD',\n title: 'YYYY.MM.DD'\n },\n {\n id: 'MM/DD/YYYY',\n title: 'MM/DD/YYYY'\n }\n ]\n },\n {\n id: 'isFloatComma',\n title: 'Float divider sign',\n translate: true,\n values: [\n {\n id: true,\n title: 'comma'\n },\n {\n id: false,\n title: 'point'\n }\n ]\n },\n {\n id: 'defaultHistory',\n title: 'Default History',\n values: [{ id: '', title: this.props.t('None') }, ...this.props.histories.map(history => {\n return {\n id: history,\n title: history\n }\n })]\n },\n {\n id: 'activeRepo',\n title: 'Default Repository',\n translate: false,\n values: Utils.objectMap(this.props.dataAux.native.repositories, (repo, name) =>\n ({\n id: name,\n title: name\n }))\n },\n {\n id: 'expertMode',\n title: 'Expert mode',\n values: [{ id: true, title: 'on' }, { id: false, title: 'off (default)' }]\n },\n {\n id: 'defaultLogLevel',\n title: 'Default log level',\n help: 'for new instances',\n translate: false,\n values: [{ id: 'debug', title: 'debug' }, { id: 'info', title: 'info' }, { id: 'warn', title: 'warn' }, { id: 'error', title: 'error' }]\n },\n {\n id: 'firstDayOfWeek',\n title: 'First day of week',\n translate: true,\n values: [{ id: 'monday', title: 'Monday' }, { id: 'sunday', title: 'Sunday' }]\n }\n ];\n }\n\n onMap = map => {\n this.map = map;\n const center = [\n parseFloat(this.props.data.common.latitude !== undefined ? this.props.data.common.latitude : 50) || 0,\n parseFloat(this.props.data.common.longitude !== undefined ? this.props.data.common.longitude : 10) || 0\n ];\n\n this.marker = window.L.marker(\n center,\n {\n draggable: true,\n title: 'Resource location',\n alt: 'Resource Location',\n riseOnHover: true\n }\n )\n .addTo(map)\n .bindPopup('Popup for any custom information.')\n .on({\n dragend: evt => this.onMarkerDragend(evt)\n });\n }\n\n getSelect(e, i) {\n const { classes } = this.props;\n let value = this.props.data.common[e.id];\n\n if (e.id === 'defaultLogLevel' && !value) {\n value = 'info';\n }\n\n if (e.id === 'activeRepo' && this.props.multipleRepos) {\n return null;\n }\n\n // if disabled by vendor settings\n if (this.props.adminGuiConfig.admin.settings && this.props.adminGuiConfig.admin.settings[e.id] === false) {\n return null;\n }\n\n // If value is not in known values, show text input\n if (e.allowText && value && !e.values.find(elem => elem.id === value)) {\n return <Grid item sm={6} xs={12} key={i}>\n <FormControl className={classes.formControl} variant=\"standard\">\n <InputLabel shrink id={e.id + '-label'}>\n {this.props.t(e.title)}\n </InputLabel>\n <TextField\n variant=\"standard\"\n id={e.id}\n value={value.toString()}\n InputLabelProps={{ shrink: true }}\n InputProps={{ readOnly: false }}\n onChange={evt => this.handleChange(evt, i)}\n helperText={e.help ? this.props.t(e.help) : ''}\n />\n </FormControl>\n </Grid>;\n }\n\n const items = e.values.map((elem, index) => <MenuItem value={elem.id} key={index}>\n {e.translate ? this.props.t(elem.title || elem.id) : elem.title || elem.id}\n </MenuItem>);\n\n return <Grid item sm={6} xs={12} key={i}>\n <FormControl className={classes.formControl} variant=\"standard\">\n <InputLabel shrink id={e.id + '-label'}>\n {this.props.t(e.title)}\n </InputLabel>\n <Select\n variant=\"standard\"\n className={classes.formControl}\n id={e.id}\n value={value === undefined ? false : value}\n onChange={evt => this.handleChange(evt, i)}\n displayEmpty\n >\n {items}\n </Select>\n {e.help ? <FormHelperText>{this.props.t(e.help)}</FormHelperText> : null}\n </FormControl>\n </Grid>;\n }\n\n renderConfirmDialog() {\n if (this.state.confirm) {\n return <ConfirmDialog\n text={this.props.t('confirm_change_repo')}\n onClose={result => {\n const value = this.state.confirmValue;\n this.setState({ confirm: false, confirmValue: null }, () => {\n if (result) {\n this.doChange('activeRepo', value);\n }\n });\n }}\n />;\n } else {\n return null;\n }\n }\n\n getCounters = () => {\n const { classes } = this.props;\n const items = countries.map((elem, index) => <MenuItem value={elem.name} key={index}>\n {this.props.t(elem.name)}\n </MenuItem>);\n\n return <FormControl className={classes.formControl} variant=\"standard\">\n <InputLabel shrink id={'country-label'}>\n {this.props.t('Country:')}\n </InputLabel>\n <Select\n variant=\"standard\"\n className={classes.formControl}\n id={'country'}\n value={this.props.data.common.country}\n onChange={this.handleChangeCountry}\n displayEmpty\n >\n {items}\n </Select>\n </FormControl>;\n }\n\n handleChangeCountry = evt => {\n const value = evt.target.value;\n const id = 'country';\n this.doChange(id, value);\n }\n\n onChangeText = (evt, id) => {\n const value = evt.target.value;\n this.onChangeInput(value, id);\n }\n\n onChangeInput = (value, id) => {\n this.doChange(id, value);\n }\n\n onChangeCity = (evt) => {\n this.onChangeText(evt, 'city');\n const provider = new OpenStreetMapProvider();\n\n provider.search({ query: evt.target.value })\n .then(results => {\n if (results[0]) {\n setTimeout(() => {\n this.onChangeInput(results[0].y, 'latitude');\n this.onChangeInput(results[0].x, 'longitude');\n this.onChangeInput(23, 'zoom');\n this.map.flyTo(\n [results[0].y, results[0].x]\n );\n this.marker.setLatLng([results[0].y, results[0].x]);\n }, 1200);\n }\n });\n }\n\n handleChange = (evt, selectId) => {\n const value = evt.target.value;\n const id = this.getSettings()[selectId].id;\n\n if (id === 'activeRepo' && value !== 'stable' && value !== 'default') {\n this.setState({ confirm: true, confirmValue: value });\n } else {\n this.doChange(id, value);\n }\n }\n\n doChange = (name, value) => {\n let newData = JSON.parse(JSON.stringify(this.props.data))\n newData.common[name] = value;\n this.props.onChange(newData);\n }\n\n onMarkerDragend = evt => {\n const ll = evt.target._latlng;\n this.doChange('latitude', ll.lat);\n this.doChange('longitude', ll.lng);\n }\n\n render() {\n const { classes } = this.props;\n const selectors = this.getSettings().map((e, i) => this.getSelect(e, i));\n\n const center = [\n parseFloat(this.props.data.common.latitude !== undefined ? this.props.data.common.latitude : 50) || 0,\n parseFloat(this.props.data.common.longitude !== undefined ? this.props.data.common.longitude : 10) || 0\n ];\n\n const { zoom } = this.state;\n\n return <div className={classes.tabPanel}>\n {this.renderConfirmDialog()}\n <Grid container spacing={3}>\n <Grid item lg={6} md={12}>\n <Grid container spacing={3}>\n {selectors}\n </Grid>\n </Grid>\n <Grid item lg={6} md={12} style={{ width: '100%' }}>\n <LeafletMap\n className={classes.map}\n center={center}\n zoom={zoom}\n maxZoom={18}\n attributionControl={true}\n zoomControl={true}\n doubleClickZoom={true}\n scrollWheelZoom={true}\n dragging={true}\n animate={true}\n easeLinearity={0.35}\n whenCreated={this.onMap}\n >\n <TileLayer\n url=\"http://{s}.tile.osm.org/{z}/{x}/{y}.png\"\n />\n </LeafletMap>\n </Grid>\n </Grid>\n <Grid container spacing={6}>\n <Grid item md={3} sm={6} xs={12}>\n {this.getCounters()}\n </Grid>\n <Grid item md={3} sm={6} xs={12}>\n <FormControl className={classes.formControl} variant=\"standard\">\n <InputLabel shrink id={'city-label'}>\n {this.props.t('City:')}\n </InputLabel>\n <TextField\n variant=\"standard\"\n id=\"city\"\n label={this.props.t('City:')}\n value={this.props.data.common.city}\n InputLabelProps={{ shrink: true }}\n InputProps={{readOnly: false}}\n onChange={evt => this.onChangeCity(evt)}\n />\n </FormControl>\n </Grid>\n <Grid item md={3} sm={6} xs={12}>\n <FormControl className={classes.formControl} variant=\"standard\">\n <InputLabel shrink id=\"latitude-label\">\n {this.props.t('Latitude:')}\n </InputLabel>\n <TextField\n variant=\"standard\"\n id=\"latitude\"\n label={this.props.t('Latitude:')}\n value={this.props.data.common.latitude || 0}\n InputLabelProps={{ shrink: true }}\n InputProps={{ readOnly: false }}\n onChange={evt => this.onChangeText(evt, 'latitude')}\n />\n </FormControl>\n </Grid>\n <Grid item md={3} sm={6} xs={12}>\n <FormControl className={classes.formControl} variant=\"standard\">\n <InputLabel shrink id=\"longitude-label\">\n {this.props.t('Longitude:')}\n </InputLabel>\n <TextField\n variant=\"standard\"\n id=\"longitude\"\n label={this.props.t('Longitude:')}\n value={this.props.data.common.longitude || 0}\n InputLabelProps={{ shrink: true }}\n InputProps={{ readOnly: false }}\n onChange={evt => this.onChangeText(evt, 'longitude')}\n />\n </FormControl>\n </Grid>\n </Grid>\n </div>;\n }\n}\n\nMainSettingsDialog.propTypes = {\n t: PropTypes.func,\n data: PropTypes.object,\n dataAux: PropTypes.object,\n adminGuiConfig: PropTypes.object,\n};\n\nexport default withWidth()(withStyles(styles)(MainSettingsDialog));\n","// RepositoriesDialog\nimport {Component} from 'react';\nimport clsx from 'clsx';\nimport {withStyles} from '@mui/styles';\nimport PropTypes from 'prop-types';\nimport {SortableContainer, SortableElement, SortableHandle} from 'react-sortable-hoc';\n\nimport Checkbox from '@mui/material/Checkbox';\nimport Fab from '@mui/material/Fab';\nimport Table from '@mui/material/Table';\nimport TableBody from '@mui/material/TableBody';\nimport TableCell from '@mui/material/TableCell';\nimport TableContainer from '@mui/material/TableContainer';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport TextField from '@mui/material/TextField';\nimport Paper from '@mui/material/Paper';\nimport AddIcon from '@mui/icons-material/Add';\nimport DeleteIcon from '@mui/icons-material/Delete';\nimport DragHandleIcon from '@mui/icons-material/Menu';\n\nimport I18n from '@iobroker/adapter-react-v5/i18n';\nimport ConfirmDialog from '@iobroker/adapter-react-v5/Dialogs/Confirm';\nimport withWidth from '@iobroker/adapter-react-v5/Components/withWidth';\nimport Utils from '../../Utils';\n\nconst styles = theme => ({\n tabPanel: {\n width: '100%',\n height: '100% ',\n overflow: 'auto',\n overflowX: 'hidden',\n padding: 15,\n //backgroundColor: blueGrey[ 50 ]\n },\n table: {\n display: 'flex',\n flexDirection: 'column',\n width: '100%'\n },\n buttonPanel: {\n paddingBottom: 40,\n display: 'flex'\n },\n descriptionPanel: {\n width: '100%',\n backgroundColor: 'transparent',\n marginLeft: 40,\n border: 'none',\n display: 'flex',\n alignItems: 'center'\n },\n dragColumn: {\n width: 32\n },\n enableColumn: {\n width: 110\n },\n buttonColumn: {\n width: 80\n },\n nameRow: {\n width: 220\n },\n input: {\n width: '100%'\n },\n checkboxError: {\n '& span:first-child': {\n border: '2px solid #FF0000',\n borderRadius: 4\n }\n }\n});\n\nfunction repoToArray(repos) {\n return Utils.objectMap(repos, (repo, name) => {\n return {\n title: name,\n link: repo.link,\n }\n });\n}\n\nfunction arrayToRepo(array) {\n let result = {};\n for (let k in array) {\n result[array[k].title] = {link: array[k].link};\n }\n\n return result;\n}\n\nconst DragHandle = SortableHandle(({t}) => <DragHandleIcon style={{marginTop: 8, marginRight: 0, cursor: 'handle'}}/>);\n\nconst SortableItem = SortableElement(({\n item,\n classes,\n _index,\n repositories,\n multipleRepos,\n adminGuiConfig,\n error,\n t,\n dataAux,\n onDelete,\n onChangeText,\n onChangeActiveRepo\n}) => <TableRow className=\"float_row\">\n <TableCell className={clsx(classes.dragColumn, 'float_cell')} title={t('Drag and drop to reorder')}>\n <DragHandle t={t}/>\n </TableCell>\n <TableCell className={clsx(classes.enableColumn, 'float_cell')}>\n {_index + 1}\n {multipleRepos ? <Checkbox\n disabled={adminGuiConfig.admin.settings.activeRepo === false}\n className={error ? classes.checkboxError : ''}\n title={error ? I18n.t('At least one repo must be selected') : ''}\n checked={typeof dataAux.common.activeRepo === 'string' ? dataAux.common.activeRepo === item.title : dataAux.common.activeRepo.includes(item.title)}\n onChange={() => {\n let showWarning = false;\n let newData = JSON.parse(JSON.stringify(dataAux));\n if (typeof newData.common.activeRepo === 'string') {\n newData.common.activeRepo = [newData.common.activeRepo];\n }\n let pos = newData.common.activeRepo.indexOf(item.title);\n if (pos === -1) {\n newData.common.activeRepo.push(item.title);\n // newData.common.activeRepo.sort();\n // sort repos according to order of repos\n const arr = repoToArray(repositories);\n newData.common.activeRepo.sort((a, b) => {\n const indexA = arr.findIndex(item => item.title === a);\n const indexB = arr.findIndex(item => item.title === b);\n return indexA - indexB;\n });\n\n showWarning = item.title === 'beta';\n } else {\n newData.common.activeRepo.splice(pos, 1);\n }\n if (item.title === 'beta' && newData.common.activeRepo.includes('stable')) {\n pos = newData.common.activeRepo.indexOf('stable');\n newData.common.activeRepo.splice(pos, 1);\n } else if (item.title === 'stable' && newData.common.activeRepo.includes('beta')) {\n pos = newData.common.activeRepo.indexOf('beta');\n newData.common.activeRepo.splice(pos, 1);\n }\n\n const error = !newData.common.activeRepo.length;\n onChangeActiveRepo(newData, error, showWarning);\n }}\n /> : null}\n </TableCell>\n <TableCell className={clsx(classes.nameRow, 'float_cell')}>\n <TextField\n variant=\"standard\"\n value={item.title}\n InputLabelProps={{ shrink: true }}\n InputProps={{ readOnly: false }}\n className={clsx(classes.input, 'xs-centered')}\n onChange={evt => onChangeText(evt, item.title, 'title')}\n />\n </TableCell>\n <TableCell className={clsx('grow_cell', 'float_cell')}>\n <TextField\n variant=\"standard\"\n id={'default_' + _index}\n value={item.link}\n InputLabelProps={{ shrink: true }}\n InputProps={{ readOnly: false }}\n className={clsx(classes.input, 'xs-centered')}\n onChange={evt => onChangeText(evt, item.title, 'link')}\n />\n </TableCell>\n <TableCell className={clsx(classes.buttonColumn, 'float_cell')}>\n <Fab\n size=\"small\"\n color=\"secondary\"\n aria-label=\"add\"\n onClick={() => onDelete(item.title)}\n >\n <DeleteIcon/>\n </Fab>\n </TableCell>\n</TableRow>);\n\nconst SortableList = SortableContainer(({items, classes, multipleRepos, t, error, adminGuiConfig, dataAux, onDelete, onChangeText, onChangeActiveRepo, repositories}) => {\n return <Table className={classes.table}>\n <TableHead>\n <TableRow className=\"float_row\">\n <TableCell className={clsx(classes.dragColumn, 'float_cell')}/>\n <TableCell className={clsx(classes.enableColumn, 'float_cell')}>{multipleRepos ? I18n.t('Active') : ''}</TableCell>\n <TableCell className={clsx(classes.nameRow, 'float_cell')}>\n {t('name')}\n </TableCell>\n <TableCell className=\"grow_cell float_cell\">\n {t('link')}\n </TableCell>\n <TableCell className={clsx(classes.buttonColumn, 'float_cell')}> </TableCell>\n </TableRow>\n </TableHead>\n <TableBody>\n {items.map((item, index) =>\n <SortableItem\n key={`item-${index}`}\n index={index}\n _index={index}\n item={item}\n t={t}\n classes={classes}\n multipleRepos={multipleRepos}\n adminGuiConfig={adminGuiConfig}\n error={error}\n dataAux={dataAux}\n repositories={repositories}\n onDelete={onDelete}\n onChangeText={onChangeText}\n onChangeActiveRepo={onChangeActiveRepo}\n />)}\n </TableBody>\n </Table>;\n});\n\nclass RepositoriesDialog extends Component {\n constructor(props) {\n super(props);\n const repos = (typeof this.props.dataAux.common.activeRepo === 'string' ? [this.props.dataAux.common.activeRepo] : this.props.dataAux.common.activeRepo).filter(r => r);\n\n this.state = {\n error: !repos.length,\n confirm: false,\n confirmValue: null\n };\n }\n\n onChangeText = (evt, id, name) => {\n const value = evt.target.value;\n let newData = JSON.parse(JSON.stringify(this.props.data))\n let array = repoToArray(newData.native.repositories);\n const item = array.find(element => element.title === id);\n const oldTitle = item.title;\n item[name] = value;\n newData.native.repositories = arrayToRepo(array);\n this.props.onChange(newData);\n if (((typeof this.props.dataAux.common.activeRepo === 'string' && this.props.dataAux.common.activeRepo === id) ||\n (typeof this.props.dataAux.common.activeRepo !== 'string' && this.props.dataAux.common.activeRepo.includes(id))) &&\n name === 'title') {\n this.props.onChange(newData, this.getUpdateDefaultRepo(value, newData, oldTitle, value));\n } else {\n this.props.onChange(newData);\n }\n };\n\n onDelete = id => {\n let newData = JSON.parse(JSON.stringify(this.props.data))\n let array = repoToArray(newData.native.repositories);\n let index = array.findIndex(element => element.title === id);\n delete array[index];\n newData.native.repositories = arrayToRepo(array);\n if (this.props.dataAux.common.activeRepo === id) {\n if (Object.keys(newData.native.repositories).length) {\n // set first repo as active\n this.props.onChange(newData, this.getUpdateDefaultRepo(Object.keys(newData.native.repositories)[0]));\n } else {\n this.props.onChange(newData, this.getUpdateDefaultRepo(''));\n }\n } else {\n this.props.onChange(newData);\n }\n };\n\n onAdd = () => {\n let newData = JSON.parse(JSON.stringify(this.props.data))\n let array = repoToArray(newData.native.repositories);\n array.push({\n title: '__',\n link: ''\n });\n newData.native.repositories = arrayToRepo(array);\n this.props.onChange(newData);\n };\n\n getUpdateDefaultRepo = (newRepo, newData, oldTitle, newTitle) => {\n let newConfig = JSON.parse(JSON.stringify(this.props.dataAux));\n if (!this.props.multipleRepos) {\n newConfig.common.activeRepo = newRepo;\n return newConfig;\n } else {\n newData = newData || JSON.parse(JSON.stringify(this.props.data));\n if (oldTitle !== undefined) {\n const pos = newConfig.common.activeRepo.indexOf(oldTitle);\n if (pos !== -1) {\n newConfig.common.activeRepo[pos] = newTitle;\n }\n }\n\n if (typeof newConfig.common.activeRepo === 'string' && newConfig.common.activeRepo) {\n newConfig.common.activeRepo = [newConfig.common.activeRepo];\n }\n newConfig.common.activeRepo = newConfig.common.activeRepo || [];\n if (!newConfig.common.activeRepo.includes(newRepo)) {\n // sort activeRepo anew\n const items = repoToArray(newData.native.repositories);\n newConfig.common.activeRepo.sort((a, b) => {\n const indexA = items.findIndex(item => item.title === a);\n const indexB = items.findIndex(item => item.title === b);\n return indexA - indexB;\n });\n }\n\n return newConfig;\n }\n };\n\n onSortEnd = ({oldIndex, newIndex}) => {\n console.log(oldIndex, newIndex);\n let newData = JSON.parse(JSON.stringify(this.props.data))\n let items = repoToArray(newData.native.repositories);\n const item = items[oldIndex];\n items.splice(oldIndex, 1);\n items.splice(newIndex, 0, item);\n newData.native.repositories = arrayToRepo(items);\n\n let newConfig = JSON.parse(JSON.stringify(this.props.dataAux));\n\n if (typeof newConfig.common.activeRepo === 'string') {\n newConfig.common.activeRepo = [newConfig.common.activeRepo];\n }\n\n // sort activeRepo anew\n newConfig.common.activeRepo.sort((a, b) => {\n const indexA = items.findIndex(item => item.title === a);\n const indexB = items.findIndex(item => item.title === b);\n return indexA - indexB;\n });\n\n this.props.onChange(newData, newConfig);\n };\n\n onChangeActiveRepo = (newData, error, showWarning) => {\n if (showWarning) {\n this.setState({ confirm: true, confirmValue: {newData, error}});\n } else {\n this.setState({error}, () => this.props.onChange(null, newData));\n }\n }\n\n renderConfirmDialog() {\n if (this.state.confirm) {\n return <ConfirmDialog\n text={this.props.t('confirm_change_repo')}\n onClose={result => {\n const value = this.state.confirmValue;\n this.setState({ confirm: false, confirmValue: null }, () => {\n if (result) {\n this.setState({error: value.error}, () => this.props.onChange(null, value.newData));\n }\n });\n }}\n />;\n } else {\n return null;\n }\n }\n\n render() {\n const {classes} = this.props;\n const items = repoToArray(this.props.data.native.repositories);\n\n return <div className={classes.tabPanel}>\n {this.renderConfirmDialog()}\n <div className={classes.buttonPanel}>\n <Fab\n size=\"small\"\n color=\"primary\"\n aria-label=\"add\"\n onClick={this.onAdd}\n className=\"small_size\"\n >\n <AddIcon/>\n </Fab>\n <Paper variant=\"outlined\" className={classes.descriptionPanel}/>\n </div>\n <TableContainer>\n <SortableList\n helperClass=\"draggable-item\"\n useDragHandle\n lockAxis=\"y\"\n items={items}\n onSortEnd={this.onSortEnd}\n error={this.state.error}\n classes={this.props.classes}\n multipleRepos={this.props.multipleRepos}\n t={this.props.t}\n adminGuiConfig={this.props.adminGuiConfig}\n dataAux={this.props.dataAux}\n repositories={this.props.data.native.repositories}\n onDelete={this.onDelete}\n onChangeText={this.onChangeText}\n onChangeActiveRepo={this.onChangeActiveRepo}\n />\n </TableContainer>\n </div>;\n }\n}\n\nRepositoriesDialog.propTypes = {\n t: PropTypes.func,\n data: PropTypes.object,\n dataAux: PropTypes.object,\n multipleRepos: PropTypes.bool,\n};\n\nexport default withWidth()(withStyles(styles)(RepositoriesDialog));\n","// LicensesDialog\nimport {Component} from 'react';\nimport clsx from 'clsx';\nimport {withStyles} from '@mui/styles';\nimport PropTypes from 'prop-types';\n\nimport Button from '@mui/material/Button';\nimport Table from '@mui/material/Table';\nimport TableBody from '@mui/material/TableBody';\nimport TableCell from '@mui/material/TableCell';\nimport TableContainer from '@mui/material/TableContainer';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport TextField from '@mui/material/TextField';\n\nimport IconRefresh from '@mui/icons-material/Refresh';\n\nimport withWidth from '@iobroker/adapter-react-v5/Components/withWidth';\n\nconst styles = theme => ({\n tabPanel: {\n width: '100%',\n height: '100% ',\n overflow: 'auto',\n overflowX: 'hidden',\n padding: 15,\n //backgroundColor: blueGrey[ 50 ]\n },\n table: {\n display: 'flex',\n flexDirection: 'column',\n width: '100%'\n },\n input: {\n width: 250,\n marginRight: 16\n },\n button: {\n marginTop: 16,\n },\n uuidGreen: {\n color: 'green'\n },\n uuidGrey: {\n color: 'grey'\n },\n tableName: {\n width: 200,\n },\n tableDate: {\n width: 150,\n textAlign: 'right',\n },\n tableUuid: {\n width: 300,\n },\n tableValid: {\n width: 100,\n },\n tableVersion: {\n width: 50,\n },\n tableUsedIn: {\n width: 100,\n },\n tableDiv: {\n overflow: 'auto',\n height: 'calc(100% - 75px)'\n }\n});\n\nclass LicensesDialog extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n confirm: false,\n confirmValue: null,\n host: '',\n uuid: '',\n requesting: false,\n licenses: this.props.data.native.licenses || [],\n readTime: this.props.data.native.readTime || 0,\n };\n }\n\n onLicensesChanged = (id, obj) => {\n if (id === 'system.licenses') {\n obj = obj || {};\n obj.native = obj.native || {};\n obj.native.licenses = obj.native.licenses || [];\n if (JSON.stringify(obj.native.licenses) !== JSON.stringify(this.state.licenses)) {\n window.alert(this.props.t('New licenses were stored'));\n this.setState({licenses: obj.native.licenses, readTime: obj.native.licenses.readTime || 0});\n } else {\n window.alert(this.props.t('Licenses have not changed'));\n }\n }\n };\n\n componentDidMount() {\n this.props.socket.getObject('system.meta.uuid')\n .then(obj => {\n this.props.socket.subscribeObject('system.licenses', this.onLicensesChanged);\n this.setState({uuid: obj.native.uuid});\n });\n }\n\n componentWillUnmount() {\n this.props.socket.unsubscribeObject('system.licenses', this.onLicensesChanged);\n }\n\n doChange = (name, value) => {\n let newData = JSON.parse(JSON.stringify(this.props.data))\n newData.native[name] = value;\n this.props.onChange(newData);\n }\n\n static requestLicensesByHost(socket, host, login, password, t) {\n return new Promise((resolve, reject) => {\n socket.getRawSocket().emit('updateLicenses', login, password, (err, licenses) => {\n if (err === 'permissionError') {\n reject(t('May not trigger \"updateLicenses\"'));\n } else {\n if (err && err.error) {\n reject(t(err.error));\n } else if (err) {\n reject(t(err));\n } else {\n resolve(licenses);\n }\n }\n });\n });\n }\n\n requestLicenses() {\n this.setState({requesting: true});\n let password;\n return new Promise(resolve => {\n // if password was not changed\n if (this.props.data.native.password === '__SOME_PASSWORD__') {\n this.props.socket.getObject('system.licenses')\n .then(obj => {\n // if login was changed\n if (obj.native.login !== this.props.data.native.login) {\n return this.props.socket.decrypt(obj.native.password)\n .then(password => resolve(password));\n } else {\n resolve(null);\n }\n });\n } else {\n resolve(this.props.data.native.password);\n }\n })\n .then(_password => {\n password = _password;\n return LicensesDialog.requestLicensesByHost(this.props.socket, this.props.host, password ? this.props.data.native.login : null, password, this.props.t);\n })\n .then(licenses => {\n if (licenses !== null && licenses !== undefined) {\n this.setState({licenses, requesting: false});\n } else {\n this.setState({requesting: false});\n }\n\n if (password) {\n window.alert(this.props.t('Licenses were not stored. They will be stored after the settings will be saved'));\n }\n })\n .catch(error => {\n this.setState({requesting: false});\n if (error === 'Authentication required') {\n window.alert(this.props.t('Cannot update licenses: %s', this.props.t('Authentication required')));\n } else {\n window.alert(this.props.t('Cannot update licenses: %s', error));\n }\n });\n }\n\n renderLicenses() {\n return <div className={this.props.classes.tableDiv}>\n <TableContainer>\n <Table stickyHeader size=\"small\">\n <TableHead className={this.props.classes.tableName} >\n <TableRow>\n <TableCell className={this.props.classes.tableName}>{this.props.t('Product')}</TableCell>\n <TableCell className={this.props.classes.tableDate}>{this.props.t('Ordered at')}</TableCell>\n <TableCell className={this.props.classes.tableUuid}>{this.props.t('UUID')}</TableCell>\n <TableCell className={this.props.classes.tableValid}>{this.props.t('Valid till')}</TableCell>\n <TableCell className={this.props.classes.tableVersion}>{this.props.t('V')}</TableCell>\n <TableCell className={this.props.classes.tableUsedIn}>{this.props.t('Used by')}</TableCell>\n </TableRow>\n </TableHead>\n <TableBody>\n {this.state.licenses && this.state.licenses.map(license => <TableRow key={license.id}>\n <TableCell className={this.props.classes.tableName}>{license.product}</TableCell>\n <TableCell className={this.props.classes.tableDate}>{new Date(license.time).toLocaleDateString()}</TableCell>\n <TableCell className={clsx(this.props.classes.tableUuid, license.uuid && this.state.uuid === license.uuid ? this.props.classes.uuidGreen : (license.uuid ? this.props.classes.uuidGrey : ''))}>{license.uuid || ''}</TableCell>\n <TableCell className={this.props.classes.tableValid}>{license.validTill === '0000-00-00 00:00:00' ? '' : license.validTill || ''}</TableCell>\n <TableCell className={this.props.classes.tableVersion}>{license.version || ''}</TableCell>\n <TableCell className={this.props.classes.tableUsedIn}>{license.usedBy || ''}</TableCell>\n </TableRow>)}\n </TableBody>\n </Table>\n </TableContainer>\n </div>;\n }\n\n render() {\n const {classes} = this.props;\n\n return <div className={classes.tabPanel}>\n <TextField\n variant=\"standard\"\n className={this.props.classes.input}\n value={this.props.data.native.login}\n helperText={this.props.t('for ioBroker.net portal')}\n label={this.props.t('Login/Email')}\n onChange={e => this.doChange('login', e.target.value)}\n inputProps={{\n autoComplete: 'new-password',\n form: {autoComplete: 'off'},\n }}\n />\n <TextField\n variant=\"standard\"\n className={this.props.classes.input}\n type=\"password\"\n value={this.props.data.native.password}\n helperText={this.props.t('for ioBroker.net portal')}\n label={this.props.t('Password')}\n onChange={e => this.doChange('password', e.target.value)}\n inputProps={{\n autoComplete: 'new-password',\n form: {autoComplete: 'off'},\n }}\n />\n <Button\n variant=\"contained\"\n startIcon={<IconRefresh/>}\n disabled={\n this.state.requesting ||\n this.props.saving ||\n !this.props.host ||\n !this.props.data.native.password ||\n !this.props.data.native.login\n }\n onClick={() => this.requestLicenses()}\n className={this.props.classes.button}\n color=\"grey\"\n >{this.props.t('Check')}</Button>\n { this.renderLicenses() }\n </div>;\n }\n}\n\nLicensesDialog.propTypes = {\n t: PropTypes.func,\n data: PropTypes.object,\n host: PropTypes.string,\n saving: PropTypes.bool,\n};\n\nexport default withWidth()(withStyles(styles)(LicensesDialog));\n","// CertificatesDialog.js\nimport { Component } from 'react';\nimport clsx from 'clsx';\nimport Dropzone from 'react-dropzone';\nimport PropTypes from 'prop-types';\n\nimport { withStyles } from '@mui/styles';\n\nimport Fab from '@mui/material/Fab';\nimport Paper from '@mui/material/Paper';\nimport Table from '@mui/material/Table';\nimport TableBody from '@mui/material/TableBody';\nimport TableCell from '@mui/material/TableCell';\nimport TableContainer from '@mui/material/TableContainer';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport TextField from '@mui/material/TextField';\n\nimport AddIcon from '@mui/icons-material/Add';\nimport DeleteIcon from '@mui/icons-material/Delete';\n\nimport withWidth from '@iobroker/adapter-react-v5/Components/withWidth';\nimport I18n from '@iobroker/adapter-react-v5/i18n';\n\nimport Utils from '../../Utils';\n\n// icons\n\nconst styles = theme => ({\n tabPanel: {\n width: '100%',\n height: '100% ',\n overflow: 'auto',\n overflowX: 'hidden',\n padding: 15,\n position: 'relative'\n },\n tableContainer: {\n zIndex: 100\n },\n table: {\n display: 'flex',\n flexDirection: 'column',\n width: '100%'\n },\n buttonPanel: {\n paddingBottom: 40,\n display: 'flex'\n },\n descriptionPanel: {\n width: '100%',\n backgroundColor: 'transparent',\n marginLeft: 40,\n border: 'none',\n display: 'flex',\n alignItems: 'center'\n },\n littleRow: {\n width: 110\n },\n nameRow: {\n width: 220\n },\n input: {\n width: '100%'\n }\n});\n\nclass CertificatesDialog extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n chClass: false\n };\n }\n\n certToArray(certs) {\n return Utils.objectMap(certs, (cert, name) => {\n return {\n title: name,\n data: cert\n }\n });\n }\n\n arrayToCert(array) {\n let result = {};\n for (let k in array) {\n result[array[k].title] = array[k].data\n }\n\n return result;\n }\n\n static detectType(name) {\n name = name.toLowerCase();\n\n if (name.includes('public') || name.includes('cert')) {\n return 'public';\n } else if (name.includes('priv') || name.includes('key')) {\n return 'private';\n } else if (name.includes('chain') || name.includes('ca')) {\n return 'chained';\n } else {\n return '';\n }\n }\n\n render() {\n const { classes } = this.props;\n const arr = this.certToArray(this.props.data.native.certificates);\n\n const rows = arr.map((e, i) => {\n const type = CertificatesDialog.detectType(e.title);\n\n return <TableRow key={i} className=\"float_row\">\n <TableCell className={this.props.classes.littleRow + ' float_cell'}>\n {i + 1}\n </TableCell>\n <TableCell className={this.props.classes.nameRow + ' float_cell'}>\n <TextField\n variant=\"standard\"\n value={e.title}\n InputLabelProps={{shrink: true}}\n InputProps={{readOnly: false}}\n className={this.props.classes.input + ' xs-centered'}\n onChange={evt => this.onChangeText(evt.target.value, e.title, 'title')}\n error={!type}\n helperText={type || I18n.t('Unknown type: use in name \"private\", \"public\" or \"chained\" to define the certificate type') }\n />\n </TableCell>\n <TableCell className=\"grow_cell float_cell\">\n <TextField\n variant=\"standard\"\n id={'default_' + i}\n value={e.data}\n InputLabelProps={{ shrink: true }}\n InputProps={{ readOnly: false }}\n className={this.props.classes.input + ' xs-centered'}\n onChange={evt => {\n let value = evt.target.value.replace(/\\r/g, '').replace(/\\n/g, '');\n if (value.startsWith('--')) {\n let parts = value.split('-----');\n parts[2] = parts[2].replace(/\\s/g, '');\n value = `-----${parts[1]}-----\\r\\n${parts[2]}\\r\\n-----${parts[3]}-----`;\n }\n\n this.onChangeText(value, e.title, 'data');\n }}\n />\n </TableCell>\n <TableCell className={this.props.classes.littleRow + ' float_cell'}>\n <Fab\n size=\"small\"\n color=\"secondary\"\n aria-label=\"add\"\n onClick={evt => this.onDelete(e.title)}\n >\n <DeleteIcon/>\n </Fab>\n </TableCell>\n </TableRow>\n })\n return <div className={classes.tabPanel}>\n <Dropzone noClick>\n {({ getRootProps, getInputProps, acceptedFiles, fileRejections }) => (\n <div {...getRootProps({\n className: this.state.chClass ? 'drop-container drop-dop' : 'drop-container',\n onDragEnter: evt => this.setState({ chClass: true }),\n onDragLeave: evt => this.setState({ chClass: false }),\n onDrop: evt => {\n if (fileRejections.length) {\n let msg = [];\n // eslint-disable-next-line array-callback-return\n fileRejections.map((e => {\n let m = e.file.name + ': ';\n let mm = [];\n e.errors.forEach(ee => mm.push(ee.message));\n msg.push(m + mm.join(','));\n }));\n\n alert(msg.join(', '));\n }\n\n if (acceptedFiles.length) {\n // eslint-disable-next-line array-callback-return\n acceptedFiles.map(file => {\n const reader = new FileReader();\n reader.onload = async e =>\n this.onAdd(file.name, e.target.result);\n reader.readAsText(file);\n })\n } else if (!fileRejections.length) {\n alert(this.props.t('No files exists'));\n }\n\n this.setState({ chClass: false });\n }\n })}>\n <input {...getInputProps()} />\n </div>\n )}\n </Dropzone>\n <div className={classes.buttonPanel}>\n <Fab\n size=\"small\"\n className=\"small_size\"\n color=\"primary\"\n aria-label=\"add\"\n onClick={() => this.onAdd()}\n >\n <AddIcon/>\n </Fab>\n <Paper variant=\"outlined\" className={classes.descriptionPanel}>\n {this.props.t('certs_hint')}\n </Paper>\n </div>\n <TableContainer className={classes.tableContainer}>\n <Table className={classes.table} aria-label=\"customized table\">\n <TableHead>\n <TableRow className=\"float_row\">\n <TableCell className={clsx(this.props.classes.littleRow, 'float_cell')}> </TableCell>\n <TableCell className={clsx(this.props.classes.nameRow, 'float_cell')}>\n {this.props.t('name')}\n </TableCell>\n <TableCell className={clsx('grow_cell', 'float_cell')}>\n {this.props.t('Certificate')}\n </TableCell>\n <TableCell className={clsx(this.props.classes.littleRow, 'float_cell')}> </TableCell>\n </TableRow>\n </TableHead>\n <TableBody>\n {rows}\n </TableBody>\n </Table>\n </TableContainer>\n </div>;\n }\n\n onChangeText = (value, id, name) => {\n let newData = JSON.parse(JSON.stringify(this.props.data))\n let array = this.certToArray(newData.native.certificates);\n array.find(element => element.title === id)[name] = value;\n newData.native.certificates = this.arrayToCert(array);\n this.props.onChange(newData);\n }\n\n onDelete = id => {\n let newData = JSON.parse(JSON.stringify(this.props.data))\n let array = this.certToArray(newData.native.certificates);\n let index = array.findIndex(element => element.title === id);\n delete array[index];\n newData.native.certificates = this.arrayToCert(array);\n this.props.onChange(newData);\n }\n\n onAdd = (title, data) => {\n let newData = JSON.parse(JSON.stringify(this.props.data))\n let array = this.certToArray(newData.native.certificates);\n if (!title) {\n let i = 1;\n // eslint-disable-next-line\n while (array.find(item => item.title === this.props.t('certificate') + '_' + i)) {\n i++;\n }\n title = this.props.t('certificate') + '_' + i;\n }\n\n array.push({\n title: title || '__',\n data: data || ''\n });\n newData.native.certificates = this.arrayToCert(array);\n this.props.onChange(newData);\n }\n}\n\nCertificatesDialog.propTypes = {\n t: PropTypes.func,\n data: PropTypes.object,\n onChange: PropTypes.func,\n};\n\nexport default withWidth()(withStyles(styles)(CertificatesDialog));\n\n\n\n","// SSLDialog.js\nimport {Component} from 'react';\nimport PropTypes from 'prop-types';\nimport {withStyles} from '@mui/styles';\n\nimport Grid from '@mui/material/Grid';\nimport FormControl from '@mui/material/FormControl';\nimport TextField from '@mui/material/TextField';\nimport Paper from '@mui/material/Paper';\n\nimport withWidth from '@iobroker/adapter-react-v5/Components/withWidth';\n\nconst styles = theme => ({\n tabPanel: {\n width: '100%',\n height: '100% ',\n overflow: 'auto',\n overflowX: 'hidden',\n padding: 15,\n //backgroundColor: blueGrey[ 50 ]\n },\n buttonPanel: {\n paddingBottom: 40,\n display: 'flex'\n },\n descriptionPanel: {\n width: '100%',\n backgroundColor: 'transparent',\n marginLeft: 40,\n border: 'none',\n display: 'flex',\n alignItems: 'center',\n '& a': {\n paddingLeft: 3,\n color: theme.palette.mode === 'dark' ? '#EEE' : '#111',\n\n }\n },\n formControl: {\n margin: theme.spacing(1),\n minWidth: '100%',\n },\n});\n\nclass SSLDialog extends Component {\n render() {\n const {classes, data} = this.props;\n const {letsEncrypt} = data.native || {};\n return <div className={classes.tabPanel}>\n <div className={classes.buttonPanel}>\n <Paper\n variant=\"outlined\"\n className={classes.descriptionPanel}\n dangerouslySetInnerHTML={{__html: this.props.t('letsnecrypt_help')}}\n />\n </div>\n <Grid container spacing={6}>\n <Grid item md={3} xs={12}>\n <FormControl variant=\"standard\" className={classes.formControl}>\n <TextField\n variant=\"standard\"\n id=\"email\"\n label={this.props.t('Email for account:')}\n value={letsEncrypt ? letsEncrypt.email : ''}\n InputLabelProps={{\n readOnly: false,\n shrink: true,\n }}\n onChange={evt => this.onChangeText(evt, 'email')}\n />\n </FormControl>\n </Grid>\n <Grid item md={3} xs={12}>\n <FormControl variant=\"standard\" className={classes.formControl}>\n <TextField\n variant=\"standard\"\n id=\"domains\"\n label={this.props.t('Domains:')}\n value={letsEncrypt ? letsEncrypt.domains : ''}\n InputLabelProps={{\n readOnly: false,\n shrink: true,\n }}\n onChange={evt => this.onChangeText(evt, 'domains')}\n />\n </FormControl>\n </Grid>\n <Grid item md={3} xs={12}>\n <FormControl variant=\"standard\" className={classes.formControl}>\n <TextField\n variant=\"standard\"\n id=\"path\"\n label={this.props.t('Path to storage:')}\n value={letsEncrypt ? letsEncrypt.path : ''}\n InputLabelProps={{\n readOnly: false,\n shrink: true,\n }}\n onChange={evt => this.onChangeText(evt, 'path')}\n />\n </FormControl>\n </Grid>\n </Grid>\n </div>;\n }\n\n onChangeText = (evt, id) => {\n const value = evt.target.value;\n this.doChange(id, value);\n }\n\n doChange = (name, value) => {\n let newData = JSON.parse(JSON.stringify(this.props.data))\n newData.native.letsEncrypt = newData.native.letsEncrypt || {};\n newData.native.letsEncrypt[name] = value;\n this.props.onChange(newData);\n }\n}\n\nSSLDialog.propTypes = {\n t: PropTypes.func,\n data: PropTypes.object,\n onChange: PropTypes.func,\n};\n\nexport default withWidth()(withStyles(styles)(SSLDialog));\n\n\n\n","// ACLDialog.js\n\nimport React, { Component, Fragment } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { withStyles } from '@mui/styles';\nimport {Grid, Typography, FormControl, Checkbox} from '@mui/material';\nimport Table from '@mui/material/Table';\nimport TableBody from '@mui/material/TableBody';\nimport TableCell from '@mui/material/TableCell';\nimport TableContainer from '@mui/material/TableContainer';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport MenuItem from '@mui/material/MenuItem';\nimport Select from '@mui/material/Select';\nimport InputLabel from '@mui/material/InputLabel';\n\nimport I18n from '@iobroker/adapter-react-v5/i18n';\nimport withWidth from '@iobroker/adapter-react-v5/Components/withWidth';\n\nconst styles = theme => ({\n tabPanel: {\n width: '100%',\n height: '100% ',\n overflow: 'auto',\n overflowX: 'hidden',\n padding: 15,\n //backgroundColor: blueGrey[ 50 ]\n },\n buttonPanel: {\n paddingBottom: 40,\n display: 'flex'\n },\n formControl: {\n margin: theme.spacing(1),\n minWidth: '100%',\n },\n tableCell: {\n textAlign: 'center',\n border: '1px solid #AAA',\n paddingLeft: 0,\n paddingRight: 0\n }\n});\n\nclass ACLDialog extends Component {\n permBits = [[0x400, 0x200], [0x40, 0x20], [0x4, 0x2]];\n\n getTypes() {\n return [\n {\n type: 'object',\n title: 'Object rights'\n },\n {\n type: 'state',\n title: 'States rights'\n },\n {\n type: 'file',\n title: 'File rights'\n }\n ];\n }\n\n getRights(type) {\n const rts = this.props.data.common.defaultNewAcl[type];\n return this.permBits.map(bitGroup => bitGroup.map(bit => rts & bit));\n }\n\n getTable(owner) {\n const checks = this.getRights(owner);\n const {classes} = this.props;\n const checkboxes = checks.map((elem, index) =>\n <Fragment key={index}>\n <TableCell className={classes.tableCell}>\n <Checkbox\n checked={!!elem[0]}\n color=\"primary\"\n onChange={evt => this.handleCheck(evt, owner, index, 0)}\n />\n </TableCell>\n <TableCell className={classes.tableCell}>\n <Checkbox\n checked={!!elem[1]}\n color=\"primary\"\n onChange={evt => this.handleCheck(evt, owner, index, 1)}\n />\n </TableCell>\n </Fragment>);\n\n return <TableContainer>\n <Table className={classes.table} aria-label=\"customized table\">\n <TableHead>\n <TableRow>\n <TableCell colSpan={2} className={classes.tableCell}>\n {this.props.t('Owner')}\n </TableCell>\n <TableCell colSpan={2} className={classes.tableCell}>\n {this.props.t('Group')}\n </TableCell>\n <TableCell colSpan={2} className={classes.tableCell}>\n {this.props.t('Everyone')}\n </TableCell>\n </TableRow>\n </TableHead>\n <TableBody>\n <TableRow>\n <TableCell className={classes.tableCell}>\n {this.props.t('read')}\n </TableCell>\n <TableCell className={classes.tableCell}>\n {this.props.t('write')}\n </TableCell>\n <TableCell className={classes.tableCell}>\n {this.props.t('read')}\n </TableCell>\n <TableCell className={classes.tableCell}>\n {this.props.t('write')}\n </TableCell>\n <TableCell className={classes.tableCell}>\n {this.props.t('read')}\n </TableCell>\n <TableCell className={classes.tableCell}>\n {this.props.t('write')}\n </TableCell>\n </TableRow>\n <TableRow>\n {checkboxes}\n </TableRow>\n </TableBody>\n </Table>\n </TableContainer>;\n }\n\n doChange = (name, value) => {\n let newData = JSON.parse(JSON.stringify(this.props.data))\n newData.common.defaultNewAcl[name] = value;\n this.props.onChange(newData);\n }\n\n handleCheck = (evt, ownerType, elemNum, num) => {\n let newData = JSON.parse(JSON.stringify(this.props.data))\n newData.common.defaultNewAcl[ownerType] ^= this.permBits[elemNum][num];\n this.props.onChange(newData);\n }\n\n handleChange = (evt, id) => this.doChange(id, evt.target.value);\n\n render() {\n const lang = I18n.getLanguage();\n const {classes} = this.props;\n const users = this.props.users.map((elem, index) =>\n <MenuItem value={elem._id} key={index}>\n {typeof elem.common.name === 'object' ? elem.common.name[lang] || elem.common.name.en : elem.common.name}\n </MenuItem>);\n\n const groups = this.props.groups.map((elem, index) =>\n <MenuItem value={elem._id} key={index}>\n {typeof elem.common.name === 'object' ? elem.common.name[lang] || elem.common.name.en : elem.common.name}\n </MenuItem>);\n\n const objectRights = this.getTypes().map((ee, ii) =>\n <Grid item lg={4} xs={12} md={6} key={ii}>\n <Typography variant=\"h6\" component=\"div\">\n {this.props.t(ee.title)}\n </Typography>\n {this.getTable(ee.type)}\n </Grid>);\n\n return <div className={classes.tabPanel}>\n <Typography variant=\"h5\" component=\"div\">\n {this.props.t('Access control list')}\n </Typography>\n <Grid container spacing={3}>\n <Grid item lg={3} md={6} xs={12}>\n <FormControl variant=\"standard\" className={classes.formControl}>\n <InputLabel shrink id=\"owner-label\">\n {this.props.t('Owner user')}\n </InputLabel>\n <Select\n variant=\"standard\"\n className={classes.formControl}\n id={'owner'}\n value={this.props.data.common.defaultNewAcl.owner}\n onChange={evt => this.handleChange(evt, 'owner')}\n displayEmpty\n inputProps={{'aria-label': 'users'}}\n >\n {users}\n </Select>\n </FormControl>\n </Grid>\n <Grid item lg={3} md={6} xs={12}>\n <FormControl variant=\"standard\" className={classes.formControl}>\n <InputLabel shrink id={'ownerGroup-label'}>\n {this.props.t('Owner group')}\n </InputLabel>\n <Select\n variant=\"standard\"\n className={classes.formControl}\n id={'ownerGroup'}\n value={this.props.data.common.defaultNewAcl.ownerGroup}\n onChange={evt => this.handleChange(evt, 'ownerGroup')}\n displayEmpty\n inputProps={{'aria-label': 'ownerGroup'}}\n >\n {groups}\n </Select>\n </FormControl>\n </Grid>\n </Grid>\n <Grid container spacing={3}>\n {objectRights}\n </Grid>\n </div>;\n }\n}\n\nACLDialog.propTypes = {\n t: PropTypes.func,\n data: PropTypes.object,\n users: PropTypes.array,\n onChange: PropTypes.func,\n};\n\nexport default withWidth()(withStyles(styles)(ACLDialog));\n\n","// StatisticsDialog.js\n\nimport { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport AceEditor from 'react-ace';\nimport 'ace-builds/webpack-resolver';\nimport 'ace-builds/src-noconflict/mode-json';\nimport 'ace-builds/src-noconflict/theme-clouds_midnight';\nimport 'ace-builds/src-noconflict/theme-chrome';\nimport 'ace-builds/src-noconflict/ext-language_tools';\n\nimport {Grid, Paper, Card, Typography, MenuItem, FormControl, Select, InputLabel} from '@mui/material';\n\nimport blueGrey from '@mui/material/colors/blueGrey';\n\nimport withWidth from '@iobroker/adapter-react-v5/Components/withWidth';\n\nconst styles = theme => ({\n tabPanel: {\n width: '100%',\n height: '100% ',\n overflow: 'auto',\n padding: 15,\n //backgroundColor: blueGrey[ 50 ]\n },\n note: {\n padding: 15,\n backgroundColor: blueGrey[500],\n color: '#FFF',\n overflow: 'auto',\n flex: 'none'\n },\n sentData: {\n padding: 15\n },\n formControl: {\n margin: theme.spacing(1),\n minWidth: '100%',\n },\n descriptionPanel: {\n width: '100%',\n backgroundColor: 'transparent',\n border: 'none',\n overflow: 'auto'\n },\n selectEmpty: {\n marginTop: theme.spacing(2),\n },\n});\n\nclass StatisticsDialog extends Component {\n getTypes() {\n return [\n {\n id: 'none',\n title: 'none'\n },\n {\n id: 'normal',\n title: 'normal'\n },\n {\n id: 'no-city',\n title: 'no-city'\n },\n {\n id: 'extended',\n title: 'extended'\n }\n ];\n }\n\n getTypesSelector = () => {\n const {classes} = this.props;\n const {common} = this.props.data;\n const items = this.getTypes().map((elem, index) =>\n <MenuItem value={elem.title} key={index}>\n {this.props.t(elem.title)}\n </MenuItem>);\n\n return <FormControl variant=\"standard\" className={classes.formControl}>\n <InputLabel shrink id={\"statistics-label\"}>\n {this.props.t('Statistics')}\n </InputLabel>\n <Select\n variant=\"standard\"\n className={classes.formControl}\n id=\"statistics\"\n value={common.diag}\n displayEmpty\n onChange={this.handleChangeType}\n >\n {items}\n </Select>\n </FormControl>;\n }\n\n doChange = (name, value) => {\n let newData = JSON.parse(JSON.stringify(this.props.data))\n newData.common[name] = value;\n this.props.onChange(newData);\n }\n\n handleChangeType = evt => {\n this.doChange('diag', evt.target.value);\n if (this.props.handle) {\n this.props.handle(evt.target.value);\n }\n }\n\n render() {\n const {classes} = this.props;\n return <div className={classes.tabPanel} style={{height: '100%'}}>\n <Grid container spacing={3} className=\"sendData-grid\" style={{height: '100%'}}>\n <Grid item lg={4} md={4} xs={12} style={{display: 'flex', flexDirection: 'column'}}>\n <Card className={classes.note}>\n <Typography gutterBottom variant=\"h6\" component=\"div\">\n {this.props.t('Note:')}\n </Typography>\n <Typography\n paragraph\n variant=\"body2\"\n component=\"div\"\n dangerouslySetInnerHTML={{__html: this.props.t('diag-note')}}\n />\n </Card>\n {this.getTypesSelector()}\n {this.props.dataAux ? <Paper\n variant=\"outlined\"\n className={classes.descriptionPanel}>\n <ul>\n {Object.keys(this.props.dataAux).map(key => <li key={key}>{key}</li>)}\n </ul>\n </Paper> : null}\n </Grid>\n <Grid item lg={8} md={4} xs={12} className=\"sendData-grid\"\n style={{height: '100%', display: 'flex', flexDirection: 'column'}}>\n <Paper className={classes.sentData}>\n <Typography gutterBottom variant=\"h6\" component=\"div\">\n {this.props.t('Sent data:')}\n </Typography>\n </Paper>\n <AceEditor\n mode=\"json\"\n width=\"100%\"\n height=\"100%\"\n showPrintMargin={true}\n showGutter={true}\n highlightActiveLine={true}\n theme={this.props.themeType === 'dark' ? 'clouds_midnight' : 'chrome'}\n value={JSON.stringify(this.props.dataAux, null, 2)}\n onChange={newValue => this.onChange(newValue)}\n name=\"UNIQUE_ID_OF_DIV\"\n fontSize={14}\n setOptions={{\n enableBasicAutocompletion: true,\n enableLiveAutocompletion: true,\n enableSnippets: true,\n showLineNumbers: true,\n tabSize: 2,\n }}\n editorProps={{$blockScrolling: true}}\n />\n </Grid>\n </Grid>\n </div>;\n }\n}\n\nStatisticsDialog.propTypes = {\n t: PropTypes.func,\n data: PropTypes.object,\n dataAux: PropTypes.object,\n themeType: PropTypes.string,\n handle: PropTypes.func.isRequired,\n};\n\nexport default withWidth()(withStyles(styles)(StatisticsDialog));\n\n","// extracted by mini-css-extract-plugin\nexport default {};","import { withStyles } from '@mui/styles';\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport Dialog from '@mui/material/Dialog';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogActions from '@mui/material/DialogActions';\nimport AppBar from '@mui/material/AppBar';\nimport Tab from '@mui/material/Tab';\nimport Tabs from '@mui/material/Tabs';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport Button from '@mui/material/Button';\nimport LinearProgress from '@mui/material/LinearProgress';\nimport IconButton from '@mui/material/IconButton';\n\nimport ConfirmDialog from '@iobroker/adapter-react-v5/Dialogs/Confirm';\nimport Router from '@iobroker/adapter-react-v5/Components/Router';\nimport withWidth from '@iobroker/adapter-react-v5/Components/withWidth';\n\nimport MainSettingsDialog from './SystemSettingsTabs/MainSettingsDialog';\nimport RepositoriesDialog from './SystemSettingsTabs/RepositoriesDialog';\nimport LicensesDialog from './SystemSettingsTabs/LicensesDialog';\nimport CertificatesDialog from './SystemSettingsTabs/CertificatesDialog';\nimport SSLDialog from './SystemSettingsTabs/SSLDialog';\nimport ACLDialog from './SystemSettingsTabs/ACLDialog';\nimport StatisticsDialog from './SystemSettingsTabs/StatisticsDialog';\n\n// icons\nimport CheckIcon from '@mui/icons-material/Check';\nimport CloseIcon from '@mui/icons-material/Close';\n\n//style\nimport '../assets/css/style.css';\n\nconst SOME_PASSWORD = '__SOME_PASSWORD__';\n\nconst styles = theme => ({\n tabPanel: {\n width: '100%',\n height: `calc(100% - ${theme.mixins.toolbar.minHeight}px)`,\n overflow: 'hidden'\n },\n tab: {\n // backgroundColor:'#FFF',\n // color:lightBlue[500]\n },\n dialogTitle: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n padding: '0 0 0 20px',\n },\n dialog: {\n width: '100%',\n height: '100%',\n maxWidth: '100%'\n },\n content: {\n padding: '0 !important'\n },\n selected: {\n color: theme.palette.mode === 'dark' ? '#FFF !important' : '#222 !important',\n }\n});\n\nclass SystemSettingsDialog extends Component {\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n confirmExit: false,\n systemConfig: null,\n systemCertificates: null,\n systemRepositories: null,\n systemLicenses: null,\n multipleRepos: false,\n licenseManager: false,\n host: '',\n };\n this.getSettings(this.state.currentHost);\n }\n\n componentDidMount() {\n this.props.socket.checkFeatureSupported('CONTROLLER_MULTI_REPO')\n .then(multipleRepos => this.props.socket.checkFeatureSupported('CONTROLLER_LICENSE_MANAGER')\n .then(licenseManager => {\n return this.props.socket.getCurrentInstance()\n .then(namespace => this.props.socket.getObject('system.adapter.' + namespace))\n .then(obj => this.setState({host: obj.common.host, multipleRepos, licenseManager}));\n }));\n }\n\n getSettings() {\n const newState = { loading: false };\n return this.props.socket.getObject('system.repositories')\n .then(systemRepositories => {\n systemRepositories = JSON.parse(JSON.stringify(systemRepositories));\n systemRepositories = systemRepositories || {};\n systemRepositories.native = systemRepositories.native || {};\n systemRepositories.native.repositories = systemRepositories.native.repositories || {};\n\n Object.keys(systemRepositories.native.repositories).forEach(repo => {\n if (systemRepositories.native.repositories[repo] &&\n systemRepositories.native.repositories[repo].json) {\n delete systemRepositories.native.repositories[repo].json;\n }\n if (systemRepositories.native.repositories[repo] &&\n systemRepositories.native.repositories[repo].hash) {\n delete systemRepositories.native.repositories[repo].hash;\n }\n });\n\n this.originalRepositories = JSON.stringify(systemRepositories);\n newState.systemRepositories = systemRepositories;\n return this.props.socket.getSystemConfig(true);\n })\n .then(systemConfig => {\n this.originalConfig = JSON.stringify(systemConfig || {});\n newState.systemConfig = systemConfig || {};\n systemConfig.common = systemConfig.common || {};\n systemConfig.native = systemConfig.native || {};\n\n systemConfig.common.defaultNewAcl = systemConfig.common.defaultNewAcl || {\n object: 1636,\n state: 1636,\n file: 1632,\n owner: 'system.user.admin',\n ownerGroup: 'system.group.administrator'\n };\n\n systemConfig.common.firstDayOfWeek = systemConfig.common.firstDayOfWeek || 'monday';\n\n return this.props.socket.getDiagData(this.props.currentHost, systemConfig.common.diag);\n })\n /**/\n .then(diagData => {\n newState.diagData = diagData;\n return this.props.socket.getUsers()\n })\n .then(users => {\n newState.users = users;\n return this.props.socket.getGroups();\n })\n .then(groups => {\n newState.groups = groups;\n return this.props.socket.getAdapterInstances(true);\n })\n .then(instances => {\n newState.histories = Object.values(instances)\n .filter(instance => instance.common.getHistory)\n .map(instance => {\n let id = instance._id.split('.');\n return id[id.length - 2] + '.' + id[id.length - 1];\n });\n\n return this.props.socket.getObject('system.certificates');\n })\n .then(systemCertificates => {\n this.originalCertificates = JSON.stringify(systemCertificates);\n newState.systemCertificates = systemCertificates;\n return this.props.socket.getObject('system.licenses');\n })\n .then(systemLicenses => {\n systemLicenses = systemLicenses || {\n common: {\n name: 'Licenses from iobroker.net'\n },\n native: {\n login: '',\n password: '',\n licenses: [],\n },\n type: 'config'\n };\n if (systemLicenses.native.password) {\n systemLicenses.native.password = SOME_PASSWORD;\n }\n\n this.originalLicenses = JSON.stringify({login: systemLicenses.native.login, password: systemLicenses.native.password});\n newState.systemLicenses = systemLicenses;\n this.setState(newState);\n })\n .catch(e => window.alert('Cannot read settings: ' + e));\n }\n\n renderConfirmDialog() {\n if (this.state.confirmExit) {\n return <ConfirmDialog\n text={this.props.t('Discard unsaved changes?')}\n onClose={result =>\n this.setState({ confirmExit: false }, () =>\n result && this.props.onClose())}\n />;\n } else {\n return null;\n }\n }\n\n onSave() {\n this.setState({saving: true}, () =>\n this.props.socket.getSystemConfig(true)\n .then(systemConfig => {\n systemConfig = systemConfig || {};\n if (JSON.stringify(systemConfig.common) !== JSON.stringify(this.state.systemConfig.common)) {\n return this.props.socket.setSystemConfig(this.state.systemConfig);\n } else {\n return Promise.resolve();\n }\n })\n .then(() => this.props.socket.setObject('system.certificates', this.state.systemCertificates))\n .then(() => this.props.socket.getObject('system.repositories'))\n .then(systemRepositories => {\n systemRepositories = systemRepositories || {};\n systemRepositories.native = systemRepositories.native || {};\n systemRepositories.native.repositories = systemRepositories.native.repositories || {};\n const newRepo = JSON.parse(JSON.stringify(this.state.systemRepositories.native.repositories));\n\n // merge new and existing info\n Object.keys(newRepo).forEach(repo => {\n if (systemRepositories.native.repositories[repo] && systemRepositories.native.repositories[repo].json) {\n newRepo[repo].json = systemRepositories.native.repositories[repo].json;\n }\n if (systemRepositories.native.repositories[repo] && systemRepositories.native.repositories[repo].hash) {\n newRepo[repo].hash = systemRepositories.native.repositories[repo].hash;\n }\n });\n systemRepositories.native.repositories = newRepo;\n return this.props.socket.setObject('system.repositories', systemRepositories);\n })\n .then(() => this.props.socket.getObject('system.licenses'))\n .then(systemLicenses => {\n systemLicenses = systemLicenses || {};\n systemLicenses.type = systemLicenses.type || 'config';\n systemLicenses.name = systemLicenses.name || 'Licenses from iobroker.net';\n systemLicenses.common = systemLicenses.common || {};\n systemLicenses.native = systemLicenses.native || {};\n systemLicenses.native.licenses = systemLicenses.native.licenses || [];\n systemLicenses.native.password = systemLicenses.native.password || '';\n systemLicenses.native.login = systemLicenses.native.login || '';\n\n const currentPassword = systemLicenses.native.password ? SOME_PASSWORD : '';\n\n if (this.state.systemLicenses.native.password !== currentPassword ||\n systemLicenses.native.login !== this.state.systemLicenses.native.login\n ) {\n systemLicenses.native.login = this.state.systemLicenses.native.login;\n\n if (this.state.systemLicenses.native.password !== SOME_PASSWORD && this.state.systemLicenses.native.password) {\n // encode it\n return this.props.socket.encrypt(this.state.systemLicenses.native.password)\n .then(password => {\n systemLicenses.native.password = password;\n return this.props.socket.setObject('system.licenses', systemLicenses)\n .then(() => LicensesDialog.requestLicensesByHost(this.props.socket, this.props.host, null, null, this.props.t))\n .catch(error => window.alert(this.props.t('Cannot update licenses: %s', error)));\n\n });\n } else {\n if (!this.state.systemLicenses.native.password) {\n systemLicenses.native.password = '';\n }\n return this.props.socket.setObject('system.licenses', systemLicenses)\n .then(() => LicensesDialog.requestLicensesByHost(this.props.socket, this.props.host, null, null, this.props.t))\n .catch(error => window.alert(this.props.t('Cannot update licenses: %s', error)));\n }\n } else {\n return Promise.resolve();\n }\n })\n .then(() => {\n // this.getSettings();\n alert(this.props.t('Settings saved'));\n this.props.onClose();\n if (this.state.systemConfig.common.expertMode !== JSON.parse(this.originalConfig).common.expertMode) {\n this.props.expertModeFunc(this.state.systemConfig.common.expertMode);\n }\n if (this.state.systemConfig.common.language !== JSON.parse(this.originalConfig).common.language ||\n JSON.stringify(this.state.systemConfig.common.activeRepo) !== JSON.stringify(JSON.parse(this.originalConfig).common.activeRepo)) {\n window.location.reload(false);\n }\n })\n .then(() => this.setState({ saving: false }))\n .catch(e =>\n window.alert(`Cannot save system configuration: ${e}`))\n );\n }\n\n getTabs() {\n return [\n {\n id: 0,\n title: 'System settings',\n component: MainSettingsDialog,\n data: 'systemConfig',\n name: 'tabConfig',\n dataAux: 'systemRepositories',\n handle: null\n },\n {\n id: 1,\n title: 'Repositories',\n component: RepositoriesDialog,\n data: 'systemRepositories',\n name: 'tabRepositories',\n dataAux: 'systemConfig',\n handle: null,\n socket: this.props.socket,\n },\n {\n id: 2,\n title: 'Licenses',\n component: LicensesDialog,\n data: 'systemLicenses',\n name: 'tabLicenses',\n dataAux: null,\n handle: null,\n socket: this.props.socket,\n },\n {\n id: 3,\n title: 'Certificates',\n component: CertificatesDialog,\n data: 'systemCertificates',\n name: 'tabCertificates',\n dataAux: {},\n handle: null\n },\n {\n id: 4,\n title: 'Let\\'s encrypt SSL',\n component: SSLDialog,\n data: 'systemCertificates',\n name: 'tabLetsEncrypt',\n dataAux: {},\n handle: null\n },\n {\n id: 5,\n title: 'Default ACL',\n component: ACLDialog,\n data: 'systemConfig',\n name: 'tabDefaultACL',\n dataAux: {},\n handle: null\n },\n {\n id: 6,\n title: 'Statistics',\n component: StatisticsDialog,\n data: 'systemConfig',\n dataAux: 'diagData',\n name: 'tabStatistics',\n handle: type => this.onChangeDiagType(type)\n }\n ];\n }\n\n onChangeDiagType = type => {\n this.props.socket.getDiagData(this.props.currentHost, type)\n .then(diagData =>\n this.setState({\n diagData,\n systemConfig: {\n ...this.state.systemConfig,\n common: {\n ...this.state.systemConfig.common,\n diag: type\n }\n }\n }));\n }\n\n getDialogContent(tabsList) {\n if (this.state.loading) {\n return <LinearProgress />;\n }\n\n const tab = tabsList.find(tab => tab.name === this.props.currentTab.id) || tabsList[0];\n\n const MyComponent = tab.component;\n const { groups, users, histories } = this.state;\n return <div className={this.props.classes.tabPanel}>\n <MyComponent\n adminGuiConfig={this.props.adminGuiConfig}\n onChange={(data, dataAux) => this.onChangedTab(tab.data, data, tab.dataAux, dataAux)}\n data={this.state[tab.data]}\n dataAux={this.state[tab.dataAux]}\n handle={tab.handle}\n users={users}\n groups={groups}\n multipleRepos={this.state.multipleRepos}\n activeRepo={this.state.systemConfig.common.activeRepo}\n histories={histories}\n themeName={this.props.themeName}\n themeType={this.props.themeType}\n host={this.state.host}\n t={this.props.t}\n socket={this.props.socket}\n saving={this.state.saving}\n />\n </div>;\n }\n\n onTabChanged = (event, newTab) => {\n Router.doNavigate(null, 'system', newTab);\n }\n\n onChangedTab(id, data, idAux, dataAux) {\n let state = { ...this.state };\n if (data) {\n state[id] = data;\n }\n if (dataAux) {\n state[idAux] = dataAux;\n }\n this.setState(state);\n }\n\n render() {\n const changed = !(JSON.stringify(this.state.systemRepositories) === this.originalRepositories &&\n JSON.stringify(this.state.systemConfig) === this.originalConfig &&\n JSON.stringify(this.state.systemCertificates) === this.originalCertificates &&\n JSON.stringify({login: this.state.systemLicenses.native.login, password: this.state.systemLicenses.native.password}) === this.originalLicenses);\n\n const tabsList = this.getTabs().filter(tab => {\n if (!this.state.licenseManager && tab.name === 'tabLicenses') {\n return false;\n }\n return this.props.adminGuiConfig.admin.settings[tab.name] !== false\n });\n\n const tabs = tabsList\n .map(tab => <Tab\n key={tab.title}\n label={this.props.t(tab.title)}\n value={tab.name}\n classes={{ selected: this.props.classes.selected }}\n />);\n\n return <Dialog\n className={this.props.classes.dialog}\n classes={{\n root: this.props.classes.dialog,\n paper: 'dialog-setting'\n }}\n open={true}\n onClose={(e, reason) => {\n if (reason !== 'backdropClick' && reason !== 'escapeKeyDown') {\n if (changed) {\n this.setState({confirmExit: true});\n } else {\n this.props.onClose();\n }\n }\n }}\n fullWidth={false}\n fullScreen={false}\n aria-labelledby=\"system-settings-dialog-title\"\n >\n <DialogContent className={this.props.classes.content}>\n <AppBar position=\"static\" color=\"default\">\n <div className={this.props.classes.dialogTitle}>\n {this.props.width !== 'xs' && this.props.width !== 'sm' && <Typography className=\"dialogName\">\n {this.props.t('Base settings')}\n </Typography>}\n <Tabs\n className={this.props.classes.tab}\n indicatorColor=\"secondary\"\n value={this.props.currentTab.id || 'tabConfig'}\n onChange={(event, newTab) => this.onTabChanged(event, newTab)}\n variant=\"scrollable\"\n scrollButtons=\"auto\"\n >\n {tabs}\n </Tabs>\n <IconButton size=\"large\"\n disabled={this.state.saving}\n edge=\"start\"\n color=\"inherit\"\n onClick={() => changed ? this.setState({ confirmExit: true }) : this.props.onClose()}\n aria-label=\"close\"\n >\n <CloseIcon />\n </IconButton>\n </div>\n </AppBar>\n {this.getDialogContent(tabsList)}\n {this.renderConfirmDialog()}\n </DialogContent>\n <DialogActions>\n <Button\n variant=\"contained\"\n disabled={!changed || this.state.saving}\n onClick={() => this.onSave()}\n color=\"primary\"\n startIcon={<CheckIcon/>}\n >\n {this.props.t('Save & Close')}\n </Button>\n <Button\n variant=\"contained\"\n disabled={this.state.saving}\n onClick={() => changed ? this.setState({ confirmExit: true }) : this.props.onClose()}\n startIcon={<CloseIcon/>}\n color=\"grey\"\n >\n {changed ? this.props.t('Cancel') : this.props.t('Close')}\n </Button>\n </DialogActions>\n </Dialog>;\n }\n}\n\nSystemSettingsDialog.propTypes = {\n t: PropTypes.func,\n lang: PropTypes.string,\n socket: PropTypes.object,\n themeName: PropTypes.string,\n themeType: PropTypes.string,\n onClose: PropTypes.func.isRequired,\n currentTab: PropTypes.object,\n width: PropTypes.string,\n adminGuiConfig: PropTypes.object,\n instance: PropTypes.string,\n};\n\nexport default withWidth()(withStyles(styles)(SystemSettingsDialog));\n\nfunction TabPanel(props) {\n const { children, value, index, ...other } = props;\n\n return <div\n role=\"tabpanel\"\n hidden={value !== index}\n id={`nav-tabpanel-${index}`}\n aria-labelledby={`nav-tab-${index}`}\n {...other}\n >\n {value === index && <Box p={3}>\n <Typography>{children}</Typography>\n </Box>}\n </div>;\n}\n\nTabPanel.propTypes = {\n children: PropTypes.node,\n index: PropTypes.any.isRequired,\n value: PropTypes.any.isRequired,\n};\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport Avatar from '@mui/material/Avatar';\nimport Box from '@mui/material/Box';\nimport Button from '@mui/material/Button';\nimport Checkbox from '@mui/material/Checkbox';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport Grid from '@mui/material/Grid';\nimport Link from '@mui/material/Link';\nimport Paper from '@mui/material/Paper';\nimport TextField from '@mui/material/TextField';\nimport Typography from '@mui/material/Typography';\nimport CircularProgress from '@mui/material/CircularProgress';\n\nimport withWidth from '@iobroker/adapter-react-v5/Components/withWidth';\n\nconst boxShadow = '0 4px 7px 5px rgb(0 0 0 / 14%), 0 3px 1px 1px rgb(0 0 0 / 12%), 0 1px 5px 0 rgb(0 0 0 / 20%)';\n\nconst styles = theme => ({\n root: {\n padding: 10,\n margin: 'auto',\n display: 'flex',\n height: '100%',\n alignItems: 'center',\n borderRadius: 0,\n justifyContent: 'center',\n },\n paper: {\n background: theme.palette.background.paper + (theme.palette.background.paper.length < 7 ? 'd' : 'dd'),\n padding: theme.spacing(3),\n overflowY: 'auto',\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n maxHeight: 500,\n maxWidth: 380,\n boxShadow\n },\n avatar: {\n margin: theme.spacing(1),\n backgroundColor: '#fff',\n width: 100,\n height: 100,\n },\n avatarImg: {\n width: 'calc(100% - 4px)',\n height: 'calc(100% - 4px)',\n padding: 2\n },\n form: {\n width: '100%', // Fix IE 11 issue.\n marginTop: theme.spacing(1),\n },\n submit: {\n margin: theme.spacing(1),\n },\n alert: {\n marginTop: theme.spacing(2),\n backgroundColor: '#f44336',\n padding: 8,\n color: '#fff',\n borderRadius: 4,\n fontSize: 16,\n },\n ioBrokerLink: {\n textTransform: 'inherit'\n },\n marginTop: {\n marginTop: 'auto'\n },\n progress: {\n textAlign: 'center'\n }\n});\n\nclass Login extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n inProcess: false,\n };\n\n this.formRef = React.createRef();\n\n // apply image\n const body = window.document.getElement('body');\n body.style.backgroundColor = window.loginBackgroundColor;\n body.style.backgroundImage = window.loginBackgroundImage;\n body.style.backgroundSize = 'cover';\n }\n\n render() {\n const classes = this.props.classes;\n const action = `${window.location.port === '3000' ? `${window.location.protocol}//${window.location.hostname}:8081/` : ''}login?${window.location.port === '3000' ? 'dev&' : ''}href=${window.location.hash}`;\n\n const link = window.loginLink && window.loginLink !== '@@loginLink@@' ? window.loginLink : 'https://www.iobroker.net/';\n const motto = window.loginMotto && window.loginMotto !== '@@loginMotto@@' ? window.loginMotto : ('Discover awesome. ');\n\n if (window.login !== 'true') {\n debugger;\n window.location = `${window.location.protocol}//${window.location.host}${window.location.pathname}`;\n }\n const style = (window.loginBackgroundColor && window.loginBackgroundColor !== 'inherit') || window.loginBackgroundImage ? { background: '#00000000' } : {};\n\n return <Paper component=\"main\" className={classes.root} style={style}>\n <Paper className={classes.paper}>\n <Grid\n container\n direction=\"column\"\n alignItems=\"center\"\n >\n {window.loginLogo && window.loginLogo !== '@@loginLogo@@' ?\n <div style={{\n height: 50,\n withWidth: 102,\n lineHeight: '50px',\n background: 'white',\n borderRadius: 5,\n padding: 5}}\n ><img src={window.loginLogo} alt=\"logo\"\n style={{maxWidth: '100%', maxHeight: '100%'}}/></div>\n :\n window.loginHideLogo === 'false' &&\n <Avatar className={classes.avatar} src=\"img/logo.png\" classes={{img: classes.avatarImg}} />}\n <Typography component=\"h1\" variant=\"h5\">\n {window.loginTitle && window.loginTitle !== '@@loginTitle@@' ? window.loginTitle : this.props.t('loginTitle')}\n </Typography>\n {window.location.search.includes('error') &&\n <div className={classes.alert}>\n {this.props.t('wrongPassword')}\n </div>\n }\n <form\n ref={this.formRef}\n className={classes.form}\n action={action}\n method=\"post\"\n >\n <TextField\n variant=\"outlined\"\n margin=\"normal\"\n disabled={this.state.inProcess}\n required\n fullWidth\n size=\"small\"\n id=\"username\"\n label={this.props.t('enterLogin')}\n name=\"username\"\n autoComplete=\"username\"\n autoFocus\n />\n <TextField\n variant=\"outlined\"\n margin=\"normal\"\n disabled={this.state.inProcess}\n required\n fullWidth\n size=\"small\"\n name=\"password\"\n label={this.props.t('enterPassword')}\n type=\"password\"\n id=\"password\"\n autoComplete=\"current-password\"\n />\n <FormControlLabel\n control={<Checkbox\n id=\"stayloggedin\"\n name=\"stayloggedin\"\n value=\"on\"\n color=\"primary\"\n disabled={this.state.inProcess}\n />}\n label={this.props.t('Stay signed in')}\n />\n <input id=\"origin\" type=\"hidden\" name=\"origin\" value={window.location.pathname + window.location.search.replace('&error', '')} />\n {<Button\n type=\"submit\"\n disabled={this.state.inProcess}\n onClick={() => {\n this.formRef.current.submit();\n // give time to firefox to send the data\n setTimeout(() =>\n this.setState({ inProcess: true }), 50);\n }}\n fullWidth\n variant=\"contained\"\n color=\"primary\"\n className={classes.submit}\n >\n {this.state.inProcess ? <CircularProgress size={24}/> : this.props.t('login')}\n </Button>}\n </form>\n </Grid>\n <Box className={classes.marginTop}>\n <Typography\n variant=\"body2\"\n color=\"textSecondary\"\n align=\"center\"\n >\n {window.loginLink && window.loginLink !== '@@loginLink@@' ?\n <Link\n className={classes.ioBrokerLink}\n color=\"inherit\"\n href={link}\n rel=\"noopener noreferrer\"\n target=\"_blank\"\n >\n {motto}\n </Link> : null\n }\n {!window.loginLink || window.loginLink === '@@loginLink@@' ? motto : null}\n {!window.loginLink || window.loginLink === '@@loginLink@@' ? <Link\n className={classes.ioBrokerLink}\n color=\"inherit\"\n href={link}\n rel=\"noopener noreferrer\"\n target=\"_blank\"\n >\n ioBroker\n </Link> : null}\n </Typography>\n </Box>\n </Paper>\n </Paper>;\n }\n}\n\nLogin.propTypes = {\n t: PropTypes.func,\n};\n\nexport default withWidth()(withStyles(styles)(Login));\n\n","import React, { useState } from 'react';\nimport { createRoot } from 'react-dom/client';\n\nimport Button from '@mui/material/Button';\nimport Dialog from '@mui/material/Dialog';\nimport DialogActions from '@mui/material/DialogActions';\nimport DialogContent from '@mui/material/DialogContent';\nimport BuildIcon from '@mui/icons-material/Build';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport Checkbox from '@mui/material/Checkbox';\nimport Grid from '@mui/material/Grid';\n\nimport I18n from '@iobroker/adapter-react-v5/i18n';\nimport { DialogTitle, IconButton, Typography } from '@mui/material';\nimport { ThemeProvider, StyledEngineProvider } from '@mui/material/styles';\nimport { makeStyles } from '@mui/styles';\n\nimport ExpertIcon from '@iobroker/adapter-react-v5/icons/IconExpert';\nimport CheckIcon from '@mui/icons-material/Check';\n\nlet node = null;\n\nconst useStyles = makeStyles(theme => ({\n root: {\n backgroundColor: theme.palette.background.paper,\n width: '100%',\n height: 'auto',\n display: 'flex',\n borderRadius: 4,\n fontSize: 16,\n fontFamily: '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif'\n },\n paper: {\n maxWidth: 800,\n },\n overflowHidden: {\n display: 'flex',\n },\n pre: {\n overflow: 'auto',\n margin: 20,\n },\n text: {\n fontSize: 16\n },\n textBold: {\n fontSize: 16,\n fontWeight: 'bold'\n },\n width100: {\n width: '100%'\n }\n}));\n\nconst ExpertModeDialog = ({ boolSettings, func, buttonIcon }) => {\n const classes = useStyles();\n const [open, setOpen] = useState(true);\n const [doNotShow, setDoNotShow] = useState(false);\n\n const onClose = () => {\n if (doNotShow) {\n (window._sessionStorage || window.sessionStorage).setItem('App.doNotShowExpertDialog', 'true');\n }\n\n setOpen(false);\n func();\n try {\n node && window.document.body.removeChild(node);\n } catch (e) {\n // ignore\n }\n\n node = null;\n };\n\n return <Dialog\n onClose={onClose}\n open={open}\n classes={{ paper: classes.paper }}\n >\n <DialogTitle><ExpertIcon style={{marginRight: 8}}/>{I18n.t('Expert mode')}</DialogTitle>\n <DialogContent className={classes.overflowHidden} dividers>\n <Grid container>\n <Grid item className={classes.width100}>\n <div className={classes.root}>\n <div className={classes.pre}>\n <Typography\n className={classes.text}\n variant=\"body2\"\n component=\"p\">\n {boolSettings ? I18n.t('Now the expert mode will be deactivated only during this browser session.') : I18n.t('Now the expert mode will be active only during this browser session.')}\n </Typography>\n {!boolSettings ? <Typography\n className={classes.textBold}\n variant=\"body2\"\n component=\"p\">\n {I18n.t('The expert mode allows you to view and edit system internal details.')}\n </Typography> : null}\n {!boolSettings ? <Typography\n className={classes.textBold}\n variant=\"body2\"\n component=\"p\">\n {I18n.t('Please make sure you know what you are doing!')}\n </Typography> : null}\n <Typography\n className={classes.text}\n variant=\"body2\"\n component=\"p\">\n {I18n.t('If you need to save the mode all the time, you can do this in the system settings.')}\n </Typography>\n {I18n.t('Use this button:')}\n <IconButton\n color=\"primary\"\n size=\"small\"\n onClick={() => {\n onClose();\n buttonIcon();\n }}>\n <BuildIcon />\n </IconButton>\n </div>\n </div>\n </Grid>\n <Grid item>\n <FormControlLabel\n control={<Checkbox checked={doNotShow} onChange={e => setDoNotShow(e.target.checked)} />}\n label={I18n.t('Do not show this dialog in this browser session any more')}\n />\n </Grid>\n </Grid>\n </DialogContent>\n <DialogActions>\n <Button\n variant=\"contained\"\n autoFocus\n onClick={onClose}\n color=\"primary\"\n startIcon={<CheckIcon/>}\n >\n {I18n.t('Ok')}\n </Button>\n </DialogActions>\n </Dialog>;\n}\n\nexport const expertModeDialogFunc = (boolSettings, themeType, theme, func, buttonIcon) => {\n if (!node) {\n node = document.createElement('div');\n node.id = 'renderModal';\n document.body.appendChild(node);\n }\n const root = createRoot(node);\n console.log('Create expert')\n\n return root.render(<StyledEngineProvider injectFirst>\n <ThemeProvider theme={theme}>\n <ExpertModeDialog\n themeType={themeType}\n buttonIcon={buttonIcon}\n boolSettings={boolSettings}\n func={func}\n />\n </ThemeProvider>\n </StyledEngineProvider>);\n}","import React, { useEffect, useState } from 'react';\nimport { createRoot } from 'react-dom/client';\nimport semver from 'semver';\n\nimport Button from '@mui/material/Button';\nimport Dialog from '@mui/material/Dialog';\nimport DialogActions from '@mui/material/DialogActions';\nimport DialogContent from '@mui/material/DialogContent';\nimport { CardMedia, DialogTitle, Typography } from '@mui/material';\nimport { ThemeProvider, StyledEngineProvider } from '@mui/material/styles';\nimport { makeStyles } from '@mui/styles';\n\nimport InfoIcon from '@mui/icons-material/Info';\nimport WarningIcon from '@mui/icons-material/Warning';\nimport CancelIcon from '@mui/icons-material/Cancel';\nimport CheckIcon from '@mui/icons-material/Check';\nimport WorldIcon from '@mui/icons-material/Public';\n\nimport I18n from '@iobroker/adapter-react-v5/i18n';\nimport Utils from '@iobroker/adapter-react-v5/Components/Utils';\n\nlet node = null;\n\nconst useStyles = makeStyles(theme => ({\n root: {\n backgroundColor: theme.palette.background.paper,\n width: '100%',\n height: 'auto',\n display: 'flex',\n borderRadius: 4\n },\n paper: {\n maxWidth: 1000,\n width: '100%'\n },\n overflowHidden: {\n display: 'flex',\n },\n pre: {\n overflow: 'auto',\n margin: 20,\n '& p': {\n fontSize: 18,\n }\n },\n blockInfo: {\n right: 20,\n top: 10,\n position: 'absolute',\n display: 'flex',\n alignItems: 'center',\n color: 'silver'\n },\n img: {\n marginLeft: 10,\n width: 45,\n height: 45,\n margin: 'auto 0',\n position: 'relative',\n '&:after': {\n content: '\"\"',\n position: 'absolute',\n zIndex: 2,\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n background: 'url(\"img/no-image.png\") 100% 100% no-repeat',\n backgroundSize: 'cover',\n backgroundColor: '#fff',\n }\n },\n img2: {\n width: 70,\n height: 70,\n margin: '10px 0',\n borderRadius: 4,\n position: 'relative',\n '&:after': {\n content: '\"\"',\n position: 'absolute',\n zIndex: 2,\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n background: 'url(\"img/no-image.png\") 100% 100% no-repeat',\n backgroundSize: 'cover',\n backgroundColor: '#fff',\n }\n },\n link:{\n margin: '10px 0',\n }\n}));\n\nconst Status = ({ name, ...props }) => {\n switch (name) {\n case 'warning':\n return <WarningIcon style={{ color: '#ffca00' }} {...props} />;\n case 'info':\n return <InfoIcon style={{ color: '#007cff' }} {...props} />;\n case 'danger':\n return <CancelIcon style={{ color: '#ff2f2f' }} {...props} />;\n default:\n return <InfoIcon style={{ color: '#007cff' }} {...props} />;\n }\n}\n\nfunction checkActive(adapterName, instances) {\n return !!Object.keys(instances).filter(id => id.startsWith('adapter.system.' + adapterName + '.')).find(id => instances[id].enabled);\n}\n\nfunction checkConditions(condition, installedVersion) {\n if (condition.startsWith('equals')) {\n const vers = condition.substring(7, condition.length - 1).trim();\n return installedVersion === vers;\n } else if (condition.startsWith('bigger') || condition.startsWith('greater')) {\n const vers = condition.substring(7, condition.length - 1).trim();\n try {\n return semver.gt(vers, installedVersion);\n } catch (e) {\n return false;\n }\n } else if (condition.startsWith('smaller')) {\n const vers = condition.substring(8, condition.length - 1).trim();\n try {\n return semver.lt(installedVersion, vers);\n } catch (e) {\n return false;\n }\n } else if (condition.startsWith('between')) {\n const vers1 = condition.substring(8, condition.indexOf(',')).trim();\n const vers2 = condition.substring(condition.indexOf(',') + 1, condition.length - 1).trim();\n try {\n return semver.gt(vers1, installedVersion) && semver.gt(vers2, installedVersion);\n } catch (e) {\n return false;\n }\n } else {\n return true;\n }\n}\n\n/*const context = {\n adapters,\n instances,\n nodeVersion,\n npmVersion,\n os,\n activeRepo\n uuid,\n lang\n}*/\n\nexport const checkMessages = function (messages, lastMessageId, context) {\n const messagesToShow = [];\n\n try {\n const today = Date.now();\n for (let m = 0; m < messages.length; m++) {\n const message = messages[m];\n if (!message) {\n continue;\n }\n if (message.id === lastMessageId) {\n break;\n }\n let showIt = true;\n\n if (showIt && message['date-start'] && new Date(message['date-start']).getTime() > today) {\n showIt = false;\n } else if (showIt && message['date-end'] && new Date(message['date-end']).getTime() < today) {\n showIt = false;\n } else if (showIt && message.conditions && Object.keys(message.conditions).length > 0) {\n Object.keys(message.conditions).forEach(key => {\n if (showIt) {\n const adapter = context.adapters[key];\n const condition = message.conditions[key];\n\n if (!adapter && condition !== '!installed') {\n showIt = false;\n } else if (adapter && condition === '!installed') {\n showIt = false;\n } else if (adapter && condition === 'active') {\n showIt = checkActive(key, context.instances);\n } else if (adapter && condition === '!active') {\n showIt = !checkActive(key, context.instances);\n } else if (adapter) {\n showIt = checkConditions(condition, adapter.v);\n }\n }\n });\n }\n\n if (showIt && message['node-version'] && context.nodeVersion) {\n showIt = checkConditions(message['node-version'], context.nodeVersion);\n }\n if (showIt && message['npm-version'] && context.npmVersion) {\n showIt = checkConditions(message['npm-version'], context.npmVersion);\n }\n if (showIt && message['os'] && context.os) {\n showIt = context.os === message['os'];\n }\n if (showIt && message['repo']) {\n // If multi-repo\n if (Array.isArray(context.activeRepo)) {\n showIt = context.activeRepo.includes(message['repo']);\n } else {\n showIt = context.activeRepo === message['repo'];\n }\n }\n if (showIt && message['uuid']) {\n if (Array.isArray(message['uuid'])) {\n showIt = context.uuid && message['uuid'].find(uuid => context.uuid === uuid);\n } else {\n showIt = context.uuid && context.uuid === message['uuid'];\n }\n }\n\n if (showIt) {\n messagesToShow.push({\n id: message.id,\n title: message.title[context.lang] || message.title.en,\n content: message.content[context.lang] || message.content.en,\n 'class': message.class,\n icon: message.icon,\n created: message.created,\n link: message.link\n });\n }\n }\n } catch (err) {\n\n }\n\n return messagesToShow;\n}\n\nconst NewsAdminDialog = ({ newsArr, current, callback, themeType, theme }) => {\n const classes = useStyles();\n const [open, setOpen] = useState(true);\n const [id, setId] = useState(current);\n const [last, setLast] = useState(false);\n const [indexArr, setIndexArr] = useState(0);\n\n useEffect(() => {\n const item = newsArr.find(el => el.id === id);\n if (item) {\n const index = newsArr.indexOf(item);\n if (index + 1 < newsArr.length) {\n const newId = newsArr[index + 1].id;\n if (newId) {\n setId(newId);\n setIndexArr(index + 1);\n }\n } else {\n setOpen(false);\n try {\n node && window.document.body.removeChild(node);\n } catch (e) {\n // ignore\n }\n node = null;\n }\n } else {\n setId(newsArr[0].id);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [last]);\n\n const onClose = () => {\n // setOpen(false);\n setLast(!last)\n callback(id);\n };\n\n const lang = I18n.getLanguage();\n let text = newsArr[indexArr].content;\n if (typeof text === 'object') {\n text = (text[lang] || text.en).replace(/='([^']*)'/g, '=\"$1\"');\n }\n let title = newsArr[indexArr].title;\n if (typeof title === 'object') {\n title = title[lang] || title.en;\n }\n\n const link = newsArr[indexArr].link;\n let linkTitle = newsArr[indexArr].linktTitle;\n if (linkTitle && typeof linkTitle === 'object') {\n linkTitle = linkTitle[lang] || linkTitle.en;\n }\n return <ThemeProvider theme={theme}>\n <Dialog\n onClose={onClose}\n open={open}\n classes={{ paper: classes.paper }}\n >\n <div className={classes.blockInfo}>\n {new Date(newsArr[indexArr].created).toLocaleDateString(lang)}\n <Status className={classes.img} name={newsArr[indexArr].class} />\n </div>\n <DialogTitle>{I18n.t('You have unread news!')}</DialogTitle>\n <DialogTitle>{title}</DialogTitle>\n <DialogContent className={classes.overflowHidden} dividers>\n <div className={classes.root}>\n <div className={classes.pre}>\n {newsArr[indexArr]?.img &&\n <CardMedia className={classes.img2} component=\"img\" image={newsArr[indexArr].img} />}\n <Typography\n style={themeType === 'dark' ? { color: 'black' } : null}\n variant=\"body2\"\n component=\"p\">\n {Utils.renderTextWithA(text)}\n </Typography>\n {newsArr[indexArr]?.link &&\n <Button\n variant=\"contained\"\n className={classes.link}\n onClick={() => window.open(newsArr[indexArr].link, '_blank')}\n color=\"primary\"\n >\n {newsArr[indexArr].linkTitle ? newsArr[indexArr].linkTitle[lang] ? newsArr[indexArr].linkTitle[lang] : newsArr[indexArr].linkTitle : I18n.t('Link')}\n </Button>}\n </div>\n </div>\n </DialogContent>\n <DialogActions>\n {\n link ? <Button\n variant=\"contained\"\n onClick={() => {\n const frame = window.open(link, '_blank');\n frame && frame.focus();\n }}\n color=\"secondary\"\n startIcon={<WorldIcon/>}\n >\n {linkTitle || I18n.t('Show more info')}\n </Button> : null\n }\n <Button\n variant=\"contained\"\n autoFocus\n onClick={onClose}\n color=\"primary\"\n startIcon={<CheckIcon/>}\n >\n {I18n.t('Acknowledge')}\n </Button>\n </DialogActions>\n </Dialog>\n </ThemeProvider>;\n}\n\nexport const newsAdminDialogFunc = (newsArr, current, themeName, themeType, theme, callback) => {\n if (!node) {\n node = document.createElement('div');\n node.id = 'renderModal';\n document.body.appendChild(node);\n }\n const root = createRoot(node);\n\n return root.render(<StyledEngineProvider injectFirst>\n <ThemeProvider theme={theme}>\n <NewsAdminDialog\n newsArr={newsArr}\n themeName={themeName}\n themeType={themeType}\n current={current}\n callback={callback}\n theme={theme}\n />\n </ThemeProvider>\n </StyledEngineProvider>);\n}\n","import React, { useState } from 'react';\nimport { createRoot } from 'react-dom/client';\nimport clsx from 'clsx';\n\nimport Button from '@mui/material/Button';\nimport Dialog from '@mui/material/Dialog';\nimport DialogActions from '@mui/material/DialogActions';\nimport DialogContent from '@mui/material/DialogContent';\nimport { Accordion, AccordionDetails, AccordionSummary, AppBar, Box, CardMedia, Tab, Tabs, Typography } from '@mui/material';\nimport { ThemeProvider, StyledEngineProvider } from '@mui/material/styles';\nimport { makeStyles } from '@mui/styles';\n\nimport UpdateIcon from '@mui/icons-material/Update';\nimport SettingsRemoteIcon from '@mui/icons-material/SettingsRemote';\nimport CancelIcon from '@mui/icons-material/Cancel';\nimport PermDeviceInformationIcon from '@mui/icons-material/PermDeviceInformation';\nimport ImportExportIcon from '@mui/icons-material/ImportExport';\nimport WarningIcon from '@mui/icons-material/Warning';\nimport CancelPresentationIcon from '@mui/icons-material/CancelPresentation';\nimport MemoryIcon from '@mui/icons-material/Memory';\nimport ExpandMoreIcon from '@mui/icons-material/ExpandMore';\nimport CheckIcon from '@mui/icons-material/Check';\nimport CloseIcon from '@mui/icons-material/Close';\n\nimport I18n from '@iobroker/adapter-react-v5/i18n';\nimport Utils from '@iobroker/adapter-react-v5/Components/Utils';\n\nlet node = null;\n\nconst useStyles = makeStyles(theme => ({\n root: {\n backgroundColor: theme.palette.background.paper,\n width: '100%',\n height: 'auto',\n display: 'flex',\n borderRadius: 4,\n flexDirection: 'column'\n },\n paper: {\n maxWidth: 1000,\n width: '100%'\n },\n flex: {\n display: 'flex',\n },\n overflowHidden: {\n overflow: 'hidden'\n },\n overflowAuto: {\n overflowY: 'auto'\n },\n pre: {\n overflow: 'auto',\n margin: 20,\n '& p': {\n fontSize: 18,\n }\n },\n blockInfo: {\n right: 20,\n top: 10,\n position: 'absolute',\n display: 'flex',\n alignItems: 'center',\n color: 'silver'\n },\n img: {\n marginLeft: 10,\n width: 45,\n height: 45,\n margin: 'auto 0',\n position: 'relative',\n '&:after': {\n content: '\"\"',\n position: 'absolute',\n zIndex: 2,\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n background: 'url(\"img/no-image.png\") 100% 100% no-repeat',\n backgroundSize: 'cover',\n backgroundColor: '#fff',\n }\n },\n message: {\n justifyContent: 'space-between',\n display: 'flex',\n width: '100%',\n alignItems: 'center'\n },\n column: {\n flexDirection: 'column'\n },\n headerText: {\n fontWeight: 'bold',\n fontSize: 20,\n color: theme.palette.mode === 'dark' ? '#DDD' : '#111',\n },\n descriptionHeaderText: {\n margin: '18px 0',\n color: theme.palette.mode === 'dark' ? '#CCC' : '#222',\n },\n silver: {\n color: 'silver'\n },\n button: {\n paddingTop: 18,\n paddingBottom: 5,\n position: 'sticky',\n bottom: 0,\n background: 'white',\n zIndex: 3\n },\n terminal: {\n fontFamily: 'monospace',\n fontSize: 14,\n marginLeft: 20\n },\n img2: {\n width: 25,\n height: 25,\n marginRight: 10,\n margin: 'auto 0',\n position: 'relative',\n '&:after': {\n content: '\"\"',\n position: 'absolute',\n zIndex: 2,\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n background: 'url(\"img/no-image.png\") 100% 100% no-repeat',\n backgroundSize: 'cover',\n backgroundColor: '#fff',\n }\n },\n heading: {\n display: 'flex',\n alignItems: 'center',\n overflow: 'hidden'\n },\n headingTop: {\n display: 'flex',\n alignItems: 'center',\n },\n classNameBox: {\n padding: 24\n },\n textStyle: {\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n },\n content: {\n overflow: 'hidden'\n },\n buttonStyle: {\n margin: 3\n },\n '@media screen and (max-width: 550px)': {\n classNameBox: {\n padding: 10\n },\n message: {\n flexWrap: 'wrap'\n },\n textStyle: {\n fontSize: '2.9vw'\n },\n terminal: {\n fontSize: '2.9vw',\n marginLeft: 0\n },\n silver: {\n fontSize: '2.9vw',\n },\n buttonStyle: {\n fontSize: '2.9vw',\n },\n },\n}));\n\nconst Status = ({ name, ...props }) => {\n switch (name) {\n case 'restartLoop':\n return <UpdateIcon style={{ color: '#ffca00' }} {...props} />;\n case 'memIssues':\n return <MemoryIcon style={{ color: '#ffca00' }} {...props} />;\n case 'fsIoErrors':\n return <ImportExportIcon style={{ color: '#ffca00' }} {...props} />;\n case 'noDiskSpace':\n return <PermDeviceInformationIcon style={{ color: '#ffca00' }} {...props} />;\n case 'accessErrors':\n return <CancelPresentationIcon style={{ color: '#ffca00' }} {...props} />;\n case 'nonExistingFileErrors':\n return <CancelIcon style={{ color: '#ffca00' }} {...props} />;\n case 'remoteHostErrors':\n return <SettingsRemoteIcon style={{ color: '#ffca00' }} {...props} />;\n case 'heading':\n return <WarningIcon style={{\n color: '#ffca00',\n fontSize: 36,\n marginLeft: 25,\n marginRight: 10\n }} {...props} />;\n\n default:\n return <WarningIcon style={{ color: '#ffca00' }} {...props} />;\n }\n}\n\nconst a11yProps = (index) => {\n return {\n id: `scrollable-force-tab-${index}`,\n 'aria-controls': `scrollable-force-tabpanel-${index}`,\n };\n}\n\nconst TabPanel = ({ children, value, index, classNameBox, ...other }) => {\n return <div\n role=\"tabpanel\"\n hidden={value !== index}\n id={`scrollable-force-tabpanel-${index}`}\n aria-labelledby={`scrollable-force-tab-${index}`}\n {...other}\n >\n { value === index &&\n <Box className={classNameBox}>\n <Typography component=\"div\">{children}</Typography>\n </Box>\n }\n </div>;\n}\n\nconst HostWarningDialog = ({ message, ackCallback, dateFormat, themeType, instances, theme }) => {\n const classes = useStyles();\n\n const [open, setOpen] = useState(true);\n const [value, setValue] = useState(0);\n const [disabled, setDisabled] = useState([]);\n const [expanded, setExpanded] = useState(false);\n\n const onClose = () => {\n setOpen(false);\n if (node) {\n try {\n window.document.body.removeChild(node);\n } catch (e) {\n // ignore\n }\n node = null;\n }\n }\n\n const handleChange = (event, newValue) =>\n setValue(newValue);\n\n const handleChangeAccordion = panel => (event, isExpanded) =>\n setExpanded(isExpanded ? panel : false);\n\n const black = themeType === 'dark';\n\n return <ThemeProvider theme={theme}>\n <Dialog\n onClose={onClose}\n open={open}\n classes={{ paper: classes.paper }}\n >\n <h2 className={classes.headingTop}><Status name=\"heading\" />{I18n.t('Adapter warnings')}</h2>\n <DialogContent className={clsx(classes.flex, classes.overflowHidden)} dividers>\n <div className={classes.root}>\n <AppBar position=\"static\" color=\"default\">\n <Tabs\n value={value}\n onChange={handleChange}\n variant=\"scrollable\"\n scrollButtons=\"on\"\n indicatorColor={black ? 'primary' : 'secondary'}\n textColor=\"primary\"\n >\n {Object.keys(message).map((name, idx) => <Tab\n style={black ? null : { color: 'white' }}\n disabled={disabled.includes(name)}\n key={name} label={I18n.t(name)}\n icon={<Status name={name} />}\n {...a11yProps(idx)} />\n )}\n </Tabs>\n </AppBar>\n {Object.keys(message).map((name, idx) => <TabPanel\n className={classes.overflowAuto}\n classNameBox={classes.classNameBox}\n key={`tabPanel-${name}`}\n style={black ? { color: 'black' } : null}\n value={value}\n index={idx}>\n <div className={classes.headerText} style={{ fontWeight: 'bold' }}>\n {message[name].name[I18n.getLanguage()]}\n </div>\n <div className={classes.descriptionHeaderText}>\n {message[name].description[I18n.getLanguage()]}\n </div>\n <div>\n {message[name].instances ? Object.keys(message[name].instances).map(nameInst => {\n const currentInstance = instances && instances[nameInst];\n let icon = 'img/no-image.png';\n if (currentInstance?.common?.icon && currentInstance?.common?.name) {\n icon = `adapter/${currentInstance.common.name}/${currentInstance.common.icon}`;\n }\n return <Accordion\n style={black ? null : { background: '#c0c0c052' }}\n key={nameInst} expanded={expanded === `${name}-${nameInst}`}\n onChange={handleChangeAccordion(`${name}-${nameInst}`)}\n >\n <AccordionSummary\n expandIcon={<ExpandMoreIcon />}\n classes={{ content: classes.content }}\n aria-controls=\"panel1bh-content\"\n id=\"panel1bh-header\"\n >\n <Typography className={classes.heading}>\n <CardMedia className={classes.img2} component=\"img\" image={icon} />\n <div className={classes.textStyle}>\n {nameInst.replace(/^system\\.adapter\\./, '')}\n </div>\n </Typography>\n </AccordionSummary>\n <AccordionDetails className={classes.column}>\n {message[name].instances[nameInst].messages.map(msg =>\n <Typography key={msg.ts} component=\"div\" className={classes.message}>\n <div className={classes.terminal}>{msg.message}</div>\n <div className={classes.silver}>{Utils.formatDate(new Date(msg.ts), dateFormat)}</div>\n </Typography>)}\n </AccordionDetails>\n </Accordion>\n }) : null}\n </div>\n <div className={classes.button}>\n <Button\n variant=\"contained\"\n autoFocus={Object.keys(message).length !== 1}\n disabled={disabled.includes(name)}\n style={disabled.includes(name) ? { background: 'silver' } : null}\n className={classes.buttonStyle}\n onClick={() => {\n ackCallback(name);\n setDisabled([...disabled, name]);\n }}\n color={Object.keys(message).length !== 1 ? 'primary' : 'grey'}\n startIcon={<CheckIcon />}\n >\n {I18n.t('Acknowledge')}\n </Button>\n {Object.keys(message).length === 1 && <Button\n variant=\"contained\"\n disabled={disabled.includes(name)}\n className={classes.buttonStyle}\n style={disabled.includes(name) ? { background: 'silver' } : null}\n onClick={() => {\n ackCallback(name);\n setDisabled([...disabled, name]);\n onClose();\n }}\n startIcon={<><CheckIcon /><CloseIcon /></>}\n color=\"primary\">\n {I18n.t('Acknowledge & close')}\n </Button>}\n </div>\n </TabPanel>\n )}\n </div>\n </DialogContent >\n <DialogActions>\n <Button\n variant=\"contained\"\n onClick={onClose}\n startIcon={<CloseIcon />}\n color=\"grey\"\n >\n {I18n.t('Ok')}\n </Button>\n </DialogActions>\n </Dialog >\n </ThemeProvider >;\n}\n\nexport const hostWarningDialogFunc = (message, dateFormat, themeType, themeName, instances, theme, ackCallback) => {\n if (!node) {\n node = document.createElement('div');\n node.id = 'renderModal';\n document.body.appendChild(node);\n }\n const root = createRoot(node);\n\n return root.render(<StyledEngineProvider injectFirst>\n <ThemeProvider theme={theme}>\n <HostWarningDialog\n instances={instances}\n message={message}\n themeName={themeName}\n theme={theme}\n themeType={themeType}\n dateFormat={dateFormat}\n ackCallback={ackCallback}\n />\n </ThemeProvider>\n </StyledEngineProvider>);\n}","import Utils from '../Utils';\n\nclass LogsWorker {\n constructor(socket, maxLogs) {\n this.socket = socket;\n this.handlers = [];\n this.promise = null;\n\n this.errorCountHandlers = [];\n this.warningCountHandlers = [];\n this.countErrors = true;\n this.countWarnings = true;\n this.errors = 0;\n this.warnings = 0;\n this.currentHost = '';\n this.connected = this.socket.isConnected();\n this.maxLogs = maxLogs || 1000;\n this.logs = null;\n this.isSafari = navigator.vendor && navigator.vendor.includes('Apple') &&\n navigator.userAgent && !navigator.userAgent.includes('CriOS') && !navigator.userAgent.includes('FxiOS');\n\n socket.registerLogHandler(this.logHandler);\n socket.registerConnectionHandler(this.connectionHandler);\n }\n\n setCurrentHost(currentHost) {\n if (currentHost !== this.currentHost) {\n this.currentHost = currentHost;\n this.getLogs(true);\n }\n }\n\n enableCountErrors(isEnabled) {\n if (this.countErrors !== isEnabled) {\n this.countErrors = isEnabled;\n if (!this.countErrors) {\n const errors = this.errors;\n this.error = 0;\n errors && this.errorCountHandlers.forEach(handler => handler && handler(errors));\n }\n }\n }\n\n enableCountWarnings(isEnabled) {\n if (this.countWarnings !== isEnabled) {\n this.countWarnings = isEnabled;\n if (!this.countWarnings) {\n const warnings = this.warnings;\n this.warnings = 0;\n if (warnings) {\n this.warningCountHandlers.forEach(handler => handler && handler(warnings));\n }\n }\n }\n }\n\n resetErrors() {\n if (this.errors) {\n this.errors = 0;\n this.errorCountHandlers.forEach(handler => handler && handler(this.errors));\n }\n }\n\n resetWarnings() {\n if (this.warnings) {\n this.warnings = 0;\n this.warningCountHandlers.forEach(handler => handler && handler(this.warnings));\n }\n }\n\n logHandler = line => {\n const obj = this._processLine(line);\n\n if (obj) {\n const errors = this.errors;\n const warnings = this.warnings;\n\n this.newLogs = this.newLogs || [];\n this.newLogs.push(obj);\n\n if (!this.logTimeout) {\n this.logTimeout = setTimeout(() => {\n this.logTimeout = null;\n const newLogs = this.newLogs;\n this.newLogs = null;\n\n this.handlers.forEach(handler =>\n handler && handler(newLogs, JSON.stringify(line).length - 65));\n }, 200);\n }\n\n if (errors !== this.errors) {\n this.errorCountHandlers.forEach(handler => handler && handler(this.errors));\n }\n\n if (warnings !== this.warnings) {\n this.warningCountHandlers.forEach(handler => handler && handler(this.warnings));\n }\n }\n }\n\n connectionHandler = isConnected => {\n if (isConnected && !this.connected) {\n this.connected = true;\n this.getLogs(true);\n } else if (!isConnected && this.connected) {\n this.connected = false;\n }\n }\n\n registerHandler(cb) {\n if (!this.handlers.includes(cb)) {\n this.handlers.push(cb);\n }\n }\n\n unregisterHandler(cb) {\n const pos = this.handlers.indexOf(cb);\n\n if (pos !== -1) {\n this.handlers.splice(pos, 1);\n }\n }\n\n registerErrorCountHandler(cb) {\n if (!this.errorCountHandlers.includes(cb)) {\n this.errorCountHandlers.push(cb);\n }\n }\n\n unregisterErrorCountHandler(cb) {\n const pos = this.errorCountHandlers.indexOf(cb);\n\n if (pos !== -1) {\n this.errorCountHandlers.splice(pos, 1);\n }\n }\n\n registerWarningCountHandler(cb) {\n if (!this.warningCountHandlers.includes(cb)) {\n this.warningCountHandlers.push(cb);\n }\n }\n\n unregisterWarningCountHandler(cb) {\n const pos = this.warningCountHandlers.indexOf(cb);\n\n if (pos !== -1) {\n this.warningCountHandlers.splice(pos, 1);\n }\n }\n\n _processLine(line, lastKey) {\n // do not update logs before the first logs from host received\n if (!this.logs) {\n return;\n }\n if (!line) {\n return;\n }\n /* const line = {\n \"severity\": \"error\",\n \"ts\": 1588162801514,\n \"message\": \"host.DESKTOP-PLLTPO1 Invalid request getLogs. \\\"callback\\\" or \\\"from\\\" is null\",\n \"from\": \"host.DESKTOP-PLLTPO1\",\n \"_id\": 48358425\n };*/\n\n let obj;\n let isNew = true;\n const length = this.logs.length;\n lastKey = lastKey || (length && this.logs[this.logs.length - 1].key) || 0;\n\n if (typeof line === 'object') {\n if (lastKey && lastKey <= line.ts) {\n line.key = lastKey + 1;\n } else {\n line.key = line.ts;\n }\n\n obj = line;\n } else {\n const time = line.match(/^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}\\.\\d{3}/);\n\n if (time && time.length > 0) {\n let ts;\n // Safari sucks. It is very idiotic browser and because of it, we must parse every number apart\n if (this.isSafari) {\n // parse every number\n const tt = line.match(/^(\\d{4})-(\\d{2})-(\\d{2}) (\\d{2}):(\\d{2}):(\\d{2})\\.(\\d{3})/);\n ts = new Date(parseInt(tt[1], 10), parseInt(tt[2], 10) - 1, parseInt(tt[3], 10), parseInt(tt[4], 10), parseInt(tt[5], 10), parseInt(tt[6], 10), parseInt(tt[7], 10)).getTime();\n } else {\n const tt = time[0].split(' ');\n ts = new Date(tt[0] + 'T' + tt[1]).getTime();\n }\n let key = ts;\n\n if (lastKey && lastKey <= ts) {\n key = lastKey + 1;\n }\n\n // detect from\n const from = line.match(/: (host\\..+? |[-\\w]+\\.\\d+ \\()/);\n\n obj = {\n key,\n from: from ? from[0].replace(/[ :(]/g, '') : '',\n message: line.split(/\\[\\d+m: /)[1],\n severity: line.match(/\\d+m(silly|debug|info|warn|error)/)[0].replace(/[\\dm]/g, ''),\n ts\n };\n } else {\n isNew = false;\n // if no time found\n if (length) {\n obj = this.logs[length - 1];\n if (obj) {\n if (typeof obj.message === 'object') {\n obj.message = Utils.parseColorMessage(obj.message.original + line);\n } else {\n obj.message += line;\n }\n }\n }\n }\n }\n\n if (!obj) {\n return;\n }\n\n if (typeof obj.message !== 'object') {\n obj.message = Utils.parseColorMessage(obj.message);\n }\n\n if (isNew) {\n // if new message time is less than last message in log\n if (length && this.logs[length - 1].key > obj.key) {\n let i;\n // find place\n for (i = length - 1; i >= 0; i--) {\n if (this.logs[i].key < obj.key) {\n break;\n }\n }\n if (i === -1) {\n this.logs.unshift(obj);\n } else {\n this.logs.splice(i + 1, 0, obj);\n }\n } else {\n this.logs.push(obj);\n }\n\n if (length + 1 === this.maxLogs) {\n this.logs.shift();\n }\n\n if (isNew && obj.severity === 'error' && this.countErrors) {\n this.errors++;\n }\n\n if (isNew && obj.severity === 'warn' && this.countWarnings) {\n this.warnings++;\n }\n }\n\n return obj;\n }\n\n getLogs(update) {\n if (!this.currentHost) {\n return Promise.resolve({logs: [], logSize: 0});\n }\n\n if (!update && this.promise) {\n return this.promise;\n }\n\n this.errors = 0;\n this.warnings = 0;\n\n this.promise = this.socket.getLogs(this.currentHost, 200)\n .then(lines => {\n if (lines === 'permissionError') {\n this.logs = [];\n\n window.alert('Cannot get logs: no permission');\n\n return {logs: this.logs, logSize: 0};\n }\n const logSize = lines ? lines.pop() : null;\n\n this.logs = [];\n let lastKey;\n\n lines.forEach(line => {\n const obj = this._processLine(line, lastKey);\n if (obj) {\n lastKey = obj.key;\n }\n });\n\n if (lines && lines.length && lines[0].ts) {\n lines.sort((a, b) => a.ts > b.ts ? 1 : (a.ts < b.ts ? -1 : 0));\n }\n\n this.logSize = logSize;\n\n // inform subscribes about each line\n this.handlers.forEach(cb => cb && cb(this.logs, logSize));\n\n this.errors && this.errorCountHandlers.forEach(handler => handler && handler(this.errors));\n this.warnings && this.warningCountHandlers.forEach(handler => handler && handler(this.warnings));\n\n return {logs: this.logs, logSize};\n })\n .catch(e => {\n window.alert('Cannot get logs: ' + e);\n });\n\n return this.promise;\n }\n\n clearLines() {\n this.logs = [];\n this.logSize = 0;\n\n if (this.errors) {\n const errors = this.errors;\n this.errors = 0;\n this.errorCountHandlers.forEach(handler => handler && handler(errors));\n }\n\n if (this.warnings) {\n const warnings = this.warnings;\n this.warnings = 0;\n this.warningCountHandlers.forEach(handler => handler && handler(warnings));\n }\n }\n}\n\nexport default LogsWorker;","import Utils from '../Utils';\n\nclass InstancesWorker {\n constructor(socket) {\n this.socket = socket;\n this.handlers = [];\n this.promise = null;\n this.forceUpdate = false;\n\n socket.registerConnectionHandler(this.connectionHandler);\n\n this.connected = this.socket.isConnected();\n\n this.objects = null;\n }\n\n objectChangeHandler = (id, obj) => {\n this.objects = this.objects || {};\n // if instance\n if (id.match(/^system\\.adapter\\.[^.]+\\.\\d+$/)) {\n let type;\n let oldObj;\n if (obj) {\n if (obj.type !== 'instance') {\n return;\n }\n\n Utils.fixAdminUI(obj);\n\n if (this.objects[id]) {\n oldObj = this.objects[id];\n if (JSON.stringify(this.objects[id]) !== JSON.stringify(obj)) {\n type = 'changed';\n this.objects[id] = obj;\n } else {\n // no changes\n return;\n }\n } else {\n type = 'new';\n this.objects[id] = obj;\n }\n } else {\n if (this.objects[id]) {\n oldObj = this.objects[id];\n type = 'deleted';\n delete this.objects[id];\n } else {\n // deleted unknown instance\n return;\n }\n }\n\n this.promise = null;\n this.socket.getAdapterInstancesResetCache('');\n this.forceUpdate = true;\n\n this.handlers.forEach(cb => cb([{ id, obj, type, oldObj }]));\n }\n };\n\n isForceUpdate() {\n return this.forceUpdate;\n }\n\n // be careful with this object. Do not change them.\n getInstances(update) {\n if (!update && this.promise) {\n return this.promise;\n }\n\n update = update || this.forceUpdate;\n this.forceUpdate = false;\n\n this.promise = this.socket.getAdapterInstances(update)\n .then(objects => {\n this.objects = {};\n objects.forEach(obj => this.objects[obj._id] = obj);\n return this.objects;\n })\n .catch(e => window.alert('Cannot get adapter instances: ' + e));\n\n return this.promise;\n }\n\n connectionHandler = isConnected => {\n if (isConnected && !this.connected) {\n this.connected = true;\n\n if (this.handlers.length) {\n this.socket.subscribeObject('system.adapter.*', this.objectChangeHandler)\n .catch(e => window.alert(`Cannot subscribe on object: ${e}`));\n\n this.getInstances(true)\n .then(instances => instances && Object.keys(instances)\n .forEach(id => this.objectChangeHandler(id, instances[id])));\n }\n } else if (!isConnected && this.connected) {\n this.connected = false;\n }\n }\n\n registerHandler(cb, doNotRequestAdapters) {\n if (!this.handlers.includes(cb)) {\n this.handlers.push(cb);\n\n if (this.handlers.length === 1 && this.connected) {\n this.socket.subscribeObject('system.adapter.*', this.objectChangeHandler)\n .then(() => !doNotRequestAdapters && this.getInstances())\n .catch(e => window.alert(`Cannot subscribe on object: ${e}`));\n }\n }\n }\n\n unregisterHandler(cb) {\n const pos = this.handlers.indexOf(cb);\n pos !== -1 && this.handlers.splice(pos, 1);\n\n if (!this.handlers.length && this.connected) {\n this.socket.unsubscribeObject('system.adapter.*', this.objectChangeHandler)\n .catch(e => window.alert(`Cannot subscribe on object: ${e}`));\n }\n }\n}\n\nexport default InstancesWorker;\n","class HostsWorker {\n constructor(socket) {\n this.socket = socket;\n this.handlers = [];\n this.aliveHandlers = [];\n this.notificationsHandlers = [];\n this.promise = null;\n this.notificationPromises = {};\n\n socket.registerConnectionHandler(this.connectionHandler);\n\n this.connected = this.socket.isConnected();\n console.log('Connected: ' + this.connected);\n this.objects = {};\n this.aliveStates = {};\n if (this.connected) {\n this.connectionHandler(true);\n }\n }\n\n objectChangeHandler = (id, obj) => {\n // if host\n if (id.startsWith('system.host.')) {\n let type;\n let oldObj;\n if (obj) {\n if (obj.type !== 'host') {\n return;\n }\n\n if (this.objects[id]) {\n if (JSON.stringify(this.objects[id]) !== JSON.stringify(obj)) {\n type = 'changed';\n this.objects[id] = obj;\n } else {\n // no changes\n return;\n }\n } else {\n type = 'new';\n this.objects[id] = obj;\n }\n } else {\n if (this.objects[id]) {\n type = 'deleted';\n oldObj = this.objects[id];\n delete this.objects[id];\n } else {\n // deleted unknown instance\n return;\n }\n }\n\n this.handlers.forEach(cb => cb([{id, obj, type, oldObj}]));\n }\n }\n\n aliveChangeHandler = (id, state) => {\n // if instance\n if (id.startsWith('system.host.') && id.endsWith('.alive')) {\n let type;\n id = id.replace(/\\.alive$/, '');\n if (state) {\n if (this.aliveStates[id] !== undefined) {\n if ((!!this.aliveStates[id]) !== (!!state?.val)) {\n type = 'changed';\n this.aliveStates[id] = !!state?.val;\n } else {\n // no changes\n return;\n }\n } else {\n type = 'new';\n this.aliveStates[id] = !!state?.val;\n }\n } else {\n if (this.aliveStates[id]) {\n type = 'deleted';\n delete this.aliveStates[id];\n } else {\n // deleted unknown instance\n return;\n }\n }\n this.aliveHandlers.forEach(cb => cb([{id, alive: this.aliveStates[id], type}]));\n }\n }\n\n getHosts(update) {\n if (!update && this.promise) {\n return this.promise;\n }\n\n this.promise = this.socket.getHosts(update)\n .then(objects => {\n this.objects = {};\n objects.forEach(obj => this.objects[obj._id] = obj);\n return this.objects;\n })\n .catch(e => window.alert('Cannot get hosts: ' + e));\n\n return this.promise;\n }\n\n connectionHandler = isConnected => {\n if (isConnected && !this.connected) {\n this.connected = true;\n\n if (this.handlers.length) {\n this.socket.subscribeObject('system.host.*', this.objectChangeHandler)\n .catch(e => window.alert(`Cannot subscribe on object: ${e}`));\n\n // read all hosts anew and inform about it\n this.getHosts(true)\n .then(hosts => hosts && Object.keys(hosts)\n .forEach(id => this.objectChangeHandler(id, hosts[id])));\n }\n if (this.aliveHandlers.length) {\n this.socket.subscribeState('system.host.*.alive', this.aliveChangeHandler);\n }\n } else if (!isConnected && this.connected) {\n this.connected = false;\n Object.keys(this.aliveStates)\n .forEach(id => this.aliveHandlers[id] = false);\n }\n }\n\n registerHandler(cb) {\n if (!this.handlers.includes(cb)) {\n this.handlers.push(cb);\n\n if (this.handlers.length === 1 && this.connected) {\n this.socket.subscribeObject('system.host.*', this.objectChangeHandler)\n .catch(e => window.alert(`Cannot subscribe on object: ${e}`));\n }\n }\n }\n\n unregisterHandler(cb) {\n const pos = this.handlers.indexOf(cb);\n if (pos !== -1) {\n this.handlers.splice(pos, 1);\n if (!this.handlers.length && this.connected) {\n this.socket.unsubscribeObject('system.host.*', this.objectChangeHandler)\n .catch(e => window.alert(`Cannot subscribe on object: ${e}`));\n }\n }\n }\n\n registerAliveHandler(cb) {\n if (!this.aliveHandlers.includes(cb)) {\n this.aliveHandlers.push(cb);\n\n if (this.aliveHandlers.length === 1 && this.connected) {\n this.socket.subscribeState('system.host.*.alive', this.aliveChangeHandler);\n }\n }\n }\n\n unregisterAliveHandler(cb) {\n const pos = this.aliveHandlers.indexOf(cb);\n if (pos !== -1) {\n this.aliveHandlers.splice(pos, 1);\n if (!this.aliveHandlers.length && this.connected) {\n this.socket.unsubscribeState('system.host.*.alive', this.aliveChangeHandler);\n }\n }\n }\n\n onNotificationHandler = (id, state) => {\n const host = id.replace(/\\.notifications\\..+$/, '');\n\n // ignore subscribe events\n if (!this.subscribeTs || Date.now() - this.subscribeTs > 500) {\n this.notificationTimer && clearTimeout(this.notificationTimer);\n\n this.notificationTimer = setTimeout(host => {\n this.notificationTimer = null;\n this.notificationPromises[host] = this._getNotificationsFromHots(host, true);\n\n this.notificationPromises[host].then(notifications =>\n this.notificationsHandlers.forEach(cb => cb(notifications)));\n }, 300, host);\n }\n };\n\n _getNotificationsFromHots(hostId, update) {\n if (!update && this.notificationPromises[hostId]) {\n return this.notificationPromises[hostId];\n }\n\n this.notificationPromises[hostId] = this.socket.getState(hostId + '.alive')\n .then(state => {\n if (state && state.val) {\n return this.socket.getNotifications(hostId)\n .then(notifications => ({[hostId]: notifications}))\n .catch(e => {\n console.warn(`Cannot read notifications from \"${hostId}\": ${e}`);\n return {[hostId]: null};\n });\n } else {\n return {[hostId]: null};\n }\n });\n\n return this.notificationPromises[hostId];\n }\n\n getNotifications(hostId, update) {\n if (hostId) {\n return this._getNotificationsFromHots(hostId, update);\n } else {\n return this.socket.getCompactHosts(update)\n .then(hosts => {\n const promises = hosts\n .map(host => this._getNotificationsFromHots(host._id, update));\n\n return Promise.all(promises)\n .then(pResults => {\n const result = {};\n pResults.forEach(r => Object.assign(result, r));\n return result;\n });\n });\n }\n }\n\n registerNotificationHandler(cb) {\n if (!this.notificationsHandlers.includes(cb)) {\n this.notificationsHandlers.push(cb);\n\n if (this.notificationsHandlers.length === 1 && this.connected) {\n this.subscribeTs = Date.now();\n this.socket.subscribeState('system.host.*.notifications.*', this.onNotificationHandler);\n }\n }\n }\n\n unregisterNotificationHandler(cb) {\n const pos = this.notificationsHandlers.indexOf(cb);\n\n if (pos !== -1) {\n this.notificationsHandlers.splice(pos, 1);\n if (!this.notificationsHandlers.length && this.connected) {\n this.socket.unsubscribeState('system.host.*.notifications.*', this.onNotificationHandler);\n }\n }\n }\n}\n\nexport default HostsWorker;\n","import Utils from '../Utils';\n\nclass AdaptersWorker {\n constructor(socket) {\n this.socket = socket;\n this.handlers = [];\n this.repositoryHandlers = [];\n this.promise = null;\n this.forceUpdate = false;\n\n socket.registerConnectionHandler(this.connectionHandler);\n this.connected = this.socket.isConnected();\n\n this.objects = null;\n }\n\n objectChangeHandler = (id, obj) => {\n this.objects = this.objects || {};\n // if instance\n if (id.match(/^system\\.adapter\\.[^.]+$/)) {\n let type;\n let oldObj;\n\n if (obj) {\n if (obj.type !== 'adapter') {\n return;\n }\n\n Utils.fixAdminUI(obj);\n\n if (this.objects[id]) {\n oldObj = this.objects[id];\n if (JSON.stringify(this.objects[id]) !== JSON.stringify(obj)) {\n type = 'changed';\n this.objects[id] = obj;\n } else {\n // no changes\n return;\n }\n } else {\n type = 'new';\n this.objects[id] = obj;\n }\n } else {\n if (this.objects[id]) {\n oldObj = this.objects[id];\n type = 'deleted';\n delete this.objects[id];\n } else {\n // deleted unknown instance\n return;\n }\n }\n\n this.socket.getAdaptersResetCache();\n this.socket.getInstalledResetCache();\n this.forceUpdate = true;\n this.promise = null;\n\n this.handlers.forEach(cb => cb([{ id, obj, type, oldObj }]));\n }\n };\n\n isForceUpdate() {\n return this.forceUpdate;\n }\n\n // be careful with this object. Do not change them.\n getAdapters(update) {\n if (!update && this.promise) {\n return this.promise;\n }\n\n update = update || this.forceUpdate;\n this.forceUpdate = false;\n\n this.promise = this.socket.getAdapters(update)\n .then(objects => {\n this.objects = {};\n objects.forEach(obj => this.objects[obj._id] = obj);\n return this.objects;\n })\n .catch(e => window.alert('Cannot get adapters: ' + e));\n\n return this.promise;\n }\n\n connectionHandler = isConnected => {\n if (isConnected && !this.connected) {\n this.connected = true;\n\n if (this.handlers.length) {\n this.socket.subscribeObject('system.adapter.*', this.objectChangeHandler)\n .catch(e => window.alert(`Cannot subscribe on object: ${e}`));\n\n this.getAdapters(true)\n .then(adapters => adapters && Object.keys(adapters)\n .forEach(id => this.objectChangeHandler(id, adapters[id])));\n }\n } else if (!isConnected && this.connected) {\n this.connected = false;\n }\n }\n\n registerHandler(cb) {\n if (!this.handlers.includes(cb)) {\n this.handlers.push(cb);\n\n if (this.handlers.length === 1 && this.connected) {\n this.socket.subscribeObject('system.adapter.*', this.objectChangeHandler)\n .catch(e => window.alert(`Cannot subscribe on object: ${e}`));\n }\n }\n }\n\n unregisterHandler(cb) {\n const pos = this.handlers.indexOf(cb);\n pos !== -1 && this.handlers.splice(pos, 1);\n\n if (!this.handlers.length && this.connected) {\n this.socket.unsubscribeObject('system.adapter.*', this.objectChangeHandler)\n .catch(e => window.alert(`Cannot unsubscribe on object: ${e}`));\n }\n }\n\n repoChangeHandler = (id, obj) => {\n this.repoTimer && clearTimeout(this.repoTimer);\n this.repoTimer = setTimeout(() => {\n this.repoTimer = null;\n this.repositoryHandlers.forEach(cb => cb());\n }, 500);\n };\n\n registerRepositoryHandler(cb) {\n if (!this.repositoryHandlers.includes(cb)) {\n this.repositoryHandlers.push(cb);\n\n if (this.repositoryHandlers.length === 1 && this.connected) {\n this.socket.subscribeObject('system.repositories', this.repoChangeHandler)\n .catch(e => window.alert(`Cannot subscribe on object: ${e}`));\n }\n }\n }\n\n unregisterRepositoryHandler(cb) {\n const pos = this.repositoryHandlers.indexOf(cb);\n pos !== -1 && this.repositoryHandlers.splice(pos, 1);\n\n if (!this.repositoryHandlers.length && this.connected) {\n this.socket.unsubscribeObject('system.repositories', this.repoChangeHandler)\n .catch(e => window.alert(`Cannot unsubscribe on object: ${e}`));\n }\n }\n}\n\nexport default AdaptersWorker;\n","import Utils from '../Utils';\n\nclass ObjectsWorker {\n constructor(socket) {\n this.socket = socket;\n this.handlers = [];\n this.promise = null;\n\n socket.registerConnectionHandler(this.connectionHandler);\n\n this.connected = this.socket.isConnected();\n\n this.objects = null;\n }\n\n objectChangeHandler = (id, obj) => {\n this.objects = this.objects || {};\n // if instance\n let oldObj;\n let type;\n\n if (obj) {\n if (obj.type === 'instance' || obj.type === 'adapter') {\n Utils.fixAdminUI(obj);\n }\n\n if (this.objects[id]) {\n oldObj = this.objects[id];\n if (JSON.stringify(this.objects[id]) !== JSON.stringify(obj)) {\n type = 'changed';\n this.objects[id] = obj;\n } else {\n // no changes\n type = 'changed';\n }\n } else {\n type = 'new';\n this.objects[id] = obj;\n }\n } else {\n if (this.objects[id]) {\n oldObj = this.objects[id];\n type = 'deleted';\n delete this.objects[id];\n } else {\n // deleted unknown instance\n type = 'deleted';\n }\n }\n\n this.handlers.forEach(cb => cb([{ id, obj, type, oldObj }]));\n };\n\n // be careful with this object. Do not change them.\n getObjects(update) {\n if (!update && this.promise) {\n return this.promise;\n }\n\n this.promise = this.socket.getObjects(update, true)\n .then(objects => {\n this.objects = objects;\n return this.objects;\n })\n .catch(e => window.alert('Cannot get objects: ' + e));\n\n return this.promise;\n }\n\n connectionHandler = isConnected => {\n if (isConnected && !this.connected) {\n this.connected = true;\n\n if (this.handlers.length) {\n this.socket.subscribeObject('*', this.objectChangeHandler)\n .catch(e => window.alert(`Cannot subscribe on objects: ${e}`));\n\n this.getObjects(true)\n .then(instances => instances && Object.keys(instances)\n .forEach(id => this.objectChangeHandler(id, instances[id])));\n }\n } else if (!isConnected && this.connected) {\n this.connected = false;\n }\n }\n\n registerHandler(cb) {\n if (!this.handlers.includes(cb)) {\n this.handlers.push(cb);\n\n if (this.handlers.length === 1 && this.connected) {\n this.socket.subscribeObject('*', this.objectChangeHandler)\n .catch(e => window.alert(`Cannot subscribe on object: ${e}`));\n }\n }\n }\n\n unregisterHandler(cb, doNotUnsubscribe) {\n const pos = this.handlers.indexOf(cb);\n pos !== -1 && this.handlers.splice(pos, 1);\n\n if (!this.handlers.length && this.connected && !doNotUnsubscribe) {\n this.socket.unsubscribeObject('*', this.objectChangeHandler)\n .catch(e => window.alert(`Cannot unsubscribe on object: ${e}`));\n }\n }\n}\n\nexport default ObjectsWorker;\n","import React, { useEffect, useState } from 'react';\nimport { createRoot } from 'react-dom/client';\nimport clsx from 'clsx';\n\nimport Button from '@mui/material/Button';\nimport Dialog from '@mui/material/Dialog';\nimport DialogActions from '@mui/material/DialogActions';\nimport DialogContent from '@mui/material/DialogContent';\nimport { AppBar, Box, Paper, Typography } from '@mui/material';\nimport { ThemeProvider, StyledEngineProvider } from '@mui/material/styles';\nimport { makeStyles } from '@mui/styles';\n\nimport SettingsIcon from '@mui/icons-material/Settings';\nimport CloseIcon from '@mui/icons-material/Close';\n\nimport I18n from '@iobroker/adapter-react-v5/i18n';\n\nimport ConfigPanel from '../components/JsonConfigComponent/ConfigPanel';\nimport CheckIcon from '@mui/icons-material/Check';\n\nlet node = null;\n\nconst useStyles = makeStyles(theme => ({\n root: {\n // backgroundColor: theme.palette.background.paper,\n width: '100%',\n height: 'auto',\n display: 'flex',\n borderRadius: 4,\n flexDirection: 'column'\n },\n paper: {\n maxWidth: 1000,\n width: '100%',\n maxHeight: 800,\n height: 'calc(100% - 32px)',\n },\n flex: {\n display: 'flex',\n },\n overflowHidden: {\n overflow: 'hidden'\n },\n overflowAuto: {\n overflowY: 'auto'\n },\n pre: {\n overflow: 'auto',\n margin: 20,\n '& p': {\n fontSize: 18,\n }\n },\n blockInfo: {\n right: 20,\n top: 10,\n position: 'absolute',\n display: 'flex',\n alignItems: 'center',\n color: 'silver'\n },\n img: {\n marginLeft: 10,\n width: 45,\n height: 45,\n margin: 'auto 0',\n position: 'relative',\n '&:after': {\n content: '\"\"',\n position: 'absolute',\n zIndex: 2,\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n background: 'url(\"img/no-image.png\") 100% 100% no-repeat',\n backgroundSize: 'cover',\n backgroundColor: '#fff',\n }\n },\n message: {\n justifyContent: 'space-between',\n display: 'flex',\n width: '100%',\n alignItems: 'center'\n },\n column: {\n flexDirection: 'column'\n },\n headerText: {\n fontWeight: 'bold',\n fontSize: 15\n },\n descriptionHeaderText: {\n margin: '10px 0'\n },\n silver: {\n color: 'silver'\n },\n button: {\n paddingTop: 18,\n paddingBottom: 5,\n position: 'sticky',\n bottom: 0,\n background: 'white',\n zIndex: 3\n },\n terminal: {\n fontFamily: 'monospace',\n fontSize: 14,\n marginLeft: 20\n },\n img2: {\n width: 25,\n height: 25,\n marginRight: 10,\n margin: 'auto 0',\n position: 'relative',\n '&:after': {\n content: '\"\"',\n position: 'absolute',\n zIndex: 2,\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n background: 'url(\"img/no-image.png\") 100% 100% no-repeat',\n backgroundSize: 'cover',\n backgroundColor: '#fff',\n }\n },\n heading: {\n display: 'flex',\n alignItems: 'center'\n },\n headerBlock: {\n backgroundColor: '#272727',\n padding: 13,\n fontSize: 16\n },\n headerBlockDisplay: {\n backgroundColor: '#272727',\n padding: 13,\n fontSize: 16,\n display: 'flex'\n },\n headerBlockDisplayItem: {\n padding: 13,\n fontSize: 16,\n display: 'flex'\n },\n width200: {\n width: 200\n },\n table: {\n // '& *': {\n // color: 'black'\n // }\n },\n paperTable: {\n width: '100%',\n marginBottom: theme.spacing(2),\n }\n}));\n\nconst TabPanel = ({ classes, children, value, index, title, custom, ...props }) => {\n if (custom) {\n return <div\n {...props}\n >{value === index && children}</div>\n }\n\n return (\n <div\n {...props}\n >{value === index &&\n <>\n <AppBar position=\"static\" color=\"default\">\n <div className={classes.headerBlock}>\n {title}\n </div>\n </AppBar>\n <Box p={3}>\n <Typography component=\"div\">{children}</Typography>\n </Box>\n </>\n }\n </div>\n );\n}\n\nconst types = {\n \"password\": \"password\",\n \"checkbox\": \"checkbox\",\n \"select\": \"select\",\n \"link\": \"staticLink\",\n \"comment\": \"staticText\",\n \"text\": \"text\",\n \"name\": \"staticText\",\n \"title\": \"staticText\",\n};\n\nconst generateObj = (obj, path, value) => {\n path = path.split('.');\n path.forEach((element, idx) => {\n if (idx === path.length - 1) {\n if (!obj[path[idx - 1]]) {\n obj[path[idx - 1]] = {};\n }\n obj[path[idx - 1]][element] = value;\n }\n });\n return obj;\n}\nconst GenerateInputsModal = ({ themeType, themeName, socket, newInstances, onApplyModal, onCloseModal, theme }) => {\n const classes = useStyles();\n\n const [open, setOpen] = useState(true);\n const [error, setError] = useState({});\n\n const onClose = () => {\n setOpen(false);\n if (node) {\n try {\n window.document.body.removeChild(node);\n } catch (e) {\n // ignore\n }\n node = null;\n }\n }\n\n const isError = () => Object.keys(error).find(attr => error[attr]);\n\n // const black = themeType === 'dark';\n\n const [schema, setSchema] = useState({\n items: {}\n });\n\n const [schemaData, setSchemaData] = useState({});\n\n useEffect(() => {\n const obj = {};\n let objValue = {};\n if (newInstances) {\n newInstances.comment.add.forEach((text, idx) =>\n obj[idx] = { type: 'header', text });\n\n newInstances.comment.inputs.forEach((el, idx) => {\n obj[idx + 1] = {\n ...el, type: types[el.type], label: el.title, text: el.def, href: el.def,\n 'sm': 6,\n 'newLine': true,\n };\n\n if (el.type === 'link') {\n obj[idx + 1].button = true;\n obj[idx + 1].variant = \"contained\";\n obj[idx + 1].href = el.def;\n obj[idx + 1].text = el.title;\n obj[idx + 1].icon = 'data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGZpbGw9ImN1cnJlbnRDb2xvciIgZD0iTTExLjk5IDJDNi40NyAyIDIgNi40OCAyIDEyczQuNDcgMTAgOS45OSAxMEMxNy41MiAyMiAyMiAxNy41MiAyMiAxMlMxNy41MiAyIDExLjk5IDJ6bTYuOTMgNmgtMi45NWMtLjMyLTEuMjUtLjc4LTIuNDUtMS4zOC0zLjU2IDEuODQuNjMgMy4zNyAxLjkxIDQuMzMgMy41NnpNMTIgNC4wNGMuODMgMS4yIDEuNDggMi41MyAxLjkxIDMuOTZoLTMuODJjLjQzLTEuNDMgMS4wOC0yLjc2IDEuOTEtMy45NnpNNC4yNiAxNEM0LjEgMTMuMzYgNCAxMi42OSA0IDEycy4xLTEuMzYuMjYtMmgzLjM4Yy0uMDguNjYtLjE0IDEuMzItLjE0IDIgMCAuNjguMDYgMS4zNC4xNCAySDQuMjZ6bS44MiAyaDIuOTVjLjMyIDEuMjUuNzggMi40NSAxLjM4IDMuNTYtMS44NC0uNjMtMy4zNy0xLjktNC4zMy0zLjU2em0yLjk1LThINS4wOGMuOTYtMS42NiAyLjQ5LTIuOTMgNC4zMy0zLjU2QzguODEgNS41NSA4LjM1IDYuNzUgOC4wMyA4ek0xMiAxOS45NmMtLjgzLTEuMi0xLjQ4LTIuNTMtMS45MS0zLjk2aDMuODJjLS40MyAxLjQzLTEuMDggMi43Ni0xLjkxIDMuOTZ6TTE0LjM0IDE0SDkuNjZjLS4wOS0uNjYtLjE2LTEuMzItLjE2LTIgMC0uNjguMDctMS4zNS4xNi0yaDQuNjhjLjA5LjY1LjE2IDEuMzIuMTYgMiAwIC42OC0uMDcgMS4zNC0uMTYgMnptLjI1IDUuNTZjLjYtMS4xMSAxLjA2LTIuMzEgMS4zOC0zLjU2aDIuOTVjLS45NiAxLjY1LTIuNDkgMi45My00LjMzIDMuNTZ6TTE2LjM2IDE0Yy4wOC0uNjYuMTQtMS4zMi4xNC0yIDAtLjY4LS4wNi0xLjM0LS4xNC0yaDMuMzhjLjE2LjY0LjI2IDEuMzEuMjYgMnMtLjEgMS4zNi0uMjYgMmgtMy4zOHoiPjwvcGF0aD48L3N2Zz4='\n }\n\n if (el.type === 'password') {\n obj[idx + 1].repeat = true;\n }\n\n if (el.def !== undefined) {\n objValue[idx + 1] = '';\n }\n\n if (el.type === 'checkbox') {\n objValue[idx + 1] = false;\n }\n });\n setSchemaData(objValue);\n setSchema({ items: obj });\n }\n }, [newInstances]);\n\n return <ThemeProvider theme={theme}>\n <Dialog\n onClose={onClose}\n open={open}\n classes={{ paper: classes.paper }}\n >\n <h2 className={classes.heading}>\n <SettingsIcon style={{\n color: 'rgb(77 171 245)',\n fontSize: 36,\n marginLeft: 25,\n marginRight: 10\n }} />\n {I18n.t('Instance parameters for %s', newInstances._id.replace('system.adapter.', ''))}</h2>\n <DialogContent className={clsx(classes.flex, classes.overflowHidden)} dividers>\n <div className={classes.root}>\n <TabPanel\n value={1}\n index={1}\n custom\n title={I18n.t('Test')}\n >\n <Paper className={classes.paperTable}>\n <ConfigPanel\n data={schemaData}\n socket={socket}\n themeType={themeType}\n themeName={themeName}\n onChange={setSchemaData}\n schema={schema}\n onError={(attr, _error) => setError({...error, [attr]: _error})}\n />\n </Paper>\n </TabPanel>\n </div>\n </DialogContent >\n <DialogActions>\n <Button\n variant=\"contained\"\n autoFocus\n disabled= {isError()}\n onClick={() => {\n let obj = {};\n let error = false;\n Object.keys(schema.items).forEach(key => {\n if (schema.items[key].required) {\n if (!schemaData[key] && schema.items[key].type !== \"checkbox\") {\n error = true;\n alert(`no data ${schema.items[key].label}`);\n } else {\n obj = generateObj(obj, schema.items[key].name, schemaData[key]);\n }\n } else if (schema.items[key].name) {\n error = false;\n obj = generateObj(obj, schema.items[key].name, schemaData[key]);\n }\n })\n if (!error) {\n onApplyModal(obj);\n onClose();\n }\n }}\n color=\"primary\"\n startIcon={<CheckIcon/>}\n >\n {I18n.t('Apply')}\n </Button>\n <Button\n variant=\"contained\"\n onClick={() => {\n onClose();\n setTimeout(() => onCloseModal(), 0);\n }}\n color=\"grey\"\n startIcon={<CloseIcon />}\n >\n {I18n.t('Close')}\n </Button>\n </DialogActions>\n </Dialog >\n </ThemeProvider >;\n}\n\nexport const generateInputsFunc = (themeType, themeName, socket, newInstances, theme, onCloseModal, onApplyModal) => {\n if (!node) {\n node = document.createElement('div');\n node.id = 'renderDiscoveryModal';\n document.body.appendChild(node);\n }\n const root = createRoot(node);\n\n return root.render(<StyledEngineProvider injectFirst>\n <ThemeProvider theme={theme}>\n <GenerateInputsModal onCloseModal={onCloseModal} newInstances={newInstances} onApplyModal={onApplyModal} themeName={themeName} themeType={themeType} theme={theme} socket={socket} />\n </ThemeProvider>\n </StyledEngineProvider>);\n}\n","import * as React from 'react';\n\nexport function useStateLocal(defaultValue, key) {\n const data = (window._localStorage || window.localStorage).getItem(key);\n if (data) {\n try {\n defaultValue = JSON.parse(data);\n } catch (error) {\n\n }\n }\n\n const [state, setState] = React.useState(defaultValue);\n\n const eventsToInstall = newValue => {\n (window._localStorage || window.localStorage).setItem(key, JSON.stringify(newValue));\n setState(newValue);\n };\n\n return [state, eventsToInstall, !!(window._localStorage || window.localStorage).getItem(key)];\n}","import React, { useEffect, useState } from 'react';\nimport clsx from 'clsx';\n\nimport Button from '@mui/material/Button';\nimport Dialog from '@mui/material/Dialog';\nimport DialogActions from '@mui/material/DialogActions';\nimport DialogContent from '@mui/material/DialogContent';\nimport { Tooltip, AppBar, Avatar, Box, Checkbox, CircularProgress, LinearProgress, Paper, Step, StepLabel, Stepper, Switch, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, TableSortLabel, Typography, } from '@mui/material';\nimport { ThemeProvider } from '@mui/material/styles';\nimport { makeStyles } from '@mui/styles';\n\nimport VisibilityIcon from '@mui/icons-material/Visibility';\nimport NavigateNextIcon from '@mui/icons-material/NavigateNext';\nimport NavigateBeforeIcon from '@mui/icons-material/NavigateBefore';\nimport SearchIcon from '@mui/icons-material/Search';\nimport CloseIcon from '@mui/icons-material/Close';\nimport LibraryAddIcon from '@mui/icons-material/LibraryAdd';\nimport AssignmentTurnedInIcon from '@mui/icons-material/AssignmentTurnedIn';\nimport ReportProblemIcon from '@mui/icons-material/ReportProblem';\n\nimport I18n from '@iobroker/adapter-react-v5/i18n';\nimport Utils from '@iobroker/adapter-react-v5/Components/Utils';\n\nimport Command from '../components/Command';\nimport SelectWithIcon from '@iobroker/adapter-react-v5/Components/SelectWithIcon';\nimport { licenseDialogFunc } from './LicenseDialog';\nimport { generateInputsFunc } from './GenereteInputsModal';\nimport { useStateLocal } from '../helpers/hooks/useStateLocal';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n // backgroundColor: theme.palette.background.paper,\n width: '100%',\n height: 'auto',\n display: 'flex',\n borderRadius: 4,\n flexDirection: 'column'\n },\n paper: {\n maxWidth: 1000,\n width: '100%',\n maxHeight: 800,\n height: 'calc(100% - 32px)',\n\n },\n flex: {\n display: 'flex',\n },\n overflowHidden: {\n overflow: 'hidden'\n },\n overflowAuto: {\n overflowY: 'auto'\n },\n pre: {\n overflow: 'auto',\n margin: 20,\n '& p': {\n fontSize: 18,\n }\n },\n blockInfo: {\n right: 20,\n top: 10,\n position: 'absolute',\n display: 'flex',\n alignItems: 'center',\n color: 'silver'\n },\n img: {\n marginLeft: 10,\n width: 45,\n height: 45,\n margin: 'auto 0',\n position: 'relative',\n '&:after': {\n content: '\"\"',\n position: 'absolute',\n zIndex: 2,\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n background: 'url(\"img/no-image.png\") 100% 100% no-repeat',\n backgroundSize: 'cover',\n backgroundColor: '#fff',\n }\n },\n message: {\n justifyContent: 'space-between',\n display: 'flex',\n width: '100%',\n alignItems: 'center'\n },\n column: {\n flexDirection: 'column'\n },\n headerText: {\n fontWeight: 'bold',\n fontSize: 15\n },\n descriptionHeaderText: {\n margin: '10px 0'\n },\n silver: {\n color: 'silver'\n },\n button: {\n paddingTop: 18,\n paddingBottom: 5,\n position: 'sticky',\n bottom: 0,\n background: 'white',\n zIndex: 3\n },\n terminal: {\n fontFamily: 'monospace',\n fontSize: 14,\n marginLeft: 20\n },\n img2: {\n width: 25,\n height: 25,\n marginRight: 10,\n margin: 'auto 0',\n position: 'relative',\n '&:after': {\n content: '\"\"',\n position: 'absolute',\n zIndex: 2,\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n background: 'url(\"img/no-image.png\") 100% 100% no-repeat',\n backgroundSize: 'cover',\n backgroundColor: '#fff',\n }\n },\n heading: {\n display: 'flex',\n alignItems: 'center'\n },\n headerBlock: {\n backgroundColor: '#272727',\n padding: 13,\n fontSize: 16\n },\n headerBlockDisplay: {\n backgroundColor: '#272727',\n padding: 13,\n fontSize: 16,\n display: 'flex'\n },\n headerBlockDisplayItem: {\n padding: 5,\n fontSize: 16,\n display: 'flex',\n margin: 2,\n border: '1px solid #c0c0c045',\n borderRadius: 4,\n alignItems: 'center',\n transition: 'background .5s, color .5s'\n },\n activeBlock: {\n background: '#c0c0c021',\n border: '1px solid #4dabf5'\n },\n pointer: {\n cursor: 'pointer'\n },\n hover: {\n '&:hover': {\n background: '#c0c0c021',\n }\n },\n installSuccess: {\n opacity: 0.7,\n color: '#5ef05e'\n },\n installError: {\n opacity: 0.7,\n color: '#ffc14f'\n },\n width200: {\n width: 200\n },\n table: {\n // '& *': {\n // color: 'black'\n // }\n },\n paperTable: {\n width: '100%',\n marginBottom: theme.spacing(2),\n },\n wrapperSwitch: {\n display: 'flex',\n margin: 10,\n marginTop: 0\n },\n divSwitch: {\n display: 'flex',\n // margin: 10,\n alignItems: 'center',\n fontSize: 10,\n marginLeft: 0,\n color: 'silver'\n },\n marginLeft: {\n marginLeft: 40\n },\n stepper: {\n padding: 0,\n background: 'inherit'\n },\n instanceIcon: {\n width: 30,\n height: 30,\n margin: 3\n },\n instanceId: {\n marginLeft: 10\n },\n instanceWrapper: {\n display: 'flex',\n alignItems: 'center'\n }\n}));\n\nconst TabPanel = ({ classes, children, value, index, title, custom, boxHeight, black, ...props }) => {\n if (custom) {\n return <div\n {...props}\n >{value === index && children}</div>\n }\n if (value === index) {\n return <div {...props}>\n <AppBar position=\"static\" color=\"default\">\n <div style={!black ? { color: 'white' } : null} className={classes.headerBlock}>\n {title}\n </div>\n </AppBar>\n <Box style={boxHeight ? { height: 'calc(100% - 45px)' } : null} p={3}>\n <Typography style={boxHeight ? { height: '100%' } : null} component=\"div\">\n {children}\n </Typography>\n </Box>\n </div>;\n }\n return null;\n}\n\nconst headCells = [\n { id: 'instance', numeric: false, disablePadding: true, label: 'Instance' },\n { id: 'host', numeric: false, disablePadding: false, label: 'Host' },\n { id: 'description', numeric: false, disablePadding: false, label: 'Description' },\n { id: 'ignore', numeric: true, disablePadding: false, label: 'Ignore' },\n];\n\nfunction EnhancedTableHead(props) {\n const { numSelected, rowCount, onSelectAllClick } = props;\n const createSortHandler = property => event => {\n // onRequestSort(event, property);\n };\n\n return <TableHead>\n <TableRow>\n <TableCell padding=\"checkbox\">\n <Checkbox\n indeterminate={numSelected > 0 && numSelected < rowCount}\n checked={rowCount > 0 && numSelected === rowCount}\n onChange={onSelectAllClick}\n inputProps={{ 'aria-label': 'select all desserts' }}\n />\n </TableCell>\n {headCells.map((headCell) => (\n <TableCell\n key={headCell.id}\n align={headCell.numeric ? 'right' : 'left'}\n padding={headCell.disablePadding ? 'none' : 'normal'}\n >\n <TableSortLabel\n onClick={createSortHandler(headCell.id)}\n >\n {headCell.label}\n </TableSortLabel>\n </TableCell>\n ))}\n </TableRow>\n </TableHead>;\n}\n\nconst buildComment = (comment, t) => {\n if (!comment) {\n return 'new';\n }\n if (typeof comment === 'string') {\n return comment;\n }\n let text = '';\n\n if (comment.add) {\n text += t('new');\n if (Array.isArray(comment.add) && comment.add.length) {\n text += ': ';\n if (comment.add.length <= 5) {\n text += comment.add.join(', ');\n } else {\n text += t('%s devices', comment.add.length);\n }\n } else if (typeof comment.add === 'string' || typeof comment.add === 'number') {\n text += ': ';\n text += comment.add;\n }\n }\n\n if (comment.changed) {\n text += (text ? ', ' : '') + t('changed');\n if (Array.isArray(comment.changed === 'object') && comment.changed.length) {\n text += ': ';\n if (comment.changed.length <= 5) {\n text += comment.changed.join(', ');\n } else {\n text += t('%s devices', comment.changed.length);\n }\n } else if (typeof comment.changed === 'string' || typeof comment.changed === 'number') {\n text += ': ';\n text += comment.changed;\n }\n }\n\n if (comment.extended) {\n text += (text ? ', ' : '') + t('extended');\n if (Array.isArray(comment.extended) && comment.extended.length) {\n text += ': ';\n if (comment.extended.length <= 5) {\n text += comment.extended.join(', ');\n } else {\n text += t('%s devices', comment.extended.length);\n }\n } else if (typeof comment.extended === 'string' || typeof comment.extended === 'number') {\n text += ': ';\n text += comment.extended;\n }\n }\n\n if (comment.text) {\n text += (text ? ', ' : '') + comment.text;\n }\n return text;\n}\n\nconst DiscoveryDialog = ({ themeType, themeName, socket, dateFormat, currentHost, defaultLogLevel, repository, hosts, onClose, theme }) => {\n const classes = useStyles();\n\n const [step, setStep] = useState(0);\n const [listMethods, setListMethods] = useState({});\n const [checkboxChecked, setCheckboxChecked] = useState({});\n const [disableScanner, setDisableScanner] = useState(false);\n const [discoveryData, setDiscoveryData] = useState({});\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => {\n async function fetchData() {\n const resultList = await socket.sendTo('system.adapter.discovery.0', 'listMethods', null);\n let listChecked = {};\n let lastSelection = (window._localStorage || window.localStorage).getItem('App.discoveryLastSelection') || null;\n if (lastSelection) {\n try {\n lastSelection = JSON.parse(lastSelection);\n } catch (e) {\n lastSelection = null;\n }\n }\n\n Object.keys(resultList).forEach(key => {\n if (lastSelection) {\n listChecked[key] = lastSelection[key];\n } else {\n listChecked[key] = key !== 'serial';\n }\n });\n\n setCheckboxChecked(listChecked);\n setListMethods(resultList);\n }\n\n fetchData();\n }, [socket]);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => {\n async function readOldData() {\n const dataDiscovery = await socket.getObject('system.discovery');\n dataDiscovery !== undefined && setDiscoveryData(dataDiscovery);\n }\n\n readOldData();\n }, [socket]);\n\n const [aliveHosts, setAliveHosts] = useState({});\n const [checkSelectHosts, setCheckSelectHosts] = useState(false);\n const [hostInstances, setHostInstances] = useState({});\n\n useEffect(() => {\n hosts.forEach(async ({ _id }) => {\n let aliveValue = await socket.getState(`${_id}.alive`);\n setAliveHosts(prev => ({ ...prev, [_id]: !aliveValue || aliveValue.val === null ? false : !!aliveValue.val }));\n });\n\n if (Object.keys(aliveHosts).filter(key => aliveHosts[key]).length > 1) {\n setCheckSelectHosts(true);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [hosts, socket]);\n\n const [devicesFound, setDevicesFound] = useState(0);\n const [devicesProgress, setDevicesProgress] = useState(0);\n const [instancesFound, setInstancesFound] = useState(0);\n const [scanRunning, setScanRunning] = useState(false);\n const [servicesProgress, setServicesProgress] = useState(0);\n const [selected, setSelected] = useState([]);\n\n const handlerInstall = (name, value) => {\n if (!value) {\n return;\n }\n switch (name) {\n case 'discovery.0.devicesFound':\n return setDevicesFound(value.val);\n case 'discovery.0.devicesProgress':\n return setDevicesProgress(value.val);\n case 'discovery.0.instancesFound':\n return setInstancesFound(value.val);\n case 'discovery.0.scanRunning':\n return setScanRunning(value.val);\n case 'discovery.0.servicesProgress':\n return setServicesProgress(value.val);\n case 'system.discovery':\n return setDiscoveryData(value);\n default:\n return;\n }\n };\n\n useEffect(() => {\n socket.subscribeObject('system.discovery', handlerInstall);\n socket.subscribeState('discovery.0.devicesFound', handlerInstall);\n socket.subscribeState('discovery.0.devicesProgress', handlerInstall);\n socket.subscribeState('discovery.0.instancesFound', handlerInstall);\n socket.subscribeState('discovery.0.scanRunning', handlerInstall);\n socket.subscribeState('discovery.0.servicesProgress', handlerInstall);\n\n return () => {\n socket.unsubscribeObject('system.discovery', handlerInstall);\n socket.unsubscribeState('discovery.0.devicesFound', handlerInstall);\n socket.unsubscribeState('discovery.0.devicesProgress', handlerInstall);\n socket.unsubscribeState('discovery.0.instancesFound', handlerInstall);\n socket.unsubscribeState('discovery.0.scanRunning', handlerInstall);\n socket.unsubscribeState('discovery.0.servicesProgress', handlerInstall);\n }\n }, [socket]);\n\n const stepUp = () => setStep(step + 1);\n\n const stepDown = () => setStep(step - 1);\n\n const extendObject = (id, data) =>\n socket.extendObject(id, data)\n .catch(error => window.alert(error));\n\n const discoverScanner = async () => {\n setDisableScanner(true);\n let dataArray = Object.keys(checkboxChecked).filter(key => checkboxChecked[key]);\n const resultList = await socket.sendTo('system.adapter.discovery.0', 'browse', dataArray);\n setDisableScanner(false);\n if (resultList.error) {\n window.alert(resultList.error)\n } else {\n setStep(1);\n }\n };\n\n const handleSelectAllClick = event => {\n if (event.target.checked) {\n const newSelected = discoveryData?.native?.newInstances?.map(n => n._id);\n setSelected(newSelected);\n return;\n }\n setSelected([]);\n };\n\n const isSelected = (name, arr) => arr.includes(name);\n\n const handleClick = (event, name, arr, func) => {\n const selectedIndex = arr.indexOf(name);\n let newSelected = [];\n\n if (selectedIndex === -1) {\n newSelected = newSelected.concat(arr, name);\n } else if (selectedIndex === 0) {\n newSelected = newSelected.concat(arr.slice(1));\n } else if (selectedIndex === arr.length - 1) {\n newSelected = newSelected.concat(arr.slice(0, -1));\n } else if (selectedIndex > 0) {\n newSelected = newSelected.concat(\n arr.slice(0, selectedIndex),\n arr.slice(selectedIndex + 1),\n );\n }\n\n func(newSelected);\n };\n\n const checkLicenseAndInputs = (objName, cb) => {\n const obj = JSON.parse(JSON.stringify(discoveryData?.native?.newInstances.find(obj => obj._id === objName)));\n let license = true;\n if (obj && obj.comment && obj.comment.license && obj.comment.license !== 'MIT') {\n license = false;\n if (!obj.common.licenseUrl) {\n obj.common.licenseUrl = `https://raw.githubusercontent.com/ioBroker/ioBroker.${obj.common.name}/master/LICENSE`\n }\n if (typeof obj.common.licenseUrl === 'object') {\n obj.common.licenseUrl = obj.common.licenseUrl[I18n.getLanguage()] || obj.common.licenseUrl.en;\n }\n if (obj.common.licenseUrl.includes('github.com')) {\n obj.common.licenseUrl = obj.common.licenseUrl.replace('github.com', 'raw.githubusercontent.com').replace('/blob/', '/');\n }\n }\n\n licenseDialogFunc(license, theme, result => {\n if (!result) {\n // license not accepted, go to the next instance\n const index = selected.indexOf(obj._id) + 1;\n setInstallStatus(status => Object.assign({ ...status }, { [index]: 'error' }));\n\n setLogs(logsEl => Object.assign({ ...logsEl }, { [selected[index - 1]]: [I18n.t('Error: license not accepted')] }));\n\n if (selected.length > index) {\n setTimeout(() =>\n checkLicenseAndInputs(selected[index], () => {\n setCurrentInstall(index + 1);\n setCmdName('install');\n setInstallProgress(true);\n })\n , 100);\n } else {\n setFinishInstall(true);\n }\n } else\n if (obj.comment?.inputs) {\n generateInputsFunc(themeType, themeName, socket, obj, theme, () => {\n const index = selected.indexOf(obj._id) + 1;\n setInstallStatus(status => Object.assign({ ...status }, { [index]: 'error' }));\n\n setLogs(logsEl => Object.assign({ ...logsEl }, { [selected[index - 1]]: [I18n.t('Error: configuration dialog canceled')] }));\n\n if (selected.length > index) {\n setTimeout(() =>\n checkLicenseAndInputs(selected[index], () => {\n setCurrentInstall(index + 1);\n setCmdName('install');\n setInstallProgress(true);\n })\n , 100);\n } else {\n setFinishInstall(true);\n }\n }, params => {\n setInstancesInputsParams(params);\n cb();\n })\n } else {\n cb();\n }\n }, obj?.common?.licenseUrl);\n };\n\n const [installProgress, setInstallProgress] = useState(false);\n const [currentInstall, setCurrentInstall] = useState(1);\n const [installStatus, setInstallStatus] = useState({});\n const [cmdName, setCmdName] = useState('install');\n\n const resetStateBack = () => {\n setSelected([]);\n setInstallProgress(false);\n setFinishInstall(false);\n setCurrentInstall(1);\n setCmdName('install');\n setInstallStatus({});\n };\n\n const checkInstall = () => {\n checkLicenseAndInputs(selected[0], () => {\n setCurrentInstall(1);\n setInstallProgress(true);\n });\n };\n\n const [suggested, setSuggested] = useStateLocal(true, 'discovery.suggested');\n const [showAll, setShowAll] = useStateLocal(true, 'discovery.showAll');\n\n const black = themeType === 'dark';\n\n const [instancesInputsParams, setInstancesInputsParams] = useState({});\n const steps = ['Select methods', 'Create instances', 'Installation process'];\n const [logs, setLogs] = useState({});\n const [finishInstall, setFinishInstall] = useState(false);\n const [selectLogsIndex, setSelectLogsIndex] = useState(1);\n\n return <ThemeProvider theme={theme}>\n <Dialog\n onClose={(event, reason) => {\n if (reason !== 'backdropClick' && reason !== 'escapeKeyDown') {\n onClose();\n }\n }}\n open\n classes={{ paper: classes.paper }}\n >\n <h2 className={classes.heading}>\n <VisibilityIcon style={{\n color: 'rgb(77 171 245)',\n fontSize: 36,\n marginLeft: 25,\n marginRight: 10\n }} />\n {I18n.t('Find devices and services')}\n </h2>\n <Stepper className={classes.stepper} alternativeLabel activeStep={step}>\n {steps.map((label) => (\n <Step key={label}>\n <StepLabel>{I18n.t(label)}</StepLabel>\n </Step>\n ))}\n </Stepper>\n <DialogContent className={clsx(classes.flex, classes.overflowHidden)} dividers>\n <div className={classes.root}>\n <TabPanel\n className={classes.overflowAuto}\n style={black ? { color: 'white' } : null}\n value={step}\n index={0}\n black={black}\n classes={classes}\n title={I18n.t('Discover all possible devices')}\n >\n {!disableScanner ? <> <div className={classes.headerText}>\n {I18n.t(`press_discover`)}\n </div>\n {discoveryData?.native?.lastScan && <div className={classes.descriptionHeaderText}>\n {I18n.t('Last scan on %s', Utils.formatDate(new Date(discoveryData.native.lastScan), dateFormat))}\n </div>}\n <div\n style={!black ? { color: 'white' } : null}\n className={classes.headerBlock}>\n {I18n.t('Use following methods:')}\n\n </div>\n {Object.keys(listMethods).map(key => <div key={key}><Checkbox\n checked={checkboxChecked[key]}\n disabled={disableScanner}\n onChange={(_, value) => {\n const newCheckboxChecked = JSON.parse(JSON.stringify(checkboxChecked));\n newCheckboxChecked[key] = value;\n (window._localStorage || window.localStorage).setItem('App.discoveryLastSelection', JSON.stringify(newCheckboxChecked));\n setCheckboxChecked(newCheckboxChecked)\n }}\n />{key}</div>)}</>\n : (scanRunning && <div>\n {devicesProgress >= 99 ? `Lookup services - ${servicesProgress}%` : `Lookup devices - ${devicesProgress}%`}\n {disableScanner && <LinearProgress variant=\"determinate\" value={devicesProgress >= 99 ? servicesProgress : devicesProgress} />}\n {devicesProgress >= 99 ? `${instancesFound} service(s) found` : `${devicesFound} device(s) found`}\n </div>)\n }\n </TabPanel>\n <TabPanel\n className={classes.overflowAuto}\n value={step}\n index={1}\n classes={classes}\n title={discoveryData?.native?.lastScan ?\n I18n.t('Create instances automatically - Last scan on %s', Utils.formatDate(new Date(discoveryData.native.lastScan), dateFormat))\n : I18n.t('Create instances automatically')\n }\n >\n <div className={classes.wrapperSwitch}>\n <div className={classes.divSwitch}>\n <div style={!showAll ? { color: 'green' } : null}>{I18n.t('hide ignored')}</div>\n <Switch\n checked={showAll}\n onChange={e => setShowAll(e.target.checked)}\n color=\"primary\"\n />\n <div style={showAll ? { color: 'green' } : null}>{I18n.t('show ignored')}</div>\n </div>\n <div className={clsx(classes.divSwitch, classes.marginLeft)}>\n <div style={!suggested ? { color: 'green' } : null}>{I18n.t('hide suggested')}</div>\n <Switch\n checked={suggested}\n onChange={e => setSuggested(e.target.checked)}\n color=\"primary\"\n />\n <div style={suggested ? { color: 'green' } : null}>{I18n.t('show suggested')}</div>\n </div>\n </div>\n <Paper className={classes.paperTable}>\n <TableContainer>\n <Table\n className={classes.table}\n size=\"small\"\n >\n <EnhancedTableHead\n classes={classes}\n numSelected={selected.length}\n onSelectAllClick={handleSelectAllClick}\n rowCount={discoveryData?.native?.newInstances?.length || 0}\n />\n <TableBody>\n {discoveryData?.native?.newInstances?.filter(el => {\n if (!suggested) {\n return !el.comment?.advice;\n }\n if (!showAll) {\n return !el?.comment?.ack;\n }\n return true;\n }).map((obj, idx) => <TableRow\n hover\n role=\"checkbox\"\n key={obj._id}\n selected={obj.comment?.advice}\n >\n <TableCell padding=\"checkbox\">\n <Checkbox\n checked={isSelected(obj._id, selected)}\n onClick={e => handleClick(e, obj._id, selected, setSelected)}\n />\n </TableCell>\n <TableCell component=\"th\" scope=\"row\" padding=\"none\">\n <div className={classes.instanceWrapper}>\n <Avatar\n variant=\"square\"\n alt={obj._id.replace('system.adapter.', '')}\n src={repository[obj.common.name]?.icon}\n className={classes.instanceIcon}\n />\n <div className={classes.instanceId}>\n {obj._id.replace('system.adapter.', '')}\n </div>\n </div>\n </TableCell>\n <TableCell align=\"left\">{checkSelectHosts ?\n <SelectWithIcon\n fullWidth\n lang={I18n.getLanguage()}\n list={hosts}\n t={I18n.t}\n value={hostInstances[obj._id] || currentHost}\n themeType={themeType}\n onChange={val =>\n setHostInstances(Object.assign({ ...hostInstances }, { [obj._id]: val }))}\n />\n :\n '_'}</TableCell>\n <TableCell align=\"left\">{buildComment(obj.comment, I18n.t)}</TableCell>\n <TableCell align=\"right\" padding=\"checkbox\">\n <Checkbox\n checked={!!obj?.comment?.ack}\n onClick={e => {\n const newInstances = JSON.parse(JSON.stringify(discoveryData?.native.newInstances));\n newInstances[idx].comment = { ...newInstances[idx].comment, ack: !newInstances[idx].comment.ack };\n extendObject('system.discovery', { native: { newInstances } });\n }}\n />\n </TableCell>\n </TableRow>)}\n </TableBody>\n </Table>\n </TableContainer>\n </Paper>\n </TabPanel>\n <TabPanel\n className={classes.overflowAuto}\n value={step}\n index={2}\n style={{ height: '100%' }}\n boxHeight\n classes={classes}\n title={I18n.t('Install adapters')}\n >\n <div style={{ display: 'flex', height: '100%' }}>\n <div>\n {selected.map((el, idx) => <div\n key={el}\n onClick={finishInstall ? () => setSelectLogsIndex(idx) : null}\n className={clsx(classes.headerBlockDisplayItem,\n finishInstall && classes.pointer,\n finishInstall && classes.hover,\n finishInstall && selectLogsIndex === idx && classes.activeBlock)}>\n <div className={classes.width200}>\n <div className={classes.instanceWrapper}>\n <Avatar\n variant=\"square\"\n alt={el.replace('system.adapter.', '')}\n src={repository[el.replace('system.adapter.', '').split('.')[0]]?.icon}\n className={classes.instanceIcon}\n />\n <div className={classes.instanceId}>\n {el.replace('system.adapter.', '')}\n </div>\n </div></div>\n {currentInstall === idx + 1 && !installStatus[idx + 1] && <CircularProgress size={20} />}\n {installStatus[idx + 1] === 'error' ? <ReportProblemIcon className={classes.installError} /> : installStatus[idx + 1] === 'success' ? <AssignmentTurnedInIcon className={classes.installSuccess} /> : null}\n </div>)}\n </div>\n {currentInstall && (installProgress || finishInstall) && <div style={{ overflow: 'hidden', width: 'calc(100% - 260px)' }}>\n <Command\n noSpacing\n key={`${currentInstall}-${cmdName}`}\n ready\n currentHost={currentHost}\n logsRead={finishInstall ? logs[selected[selectLogsIndex]] || ['skipped'] : null}\n showElement={!finishInstall}\n socket={socket}\n t={I18n.t}\n cmd={finishInstall ? '' : `${cmdName} ${selected[currentInstall - 1].replace('system.adapter.', '').split('.')[0]}`}\n onFinished={(_, logsSuccess) => {\n let data = JSON.parse(JSON.stringify(discoveryData?.native.newInstances.find(obj =>\n obj._id === selected[currentInstall - 1])));\n delete data.comment;\n\n let adapterId = data._id.split('.');\n adapterId.pop();\n adapterId = adapterId.join('.');\n socket.getObject(adapterId)\n .then(obj => {\n data = Object.assign({}, obj, data);\n data.common = Object.assign(obj.common, data.common);\n data.native = Object.assign(obj.native, data.native);\n data.type = 'instance';\n\n // set log level\n if (defaultLogLevel) {\n data.common.logLevel = defaultLogLevel;\n }\n data.common.logLevel = data.common.logLevel || 'info';\n\n if (instancesInputsParams.native && Object.keys(instancesInputsParams.native).length) {\n Object.assign(data.native, instancesInputsParams.native);\n setInstancesInputsParams({});\n }\n if (checkSelectHosts && hostInstances[data._id]) {\n data.common.host = hostInstances[data._id];\n }\n\n // write created instance\n extendObject(data._id, data)\n .then(() => {\n if (currentInstall < selected.length) {\n // install next\n checkLicenseAndInputs(selected[currentInstall], () => {\n setCurrentInstall(currentInstall + 1);\n setCmdName('install');\n });\n setLogs({ ...logs, [selected[currentInstall - 1]]: logsSuccess });\n setInstallStatus(Object.assign({ ...installStatus }, { [currentInstall]: 'success' }));\n } else {\n setLogs({ ...logs, [selected[currentInstall - 1]]: logsSuccess });\n setInstallStatus(Object.assign({ ...installStatus }, { [currentInstall]: 'success' }));\n setSelectLogsIndex(currentInstall - 1);\n let dataDiscovery = JSON.parse(JSON.stringify(discoveryData));\n if (dataDiscovery) {\n dataDiscovery.native.newInstances = dataDiscovery.native.newInstances.filter(({ _id }) => {\n const find = selected.find(el => el === _id);\n if (!find) {\n return true;\n }\n return installStatus[selected.indexOf(find) + 1] !== 'success';\n });\n socket.setObject('system.discovery', dataDiscovery);\n }\n setFinishInstall(true);\n window.alert(I18n.t('Finished'));\n }\n });\n });\n }}\n errorFunc={(el, logsError) => {\n if (el === 51 && cmdName === 'install') {\n return setCmdName('upload');\n }\n if (selected.length > currentInstall && cmdName === 'upload') {\n checkLicenseAndInputs(selected[currentInstall], () =>\n setCurrentInstall(currentInstall + 1));\n setInstallStatus(Object.assign({ ...installStatus }, { [currentInstall]: 'error' }));\n } else {\n if (selected.length > currentInstall) {\n setInstallStatus(Object.assign({ ...installStatus }, { [currentInstall]: 'error' }));\n checkLicenseAndInputs(selected[currentInstall], () =>\n setCurrentInstall(currentInstall + 1));\n setCmdName('install');\n setLogs({ ...logs, [selected[currentInstall - 1]]: logsError });\n } else {\n setInstallStatus(Object.assign({ ...installStatus }, { [currentInstall]: 'error' }));\n setLogs({ ...logs, [selected[currentInstall - 1]]: logsError });\n setFinishInstall(true);\n setSelectLogsIndex(currentInstall - 1);\n let dataDiscovery = JSON.parse(JSON.stringify(discoveryData));\n if (dataDiscovery) {\n dataDiscovery.native.newInstances = dataDiscovery.native.newInstances.filter(({ _id }) => {\n const find = selected.find(el => el === _id);\n if (!find) {\n return true;\n }\n return installStatus[selected.indexOf(find) + 1] !== 'success';\n });\n socket.setObject('system.discovery', dataDiscovery);\n }\n }\n window.alert(`error ${selected[currentInstall - 1]}`);\n }\n }}\n />\n </div>}\n </div>\n </TabPanel>\n </div>\n </DialogContent >\n <DialogActions>\n {step > 0 && step !== 4 && <Button\n variant=\"contained\"\n disabled={step === 0}\n onClick={() => {\n if (step === 2) {\n resetStateBack();\n }\n stepDown();\n }}\n color=\"grey\"\n startIcon={<NavigateBeforeIcon />}\n >\n {I18n.t('Back')}\n </Button>\n }\n {step === 0 && <Button\n variant=\"contained\"\n autoFocus\n disabled={disableScanner}\n onClick={discoverScanner}\n color=\"primary\"\n startIcon={<SearchIcon />}\n >\n {I18n.t('Discover')}\n </Button>}\n {step !== 2 && step !== 4 &&\n <Tooltip title={step === 0 ? I18n.t('Skip discovery process and go to install with last scan results') : ''}>\n <span style={{ marginLeft: 8 }}>\n <Button\n variant=\"contained\"\n disabled={!discoveryData || !discoveryData?.native?.lastScan || step === 2 || disableScanner || (step === 1 && !selected.length)}\n onClick={() => {\n stepUp();\n if (step === 1) {\n checkInstall();\n }\n }}\n color={step === 1 ? 'primary' : 'grey'}\n startIcon={step === 1 ? <LibraryAddIcon /> : <NavigateNextIcon />}\n >\n {I18n.t(step === 1 ? 'Create instances' : 'Use last scan')}\n </Button>\n </span>\n </Tooltip>\n }\n <Button\n variant=\"contained\"\n disabled={disableScanner}\n onClick={() => onClose()}\n color={step === 2 ? 'primary' : 'grey'}\n startIcon={<CloseIcon />}\n >\n {I18n.t(step === 2 ? 'Finish' : 'Close')}\n </Button>\n </DialogActions>\n </Dialog>\n </ThemeProvider>;\n}\n\nexport default DiscoveryDialog;\n","import React, { Suspense } from 'react';\nimport { withStyles } from '@mui/styles';\nimport { ThemeProvider, StyledEngineProvider } from '@mui/material/styles';\nimport { DndProvider } from 'react-dnd';\nimport { HTML5Backend } from 'react-dnd-html5-backend';\nimport { TouchBackend } from 'react-dnd-touch-backend';\nimport clsx from 'clsx';\n\n// @mui/material\nimport AppBar from '@mui/material/AppBar';\nimport Avatar from '@mui/material/Avatar';\nimport Grid from '@mui/material/Grid';\nimport IconButton from '@mui/material/IconButton';\nimport Paper from '@mui/material/Paper';\nimport Snackbar from '@mui/material/Snackbar';\nimport Toolbar from '@mui/material/Toolbar';\nimport Typography from '@mui/material/Typography';\nimport { Hidden, Tooltip } from '@mui/material';\nimport Badge from '@mui/material/Badge';\nimport Menu from '@mui/material/Menu';\nimport MenuItem from '@mui/material/MenuItem';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemText from '@mui/material/ListItemText';\n\n// @material-ui/icons\nimport MenuIcon from '@mui/icons-material/Menu';\nimport BuildIcon from '@mui/icons-material/Build';\nimport VisibilityIcon from '@mui/icons-material/Visibility';\nimport PictureInPictureAltIcon from '@mui/icons-material/PictureInPictureAlt';\nimport UserIcon from '@mui/icons-material/Person';\nimport SyncIcon from '@mui/icons-material/CloudSync';\nimport SyncIconDisabled from '@mui/icons-material/SyncDisabled';\nimport CancelIcon from '@mui/icons-material/Close';\n\nimport ExpertIcon from '@iobroker/adapter-react-v5/icons/IconExpert';\n\nimport { AdminConnection as Connection, PROGRESS } from '@iobroker/socket-client';\nimport Loader from '@iobroker/adapter-react-v5/Components/Loader';\nimport LoaderPT from '@iobroker/adapter-react-v5/Components/Loaders/PT';\nimport LoaderVendor from '@iobroker/adapter-react-v5/Components/Loaders/Vendor';\nimport I18n from '@iobroker/adapter-react-v5/i18n';\nimport Router from '@iobroker/adapter-react-v5/Components/Router';\nimport Utils from './components/Utils';//adapter-react/Components/Utils';\nimport ConfirmDialog from '@iobroker/adapter-react-v5/Dialogs/Confirm';\nimport Icon from '@iobroker/adapter-react-v5/Components/Icon';\nimport theme from '@iobroker/adapter-react-v5/Theme';\nimport withWidth from '@iobroker/adapter-react-v5/Components/withWidth';\n\nimport CommandDialog from './dialogs/CommandDialog';\nimport Drawer from './components/Drawer';\nimport { STATES as DrawerStates } from './components/Drawer';\nimport { DRAWER_FULL_WIDTH, DRAWER_COMPACT_WIDTH } from './components/Drawer';\nimport Connecting from './components/Connecting';\n\nimport WizardDialog from './dialogs/WizardDialog';\nimport SystemSettingsDialog from './dialogs/SystemSettingsDialog';\nimport Login from './login/Login';\nimport HostSelectors from './components/HostSelectors';\nimport { expertModeDialogFunc } from './dialogs/ExpertModeDialog';\nimport { checkMessages, newsAdminDialogFunc } from './dialogs/NewsAdminDialog';\nimport { hostWarningDialogFunc } from './dialogs/HostWarningDialog';\nimport ToggleThemeMenu from './components/ToggleThemeMenu';\nimport LogsWorker from './Workers/LogsWorker';\nimport InstancesWorker from './Workers/InstancesWorker';\nimport HostsWorker from './Workers/HostsWorker';\nimport AdaptersWorker from './Workers/AdaptersWorker';\nimport ObjectsWorker from './Workers/ObjectsWorker';\nimport DiscoveryDialog from './dialogs/DiscoveryDialog';\nimport SlowConnectionWarningDialog from './dialogs/SlowConnectionWarningDialog';\nimport IsVisible from './components/IsVisible';\n\n// Tabs\nconst Adapters = React.lazy(() => import('./tabs/Adapters'));\nconst Instances = React.lazy(() => import('./tabs/Instances'));\nconst Intro = React.lazy(() => import('./tabs/Intro'));\nconst Logs = React.lazy(() => import('./tabs/Logs'));\nconst Files = React.lazy(() => import('./tabs/Files'));\nconst Objects = React.lazy(() => import('./tabs/Objects'));\nconst Users = React.lazy(() => import('./tabs/Users'));\nconst Enums = React.lazy(() => import('./tabs/Enums'));\nconst CustomTab = React.lazy(() => import('./tabs/CustomTab'));\nconst Hosts = React.lazy(() => import('./tabs/Hosts'));\nconst EasyMode = React.lazy(() => import('./tabs/EasyMode'));\n\nconst query = {};\n(window.location.search || '').replace(/^\\?/, '').split('&').forEach(attr => {\n const parts = attr.split('=');\n if (!parts[0]) {\n return;\n }\n query[parts[0]] = parts[1] === undefined ? true : decodeURIComponent(parts[1]);\n});\n\nconst styles = theme => ({\n root: {\n display: 'flex',\n height: '100%',\n },\n appBar: {\n transition: theme.transitions.create(['margin', 'width'], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n },\n logoWhite: {\n background: '#FFFFFF'\n },\n appBarShift: {\n width: `calc(100% - ${DRAWER_FULL_WIDTH}px)`,\n marginLeft: DRAWER_FULL_WIDTH,\n transition: theme.transitions.create(['margin', 'width'], {\n easing: theme.transitions.easing.easeOut,\n duration: theme.transitions.duration.enteringScreen,\n }),\n },\n appBarShiftCompact: {\n width: `calc(100% - ${DRAWER_COMPACT_WIDTH}px)`,\n marginLeft: DRAWER_COMPACT_WIDTH,\n transition: theme.transitions.create(['margin', 'width'], {\n easing: theme.transitions.easing.easeOut,\n duration: theme.transitions.duration.enteringScreen,\n }),\n },\n menuButton: {\n marginRight: theme.spacing(2),\n },\n hide: {\n display: 'none'\n },\n content: {\n flexGrow: 1,\n padding: theme.spacing(1),\n transition: theme.transitions.create('margin', {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n overflowY: 'auto',\n marginTop: theme.mixins.toolbar?.minHeight,\n '@media (min-width:0px) and (orientation: landscape)': {\n marginTop: theme.mixins.toolbar['@media (min-width:0px) and (orientation: landscape)']?.minHeight\n },\n '@media (min-width:600px)': {\n marginTop: theme.mixins.toolbar['@media (min-width:600px)']?.minHeight\n }\n },\n contentMargin: {\n marginLeft: -DRAWER_FULL_WIDTH,\n },\n contentMarginCompact: {\n marginLeft: -DRAWER_COMPACT_WIDTH,\n },\n contentShift: {\n transition: theme.transitions.create('margin', {\n easing: theme.transitions.easing.easeOut,\n duration: theme.transitions.duration.enteringScreen,\n }),\n marginLeft: 0\n },\n expertIcon: {\n width: 22,\n height: 22,\n //color: theme.palette.text ? theme.palette.text.disabled : 'grey'\n },\n expertIconActive: {\n //color: theme.palette.action.active\n },\n baseSettingsButton: {\n color: 'red',\n },\n alert_info: {\n\n },\n alert_error: {\n backgroundColor: '#f44336'\n },\n alert_success: {\n backgroundColor: '#4caf50'\n },\n avatarNotVisible: {\n opacity: 0,\n marginLeft: 5,\n transition: 'opacity 0.3s',\n width: 'initial'\n },\n avatarVisible: {\n opacity: 1\n },\n cmd: {\n animation: '1s linear infinite alternate $myEffect',\n opacity: 0.2,\n },\n '@keyframes myEffect': {\n '0%': {\n opacity: 0.2,\n transform: 'translateY(0)'\n },\n '100%': {\n opacity: 1,\n transform: 'translateY(-10%)'\n }\n },\n errorCmd: {\n color: '#a90000',\n animation: '0.2s linear infinite alternate $myEffect2',\n },\n performed: {\n color: theme.palette.mode === 'light' ? '#3bfd44' : '#388e3c',\n animation: '0.2s linear infinite alternate $myEffect2',\n },\n wrapperButtons: {\n display: 'flex',\n marginRight: 'auto',\n overflowY: 'auto'\n },\n '@keyframes myEffect2': {\n '0%': {\n opacity: 1,\n transform: 'translateX(0)'\n },\n '100%': {\n opacity: 0.7,\n transform: 'translateX(-2%)'\n }\n },\n\n flexGrow: {\n flexGrow: 2,\n },\n userBadge: {\n lineHeight: '48px'\n },\n userIcon: {\n borderRadius: 4,\n width: 48,\n height: 48,\n verticalAlign: 'middle',\n },\n userText: {\n verticalAlign: 'middle',\n fontSize: 16,\n maxWidth: 100,\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n display: 'inline-block'\n },\n userBackground: {\n borderRadius: 4,\n backgroundColor: theme.palette.mode === 'dark' ? '#EEE' : '#222',\n padding: 3,\n },\n styleVersion: {\n fontSize: 10,\n },\n wrapperName: {\n display: 'flex',\n flexDirection: 'column',\n marginRight: 10\n },\n expertBadge: {\n marginTop: 11,\n marginRight: 11,\n }\n});\n\nclass App extends Router {\n constructor(props) {\n super(props);\n\n window.alert = message => {\n if (message && message.toString().toLowerCase().includes('error')) {\n console.error(message);\n this.showAlert(message.toString(), 'error');\n } else {\n console.log(message);\n this.showAlert(message.toString(), 'info');\n }\n };\n // init translations\n this.translations = {\n 'en': require('@iobroker/adapter-react-v5/i18n/en'),\n 'de': require('@iobroker/adapter-react-v5/i18n/de'),\n 'ru': require('@iobroker/adapter-react-v5/i18n/ru'),\n 'pt': require('@iobroker/adapter-react-v5/i18n/pt'),\n 'nl': require('@iobroker/adapter-react-v5/i18n/nl'),\n 'fr': require('@iobroker/adapter-react-v5/i18n/fr'),\n 'it': require('@iobroker/adapter-react-v5/i18n/it'),\n 'es': require('@iobroker/adapter-react-v5/i18n/es'),\n 'pl': require('@iobroker/adapter-react-v5/i18n/pl'),\n 'zh-cn': require('@iobroker/adapter-react-v5/i18n/zh-cn'),\n };\n\n const translations = {\n 'en': require('./i18n/en'),\n 'de': require('./i18n/de'),\n 'ru': require('./i18n/ru'),\n 'pt': require('./i18n/pt'),\n 'nl': require('./i18n/nl'),\n 'fr': require('./i18n/fr'),\n 'it': require('./i18n/it'),\n 'es': require('./i18n/es'),\n 'pl': require('./i18n/pl'),\n 'zh-cn': require('./i18n/zh-cn'),\n };\n // merge together\n Object.keys(translations).forEach(lang => this.translations[lang] = Object.assign(this.translations[lang], translations[lang]));\n\n // init translations\n I18n.setTranslations(this.translations);\n I18n.setLanguage((navigator.language || navigator.userLanguage || 'en').substring(0, 2).toLowerCase());\n\n this.refConfigIframe = null;\n this.refUser = React.createRef();\n this.refUserDiv = React.createRef();\n this.expireInSec = null;\n this.expireInSecInterval = null;\n this.expireText = I18n.t('Session expire in %s', '%s');\n this.adminGuiConfig = { admin: {menu: {}, settings: {}, adapters: {}, login: {} } };\n\n if (!query.login) {\n let drawerState = (window._localStorage || window.localStorage).getItem('App.drawerState');\n if (drawerState) {\n drawerState = parseInt(drawerState, 10);\n } else {\n drawerState = this.props.width === 'xs' ? DrawerStates.closed : DrawerStates.opened;\n }\n\n const theme = this.createTheme();\n\n // install setter for configNotSaved (used in javascript)\n Object.defineProperty(window,'configNotSaved',{\n get: () => this.state.configNotSaved,\n set: configNotSaved => {\n const allStored = !configNotSaved;\n if (allStored !== this.state.allStored) {\n this.setState({ allStored });\n }\n },\n configurable: true,\n });\n\n this.state = {\n connected: false,\n progress: 0,\n ready: false,\n lang: 'en',\n\n //Finished\n protocol: this.getProtocol(),\n hostname: window.location.hostname,\n port: this.getPort(),\n //---------\n\n allTabs: null,\n\n expertMode: false,\n\n states: {},\n hosts: [],\n currentHost: '',\n currentHostName: '',\n currentTab: Router.getLocation(),\n currentDialog: null,\n currentUser: '',\n subscribesStates: {},\n subscribesObjects: {},\n subscribesLogs: 0,\n systemConfig: null,\n user: null, // Logged in user\n\n repository: {},\n installed: {},\n\n objects: {},\n\n waitForRestart: false,\n tabs: null,\n config: {},\n\n stateChanged: false,\n\n theme,\n themeName: this.getThemeName(theme),\n themeType: this.getThemeType(theme),\n\n alert: false,\n alertType: 'info',\n alertMessage: '',\n drawerState,\n\n tab: null,\n allStored: true,\n dataNotStoredDialog: false,\n dataNotStoredTab: '',\n\n baseSettingsOpened: false,\n unsavedDataInDialog: false,\n systemSettingsOpened: false,\n\n cmd: null,\n cmdDialog: false,\n wizard: true,\n commandError: false,\n performed: false,\n commandRunning: false,\n\n discoveryAlive: false,\n\n readTimeoutMs: SlowConnectionWarningDialog.getReadTimeoutMs(),\n showSlowConnectionWarning: false,\n\n expireInSec: null,\n\n versionAdmin: '',\n\n forceUpdateAdapters: 0,\n\n noTranslation: (window._localStorage || window.localStorage).getItem('App.noTranslation') === 'true',\n };\n this.logsWorker = null;\n this.instancesWorker = null;\n this.hostsWorker = null;\n } else {\n const theme = this.createTheme();\n this.state = {\n login: true,\n theme,\n themeName: this.getThemeName(theme),\n themeType: this.getThemeType(theme)\n };\n }\n }\n\n static getDerivedStateFromError(error) {\n // Update state so the next render will show the fallback UI.\n return { hasGlobalError: error };\n }\n\n componentDidCatch(error, info) {\n this.setState({hasGlobalError: error, hasGlobalErrorInfo: info});\n }\n\n setUnsavedData(hasUnsavedData) {\n if (hasUnsavedData !== this.state.unsavedDataInDialog) {\n this.setState({ unsavedDataInDialog: hasUnsavedData });\n }\n }\n\n // If the background color must be inverted. Depends on current theme.\n mustInvertBackground(color) {\n if (!color) {\n return false;\n } else {\n const invertedColor = Utils.invertColor(color, true);\n if (invertedColor === '#FFFFFF' && this.state.themeType === 'dark') {\n return true;\n }\n\n return invertedColor === '#000000' && this.state.themeType === 'light';\n }\n }\n\n localStorageGetItem = name => this.guiSettings.native.localStorage[name];\n\n localStorageSetItem = (name, value) => {\n if (value === null) {\n value = 'null';\n } else\n if (value === undefined) {\n return this.localStorageRemoveItem(name);\n }\n this.guiSettings.native.localStorage[name] = value.toString();\n this.localStorageSave();\n };\n\n localStorageRemoveItem = name => {\n if (this.guiSettings.native.localStorage.hasOwnProperty(name)) {\n delete this.guiSettings.native.localStorage[name];\n this.localStorageSave();\n }\n };\n\n sessionStorageGetItem = name => this.guiSettings.native.sessionStorage[name];\n\n sessionStorageSetItem = (name, value) => {\n if (value === null) {\n value = 'null';\n } else\n if (value === undefined) {\n return this.sessionStorageRemoveItem(name);\n }\n this.guiSettings.native.sessionStorage[name] = value.toString();\n this.localStorageSave();\n };\n\n sessionStorageRemoveItem = name => {\n if (this.guiSettings.native.sessionStorage.hasOwnProperty(name)) {\n delete this.guiSettings.native.sessionStorage[name];\n this.localStorageSave();\n }\n };\n\n localStorageSave() {\n this.localStorageTimer && clearTimeout(this.localStorageTimer);\n this.localStorageTimer = setTimeout(async () => {\n this.localStorageTimer = null;\n await this.socket.setObject(`system.adapter.${this.adminInstance}.guiSettings`, this.guiSettings);\n }, 200);\n }\n\n toggleTranslation = () => {\n (window._localStorage || window.localStorage).setItem('App.noTranslation', this.state.noTranslation ? 'false' : 'true');\n this.setState({ noTranslation: !this.state.noTranslation })\n };\n\n getGUISettings() {\n return this.socket.getState(`system.adapter.${this.adminInstance}.guiSettings`)\n .catch(() => ({ val: false }))\n .then(state => {\n if (state && state.val) {\n return this.socket.getObject(`system.adapter.${this.adminInstance}.guiSettings`)\n .then(obj => {\n this.guiSettings = obj || {type: 'state', common: {type: 'boolean', read: true, write: false, role: 'state'}};\n this.guiSettings.native = this.guiSettings.native || { localStorage: {}, sessionStorage: {} };\n if (!this.guiSettings.native.localStorage) {\n this.guiSettings.native = { localStorage: this.guiSettings.native, sessionStorage: {} };\n }\n\n window._localStorage = {\n getItem: this.localStorageGetItem,\n setItem: this.localStorageSetItem,\n removeItem: this.localStorageRemoveItem,\n };\n window._sessionStorage = {\n getItem: this.sessionStorageGetItem,\n setItem: this.sessionStorageSetItem,\n removeItem: this.sessionStorageRemoveItem,\n };\n\n // this is only settings, that initialized before connection established\n let drawerState = this.guiSettings.native['App.drawerState'];\n if (drawerState) {\n drawerState = parseInt(drawerState, 10);\n } else {\n drawerState = this.props.width === 'xs' ? DrawerStates.closed : DrawerStates.opened;\n }\n const noTranslation = (window._localStorage || window.localStorage).getItem('App.noTranslation') === 'true';\n\n this.setState({ guiSettings: true, drawerState, noTranslation }, () => {\n if (Utils.getThemeName() !== this.state.theme.name) {\n this.toggleTheme(Utils.getThemeName());\n }\n });\n });\n } else if (this.state.guiSettings) {\n window._localStorage = null;\n window._sessionStorage = null;\n\n this.setState({ guiSettings: false });\n }\n });\n }\n\n enableGuiSettings(enabled, ownSettings) {\n if (enabled && !this.guiSettings) {\n return this.socket.getObject(`system.adapter.${this.adminInstance}.guiSettings`)\n .then(async obj => {\n await this.socket.setState(`system.adapter.${this.adminInstance}.guiSettings`, { val: true, ack: true });\n\n this.guiSettings = obj || {type: 'state', common: {type: 'boolean', read: true, write: false, role: 'state'}};\n\n if (ownSettings || !this.guiSettings.native || !Object.keys(this.guiSettings.native).length) {\n this.guiSettings.native = { localStorage: {}, sessionStorage: {} };\n Object.keys(window.localStorage).forEach(name => {\n if (name !== 'getItem' && name !== 'setItem' && name !== 'removeItem' && name !== 'clear' && name !== 'key' && name !== 'length') {\n this.guiSettings.native.localStorage[name] = window.localStorage.getItem(name);\n }\n });\n Object.keys(window.sessionStorage).forEach(name => {\n if (name !== 'getItem' && name !== 'setItem' && name !== 'removeItem' && name !== 'clear' && name !== 'key' && name !== 'length') {\n this.guiSettings.native.sessionStorage[name] = window.sessionStorage.getItem(name);\n }\n });\n await this.socket.setObject(`system.adapter.${this.adminInstance}.guiSettings`, this.guiSettings);\n } else {\n window.location.reload();\n }\n\n await this.getGUISettings();\n });\n } else if (!enabled && this.guiSettings) {\n window._localStorage = null;\n window._sessionStorage = null;\n\n // clear localStorage\n Object.keys(window.localStorage).forEach(key => window.localStorage.removeItem(key));\n Object.keys(window.sessionStorage).forEach(key => window.sessionStorage.removeItem(key));\n\n Object.keys(this.guiSettings.native.localStorage).forEach(name => window.localStorage.setItem(name, this.guiSettings.native.localStorage[name]));\n Object.keys(this.guiSettings.native.sessionStorage).forEach(name => window.sessionStorage.setItem(name, this.guiSettings.native.sessionStorage[name]));\n\n this.guiSettings = null;\n\n return this.socket.setState(`system.adapter.${this.adminInstance}.guiSettings`, { val: false, ack: true })\n .catch(e => window.alert('Cannot disable settings'))\n .then(() => this.setState({ guiSettings: false }));\n }\n }\n\n componentDidMount() {\n if (!this.state.login) {\n window.addEventListener('hashchange', this.onHashChanged, false);\n if (!this.state.currentTab.tab) {\n this.handleNavigation('tab-intro');\n } else {\n this.setTitle(this.state.currentTab.tab.replace('tab-', ''));\n }\n\n this.socket = new Connection({\n name: 'admin',\n admin5only: true,\n port: this.getPort(),\n autoSubscribes: ['system.adapter.*'], // do not subscribe on '*' and really we don't need a 'system.adapter.*' too. Every tab must subscribe itself on everything that it needs\n autoSubscribeLog: true,\n onProgress: progress => {\n if (progress === PROGRESS.CONNECTING) {\n this.setState({\n connected: false\n });\n } else if (progress === PROGRESS.READY) {\n // BF: (2022.05.09) here must be this.socket.getVersion(true), but I have no Idea, why it does not work :(\n this.socket._socket.emit('getVersion', async (err, version) => {\n console.log(`Stored version: ${this.state.versionAdmin}, new version: ${version}`);\n if (this.state.versionAdmin && this.state.versionAdmin !== version) {\n window.alert('New adapter version detected. Reloading...')\n setTimeout(() => window.location.reload(), 500)\n }\n\n // read settings anew\n await this.getGUISettings();\n\n const newState = {\n connected: true,\n progress: 100,\n versionAdmin: version\n };\n\n if (this.state.cmd && this.state.cmd.match(/ admin(@[-.\\w]+)?$/)) {\n // close command dialog after reconnect (maybe admin was restarted and update is now finished)\n newState.commandRunning = false;\n newState.forceUpdateAdapters = this.state.forceUpdateAdapters + 1;\n\n this.closeCmdDialog(() => {\n this.setState(newState);\n window.location.reload();\n });\n } else {\n try {\n const adminObj = await this.socket.getObject('system.adapter.' + this.adminInstance);\n // use instance language\n if (adminObj?.native?.language) {\n if (adminObj.native.language !== I18n.getLanguage()) {\n console.log('Language changed to ' + adminObj.native.language);\n I18n.setLanguage(adminObj.native.language);\n if (this.languageSet) {\n window.location.reload();\n } else {\n this.languageSet = true;\n }\n }\n } else if (this.socket.systemLang !== I18n.getLanguage()) {\n console.log('Language changed to ' + this.socket.systemLang);\n I18n.setLanguage(this.socket.systemLang);\n if (this.languageSet) {\n window.location.reload();\n } else {\n this.languageSet = true;\n }\n }\n } catch (e) {\n console.error('Cannot read admin settings: ' + e);\n }\n\n this.setState(newState);\n }\n });\n } else {\n this.setState({\n connected: true,\n progress: Math.round(PROGRESS.READY / progress * 100)\n });\n }\n },\n onReady: async objects => {\n // Combine adminGuiConfig with user settings\n this.adminGuiConfig = Object.assign({admin: {menu: {}, settings: {}, adapters: {}, login: {}}}, this.socket.systemConfig.native?.vendor);\n this.adminGuiConfig.admin.menu = this.adminGuiConfig.admin.menu || {};\n this.adminGuiConfig.admin.settings = this.adminGuiConfig.admin.settings || {};\n this.adminGuiConfig.admin.adapters = this.adminGuiConfig.admin.adapters || {};\n this.adminGuiConfig.admin.login = this.adminGuiConfig.admin.login || {};\n\n this.socket.getCurrentInstance()\n .then(adminInstance => {\n this.adminInstance = adminInstance;\n return this.socket.getObject('system.adapter.' + adminInstance);\n })\n .then(adminObj => {\n // use instance language\n if (adminObj?.native?.language) {\n I18n.setLanguage(adminObj.native.language);\n } else {\n I18n.setLanguage(this.socket.systemLang);\n }\n this.languageSet = true;\n return this.socket.getIsEasyModeStrict();\n })\n .then(async isStrict => {\n await this.getGUISettings();\n\n if (isStrict) {\n return this.socket.getEasyMode()\n .then(config => {\n this.setState({\n lang: this.socket.systemLang,\n ready: true,\n strictEasyMode: true,\n easyModeConfigs: config.configs,\n objects,\n });\n });\n } else {\n // create Workers\n this.logsWorker = this.logsWorker || new LogsWorker(this.socket, 1000);\n this.instancesWorker = this.instancesWorker || new InstancesWorker(this.socket);\n this.hostsWorker = this.hostsWorker || new HostsWorker(this.socket);\n this.adaptersWorker = this.adaptersWorker || new AdaptersWorker(this.socket);\n this.objectsWorker = this.objectsWorker || new ObjectsWorker(this.socket);\n\n const newState = {\n lang: this.socket.systemLang,\n ready: true,\n objects,\n };\n\n try {\n newState.systemConfig = await this.socket.getCompactSystemConfig();\n newState.wizard = !newState.systemConfig.common.licenseConfirmed;\n await this.findCurrentHost(newState);\n await this.readRepoAndInstalledInfo(newState.currentHost, newState.hosts);\n } catch (error) {\n console.log(error);\n }\n\n this.adaptersWorker.registerRepositoryHandler(this.repoChangeHandler);\n this.adaptersWorker.registerHandler(this.adaptersChangeHandler);\n\n this.subscribeOnHostsStatus();\n\n const storedExpertMode = (window._sessionStorage || window.sessionStorage).getItem('App.expertMode');\n newState.expertMode = storedExpertMode ? storedExpertMode === 'true' : !!newState.systemConfig.common.expertMode;\n\n // Read user and show him\n if (this.socket.isSecure || this.socket.systemConfig.native?.vendor) {\n this.socket.getCurrentUser()\n .then(user => {\n this.socket.getObject('system.user.' + user)\n .then(userObj => {\n if (userObj.native?.vendor) {\n Object.assign(this.adminGuiConfig, userObj.native.vendor);\n }\n\n if (this.socket.isSecure) {\n this.setState({\n user: {\n id: userObj._id,\n name: Utils.getObjectNameFromObj(userObj, this.socket.systemLang),\n color: userObj.common.color,\n icon: userObj.common.icon,\n invertBackground: this.mustInvertBackground(userObj.common.color)\n }\n });\n\n // start ping interval\n this.makePingAuth();\n }\n })\n })\n .catch(error => {\n console.error(error);\n this.showAlert(error, 'error');\n });\n }\n\n this.setState(newState, () =>\n this.setCurrentTabTitle());\n\n this.socket.subscribeState('system.adapter.discovery.0.alive', this.onDiscoveryAlive);\n\n // Give some time for communication\n setTimeout(() =>\n this.logsWorkerChanged(this.state.currentHost), 1000);\n\n setTimeout(() =>\n this.findNewsInstance()\n .then(instance => this.socket.subscribeState(`admin.${instance}.info.newsFeed`, this.getNews(instance))),\n 5000);\n\n setTimeout(() =>\n this.hostsWorker.getNotifications(newState.currentHost)\n .then(notifications => this.showAdaptersWarning(notifications, this.socket, newState.currentHost)),\n 3000);\n }\n })\n .catch(error => {\n console.error(error);\n this.showAlert(error, 'error');\n });\n },\n //onObjectChange: (objects, scripts) => this.onObjectChange(objects, scripts),\n onError: error => {\n console.error(error);\n this.showAlert(error, 'error');\n }\n });\n }\n }\n\n componentWillUnmount() {\n window.removeEventListener('hashchange', this.onHashChanged, false);\n this.socket && this.socket.unsubscribeState('system.adapter.discovery.0.alive', this.onDiscoveryAlive);\n\n this.adaptersWorker && this.adaptersWorker.unregisterRepositoryHandler(this.repoChangeHandler);\n this.adaptersWorker && this.adaptersWorker.unregisterHandler(this.adaptersChangeHandler);\n\n this.pingAuth && clearTimeout(this.pingAuth);\n this.pingAuth = null;\n this.expireInSecInterval && clearInterval(this.expireInSecInterval);\n this.expireInSecInterval = null;\n this.unsubscribeOnHostsStatus();\n\n // restore localstorage\n if (this._localStorage) {\n window._localStorage = null;\n window._sessionStorage = null;\n }\n }\n\n repoChangeHandler = () => {\n this.readRepoAndInstalledInfo(this.state.currentHost, null, true)\n .then(() => console.log('Repo updated!'));\n }\n\n adaptersChangeHandler = events => {\n // update installed\n //\n const installed = JSON.parse(JSON.stringify(this.state.installed));\n let changed = false;\n events.forEach(event => {\n const parts = event.id.split('.');\n const adapter = parts[2];\n if (event.type === 'delete' || !event.obj) {\n if (installed[adapter]) {\n changed = true;\n delete installed[adapter];\n }\n } else {\n if (installed[adapter]) {\n Object.keys(installed[adapter])\n .forEach(attr => {\n if (installed[adapter][attr] !== event.obj.common[attr]) {\n installed[adapter][attr] = event.obj.common[attr];\n changed = true;\n }\n });\n } else {\n installed[adapter] = {version: event.obj.common.version};\n changed = true;\n }\n }\n });\n\n changed && this.setState({installed});\n }\n\n async findCurrentHost(newState) {\n newState.hosts = await this.socket.getCompactHosts();\n\n if (!this.state.currentHost) {\n const currentHost = (window._localStorage || window.localStorage).getItem('App.currentHost');\n\n const itemHost = newState.hosts.find(host => host._id === currentHost);\n\n if (currentHost && itemHost) {\n newState.currentHost = itemHost._id;\n newState.currentHostName = itemHost.common?.name || itemHost._id.replace('system.host.', '');\n } else {\n newState.currentHost = newState.hosts[0]._id;\n newState.currentHostName = newState.hosts[0].common?.name || newState.hosts[0]._id.replace('system.host.', '');\n }\n }\n\n // Check that host is alive\n let alive;\n try {\n alive = await this.socket.getState(newState.currentHost + '.alive');\n } catch (e) {\n alive = null;\n console.warn(`Cannot get state ${newState.currentHost}.alive: ${e}`);\n }\n\n if (!alive || !alive.val) {\n // find first alive host\n for (let h = 0; h < newState.hosts.length; h++) {\n alive = await this.socket.getState(newState.hosts[h]._id + '.alive');\n if (alive && alive.val) {\n newState.currentHost = newState.hosts[h]._id;\n newState.currentHostName = newState.hosts[h].common.name;\n }\n }\n }\n }\n\n updateExpireIn() {\n const now = Date.now();\n this.expireInSec -= (now - this.lastExecution) / 1000;\n const time = Utils.formatTime(this.expireInSec);\n if (this.refUser.current) {\n this.refUser.current.title = this.expireText.replace('%s', time);\n }\n if (this.expireInSec < 120 && this.refUserDiv.current) {\n this.refUserDiv.current.innerHTML = time;\n this.refUserDiv.current.style.color = '#F44';\n }\n\n if (this.expireInSec <= 0) {\n window.alert('Session expired');\n // reconnect\n setTimeout(() =>\n window.location.reload(false), 1000);\n }\n\n this.lastExecution = now;\n }\n\n makePingAuth() {\n this.pingAuth && clearTimeout(this.pingAuth);\n this.pingAuth = null;\n\n this.socket.getCurrentSession()\n .then(data => {\n if (data) {\n if (!this.expireInSecInterval) {\n this.expireInSecInterval = setInterval(() => this.updateExpireIn(), 1000);\n }\n this.expireInSec = data.expireInSec;\n this.lastExecution = Date.now();\n this.updateExpireIn();\n }\n\n /*this.pingAuth = setTimeout(() => {\n this.pingAuth = null;\n this.makePingAuth();\n }, 30000);*/\n })\n .catch(e => {\n window.alert('Session timeout: ' + e);\n // reconnect\n setTimeout(() =>\n window.location.reload(false), 1000);\n })\n }\n\n onDiscoveryAlive = (name, value) => {\n if (!!(value && !!value.val) !== this.state.discoveryAlive) {\n this.setState({ discoveryAlive: !!(value && !!value.val) });\n }\n }\n\n getDiscoveryModal = () => {\n return <DiscoveryDialog\n themeType={this.state.themeType}\n themeName={this.state.themeName}\n theme={this.state.theme}\n socket={this.socket}\n dateFormat={this.state.systemConfig.common.dateFormat}\n currentHost={this.state.currentHost}\n defaultLogLevel={this.state.systemConfig.common.defaultLogLevel}\n repository={this.state.repository}\n hosts={this.state.hosts}\n onClose={() => Router.doNavigate(null)}\n />;\n }\n\n findNewsInstance = () => {\n const maxCount = 200;\n return new Promise(async resolve => {\n for (let instance = 0; instance < maxCount; instance++) {\n try {\n let adminAlive = await this.socket.getState(`system.adapter.admin.${instance}.alive`);\n if (adminAlive && adminAlive.val) {\n resolve(instance);\n break;\n }\n } catch (error) {\n console.error(error);\n this.showAlert(error, 'error');\n }\n }\n resolve(0);\n });\n }\n\n showAdaptersWarning = (notifications, socket, host) => {\n if (!notifications || !notifications[host] || !notifications[host].result) {\n return Promise.resolve();\n }\n\n const result = notifications[host].result;\n\n if (result && result.system && Object.keys(result.system.categories).length) {\n return this.instancesWorker.getInstances()\n .then(instances => {\n hostWarningDialogFunc(\n result.system.categories,\n this.state.systemConfig.common.dateFormat,\n this.state.themeType,\n this.state.themeName,\n instances,\n this.state.theme,\n name => socket.clearNotifications(host, name)\n );\n });\n } else {\n return Promise.resolve();\n }\n }\n\n getNews = instance => async (name, newsFeed) => {\n try {\n const lastNewsId = await this.socket.getState(`admin.${instance}.info.newsLastId`);\n if (newsFeed && newsFeed.val) {\n let news = null;\n try {\n news = JSON.parse(newsFeed?.val);\n } catch (error) {\n console.error('Cannot parse news: ' + newsFeed?.val);\n }\n\n if (news && news.length && news[0].id !== lastNewsId?.val) {\n this.socket.getUuid()\n .then(uuid => this.socket.getHostInfo(this.state.currentHost)\n .catch(() => null)\n .then(info => this.socket.getCompactInstances()\n .catch(() => null)\n .then(instances => {\n const checkNews = checkMessages(news, lastNewsId?.val, {\n lang: I18n.getLanguage(),\n adapters: this.state.adapters,\n instances: instances || [],\n nodeVersion: info ? info['Node.js'] || '?' : '?',\n npmVersion: info ? info.NPM || '?' : '?',\n os: info ? info.os || '?' : '?',\n activeRepo: this.state.systemConfig.common.activeRepo,\n uuid\n });\n\n if (checkNews && checkNews.length) {\n newsAdminDialogFunc(checkNews, lastNewsId?.val, this.state.themeName, this.state.themeType, this.state.theme, id =>\n this.socket.setState(`admin.${instance}.info.newsLastId`, { val: id, ack: true }));\n }\n })));\n }\n }\n\n } catch (error) {\n console.error(error);\n this.showAlert(error, 'error');\n }\n }\n\n renderSlowConnectionWarning() {\n if (!this.state.showSlowConnectionWarning) {\n return null;\n } else {\n return <SlowConnectionWarningDialog\n readTimeoutMs={this.state.readTimeoutMs}\n t={I18n.t}\n onClose={readTimeoutMs => {\n if (readTimeoutMs) {\n this.setState({showSlowConnectionWarning: false, readTimeoutMs}, () =>\n this.readRepoAndInstalledInfo(this.state.currentHost));\n } else {\n this.setState({showSlowConnectionWarning: false});\n }\n }}\n />;\n }\n }\n\n readRepoAndInstalledInfo = async (currentHost, hosts, update) => {\n hosts = hosts || this.state.hosts;\n let repository;\n let installed;\n\n return this.socket.getCompactRepository(currentHost, update, this.state.readTimeoutMs)\n .catch(e => {\n window.alert('Cannot getRepositoryCompact: ' + e);\n e.toString().includes('timeout') && this.setState({showSlowConnectionWarning: true});\n return {};\n })\n .then(_repository => {\n repository = _repository;\n return this.socket.getCompactInstalled(currentHost, update, this.state.readTimeoutMs)\n .catch(e => {\n window.alert('Cannot getInstalled: ' + e);\n e.toString().includes('timeout') && this.setState({showSlowConnectionWarning: true});\n return {};\n });\n })\n .then(_installed => {\n installed = _installed;\n return this.socket.getCompactAdapters(update)\n .catch(e => window.alert('Cannot read adapters: ' + e));\n })\n .then(adapters => {\n installed && adapters && Object.keys(adapters).forEach(id => {\n if (installed[id] && adapters[id].iv) {\n installed[id].ignoreVersion = adapters[id].iv;\n }\n });\n\n this.setState({ repository, installed, hosts, adapters });\n });\n }\n\n logsWorkerChanged = currentHost => {\n this.logsWorker && this.logsWorker.setCurrentHost(currentHost);\n }\n\n onHostStatusChanged = (id, state) => {\n const host = this.state.hosts.find(_id => id + '.alive' === id);\n if (host) {\n // TODO!! => update hostSelector\n console.log(`Current status ${id}: ${state?.val}`);\n }\n };\n\n subscribeOnHostsStatus(hosts) {\n hosts = hosts || this.state.hosts;\n hosts.forEach(item =>\n this.socket.subscribeState(item._id + '.alive', this.onHostStatusChanged));\n }\n\n unsubscribeOnHostsStatus() {\n this.state.hosts && this.socket && this.state.hosts.forEach(item =>\n this.socket.unsubscribeState(item._id + '.alive', this.onHostStatusChanged));\n }\n\n /**\n * Updates the current currentTab in the states\n */\n onHashChanged = el => {\n this.setState({\n currentTab: Router.getLocation()\n }, () => this.setCurrentTabTitle());\n }\n\n /**\n * Get the used port\n */\n getPort() {\n let port = parseInt(window.location.port, 10);\n\n if (isNaN(port)) {\n switch (this.getProtocol()) {\n case 'https:':\n port = 443;\n break;\n case 'http:':\n port = 80;\n break;\n default:\n break;\n }\n }\n\n if (!port || port === 3000) {\n port = 8081;\n }\n\n return port;\n }\n\n /**\n * Get the used protocol\n */\n getProtocol() {\n return window.location.protocol;\n }\n\n /**\n * Get a theme\n * @param {string} name Theme name\n * @returns {Theme}\n */\n createTheme(name) {\n return theme(Utils.getThemeName(name));\n }\n\n /**\n * Get the theme name\n * @param {Theme} theme Theme\n * @returns {string} Theme name\n */\n getThemeName(theme) {\n return theme.name;\n }\n\n /**\n * Get the theme type\n * @param {Theme} theme Theme\n * @returns {string} Theme type\n */\n getThemeType(theme) {\n return theme.palette.mode;\n }\n\n /**\n * Changes the current theme\n */\n toggleTheme = currentThemeName => {\n const themeName = this.state.themeName;\n\n const newThemeName = currentThemeName || Utils.toggleTheme(themeName);\n\n const theme = this.createTheme(newThemeName);\n\n this.setState({\n theme: theme,\n themeName: newThemeName,\n themeType: this.getThemeType(theme)\n }, () => {\n this.refConfigIframe?.contentWindow?.postMessage('updateTheme', '*');\n });\n }\n\n async onObjectChange(id, obj) {\n console.log('OBJECT: ' + id);\n if (obj) {\n this.setState(prevState => {\n const objects = prevState.objects;\n objects[id] = obj;\n\n return { objects };\n });\n } else {\n this.setState(prevState => {\n const objects = prevState.objects;\n delete objects[id];\n\n return { objects };\n });\n }\n }\n\n setCurrentTabTitle() {\n this.setTitle(this.state.currentTab.tab.replace('tab-', ''));\n }\n\n setTitle(title) {\n document.title = title + ' - ' + (this.state.currentHostName || 'ioBroker');\n }\n\n getCurrentTab() {\n if (this.state && this.state.currentTab && this.state.currentTab.tab) {\n if (this.state.currentTab.tab === 'tab-adapters') {\n const small = this.props.width === 'xs' || this.props.width === 'sm';\n const compact = !small && (this.state.drawerState === DrawerStates.compact);\n const opened = !small && (this.state.drawerState === DrawerStates.opened);\n const closed = small || (this.state.drawerState === DrawerStates.closed);\n\n return <Suspense fallback={<Connecting />}>\n <Adapters\n key={`adapters`}\n forceUpdateAdapters={this.state.forceUpdateAdapters}\n theme={this.state.theme}\n themeName={this.state.themeName}\n adaptersWorker={this.adaptersWorker}\n instancesWorker={this.instancesWorker}\n themeType={this.state.themeType}\n systemConfig={this.state.systemConfig}\n socket={this.socket}\n hosts={this.state.hosts}\n hostsWorker={this.hostsWorker}\n currentHost={this.state.currentHost}\n ready={this.state.ready}\n t={I18n.t}\n lang={I18n.getLanguage()}\n expertMode={this.state.expertMode}\n executeCommand={(cmd, cb) => this.executeCommand(cmd, cb)}\n commandRunning={this.state.commandRunning}\n onSetCommandRunning={commandRunning => this.setState({ commandRunning })}\n menuOpened={opened}\n menuClosed={closed}\n menuCompact={compact}\n adminGuiConfig={this.adminGuiConfig}\n toggleTranslation={this.toggleTranslation}\n noTranslation={this.state.noTranslation}\n />\n </Suspense>;\n } else if (this.state.currentTab.tab === 'tab-instances') {\n return <Suspense fallback={<Connecting />}>\n <Instances\n key=\"instances\"\n menuPadding={this.state.drawerState === DrawerStates.closed ? 0 : (this.state.drawerState === DrawerStates.opened ? DRAWER_FULL_WIDTH : DRAWER_COMPACT_WIDTH)}\n socket={this.socket}\n instancesWorker={this.instancesWorker}\n lang={I18n.getLanguage()}\n\n protocol={this.state.protocol}\n hostname={this.state.hostname}\n port={this.state.port}\n adminInstance={this.adminInstance}\n repository={this.state.repository}\n\n hosts={this.state.hosts}\n themeName={this.state.themeName}\n themeType={this.state.themeType}\n theme={this.state.theme}\n expertMode={this.state.expertMode}\n currentHost={this.state.currentHost}\n currentHostName={this.state.currentHostName}\n t={I18n.t}\n dateFormat={this.state.systemConfig.common.dateFormat}\n isFloatComma={this.state.systemConfig.common.isFloatComma}\n width={this.props.width}\n configStored={value => this.allStored(value)}\n executeCommand={(cmd, cb) => this.executeCommand(cmd, cb)}\n inBackgroundCommand={this.state.commandError || this.state.performed}\n\n onRegisterIframeRef={ref => this.refConfigIframe = ref}\n onUnregisterIframeRef={ref => {\n if (this.refConfigIframe === ref) {\n this.refConfigIframe = null;\n }\n }}\n />\n </Suspense>;\n } else if (this.state.currentTab.tab === 'tab-intro') {\n return <Suspense fallback={<Connecting />}>\n <Intro\n key=\"intro\"\n\n protocol={this.state.protocol}\n hostname={this.state.hostname}\n port={this.state.port}\n adminInstance={this.adminInstance}\n instancesWorker={this.instancesWorker}\n hostsWorker={this.hostsWorker}\n\n showAlert={(message, type) => this.showAlert(message, type)}\n socket={this.socket}\n t={I18n.t}\n lang={I18n.getLanguage()}\n />\n </Suspense>;\n } else if (this.state.currentTab.tab === 'tab-logs') {\n return <Suspense fallback={<Connecting />}>\n <Logs\n key=\"logs\"\n t={I18n.t}\n lang={this.state.lang}\n socket={this.socket}\n themeType={this.state.themeType}\n ready={this.state.ready}\n logsWorker={this.logsWorker}\n expertMode={this.state.expertMode}\n currentHost={this.state.currentHost}\n hostsWorker={this.hostsWorker}\n clearErrors={cb => this.clearLogErrors(cb)}\n />\n </Suspense>;\n } else if (this.state.currentTab.tab === 'tab-files') {\n return <Suspense fallback={<Connecting />}>\n <Files\n key=\"files\"\n ready={this.state.ready}\n t={I18n.t}\n expertMode={this.state.expertMode}\n lang={I18n.getLanguage()}\n socket={this.socket}\n themeName={this.state.themeName}\n themeType={this.state.themeType}\n />\n </Suspense>;\n } else if (this.state.currentTab.tab === 'tab-users') {\n return <Suspense fallback={<Connecting />}>\n <Users\n key=\"users\"\n ready={this.state.ready}\n t={I18n.t}\n expertMode={this.state.expertMode}\n lang={I18n.getLanguage()}\n socket={this.socket}\n themeType={this.state.themeType}\n />\n </Suspense>;\n } else if (this.state.currentTab.tab === 'tab-enums') {\n return <Suspense fallback={<Connecting />}>\n <Enums\n key=\"enums\"\n ready={this.state.ready}\n t={I18n.t}\n expertMode={this.state.expertMode}\n lang={I18n.getLanguage()}\n socket={this.socket}\n themeType={this.state.themeType}\n />\n </Suspense>;\n } else if (this.state.currentTab.tab === 'tab-objects') {\n return <Suspense fallback={<Connecting />}>\n <Objects\n key=\"objects\"\n t={I18n.t}\n theme={this.state.theme}\n themeName={this.state.themeName}\n themeType={this.state.themeType}\n expertMode={this.state.expertMode}\n objectsWorker={this.objectsWorker}\n lang={I18n.getLanguage()}\n socket={this.socket}\n dateFormat={this.state.systemConfig.common.dateFormat}\n isFloatComma={this.state.systemConfig.common.isFloatComma}\n />\n </Suspense>;\n } else if (this.state.currentTab.tab === 'tab-hosts') {\n return <Suspense fallback={<Connecting />}>\n <Hosts\n socket={this.socket}\n lang={I18n.getLanguage()}\n\n hostsWorker={this.hostsWorker}\n toggleTranslation={this.toggleTranslation}\n noTranslation={this.state.noTranslation}\n\n themeName={this.state.themeName}\n theme={this.state.theme}\n expertMode={this.state.expertMode}\n t={I18n.t}\n navigate={Router.doNavigate}\n currentHost={this.state.currentHost}\n executeCommand={(cmd, cb) => this.executeCommand(cmd, cb)}\n systemConfig={this.state.systemConfig}\n showAdaptersWarning={this.showAdaptersWarning}\n />\n </Suspense>;\n } else {\n const m = this.state.currentTab.tab.match(/^tab-([-\\w\\d]+)(-\\d+)?$/);\n if (m) {\n /*const adapter = m[1];\n const instance = m[2] ? parseInt(m[2], 10) : null;\n\n let link = tab.common.adminTab.link || '/adapter/' + tab.common.name + '/tab.html';\n if (tab.common.materializeTab) {\n link = tab.common.adminTab.link || '/adapter/' + tab.common.name + '/tab_m.html';\n }*/\n\n // /adapter/javascript/tab.html\n return <Suspense fallback={<Connecting />}>\n <CustomTab\n key={this.state.currentTab.tab}\n t={I18n.t}\n\n protocol={this.state.protocol}\n hostname={this.state.hostname}\n port={this.state.port}\n adminInstance={this.adminInstance}\n hosts={this.state.hosts}\n\n instancesWorker={this.instancesWorker}\n tab={this.state.currentTab.tab}\n themeName={this.state.themeName}\n expertMode={this.state.expertMode}\n lang={I18n.getLanguage()}\n onRegisterIframeRef={ref => this.refConfigIframe = ref}\n onUnregisterIframeRef={ref => {\n if (this.refConfigIframe === ref) {\n this.refConfigIframe = null;\n }\n }}\n />\n </Suspense>;\n }\n }\n }\n\n return null;\n }\n\n clearLogErrors = async () => {\n this.logsWorker.resetErrors();\n this.logsWorker.resetWarnings();\n }\n\n getCurrentDialog() {\n if (this.state && this.state.currentTab && this.state.currentTab.dialog) {\n if (this.state.currentTab.dialog === 'system') {\n return this.getSystemSettingsDialog();\n } else if (this.state.currentTab.dialog === 'discovery') {\n return this.getDiscoveryModal();\n }\n }\n return null;\n }\n\n getSystemSettingsDialog() {\n return <SystemSettingsDialog\n adminGuiConfig={this.adminGuiConfig}\n width={this.props.width}\n currentHost={this.state.currentHost}\n themeName={this.state.themeName}\n themeType={this.state.themeType}\n theme={this.state.theme}\n key=\"systemSettings\"\n onClose={() => Router.doNavigate(null)}\n lang={this.state.lang}\n showAlert={(message, type) => this.showAlert(message, type)}\n socket={this.socket}\n currentTab={this.state.currentTab}\n instance={this.state.instance}\n expertModeFunc={value => {\n (window._sessionStorage || window.sessionStorage).removeItem('App.expertMode');\n const systemConfig = JSON.parse(JSON.stringify(this.state.systemConfig));\n systemConfig.common.expertMode = value;\n this.setState({ expertMode: value, systemConfig });\n }}\n t={I18n.t}\n />;\n }\n\n handleAlertClose(event, reason) {\n if (reason === 'clickaway') {\n return;\n }\n\n this.setState({ alert: false });\n }\n\n showAlert(message, type) {\n if (type !== 'error' && type !== 'warning' && type !== 'info' && type !== 'success') {\n type = 'info';\n }\n\n this.setState({\n alert: true,\n alertType: type,\n alertMessage: message\n });\n }\n\n handleDrawerState(state) {\n (window._localStorage || window.localStorage).setItem('App.drawerState', state);\n this.setState({\n drawerState: state\n });\n }\n\n logout() {\n if (window.location.port === '3000') {\n window.location = `${window.location.protocol}//${window.location.hostname}:8081/logout?dev`;\n } else {\n window.location = `./logout?origin=${window.location.pathname}`;\n }\n }\n\n handleNavigation(tab) {\n if (tab) {\n if (this.state.allStored) {\n\n Router.doNavigate(tab);\n\n this.setState({ currentTab: Router.getLocation() });\n } else {\n this.setState({\n dataNotStoredDialog: true,\n dataNotStoredTab: tab\n });\n }\n }\n\n if (this.props.width === 'xs' || this.props.width === 'sm') {\n this.handleDrawerState(DrawerStates.closed);\n }\n\n tab = tab || (this.state.currentTab && this.state.currentTab.tab) || '';\n\n this.setTitle(tab.replace('tab-', ''));\n }\n\n allStored(value) {\n this.setState({\n allStored: value\n });\n };\n\n closeDataNotStoredDialog() {\n this.setState({ dataNotStoredDialog: false });\n }\n\n confirmDataNotStored() {\n this.setState({\n dataNotStoredDialog: false,\n allStored: true\n }, () => {\n this.handleNavigation(this.state.dataNotStoredTab);\n });\n }\n\n executeCommand(cmd, callback = false) {\n if (this.state.performed || this.state.commandError) {\n return this.setState({\n cmd: null,\n cmdDialog: false,\n commandError: false,\n performed: false,\n callback: false\n }, () => {\n this.setState({\n cmd,\n cmdDialog: true,\n callback\n });\n });\n } else {\n console.log('Execute: ' + cmd);\n this.setState({\n cmd,\n cmdDialog: true,\n callback\n });\n }\n }\n\n closeCmdDialog(cb) {\n this.setState({\n cmd: null,\n cmdDialog: false,\n commandError: false,\n performed: false,\n callback: false\n }, () => cb && cb());\n }\n\n renderWizardDialog() {\n if (this.state.wizard) {\n return <WizardDialog\n socket={this.socket}\n themeName={this.state.themeName}\n toggleTheme={this.toggleTheme}\n t={I18n.t}\n lang={I18n.getLanguage()}\n onClose={() =>\n this.setState({ wizard: false })}\n />;\n }\n }\n\n renderCommandDialog() {\n return this.state.cmd ?\n <CommandDialog\n onSetCommandRunning={commandRunning => this.setState({ commandRunning })}\n onClose={() =>\n this.closeCmdDialog(() =>\n this.setState({ commandRunning: false }))}\n visible={this.state.cmdDialog}\n callback={this.state.callback}\n header={I18n.t('Command')}\n onInBackground={() => this.setState({ cmdDialog: false })}\n cmd={this.state.cmd}\n errorFunc={() => this.setState({ commandError: true })}\n performed={() => this.setState({ performed: true })}\n inBackground={this.state.commandError || this.state.performed}\n commandError={this.state.commandError}\n socket={this.socket}\n currentHost={this.state.currentHost}\n ready={this.state.ready}\n t={I18n.t}\n /> : null;\n }\n\n renderLoggedUser() {\n if (this.state.user && this.props.width !== 'xs' && this.props.width !== 'sm') {\n return <div title={this.state.user.id} className={clsx(this.props.classes.userBadge, this.state.user.invertBackground && this.props.classes.userBackground)} ref={this.refUser}>\n {this.state.user.icon ?\n <Icon src={this.state.user.icon} className={this.props.classes.userIcon} />\n :\n <UserIcon className={this.props.classes.userIcon} />}\n <div ref={this.refUserDiv} style={{ color: this.state.user.color || undefined }} className={this.props.classes.userText}>{this.state.user.name}</div>\n </div>\n } else {\n return null;\n }\n }\n\n renderConfirmDialog() {\n /*return <ConfirmDialog\n onClose={() => this.closeDataNotStoredDialog()}\n open={this.state.dataNotStoredDialog}\n header={I18n.t('Please confirm')}\n onConfirm={() => this.confirmDataNotStored()}\n confirmText={I18n.t('Ok')}\n >\n {I18n.t('Some data are not stored. Discard?')}\n </ConfirmDialog>;*/\n return this.state.dataNotStoredDialog && <ConfirmDialog\n title={I18n.t('Please confirm')}\n text={I18n.t('Some data are not stored. Discard?')}\n ok={I18n.t('Ok')}\n cancel={I18n.t('Cancel')}\n onClose={isYes =>\n isYes ? this.confirmDataNotStored() : this.closeDataNotStoredDialog()}\n />;\n }\n\n render() {\n const { classes } = this.props;\n const small = this.props.width === 'xs' || this.props.width === 'sm';\n\n if (this.state.hasGlobalError) {\n const message = this.state.hasGlobalError.message;\n const stack = this.state.hasGlobalError.stack;\n\n return <div style={{textAlign: 'center', fontSize: 22, marginTop: 50, height: 'calc(100% - 50px)', overflow: 'auto'}}>\n <h1 style={{color: '#F00'}}>Error in GUI!</h1>\n Please open the browser console (F12), copy error text from there and create the issue on <a href=\"https://github.com/ioBroker/ioBroker.admin/issues\" target=\"_blank\" rel=\"noreferrer\">github</a><br/>\n Without this information it is not possible to analyse the error.<br/>\n It should looks like <br/>\n <img src=\"img/browserError.png\" alt=\"error\"/><br/>\n If in the second line you will see <code style={{style: '#888', fontFamily: 'monospace', fontSize: 16}}>at :3000/static/js/main.chunk.js:36903</code> and not the normal file name,<br/>\n please try to reproduce an error with opened browser console. In this case the special \"map\" files will be loaded and the developers can see the real name of functions and files.\n\n <div style={{color: '#F88', fontSize: 14, marginTop: 20}}>{message}</div>\n <pre style={{color: '#F88', fontSize: 12, fontFamily: 'monospace', textAlign: 'left', marginTop: 20, padding: 20}}>{(stack || '').split('\\n').join((line, i) => <div key={i}>{line}<br/></div>)}</pre>\n </div>;\n }\n\n if (this.state.login) {\n return <StyledEngineProvider injectFirst>\n <ThemeProvider theme={this.state.theme}>\n <Login t={I18n.t} />\n </ThemeProvider>\n </StyledEngineProvider>;\n } else\n if (!this.state.ready) {\n return <StyledEngineProvider injectFirst><ThemeProvider theme={this.state.theme}>\n {window.vendorPrefix === 'PT' ? <LoaderPT theme={this.state.themeType}/> :null}\n {window.vendorPrefix && window.vendorPrefix !== 'PT' && window.vendorPrefix !== '@@vendorPrefix@@' ? <LoaderVendor theme={this.state.themeType}/> :null}\n {!window.vendorPrefix || window.vendorPrefix === '@@vendorPrefix@@' ? <Loader theme={this.state.themeType} /> : null}\n </ThemeProvider></StyledEngineProvider>;\n } else if (this.state.strictEasyMode || this.state.currentTab.tab === 'easy') {\n return <StyledEngineProvider injectFirst><ThemeProvider theme={this.state.theme}><div>\n {!this.state.connected && <Connecting />}\n <Suspense fallback={<Connecting />}>\n <EasyMode\n navigate={Router.doNavigate}\n getLocation={Router.getLocation}\n location={this.state.currentTab}\n toggleTheme={this.toggleTheme}\n themeName={this.state.themeName}\n themeType={this.state.themeType}\n theme={this.state.theme}\n width={this.props.width}\n configs={this.state.easyModeConfigs}\n socket={this.socket}\n configStored={value => this.allStored(value)}\n isFloatComma={this.state.systemConfig?.common.isFloatComma}\n dateFormat={this.state.systemConfig?.common.dateFormat}\n systemConfig={this.state.systemConfig}\n t={I18n.t}\n lang={I18n.getLanguage()}\n onRegisterIframeRef={ref => this.refConfigIframe = ref}\n onUnregisterIframeRef={ref => {\n if (this.refConfigIframe === ref) {\n this.refConfigIframe = null;\n }\n }}\n />\n </Suspense>\n </div></ThemeProvider></StyledEngineProvider>;\n }\n\n const storedExpertMode = (window._sessionStorage || window.sessionStorage).getItem('App.expertMode');\n const expertModePermanent = !storedExpertMode || (storedExpertMode === 'true') === !!this.state.systemConfig.common.expertMode;\n\n return <StyledEngineProvider injectFirst><ThemeProvider theme={this.state.theme}>\n <Paper elevation={0} className={classes.root}>\n <AppBar\n color=\"default\"\n position=\"fixed\"\n className={clsx(\n classes.appBar,\n { [classes.appBarShift]: !small && this.state.drawerState === DrawerStates.opened },\n { [classes.appBarShiftCompact]: !small && this.state.drawerState === DrawerStates.compact }\n )}\n >\n <Toolbar>\n <IconButton size=\"large\"\n edge=\"start\"\n className={clsx(classes.menuButton, !small && this.state.drawerState !== DrawerStates.closed && classes.hide)}\n onClick={() => this.handleDrawerState(DrawerStates.opened)}\n >\n <MenuIcon />\n </IconButton>\n <div className={classes.wrapperButtons}>\n <IsVisible name=\"admin.appBar.discovery\" config={this.adminGuiConfig}>\n {this.state.discoveryAlive && <Tooltip title={I18n.t('Discovery devices')}>\n <IconButton size=\"large\" onClick={() => Router.doNavigate(null, 'discovery')}>\n <VisibilityIcon />\n </IconButton>\n </Tooltip>}\n </IsVisible>\n <IsVisible name=\"admin.appBar.systemSettings\" config={this.adminGuiConfig}>\n <Tooltip title={I18n.t('System settings')}>\n <IconButton size=\"large\" onClick={() => Router.doNavigate(null, 'system')}>\n <BuildIcon />\n </IconButton>\n </Tooltip>\n </IsVisible>\n <IsVisible name=\"admin.appBar.toggleTheme\" config={this.adminGuiConfig}>\n <ToggleThemeMenu\n size=\"large\"\n toggleTheme={this.toggleTheme}\n themeName={this.state.themeName}\n t={I18n.t} />\n </IsVisible>\n <IsVisible name=\"admin.appBar.expertMode\" config={this.adminGuiConfig}>\n <Tooltip\n title={`${I18n.t('Toggle expert mode')} ${expertModePermanent ? '' : ' (' + I18n.t('only in this browser session') + ')'}`}\n >\n <Badge\n color=\"secondary\"\n variant=\"dot\"\n classes={{badge: this.props.classes.expertBadge}}\n invisible={expertModePermanent}\n >\n <IconButton size=\"large\"\n onClick={() => {\n if (!!this.state.systemConfig.common.expertMode === !this.state.expertMode) {\n (window._sessionStorage || window.sessionStorage).setItem('App.expertMode', !this.state.expertMode);\n this.setState({ expertMode: !this.state.expertMode });\n this.refConfigIframe?.contentWindow?.postMessage('updateExpertMode', '*');\n } else {\n if ((window._sessionStorage || window.sessionStorage).getItem('App.doNotShowExpertDialog') === 'true') {\n (window._sessionStorage || window.sessionStorage).setItem('App.expertMode', !this.state.expertMode);\n this.setState({ expertMode: !this.state.expertMode });\n this.refConfigIframe?.contentWindow?.postMessage('updateExpertMode', '*');\n } else {\n expertModeDialogFunc(this.state.expertMode, this.state.themeType, this.state.theme, () => {\n (window._sessionStorage || window.sessionStorage).setItem('App.expertMode', !this.state.expertMode);\n this.setState({ expertMode: !this.state.expertMode });\n this.refConfigIframe?.contentWindow?.postMessage('updateExpertMode', '*');\n }, () => Router.doNavigate(null, 'system'));\n }\n }\n }}\n style={{ color: this.state.expertMode ? this.state.theme.palette.expert : undefined }}\n color=\"default\"\n >\n <ExpertIcon\n title={I18n.t('Toggle expert mode')}\n glowColor={this.state.theme.palette.secondary.main}\n active={this.state.expertMode}\n className={clsx(classes.expertIcon, this.state.expertMode && classes.expertIconActive)}\n />\n </IconButton>\n </Badge>\n </Tooltip>\n </IsVisible>\n {this.state.expertMode ? <Tooltip title={I18n.t('Synchronize admin settings between all opened browser windows')}>\n <IconButton\n size=\"large\"\n onClick={e => this.state.guiSettings ? this.enableGuiSettings(false) : this.setState({ showGuiSettings: e.target })}\n style={{ color: this.state.guiSettings ? this.state.theme.palette.expert : undefined }}\n >\n { this.state.guiSettings ? <SyncIcon /> : <SyncIconDisabled /> }\n </IconButton>\n </Tooltip> : null }\n <IsVisible name=\"admin.appBar.hostSelector\" config={this.adminGuiConfig}>\n <HostSelectors\n expertMode={this.state.expertMode}\n socket={this.socket}\n hostsWorker={this.hostsWorker}\n currentHost={this.state.currentHost}\n setCurrentHost={(hostName, host) => {\n this.setState({\n currentHostName: hostName,\n currentHost: host\n }, () => {\n this.logsWorkerChanged(host);\n (window._localStorage || window.localStorage).setItem('App.currentHost', host);\n\n this.readRepoAndInstalledInfo(host, this.state.hosts)\n .then(() =>\n // read notifications from host\n this.hostsWorker.getNotifications(host)\n .then(notifications => this.showAdaptersWarning(notifications, this.socket, host)));\n });\n }}\n disabled={\n this.state.currentTab.tab !== 'tab-instances' &&\n this.state.currentTab.tab !== 'tab-adapters' &&\n this.state.currentTab.tab !== 'tab-logs'\n }\n />\n </IsVisible>\n <div className={classes.flexGrow} />\n {this.state.cmd && !this.state.cmdDialog && <IconButton size=\"large\" onClick={() => this.setState({ cmdDialog: true })}>\n <PictureInPictureAltIcon className={this.state.commandError ? classes.errorCmd : this.state.performed ? classes.performed : classes.cmd} />\n </IconButton>}\n </div>\n\n {this.renderLoggedUser()}\n\n {this.state.drawerState !== 0 &&\n <Grid container className={clsx(this.state.drawerState !== 0 && classes.avatarVisible, classes.avatarNotVisible)} spacing={1} alignItems=\"center\">\n {(!this.state.user || this.props.width === 'xs' || this.props.width === 'sm') &&\n <Hidden xsDown>\n <div className={classes.wrapperName}>\n <Typography>admin</Typography>\n {!this.adminGuiConfig.icon && this.state.versionAdmin && <Typography className={classes.styleVersion} style={{color: this.state.themeType === 'dark' ? '#ffffff80' : '#00000080'}}>v{this.state.versionAdmin}</Typography>}\n </div>\n </Hidden>}\n <Grid item>\n <a href=\"/#easy\" onClick={event => event.preventDefault()} style={{ color: 'inherit', textDecoration: 'none' }}>\n {this.adminGuiConfig.icon ?\n <div style={{\n height: 50,\n withWidth: 102,\n lineHeight: '50px',\n background: 'white',\n borderRadius: 5,\n padding: 5}}\n ><img src={this.adminGuiConfig.icon} alt=\"logo\"\n style={{maxWidth: '100%', maxHeight: '100%'}}/></div>\n :\n <Avatar\n onClick={() => this.handleNavigation('easy')}\n className={clsx((this.state.themeName === 'colored' || this.state.themeName === 'blue') && classes.logoWhite)}\n alt=\"ioBroker\"\n src=\"img/no-image.png\"\n />\n }\n </a>\n </Grid>\n </Grid>\n }\n </Toolbar>\n </AppBar>\n <DndProvider backend={!small ? HTML5Backend : TouchBackend}>\n <Drawer\n adminGuiConfig={this.adminGuiConfig}\n state={this.state.drawerState}\n systemConfig={this.state.systemConfig}\n handleNavigation={name => this.handleNavigation(name)}\n onStateChange={state => this.handleDrawerState(state)}\n onLogout={() => this.logout()}\n currentTab={this.state.currentTab && this.state.currentTab.tab}\n instancesWorker={this.instancesWorker}\n hostsWorker={this.hostsWorker}\n logsWorker={this.logsWorker}\n logoutTitle={I18n.t('Logout')}\n isSecure={this.socket.isSecure}\n versionAdmin={this.state.versionAdmin}\n t={I18n.t}\n lang={I18n.getLanguage()}\n socket={this.socket}\n expertMode={this.state.expertMode}\n ready={this.state.ready}\n themeName={this.state.themeName}\n themeType={this.state.themeType}\n\n protocol={this.state.protocol}\n hostname={this.state.hostname}\n port={this.state.port}\n adminInstance={this.adminInstance}\n\n hosts={this.state.hosts}\n repository={this.state.repository}\n installed={this.state.installed}\n />\n </DndProvider>\n <Paper\n elevation={0}\n square\n className={\n clsx(classes.content, {\n [classes.contentMargin]: !small && this.state.drawerState !== DrawerStates.compact,\n [classes.contentMarginCompact]: !small && this.state.drawerState !== DrawerStates.opened,\n [classes.contentShift]: !small && this.state.drawerState !== DrawerStates.closed\n })\n }\n >\n {this.getCurrentTab()}\n </Paper>\n <Snackbar\n className={this.props.classes['alert_' + this.state.alertType]}\n open={this.state.alert}\n autoHideDuration={6000}\n onClose={() => this.handleAlertClose()}\n message={this.state.alertMessage}\n />\n </Paper>\n {this.getCurrentDialog()}\n {this.renderConfirmDialog()}\n {this.renderCommandDialog()}\n {this.renderWizardDialog()}\n {this.renderSlowConnectionWarning()}\n {!this.state.connected && <Connecting />}\n {this.state.showGuiSettings ? <Menu\n anchorEl={this.state.showGuiSettings}\n open={true}\n onClose={() => this.setState({ showGuiSettings: null })}\n >\n <MenuItem onClick={() => {\n this.setState({ showGuiSettings: null });\n this.enableGuiSettings(true)\n }}>{I18n.t('Use settings of other browsers')}</MenuItem>\n <MenuItem onClick={() => {\n this.setState({ showGuiSettings: null });\n this.enableGuiSettings(true, true);\n }}>{I18n.t('Use settings of this browser')}</MenuItem>\n <MenuItem onClick={() => this.setState({ showGuiSettings: null })}>\n <ListItemIcon><CancelIcon fontSize=\"small\" /></ListItemIcon>\n <ListItemText>{I18n.t('Cancel')}</ListItemText>\n </MenuItem>\n </Menu> : null}\n </ThemeProvider></StyledEngineProvider>;\n }\n}\n\nexport default withWidth()(withStyles(styles)(App));\n","// extracted by mini-css-extract-plugin\nexport default {};","import { createRoot } from 'react-dom/client';\nimport pack from '../package.json';\nimport { ThemeProvider, StyledEngineProvider } from '@mui/material/styles';\nimport * as Sentry from '@sentry/browser';\nimport * as SentryIntegrations from '@sentry/integrations';\n\nimport theme from '@iobroker/adapter-react-v5/Theme';\n// import Utils from '@iobroker/adapter-react-v5/Components/Utils';\nimport { Utils } from '@iobroker/adapter-react-v5';\nimport App from './App';\n\nimport './index.css';\nimport { ContextWrapperProvider } from './components/ContextWrapper';\nimport { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';\nimport { LocalizationProvider } from '@mui/x-date-pickers';\n\nwindow.adapterName = 'admin';\n\nconsole.log('iobroker.' + window.adapterName + '@' + pack.version);\nlet themeName = Utils.getThemeName();\n\nfunction build() {\n const container = document.getElementById('root');\n const root = createRoot(container);\n return root.render(\n <StyledEngineProvider injectFirst><ThemeProvider theme={theme(themeName)}>\n <LocalizationProvider dateAdapter={AdapterDateFns}>\n <ContextWrapperProvider>\n <App onThemeChange={_themeName => {\n themeName = _themeName;\n build();\n }} />\n </ContextWrapperProvider>\n </LocalizationProvider>\n </ThemeProvider>\n </StyledEngineProvider>\n );\n}\n\nconst versionChanged = [\n 'ChunkLoadError', // version was changed\n 'removeChild', // version was changed\n 'DOMException', // version was changed\n];\n\nconst ignoreErrors = [\n 'removeChild', // ignore errors that happen by changing the version\n 'getWidth', // echarts error\n 'safari-extension', // ignore safari extension errors\n 'this.animation', // echarts error\n 'No connection', // Ignore no connection errors\n 'notConnectedError', // Ignore no connection errors\n 'has no target', // Alias has no target\n 'ResizeObserver', // echarts error\n 'WorkerGlobalScope', // worker error\n 'generateKey', // ignore safari extension errors\n 'The operation is insecure.', // http => https access\n 'SyntaxError: An invalid or illegal string was specified', // No stack and no possibility to detect\n 'Can\\'t find variable: servConn', // Error from info adapter\n 'LPContentScriptFeatures', // ignore safari extension errors\n 'window.webkit.messageHandlers', // ignore safari extension errors\n];\n\nif (!window.disableDataReporting && window.location.port !== '3000') {\n Sentry.init({\n dsn: 'https://43643152dab3481db69950ba866ee9d6@sentry.iobroker.net/58',\n release: 'iobroker.' + window.adapterName + '@' + pack.version,\n integrations: [\n new SentryIntegrations.Dedupe()\n ],\n beforeSend(event) {\n // Modify the event here\n if (event && event.culprit &&\n versionChanged.find(error => event.culprit.includes(error))) {\n window.reload();\n } else if (event && event.culprit &&\n ignoreErrors.find(error => event.culprit.includes(error))) {\n return null;\n }\n return event;\n }\n });\n} else {\n window.onerror = function (error) {\n const errText = error.toString();\n if (errText && versionChanged.find(error => errText.includes(error))) {\n const message = error.message;\n const stack = error.stack;\n console.error('Try to detect admin version change:');\n console.error(message);\n console.error(JSON.stringify(stack, null, 2));\n window.reload();\n return;\n }\n throw error;\n }\n window.onunhandledrejection = function (error) {\n const errText = error.toString();\n if (errText && versionChanged.find(error => errText.includes(error))) {\n const message = error.message;\n const stack = error.stack;\n console.error('Try to detect admin version change:');\n console.error(message);\n console.error(JSON.stringify(stack, null, 2));\n window.reload();\n return;\n }\n throw error;\n }\n}\n\nbuild();\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport { amber, blue, red } from '@mui/material/colors';\n\nimport { Grid, LinearProgress, Paper, Switch, Typography } from '@mui/material';\n\nimport Router from '@iobroker/adapter-react-v5/Components/Router';\n\nimport Utils from '../Utils';\n\nconst styles = theme => ({\n log: {\n height: 400,\n width: 860,\n padding: theme.spacing(1),\n overflowY: 'auto'\n },\n logNoSpacing: {\n height: '100%',\n width: 'calc(100% - 8px)',\n marginLeft: 8,\n padding: theme.spacing(1),\n overflowY: 'auto'\n },\n error: {\n color: red[500]\n },\n info: {\n color: blue[500]\n },\n warn: {\n color: amber[500]\n }\n});\n\nclass Command extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n log: [`$ iobroker ${props.cmd || ''}`],\n init: false,\n max: null,\n value: null,\n progressText: '',\n moreChecked: true,\n stopped: false,\n };\n\n this.logRef = React.createRef();\n\n this.t = props.t;\n const pattern = ['error', 'warn', 'info'];\n this.regExp = new RegExp(pattern.join('|'), 'i');\n }\n\n componentDidMount() {\n if (this.props.ready && this.props.cmd) {\n console.log('STARTED: ' + this.props.cmd);\n this.executeCommand();\n }\n try {\n const closeOnReady = JSON.parse((window._localStorage || window.localStorage).getItem('CommandDialog.closeOnReady')) || false;\n this.setState({ closeOnReady });\n } catch (error) {\n this.setState({ closeOnReady: false });\n }\n }\n\n componentDidUpdate() {\n if (!this.state.init && this.props.ready && this.props.cmd) {\n this.executeCommand();\n }\n if (this.props.logsRead && JSON.stringify(this.props.logsRead) !== JSON.stringify(this.state.log)) {\n this.setState({ log: this.props.logsRead });\n }\n this.logRef.current?.scrollIntoView();\n }\n\n executeCommand() {\n this.setState({ init: true }, () => this.props.onSetCommandRunning(true));\n\n this.props.socket.registerCmdStdoutHandler(this.cmdStdoutHandler.bind(this));\n this.props.socket.registerCmdStderrHandler(this.cmdStderrHandler.bind(this));\n this.props.socket.registerCmdExitHandler(this.cmdExitHandler.bind(this));\n\n const activeCmdId = Math.floor(Math.random() * 0xFFFFFFE) + 1;\n\n this.setState({ activeCmdId });\n\n this.props.socket.cmdExec(this.props.currentHost, this.props.cmd, activeCmdId)\n .catch(error =>\n console.log(error));\n }\n\n cmdStdoutHandler(id, text) {\n if (this.state.activeCmdId && this.state.activeCmdId === id) {\n\n const log = this.state.log.slice();\n log.push(text);\n\n const upload = text.match(/^upload \\[(\\d+)]/);\n const gotAdmin = !upload ? text.match(/^got [-_:/\\\\.\\w\\d]+\\/admin$/) : null;\n const gotWww = !gotAdmin ? text.match(/^got [-_:/\\\\.\\w\\d]+\\/www$/) : null;\n\n let max = this.state.max;\n let value = null;\n let progressText = '';\n\n if (upload) {\n max = max || parseInt(upload[1], 10);\n value = parseInt(upload[1], 10);\n } else if (gotAdmin) {\n // upload of admin\n progressText = this.t('Upload admin started');\n max = null;\n } else if (gotWww) {\n // upload of www\n progressText = this.t('Upload www started');\n max = null;\n }\n\n this.setState({\n log,\n max,\n value,\n progressText\n });\n\n console.log('cmdStdout');\n }\n }\n\n cmdStderrHandler(id, text) {\n if (this.state.activeCmdId && this.state.activeCmdId === id) {\n\n const log = this.state.log.slice();\n log.push(text);\n\n this.setState({ log });\n\n console.log('cmdStderr');\n console.log(id);\n console.log(text);\n }\n }\n\n cmdExitHandler(id, exitCode) {\n if (this.state.activeCmdId && this.state.activeCmdId === id) {\n const log = this.state.log.slice();\n if (!window.document.hidden && exitCode === 0 && log.length && log[log.length - 1].endsWith('created') && this.props.callback) {\n const newArr = log[log.length - 1].split(' ');\n const adapter = newArr.find(el => el.startsWith('system'));\n if (adapter) {\n // it takes some time to creat the object\n setTimeout(_adapter => {\n this.props.socket.getObject(_adapter)\n .then(obj => {\n Utils.fixAdminUI(obj);\n obj && obj.common?.adminUI?.config !== 'none' && Router.doNavigate('tab-instances', 'config', _adapter);\n });\n }, 1000, adapter);\n }\n }\n log.push(`${exitCode !== 0 ? 'ERROR: ' : ''}Process exited with code ${exitCode}`);\n\n this.setState({ log, stopped: true }, () => {\n this.props.onSetCommandRunning(false);\n if (exitCode !== 0) {\n this.props.errorFunc && this.props.errorFunc(exitCode, this.state.log);\n } else {\n this.props.performed && this.props.performed();\n this.props.onFinished(exitCode, this.state.log);\n }\n console.log('cmdExit');\n console.log(id);\n console.log(exitCode);\n });\n }\n }\n\n colorize(text, maxLength) {\n if (maxLength !== undefined) {\n text = text.substring(0, maxLength);\n }\n\n if (text.search(this.regExp)) {\n const result = [];\n const { classes } = this.props;\n\n while (text.search(this.regExp) >= 0) {\n const [match] = text.match(this.regExp);\n const pos = text.search(this.regExp);\n\n if (pos > 0) {\n const part = text.substring(0, pos);\n const message = Utils.parseColorMessage(part);\n result.push(<span key={result.length}>{typeof message === 'object' ? message.parts.map((item, i) => <span key={i} style={item.style}>{item.text}</span>): message}</span>);\n text = text.replace(part, '');\n }\n\n const part = text.substr(0, match.length);\n if (part) {\n const message = Utils.parseColorMessage(part);\n result.push(<span key={result.length} className={classes[match.toLowerCase()]}>{typeof message === 'object' ? message.parts.map((item, i) => <span key={i} style={item.style}>{item.text}</span>): message}</span>);\n text = text.replace(part, '');\n }\n }\n\n if (text) {\n const message = Utils.parseColorMessage(text);\n result.push(<span key={result.length}>{typeof message === 'object' ? message.parts.map((item, i) => <span key={i} style={item.style}>{item.text}</span>): message}</span>);\n }\n\n return result;\n }\n\n return text;\n }\n\n getLog() {\n return this.state.log.map((value, index) => <Typography\n ref={index === this.state.log.length - 1 ? this.logRef : undefined}\n key={index}\n component=\"p\"\n variant=\"body2\"\n >\n {this.colorize(value)}\n </Typography>);\n }\n\n render() {\n const classes = this.props.classes;\n\n return <Grid\n style={this.props.noSpacing ? { height: '100%', width: '100%' } : {}}\n container\n direction=\"column\"\n spacing={this.props.noSpacing ? 0 : 2}\n >\n {this.props.showElement && <Grid item>\n {!this.state.stopped && <LinearProgress\n style={this.props.commandError ? { backgroundColor: '#f44336' } : null}\n variant={this.props.inBackground ? 'determinate' : 'indeterminate'}\n value={this.state.max && this.state.value ? 100 - Math.round((this.state.value / this.state.max) * 100) : this.props.commandError ? 0 : 100}\n />}\n </Grid>}\n <div style={{\n width: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: this.props.inBackground ? 'space-between' : 'flex-end'\n }}>\n <Typography\n style={this.props.inBackground ? {\n width: 'calc(100% - 180px)',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap'\n } : { display: 'none' }}\n component=\"div\"\n >\n {this.colorize(this.state.log[this.state.log.length - 1])}\n </Typography>\n {this.props.showElement && <Typography component=\"div\" style={{ width: 250 }}>\n <Grid component=\"label\" container alignItems=\"center\" spacing={1}>\n <Grid item>{this.props.t('less')}</Grid>\n <Grid item>\n <Switch\n checked={this.state.moreChecked}\n onChange={(event) => this.setState({ moreChecked: event.target.checked })}\n color=\"primary\"\n />\n </Grid>\n <Grid item>{this.props.t('more')}</Grid>\n </Grid>\n </Typography>}\n </div>\n <Grid item style={this.props.noSpacing ? { height: 'calc(100% - 45px)', width: '100%' } : {}}>\n {this.state.moreChecked && <Paper className={this.props.noSpacing ? classes.logNoSpacing : classes.log}>\n {this.getLog()}\n </Paper>}\n </Grid>\n </Grid>;\n }\n}\n\nCommand.defaultProps = {\n onSetCommandRunning: () => { },\n showElement: true\n};\n\nCommand.propTypes = {\n noSpacing: PropTypes.bool,\n currentHost: PropTypes.string.isRequired,\n callback: PropTypes.bool,\n socket: PropTypes.object.isRequired,\n onFinished: PropTypes.func.isRequired,\n ready: PropTypes.bool.isRequired,\n t: PropTypes.func.isRequired,\n inBackground: PropTypes.bool,\n commandError: PropTypes.bool,\n errorFunc: PropTypes.func,\n performed: PropTypes.func,\n cmd: PropTypes.string.isRequired,\n onSetCommandRunning: PropTypes.func.isRequired\n};\n\nexport default withStyles(styles)(Command);","import React, { useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\n\nimport Button from '@mui/material/Button';\nimport {Dialog, DialogActions, DialogContent, DialogTitle, IconButton, TextField} from '@mui/material';\nimport { withStyles } from '@mui/styles';\n\nimport CheckIcon from '@mui/icons-material/Check';\nimport CloseIcon from '@mui/icons-material/Close';\nimport LanguageIcon from '@mui/icons-material/Language';\n\nimport Utils from '@iobroker/adapter-react-v5/Components/Utils';\nimport I18n from '@iobroker/adapter-react-v5/i18n';\n\nconst styles = theme => ({\n modalDialog: {\n minWidth: 400,\n maxWidth: 800,\n },\n overflowHidden: {\n display: 'flex',\n overflow: 'hidden'\n },\n titleIcon: {\n marginRight: 5,\n },\n content: {\n fontSize: 16,\n },\n languageButton: {\n position: 'absolute',\n right: theme.spacing(1),\n top: theme.spacing(1)\n },\n languageButtonActive: {\n color: theme.palette.primary.main\n },\n});\n\nconst CustomModal = ({ toggleTranslation, noTranslation, title, fullWidth, help, maxWidth, progress, icon, applyDisabled, applyButton, classes, open, onClose, children, titleButtonApply, titleButtonClose, onApply, textInput, defaultValue, overflowHidden }) => {\n const [value, setValue] = useState(defaultValue);\n useEffect(() => {\n setValue(defaultValue);\n }, [defaultValue]);\n\n let Icon = null;\n\n if (icon) {\n Icon = icon;\n }\n\n return <Dialog\n open={open}\n maxWidth={maxWidth || 'md'}\n fullWidth={!!fullWidth}\n disableEscapeKeyDown={false}\n onClose={onClose}\n classes={{ paper: classes.modalDialog, /*paper: classes.background*/ }}\n >\n {title && <DialogTitle>\n {icon ? <Icon className={classes.titleIcon}/> : null}\n {title}\n {I18n.getLanguage() !== 'en' && toggleTranslation ? <IconButton\n size=\"large\"\n className={Utils.clsx(classes.languageButton, noTranslation && classes.languageButtonActive)}\n onClick={() => toggleTranslation()}\n title={I18n.t('Disable/Enable translation')}\n >\n <LanguageIcon />\n </IconButton> : null}\n </DialogTitle>}\n <DialogContent className={clsx(overflowHidden ? classes.overflowHidden : null, classes.content)} style={{ paddingTop: 8 }}>\n {textInput && <TextField\n // className={className}\n autoComplete=\"off\"\n fullWidth\n autoFocus\n variant=\"outlined\"\n size=\"medium\"\n // rows={10}\n multiline\n value={value}\n onChange={(e) => setValue(e.target.value)}\n // customValue\n />}\n {children}\n {help ? <div>{help}</div> : null}\n </DialogContent>\n <DialogActions>\n {applyButton && <Button\n startIcon={<CheckIcon/>}\n disabled={progress || (applyDisabled && defaultValue === value)}\n onClick={() => onApply(textInput ? value : '')}\n variant=\"contained\"\n color=\"primary\"\n >\n {I18n.t(titleButtonApply)}\n </Button>}\n <Button\n color=\"grey\"\n onClick={onClose}\n disabled={progress}\n variant=\"contained\"\n startIcon={<CloseIcon/>}\n >\n {I18n.t(titleButtonClose)}\n </Button>\n </DialogActions>\n </Dialog>;\n}\n\nCustomModal.defaultProps = {\n open: false,\n onApply: () => { },\n onClose: () => { },\n applyButton: true,\n applyDisabled: false,\n titleButtonClose: 'Cancel',\n titleButtonApply: 'Ok',\n overflowHidden: false,\n help: ''\n};\n\nCustomModal.propTypes = {\n icon: PropTypes.object,\n open: PropTypes.bool,\n onClose: PropTypes.func,\n children: PropTypes.any,\n titleButtonClose: PropTypes.string,\n titleButtonApply: PropTypes.string,\n onApply: PropTypes.func,\n fullWidth: PropTypes.bool,\n maxWidth: PropTypes.string,\n help: PropTypes.string,\n noTranslation: PropTypes.bool,\n toggleTranslation: PropTypes.func,\n};\n\nexport default withStyles(styles)(CustomModal);\n","import { Button, Menu, MenuItem, Tooltip } from '@mui/material';\nimport { makeStyles } from '@mui/styles';\nimport React, { useState, } from 'react';\n\nimport MaterialDynamicIcon from '../helpers/MaterialDynamicIcon';\n\nconst useStyles = makeStyles(theme => ({\n button: {\n marginLeft: 10,\n marginRight: 10\n },\n icon: {\n marginRight: 5\n }\n}));\n\nconst CustomSelectButton = ({ arrayItem, title, onClick, value, contained, buttonIcon, icons, t, translateSuffix, noTranslation }) => {\n const [anchorEl, setAnchorEl] = useState(null);\n translateSuffix = translateSuffix || '';\n const classes = useStyles();\n\n return <>\n <Tooltip title={title || ''}>\n <Button\n className={classes.button}\n variant={contained ? 'contained' : 'outlined'}\n color=\"primary\"\n onClick={e => setAnchorEl(e.currentTarget)}\n >\n {buttonIcon || (icons && <MaterialDynamicIcon objIconBool iconName={value} className={classes.icon} />)}{typeof value === 'number' ? value : (noTranslation ? value : t(value + translateSuffix))}\n </Button>\n </Tooltip>\n <Menu\n anchorEl={anchorEl}\n keepMounted\n open={Boolean(anchorEl)}\n onClose={() => setAnchorEl(null)}\n >\n {arrayItem.map(({ name }, idx) => {\n return <MenuItem\n key={name}\n selected={value ? name === value : value === 0 ? name === value : idx === 0}\n disabled={value ? name === value : value === 0 ? name === value : idx === 0}\n className={'tag-card-' + name}\n style={{ placeContent: 'space-between' }}\n value={name}\n onClick={e => {\n onClick(name);\n setAnchorEl(null);\n }}>\n {icons && <MaterialDynamicIcon objIconBool iconName={name} className={classes.icon} />}{typeof name === 'number' ? name : (noTranslation ? name : t(name + translateSuffix))}\n </MenuItem>\n })}\n </Menu>\n </>\n}\n\nCustomSelectButton.defaultProps = {\n icons: false,\n translateSuffix: '',\n};\n\nexport default CustomSelectButton;","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\n\nimport { Tooltip } from '@mui/material';\nimport { withStyles } from '@mui/styles';\nimport Button from '@mui/material/Button';\nimport Menu from '@mui/material/Menu';\nimport MenuItem from '@mui/material/MenuItem';\n\nimport I18n from '@iobroker/adapter-react-v5/i18n';\nimport Icon from '@iobroker/adapter-react-v5/Components/Icon';\nimport Utils from '@iobroker/adapter-react-v5/Components/Utils';\n\nconst styles = theme => ({\n img: {\n width: 30,\n height: 30,\n margin: 'auto 0',\n position: 'relative',\n marginRight: 10,\n borderRadius: 3,\n background: '#FFFFFF',\n padding: 2,\n '&:after': {\n content: '\"\"',\n position: 'absolute',\n zIndex: 2,\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n background: 'url(\"img/no-image.png\") 100% 100% no-repeat',\n backgroundSize: 'cover',\n backgroundColor: '#fff',\n }\n },\n notAlive: {\n opacity: 0.3\n },\n button: {\n maxWidth: 300,\n },\n name: {\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n },\n width: {\n width: '100%'\n },\n selector: {\n width: 15,\n display: 'inline-block'\n },\n '@media screen and (max-width: 710px)': {\n name: {\n display: 'none'\n },\n width: {\n width: 'auto'\n },\n imgButton: {\n marginRight: 0,\n }\n },\n tooltip: {\n pointerEvents: 'none',\n },\n});\n\nclass HostSelectors extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n anchorEl: null,\n alive: {},\n hosts: [],\n };\n }\n\n componentDidMount() {\n this.props.socket.getCompactHosts()\n .then(hosts => {\n this.setState({ hosts }, async () => {\n // request for all host the alive status\n const alive = {}\n for (let h = 0; h < hosts.length; h++) {\n alive[hosts[h]._id] = await this.props.socket.getState(hosts[h]._id + '.alive');\n if (alive[hosts[h]._id]) {\n alive[hosts[h]._id] = !!alive[hosts[h]._id].val;\n } else {\n alive[hosts[h]._id] = false;\n }\n }\n this.setState({alive}, () => {\n this.props.hostsWorker.registerHandler(this.onHostsObjectChange);\n this.props.hostsWorker.registerAliveHandler(this.onAliveChanged);\n });\n });\n })\n .catch(e => {\n window.alert('Cannot get hosts: ' + e);\n });\n }\n\n componentWillUnmount() {\n this.props.hostsWorker.unregisterHandler(this.onHostsObjectChange);\n this.props.hostsWorker.unregisterAliveHandler(this.onAliveChanged);\n }\n\n onAliveChanged = events => {\n const alive = JSON.parse(JSON.stringify(this.state.alive));\n let changed = false;\n events.forEach(event => {\n if (event.type === 'delete') {\n if (alive[event.id] !== undefined) {\n delete alive[event.id];\n changed = true;\n }\n } else if ((!!alive[event.id]) !== (!!event.alive)) {\n alive[event.id] = event.alive;\n changed = true;\n }\n });\n\n if (changed) {\n this.setState({ alive }, () => {\n if (!alive[this.props.currentHost]) {\n const aliveHost = Object.keys(alive).find(id => alive[id]);\n if (aliveHost) {\n const obj = this.state.hosts.find(obj => obj._id === aliveHost);\n if (obj) {\n this.props.setCurrentHost(obj.common?.name || aliveHost.replace('system.host.', ''), aliveHost);\n } else {\n this.props.setCurrentHost(aliveHost.replace('system.host.', ''), aliveHost);\n }\n }\n }\n });\n }\n };\n\n onHostsObjectChange = events => {\n const hosts = JSON.parse(JSON.stringify(this.state.hosts));\n const alive = JSON.parse(JSON.stringify(this.state.alive));\n let changed = false;\n\n Promise.all(events.map(async event => {\n const host = hosts.find(it => it._id === event.id);\n\n if (event.type === 'delete' || !event.obj) {\n if (host) {\n const pos = hosts.indexOf(host);\n if (pos !== -1) {\n delete alive[host];\n hosts.splice(pos);\n changed = true;\n }\n }\n } else {\n if (host) {\n if (host.common.name !== event.obj.common?.name) {\n host.common.name = event.obj.common?.name || '';\n changed = true;\n }\n if (host.common.color !== event.obj.common?.color) {\n host.common.color = event.obj.common?.color || '';\n changed = true;\n }\n if (host.common.icon !== event.obj.common?.icon) {\n host.common.icon = event.obj.common?.icon || '';\n changed = true;\n }\n } else {\n changed = true;\n hosts.push({\n _id: event.id,\n common: {\n name: event.obj.common?.name || '',\n color: event.obj.common?.color || '',\n icon: event.obj.common?.icon || '',\n }\n });\n const state = await this.props.socket.getState(event.id + '.alive');\n alive[event.id] = state ? state.val : false;\n }\n }\n }))\n .then(() => {\n if (changed) {\n this.setState({ hosts, alive }, () => {\n if (!alive[this.props.currentHost]) {\n const aliveHost = Object.keys(alive).find(id => alive[id]);\n if (aliveHost) {\n const obj = this.state.hosts.find(obj => obj._id === aliveHost);\n if (obj) {\n this.props.setCurrentHost(obj.common?.name || aliveHost.replace('system.host.', ''), aliveHost);\n } else {\n this.props.setCurrentHost(aliveHost.replace('system.host.', ''), aliveHost);\n }\n }\n }\n });\n }\n });\n };\n\n render() {\n if (!this.props.expertMode && this.state.hosts.length < 2) {\n return null;\n }\n let selectedHostObj;\n if (this.state.hosts.length) {\n selectedHostObj = this.state.hosts.find(host => host._id === this.props.currentHost || host._id === 'system.host.' + this.props.currentHost);\n }\n\n return <div>\n <Tooltip title={this.props.tooltip || I18n.t('Change current host')} classes={{ popper: this.props.classes.tooltip }}>\n <span>\n <Button\n color=\"grey\"\n className={this.props.classes.button}\n style={{\n background: selectedHostObj?.common?.color || 'none',\n borderColor: selectedHostObj?.common?.color ? Utils.invertColor(selectedHostObj.common.color) : 'none'\n }}\n variant={this.props.disabled || this.state.hosts.length < 2 ? 'text' : 'outlined'}\n disabled={this.props.disabled || this.state.hosts.length < 2}\n aria-haspopup=\"true\"\n onClick={e => this.setState({anchorEl: e.currentTarget})}\n >\n <div\n className={clsx(this.props.classes.width, !this.state.alive[this.props.currentHost] && this.props.classes.notAlive)}\n style={{\n display: 'flex',\n color: selectedHostObj?.common?.color ? Utils.invertColor(selectedHostObj.common.color, true) : 'none',\n alignItems: 'center',\n }}>\n <Icon\n className={clsx(this.props.classes.img, this.props.classes.imgButton)}\n src={selectedHostObj?.common?.icon || 'img/no-image.png'}\n />\n <div className={this.props.classes.name}>{selectedHostObj?.common?.name}</div>\n </div>\n </Button>\n </span>\n </Tooltip>\n <Menu\n anchorEl={this.state.anchorEl}\n keepMounted\n open={!!this.state.anchorEl}\n onClose={() => this.setState({anchorEl: null})}\n >\n {this.state.hosts.map(({ _id, common: { name, icon, color } }, idx) =>\n <MenuItem\n key={_id}\n // button\n disabled={!this.state.alive[_id]}\n selected={_id === this.props.currentHost}\n style={{ background: color || 'inherit' }}\n onClick={() => {\n if (this.props.currentHost !== this.state.hosts[idx]._id) {\n this.props.setCurrentHost(this.state.hosts[idx].common.name, this.state.hosts[idx]._id);\n }\n this.setState({anchorEl: null});\n }}>\n <div style={{\n display: 'flex',\n color: (color && Utils.invertColor(color, true)) || 'inherit',\n alignItems: 'center',\n }}>\n <div className={this.props.classes.selector}>{_id === this.props.currentHost ? 'ᐅ' : ''}</div>\n <Icon className={this.props.classes.img} src={icon || 'img/no-image.png'} />\n {name}\n </div>\n </MenuItem>\n )}\n </Menu>\n </div>;\n }\n}\n\nHostSelectors.propTypes = {\n disabled: PropTypes.bool,\n socket: PropTypes.object,\n currentHost: PropTypes.string.isRequired,\n hostsWorker: PropTypes.object,\n expertMode: PropTypes.bool,\n setCurrentHost: PropTypes.func.isRequired,\n tooltip: PropTypes.string,\n};\n\nexport default withStyles(styles)(HostSelectors);","import PropTypes from 'prop-types';\n\nfunction getAttr(obj, attr) {\n if (!obj) {\n return null;\n }\n if (typeof attr !== 'object') {\n attr = attr.split('.');\n }\n const att = attr.shift();\n let val = obj[att];\n if (!attr.length) {\n return val;\n } else if (typeof val === 'object') {\n return getAttr(val, attr);\n } else {\n return null;\n }\n}\n\nfunction IsVisible(props) {\n const { config, children, name, value } = props;\n\n if (value !== undefined) {\n return value === false ? null : children;\n } else\n if (!config) {\n return children;\n } else if (getAttr(config, name) !== false) {\n return children;\n } else {\n return null;\n }\n}\n\nIsVisible.propTypes = {\n name: PropTypes.string,\n config: PropTypes.object,\n value: PropTypes.bool,\n};\n\nexport default IsVisible;","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport Grid from '@mui/material/Grid';\nimport Button from '@mui/material/Button';\n\nimport IconInfo from '@mui/icons-material/Info';\nimport IconWarning from '@mui/icons-material/Warning';\nimport IconError from '@mui/icons-material/Error';\n\nimport I18n from '@iobroker/adapter-react-v5/i18n';\nimport Utils from '@iobroker/adapter-react-v5/Components/Utils';\nimport ConfirmDialog from '@iobroker/adapter-react-v5/Dialogs/Confirm';\n\nclass ConfigGeneric extends Component {\n static DIFFERENT_VALUE = '__different__';\n static DIFFERENT_LABEL = 'ra___different__';\n static NONE_VALUE = '';\n static NONE_LABEL = 'ra_none';\n static AsyncFunction = Object.getPrototypeOf(async function(){}).constructor;\n\n constructor(props) {\n super(props);\n\n this.state = {\n confirmDialog: false,\n confirmNewValue: null,\n confirmAttr: null,\n confirmData: null,\n };\n\n this.isError = {};\n\n if (this.props.schema) {\n if (this.props.custom) {\n this.defaultValue = this.props.schema.defaultFunc ? this.executeCustom(this.props.schema.defaultFunc, this.props.schema.default, this.props.data, this.props.instanceObj, this.props.arrayIndex, this.props.globalData) : this.props.schema.default;\n } else {\n this.defaultValue = this.props.schema.defaultFunc ? this.execute(this.props.schema.defaultFunc, this.props.schema.default, this.props.data, this.props.arrayIndex, this.props.globalData) : this.props.schema.default;\n }\n }\n\n this.lang = I18n.getLanguage();\n }\n\n componentDidMount() {\n this.props.registerOnForceUpdate && this.props.registerOnForceUpdate(this.props.attr, this.onUpdate);\n const LIKE_SELECT = ['select', 'autocomplete', 'autocompleteSendTo'];\n // init default value\n if (this.defaultValue !== undefined) {\n const value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n if (value === undefined || (LIKE_SELECT.includes(this.props.schema.type) && (value === '' || value === null))) {\n setTimeout(() => {\n if (this.props.custom) {\n this.props.onChange(this.props.attr, this.defaultValue, () =>\n this.props.forceUpdate([this.props.attr], this.props.data));\n //this.onChange(this.props.attr, this.defaultValue);\n } else {\n ConfigGeneric.setValue(this.props.data, this.props.attr, this.defaultValue);\n this.props.onChange(this.props.data, undefined, () =>\n this.props.forceUpdate([this.props.attr], this.props.data));\n }\n }, 100);\n }\n } else if (this.props.schema.defaultSendTo) {\n this.sendTo();\n }\n }\n\n sendTo() {\n if (this.props.alive) {\n this.defaultSendToDone = true;\n let data = this.props.schema.data;\n if (data === undefined && this.props.schema.jsonData) {\n data = this.getPattern(this.props.schema.jsonData);\n try {\n data = JSON.parse(data);\n } catch (e) {\n console.error('Cannot parse json data: ' + data);\n }\n } else {\n data = {\n attr: this.props.attr,\n value: ConfigGeneric.getValue(this.props.data, this.props.attr),\n };\n }\n\n if (data === undefined) {\n data = null;\n }\n\n this.props.socket.sendTo(`${this.props.adapterName}.${this.props.instance}`, this.props.schema.defaultSendTo, data)\n .then(value => {\n if (value !== null && value !== undefined) {\n if (this.props.custom) {\n this.props.onChange(this.props.attr, value, () =>\n this.props.forceUpdate([this.props.attr], this.props.data));\n //this.onChange(this.props.attr, this.defaultValue);\n } else {\n ConfigGeneric.setValue(this.props.data, this.props.attr, value);\n this.props.onChange(this.props.data, undefined, () =>\n this.props.forceUpdate([this.props.attr], this.props.data));\n }\n }\n });\n } else {\n this.defaultSendToDone = false;\n // show error, that instance does not started\n this.onError(this.props.attr, I18n.t('ra_Instance %s is not alive', this.props.instance));\n }\n }\n\n componentWillUnmount() {\n this.props.registerOnForceUpdate && this.props.registerOnForceUpdate(this.props.attr)\n if (this.sendToTimeout) {\n clearTimeout(this.sendToTimeout);\n this.sendToTimeout = null;\n }\n }\n\n onUpdate = data => {\n const value = ConfigGeneric.getValue(data || this.props.data, this.props.attr) || '';\n if (this.state.value !== value) {\n this.setState({ value });\n } else {\n this.forceUpdate();\n }\n }\n\n static getValue(data, attr) {\n if (typeof attr === 'string') {\n return ConfigGeneric.getValue(data, attr.split('.'));\n } else {\n if (attr.length === 1) {\n return data[attr[0]];\n } else {\n const part = attr.shift();\n if (typeof data[part] === 'object') {\n return ConfigGeneric.getValue(data[part], attr);\n } else {\n return null;\n }\n }\n }\n }\n\n static setValue(data, attr, value) {\n if (typeof attr === 'string') {\n return ConfigGeneric.setValue(data, attr.split('.'), value);\n } else {\n if (attr.length === 1) {\n if (value === null) {\n delete data[attr[0]];\n } else {\n data[attr[0]] = value;\n }\n } else {\n const part = attr.shift();\n if (!data[part] || typeof data[part] === 'object') {\n data[part] = data[part] || {};\n }\n return ConfigGeneric.setValue(data[part], attr, value);\n }\n }\n }\n\n getText(text, noTranslation) {\n if (!text) {\n return '';\n }\n\n if (typeof text === 'string') {\n text = noTranslation ? text : I18n.t(text);\n if (text.includes('${')) {\n return this.getPattern(text);\n } else {\n return text;\n }\n } else if (text && typeof text === 'object') {\n if (text.func) {\n // calculate pattern\n if (typeof text.func === 'object') {\n return this.getPattern(text.func[this.lang] || text.func.en || '');\n } else {\n this.getPattern(text.func);\n }\n } else {\n return text[this.lang] || text.en || '';\n }\n }\n }\n\n renderConfirmDialog() {\n if (!this.state.confirmDialog) {\n return null;\n }\n const confirm = this.state.confirmData || this.props.schema.confirm;\n let icon = null;\n if (confirm.type === 'warning') {\n icon = <IconWarning />;\n } else if (confirm.type === 'error') {\n icon = <IconError />;\n } else if (confirm.type === 'info') {\n icon = <IconInfo />;\n }\n\n return <ConfirmDialog\n title={ this.getText(confirm.title) || I18n.t('ra_Please confirm') }\n text={ this.getText(confirm.text) }\n ok={ this.getText(confirm.ok) || I18n.t('ra_Ok') }\n cancel={ this.getText(confirm.cancel) || I18n.t('ra_Cancel') }\n icon={icon}\n onClose={isOk =>\n this.setState({ confirmDialog: false}, () => {\n if (isOk) {\n const data = JSON.parse(JSON.stringify(this.props.data));\n if (this.state.confirmDepAttr) {\n ConfigGeneric.setValue(data, this.state.confirmDepAttr, this.state.confirmDepNewValue);\n }\n\n ConfigGeneric.setValue(data, this.state.confirmAttr, this.state.confirmNewValue);\n this.setState({confirmDialog: false, confirmDepAttr: null, confirmDepNewValue: null, confirmNewValue: null, confirmAttr: null, confirmOldValue: null, confirmData: null}, () =>\n this.props.onChange(data));\n } else {\n this.setState({confirmDialog: false, confirmDepAttr: null, confirmDepNewValue: null, confirmNewValue: null, confirmAttr: null, confirmOldValue: null, confirmData: null});\n }\n })\n }\n />;\n }\n\n onChange(attr, newValue) {\n const data = JSON.parse(JSON.stringify(this.props.data));\n ConfigGeneric.setValue(data, attr, newValue);\n\n if (this.props.schema.confirm && this.execute(this.props.schema.confirm.condition, false, data, this.props.arrayIndex, this.props.globalData)) {\n return this.setState({\n confirmDialog: true,\n confirmNewValue: newValue,\n confirmAttr: attr,\n confirmData: null,\n });\n } else {\n // find any inputs with confirmation\n if (this.props.schema.confirmDependsOn) {\n for (let z = 0; z < this.props.schema.confirmDependsOn.length; z++) {\n const dep = this.props.schema.confirmDependsOn[z];\n if (dep.confirm) {\n const val = ConfigGeneric.getValue(data, dep.attr);\n\n if (this.execute(dep.confirm.condition, false, data, this.props.arrayIndex, this.props.globalData)) {\n return this.setState({\n confirmDialog: true,\n confirmNewValue: newValue,\n confirmAttr: attr,\n confirmDepNewValue: val,\n confirmDepAttr: dep.attr,\n confirmData: dep.confirm,\n });\n }\n }\n }\n }\n\n const changed = [];\n if (this.props.schema.onChangeDependsOn) {\n for (let z = 0; z < this.props.schema.onChangeDependsOn.length; z++) {\n const dep = this.props.schema.onChangeDependsOn[z];\n if (dep.onChange) {\n const val = ConfigGeneric.getValue(data, dep.attr);\n\n const newValue = this.props.custom ?\n this.executeCustom(dep.onChange.calculateFunc, data, this.props.customObj, this.props.instanceObj, this.props.arrayIndex, this.props.globalData)\n :\n this.execute(dep.onChange.calculateFunc, val, data, this.props.arrayIndex, this.props.globalData);\n\n if (newValue !== val) {\n ConfigGeneric.setValue(data, dep.attr, newValue);\n changed.push(dep.attr);\n }\n }\n }\n }\n\n if (this.props.schema.hiddenDependsOn) {\n for (let z = 0; z < this.props.schema.hiddenDependsOn.length; z++) {\n const dep = this.props.schema.hiddenDependsOn[z];\n dep.hidden && changed.push(dep.attr);\n }\n }\n\n if (this.props.schema.labelDependsOn) {\n for (let z = 0; z < this.props.schema.labelDependsOn.length; z++) {\n const dep = this.props.schema.labelDependsOn[z];\n dep.hidden && changed.push(dep.attr);\n }\n }\n\n if (this.props.schema.helpDependsOn) {\n for (let z = 0; z < this.props.schema.helpDependsOn.length; z++) {\n const dep = this.props.schema.helpDependsOn[z];\n dep.hidden && changed.push(dep.attr);\n }\n }\n\n if (this.props.schema.onChange && !this.props.schema.onChange.ignoreOwnChanges) {\n const val = ConfigGeneric.getValue(data, this.props.attr);\n\n const newValue = this.props.custom ?\n this.executeCustom(this.props.schema.onChange.calculateFunc, data, this.props.customObj, this.props.instanceObj, this.props.arrayIndex, this.props.globalData)\n :\n this.execute(this.props.schema.onChange.calculateFunc, val, data, this.props.arrayIndex, this.props.globalData);\n if (newValue !== val) {\n ConfigGeneric.setValue(data, this.props.attr, newValue);\n }\n }\n\n if (this.props.custom) {\n this.props.onChange(attr, newValue);\n\n changed && changed.length && changed.forEach((_attr, i) =>\n setTimeout(() => this.props.onChange(_attr, ConfigGeneric.getValue(data, attr)), i * 50));\n } else {\n this.props.onChange(data, undefined, () =>\n changed.length && this.props.forceUpdate(changed, data));\n }\n }\n }\n\n execute(func, defaultValue, data, arrayIndex, globalData) {\n if (func && typeof func === 'object') {\n func = func.func;\n }\n\n if (!func) {\n return defaultValue;\n } else {\n try {\n // eslint-disable-next-line no-new-func\n const f = new Function('data', 'originalData', '_system', '_alive', '_common', '_socket', '_instance', 'arrayIndex', 'globalData', func.includes('return') ? func : 'return ' + func);\n const result = f(data || this.props.data, this.props.originalData, this.props.systemConfig, this.props.alive, this.props.common, this.props.socket, this.props.instance, arrayIndex, globalData);\n // console.log(result);\n return result;\n } catch (e) {\n console.error(`Cannot execute ${func}: ${e}`);\n return defaultValue;\n }\n }\n }\n\n executeCustom(func, data, customObj, instanceObj, arrayIndex, globalData) {\n if (func && typeof func === 'object') {\n func = func.func;\n }\n\n if (!func) {\n return null;\n } else {\n try {\n // eslint-disable-next-line no-new-func\n const f = new Function('data', 'originalData', '_system', 'instanceObj', 'customObj', '_socket', 'arrayIndex', 'globalData', func.includes('return') ? func : 'return ' + func);\n const result = f(data || this.props.data, this.props.originalData, this.props.systemConfig, instanceObj, customObj, this.props.socket, arrayIndex, globalData);\n console.log(result);\n return result;\n } catch (e) {\n console.error(`Cannot execute ${func}: ${e}`);\n return null;\n }\n }\n }\n\n calculate(schema) {\n let error;\n let disabled;\n let hidden;\n let defaultValue;\n\n if (this.props.custom) {\n error = schema.validator ? !this.executeCustom(schema.validator, this.props.data, this.props.customObj, this.props.instanceObj, this.props.arrayIndex, this.props.globalData) : false;\n disabled = schema.disabled ? this.executeCustom(schema.disabled, this.props.data, this.props.customObj, this.props.instanceObj, this.props.arrayIndex, this.props.globalData) : false;\n hidden = schema.hidden ? this.executeCustom(schema.hidden, this.props.data, this.props.customObj, this.props.instanceObj, this.props.arrayIndex, this.props.globalData) : false;\n defaultValue = schema.defaultFunc ? this.executeCustom(schema.defaultFunc, this.props.data, this.props.customObj, this.props.instanceObj, this.props.arrayIndex, this.props.globalData) : schema.default;\n } else {\n error = schema.validator ? !this.execute(schema.validator, false, this.props.data, this.props.arrayIndex, this.props.globalData) : false;\n disabled = schema.disabled ? this.execute(schema.disabled, false, this.props.data, this.props.arrayIndex, this.props.globalData) : false;\n hidden = schema.hidden ? this.execute(schema.hidden, false, this.props.data, this.props.arrayIndex, this.props.globalData) : false;\n defaultValue = schema.defaultFunc ? this.execute(schema.defaultFunc, schema.default, this.props.data, this.props.arrayIndex, this.props.globalData) : schema.default;\n }\n\n return { error, disabled, hidden, defaultValue };\n }\n\n onError(attr, error) {\n if (!error) {\n delete this.isError[attr];\n } else {\n this.isError[attr] = error;\n }\n\n this.props.onError && this.props.onError(attr, error);\n }\n\n renderItem(error, disabled, defaultValue) {\n return this.getText(this.props.schema.label) || this.getText(this.props.schema.text)\n }\n\n renderHelp(text, link, noTranslation) {\n if (!link) {\n text = this.getText(text, noTranslation) || '';\n if (text && text.includes('<a ')) {\n return Utils.renderTextWithA(text);\n } else {\n return text;\n }\n } else {\n return <a\n href={link}\n target=\"_blank\"\n rel=\"noreferrer\"\n style={{color: this.props.themeType === 'dark' ? '#eee' : '#111'}}\n >{this.getText(text, noTranslation)}</a>;\n }\n }\n\n getPattern(pattern) {\n if (!pattern) {\n return '';\n } else {\n if (typeof pattern === 'object') {\n pattern = pattern.func;\n }\n\n try {\n if (this.props.custom) {\n // eslint-disable-next-line no-new-func\n const f = new Function('data', 'originalData', '_system', 'instanceObj', 'customObj', '_socket', 'return `' + pattern.replace(/`/g, '\\\\`') + '`');\n const result = f(this.props.data, this.props.originalData, this.props.systemConfig, this.props.instanceObj, this.props.customObj, this.props.socket);\n return result;\n } else {\n // eslint-disable-next-line no-new-func\n const f = new Function('data', 'originalData', '_system', '_alive', '_common', '_socket', 'return `' + pattern.replace(/`/g, '\\\\`') + '`');\n return f(this.props.data, this.props.originalData, this.props.systemConfig, this.props.alive, this.props.common, this.props.socket);\n }\n } catch (e) {\n console.error(`Cannot execute ${pattern}: ${e}`);\n return pattern;\n }\n }\n }\n\n render() {\n const schema = this.props.schema;\n\n if (!schema) {\n return null;\n }\n\n if (this.props.alive && this.defaultSendToDone === false) {\n this.sendToTimeout = setTimeout(() => {this.sendToTimeout = null; this.sendTo();}, 200);\n }\n\n const { error, disabled, hidden, defaultValue } = this.calculate(schema);\n\n if (hidden) {\n // Remove all errors if element is hidden\n if (Object.keys(this.isError).length) {\n setTimeout(isError =>\n Object.keys(isError).forEach(attr => this.props.onError(attr)),\n 100, JSON.parse(JSON.stringify(this.isError)));\n this.isError = {};\n }\n\n if (schema.hideOnlyControl) {\n const item = <Grid\n item\n xs={schema.xs || undefined}\n lg={schema.lg || undefined}\n md={schema.md || undefined}\n sm={schema.sm || undefined}\n style={Object.assign(\n {},\n {marginBottom: 0, /*marginRight: 8, */textAlign: 'left'},\n schema.style,\n this.props.themeType === 'dark' ? schema.darkStyle : {}\n )}\n />;\n\n if (schema.newLine) {\n return <>\n <div style={{flexBasis: '100%', height: 0}} />\n {item}\n </>;\n } else {\n return item;\n }\n } else {\n return null;\n }\n } else {\n // Add error\n if (schema.validatorNoSaveOnError) {\n if (error && !Object.keys(this.isError).length) {\n this.isError = {[this.props.attr]: schema.validatorErrorText ? I18n.t(schema.validatorErrorText) : true};\n setTimeout(isError =>\n Object.keys(isError).forEach(attr => this.props.onError(attr, isError[attr])),\n 100, JSON.parse(JSON.stringify(this.isError)));\n } else if (!error && Object.keys(this.isError).length) {\n setTimeout(isError =>\n Object.keys(isError).forEach(attr => this.props.onError(attr)),\n 100, JSON.parse(JSON.stringify(this.isError)));\n this.isError = {};\n }\n }\n\n const renderedItem = this.renderItem(error, disabled || this.props.commandRunning || this.props.disabled, defaultValue);\n\n const item = <Grid\n item\n title={this.getText(schema.tooltip)}\n xs={schema.xs || undefined}\n lg={schema.lg || undefined}\n md={schema.md || undefined}\n sm={schema.sm || undefined}\n style={Object.assign({}, {\n marginBottom: 0,\n // marginRight: 8,\n textAlign: 'left',\n width: schema.type === 'divider' || schema.type === 'header' ? schema.width || '100%' : undefined\n }, schema.style, this.props.themeType === 'dark' ? schema.darkStyle : {})}>\n { this.props.schema.defaultSendTo && this.props.schema.button ? <Grid container style={{ width: '100%' }}>\n <Grid item flex={1}>{renderedItem}</Grid>\n <Grid item><Button\n variant=\"outlined\"\n onClick={() => this.sendTo()}\n title={this.props.schema.buttonTooltip ? this.getText(this.props.schema.buttonTooltip, this.props.schema.buttonTooltipNoTranslation) : I18n.t('ra_Request data by instance')}\n >{this.getText(this.props.schema.button)}</Button></Grid>\n </Grid>\n :\n renderedItem\n }\n </Grid>;\n\n if (schema.newLine) {\n return <>\n <div style={{flexBasis: '100%', height: 0}} />\n {this.renderConfirmDialog()}\n {item}\n </>;\n } else {\n if (this.state.confirmDialog) {\n return <>\n {this.renderConfirmDialog()}\n {item}\n </>;\n } else {\n return item;\n }\n }\n }\n }\n}\n\nConfigGeneric.propTypes = {\n socket: PropTypes.object.isRequired,\n data: PropTypes.object,\n originalData: PropTypes.object,\n schema: PropTypes.object,\n attr: PropTypes.string,\n value: PropTypes.any,\n themeName: PropTypes.string,\n style: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n customs: PropTypes.object,\n forceUpdate: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n\n systemConfig: PropTypes.object,\n alive: PropTypes.bool,\n common: PropTypes.object,\n adapterName: PropTypes.string,\n instance: PropTypes.number,\n dateFormat: PropTypes.string,\n isFloatComma: PropTypes.bool,\n\n customObj: PropTypes.object,\n instanceObj: PropTypes.object,\n custom: PropTypes.bool,\n};\n\nexport default ConfigGeneric;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nimport I18n from '@iobroker/adapter-react-v5/i18n';\nimport Utils from '@iobroker/adapter-react-v5/Components/Utils';\n\nconst styles = theme => ({\n root: {\n width: '100%',\n },\n notAlive: {\n color: '#a30000'\n },\n});\n\nclass ConfigAlive extends ConfigGeneric {\n componentDidMount() {\n super.componentDidMount();\n\n const instance = this.getInstance();\n\n this.props.socket.getState(instance + '.alive')\n .then(state => this.setState({alive: !!(state && state.val), instance}));\n }\n\n getInstance() {\n let instance = this.props.schema.instance || (this.props.adapterName + '.' + this.props.instance);\n if (instance.includes('${')) {\n instance = this.getPattern(instance);\n }\n if (instance && !instance.startsWith('system.adapter.')) {\n instance = 'system.adapter.' + instance;\n }\n return instance;\n }\n\n renderItem() {\n if (this.getInstance() !== this.state.instance) {\n setTimeout(() => {\n const instance = this.getInstance();\n if (instance) {\n this.props.socket.getState(instance + '.alive')\n .then(state => this.setState({alive: !!(state && state.val), instance}));\n } else {\n this.setState({alive: null, instance})\n }\n }, 200);\n }\n\n if (this.state.alive !== false && this.state.alive !== true) {\n return null;\n }\n\n const instance = this.state.instance.replace(/^system.adapter./, '');\n return <div className={Utils.clsx(this.props.classes.root, !this.state.alive && this.props.classes.notAlive)}>\n {this.state.alive ?\n this.props.schema.textAlive !== undefined ? (this.props.schema.textAlive ? I18n.t(this.props.schema.textAlive, instance) : '') : I18n.t('ra_Instance %s is alive', instance)\n :\n this.props.schema.textNotAlive !== undefined ? (this.props.schema.textNotAlive ? I18n.t(this.props.schema.textNotAlive, instance) : '') : I18n.t('ra_Instance %s is not alive', instance)\n }\n </div>;\n }\n}\n\nConfigAlive.propTypes = {\n socket: PropTypes.object.isRequired,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n adapterName: PropTypes.string,\n instance: PropTypes.number,\n};\n\nexport default withStyles(styles)(ConfigAlive);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport { Autocomplete, TextField } from '@mui/material';\n\nimport I18n from '@iobroker/adapter-react-v5/i18n';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%'\n }\n});\n\nclass ConfigAutocomplete extends ConfigGeneric {\n componentDidMount() {\n super.componentDidMount();\n const value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n\n const selectOptions = this.props.schema.options.map(item => typeof item === 'string' ? {label: item, value: item} : JSON.parse(JSON.stringify(item)));\n\n // if __different\n if (Array.isArray(value)) {\n selectOptions.unshift({label: I18n.t(ConfigGeneric.DIFFERENT_LABEL), value: ConfigGeneric.DIFFERENT_VALUE});\n this.setState({value: ConfigGeneric.DIFFERENT_VALUE, selectOptions});\n } else {\n this.setState({value, selectOptions});\n }\n }\n\n renderItem(error, disabled, defaultValue) {\n if (!this.state.selectOptions) {\n return null;\n }\n let item;\n let options = JSON.parse(JSON.stringify(this.state.selectOptions));\n let isIndeterminate = Array.isArray(this.state.value) || this.state.value === ConfigGeneric.DIFFERENT_VALUE;\n\n if (isIndeterminate) {\n [...this.state.value]\n .filter(val => !options.find(it => it.value === val))\n .forEach(item => options.push({label: item.toString(), value: item}));\n\n item = {label: I18n.t(ConfigGeneric.DIFFERENT_LABEL), value: ConfigGeneric.DIFFERENT_VALUE};\n options.unshift(item);\n } else {\n // eslint-disable-next-line\n item = this.state.value !== null && this.state.value !== undefined && options.find(item => item.value == this.state.value); // let \"==\" be and not ===\n if (this.state.value !== null && this.state.value !== undefined && !item) {\n item = {value: this.state.value, label: this.state.value};\n options.push(item);\n }\n }\n\n return <Autocomplete\n className={this.props.classes.indeterminate}\n fullWidth\n freeSolo={!!this.props.schema.freeSolo}\n value={item}\n // autoComplete\n onInputChange={e => {\n if (e) {\n const val = e.target.value;\n if (val !== this.state.value) {\n this.setState({value: val}, () => this.onChange(this.props.attr, val));\n }\n }\n }}\n onChange={(_, value) => {\n const val = typeof value === 'object' ? (value ? value.value : '') : value;\n if (val !== this.state.value) {\n this.setState({value: val}, () => this.onChange(this.props.attr, val));\n }\n }}\n options={options}\n getOptionLabel={option => (option && option.label) || ''}\n renderInput={params => <TextField\n variant=\"standard\"\n {...params}\n error={!!error}\n // inputProps are important and will be given in params\n // inputProps={{maxLength: this.props.schema.maxLength || this.props.schema.max || undefined}}\n placeholder={this.getText(this.props.schema.placeholder)}\n label={this.getText(this.props.schema.label)}\n helperText={this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}\n disabled={!!disabled}\n />}\n />;\n }\n}\n\nConfigAutocomplete.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigAutocomplete);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport { Autocomplete, TextField } from '@mui/material';\n\nimport I18n from '@iobroker/adapter-react-v5/i18n';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%'\n }\n});\n\nclass ConfigAutocompleteSendTo extends ConfigGeneric {\n componentDidMount() {\n super.componentDidMount();\n\n this.askInstance();\n }\n\n askInstance() {\n const value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n const selectOptions = this.props.schema.options ?\n this.props.schema.options.map(item => typeof item === 'string' ? {label: item, value: item} : JSON.parse(JSON.stringify(item)))\n :\n [];\n\n if (this.props.alive) {\n let data = this.props.schema.data;\n if (data === undefined && this.props.schema.jsonData) {\n data = this.getPattern(this.props.schema.jsonData);\n try {\n data = JSON.parse(data);\n } catch (e) {\n console.error('Cannot parse json data: ' + data);\n }\n }\n\n if (data === undefined) {\n data = null;\n }\n\n this.props.socket.sendTo(`${this.props.adapterName}.${this.props.instance}`, this.props.schema.command || 'send', data)\n .then(list => {\n if (list && Array.isArray(list)) {\n list.forEach(item =>\n selectOptions.push(typeof item === 'string' ? {label: item, value: item} : JSON.parse(JSON.stringify(item))));\n }\n\n // if __different\n if (Array.isArray(value)) {\n selectOptions.unshift({label: I18n.t(ConfigGeneric.DIFFERENT_LABEL), value: ConfigGeneric.DIFFERENT_VALUE});\n this.setState({value: ConfigGeneric.DIFFERENT_VALUE, selectOptions, context: this.getContext()});\n } else {\n this.setState({value, selectOptions, context: this.getContext()});\n }\n });\n } else {\n // if __different\n if (Array.isArray(value)) {\n selectOptions.unshift({label: I18n.t(ConfigGeneric.DIFFERENT_LABEL), value: ConfigGeneric.DIFFERENT_VALUE});\n this.setState({value: ConfigGeneric.DIFFERENT_VALUE, selectOptions});\n } else {\n this.setState({value, selectOptions});\n }\n }\n }\n\n getContext() {\n const context = {};\n if (Array.isArray(this.props.schema.alsoDependsOn)) {\n this.props.schema.alsoDependsOn.forEach(attr =>\n context[attr] = ConfigGeneric.getValue(this.props.data, attr));\n }\n return JSON.stringify(context);\n }\n\n renderItem(error, disabled, defaultValue) {\n if (!this.state.selectOptions) {\n return null;\n }\n\n if (this.props.alive) {\n const context = this.getContext();\n if (context !== this.state.context) {\n setTimeout(() => this.askInstance(), 300);\n }\n }\n\n let item;\n let options = JSON.parse(JSON.stringify(this.state.selectOptions));\n let isIndeterminate = Array.isArray(this.state.value) || this.state.value === ConfigGeneric.DIFFERENT_LABEL;\n\n if (isIndeterminate) {\n [...this.state.value]\n .filter(val => !options.find(it => it.value === val))\n .forEach(item => options.push({label: item.toString(), value: item}));\n\n item = {label: I18n.t(ConfigGeneric.DIFFERENT_LABEL), value: ConfigGeneric.DIFFERENT_VALUE};\n options.unshift(item);\n } else {\n item = this.state.value !== null && this.state.value !== undefined &&\n //eslint-disable-next-line\n options.find(item => item.value == this.state.value); // let \"==\" be and not ===\n\n if (this.state.value !== null && this.state.value !== undefined && !item) {\n item = {value: this.state.value, label: this.state.value};\n options.push(item);\n }\n item = item || null;\n }\n\n if (!options.length) {\n return <TextField\n variant=\"standard\"\n fullWidth\n value={this.state.value === null || this.state.value === undefined ? '' : this.state.value}\n error={!!error}\n disabled={!!disabled}\n inputProps={{maxLength: this.props.schema.maxLength || this.props.schema.max || undefined}}\n onChange={e => {\n const value = e.target.value;\n this.setState({value}, () =>\n this.onChange(this.props.attr, (value || '').trim()));\n }}\n placeholder={this.getText(this.props.schema.placeholder)}\n label={this.getText(this.props.schema.label)}\n helperText={this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}\n />;\n } else {\n return <Autocomplete\n value={item}\n fullWidth\n freeSolo={!!this.props.schema.freeSolo}\n options={options}\n // autoComplete\n getOptionLabel={option => (option && option.label) || ''}\n className={this.props.classes.indeterminate}\n onInputChange={e => {\n if (e) {\n const val = e.target.value;\n if (val !== this.state.value) {\n this.setState({value: val}, () => this.onChange(this.props.attr, val));\n }\n }\n }}\n onChange={(_, value) => {\n const val = typeof value === 'object' ? (value ? value.value : '') : value;\n if (val !== this.state.value) {\n this.setState({value: val}, () => this.onChange(this.props.attr, val));\n }\n }}\n renderInput={(params) =>\n <TextField\n variant=\"standard\"\n {...params}\n // inputProps are important and will be given in params\n // inputProps={{maxLength: this.props.schema.maxLength || this.props.schema.max || undefined}}\n error={!!error}\n placeholder={this.getText(this.props.schema.placeholder)}\n label={this.getText(this.props.schema.label)}\n helperText={this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}\n disabled={!!disabled}\n />}\n />;\n }\n }\n}\n\nConfigAutocompleteSendTo.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigAutocompleteSendTo);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport InputLabel from '@mui/material/InputLabel';\nimport FormControl from '@mui/material/FormControl';\nimport { Button, TextField } from '@mui/material';\n\nimport DialogCron from '@iobroker/adapter-react-v5/Dialogs/Cron';\nimport I18n from '@iobroker/adapter-react-v5/i18n';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%'\n },\n flex: {\n display: 'flex'\n },\n button: {\n height: 48,\n marginLeft: 4,\n minWidth: 48,\n }\n});\n\nclass ConfigCRON extends ConfigGeneric {\n async componentDidMount() {\n super.componentDidMount();\n const { data, attr } = this.props;\n const value = ConfigGeneric.getValue(data, attr) || '';\n this.setState({ value});\n }\n\n renderItem(error, disabled, defaultValue) {\n const { classes, schema, attr } = this.props;\n const { value, showDialog } = this.state;\n\n return <FormControl className={classes.fullWidth} variant=\"standard\">\n <InputLabel shrink>{this.getText(schema.label)}</InputLabel>\n <div className={classes.flex}>\n <TextField\n variant=\"standard\"\n fullWidth\n value={value}\n error={!!error}\n disabled={disabled}\n placeholder={this.getText(schema.placeholder)}\n label={this.getText(schema.label)}\n helperText={this.renderHelp(schema.help, schema.helpLink, schema.noTranslation)}\n onChange={e => {\n const value = e.target.value;\n this.setState({ value }, () =>\n this.onChange(attr, value))\n }}\n />\n <Button\n color=\"grey\"\n className={this.props.classes.button}\n size=\"small\"\n variant=\"outlined\"\n onClick={() => this.setState({ showDialog: true })}\n >...</Button>\n </div>\n {showDialog ? <DialogCron\n title={I18n.t('ra_Define schedule')}\n simple={schema.simple}\n complex={schema.complex}\n cron={value}\n language={I18n.getLanguage()}\n onClose={() => this.setState({ showDialog: false })}\n cancel={I18n.t('ra_Cancel')}\n ok={I18n.t('ra_Ok')}\n onOk={value =>\n this.setState({ showDialog: false, value }, () =>\n this.onChange(attr, value))}\n /> : null}\n </FormControl>;\n }\n}\n\nConfigCRON.propTypes = {\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n dateFormat: PropTypes.string,\n isFloatComma: PropTypes.bool,\n};\n\nexport default withStyles(styles)(ConfigCRON);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport InputLabel from '@mui/material/InputLabel';\nimport MenuItem from '@mui/material/MenuItem';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport FormControl from '@mui/material/FormControl';\nimport Select from '@mui/material/Select';\n\nimport ConfigGeneric from './ConfigGeneric';\nimport I18n from '@iobroker/adapter-react-v5/i18n';\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%'\n }\n});\n\nclass ConfigCertificateSelect extends ConfigGeneric {\n async componentDidMount() {\n super.componentDidMount();\n const value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n let selectOptions = await this.props.socket.getCertificates();\n\n selectOptions = selectOptions\n .filter(el => {\n const name = this.props.attr.toLowerCase();\n\n if (name.includes(el.type)) {\n return true;\n } else if (el.type === 'public' && name.includes('cert')) {\n return true;\n } else if (el.type === 'private' && (name.includes('priv') || name.includes('key'))) {\n return true;\n } else if (el.type === 'chained' && (name.includes('chain') || name.includes('ca'))) {\n return true;\n }\n\n return false;\n })\n .map(el => ({label: el.name, value: el.name}));\n\n selectOptions.unshift({label: I18n.t(ConfigGeneric.NONE_LABEL), value: ConfigGeneric.NONE_VALUE});\n\n this.setState({value, selectOptions});\n }\n\n renderItem(error, disabled, defaultValue) {\n if (!this.state.selectOptions) {\n return null;\n }\n // eslint-disable-next-line\n const item = this.state.selectOptions?.find(item => item.value === this.state.value);\n\n return <FormControl className={this.props.classes.fullWidth} variant=\"standard\">\n <InputLabel shrink>{this.getText(this.props.schema.label)}</InputLabel>\n <Select\n variant=\"standard\"\n error={!!error}\n displayEmpty\n disabled={!!disabled}\n value={this.state.value}\n renderValue={val => this.getText(item?.label, this.props.schema.noTranslation !== false)}\n onChange={e =>\n this.setState({ value: e.target.value }, () =>\n this.onChange(this.props.attr, this.state.value))}\n >\n {this.state.selectOptions?.map(item =>\n <MenuItem\n key={item.value}\n value={item.value}\n style={item.value === ConfigGeneric.NONE_VALUE ? { opacity: 0.5 } : {}}>{\n this.getText(item.label, this.props.schema.noTranslation !== false)\n }</MenuItem>)}\n </Select>\n {this.props.schema.help ? <FormHelperText>{this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}</FormHelperText> : null}\n </FormControl>;\n }\n}\n\nConfigCertificateSelect.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigCertificateSelect);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport Checkbox from '@mui/material/Checkbox';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport FormControl from '@mui/material/FormControl';\n\nimport ConfigGeneric from './ConfigGeneric';\nimport I18n from '@iobroker/adapter-react-v5/i18n';\n\nconst styles = theme => ({\n error: {\n color: 'red'\n }\n});\n\nclass ConfigCheckbox extends ConfigGeneric {\n renderItem(error, disabled) {\n const value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n let isIndeterminate = Array.isArray(value);\n\n return <FormControl className={this.props.classes.fullWidth} variant=\"standard\">\n <FormControlLabel\n onClick={e => {\n e.preventDefault();\n e.stopPropagation();\n this.onChange(this.props.attr, !value);\n }}\n control={<Checkbox\n indeterminate={isIndeterminate}\n checked={!!value}\n onChange={e => {\n if (isIndeterminate) {\n this.onChange(this.props.attr, true);\n } else {\n this.onChange(this.props.attr, e.target.checked);\n }\n }}\n disabled={!!disabled}\n />}\n label={this.getText(this.props.schema.label)}\n />\n <FormHelperText className={this.props.classes.error}>{\n error ? (this.props.schema.validatorErrorText ? I18n.t(this.props.schema.validatorErrorText) : I18n.t('ra_Error')) :\n null}</FormHelperText>\n {this.props.schema.help ? <FormHelperText>{this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}</FormHelperText> : null}\n </FormControl>\n }\n}\n\nConfigCheckbox.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigCheckbox);","/**\n * Notice: Some code was adapted from Material-UI's text field.\n * Copyright (c) 2014 Call-Em-All (https://github.com/callemall/material-ui)\n */\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport PropTypes from 'prop-types'\nimport Input from '@mui/material/Input'\nimport FilledInput from '@mui/material/FilledInput/FilledInput'\nimport OutlinedInput from '@mui/material/OutlinedInput'\nimport InputLabel from '@mui/material/InputLabel'\nimport Chip from '@mui/material/Chip'\nimport withStyles from '@mui/styles/withStyles'\nimport blue from '@mui/material/colors/blue'\nimport FormControl from '@mui/material/FormControl'\nimport FormHelperText from '@mui/material/FormHelperText'\nimport Utils from '../Utils';\n\nconst variantComponent = {\n standard: Input,\n filled: FilledInput,\n outlined: OutlinedInput,\n};\n\nconst styles = (theme) => {\n const light = theme.palette.type === 'light';\n const bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';\n\n return {\n root: {},\n inputRoot: {\n display: 'inline-flex',\n flexWrap: 'wrap',\n flex: 1,\n marginTop: 0,\n minWidth: 70,\n '&$outlined,&$filled': {\n boxSizing: 'border-box',\n },\n '&$outlined': {\n paddingTop: 14,\n },\n '&$filled': {\n paddingTop: 28,\n }\n },\n input: {\n display: 'inline-block',\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n appearance: 'none', // Remove border in Safari, doesn't seem to break anything in other browsers\n WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated style).\n float: 'left',\n flex: 1,\n },\n chipContainer: {\n display: 'flex',\n flexFlow: 'row wrap',\n cursor: 'text',\n marginBottom: -2,\n minHeight: 40,\n '&$labeled&$standard': {\n marginTop: 18,\n },\n },\n outlined: {\n '& input': {\n height: 16,\n paddingTop: 4,\n paddingBottom: 12,\n marginTop: 4,\n marginBottom: 4,\n },\n },\n standard: {},\n filled: {\n '& input': {\n height: 22,\n marginBottom: 4,\n marginTop: 4,\n paddingTop: 0,\n },\n '$marginDense & input': {\n height: 26,\n },\n },\n labeled: {},\n label: {\n top: 4,\n '&$outlined&:not($labelShrink)': {\n top: 2,\n '$marginDense &': {\n top: 5,\n }\n },\n '&$filled&:not($labelShrink)': {\n top: 15,\n '$marginDense &': {\n top: 20,\n },\n },\n },\n labelShrink: {\n top: 0,\n },\n helperText: {\n marginBottom: -20,\n },\n focused: {},\n disabled: {},\n underline: {\n '&:after': {\n borderBottom: `2px solid ${theme.palette.primary[light ? 'dark' : 'light']}`,\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE 11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\"',\n position: 'absolute',\n right: 0,\n transform: 'scaleX(0)',\n transition: theme.transitions.create('transform', {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut,\n }),\n pointerEvents: 'none', // Transparent to the hover style.\n },\n '&$focused:after': {\n transform: 'scaleX(1)',\n },\n '&$error:after': {\n borderBottomColor: theme.palette.error.main,\n transform: 'scaleX(1)', // error is always underlined in red\n },\n '&:before': {\n borderBottom: `1px solid ${bottomLineColor}`,\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE 11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\\\\00a0\"',\n position: 'absolute',\n right: 0,\n transition: theme.transitions.create('border-bottom-color', {\n duration: theme.transitions.duration.shorter,\n }),\n pointerEvents: 'none', // Transparent to the hover style.\n },\n '&:hover:not($disabled):not($focused):not($error):before': {\n borderBottom: `2px solid ${theme.palette.text.primary}`,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n borderBottom: `1px solid ${bottomLineColor}`,\n }\n },\n '&$disabled:before': {\n borderBottomStyle: 'dotted',\n }\n },\n error: {\n '&:after': {\n backgroundColor: theme.palette.error.main,\n transform: 'scaleX(1)', // error is always underlined in red\n }\n },\n chip: {\n margin: '0 8px 8px 0',\n float: 'left',\n },\n marginDense: {},\n }\n}\n\nconst keyCodes = {\n BACKSPACE: 8,\n DELETE: 46,\n LEFT_ARROW: 37,\n RIGHT_ARROW: 39,\n};\n\nclass ChipInput extends React.Component {\n state = {\n chips: [],\n errorText: undefined,\n focusedChip: null,\n inputValue: '',\n isClean: true,\n isFocused: false,\n chipsUpdated: false,\n prevPropsValue: [],\n };\n\n constructor(props) {\n super(props);\n if (props.defaultValue) {\n this.state.chips = props.defaultValue;\n }\n this.labelRef = React.createRef();\n this.input = React.createRef();\n }\n\n componentDidMount() {\n if (this.props.variant === 'outlined') {\n this.labelNode = ReactDOM.findDOMNode(this.labelRef.current);\n this.forceUpdate();\n }\n }\n\n componentWillUnmount() {\n clearTimeout(this.inputBlurTimeout);\n }\n\n static getDerivedStateFromProps(props, state) {\n let newState = null;\n\n if (props.value && props.value.length !== state.prevPropsValue.length) {\n newState = {prevPropsValue: props.value};\n if (props.clearInputValueOnChange) {\n newState.inputValue = '';\n }\n }\n\n // if change detection is only needed for clearInputValueOnChange\n if (props.clearInputValueOnChange && props.value && props.value.length !== state.prevPropsValue.length) {\n newState = {prevPropsValue: props.value, inputValue: ''};\n }\n\n if (props.disabled) {\n newState = {...newState, focusedChip: null};\n }\n\n if (!state.chipsUpdated && props.defaultValue) {\n newState = {...newState, chips: props.defaultValue};\n }\n\n return newState;\n }\n\n /**\n * Blurs this component.\n * @public\n */\n blur() {\n if (this.input) {\n this.actualInput.blur();\n }\n }\n\n /**\n * Focuses this component.\n * @public\n */\n focus = () => {\n this.actualInput.focus();\n if (this.state.focusedChip) {\n this.setState({focusedChip: null});\n }\n }\n\n handleInputBlur = event => {\n if (this.props.onBlur) {\n this.props.onBlur(event);\n }\n this.setState({ isFocused: false });\n if (this.state.focusedChip) {\n this.setState({ focusedChip: null });\n }\n const value = event.target.value;\n let addChipOptions;\n switch (this.props.blurBehavior) {\n case 'add-or-clear':\n addChipOptions = { clearInputOnFail: true };\n // falls through\n case 'add':\n if (this.props.delayBeforeAdd) {\n // Let's assume that we only want to add the existing content as chip, when\n // another event has not added a chip within 200ms .\n // e.g. onSelection Callback in Autocomplete case\n const numChipsBefore = (this.props.value || this.state.chips).length;\n this.inputBlurTimeout = setTimeout(() => {\n const numChipsAfter = (this.props.value || this.state.chips).length;\n if (numChipsBefore === numChipsAfter) {\n this.handleAddChip(value, addChipOptions);\n } else {\n this.clearInput();\n }\n }, 150);\n } else {\n this.handleAddChip(value, addChipOptions);\n }\n break;\n\n case 'clear':\n this.clearInput();\n break;\n\n default:\n break;\n }\n }\n\n handleInputFocus = event => {\n this.setState({ isFocused: true });\n if (this.props.onFocus) {\n this.props.onFocus(event);\n }\n }\n\n handleKeyDown = event => {\n const { focusedChip } = this.state;\n this._keyPressed = false;\n this._preventChipCreation = false;\n\n if (this.props.onKeyDown) {\n // Needed for arrow controls on menu in autocomplete scenario\n this.props.onKeyDown(event);\n // Check if the callback marked the event as isDefaultPrevented() and skip further actions\n // enter key for example should not always add the current value of the inputField\n if (event.isDefaultPrevented()) {\n return;\n }\n }\n const chips = this.props.value || this.state.chips;\n if (this.props.newChipKeyCodes.includes(event.keyCode) || this.props.newChipKeys.includes(event.key)) {\n const result = this.handleAddChip(event.target.value);\n if (result !== false) {\n event.preventDefault();\n }\n return;\n }\n\n switch (event.keyCode) {\n case keyCodes.BACKSPACE:\n if (event.target.value === '') {\n if (focusedChip) {\n this.handleDeleteChip(chips[focusedChip], focusedChip);\n if (focusedChip) {\n this.setState({focusedChip: focusedChip - 1});\n }\n } else {\n this.setState({focusedChip: chips.length - 1});\n }\n }\n break;\n case keyCodes.DELETE:\n if (event.target.value === '' && focusedChip) {\n this.handleDeleteChip(chips[focusedChip], focusedChip);\n if (focusedChip <= chips.length - 1) {\n this.setState({ focusedChip });\n }\n }\n break;\n case keyCodes.LEFT_ARROW:\n if (focusedChip == null && event.target.value === '' && chips.length) {\n this.setState({ focusedChip: chips.length - 1 });\n } else if (focusedChip != null && focusedChip > 0) {\n this.setState({ focusedChip: focusedChip - 1 });\n }\n break;\n case keyCodes.RIGHT_ARROW:\n if (focusedChip != null && focusedChip < chips.length - 1) {\n this.setState({ focusedChip: focusedChip + 1 });\n } else {\n this.setState({ focusedChip: null });\n }\n break;\n default:\n this.setState({ focusedChip: null });\n break;\n }\n }\n\n handleKeyUp = event => {\n if (!this._preventChipCreation && (this.props.newChipKeyCodes.indexOf(event.keyCode) >= 0 || this.props.newChipKeys.indexOf(event.key) >= 0) && this._keyPressed) {\n this.clearInput();\n } else {\n this.updateInput(event.target.value);\n }\n if (this.props.onKeyUp) {\n this.props.onKeyUp(event);\n }\n }\n\n handleKeyPress = event => {\n this._keyPressed = true;\n if (this.props.onKeyPress) {\n this.props.onKeyPress(event);\n }\n }\n\n handleUpdateInput = e => {\n if (this.props.inputValue == null) {\n this.updateInput(e.target.value);\n }\n\n if (this.props.onUpdateInput) {\n this.props.onUpdateInput(e);\n }\n }\n\n /**\n * Handles adding a chip.\n * @param {string|object} chip Value of the chip, either a string or an object (if dataSourceConfig is set)\n * @param {object=} options Additional options\n * @param {boolean=} options.clearInputOnFail If `true`, and `onBeforeAdd` returns `false`, clear the input\n * @returns True if the chip was added (or at least `onAdd` was called), false if adding the chip was prevented\n */\n handleAddChip(chip, options) {\n if (this.props.onBeforeAdd && !this.props.onBeforeAdd(chip)) {\n this._preventChipCreation = true;\n if (options && options.clearInputOnFail) {\n this.clearInput();\n }\n return false;\n }\n this.clearInput();\n const chips = this.props.value || this.state.chips;\n\n if (this.props.dataSourceConfig) {\n if (typeof chip === 'string') {\n chip = {\n [this.props.dataSourceConfig.text]: chip,\n [this.props.dataSourceConfig.value]: chip\n };\n }\n\n if (this.props.allowDuplicates || !chips.some(c => c[this.props.dataSourceConfig.value] === chip[this.props.dataSourceConfig.value])) {\n if (this.props.value && this.props.onAdd) {\n this.props.onAdd(chip);\n } else {\n this.updateChips([...this.state.chips, chip]);\n }\n }\n return true;\n }\n\n if (chip.trim().length > 0) {\n if (this.props.allowDuplicates || !chips.includes(chip)) {\n if (this.props.value && this.props.onAdd) {\n this.props.onAdd(chip);\n } else {\n this.updateChips([...this.state.chips, chip]);\n }\n }\n return true;\n }\n return false;\n }\n\n handleDeleteChip(chip, i) {\n if (!this.props.value) {\n const chips = this.state.chips.slice();\n const changed = chips.splice(i, 1); // remove the chip at index i\n if (changed) {\n let focusedChip = this.state.focusedChip;\n if (this.state.focusedChip === i) {\n focusedChip = null;\n } else if (this.state.focusedChip > i) {\n focusedChip = this.state.focusedChip - 1;\n }\n this.updateChips(chips, { focusedChip });\n }\n } else if (this.props.onDelete) {\n this.props.onDelete(chip, i);\n }\n }\n\n updateChips(chips, additionalUpdates = {}) {\n this.setState({ chips, chipsUpdated: true, ...additionalUpdates });\n if (this.props.onChange) {\n this.props.onChange(chips);\n }\n }\n\n /**\n * Clears the text field for adding new chips.\n * This only works in uncontrolled input mode, i.e. if the inputValue prop is not used.\n * @public\n */\n clearInput() {\n this.updateInput('');\n }\n\n updateInput(value) {\n this.setState({ inputValue: value });\n }\n\n /**\n * Set the reference to the actual input, that is the input of the Input.\n * @param {object} ref - The reference\n */\n setActualInputRef = ref => {\n this.actualInput = ref;\n this.props.inputRef && this.props.inputRef(ref);\n }\n\n render() {\n const {\n allowDuplicates,\n alwaysShowPlaceholder,\n blurBehavior,\n children,\n chipRenderer = defaultChipRenderer,\n classes,\n className,\n clearInputValueOnChange,\n dataSource,\n dataSourceConfig,\n defaultValue,\n delayBeforeAdd,\n disabled,\n disableUnderline,\n error,\n filter,\n FormHelperTextProps,\n fullWidth,\n fullWidthInput,\n helperText,\n id,\n InputProps = {},\n inputRef,\n InputLabelProps = {},\n inputValue,\n label,\n newChipKeyCodes,\n newChipKeys,\n onBeforeAdd,\n onAdd,\n onBlur,\n onDelete,\n onChange,\n onFocus,\n onKeyDown,\n onKeyPress,\n onKeyUp,\n onUpdateInput,\n placeholder,\n readOnly,\n required,\n rootRef,\n value,\n variant,\n ...other\n } = this.props;\n\n const chips = value || this.state.chips || [];\n const actualInputValue = inputValue != null ? inputValue : this.state.inputValue;\n\n const hasInput = (this.props.value || actualInputValue).length || actualInputValue.length;\n const shrinkFloatingLabel = InputLabelProps.shrink != null\n ? InputLabelProps.shrink\n : (label != null && (hasInput || this.state.isFocused || chips.length));\n\n const chipComponents = chips.map((chip, i) => {\n const value = dataSourceConfig ? chip[dataSourceConfig.value] : chip;\n return chipRenderer(\n {\n value,\n text: dataSourceConfig ? chip[dataSourceConfig.text] : chip,\n chip,\n isDisabled: !!disabled,\n isReadOnly: readOnly,\n isFocused: this.state.focusedChip === i,\n handleClick: () => this.setState({focusedChip: i}),\n handleDelete: () => this.handleDeleteChip(chip, i),\n className: classes.chip\n },\n i\n );\n });\n\n const InputMore = {}\n if (variant === 'outlined') {\n InputMore.notched = shrinkFloatingLabel;\n InputMore.labelWidth =\n (shrinkFloatingLabel && this.labelNode && this.labelNode.offsetWidth) ||\n 0;\n }\n\n if (variant !== 'standard') {\n InputMore.startAdornment = <React.Fragment>{chipComponents}</React.Fragment>;\n } else {\n InputProps.disableUnderline = true;\n }\n\n const InputComponent = variantComponent[variant];\n\n return <FormControl\n ref={rootRef}\n fullWidth={fullWidth}\n className={Utils.clsx(className, classes.root, other.margin === 'dense' && classes.marginDense)}\n error={error}\n required={chips.length > 0 ? undefined : required}\n onClick={this.focus}\n disabled={disabled}\n variant={variant}\n {...other}\n >\n {label && <InputLabel\n htmlFor={id}\n classes={{root: Utils.clsx(classes[variant], classes.label), shrink: classes.labelShrink}}\n shrink={shrinkFloatingLabel}\n focused={this.state.isFocused}\n variant={variant}\n ref={this.labelRef}\n required={required}\n {...InputLabelProps}\n >\n {label}\n </InputLabel>}\n <div\n className={Utils.clsx(\n classes[variant],\n classes.chipContainer,\n this.state.isFocused && classes.focused,\n !disableUnderline && variant === 'standard' && classes.underline,\n disabled && classes.disabled,\n label && classes.labeled,\n error && classes.error\n )}\n >\n {variant === 'standard' && chipComponents}\n <InputComponent\n ref={this.input}\n classes={{\n input: Utils.clsx(classes.input, classes[variant]),\n root: Utils.clsx(classes.inputRoot, classes[variant])\n }}\n id={id}\n value={actualInputValue}\n onChange={this.handleUpdateInput}\n onKeyDown={this.handleKeyDown}\n onKeyPress={this.handleKeyPress}\n onKeyUp={this.handleKeyUp}\n onFocus={this.handleInputFocus}\n onBlur={this.handleInputBlur}\n inputRef={this.setActualInputRef}\n disabled={disabled}\n fullWidth={fullWidthInput}\n placeholder={(!hasInput && (shrinkFloatingLabel || label == null)) || alwaysShowPlaceholder ? placeholder : null}\n readOnly={readOnly}\n {...InputProps}\n {...InputMore}\n />\n </div>\n {helperText && <FormHelperText\n {...FormHelperTextProps}\n className={FormHelperTextProps ? Utils.clsx(FormHelperTextProps.className, classes.helperText) : classes.helperText}\n >\n {helperText}\n </FormHelperText>}\n </FormControl>;\n }\n}\n\nChipInput.propTypes = {\n /** Allows duplicate chips if set to true. */\n allowDuplicates: PropTypes.bool,\n /** If true, the placeholder will always be visible. */\n alwaysShowPlaceholder: PropTypes.bool,\n /** Behavior when the chip input is blurred: `'clear'` clears the input, `'add'` creates a chip and `'ignore'` keeps the input. */\n blurBehavior: PropTypes.oneOf(['clear', 'add', 'add-or-clear', 'ignore']),\n /** A function of the type `({ value, text, chip, isFocused, isDisabled, isReadOnly, handleClick, handleDelete, className }, key) => node` that returns a chip based on the given properties. This can be used to customize chip styles. Each item in the `dataSource` array will be passed to `chipRenderer` as arguments `chip`, `value` and `text`. If `dataSource` is an array of objects and `dataSourceConfig` is present, then `value` and `text` will instead correspond to the object values defined in `dataSourceConfig`. If `dataSourceConfig` is not set and `dataSource` is an array of objects, then a custom `chipRenderer` must be set. `chip` is always the raw value from `dataSource`, either an object or a string. */\n chipRenderer: PropTypes.func,\n /** Whether the input value should be cleared if the `value` prop is changed. */\n clearInputValueOnChange: PropTypes.bool,\n /** Data source for auto complete. This should be an array of strings or objects. */\n dataSource: PropTypes.array,\n /** Config for objects list dataSource, e.g. `{ text: 'text', value: 'value' }`. If not specified, the `dataSource` must be a flat array of strings or a custom `chipRenderer` must be set to handle the objects. */\n dataSourceConfig: PropTypes.shape({\n text: PropTypes.string.isRequired,\n value: PropTypes.string.isRequired\n }),\n /** The chips to display by default (for uncontrolled mode). */\n defaultValue: PropTypes.array,\n /** Whether to use `setTimeout` to delay adding chips in case other input events like `onSelection` need to fire first */\n delayBeforeAdd: PropTypes.bool,\n /** Disables the chip input if set to true. */\n disabled: PropTypes.bool,\n /** Disable the input underline. Only valid for 'standard' variant */\n disableUnderline: PropTypes.bool,\n /** Props to pass through to the `FormHelperText` component. */\n FormHelperTextProps: PropTypes.object,\n /** If true, the chip input will fill the available width. */\n fullWidth: PropTypes.bool,\n /** If true, the input field will always be below the chips and fill the available space. By default, it will try to be beside the chips. */\n fullWidthInput: PropTypes.bool,\n /** Helper text that is displayed below the input. */\n helperText: PropTypes.node,\n /** Props to pass through to the `InputLabel`. */\n InputLabelProps: PropTypes.object,\n /** Props to pass through to the `Input`. */\n InputProps: PropTypes.object,\n /** Use this property to pass a ref callback to the native input component. */\n inputRef: PropTypes.func,\n /** The input value (enables controlled mode for the text input if set). */\n inputValue: PropTypes.string,\n /* The content of the floating label. */\n label: PropTypes.node,\n /** The key codes (`KeyboardEvent.keyCode`) used to determine when to create a new chip. */\n newChipKeyCodes: PropTypes.arrayOf(PropTypes.number),\n /** The keys (`KeyboardEvent.key`) used to determine when to create a new chip. */\n newChipKeys: PropTypes.arrayOf(PropTypes.string),\n /** Callback function that is called when a new chip was added (in controlled mode). */\n onAdd: PropTypes.func,\n /** Callback function that is called with the chip to be added and should return true to add the chip or false to prevent the chip from being added without clearing the text input. */\n onBeforeAdd: PropTypes.func,\n /** Callback function that is called when the chips change (in uncontrolled mode). */\n onChange: PropTypes.func,\n /** Callback function that is called when a new chip was removed (in controlled mode). */\n onDelete: PropTypes.func,\n /** Callback function that is called when the input changes. */\n onUpdateInput: PropTypes.func,\n /** A placeholder that is displayed if the input has no values. */\n placeholder: PropTypes.string,\n /** Makes the chip input read-only if set to true. */\n readOnly: PropTypes.bool,\n /** The chips to display (enables controlled mode if set). */\n value: PropTypes.array,\n /** The variant of the Input component */\n variant: PropTypes.oneOf(['outlined', 'standard', 'filled'])\n}\n\nChipInput.defaultProps = {\n allowDuplicates: false,\n blurBehavior: 'clear',\n clearInputValueOnChange: false,\n delayBeforeAdd: false,\n disableUnderline: false,\n newChipKeyCodes: [13],\n newChipKeys: ['Enter'],\n variant: 'standard'\n};\n\nexport default withStyles(styles, {name: 'WAMuiChipInput'})(ChipInput);\n\nexport const defaultChipRenderer = ({\n value,\n text,\n isFocused,\n isDisabled,\n isReadOnly,\n handleClick,\n handleDelete,\n className\n}, key) =>\n <Chip\n key={key}\n className={className}\n style={{\n pointerEvents: isDisabled || isReadOnly ? 'none' : undefined,\n backgroundColor: isFocused ? blue[300] : undefined\n }}\n onClick={handleClick}\n onDelete={handleDelete}\n label={text}\n />;","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport FormHelperText from '@mui/material/FormHelperText';\nimport FormControl from '@mui/material/FormControl';\n\nimport ConfigGeneric from './ConfigGeneric';\nimport ChipInput from './ChipInput';\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%'\n }\n});\n\nclass ConfigLanguage extends ConfigGeneric {\n componentDidMount() {\n super.componentDidMount();\n const { data, attr } = this.props;\n const value = ConfigGeneric.getValue(data, attr);\n if (this.props.schema.delimiter && typeof value === 'string') {\n const parts = value.split(this.props.schema.delimiter).map(a => a.trim()).filter(a => a);\n this.setState({ value: parts });\n } else {\n this.setState({ value: value || [] });\n }\n }\n\n renderItem(error, disabled, defaultValue) {\n const { attr,schema } = this.props;\n const { value } = this.state;\n return <FormControl className={this.props.classes.fullWidth} variant=\"standard\">\n <ChipInput\n value={value}\n disabled={!!disabled}\n label={this.getText(schema.label)}\n error={!!error}\n onAdd={chip => {\n const newValue = JSON.parse(JSON.stringify(value));\n newValue.push(chip);\n this.setState({ value: newValue, prevValue: '' }, () => {\n if (this.props.schema.delimiter) {\n this.onChange(attr, newValue.join(this.props.schema.delimiter + ' '));\n } else {\n this.onChange(attr, newValue);\n }\n });\n }}\n onDelete={(chip, index) => {\n const newValue = JSON.parse(JSON.stringify(value));\n newValue.splice(index, 1);\n this.setState({ value: newValue, prevValue: '' }, () => {\n if (this.props.schema.delimiter) {\n this.onChange(attr, newValue.join(this.props.schema.delimiter + ' '));\n } else {\n this.onChange(attr, newValue);\n }\n });\n }}\n />\n {this.props.schema.help ? <FormHelperText>{this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}</FormHelperText> : null}\n </FormControl>;\n }\n}\n\nConfigLanguage.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigLanguage);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport {withStyles} from '@mui/styles';\nimport { ChromePicker } from 'react-color';\n\nimport IconButton from '@mui/material/IconButton';\nimport TextField from '@mui/material/TextField';\nimport Dialog from '@mui/material/Dialog';\n\nimport ClearIcon from '@mui/icons-material/Close';\n\nimport Utils from '@iobroker/adapter-react-v5/Components/Utils';\nimport ColorPicker from '@iobroker/adapter-react-v5/Components/ColorPicker';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({});\n\nclass ConfigColor extends ConfigGeneric {\n renderColorDialog() {\n return !!this.state.showColorDialog && <Dialog\n onClose={() => this.setState({showColorDialog: false})}\n open={this.state.showColorDialog}>\n <ChromePicker\n color={this.state.colorDialogValue}\n onChange={value => {\n this.setState({colorDialogValue: value}, () =>\n this.onChange(this.props.attr, ColorPicker.getColor(this.state.colorDialogValue, true)));\n }}\n />\n </Dialog>;\n }\n\n renderItem(error, disabled, defaultValue) {\n const value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n let textColor = Utils.isUseBright(value, null);\n if (textColor === null) {\n textColor = undefined;\n }\n return <>\n { this.renderColorDialog() }\n <TextField\n variant=\"standard\"\n disabled={!!disabled}\n style={{minWidth: 100, width: 'calc(100% - 8px)'}}\n label={this.getText(this.props.schema.label)}\n value={value || ''}\n onClick={() => this.setState({showColorDialog: true, colorDialogValue: value})}\n onChange={e => {\n const color = e.target.value;\n this.onChange(this.props.attr, color);\n }}\n inputProps={{\n style: {\n //paddingLeft: noPadding ? 0 : 8,\n backgroundColor: value,\n color: textColor ? '#FFF' : '#000'\n }\n }}\n InputProps={{\n endAdornment: value ?\n <IconButton\n disabled={!!this.props.onPaste}\n size=\"small\"\n onClick={e => {\n e.stopPropagation();\n this.onChange(this.props.attr, '');\n }}>\n <ClearIcon/>\n </IconButton>\n : undefined,\n }}\n InputLabelProps={{shrink: true}}\n />\n </>;\n }\n}\n\nConfigColor.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigColor);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport TextField from '@mui/material/TextField';\nimport Fab from '@mui/material/Fab';\n\nimport IconGpsFixed from '@mui/icons-material/GpsFixed';\n\nimport I18n from '@iobroker/adapter-react-v5/i18n';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n width: {\n width: 'calc(100% - 40px)',\n }\n});\n\nclass ConfigCoordinates extends ConfigGeneric {\n componentDidMount() {\n super.componentDidMount();\n const value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n if (!value && this.props.schema.autoInit) {\n setTimeout(() => this.getCoordinates(), 300);\n }\n }\n\n getSystemCoordinates() {\n return this.props.socket.getSystemConfig()\n .then(obj => {\n if (obj && obj.common && (obj.common.longitude || obj.common.latitude)) {\n window.alert(I18n.t('ra_Used system settings'));\n this.setState({ value: obj.common.latitude + (this.props.schema.divider || ',') + obj.common.longitude });\n } else {\n window.alert(I18n.t('ra_Cannot determine position: System settings are empty and GPS detection is disabled in browser'));\n }\n });\n }\n\n getCoordinates() {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(\n position => {\n if (position && position.coords) {\n this.setState({value: position.coords.latitude + (this.props.schema.divider || ',') + position.coords.longitude});\n } else {\n this.getSystemCoordinates();\n }\n },\n error => {\n this.getSystemCoordinates();\n }\n );\n } else {\n this.getSystemCoordinates();\n }\n }\n\n renderItem(error, disabled, defaultValue) {\n return <>\n <TextField\n variant=\"standard\"\n className={this.props.classes.width}\n value={this.state.value === null || this.state.value === undefined ? '' : this.state.value}\n error={!!error}\n disabled={!!disabled}\n inputProps={{maxLength: this.props.schema.maxLength || this.props.schema.max || undefined}}\n onChange={e => {\n const value = e.target.value;\n this.setState({value}, () =>\n this.onChange(this.props.attr, (value || '').trim()));\n }}\n placeholder={this.getText(this.props.schema.placeholder)}\n label={this.getText(this.props.schema.label)}\n helperText={this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}\n />\n <Fab size=\"small\" onClick={() => this.getCoordinates()}><IconGpsFixed /></Fab>\n </>;\n }\n}\n\nConfigCoordinates.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigCoordinates);","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport LinearProgress from '@mui/material/LinearProgress';\nimport Grid from '@mui/material/Grid';\n\nimport I18n from '@iobroker/adapter-react-v5/i18n';\n\nconst getOrLoadRemote = (remote, shareScope, remoteFallbackUrl = undefined) =>\n new Promise((resolve, reject) => {\n // check if remote exists on window\n if (!window[remote]) {\n // search dom to see if remote tag exists, but might still be loading (async)\n const existingRemote = document.querySelector(`script[data-webpack=\"${remote}\"]`);\n // when remote is loaded.\n const onload = async () => {\n // check if it was initialized\n if (window[remote]) {\n if (!window[remote].__initialized) {\n // if share scope doesn't exist (like in webpack 4) then expect shareScope to be a manual object\n if (typeof __webpack_share_scopes__ === 'undefined') {\n // use default share scope object passed in manually\n await window[remote].init(shareScope.default);\n } else {\n // otherwise, init share scope as usual\n // eslint-disable-next-line\n await window[remote].init(__webpack_share_scopes__[shareScope]);\n }\n // mark remote as initialized\n window[remote].__initialized = true;\n }\n } else {\n console.error('Cannot load ' + remote);\n return reject('Cannot load ' + remote);\n }\n // resolve promise so marking remote as loaded\n resolve(window[remote]);\n };\n\n if (existingRemote) {\n // if existing remote but not loaded, hook into its onload and wait for it to be ready\n existingRemote.onload = onload;\n existingRemote.onerror = reject;\n // check if remote fallback exists as param passed to function\n // TODO: should scan public config for a matching key if no override exists\n } else if (remoteFallbackUrl) {\n // inject remote if a fallback exists and call the same onload function\n const d = document;\n const script = d.createElement('script');\n script.type = 'text/javascript';\n // mark as data-webpack so runtime can track it internally\n script.setAttribute('data-webpack', `${remote}`);\n script.async = true;\n script.onerror = reject;\n script.onload = onload;\n script.src = remoteFallbackUrl;\n d.getElementsByTagName('head')[0].appendChild(script);\n } else {\n // no remote and no fallback exist, reject\n reject(`Cannot Find Remote ${remote} to inject`);\n }\n } else {\n // remote already instantiated, resolve\n resolve(window[remote]);\n }\n });\n\nconst loadComponent = (remote, sharedScope, module, url) => async () => {\n const container = await getOrLoadRemote(remote, sharedScope, url);\n const factory = await container.get(module);\n const Module = factory();\n return Module;\n};\n\nclass ConfigCustom extends Component {\n constructor(props) {\n super(props);\n // schema.url - location of Widget\n // schema.name - Component name\n // schema.i18n - i18n\n\n this.state = {\n Component: null,\n error: '',\n };\n }\n\n // load component dynamically\n async componentDidMount() {\n if (!this.props.schema.url) {\n console.error('URL is empty. Cannot load custom component!');\n this.setState({ error: 'URL is empty. Cannot load custom component!' });\n return;\n }\n\n let url;\n if (this.props.schema.url.startsWith('http:') || this.props.schema.url.startsWith('https:')) {\n url = this.props.schema.url;\n } else if (this.props.schema.url.startsWith('./')) {\n url = `${window.location.protocol}//${window.location.host}${this.props.schema.url.replace(/^\\./, '')}`;\n } else {\n url = `${window.location.protocol}//${window.location.host}/adapter/${this.props.adapterName}/${this.props.schema.url}`;\n }\n\n if (this.props.schema.i18n === true) {\n // load i18n from files\n const pos = url.lastIndexOf('/');\n let i18nURL;\n if (pos !== -1) {\n i18nURL = url.substring(0, pos);\n } else {\n i18nURL = url;\n }\n const lang = I18n.getLanguage();\n const file = `${i18nURL}/i18n/${lang}.json`;\n\n await fetch(file)\n .then(data => data.json())\n .then(json => I18n.extendTranslations(json, lang))\n .catch(error => console.log(`Cannot load i18n \"${file}\": ${error}`));\n } else if (this.props.schema.i18n && typeof this.props.schema.i18n === 'object') {\n try {\n I18n.extendTranslations(this.props.schema.i18n);\n } catch (error) {\n console.error(`Cannot import i18n: ${error}`);\n }\n }\n\n try {\n const [uniqueName, fileToLoad, ...componentName] = this.props.schema.name.split('/');\n console.log(uniqueName, fileToLoad, componentName.join('/'));\n // const component = await window.importFederation(uniqueName, {url, format: 'esm', from: 'vite'}, fileToLoad);\n const component = (await loadComponent(uniqueName, 'default', `./${fileToLoad}`, url)()).default;\n\n if (!component || !component || !component[componentName.join('/')]) {\n const keys = Object.keys(component || {});\n console.error('URL is empty. Cannot load custom component!');\n this.setState({ error: `Component ${this.props.schema.name} not found in ${this.props.schema.url}. Found: ${keys.join(', ')}` });\n } else {\n this.setState({ Component: component[componentName.join('/')] });\n }\n } catch (error) {\n this.setState({ error: `Cannot import from ${this.props.schema.url}: ${error}` });\n }\n }\n\n render() {\n const Component = this.state.Component;\n\n // render temporary placeholder\n if (!Component) {\n if (this.state.error) {\n return;\n } else {\n const schema = this.props.schema || {};\n\n const item = <Grid\n item\n xs={schema.xs || undefined}\n lg={schema.lg || undefined}\n md={schema.md || undefined}\n sm={schema.sm || undefined}\n style={Object.assign({}, {\n marginBottom: 0,\n //marginRight: 8,\n textAlign: 'left',\n width: schema.type === 'divider' || schema.type === 'header' ? schema.width || '100%' : undefined\n }, schema.style, this.props.themeType === 'dark' ? schema.darkStyle : {})}>\n {this.state.error ? <div>{this.state.error}</div> : <LinearProgress />}\n </Grid>;\n\n if (schema.newLine) {\n return <>\n <div style={{ flexBasis: '100%', height: 0 }} />\n {item}\n </>;\n } else {\n return item;\n }\n }\n }\n\n return <Component {...this.props} />;\n }\n}\n\nConfigCustom.propTypes = {\n socket: PropTypes.object,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n attr: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object.isRequired,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default ConfigCustom;","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport { DatePicker } from '@mui/x-date-pickers';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n indeterminate: {\n opacity: 0.5\n }\n});\n\nclass ConfigDatePicker extends ConfigGeneric {\n componentDidMount() {\n super.componentDidMount();\n const value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n this.setState({ value });\n }\n\n renderItem(error, disabled, defaultValue) {\n return <DatePicker\n fullWidth\n margin=\"normal\"\n format={this.props.systemConfig.dateFormat.toLowerCase().replace('mm','MM')}\n error={!!error}\n disabled={!!disabled}\n value={this.state.value === null || this.state.value === undefined ? new Date() : this.state.value}\n KeyboardButtonProps={{\n 'aria-label': 'change date',\n }}\n inputProps={{ maxLength: this.props.schema.maxLength || this.props.schema.max || undefined }}\n onChange={value => {\n this.setState({ value }, () =>\n this.onChange(this.props.attr, value));\n }}\n InputLabelProps={{\n shrink: true,\n }}\n placeholder={this.getText(this.props.schema.placeholder)}\n label={this.getText(this.props.schema.label)}\n helperText={this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}\n />;\n }\n}\n\nConfigDatePicker.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigDatePicker);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\nimport Dropzone from 'react-dropzone';\n\nimport InputLabel from '@mui/material/InputLabel';\nimport MenuItem from '@mui/material/MenuItem';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport FormControl from '@mui/material/FormControl';\nimport Select from '@mui/material/Select';\nimport IconButton from '@mui/material/IconButton';\nimport ListItemText from '@mui/material/ListItemText';\nimport ListItemIcon from '@mui/material/ListItemIcon';\n\nimport IconRefresh from '@mui/icons-material/Refresh';\nimport IconUpload from '@mui/icons-material/UploadFile';\nimport IconDelete from '@mui/icons-material/Delete';\nimport IconPlay from '@mui/icons-material/PlayArrow';\nimport IconAudio from '@mui/icons-material/MusicNote';\nimport IconVideo from '@mui/icons-material/Videocam';\nimport IconText from '@mui/icons-material/Article';\nimport IconCode from '@mui/icons-material/Code';\nimport { FaFileUpload as UploadIcon } from 'react-icons/fa';\n\nimport Utils from '@iobroker/adapter-react-v5/Components/Utils';\nimport I18n from '@iobroker/adapter-react-v5/i18n';\nimport ConfirmDialog from '@iobroker/adapter-react-v5/Dialogs/Confirm';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%'\n },\n fullWidthOneButton: {\n width: 'calc(100% - 42px)'\n },\n fullWidthTwoButtons: {\n width: 'calc(100% - 84px)'\n },\n fullWidthThreeButtons: {\n width: 'calc(100% - 126x)'\n },\n dropZone: {\n width: '100%',\n height: '100%',\n position: 'absolute',\n },\n dropZoneEmpty: {\n\n },\n image: {\n objectFit: 'contain',\n margin: 'auto',\n display: 'flex',\n width: '100%',\n height: '100%',\n },\n\n uploadDiv: {\n position: 'relative',\n width: '100%',\n },\n uploadDivDragging: {\n opacity: 1,\n background: 'rgba(128,255,128,0.1)'\n },\n\n uploadCenterDiv: {\n margin: 5,\n border: '3px dashed grey',\n borderRadius: 5,\n width: '100%',\n height: '100%',\n position: 'absolute',\n display: 'flex'\n },\n uploadCenterIcon: {\n paddingTop: 10,\n width: 48,\n height: 48,\n },\n uploadCenterText: {\n fontSize: 16,\n },\n uploadCenterTextAndIcon: {\n textAlign: 'center',\n position: 'absolute',\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center'\n\n },\n disabledOpacity: {\n opacity: 0.3,\n cursor: 'default'\n },\n error: {\n border: '2px solid red'\n },\n deleteButton: {\n\n },\n selectedImage: {\n height: 40,\n width: 40,\n display: 'inline-block',\n marginRight: 8,\n }\n});\n\nconst IMAGE_EXT = ['jpg', 'jpeg', 'svg', 'png', 'webp'];\nconst AUDIO_EXT = ['mp3', 'ogg', 'wav', 'aac'];\nconst VIDEO_EXT = ['avi', 'mp4', 'mov'];\nconst DOC_EXT = ['txt', 'log', 'html', 'htm'];\nconst JS_EXT = ['json', 'js', 'ts'];\n\nclass ConfigFileSelector extends ConfigGeneric {\n constructor(props) {\n super(props);\n this.dropzoneRef = React.createRef();\n this.imagePrefix = this.props.imagePrefix === undefined ? './files' : this.props.imagePrefix;\n }\n\n componentDidMount() {\n super.componentDidMount();\n\n this.objectID = (this.props.schema.objectID || '0_userdata.0').replace('%INSTANCE%', this.props.instance);\n this.path = this.props.schema.upload;\n if (this.path) {\n if (this.path === '/') {\n this.path = '';\n } else {\n if (!this.path.endsWith('/')) {\n this.path = this.path + '/';\n }\n }\n }\n\n // read files\n this.updateFiles()\n .then(() => {\n const value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n this.setState({ value });\n });\n }\n\n updateFiles() {\n return this.readFiles(this.props.schema.pattern)\n .then(files => this.setState({ files }));\n }\n\n async readFolder(folderName, files, filter) {\n try {\n const dirFiles = await this.props.socket.readDir(this.objectID, folderName.replace(/^\\//, '') || null);\n for (let f = 0; f < dirFiles.length; f++) {\n const file = dirFiles[f];\n if (file.isDir) {\n // read it\n await this.readFolder(`${folderName + file.file}/`, files, filter);\n } else {\n let ok = false;\n if (filter === '*.*' && file.file.includes('.')) {\n ok = true;\n } else if (!filter || filter === '*') {\n ok = true;\n } else if (filter === '.*' && file.file.startsWith('.')) {\n ok = true;\n } else {\n const regExp = new RegExp('^' + filter.replace(/\\./g, '\\\\.').replace(/\\*/g,'.*') + '$');\n ok = regExp.test(file.file);\n }\n\n ok && files.push({ name: folderName + file.file, size: file.stats ? Utils.formatBytes(file.stats.size) : '--' })\n }\n }\n } catch (e) {\n console.error(`Cannot read \"${folderName}\": ${e}`);\n }\n\n return files;\n }\n\n async readFiles(pattern) {\n const files = [];\n pattern = pattern || this.props.schema.pattern;\n if (!pattern) {\n pattern = '**/*.*';\n }\n let filter;\n const pos = pattern.lastIndexOf('/');\n if (pos === -1) {\n filter = pattern;\n } else {\n filter = pattern.substring(pos + 1);\n }\n\n if (pattern.startsWith('**')) {\n // read all folders\n await this.readFolder('/', files, filter);\n } else {\n const pos = pattern.lastIndexOf('/');\n if (pos === -1) {\n await this.readFolder('/', files, filter);\n } else {\n const folder = pattern.substring(0, pos + 1);\n await this.readFolder(folder, files, filter);\n }\n }\n\n return files;\n }\n\n onDrop(acceptedFiles) {\n const file = acceptedFiles[0];\n const reader = new FileReader();\n const maxSize = this.props.schema.maxSize || (2 * 1024 * 1024);\n\n reader.onabort = () => console.log('file reading was aborted');\n reader.onerror = () => console.log('file reading has failed');\n reader.onload = () => {\n let ext = 'image/' + file.name.split('.').pop().toLowerCase();\n if (ext === 'image/jpg') {\n ext = 'image/jpeg';\n } else if (ext.includes('svg')) {\n ext = 'image/svg+xml';\n }\n if (file.size > maxSize) {\n return window.alert(I18n.t('File is too big. Max %sk allowed. Try use SVG.', Math.round(maxSize / 1024)));\n }\n const base64 = `data:${ext};base64,${btoa(\n new Uint8Array(reader.result)\n .reduce((data, byte) => data + String.fromCharCode(byte), ''))}`;\n\n this.props.socket.writeFile64(this.objectID, this.path + file.name, base64)\n .then(() => this.updateFiles())\n .catch(e => window.alert('Cannot upload file: ' + e));\n };\n reader.readAsArrayBuffer(file);\n }\n\n renderDeleteDialog() {\n if (!this.state.deleteFile) {\n return null;\n }\n return <ConfirmDialog\n title={ I18n.t('ra_Are you sure?') }\n text={ I18n.t('ra_File will be deleted') }\n ok={ I18n.t('ra_Delete') }\n cancel={ I18n.t('ra_Cancel') }\n onClose={isOk => {\n const deleteFile = this.state.deleteFile;\n this.setState({deleteFile: false}, () => {\n if (isOk) {\n this.props.socket.deleteFile(this.objectID, deleteFile)\n .then(() => this.updateFiles())\n .catch(e => window.alert('Cannot delete file: ' + e));\n }\n });\n }}\n />;\n }\n\n static base64ToArrayBuffer(base64) {\n const binaryString = window.atob(base64);\n const len = binaryString.length;\n const bytes = new Uint8Array(len);\n for (let i = 0; i < len; i++) {\n bytes[i] = binaryString.charCodeAt(i);\n }\n return bytes.buffer;\n }\n\n loadFile() {\n return this.props.socket.readFile(this.objectID, this.state.value, true);\n }\n\n play() {\n this.loadFile()\n .then(data => {\n if (typeof AudioContext !== 'undefined') {\n const context = new AudioContext();\n const buf = ConfigFileSelector.base64ToArrayBuffer(data.file);\n context.decodeAudioData(buf, buffer => {\n const source = context.createBufferSource(); // creates a sound source\n source.buffer = buffer; // tell the source which sound to play\n source.connect(context.destination); // connect the source to the context's destination (the speakers)\n source.start(0);\n }, err => window.alert('Cannot play: ' + err));\n }\n });\n }\n\n getIcon(item) {\n if (!item || !item.extension) {\n return null;\n }\n if (IMAGE_EXT.includes(item.extension)) {\n return <div className={this.props.classes.selectedImage} style={{\n backgroundImage: `url(${this.imagePrefix}/${this.objectID}/${item.value})`,\n backgroundSize: 'contain',\n backgroundRepeat: 'no-repeat',\n }} />;\n } else if (AUDIO_EXT.includes(item.extension)) {\n return <IconAudio />;\n } else if (DOC_EXT.includes(item.extension)) {\n return <IconText />;\n } else if (VIDEO_EXT.includes(item.extension)) {\n return <IconVideo />;\n } else if (JS_EXT.includes(item.extension)) {\n return <IconCode />;\n }\n return null;\n }\n\n renderItem(error, disabled, defaultValue) {\n if (!this.state.files) {\n return null;\n }\n let folders = [];\n if (!this.props.schema.withFolder) {\n this.state.files.forEach(file => {\n const pos = file.name.lastIndexOf('/');\n if (pos === -1) {\n if (!folders.includes('/')) {\n folders.push('/');\n }\n } else {\n const folder = file.name.substring(0, pos + 1);\n if (!folders.includes(folder)) {\n folders.push(folder);\n }\n }\n });\n }\n\n const selectOptions = this.state.files\n .map(file => ({\n value: file.name,\n label: !this.props.schema.withFolder && folders.length === 1 ? `${file.name.substring(folders[0].length)}` : `${file.name}` + (this.props.schema.noSize ? '' : `(${file.size})`),\n extension: file.name.toLowerCase().split('.').pop(),\n }));\n\n if (!this.props.schema.noNone) {\n selectOptions.unshift({label: I18n.t('ra_none'), value: ''});\n }\n\n // eslint-disable-next-line\n const item = selectOptions.find(item => item.value === this.state.value);\n\n let buttons = 0;\n\n if (this.props.schema.upload) {\n buttons++;\n }\n if (this.props.schema.refresh) {\n buttons++;\n }\n let play = this.state.value && (this.state.value.endsWith('.mp3') || this.state.value.endsWith('.ogg') || this.state.value.endsWith('.wav'));\n // show play button\n if (play) {\n buttons++;\n }\n\n const element = <div className={this.props.classes.fullWidth}>\n <FormControl variant=\"standard\" style={{width: `calc(100% - ${buttons * 42}px)`}}>\n <InputLabel>{this.getText(this.props.schema.label)}</InputLabel>\n <Select\n variant=\"standard\"\n error={!!error}\n disabled={!!disabled}\n value={this.state.value || '_'}\n renderValue={val => {\n return <>{this.getIcon(item)}<span>{item?.label || ''}</span></>\n }}\n onChange={e => {\n this.setState({value: e.target.value === '_' ? '' : e.target.value}, () =>\n this.onChange(this.props.attr, this.state.value));\n }}\n >\n {selectOptions.map(item => {\n return <MenuItem key={item.value} value={item.value}>\n <ListItemIcon>{this.getIcon(item)}</ListItemIcon>\n <ListItemText>{item.label}</ListItemText>\n {this.props.schema.delete && item.value ?\n <IconButton className={this.props.classes.deleteButton} size=\"small\"\n onClick={() => this.setState({deleteFile: item.value})}><IconDelete/></IconButton> : null}\n </MenuItem>;\n })}\n </Select>\n {this.props.schema.help ? <FormHelperText>{this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}</FormHelperText> : null}\n </FormControl>\n { this.props.schema.refresh && <IconButton onClick={() => this.updateFiles()}><IconRefresh /></IconButton> }\n { this.props.schema.upload && <IconButton onClick={() => this.dropzoneRef.current?.open()}><IconUpload /></IconButton> }\n { play && <IconButton style={{ color: '#00FF00' }} onClick={() => this.play()}><IconPlay /></IconButton> }\n </div>;\n\n if (!this.props.schema.upload) {\n return <>{element}{this.renderDeleteDialog()}</>;\n } else {\n let accept = {'*/*': []};\n if (this.props.schema.pattern) {\n const last = this.props.schema.pattern.split('/').pop().toLowerCase().replace(/.*\\./, '');\n if (last === 'png' || last === 'jpg' || last === 'svg') {\n accept = {\n 'image/*': ['.png', '.jpg', '.svg']\n };\n } else if (last === 'mp3' || last === 'ogg' || last === 'wav') {\n accept = {\n 'audio/*': ['.mp3', '.ogg', '.wav', '.mp4']\n };\n } else if (last === 'ics') {\n accept = {\n 'text/calendar': ['.mp3', '.ogg', '.wav', '.mp4']\n };\n } else if (last === 'txt') {\n accept = {\n 'text/plain': ['.txt']\n };\n } else if (last === 'pem') {\n accept = {\n 'text/plain': ['.pem']\n };\n } else if (last === 'pem') {\n accept = {\n '*/*': ['.' + last]\n };\n }\n }\n\n return <Dropzone\n ref={this.dropzoneRef}\n multiple={false}\n accept={accept}\n noKeyboard\n noClick\n maxSize={this.props.schema.maxSize || 2 * 1024 * 1024}\n onDragEnter={() => {\n this.setState({ uploadFile: 'dragging' });\n }}\n onDragLeave={() => this.setState({ uploadFile: true })}\n onDrop={(acceptedFiles, errors) => {\n this.setState({ uploadFile: false });\n if (!acceptedFiles.length) {\n window.alert((errors && errors[0] && errors[0].errors && errors[0].errors[0] && errors[0].errors[0].message) || I18n.t('Cannot upload'));\n } else {\n return this.onDrop(acceptedFiles);\n }\n }}\n >\n {({ getRootProps, getInputProps }) => <div\n className={Utils.clsx(\n this.props.classes.uploadDiv,\n this.state.uploadFile === 'dragging' && this.props.classes.uploadDivDragging,\n disabled && this.props.classes.disabledOpacity,\n )}\n {...getRootProps()}\n >\n <input {...getInputProps()} />\n {this.state.uploadFile === 'dragging' ? <div className={Utils.clsx(this.props.classes.uploadCenterDiv, this.state.uploadError && this.props.classes.error)}>\n <div className={this.props.classes.uploadCenterTextAndIcon}>\n <UploadIcon className={this.props.classes.uploadCenterIcon} />\n <div className={this.props.classes.uploadCenterText}>{\n this.state.uploadFile === 'dragging' ? I18n.t('ra_Drop file here') :\n I18n.t('ra_Place your files here or click here to open the browse dialog')}</div>\n </div>\n </div> : null}\n {element}\n {this.renderDeleteDialog()}\n </div>}\n </Dropzone>;\n }\n }\n}\n\nConfigFileSelector.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n imagePrefix: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigFileSelector);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport Button from '@mui/material/Button';\nimport TextField from '@mui/material/TextField';\nimport IconButton from '@mui/material/IconButton';\n\nimport IconText from '@mui/icons-material/Article';\nimport IconVideo from '@mui/icons-material/Videocam';\nimport IconCode from '@mui/icons-material/Code';\nimport IconPlay from '@mui/icons-material/PlayArrow';\n\nimport FileSelectDialog from '@iobroker/adapter-react-v5/Dialogs/FileSelect';\n\nimport ConfigGeneric from './ConfigGeneric';\nimport ConfigFileSelector from './ConfigFileSelector';\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%'\n },\n fullWidthOneButton: {\n width: 'calc(100% - 69px)',\n marginRight: 4,\n },\n fullWidthIcon: {\n width: 'calc(100% - 119px)',\n marginRight: 4,\n },\n selectedImage: {\n height: 40,\n width: 40,\n display: 'inline-block',\n marginRight: 8,\n }\n});\n\nconst IMAGE_EXT = ['jpg', 'jpeg', 'svg', 'png', 'webp'];\nconst AUDIO_EXT = ['mp3', 'ogg', 'wav', 'aac'];\nconst VIDEO_EXT = ['avi', 'mp4', 'mov'];\nconst DOC_EXT = ['txt', 'log', 'html', 'htm'];\nconst JS_EXT = ['json', 'js', 'ts'];\n\nclass ConfigFile extends ConfigGeneric {\n componentDidMount() {\n super.componentDidMount();\n const value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n this.imagePrefix = this.props.imagePrefix === undefined ? './files' : this.props.imagePrefix;\n this.setState({ value });\n }\n\n static getDerivedStateFromProps(props, state) {\n const value = ConfigGeneric.getValue(props.data, props.attr);\n if (value === null || value === undefined || value.toString().trim() !== (state.value || '').toString().trim()) {\n return { value };\n } else {\n return null;\n }\n }\n\n loadFile() {\n const pos = this.state.value.indexOf('/');\n if (pos !== -1) {\n const adapter = this.state.value.substring(0, pos);\n const path = this.state.value.substring(pos + 1);\n return this.props.socket.readFile(adapter, path, true);\n }\n }\n\n play() {\n this.loadFile()\n .then(data => {\n if (typeof AudioContext !== 'undefined') {\n const context = new AudioContext();\n const buf = ConfigFileSelector.base64ToArrayBuffer(data.file);\n context.decodeAudioData(buf, buffer => {\n const source = context.createBufferSource(); // creates a sound source\n source.buffer = buffer; // tell the source which sound to play\n source.connect(context.destination); // connect the source to the context's destination (the speakers)\n source.start(0);\n }, err => window.alert('Cannot play: ' + err));\n }\n });\n }\n\n getIcon() {\n const extension = this.state.value.split('.').pop().toLowerCase();\n if (IMAGE_EXT.includes(extension)) {\n return <div className={this.props.classes.selectedImage} style={{\n backgroundImage: `url(${this.imagePrefix}/${this.state.value})`,\n backgroundSize: 'contain',\n backgroundRepeat: 'no-repeat',\n }} />;\n } else if (AUDIO_EXT.includes(extension)) {\n return <IconButton style={{ color: '#00FF00' }} onClick={() => this.play()}><IconPlay /></IconButton>;\n } else if (DOC_EXT.includes(extension)) {\n return <IconText />;\n } else if (VIDEO_EXT.includes(extension)) {\n return <IconVideo />;\n } else if (JS_EXT.includes(extension)) {\n return <IconCode />;\n }\n return null;\n }\n\n renderFileBrowser() {\n if (!this.state.showFileBrowser) {\n return null;\n } else {\n return <FileSelectDialog\n imagePrefix={this.props.imagePrefix}\n socket={this.props.socket}\n selected={this.state.value}\n onClose={() => this.setState({ showFileBrowser: false})}\n onOk={value => {\n this.setState({ value }, () =>\n this.onChange(this.props.attr, this.props.schema.trim === false ? value : (value || '').trim()));\n }}\n selectOnlyFolders={this.props.schema.selectOnlyFolders}\n allowUpload={this.props.schema.allowUpload}\n allowDownload={this.props.schema.allowDownload}\n allowCreateFolder={this.props.schema.allowCreateFolder}\n allowView={this.props.schema.allowView}\n showToolbar={this.props.schema.showToolbar}\n limitPath={this.props.schema.limitPath}\n />;\n }\n }\n\n renderItem(error, disabled, defaultValue) {\n const icon = this.getIcon();\n\n return <div className={this.props.classes.fullWidth}>\n {icon}\n <TextField\n variant=\"standard\"\n className={icon ? this.props.classes.fullWidthIcon : this.props.classes.fullWidthOneButton}\n value={this.state.value === null || this.state.value === undefined ? '' : this.state.value}\n error={!!error}\n disabled={!!disabled}\n inputProps={{\n maxLength: this.props.schema.maxLength || this.props.schema.max || undefined,\n readOnly: !!this.props.schema.disableEdit\n }}\n onChange={e => {\n const value = e.target.value;\n this.setState({ value }, () =>\n this.onChange(this.props.attr, this.props.schema.trim === false ? value : (value || '').trim()));\n }}\n placeholder={this.getText(this.props.schema.placeholder)}\n label={this.getText(this.props.schema.label)}\n helperText={this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}\n />\n <Button variant=\"outlined\" onClick={() => this.setState({ showFileBrowser: true })}>...</Button>\n {this.renderFileBrowser()}\n </div>;\n }\n}\n\nConfigFile.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n imagePrefix: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigFile);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport InputLabel from '@mui/material/InputLabel';\nimport MenuItem from '@mui/material/MenuItem';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport FormControl from '@mui/material/FormControl';\nimport Select from '@mui/material/Select';\n\nimport TextWithIcon from '@iobroker/adapter-react-v5/Components/TextWithIcon';\nimport I18n from '@iobroker/adapter-react-v5/i18n';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%'\n }\n});\n\nclass ConfigFunc extends ConfigGeneric {\n componentDidMount() {\n super.componentDidMount();\n const value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n\n this.props.socket.getEnums('functions')\n .then(enums => {\n const selectOptions = Object.keys(enums)\n .map(id => ({ value: this.props.schema.short ? id.replace('enum.functions.', '') : id, label: this.getText(enums[id].common.name), obj: enums[id]}));\n this.setState({ value, selectOptions });\n });\n }\n\n renderItem(error, disabled, defaultValue) {\n if (!this.state.selectOptions) {\n return null;\n }\n\n const item = this.state.selectOptions.find(item => item.value === this.state.value);\n\n return <FormControl\n variant=\"standard\"\n className={this.props.classes.fullWidth}\n >\n <InputLabel>{this.getText(this.props.schema.label)}</InputLabel>\n <Select\n variant=\"standard\"\n error={!!error}\n disabled={!!disabled}\n value={this.state.value || '_'}\n renderValue={val => item ? <TextWithIcon value={item.obj} themeType={this.props.themeType} lang={I18n.getLanguage()}/> : ''}\n onChange={e => {\n this.setState({value: e.target.value === '_' ? '' : e.target.value}, () =>\n this.onChange(this.props.attr, this.state.value));\n }}\n >\n {this.state.selectOptions.map(item =>\n <MenuItem key={item.value} value={item.value} style={item.value === ConfigGeneric.DIFFERENT_VALUE ? {opacity: 0.5} : {}}>\n <TextWithIcon value={item.obj} themeType={this.props.themeType} lang={I18n.getLanguage()}/>\n </MenuItem>)}\n </Select>\n {this.props.schema.help ? <FormHelperText>{this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}</FormHelperText> : null}\n </FormControl>;\n }\n}\n\nConfigFunc.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigFunc);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport InputLabel from '@mui/material/InputLabel';\nimport MenuItem from '@mui/material/MenuItem';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport FormControl from '@mui/material/FormControl';\nimport Select from '@mui/material/Select';\n\nimport I18n from '@iobroker/adapter-react-v5/i18n';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%'\n }\n});\n\nclass ConfigIP extends ConfigGeneric {\n\n componentDidMount() {\n super.componentDidMount();\n this.props.socket.getHostByIp(this.props.common.host)\n .then(ips => {\n // [{name, address, family}]\n if (!this.props.schema.listenOnAllPorts) {\n ips = ips.filter(item => item.address !== '0.0.0.0' && item.address !== '::');\n }\n if (this.props.schema.onlyIp4) {\n ips = ips.filter(item => item.family === 'ipv4');\n } else\n if (this.props.schema.onlyIp6) {\n ips = ips.filter(item => item.family === 'ipv6');\n }\n ips.forEach(item => {\n if (item.address === '0.0.0.0') {\n item.name = '[IPv4] 0.0.0.0 - ' + I18n.t('ra_Listen on all IPs');\n } else\n if (item.address === '::') {\n item.name = '[IPv6] :: - ' + I18n.t('ra_Listen on all IPs');\n }\n });\n this.setState({ips});\n });\n }\n\n renderItem(error, disabled, defaultValue) {\n const value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n const item = this.state.ips?.find(item => item.address === value);\n\n return <FormControl className={this.props.classes.fullWidth} variant=\"standard\">\n <InputLabel>{this.getText(this.props.schema.label)}</InputLabel>\n <Select\n variant=\"standard\"\n error={!!error}\n disabled={!!disabled}\n value={value}\n renderValue={val => item?.name || val}\n onChange={e => this.onChange(this.props.attr, e.target.value)}\n >\n {this.state.ips?.map((item, i) =>\n <MenuItem key={i} value={item.address}>{item.name}</MenuItem>)}\n </Select>\n {this.props.schema.help ? <FormHelperText>{this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}</FormHelperText> : null}\n </FormControl>;\n }\n}\n\nConfigIP.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigIP);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport InputLabel from '@mui/material/InputLabel';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport FormControl from '@mui/material/FormControl';\n\nimport UploadImage from '@iobroker/adapter-react-v5/Components/UploadImage';\nimport I18n from '@iobroker/adapter-react-v5/i18n';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%'\n },\n image: {\n width: 100\n }\n});\n\nclass ConfigImageUpload extends ConfigGeneric {\n constructor(props) {\n super(props);\n this.imageRef = React.createRef();\n this.index = Date.now();\n }\n async componentDidMount() {\n super.componentDidMount();\n\n if (this.props.schema.base64) {\n const value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n this.setState({ value });\n } else {\n this.props.socket.fileExists(this.props.adapterName + '.' + this.props.instance, this.props.attr)\n .then(exist => {\n if (exist && this.imageRef.current) {\n this.imageRef.current.src = this._getUrl();\n this.imageRef.current.style.display = 'block';\n }\n });\n }\n }\n\n _getUrl(update) {\n if (update) {\n this.index = Date.now();\n }\n let url = `files/${this.props.adapterName}.${this.props.instance}/${this.props.attr}?t=${this.index}`;\n if (window.location.port === '3000') {\n url = `${window.location.protocol}//${window.location.hostname}:8081/${url}`;\n }\n\n return url;\n }\n\n renderItem(error, disabled, defaultValue) {\n // eslint-disable-next-line\n return <FormControl className={this.props.classes.fullWidth} variant=\"standard\">\n <InputLabel shrink>{this.getText(this.props.schema.label)}</InputLabel>\n <UploadImage\n error={!!error}\n disabled={disabled}\n accept={this.props.schema.accept}\n crop={this.props.schema.crop}\n maxSize={this.props.schema.maxSize || 256 * 1024}\n icon={this.state.value || undefined}\n removeIconFunc={() => {\n if (this.props.schema.base64) {\n this.setState({ value: null }, () =>\n this.onChange(this.props.attr, this.state.value));\n } else {\n // delete file to /instance/attr\n this.props.socket.deleteFile(this.props.adapterName + '.' + this.props.instance, this.props.attr);\n // update image\n if (this.imageRef.current) {\n this.imageRef.current.style.display = 'none';\n this.imageRef.current.src = '';\n }\n }\n }}\n onChange={base64 => {\n if (this.props.schema.base64) {\n this.setState({ value: base64 }, () =>\n this.onChange(this.props.attr, this.state.value));\n } else {\n if (base64.startsWith('data')) {\n base64 = base64.split(',')[1];\n }\n // upload file to /instance/attr\n this.props.socket.writeFile64(this.props.adapterName + '.' + this.props.instance, this.props.attr, base64)\n .then(() => {\n if (this.imageRef.current) {\n this.imageRef.current.style.display = 'block';\n this.imageRef.current.src = this._getUrl(true);\n }\n });\n }\n }}\n t={I18n.t}\n />\n {this.props.schema.help ? <FormHelperText>{this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}</FormHelperText> : null}\n {this.props.schema.base64 ? null : <img\n src={this._getUrl()}\n ref={this.imageRef}\n className={this.props.classes.image}\n style={{display: 'none'}}\n alt=\"Background\"\n />}\n </FormControl>;\n }\n}\n\nConfigImageUpload.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigImageUpload);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport InputLabel from '@mui/material/InputLabel';\nimport MenuItem from '@mui/material/MenuItem';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport FormControl from '@mui/material/FormControl';\nimport Select from '@mui/material/Select';\n\nimport I18n from '@iobroker/adapter-react-v5/i18n';\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%'\n },\n});\n\nclass ConfigInstanceSelect extends ConfigGeneric {\n async componentDidMount() {\n super.componentDidMount();\n const value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n\n let adapter = this.props.schema.adapter;\n if (adapter === '_dataSources') {\n adapter = undefined;\n }\n\n this.props.socket.getAdapterInstances(adapter, true)\n .then(async instances => {\n let selectOptions;\n if (this.props.schema.adapter === '_dataSources') {\n // get only \"data-sources\", like history, sql, influx\n instances = instances.filter(instance => instance && instance.common && instance.common.getHistory);\n } else if (this.props.schema.adapter) {\n instances = instances.filter(instance => instance && instance._id.startsWith('system.adapter.' + this.props.schema.adapter + '.'));\n }\n\n selectOptions = instances.map(instance => ({\n value: this.props.schema.long ? instance._id :\n (this.props.schema.short ? instance._id.split('.').pop() : instance._id.replace(/^system\\.adapter\\./, '')),\n label: `${instance.common.name} [${instance._id.replace(/^system\\.adapter\\./, '')}]`\n }));\n\n selectOptions.sort((a, b) => {\n if (a.value > b.value) {\n return 1;\n } else if (a.value < b.value) {\n return -1;\n } else {\n return 0;\n }\n });\n\n selectOptions.unshift({ label: I18n.t(ConfigGeneric.NONE_LABEL), value: ConfigGeneric.NONE_VALUE });\n if (this.props.schema.all) {\n selectOptions.unshift({ label: I18n.t('sch_all'), value: '*' });\n }\n\n this.setState({ value: value || '', selectOptions });\n\n await this.props.socket.subscribeObject(`system.adapter.${adapter ? adapter + '.' : ''}*`, this.onInstancesUpdate);\n });\n }\n\n componentWillUnmount() {\n this.props.socket.unsubscribeObject('system.adapter.*', this.onInstancesUpdate)\n .then(() => {});\n super.componentWillUnmount();\n }\n\n onInstancesUpdate = (id, obj) => {\n if (!id.match(/^system\\.adapter\\.[-_a-z\\d]+\\.\\d+$/)) {\n return;\n }\n const _id = this.props.schema.long ? id : (this.props.schema.short ? id.split('.').pop() : id.replace(/^system\\.adapter\\./, ''));\n const index = this.state.selectOptions.findIndex(item => item.value === _id);\n if (!obj) {\n // deleted\n if (index !== -1) {\n const selectOptions = JSON.parse(JSON.stringify(this.state.selectOptions));\n\n const newState = {};\n if (this.state.value === selectOptions[index].value) {\n newState.value = ConfigGeneric.NONE_VALUE;\n }\n selectOptions.splice(index, 1);\n newState.selectOptions = selectOptions;\n\n this.setState(newState);\n }\n } else {\n if (this.props.schema.adapter === '_dataSources' && (!obj.common || !obj.common.getHistory)) {\n return;\n }\n\n if (index === -1) {\n const selectOptions = JSON.parse(JSON.stringify(this.state.selectOptions));\n selectOptions.push({\n value: this.props.schema.long ? obj._id :\n (this.props.schema.short ? obj._id.split('.').pop() : obj._id.replace(/^system\\.adapter\\./, '')),\n label: `${obj.common.name} [${obj._id.replace(/^system\\.adapter\\./, '')}]`\n });\n selectOptions.sort((a, b) => a.label > b.label ? 1 : (a.label < b.label ? -1 : 0));\n this.setState({ selectOptions });\n }\n }\n }\n\n renderItem(error, disabled, defaultValue) {\n if (!this.state.selectOptions) {\n return null;\n }\n\n const item = this.state.selectOptions?.find(item => item.value === this.state.value);\n\n return <FormControl className={this.props.classes.fullWidth} key={this.props.attr} variant=\"standard\">\n {this.props.schema.label ? <InputLabel shrink>{this.getText(this.props.schema.label)}</InputLabel> : null }\n <Select\n variant=\"standard\"\n error={!!error}\n displayEmpty\n disabled={!!disabled}\n value={this.state.value}\n renderValue={val => this.getText(item?.label, true)}\n onChange={e =>\n this.setState({ value: e.target.value }, () =>\n this.onChange(this.props.attr, this.state.value))}\n >\n {this.state.selectOptions.map(item =>\n <MenuItem key={item.value} value={item.value} style={item.value === ConfigGeneric.NONE_VALUE ? { opacity: 0.5 } : {}}>{\n this.getText(item.label, true)\n }</MenuItem>)}\n </Select>\n {this.props.schema.help ? <FormHelperText>{this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}</FormHelperText> : null}\n </FormControl>;\n }\n}\n\nConfigInstanceSelect.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigInstanceSelect);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport FormHelperText from '@mui/material/FormHelperText';\nimport FormControl from '@mui/material/FormControl';\nimport { Button } from '@mui/material';\n\nimport ConfigGeneric from './ConfigGeneric';\nimport I18n from '@iobroker/adapter-react-v5/i18n';\nimport CustomModal from '../CustomModal';\n\nimport AceEditor from 'react-ace';\nimport 'ace-builds/webpack-resolver';\nimport 'ace-builds/src-noconflict/mode-json';\nimport 'ace-builds/src-noconflict/theme-clouds_midnight';\nimport 'ace-builds/src-noconflict/theme-chrome';\nimport 'ace-builds/src-noconflict/ext-language_tools';\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%'\n },\n flex: {\n display: 'flex'\n },\n button: {\n height: 48,\n // marginLeft: 4,\n minWidth: 48,\n },\n wrapper: {\n width: 'calc(100vw - 40px)',\n height: 'calc(100vh - 188px)',\n }\n});\n\nclass ConfigJsonEditor extends ConfigGeneric {\n async componentDidMount() {\n super.componentDidMount();\n const { data, attr } = this.props;\n const value = ConfigGeneric.getValue(data, attr) || {};\n this.setState({ value, initialized: true });\n }\n\n renderItem(error, disabled, defaultValue) {\n if (!this.state.initialized) {\n return null;\n }\n const { classes, schema, data, attr } = this.props;\n const { value, showSelectId } = this.state;\n return <FormControl className={classes.fullWidth} variant=\"standard\">\n <div className={classes.flex}>\n <Button\n color=\"grey\"\n className={classes.button}\n size=\"small\"\n variant=\"outlined\"\n onClick={() => this.setState({ showSelectId: true })}\n >{I18n.t('ra_JSON editor')}</Button>\n </div>\n {showSelectId ? <CustomModal\n title={this.getText(schema.label)}\n open={showSelectId}\n overflowHidden\n onClose={() => this.setState({ showSelectId: false, value: ConfigGeneric.getValue(data, attr) || {} })}\n onApply={() => this.setState({ showSelectId: false }, () => this.onChange(attr, value))}\n >\n <div className={classes.wrapper}>\n <AceEditor\n mode=\"json\"\n theme={this.props.themeName === 'dark' ? 'clouds_midnight' : 'chrome'}\n value={value}\n width=\"100%\"\n height=\"100%\"\n onChange={newValue => this.setState({ value: newValue })}\n name=\"ConfigJsonEditor\"\n fontSize={14}\n setOptions={{\n enableBasicAutocompletion: true,\n enableLiveAutocompletion: true,\n enableSnippets: true\n }}\n editorProps={{ $blockScrolling: true }}\n />\n </div>\n </CustomModal> : null}\n {schema.help ? <FormHelperText>{this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}</FormHelperText> : null}\n </FormControl>;\n }\n}\n\nConfigJsonEditor.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigJsonEditor);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport InputLabel from '@mui/material/InputLabel';\nimport MenuItem from '@mui/material/MenuItem';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport FormControl from '@mui/material/FormControl';\nimport Select from '@mui/material/Select';\n\nimport I18n from '@iobroker/adapter-react-v5/i18n';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%'\n }\n});\n\nconst LANGUAGES =[\n {\n value: 'en',\n label: 'English'\n },\n {\n value: 'de',\n label: 'Deutsch'\n },\n {\n value: 'ru',\n label: 'русский'\n },\n {\n value: 'pt',\n label: 'Portugues'\n },\n {\n value: 'nl',\n label: 'Nederlands'\n },\n {\n value: 'fr',\n label: 'français'\n },\n {\n value: 'it',\n label: 'Italiano'\n },\n {\n value: 'es',\n label: 'Espanol'\n },\n {\n value: 'pl',\n label: 'Polski'\n },\n {\n value: 'zh-ch',\n label: '简体中文'\n }\n];\n\nclass ConfigLanguage extends ConfigGeneric {\n componentDidMount() {\n super.componentDidMount();\n const value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n const languages = [...LANGUAGES];\n if (this.props.schema.system) {\n languages.unshift({value: '', label: I18n.t('ra_System language')});\n }\n\n this.setState({value: value || I18n.getLanguage(), selectOptions: languages});\n }\n\n renderItem(error, disabled, defaultValue) {\n if (!this.state.selectOptions) {\n return null;\n }\n\n const item = this.state.selectOptions?.find(item => item.value === this.state.value || (!item.value && !this.state.value));\n\n return <FormControl className={this.props.classes.fullWidth} variant=\"standard\">\n <InputLabel>{this.getText(this.props.schema.label)}</InputLabel>\n <Select\n variant=\"standard\"\n error={!!error}\n disabled={!!disabled}\n value={this.state.value || '_'}\n renderValue={val => this.getText(item?.label, this.props.schema.noTranslation)}\n onChange={e => {\n const value = e.target.value === '_' ? '' : e.target.value;\n this.setState({ value }, () => {\n this.onChange(this.props.attr, value);\n if (this.props.schema.changeGuiLanguage) {\n if (value) {\n if (value === I18n.getLanguage()) {\n return;\n }\n I18n.setLanguage(value);\n this.props.changeLanguage && this.props.changeLanguage();\n } else {\n this.props.socket.getSystemConfig()\n .then(systemConfig => {\n if (systemConfig.common.language === I18n.getLanguage()) {\n return;\n }\n if (systemConfig.common.language) {\n I18n.setLanguage(systemConfig.common.language);\n this.props.changeLanguage && this.props.changeLanguage();\n }\n });\n }\n }\n });\n }}\n >\n {this.state.selectOptions?.map(item =>\n <MenuItem key={item.value} value={item.value}>{item.label}</MenuItem>)}\n </Select>\n {this.props.schema.help ? <FormHelperText>{this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}</FormHelperText> : null}\n </FormControl>;\n }\n}\n\nConfigLanguage.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigLanguage);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport { Autocomplete, TextField, FormControl } from '@mui/material';\n\nimport I18n from '@iobroker/adapter-react-v5/i18n';\nimport Utils from '@iobroker/adapter-react-v5/Components/Utils';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n indeterminate: {\n opacity: 0.5\n },\n control: {\n flexDirection: 'row',\n width: '100%'\n },\n textWithArrows: {\n width: 'calc(100% - 12px)',\n },\n arrows: {\n width: 12,\n display: 'inline'\n },\n arrowUp: {\n fontSize: 10,\n userSelect: 'none',\n cursor: 'pointer',\n },\n arrowDown: {\n fontSize: 10,\n userSelect: 'none',\n cursor: 'pointer',\n }\n});\n\nclass ConfigNumber extends ConfigGeneric {\n componentDidMount() {\n super.componentDidMount();\n const _value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n this.setState({ _value });\n //this.props.registerOnForceUpdate(this.props.attr, this.onUpdate);\n }\n\n static getDerivedStateFromProps(props, state) {\n if ((props.schema.min !== undefined && props.schema.min < 0) ||\n (props.schema.max !== undefined && props.schema.max < 0)\n ) {\n return null;\n }\n const _value = ConfigGeneric.getValue(props.data, props.attr);\n if (_value === null || _value === undefined || _value.toString() !== parseFloat(state._value).toString()) {\n return { _value };\n } else {\n return null;\n }\n }\n\n renderItem(error, disabled, defaultValue) {\n let isIndeterminate = Array.isArray(this.state.value) || this.state.value === ConfigGeneric.DIFFERENT_VALUE;\n\n if (isIndeterminate) {\n const arr = [...this.state.value].map(item => ({label: item.toString(), value: item}));\n arr.unshift({label: I18n.t(ConfigGeneric.DIFFERENT_LABEL), value: ConfigGeneric.DIFFERENT_VALUE});\n\n return <Autocomplete\n className={this.props.classes.indeterminate}\n fullWidth\n value={arr[0]}\n getOptionSelected={(option, value) => option.label === value.label}\n onChange={(_, value) =>\n this.onChange(this.props.attr, value ? parseFloat(value.value) : this.props.schema.min || 0)}\n options={arr}\n getOptionLabel={option => option.label}\n renderInput={params => <TextField\n variant=\"standard\"\n {...params}\n error={!!error}\n placeholder={this.getText(this.props.schema.placeholder)}\n label={this.getText(this.props.schema.label)}\n helperText={this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}\n disabled={!!disabled}\n />}\n />;\n } else {\n if (!error && this.state._value !== null && this.state._value !== undefined) {\n if (this.props.schema.min !== undefined && this.state._value < this.props.schema.min) {\n error = I18n.t('ra_Too small');\n }\n if (this.props.schema.max !== undefined && this.state._value > this.props.schema.max) {\n error = I18n.t('ra_Too big');\n }\n }\n\n let type = 'number';\n if ((this.props.schema.min !== undefined && this.props.schema.min < 0) ||\n (this.props.schema.max !== undefined && this.props.schema.max < 0)\n ) {\n type = 'text';\n }\n\n const isNumber = this.state._value !== null &&\n this.state._value !== undefined &&\n (typeof this.state._value === 'number' ||\n (typeof this.state._value === 'string' &&\n this.state._value.trim() === parseFloat(this.state._value).toString())\n );\n\n return <FormControl variant=\"standard\" className={this.props.classes.control}>\n <TextField\n variant=\"standard\"\n type={type}\n fullWidth\n inputProps={{ min: this.props.schema.min, max: this.props.schema.max, step: this.props.schema.step }}\n value={this.state._value === null || this.state._value === undefined ? '' : this.state._value}\n error={!!error}\n disabled={!!disabled}\n className={Utils.clsx(type === 'text' && isNumber && this.props.classes.textWithArrows)}\n onChange={e => {\n const _value = e.target.value;\n if (isFinite(_value)) {\n if (this.props.schema.min !== undefined && parseFloat(_value) < this.props.schema.min) {\n this.onError(this.props.attr, I18n.t('ra_Too small'));\n } else if (this.props.schema.max !== undefined && parseFloat(_value) > this.props.schema.max) {\n this.onError(this.props.attr, I18n.t('ra_Too big'));\n } else if (_value === '-' || isNaN(parseFloat(_value))) {\n this.onError(this.props.attr, I18n.t('ra_Not a number'));\n } else {\n this.onError(this.props.attr); // clear error\n }\n } else if (_value !== '') {\n this.onError(this.props.attr, I18n.t('ra_Not a number'));\n } else {\n this.onError(this.props.attr); // clear error\n }\n\n this.setState({ _value }, () => {\n if (_value.trim() === parseFloat(_value).toString()) {\n this.onChange(this.props.attr, parseFloat(_value) || 0);\n }\n });\n }}\n placeholder={this.getText(this.props.schema.placeholder)}\n label={this.getText(this.props.schema.label)}\n helperText={error && typeof error === 'string' ? error : this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}\n />\n {type === 'text' && isNumber ? <div className={this.props.classes.arrows}>\n <div\n className={this.props.classes.arrowUp}\n onClick={() => {\n let _value = parseFloat(this.state._value) + 1;\n if (this.props.schema.max !== undefined && _value <= this.props.schema.max) {\n this.setState({ _value });\n }\n }}\n >▲</div>\n <div\n className={this.props.classes.arrowDown}\n onClick={() => {\n let _value = parseFloat(this.state._value) - 1;\n if (this.props.schema.min !== undefined && _value >= this.props.schema.min) {\n this.setState({ _value });\n }\n }}\n >▼</div>\n </div> : null}\n </FormControl>;\n }\n }\n}\n\nConfigNumber.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigNumber);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport InputLabel from '@mui/material/InputLabel';\nimport FormControl from '@mui/material/FormControl';\nimport { Button, TextField } from '@mui/material';\n\nimport DialogSelectID from '@iobroker/adapter-react-v5/Dialogs/SelectID';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%'\n },\n flex: {\n display: 'flex'\n },\n button: {\n height: 48,\n marginLeft: 4,\n minWidth: 48,\n }\n});\n\nclass ConfigObjectId extends ConfigGeneric {\n async componentDidMount() {\n super.componentDidMount();\n const { data, attr } = this.props;\n const value = ConfigGeneric.getValue(data, attr) || '';\n this.setState({ value, initialized: true});\n }\n\n renderItem(error, disabled, defaultValue) {\n if (!this.state.initialized) {\n return null;\n }\n const { classes, schema, socket, attr } = this.props;\n const { value, showSelectId } = this.state;\n\n return <FormControl className={classes.fullWidth} variant=\"standard\">\n <InputLabel shrink>{this.getText(schema.label)}</InputLabel>\n <div className={classes.flex}>\n <TextField\n variant=\"standard\"\n fullWidth\n value={value}\n error={!!error}\n disabled={disabled}\n placeholder={this.getText(schema.placeholder)}\n label={this.getText(schema.label)}\n helperText={this.renderHelp(schema.help, schema.helpLink, schema.noTranslation)}\n onChange={e => {\n const value = e.target.value;\n this.setState({ value }, () =>\n this.onChange(attr, value))\n }}\n />\n <Button\n color=\"grey\"\n className={this.props.classes.button}\n size=\"small\"\n variant=\"outlined\"\n onClick={() => this.setState({ showSelectId: true })}\n >...</Button>\n </div>\n {showSelectId ? <DialogSelectID\n imagePrefix={this.props.imagePrefix === undefined ? '../..' : this.props.imagePrefix}\n dateFormat={this.props.dateFormat}\n isFloatComma={this.props.isFloatComma}\n dialogName={'admin.' + this.props.adapterName}\n themeType={this.props.themeType}\n socket={socket}\n statesOnly={schema.all === undefined ? true : schema.all}\n selected={value}\n onClose={() => this.setState({ showSelectId: false })}\n onOk={value =>\n this.setState({ showSelectId: false, value }, () =>\n this.onChange(attr, value))}\n /> : null}\n </FormControl>;\n }\n}\n\nConfigObjectId.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n dateFormat: PropTypes.string,\n isFloatComma: PropTypes.bool,\n imagePrefix: PropTypes.string,\n};\n\nexport default withStyles(styles)(ConfigObjectId);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport TextField from '@mui/material/TextField';\nimport IconButton from '@mui/material/IconButton';\nimport InputAdornment from '@mui/material/InputAdornment';\n\nimport Visibility from '@mui/icons-material/Visibility';\nimport VisibilityOff from '@mui/icons-material/VisibilityOff';\n\nimport I18n from '@iobroker/adapter-react-v5/i18n';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%',\n display: 'inline-block'\n },\n halfWidth1: {\n width: `calc(50% - ${theme.spacing(0.5)})`,\n display: 'inline-block',\n marginRight: theme.spacing(1),\n },\n halfWidth2: {\n width: `calc(50% - ${theme.spacing(0.5)})`,\n display: 'inline-block'\n }\n});\n\nconst PASSWORD_PLACEHOLDER = '____ppp____';\n\nclass ConfigPassword extends ConfigGeneric {\n componentDidMount() {\n super.componentDidMount();\n const value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n this.setState({\n _repeat: value ? PASSWORD_PLACEHOLDER : '',\n _visible: false,\n value: value ? PASSWORD_PLACEHOLDER : '',\n _notEqual: false\n });\n }\n\n onChangePassword(password, repeatPassword) {\n if (password === undefined) {\n password = this.state.value;\n }\n if (repeatPassword === undefined) {\n repeatPassword = this.state._repeat;\n }\n const _notEqual = !!this.props.schema.repeat && repeatPassword !== password;\n this.setState({value: password, _repeat: repeatPassword, _notEqual}, () => {\n if (_notEqual) {\n this.onError(this.props.attr, I18n.t('ra_Passwords are not equal!'));\n } else {\n this.onError(this.props.attr); // clear error\n this.onChange(this.props.attr, password);\n }\n });\n }\n\n renderItem(error, disabled, defaultValue) {\n if (this.state._notEqual === undefined) {\n return null;\n }\n\n const password = <TextField\n variant=\"standard\"\n fullWidth\n type={this.state._visible && this.state.value !== PASSWORD_PLACEHOLDER ? 'text' : 'password'}\n value={this.state.value}\n error={!!error || this.state._notEqual}\n disabled={!!disabled}\n onChange={e => this.onChangePassword(e.target.value)}\n label={this.getText(this.props.schema.label)}\n inputProps={{\n autoComplete: 'new-password',\n form: {autoComplete: 'off'},\n maxLength: this.props.schema.maxLength || this.props.schema.max || undefined\n }}\n helperText={this.state._notEqual ? I18n.t('ra_Passwords are not equal!') : this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}\n InputProps={{endAdornment: this.state.value && this.state.value !== PASSWORD_PLACEHOLDER && this.props.schema.visible ? <InputAdornment position='end'>\n <IconButton size=\"large\"\n tabIndex={-1}\n onClick={e => {\n e.preventDefault();\n e.stopPropagation();\n this.setState({_visible: !this.state._visible});\n }}\n edge='end'\n >\n {this.state._visible ? <VisibilityOff/> : <Visibility/>}\n </IconButton>\n </InputAdornment> : undefined\n }}\n />;\n\n if (this.props.schema.repeat) {\n const passwordRepeat = <TextField\n variant=\"standard\"\n fullWidth\n type={this.state._visible && this.state._repeat !== PASSWORD_PLACEHOLDER ? 'text' : 'password'}\n value={this.state._repeat}\n error={!!error || this.state._notEqual}\n disabled={!!disabled}\n onChange={e => this.onChangePassword(undefined, e.target.value)}\n label={`${this.getText(this.props.schema.label)} (${I18n.t('ra_repeat')})`}\n inputProps={{\n autoComplete: 'new-password',\n form: {autoComplete: 'off'},\n maxLength: this.props.schema.maxLength || this.props.schema.max || undefined\n }}\n helperText={this.state._notEqual ? I18n.t('ra_Passwords are not equal!') : this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}\n InputProps={{endAdornment: this.state._repeat && this.state._repeat !== PASSWORD_PLACEHOLDER ? <InputAdornment position='end'>\n <IconButton size=\"large\"\n tabIndex={-1}\n onClick={e => {\n e.preventDefault();\n e.stopPropagation();\n this.setState({_visible: !this.state._visible});\n }}\n edge='end'\n >\n {this.state._visible ? <VisibilityOff/> : <Visibility/>}\n </IconButton>\n </InputAdornment> : undefined\n }}\n />;\n\n return <div className={this.props.classes.fullWidth}>\n <div className={this.props.classes.halfWidth1}>{password}</div>\n <div className={this.props.classes.halfWidth2}>{passwordRepeat}</div>\n </div>;\n } else {\n return password;\n }\n }\n}\n\nConfigPassword.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigPassword);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport TextField from '@mui/material/TextField';\n\nimport IconButton from '@mui/material/IconButton';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nimport copy from '@iobroker/adapter-react-v5/Components/copy-to-clipboard';\nimport CopyIcon from '@iobroker/adapter-react-v5/icons/IconCopy';\n\nconst styles = theme => ({\n});\n\nclass ConfigPattern extends ConfigGeneric {\n renderItem(error, disabled) {\n return <TextField\n variant=\"standard\"\n fullWidth\n disabled={!!disabled}\n InputProps={{\n endAdornment: this.props.schema.copyToClipboard ?\n <IconButton\n size=\"small\"\n onClick={e => {\n copy(this.getPattern(this.props.schema.pattern));\n window.alert('Copied');\n }}>\n <CopyIcon/>\n </IconButton>\n : undefined,\n }}\n value={this.getPattern(this.props.schema.pattern)}\n label={this.getText(this.props.schema.label)}\n helperText={this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}\n />;\n }\n}\n\nConfigPattern.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigPattern);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport InputLabel from '@mui/material/InputLabel';\nimport MenuItem from '@mui/material/MenuItem';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport FormControl from '@mui/material/FormControl';\nimport Select from '@mui/material/Select';\n\nimport TextWithIcon from '@iobroker/adapter-react-v5/Components/TextWithIcon';\nimport I18n from '@iobroker/adapter-react-v5/i18n';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%'\n }\n});\n\nclass ConfigFunc extends ConfigGeneric {\n componentDidMount() {\n super.componentDidMount();\n const value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n\n this.props.socket.getEnums('rooms')\n .then(enums => {\n const selectOptions = Object.keys(enums)\n .map(id => ({ value: this.props.schema.short ? id.replace('enum.rooms.', '') : id, label: this.getText(enums[id].common.name), obj: enums[id]}));\n this.setState({ value, selectOptions });\n });\n }\n\n renderItem(error, disabled, defaultValue) {\n if (!this.state.selectOptions) {\n return null;\n }\n\n const item = this.state.selectOptions.find(item => item.value === this.state.value);\n\n return <FormControl\n variant=\"standard\"\n className={this.props.classes.fullWidth}\n >\n <InputLabel>{this.getText(this.props.schema.label)}</InputLabel>\n <Select\n variant=\"standard\"\n error={!!error}\n disabled={!!disabled}\n value={this.state.value || '_'}\n renderValue={val => item ? <TextWithIcon value={item.obj} themeType={this.props.themeType} lang={I18n.getLanguage()}/> : ''}\n onChange={e => {\n this.setState({value: e.target.value === '_' ? '' : e.target.value}, () =>\n this.onChange(this.props.attr, this.state.value));\n }}\n >\n {this.state.selectOptions.map(item =>\n <MenuItem key={item.value} value={item.value} style={item.value === ConfigGeneric.DIFFERENT_VALUE ? {opacity: 0.5} : {}}>\n <TextWithIcon value={item.obj} themeType={this.props.themeType} lang={I18n.getLanguage()}/>\n </MenuItem>)}\n </Select>\n {this.props.schema.help ? <FormHelperText>{this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}</FormHelperText> : null}\n </FormControl>;\n }\n}\n\nConfigFunc.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigFunc);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport InputLabel from '@mui/material/InputLabel';\nimport MenuItem from '@mui/material/MenuItem';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport FormControl from '@mui/material/FormControl';\nimport Select from '@mui/material/Select';\n\nimport I18n from '@iobroker/adapter-react-v5/i18n';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%'\n }\n});\n\nclass ConfigSelect extends ConfigGeneric {\n componentDidMount() {\n super.componentDidMount();\n const value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n\n const selectOptions = JSON.parse(JSON.stringify(this.props.schema.options));\n\n // if __different\n if (Array.isArray(value)) {\n this.initialValue = [...value];\n selectOptions.unshift({label: I18n.t(ConfigGeneric.DIFFERENT_LABEL), value: ConfigGeneric.DIFFERENT_VALUE});\n this.setState({value: ConfigGeneric.DIFFERENT_VALUE, selectOptions});\n } else {\n this.setState({value, selectOptions});\n }\n }\n\n renderItem(error, disabled, defaultValue) {\n if (!this.state.selectOptions) {\n return null;\n }\n\n const selectOptions = (this.state.selectOptions || []).filter(item => {\n if (!item.hidden) {\n return true;\n } else if (this.props.custom) {\n return !this.executeCustom(item.hidden, this.props.data, this.props.customObj, this.props.instanceObj, this.props.arrayIndex, this.props.globalData);\n } else {\n return !this.execute(item.hidden, this.props.schema.default, this.props.data, this.props.arrayIndex, this.props.globalData);\n }\n });\n\n // eslint-disable-next-line\n const item = selectOptions.find(item => item.value == this.state.value); // let \"==\" be and not ===\n\n return <FormControl variant=\"standard\" className={this.props.classes.fullWidth} id={`jsonSelect_${this.props.schema.attr}_${this.props.index || this.props.index === 0 ? this.props.index : ''}`}>\n <InputLabel>{this.getText(this.props.schema.label)}</InputLabel>\n <Select\n variant=\"standard\"\n error={!!error}\n disabled={!!disabled}\n value={this.state.value || '_'}\n renderValue={val => this.getText(item?.label, this.props.schema.noTranslation)}\n onChange={e => {\n this.setState({value: e.target.value === '_' ? '' : e.target.value}, () => {\n if (this.state.value === ConfigGeneric.DIFFERENT_VALUE) {\n this.onChange(this.props.attr, this.initialValue);\n } else {\n this.onChange(this.props.attr, this.state.value);\n }\n });\n }}\n >\n {selectOptions.map(item =>\n <MenuItem key={item.value} value={item.value} style={item.value === ConfigGeneric.DIFFERENT_VALUE ? {opacity: 0.5} : {}}>{this.getText(item.label, this.props.schema.noTranslation)}</MenuItem>)}\n </Select>\n {this.props.schema.help ? <FormHelperText>{this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}</FormHelperText> : null}\n </FormControl>;\n }\n}\n\nConfigSelect.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigSelect);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport InputLabel from '@mui/material/InputLabel';\nimport MenuItem from '@mui/material/MenuItem';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport FormControl from '@mui/material/FormControl';\nimport Select from '@mui/material/Select';\nimport TextField from '@mui/material/TextField';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport ListItemText from '@mui/material/ListItemText';\nimport Checkbox from '@mui/material/Checkbox';\nimport Chip from '@mui/material/Chip';\nimport Box from '@mui/material/Box';\n\nimport I18n from '@iobroker/adapter-react-v5/i18n';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%'\n },\n menuPaper: {\n maxHeight: 800\n },\n});\n\n/*\nto use this option, your adapter must implement listUart message\n\nadapter.on('message', obj => {\n if (obj) {\n switch (obj.command) {\n case 'command':\n if (obj.callback) {\n try {\n const serialport = require('serialport');\n if (serialport) {\n // read all found serial ports\n serialport.list()\n .then(ports => {\n adapter.log.info('List of port: ' + JSON.stringify(ports));\n adapter.sendTo(obj.from, obj.command, ports.map(item =>\n ({label: item.path, value: item.path})), obj.callback);\n })\n .catch(e => {\n adapter.sendTo(obj.from, obj.command, [], obj.callback);\n adapter.log.error(e)\n });\n } else {\n adapter.log.warn('Module serialport is not available');\n adapter.sendTo(obj.from, obj.command, [{label: 'Not available', value: ''}], obj.callback);\n }\n } catch (e) {\n adapter.sendTo(obj.from, obj.command, [{label: 'Not available', value: ''}], obj.callback);\n }\n }\n\n break;\n }\n }\n});\n */\n\nclass ConfigSelectSendTo extends ConfigGeneric {\n componentDidMount() {\n super.componentDidMount();\n\n this.askInstance();\n }\n\n askInstance(){\n if (this.props.alive) {\n let data = this.props.schema.data;\n if (data === undefined && this.props.schema.jsonData) {\n data = this.getPattern(this.props.schema.jsonData, {}, this.props.data);\n try {\n data = JSON.parse(data);\n } catch (e) {\n console.error('Cannot parse json data: ' + data);\n }\n }\n\n if (data === undefined) {\n data = null;\n }\n\n this.props.socket.sendTo(`${this.props.adapterName}.${this.props.instance}`, this.props.schema.command || 'send', data)\n .then(list =>\n this.setState({list, context: this.getContext()}));\n } else {\n const value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n\n this.setState({ value });\n }\n }\n\n getContext() {\n const context = {};\n\n if (Array.isArray(this.props.schema.alsoDependsOn)) {\n this.props.schema.alsoDependsOn.forEach(attr =>\n context[attr] = ConfigGeneric.getValue(this.props.data, attr));\n }\n\n return JSON.stringify(context);\n }\n\n _getValue() {\n let value = this.state.value === null || this.state.value === undefined ? ConfigGeneric.getValue(this.props.data, this.props.attr) : this.state.value;\n\n if (this.props.schema.multiple) {\n if (typeof value === 'string') {\n value = [value];\n } else if (value === null || value === undefined) {\n value = [];\n }\n }\n\n return value;\n }\n\n renderItem(error, disabled, defaultValue) {\n if (this.props.alive) {\n const context = this.getContext();\n if (context !== this.state.context) {\n setTimeout(() => this.askInstance(), 300);\n }\n }\n\n let value = this._getValue();\n\n if (!this.props.alive) {\n if (this.props.schema.multiple || this.props.schema.manual === false) {\n return I18n.t('ra_Cannot retrieve options, as instance is offline');\n } else {\n return <TextField\n variant=\"standard\"\n fullWidth\n value={value}\n error={!!error}\n disabled={!!disabled}\n onChange={e => {\n const value = e.target.value;\n this.setState({ value }, () =>\n this.onChange(this.props.attr, (value || '').trim()));\n }}\n placeholder={this.getText(this.props.schema.placeholder)}\n label={this.getText(this.props.schema.label)}\n helperText={this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}\n />;\n }\n } else\n if (!this.state.list) {\n return <CircularProgress size=\"small\"/>;\n } else {\n const selectOptions = (this.state.list || [])\n .filter(item => {\n if (!item.hidden) {\n return true;\n } else if (this.props.custom) {\n return !this.executeCustom(item.hidden, this.props.schema.default, this.props.data, this.props.instanceObj, this.props.arrayIndex, this.props.globalData);\n } else {\n return !this.execute(item.hidden, this.props.schema.default, this.props.data, this.props.arrayIndex, this.props.globalData);\n }\n });\n\n const item = selectOptions.find(item => item.value === value);\n\n return <FormControl variant=\"standard\" className={this.props.classes.fullWidth}>\n <InputLabel>{this.getText(this.props.schema.label)}</InputLabel>\n <Select\n variant=\"standard\"\n error={!!error}\n multiple={this.props.schema.multiple}\n disabled={!!disabled}\n value={value}\n MenuProps={this.props.schema.multiple ? { classes: { paper: this.props.classes.menuPaper } } : undefined}\n renderValue={val =>\n this.props.schema.multiple ?\n <Box sx={{ display: 'flex', flexWrap: 'wrap', gap: 0.5 }}>\n {val.map(v => {\n const item = selectOptions.find(_item => _item.value === v);\n if (item || this.props.schema.showAllValues !== false) {\n const label = item?.label || v;\n return <Chip key={v} label={label}/* onDelete={e => {\n e.stopPropagation();\n e.preventDefault ();\n let _value = JSON.parse(JSON.stringify(this._getValue()));\n const pos = value.indexOf(v);\n if (pos !== -1) {\n _value.splice(pos, 1);\n this.setState({ value: _value }, () => this.onChange(this.props.attr, _value));\n }\n }}*/ />;\n } else {\n return null;\n }\n })}\n </Box>\n :\n (item?.label || val)\n }\n onChange={e => {\n this.onChange(this.props.attr, e.target.value);\n }}\n >\n {selectOptions.map((item, i) =>\n <MenuItem key={i} value={item.value}>\n { this.props.schema.multiple ? <Checkbox\n checked={value.includes(item.value)}\n onClick={() => {\n let _value = JSON.parse(JSON.stringify(this._getValue()));\n const pos = value.indexOf(item.value);\n if (pos !== -1) {\n _value.splice(pos, 1);\n } else {\n _value.push(item.value);\n _value.sort();\n }\n this.setState({ value: _value }, () => this.onChange(this.props.attr, _value));\n }}/> : null }\n <ListItemText primary={item.label} />\n </MenuItem>)}\n </Select>\n {this.props.schema.help ? <FormHelperText>{this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}</FormHelperText> : null}\n </FormControl>;\n }\n }\n}\n\nConfigSelectSendTo.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n adapterName: PropTypes.string,\n alive: PropTypes.bool,\n instance: PropTypes.number,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigSelectSendTo);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport Button from '@mui/material/Button';\n\nimport I18n from '@iobroker/adapter-react-v5/i18n';\nimport Icon from '@iobroker/adapter-react-v5/Components/Icon';\nimport DialogError from '@iobroker/adapter-react-v5/Dialogs/Error';\nimport DialogMessage from '@iobroker/adapter-react-v5/Dialogs/Message';\nimport ConfirmDialog from '@iobroker/adapter-react-v5/Dialogs/Confirm';\nimport ConfigGeneric from './ConfigGeneric';\nimport IconWarning from '@mui/icons-material/Warning';\nimport IconError from '@mui/icons-material/Error';\nimport IconInfo from '@mui/icons-material/Info';\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%'\n },\n icon: {\n width: 24,\n height: 24,\n marginRight: 4\n }\n});\n\nclass ConfigSendto extends ConfigGeneric {\n componentDidMount() {\n super.componentDidMount();\n\n this.setState( {_error: '', _message: ''});\n }\n\n renderErrorDialog() {\n if (this.state._error) {\n return <DialogError text={this.state._error} classes={undefined} onClose={() => this.setState({_error: ''})} />;\n } else {\n return null;\n }\n }\n\n renderMessageDialog() {\n if (this.state._message) {\n return <DialogMessage text={this.state._message} classes={undefined} onClose={() => this.setState({_error: ''})} />;\n } else {\n return null;\n }\n }\n\n _onClick() {\n this.props.onCommandRunning(true);\n\n let data = this.props.schema.data;\n if (data === undefined && this.props.schema.jsonData) {\n data = this.getPattern(this.props.schema.jsonData, {}, this.props.data);\n try {\n data = JSON.parse(data);\n } catch (e) {\n console.error('Cannot parse json data: ' + data);\n }\n }\n if (data === undefined) {\n data = null;\n }\n\n this.props.socket.sendTo(\n `${this.props.adapterName}.${this.props.instance}`,\n this.props.schema.command || 'send',\n data\n )\n .then(response => {\n if (response?.error) {\n if (this.props.schema.error && this.props.schema.error[response.error]) {\n let error = this.getText(this.props.schema.error[response.error]);\n if (response.args) {\n response.args.forEach(arg => error = error.replace('%s', arg));\n }\n this.setState({_error: error});\n } else {\n this.setState({_error: response.error ? I18n.t(response.error) : I18n.t('ra_Error')});\n }\n } else {\n if (response?.result && this.props.schema.result && this.props.schema.result[response.result]) {\n let text = this.getText(this.props.schema.result[response.result]);\n if (response.args) {\n response.args.forEach(arg => text = text.replace('%s', arg));\n }\n window.alert(text);\n } else {\n if (response?.result) {\n window.alert(typeof response.result === 'object' ? JSON.stringify(response.result) : response.result);\n } else {\n window.alert(I18n.t('ra_Ok'));\n }\n }\n }\n })\n .catch(e => {\n if (this.props.schema.error && this.props.schema.error[e.toString()]) {\n this.setState({_error: this.getText(this.props.schema.error[e.toString()])});\n } else {\n this.setState({_error: I18n.t(e.toString()) || I18n.t('ra_Error')});\n }\n })\n .then(() => this.props.onCommandRunning(false))\n }\n\n renderConfirmDialog() {\n if (!this.state.confirmDialog) {\n return null;\n }\n const confirm = this.state.confirmData || this.props.schema.confirm;\n let icon = null;\n if (confirm.type === 'warning') {\n icon = <IconWarning />;\n } else if (confirm.type === 'error') {\n icon = <IconError />;\n } else if (confirm.type === 'info') {\n icon = <IconInfo />;\n }\n\n return <ConfirmDialog\n title={ this.getText(confirm.title) || I18n.t('ra_Please confirm') }\n text={ this.getText(confirm.text) }\n ok={ this.getText(confirm.ok) || I18n.t('ra_Ok') }\n cancel={ this.getText(confirm.cancel) || I18n.t('ra_Cancel') }\n icon={icon}\n onClose={isOk =>\n this.setState({ confirmDialog: false}, () =>\n isOk && this._onClick())\n }\n />;\n }\n\n renderItem(error, disabled, defaultValue) {\n return <div className={this.props.classes.fullWidth}>\n <Button\n variant={this.props.schema.variant || undefined}\n color={this.props.schema.color || 'grey'}\n className={this.props.classes.fullWidth}\n disabled={disabled}\n onClick={() => {\n if (this.props.schema.confirm) {\n this.setState({confirmDialog: true});\n } else {\n this._onClick();\n }\n }}\n >\n {this.props.schema.icon ? <Icon src={this.props.schema.icon} className={this.props.classes.icon}/> : null}\n {this.getText(this.props.schema.label, this.props.schema.noTranslation)}\n </Button>\n {this.renderErrorDialog()}\n {this.renderMessageDialog()}\n </div>;\n }\n}\n\nConfigSendto.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n adapterName: PropTypes.string,\n instance: PropTypes.number,\n commandRunning: PropTypes.bool,\n onCommandRunning: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigSendto);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport Button from '@mui/material/Button';\n\nimport I18n from '@iobroker/adapter-react-v5/i18n';\nimport Icon from '@iobroker/adapter-react-v5/Components/Icon';\nimport ConfirmDialog from '@iobroker/adapter-react-v5/Dialogs/Confirm';\n\nimport ConfigGeneric from './ConfigGeneric';\nimport IconWarning from '@mui/icons-material/Warning';\nimport IconError from '@mui/icons-material/Error';\nimport IconInfo from '@mui/icons-material/Info';\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%'\n },\n icon: {\n width: 24,\n height: 24,\n marginRight: 4\n }\n});\n\nclass ConfigSetState extends ConfigGeneric {\n async _onClick() {\n let val = this.props.schema.val;\n if (typeof val === 'string' && val.includes('${')) {\n val = this.getPattern(val);\n const obj = await this.props.socket.getObject(this.props.schema.id);\n if (obj?.common?.type === 'number') {\n val = parseFloat(val);\n } else if (obj?.common?.type === 'boolean') {\n val = val === 'true' || val === true || val === '1' || val === 1;\n }\n }\n\n try {\n await this.props.socket.setState(this.props.schema.id, {val, ack: !!this.props.schema.ack});\n this.props.schema.okText && window.alert(this.getText(this.props.schema.okText));\n } catch (e) {\n if (this.props.schema.error && this.props.schema.error[e.toString()]) {\n window.alert(this.getText(this.props.schema.error[e.toString()]));\n } else {\n window.alert(I18n.t(e.toString()) || I18n.t('ra_Error'));\n }\n }\n }\n\n renderConfirmDialog() {\n if (!this.state.confirmDialog) {\n return null;\n }\n const confirm = this.state.confirmData || this.props.schema.confirm;\n let icon = null;\n if (confirm.type === 'warning') {\n icon = <IconWarning />;\n } else if (confirm.type === 'error') {\n icon = <IconError />;\n } else if (confirm.type === 'info') {\n icon = <IconInfo />;\n }\n\n return <ConfirmDialog\n title={ this.getText(confirm.title) || I18n.t('ra_Please confirm') }\n text={ this.getText(confirm.text) }\n ok={ this.getText(confirm.ok) || I18n.t('ra_Ok') }\n cancel={ this.getText(confirm.cancel) || I18n.t('ra_Cancel') }\n icon={icon}\n onClose={isOk =>\n this.setState({ confirmDialog: false}, async () =>\n isOk && (await this._onClick()))\n }\n />;\n }\n\n renderItem(error, disabled, defaultValue) {\n return <Button\n variant={this.props.schema.variant || undefined}\n color={this.props.schema.color || 'grey'}\n className={this.props.classes.fullWidth}\n disabled={disabled}\n onClick={async () => {\n if (this.props.schema.confirm) {\n this.setState({confirmDialog: true});\n } else {\n await this._onClick();\n }\n }}\n >\n {this.props.schema.icon ? <Icon src={this.props.schema.icon} className={this.props.classes.icon}/> : null}\n {this.getText(this.props.schema.label, this.props.schema.noTranslation)}\n </Button>;\n }\n}\n\nConfigSetState.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n adapterName: PropTypes.string,\n instance: PropTypes.number,\n commandRunning: PropTypes.bool,\n onCommandRunning: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigSetState);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport { Box, Typography, Slider } from '@mui/material';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%',\n },\n slider: {\n marginLeft: 10,\n marginRight: 10,\n width: 'calc(100% - 20px)',\n }\n});\n\nclass ConfigSlider extends ConfigGeneric {\n componentDidMount() {\n super.componentDidMount();\n const _value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n this.setState({ _value });\n }\n\n static getDerivedStateFromProps(props, state) {\n if ((props.schema.min !== undefined && props.schema.min < 0) ||\n (props.schema.max !== undefined && props.schema.max < 0)\n ) {\n return null;\n }\n const _value = ConfigGeneric.getValue(props.data, props.attr);\n if (_value === null || _value === undefined || _value.toString() !== parseFloat(state._value).toString()) {\n return { _value };\n } else {\n return null;\n }\n }\n\n renderItem(error, disabled, defaultValue) {\n const min = this.props.schema.min || 0;\n const max = this.props.schema.max || 100;\n const unit = this.props.schema.unit || '';\n\n const marks = [\n { value: min, label: min + unit},\n { value: max, label: max + unit}\n ];\n\n return <Box className={this.props.classes.fullWidth}>\n {this.props.schema.label ? <Typography gutterBottom>\n {this.getText(this.props.schema.label)}\n </Typography> : null}\n <Slider\n className={this.props.classes.slider}\n value={this.state._value}\n getAriaValueText={value => value + unit}\n step={this.props.schema.step || ((max - min) / 100)}\n valueLabelDisplay=\"auto\"\n marks={marks}\n disabled={!!disabled}\n error={error || ''}\n onChange={e => {\n const _value = e.target.value;\n this.setState({ _value }, () =>\n this.onChange(this.props.attr, _value));\n }}\n />\n {this.props.schema.help ? <Typography>\n {this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}\n </Typography> : null}\n </Box>;\n }\n}\n\nConfigSlider.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigSlider);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport Utils from '@iobroker/adapter-react-v5/Components/Utils';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%',\n backgroundColor: theme.palette.mode === 'dark' ? '#FFF' : '#000',\n borderStyle: 'hidden',\n },\n primary: {\n backgroundColor: theme.palette.primary.main\n },\n secondary: {\n backgroundColor: theme.palette.secondary.main\n }\n});\n\nclass ConfigStaticDivider extends ConfigGeneric {\n renderItem() {\n return <hr\n className={Utils.clsx(\n this.props.classes.fullWidth,\n this.props.schema.color === 'primary' && this.props.classes.primary,\n this.props.schema.color === 'secondary' && this.props.classes.secondary\n )}\n style={{\n height: this.props.schema.color ? this.props.schema.height || 2 : this.props.schema.height || 1,\n backgroundColor: this.props.schema.color !== 'primary' && this.props.schema.color !== 'secondary' && this.props.schema.color ? this.props.schema.color : undefined,\n }}\n />;\n }\n}\n\nConfigStaticDivider.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigStaticDivider);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n header: {\n width: '100%',\n background: theme.palette.primary.main,\n color: theme.palette.primary.contrastText,\n padding: '4px !important',\n borderRadius: 3,\n marginBlockEnd: 0,\n marginBlockStart: 0,\n },\n});\n\nclass ConfigStaticHeader extends ConfigGeneric {\n renderItem() {\n switch ((this.props.schema.size || 5).toString()) {\n case '1':\n return <h1 className={this.props.classes.header}>\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </h1>;\n\n case '2':\n return <h2 className={this.props.classes.header}>\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </h2>;\n\n case '3':\n return <h3 className={this.props.classes.header}>\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </h3>;\n\n case '4':\n return <h4 className={this.props.classes.header}>\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </h4>;\n\n case '5':\n default:\n return <h5 className={this.props.classes.header}>\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </h5>;\n }\n }\n}\n\nConfigStaticHeader.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigStaticHeader);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n fullWidth: {\n height: '100%',\n width: '100%',\n }\n});\n\nclass ConfigStaticImage extends ConfigGeneric {\n renderItem() {\n let src = this.props.schema.src;\n if (src && !src.startsWith('.') &&\n !src.startsWith('http') &&\n !src.startsWith(`adapter/${this.props.adapterName}/`) &&\n !src.startsWith(`./adapter/${this.props.adapterName}/`)\n ) {\n src = `adapter/${this.props.adapterName}/${src}`;\n }\n\n return <img\n className={this.props.classes.fullWidth}\n src={src}\n onClick={this.props.schema.href ? () => this.props.schema.href && window.open(this.props.schema.href, '_blank') : null}\n alt=\"\"\n />;\n }\n}\n\nConfigStaticImage.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigStaticImage);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport Button from '@mui/material/Button';\n\nimport Icon from '@iobroker/adapter-react-v5/Components/Icon';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n fullWidth: {\n height: '100%',\n width: '100%',\n }\n});\n\nclass ConfigStaticText extends ConfigGeneric {\n renderItem(error, disabled) {\n if (this.props.schema.button) {\n return <Button\n variant={this.props.schema.variant || undefined}\n color={this.props.schema.color || 'grey'}\n className={this.props.classes.fullWidth}\n disabled={disabled}\n onClick={this.props.schema.href ? () => {\n // calculate one more time just before call\n const href = this.props.schema.href ? this.getText(this.props.schema.href, true) : null;\n href && window.open(href, '_blank');\n } : null}\n >\n {this.props.schema.icon ? <Icon src={this.props.schema.icon} className={this.props.classes.icon}/> : null}\n {this.getText(this.props.schema.text || this.props.schema.label, this.props.schema.noTranslation)}\n </Button>\n } else {\n\n return <span onClick={this.props.schema.href ? () => {\n // calculate one more time just before call\n const href = this.props.schema.href ? this.getText(this.props.schema.href, true) : null;\n href && window.open(href, '_blank');\n } : null}>\n {this.getText(this.props.schema.text || this.props.schema.label)}\n </span>;\n }\n }\n}\n\nConfigStaticText.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigStaticText);\n","import React, { createRef } from 'react';\nimport PropTypes from 'prop-types';\nimport { /*lighten,*/ withStyles } from '@mui/styles';\nimport clsx from 'clsx';\n\nimport FormHelperText from '@mui/material/FormHelperText';\nimport { IconButton, InputAdornment, Paper, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, TableSortLabel, TextField, Toolbar, Tooltip, Typography } from '@mui/material';\n\nimport AddIcon from '@mui/icons-material/Add';\nimport DeleteIcon from '@mui/icons-material/Delete';\nimport CloseIcon from '@mui/icons-material/Close';\nimport UpIcon from '@mui/icons-material/ArrowUpward';\nimport DownIcon from '@mui/icons-material/ArrowDownward';\nimport IconFilterOn from '@mui/icons-material/FilterAlt';\nimport IconFilterOff from '@mui/icons-material/FilterAltOff';\n\nimport I18n from '@iobroker/adapter-react-v5/i18n';\n\nimport ConfigGeneric from './ConfigGeneric';\nimport ConfigPanel from './ConfigPanel';\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%'\n },\n root: {\n width: '100%',\n },\n paper: {\n width: '100%',\n marginBottom: theme.spacing(2),\n backgroundColor: `rgba(255, 255, 255, 0.1)`,\n },\n headerText: {\n width: '100%'\n },\n table: {\n minWidth: 750,\n },\n visuallyHidden: {\n border: 0,\n clip: 'rect(0 0 0 0)',\n height: 1,\n margin: -1,\n overflow: 'hidden',\n padding: 0,\n position: 'absolute',\n top: 20,\n width: 1,\n },\n addIcon: {\n display: 'flex',\n justifyContent: 'space-between'\n },\n highlight:\n theme.palette.mode === 'light'\n ? {\n color: theme.palette.secondary.main,\n // backgroundColor: lighten(theme.palette.secondary.light, 0.85),\n }\n : {\n color: theme.palette.text.primary,\n backgroundColor: theme.palette.secondary.dark,\n },\n title: {\n flex: '1 1 100%',\n },\n rootTool: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(1),\n },\n silver: {\n opacity: 0.2\n },\n flex: {\n display: 'flex'\n },\n filteredOut: {\n padding: 10,\n display: 'flex',\n textAlign: 'center'\n },\n buttonEmpty: {\n width: 30,\n display: 'inline-block'\n },\n buttonCell: {\n whiteSpace: 'nowrap',\n }\n});\n\nfunction objectToArray(object, nameOfFirstAttr, nameOfSecondAttr) {\n nameOfFirstAttr = nameOfFirstAttr || 'key';\n\n const array = [];\n Object.keys(object).forEach(key => {\n const item = {};\n item[nameOfFirstAttr] = key;\n\n if (nameOfSecondAttr) {\n item[nameOfSecondAttr] = object[key]\n array.push(item);\n } else {\n array.push(Object.assign(item, object[key]));\n }\n });\n\n return array;\n}\n\nfunction arrayToObject(array, nameOfFirstAttr, nameOfSecondAttr) {\n nameOfFirstAttr = nameOfFirstAttr || 'key';\n\n const object = {};\n\n array.forEach(row => {\n let key = row[nameOfFirstAttr];\n if (key === null || key === undefined) {\n key = '';\n }\n delete row[nameOfFirstAttr];\n\n if (nameOfSecondAttr) {\n object[key] = row[nameOfSecondAttr];\n } else {\n object[key] = row;\n }\n });\n\n return object;\n}\n\nclass ConfigTable extends ConfigGeneric {\n constructor(props) {\n super(props)\n this.filterRefs = {};\n this.props.schema.items = this.props.schema.items || [];\n this.props.schema.items.forEach(el => {\n if (el.filter) {\n this.filterRefs[el.attr] = createRef();\n }\n });\n }\n\n async componentDidMount() {\n super.componentDidMount();\n let value = ConfigGeneric.getValue(this.props.data, this.props.attr) || [];\n\n // if the list is given as an object\n if (this.props.schema.objKeyName) {\n value = objectToArray(value, this.props.schema.objKeyName, this.props.schema.objValueName);\n }\n\n if (!Array.isArray(value)) {\n value = [];\n }\n\n const visibleValue = value.map((_, i) => i);\n\n this.setState({\n value,\n visibleValue,\n orderBy: /*this.props.schema.items.length ? this.props.schema.items[0].attr : */'',\n order: 'asc',\n iteration: 0,\n filterOn: [],\n });\n }\n\n componentWillUnmount() {\n this.typingTimer && clearTimeout(this.typingTimer)\n this.typingTimer = null;\n super.componentWillUnmount();\n }\n\n itemTable(attrItem, data, idx) {\n const { value, systemConfig } = this.state;\n const { schema } = this.props;\n const schemaForAttribute = schema.items && schema.items.find(el => el.attr === attrItem);\n\n if (!schemaForAttribute) {\n return null;\n }\n\n const schemaItem = {\n items: {\n [attrItem]: schemaForAttribute\n }\n };\n\n return <ConfigPanel\n index={idx + this.state.iteration}\n arrayIndex={idx}\n globalData={this.props.data}\n socket={this.props.socket}\n adapterName={this.props.adapterName}\n instance={this.props.instance}\n common={this.props.common}\n alive={this.props.alive}\n themeType={this.props.themeType}\n themeName={this.props.themeName}\n data={data}\n table\n custom\n schema={schemaItem}\n systemConfig={systemConfig}\n customs={this.props.customs}\n onChange={(attr, valueChange) => {\n const newObj = JSON.parse(JSON.stringify(value));\n newObj[idx][attr] = valueChange;\n this.setState({ value: newObj }, () =>\n this.onChangeWrapper(newObj,true));\n }}\n onError={(error, attr) => this.onError(error, attr)}\n />;\n }\n\n static descendingComparator(a, b, orderBy) {\n if (b[orderBy] < a[orderBy]) {\n return -1;\n } else\n if (b[orderBy] > a[orderBy]) {\n return 1;\n } else {\n return 0;\n }\n }\n\n static getComparator(order, orderBy) {\n return order === 'desc'\n ? (a, b) => ConfigTable.descendingComparator(a, b, orderBy)\n : (a, b) => -ConfigTable.descendingComparator(a, b, orderBy);\n }\n\n handleRequestSort = (property, orderCheck = false) => {\n const { order, orderBy } = this.state;\n if (orderBy) {\n const isAsc = orderBy === property && order === 'asc';\n const newOrder = orderCheck ? order : (isAsc ? 'desc' : 'asc');\n const newValue = this.stableSort(newOrder, property);\n this.setState({ order: newOrder, orderBy: property, iteration: this.state.iteration + 10000 }, () =>\n this.applyFilter(false, newValue));\n }\n }\n\n stableSort = (order, orderBy) => {\n const { value } = this.state;\n const comparator = ConfigTable.getComparator(order, orderBy);\n const stabilizedThis = value.map((el, index) => [el, index]);\n\n stabilizedThis.sort((a, b) => {\n const order = comparator(a[0], b[0]);\n if (order !== 0) {\n return order;\n } else {\n return a[1] - b[1];\n }\n });\n\n return stabilizedThis.map(el => el[0]);\n }\n\n enhancedTableHead(buttonsWidth) {\n const { schema, classes } = this.props;\n const { order, orderBy } = this.state;\n return <TableHead>\n <TableRow>\n {schema.items && schema.items.map(headCell => (\n <TableCell\n style={{ width: typeof headCell.width === 'string' && headCell.width.endsWith('%') ? headCell.width : headCell.width }}\n key={headCell.attr}\n align=\"left\"\n sortDirection={orderBy === headCell.attr ? order : false}\n >\n <div className={classes.flex}>\n {headCell.sort && <TableSortLabel\n active\n className={clsx(orderBy !== headCell.attr && classes.silver)}\n direction={orderBy === headCell.attr ? order : 'asc'}\n onClick={() => this.handleRequestSort(headCell.attr)}\n />}\n {headCell.filter && this.state.filterOn.includes(headCell.attr) ?\n <TextField\n variant=\"standard\"\n ref={this.filterRefs[headCell.attr]}\n onChange={() => this.applyFilter()}\n title={I18n.t('ra_You can filter entries by entering here some text')}\n InputProps={{\n endAdornment: this.filterRefs[headCell.attr]?.current?.children[0]?.children[0]?.value && <InputAdornment position=\"end\">\n <IconButton\n size=\"small\"\n onClick={() => {\n this.filterRefs[headCell.attr].current.children[0].children[0].value = '';\n this.applyFilter();\n }}\n >\n <CloseIcon />\n </IconButton>\n </InputAdornment>,\n }}\n fullWidth\n placeholder={this.getText(headCell.title)}\n />\n : <span className={this.props.classes.headerText}>{this.getText(headCell.title)}</span>}\n { headCell.filter ? <IconButton\n title={I18n.t('ra_Show/hide filter input')}\n size=\"small\"\n onClick={() => {\n const filterOn = [...this.state.filterOn];\n const pos = this.state.filterOn.indexOf(headCell.attr);\n if (pos === -1) {\n filterOn.push(headCell.attr);\n } else {\n filterOn.splice(pos, 1);\n }\n this.setState({ filterOn }, () => {\n if (pos && this.filterRefs[headCell.attr].current.children[0].children[0].value) {\n this.filterRefs[headCell.attr].current.children[0].children[0].value = '';\n this.applyFilter();\n }\n });\n }}\n >{this.state.filterOn.includes(headCell.attr) ? <IconFilterOff /> : <IconFilterOn />}</IconButton> : null}\n </div>\n </TableCell>\n ))}\n {!schema.noDelete && <TableCell style={{ paddingLeft: 20, paddingRight: 20, width: buttonsWidth, textAlign: 'right' }} padding=\"checkbox\">\n <IconButton disabled size=\"small\">\n <DeleteIcon />\n </IconButton>\n </TableCell>}\n </TableRow>\n </TableHead>;\n }\n\n onDelete = index => () => {\n const newValue = JSON.parse(JSON.stringify(this.state.value));\n let visibleValue = JSON.parse(JSON.stringify(this.state.visibleValue));\n newValue.splice(index, 1);\n const pos = visibleValue.indexOf(index);\n if (pos !== -1) {\n visibleValue.splice(pos, 1);\n visibleValue = visibleValue.map(i => i > index ? i - 1 : i);\n }\n\n this.setState({ value: newValue, visibleValue, iteration: this.state.iteration + 10000 }, () =>\n this.onChangeWrapper(newValue));\n };\n\n onChangeWrapper = (newValue, updateVisible = false) => {\n this.typingTimer && clearTimeout(this.typingTimer);\n\n this.typingTimer = setTimeout((value, updateVisible) => {\n this.typingTimer = null;\n\n if (this.props.schema.objKeyName) {\n const objValue = arrayToObject(JSON.parse(JSON.stringify(value)), this.props.schema.objKeyName, this.props.schema.objValueName);\n this.onChange(this.props.attr, objValue);\n } else {\n this.onChange(this.props.attr, value);\n }\n\n if (updateVisible) {\n this.applyFilter(false, value);\n this.handleRequestSort(this.state.orderBy, true);\n }\n }, 300, newValue, updateVisible);\n }\n\n onAdd = () => {\n const { schema } = this.props;\n const newValue = JSON.parse(JSON.stringify(this.state.value));\n const visibleValue = JSON.parse(JSON.stringify(this.state.visibleValue));\n\n const newItem = schema.items && schema.items.reduce((accumulator, currentValue) => {\n let defaultValue;\n if (currentValue.defaultFunc) {\n if (this.props.custom) {\n defaultValue = currentValue.defaultFunc ? this.executeCustom(currentValue.defaultFunc, this.props.schema.default, this.props.data, this.props.instanceObj, newValue.length, this.props.data) : this.props.schema.default;\n } else {\n defaultValue = currentValue.defaultFunc ? this.execute(currentValue.defaultFunc, this.props.schema.default, this.props.data, newValue.length, this.props.data) : this.props.schema.default;\n }\n } else {\n defaultValue = currentValue.default === undefined ? null : currentValue.default;\n }\n\n accumulator[currentValue.attr] = defaultValue;\n return accumulator;\n }, {});\n\n newValue.push(newItem);\n visibleValue.push(newValue.length - 1);\n\n this.setState({ value: newValue, visibleValue }, () =>\n this.onChangeWrapper(newValue));\n }\n\n isAnyFilterSet() {\n return Object.keys(this.filterRefs).find(attr => this.filterRefs[attr].current?.children[0].children[0].value);\n }\n\n applyFilter = (clear = false, value = this.state.value) => {\n let visibleValue = value.map((_, i) => i);\n Object.keys(this.filterRefs).forEach(attr => {\n let valueInputRef = this.filterRefs[attr].current?.children[0].children[0].value;\n if (!clear && valueInputRef) {\n valueInputRef = valueInputRef.toLowerCase();\n visibleValue = visibleValue.filter(idx => value[idx] && value[idx][attr] && value[idx][attr].toLowerCase().includes(valueInputRef));\n } else if (this.filterRefs[attr].current) {\n this.filterRefs[attr].current.children[0].children[0].value = '';\n }\n });\n\n if (JSON.stringify(visibleValue) !== JSON.stringify(this.state.visibleValue)) {\n this.setState({ visibleValue });\n }\n }\n\n onMoveUp(idx) {\n const value = JSON.parse(JSON.stringify(this.state.value));\n const item = value[idx];\n value.splice(idx, 1);\n value.splice(idx - 1, 0, item);\n this.setState({ value, iteration: this.state.iteration + 10000 }, () =>\n this.onChangeWrapper(value));\n }\n\n onMoveDown(idx) {\n const value = JSON.parse(JSON.stringify(this.state.value));\n const item = value[idx];\n value.splice(idx, 1);\n value.splice(idx + 1, 0, item);\n this.setState({ value, iteration: this.state.iteration + 10000 }, () =>\n this.onChangeWrapper(value));\n }\n\n renderItem(error, disabled, defaultValue) {\n const { classes, schema } = this.props;\n const { value, visibleValue } = this.state;\n\n if (!value) {\n return null;\n }\n\n const doAnyFilterSet = this.isAnyFilterSet();\n\n return <Paper className={classes.paper}>\n <div className={classes.addIcon}>\n {schema.label ? <Toolbar\n variant=\"dense\"\n className={classes.rootTool}\n >\n <Typography className={classes.title} variant=\"h6\" id=\"tableTitle\" component=\"div\">\n {this.getText(schema.label)}\n </Typography>\n </Toolbar> : null}\n {!schema.noDelete ? <Tooltip title={doAnyFilterSet ? I18n.t('ra_Cannot add items with set filter') : I18n.t('ra_Add row')}>\n <span>\n <IconButton disabled={!!doAnyFilterSet && !this.props.schema.allowAddByFilter} onClick={this.onAdd}>\n <AddIcon />\n </IconButton>\n </span>\n </Tooltip> : null}\n </div>\n <TableContainer>\n <Table className={classes.table} size=\"small\">\n {this.enhancedTableHead(!doAnyFilterSet && !this.state.orderBy ? 120 : 64)}\n <TableBody>\n {visibleValue.map((idx, i) =>\n <TableRow\n hover\n key={idx}\n >\n {schema.items && schema.items.map(headCell =>\n <TableCell key={headCell.attr + '_' + idx} align=\"left\">\n {this.itemTable(headCell.attr, value[idx], idx)}\n </TableCell>\n )}\n {!schema.noDelete && <TableCell align=\"left\" className={classes.buttonCell}>\n {!doAnyFilterSet && !this.state.orderBy ? (i ? <Tooltip title={I18n.t('ra_Move up')}>\n <IconButton size=\"small\" onClick={() => this.onMoveUp(idx)}>\n <UpIcon />\n </IconButton>\n </Tooltip> : <div className={classes.buttonEmpty}/>) : null}\n {!doAnyFilterSet && !this.state.orderBy ? (i < visibleValue.length - 1 ? <Tooltip title={I18n.t('ra_Move down')}>\n <IconButton size=\"small\" onClick={() => this.onMoveDown(idx)}>\n <DownIcon />\n </IconButton>\n </Tooltip> : <div className={classes.buttonEmpty}/> ) : null}\n <Tooltip title={I18n.t('ra_Delete current row')}>\n <IconButton size=\"small\" onClick={this.onDelete(idx)}>\n <DeleteIcon />\n </IconButton>\n </Tooltip>\n </TableCell>}\n </TableRow>)}\n </TableBody>\n </Table>\n {!visibleValue.length && value.length ?\n <div className={classes.filteredOut}>\n <Typography className={classes.title} variant=\"h6\" id=\"tableTitle\" component=\"div\">\n {I18n.t('ra_All items are filtered out')}\n <IconButton\n size=\"small\"\n onClick={e => this.applyFilter(true)}\n >\n <CloseIcon />\n </IconButton>\n </Typography>\n </div> : null}\n </TableContainer>\n {schema.help ? <FormHelperText>{this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}</FormHelperText> : null}\n </Paper>;\n }\n}\n\nConfigTable.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigTable);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport { Autocomplete, TextField } from '@mui/material';\n\nimport I18n from '@iobroker/adapter-react-v5/i18n';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n indeterminate: {\n opacity: 0.5\n }\n});\n\nclass ConfigText extends ConfigGeneric {\n componentDidMount() {\n super.componentDidMount();\n const value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n this.setState({ value });\n }\n\n static getDerivedStateFromProps(props, state) {\n const value = ConfigGeneric.getValue(props.data, props.attr);\n if (value === null || value === undefined || value.toString().trim() !== (state.value || '').toString().trim()) {\n return {value};\n } else {\n return null;\n }\n }\n\n renderItem(error, disabled, defaultValue) {\n let isIndeterminate = Array.isArray(this.state.value) || this.state.value === ConfigGeneric.DIFFERENT_VALUE;\n\n if (isIndeterminate) {\n const arr = [...this.state.value].map(item => ({label: item.toString(), value: item}));\n arr.unshift({label: I18n.t(ConfigGeneric.DIFFERENT_LABEL), value: ConfigGeneric.DIFFERENT_VALUE});\n\n return <Autocomplete\n className={this.props.classes.indeterminate}\n fullWidth\n value={arr[0]}\n getOptionSelected={(option, value) => option.label === value.label}\n onChange={(_, value) =>\n this.onChange(this.props.attr, value ? value.value : '')}\n options={arr}\n getOptionLabel={option => option.label}\n renderInput={params => <TextField\n variant=\"standard\"\n {...params}\n error={!!error}\n placeholder={this.getText(this.props.schema.placeholder)}\n label={this.getText(this.props.schema.label)}\n helperText={this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}\n disabled={!!disabled}\n />}\n />;\n } else {\n return <TextField\n variant=\"standard\"\n fullWidth\n value={this.state.value === null || this.state.value === undefined ? '' : this.state.value}\n error={!!error}\n disabled={!!disabled}\n inputProps={{maxLength: this.props.schema.maxLength || this.props.schema.max || undefined}}\n onChange={e => {\n const value = e.target.value;\n this.setState({value}, () =>\n this.onChange(this.props.attr, this.props.schema.trim === false ? value : (value || '').trim()));\n }}\n placeholder={this.getText(this.props.schema.placeholder)}\n label={this.getText(this.props.schema.label)}\n helperText={this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}\n />;\n }\n }\n}\n\nConfigText.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigText);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport TextField from '@mui/material/TextField';\nimport IconButton from '@mui/material/IconButton';\n\nimport copy from '@iobroker/adapter-react-v5/Components/copy-to-clipboard';\nimport CopyIcon from '@iobroker/adapter-react-v5/icons/IconCopy';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%'\n }\n});\n\nclass ConfigTextSendTo extends ConfigGeneric {\n componentDidMount() {\n super.componentDidMount();\n\n this.askInstance();\n }\n\n askInstance() {\n if (this.props.alive) {\n let data = this.props.schema.data;\n if (data === undefined && this.props.schema.jsonData) {\n data = this.getPattern(this.props.schema.jsonData);\n try {\n data = JSON.parse(data);\n } catch (e) {\n console.error('Cannot parse json data: ' + data);\n }\n }\n\n if (data === undefined) {\n data = null;\n }\n\n this.props.socket.sendTo(`${this.props.adapterName}.${this.props.instance}`, this.props.schema.command || 'send', data)\n .then(text => this.setState({text: text || '', context: this.getContext()}));\n }\n }\n\n getContext() {\n const context = {};\n if (Array.isArray(this.props.schema.alsoDependsOn)) {\n this.props.schema.alsoDependsOn.forEach(attr =>\n context[attr] = ConfigGeneric.getValue(this.props.data, attr));\n }\n return JSON.stringify(context);\n }\n\n renderItem(error, disabled, defaultValue) {\n if (this.state.text === undefined) {\n return null;\n }\n\n if (this.props.alive) {\n const context = this.getContext();\n if (context !== this.state.context) {\n setTimeout(() => {\n this.askInstance();\n }, 300);\n }\n }\n\n if (this.props.schema.container === 'text') {\n return <TextField\n variant=\"standard\"\n fullWidth\n InputProps={{\n endAdornment: this.props.schema.copyToClipboard ?\n <IconButton\n size=\"small\"\n onClick={e => {\n copy(this.state.text);\n window.alert('Copied');\n }}>\n <CopyIcon/>\n </IconButton>\n : undefined,\n }}\n value={this.state.text}\n label={this.getText(this.props.schema.label)}\n helperText={this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}\n />;\n } else {\n return <div className={this.props.classes.fullWidth}>{this.state.text}</div>;\n }\n }\n}\n\nConfigTextSendTo.propTypes = {\n socket: PropTypes.object.isRequired,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n adapterName: PropTypes.string,\n instance: PropTypes.number,\n};\n\nexport default withStyles(styles)(ConfigTextSendTo);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport ConfigGeneric from './ConfigGeneric';\nimport { TimePicker } from '@mui/x-date-pickers';\n\nconst styles = theme => ({\n indeterminate: {\n opacity: 0.5\n }\n});\n\nclass ConfigTimePicker extends ConfigGeneric {\n componentDidMount() {\n super.componentDidMount();\n const value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n this.setState({ value });\n }\n\n renderItem(error, disabled, defaultValue) {\n return <TimePicker\n fullWidth\n margin=\"normal\"\n format=\"HH:mm:ss\"\n error={!!error}\n disabled={!!disabled}\n value={this.state.value === null || this.state.value === undefined ? new Date() : this.state.value}\n onChange={value => {\n this.setState({ value }, () =>\n this.onChange(this.props.attr, value));\n }}\n InputLabelProps={{\n shrink: true,\n }}\n placeholder={this.getText(this.props.schema.placeholder)}\n label={this.getText(this.props.schema.label)}\n helperText={this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}\n />\n }\n}\n\nConfigTimePicker.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigTimePicker);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport ConfigGeneric from './ConfigGeneric';\nimport { TextField } from '@mui/material';\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%'\n },\n icon: {\n width: 16,\n height: 16,\n marginRight: 8\n }\n});\n\nfunction convertID2Topic(id, prefix, namespace) {\n let topic;\n if (namespace && id.substring(0, namespace.length) === namespace) {\n topic = id.substring(namespace.length + 1);\n } else {\n topic = id;\n }\n topic = topic.replace(/\\./g, '/').replace(/_/g, ' ');\n return topic;\n}\n\nclass ConfigTopic extends ConfigGeneric {\n componentDidMount() {\n super.componentDidMount();\n const value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n if (!value && this.props.customObj && this.props.customObj._id) {\n let topic = convertID2Topic(this.props.customObj._id, null, this.props.adapterName + '.' + this.props.instance);\n this.setState({value: topic});\n } else {\n this.setState({value: value || ''});\n }\n }\n\n renderItem(error, disabled, defaultValue) {\n return <TextField\n variant=\"standard\"\n fullWidth\n inputProps={{maxLength: this.props.schema.maxLength || this.props.schema.max || undefined}}\n value={this.state.value}\n error={!!error}\n disabled={disabled}\n placeholder={this.getText(this.props.schema.placeholder)}\n label={this.getText(this.props.schema.label)}\n helperText={this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}\n onChange={e => {\n const value = e.target.value;\n this.setState({ value }, () =>\n this.onChange(this.props.attr, value));\n }}\n />;\n }\n}\n\nConfigTopic.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n adapterName: PropTypes.string,\n instance: PropTypes.number,\n customObj: PropTypes.object,\n};\n\nexport default withStyles(styles)(ConfigTopic);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport InputLabel from '@mui/material/InputLabel';\nimport MenuItem from '@mui/material/MenuItem';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport FormControl from '@mui/material/FormControl';\nimport Select from '@mui/material/Select';\n\nimport Icon from '@iobroker/adapter-react-v5/Components/Icon';\nimport I18n from '@iobroker/adapter-react-v5/i18n';\nimport Utils from '../Utils';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%'\n },\n icon: {\n width: 16,\n height: 16,\n marginRight: 8\n }\n});\n\nclass ConfigUser extends ConfigGeneric {\n componentDidMount() {\n super.componentDidMount();\n this.props.socket.getUsers()\n .then(users => {\n const _users = {};\n const lang = I18n.getLanguage();\n\n if (this.props.schema.short) {\n users.forEach(user => _users[user._id] = {\n color: user.common?.color,\n icon: user.common?.icon,\n name: Utils.getObjectNameFromObj(user, lang)\n });\n } else {\n users.forEach(user => _users[user._id.replace(/^system\\.user\\./, '')] = {\n color: user.common?.color,\n icon: user.common?.icon,\n name: Utils.getObjectNameFromObj(user, lang)\n });\n }\n\n this.setState({users: _users});\n });\n }\n\n renderItem(error, disabled, defaultValue) {\n const value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n\n return <FormControl variant=\"standard\" className={this.props.classes.fullWidth}>\n <InputLabel>{this.getText(this.props.schema.label)}</InputLabel>\n <Select\n variant=\"standard\"\n error={!!error}\n disabled={!!disabled}\n value={value}\n renderValue={val => <span>{this.state.users && this.state.users[val]?.icon ? <Icon src={this.state.users && this.state.users[val]?.icon} className={this.props.classes.icon} /> : null}{(this.state.users && this.state.users[val]?.name) || val || ''}</span>}\n style={{ color: (this.state.users && this.state.users[value]?.color) || undefined, backgroundColor: Utils.getInvertedColor(this.state.users && this.state.users[value]?.color, this.props.themeType) }}\n onChange={e => this.onChange(this.props.attr, e.target.value)}\n >\n {this.state.users && Object.keys(this.state.users).map(id => <MenuItem style={{ color: this.state.users[id].color || undefined, backgroundColor: Utils.getInvertedColor(this.state.users[id].color, this.props.themeType) }} key={id} value={id}>\n {this.state.users[id].icon ? <Icon src={this.state.users[id].icon} className={this.props.classes.icon} /> : null}\n {this.state.users[id].name}\n </MenuItem>)}\n </Select>\n {this.props.schema.help ? <FormHelperText>{this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}</FormHelperText> : null}\n </FormControl>;\n }\n}\n\nConfigUser.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigUser);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\nimport clsx from 'clsx';\n\nimport Grid from '@mui/material/Grid';\nimport Accordion from '@mui/material/Accordion';\nimport AccordionSummary from '@mui/material/AccordionSummary';\nimport AccordionDetails from '@mui/material/AccordionDetails';\nimport Typography from '@mui/material/Typography';\nimport ExpandMoreIcon from '@mui/icons-material/ExpandMore';\n\nimport ConfigGeneric from './ConfigGeneric';\nimport ConfigAlive from './ConfigAlive';\nimport ConfigAutocomplete from './ConfigAutocomplete';\nimport ConfigAutocompleteSendTo from './ConfigAutocompleteSendTo';\nimport ConfigCRON from './ConfigCRON';\nimport ConfigCertificateSelect from './ConfigCertificateSelect';\nimport ConfigCheckbox from './ConfigCheckbox';\nimport ConfigChip from './ConfigChip';\nimport ConfigColor from './ConfigColor';\nimport ConfigCoordinates from './ConfigCoordinates';\nimport ConfigCustom from './ConfigCustom';\nimport ConfigDatePicker from './ConfigDatePicker';\nimport ConfigFile from './ConfigFile';\nimport ConfigFileSelector from './ConfigFileSelector';\nimport ConfigFunc from './ConfigFunc';\nimport ConfigIP from './ConfigIP';\nimport ConfigImageUpload from './ConfigImageUpload';\nimport ConfigInstanceSelect from './ConfigInstanceSelect';\nimport ConfigJsonEditor from './ConfigJsonEditor';\nimport ConfigLanguage from './ConfigLanguage';\nimport ConfigNumber from './ConfigNumber';\nimport ConfigObjectId from './ConfigObjectId';\nimport ConfigPassword from './ConfigPassword';\nimport ConfigPattern from './ConfigPattern';\nimport ConfigRoom from './ConfigRoom';\nimport ConfigSelect from './ConfigSelect';\nimport ConfigSelectSendTo from './ConfigSelectSendTo';\nimport ConfigSendto from './ConfigSendto';\nimport ConfigSetState from './ConfigSetState';\nimport ConfigSlider from './ConfigSlider';\nimport ConfigStaticDivider from './ConfigStaticDivider';\nimport ConfigStaticHeader from './ConfigStaticHeader';\nimport ConfigStaticImage from './ConfigStaticImage';\nimport ConfigStaticText from './ConfigStaticText';\nimport ConfigTable from './ConfigTable';\nimport ConfigText from './ConfigText';\nimport ConfigTextSendTo from './ConfigTextSendTo';\nimport ConfigTimePicker from './ConfigTimePicker';\nimport ConfigTopic from './ConfigTopic';\nimport ConfigUser from './ConfigUser';\n\nconst components = {\n alive: ConfigAlive,\n autocomplete: ConfigAutocomplete,\n autocompleteSendTo: ConfigAutocompleteSendTo,\n certificate: ConfigCertificateSelect,\n checkbox: ConfigCheckbox,\n chip: ConfigChip, // deprecated. Use \"chips\"\n chips: ConfigChip,\n color: ConfigColor,\n coordinates: ConfigCoordinates,\n cron: ConfigCRON,\n custom: ConfigCustom,\n datePicker: ConfigDatePicker,\n divider: ConfigStaticDivider,\n file: ConfigFile,\n fileSelector: ConfigFileSelector,\n func: ConfigFunc,\n header: ConfigStaticHeader,\n image: ConfigImageUpload,\n instance: ConfigInstanceSelect,\n ip: ConfigIP,\n jsonEditor: ConfigJsonEditor,\n language: ConfigLanguage,\n number: ConfigNumber,\n objectId: ConfigObjectId,\n password: ConfigPassword,\n pattern: ConfigPattern,\n room: ConfigRoom,\n select: ConfigSelect,\n selectSendTo: ConfigSelectSendTo,\n sendTo: ConfigSendto,\n setState: ConfigSetState,\n slider: ConfigSlider,\n staticImage: ConfigStaticImage,\n staticLink: ConfigStaticText,\n staticText: ConfigStaticText,\n table: ConfigTable,\n text: ConfigText,\n textSendTo: ConfigTextSendTo,\n timePicker: ConfigTimePicker,\n topic: ConfigTopic,\n user: ConfigUser,\n};\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%',\n //height: '100%',\n },\n paper: {\n margin: 10,\n height: 'calc(100vh - 235px) !important',\n width: 'auto !important',\n overflowY: 'auto',\n paddingBottom: theme.spacing(1)\n },\n padding: {\n padding: 10,\n },\n heading: {\n\n },\n primary: {\n backgroundColor: theme.palette.primary.main,\n color: theme.palette.mode === 'dark' ? 'inherit' : '#FFF'\n },\n secondary: {\n backgroundColor: theme.palette.secondary.main,\n }\n});\n\nclass ConfigPanel extends ConfigGeneric {\n componentDidMount() {\n super.componentDidMount();\n if (this.props.schema && this.props.schema.collapsable) {\n this.setState({expanded: (window._localStorage || window.localStorage).getItem(this.props.adapterName + '.' + this.props.attr) === 'true'});\n }\n }\n\n renderItems(items, disabled) {\n const classes = this.props.classes || {};\n\n return items ? Object.keys(items).map(attr => {\n if (this.props.multiEdit && items[attr].noMultiEdit) {\n return null;\n }\n\n const type = items[attr].type || 'panel';\n let ItemComponent;\n if (type === 'custom') {\n // name\n // url\n if (items[attr].url) {\n ItemComponent = ConfigCustom;\n } else\n if (this.props.customs && this.props.customs[items[attr].component]) {\n ItemComponent = this.props.customs[items[attr].component];\n } else {\n console.error('Cannot find custom component: ' + items[attr].component);\n ItemComponent = ConfigGeneric;\n }\n } else if (type === 'panel') {\n ItemComponent = ConfigPanelStyled;\n } else {\n ItemComponent = components[type] || ConfigGeneric;\n }\n\n return <ItemComponent\n key={attr + '_' + (this.props.index === undefined ? '' : this.props.index)}\n index={this.props.index}\n arrayIndex={this.props.arrayIndex}\n globalData={this.props.globalData}\n onCommandRunning={this.props.onCommandRunning}\n commandRunning={this.props.commandRunning}\n className={classes.panel}\n socket={this.props.socket}\n adapterName={this.props.adapterName}\n instance={this.props.instance}\n common={this.props.common}\n customs={this.props.customs}\n alive={this.props.alive}\n themeType={this.props.themeType}\n themeName={this.props.themeName}\n data={this.props.data}\n originalData={this.props.originalData}\n systemConfig={this.props.systemConfig}\n onError={this.props.onError}\n onChange={this.props.onChange}\n multiEdit={this.props.multiEdit}\n dateFormat={this.props.dateFormat}\n isFloatComma={this.props.isFloatComma}\n disabled={disabled}\n imagePrefix={this.props.imagePrefix}\n\n changeLanguage={this.props.changeLanguage}\n forceUpdate={this.props.forceUpdate}\n registerOnForceUpdate={this.props.registerOnForceUpdate}\n\n customObj={this.props.customObj}\n instanceObj={this.props.instanceObj}\n custom={this.props.custom}\n\n schema={items[attr]}\n attr={attr}\n />;\n }) : null;\n }\n\n render() {\n const schema = this.props.schema;\n\n if (!schema) {\n return null;\n }\n\n const { disabled, hidden } = this.calculate(schema);\n\n const items = this.props.schema.items;\n const classes = this.props.classes || {};\n\n if (hidden) {\n if (schema.hideOnlyControl) {\n const item = <Grid\n item\n xs={schema.xs || undefined}\n lg={schema.lg || undefined}\n md={schema.md || undefined}\n sm={schema.sm || undefined}\n style={Object.assign(\n {},\n {marginBottom: 0, /*marginRight: 8, */textAlign: 'left'},\n schema.style,\n this.props.themaType === 'dark' ? schema.darkStyle : {}\n )}\n />;\n\n if (schema.newLine) {\n return <>\n <div style={{flexBasis: '100%', height: 0}} />\n {item}\n </>\n } else {\n return item;\n }\n } else {\n return null;\n }\n } else\n if (this.props.table) {\n return this.renderItems(items, disabled);\n } else\n if (this.props.custom) {\n return <Grid\n key={this.props.attr + '_' + this.props.index}\n container\n className={classes.fullWidth}\n spacing={2}\n >\n {this.renderItems(items, disabled)}\n </Grid>;\n } else {\n let content;\n if (schema.collapsable) {\n content = <Accordion\n key={this.props.attr + '_' + this.props.index}\n className={classes.fullWidth}\n expanded={!!this.state.expanded}\n onChange={() => {\n (window._localStorage || window.localStorage).setItem(this.props.adapterName + '.' + this.props.attr, this.state.expanded ? 'false' : 'true');\n this.setState({expanded: !this.state.expanded});\n }}\n >\n <AccordionSummary\n expandIcon={<ExpandMoreIcon />}\n style={Object.assign({}, schema.style, this.props.themeType ? schema.darkStyle : {})}\n className={clsx(classes.fullWidth, schema.color === 'primary' && classes.primary, schema.color === 'secondary' && classes.secondary)}\n >\n <Typography className={classes.heading}>{this.getText(schema.label)}</Typography>\n </AccordionSummary>\n <AccordionDetails>\n <Grid container className={classes.fullWidth + ' ' + classes.padding} spacing={2}>\n {this.renderItems(items, disabled)}\n </Grid>\n </AccordionDetails>\n </Accordion>\n } else {\n content = <div\n key={this.props.attr + '_' + this.props.index}\n className={clsx(this.props.className, this.props.isParentTab && classes.paper, classes.fullWidth)}\n >\n <Grid container className={clsx(classes.fullWidth, this.props.isParentTab && classes.padding)} spacing={2}>\n {this.renderItems(items, disabled)}\n </Grid>\n </div>;\n }\n\n if (!this.props.isParentTab) {\n const item = <Grid\n item\n title={this.getText(schema.tooltip)}\n xs={schema.xs || undefined}\n lg={schema.lg || undefined}\n md={schema.md || undefined}\n sm={schema.sm || undefined}\n style={Object.assign({}, {marginBottom: 0, /*marginRight: 8, */textAlign: 'left'}, schema.style)}>\n {content}\n </Grid>;\n\n if (schema.newLine) {\n return <>\n <div style={{flexBasis: '100%', height: 0}} />\n {item}\n </>;\n } else {\n return item;\n }\n } else {\n return content;\n }\n }\n }\n}\n\nConfigPanel.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n originalData: PropTypes.object,\n schema: PropTypes.object,\n index: PropTypes.number,\n customs: PropTypes.object,\n alive: PropTypes.bool,\n systemConfig: PropTypes.object,\n adapterName: PropTypes.string,\n instance: PropTypes.number,\n commandRunning: PropTypes.bool,\n onCommandRunning: PropTypes.func,\n dateFormat: PropTypes.string,\n isFloatComma: PropTypes.bool,\n multiEdit: PropTypes.bool,\n isParentTab: PropTypes.bool,\n imagePrefix: PropTypes.string,\n changeLanguage: PropTypes.func,\n\n arrayIndex: PropTypes.number,\n globalData: PropTypes.object,\n\n customObj: PropTypes.object,\n instanceObj: PropTypes.object,\n custom: PropTypes.bool,\n\n forceUpdate: PropTypes.func,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n registerOnForceUpdate: PropTypes.func,\n};\n\nconst ConfigPanelStyled = withStyles(styles)(ConfigPanel);\n\nexport default ConfigPanelStyled;","import { Component } from 'react';\n\nimport { withStyles } from '@mui/styles';\n\nimport PropTypes from 'prop-types';\n\nimport { Grid } from '@mui/material';\nimport { Typography } from '@mui/material';\n\nimport CheckCircleIcon from '@mui/icons-material/CheckCircle';\nimport CancelIcon from '@mui/icons-material/Cancel';\n\nimport green from '@mui/material/colors/green';\nimport red from '@mui/material/colors/red';\n\nconst styles = {\n checkIcon: {\n color: green[700]\n },\n cancelIcon: {\n color: red[700]\n },\n wrapperContent:{\n display: 'flex',\n flexFlow: 'nowrap',\n alignItems: 'inherit'\n }\n};\n\nclass State extends Component {\n\n getIcon() {\n if (this.props.state) {\n return <CheckCircleIcon className={ this.props.classes.checkIcon } />;\n } else {\n return <CancelIcon className={ this.props.classes.cancelIcon } />;\n }\n }\n\n render() {\n return <Grid\n item\n container\n className={this.props.classes.wrapperContent}\n alignItems=\"center\"\n direction=\"row\"\n spacing={ 1 }\n >\n <Grid item>\n { this.getIcon() }\n </Grid>\n <Grid item>\n <Typography>\n { this.props.children }\n </Typography>\n </Grid>\n </Grid>;\n }\n}\n\nState.propTypes = {\n state: PropTypes.bool\n};\n\nexport default withStyles(styles)(State);","import { Component } from 'react';\n\nimport { withStyles } from '@mui/styles';\n\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\n\nimport { Grid } from '@mui/material';\nimport { Paper } from '@mui/material';\n\nconst styles = {\n root: {\n width: '100%',\n height: '100%'\n },\n overflowHidden: {\n overflow: 'hidden'\n },\n container: {\n height: '100%'\n }\n};\n\nclass TabContainer extends Component {\n render() {\n const { classes } = this.props;\n\n return <Paper\n elevation={ !isNaN(this.props.elevation) ? this.props.elevation : 1 }\n className={ clsx(classes.root, {[classes.overflowHidden]: this.props.overflow !== 'visible'}, this.props.className) }\n >\n <Grid\n container\n direction=\"column\"\n wrap=\"nowrap\"\n className={ classes.container }\n >\n { this.props.children }\n </Grid>\n </Paper>;\n }\n}\n\nTabContainer.propTypes = {\n elevation: PropTypes.number,\n overflow: PropTypes.string,\n className: PropTypes.string\n};\n\nexport default withStyles(styles)(TabContainer);","import PropTypes from 'prop-types';\nimport clsx from 'clsx';\n\nimport { withStyles } from '@mui/styles';\n\nimport { Grid } from '@mui/material';\n\nconst styles = {\n root: {\n height: '100%',\n overflow: 'hidden'\n },\n overflowAuto: {\n overflow: 'auto'\n }\n};\n\nconst TabContent = props => {\n const { classes } = props;\n\n return <Grid\n item\n className={ clsx(classes.root, {[classes.overflowAuto]: props.overflow === 'auto'}) }\n >\n { props.children }\n </Grid>;\n}\n\nTabContent.propTypes = {\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Overflow behavior\n */\n overflow: PropTypes.string\n};\n\nexport default withStyles(styles)(TabContent);","import PropTypes from 'prop-types';\n\nimport { Grid } from '@mui/material';\n\nconst TabHeader = props => {\n return <Grid\n item\n container\n alignItems=\"center\"\n >\n { props.children }\n </Grid>;\n}\n\nTabHeader.propTypes = {\n /**\n * The content of the component.\n */\n children: PropTypes.node\n};\n\nexport default TabHeader;","import React from 'react';\n\nimport { IconButton, Tooltip } from '@mui/material';\n\nimport Brightness4Icon from '@mui/icons-material/Brightness4';\nimport Brightness5Icon from '@mui/icons-material/Brightness5';\nimport Brightness6Icon from '@mui/icons-material/Brightness6';\nimport Brightness7Icon from '@mui/icons-material/Brightness7';\n\nexport default function ToggleThemeMenu({ themeName, toggleTheme, t, className, style, size }) {\n return <div className={className || undefined} style={style || undefined}>\n <Tooltip title={t('ra_Change color theme')}>\n <IconButton onClick={() => toggleTheme()} size={size || 'medium'}>\n {themeName === 'dark' && <Brightness4Icon className={className} />}\n {themeName === 'blue' && <Brightness5Icon className={className} />}\n {themeName === 'colored' && <Brightness6Icon className={className} />}\n {themeName === 'light' && <Brightness7Icon className={className} />}\n </IconButton>\n </Tooltip>\n </div>;\n}","/**\n * Copyright 2018-2022 bluefox <dogafox@gmail.com>\n *\n * MIT License\n *\n **/\nimport React from 'react';\nimport I18n from '@iobroker/adapter-react-v5/i18n';\n\nconst NAMESPACE = 'material';\nconst days = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];\nconst months = ['Jan', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\nconst QUALITY_BITS = {\n 0x00: '0x00 - good',\n\n 0x01: '0x01 - general problem',\n 0x02: '0x02 - no connection problem',\n\n 0x10: '0x10 - substitute value from controller',\n 0x20: '0x20 - substitute initial value',\n 0x40: '0x40 - substitute value from device or instance',\n 0x80: '0x80 - substitute value from sensor',\n\n 0x11: '0x11 - general problem by instance',\n 0x41: '0x41 - general problem by device',\n 0x81: '0x81 - general problem by sensor',\n\n 0x12: '0x12 - instance not connected',\n 0x42: '0x42 - device not connected',\n 0x82: '0x82 - sensor not connected',\n\n 0x44: '0x44 - device reports error',\n 0x84: '0x84 - sensor reports error',\n};\nconst SIGNATURES = {\n JVBERi0: 'pdf',\n R0lGODdh: 'gif',\n R0lGODlh: 'gif',\n iVBORw0KGgo: 'png',\n '/9j/': 'jpg',\n PHN2Zw: 'svg',\n Qk1: 'bmp',\n AAABAA: 'ico' // 00 00 01 00 according to https://en.wikipedia.org/wiki/List_of_file_signatures\n};\n\nclass Utils {\n static namespace = NAMESPACE;\n static INSTANCES = 'instances';\n static dateFormat = ['DD', 'MM'];\n static FORBIDDEN_CHARS = /[^._\\-/ :!#$%&()+=@^{}|~\\p{Ll}\\p{Lu}\\p{Nd}]+/gu;\n\n /**\n * Capitalize words.\n * @param {string | undefined} name\n * @returns {string}\n */\n static CapitalWords(name) {\n return (name || '').split(/[\\s_]/)\n .filter(item => item)\n .map(word => word ? word[0].toUpperCase() + word.substring(1).toLowerCase() : '')\n .join(' ');\n }\n\n static formatSeconds(seconds) {\n const days = Math.floor(seconds / (3600 * 24));\n seconds %= 3600 * 24;\n let hours = Math.floor(seconds / 3600);\n if (hours < 10) {\n hours = '0' + hours;\n }\n seconds %= 3600;\n let minutes = Math.floor(seconds / 60);\n if (minutes < 10) {\n minutes = '0' + minutes;\n }\n seconds %= 60;\n seconds = Math.floor(seconds);\n if (seconds < 10) {\n seconds = '0' + seconds;\n }\n let text = '';\n if (days) {\n text += `${days} ${I18n.t('ra_daysShortText')} `;\n }\n text += `${hours}:${minutes}:${seconds}`;\n\n return text;\n }\n\n /**\n * Get the name of the object by id from the name or description.\n * @param {Record<string, ioBroker.Object>} objects\n * @param {string} id\n * @param {{ name: any; } | ioBroker.Languages | null} settings\n * @param {{ language?: ioBroker.Languages; }} options\n * @param {boolean} [isDesc] Set to true to get the description.\n * @returns {string}\n */\n static getObjectName(objects, id, settings, options, isDesc) {\n let item = objects[id];\n let text = id;\n const attr = isDesc ? 'desc' : 'name';\n\n if (typeof settings === 'string' && !options) {\n options = {language: settings};\n settings = null;\n }\n\n options = options || {};\n if (!options.language) {\n options.language = (objects['system.config'] && objects['system.config'].common && objects['system.config'].common.language) || window.sysLang || 'en';\n }\n if (settings && settings.name) {\n text = settings.name;\n if (typeof text === 'object') {\n text = text[options.language] || text.en;\n }\n } else\n if (item && item.common && item.common[attr]) {\n text = item.common[attr];\n if (attr !== 'desc' && !text && item.common.desc) {\n text = item.common.desc;\n }\n if (typeof text === 'object') {\n text = text[options.language] || text.en || text.de || text.ru || '';\n }\n text = (text || '').toString().replace(/[_.]/g, ' ');\n\n if (text === text.toUpperCase()) {\n text = text[0] + text.substring(1).toLowerCase();\n }\n } else {\n let pos = id.lastIndexOf('.');\n text = id.substring(pos + 1).replace(/[_.]/g, ' ');\n text = Utils.CapitalWords(text);\n }\n\n return text.trim();\n }\n\n /**\n * Get the name of the object from the name or description.\n * @param {ioBroker.PartialObject} obj\n * @param {{ name: any; } | ioBroker.Languages | null } settings or language\n * @param {{ language?: ioBroker.Languages; } } options\n * @param {boolean} [isDesc] Set to true to get the description.\n * @returns {string}\n */\n static getObjectNameFromObj(obj, settings, options, isDesc) {\n let item = obj;\n let text = (obj && obj._id) || '';\n const attr = isDesc ? 'desc' : 'name';\n\n if (typeof settings === 'string' && !options) {\n options = {language: settings};\n settings = null;\n }\n\n options = options || {};\n\n if (settings && settings.name) {\n text = settings.name;\n if (typeof text === 'object') {\n text = text[options.language] || text.en;\n }\n } else\n if (item && item.common && item.common[attr]) {\n text = item.common[attr];\n if (attr !== 'desc' && !text && item.common.desc) {\n text = item.common.desc;\n }\n if (typeof text === 'object') {\n text = text[options.language] || text.en;\n }\n text = (text || '').toString().replace(/[_.]/g, ' ');\n\n if (text === text.toUpperCase()) {\n text = text[0] + text.substring(1).toLowerCase();\n }\n }\n return text.trim();\n }\n\n /**\n * @param {ioBroker.PartialObject | ioBroker.ObjectCommon} obj\n * @param {string} forEnumId\n * @param {{ user: string; }} options\n * @returns {string | null}\n */\n static getSettingsOrder(obj, forEnumId, options) {\n if (obj && obj.hasOwnProperty('common')) {\n obj = obj.common;\n }\n let settings;\n if (obj && obj.custom) {\n settings = (obj.custom || {})[NAMESPACE];\n const user = options.user || 'admin';\n if (settings && settings[user]) {\n if (forEnumId) {\n if (settings[user].subOrder && settings[user].subOrder[forEnumId]) {\n return JSON.parse(JSON.stringify(settings[user].subOrder[forEnumId]));\n }\n } else {\n if (settings[user].order) {\n return JSON.parse(JSON.stringify(settings[user].order));\n }\n }\n }\n }\n return null;\n }\n\n /**\n * @param {ioBroker.PartialObject | ioBroker.ObjectCommon} obj\n * @param {string} forEnumId\n * @param {{ user: string; }} options\n */\n static getSettingsCustomURLs(obj, forEnumId, options) {\n if (obj && obj.hasOwnProperty('common')) {\n obj = obj.common;\n }\n let settings;\n if (obj && obj.custom) {\n settings = (obj.custom || {})[NAMESPACE];\n const user = options.user || 'admin';\n if (settings && settings[user]) {\n if (forEnumId) {\n if (settings[user].subURLs && settings[user].subURLs[forEnumId]) {\n return JSON.parse(JSON.stringify(settings[user].subURLs[forEnumId]));\n }\n } else {\n if (settings[user].URLs) {\n return JSON.parse(JSON.stringify(settings[user].URLs));\n }\n }\n }\n }\n return null;\n }\n\n /**\n * Reorder the array items in list between source and dest.\n * @param {Iterable<any> | ArrayLike<any>} list\n * @param {number} source\n * @param {number} dest\n */\n static reorder(list, source, dest) {\n const result = Array.from(list);\n const [removed] = result.splice(source, 1);\n result.splice(dest, 0, removed);\n return result;\n };\n\n /**\n * @param {any} obj\n * @param {{ id: any; user: any; name: any; icon: any; color: any; language: ioBroker.Languages; }} options\n * @param {boolean} [defaultEnabling]\n */\n static getSettings(obj, options, defaultEnabling) {\n let settings;\n const id = (obj && obj._id) || (options && options.id);\n if (obj && obj.hasOwnProperty('common')) {\n obj = obj.common;\n }\n if (obj && obj.custom) {\n settings = obj.custom || {};\n settings = settings[NAMESPACE] && settings[NAMESPACE][options.user || 'admin'] ? JSON.parse(JSON.stringify(settings[NAMESPACE][options.user || 'admin'])) : {enabled: true};\n } else {\n settings = {enabled: defaultEnabling === undefined ? true : defaultEnabling, useCustom: false};\n }\n\n if (!settings.hasOwnProperty('enabled')) {\n settings.enabled = defaultEnabling === undefined ? true : defaultEnabling;\n }\n\n if (false && settings.useCommon) {\n if (obj.color) settings.color = obj.color;\n if (obj.icon) settings.icon = obj.icon;\n if (obj.name) settings.name = obj.name;\n } else {\n if (options) {\n if (!settings.name && options.name) settings.name = options.name;\n if (!settings.icon && options.icon) settings.icon = options.icon;\n if (!settings.color && options.color) settings.color = options.color;\n }\n\n if (obj) {\n if (!settings.color && obj.color) settings.color = obj.color;\n if (!settings.icon && obj.icon) settings.icon = obj.icon;\n if (!settings.name && obj.name) settings.name = obj.name;\n }\n }\n\n if (typeof settings.name === 'object') {\n settings.name = settings.name[options.language] || settings.name.en;\n\n settings.name = (settings.name || '').toString().replace(/_/g, ' ');\n\n if (settings.name === settings.name.toUpperCase()) {\n settings.name = settings.name[0] + settings.name.substring(1).toLowerCase();\n }\n }\n if (!settings.name && id) {\n let pos = id.lastIndexOf('.');\n settings.name = id.substring(pos + 1).replace(/[_.]/g, ' ');\n settings.name = (settings.name || '').toString().replace(/_/g, ' ');\n settings.name = Utils.CapitalWords(settings.name);\n }\n\n return settings;\n }\n\n /**\n * @param {any} obj\n * @param {any} settings\n * @param {{ user: any; language: ioBroker.Languages; }} options\n */\n static setSettings(obj, settings, options) {\n if (obj) {\n obj.common = obj.common || {};\n obj.common.custom = obj.common.custom || {};\n obj.common.custom[NAMESPACE] = obj.common.custom[NAMESPACE] || {};\n obj.common.custom[NAMESPACE][options.user || 'admin'] = settings;\n const s = obj.common.custom[NAMESPACE][options.user || 'admin'];\n if (s.useCommon) {\n if (s.color !== undefined) {\n obj.common.color = s.color;\n delete s.color;\n }\n if (s.icon !== undefined) {\n obj.common.icon = s.icon;\n delete s.icon;\n }\n if (s.name !== undefined) {\n if (typeof obj.common.name !== 'object') {\n obj.common.name = {};\n obj.common.name[options.language] = s.name;\n } else{\n obj.common.name[options.language] = s.name;\n }\n delete s.name;\n }\n }\n\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * Get the icon for the given settings.\n * @param {{ icon: string | undefined; name: string | undefined; prefix: string | undefined}} settings\n * @param {any} style\n * @returns {JSX.Element | null}\n */\n static getIcon(settings, style) {\n if (settings && settings.icon) {\n // If UTF-8 icon\n if (settings.icon.length <= 2) {\n return <span style={style || {}}>{settings.icon}</span>;\n } else\n if (settings.icon.startsWith('data:image')) {\n return <img alt={settings.name} src={settings.icon} style={style || {}}/>;\n } else { // may be later some changes for second type\n return <img alt={settings.name} src={(settings.prefix || '') + settings.icon} style={style || {}}/>;\n }\n }\n return null;\n }\n\n /**\n * Get the icon for the given object.\n * @param {string} id\n * @param {{ common: { icon: any; }; }} obj\n * @returns {string | null}\n */\n static getObjectIcon(id, obj) {\n // If id is Object\n if (typeof id === 'object') {\n obj = id;\n id = obj._id;\n }\n\n if (obj && obj.common && obj.common.icon) {\n let icon = obj.common.icon;\n // If UTF-8 icon\n if (typeof icon === 'string' && icon.length <= 2) {\n return icon;\n } else\n if (icon.startsWith('data:image')) {\n return icon;\n } else {\n const parts = id.split('.');\n if (parts[0] === 'system') {\n icon = 'adapter/' + parts[2] + (icon.startsWith('/') ? '' : '/') + icon;\n } else {\n icon = 'adapter/' + parts[0] + (icon.startsWith('/') ? '' : '/') + icon;\n }\n\n if (window.location.pathname.match(/adapter\\/[^/]+\\/[^/]+\\.html/)) {\n icon = '../../' + icon;\n } else if (window.location.pathname.match(/material\\/[.\\d]+/)) {\n icon = '../../' + icon;\n } else\n if (window.location.pathname.match(/material\\//)) {\n icon = '../' + icon;\n }\n return icon;\n }\n } else {\n return null;\n }\n }\n\n /**\n * Splits CamelCase into words.\n * @param {string | undefined} text\n * @returns {string}\n */\n static splitCamelCase(text) {\n if (false && text !== text.toUpperCase()) {\n const words = text.split(/\\s+/);\n for (let i = 0; i < words.length; i++) {\n let word = words[i];\n if (word.toLowerCase() !== word && word.toUpperCase() !== word) {\n let z = 0;\n const ww = [];\n let start = 0;\n while (z < word.length) {\n if (word[z].match(/[A-ZÜÄÖА-Я]/)) {\n ww.push(word.substring(start, z));\n start = z;\n }\n z++;\n }\n if (start !== z) {\n ww.push(word.substring(start, z));\n }\n for (let k = 0; k < ww.length; k++) {\n words.splice(i + k, 0, ww[k]);\n }\n i += ww.length;\n }\n }\n\n return words.map(w => {\n w = w.trim();\n if (w) {\n return w[0].toUpperCase() + w.substring(1).toLowerCase();\n }\n return '';\n }).join(' ');\n } else {\n return Utils.CapitalWords(text);\n }\n }\n\n /**\n * Check if the given color is bright.\n * https://stackoverflow.com/questions/35969656/how-can-i-generate-the-opposite-color-according-to-current-color\n * @param {string | null | undefined} color\n * @param {boolean} [defaultValue]\n * @returns {boolean}\n */\n static isUseBright(color, defaultValue) {\n if (color === null || color === undefined || color === '') {\n return defaultValue === undefined ? true : defaultValue;\n }\n color = color.toString();\n if (color.indexOf('#') === 0) {\n color = color.slice(1);\n }\n let r;\n let g;\n let b;\n\n const rgb = color.match(/^rgba?[\\s+]?\\([\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?/i);\n if (rgb && rgb.length === 4) {\n r = parseInt(rgb[1], 10);\n g = parseInt(rgb[2], 10);\n b = parseInt(rgb[3], 10);\n } else {\n // convert 3-digit hex to 6-digits.\n if (color.length === 3) {\n color = color[0] + color[0] + color[1] + color[1] + color[2] + color[2];\n }\n if (color.length !== 6) {\n return false;\n }\n\n r = parseInt(color.slice(0, 2), 16);\n g = parseInt(color.slice(2, 4), 16);\n b = parseInt(color.slice(4, 6), 16);\n }\n\n // http://stackoverflow.com/a/3943023/112731\n return (r * 0.299 + g * 0.587 + b * 0.114) <= 186;\n };\n\n /**\n * Get the time string in the format 00:00.\n * @param {string | number} seconds\n */\n static getTimeString(seconds) {\n seconds = parseFloat(seconds);\n if (isNaN(seconds)) {\n return '--:--';\n }\n const hours = Math.floor(seconds / 3600);\n let minutes = Math.floor((seconds % 3600) / 60);\n let secs = seconds % 60;\n if (hours) {\n if (minutes < 10) minutes = '0' + minutes;\n if (secs < 10) secs = '0' + secs;\n return hours + ':' + minutes + ':' + secs;\n } else {\n if (secs < 10) secs = '0' + secs;\n return minutes + ':' + secs;\n }\n }\n\n /**\n * Gets the wind direction with the given angle (degrees).\n * @param {number} angle in degrees.\n * @returns {string | undefined}\n */\n static getWindDirection(angle) {\n if (angle >= 0 && angle < 11.25) {\n return 'N'\n } else if (angle >= 11.25 && angle < 33.75) {\n return 'NNE'\n } else if (angle >= 33.75 && angle < 56.25) {\n return 'NE'\n } else if (angle >= 56.25 && angle < 78.75) {\n return 'ENE'\n } else if (angle >= 78.75 && angle < 101.25) {\n return 'E'\n } else if (angle >= 101.25 && angle < 123.75) {\n return 'ESE'\n } else if (angle >= 123.75 && angle < 146.25) {\n return 'SE'\n } else if (angle >= 146.25 && angle < 168.75) {\n return 'SSE'\n } else if (angle >= 168.75 && angle < 191.25) {\n return 'S'\n } else if (angle >= 191.25 && angle < 213.75) {\n return 'SSW'\n } else if (angle >= 213.75 && angle < 236.25) {\n return 'SW'\n } else if (angle >= 236.25 && angle < 258.75) {\n return 'WSW'\n } else if (angle >= 258.75 && angle < 281.25) {\n return 'W'\n } else if (angle >= 281.25 && angle < 303.75) {\n return 'WNW'\n } else if (angle >= 303.75 && angle < 326.25) {\n return 'NW'\n } else if (angle >= 326.25 && angle < 348.75) {\n return 'NNW'\n } else if (angle >= 348.75) {\n return 'N'\n }\n }\n\n /**\n * Pad the given number with a zero if its not 2 digits long.\n * @param {string | number} num\n */\n static padding(num) {\n if (typeof num === 'string') {\n if (num.length < 2) {\n return '0' + num;\n } else {\n return num;\n }\n } else if (num < 10) {\n return '0' + num;\n } else {\n return num;\n }\n }\n\n /**\n * Sets the date format.\n * @param {string} format\n */\n static setDataFormat(format) {\n if (format) {\n Utils.dateFormat = format.toUpperCase().split(/[.-/]/);\n Utils.dateFormat.splice(Utils.dateFormat.indexOf('YYYY'), 1);\n }\n }\n\n /**\n * Converts the date to a string.\n * @param {string | number | Date} now\n * @returns {string}\n */\n static date2string(now) {\n if (typeof now === 'string') {\n now = now.trim();\n if (!now) return '';\n // only letters\n if (now.match(/^[\\w\\s]+$/)) {\n // Day of week\n return now;\n }\n let m = now.match(/(\\d{1,4})[-./](\\d{1,2})[-./](\\d{1,4})/);\n if (m) {\n let a = [parseInt(m[1], 10), parseInt(m[2], 10), parseInt(m[3], 10)];\n let year = a.find(y => y > 31);\n a.splice(a.indexOf(year), 1);\n let day = a.find(m => m > 12);\n if (day) {\n a.splice(a.indexOf(day), 1);\n now = new Date(year, a[0] - 1, day);\n } else {\n // MM DD\n if (Utils.dateFormat[0][0] === 'M' && Utils.dateFormat[1][0] === 'D') {\n now = new Date(year, a[0] - 1, a[1]);\n if (Math.abs(now.getTime - Date.now()) > 3600000 * 24 * 10) {\n now = new Date(year, a[1] - 1, a[0]);\n }\n } else\n // DD MM\n if (Utils.dateFormat[0][0] === 'D' && Utils.dateFormat[1][0] === 'M') {\n now = new Date(year, a[1] - 1, a[0]);\n if (Math.abs(now.getTime - Date.now()) > 3600000 * 24 * 10) {\n now = new Date(year, a[0] - 1, a[1]);\n }\n } else {\n now = new Date(now);\n }\n }\n } else {\n now = new Date(now);\n }\n } else {\n now = new Date(now);\n }\n\n let date = I18n.t('ra_dow_' + days[now.getDay()]).replace('ra_dow_', '');\n date += '. ' + now.getDate() + ' ' + I18n.t('ra_month_' + months[now.getMonth()]).replace('ra_month_', '');\n return date;\n }\n\n /**\n * Render a text as a link.\n * @param {string} text\n * @returns {string | JSX.Element[]}\n */\n static renderTextWithA(text) {\n let m = text.match(/<a [^<]+<\\/a>|<br\\/?>/);\n if (m) {\n const result = [];\n let key = 1;\n do {\n const p = text.split(m[0]);\n p[0] && result.push(<span key={'a' + (key++)}>{p[0]}</span>);\n\n if (m[0].startsWith('<br')) {\n result.push(<br key={'a' + (key++)} />);\n } else {\n let href = m[0].match(/href=\"([^\"]+)\"/) || m[0].match(/href='([^']+)'/);\n let target = m[0].match(/target=\"([^\"]+)\"/) || m[0].match(/target='([^']+)'/);\n let rel = m[0].match(/rel=\"([^\"]+)\"/) || m[0].match(/rel='([^']+)'/);\n const title = m[0].match(/>([^<]*)</);\n\n // eslint-disable-next-line\n result.push(<a key={'a' + (key++)} href={href ? href[1] : ''} target={target ? target[1] : '_blank'} rel={rel ? rel[1] : ''}>{title ? title[1] : ''}</a>);\n }\n\n text = p[1];\n\n m = text && text.match(/<a [^<]+<\\/a>|<br\\/?>/);\n if (!m) {\n p[1] && result.push(<span key={'a' + (key++)}>{p[1]}</span>);\n }\n } while (m);\n\n return result;\n } else {\n return text;\n }\n }\n\n /**\n * Get the smart name of the given state.\n * @param {Record<string, ioBroker.StateObject> | ioBroker.StateObject} states\n * @param {string} id\n * @param {string} instanceId\n * @param {boolean} [noCommon]\n */\n static getSmartName(states, id, instanceId, noCommon) {\n if (!id) {\n if (!noCommon) {\n if (!states.common) {\n return states.smartName;\n } else {\n if (states && !states.common) {\n return states.smartName;\n } else {\n return states.common.smartName;\n }\n }\n } else {\n if (states && !states.common) {\n return states.smartName;\n } else {\n return (states &&\n states.common &&\n states.common.custom &&\n states.common.custom[instanceId]) ?\n states.common.custom[instanceId].smartName : undefined;\n }\n }\n } else\n if (!noCommon) {\n return states[id].common.smartName;\n } else {\n return (states[id] &&\n states[id].common &&\n states[id].common.custom &&\n states[id].common.custom[instanceId]) ?\n states[id].common.custom[instanceId].smartName || null : null;\n }\n }\n\n /**\n * Get the smart name from a state.\n * @param {ioBroker.StateObject} obj\n * @param {string} instanceId\n * @param {boolean} [noCommon]\n */\n static getSmartNameFromObj(obj, instanceId, noCommon) {\n if (!noCommon) {\n if (!obj.common) {\n return obj.smartName;\n } else {\n if (obj && !obj.common) {\n return obj.smartName;\n } else {\n return obj.common.smartName;\n }\n }\n } else {\n if (obj && !obj.common) {\n return obj.smartName;\n } else {\n return (obj &&\n obj.common &&\n obj.common.custom &&\n obj.common.custom[instanceId]) ?\n obj.common.custom[instanceId].smartName : undefined;\n }\n }\n }\n\n /**\n * Enable smart name for a state.\n * @param {ioBroker.StateObject} obj\n * @param {string} instanceId\n * @param {boolean} [noCommon]\n */\n static enableSmartName(obj, instanceId, noCommon) {\n if (noCommon) {\n obj.common.custom = obj.common.custom || {};\n obj.common.custom[instanceId] = obj.common.custom[instanceId] || {};\n obj.common.custom[instanceId].smartName = {};\n } else {\n obj.common.smartName = {};\n }\n }\n\n /**\n * Completely remove smart name from a state.\n * @param {ioBroker.StateObject} obj\n * @param {string | number} instanceId\n * @param {boolean} [noCommon]\n */\n static removeSmartName(obj, instanceId, noCommon) {\n if (noCommon) {\n if (obj.common && obj.common.custom && obj.common.custom[instanceId]) {\n obj.common.custom[instanceId] = null;\n }\n } else {\n obj.common.smartName = null;\n }\n }\n\n /**\n * Update the smartname of a state.\n * @param {ioBroker.StateObject} obj\n * @param {string} newSmartName\n * @param {string | undefined} byON\n * @param {string | undefined} smartType\n * @param {string} instanceId\n * @param {boolean} [noCommon]\n */\n static updateSmartName(obj, newSmartName, byON, smartType, instanceId, noCommon) {\n const language = I18n.getLanguage();\n\n // convert Old format\n if (typeof obj.common.smartName === 'string') {\n const nnn = obj.common.smartName;\n obj.common.smartName = {};\n obj.common.smartName[language] = nnn;\n }\n\n // convert old settings\n if (obj.native && obj.native.byON) {\n delete obj.native.byON;\n let _smartName = obj.common.smartName;\n\n if (!_smartName || typeof _smartName !== 'object') {\n _smartName = {en: _smartName};\n _smartName[language] = _smartName.en;\n }\n obj.common.smartName = _smartName;\n }\n if (smartType !== undefined) {\n if (noCommon) {\n obj.common.custom = obj.common.custom || {};\n obj.common.custom[instanceId] = obj.common.custom[instanceId] || {};\n obj.common.custom[instanceId].smartName = obj.common.custom[instanceId].smartName || {};\n if (!smartType) {\n delete obj.common.custom[instanceId].smartName.smartType;\n } else {\n obj.common.custom[instanceId].smartName.smartType = smartType;\n }\n } else {\n obj.common.smartName = obj.common.smartName || {};\n if (!smartType) {\n delete obj.common.smartName.smartType;\n } else {\n obj.common.smartName.smartType = smartType;\n }\n\n }\n }\n if (byON !== undefined) {\n if (noCommon) {\n obj.common.custom = obj.common.custom || {};\n obj.common.custom[instanceId] = obj.common.custom[instanceId] || {};\n obj.common.custom[instanceId].smartName = obj.common.custom[instanceId].smartName || {};\n obj.common.custom[instanceId].smartName.byON = byON;\n } else {\n obj.common.smartName = obj.common.smartName || {};\n obj.common.smartName.byON = byON;\n }\n }\n if (newSmartName !== undefined) {\n let smartName;\n if (noCommon) {\n obj.common.custom = obj.common.custom || {};\n obj.common.custom[instanceId] = obj.common.custom[instanceId] || {};\n obj.common.custom[instanceId].smartName = obj.common.custom[instanceId].smartName || {};\n smartName = obj.common.custom[instanceId].smartName;\n } else {\n obj.common.smartName = obj.common.smartName || {};\n smartName = obj.common.smartName;\n }\n smartName[language] = newSmartName;\n\n // If smart name deleted\n if (smartName && (!smartName[language] ||\n (smartName[language] === obj.common.name &&\n (!obj.common.role || obj.common.role.indexOf('button') >= 0)))) {\n delete smartName[language];\n let empty = true;\n // Check if structure has any definitions\n for (const key in smartName) {\n if (smartName.hasOwnProperty(key)) {\n empty = false;\n break;\n }\n }\n // If empty => delete smartName completely\n if (empty) {\n if (noCommon) {\n if (obj.common.custom[instanceId].smartName.byON === undefined) {\n delete obj.common.custom[instanceId];\n } else {\n delete obj.common.custom[instanceId].en;\n delete obj.common.custom[instanceId].de;\n delete obj.common.custom[instanceId].ru;\n delete obj.common.custom[instanceId].nl;\n delete obj.common.custom[instanceId].pl;\n delete obj.common.custom[instanceId].it;\n delete obj.common.custom[instanceId].fr;\n delete obj.common.custom[instanceId].pt;\n delete obj.common.custom[instanceId].es;\n delete obj.common.custom[instanceId]['zh-cn'];\n }\n } else {\n if (obj.common.smartName.byON !== undefined) {\n delete obj.common.smartName.en;\n delete obj.common.smartName.de;\n delete obj.common.smartName.ru;\n delete obj.common.smartName.nl;\n delete obj.common.smartName.pl;\n delete obj.common.smartName.it;\n delete obj.common.smartName.fr;\n delete obj.common.smartName.pt;\n delete obj.common.smartName.es;\n delete obj.common.smartName['zh-cn'];\n } else {\n obj.common.smartName = null;\n }\n }\n }\n }\n }\n }\n\n /**\n * Disable the smart name of a state.\n * @param {ioBroker.StateObject} obj\n * @param {string} instanceId\n * @param {boolean} [noCommon]\n */\n static disableSmartName(obj, instanceId, noCommon) {\n if (noCommon) {\n obj.common.custom = obj.common.custom || {};\n obj.common.custom[instanceId] = obj.common.custom[instanceId] || {};\n obj.common.custom[instanceId].smartName = false;\n } else {\n obj.common.smartName = false;\n }\n }\n\n /**\n * Copy text to the clipboard.\n * @param {string} text\n * @param {Event} [e]\n */\n static copyToClipboard(text, e) {\n const el = window.document.createElement('textarea');\n el.value = text;\n window.document.body.appendChild(el);\n el.select();\n window.document.execCommand('copy');\n window.document.body.removeChild(el);\n console.log(text);\n e && e.stopPropagation();\n e && e.preventDefault();\n }\n\n /**\n * Gets the extension of a file name.\n * @param {string | null} [fileName] the file name.\n * @returns {string | null} The extension in lower case.\n */\n static getFileExtension(fileName) {\n const pos = (fileName || '').lastIndexOf('.');\n if (pos !== -1) {\n return fileName.substring(pos + 1).toLowerCase();\n } else {\n return null;\n }\n }\n\n /**\n * Format number of bytes as a string with B, KB, MB or GB.\n * The base for all calculations is 1024.\n * @param {number} bytes The number of bytes.\n * @returns {string} The formatted string (e.g. '723.5 KB')\n */\n static formatBytes(bytes) {\n if (Math.abs(bytes) < 1024) {\n return bytes + ' B';\n }\n\n const units = ['KB','MB','GB'];\n //const units = ['KiB','MiB','GiB','TiB','PiB','EiB','ZiB','YiB'];\n let u = -1;\n\n do {\n bytes /= 1024;\n ++u;\n } while (Math.abs(bytes) >= 1024 && u < units.length - 1);\n\n return bytes.toFixed(1) + ' ' + units[u];\n }\n\n /**\n * Invert the given color according to theme type to get the inverted text color for background\n * @param {string} color Color in the format '#rrggbb' or '#rgb' (or without hash)\n * @param {string} themeType theme type\n * @param {string} invert dark theme has light color in control or light theme has light color in control\n * @returns {string}\n */\n static getInvertedColor(color, themeType, invert) {\n if (!color) {\n return undefined;\n } else {\n const invertedColor = Utils.invertColor(color, true);\n if (invertedColor === '#FFFFFF' && (themeType === 'dark' || (invert && themeType === 'light'))) {\n return '#DDD';\n } else\n if (invertedColor === '#000000' && (themeType === 'light' || (invert && themeType === 'dark'))) {\n return '#222';\n } else {\n return undefined;\n }\n }\n }\n\n // Big thanks to: https://stackoverflow.com/questions/35969656/how-can-i-generate-the-opposite-color-according-to-current-color\n /**\n * Invert the given color\n * @param {string} hex Color in the format '#rrggbb' or '#rgb' (or without hash)\n * @param {boolean} bw Set to black or white.\n * @returns {string}\n */\n static invertColor(hex, bw) {\n if (hex === undefined || hex === null || hex === '' || typeof hex !== 'string') {\n return '';\n }\n if (hex.startsWith('rgba')) {\n const m = hex.match(/rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+),\\s*([.\\d]+)\\)/);\n if (m) {\n hex = parseInt(m[1], 10).toString(16).padStart(2, '0') +\n parseInt(m[2], 10).toString(16).padStart(2, '0') +\n parseInt(m[2], 10).toString(16).padStart(2, '0');\n }\n } else if (hex.startsWith('rgba')) {\n const m = hex.match(/rgb?\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)/);\n if (m) {\n hex = parseInt(m[1], 10).toString(16).padStart(2, '0') +\n parseInt(m[2], 10).toString(16).padStart(2, '0') +\n parseInt(m[2], 10).toString(16).padStart(2, '0');\n }\n } else\n if (hex.startsWith('#')) {\n hex = hex.slice(1);\n }\n // convert 3-digit hex to 6-digits.\n if (hex.length === 3) {\n hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\n }\n if (hex.length !== 6) {\n console.warn('Cannot invert color: ' + hex);\n return hex;\n }\n let r = parseInt(hex.slice(0, 2), 16);\n let g = parseInt(hex.slice(2, 4), 16);\n let b = parseInt(hex.slice(4, 6), 16);\n\n if (bw) {\n // http://stackoverflow.com/a/3943023/112731\n return (r * 0.299 + g * 0.587 + b * 0.114) > 186\n ? '#000000'\n : '#FFFFFF';\n }\n // invert color components\n r = (255 - r).toString(16);\n g = (255 - g).toString(16);\n b = (255 - b).toString(16);\n // pad each with zeros and return\n return '#' + r.padStart(2, '0') + g.padStart(2, '0') + b.padStart(2, '0');\n }\n\n // https://github.com/lukeed/clsx/blob/master/src/index.js\n // License\n // MIT © Luke Edwards\n /**\n * @private\n * @param {any} mix\n * @returns {string}\n */\n static _toVal(mix) {\n let k, y, str='';\n\n if (typeof mix === 'string' || typeof mix === 'number') {\n str += mix;\n } else if (typeof mix === 'object') {\n if (Array.isArray(mix)) {\n for (k=0; k < mix.length; k++) {\n if (mix[k]) {\n if ((y = Utils._toVal(mix[k]))) {\n str && (str += ' ');\n str += y;\n }\n }\n }\n } else {\n for (k in mix) {\n if (mix[k]) {\n str && (str += ' ');\n str += k;\n }\n }\n }\n }\n\n return str;\n }\n\n // https://github.com/lukeed/clsx/blob/master/src/index.js\n // License\n // MIT © Luke Edwards\n /**\n * Convert any object to a string with its values.\n * @returns {string}\n */\n static clsx () {\n let i = 0;\n let tmp;\n let x;\n let str = '';\n while (i < arguments.length) {\n if ((tmp = arguments[i++])) {\n if ((x = Utils._toVal(tmp))) {\n str && (str += ' ');\n str += x\n }\n }\n }\n return str;\n }\n\n /**\n * Get the current theme name (either from local storage or the browser settings).\n * @param {string} [themeName]\n * @returns {string}\n */\n static getThemeName(themeName = '') {\n if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@') {\n return window.vendorPrefix;\n }\n\n return themeName ? themeName : (window._localStorage || window.localStorage).getItem('App.themeName') ?\n (window._localStorage || window.localStorage).getItem('App.themeName') : window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'colored';\n }\n\n /**\n * Get the type of theme.\n * @param {string} [themeName]\n * @returns {'dark' | 'light'}\n */\n static getThemeType(themeName = '') {\n if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@') {\n return 'light';\n }\n\n themeName = themeName || (window.localStorage && (window._localStorage || window.localStorage).getItem('App.themeName'));\n return themeName === 'dark' || themeName === 'blue' ? 'dark' : 'light';\n }\n\n /**\n * Set the theme name and theme type.\n * @param {string} themeName\n */\n static setThemeName(themeName) {\n if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@') {\n return; // ignore\n }\n (window._localStorage || window.localStorage).setItem('App.themeName', themeName);\n (window._localStorage || window.localStorage).setItem('App.theme', themeName === 'dark' || themeName === 'blue' ? 'dark' : 'light');\n }\n\n /**\n * Toggle the theme name between 'dark' and 'colored'.\n * @param {string | null} themeName\n * @returns {string} the new theme name.\n */\n static toggleTheme(themeName) {\n if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@') {\n return window.vendorPrefix;\n }\n themeName = themeName || (window.localStorage && (window._localStorage || window.localStorage).getItem('App.themeName'));\n\n // dark => blue => colored => light => dark\n const themes = Utils.getThemeNames();\n const pos = themes.indexOf(themeName);\n let newTheme;\n if (pos !== -1) {\n newTheme = themes[(pos + 1) % themes.length];\n } else {\n newTheme = themes[0];\n }\n Utils.setThemeName(newTheme);\n\n return newTheme;\n }\n\n /**\n * Get the list of themes\n * @returns {array<string>} list of possible themes\n */\n static getThemeNames() {\n if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@') {\n return [window.vendorPrefix];\n }\n\n return ['light', 'dark', 'blue', 'colored'];\n }\n\n /**\n * Parse a query string into its parts.\n * @param {string} query\n * @returns {Record<string, string | boolean | number>}\n */\n static parseQuery(query) {\n query = (query || '').toString().replace(/^\\?/, '');\n /** @type {Record<string, string | boolean | number>} */\n const result = {};\n query.split('&').forEach(part => {\n part = part.trim();\n if (part) {\n const parts = part.split('=');\n const attr = decodeURIComponent(parts[0]).trim();\n if (parts.length > 1) {\n result[attr] = decodeURIComponent(parts[1]);\n if (result[attr] === 'true') {\n result[attr] = true;\n } else if (result[attr] === 'false') {\n result[attr] = false;\n } else {\n const f = parseFloat(result[attr]);\n if (f.toString() === result[attr]) {\n result[attr] = f;\n }\n }\n } else {\n result[attr] = true;\n }\n }\n });\n return result;\n }\n\n /**\n * Returns parent ID.\n * @param {string} id\n * @returns {string | null} parent ID or null if no parent\n */\n static getParentId(id) {\n const p = (id || '').toString().split('.');\n if (p.length > 1) {\n p.pop();\n return p.join('.');\n } else {\n return null;\n }\n }\n\n static formatDate(dateObj, dateFormat) {\n // format could be DD.MM.YYYY, YYYY.MM.DD or MM/DD/YYYY\n\n if (!dateObj) {\n return '';\n }\n\n let text;\n let mm = dateObj.getMonth() + 1;\n if (mm < 10) {\n mm = '0' + mm;\n }\n\n let dd = dateObj.getDate();\n if (dd < 10) {\n dd = '0' + dd;\n }\n\n if (dateFormat === 'MM/DD/YYYY') {\n text = mm + '/' + dd + '/' + dateObj.getFullYear();\n } else {\n text = dateObj.getFullYear() + '-' + mm + '-' + dd;\n }\n\n // time\n let v = dateObj.getHours();\n if (v < 10) {\n text += ' 0' + v;\n } else {\n text += ' ' + v;\n }\n v = dateObj.getMinutes();\n if (v < 10) {\n text += ':0' + v;\n } else {\n text += ':' + v;\n }\n\n v = dateObj.getSeconds();\n if (v < 10) {\n text += ':0' + v;\n } else {\n text += ':' + v;\n }\n\n v = dateObj.getMilliseconds();\n if (v < 10) {\n text += '.00' + v;\n } else if (v < 100) {\n text += '.0' + v;\n } else {\n text += '.' + v;\n }\n\n return text;\n }\n\n static formatTime(seconds) {\n if (seconds) {\n seconds = Math.round(seconds);\n const d = Math.floor(seconds / (3600 * 24));\n const h = Math.floor((seconds % (3600 * 24)) / 3600);\n const m = Math.floor((seconds % 3600) / 60);\n const s = seconds % 60;\n if (d) {\n return `${d}.${h.toString().padStart(2, '0')}:${m.toString().padStart(2, '0')}:${s.toString().padStart(2, '0')}`;\n } else if (h) {\n return `${h}:${m.toString().padStart(2, '0')}:${s.toString().padStart(2, '0')}`;\n } else {\n return `0:${m.toString().padStart(2, '0')}:${s.toString().padStart(2, '0')}`;\n }\n } else {\n return '0:00:00';\n }\n }\n\n static MDtext2link(text) {\n const m = text.match(/\\d+\\.\\)\\s/);\n if (m) {\n text = text.replace(m[0], m[0].replace(/\\s/, '&nbsp;'));\n }\n\n return text.replace(/[^a-zA-Zа-яА-Я0-9]/g, '').trim().replace(/\\s/g, '').toLowerCase();\n }\n\n static openLink(url, target) {\n // replace IPv6 Address with [ipv6]:port\n url = url.replace(/\\/\\/([0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*)(:\\d+)?\\//i, '//[$1]$2/');\n\n if (target === 'this') {\n window.location = url;\n } else {\n window.open(url, target || '_blank');\n }\n }\n\n static MDgetTitle(text) {\n let {body, header} = Utils.extractHeader(text);\n if (!header.title) {\n // remove {docsify-bla}\n body = body.replace(/{[^}]*}/g, '');\n body = body.trim();\n const lines = body.replace(/\\r/g, '').split('\\n');\n for (let i = 0; i < lines.length; i++) {\n if (lines[i].startsWith('# ')) {\n return lines[i].substring(2).trim();\n }\n }\n return '';\n } else {\n return header.title;\n }\n }\n\n static MDextractHeader(text) {\n const attrs = {};\n if (text.substring(0, 3) === '---') {\n const pos = text.substring(3).indexOf('\\n---');\n if (pos !== -1) {\n const _header = text.substring(3, pos + 3);\n const lines = _header.replace(/\\r/g, '').split('\\n');\n lines.forEach(line => {\n if (!line.trim()) {\n return;\n }\n const pos = line.indexOf(':');\n if (pos !== -1) {\n const attr = line.substring(0, pos).trim();\n attrs[attr] = line.substring(pos + 1).trim();\n attrs[attr] = attrs[attr].replace(/^['\"]|['\"]$/g, '');\n if (attrs[attr] === 'true') {\n attrs[attr] = true;\n } else if (attrs[attr] === 'false') {\n attrs[attr] = false;\n } else if (parseFloat(attrs[attr]).toString() === attrs[attr]) {\n attrs[attr] = parseFloat(attrs[attr]);\n }\n } else {\n attrs[line.trim()] = true;\n }\n });\n text = text.substring(pos + 7);\n }\n }\n return {header: attrs, body: text};\n }\n\n static MDremoveDocsify(text) {\n const m = text.match(/{docsify-[^}]*}/g);\n if (m) {\n m.forEach(doc => text = text.replace(doc, ''));\n }\n return text;\n }\n\n /**\n * Generate the json file on the file for download.\n * @param {string} filename file name\n * @returns {object} json structure (not stringified)\n */\n static generateFile(filename, json) {\n let el = document.createElement('a');\n el.setAttribute('href', 'data:application/json;charset=utf-8,' + encodeURIComponent(JSON.stringify(json, null, 2)));\n el.setAttribute('download', filename);\n\n el.style.display = 'none';\n document.body.appendChild(el);\n\n el.click();\n\n document.body.removeChild(el);\n }\n\n /**\n * Convert quality code into text\n * @param {number} quality code\n * @returns {array<string>} lines that decode qulity\n */\n static quality2text(quality) {\n const custom = quality & 0xFFFF0000;\n const text = QUALITY_BITS[quality];\n let result;\n if (text) {\n result = [text];\n } else if (quality & 0x01) {\n result = [QUALITY_BITS[0x01], '0x' + (quality & (0xFFFF & ~1)).toString(16)];\n } else if (quality & 0x02) {\n result = [QUALITY_BITS[0x02], '0x' + (quality & (0xFFFF & ~2)).toString(16)];\n } else {\n result = ['0x' + quality.toString(16)];\n }\n if (custom) {\n result.push('0x' + (custom >> 16).toString(16).toUpperCase());\n }\n return result;\n }\n\n /**\n * Deep copy object\n * @param {object} object\n * @returns {object}\n */\n static clone(object) {\n return JSON.parse(JSON.stringify(object));\n }\n\n /**\n * Get states of object\n * @param {object} obj\n * @returns {object} states as an object in form {\"value1\": \"label1\", \"value2\": \"label2\"} or null\n */\n static getStates(obj) {\n let states = obj?.common?.states;\n if (states) {\n if (typeof states === 'string' && states[0] === '{') {\n try {\n states = JSON.parse(states);\n } catch (ex) {\n console.error(`Cannot parse states: ${states}`);\n states = null;\n }\n } else\n // if old format val1:text1;val2:text2\n if (typeof states === 'string') {\n const parts = states.split(';');\n states = {};\n for (let p = 0; p < parts.length; p++) {\n const s = parts[p].split(':');\n states[s[0]] = s[1];\n }\n } else if (Array.isArray(states)) {\n const result = {};\n if (obj.common.type === 'number') {\n states.forEach((value, key) => result[key] = value);\n } else\n if (obj.common.type === 'string') {\n states.forEach(value => result[value] = value);\n } else if (obj.common.type === 'boolean') {\n result['false'] = states[0];\n result['true'] = states[1];\n }\n\n return result;\n }\n }\n\n return states;\n }\n\n /**\n * Get svg file as text\n * @param {string} url URL of SVG file\n * @returns {object} Promise with \"data:image...\"\n */\n static getSvg(url) {\n return fetch(url)\n .then(response => response.blob())\n .then(blob => {\n return new Promise(resolve => {\n const reader = new FileReader();\n reader.onload = function() { // do not optimize this function. \"this\" is important.\n resolve(this.result);\n };\n reader.readAsDataURL(blob);\n });\n });\n }\n\n /**\n * Detect file xtension by its content\n * @param {string} base64 Base64 encoded binary file\n * @returns {string} Detected extension, like 'jpg'\n */\n static detectMimeType(base64) {\n const signature = Object.keys(SIGNATURES).find(s => base64.startsWith(s));\n return signature ? SIGNATURES[signature] : null;\n }\n}\n\nexport default Utils;\n","import React, { Component } from 'react';\nimport semver from 'semver';\n\nimport { withStyles } from '@mui/styles';\n\nimport PropTypes from 'prop-types';\n\nimport { Button } from '@mui/material';\nimport { Dialog } from '@mui/material';\nimport { DialogActions } from '@mui/material';\nimport { DialogContent } from '@mui/material';\nimport { DialogTitle } from '@mui/material';\nimport { Grid } from '@mui/material';\nimport { IconButton } from '@mui/material';\nimport { Typography } from '@mui/material';\n\nimport CloseIcon from '@mui/icons-material/Close';\nimport CheckIcon from '@mui/icons-material/Check';\nimport IconWarning from '@mui/icons-material/Warning';\nimport IconError from '@mui/icons-material/Error';\nimport IconInfo from '@mui/icons-material/Info';\nimport IconWeb from '@mui/icons-material/Public';\nimport LanguageIcon from '@mui/icons-material/Language';\n\nimport State from '../components/State';\nimport {MOBILE_WIDTH} from '../helpers/MobileDialog';\nimport I18n from '@iobroker/adapter-react-v5/i18n';\nimport Utils from '@iobroker/adapter-react-v5/Components/Utils';\n\nconst styles = theme => {\n return ({\n closeButton: {\n position: 'absolute',\n right: theme.spacing(1),\n top: theme.spacing(1),\n color: theme.palette.grey[500],\n },\n languageButton: {\n position: 'absolute',\n right: 52 + parseInt(theme.spacing(1), 10),\n top: theme.spacing(1)\n },\n languageButtonActive: {\n color: theme.palette.primary.main\n },\n typography: {\n paddingRight: 30\n },\n version: {\n background: '#4dabf5',\n borderRadius: 3,\n paddingLeft: 10,\n fontWeight: 'bold',\n color: theme.palette.mode === 'dark' ? 'black' : 'white'\n },\n wrapperButton: {\n },\n '@media screen and (max-width: 465px)': {\n wrapperButton: {\n '& *': {\n fontSize: 10\n }\n },\n },\n '@media screen and (max-width: 380px)': {\n wrapperButton: {\n '& *': {\n fontSize: 9\n }\n },\n },\n messageText: {\n\n },\n messageIcon: {\n width: 32,\n height: 32,\n marginRight: 8\n },\n messageColor_warn: {\n color: '#cb7642',\n },\n messageColor_error: {\n color: '#f5614d',\n },\n messageColor_info: {\n color: '#5abd29',\n },\n messageTitle_warn: {\n background: '#cb7642',\n borderRadius: 3,\n paddingLeft: 10,\n fontWeight: 'bold',\n color: theme.palette.mode === 'dark' ? 'black' : 'white'\n },\n messageTitle_error: {\n background: '#f5614d',\n borderRadius: 3,\n paddingLeft: 10,\n fontWeight: 'bold',\n color: theme.palette.mode === 'dark' ? 'black' : 'white'\n },\n messageTitle_info: {\n background: '#5abd29',\n borderRadius: 3,\n paddingLeft: 10,\n fontWeight: 'bold',\n color: theme.palette.mode === 'dark' ? 'black' : 'white'\n },\n messageDialogText: {\n fontSize: 18\n },\n messageDialogTitle: {\n\n }\n })\n};\n\nclass AdapterUpdateDialog extends Component {\n constructor(props) {\n super(props);\n\n this.t = props.t;\n this.mobile = window.innerWidth < MOBILE_WIDTH;\n\n this.state = {\n showMessageDialog: false,\n };\n\n const messages = false; /*[\n {\n \"condition\": {\n \"operand\": \"and\",\n \"rules\": [\n \"oldVersion<=1.0.44\",\n \"newVersion>=1.0.45\"\n ]\n },\n \"title\": {\n \"en\": \"Important notice\",\n \"de\": \"Wichtiger Hinweis\",\n \"ru\": \"Важное замечание\",\n \"pt\": \"Notícia importante\",\n \"nl\": \"Belangrijke mededeling\",\n \"fr\": \"Avis important\",\n \"it\": \"Avviso IMPORTANTE\",\n \"es\": \"Noticia importante\",\n \"pl\": \"Ważna uwaga\",\n \"zh-cn\": \"重要通知\"\n },\n \"text\": {\n \"en\": \"From the ioBroker.knx@2.0.0 version only 500 data points can be used fro free. If you have more than 500 KNX data points, you must order the paid license\",\n \"de\": \"Ab der Version ioBroker.knx@2.0.0 können nur noch 500 Datenpunkte frei verwendet werden. Wenn Sie mehr als 500 KNX-Datenpunkte haben, müssen Sie die kostenpflichtige Lizenz bestellen\",\n \"ru\": \"Из версии ioBroker.knx@2.0.0 только 500 точек данных можно использовать бесплатно. Если у вас более 500 точек данных KNX, необходимо заказать платную лицензию.\",\n \"pt\": \"Na versão ioBroker.knx@2.0.0, apenas 500 pontos de dados podem ser usados gratuitamente. Se você tiver mais de 500 pontos de dados KNX, você deve solicitar a licença paga\",\n \"nl\": \"Van de ioBroker.knx@2.0.0 versie kunnen slechts 500 datapunten gratis worden gebruikt. Als u meer dan 500 KNX-datapunten heeft, moet u de betaalde licentie bestellen\",\n \"fr\": \"À partir de la version ioBroker.knx@2.0.0, seuls 500 points de données peuvent être utilisés gratuitement. Si vous avez plus de 500 points de données KNX, vous devez commander la licence payante\",\n \"it\": \"Dalla versione ioBroker.knx@2.0.0 è possibile utilizzare gratuitamente solo 500 punti dati. Se hai più di 500 punti dati KNX, devi ordinare la licenza a pagamento\",\n \"es\": \"Desde la versión ioBroker.knx@2.0.0, solo se pueden usar 500 puntos de datos de forma gratuita. Si tiene más de 500 puntos de datos KNX, debe solicitar la licencia paga\",\n \"pl\": \"Od wersji ioBroker.knx@2.0.0 można bezpłatnie korzystać tylko z 500 punktów danych. Jeśli masz więcej niż 500 punktów danych KNX, musisz zamówić płatną licencję\",\n \"zh-cn\": \"从 ioBroker.knx@2.0.0 版本开始,只能免费使用 500 个数据点。如果您有超过 500 个 KNX 数据点,则必须订购付费许可证\"\n },\n \"link\": \"https://iobroker.net/www/pricing\",\n \"linkText\": \"Prices\",\n \"level\": \"warn\",\n \"buttons\": [\"agree\", \"cancel\"]\n }\n ]*/\n\n this.messages = AdapterUpdateDialog.checkCondition(\n this.props.adapterObject && (this.props.adapterObject.messages || messages),\n this.props.installedVersion,\n this.props.adapterObject?.version\n );\n this.lang = I18n.getLanguage();\n }\n\n getDependencies() {\n const result = [];\n\n this.props.dependencies && this.props.dependencies.forEach(dependency => {\n result.push(\n <State\n key={dependency.name}\n state={dependency.rightVersion}\n >\n {`${dependency.name}${dependency.version ? ` (${dependency.version})` : ''}: ${dependency.installed ? dependency.installedVersion : '-'}`}\n </State>\n );\n });\n\n return result;\n }\n\n getNews() {\n const result = [];\n\n this.props.news && this.props.news.forEach(entry => {\n const news = (entry.news ? entry.news.split('\\n') : [])\n .map(line => line\n .trim()\n .replace(/^\\*\\s?/, '')\n .replace(/<!--[^>]*->/, '')\n .replace(/<! -[^>]*->/, '')\n .trim()\n )\n .filter(line => !!line);\n\n if (this.props.adapterObject?.version && entry.version &&\n semver.gt(entry.version, this.props.adapterObject?.version)) {\n return;\n }\n\n result.push(<Grid item key={entry.version}>\n <Typography className={this.props.classes.version}>\n {entry.version}\n </Typography>\n {news.map((value, index) => {\n return <Typography key={`${entry.version}-${index}`} component=\"div\" variant=\"body2\">\n { '• ' + value}\n </Typography>;\n })}\n </Grid>);\n });\n\n return result;\n }\n\n static checkCondition(objMessages, oldVersion, newVersion) {\n let messages = null;\n\n if (objMessages) {\n // const messages = {\n // \"condition\": {\n // \"operand\": \"and\",\n // \"rules\": [\n // \"oldVersion<=1.0.44\",\n // \"newVersion>=1.0.45\"\n // ]\n // },\n // \"title\": {\n // \"en\": \"Important notice\",\n // },\n // \"text\": {\n // \"en\": \"Main text\",\n // },\n // \"link\": \"https://iobroker.net/www/pricing\",\n // \"buttons\": [\"agree\", \"cancel\", \"ok],\n // \"linkText\" {\n // \"en\": \"More info\",\n // },\n // \"level\": \"warn\"\n // };\n\n objMessages.forEach(message => {\n let show = !message.condition || !message.condition.rules;\n if (message.condition && message.condition.rules) {\n const results = (Array.isArray(message.condition.rules) ? message.condition.rules : [message.condition.rules])\n .map(rule => {\n // oldVersion<=1.0.44\n let version;\n if (rule.includes('oldVersion')) {\n version = oldVersion;\n rule = rule.substring('newVersion'.length);\n } else if (rule.includes('newVersion')) {\n version = newVersion;\n rule = rule.substring('newVersion'.length);\n } else {\n // unknown rule\n return false;\n }\n let op;\n let ver;\n if (rule[1] >= '0' && rule[1] <= '9') {\n op = rule[0];\n ver = rule.substring(1);\n } else {\n op = rule.substring(0, 2);\n ver = rule.substring(2);\n }\n try {\n if (op === '==') {\n return semver.eq(version, ver);\n } else if (op === '>') {\n return semver.gt(version, ver);\n } else if (op === '<') {\n return semver.lt(version, ver);\n } else if (op === '>=') {\n return semver.gte(version, ver);\n } else if (op === '<=') {\n return semver.lte(version, ver);\n } else if (op === '!=') {\n return semver.neq(version, ver);\n } else {\n console.warn(`Unknown rule ${version}${rule}`);\n return false;\n }\n } catch (e) {\n console.warn(`Cannot compare ${version}${rule}`);\n return false;\n }\n });\n\n if (message.condition.operand === 'or') {\n show = results.find(res => res);\n } else {\n show = results.findIndex(res => !res) === -1;\n }\n }\n\n if (show) {\n messages = messages || [];\n messages.push({title: message.title, text: message.text, link: message.link, buttons: message.buttons, level: message.level});\n }\n });\n }\n\n return messages;\n }\n\n getText(text, noTranslation) {\n if (text && typeof text === 'object') {\n if (noTranslation) {\n return text.en;\n } else {\n return text[this.lang] || text.en;\n }\n } else {\n return text;\n }\n }\n\n renderOneMessage(message, index) {\n return <Grid item key={index}>\n <Typography className={this.props.classes['messageTitle_' + (message.level || 'warn')]}>\n {this.getText(message.title, this.props.noTranslation) || ''}\n </Typography>\n <Typography component=\"div\" variant=\"body2\" className={this.props.classes.messageText}>\n {this.getText(message.text, this.props.noTranslation) || ''}\n </Typography>\n {message.link ?\n <Button\n onClick={() => {\n const w = window.open(message.link, '_blank');\n w.focus();\n }}\n startIcon={<IconWeb />}\n variant=\"contained\"\n color=\"grey\"\n >{this.getText(message.linkText, this.props.noTranslation) || this.props.t('More info')}</Button>\n : null}\n </Grid>\n }\n\n renderMessages() {\n if (this.messages) {\n return <Grid\n container\n spacing={2}\n direction=\"column\"\n wrap=\"nowrap\"\n >\n {this.messages.map((message, i) => this.renderOneMessage(message, i))}\n </Grid>;\n } else {\n return null;\n }\n }\n\n renderMessageDialog() {\n if (!this.state.showMessageDialog) {\n return null;\n } else {\n const message = this.messages.find(m => m.buttons);\n const version = this.props.adapterObject?.version;\n const classes = this.props.classes;\n\n return <Dialog\n onClose={() => this.setState({showMessageDialog: false})}\n open={true}\n >\n <DialogTitle className={classes.messageDialogTitle}>\n {this.getText(message.title, this.props.noTranslation) || this.props.t('Please confirm')}\n </DialogTitle>\n <DialogContent className={classes.messageDialogText}>\n {message.level === 'warn' ? <IconWarning className={Utils.clsx(classes.messageIcon, classes.messageColor_warn)}/> : null}\n {message.level === 'error' ? <IconError className={Utils.clsx(classes.messageIcon, classes.messageColor_error)} /> : null}\n {message.level === 'info' ? <IconInfo className={Utils.clsx(classes.messageIcon, classes.messageColor_info)} /> : null}\n {this.getText(message.text, this.props.noTranslation)}\n </DialogContent>\n <DialogActions>\n {message.link ?\n <Button\n onClick={() => {\n const w = window.open(message.link, '_blank');\n w.focus();\n }}\n startIcon={<IconWeb />}\n variant=\"contained\"\n color=\"secondary\"\n >{this.getText(message.linkText, this.props.noTranslation) || this.props.t('More info')}</Button>\n : null\n }\n {message.link ? <div style={{flexGrow: 1}} /> : null}\n {message.buttons.map(button => {\n if (button === 'ok') {\n return <Button\n variant=\"contained\"\n onClick={() =>\n this.setState({showMessageDialog: false}, () =>\n this.props.onUpdate(version))}\n color=\"primary\"\n startIcon={<CheckIcon/>}\n >\n {this.t('Update')}\n </Button>\n } else if (button === 'agree') {\n return <Button\n className={classes['messageTitle_' + (message.level || 'warn')]}\n variant=\"contained\"\n onClick={() =>\n this.setState({showMessageDialog: false}, () =>\n this.props.onUpdate(version))}\n color=\"primary\"\n startIcon={<CheckIcon/>}\n >\n {this.t('Agree')}\n </Button>\n } else if (button === 'cancel') {\n return <Button\n variant=\"contained\"\n onClick={() => this.setState({showMessageDialog: false})}\n startIcon={<CloseIcon />}\n color=\"grey\"\n >\n {this.t('Cancel')}\n </Button>\n }\n return null;\n })}\n </DialogActions>\n </Dialog>;\n }\n }\n\n render() {\n const { classes } = this.props;\n\n const version = this.props.adapterObject?.version;\n\n const news = this.getNews();\n\n return <Dialog\n onClose={this.props.onClose}\n open={this.props.open}\n >\n {this.renderMessageDialog()}\n <DialogTitle>\n <Typography component=\"h2\" variant=\"h6\" classes={{ root: classes.typography }}>\n {this.t('Update \"%s\" to v%s', this.props.adapter, version)}\n <IconButton size=\"large\" className={classes.closeButton} onClick={this.props.onClose}>\n <CloseIcon />\n </IconButton>\n {I18n.getLanguage() !== 'en' && this.props.toggleTranslation ? <IconButton\n size=\"large\"\n className={Utils.clsx(classes.languageButton, this.props.noTranslation && classes.languageButtonActive)}\n onClick={this.props.toggleTranslation}\n title={I18n.t('Disable/Enable translation')}\n >\n <LanguageIcon />\n </IconButton> : null}\n </Typography>\n </DialogTitle>\n <DialogContent dividers>\n <Grid\n container\n direction=\"column\"\n spacing={2}\n wrap=\"nowrap\"\n >\n {this.props.dependencies && this.props.dependencies.length > 0 &&\n this.props.dependencies.find(dependency => !dependency.rightVersion) &&\n <Grid item>\n <Typography variant=\"h6\" gutterBottom>{this.t('Dependencies')}</Typography>\n {this.getDependencies()}\n </Grid>\n }\n {news.length ? <Grid item>\n <Typography variant=\"h6\" gutterBottom>{this.t('Change log')}</Typography>\n <Grid\n container\n spacing={2}\n direction=\"column\"\n wrap=\"nowrap\"\n >\n {news}\n </Grid>\n </Grid> : this.t('No change log available')}\n </Grid>\n {this.renderMessages()}\n </DialogContent>\n <DialogActions className={classes.wrapperButton}>\n {!!this.props.rightDependencies && this.props.onIgnore && version && <Button\n variant=\"outlined\"\n onClick={() => this.props.onIgnore(version)}\n color=\"primary\"\n >\n {this.t('Ignore version %s', version)}\n </Button>}\n <Button\n variant=\"contained\"\n autoFocus\n disabled={!this.props.rightDependencies || !version || !this.props.adapterObject}\n onClick={() => {\n if (this.messages && this.messages.find(message => message.buttons)) {\n this.setState({showMessageDialog: true});\n } else {\n this.props.onUpdate(version);\n }\n }}\n color=\"primary\"\n startIcon={<CheckIcon/>}\n >\n {this.mobile ? null : (this.props.textUpdate ? this.props.textUpdate : this.t('Update'))}\n </Button>\n <Button\n variant=\"contained\"\n onClick={() => this.props.onClose()}\n color=\"grey\"\n startIcon={<CloseIcon />}\n >\n {this.mobile ? null : this.t('Close')}\n </Button>\n </DialogActions>\n </Dialog>;\n }\n}\n\nAdapterUpdateDialog.propTypes = {\n adapter: PropTypes.string.isRequired,\n adapterObject: PropTypes.object.isRequired,\n dependencies: PropTypes.array,\n news: PropTypes.array,\n noTranslation: PropTypes.bool,\n toggleTranslation: PropTypes.func,\n onUpdate: PropTypes.func.isRequired,\n onIgnore: PropTypes.func,\n onClose: PropTypes.func.isRequired,\n open: PropTypes.bool.isRequired,\n rightDependencies: PropTypes.bool,\n installedVersion: PropTypes.string,\n t: PropTypes.func.isRequired\n}\n\nexport default withStyles(styles)(AdapterUpdateDialog);\n","import React, { useEffect, useState } from 'react';\nimport { createRoot } from 'react-dom/client';\n\nimport Button from '@mui/material/Button';\nimport Dialog from '@mui/material/Dialog';\nimport DialogActions from '@mui/material/DialogActions';\nimport DialogContent from '@mui/material/DialogContent';\nimport {DialogTitle, LinearProgress} from '@mui/material';\nimport { ThemeProvider, StyledEngineProvider } from '@mui/material/styles';\nimport { makeStyles } from '@mui/styles';\n\nimport IconClose from '@mui/icons-material/Close';\nimport IconCheck from '@mui/icons-material/Check';\n\nimport I18n from '@iobroker/adapter-react-v5/i18n';\nimport Utils from '@iobroker/adapter-react-v5/Components/Utils';\n\nlet node = null;\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n backgroundColor: theme.palette.background.paper,\n width: '100%',\n height: 'auto',\n display: 'flex'\n },\n paper: {\n maxWidth: 1000\n },\n overflowHidden: {\n display: 'flex',\n overflow: 'hidden'\n },\n pre: {\n overflow: 'auto',\n whiteSpace: 'pre-wrap',\n margin: 0,\n padding: 10,\n }\n}));\nconst LicenseDialog = ({ url, cb, theme }) => {\n const classes = useStyles();\n const [open, setOpen] = useState(true);\n const [text, setText] = useState('');\n const [loading, setLoading] = useState(true);\n\n useEffect(() => {\n setLoading(true);\n fetch(url)\n .then(el => el.text())\n .then(el => {\n setLoading(false);\n setText(el);\n })\n .catch(() => setLoading(false));\n }, [url]);\n\n const onClose = () => {\n setOpen(false);\n try {\n node && window.document.body.removeChild(node);\n } catch (e) {\n // ignore\n }\n node = null;\n };\n\n return <ThemeProvider theme={theme}>\n <Dialog\n onClose={onClose}\n open={open}\n classes={{ paper: classes.paper }}\n >\n <DialogTitle>{I18n.t('License agreement')}</DialogTitle>\n <DialogContent className={classes.overflowHidden} dividers>\n <div className={classes.root}>\n {loading ?\n <LinearProgress/>\n :\n <pre className={classes.pre} style={\n Utils.getThemeName() === 'dark' ||\n Utils.getThemeName() === 'blue' ?\n {color: 'black'} :\n null}>\n {text}\n </pre>\n }\n </div>\n </DialogContent>\n <DialogActions>\n <Button\n variant=\"contained\"\n disabled={loading}\n autoFocus\n onClick={() => {\n onClose();\n cb(true);\n }}\n startIcon={<IconCheck/>}\n color=\"primary\">\n {I18n.t('Accept')}\n </Button>\n <Button\n variant=\"contained\"\n onClick={() => {\n onClose();\n cb(false);\n }}\n startIcon={<IconClose/>}\n color=\"grey\">\n {I18n.t('Close')}\n </Button>\n </DialogActions>\n </Dialog>\n </ThemeProvider>;\n}\n\nexport const licenseDialogFunc = (license, theme, cb, url) => {\n if (license) {\n return cb(true);\n }\n if (!node) {\n node = document.createElement('div');\n node.id = 'renderModal';\n document.body.appendChild(node);\n }\n const root = createRoot(node);\n\n return root.render(<StyledEngineProvider injectFirst>\n <ThemeProvider theme={theme}>\n <LicenseDialog url={url} cb={cb} theme={theme}/>\n </ThemeProvider>\n </StyledEngineProvider>);\n}\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport Dialog from '@mui/material/Dialog';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogActions from '@mui/material/DialogActions';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport DialogContentText from '@mui/material/DialogContentText';\nimport { Button, TextField } from '@mui/material';\n\nimport CloseIcon from '@mui/icons-material/Close';\nimport TimeIcon from '@mui/icons-material/AccessTime';\nimport CheckIcon from '@mui/icons-material/Check';\n\nimport {MOBILE_WIDTH} from '../helpers/MobileDialog';\n\nconst styles = theme => ({\n buttonLabel: {\n whiteSpace: 'nowrap',\n },\n input: {\n minWidth: 150\n }\n});\n\nclass SlowConnectionWarningDialog extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n readTimeoutSec: Math.round((this.props.readTimeoutMs || SlowConnectionWarningDialog.getReadTimeoutMs()) / 1000),\n };\n\n this.mobile = window.innerWidth < MOBILE_WIDTH;\n }\n\n static getReadTimeoutMs() {\n return parseInt((window._localStorage || window.localStorage).getItem('App.readTimeoutMs'), 10) || 15000;\n }\n\n static saveReadTimeoutMs(readTimeoutMs) {\n if (readTimeoutMs) {\n return (window._localStorage || window.localStorage).setItem('App.readTimeoutMs', readTimeoutMs.toString());\n } else {\n return (window._localStorage || window.localStorage).removeItem('App.readTimeoutMs');\n }\n }\n\n render() {\n return <Dialog\n open={true}\n maxWidth=\"lg\"\n onClose={() => this.props.onClose()}\n >\n <DialogTitle>{this.props.t('Detected slow connection!')}</DialogTitle>\n <DialogContent>\n <DialogContentText>\n {this.props.t('Seems that you have slow connection. Do you want to increase timeout interval?')}\n </DialogContentText>\n <TextField\n variant=\"standard\"\n classes={{root: this.props.classes.input}}\n label={this.props.t('Read timeout')}\n value={this.state.readTimeoutSec}\n onChange={e => this.setState({readTimeoutSec: e.target.value})}\n type=\"number\"\n inputProps={{min: 5, max: 600}}\n helperText={this.props.t('in seconds')}\n />\n </DialogContent>\n <DialogActions>\n <Button\n classes={{label: this.props.classes.buttonLabel}}\n variant=\"contained\"\n onClick={() => {\n SlowConnectionWarningDialog.saveReadTimeoutMs(60000);\n this.props.onClose(60000);\n }}\n startIcon={<TimeIcon/>}\n color=\"grey\"\n >\n {this.mobile ? this.props.t('1 minute') : this.props.t('Set timeout to 1 minute')}\n </Button>\n <Button\n variant=\"contained\"\n autoFocus\n color=\"primary\"\n disabled={!parseInt(this.state.readTimeoutSec, 10)}\n onClick={() => {\n const readTimeoutMs = parseInt(this.state.readTimeoutSec, 10) * 1000;\n SlowConnectionWarningDialog.saveReadTimeoutMs(readTimeoutMs);\n this.props.onClose(readTimeoutMs);\n }}\n startIcon={<CheckIcon/>}\n >\n {this.mobile ? null : this.props.t('Apply')}\n </Button>\n <Button\n variant=\"contained\"\n onClick={() => this.props.onClose()}\n color=\"grey\"\n startIcon={<CloseIcon />}\n >\n {this.mobile ? null : this.props.t('Cancel')}\n </Button>\n </DialogActions>\n </Dialog>;\n }\n}\n\nSlowConnectionWarningDialog.propTypes = {\n t: PropTypes.func.isRequired,\n readTimeoutMs: PropTypes.number,\n onClose: PropTypes.func.isRequired,\n};\n\nexport default withStyles(styles)(SlowConnectionWarningDialog);\n","import { useState, useEffect } from 'react';\nimport * as Icons from '@mui/icons-material/';\n\nconst ICON_CACHE = {};\n\nlet objIcon = {\n 'All': 'AllInclusive',\n 'messaging': 'Message',\n 'communication': 'WifiTethering',\n 'general': 'Apps',\n 'logic': 'VpnKey',\n 'alarm': 'NotificationsActive',\n 'iot-systems': 'SystemUpdateAlt',\n 'misc-data': 'EmojiSymbols',\n 'multimedia': 'PermMedia',\n 'network': 'SettingsEthernet',\n 'storage': 'Storage',\n 'visualization': 'Visibility',\n 'climate-control': 'SettingsBrightness',\n 'date-and-time': 'DateRange',\n 'energy': 'BatteryChargingFull',\n 'garden': 'FilterVintage',\n 'geoposition': 'LocationOn',\n 'hardware': 'Phonelink',\n 'health': 'Favorite',\n 'household': 'House',\n 'infrastructure': 'Apartment',\n 'lighting': 'EmojiObjects',\n 'protocols': 'DialerSip',\n 'utility': 'PhonelinkSetup',\n 'vehicle': 'AirportShuttle',\n 'visualization-icons': 'BubbleChart',\n 'visualization-widgets': 'Widgets',\n 'weather': 'Brightness6',\n 'metering': 'LinearScale'\n};\n\nconst MaterialDynamicIcon = ({ iconName, className, adapter, socket, onClick, objIconBool }) => {\n let [url, setUrl] = useState('');\n\n useEffect(() => {\n if (adapter && socket) {\n ICON_CACHE[adapter] = ICON_CACHE[adapter] || socket.getObject(`system.adapter.${adapter}`);\n ICON_CACHE[adapter].then(obj =>\n obj?.common?.icon && setUrl(`../../adapter/${adapter}/${obj.common.icon}`));\n }\n }, [adapter, socket]);\n\n if (adapter) {\n return <img onClick={e => onClick && onClick(e)} src={url || ''} className={className} alt=\"\" />;\n } else {\n const Element = Icons[objIconBool ? objIcon[iconName] || 'Help' : (iconName || 'Help')];\n return <Element\n className={className}\n onClick={e => onClick && onClick(e)}\n />;\n }\n}\n\nMaterialDynamicIcon.defaultProps = {\n className: null,\n iconName: 'Help',\n objIconBool: false\n};\n\nexport default MaterialDynamicIcon;","import {Component} from 'react';\n\nexport const MOBILE_WIDTH = 800;\n\nclass MobileDialog extends Component {\n static isMobile() {\n return window.innerWidth < MOBILE_WIDTH;\n }\n\n componentDidMount() {\n if (this.state.mobile !== MobileDialog.isMobile()) {\n this.setState({mobile: MobileDialog.isMobile()});\n }\n if (!this._resizeHandlerinstalled) {\n this._resizeHandlerinstalled = true;\n window.addEventListener('resize', this.__onResize, false);\n }\n }\n\n componentWillUnmount() {\n this._timerOnResize && clearTimeout(this._timerOnResize);\n this._timerOnResize = null;\n if (this._resizeHandlerinstalled) {\n window.removeEventListener('resize', this.__onResize, false);\n }\n }\n\n __onResize = () => {\n this._timerOnResize && clearTimeout(this._timerOnResize);\n this._timerOnResize = setTimeout(() => {\n this._timerOnResize = null;\n if (this.state.mobile !== MobileDialog.isMobile()) {\n this.setState({mobile: MobileDialog.isMobile()});\n }\n }, 200);\n }\n\n getButtonTitle(icon, text, moreMobileIcon) {\n if (icon && text) {\n if (this.state.mobile) {\n if (moreMobileIcon) {\n return <>{icon} & {moreMobileIcon}</>;\n } else {\n return icon;\n }\n } else {\n return <>{icon}<span style={{marginLeft: 4}}>{text}</span></>;\n }\n } else if (icon) {\n return icon;\n } else if (text) {\n return text;\n } else {\n return null;\n }\n }\n}\n\nexport default MobileDialog;","import React, { Component } from 'react';\n\nimport { withStyles } from '@mui/styles';\n\nimport PropTypes from 'prop-types';\n\nimport Button from '@mui/material/Button';\nimport Dialog from '@mui/material/Dialog';\nimport DialogActions from '@mui/material/DialogActions';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport IconButton from '@mui/material/IconButton';\nimport Typography from '@mui/material/Typography';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport Checkbox from '@mui/material/Checkbox';\n\nimport CloseIcon from '@mui/icons-material/Close';\nimport CheckIcon from '@mui/icons-material/Check';\n\nconst styles = theme => ({\n formControl: {\n marginTop: theme.spacing(3)\n },\n closeButton: {\n position: 'absolute',\n right: theme.spacing(1),\n top: theme.spacing(1),\n color: theme.palette.grey[500],\n },\n typography: {\n paddingRight: 30\n }\n});\n\nclass AdapterDeletionDialog extends Component {\n\n constructor(props) {\n super(props);\n\n this.state = {\n deleteCustom: false,\n deleteCustomSupported: false,\n };\n this.t = props.t;\n }\n\n componentDidMount() {\n this.props.socket.checkFeatureSupported('DEL_INSTANCE_CUSTOM')\n .then(deleteCustomSupported => {\n deleteCustomSupported && this.props.socket.getObject('system.adapter.' + this.props.adapter)\n .then(obj => {\n if (obj && obj.common) {\n obj.common.supportCustoms && this.setState({ deleteCustomSupported: obj.common.supportCustoms })\n } else {\n this.setState({ deleteCustomSupported: true });\n }\n });\n });\n }\n\n render() {\n const { classes } = this.props;\n\n return <Dialog\n onClose={this.props.onClose}\n open={this.props.open}\n >\n <DialogTitle>\n <Typography component=\"h2\" variant=\"h6\" classes={{ root: classes.typography }}>\n {this.t('Please confirm')}\n <IconButton size=\"large\" className={classes.closeButton} onClick={this.props.onClose}>\n <CloseIcon />\n </IconButton>\n </Typography>\n </DialogTitle>\n <DialogContent dividers>\n <Typography gutterBottom>\n {this.t('Are you sure you want to delete adapter %s?', this.props.adapter)}\n </Typography>\n {this.state.deleteCustomSupported && <FormControlLabel\n control={<Checkbox checked={this.state.deleteCustom} onChange={e => this.setState({deleteCustom: e.target.checked})} />}\n label={this.t('Delete all custom object settings of this adapter too')}\n />}\n </DialogContent>\n <DialogActions>\n <Button\n variant=\"contained\"\n autoFocus\n onClick={() => {\n this.props.onClick(this.state.deleteCustom);\n this.props.onClose();\n }}\n color=\"primary\"\n startIcon={<CheckIcon/>}\n >\n {this.t('Ok')}\n </Button>\n <Button\n variant=\"contained\"\n autoFocus\n onClick={() => this.props.onClose()}\n color=\"grey\"\n startIcon={<CloseIcon />}\n >\n {this.t('Close')}\n </Button>\n </DialogActions>\n </Dialog>;\n }\n}\n\nAdapterDeletionDialog.propTypes = {\n open: PropTypes.bool.isRequired,\n adapter: PropTypes.string.isRequired,\n t: PropTypes.func.isRequired,\n onClick: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired\n}\n\nexport default withStyles(styles)(AdapterDeletionDialog);\n","var _path;\n\nvar _excluded = [\"title\", \"titleId\"];\n\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgGlobe(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 576 512\",\n width: 15,\n height: 15,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fill: \"currentColor\",\n d: \"M248 8C111.03 8 0 119.03 0 256s111.03 248 248 248 248-111.03 248-248S384.97 8 248 8zm160 215.5v6.93c0 5.87-3.32 11.24-8.57 13.86l-15.39 7.7a15.485 15.485 0 0 1-15.53-.97l-18.21-12.14a15.52 15.52 0 0 0-13.5-1.81l-2.65.88c-9.7 3.23-13.66 14.79-7.99 23.3l13.24 19.86c2.87 4.31 7.71 6.9 12.89 6.9h8.21c8.56 0 15.5 6.94 15.5 15.5v11.34c0 3.35-1.09 6.62-3.1 9.3l-18.74 24.98c-1.42 1.9-2.39 4.1-2.83 6.43l-4.3 22.83c-.62 3.29-2.29 6.29-4.76 8.56a159.608 159.608 0 0 0-25 29.16l-13.03 19.55a27.756 27.756 0 0 1-23.09 12.36c-10.51 0-20.12-5.94-24.82-15.34a78.902 78.902 0 0 1-8.33-35.29V367.5c0-8.56-6.94-15.5-15.5-15.5h-25.88c-14.49 0-28.38-5.76-38.63-16a54.659 54.659 0 0 1-16-38.63v-14.06c0-17.19 8.1-33.38 21.85-43.7l27.58-20.69a54.663 54.663 0 0 1 32.78-10.93h.89c8.48 0 16.85 1.97 24.43 5.77l14.72 7.36c3.68 1.84 7.93 2.14 11.83.84l47.31-15.77c6.33-2.11 10.6-8.03 10.6-14.7 0-8.56-6.94-15.5-15.5-15.5h-10.09c-4.11 0-8.05-1.63-10.96-4.54l-6.92-6.92a15.493 15.493 0 0 0-10.96-4.54H199.5c-8.56 0-15.5-6.94-15.5-15.5v-4.4c0-7.11 4.84-13.31 11.74-15.04l14.45-3.61c3.74-.94 7-3.23 9.14-6.44l8.08-12.11c2.87-4.31 7.71-6.9 12.89-6.9h24.21c8.56 0 15.5-6.94 15.5-15.5v-21.7C359.23 71.63 422.86 131.02 441.93 208H423.5c-8.56 0-15.5 6.94-15.5 15.5z\"\n })));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgGlobe);\nexport default __webpack_public_path__ + \"static/media/globe.f11bdd281223eb5584e7396a95915b6c.svg\";\nexport { ForwardRef as ReactComponent };","var _path, _polygon;\n\nvar _excluded = [\"title\", \"titleId\"];\n\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgLink(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 100 100\",\n width: 15,\n height: 15,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fill: \"currentColor\",\n d: \"M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z\"\n })), _polygon || (_polygon = /*#__PURE__*/React.createElement(\"polygon\", {\n fill: \"currentColor\",\n points: \"45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9\"\n })));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgLink);\nexport default __webpack_public_path__ + \"static/media/link.11336b8e74da4573a692f63683cd87ae.svg\";\nexport { ForwardRef as ReactComponent };","/**\n * Copyright 2018-2021 bluefox <dogafox@gmail.com>\n *\n * MIT License\n *\n **/\n//import React from 'react';\nimport copy from '@iobroker/adapter-react-v5/Components/copy-to-clipboard';\n\nclass MDUtils {\n static text2link(text) {\n const m = text.match(/\\d+\\.\\)\\s/);\n if (m) {\n text = text.replace(m[0], m[0].replace(/\\s/, '&nbsp;'));\n }\n\n return text.replace(/[^a-zA-Zа-яА-Я0-9]/g, '').trim().replace(/\\s/g, '').toLowerCase();\n }\n\n static openLink(url, target) {\n // replace IPv6 Address with [ipv6]:port\n url = url.replace(/\\/\\/([0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*)(:\\d+)?\\//i, '//[$1]$2/');\n\n if (target === 'this') {\n window.location = url;\n } else {\n window.open(url, target || '_blank');\n }\n }\n\n static getTitle(text) {\n let {body, header} = MDUtils.extractHeader(text);\n if (!header.title) {\n // remove {docsify-bla}\n body = body.replace(/{[^}]*}/g, '');\n body = body.trim();\n const lines = body.replace(/\\r/g, '').split('\\n');\n for (let i = 0; i < lines.length; i++) {\n if (lines[i].startsWith('# ')) {\n return lines[i].substring(2).trim();\n }\n }\n return '';\n } else {\n return header.title;\n }\n }\n\n static extractHeader(text) {\n const attrs = {};\n if (text.substring(0, 3) === '---') {\n const pos = text.substring(3).indexOf('\\n---');\n if (pos !== -1) {\n const _header = text.substring(3, pos + 3);\n const lines = _header.replace(/\\r/g, '').split('\\n');\n lines.forEach(line => {\n if (!line.trim()) {\n return;\n }\n const pos = line.indexOf(':');\n if (pos !== -1) {\n const attr = line.substring(0, pos).trim();\n attrs[attr] = line.substring(pos + 1).trim();\n attrs[attr] = attrs[attr].replace(/^['\"]|['\"]$/g, '');\n if (attrs[attr] === 'true') {\n attrs[attr] = true;\n } else if (attrs[attr] === 'false') {\n attrs[attr] = false;\n } else if (parseFloat(attrs[attr]).toString() === attrs[attr]) {\n attrs[attr] = parseFloat(attrs[attr]);\n }\n } else {\n attrs[line.trim()] = true;\n }\n });\n text = text.substring(pos + 7);\n }\n }\n return {header: attrs, body: text};\n }\n\n static removeDocsify(text) {\n const m = text.match(/{docsify-[^}]*}/g);\n if (m) {\n m.forEach(doc => text = text.replace(doc, ''));\n }\n return text;\n }\n\n static onCopy(e, text) {\n copy(text);\n e && e.stopPropagation();\n e && e.preventDefault();\n }\n\n static decorateText(text, header, path) {\n path = path || '';\n\n let {body, license, changelog} = MDUtils.extractLicenseAndChangelog(text, true);\n\n const lines = body.split('\\n');\n const content = {};\n let current = [null, null, null, null];\n\n const parts = [];\n while (lines.length && !lines[0].trim()) lines.shift();\n while (lines.length && !lines[lines.length - 1].trim()) lines.pop();\n\n let title;\n\n for (let i = 0; i < lines.length; i++) {\n let line = lines[i].trimRight();\n let last = parts.length - 1;\n\n if (line.startsWith('=========')) {\n // ignore it\n } else\n //<h1><img src=\"ru/adapterref/iobroker.linkeddevices/admin/linkeddevices.png\" width=\"32\"/> ioBroker.linkeddevices</h1>\n if (line.match(/^<h1>.+<\\/h1>/)) {\n // skip\n } else\n if (line.match(/^# /)) {\n const cont = MDUtils.findTitle(line, -1, path);\n title = cont.title;\n } else\n if (line.trim().startsWith('|')) {\n if (!parts[last] || parts[last].type !== 'table') {\n parts.push({type: 'table', lines: [line]});\n } else {\n parts[last].lines.push(line);\n }\n } else\n if (line.match(/^##+ /)) {\n parts.push({lines: [line], type: 'chapter'});\n last++;\n let level = line.split('#').length - 3;\n const cont = MDUtils.findTitle(line, level, path);\n content[cont.href] = cont;\n current[level] = cont;\n level++;\n while(current[level] !== undefined) level = null;\n } else\n if (line.startsWith('@@@')) {\n line = line.substring(3).trim();\n parts.push({lines: [line], type: '@@@'});\n last++;\n if (line.trim().endsWith('@@@')) {\n parts[last].lines[0] = line.substring(0, line.length - 3);\n } else {\n while(i + 1 < lines.length && !lines[i + 1].trim().endsWith('@@@')) {\n parts[last].lines.push(lines[i + 1].trim());\n i++;\n }\n }\n } else if (line.trim().startsWith('```')) {\n parts.push({lines: [line], type: 'code'});\n last++;\n if (!line.substring(3).trim().endsWith('```')) {\n while(i + 1 < lines.length && !lines[i + 1].trim().endsWith('```')) {\n parts[last].lines.push(lines[i + 1]);\n i++;\n }\n parts[last].lines.push(lines[i + 1]);\n i++;\n }\n } else if (line.startsWith('?> ') || line.startsWith('!> ')) {\n parts.push({lines: [line.substring(3)], type: line.startsWith('?>') ? 'warn' : 'alarm'});\n last++;\n while(i + 1 < lines.length && lines[i + 1].trim()) {\n parts[last].lines.push(lines[i + 1]);\n i++;\n }\n } else if (line.startsWith('> ')) {\n parts.push({lines: [line.substring(2)], type: 'notice'});\n last++;\n while(i + 1 < lines.length && lines[i + 1].trim()) {\n parts[last].lines.push(lines[i + 1]);\n i++;\n }\n } else if (line.trim()) {\n parts.push({lines: [line], type: 'p'});\n last++;\n while(i + 1 < lines.length && //lines[i + 1].trim() &&\n //!lines[i + 1].trim().match(/^>\\s|^\\?>\\s|^!>\\s|^@@@|^#+|^====|^\\|/)) {\n !lines[i + 1].trim().match(/^```|^>\\s|^\\?>\\s|^!>\\s|^@@@|^#+|^====|^\\|/)) {\n parts[last].lines.push(lines[i + 1].trimRight());\n i++;\n }\n }\n }\n\n return {\n parts,\n content,\n title,\n changeLog: changelog,\n license\n };\n }\n\n static extractLicenseAndChangelog(text, ignoreHeaders) {\n const lines = (text || '').trim().split('\\n');\n const changelog = [];\n let changelogA = false;\n const license = [];\n let licenseA = false;\n let newLines = [];\n lines.forEach(line => {\n if (line.match(/#+\\sChangelog/i)) {\n !ignoreHeaders && changelog.push('## Changelog');\n changelogA = true;\n licenseA = false;\n } else if (line.match(/#+\\sLicense/i)) {\n !ignoreHeaders && license.push('## License');\n changelogA = false;\n licenseA = true;\n } else if (line.match(/^# |^## /)) {\n // if some other chapter detected\n newLines.push(line);\n changelogA = false;\n licenseA = false;\n } else if (licenseA) {\n license.push(line);\n } else if (changelogA) {\n changelog.push(line);\n } else {\n newLines.push(line);\n }\n });\n while (newLines.length && !newLines[0].trim()) newLines.shift();\n while (newLines.length && !newLines[newLines.length - 1].trim()) newLines.pop();\n\n while (changelog.length && !changelog[0].trim()) changelog.shift();\n while (changelog.length && !changelog[changelog.length - 1].trim()) changelog.pop();\n\n while (license.length && !license[0].trim()) license.shift();\n while (license.length && !license[license.length - 1].trim()) license.pop();\n\n return {body: newLines.join('\\n'), license: license.join('\\n'), changelog: changelog.join('\\n')};\n }\n\n static findTitleFromH1(line, level, path) {\n\n }\n\n static findTitle(line, level, path) {\n let name = line.substring(level + 3).trim()\n // remove bold and italic modifier\n .replace(/^\\*|\\*$/g, '')\n .replace(/^\\*|\\*$/g, '')\n .replace(/^\\*|\\*$/g, '');\n\n const t = MDUtils.text2link(name);\n\n // detect <a id=\"Systemeinstellungen\"></a>9.) Systemeinstellungen\n const m = name.match(/<a [^>]*>(.*)<\\/a>/);\n if (m) {\n name = name.replace(m[0], m[1]).trim();\n }\n\n const link = MDUtils.text2docLink(name, path);\n\n return {\n level,\n title: link ? link.name : name,\n link: link ? link.link : t,\n href: t,\n external: !!link\n };\n }\n\n static text2docLink(text, path) {\n const m = text.match(/\\[([^\\]]*)]\\(([^)]*)\\)/);\n if (m) {\n const parts = path.split('/');\n parts.pop();\n return {link: parts.join('/') + '/' + m[2], name: m[1]};\n } else {\n return null;\n }\n }\n\n // https://github.com/lukeed/clsx/blob/master/src/index.js\n // License\n // MIT © Luke Edwards\n /**\n * @private\n * @param {any} mix\n * @returns {string}\n */\n static _toVal(mix) {\n let k, y, str='';\n\n if (typeof mix === 'string' || typeof mix === 'number') {\n str += mix;\n } else if (typeof mix === 'object') {\n if (Array.isArray(mix)) {\n for (k=0; k < mix.length; k++) {\n if (mix[k]) {\n if ((y = MDUtils._toVal(mix[k]))) {\n str && (str += ' ');\n str += y;\n }\n }\n }\n } else {\n for (k in mix) {\n if (mix[k]) {\n str && (str += ' ');\n str += k;\n }\n }\n }\n }\n\n return str;\n }\n\n // https://github.com/lukeed/clsx/blob/master/src/index.js\n // License\n // MIT © Luke Edwards\n /**\n * Convert any object to a string with its values.\n * @returns {string}\n */\n static clsx () {\n let i = 0;\n let tmp;\n let x;\n let str = '';\n while (i < arguments.length) {\n if ((tmp = arguments[i++])) {\n if ((x = MDUtils._toVal(tmp))) {\n str && (str += ' ');\n str += x\n }\n }\n }\n return str;\n }\n}\n\nexport default MDUtils;","/* eslint-disable jsx-a11y/anchor-has-content */\n/* eslint-disable jsx-a11y/anchor-is-valid */\nimport React, {Component} from 'react';\nimport PropTypes from 'prop-types';\nimport {withStyles} from '@mui/styles';\nimport MarkdownView from 'react-showdown';\nimport semver from 'semver';\n\nimport Paper from '@mui/material/Paper';\nimport Accordion from '@mui/material/Accordion';\nimport AccordionSummary from '@mui/material/AccordionSummary';\nimport AccordionActions from '@mui/material/AccordionDetails';\nimport List from '@mui/material/List';\nimport ListItem from '@mui/material/ListItem';\nimport IconButton from '@mui/material/IconButton';\nimport Table from '@mui/material/Table';\nimport TableBody from '@mui/material/TableBody';\nimport TableCell from '@mui/material/TableCell';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport Snackbar from '@mui/material/Snackbar';\n\nimport {MdEdit as IconEdit} from 'react-icons/md';\nimport {MdClose as IconClose} from 'react-icons/md';\nimport {MdMenu as IconMenu} from 'react-icons/md';\nimport {MdExpandMore as IconExpandMore} from 'react-icons/md';\nimport {FaGithub as IconGithub} from 'react-icons/fa';\nimport IconGlobe from '../assets/globe.svg';\nimport IconLink from '../assets/link.svg';\n\nimport Loader from '@iobroker/adapter-react-v5/Components/Loader';\nimport I18n from '@iobroker/adapter-react-v5/i18n';\nimport Utils from './MDUtils';\n//import Page404 from '@iobroker/adapter-react-v5/Components/404';\n\nconst styles = theme => ({\n root: {\n width: 'calc(100% - 10px)',\n maxWidth: 1400,\n margin: 5,\n '& .md-link': {\n display: 'inline-block'\n },\n '& h2': {\n width: '100%',\n textAlign: 'left',\n paddingBottom: 10,\n borderBottom: '1px solid lightgray'\n },\n '& hr': {\n borderWidth: '0 0 1px 0'\n },\n '& a': {\n color: 'inherit'\n },\n '& pre': {\n background: '#e3e3e3',\n },\n '& code': {\n margin: '0 0.15em',\n padding: '0.125em 0.4em',\n borderRadius: 2,\n background: '#e3e3e3',\n color: '#000000',\n whiteSpace: 'pre',\n },\n '& img': {\n maxWidth: '100%'\n }\n },\n logoImage: {\n width: 64,\n verticalAlign: 'middle',\n },\n infoEdit: {\n float: 'right',\n textDecoration: 'none',\n color: 'gray'\n },\n infoEditLocal: {\n float: 'right',\n textDecoration: 'none',\n marginRight: 15,\n cursor: 'pointer',\n display: 'inline-block'\n },\n adapterCard: {\n marginBottom: 0,\n marginTop: 0,\n },\n badgesDetails: {\n display: 'block',\n '& img': {\n marginRight: 5,\n }\n },\n titleText: {\n display: 'inline-block',\n marginLeft: 10,\n },\n adapterCardAttr:{\n fontWeight: 'bold',\n width: 150,\n display: 'inline-block'\n },\n adapterCardListItem: {\n paddingTop: 3,\n paddingBottom: 3,\n },\n description: {\n fontStyle: 'italic'\n },\n contentDiv: {\n position: 'fixed',\n width: '20%',\n minWidth: 200,\n overflowX: 'hidden',\n opacity: 0.8,\n top: 60,\n right: 20,\n background: theme.palette.mode === 'dark' ? '#111111': '#EEEEEE',\n maxHeight: 'calc(100% - 70px)',\n },\n contentDivClosed: {\n position: 'fixed',\n opacity: 0.8,\n top: 60,\n right: 20,\n width: 25,\n height: 25,\n cursor: 'pointer'\n },\n contentClose: {\n position: 'fixed',\n top: 60 + 5,\n right: 20 + 5,\n cursor: 'pointer',\n\n '&:hover': {\n color: '#111111'\n }\n },\n contentLinks: {\n cursor: 'pointer',\n '&:hover': {\n color: theme.palette.mode === 'dark' ? '#AAA' : '#666',\n }\n },\n headerTranslated: {\n borderColor: '#009c4f',\n borderWidth: '0 0 0 3px',\n padding: 10,\n marginTop: 5,\n marginBottom: 5,\n borderStyle: 'solid',\n background: '#bdded5',\n cursor: 'pointer',\n '&:before': {\n content: `url(${IconGlobe})`,\n marginRight: 10,\n color: '#000000',\n height: 20,\n width: 20,\n }\n },\n license: {\n paddingLeft: 10,\n fontWeight: 'bold',\n marginTop: 0,\n paddingTop: 1,\n },\n mdLink: {\n cursor: 'pointer',\n textDecoration: 'underline',\n '&:after': {\n //content: '\"🔗\"',\n content: 'url(' + IconLink + ')',\n width: 16,\n height: 16,\n opacity: 0.7,\n fontSize: 14,\n //marginLeft: 5\n }\n },\n mdHeaderLink: {\n textDecoration: 'none',\n '&:after': {\n content: '\"🔗\"',\n width: 16,\n height: 16,\n opacity: 0,\n fontSize: 14,\n //marginLeft: 5\n },\n '&:hover:after': {\n opacity: 0.7,\n }\n },\n info: {\n paddingTop: 10,\n paddingBottom: 10,\n },\n email: {\n fontStyle: 'italic',\n cursor: 'pointer',\n textDecoration: 'underline'\n },\n name: {\n fontStyle: 'italic'\n },\n\n table: {\n width: 'auto',\n },\n tableHead: {\n background: '#555555',\n },\n tableRowHead: {\n height: 24,\n },\n tableCellHead: {\n color: '#FFFFFF',\n padding: '3px 10px',\n border: '1px solid rgba(224, 224, 224, 1)',\n margin: 0,\n '&>p': {\n margin: 0,\n }\n },\n tableBody: {\n\n },\n tableRow: {\n height: 24,\n },\n tableCell: {\n padding: '3px 10px',\n margin: 0,\n border: '1px solid rgba(224, 224, 224, 1)',\n '&>p': {\n margin: 0,\n }\n },\n\n summary: {\n transition: 'background 0.5s, color: 0.5s',\n fontSize: 20,\n backgroundColor: theme.palette.mode === 'dark' ? '#444' : '#DDD'\n },\n summaryExpanded: {\n //fontWeight: 'bold',\n },\n\n warn: {\n borderColor: '#0b87da',\n borderWidth: '0 0 0 3px',\n padding: 10,\n marginTop: 5,\n marginBottom: 5,\n borderStyle: 'solid',\n background: '#eff6fb',\n '&:before': {\n content: '\"⚠\"',\n //borderRadius: '50%',\n //background: '#008aff',\n }\n },\n alarm: {\n borderColor: '#da0b50',\n borderWidth: '0 0 0 3px',\n padding: 10,\n marginTop: 5,\n marginBottom: 5,\n borderStyle: 'solid',\n background: '#fbeff3',\n '&:before': {\n content: '\"⚠\"',\n //borderRadius: '50%',\n //background: '#008aff',\n }\n },\n notice: {\n borderColor: '#9c989b',\n borderWidth: '0 0 0 3px',\n padding: 10,\n marginTop: 5,\n marginBottom: 5,\n borderStyle: 'solid',\n background: '#dedede',\n '&:before': {\n content: '\"✋\"',\n //borderRadius: '50%',\n //background: '#dedede',\n }\n },\n todo: {\n borderColor: '#00769c',\n borderWidth: '0 0 0 3px',\n paddingLeft: 10,\n paddingRight: 10,\n paddingTop: 0,\n paddingBottom: 0,\n marginTop: 5,\n marginBottom: 5,\n borderStyle: 'solid',\n background: '#c4d2de',\n /*&:before': {\n content: '\"✋\"',\n //borderRadius: '50%',\n //background: '#dedede',\n }*/\n },\n paragraph: {\n\n },\n\n changeLog: {\n display: 'block',\n width: '100%'\n },\n changeLogDiv: {\n display: 'block',\n paddingBottom: theme.spacing(2),\n '&:hover': {\n backgroundColor: theme.palette.mode === 'dark' ? '#333' : '#DDD',\n },\n width: '100%'\n },\n changeLogVersion: {\n fontWeight: 'bold',\n fontSize: 18,\n },\n changeLogDate: {\n fontSize: 16,\n fontStyle: 'italic',\n marginLeft: theme.spacing(1),\n opacity: 0.7\n },\n changeLogLine: {\n display: 'block',\n fontSize: 14,\n marginLeft: theme.spacing(1),\n '&:before': {\n content: '\"• \"',\n }\n },\n changeLogUL: {\n paddingLeft: theme.spacing(1),\n marginTop: 4,\n },\n changeLogAuthor: {\n fontStyle: 'italic',\n fontWeight: 'bold',\n marginRight: theme.spacing(1),\n },\n changeLogLineText: {\n\n },\n\n changeLogAccordion: {\n justifyContent: 'flex-start',\n }\n});\n\nconst CONVERTER_OPTIONS = {\n emoji: true,\n underline: true,\n strikethrough: true,\n simplifiedAutoLink: true,\n parseImgDimensions: true,\n splitAdjacentBlockquotes: true,\n openLinksInNewWindow: true,\n backslashEscapesHTMLTags: true,\n};\n\nlet title;\n\nconst ADAPTER_CARD = ['version', 'authors', 'keywords', 'mode', 'materialize', 'compact'];\n\nconst EXPAND_LANGUAGE = {\n en: 'english',\n de: 'german',\n ru: 'russian',\n 'zh-cn': 'chinese (simplified)'\n};\n\nclass Markdown extends Component {\n constructor(props) {\n super(props);\n // load page\n this.state = {\n parts: [],\n title: '',\n loadTimeout: false,\n header: {},\n content: {},\n license: '',\n changeLog: '',\n tooltip: '',\n text: this.props.text || '',\n notFound: false,\n affiliate: null,\n adapterNews: null,\n hideContent: window.localStorage ? (window._localStorage || window.localStorage).getItem('Docs.hideContent') === 'true' : false,\n };\n\n if (!title) {\n title = window.title;\n }\n\n this.mounted = false;\n\n if (!this.state.text) {\n this.load();\n\n // Give 300ms to load the page. After that show the loading indicator.\n setTimeout(() => !this.state.parts.length && this.setState({loadTimeout: true}), 300);\n } else {\n this.parseText();\n }\n\n this.contentRef = React.createRef();\n\n this.customLink = ({ text, link }) =>\n <a className={this.props.classes.mdLink + ' md-link'} onClick={() => {\n if (link) {\n if (link.startsWith('#')) {\n this.onNavigate(Utils.text2link(link.substring(1)))\n } else {\n let href = link;\n if (!href.match(/^https?:\\/\\//)) {\n const parts = (this.props.path || '').split('/');\n // const fileName = parts.pop();\n const prefix = parts.join('/') + '/';\n\n href = prefix + link;\n }\n\n this.onNavigate(null, href);\n }\n }\n }} title={link}>{text}</a>;\n\n /*\n if (reactObj && (reactObj.type === 'h1' || reactObj.type === 'h2' || reactObj.type === 'h3' || reactObj.type === 'h3')) {\n reactObj.props.children[0] = (<span>{reactObj.props.children[0]}<a\n href={prefix + '?' + reactObj.props.id}\n className={this.props.classes.mdHeaderLink + ' md-h-link'}>\n </a></span>);\n }\n */\n this.customH = ({text, id, level, prefix}) => {\n const _level = parseInt(level, 10);\n\n if (_level === 1) {\n return <h1 id={id}><span>{text}</span><a href={prefix + '?' + id} className={this.props.classes.mdHeaderLink + ' md-h-link'}/></h1>;\n } else if (_level === 2) {\n return <h2 id={id}><span>{text}</span><a href={prefix + '?' + id} className={this.props.classes.mdHeaderLink + ' md-h-link'}/></h2>;\n } else if (_level === 3) {\n return <h3 id={id}><span>{text}</span><a href={prefix + '?' + id} className={this.props.classes.mdHeaderLink + ' md-h-link'}/></h3>;\n } else if (_level === 4) {\n return <h4 id={id}><span>{text}</span><a href={prefix + '?' + id} className={this.props.classes.mdHeaderLink + ' md-h-link'}/></h4>;\n } else if (_level === 5) {\n return <h5 id={id}><span>{text}</span><a href={prefix + '?' + id} className={this.props.classes.mdHeaderLink + ' md-h-link'}/></h5>;\n } else {\n return <h6 id={id}><span>{text}</span><a href={prefix + '?' + id} className={this.props.classes.mdHeaderLink + ' md-h-link'}/></h6>;\n }\n };\n this.meta = ({text, id, level, prefix}) => {\n return 'meta';\n };\n this.link = ({text, id, level, prefix}) => {\n return <div>linkAAAAA</div>;\n };\n }\n\n componentDidMount() {\n this.mounted = true;\n this.state.text && this.parseText(this.state.text);\n this.props.socket && this.props.socket.getRepository()\n .then(repo => this.setState({adapterNews: repo[this.props.adapter]?.news}))\n }\n\n UNSAFE_componentWillReceiveProps(nextProps, nextContext) {\n if (this.props.path !== nextProps.path) {\n this.mounted && this.setState({notFound: false, parts :[]});\n this.load(nextProps.path);\n } else if (this.props.text !== nextProps.text) {\n this.setState({text: nextProps.text});\n if (!nextProps.text) {\n if (this.props.path !== nextProps.path) {\n this.mounted && this.setState({notFound: false, parts :[]});\n this.load(nextProps.path);\n }\n } else {\n this.mounted && this.setState({text: nextProps.text}, () =>\n this.parseText());\n }\n } else\n if (this.props.language !== nextProps.language) {\n this.mounted && this.setState({notFound: false, parts :[]});\n this.load(null, nextProps.language);\n }\n }\n\n /*onHashChange(location) {\n location = location || Router.getLocation();\n if (location.chapter) {\n const el = window.document.getElementById(location.chapter);\n el && el.scrollIntoView(true);\n }\n }*/\n\n onNavigate(id, link) {\n if (link && link.match(/^https?:\\/\\//)) {\n Utils.openLink(link);\n } else if (id) {\n const el = window.document.getElementById(id) || window.document.getElementById(id.replace('nbsp', ''));\n if (el) {\n el.scrollIntoView(true);\n }\n } else if (link) {\n // if relative path\n if (!link.startsWith('#')) {\n // ../../download\n /*const ppp = link.replace(this.props.path + '/', '').split('#');\n let _link = ppp[1];\n let _path = ppp[0].replace(/\\.MD$/, '.md');\n if (!_path.endsWith('.md')) {\n _path += '.md';\n }\n const location = Router.getLocation();\n\n if (_path.startsWith('.')) {\n const parts = _path.split('/');\n const locParts = location.page.split('/');\n locParts.pop();\n parts.forEach(part => {\n if (part === '.') return;\n if (part === '..') {\n locParts.pop();\n return;\n }\n locParts.push(part);\n });\n _path = locParts.join('/')\n }\n\n this.props.onNavigate(null, this.props.rootPath || location.tab, _path, _link);*/\n } else if (link) {\n //this.props.onNavigate(null, null, link);\n link = link.replace(/^#/, '');\n const el = window.document.getElementById(link) || window.document.getElementById(link.replace('nbsp', ''));\n if (el) {\n el.scrollIntoView(true);\n }\n }\n }\n }\n\n parseChangeLog(changeLog) {\n const lines = changeLog.split('\\n');\n const entries = {};\n let oneEntry;\n for (let i = 0; i < lines.length; i++) {\n let line = lines[i];\n if (line.startsWith('##')) {\n if (oneEntry) {\n entries[oneEntry.version] = oneEntry;\n oneEntry = null;\n }\n // ### 3.0.5 (2020-10-30) or ### 3.0.5 [2020-10-30] or ### 3.0.5\n const [version, date] = line.replace(/^#+\\s?/, '').split(/[\\s([]+/);\n if (version) {\n oneEntry = {lines: []};\n oneEntry.version = version.trim();\n oneEntry.date = (date || '').trim().replace(/\\)/, '');\n }\n } else if (line.trim() && oneEntry) {\n // extract author\n // *(bluefox) if group\n line = line.replace(/^[+*]+\\s?/, '').trim();\n if (line.startsWith('(') && line.includes(')')) {\n const p = line.split(')');\n const author = p[0].replace('(', '');\n line = line.replace('(' + author + ')', '').trim();\n oneEntry.lines.push({author, line});\n } else {\n oneEntry.lines.push(line);\n }\n }\n }\n\n if (oneEntry) {\n entries[oneEntry.version] = oneEntry;\n }\n\n return entries;\n }\n\n parseText(text) {\n text = text || this.state.text || '';\n if (this.props.editEnabled) {\n this.editText = text;\n }\n if (!text || text.startsWith('<!DOCTYPE html>')) {\n // page not found\n return this.setState({notFound: true});\n }\n\n const {header, parts, content, license, changeLog, title} = this.format(text);\n let _title = header.title || title || Utils.getTitle(text);\n /*if (_title) {\n window.document.title = _title;\n } else if (title) {\n _title = title;\n window.document.title = title;\n }*/\n let affiliate = null;\n if (header.affiliate) {\n try {\n affiliate = JSON.parse(header.affiliate);\n } catch (e) {\n console.error('Cannot parse affiliate: ' + header.affiliate);\n }\n }\n\n let _changeLog;\n // try to add missing news\n if (changeLog) {\n // split news\n _changeLog = this.parseChangeLog(changeLog);\n if (_changeLog && typeof _changeLog === 'object' && this.state.adapterNews) {\n const lang = I18n.getLanguage();\n Object.keys(this.state.adapterNews).forEach(version => {\n if (!_changeLog[version]) {\n let news = this.state.adapterNews[version];\n if (typeof news === 'object') {\n news = news[lang] || news.en || '';\n }\n\n _changeLog[version] = {version, lines: news.split('\\\\n')};\n }\n });\n }\n }\n\n this.mounted && this.setState({\n affiliate,\n notFound: false,\n parts,\n header,\n loadTimeout: false,\n content,\n license,\n changeLog: _changeLog || changeLog,\n title: _title\n });\n\n this.onHashChange && setTimeout(() => this.onHashChange(), 200);\n }\n\n load(path, language) {\n path = path || this.props.path;\n language = language || this.props.language;\n if (path && language) {\n fetch(`${language}${path[0] === '/' ? path : '/' + path}`)\n .then(res => res.text())\n .then(text => this.parseText(text));\n }\n }\n\n format(text) {\n text = (text || '').trim();\n let {header, body} = Utils.extractHeader(text);\n\n if (body.startsWith('# ')) {\n // there is no header and readme starts with\n // ![Logo](admin/iot.png)\n // # ioBroker IoT Adapter\n }\n\n // remove comments like <!-- -->\n body = body.replace(/\\r\\n|\\n/g, '§$§$');\n body = body.replace(/<!--[^>]*-->/gm, '\\n');\n body = body.replace(/<! -[^>]* ->/gm, '\\n'); // translator make it wrong\n body = body.replace(/§\\$§\\$/g, '\\n');\n body = body.replace(/\\[\\*\\*\\*\\s(.+)\\s\\*\\*\\*]/g, '[***$1***]');\n body = body.replace(/\\[\\*\\*\\s(.+)\\s\\*\\*]/g, '[**$1**]');\n body = body.replace(/\\[\\*\\s(.+)\\s\\*]/g, '[*$1*]');\n body = body.replace(/\\*\\*\\*\\s(.+)\\s\\*\\*\\*/g, '***$1***');\n body = body.replace(/\\*\\*\\s(.+)\\s\\*\\*/g, '**$1**');\n body = body.replace(/\\*\\s(.+)\\s\\*/g, '*$1*');\n body = body.replace(/`` `(.+)```/g, '```$1```');\n\n body = Utils.removeDocsify(body);\n let {parts, content, license, changeLog, title} = Utils.decorateText(body, header, `${this.props.path && (this.props.path[0] === '/' ? this.props.path : '/' + this.props.path)}`);\n\n return {header, parts, content, license, changeLog, title};\n }\n\n formatAuthors(text) {\n const parts = text.split(',').map(t => t.trim()).filter(t => t);\n\n const authors = [];\n for (let i = 0; i < parts.length; i++) {\n const m = parts[i].trim().match(/<([-.\\w\\d_@]+)>$/);\n if (m) {\n const email = m[1];\n authors.push(<span key={parts[i]} className={this.props.classes.email} title={I18n.t('Click to copy %s', email)} onClick={e => {\n Utils.onCopy(e, email);\n this.setState({tooltip: I18n.t('Copied')});\n }}>{parts[i].replace(m[0], '').trim() + (parts.length - 1 === i ? '' : ', ')}</span>);\n } else {\n authors.push(<span key={parts[i]} className={this.props.classes.name}>{parts[i] + (parts.length - 1 === i ? '' : ', ')}</span>);\n }\n }\n\n return authors;\n }\n\n renderHeader() {\n const data = [];\n\n if (this.state.header.translatedFrom) {\n let translatedFrom = EXPAND_LANGUAGE[this.state.header.translatedFrom] || this.state.header.translatedFrom;\n // Translate language from english to actual language\n translatedFrom = I18n.t(translatedFrom);\n\n data.push(<div\n key=\"translatedFrom\"\n className={this.props.classes.headerTranslated}\n onClick={() => {\n if (this.props.onNavigate) {\n this.props.onNavigate && this.props.onNavigate(this.state.header.translatedFrom);\n } else {\n // read this.props.link\n fetch(this.props.link)\n .then(res => res.text())\n .then(text => this.setState({text}, () =>\n this.parseText()))\n .catch(e => window.alert(`Cannot fetch \"${this.props.link}\": ${e}`));\n }\n }}\n title={I18n.t('Go to original')}\n >{I18n.t('Translated from %s', translatedFrom)}\n </div>);\n }\n\n if (this.state.header.adapter) {\n data.push(<h1 key=\"h1\">{[\n this.state.header.logo ? <img key=\"logo\" src={'https://www.iobroker.net/' + this.state.header.logo} alt=\"logo\" className={this.props.classes.logoImage}/> : null,\n <div key=\"title\" className={this.props.classes.titleText}>{this.state.header.title}</div>\n ]}</h1>);\n if (this.state.header.readme) {\n const link = this.state.header.readme.replace(/blob\\/master\\/README.md$/, '');\n data.push(<IconButton size=\"large\" key=\"github\" title={I18n.t('Open repository')} onClick={() => Utils.openLink(link)}><IconGithub/></IconButton>);\n }\n }\n\n if (this.state.header.description) {\n data.push(<span key=\"description\" className={this.props.classes.description}>{this.state.header.description}</span>);\n }\n\n if (Object.keys(this.state.header).find(attr => ADAPTER_CARD.indexOf(attr) !== -1)) {\n data.push(<Accordion key=\"header\" className={this.props.classes.adapterCard}>\n <AccordionSummary className={this.props.classes.summary} classes={{expanded: this.props.classes.summaryExpanded}} expandIcon={<IconExpandMore />}>{I18n.t('Information')}</AccordionSummary>\n <AccordionActions><List>{\n ADAPTER_CARD\n .filter(attr => this.state.header.hasOwnProperty(attr))\n .map(attr =>\n <ListItem key={attr} className={this.props.classes.adapterCardListItem}>\n <div className={this.props.classes.adapterCardAttr}>{I18n.t(attr)}: </div>\n <span>{attr === 'authors' ? this.formatAuthors(this.state.header[attr]) : this.state.header[attr].toString()}</span>\n </ListItem>)}\n </List></AccordionActions>\n </Accordion>);\n }\n\n if (Object.keys(this.state.header).find(attr => attr.startsWith('BADGE-'))) {\n data.push(<Accordion key=\"header_badges\" className={this.props.classes.adapterCard}>\n <AccordionSummary className={this.props.classes.summary} classes={{expanded: this.props.classes.summaryExpanded}} expandIcon={<IconExpandMore />}>{I18n.t('Badges')}</AccordionSummary>\n <AccordionActions classes={{root: this.props.classes.badgesDetails}}>{\n Object.keys(this.state.header).filter(attr => attr.startsWith('BADGE-'))\n .map((attr, i) => [\n this.state.header[attr].indexOf('nodei.co') !== -1 ? (<br key={'br' + i}/>) : null,\n <img key={'img' + i} src={this.state.header[attr]} alt={attr.substring(6)}/>\n ])}\n </AccordionActions>\n </Accordion>);\n }\n\n return data;\n }\n\n renderInfo() {\n return <div className={this.props.classes.info}>\n {this.state.header.lastChanged ? [\n <span key=\"lastChangedTitle\" className={this.props.classes.infoTitle}>{I18n.t('Last changed:')} </span>,\n <span key=\"lastChangedValue\" className={this.props.classes.infoValue}>{this.state.header.lastChanged}</span>,\n ] : null}\n {this.props.editMode && this.state.header.editLink ?\n <a className={this.props.classes.infoEdit}\n href={this.state.header.editLink.replace(/\\/edit\\//, '/blob/')}\n rel=\"noopener noreferrer\"\n target=\"_blank\"><IconGithub style={{marginRight: 4}}/>{I18n.t('See on github')}\n </a> : null}\n {this.props.editEnabled && this.editText ?\n <div className={this.props.classes.infoEditLocal} onClick={() => {\n this.props.onEditMode && this.props.onEditMode(true);\n }}><IconEdit />{I18n.t('Edit local')}</div> : null}\n\n </div>;\n }\n\n _renderSubContent(menu) {\n return <ul>{\n menu.children.map(item => {\n const ch = this.state.content[item].children;\n const link = this.state.content[item].external && this.state.content[item].link;\n return <li><span onClick={() => this.onNavigate(item, link)} className={this.props.classes.contentLinks}>{this.state.content[item].title}</span>\n {ch ? this._renderSubContent(this.state.content[item]) : null}\n </li>;\n }).filter(e => e)\n }</ul>;\n }\n\n renderAffiliates() {\n if (!this.state.affiliate || !this.props.affiliates) {\n return null;\n }\n\n const Affiliates = this.props.affiliates;\n\n return <Affiliates\n key=\"affiliates\"\n language={this.props.language}\n mobile={this.props.mobile}\n theme={this.props.theme}\n data={this.state.affiliate}\n />;\n }\n\n onToggleContentButton() {\n this.setState({hideContent: !this.state.hideContent});\n window.localStorage && (window._localStorage || window.localStorage).setItem('Docs.hideContent', this.state.hideContent ? 'false' : 'true');\n }\n\n renderContentCloseButton() {\n if (this.state.hideContent) {\n return <IconMenu className={this.props.classes.contentClose}/>;\n } else {\n return <IconClose className={this.props.classes.contentClose} onClick={() => this.onToggleContentButton()}/>;\n }\n }\n\n renderContent() {\n const links = Object.keys(this.state.content);\n if (!links.length) {\n return null;\n }\n if (this.state.hideContent) {\n return <Paper className={this.props.classes.contentDivClosed} onClick={() => this.onToggleContentButton()}>\n {this.renderContentCloseButton()}\n </Paper>;\n } else {\n return <Paper className={this.props.classes.contentDiv}>\n {this.renderContentCloseButton()}\n <ul>{\n links.map(item => {\n const link = this.state.content[item].external && this.state.content[item].link;\n const level = this.state.content[item].level;\n let title = this.state.content[item].title.replace('&gt;', '>').replace('&lt;', '<').replace('&amp;', '&');\n\n return <li key={title} style={{ fontSize: 16 - level * 2, paddingLeft: level * 8, fontWeight: !level ? 'bold' : 'normal' }}>\n <span onClick={() => this.onNavigate(item, link)} className={this.props.classes.contentLinks}>{title}</span>\n {this.state.content[item].children ? this._renderSubContent(this.state.content[item]) : null}\n </li>;\n }).filter(e => e)\n }</ul>\n </Paper>;\n }\n }\n\n renderLicense() {\n if (!this.state.license) {\n return null;\n } else {\n const CustomLink = this.customLink;\n const CustomH = this.customH;\n return <Accordion>\n <AccordionSummary\n className={this.props.classes.summary}\n classes={{expanded: this.props.classes.summaryExpanded}}\n expandIcon={<IconExpandMore />}>{I18n.t('License')} <span className={this.props.classes.license}> {this.state.header.license}</span></AccordionSummary>\n <AccordionActions>\n <MarkdownView\n markdown={this.state.license}\n options={CONVERTER_OPTIONS}\n components={{CustomLink, CustomH}}\n />\n </AccordionActions>\n </Accordion>;\n }\n }\n\n renderChangeLogLines() {\n const classes = this.props.classes;\n\n const versions = Object.keys(this.state.changeLog);\n\n const pos1 = versions.indexOf('**WORK');\n let pos2;\n if (pos1 !== -1) {\n versions.splice(pos1, 1);\n } else {\n pos2 = versions.indexOf('__WORK');\n if (pos2 !== -1) {\n versions.splice(pos2, 1);\n }\n }\n\n try {\n versions.sort(semver.gt);\n } catch (e) {\n console.warn('Cannot semver: ' + e);\n }\n if (pos1 !== -1) {\n versions.unshift('**WORK');\n } else if (pos2 !== -1) {\n versions.unshift('__WORK');\n }\n\n return <div className={classes.changeLog} key=\"change-log\">{versions.map(version => {\n const item = this.state.changeLog[version];\n if (version.includes('WORK')) {\n version = 'WORK IN PROGRESS';\n item.date = '';\n }\n return <div key={version} className={classes.changeLogDiv}>\n <div className={classes.changeLogVersion}>{version}{item.date ? <span className={classes.changeLogDate}>{item.date }</span> : ''}</div>\n <ul className={classes.changeLogUL}>{item.lines.map((line, i) => typeof line === 'object' ?\n <li key={i} className={classes.changeLogLine}><span className={classes.changeLogAuthor}>{line.author}</span><span className={classes.changeLogLineText}>{line.line}</span></li>\n :\n <li key={i} className={classes.changeLogLine}><span className={classes.changeLogLineText}>{line}</span></li>\n )}</ul>\n </div>\n })}</div>;\n }\n\n renderChangeLog() {\n if (!this.state.changeLog) {\n return null;\n } else {\n const CustomLink = this.customLink;\n const CustomH = this.customH;\n return <Accordion>\n <AccordionSummary className={this.props.classes.summary} classes={{expanded: this.props.classes.summaryExpanded}} expandIcon={<IconExpandMore />}>{I18n.t('Changelog')}</AccordionSummary>\n <AccordionActions classes={{root: this.props.classes.changeLogAccordion}}>\n {typeof this.state.changeLog === 'string' ?\n <MarkdownView markdown={this.state.changeLog} options={CONVERTER_OPTIONS} components={{CustomLink, CustomH}}/>\n :\n this.renderChangeLogLines()\n }\n </AccordionActions>\n </Accordion>;\n }\n }\n\n renderSnackbar() {\n return <Snackbar\n anchorOrigin={{vertical: 'top', horizontal: 'right'}}\n open={!!this.state.tooltip}\n autoHideDuration={6000}\n onClose={() => this.setState({tooltip: ''})}\n message={<span id=\"message-id\">{this.state.tooltip}</span>}\n action={[\n <IconButton size=\"large\"\n key=\"close\"\n color=\"inherit\"\n className={this.props.classes.close}\n onClick={() => this.setState({tooltip: ''})}\n >\n <IconClose/>\n </IconButton>,\n ]}\n />;\n }\n\n replaceHref(line) {\n if (!line) {\n return '';\n }\n const m = line.match(/\\[.*]\\(#[^)]+\\)/g);\n if (m) {\n m.forEach(link => {\n const pos = link.lastIndexOf('](');\n let text = link.substring(0, pos).replace(/^\\[/, '');\n let href = link.substring(pos + 2).replace(/\\)$/, '');\n line = line.replace(link, `<CustomLink text=\"${text}\" link=\"${href}\" />`);\n });\n }\n const mm = line.match(/!?\\[.*]\\([^)]+\\)/g);\n if (mm) {\n // https://raw.githubusercontent.com/ioBroker/ioBroker.iot/master/README.md\n // https://github.com/ioBroker/ioBroker.iot/blob/master/README.md\n const prefixHttp = this.props.link\n .substring(0, this.props.link.lastIndexOf('/'))\n .replace('https://raw.githubusercontent.com/', 'https://github.com/')\n .replace(/\\/master$/, '/blob/master');\n\n const prefixImage = this.props.link.substring(0, this.props.link.lastIndexOf('/'));\n mm.forEach(link => {\n const isImage = link.startsWith('!');\n link = link.replace(/^!/, '');\n const pos = link.lastIndexOf('](');\n let text = link.substring(0, pos).replace(/^\\[/, '');\n let href = link.substring(pos + 2).replace(/\\)$/, '');\n if (!href.startsWith('http')) {\n if (isImage) {\n line = line.replace(link, `[${text}](${prefixImage}/${href})`);\n } else {\n // <a href=\"http://www.google.com\" target=\"blank\">google</a>\n line = line.replace(link, `<a href=\"${prefixHttp}/${href}\" target=\"blank\">${text}</a>`);\n }\n } else if (!isImage) {\n line = line.replace(link, `<a href=\"${href}\" target=\"blank\">${text}</a>`);\n }\n });\n }\n return line;\n\n /*const parts = (this.props.path || '').split('/');\n // const fileName = parts.pop();\n const prefix = parts.join('/') + '/';\n\n if (reactObj && reactObj.props && reactObj.props.children) {\n reactObj.props.children.forEach((item, i) => {\n if (item && item.type === 'a') {\n let link = item.props.href;\n if (link) {\n if (link.startsWith('#')) {\n link = Utils.text2link(link.substring(1));\n reactObj.props.children[i] = (<div\n key={'link' + i}\n className={this.props.classes.mdLink + ' md-link'}\n title={link}\n onClick={() => this.onNavigate(link)}>\n {item.props.children ? item.props.children[0] : ''}\n </div>);\n } else {\n const oldLink = link;\n if (!link.match(/^https?:\\/\\//)) {\n link = prefix + link;\n }\n\n reactObj.props.children[i] = (<div\n key={'link' + i}\n className={this.props.classes.mdLink + ' md-link'}\n title={oldLink}\n onClick={() => this.onNavigate(null, link)}>\n {item.props.children ? item.props.children[0] : ''}\n </div>);\n }\n }\n }\n\n if (typeof item === 'object') {\n this.replaceHref(item);\n }\n });\n }*/\n }\n\n makeHeadersAsLink(line, prefix) {\n if (!line) {\n return '';\n }\n const mm = line.match(/^#+\\s.+/g);\n if (mm) {\n mm.forEach(header => {\n const level = header.match(/^(#+)\\s/)[1].length;\n let text = header.substring(level + 1);\n line = line.replace(header, `<CustomH text=\"${text}\" id=\"${Utils.text2link(text)}\" level=\"${level}\" prefix=\"${prefix}\"/>`);\n });\n }\n return line;\n /*if (reactObj && (reactObj.type === 'h1' || reactObj.type === 'h2' || reactObj.type === 'h3' || reactObj.type === 'h3')) {\n reactObj.props.children[0] = (<span>{reactObj.props.children[0]}<a\n href={prefix + '?' + reactObj.props.id}\n className={this.props.classes.mdHeaderLink + ' md-h-link'}>\n </a></span>);\n }*/\n }\n\n renderTable(lines, key) {\n const header = lines[0].replace(/^\\||\\|$/g, '').split('|').map(h => h.trim());\n const CustomLink = this.customLink;\n const CustomH = this.customH;\n\n const rows = [];\n for (let i = 2; i < lines.length; i++) {\n const parts = lines[i].replace(/^\\||\\|$/g, '').split('|').map(a => a.trim());\n\n const cells = [];\n for (let j = 0; j < header.length; j++) {\n parts[j] = this.replaceHref(parts[j]);\n const crt = <MarkdownView markdown={parts[j] || ''} options={CONVERTER_OPTIONS} components={{CustomLink, CustomH}}/>;\n cells.push(<TableCell className={this.props.classes.tableCell} key={'cell' + i + '_' + j}>{crt}</TableCell>);\n }\n\n rows.push(<TableRow className={this.props.classes.tableRow} key={'row' + i}>{cells}</TableRow>);\n }\n return <Table key={'table_' + key} size=\"small\" className={this.props.classes.table}>\n <TableHead className={this.props.classes.tableHead}>\n <TableRow className={this.props.classes.tableRowHead}>\n {\n header.map((h, i) =>\n <TableCell className={this.props.classes.tableCellHead} key={'header' + i}>\n <MarkdownView markdown={h} options={CONVERTER_OPTIONS} components={{CustomLink, CustomH}}/>\n </TableCell>)\n }\n </TableRow>\n </TableHead>\n <TableBody className={this.props.classes.tableBody}>{rows}</TableBody>\n </Table>;\n }\n\n render() {\n if (this.state.notFound) {\n return null; //<Page404 className={this.props.classes.root} language={this.props.language}/>;\n }\n if (this.props.editMode && this.props.editor) {\n const Editor = this.props.editor;\n return <Editor\n language={this.props.language}\n mobile={this.props.mobile}\n theme={this.props.theme}\n path={this.state.header.editLink}\n onClose={() => this.props.onEditMode && this.props.onEditMode(false)}\n />;\n }\n if (this.state.loadTimeout && !this.state.parts.length) {\n return <Loader theme={this.props.theme}/>;\n }\n\n const prefix = window.location.hash.split('?')[0];\n\n const CustomLink = this.customLink;\n const CustomH = this.customH;\n const meta = this.meta;\n const link = this.link;\n\n const reactElements = this.state.parts.map((part, i) => {\n if (part.type === 'table') {\n return this.renderTable(part.lines, i);\n } else {\n let line = part.lines.join('\\n');\n if (part.type === 'code') {\n line = line.trim().replace(/^```javascript/, '```');\n }\n\n const trimmed = line.trim();\n if (trimmed.match(/^\\*[^\\s]/) && trimmed.match(/[^\\s]\\*$/)) {\n line = trimmed;\n }\n\n // find all \"[text](#link)\" and replace it with <link text=\"text\" link=\"link\"/>\n // Detect \"[iobroker repo \\[repoName\\]](#iobroker-repo)\"\n\n line = this.replaceHref(line);\n line = this.makeHeadersAsLink(line, prefix);\n\n // replace <- with &lt;\n line = line.replace(/<-/g, '&lt;-');\n line = line.replace(/<\\/ br>/g, '<br/>');\n\n const rct = <MarkdownView markdown={line} options={CONVERTER_OPTIONS} components={{CustomLink, CustomH, meta, link}}/>;\n /*cconst rct = <ReactMarkdown\n children={line}\n components={{ CustomLink, CustomH }}\n />; */\n\n if (part.type === 'warn') {\n return <div key={'parts' + i} className={this.props.classes.warn}>{rct}</div>;\n } else if (part.type === 'alarm') {\n return <div key={'parts' + i} className={this.props.classes.alarm}>{rct}</div>;\n } else if (part.type === 'notice') {\n return <div key={'parts' + i} className={this.props.classes.notice}>{rct}</div>;\n } else if (part.type === '@@@') {\n return <div key={'parts' + i} className={this.props.classes.todo}>{rct}</div>;\n } else {\n return <div key={'parts' + i} className={this.props.classes.paragraph}>{rct}</div>;\n }\n }\n });\n\n return <div className={Utils.clsx(this.props.classes.root, this.props.className)} ref={this.contentRef}>\n {this.renderHeader()}\n {this.state.title && !this.state.header.adapter ? <h1>{this.state.title}</h1> : null}\n {this.renderAffiliates()}\n {reactElements}\n <hr/>\n {this.renderLicense()}\n {this.renderChangeLog()}\n {this.renderInfo()}\n {this.renderContent()}\n {this.renderSnackbar()}\n </div>;\n }\n}\n\nMarkdown.propTypes = {\n language: PropTypes.string,\n onNavigate: PropTypes.func,\n theme: PropTypes.object,\n themeName: PropTypes.string,\n themeType: PropTypes.string,\n mobile: PropTypes.bool,\n rootPath: PropTypes.string,\n path: PropTypes.string,\n text: PropTypes.string,\n editMode: PropTypes.bool,\n onEditMode: PropTypes.func,\n editEnabled: PropTypes.bool,\n affiliates: PropTypes.object,\n editor: PropTypes.object,\n className: PropTypes.string,\n socket: PropTypes.object,\n adapter: PropTypes.string,\n};\n\nexport default withStyles(styles)(Markdown);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport { AppBar } from '@mui/material';\nimport { Button } from '@mui/material';\nimport { Grid } from '@mui/material';\nimport { Toolbar } from '@mui/material';\n\nimport CloseIcon from '@mui/icons-material/Close';\nimport LinkIcon from '@mui/icons-material/Link';\n\nimport Router from '@iobroker/adapter-react-v5/Components/Router';\nimport I18n from '@iobroker/adapter-react-v5/i18n';\nimport Loader from '@iobroker/adapter-react-v5/Components/Loader';\n\nimport Markdown from '../components/Markdown';\n\nconst styles = {\n root: {\n height: '100%'\n },\n scroll: {\n height: '100%',\n overflowY: 'auto',\n '& img': {\n maxWidth: '100%'\n },\n fontSize: 14,\n }\n};\n\nclass AdapterInfoDialog extends Component {\n\n constructor(props) {\n\n super(props);\n\n const uri = `https://www.iobroker.net/${I18n.getLanguage()}/adapterref/iobroker.${props.adapter}/README.md`;\n //this.props.link.replace('https://github.com', 'https://raw.githubusercontent.com').replace('blob/', '');\n const uriGithub = this.props.link.replace('https://github.com', 'https://raw.githubusercontent.com').replace('blob/', '');\n const rawUri = uriGithub.replace('blob/', '').substring(0, uriGithub.lastIndexOf('/') + 1);\n\n this.state = {\n tab: 0,\n readme: '',\n uri,\n rawUri\n };\n\n this.t = props.t;\n }\n\n async componentDidMount() {\n try {\n const data = await fetch(this.state.uri);\n let readme = await data.text();\n /*const lines = readme.split('\\n');\n if (lines[0].trim() === '---') {\n let i = 1;\n while(lines[i] !== '---') i++;\n lines.splice(0, i + 1);\n readme = lines.join('\\n');\n lines.unshift(`![Logo](admin/${this.props.adapter}.png)`);\n lines.unshift('# ioBroker.' + this.props.adapter);\n lines.unshift('');\n }\n const split = this.splitReadMe(readme);*/\n readme = readme.replace(/\\(([-\\w]+)\\/adapterref\\//g, '(https://www.iobroker.net/$1/adapterref/');\n /*readme = readme.replace(/\\(en\\/adapterref\\//g, '(https://www.iobroker.net/en/adapterref/');\n readme = readme.replace(/\\(de\\/adapterref\\//g, '(https://www.iobroker.net/de/adapterref/');\n readme = readme.replace(/\\(zh-cn\\/adapterref\\//g, '(https://www.iobroker.net/zh-cn/adapterref/');\n readme = readme.replace(/\\(zh-cn\\/adapterref\\//g, '(https://www.iobroker.net/zh-cn/adapterref/');*/\n readme = readme.replace(/src=\"([-\\w]+)\\/adapterref\\//g, 'src=\"https://www.iobroker.net/zh-cn/adapterref/');\n // readme = readme.replace(/(<meta[^>]+>)/g, '\\\\$1');\n\n this.setState({text: readme});\n } catch(error) {\n window.alert(error);\n }\n }\n\n trimArr(lines) {\n let j = lines.length - 1;\n\n while (j >= 0 && !lines[j]) {\n j--;\n }\n\n if (j !== lines.length - 1) {\n lines.splice(j + 1);\n }\n\n return lines;\n }\n\n splitReadMe(html, link) {\n\n const result = {logo: '', readme: [], changelog: [], license: []};\n let lines = html.trim().split(/\\r\\n|\\n/);\n\n // second line is main title\n if (lines[2].match(/^#\\sio/)) {\n lines.splice(2, 1);\n }\n\n if (lines[1].match(/^#\\sio/)) {\n lines.splice(1, 1);\n }\n // first line is logo\n if (lines[0].match(/!\\[[-_\\w\\d]*]\\([-._\\w\\d/]+\\.png\\)/)) {\n result.logo = link + lines[0].match(/\\((.+)\\)/)[1];\n lines.splice(0, 1);\n }\n\n let part = 'readme';\n\n for (let i = 0; i < lines.length; i++) {\n\n if (lines[i].match(/^====/)) {\n continue;\n }\n\n if (lines[i].match(/^###?\\s+Changelog/)) {\n part = 'changelog';\n continue;\n\n } else if (lines[i].match(/^###?\\s+License/)) {\n part = 'license';\n continue;\n } else if (lines[i].match(/^##?\\s+.+/)) {\n part = 'readme';\n }\n\n if (!result[part].length && !lines[i]) {\n continue;\n }\n\n result[part].push(lines[i]);\n }\n\n\n\n if (result.logo) {\n // that.$divLogo.html('<img src=\"' + result.logo + '\" />').show();\n } else {\n // that.$divLogo.html('').hide();\n }\n\n this.trimArr(result.readme);\n this.trimArr(result.changelog);\n this.trimArr(result.license);\n\n if (result.readme.length) {\n result.readme = result.readme.join('\\n');\n } else {\n result.readme = '';\n }\n if (result.changelog.length) {\n result.changelog = result.changelog.join('\\n');\n } else {\n delete result.changelog;\n }\n if (result.license.length) {\n result.license[0] = '## ' + result.license[0];\n result.license = result.license.join('\\n');\n } else {\n delete result.license;\n }\n\n return result;\n }\n\n changeTab(event, newValue) {\n this.setState({\n tab: newValue\n });\n }\n\n openTab(path) {\n const tab = window.open(path, '_blank');\n tab.focus();\n }\n\n closeDialog() {\n Router.doNavigate('tab-adapters');\n }\n\n transformUri(uri) {\n return (uri && uri.startsWith('http') ? '' : this.state.rawUri) + uri;\n }\n\n render() {\n if (!this.state.text) {\n return <Loader theme={this.props.theme}/>;\n }\n const { classes } = this.props;\n //const { tab } = this.state;\n\n return <Grid\n item\n container\n direction=\"column\"\n wrap=\"nowrap\"\n className={ classes.root }\n >\n {/*<AppBar color=\"default\" position=\"static\">\n <Tabs value={ this.state.tab } onChange={ (event, newValue) => this.changeTab(event, newValue) }>\n <Tab label=\"README\" disabled={ !this.state.readme }/>\n <Tab label=\"Changelog\" disabled={ !this.state.changelog }/>\n <Tab label=\"License\" disabled={ !this.state.license }/>\n </Tabs>\n </AppBar>\n <Box p={ 3 } className={ classes.scroll }>\n <ReactMarkdown\n source={ this.state[tab === 1 ? 'changelog' : tab === 2 ? 'license' : 'readme'] }\n linkTarget=\"_blank\"\n transformLinkUri={ (uri) => this.transformUri(uri) }\n transformImageUri={ (uri) => this.transformUri(uri) }\n escapeHtml={ false }\n />\n </Box>*/}\n <Markdown className={ classes.scroll }\n text={this.state.text}\n language={I18n.getLanguage()}\n theme={this.props.theme}\n themeName={this.props.themeName}\n themeType={this.props.themeType}\n mobile={this.props.mobile}\n editMode={false}\n socket={this.props.socket}\n adapter={this.props.adapter}\n // https://github.com/ioBroker/ioBroker.admin/blob/master/README.md =>\n // https://raw.githubusercontent.com/ioBroker/ioBroker.admin/master/README.md\n link={this.props.link.replace('https://github.com/', 'https://raw.githubusercontent.com/').replace('/blob/', '/')}\n //onNavigate={(language, tab, page, chapter) => this.onNavigate(language, tab, page, chapter)}\n />\n <AppBar color=\"default\" position=\"static\">\n <Toolbar>\n <Grid container spacing={ 1 }>\n <Grid item>\n <Button\n variant=\"contained\"\n color=\"primary\"\n onClick={ () => this.openTab(this.props.link) }\n startIcon={<LinkIcon />}\n >\n { this.t('Open original') }\n </Button>\n </Grid>\n <Grid item>\n <Button\n variant=\"contained\"\n color=\"grey\"\n onClick={ () => this.closeDialog() }\n startIcon={<CloseIcon />}\n >\n { this.t('Close') }\n </Button>\n </Grid>\n </Grid>\n </Toolbar>\n </AppBar>\n </Grid>;\n }\n}\n\nAdapterInfoDialog.propTypes = {\n adapter: PropTypes.string,\n link: PropTypes.string,\n t: PropTypes.func,\n theme: PropTypes.object,\n themeName: PropTypes.string,\n themeType: PropTypes.string,\n socket: PropTypes.object\n};\n\nexport default withStyles(styles)(AdapterInfoDialog);","import React, { Component } from 'react';\n\nimport { withStyles } from '@mui/styles';\n\nimport PropTypes from 'prop-types';\n\nimport Button from '@mui/material/Button';\nimport Dialog from '@mui/material/Dialog';\nimport DialogActions from '@mui/material/DialogActions';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport FormControl from '@mui/material/FormControl';\nimport Grid from '@mui/material/Grid';\nimport IconButton from '@mui/material/IconButton';\nimport InputLabel from '@mui/material/InputLabel';\nimport MenuItem from '@mui/material/MenuItem';\nimport Select from '@mui/material/Select';\nimport Typography from '@mui/material/Typography';\nimport CloseIcon from '@mui/icons-material/Close';\nimport AddIcon from '@mui/icons-material/Add';\n\nimport HostSelectors from '../components/HostSelectors';\n\nconst styles = theme => ({\n formControl: {\n marginTop: theme.spacing(3)\n },\n closeButton: {\n position: 'absolute',\n right: theme.spacing(1),\n top: theme.spacing(1),\n color: theme.palette.grey[500],\n },\n paper: {\n //minWidth: 600\n },\n typography: {\n paddingRight: 30\n }\n});\n\nclass AddInstanceDialog extends Component {\n constructor(props) {\n super(props);\n this.state = {\n instanceNumbers: []\n }\n this.t = props.t;\n }\n\n componentDidMount() {\n this.props.instancesWorker.getInstances()\n .then(instances => {\n const instanceNumbers = Object.keys(instances)\n .filter(id => instances[id]?.common?.name === this.props.adapter)\n .map(id => id.substring(id.lastIndexOf('.') + 1));\n\n this.setState({instanceNumbers});\n });\n }\n\n\n getAvailableInstances() {\n const result = [];\n result.push(<MenuItem value=\"auto\" key=\"auto\">{this.t('auto')}</MenuItem>);\n\n for (let i = 0; i <= 10; i++) {\n if (!this.state.instanceNumbers.includes(i)) {\n result.push(<MenuItem value={`${i}`} key={i}>{i}</MenuItem>);\n }\n }\n\n return result;\n }\n\n checkDependencies = (dependencies = this.props.dependencies) => {\n if (!dependencies) {\n return '';\n }\n let array = []\n for (let adapter of dependencies) {\n if (!adapter.installedVersion) {\n array.push(this.props.t('Latest available version of \"%s\" is required, but nothing installed. Please install first \"%s\" and then retry.', adapter.name, adapter.name));\n } else if (!adapter.rightVersion) {\n array.push(`${this.props.t('Invalid version of %s. Required %s. Current ', adapter.name, adapter.version)}${adapter.installedVersion}`);\n }\n }\n return array.length ? array.map(el => <div key={el}>{el}</div>) : '';\n }\n\n render() {\n const { classes } = this.props;\n\n const checkDeps = this.checkDependencies();\n\n return <Dialog\n onClose={this.props.onClose}\n open={this.props.open}\n classes={{ paper: classes.paper }}\n >\n <DialogTitle>\n <Typography component=\"h2\" variant=\"h6\" classes={{ root: classes.typography }}>\n {this.t('You are going to add new instance:')} {this.props.adapter}\n <IconButton size=\"large\" className={classes.closeButton} onClick={this.props.onClose}>\n <CloseIcon />\n </IconButton>\n </Typography>\n </DialogTitle>\n <DialogContent dividers>\n {!checkDeps ? <Grid\n container\n direction=\"column\"\n >\n <HostSelectors\n tooltip={this.t('Select host to add the instance')}\n expertMode={true}\n socket={this.props.socket}\n hostsWorker={this.props.hostsWorker}\n currentHost={this.props.currentHost}\n setCurrentHost={(hostName, host) => this.props.onHostChange(host._id.replace(/^system\\.host\\./, ''))}\n />\n <FormControl variant=\"standard\" className={classes.formControl}>\n <InputLabel id=\"instance-label\">{this.t('Instance')}</InputLabel>\n <Select\n variant=\"standard\"\n labelId=\"instance-label\"\n value={this.props.currentInstance}\n onChange={this.props.onInstanceChange}\n >\n {this.getAvailableInstances()}\n </Select>\n </FormControl>\n </Grid> : null}\n <div style={{\n margin: 10,\n fontSize: 16,\n color: this.props.themeType === 'dark' ? '#e70000' : '#840101'\n }}>{checkDeps}</div>\n </DialogContent>\n <DialogActions>\n <Button\n variant=\"contained\"\n autoFocus\n disabled={!!checkDeps}\n onClick={() => {\n this.props.onClick();\n this.props.onClose();\n }}\n color=\"primary\"\n startIcon={<AddIcon/>}\n >\n {this.t('Add')}\n </Button>\n <Button\n variant=\"contained\"\n onClick={() => this.props.onClose()}\n color=\"grey\"\n startIcon={<CloseIcon />}\n >\n {this.t('Close')}\n </Button>\n </DialogActions>\n </Dialog>;\n }\n}\n\nAddInstanceDialog.propTypes = {\n open: PropTypes.bool.isRequired,\n themeType: PropTypes.string,\n adapter: PropTypes.string.isRequired,\n instancesWorker: PropTypes.object.isRequired,\n socket: PropTypes.object,\n currentHost: PropTypes.string.isRequired,\n currentInstance: PropTypes.string.isRequired,\n t: PropTypes.func.isRequired,\n onClick: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n onHostChange: PropTypes.func.isRequired,\n onInstanceChange: PropTypes.func.isRequired\n}\n\nexport default withStyles(styles)(AddInstanceDialog);","import React, { Component } from 'react';\n\nimport { withStyles } from '@mui/styles';\n\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\n\nimport {\n Avatar,\n CardMedia,\n Grid,\n IconButton,\n TableCell,\n TableRow,\n Tooltip,\n Typography,\n Rating,\n} from '@mui/material';\n\nimport AddIcon from '@mui/icons-material/Add';\nimport AddToPhotosIcon from '@mui/icons-material/AddToPhotos';\nimport BuildIcon from '@mui/icons-material/RotateRight';\nimport ChevronRightIcon from '@mui/icons-material/ChevronRight';\nimport CloudIcon from '@mui/icons-material/Cloud';\nimport CloudOffIcon from '@mui/icons-material/CloudOff';\nimport DeleteForeverIcon from '@mui/icons-material/DeleteForever';\nimport ExpandMoreIcon from '@mui/icons-material/ExpandMore';\nimport GitHubIcon from '@mui/icons-material/GitHub';\nimport HelpIcon from '@mui/icons-material/Help';\nimport PublishIcon from '@mui/icons-material/Publish';\nimport RefreshIcon from '@mui/icons-material/Refresh';\nimport ArrowUpwardIcon from '@mui/icons-material/ArrowUpward';\nimport ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';\nimport RemoveIcon from '@mui/icons-material/Remove';\nimport sentryIcon from '../../assets/sentry.svg';\n\nimport {\n amber,\n blue,\n green,\n red\n} from '@mui/material/colors';\n\nimport MaterialDynamicIcon from '../../helpers/MaterialDynamicIcon';\nimport IsVisible from '../IsVisible';\n\n\nconst styles = theme => ({\n smallAvatar: {\n width: theme.spacing(4),\n height: theme.spacing(4),\n marginLeft: 4,\n },\n paddingNone: {\n padding: '0 !important'\n },\n hidden: {\n visibility: 'hidden'\n },\n name: {\n flexWrap: 'nowrap',\n width: 300,\n marginTop: 0\n },\n nameDiv: {\n display: 'flex',\n alignItems: 'center',\n },\n categoryName: {\n fontWeight: 'bold',\n cursor: 'pointer',\n },\n green: {\n color: green[500]\n },\n blue: {\n color: blue[700]\n },\n category: {\n backgroundColor: theme.palette.background.default,\n },\n updateAvailable: {\n color: green[700]\n },\n wrongDependencies: {\n color: red[700]\n },\n grow: {\n flexGrow: 1\n },\n displayNone: {\n display: 'none'\n },\n sentryIcon: {\n fontSize: '1.2rem'\n },\n versionWarn: {\n color: amber[500]\n },\n buttonUpdate: {\n border: '1px solid',\n padding: '0px 7px',\n borderRadius: 5,\n display: 'flex',\n alignItems: 'center',\n cursor: 'pointer',\n transition: 'background 0.5s',\n '&:hover': {\n background: '#00800026'\n }\n },\n buttonUpdateIcon: {\n height: 20,\n width: 20,\n marginRight: 10\n },\n classPoll: {\n color: 'orange'\n },\n classPush: {\n color: 'green'\n },\n classAssumption: {\n color: 'red',\n transform: 'rotate(90deg)'\n },\n marginLeft5: {\n marginLeft: 5\n },\n marginRight5: {\n marginRight: 5\n },\n flex: {\n display: 'flex'\n },\n sentry: {\n width: 21,\n height: 21,\n marginTop: 3,\n objectFit: 'fill',\n filter: 'invert(0%) sepia(90%) saturate(1267%) hue-rotate(-260deg) brightness(99%) contrast(97%)'\n },\n rating: {\n cursor: 'pointer',\n height: 18\n },\n nameCell: {\n paddingTop: '0 !important',\n paddingBottom: '0 !important',\n },\n tooltip: {\n pointerEvents: 'none',\n },\n});\n\nclass AdapterRow extends Component {\n renderVersion() {\n const {\n name,\n classes,\n enabledCount,\n installedCount,\n installedFrom,\n installedVersion,\n t\n } = this.props;\n\n return <Grid\n container\n wrap=\"nowrap\"\n alignItems=\"center\"\n spacing={1}\n >\n <Grid item>\n {installedVersion +\n (installedCount ? ` (${installedCount}${installedCount !== enabledCount ? '~' : ''})` : '')\n }\n </Grid>\n {installedFrom && !installedFrom.startsWith(`iobroker.${name}@`) &&\n <Grid item container>\n <Tooltip title={t('Non-NPM-Version: ') + installedFrom}>\n <GitHubIcon\n fontSize=\"small\"\n className={classes.versionWarn}\n />\n </Tooltip>\n </Grid>\n }\n </Grid>;\n }\n\n render() {\n const isCategory = this.props.category;\n\n const {\n classes,\n connectionType,\n installedCount,\n installedVersion,\n updateAvailable,\n commandRunning,\n name,\n rightDependencies,\n rightOs,\n sentry,\n categoryName,\n openInstallVersionDialog,\n dataSource,\n descHidden,\n adapter,\n versionDate,\n onSetRating,\n rating\n } = this.props;\n\n if (isCategory) {\n return <TableRow\n hover={false}\n className={clsx(classes.category, this.props.hidden && classes.displayNone)}\n >\n <TableCell>\n <Grid container spacing={1} alignItems=\"center\" className={classes.name}>\n <Grid item>\n <IconButton\n size=\"small\"\n onClick={this.props.onToggle}\n >\n {this.props.expanded ? <ExpandMoreIcon /> : <ChevronRightIcon />}\n </IconButton>\n </Grid>\n </Grid>\n </TableCell>\n <TableCell onClick={this.props.onToggle}>\n <div className={clsx(classes.nameDiv, classes.categoryName)}>\n <MaterialDynamicIcon objIconBool iconName={categoryName} className={classes.marginRight5} />\n {name}\n </div>\n </TableCell>\n <TableCell colSpan={descHidden ? 5 : 6}>\n <Typography component=\"span\" variant=\"body2\" className={classes.green}>\n {installedCount}\n </Typography>\n {` ${this.props.t('of')} `}\n <Typography component=\"span\" variant=\"body2\" className={classes.blue}>\n {this.props.count}\n </Typography>\n {` ${this.props.t('Adapters from this Group installed')}`}\n </TableCell>\n </TableRow>;\n } else {\n return <TableRow\n hover={true}\n className={this.props.hidden ? classes.displayNone : ''}\n >\n <TableCell />\n <TableCell>\n <Grid container spacing={1} alignItems=\"center\" className={classes.name}>\n <Grid item className={classes.paddingNone}>\n <Avatar\n variant=\"square\"\n alt={name}\n src={this.props.image}\n className={classes.smallAvatar}\n />\n </Grid>\n {this.props.allowAdapterRating !== false ?\n <Grid item className={classes.nameCell}>\n <div>{name}</div>\n {!versionDate ? <div\n onClick={onSetRating ? () => onSetRating() : undefined}\n className={clsx(classes.rating, onSetRating && classes.ratingSet)}\n title={rating?.title}\n >\n <Rating\n name={adapter}\n precision={0.5}\n size=\"small\"\n readOnly\n value={rating?.rating ? rating.rating.r : 0}\n />\n </div> : null}\n </Grid>\n :\n <Grid item>{name}</Grid>\n }\n </Grid>\n </TableCell>\n {!descHidden && <TableCell title={this.props.description}>{this.props.description}</TableCell>}\n <TableCell>\n <div className={classes.flex}>\n {connectionType === 'cloud' ?\n <Tooltip title={this.props.t('Adapter requires the specific cloud access for these devices/service')}><CloudIcon /></Tooltip> :\n (connectionType === 'local' ?\n <Tooltip title={this.props.t('Adapter does not use the cloud for these devices/service')}><CloudOffIcon /></Tooltip> : null)\n }\n {dataSource && <div className={classes.marginLeft5}>{(\n dataSource === 'poll' ?\n <Tooltip title={this.props.t('The device or service will be periodically asked')}>\n <ArrowUpwardIcon className={classes.classPoll} />\n </Tooltip> :\n dataSource === 'push' ?\n <Tooltip title={this.props.t('The device or service delivers the new state actively')}>\n <ArrowDownwardIcon className={classes.classPush} />\n </Tooltip> :\n dataSource === 'assumption' ?\n <Tooltip title={this.props.t('Adapter cannot request the exactly device status and the status will be guessed on the last sent command')}>\n <RemoveIcon className={classes.classAssumption} /></Tooltip> : null\n )}\n </div>}\n {sentry && <div className={classes.marginLeft5}>\n <Tooltip title=\"sentry\" classes={{ popper: classes.tooltip }}>\n <CardMedia\n className={classes.sentry}\n component=\"img\"\n image={sentryIcon}\n />\n </Tooltip>\n </div>}\n </div>\n </TableCell>\n <TableCell>{installedVersion && this.renderVersion()}</TableCell>\n <TableCell className={clsx({\n [classes.updateAvailable]: updateAvailable && rightDependencies,\n [classes.wrongDependencies]: !rightDependencies\n })}>\n <IsVisible value={this.props.allowAdapterUpdate}>\n <Grid\n container\n alignItems=\"center\"\n >\n {!commandRunning && updateAvailable ?\n <Tooltip title={this.props.t('Update')}>\n <div\n onClick={this.props.onUpdate}\n className={classes.buttonUpdate}>\n <IconButton\n className={classes.buttonUpdateIcon}\n size=\"small\"\n >\n <RefreshIcon />\n </IconButton>{this.props.version}\n </div>\n </Tooltip>\n :\n this.props.version\n }\n </Grid>\n </IsVisible>\n </TableCell>\n <TableCell>{this.props.license}</TableCell>\n <TableCell>\n <IsVisible value={this.props.allowAdapterInstall}>\n <Tooltip title={this.props.t('Add instance')}>\n <IconButton\n size=\"small\"\n className={!rightOs ? classes.hidden : ''}\n onClick={rightOs ? this.props.onAddInstance : null}\n >\n <AddIcon />\n </IconButton>\n </Tooltip>\n </IsVisible>\n <IsVisible value={this.props.allowAdapterReadme}>\n <Tooltip title={this.props.t('Readme')}>\n <IconButton\n size=\"small\"\n onClick={this.props.onInfo}\n >\n <HelpIcon />\n </IconButton>\n </Tooltip>\n </IsVisible>\n {this.props.expertMode &&\n <Tooltip title={this.props.t('Upload')}>\n <IconButton\n size=\"small\"\n disabled={commandRunning}\n className={!installedVersion ? classes.hidden : ''}\n onClick={this.props.onUpload}\n >\n <PublishIcon />\n </IconButton>\n </Tooltip>\n }\n <IsVisible value={this.props.allowAdapterDelete}>\n <Tooltip title={this.props.t('Delete adapter')}>\n <IconButton\n size=\"small\"\n disabled={commandRunning}\n className={!installedVersion ? classes.hidden : ''}\n onClick={this.props.onDeletion}\n >\n <DeleteForeverIcon />\n </IconButton>\n </Tooltip>\n </IsVisible>\n {this.props.expertMode && this.props.allowAdapterUpdate !== false &&\n <Tooltip title={this.props.t('Install a specific version')}>\n <IconButton\n size=\"small\"\n disabled={commandRunning}\n className={!installedVersion ? classes.hidden : ''}\n onClick={openInstallVersionDialog}\n >\n <AddToPhotosIcon />\n </IconButton>\n </Tooltip>\n }\n {this.props.rebuild && this.props.expertMode &&\n <Tooltip title={this.props.t('Rebuild')}>\n <IconButton\n size=\"small\"\n disabled={commandRunning}\n className={!installedVersion ? classes.hidden : ''}\n onClick={this.props.onRebuild}\n >\n <BuildIcon />\n </IconButton>\n </Tooltip>\n }\n </TableCell>\n </TableRow>;\n }\n }\n}\n\nAdapterRow.propTypes = {\n category: PropTypes.bool,\n connectionType: PropTypes.string,\n count: PropTypes.number,\n description: PropTypes.string,\n enabledCount: PropTypes.number,\n expanded: PropTypes.bool,\n expertMode: PropTypes.bool,\n hidden: PropTypes.bool,\n image: PropTypes.string,\n installedCount: PropTypes.number,\n installedFrom: PropTypes.string,\n installedVersion: PropTypes.string,\n keywords: PropTypes.array,\n name: PropTypes.string,\n license: PropTypes.string,\n onAddInstance: PropTypes.func,\n onDeletion: PropTypes.func,\n onRebuild: PropTypes.func,\n onToggle: PropTypes.func,\n onUpdate: PropTypes.func,\n onUpload: PropTypes.func,\n rebuild: PropTypes.bool,\n rightDependencies: PropTypes.bool,\n rightOs: PropTypes.bool,\n sentry: PropTypes.bool,\n t: PropTypes.func,\n descHidden: PropTypes.bool,\n updateAvailable: PropTypes.bool,\n version: PropTypes.string,\n commandRunning: PropTypes.bool,\n rating: PropTypes.object,\n onSetRating: PropTypes.func,\n};\n\nexport default withStyles(styles)(AdapterRow);","import React, { useState } from 'react';\nimport { Card, CardContent, CardMedia, Fab, IconButton, Tooltip, Typography } from '@mui/material';\nimport { withStyles } from '@mui/styles';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\n\nimport Rating from '@mui/material/Rating';\n\nimport MoreVertIcon from '@mui/icons-material/MoreVert';\nimport RefreshIcon from '@mui/icons-material/Refresh';\nimport AddIcon from '@mui/icons-material/Add';\nimport AddToPhotosIcon from '@mui/icons-material/AddToPhotos';\nimport BuildIcon from '@mui/icons-material/RotateRight';\nimport DeleteForeverIcon from '@mui/icons-material/DeleteForever';\nimport HelpIcon from '@mui/icons-material/Help';\nimport PublishIcon from '@mui/icons-material/Publish';\nimport CloudIcon from '@mui/icons-material/Cloud';\nimport CloudOffIcon from '@mui/icons-material/CloudOff';\nimport ArrowUpwardIcon from '@mui/icons-material/ArrowUpward';\nimport ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';\nimport RemoveIcon from '@mui/icons-material/Remove';\nimport GitHubIcon from '@mui/icons-material/GitHub';\nimport { amber } from '@mui/material/colors';\n\nimport sentryIcon from '../../assets/sentry.svg';\nimport IsVisible from '../IsVisible';\n\nconst boxShadow = '0 2px 2px 0 rgba(0, 0, 0, .14),0 3px 1px -2px rgba(0, 0, 0, .12),0 1px 5px 0 rgba(0, 0, 0, .2)';\nconst boxShadowHover = '0 8px 17px 0 rgba(0, 0, 0, .2),0 6px 20px 0 rgba(0, 0, 0, .19)';\n\nconst styles = theme => ({\n root: {\n position: 'relative',\n margin: 10,\n width: 300,\n minHeight: 200,\n background: theme.palette.background.default,\n boxShadow,\n display: 'flex',\n flexDirection: 'column',\n transition: 'box-shadow 0.5s',\n '&:hover': {\n boxShadow: boxShadowHover\n }\n },\n imageBlock: {\n background: theme.palette.mode === 'dark' ? '#848484' : '#c0c0c0',\n minHeight: 60,\n display: 'flex',\n padding: '0 10px 0 10px',\n position: 'relative',\n justifyContent: 'space-between',\n color: '#000'\n },\n img: {\n width: 45,\n height: 45,\n margin: 'auto 0',\n position: 'relative',\n '&:after': {\n content: '\"\"',\n position: 'absolute',\n zIndex: 2,\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n background: 'url(\"img/no-image.png\") 100% 100% no-repeat',\n backgroundSize: 'cover',\n backgroundColor: '#fff',\n }\n },\n installed: {\n background: '#77c7ff8c'\n },\n update: {\n background: '#10ff006b'\n },\n fab: {\n position: 'absolute',\n bottom: -20,\n width: 40,\n height: 40,\n right: 20,\n },\n greenText: {\n color: theme.palette.success.dark,\n },\n collapse: {\n height: '100%',\n backgroundColor: 'silver',\n position: 'absolute',\n width: '100%',\n zIndex: 3,\n marginTop: 'auto',\n bottom: 0,\n transition: 'height 0.3s',\n justifyContent: 'space-between',\n display: 'flex',\n flexDirection: 'column'\n },\n collapseOff: {\n height: 0\n },\n close: {\n width: '20px',\n height: '20px',\n opacity: '0.9',\n cursor: 'pointer',\n position: 'relative',\n marginLeft: 'auto',\n marginBottom: 10,\n transition: 'all 0.6s ease',\n '&:hover': {\n transform: 'rotate(90deg)'\n },\n '&:before': {\n position: 'absolute',\n left: '9px',\n content: '\"\"',\n height: '20px',\n width: '3px',\n backgroundColor: 'rgba(0, 0, 0, 0.54)',\n transform: 'rotate(45deg)'\n },\n '&:after': {\n position: 'absolute',\n left: '9px',\n content: '\"\"',\n height: '20px',\n width: '3px',\n backgroundColor: 'rgba(0, 0, 0, 0.54)',\n transform: 'rotate(-45deg)'\n },\n },\n footerBlock: {\n background: theme.palette.background.default,\n padding: 10,\n display: 'flex',\n justifyContent: 'space-between'\n },\n hidden: {\n display: 'none'\n },\n buttonUpdate: {\n border: '1px solid',\n padding: '0px 7px',\n borderRadius: 5,\n display: 'flex',\n alignItems: 'center',\n cursor: 'pointer',\n transition: 'background 0.5s',\n '&:hover': {\n background: '#00800026'\n }\n },\n versionDate: {\n alignSelf: 'center'\n },\n adapter: {\n width: '100%',\n fontWeight: 'bold',\n fontSize: 16,\n verticalAlign: 'middle',\n paddingLeft: 8,\n paddingTop: 16,\n color: theme.palette.mode === 'dark' ? '#333' : '#333'\n },\n adapterWithAgo: {\n width: 'calc(100% - 145px)',\n },\n description: {\n color: theme.palette.mode === 'dark' ? '#222' : 'inherit'\n },\n\n cardContent: {\n overflow: 'auto'\n },\n cardContentDiv: {\n position: 'sticky',\n right: 0,\n top: 0,\n background: 'silver'\n },\n cardContentFlex: {\n display: 'flex'\n },\n cardContentFlexBetween: {\n display: 'flex',\n justifyContent: 'space-between'\n },\n cardContent2: {\n height: '100%',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'space-between'\n },\n cardMargin10: {\n marginTop: 10,\n },\n availableVersion: {\n display: 'flex',\n justifyContent: 'space-between'\n },\n buttonUpdateIcon: {\n height: 20,\n width: 20,\n marginRight: 10\n },\n curdContentFlexCenter: {\n display: 'flex',\n alignItems: 'center'\n },\n\n classPoll: {\n color: 'orange'\n },\n classPush: {\n color: 'green'\n },\n classAssumption: {\n color: 'red',\n transform: 'rotate(90deg)'\n },\n marginLeft5: {\n marginLeft: 5\n },\n rating: {\n marginTop: 20,\n },\n ratingSet: {\n cursor: 'pointer'\n },\n versionWarn: {\n color: amber[500],\n marginRight:5\n },\n sentry: {\n width: 21,\n height: 21,\n objectFit: 'fill',\n marginTop: 3,\n filter: 'invert(0%) sepia(90%) saturate(1267%) hue-rotate(-260deg) brightness(99%) contrast(97%)'\n },\n tooltip: {\n pointerEvents: 'none',\n },\n});\nconst AdapterTile = ({\n name,\n classes,\n image,\n version,\n installedVersion,\n installedCount,\n updateAvailable,\n onUpdate,\n description,\n rightOs,\n onAddInstance,\n onInfo,\n expertMode,\n onUpload,\n onDeletion,\n rebuild,\n onRebuild,\n hidden,\n stat,\n versionDate,\n adapter,\n isCategory,\n connectionType,\n openInstallVersionDialog,\n dataSource,\n t,\n commandRunning,\n rating,\n onSetRating,\n installedFrom,\n sentry,\n allowAdapterInstall,\n allowAdapterReadme,\n allowAdapterDelete,\n allowAdapterUpdate,\n allowAdapterRating\n}) => {\n const [openCollapse, setCollapse] = useState(false);\n const [focused, setFocused] = useState(false);\n\n return <Card className={clsx(classes.root, hidden ? classes.hidden : '')}>\n {(openCollapse || focused) && <div className={clsx(classes.collapse, !openCollapse ? classes.collapseOff : '')}>\n <CardContent className={classes.cardContent}>\n <div className={classes.cardContentDiv}>\n <div className={classes.close} onClick={() => setCollapse((bool) => !bool)} />\n </div>\n <Typography gutterBottom component={'span'} variant={'body2'} className={classes.description}>\n {description}\n </Typography>\n </CardContent>\n <div className={classes.footerBlock}>\n <IsVisible value={allowAdapterInstall}>\n <Tooltip title={t('Add instance')}>\n <IconButton\n size=\"small\"\n disabled={commandRunning}\n className={!rightOs ? classes.hidden : ''}\n onClick={rightOs ? onAddInstance : null}\n >\n <AddIcon />\n </IconButton>\n </Tooltip>\n </IsVisible>\n <div className={classes.cardContentFlex}>\n <IsVisible value={allowAdapterReadme}>\n <Tooltip title={t('Readme')}>\n <IconButton\n size=\"small\"\n onClick={onInfo}\n >\n <HelpIcon />\n </IconButton>\n </Tooltip>\n </IsVisible>\n {expertMode &&\n <Tooltip title={t('Upload')}>\n <IconButton\n size=\"small\"\n disabled={commandRunning}\n className={!installedVersion ? classes.hidden : ''}\n onClick={onUpload}\n >\n <PublishIcon />\n </IconButton>\n </Tooltip>\n }\n <IsVisible value={allowAdapterDelete}>\n <Tooltip title={t('Delete adapter')}>\n <IconButton\n size=\"small\"\n disabled={commandRunning}\n className={!installedVersion ? classes.hidden : ''}\n onClick={onDeletion}\n >\n <DeleteForeverIcon />\n </IconButton>\n </Tooltip>\n </IsVisible>\n {expertMode && allowAdapterUpdate !== false &&\n <Tooltip title={t('Install a specific version')}>\n <IconButton\n disabled={commandRunning}\n size=\"small\"\n className={!installedVersion ? classes.hidden : ''}\n onClick={openInstallVersionDialog}\n >\n <AddToPhotosIcon />\n </IconButton>\n </Tooltip>\n }\n {rebuild && expertMode &&\n <Tooltip title={t('Rebuild')}>\n <IconButton\n disabled={commandRunning}\n size=\"small\"\n className={!installedVersion ? classes.hidden : ''}\n onClick={onRebuild}\n >\n <BuildIcon />\n </IconButton>\n </Tooltip>\n }\n </div>\n </div>\n </div>}\n <div className={clsx(classes.imageBlock,\n installedVersion ? classes.installed : '',\n installedVersion && installedVersion !== version && updateAvailable ? classes.update : '')}\n >\n <CardMedia\n className={classes.img}\n component=\"img\"\n image={image || 'img/no-image.png'}\n />\n <div className={clsx(classes.adapter, (stat || versionDate) && classes.adapterWithAgo)}>{adapter}</div>\n <div className={classes.versionDate}>{stat || versionDate}</div>\n {!stat && !versionDate && allowAdapterRating !== false ? <div\n onClick={onSetRating ? () => onSetRating() : undefined}\n className={clsx(classes.rating, onSetRating && classes.ratingSet)}\n title={rating?.title}\n >\n <Rating\n name={adapter}\n precision={0.5}\n size=\"small\"\n readOnly\n value={rating?.rating ? rating.rating.r : 0}\n />\n </div> : null}\n <Tooltip title={t('Info')}>\n <Fab\n onMouseOut={() => setFocused(false)}\n onMouseOver={() => setFocused(true)}\n onClick={() => setCollapse((bool) => !bool)} className={classes.fab} color=\"primary\" aria-label=\"add\">\n <MoreVertIcon />\n </Fab>\n </Tooltip>\n </div>\n <CardContent className={classes.cardContent2}>\n <Typography gutterBottom variant=\"h5\" component=\"h5\">{name}</Typography>\n <div className={classes.cardContentFlex}>\n {!isCategory &&\n (connectionType === 'cloud' ?\n <Tooltip title={t('Adapter requires the specific cloud access for these devices/service')}><CloudIcon /></Tooltip> :\n connectionType === 'local' ?\n <Tooltip title={t('Adapter does not use the cloud for these devices/service')}><CloudOffIcon /></Tooltip> : '')\n }\n {\n dataSource && <div className={classes.marginLeft5}>{(\n dataSource === 'poll' ?\n <Tooltip title={t('The device or service will be periodically asked')}>\n <ArrowUpwardIcon className={classes.classPoll} />\n </Tooltip> :\n dataSource === 'push' ?\n <Tooltip title={t('The device or service delivers the new state actively')}>\n <ArrowDownwardIcon className={classes.classPush} />\n </Tooltip> :\n dataSource === 'assumption' ?\n <Tooltip title={t('Adapter cannot request the exactly device status and the status will be guessed on the last sent command')}>\n <RemoveIcon className={classes.classAssumption} /></Tooltip> : null\n )}</div>\n }\n {sentry && <div className={classes.marginLeft5}>\n <Tooltip title=\"sentry\">\n <CardMedia\n className={classes.sentry}\n component=\"img\"\n image={sentryIcon}\n />\n </Tooltip>\n </div>}\n </div>\n <div className={classes.cardMargin10}>\n {!!installedCount && <Typography component={'span'} className={classes.cardContentFlexBetween}>\n <div>{t('Installed instances')}:</div>\n <div>{installedCount}</div>\n </Typography>}\n <IsVisible value={allowAdapterUpdate}>\n <Typography component={'span'} className={classes.availableVersion}>\n <div>{t('Available version:')}</div>\n <div className={clsx(updateAvailable && classes.greenText, classes.curdContentFlexCenter)} >\n {!commandRunning && updateAvailable ?\n\n <Tooltip title={t('Update')}>\n <div onClick={onUpdate} className={classes.buttonUpdate}><IconButton\n className={classes.buttonUpdateIcon}\n size=\"small\"\n >\n <RefreshIcon />\n </IconButton>{version}</div>\n </Tooltip> :\n version\n }</div>\n </Typography>\n </IsVisible>\n {installedVersion && <Typography component={'span'} className={classes.cardContentFlexBetween}>\n <div>{t('Installed version')}:</div>\n <div className={classes.cardContentFlex}>{installedFrom && !installedFrom.startsWith(`iobroker.${name}@`) &&\n <Tooltip title={t('Non-NPM-Version: ') + installedFrom}>\n <GitHubIcon\n fontSize=\"small\"\n className={classes.versionWarn}\n />\n </Tooltip>\n }{installedVersion}\n </div>\n </Typography>}\n </div>\n </CardContent>\n </Card>;\n}\n\nAdapterTile.propTypes = {\n commandRunning: PropTypes.bool,\n rating: PropTypes.object,\n onSetRating: PropTypes.func,\n};\n\nexport default withStyles(styles)(AdapterTile);","import React, { useCallback, useState } from 'react';\n\nimport PropTypes from 'prop-types';\n\nimport Button from '@mui/material/Button';\nimport Dialog from '@mui/material/Dialog';\nimport DialogActions from '@mui/material/DialogActions';\nimport DialogContent from '@mui/material/DialogContent';\nimport Typography from '@mui/material/Typography';\nimport Paper from '@mui/material/Paper';\nimport { AppBar, Box, Checkbox, FormControlLabel, IconButton, InputAdornment, Tab, Tabs, TextField, Autocomplete } from '@mui/material';\nimport { makeStyles } from '@mui/styles';\n\nimport npmIcon from '../assets/npm.png';\nimport { FaGithub as GithubIcon } from 'react-icons/fa';\nimport UrlIcon from '@mui/icons-material/Language';\nimport SmsIcon from '@mui/icons-material/Sms';\nimport CloseIcon from '@mui/icons-material/Close';\nimport CheckIcon from '@mui/icons-material/Check';\n\nimport I18n from '@iobroker/adapter-react-v5/i18n';\nimport Icon from '@iobroker/adapter-react-v5/Components/Icon';\n\nfunction TabPanel(props) {\n const { children, value, index, ...other } = props;\n\n return <div\n role=\"tabpanel\"\n hidden={value !== index}\n id={`full-width-tabpanel-${index}`}\n aria-labelledby={`full-width-tab-${index}`}\n {...other}\n >\n {value === index && <Box style={{ paddingTop: 10 }} p={3}>\n <Typography component=\"div\">{children}</Typography>\n </Box>}\n </div>;\n}\n\nTabPanel.propTypes = {\n children: PropTypes.node,\n index: PropTypes.any.isRequired,\n value: PropTypes.any.isRequired,\n};\n\nfunction a11yProps(index) {\n return {\n id: `full-width-tab-${index}`,\n 'aria-controls': `full-width-tabpanel-${index}`,\n };\n}\n\nconst useStyles = makeStyles(theme => ({\n root: {\n backgroundColor: theme.palette.background.paper,\n width: '100%',\n height: '100%'\n },\n paper: {\n maxWidth: 1000\n },\n tabPaper: {\n padding: theme.spacing(2)\n },\n title: {\n marginTop: 10,\n padding: theme.spacing(1),\n marginLeft: theme.spacing(1),\n fontSize: 18,\n color: theme.palette.primary.main\n },\n warningText: {\n color: '#f53939'\n },\n noteText: {\n marginTop: theme.spacing(2),\n },\n errorTextNoGit: {\n fontSize: 13,\n color: '#ff1616'\n },\n listIcon: {\n width: 24,\n height: 24,\n },\n listIconWithMargin: {\n width: 24,\n height: 24,\n marginRight: 8,\n },\n tabSelected: {\n color: theme.palette.mode === 'dark' ? theme.palette.secondary.contrastText : '#FFFFFF !important',\n },\n}));\n\n// some older browsers do not have flat\nif (!Array.prototype.flat) {\n // eslint-disable-next-line\n Object.defineProperty(Array.prototype, 'flat', {\n configurable: true,\n value: function flat() {\n const depth = isNaN(arguments[0]) ? 1 : Number(arguments[0]);\n\n return depth ? Array.prototype.reduce.call(this, function (acc, cur) {\n if (Array.isArray(cur)) {\n acc.push.apply(acc, flat.call(cur, depth - 1));\n } else {\n acc.push(cur);\n }\n\n return acc;\n }, []) : Array.prototype.slice.call(this);\n },\n writable: true\n });\n}\n\nconst GitHubInstallDialog = ({ categories, repository, onClose, open, installFromUrl, t }) => {\n t = t || I18n.t;\n\n const classes = useStyles();\n const [autocompleteValue, setAutocompleteValue] = useState(null);\n const [debug, setDebug] = useState((window._localStorage || window.localStorage).getItem('App.gitDebug') === 'true');\n const [url, setUrl] = useState('');\n const [currentTab, setCurrentTab] = useState((window._localStorage || window.localStorage).getItem('App.gitTab') || 'npm');\n\n // eslint-disable-next-line array-callback-return\n const list = useCallback(() =>\n categories\n .map(category => category.adapters)\n .sort()\n .flat()\n .map(el => {\n const adapter = repository[el];\n if (!adapter?.controller) {\n const parts = (adapter.extIcon || adapter.meta || adapter.readme || '').toString().split('/');\n return {\n value: el + '/' + parts[3],\n name: `${adapter?.name} [${parts[3]}]`,\n icon: adapter.extIcon,\n nogit: !!adapter.nogit\n };\n } else {\n return null;\n }\n })\n .filter(it => it)\n .sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0),\n [categories, repository]);\n\n const closeInit = () => {\n setAutocompleteValue(null);\n setUrl('');\n };\n\n const _list = currentTab !== 'URL' ? list() : null;\n\n return <Dialog\n onClose={onClose}\n open={open}\n classes={{ paper: classes.paper }}\n >\n <DialogContent dividers>\n <div className={classes.root}>\n <AppBar position=\"static\" color=\"default\">\n <Tabs\n value={currentTab}\n onChange={(e, newTab) => {\n (window._localStorage || window.localStorage).setItem('App.gitTab', newTab);\n setCurrentTab(newTab);\n }}\n variant=\"fullWidth\"\n indicatorColor=\"secondary\"\n >\n <Tab\n label={t('From npm')}\n wrapped\n classes={{ selected: classes.tabSelected }}\n icon={<img src={npmIcon} alt=\"npm\" width={24} height={24} />}\n {...a11yProps(0)}\n value=\"npm\"\n />\n <Tab\n label={t('From github')}\n wrapped\n classes={{ selected: classes.tabSelected }}\n icon={<GithubIcon style={{ width: 24, height: 24 }} width={24} height={24} />}\n {...a11yProps(0)}\n value=\"GitHub\"\n />\n <Tab\n label={t('Custom')}\n wrapped\n classes={{ selected: classes.tabSelected }}\n icon={<UrlIcon width={24} height={24} />}\n {...a11yProps(1)}\n value=\"URL\"\n />\n </Tabs>\n </AppBar>\n <div className={classes.title}>{t('Install or update the adapter from %s', currentTab || 'npm')}\n </div>\n {currentTab === 'npm' ? <Paper className={classes.tabPaper}>\n <div style={{ display: 'flex', alignItems: 'center' }}>\n <FormControlLabel\n control={\n <Checkbox\n checked={debug}\n onChange={e => {\n (window._localStorage || window.localStorage).setItem('App.gitDebug', e.target.checked ? 'true' : 'false');\n setDebug(e.target.checked);\n }} />}\n label={t('Debug outputs')}\n />\n </div>\n <div style={{ display: 'flex', alignItems: 'flex-end' }}>\n <SmsIcon style={{ marginRight: 10 }} />\n <Autocomplete\n fullWidth\n value={autocompleteValue}\n onChange={(_, newValue) => setAutocompleteValue(newValue)}\n options={_list}\n getOptionLabel={option => option.name}\n renderInput={params => {\n const _params = {...params};\n _params.InputProps = _params.InputProps || {};\n _params.InputProps.startAdornment = <InputAdornment position=\"start\">\n <Icon src={autocompleteValue?.icon || ''} className={classes.listIcon}/>\n </InputAdornment>;\n\n return <TextField\n variant=\"standard\"\n {...params}\n label={I18n.t('Select adapter')}\n />;\n }}\n renderOption={(props, option) => <Box component=\"li\" sx={{ '& > img': { mr: 2, flexShrink: 0 } }} {...props}>\n <Icon src={option.icon || ''} className={classes.listIconWithMargin}/>\n {option.name}\n </Box>}\n />\n </div>\n <div style={{\n fontSize: 24,\n fontWeight: 'bold',\n marginTop: 40\n }}>{t('Warning!')}</div>\n <div className={classes.warningText}>\n {t('npm_warning', 'NPM', 'NPM')}\n </div>\n <div className={classes.noteText} >\n {t('github_note')}\n </div>\n </Paper> : null}\n {currentTab === 'GitHub' ? <Paper className={classes.tabPaper}>\n <div style={{ display: 'flex', alignItems: 'center' }}>\n <FormControlLabel\n control={\n <Checkbox\n checked={debug}\n onChange={(e) => setDebug(e.target.checked)} />}\n label={t('Debug outputs')}\n />\n </div>\n <div style={{ display: 'flex', alignItems: 'flex-end' }}>\n <SmsIcon style={{ marginRight: 10 }} />\n <Autocomplete\n fullWidth\n value={autocompleteValue}\n getOptionDisabled={option => option.nogit}\n renderOption={(props, option) => <Box component=\"li\" sx={{ '& > img': { mr: 2, flexShrink: 0 } }} {...props}>\n <Icon src={option.icon || ''} className={classes.listIconWithMargin}/>\n {option.name}\n {option.nogit && <div className={classes.errorTextNoGit}>{I18n.t('This adapter cannot be installed from git as must be built before installation.')}</div>}\n </Box>}\n onChange={(_, newValue) => setAutocompleteValue(newValue)}\n options={_list}\n getOptionLabel={option => option.name}\n renderInput={params => {\n const _params = {...params};\n _params.InputProps = _params.InputProps || {};\n _params.InputProps.startAdornment = <InputAdornment position=\"start\">\n <Icon src={autocompleteValue?.icon || ''} className={classes.listIconWithMargin}/>\n </InputAdornment>;\n\n return <TextField\n variant=\"standard\"\n {...params}\n label={I18n.t('Select adapter')}\n />;\n }}\n />\n </div>\n <div style={{\n fontSize: 24,\n fontWeight: 'bold',\n marginTop: 40\n }}>{t('Warning!')}</div>\n <div className={classes.warningText}>\n {t('github_warning', 'GitHub', 'GitHub')}\n </div>\n <div className={classes.noteText} >\n {t('github_note')}\n </div>\n </Paper> : null}\n {currentTab === 'URL' ? <Paper className={classes.tabPaper}>\n <div style={{ display: 'flex', alignItems: 'center' }}>\n <TextField\n variant=\"standard\"\n fullWidth\n label={t('URL')}\n helperText={t('URL or file path')}\n value={url}\n onChange={event => setUrl(event.target.value)}\n InputProps={{\n endAdornment: url ? <InputAdornment position=\"end\">\n <IconButton\n size=\"small\"\n onClick={() => setUrl('')}\n >\n <CloseIcon />\n </IconButton>\n </InputAdornment> : null\n }}\n />\n </div>\n <div style={{\n display: 'flex',\n alignItems: 'center'\n }}>\n <FormControlLabel\n control={\n <Checkbox\n checked={debug}\n onChange={(e) => setDebug(e.target.checked)} />}\n label={t('Debug outputs')}\n />\n </div>\n <div style={{\n fontSize: 24,\n fontWeight: 'bold',\n marginTop: 40\n }}>{t('Warning!')}</div>\n <div className={classes.warningText}>\n {t('github_warning', 'URL', 'URL')}\n </div>\n <div className={classes.noteText} >\n {t('github_note')}\n </div>\n </Paper> : null}\n </div>\n </DialogContent>\n <DialogActions>\n <Button\n variant=\"contained\"\n disabled={((currentTab === 'GitHub' || currentTab === 'npm') && !autocompleteValue) || (currentTab === 'URL' && !url)}\n autoFocus\n onClick={() => {\n if (currentTab === 'GitHub') {\n const parts = (autocompleteValue?.value || '').split('/');\n //const _url = 'https://github.com/' + parts[1] + '/ioBroker.' + parts[0] + '/tarball/master';\n const _url = `${parts[1]}/ioBroker.${parts[0]}`;\n installFromUrl(_url, debug, true);\n } else if (currentTab === 'URL') {\n if (!url.includes('.')) {\n installFromUrl('iobroker.' + url, debug, true);\n } else {\n installFromUrl(url, debug, true);\n }\n } else if (currentTab === 'npm') {\n const parts = (autocompleteValue?.value || '').split('/');\n if (!parts[0].includes('.')) {\n installFromUrl('iobroker.' + parts[0], debug, true);\n } else {\n installFromUrl(parts[0], debug, true);\n }\n }\n onClose();\n closeInit();\n }}\n color=\"primary\"\n startIcon={<CheckIcon/>}\n >\n {t('Install')}\n </Button>\n <Button\n variant=\"contained\"\n onClick={() => {\n onClose();\n closeInit();\n }}\n color=\"grey\"\n startIcon={<CloseIcon />}\n >\n {t('Close')}\n </Button>\n </DialogActions>\n </Dialog>;\n}\n\nexport default GitHubInstallDialog;","import React, {Component} from 'react';\nimport { withStyles } from '@mui/styles';\nimport PropTypes from 'prop-types';\nimport semver from 'semver';\nimport clsx from 'clsx';\n\nimport List from '@mui/material/List';\nimport ListItem from '@mui/material/ListItem';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';\nimport ListItemText from '@mui/material/ListItemText';\nimport Checkbox from '@mui/material/Checkbox';\nimport { Avatar, CircularProgress } from '@mui/material';\n\nimport AdapterUpdateDialog from '../../dialogs/AdapterUpdateDialog';\n\nconst styles = theme => ({\n smallAvatar: {\n width: theme.spacing(3),\n height: theme.spacing(3)\n },\n listItem: {\n marginBottom: 2,\n background: theme.palette.background\n },\n toVersion: {\n color: theme.palette.mode === 'dark' ? '#00dc00' : '#008100',\n fontWeight: 'bold',\n },\n updateDone: {\n background: '#5ef05e80',\n opacity: 0.7,\n },\n '@media screen and (max-width: 400px)': {\n minWidth:{\n minWidth:32\n },\n listItem:{\n paddingLeft:2\n }\n },\n});\n\nclass AdaptersUpdater extends Component {\n constructor(props) {\n super(props);\n\n this.updateAvailable = this.detectUpdates();\n this.initialVersions = {};\n this.updateAvailable.forEach(adapter => this.initialVersions[adapter] = this.props.installed[adapter].version);\n\n this.state = {\n current: this.props.current,\n };\n\n this.currentRef = React.createRef();\n\n this.props.onUpdateSelected([...this.updateAvailable], this.updateAvailable);\n }\n\n UNSAFE_componentWillReceiveProps(nextProps, nextContext) {\n if (nextProps.current !== this.state.current) {\n this.setState({current: nextProps.current});\n setTimeout(() =>\n this.currentRef.current?.scrollIntoView(), 200);\n }\n }\n\n static isUpdateAvailable(oldVersion, newVersion) {\n try {\n return semver.gt(newVersion, oldVersion) === true;\n } catch (e) {\n console.warn(`Cannot compare \"${newVersion}\" and \"${oldVersion}\"`);\n return false;\n }\n }\n\n detectUpdates() {\n const updateAvailable = [];\n\n Object.keys(this.props.repository).forEach(adapter => {\n const _installed = this.props.installed[adapter];\n // ignore js-controller in this dialog\n if (adapter === 'js-controller' || adapter === 'admin') {\n return;\n }\n if (_installed &&\n _installed.ignoreVersion !== this.props.repository[adapter].version &&\n AdaptersUpdater.isUpdateAvailable(_installed.version, this.props.repository[adapter].version)\n ) {\n if (!AdapterUpdateDialog.checkCondition(this.props.repository[adapter].messages, _installed.version, this.props.repository[adapter].version)) {\n updateAvailable.push(adapter);\n }\n }\n });\n\n updateAvailable.sort();\n\n return updateAvailable;\n }\n\n getNews(value) {\n const adapter = this.props.repository[value];\n const installed = this.props.installed[value];\n const news = [];\n\n if (installed && adapter && adapter.news) {\n Object.keys(adapter.news).forEach(version => {\n try {\n if (semver.gt(version, installed.version)) {\n news.push({\n version,\n news: this.props.noTranslation ? adapter.news[version].en : (adapter.news[version][this.props.lang] || adapter.news[version].en)\n });\n }\n } catch (e) {\n // ignore it\n console.warn(`Cannot compare \"${version}\" and \"${installed.version}\"`);\n }\n });\n }\n\n return news;\n }\n\n renderOneAdapter(adapter) {\n const checked = this.props.selected.includes(adapter);\n if ((this.props.finished || this.props.inProcess) && !checked) {\n return null;\n }\n const image = '.' + this.props.installed[adapter].localIcon;\n\n return <React.Fragment key={adapter}>\n <ListItem\n key={adapter}\n dense\n classes={{root: clsx(this.props.classes.listItem, this.props.updated.includes(adapter) && this.props.classes.updateDone)}}\n ref={this.state.current === adapter && this.currentRef}\n >\n <ListItemIcon className={this.props.classes.minWidth}>\n <Avatar\n variant=\"square\"\n alt={adapter}\n src={image}\n className={this.props.classes.smallAvatar}\n />\n </ListItemIcon>\n <ListItemText\n primary={adapter}\n title={this.getNews(adapter).map(item => `${item.version}: ${item.news}`).join('\\n')}\n secondary={<span>{this.initialVersions[adapter]} → <span className={this.props.classes.toVersion}>{this.props.repository[adapter].version}</span></span>}\n />\n {!this.props.finished && !this.props.inProcess && <ListItemSecondaryAction>\n <Checkbox\n edge=\"end\"\n checked={checked}\n tabIndex={-1}\n disableRipple\n disabled={this.props.inProcess}\n onClick={() => {\n const selected = [...this.props.selected];\n const pos = selected.indexOf(adapter);\n if (pos !== -1) {\n selected.splice(pos, 1);\n } else {\n selected.push(adapter);\n selected.sort();\n }\n this.props.onUpdateSelected(selected);\n }}\n />\n </ListItemSecondaryAction>}\n {this.state.current === adapter && !this.props.stoppedOnError && !this.props.finished && <ListItemSecondaryAction>\n <CircularProgress/>\n </ListItemSecondaryAction>}\n </ListItem>\n\n </React.Fragment>;\n }\n\n render() {\n return <List className={this.props.classes.root}>\n {this.updateAvailable.map(adapter => this.renderOneAdapter(adapter))}\n </List>;\n }\n}\n\nAdaptersUpdater.propTypes = {\n inProcess: PropTypes.bool.isRequired,\n lang: PropTypes.string.isRequired,\n t: PropTypes.func.isRequired,\n stoppedOnError: PropTypes.bool.isRequired,\n socket: PropTypes.object.isRequired,\n repository: PropTypes.object.isRequired,\n installed: PropTypes.object.isRequired,\n onUpdateSelected: PropTypes.func.isRequired,\n selected: PropTypes.array.isRequired,\n current: PropTypes.string.isRequired,\n updated: PropTypes.array.isRequired,\n finished: PropTypes.bool.isRequired,\n noTranslation: PropTypes.bool,\n}\n\nexport default withStyles(styles)(AdaptersUpdater);\n","import React, { Component } from 'react';\nimport { withStyles } from '@mui/styles';\nimport PropTypes from 'prop-types';\n\nimport DialogActions from '@mui/material/DialogActions';\nimport DialogContent from '@mui/material/DialogContent';\nimport Checkbox from '@mui/material/Checkbox';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport Button from '@mui/material/Button';\nimport Dialog from '@mui/material/Dialog';\nimport Grid from '@mui/material/Grid';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport Toolbar from '@mui/material/Toolbar';\nimport {IconButton, Tooltip} from '@mui/material';\n\nimport CheckIcon from '@mui/icons-material/Check';\nimport CloseIcon from '@mui/icons-material/Close';\n\nimport AdaptersUpdater from '../components/Adapters/AdaptersUpdater';\nimport Command from '../components/Command';\nimport I18n from \"@iobroker/adapter-react-v5/i18n\";\nimport Utils from \"@iobroker/adapter-react-v5/Components/Utils\";\nimport LanguageIcon from \"@mui/icons-material/Language\";\n\nconst styles = theme => {\n return ({\n dialogRoot: {\n height: 'calc(100% - 64px)',\n },\n wrapperHead: {\n justifyContent: 'space-between',\n display: 'flex'\n },\n checkbox: {\n marginRight: 10\n },\n appBar: {\n flexWrap: 'wrap',\n position: 'sticky',\n bottom: -10,\n paddingLeft: theme.spacing(1),\n background: theme.name === 'blue' ? '#5d6467' : (theme.name === 'dark' ? '#5b5b5b' : '#FFF'),\n },\n container:{\n overflow: 'hidden',\n height: 'calc(100% - 48px)'\n },\n '@media screen and (max-width: 602px)': {\n container: {\n height: 'auto'\n }\n },\n '@media screen and (max-width: 500px)': {\n content: {\n padding: 8\n }\n },\n languageButton: {\n position: 'absolute',\n right: 73,\n top: 11\n },\n languageButtonActive: {\n color: theme.palette.primary.main\n },\n })\n};\n\nclass AdaptersUpdaterDialog extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n selected: [],\n inProcess: false,\n finished: false,\n current: '',\n updated: [],\n stoppedOnError: false,\n debug: (window._localStorage || window.localStorage).getItem('AdaptersUpdaterDialog.debug') === 'true',\n stopOnError: (window._localStorage || window.localStorage).getItem('AdaptersUpdaterDialog.stopOnError') !== 'false',\n closeOnFinished: (window._localStorage || window.localStorage).getItem('AdaptersUpdaterDialog.closeOnFinished') === 'true',\n };\n\n this.updateAvailable = [];\n }\n\n updateAdapter(adapter, version, cb) {\n this.onAdapterFinished = cb;\n this.setState({ current: adapter, currentVersion: version });\n }\n\n onStartUpdate() {\n this.setState({ inProcess: true }, () => {\n this.props.onSetCommandRunning(true);\n this.processList = [...this.state.selected];\n this.processList = this.processList.map(adapter => ({adapter, version: this.props.repository[adapter]?.version}));\n\n this.updateAdapters(() => {\n this.setState({ inProcess: false, finished: true }, () => {\n this.props.onSetCommandRunning(false);\n if (this.state.closeOnFinished) {\n this.props.onClose(!!this.state.updated.length);\n } else {\n // update adapters and so on\n }\n });\n });\n });\n }\n\n updateAdapters(cb) {\n if (!this.processList || !this.processList.length) {\n cb && cb();\n } else {\n const {adapter, version} = this.processList.shift();\n\n this.updateAdapter(adapter, version, () => {\n const updated = [...this.state.updated];\n updated.push(adapter);\n this.setState({ updated }, () =>\n setTimeout(() => this.updateAdapters(cb), 200));\n });\n }\n }\n\n render() {\n return <Dialog\n open={true}\n maxWidth=\"lg\"\n fullWidth={!!this.state.current}\n onClose={() => this.props.onClose(!!this.state.updated.length)}\n aria-labelledby=\"update-dialog-title\"\n aria-describedby=\"update-dialog-description\"\n classes={{ paper: this.props.classes.dialogRoot }}\n scroll=\"paper\"\n >\n <DialogTitle id=\"update-dialog-title\">\n <div className={this.props.classes.wrapperHead}>\n {this.props.t('Update %s adapter(s)', this.state.selected.length)}\n {!this.state.finished && !this.state.inProcess && <Tooltip title={this.props.t('Select/Unselect all')}><Checkbox\n checked={this.state.selected.length === this.updateAvailable.length}\n className={this.props.classes.checkbox}\n tabIndex={-1}\n indeterminate={this.state.selected.length !== this.updateAvailable.length && this.state.selected.length !== 0}\n disableRipple\n onClick={() => {\n let selected = [];\n if (this.state.selected.length !== this.updateAvailable.length) {\n selected = [...this.updateAvailable];\n }\n this.setState({ selected });\n }}\n /></Tooltip>}\n {I18n.getLanguage() !== 'en' && this.props.toggleTranslation ? <IconButton\n size=\"large\"\n className={Utils.clsx(this.props.classes.languageButton, this.props.noTranslation && this.props.classes.languageButtonActive)}\n onClick={() => this.props.toggleTranslation()}\n title={I18n.t('Disable/Enable translation')}\n >\n <LanguageIcon />\n </IconButton> : null}\n </div>\n </DialogTitle>\n <DialogContent classes={{ root: this.props.classes.content }} style={{ height: '100%' }}>\n <Grid container direction=\"row\" className={this.props.classes.container}>\n <Grid item style={{ height: '100%', overflow: 'hidden', width: this.state.current ? 250 : '100%' }}>\n <div style={{ height: '100%', overflow: 'auto' }}>\n <AdaptersUpdater\n t={this.props.t}\n finished={this.state.finished}\n inProcess={this.state.inProcess}\n selected={this.state.selected}\n current={this.state.current}\n stoppedOnError={this.state.stoppedOnError}\n updated={this.state.updated}\n lang={this.props.lang}\n socket={this.props.socket}\n installed={this.props.installed}\n repository={this.props.repository}\n noTranslation={this.props.noTranslation}\n onUpdateSelected={(selected, updateAvailable) => {\n if (updateAvailable) {\n this.updateAvailable = updateAvailable;\n }\n this.setState({ selected });\n }}\n />\n </div>\n </Grid>\n {!!this.state.current && <Grid item style={{ height: '100%', overflow: 'hidden', width: 'calc(100% - 260px)', minWidth: 240 }}>\n <Command\n noSpacing\n key={this.state.current}\n ready\n currentHost={this.props.currentHost}\n socket={this.props.socket}\n t={this.props.t}\n cmd={'upgrade ' + this.state.current + '@' + this.state.currentVersion + (this.state.debug ? ' --debug' : '')}\n onFinished={() => this.onAdapterFinished()}\n errorFunc={() => {\n if (this.state.stopOnError) {\n this.setState({ stoppedOnError: true, finished: true });\n this.onAdapterFinished = null;\n this.props.onSetCommandRunning(false);\n } else {\n this.onAdapterFinished();\n }\n }}\n />\n </Grid>}\n </Grid>\n <Toolbar variant=\"dense\" disableGutters className={this.props.classes.appBar}>\n <FormControlLabel\n control={<Checkbox\n disabled={this.state.finished}\n checked={this.state.stopOnError}\n onChange={() => {\n (window._localStorage || window.localStorage).setItem('AdaptersUpdaterDialog.stopOnError', this.state.stopOnError ? 'false' : 'true');\n this.setState({ stopOnError: !this.state.stopOnError });\n }}\n />}\n label={this.props.t('Stop on error')}\n />\n <FormControlLabel\n control={<Checkbox\n disabled={this.state.finished}\n checked={this.state.closeOnFinished}\n onChange={() => {\n (window._localStorage || window.localStorage).setItem('AdaptersUpdaterDialog.closeOnFinished', this.state.closeOnFinished ? 'false' : 'true');\n this.setState({ closeOnFinished: !this.state.closeOnFinished });\n }} />}\n label={this.props.t('Close on finished')}\n />\n <FormControlLabel\n control={<Checkbox\n disabled={this.state.finished || this.state.inProcess}\n checked={this.state.debug}\n onChange={() => {\n (window._localStorage || window.localStorage).setItem('AdaptersUpdaterDialog.debug', this.state.debug ? 'false' : 'true');\n this.setState({ debug: !this.state.debug });\n }} />}\n label={this.props.t('Debug info')}\n />\n </Toolbar>\n </DialogContent>\n <DialogActions>\n <Button\n variant=\"contained\"\n disabled={this.state.stoppedOnError || this.state.inProcess || this.state.finished || !this.state.selected.length}\n onClick={() => this.onStartUpdate()}\n color=\"primary\"\n autoFocus\n startIcon={<CheckIcon/>}\n >\n {this.props.t('Update')}\n </Button>\n <Button\n variant=\"contained\"\n onClick={() => this.props.onClose(!!this.state.updated.length)}\n disabled={this.state.inProcess}\n color=\"grey\"\n startIcon={<CloseIcon />}\n >\n {this.props.t('Close')}\n </Button>\n </DialogActions>\n </Dialog>;\n }\n}\n\nAdaptersUpdaterDialog.propTypes = {\n currentHost: PropTypes.string.isRequired,\n lang: PropTypes.string.isRequired,\n t: PropTypes.func.isRequired,\n socket: PropTypes.object.isRequired,\n onClose: PropTypes.func.isRequired,\n repository: PropTypes.object.isRequired,\n installed: PropTypes.object.isRequired,\n onSetCommandRunning: PropTypes.func.isRequired,\n noTranslation: PropTypes.bool,\n toggleTranslation: PropTypes.func,\n}\n\nexport default withStyles(styles)(AdaptersUpdaterDialog);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport Dialog from '@mui/material/Dialog';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogActions from '@mui/material/DialogActions';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport Rating from '@mui/material/Rating';\nimport { Button, TextField } from '@mui/material';\nimport List from '@mui/material/List';\nimport ListItem from '@mui/material/ListItem';\nimport ListItemText from '@mui/material/ListItemText';\nimport ListItemAvatar from '@mui/material/ListItemAvatar';\nimport InputLabel from '@mui/material/InputLabel';\nimport MenuItem from '@mui/material/MenuItem';\nimport FormControl from '@mui/material/FormControl';\nimport Select from '@mui/material/Select';\n\nimport VoteIcon from '@mui/icons-material/HowToVote';\nimport CloseIcon from '@mui/icons-material/Close';\n\nconst styles = theme => ({\n rating: {\n marginBottom: 20,\n },\n listRating: {\n marginRight: theme.spacing(1),\n },\n listTime: {\n opacity: 0.5,\n fontStyle: 'italic',\n },\n list: {\n //maxHeight: 200,\n },\n listOwn: {\n backgroundColor: theme.name === 'colored' || theme.name === 'light' ? '#16516e2e' : theme.palette.secondary.dark\n },\n listTitle: {\n backgroundColor: theme.palette.primary.dark,\n paddingTop: 4,\n paddingBottom: 4,\n marginBottom: 4,\n color: '#ffffff',\n textAlign: 'center'\n },\n languageFilter: {\n width: 300,\n },\n ratingTextControl: {\n width: 'calc(100% - 138px)',\n marginRight: 8,\n },\n ratingLanguageControl: {\n width: 130,\n },\n noComments: {\n width: '100%',\n textAlign: 'center',\n marginTop: theme.spacing(2)\n },\n commentCount: {\n marginTop: 2,\n marginLeft: theme.spacing(1),\n opacity: 0.8,\n fontSize: 10,\n float: 'right'\n }\n});\n\nconst LANGUAGES = [\n {\n id: 'en',\n title: 'English'\n },\n {\n id: 'de',\n title: 'Deutsch'\n },\n {\n id: 'ru',\n title: 'русский'\n },\n {\n id: 'pt',\n title: 'Portugues'\n },\n {\n id: 'nl',\n title: 'Nederlands'\n },\n {\n id: 'fr',\n title: 'français'\n },\n {\n id: 'it',\n title: 'Italiano'\n },\n {\n id: 'es',\n title: 'Espanol'\n },\n {\n id: 'pl',\n title: 'Polski'\n },\n {\n id: 'zh-ch',\n title: '简体中文'\n }\n];\n\nclass RatingDialog extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n ratingNumber: 0,\n ratingComment: '',\n votings: null,\n ratingLang: this.props.lang,\n filterLang: (window._localStorage || window.localStorage).getItem('app.commentLang') || this.props.lang,\n commentsByLanguage: {},\n };\n }\n\n componentDidMount() {\n fetch('https://rating.iobroker.net/adapter/' + this.props.adapter + '?uuid=' + this.props.uuid)\n .then(res => res.json())\n .then(votings => {\n votings = votings || {};\n votings.rating = votings.rating || {};\n const versions = Object.keys(votings.rating);\n versions.sort((a, b) => votings.rating[a].ts > votings.rating[b].ts ? -1 : (votings.rating[a].ts < votings.rating[b].ts ? 1 : 0));\n const commentsByLanguage = {};\n\n if (votings.comments) {\n votings.comments.sort((a, b) => a.ts > b.ts ? -1 : (a.ts < b.ts ? 1 : 0));\n\n votings.comments.forEach(comment => {\n commentsByLanguage[comment.lang] = commentsByLanguage[comment.lang] || 0;\n commentsByLanguage[comment.lang]++;\n });\n }\n\n if (versions.length) {\n const item = votings.rating[versions[0]];\n this.setState({ votings, ratingNumber: item ? item.r : 0, commentsByLanguage});\n } else {\n this.setState({ votings, commentsByLanguage });\n }\n });\n }\n\n setAdapterRating(adapter, version, rating, comment, lang) {\n return fetch('https://rating.iobroker.net/vote', {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n redirect: 'follow',\n body: JSON.stringify({ uuid: this.props.uuid, adapter, version, rating, comment, lang})\n })\n .then(res => res.json())\n .then(update => {\n window.alert(this.props.t('Vote:') + ' ' + adapter + '@' + version + '=' + rating);\n const repository = JSON.parse(JSON.stringify(this.props.repository));\n repository[adapter].rating = update;\n return repository;\n })\n .catch(e => {\n window.alert('Cannot vote: ' + e);\n return null;\n });\n }\n\n renderComments() {\n if (this.state.votings?.comments && this.state.votings.comments.length) {\n let found = this.state.votings.comments.find(comment =>\n !(this.state.filterLang && this.state.filterLang !== '_' && comment.lang !== this.state.filterLang));\n\n return <div style={{ width: '100%', textAlign: 'left'}}>\n <h3 className={this.props.classes.listTitle} >{this.props.t('Comments')}</h3>\n <FormControl variant=\"standard\" className={this.props.classes.languageFilter}>\n <InputLabel>{this.props.t('Show comments in language')}</InputLabel>\n <Select\n variant=\"standard\"\n value={this.state.filterLang}\n onChange={e => {\n (window._localStorage || window.localStorage).setItem('app.commentLang', e.target.value);\n this.setState({filterLang: e.target.value})\n }}\n >\n <MenuItem value={'_'}>{this.props.t('All')} <span className={this.props.classes.commentCount}>{this.state.votings.comments.length}</span></MenuItem>\n {LANGUAGES.map(item => <MenuItem\n key={item.id}\n value={item.id}\n >{item.title} {this.state.commentsByLanguage[item.id] ? <span className={this.props.classes.commentCount}>{this.state.commentsByLanguage[item.id]}</span> : null}</MenuItem>)}\n </Select>\n </FormControl>\n <List classes={{ root: this.props.classes.list }} dense disablePadding>\n {found && this.state.votings.comments.map((comment, i) => {\n if (this.state.filterLang && this.state.filterLang !== '_' && comment.lang !== this.state.filterLang) {\n return null;\n } else {\n return comment ? <ListItem\n key={i}\n title={comment.uuid ? this.props.t('Your comment') : ''}\n classes={{ root: comment.uuid ? this.props.classes.listOwn : undefined }} dense>\n <ListItemAvatar classes={{ root: this.props.classes.listRating }}>\n <Rating readOnly defaultValue={comment.rating} size=\"small\" />\n </ListItemAvatar>\n <ListItemText\n primary={comment.comment}\n secondary={new Date(comment.ts).toLocaleString() + ' / v' + comment.version}\n classes={{ secondary: this.props.classes.listTime }}\n />\n </ListItem> : null;\n }\n })}\n {!found && <div className={this.props.classes.noComments}>{this.props.t('No comments in selected language')}</div>}\n </List>\n </div>\n } else {\n return null;\n }\n }\n\n render() {\n let item;\n let versions;\n if (this.state.votings) {\n const votings = this.state.votings.rating;\n versions = Object.keys(votings);\n versions.sort((a, b) => votings[a].ts > votings[b].ts ? -1 : (votings[a].ts < votings[b].ts ? 1 : 0));\n if (versions.length) {\n item = votings[versions[0]];\n }\n }\n\n return <Dialog\n open={true}\n onClose={() => this.props.onClose()}\n >\n <DialogTitle>{`${this.props.t('Review')} ${this.props.adapter}${this.props.version ? '@' + this.props.version : ''}`}</DialogTitle>\n <DialogContent style={{ textAlign: 'center' }} title={(this.props.currentRating && this.props.currentRating.title) || ''}>\n <Rating\n className={this.props.classes.rating}\n name={this.props.adapter}\n value={this.props.version ? this.state.ratingNumber : this.props.currentRating?.rating && this.props.currentRating.rating.r}\n size=\"large\"\n readOnly={!this.props.version}\n onChange={(event, newValue) =>\n this.setState({ ratingNumber: newValue })}\n />\n {this.props.version ? <div style={{width: '100%', textAlign: 'left'}}>\n <TextField\n variant=\"standard\"\n className={this.props.classes.ratingTextControl}\n value={this.state.ratingComment}\n label={this.props.t('Comment to version')}\n inputProps={{ maxLength: 200 }}\n helperText={this.props.t('Max length %s characters', 200)}\n onChange={e =>\n this.setState({ ratingComment: e.target.value })}\n />\n <FormControl variant=\"standard\" className={this.props.classes.ratingLanguageControl}>\n <InputLabel>{this.props.t('Language')}</InputLabel>\n <Select\n variant=\"standard\"\n value={this.state.ratingLang}\n onChange={e => this.setState({ratingLang: e.target.value})}\n >\n {LANGUAGES.map(item => <MenuItem key={item.id} value={item.id}>{item.title}</MenuItem>)}\n </Select>\n </FormControl>\n </div> : null}\n {this.props.version ?\n <div style={{ paddingTop: 20, paddingBottom: 16 }}>{this.props.t('Rate how good this version of the adapter works on your system. You can vote for every new version.')}</div>\n : null}\n\n {versions && item ? <div>{this.props.t('You voted for %s on %s', versions[0], new Date(item.ts).toLocaleDateString())}</div> : null}\n {this.renderComments()}\n </DialogContent>\n <DialogActions>\n {this.props.version && <Button\n variant=\"contained\"\n autoFocus\n color=\"primary\"\n disabled={!this.state.ratingNumber || this.state.votings === null}\n onClick={() => {\n if (this.state.ratingNumber !== item?.r || this.state.ratingComment) {\n this.setAdapterRating(this.props.adapter, this.props.version, this.state.ratingNumber, this.state.ratingComment, this.state.ratingLang)\n .then(repository => this.props.onClose(repository));\n } else {\n this.props.onClose();\n }\n }}\n startIcon={<VoteIcon />}\n >\n {this.props.t('Rate')}\n </Button>}\n <Button\n autoFocus={!this.props.version}\n variant=\"contained\"\n onClick={() => this.props.onClose()}\n color=\"grey\"\n startIcon={<CloseIcon />}\n >\n {this.props.t('Close')}\n </Button>\n </DialogActions>\n </Dialog>;\n }\n}\n\nRatingDialog.propTypes = {\n t: PropTypes.func.isRequired,\n lang: PropTypes.string.isRequired,\n uuid: PropTypes.string.isRequired,\n version: PropTypes.string,\n currentRating: PropTypes.object,\n adapter: PropTypes.string.isRequired,\n onClose: PropTypes.func.isRequired,\n repository: PropTypes.object,\n};\n\nexport default withStyles(styles)(RatingDialog);\n","/* eslint-disable array-callback-return */\nimport React, { Component, Fragment, createRef } from 'react';\nimport semver from 'semver';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { withStyles } from '@mui/styles';\n\nimport {\n Grid,\n Button,\n IconButton,\n LinearProgress,\n Table,\n TableBody,\n TableCell,\n TableContainer,\n TableHead,\n TableRow,\n TextField,\n Tooltip,\n Typography,\n InputAdornment,\n ListItemText,\n Hidden\n} from '@mui/material';\nimport Dialog from '@mui/material/Dialog';\nimport DialogActions from '@mui/material/DialogActions';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogTitle from '@mui/material/DialogTitle';\n\n// import CloudOffIcon from '@mui/icons-material/CloudOff';\nimport FolderIcon from '@mui/icons-material/Folder';\nimport FolderOpenIcon from '@mui/icons-material/FolderOpen';\nimport RefreshIcon from '@mui/icons-material/Refresh';\nimport ListIcon from '@mui/icons-material/List';\nimport ViewListIcon from '@mui/icons-material/ViewList';\nimport ViewModuleIcon from '@mui/icons-material/ViewModule';\nimport UpdateIcon from '@mui/icons-material/Update';\nimport StarIcon from '@mui/icons-material/Star';\nimport CloseIcon from '@mui/icons-material/Close';\nimport { FaGithub as GithubIcon } from 'react-icons/fa';\n\nimport { blue, green } from '@mui/material/colors';\n\nimport Router from '@iobroker/adapter-react-v5/Components/Router';\n\nimport AdapterDeletionDialog from '../dialogs/AdapterDeletionDialog';\nimport AdapterInfoDialog from '../dialogs/AdapterInfoDialog';\nimport AdapterUpdateDialog from '../dialogs/AdapterUpdateDialog';\nimport AddInstanceDialog from '../dialogs/AddInstanceDialog';\nimport AdapterRow from '../components/Adapters/AdapterRow';\nimport AdapterTile from '../components/Adapters/AdapterTile';\nimport TabContainer from '../components/TabContainer';\nimport TabContent from '../components/TabContent';\nimport TabHeader from '../components/TabHeader';\nimport CustomSelectButton from '../components/CustomSelectButton';\nimport GitHubInstallDialog from '../dialogs/GitHubInstallDialog';\nimport { licenseDialogFunc } from '../dialogs/LicenseDialog';\nimport CustomModal from '../components/CustomModal';\nimport AdaptersUpdaterDialog from '../dialogs/AdaptersUpdaterDialog';\nimport RatingDialog from '../dialogs/RatingDialog';\nimport SlowConnectionWarningDialog from '../dialogs/SlowConnectionWarningDialog';\nimport IsVisible from '../components/IsVisible';\n\nconst WIDTHS = {\n emptyBlock: 50,\n name: 300,\n connectionType: 85,\n installed: 120,\n available: 120,\n update: 40,\n license: 80,\n install: 220,\n};\n\nconst SUM = Object.keys(WIDTHS).reduce((s, i) => s + WIDTHS[i], 0);\n\nconst styles = theme => ({\n container: {\n height: '100%',\n width: '100%',\n },\n containerNotFullHeight: {\n height: 'calc(100% - 22px)',\n },\n containerFullHeight: {\n height: '100%',\n },\n smallAvatar: {\n width: theme.spacing(3),\n height: theme.spacing(3)\n },\n table: {\n width: '100%',\n tableLayout: 'fixed',\n minWidth: 960,\n '& td': {\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n paddingTop: 2,\n paddingBottom: 2,\n paddingRight: 4,\n paddingLeft: 4,\n },\n '& th': {\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n paddingTop: 2,\n paddingBottom: 2,\n paddingRight: 4,\n paddingLeft: 4,\n }\n },\n hidden: {\n visibility: 'hidden'\n },\n name: {\n flexWrap: 'nowrap',\n width: WIDTHS.name\n },\n emptyBlock: {\n flexWrap: 'nowrap',\n width: WIDTHS.emptyBlock\n },\n description: {\n width: `calc(100% - ${SUM}px)`\n },\n keywords: {\n\n },\n connectionType: {\n width: WIDTHS.connectionType\n },\n installed: {\n width: WIDTHS.installed\n },\n available: {\n width: WIDTHS.available,\n paddingRight: 6\n },\n update: {\n width: WIDTHS.update,\n padding: 0\n },\n license: {\n width: WIDTHS.license\n },\n install: {\n width: WIDTHS.install\n },\n green: {\n color: green[500]\n },\n blue: {\n color: blue[700]\n },\n category: {\n backgroundColor: theme.palette.background.default,\n },\n grow: {\n flexGrow: 1\n },\n updateAvailable: {\n color: green[700]\n },\n tabContainer: {\n overflow: 'auto'\n },\n containerVersion: {\n borderBottom: 0\n },\n currentVersion: {\n display: 'flex',\n padding: 20,\n fontSize: 15,\n borderBottom: '1px solid silver',\n transition: 'background 0.2s',\n cursor: 'pointer',\n '&:hover': {\n background: '#c0c0c045',\n }\n },\n updateAllButton: {\n position: 'relative'\n },\n updateAllIcon: {\n position: 'absolute',\n top: 15,\n left: 15,\n opacity: 0.4,\n color: theme.palette.mode === 'dark' ? '#aad5ff' : '#007fff'\n },\n counters: {\n marginRight: 10,\n minWidth: 120,\n display: 'flex',\n '& div': {\n marginLeft: 3\n }\n },\n visible: {\n opacity: 0\n },\n infoAdapters: {\n fontSize: 10,\n color: theme.palette.mode === 'dark' ? '#9c9c9c' : '#333',\n cursor: 'pointer'\n },\n greenText: {\n color: '#00a005d1'\n },\n rating: {\n marginBottom: 20,\n },\n buttonIcon: {\n marginRight: theme.spacing(1),\n },\n notStableRepo: {\n background: theme.palette.mode === 'dark' ? '#8a7e00' : '#fdee20',\n color: '#111',\n fontSize: 14,\n padding: '2px 8px',\n borderRadius: 5\n },\n viewModeDiv: {\n display: 'flex',\n flexFlow: 'wrap',\n overflow: 'auto',\n justifyContent: 'center'\n }\n});\n\nclass Adapters extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n lastUpdate: 0,\n repository: {},\n installed: {},\n adapters: {},\n instances: {},\n categories: [],\n hostData: {},\n hostOs: '',\n nodeJsVersion: '',\n init: false,\n addInstanceDialog: false,\n addInstanceError: false,\n addInstanceAdapter: '',\n addInstanceId: 'auto',\n addInstanceHost: '',\n adapterDeletionDialog: false,\n adapterDeletionAdapter: null,\n update: false,\n dialog: null,\n dialogProp: null,\n filterConnectionType: false,\n search: (window._localStorage || window.localStorage).getItem('Adapter.search') || '',\n list: false,\n viewMode: false,\n updateList: false,\n installedList: false,\n categoriesTiles: 'All',\n filterTiles: 'A-Z',\n arrayFilter: [{ name: 'A-Z' }, { name: 'Popular first' }, { name: 'Recently updated' }],\n gitHubInstallDialog: false,\n updateAvailable: [],\n filteredList: null,\n showUpdater: false,\n descWidth: 300,\n showStatistics: false,\n showSetRating: null,\n readTimeoutMs: SlowConnectionWarningDialog.getReadTimeoutMs(),\n showSlowConnectionWarning: false,\n adapterToUpdate: '',\n adapterInstallVersion: '',\n currentHost: this.props.currentHost,\n forceUpdateAdapters: this.props.forceUpdateAdapters,\n };\n\n this.rebuildSupported = false;\n this.inputRef = createRef();\n this.countRef = createRef();\n\n this.t = this.translate;\n this.wordCache = {};\n this.cache = {};\n this.listOfVisibleAdapterLength = 0;\n this.allAdapters = 0;\n this.installedAdapters = 0;\n this.recentUpdatedAdapters = 0;\n this.uuid = '';\n }\n\n translate = (word, arg1, arg2) => {\n if (arg1 !== undefined) {\n return this.props.t(word, arg1, arg2);\n }\n\n if (!this.wordCache[word]) {\n this.wordCache[word] = this.props.t(word);\n }\n\n return this.wordCache[word];\n }\n\n renderSlowConnectionWarning() {\n if (!this.state.showSlowConnectionWarning) {\n return null;\n } else {\n return <SlowConnectionWarningDialog\n readTimeoutMs={this.state.readTimeoutMs}\n t={this.t}\n onClose={readTimeoutMs => {\n if (readTimeoutMs) {\n this.setState({showSlowConnectionWarning: false, readTimeoutMs}, () =>\n this.updateAll());\n } else {\n this.setState({showSlowConnectionWarning: false});\n }\n }}\n />;\n }\n }\n\n componentDidMount() {\n if (this.props.ready) {\n this.updateAll()\n .then(() => {\n this.state.search && this.filterAdapters();\n this.props.adaptersWorker.registerHandler(this.onAdaptersChanged);\n this.props.instancesWorker.registerHandler(this.onAdaptersChanged);\n });\n }\n }\n\n updateAll(update, bigUpdate, indicateUpdate) {\n return this.getAdapters(update, bigUpdate, indicateUpdate)\n .then(() => this.getAdaptersInfo(update, indicateUpdate));\n }\n\n componentDidUpdate() {\n const descWidth = this.getDescWidth();\n if (this.state.descWidth !== descWidth) {\n this.setState({ descWidth });\n }\n if (this.countRef.current) {\n this.countRef.current.innerHTML = this.listOfVisibleAdapterLength;\n }\n }\n\n componentWillUnmount() {\n this.updateTimeout && clearTimeout(this.updateTimeout);\n this.updateTimeout = null;\n this.props.adaptersWorker.unregisterHandler(this.onAdaptersChanged);\n this.props.instancesWorker.unregisterHandler(this.onAdaptersChanged);\n }\n\n static getDerivedStateFromProps() {\n const location = Router.getLocation();\n\n return {\n dialog: location.dialog,\n dialogProp: location.id\n };\n }\n\n onAdaptersChanged = events => {\n this.tempAdapters = this.tempAdapters || JSON.parse(JSON.stringify(this.state.adapters || {}));\n this.tempInstalled = this.tempInstalled || JSON.parse(JSON.stringify(this.state.installed || {}));\n this.tempInstances = this.tempInstances || JSON.parse(JSON.stringify(this.state.instances || {}));\n\n events.forEach(event => {\n // detect if adapter or instance\n let isInstance = !!event.id.match(/\\.\\d+$/);\n if (isInstance) {\n if (event.type === 'deleted' || !event.obj) {\n delete this.tempInstances[event.id];\n } else {\n this.tempInstances[event.id] = {\n enabled: event.obj.common.enabled,\n icon: event.obj.common.icon,\n name: event.obj.common.name,\n };\n }\n } else {\n if (event.type === 'deleted' || !event.obj) {\n // extract name from id\n const p = event.id.split('.');\n\n // remove from installed\n delete this.tempInstalled[p[2]];\n delete this.tempAdapters[event.id];\n } else {\n const name = event.obj.common.name;\n if (this.tempInstalled[name]) {\n // Update attributes\n Object.keys(this.tempInstalled[name]).forEach(attr => {\n if (event.obj.common[attr] !== undefined && attr !== 'installedFrom') {\n this.tempInstalled[name][attr] = event.obj.common[attr];\n }\n });\n } else {\n // new\n this.tempInstalled[event.id.split('.').pop()] = JSON.parse(JSON.stringify(event.obj.common));\n }\n this.tempAdapters[event.id] = event.obj;\n }\n }\n });\n\n this.updateTimeout && clearTimeout(this.updateTimeout);\n this.updateTimeout = setTimeout(() => {\n const adapters = this.tempAdapters;\n this.tempAdapters = null;\n const installed = this.tempInstalled;\n this.tempInstalled = null;\n const instances = this.tempInstances;\n this.tempInstances = null;\n\n this.analyseInstalled(adapters, installed, null, () =>\n this.calculateInfo(instances));\n }, 300);\n }\n\n analyseInstalled(adapters, installed, repository, cb) {\n adapters = adapters || this.state.adapters;\n installed = installed || this.state.installed;\n repository = repository || this.state.repository;\n\n const updateAvailable = [];\n\n Object.keys(installed).forEach(value => {\n if (installed[value]) {\n const version = installed[value].version;\n const repositoryValue = repository[value];\n\n if (repositoryValue &&\n repositoryValue.version !== version &&\n Adapters.updateAvailable(version, repositoryValue.version) &&\n !updateAvailable.includes(value)\n ) {\n updateAvailable.push(value);\n }\n }\n });\n\n this.cache.listOfVisibleAdapter = null;\n\n this.setState({\n adapters,\n updateAvailable,\n installed,\n repository\n }, () => cb && cb());\n }\n\n getAdapters = (update, bigUpdate, indicateUpdate) => {\n console.log('[ADAPTERS] getAdapters');\n let adapters;\n let installed;\n const currentHost = this.state.currentHost;\n update = update || this.props.adaptersWorker.isForceUpdate();\n\n return new Promise(resolve => {\n if (!this.state.update && (update || indicateUpdate)) {\n this.setState({ update: true }, () => resolve());\n } else {\n resolve();\n }\n })\n .then(() => this.props.adaptersWorker.getAdapters(update))\n .catch(e => window.alert('Cannot getAdapters: ' + e))\n .then(_adapters => {\n adapters = _adapters;\n return this.props.socket.getInstalled(currentHost, update, this.state.readTimeoutMs)\n .catch(e => {\n window.alert('Cannot getInstalled: ' + e);\n e.toString().includes('timeout') && this.setState({showSlowConnectionWarning: true});\n return null;\n });\n })\n .then(_installed => {\n installed = _installed;\n return this.props.socket.getRepository(currentHost, { repo: this.props.systemConfig.common.activeRepo, update: (bigUpdate || indicateUpdate) }, update, this.state.readTimeoutMs)\n .catch(e => {\n window.alert('Cannot getRepository: ' + e);\n e.toString().includes('timeout') && this.setState({showSlowConnectionWarning: true});\n return null;\n })\n })\n .then(repository =>\n this.analyseInstalled(adapters, installed, repository));\n }\n\n getWordVotes(votes) {\n if (votes === 1) {\n return this.t('vote');\n } else if (votes >= 2 && votes <= 4) {\n return this.t('votes2');\n } else if (votes >= 5 && votes <= 20) {\n return this.t('votes');\n } else {\n const v = votes % 10;\n if (v === 1) {\n return this.t('vote21');\n } else if (v >= 2 && v <= 4) {\n return this.t('votes2');\n } else {\n return this.t('votes');\n }\n }\n }\n\n calculateInfo(instances, ratings, hostData) {\n hostData = hostData || this.state.hostData;\n ratings = ratings || this.state.ratings;\n instances = instances || this.state.instances;\n\n const adapters = this.state.adapters;\n\n const installed = JSON.parse(JSON.stringify(this.state.installed));\n const repository = JSON.parse(JSON.stringify(this.state.repository));\n\n const nodeJsVersion = (hostData['Node.js'] || '').replace('v', '');\n const hostOs = hostData.os;\n\n const categories = {};\n const categoriesSorted = [];\n let categoriesExpanded = {};\n try {\n categoriesExpanded = JSON.parse((window._localStorage || window.localStorage).getItem('Adapters.expandedCategories')) || {};\n } catch (error) {\n // ignore\n }\n\n\n Object.keys(installed).forEach(value => {\n const adapter = installed[value];\n if (adapters[value]?.common?.ignoreVersion) {\n adapter.ignoreVersion = adapters[value].common.ignoreVersion;\n }\n\n if (!adapter.controller && value !== 'hosts') {\n if (!repository[value]) {\n repository[value] = JSON.parse(JSON.stringify(adapter));\n repository[value].version = '';\n }\n }\n adapter.count = 0;\n adapter.enabled = 0;\n });\n\n Object.keys(instances).forEach(id => {\n const adapterName = instances[id].name;\n if (installed[adapterName]) {\n installed[adapterName].count++;\n }\n });\n\n const now = Date.now();\n this.recentUpdatedAdapters = 0;\n this.installedAdapters = 0;\n\n Object.keys(repository).forEach(value => {\n if (value === 'hosts') {\n return;\n }\n const adapter = repository[value];\n if (adapter.keywords) {\n adapter.keywords = adapter.keywords.map(word => word.toLowerCase());\n }\n const _installed = installed[value];\n\n adapter.rating = ratings && ratings[value];\n\n if (adapter.rating && adapter.rating.rating) {\n adapter.rating.title = [\n `${this.t('Total rating:')} ${adapter.rating.rating.r} (${adapter.rating.rating.c} ${this.getWordVotes(adapter.rating.rating.c)})`,\n (_installed && _installed.version && adapter.rating[_installed.version]) ?\n `${this.t('Rating for')} v${_installed.version}: ${adapter.rating[_installed.version].r} (${adapter.rating[_installed.version].c} ${this.getWordVotes(adapter.rating.rating.c)})`\n : ''\n ].filter(i => i).join('\\n');\n } else {\n adapter.rating = { title: this.t('No rating or too few data') };\n }\n\n if (!adapter.controller) {\n const type = adapter.type;\n const installedInGroup = installed[value];\n\n const daysAgo = Math.round((now - new Date(adapter.versionDate).getTime()) / 86400000);\n\n if (daysAgo <= 31) {\n this.recentUpdatedAdapters++;\n }\n if (installed[value]) {\n this.installedAdapters++;\n }\n\n if (!categories[type]) {\n categories[type] = {\n name: type,\n translation: this.t(type + '_group'),\n count: 1,\n installed: installedInGroup ? 1 : 0,\n adapters: [value]\n };\n } else {\n categories[type].count++;\n categories[type].adapters.push(value);\n if (installedInGroup) {\n categories[type].installed++;\n }\n }\n }\n });\n\n Object.keys(categories).sort((a, b) => {\n if (a === 'general' && b !== 'general') {\n return -1;\n } else if (a !== 'general' && b === 'general') {\n return 1;\n } else if (categories[a].translation > categories[b].translation) {\n return 1;\n } else if (categories[a].translation < categories[b].translation) {\n return -1;\n } else {\n return 0;\n }\n }).forEach(value =>\n categoriesSorted.push(categories[value]));\n\n const _titles = {};\n\n Object.keys(categories).forEach(type =>\n categories[type].adapters.sort((a, b) => {\n if (installed[a] && installed[b]) {\n if (!_titles[a]) {\n let title = repository[a].titleLang || repository[a].title;\n if (typeof title === 'object') {\n title = title[this.props.lang] || title.en;\n }\n title = ((title || '').toString() || '').replace('ioBroker Visualisation - ', '');\n _titles[a] = title.toLowerCase();\n }\n if (!_titles[b]) {\n let title = repository[b].titleLang || repository[b].title;\n if (typeof title === 'object') {\n title = title[this.props.lang] || title.en;\n }\n title = ((title || '').toString() || '').replace('ioBroker Visualisation - ', '');\n _titles[b] = title.toLowerCase();\n }\n\n return _titles[a] > _titles[b] ? 1 : (_titles[a] < _titles[b] ? -1 : 0);\n } else if (installed[a]) {\n return -1;\n } else if (installed[b]) {\n return 1;\n } else {\n // sort by real language name and not by adapter name\n if (!_titles[a]) {\n let title = repository[a].titleLang || repository[a].title;\n if (typeof title === 'object') {\n title = title[this.props.lang] || title.en;\n }\n title = ((title || '').toString() || '').replace('ioBroker Visualisation - ', '');\n _titles[a] = title.toLowerCase();\n }\n if (!_titles[b]) {\n let title = repository[b].titleLang || repository[b].title;\n if (typeof title === 'object') {\n title = title[this.props.lang] || title.en;\n }\n title = ((title || '').toString() || '').replace('ioBroker Visualisation - ', '');\n _titles[b] = title.toLowerCase();\n }\n\n return _titles[a] > _titles[b] ? 1 : (_titles[a] < _titles[b] ? -1 : 0);\n }\n }));\n\n let installedList = false;\n try {\n installedList = JSON.parse((window._localStorage || window.localStorage).getItem('Adapters.installedList'));\n } catch (error) {\n\n }\n const list = (window._localStorage || window.localStorage).getItem('Adapters.list') === 'true';\n const viewMode = (window._localStorage || window.localStorage).getItem('Adapters.viewMode') === 'true';\n const updateList = (window._localStorage || window.localStorage).getItem('Adapters.updateList') === 'true';\n const categoriesTiles = (window._localStorage || window.localStorage).getItem('Adapters.categoriesTiles') || 'All';\n const filterTiles = (window._localStorage || window.localStorage).getItem('Adapters.filterTiles') || 'A-Z';\n this.allAdapters = Object.keys(repository).length - 1;\n\n this.cache.listOfVisibleAdapter = null;\n\n this.setState({\n repository,\n installed,\n ratings,\n filterTiles,\n categoriesTiles,\n installedList,\n instances,\n updateList,\n viewMode,\n list,\n lastUpdate: Date.now(),\n hostData,\n hostOs,\n nodeJsVersion,\n categories: categoriesSorted,\n categoriesExpanded,\n init: true,\n update: false\n });\n }\n\n getAdaptersInfo = (update, indicateUpdate) => {\n if (!this.state.currentHost) {\n return;\n }\n\n // Do not update too often\n if (Date.now() - this.state.lastUpdate > 1000) {\n console.log('[ADAPTERS] getAdaptersInfo');\n\n const currentHost = this.state.currentHost;\n\n let hostData;\n let ratings;\n\n return new Promise(resolve => {\n if (!this.state.update || indicateUpdate) {\n this.setState({ update: true }, () => resolve());\n } else {\n resolve();\n }\n })\n .then(() => this.props.socket.getHostInfo(currentHost, update, this.state.readTimeoutMs)\n .catch(e => {\n window.alert(`Cannot getHostInfo for \"${currentHost}\": ${e}`);\n e.toString().includes('timeout') && this.setState({showSlowConnectionWarning: true});\n })\n )\n .then(_hostData => {\n hostData = _hostData;\n /*return this.props.socket.checkFeatureSupported('CONTROLLER_NPM_AUTO_REBUILD')\n .catch(e => window.alert('Cannot checkFeatureSupported: ' + e));\n })\n .then(_rebuild => {\n rebuild = _rebuild;*/\n if (this.props.adminGuiConfig.adapters?.allowAdapterRating === false) {\n return Promise.resolve({});\n }\n\n return this.props.socket.getRatings(update)\n .catch(e => window.alert('Cannot read ratings: ' + e));\n })\n .then(_ratings => {\n ratings = _ratings;\n return this.props.socket.getCompactInstances(update)\n .catch(e => {\n window.alert('Cannot read countsOfInstances: ' + e);\n return {};\n });\n })\n .then(instances => {\n // simulation\n // setTimeout(() => this.setState({showSlowConnectionWarning: true}), 5000);\n\n this.uuid = ratings?.uuid || null;\n // BF (2022.02.09) TODO: Remove all \"rebuild\" stuff later (when js-controller 4.x will be mainstream)\n // this.rebuildSupported = false;// rebuild || false; Rebuild is no more supported from js-controller 4.0\n this.calculateInfo(instances, ratings, hostData);\n })\n .catch(error => window.alert('Cannot get adapters info: ' + error));\n } else {\n return Promise.resolve();\n }\n }\n\n async addInstance(adapter, instance, debug = false, customUrl = false) {\n if (!instance && this.props.expertMode && !customUrl) {\n this.setState({\n addInstanceDialog: true,\n addInstanceAdapter: adapter,\n addInstanceHost: this.state.currentHost.replace(/^system\\.host\\./, '')\n });\n } else {\n if (instance && !customUrl) {\n const instances = this.props.instancesWorker.getInstances();\n // if the instance already exists\n if (instances[`system.adapter.${adapter}.${instance}`]) {\n return this.setState({ addInstanceError: true });\n }\n }\n const host = (this.state.addInstanceHost || this.state.currentHost).replace(/^system\\.host\\./, '');\n this.props.executeCommand(`${customUrl ? 'url' : 'add'} ${adapter} ${instance ? instance + ' ' : ''}--host ${host} ${debug ? '--debug' : ''}`, true);\n }\n }\n\n upload(adapter) {\n this.props.executeCommand('upload ' + adapter);\n }\n\n /*rebuild(adapter) {\n this.props.executeCommand('rebuild ' + adapter)\n }*/\n\n delete(adapter, deleteCustom) {\n this.props.executeCommand(`del ${adapter}${deleteCustom ? ' --custom' : ''}`);\n }\n\n update(adapter, version) {\n this.props.executeCommand(`upgrade ${adapter}@${version}`);\n }\n\n closeAddInstanceDialog() {\n this.setState({\n addInstanceDialog: false,\n addInstanceAdapter: '',\n addInstanceId: 'auto'\n });\n }\n\n openAdapterDeletionDialog(adapter) {\n this.setState({\n adapterDeletionDialog: true,\n adapterDeletionAdapter: adapter\n });\n }\n\n closeAdapterDeletionDialog() {\n this.setState({\n adapterDeletionDialog: false,\n adapterDeletionAdapter: null\n });\n }\n\n toggleCategory(category) {\n this.setState(oldState => {\n\n const categoriesExpanded = oldState.categoriesExpanded;\n categoriesExpanded[category] = !categoriesExpanded[category];\n\n (window._localStorage || window.localStorage).setItem('Adapters.expandedCategories', JSON.stringify(categoriesExpanded));\n\n return { categoriesExpanded };\n });\n }\n\n handleHostsChange(event) {\n this.setState({addInstanceHost: event.target.value.replace(/^system\\.host\\./, '')});\n }\n\n handleInstanceChange(event) {\n this.setState({addInstanceId: event.target.value});\n }\n\n static updateAvailable(oldVersion, newVersion) {\n try {\n return semver.gt(newVersion, oldVersion) === true;\n } catch (e) {\n console.warn(`[ADAPTERS] Cannot compare \"${newVersion}\" and \"${oldVersion}\"`);\n return false;\n }\n }\n\n getDependencies = value => {\n const adapter = this.state.repository[value];\n let result = [];\n\n if (adapter) {\n const dependencies = adapter.dependencies;\n const nodeVersion = adapter.node;\n\n dependencies && dependencies.length && dependencies.forEach(dependency => {\n\n const entry = {\n name: '',\n version: null,\n installed: false,\n installedVersion: null,\n rightVersion: false\n };\n\n const checkVersion = typeof dependency !== 'string';\n const keys = Object.keys(dependency);\n entry.name = !checkVersion ? dependency : keys ? keys[0] : null;\n entry.version = checkVersion ? dependency[entry.name] : null;\n\n if (result && entry.name) {\n const installed = this.state.installed[entry.name];\n\n entry.installed = !!installed;\n entry.installedVersion = installed ? installed.version : null;\n try {\n entry.rightVersion = installed ? (checkVersion ? semver.satisfies(installed.version, entry.version, { includePrerelease: true }) : true) : false;\n } catch (e) {\n entry.rightVersion = true;\n }\n }\n\n result.push(entry);\n });\n\n if (nodeVersion) {\n const entry = {\n name: 'node',\n version: nodeVersion,\n installed: true,\n installedVersion: this.state.nodeJsVersion,\n rightVersion: false\n };\n\n try {\n entry.rightVersion = semver.satisfies(this.state.nodeJsVersion, nodeVersion);\n } catch (e) {\n entry.rightVersion = true;\n }\n\n result.push(entry);\n }\n }\n\n return result;\n }\n\n rightDependencies(value) {\n const adapter = this.state.repository[value];\n let result = true;\n\n if (adapter) {\n const dependencies = adapter.dependencies;\n const nodeVersion = adapter.node;\n\n if (dependencies) {\n if (dependencies instanceof Array) {\n dependencies.forEach(dependency => {\n const checkVersion = typeof dependency !== 'string';\n const keys = Object.keys(dependency);\n const name = !checkVersion ? dependency : keys ? keys[0] : null;\n\n if (result && name) {\n const installed = this.state.installed[name];\n\n try {\n result = installed ? (checkVersion ? semver.satisfies(installed.version, dependency[name], { includePrerelease: true }) : true) : false;\n } catch (e) {\n result = true;\n }\n }\n });\n } else if (typeof dependencies === 'object') {\n Object.keys(dependencies).forEach(dependency => {\n if (dependency && dependencies[dependency] !== undefined && result) {\n const installed = this.state.installed[dependency];\n const checkVersion = typeof dependencies[dependency] !== 'string';\n try {\n result = installed ? (checkVersion ? semver.satisfies(installed.version, dependency[dependency], { includePrerelease: true }) : true) : false;\n } catch (e) {\n result = true;\n }\n }\n });\n } else {\n console.error(`[ADAPTERS] Invalid dependencies for ${value}: ${JSON.stringify(dependencies)}`);\n }\n }\n\n if (result && nodeVersion) {\n try {\n result = semver.satisfies(this.state.nodeJsVersion, nodeVersion);\n } catch (e) {\n result = true;\n }\n }\n }\n\n return result;\n }\n\n rightOs(value) {\n const adapter = this.state.repository[value];\n\n if (adapter?.os) {\n return !!adapter.os.find(value => this.state.hostOs === value);\n }\n\n return true;\n }\n\n openInfoDialog(adapter) {\n Router.doNavigate('tab-adapters', 'readme', adapter);\n }\n\n openUpdateDialog(adapterToUpdate) {\n this.setState({adapterToUpdate});\n }\n\n openInstallVersionDialog(adapterInstallVersion) {\n this.setState({adapterInstallVersion});\n }\n\n closeAdapterUpdateDialog(cb) {\n this.setState({adapterToUpdate: ''}, () =>\n cb && cb());\n }\n\n renderSetRatingDialog() {\n if (this.state.showSetRating) {\n return <RatingDialog\n t={this.t}\n lang={this.props.lang}\n version={this.state.showSetRating.version}\n adapter={this.state.showSetRating.adapter}\n repository={this.state.repository}\n currentRating={this.state.showSetRating.rating}\n onClose={repository => {\n if (repository) {\n this.setState({showSetRating: null, repository});\n } else {\n this.setState({showSetRating: null});\n }\n }}\n uuid={this.uuid}\n />;\n } else {\n return null;\n }\n }\n\n getNews(value, all = false) {\n const adapter = this.state.repository[value];\n const installed = this.state.installed[value];\n const news = [];\n\n if (installed && adapter && adapter.news) {\n Object.keys(adapter.news).forEach(version => {\n try {\n if (semver.gt(version, installed.version) || all) {\n news.push({\n version,\n news: this.props.noTranslation ? adapter.news[version].en : (adapter.news[version][this.props.lang] || adapter.news[version].en)\n });\n }\n } catch (e) {\n // ignore it\n console.warn(`[ADAPTERS] Cannot compare \"${version}\" and \"${installed.version}\"`);\n }\n });\n }\n\n return news;\n }\n\n handleFilterChange(event) {\n this.typingTimer && clearTimeout(this.typingTimer);\n\n this.typingTimer = setTimeout(value => {\n (window._localStorage || window.localStorage).setItem('Adapter.search', value || '');\n this.typingTimer = null;\n this.filterAdapters(value);\n }, 300, event.target.value);\n }\n\n toggleConnectionTypeFilter() {\n this.setState({ filterConnectionType: !this.state.filterConnectionType });\n }\n\n expandAll() {\n this.setState(oldState => {\n const categories = oldState.categories;\n const categoriesExpanded = oldState.categoriesExpanded;\n\n categories.forEach(category => categoriesExpanded[category.name] = true);\n\n (window._localStorage || window.localStorage).setItem('Adapters.expandedCategories', JSON.stringify(categoriesExpanded));\n\n return { categoriesExpanded };\n });\n }\n\n collapseAll() {\n const categoriesExpanded = {};\n\n (window._localStorage || window.localStorage).setItem('Adapters.expandedCategories', JSON.stringify(categoriesExpanded));\n\n this.setState({ categoriesExpanded });\n }\n\n listTable() {\n let list = !this.state.list;\n if (list) {\n this.expandAll();\n }\n (window._localStorage || window.localStorage).setItem('Adapters.list', list ? 'true' : 'false');\n this.setState({ list });\n }\n\n changeViewMode() {\n this.cache.listOfVisibleAdapter = null;\n let viewMode = !this.state.viewMode;\n (window._localStorage || window.localStorage).setItem('Adapters.viewMode', viewMode ? 'true' : 'false');\n this.setState({ viewMode });\n }\n\n changeUpdateList() {\n this.cache.listOfVisibleAdapter = null;\n let updateList = !this.state.updateList;\n (window._localStorage || window.localStorage).setItem('Adapters.updateList', updateList ? 'true' : 'false');\n this.setState({ updateList });\n }\n\n changeInstalledList(onlyInstalled) {\n this.cache.listOfVisibleAdapter = null;\n let installedList = !this.state.installedList ? 1 : this.state.installedList < 2 ? 2 : false;\n if (!installedList && onlyInstalled) {\n installedList = 1;\n }\n (window._localStorage || window.localStorage).setItem('Adapters.installedList', JSON.stringify(installedList));\n this.setState({ installedList });\n }\n\n changeFilterTiles(filterTiles) {\n this.cache.listOfVisibleAdapter = null;\n (window._localStorage || window.localStorage).setItem('Adapters.filterTiles', filterTiles);\n this.setState({ filterTiles });\n }\n\n changeCategoriesTiles(categoriesTiles) {\n this.cache.listOfVisibleAdapter = null;\n (window._localStorage || window.localStorage).setItem('Adapters.categoriesTiles', categoriesTiles);\n this.setState({ categoriesTiles });\n }\n\n filterAdapters(search) {\n this.cache.listOfVisibleAdapter = null;\n search = search === undefined ? this.state.search : search;\n search = (search || '').toLowerCase().trim();\n let filteredList = [];\n if (search) {\n this.state.categories.forEach(category => category.adapters.forEach(name => {\n const adapter = this.state.repository[name];\n if (!adapter) {\n return;\n }\n\n let title = adapter.titleLang || adapter.title;\n if (typeof title === 'object') {\n title = title[this.props.lang] || title.en;\n }\n title = ((title || '').toString() || '').replace('ioBroker Visualisation - ', '');\n const desc = adapter.desc ? adapter.desc[this.props.lang] || adapter.desc.en || adapter.desc : '';\n\n if (name.includes(search)) {\n filteredList.push(name);\n } else\n if (title && typeof title === 'string' && title.toLowerCase().includes(search)) {\n filteredList.push(name);\n } else if (desc && typeof desc === 'string' && desc.toLowerCase().includes(search)) {\n filteredList.push(name);\n } else {\n adapter.keywords && adapter.keywords.forEach(value =>\n value.includes(search) && filteredList.push(name));\n }\n }));\n } else {\n filteredList = null;\n }\n this.setState({ filteredList, search });\n }\n\n getRow(value, descHidden) {\n const cached = this.cache.adapters[value];\n if (cached) {\n const adapter = this.state.repository[value];\n const installed = this.state.installed[value];\n\n if ((cached.title instanceof Object) || !cached.desc) {\n console.warn('[ADAPTERS] ' + value);\n }\n\n return <AdapterRow\n t={this.t}\n descHidden={descHidden}\n key={'adapter-' + value}\n connectionType={cached.connectionType}\n dataSource={adapter.dataSource}\n description={cached.desc}\n adapter={value}\n versionDate={cached.daysAgoText}\n enabledCount={installed && installed.enabled}\n expertMode={this.props.expertMode}\n image={cached.image}\n installedCount={installed && installed.count}\n installedFrom={installed && installed.installedFrom}\n installedVersion={installed && installed.version}\n keywords={adapter.keywords}\n name={cached.title}\n license={adapter.license}\n updateAvailable={cached.updateAvailable}\n version={adapter.version}\n hidden={false}\n rightDependencies={cached.rightDependencies}\n rightOs={cached.rightOs}\n sentry={cached.sentry}\n //rebuild={this.rebuildSupported}\n commandRunning={this.props.commandRunning}\n rating={adapter.rating}\n onSetRating={() =>\n this.setState({ showSetRating: { adapter: value, version: installed && installed.version, rating: adapter.rating}})}\n onAddInstance={() =>\n licenseDialogFunc(adapter.license === 'MIT', this.props.theme, async result =>\n result && await this.addInstance(value), (adapter.extIcon || '').split('/master')[0] + '/master/LICENSE')\n }\n onDeletion={() => this.openAdapterDeletionDialog(value)}\n onInfo={() => this.openInfoDialog(value)}\n //onRebuild={() => this.rebuild(value)}\n onUpdate={() => this.openUpdateDialog(value)}\n openInstallVersionDialog={() => this.openInstallVersionDialog(value)}\n onUpload={() => licenseDialogFunc(adapter.license === 'MIT', this.props.theme, result =>\n result && this.upload(value), (adapter.extIcon || '').split('/master')[0] + '/master/LICENSE')}//\n allowAdapterDelete={this.state.repository[value] ? this.state.repository[value].allowAdapterDelete : true}\n allowAdapterInstall={this.state.repository[value] ? this.state.repository[value].allowAdapterInstall : true}\n allowAdapterUpdate={this.state.repository[value] ? this.state.repository[value].allowAdapterUpdate : true}\n allowAdapterReadme={this.state.repository[value] ? this.state.repository[value].allowAdapterReadme : true}\n allowAdapterRating={this.props.adminGuiConfig.admin.adapters ? this.props.adminGuiConfig.admin.adapters.allowAdapterRating : true}\n />;\n } else {\n return null;\n }\n }\n clearAllFilters() {\n (window._localStorage || window.localStorage).removeItem('Adapter.search');\n (window._localStorage || window.localStorage).removeItem('Adapters.installedList');\n (window._localStorage || window.localStorage).removeItem('Adapters.updateList');\n if (this.inputRef.current) {\n this.inputRef.current.value = '';\n }\n this.setState({filteredList: null, updateList: false, filterConnectionType: false, installedList: false, search: ''}, () => this.filterAdapters());\n }\n\n getRows(descHidden) {\n if (!this.cache.listOfVisibleAdapter) {\n this.buildCache();\n }\n\n let count = 0;\n\n let rows;\n if (this.state.list) {\n rows = this.cache.listOfVisibleAdapter.map(value => {\n const item = this.getRow(value, descHidden);\n item && count++;\n return item;\n });\n } else {\n rows = this.state.categories.map(category => {\n let showCategory = category.adapters.find(value => this.cache.listOfVisibleAdapter.includes(value));\n if (!showCategory) {\n return null;\n }\n const categoryName = category.name;\n const expanded = this.state.categoriesExpanded[categoryName];\n count++;\n\n return <Fragment key={`category-${categoryName} ${category.adapters.length}`}>\n <AdapterRow\n descHidden={descHidden}\n key={'category-' + categoryName + 1}\n category\n categoryName={categoryName}\n count={category.count}\n expanded={expanded}\n installedCount={category.installed}\n name={category.translation}\n onToggle={() => this.toggleCategory(categoryName)}\n t={this.t}\n hidden={false}\n />\n\n {expanded && category.adapters.map(value => {\n const item = this.getRow(value, descHidden);\n item && count++;\n return item;\n })}\n </Fragment>;\n });\n }\n\n if (!count) {\n return !this.state.update && <tr><td\n colSpan={4}\n style={{\n padding: 16,\n fontSize: 18,\n cursor: 'pointer'\n }}\n title={this.t('Click to clear all filters')}\n onClick={() => this.clearAllFilters()}\n >\n {this.t('all items are filtered out')}\n </td></tr>;\n } else {\n return rows;\n }\n }\n\n buildCache() {\n this.cache.listOfVisibleAdapter = [];\n this.cache.adapters = {};\n const now = Date.now();\n const textDaysAgo0 = this.t('0 %d days ago');\n const textDaysAgo1 = this.t('1 %d days ago');\n const textDaysAgo2 = this.t('2 %d days ago');\n const textDaysAgo = this.t('5 %d days ago');\n\n const sortPopularFirst = !this.state.viewMode && this.state.filterTiles === 'Popular first';\n const sortRecentlyUpdated = !this.state.viewMode && this.state.filterTiles === 'Recently updated';\n\n // get all visible adapters\n this.state.categories\n .filter(cat => this.state.viewMode || !this.state.categoriesTiles || this.state.categoriesTiles === 'All' || cat.name === this.state.categoriesTiles)\n .forEach(category => category.adapters.forEach(value => {\n const adapter = this.state.repository[value];\n\n if (value === 'admin') {\n console.log('[ADAPTERS] ' + value);\n }\n\n if (adapter && !adapter.controller) {\n const connectionType = adapter.connectionType ? adapter.connectionType : '-';\n const updateAvailable = this.state.updateAvailable.includes(value);\n const installed = this.state.installed[value];\n\n let show = !this.state.filteredList || this.state.filteredList.includes(value);\n if (show && this.state.filterConnectionType) {\n show = connectionType === 'local';\n }\n if (show && this.state.updateList) {\n show = updateAvailable;\n }\n if (show && this.state.installedList) {\n show = this.state.installedList < 2 ? !!(installed && installed.version) : !!(installed && installed.version && !installed.count) ;\n }\n if (show) {\n this.cache.listOfVisibleAdapter.push(value);\n const daysAgo10 = Math.round((now - new Date(adapter.versionDate).getTime()) / 8640000);\n const daysAgo = Math.round(daysAgo10 / 10);\n\n let title = adapter.titleLang || adapter.title;\n if (typeof title === 'object') {\n title = title[this.props.lang] || title.en;\n }\n title = ((title || '').toString() || '').replace('ioBroker Visualisation - ', '');\n\n const _daysAgo10 = daysAgo % 100 <= 10 || daysAgo % 100 >= 20 ? daysAgo % 10 : 5;\n\n this.cache.adapters[value] = {\n title,\n desc: adapter.desc ? adapter.desc[this.props.lang] || adapter.desc['en'] || adapter.desc : '',\n image: installed ? '.' + installed.localIcon : adapter.extIcon,\n connectionType: adapter.connectionType ? adapter.connectionType : '-',\n updateAvailable: this.state.updateAvailable.includes(value),\n rightDependencies: this.rightDependencies(value),\n rightOs: this.rightOs(value),\n sentry: !!(adapter.plugins && adapter.plugins.sentry),\n daysAgo: daysAgo10,\n stat: sortPopularFirst && adapter.stat,\n daysAgoText: sortRecentlyUpdated && (daysAgo || daysAgo === 0) ?\n daysAgo === 0 ? textDaysAgo0 :\n (_daysAgo10 === 1 ? textDaysAgo1.replace('%d', daysAgo) :\n (_daysAgo10 === 2 || _daysAgo10 === 3 || _daysAgo10 === 4 ? textDaysAgo2.replace('%d', daysAgo) : textDaysAgo.replace('%d', daysAgo))) : ''\n };\n }\n }\n }));\n\n this.listOfVisibleAdapterLength = this.cache.listOfVisibleAdapter.length;\n\n const repo = this.state.repository;\n const adapters = this.cache.adapters;\n const installed = this.state.installed;\n\n const _titles = {};\n\n this.cache.listOfVisibleAdapter.sort((a, b) => {\n if (sortPopularFirst) {\n return repo[b].stat - repo[a].stat;\n } else\n if (sortRecentlyUpdated) {\n if (!adapters[a]) {\n return -1;\n } else if (!adapters[b]) {\n return 1;\n }\n if (adapters[a].daysAgo === adapters[b].daysAgo) {\n if (!_titles[a]) {\n let title = adapters[a].titleLang || adapters[a].title;\n if (typeof title === 'object') {\n title = title[this.props.lang] || title.en;\n }\n title = ((title || '').toString() || '').replace('ioBroker Visualisation - ', '');\n _titles[a] = title.toLowerCase();\n }\n if (!_titles[b]) {\n let title = adapters[b].titleLang || adapters[b].title;\n if (typeof title === 'object') {\n title = title[this.props.lang] || title.en;\n }\n title = ((title || '').toString() || '').replace('ioBroker Visualisation - ', '');\n _titles[a] = title.toLowerCase();\n }\n\n return _titles[a] > _titles[b] ? 1 : (_titles[a] < _titles[b] ? -1 : 0);\n } else {\n return adapters[a].daysAgo - adapters[b].daysAgo;\n }\n } else {\n if (installed[a] && installed[b]) {\n if (!_titles[a]) {\n let title = adapters[a].titleLang || adapters[a].title;\n if (typeof title === 'object') {\n title = title[this.props.lang] || title.en;\n }\n title = ((title || '').toString() || '').replace('ioBroker Visualisation - ', '');\n _titles[a] = title.toLowerCase();\n }\n if (!_titles[b]) {\n let title = adapters[b].titleLang || adapters[b].title;\n if (typeof title === 'object') {\n title = title[this.props.lang] || title.en;\n }\n title = ((title || '').toString() || '').replace('ioBroker Visualisation - ', '');\n _titles[b] = title.toLowerCase();\n }\n\n return _titles[a] > _titles[b] ? 1 : (_titles[a] < _titles[b] ? -1 : 0);\n } else if (installed[a]) {\n return -1;\n } else if (installed[b]) {\n return 1;\n } else {\n // sort by real language name and not by adapter name\n if (!_titles[a]) {\n let title = adapters[a].titleLang || adapters[a].title;\n if (typeof title === 'object') {\n title = title[this.props.lang] || title.en;\n }\n title = ((title || '').toString() || '').replace('ioBroker Visualisation - ', '');\n _titles[a] = title.toLowerCase();\n }\n if (!_titles[b]) {\n let title = adapters[b].titleLang || adapters[b].title;\n if (typeof title === 'object') {\n title = title[this.props.lang] || title.en;\n }\n title = ((title || '').toString() || '').replace('ioBroker Visualisation - ', '');\n _titles[b] = title.toLowerCase();\n }\n\n return _titles[a] > _titles[b] ? 1 : (_titles[a] < _titles[b] ? -1 : 0);\n }\n }\n });\n\n // console.log('[ADAPTERS] Update cache!');\n }\n\n getTiles() {\n if (!this.cache.listOfVisibleAdapter) {\n this.buildCache();\n }\n\n if (!this.cache.listOfVisibleAdapter.length) {\n return !this.state.update && <div style={{\n margin: 20,\n fontSize: 26\n }}>{this.props.t('all items are filtered out')}</div>;\n } else {\n return this.cache.listOfVisibleAdapter.map(value => {\n const adapter = this.state.repository[value];\n const installed = this.state.installed[value];\n const cached = this.cache.adapters[value];\n\n if (cached.title instanceof Object || !cached.desc) {\n console.warn(`[ADAPTERS] ${JSON.stringify(adapter)}`);\n }\n\n return <AdapterTile\n t={this.t}\n commandRunning={this.props.commandRunning}\n key={'adapter-' + value}\n image={cached.image}\n name={cached.title}\n dataSource={adapter.dataSource}\n adapter={value}\n stat={cached.stat}\n versionDate={cached.daysAgoText}\n connectionType={cached.connectionType}\n description={cached.desc}\n enabledCount={installed && installed.enabled}\n expertMode={this.props.expertMode}\n installedCount={installed && installed.count}\n installedFrom={installed && installed.installedFrom}\n installedVersion={installed && installed.version}\n keywords={adapter.keywords}\n license={adapter.license}\n updateAvailable={cached.updateAvailable}\n version={adapter.version}\n hidden={false}\n rightDependencies={cached.rightDependencies}\n rightOs={cached.rightOs}\n sentry={cached.sentry}\n //rebuild={this.rebuildSupported}\n rating={adapter.rating}\n onSetRating={() =>\n this.setState({ showSetRating: { adapter: value, version: installed && installed.version, rating: adapter.rating}})}\n onAddInstance={() =>\n licenseDialogFunc(adapter.license === 'MIT', this.props.theme, async result =>\n result && await this.addInstance(value), (adapter.extIcon || '').split('/master')[0] + '/master/LICENSE')}//\n onDeletion={() => this.openAdapterDeletionDialog(value)}\n onInfo={() => this.openInfoDialog(value)}\n //onRebuild={() => this.rebuild(value)}\n onUpdate={() => this.openUpdateDialog(value)}\n openInstallVersionDialog={() => this.openInstallVersionDialog(value)}\n onUpload={() => licenseDialogFunc(adapter.license === 'MIT', this.props.theme, result =>\n result && this.upload(value), (adapter.extIcon || '').split('/master')[0] + '/master/LICENSE')}//\n allowAdapterDelete={this.state.repository[value] ? this.state.repository[value].allowAdapterDelete : true}\n allowAdapterInstall={this.state.repository[value] ? this.state.repository[value].allowAdapterInstall : true}\n allowAdapterUpdate={this.state.repository[value] ? this.state.repository[value].allowAdapterUpdate : true}\n allowAdapterReadme={this.state.repository[value] ? this.state.repository[value].allowAdapterReadme : true}\n allowAdapterRating={this.props.adminGuiConfig.admin.adapters ? this.props.adminGuiConfig.admin.adapters.allowAdapterRating : true}\n />;\n });\n }\n }\n\n getUpdater() {\n if (!this.state.showUpdater) {\n return null;\n } else {\n return <AdaptersUpdaterDialog\n onSetCommandRunning={commandRunning => this.props.onSetCommandRunning(commandRunning)}\n t={this.props.t}\n currentHost={this.state.currentHost}\n lang={this.props.lang}\n installed={this.state.installed}\n repository={this.state.repository}\n toggleTranslation={this.props.toggleTranslation}\n noTranslation={this.props.noTranslation}\n onClose={reload =>\n this.setState({ showUpdater: false }, () =>\n reload && this.updateAll(true, false))}\n socket={this.props.socket}\n />;\n }\n }\n\n getDescWidth() {\n if (this.props.menuOpened) {\n return document.body.scrollWidth - SUM - 180 + 15;\n } else if (this.props.menuClosed) {\n return document.body.scrollWidth - SUM;\n } else if (this.props.menuCompact) {\n return document.body.scrollWidth - SUM - 50 + 15;\n }\n }\n\n getStatistics() {\n if (this.state.showStatistics) {\n return <Dialog\n open={true}\n onClose={() => this.setState({ showStatistics: false })}\n >\n <DialogTitle>{this.t('Statistics')}</DialogTitle>\n <DialogContent style={{ fontSize: 16 }}>\n <div className={this.props.classes.counters}>{this.t('Total adapters')}: <span style={{ paddingLeft: 6, fontWeight: 'bold' }}>{this.allAdapters}</span></div>\n <div className={this.props.classes.counters}>{this.t('Installed adapters')}: <span style={{ paddingLeft: 6, fontWeight: 'bold' }}>{this.installedAdapters}</span></div>\n <div className={this.props.classes.counters}>{this.t('Last month updated adapters')}: <span style={{ paddingLeft: 6, fontWeight: 'bold' }}>{this.recentUpdatedAdapters}</span></div>\n </DialogContent>\n <DialogActions>\n <Button variant=\"contained\" onClick={() => this.setState({ showStatistics: false })} color=\"primary\" autoFocus startIcon={<CloseIcon />}>\n {this.props.t('Close')}\n </Button>\n </DialogActions>\n </Dialog>;\n } else {\n return null;\n }\n }\n\n render() {\n if (!this.state.init) {\n return <LinearProgress />;\n }\n\n if (this.state.dialog === 'readme' && this.state.dialogProp) {\n const adapter = this.state.repository[this.state.dialogProp] || null;\n\n if (adapter) {\n return <TabContainer className={this.props.classes.tabContainer}>\n <AdapterInfoDialog\n theme={this.props.theme}\n themeName={this.props.themeName}\n themeType={this.props.themeType}\n adapter={this.state.dialogProp}\n link={adapter.readme || ''}\n socket={this.props.socket}\n t={this.t}\n />\n </TabContainer>;\n }\n }\n\n const { classes } = this.props;\n const descHidden = this.state.descWidth < 50;\n\n let updateAllButtonAvailable = !this.props.commandRunning && !!this.props.ready && !!this.state.updateList && this.state.updateAvailable.length > 1;\n\n // it is not possible to update admin in bulk\n if (updateAllButtonAvailable && this.state.updateAvailable.length === 2 && this.state.updateAvailable.includes('admin')) {\n updateAllButtonAvailable = false;\n }\n\n if (this.props.currentHost !== this.state.currentHost || this.props.forceUpdateAdapters !== this.state.forceUpdateAdapters) {\n this.hostsTimer = this.hostsTimer || setTimeout(() => {\n this.hostsTimer = null;\n this.setState({\n currentHost: this.props.currentHost,\n forceUpdateAdapters: this.props.forceUpdateAdapters,\n }, async () => await this.updateAll(false, false, true));\n }, 200);\n }\n\n return <TabContainer>\n {this.state.update &&\n <Grid item>\n <LinearProgress />\n </Grid>\n }\n <TabHeader>\n <Tooltip title={this.t('Change view mode')}>\n <IconButton size=\"large\" onClick={() => this.changeViewMode()}>\n {this.state.viewMode ? <ViewModuleIcon /> : <ViewListIcon />}\n </IconButton>\n </Tooltip>\n <Tooltip title={this.t('Check adapter for updates')}>\n <IconButton size=\"large\" onClick={() => this.updateAll(true, true)}>\n <RefreshIcon />\n </IconButton>\n </Tooltip>\n {this.state.viewMode && !this.state.list && <><Tooltip title={this.t('expand all')}>\n <IconButton size=\"large\" onClick={() => this.expandAll()}>\n <FolderOpenIcon />\n </IconButton>\n </Tooltip>\n <Tooltip title={this.t('collapse all')}>\n <IconButton size=\"large\" onClick={() => this.collapseAll()}>\n <FolderIcon />\n </IconButton>\n </Tooltip>\n </>}\n {this.state.viewMode && <Tooltip title={this.t('list')}>\n <IconButton size=\"large\" onClick={() => this.listTable()}>\n <ListIcon color={this.state.list ? 'primary' : 'inherit'} />\n </IconButton>\n </Tooltip>}\n\n {/*<Tooltip title={this.t('Filter local connection type')}>\n <IconButton size=\"large\" onClick={() => this.toggleConnectionTypeFilter()}>\n <CloudOffIcon color={this.state.filterConnectionType ? 'primary' : 'inherit'} />\n </IconButton>\n </Tooltip>*/}\n {this.state.updateList ?\n <IconButton size=\"large\" onClick={() => this.changeInstalledList(true)}>\n <StarIcon color=\"primary\" style={{ opacity: 0.3, color: this.state.installedList === 2 ? 'red' : undefined }} />\n </IconButton>\n :\n <Tooltip title={this.t(!this.state.installedList ?\n 'Show only installed' :\n (this.state.installedList < 2 ?\n 'Showed only installed adapters' :\n 'Showed only installed adapters without instance.'))}>\n <IconButton size=\"large\"\n onClick={() => this.changeInstalledList()}>\n <StarIcon style={this.state.installedList === 2 ? {color: 'red'} : null}\n color={this.state.installedList && this.state.installedList < 2 ? 'primary' : 'inherit'}/>\n </IconButton>\n </Tooltip>\n }\n <IsVisible config={this.props.adminGuiConfig} name=\"admin.adapters.filterUpdates\">\n <Tooltip title={this.t('Filter adapter with updates')}>\n <IconButton size=\"large\" onClick={() => this.changeUpdateList()}>\n <UpdateIcon color={this.state.updateList ? 'primary' : 'inherit'} />\n </IconButton>\n </Tooltip>\n </IsVisible>\n {updateAllButtonAvailable && <Tooltip title={this.t('Update all adapters')}>\n <IconButton size=\"large\" onClick={() => this.setState({ showUpdater: true })} classes={{ label: this.props.classes.updateAllButton }}>\n <UpdateIcon />\n <UpdateIcon className={this.props.classes.updateAllIcon} />\n </IconButton>\n </Tooltip>}\n\n {this.props.expertMode && this.props.adminGuiConfig.admin.adapters?.gitHubInstall !== false &&\n <Tooltip title={this.t('Install from custom URL')}>\n <IconButton size=\"large\" onClick={() => this.setState({ gitHubInstallDialog: true })}>\n <GithubIcon />\n </IconButton>\n </Tooltip>\n }\n <div className={classes.grow} />\n <TextField\n variant=\"standard\"\n inputRef={this.inputRef}\n label={this.t('Filter by name')}\n defaultValue={this.state.search}\n onChange={event => this.handleFilterChange(event)}\n InputProps={{\n endAdornment: (\n this.state.search ? <InputAdornment position=\"end\">\n <IconButton\n size=\"small\"\n onClick={() => {\n (window._localStorage || window.localStorage).removeItem('Adapter.search');\n this.inputRef.current.value = '';\n this.setState({ search: '' }, () => this.filterAdapters());\n }}\n >\n <CloseIcon />\n </IconButton>\n </InputAdornment> : null\n ),\n }}\n />\n\n {!this.state.viewMode &&\n <CustomSelectButton\n t={this.t}\n icons\n contained={this.state.categoriesTiles !== 'All'}\n translateSuffix={'_group'}\n arrayItem={[{ name: 'All' }, ...this.state.categories]}\n onClick={value => this.changeCategoriesTiles(value)}\n value={this.state.categoriesTiles} />\n }\n {!this.state.viewMode &&\n <CustomSelectButton\n t={this.t}\n arrayItem={this.state.arrayFilter}\n onClick={value => this.changeFilterTiles(value)}\n value={this.state.filterTiles} />\n }\n <div className={classes.grow} />\n <IsVisible config={this.props.adminGuiConfig} name=\"admin.adapters.statistics\">\n <Hidden only={['xs', 'sm']} >\n <div className={classes.infoAdapters} onClick={() => this.setState({ showStatistics: true })}>\n <div className={clsx(classes.counters, classes.greenText)}>{this.t('Selected adapters')}<div ref={this.countRef} /></div>\n <div className={classes.counters}>{this.t('Total adapters')}:<div>{this.allAdapters}</div></div>\n <div className={classes.counters}>{this.t('Installed adapters')}:<div>{this.installedAdapters}</div></div>\n <div className={classes.counters}>{this.t('Last month updated adapters')}:<div>{this.recentUpdatedAdapters}</div></div>\n </div>\n </Hidden>\n </IsVisible>\n </TabHeader>\n {this.state.viewMode && this.props.systemConfig && this.props.systemConfig.common && <TabContent>\n {(typeof this.props.systemConfig.common.activeRepo === 'string' && this.props.systemConfig.common.activeRepo !== 'stable') ||\n (this.props.systemConfig.common.activeRepo && typeof this.props.systemConfig.common.activeRepo !== 'string' && !this.props.systemConfig.common.activeRepo.includes('stable')) ?\n <div className={this.props.classes.notStableRepo}>{this.t('Active repo is \"%s\"', this.props.systemConfig.common.activeRepo)}</div> : null}\n <TableContainer className={clsx(classes.container, this.props.systemConfig.common.activeRepo !== 'stable' ? classes.containerNotFullHeight : classes.containerFullHeight)}>\n <Table stickyHeader size=\"small\" className={classes.table}>\n <TableHead>\n <TableRow>\n <TableCell className={classes.emptyBlock}>\n </TableCell>\n <TableCell className={classes.name}>\n <Typography>{this.t('Name')}</Typography>\n </TableCell>\n {!descHidden && <TableCell className={classes.description} style={{ width: this.state.descWidth }}>\n <Typography>{this.t('Description')}</Typography>\n </TableCell>}\n <TableCell className={classes.connectionType} />\n <TableCell className={classes.installed}>\n <Typography>{this.t('Installed')}</Typography>\n </TableCell>\n <TableCell className={classes.available}>\n <Typography>{this.t('Available')}</Typography>\n </TableCell>\n <TableCell className={classes.license}>\n <Typography>{this.t('License')}</Typography>\n </TableCell>\n <TableCell className={classes.install}>\n <Typography>{this.t('Install')}</Typography>\n </TableCell>\n </TableRow>\n </TableHead>\n <TableBody>\n {this.getRows(descHidden)}\n </TableBody>\n </Table>\n </TableContainer>\n </TabContent>}\n\n {this.getUpdater()}\n {this.getStatistics()}\n {this.renderSetRatingDialog()}\n {this.renderSlowConnectionWarning()}\n\n {!this.state.viewMode && this.props.systemConfig.common && this.props.systemConfig.common.activeRepo && <>\n {(typeof this.props.systemConfig.common.activeRepo === 'string' && this.props.systemConfig.common.activeRepo !== 'stable') ||\n (this.props.systemConfig.common.activeRepo && typeof this.props.systemConfig.common.activeRepo !== 'string' && !this.props.systemConfig.common.activeRepo.includes('stable')) ? <div className={this.props.classes.notStableRepo}>{this.t('Active repo is \"%s\"', this.props.systemConfig.common.activeRepo)}</div> : null}\n <div className={this.props.classes.viewModeDiv}>{this.getTiles()}</div>\n </>}\n\n {this.state.addInstanceDialog &&\n <AddInstanceDialog\n themeType={this.props.themeType}\n open={this.state.addInstanceDialog}\n adapter={this.state.addInstanceAdapter}\n socket={this.props.socket}\n hostsWorker={this.props.hostsWorker}\n instancesWorker={this.props.instancesWorker}\n repository={this.state.repository}\n dependencies={this.getDependencies(this.state.addInstanceAdapter)}\n currentHost={this.state.addInstanceHost}\n currentInstance={this.state.addInstanceId}\n t={this.t}\n onClick={async () =>\n await this.addInstance(this.state.addInstanceAdapter, this.state.addInstanceId)}\n onClose={() => this.closeAddInstanceDialog()}\n onHostChange={event => this.handleHostsChange(event)}\n onInstanceChange={event => this.handleInstanceChange(event)}\n />\n }\n {this.state.adapterDeletionDialog &&\n <AdapterDeletionDialog\n open={this.state.adapterDeletionDialog}\n adapter={this.state.adapterDeletionAdapter}\n socket={this.props.socket}\n t={this.t}\n onClick={deleteCustom => this.delete(this.state.adapterDeletionAdapter, deleteCustom)}\n onClose={() => this.closeAdapterDeletionDialog()}\n />\n }\n {this.state.gitHubInstallDialog && <GitHubInstallDialog\n t={this.t}\n open={this.state.gitHubInstallDialog}\n categories={this.state.categories}\n installFromUrl={async (value, debug, customUrl) =>\n await this.addInstance(value, undefined, debug, customUrl)}\n repository={this.state.repository}\n onClose={() => { this.setState({ gitHubInstallDialog: false }) }}\n />}\n {this.state.adapterToUpdate &&\n <AdapterUpdateDialog\n open={true}\n adapter={this.state.adapterToUpdate}\n adapterObject={this.state.repository[this.state.adapterToUpdate]}\n t={this.t}\n dependencies={this.getDependencies(this.state.adapterToUpdate)}\n rightDependencies={this.rightDependencies(this.state.adapterToUpdate)}\n news={this.getNews(this.state.adapterToUpdate)}\n toggleTranslation={this.props.toggleTranslation}\n noTranslation={ this.props.noTranslation }\n installedVersion={this.state.installed[this.state.adapterToUpdate]?.version}\n onUpdate={version => {\n const adapter = this.state.adapterToUpdate;\n this.closeAdapterUpdateDialog(() => this.update(adapter, version));\n }}\n onIgnore={ignoreVersion => {\n const adapter = this.state.adapterToUpdate;\n this.closeAdapterUpdateDialog(() => {\n this.props.socket.getObject('system.adapter.' + adapter)\n .then(obj => {\n if (obj) {\n obj.common.ignoreVersion = ignoreVersion;\n return this.props.socket.setObject(obj._id, obj);\n } else {\n window.alert(`Adapter \"${adapter}\" does not exist!`);\n }\n })\n .then(() => {\n const updateAvailable = [...this.state.updateAvailable];\n const pos = updateAvailable.indexOf(adapter);\n if (pos !== -1) {\n updateAvailable.splice(pos, 1);\n this.setState({ updateAvailable });\n }\n });\n });\n }}\n onClose={() => this.closeAdapterUpdateDialog()}\n />\n }\n {this.state.adapterInstallVersion &&\n <CustomModal\n open={true}\n title={this.t('Please select specific version of %s', this.state.adapterInstallVersion)}\n applyButton={false}\n onClose={() => this.setState({adapterInstallVersion: ''})}\n toggleTranslation={this.props.toggleTranslation}\n noTranslation={this.props.noTranslation}\n >\n <div className={classes.containerVersion}>\n {this.getNews(this.state.adapterInstallVersion, true).map(({ version, news }) => {\n return <div key={version} className={classes.currentVersion} onClick={() => {\n this.update(this.state.adapterInstallVersion, version);\n this.setState({adapterInstallVersion: ''});\n }}>\n <ListItemText\n primary={version}\n secondary={news}\n />\n </div>\n })}\n </div>\n </CustomModal>\n }\n </TabContainer>;\n }\n}\n\nAdapters.propTypes = {\n onSetCommandRunning: PropTypes.func.isRequired,\n commandRunning: PropTypes.bool,\n menuOpened: PropTypes.bool,\n menuClosed: PropTypes.bool,\n menuCompact: PropTypes.bool,\n adaptersWorker: PropTypes.object,\n instancesWorker: PropTypes.object,\n theme: PropTypes.object,\n themeName: PropTypes.string,\n themeType: PropTypes.string,\n systemConfig: PropTypes.object,\n socket: PropTypes.object,\n hosts: PropTypes.array,\n currentHost: PropTypes.string,\n hostsWorker: PropTypes.object,\n ready: PropTypes.bool,\n t: PropTypes.func,\n lang: PropTypes.string,\n expertMode: PropTypes.bool,\n executeCommand: PropTypes.func,\n adminGuiConfig: PropTypes.object,\n noTranslation: PropTypes.bool,\n toggleTranslation: PropTypes.func,\n};\n\nexport default withStyles(styles)(Adapters);\n","import React from 'react';\nimport { withStyles } from '@mui/styles';\nimport { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport LinearProgress from '@mui/material/LinearProgress';\n\nimport withWidth from '@iobroker/adapter-react-v5/Components/withWidth';\n\nimport Utils from '../Utils';\n\nconst styles = theme => ({\n root: {\n //border: '0 solid #FFF',\n display: 'block',\n left: 0,\n top: 0,\n width: '100%',\n height: '100%',\n //background: 'white',\n color: 'black',\n borderRadius: 4,\n boxShadow: '0px 2px 1px -1px rgb(0 0 0 / 20%), 0px 1px 1px 0px rgb(0 0 0 / 14%), 0px 1px 3px 0px rgb(0 0 0 / 12%)',\n border: '0px solid #888'\n },\n});\n\nexport function getHref(instancesWorker, tab, hostname, protocol, port, hosts, adminInstance, themeName) {\n return instancesWorker.getInstances()\n .then(instances => {\n let adapter = tab.replace(/^tab-/, '');\n let instNum;\n const m = adapter.match(/-(\\d+)$/);\n instNum = m ? parseInt(m[1], 10) : null;\n\n let instance;\n if (instNum !== null) {\n adapter = adapter.replace(/-(\\d+)$/, '');\n const name = `system.adapter.${adapter}.${instNum}`;\n instance = Object.keys(instances).find(id => id === name);\n } else {\n const name = `system.adapter.${adapter}.`;\n\n instance = instances && Object.keys(instances).find(id => id.startsWith(name));\n }\n instance = instances && instances[instance];\n\n if (!instance || !instance.common || !instance.common.adminTab) {\n console.error(`Cannot find instance ${tab}`);\n\n return '';\n }\n\n // calculate href\n let href = instance.common.adminTab.link;\n\n if (!href) {\n if (instance.common.materializeTab) {\n href = `adapter/${adapter}/tab_m.html${instNum !== null && instNum !== undefined ? '?' + instNum : ''}`;\n } else {\n href = `adapter/${adapter}/tab.html${instNum !== null && instNum !== undefined ? '?' + instNum : ''}`;\n }\n }\n\n if (!instance.common.adminTab.singleton && instNum !== null && instNum !== undefined) {\n href += `${href.includes('?') ? '&' : '?'}instance=${instNum}`;\n }\n\n if (href.includes('%')) {\n // fix for singletons\n if (instNum === null || instNum === undefined) {\n instNum = instance._id.split('.').pop();\n }\n\n // replace\n const hrefs = Utils.replaceLink(href, adapter, instNum, {\n hostname,\n protocol,\n objects: instances,\n hosts,\n adminInstance,\n port,\n });\n\n href = hrefs ? hrefs[0]?.url : '';\n }\n\n // add at the end the instance, as some adapters make bullshit like: window.location.search.slice(-1) || 0;\n href += `${href.includes('?') ? '&' : '?'}newReact=true${instNum !== null && instNum !== undefined ? '&' + instNum : ''}&react=${themeName}`;\n\n return href;\n });\n}\n\nclass CustomTab extends Component {\n constructor(props) {\n super(props);\n this.state = {\n href: '',\n };\n\n this.refIframe = React.createRef();\n this.registered = false;\n\n getHref(this.props.instancesWorker, this.props.tab, this.props.hostname, this.props.protocol, this.props.port, this.props.hosts, this.props.adminInstance, this.props.themeName)\n .then(href =>\n this.setState({ href }));\n }\n\n componentWillUnmount() {\n this.registered && this.props.onUnregisterIframeRef(this.refIframe);\n }\n\n componentDidMount() {\n if (!this.registered && this.refIframe.contentWindow) {\n this.registered = true;\n this.props.onRegisterIframeRef(this.refIframe);\n }\n }\n\n componentDidUpdate(prevProps, prevState, snapshot) {\n if (!this.registered && this.refIframe.contentWindow) {\n this.registered = true;\n this.props.onRegisterIframeRef(this.refIframe);\n }\n }\n\n render() {\n if (!this.state.href) {\n return <LinearProgress />;\n }\n\n return <iframe\n ref={el => this.refIframe = el}\n title={ this.props.tab }\n className={ this.props.classes.root }\n src={ this.state.href }\n onError={ e => {\n e.target.onerror = null;\n this.setState({href: this.state.href.replace('tab_m.html', 'tab.html') });\n }}\n />;\n }\n}\n\nCustomTab.propTypes = {\n t: PropTypes.func,\n lang: PropTypes.string,\n themeName: PropTypes.string,\n tab: PropTypes.string.isRequired,\n instancesWorker: PropTypes.object.isRequired,\n\n hostname: PropTypes.string,\n protocol: PropTypes.string,\n port: PropTypes.number,\n adminInstance: PropTypes.string,\n hosts: PropTypes.array,\n\n expertMode: PropTypes.bool,\n onRegisterIframeRef: PropTypes.func,\n onUnregisterIframeRef: PropTypes.func,\n};\n\nexport default withWidth()(withStyles(styles)(CustomTab));\n"],"sourceRoot":""}